npm package diff
Package: @forge/api
Versions: 4.0.0 - 4.1.0-next.0
File: package/out/api/runtime.js
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;