@forge/api
4.0.04.1.0-next.0
out/api/runtime.jsout/api/runtime.js+6−1
Index: package/out/api/runtime.js
===================================================================
--- package/out/api/runtime.js
+++ package/out/api/runtime.js
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.wrapInMetrics = exports.getAppContext = exports.__getRuntime = void 0;
+exports.bindInvocationContext = exports.wrapInMetrics = exports.getAppContext = exports.__getRuntime = void 0;
const errors_1 = require("./errors");
const node_fetch_1 = require("node-fetch");
const ari_1 = require("./ari");
function __getRuntime() {
@@ -46,4 +46,9 @@
}
};
}
exports.wrapInMetrics = wrapInMetrics;
+function bindInvocationContext(fn) {
+ const AsyncLocalStorage = require('async_hooks').AsyncLocalStorage;
+ return AsyncLocalStorage.bind(fn);
+}
+exports.bindInvocationContext = bindInvocationContext;