@clipboard-health/execution-context 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/lib/contextStore.d.ts +1 -0
- package/src/lib/contextStore.js +1 -0
- package/src/lib/contextStore.js.map +1 -1
- package/src/types/global.d.ts +5 -0
- package/src/types/global.js +3 -0
- package/src/types/global.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/execution-context",
|
|
3
3
|
"description": "A lightweight Node.js utility for managing execution contexts and metadata aggregation using AsyncLocalStorage.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.9",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "2.8.0"
|
|
7
7
|
},
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
require("./types/global");
|
|
4
5
|
tslib_1.__exportStar(require("./lib/contextStore"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./types/global"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./types/types"), exports);
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/execution-context/src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/execution-context/src/index.ts"],"names":[],"mappings":";;;AAAA,0BAAwB;AAExB,6DAAmC;AACnC,wDAA8B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../types/global";
|
|
1
2
|
import { type ExecutionContext } from "../types/types";
|
|
2
3
|
export declare function getExecutionContext(): ExecutionContext | undefined;
|
|
3
4
|
export declare function runWithExecutionContext<T = void>(context: ExecutionContext, callback: () => Promise<T>): Promise<T>;
|
package/src/lib/contextStore.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.runWithExecutionContext = runWithExecutionContext;
|
|
|
5
5
|
exports.newExecutionContext = newExecutionContext;
|
|
6
6
|
exports.addMetadataToLocalContext = addMetadataToLocalContext;
|
|
7
7
|
exports.addToMetadataList = addToMetadataList;
|
|
8
|
+
require("../types/global");
|
|
8
9
|
const node_async_hooks_1 = require("node:async_hooks");
|
|
9
10
|
globalThis.threadLocalStorage ||= new node_async_hooks_1.AsyncLocalStorage();
|
|
10
11
|
function getAsyncLocalStorage() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextStore.js","sourceRoot":"","sources":["../../../../../packages/execution-context/src/lib/contextStore.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"contextStore.js","sourceRoot":"","sources":["../../../../../packages/execution-context/src/lib/contextStore.ts"],"names":[],"mappings":";;AAYA,kDAEC;AAED,0DAaC;AAMD,kDAKC;AAMD,8DAKC;AAcD,8CAGC;AApED,2BAAyB;AAEzB,uDAAqD;AAIrD,UAAU,CAAC,kBAAkB,KAAK,IAAI,oCAAiB,EAAE,CAAC;AAE1D,SAAS,oBAAoB;IAC3B,OAAO,UAAU,CAAC,kBAAkB,CAAC;AACvC,CAAC;AAED,SAAgB,mBAAmB;IACjC,OAAO,oBAAoB,EAAE,CAAC,QAAQ,EAAE,CAAC;AAC3C,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAC3C,OAAyB,EACzB,QAA0B;IAE1B,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,oBAAoB,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EA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|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../../../packages/execution-context/src/types/global.ts"],"names":[],"mappings":""}
|