@bluelibs/runner 4.5.0-alpha → 4.5.0-alpha.2
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/dist/index.cjs +4265 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +1734 -0
- package/dist/index.d.ts +1696 -45
- package/dist/index.mjs +4233 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +11 -14
- package/dist/context.d.ts +0 -29
- package/dist/context.js +0 -52
- package/dist/context.js.map +0 -1
- package/dist/define.d.ts +0 -9
- package/dist/define.js +0 -32
- package/dist/define.js.map +0 -1
- package/dist/definers/defineEvent.d.ts +0 -2
- package/dist/definers/defineEvent.js +0 -23
- package/dist/definers/defineEvent.js.map +0 -1
- package/dist/definers/defineHook.d.ts +0 -6
- package/dist/definers/defineHook.js +0 -24
- package/dist/definers/defineHook.js.map +0 -1
- package/dist/definers/defineOverride.d.ts +0 -14
- package/dist/definers/defineOverride.js +0 -13
- package/dist/definers/defineOverride.js.map +0 -1
- package/dist/definers/defineResource.d.ts +0 -2
- package/dist/definers/defineResource.js +0 -69
- package/dist/definers/defineResource.js.map +0 -1
- package/dist/definers/defineResourceMiddleware.d.ts +0 -2
- package/dist/definers/defineResourceMiddleware.js +0 -42
- package/dist/definers/defineResourceMiddleware.js.map +0 -1
- package/dist/definers/defineTag.d.ts +0 -12
- package/dist/definers/defineTag.js +0 -107
- package/dist/definers/defineTag.js.map +0 -1
- package/dist/definers/defineTask.d.ts +0 -15
- package/dist/definers/defineTask.js +0 -42
- package/dist/definers/defineTask.js.map +0 -1
- package/dist/definers/defineTaskMiddleware.d.ts +0 -2
- package/dist/definers/defineTaskMiddleware.js +0 -42
- package/dist/definers/defineTaskMiddleware.js.map +0 -1
- package/dist/definers/tools.d.ts +0 -45
- package/dist/definers/tools.js +0 -75
- package/dist/definers/tools.js.map +0 -1
- package/dist/defs.d.ts +0 -29
- package/dist/defs.js +0 -45
- package/dist/defs.js.map +0 -1
- package/dist/errors.d.ts +0 -96
- package/dist/errors.js +0 -178
- package/dist/errors.js.map +0 -1
- package/dist/globals/globalEvents.d.ts +0 -17
- package/dist/globals/globalEvents.js +0 -33
- package/dist/globals/globalEvents.js.map +0 -1
- package/dist/globals/globalMiddleware.d.ts +0 -31
- package/dist/globals/globalMiddleware.js +0 -25
- package/dist/globals/globalMiddleware.js.map +0 -1
- package/dist/globals/globalResources.d.ts +0 -30
- package/dist/globals/globalResources.js +0 -55
- package/dist/globals/globalResources.js.map +0 -1
- package/dist/globals/globalTags.d.ts +0 -9
- package/dist/globals/globalTags.js +0 -23
- package/dist/globals/globalTags.js.map +0 -1
- package/dist/globals/middleware/cache.middleware.d.ts +0 -27
- package/dist/globals/middleware/cache.middleware.js +0 -73
- package/dist/globals/middleware/cache.middleware.js.map +0 -1
- package/dist/globals/middleware/requireContext.middleware.d.ts +0 -6
- package/dist/globals/middleware/requireContext.middleware.js +0 -16
- package/dist/globals/middleware/requireContext.middleware.js.map +0 -1
- package/dist/globals/middleware/retry.middleware.d.ts +0 -21
- package/dist/globals/middleware/retry.middleware.js +0 -61
- package/dist/globals/middleware/retry.middleware.js.map +0 -1
- package/dist/globals/middleware/timeout.middleware.d.ts +0 -9
- package/dist/globals/middleware/timeout.middleware.js +0 -61
- package/dist/globals/middleware/timeout.middleware.js.map +0 -1
- package/dist/globals/resources/debug/debug.resource.d.ts +0 -7
- package/dist/globals/resources/debug/debug.resource.js +0 -29
- package/dist/globals/resources/debug/debug.resource.js.map +0 -1
- package/dist/globals/resources/debug/debug.tag.d.ts +0 -2
- package/dist/globals/resources/debug/debug.tag.js +0 -12
- package/dist/globals/resources/debug/debug.tag.js.map +0 -1
- package/dist/globals/resources/debug/debugConfig.resource.d.ts +0 -22
- package/dist/globals/resources/debug/debugConfig.resource.js +0 -20
- package/dist/globals/resources/debug/debugConfig.resource.js.map +0 -1
- package/dist/globals/resources/debug/executionTracker.middleware.d.ts +0 -50
- package/dist/globals/resources/debug/executionTracker.middleware.js +0 -78
- package/dist/globals/resources/debug/executionTracker.middleware.js.map +0 -1
- package/dist/globals/resources/debug/globalEvent.hook.d.ts +0 -27
- package/dist/globals/resources/debug/globalEvent.hook.js +0 -38
- package/dist/globals/resources/debug/globalEvent.hook.js.map +0 -1
- package/dist/globals/resources/debug/hook.hook.d.ts +0 -30
- package/dist/globals/resources/debug/hook.hook.js +0 -48
- package/dist/globals/resources/debug/hook.hook.js.map +0 -1
- package/dist/globals/resources/debug/index.d.ts +0 -6
- package/dist/globals/resources/debug/index.js +0 -23
- package/dist/globals/resources/debug/index.js.map +0 -1
- package/dist/globals/resources/debug/middleware.hook.d.ts +0 -30
- package/dist/globals/resources/debug/middleware.hook.js +0 -75
- package/dist/globals/resources/debug/middleware.hook.js.map +0 -1
- package/dist/globals/resources/debug/types.d.ts +0 -25
- package/dist/globals/resources/debug/types.js +0 -65
- package/dist/globals/resources/debug/types.js.map +0 -1
- package/dist/globals/resources/debug/utils.d.ts +0 -2
- package/dist/globals/resources/debug/utils.js +0 -13
- package/dist/globals/resources/debug/utils.js.map +0 -1
- package/dist/globals/resources/queue.resource.d.ts +0 -10
- package/dist/globals/resources/queue.resource.js +0 -31
- package/dist/globals/resources/queue.resource.js.map +0 -1
- package/dist/globals/types.d.ts +0 -1
- package/dist/globals/types.js +0 -18
- package/dist/globals/types.js.map +0 -1
- package/dist/index.js +0 -48
- package/dist/index.js.map +0 -1
- package/dist/models/DependencyProcessor.d.ts +0 -48
- package/dist/models/DependencyProcessor.js +0 -276
- package/dist/models/DependencyProcessor.js.map +0 -1
- package/dist/models/EventManager.d.ts +0 -153
- package/dist/models/EventManager.js +0 -421
- package/dist/models/EventManager.js.map +0 -1
- package/dist/models/LogPrinter.d.ts +0 -55
- package/dist/models/LogPrinter.js +0 -202
- package/dist/models/LogPrinter.js.map +0 -1
- package/dist/models/Logger.d.ts +0 -85
- package/dist/models/Logger.js +0 -194
- package/dist/models/Logger.js.map +0 -1
- package/dist/models/MiddlewareManager.d.ts +0 -86
- package/dist/models/MiddlewareManager.js +0 -391
- package/dist/models/MiddlewareManager.js.map +0 -1
- package/dist/models/OverrideManager.d.ts +0 -13
- package/dist/models/OverrideManager.js +0 -84
- package/dist/models/OverrideManager.js.map +0 -1
- package/dist/models/Queue.d.ts +0 -25
- package/dist/models/Queue.js +0 -56
- package/dist/models/Queue.js.map +0 -1
- package/dist/models/ResourceInitializer.d.ts +0 -20
- package/dist/models/ResourceInitializer.js +0 -34
- package/dist/models/ResourceInitializer.js.map +0 -1
- package/dist/models/RunResult.d.ts +0 -35
- package/dist/models/RunResult.js +0 -62
- package/dist/models/RunResult.js.map +0 -1
- package/dist/models/Semaphore.d.ts +0 -61
- package/dist/models/Semaphore.js +0 -164
- package/dist/models/Semaphore.js.map +0 -1
- package/dist/models/Store.d.ts +0 -56
- package/dist/models/Store.js +0 -209
- package/dist/models/Store.js.map +0 -1
- package/dist/models/StoreRegistry.d.ts +0 -43
- package/dist/models/StoreRegistry.js +0 -375
- package/dist/models/StoreRegistry.js.map +0 -1
- package/dist/models/StoreValidator.d.ts +0 -8
- package/dist/models/StoreValidator.js +0 -73
- package/dist/models/StoreValidator.js.map +0 -1
- package/dist/models/TaskRunner.d.ts +0 -27
- package/dist/models/TaskRunner.js +0 -53
- package/dist/models/TaskRunner.js.map +0 -1
- package/dist/models/UnhandledError.d.ts +0 -11
- package/dist/models/UnhandledError.js +0 -32
- package/dist/models/UnhandledError.js.map +0 -1
- package/dist/models/index.d.ts +0 -11
- package/dist/models/index.js +0 -28
- package/dist/models/index.js.map +0 -1
- package/dist/models/utils/findCircularDependencies.d.ts +0 -16
- package/dist/models/utils/findCircularDependencies.js +0 -45
- package/dist/models/utils/findCircularDependencies.js.map +0 -1
- package/dist/models/utils/safeStringify.d.ts +0 -3
- package/dist/models/utils/safeStringify.js +0 -45
- package/dist/models/utils/safeStringify.js.map +0 -1
- package/dist/platform/browser.d.ts +0 -15
- package/dist/platform/browser.js +0 -98
- package/dist/platform/browser.js.map +0 -1
- package/dist/platform/index.d.ts +0 -8
- package/dist/platform/index.js +0 -47
- package/dist/platform/index.js.map +0 -1
- package/dist/platform/node.d.ts +0 -11
- package/dist/platform/node.js +0 -45
- package/dist/platform/node.js.map +0 -1
- package/dist/platform/types.d.ts +0 -28
- package/dist/platform/types.js +0 -19
- package/dist/platform/types.js.map +0 -1
- package/dist/platform/universal.d.ts +0 -16
- package/dist/platform/universal.js +0 -57
- package/dist/platform/universal.js.map +0 -1
- package/dist/processHooks.d.ts +0 -2
- package/dist/processHooks.js +0 -79
- package/dist/processHooks.js.map +0 -1
- package/dist/run.d.ts +0 -14
- package/dist/run.js +0 -126
- package/dist/run.js.map +0 -1
- package/dist/testing.d.ts +0 -25
- package/dist/testing.js +0 -42
- package/dist/testing.js.map +0 -1
- package/dist/tools/getCallerFile.d.ts +0 -1
- package/dist/tools/getCallerFile.js +0 -30
- package/dist/tools/getCallerFile.js.map +0 -1
- package/dist/types/contracts.d.ts +0 -55
- package/dist/types/contracts.js +0 -4
- package/dist/types/contracts.js.map +0 -1
- package/dist/types/event.d.ts +0 -74
- package/dist/types/event.js +0 -17
- package/dist/types/event.js.map +0 -1
- package/dist/types/hook.d.ts +0 -23
- package/dist/types/hook.js +0 -4
- package/dist/types/hook.js.map +0 -1
- package/dist/types/meta.d.ts +0 -18
- package/dist/types/meta.js +0 -7
- package/dist/types/meta.js.map +0 -1
- package/dist/types/resource.d.ts +0 -84
- package/dist/types/resource.js +0 -4
- package/dist/types/resource.js.map +0 -1
- package/dist/types/resourceMiddleware.d.ts +0 -47
- package/dist/types/resourceMiddleware.js +0 -4
- package/dist/types/resourceMiddleware.js.map +0 -1
- package/dist/types/runner.d.ts +0 -55
- package/dist/types/runner.js +0 -3
- package/dist/types/runner.js.map +0 -1
- package/dist/types/storeTypes.d.ts +0 -40
- package/dist/types/storeTypes.js +0 -3
- package/dist/types/storeTypes.js.map +0 -1
- package/dist/types/symbols.d.ts +0 -30
- package/dist/types/symbols.js +0 -40
- package/dist/types/symbols.js.map +0 -1
- package/dist/types/tag.d.ts +0 -46
- package/dist/types/tag.js +0 -4
- package/dist/types/tag.js.map +0 -1
- package/dist/types/task.d.ts +0 -44
- package/dist/types/task.js +0 -4
- package/dist/types/task.js.map +0 -1
- package/dist/types/taskMiddleware.d.ts +0 -48
- package/dist/types/taskMiddleware.js +0 -4
- package/dist/types/taskMiddleware.js.map +0 -1
- package/dist/types/utilities.d.ts +0 -110
- package/dist/types/utilities.js +0 -19
- package/dist/types/utilities.js.map +0 -1
package/dist/models/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DependencyProcessor"), exports);
|
|
18
|
-
__exportStar(require("./EventManager"), exports);
|
|
19
|
-
__exportStar(require("./Logger"), exports);
|
|
20
|
-
__exportStar(require("./Store"), exports);
|
|
21
|
-
__exportStar(require("./TaskRunner"), exports);
|
|
22
|
-
__exportStar(require("./ResourceInitializer"), exports);
|
|
23
|
-
__exportStar(require("./MiddlewareManager"), exports);
|
|
24
|
-
__exportStar(require("./Semaphore"), exports);
|
|
25
|
-
__exportStar(require("./Queue"), exports);
|
|
26
|
-
__exportStar(require("./UnhandledError"), exports);
|
|
27
|
-
__exportStar(require("./RunResult"), exports);
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,wDAAsC;AACtC,sDAAoC;AACpC,8CAA4B;AAC5B,0CAAwB;AACxB,mDAAiC;AACjC,8CAA4B"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A node that has dependencies.
|
|
3
|
-
*/
|
|
4
|
-
export interface IDependentNode {
|
|
5
|
-
id: string;
|
|
6
|
-
dependencies: Record<string, IDependentNode>;
|
|
7
|
-
}
|
|
8
|
-
interface FindCircularDependenciesResult {
|
|
9
|
-
cycles: string[];
|
|
10
|
-
missingDependencies: Array<{
|
|
11
|
-
nodeId: string;
|
|
12
|
-
dependencyId: string;
|
|
13
|
-
}>;
|
|
14
|
-
}
|
|
15
|
-
export declare function findCircularDependencies(nodes: IDependentNode[]): FindCircularDependenciesResult;
|
|
16
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findCircularDependencies = findCircularDependencies;
|
|
4
|
-
function findCircularDependencies(nodes) {
|
|
5
|
-
const result = {
|
|
6
|
-
cycles: [],
|
|
7
|
-
missingDependencies: [],
|
|
8
|
-
};
|
|
9
|
-
const visited = new Set();
|
|
10
|
-
const stack = new Set();
|
|
11
|
-
const path = [];
|
|
12
|
-
function dfs(node) {
|
|
13
|
-
if (stack.has(node.id)) {
|
|
14
|
-
const cycleStartIndex = path.indexOf(node.id);
|
|
15
|
-
const cycle = path.slice(cycleStartIndex).concat(node.id).join(" -> ");
|
|
16
|
-
result.cycles.push(cycle);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (visited.has(node.id))
|
|
20
|
-
return;
|
|
21
|
-
visited.add(node.id);
|
|
22
|
-
stack.add(node.id);
|
|
23
|
-
path.push(node.id);
|
|
24
|
-
for (const [depKey, dependentNode] of Object.entries(node.dependencies)) {
|
|
25
|
-
if (!dependentNode) {
|
|
26
|
-
result.missingDependencies.push({
|
|
27
|
-
nodeId: node.id,
|
|
28
|
-
dependencyId: depKey,
|
|
29
|
-
});
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
dfs(dependentNode);
|
|
33
|
-
}
|
|
34
|
-
stack.delete(node.id);
|
|
35
|
-
path.pop();
|
|
36
|
-
}
|
|
37
|
-
for (const node of nodes) {
|
|
38
|
-
if (!visited.has(node.id)) {
|
|
39
|
-
dfs(node);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
result.cycles = Array.from(new Set(result.cycles)); // Remove duplicate cycles
|
|
43
|
-
return result;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=findCircularDependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findCircularDependencies.js","sourceRoot":"","sources":["../../../src/models/utils/findCircularDependencies.ts"],"names":[],"mappings":";;AAaA,4DAgDC;AAhDD,SAAgB,wBAAwB,CACtC,KAAuB;IAEvB,MAAM,MAAM,GAAmC;QAC7C,MAAM,EAAE,EAAE;QACV,mBAAmB,EAAE,EAAE;KACxB,CAAC;IACF,MAAM,OAAO,GAAgB,IAAI,GAAG,EAAE,CAAC;IACvC,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IACrC,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,SAAS,GAAG,CAAC,IAAoB;QAC/B,IAAI,KAAK,CAAC,GAAG,CAAC,IA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,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,0BAA0B;IAC9E,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.safeStringify = safeStringify;
|
|
4
|
-
function safeStringify(value, space, options) {
|
|
5
|
-
const seen = new WeakSet();
|
|
6
|
-
const holderDepth = new WeakMap();
|
|
7
|
-
const maxDepth = typeof options?.maxDepth === "number" ? options.maxDepth : Infinity;
|
|
8
|
-
const replacer = function (_key, val) {
|
|
9
|
-
// Normalize functions to a readable placeholder
|
|
10
|
-
if (typeof val === "function") {
|
|
11
|
-
return "function()";
|
|
12
|
-
}
|
|
13
|
-
// Normalize BigInt safely
|
|
14
|
-
if (typeof val === "bigint") {
|
|
15
|
-
return val.toString();
|
|
16
|
-
}
|
|
17
|
-
// Compute the depth of the current value based on its holder (this)
|
|
18
|
-
const holderObject = Object(this);
|
|
19
|
-
const parentDepth = holderDepth.get(holderObject) || 0;
|
|
20
|
-
const currentDepth = parentDepth + 1;
|
|
21
|
-
if (typeof val === "object" && val !== null) {
|
|
22
|
-
if (seen.has(val))
|
|
23
|
-
return "[Circular]";
|
|
24
|
-
// Apply depth limiting beyond the configured depth
|
|
25
|
-
if (currentDepth > maxDepth) {
|
|
26
|
-
return Array.isArray(val) ? "[Array]" : "[Object]";
|
|
27
|
-
}
|
|
28
|
-
seen.add(val);
|
|
29
|
-
holderDepth.set(val, currentDepth);
|
|
30
|
-
}
|
|
31
|
-
return val;
|
|
32
|
-
};
|
|
33
|
-
try {
|
|
34
|
-
return JSON.stringify(value, replacer, space);
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
try {
|
|
38
|
-
return String(value);
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return "[Unserializable]";
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=safeStringify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"safeStringify.js","sourceRoot":"","sources":["../../../src/models/utils/safeStringify.ts"],"names":[],"mappings":";;AAAA,sCAkDC;AAlDD,SAAgB,aAAa,CAC3B,KAAc,EACd,KAAc,EACd,OAA+B;IAE/B,MAAM,IAAI,GAAG,IAAI,OAAO,EAAU,CAAC;IACnC,MAAM,WAAW,GAAG,IAAI,OAAO,EAAkB,CAAC;IAElD,MAAM,QAAQ,GACZ,OAAO,OAAO,EAAE,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAQ,CAAC,QAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IAExE,MAAM,QAAQ,GAAG,UAAqB,IAAY,EAAE,GAAQ;QAC1D,gDAAgD;QAChD,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,0BAA0B;QAC1B,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC;QAED,oEAAoE;QACpE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,YAAsB,CAAC,IAAI,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,WAAW,GAAG,CAAC,CAAC;QAErC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YAC5C,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,OAAO,YAAY,CAAC;YAEvC,mDAAmD;YACnD,IAAI,YAAY,GAAG,QAAQ,EAAE,CAAC;gBAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;YACrD,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACd,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAgD,CAAC;IAEjD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAY,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YACH,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,kBAAkB,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser Platform Adapter
|
|
3
|
-
* Implements platform APIs using browser-compatible Web APIs.
|
|
4
|
-
*/
|
|
5
|
-
import type { IPlatformAdapter, IAsyncLocalStorage } from "./types";
|
|
6
|
-
export declare class BrowserPlatformAdapter implements IPlatformAdapter {
|
|
7
|
-
onUncaughtException(handler: (error: any) => void): () => void;
|
|
8
|
-
onUnhandledRejection(handler: (reason: any) => void): () => void;
|
|
9
|
-
onShutdownSignal(handler: () => void): () => void;
|
|
10
|
-
exit(code: number): void;
|
|
11
|
-
getEnv(key: string): string | undefined;
|
|
12
|
-
createAsyncLocalStorage<T>(): IAsyncLocalStorage<T>;
|
|
13
|
-
setTimeout: typeof setTimeout;
|
|
14
|
-
clearTimeout: typeof clearTimeout;
|
|
15
|
-
}
|
package/dist/platform/browser.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BrowserPlatformAdapter = void 0;
|
|
4
|
-
const errors_1 = require("../errors");
|
|
5
|
-
class BrowserPlatformAdapter {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.setTimeout = globalThis.setTimeout;
|
|
8
|
-
this.clearTimeout = globalThis.clearTimeout;
|
|
9
|
-
}
|
|
10
|
-
onUncaughtException(handler) {
|
|
11
|
-
const listener = (event) => handler(event.error);
|
|
12
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
13
|
-
window.addEventListener("error", listener);
|
|
14
|
-
return () => window.removeEventListener("error", listener);
|
|
15
|
-
}
|
|
16
|
-
// Fallback to globalThis if window is not available
|
|
17
|
-
globalThis.addEventListener?.("error", listener);
|
|
18
|
-
return () => globalThis.removeEventListener?.("error", listener);
|
|
19
|
-
}
|
|
20
|
-
onUnhandledRejection(handler) {
|
|
21
|
-
const listener = (event) => handler(event.reason);
|
|
22
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
23
|
-
window.addEventListener("unhandledrejection", listener);
|
|
24
|
-
return () => window.removeEventListener("unhandledrejection", listener);
|
|
25
|
-
}
|
|
26
|
-
globalThis.addEventListener?.("unhandledrejection", listener);
|
|
27
|
-
return () => globalThis.removeEventListener?.("unhandledrejection", listener);
|
|
28
|
-
}
|
|
29
|
-
onShutdownSignal(handler) {
|
|
30
|
-
const beforeUnloadListener = () => handler();
|
|
31
|
-
const visibilityListener = () => {
|
|
32
|
-
const doc = typeof document !== "undefined" ? document : undefined;
|
|
33
|
-
if (doc?.visibilityState === "hidden")
|
|
34
|
-
handler();
|
|
35
|
-
};
|
|
36
|
-
if (typeof window !== "undefined" && window.addEventListener) {
|
|
37
|
-
window.addEventListener("beforeunload", beforeUnloadListener);
|
|
38
|
-
window.addEventListener("visibilitychange", visibilityListener);
|
|
39
|
-
return () => {
|
|
40
|
-
window.removeEventListener("beforeunload", beforeUnloadListener);
|
|
41
|
-
window.removeEventListener("visibilitychange", visibilityListener);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
globalThis.addEventListener?.("beforeunload", beforeUnloadListener);
|
|
45
|
-
globalThis.addEventListener?.("visibilitychange", visibilityListener);
|
|
46
|
-
return () => {
|
|
47
|
-
globalThis.removeEventListener?.("beforeunload", beforeUnloadListener);
|
|
48
|
-
globalThis.removeEventListener?.("visibilitychange", visibilityListener);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
exit(code) {
|
|
52
|
-
throw new errors_1.PlatformUnsupportedFunction(`exit(${code})`);
|
|
53
|
-
}
|
|
54
|
-
getEnv(key) {
|
|
55
|
-
return (globalThis.__ENV__?.[key] ||
|
|
56
|
-
globalThis.process?.env?.[key] ||
|
|
57
|
-
globalThis.env?.[key]);
|
|
58
|
-
}
|
|
59
|
-
createAsyncLocalStorage() {
|
|
60
|
-
// Best-effort polyfill using a context token on globalThis
|
|
61
|
-
const contexts = new WeakMap();
|
|
62
|
-
const contextSymbol = Symbol("asyncContext");
|
|
63
|
-
return {
|
|
64
|
-
getStore() {
|
|
65
|
-
const ctx = globalThis[contextSymbol];
|
|
66
|
-
return ctx ? contexts.get(ctx) : undefined;
|
|
67
|
-
},
|
|
68
|
-
run(store, callback) {
|
|
69
|
-
const ctx = {};
|
|
70
|
-
contexts.set(ctx, store);
|
|
71
|
-
const previous = globalThis[contextSymbol];
|
|
72
|
-
globalThis[contextSymbol] = ctx;
|
|
73
|
-
let restored = false;
|
|
74
|
-
const restore = () => {
|
|
75
|
-
if (!restored) {
|
|
76
|
-
globalThis[contextSymbol] = previous;
|
|
77
|
-
restored = true;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
try {
|
|
81
|
-
const result = callback();
|
|
82
|
-
const maybePromise = result;
|
|
83
|
-
if (maybePromise && typeof maybePromise.then === "function") {
|
|
84
|
-
return maybePromise.finally(restore);
|
|
85
|
-
}
|
|
86
|
-
restore();
|
|
87
|
-
return result;
|
|
88
|
-
}
|
|
89
|
-
catch (e) {
|
|
90
|
-
restore();
|
|
91
|
-
throw e;
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.BrowserPlatformAdapter = BrowserPlatformAdapter;
|
|
98
|
-
//# sourceMappingURL=browser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/platform/browser.ts"],"names":[],"mappings":";;;AAKA,sCAAwD;AAExD,MAAa,sBAAsB;IAAnC;QAmHE,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,iBAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IACzC,CAAC;IApHC,mBAAmB,CAAC,OAA6B;QAC/C,MAAM,QAAQ,GAAG,CAAC,KAAiB,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7D,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC7D,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAe,CAAC,CAAC;YAClD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,QAAe,CAAC,CAAC;QACpE,CAAC;QACD,oDAAoD;QACnD,UAAkB,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC1D,OAAO,GAAG,EAAE,CAAE,UAAkB,CAAC,mBAAmB,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,oBAAoB,CAAC,OAA8B;QACjD,MAAM,QAAQ,GAAG,CAAC,KAA4B,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzE,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;YAC7D,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,QAAe,CAAC,CAAC;YAC/D,OAAO,GAAG,EAAE,CACV,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,QAAe,CAAC,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AY,GAAG,MAAa,CAAC;oBACnC,IAAI,YAAY,IAAI,OAAO,YAAY,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;wBAC5D,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBACvC,CAAC;oBACD,OAAO,EAAE,CAAC;oBACV,OAAO,MAAM,CAAC;gBAChB,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,OAAO,EAAE,CAAC;oBACV,MAAM,CAAC,CAAC;gBACV,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CAIF;AArHD,wDAqHC"}
|
package/dist/platform/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IPlatformAdapter } from "./types";
|
|
2
|
-
export declare function getPlatform(): IPlatformAdapter;
|
|
3
|
-
export declare function setPlatform(adapter: IPlatformAdapter): void;
|
|
4
|
-
export declare function resetPlatform(): void;
|
|
5
|
-
export type { IPlatformAdapter, IAsyncLocalStorage } from "./types";
|
|
6
|
-
export { NodePlatformAdapter } from "./node";
|
|
7
|
-
export { BrowserPlatformAdapter } from "./browser";
|
|
8
|
-
export { UniversalPlatformAdapter } from "./universal";
|
package/dist/platform/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UniversalPlatformAdapter = exports.BrowserPlatformAdapter = exports.NodePlatformAdapter = void 0;
|
|
4
|
-
exports.getPlatform = getPlatform;
|
|
5
|
-
exports.setPlatform = setPlatform;
|
|
6
|
-
exports.resetPlatform = resetPlatform;
|
|
7
|
-
/**
|
|
8
|
-
* Platform detection and factory
|
|
9
|
-
* Automatically detects the runtime environment and returns the appropriate adapter
|
|
10
|
-
*/
|
|
11
|
-
const node_1 = require("./node");
|
|
12
|
-
const browser_1 = require("./browser");
|
|
13
|
-
const universal_1 = require("./universal");
|
|
14
|
-
let platformInstance = null;
|
|
15
|
-
function getPlatform() {
|
|
16
|
-
if (platformInstance) {
|
|
17
|
-
return platformInstance;
|
|
18
|
-
}
|
|
19
|
-
// Detect Node.js environment
|
|
20
|
-
if (typeof process !== "undefined" && process.versions?.node) {
|
|
21
|
-
platformInstance = new node_1.NodePlatformAdapter();
|
|
22
|
-
}
|
|
23
|
-
else if (typeof window !== "undefined" || typeof document !== "undefined") {
|
|
24
|
-
// Browser main thread (or environments exposing window/document)
|
|
25
|
-
platformInstance = new browser_1.BrowserPlatformAdapter();
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
// Universal environment (browser, web workers, edge runtimes, etc.)
|
|
29
|
-
platformInstance = new universal_1.UniversalPlatformAdapter();
|
|
30
|
-
}
|
|
31
|
-
return platformInstance;
|
|
32
|
-
}
|
|
33
|
-
// Allow manual override for testing or special cases
|
|
34
|
-
function setPlatform(adapter) {
|
|
35
|
-
platformInstance = adapter;
|
|
36
|
-
}
|
|
37
|
-
// Reset to auto-detection
|
|
38
|
-
function resetPlatform() {
|
|
39
|
-
platformInstance = null;
|
|
40
|
-
}
|
|
41
|
-
var node_2 = require("./node");
|
|
42
|
-
Object.defineProperty(exports, "NodePlatformAdapter", { enumerable: true, get: function () { return node_2.NodePlatformAdapter; } });
|
|
43
|
-
var browser_2 = require("./browser");
|
|
44
|
-
Object.defineProperty(exports, "BrowserPlatformAdapter", { enumerable: true, get: function () { return browser_2.BrowserPlatformAdapter; } });
|
|
45
|
-
var universal_2 = require("./universal");
|
|
46
|
-
Object.defineProperty(exports, "UniversalPlatformAdapter", { enumerable: true, get: function () { return universal_2.UniversalPlatformAdapter; } });
|
|
47
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":";;;AAWA,kCAmBC;AAGD,kCAEC;AAGD,sCAEC;AAxCD;;;GAGG;AACH,iCAA6C;AAC7C,uCAAmD;AACnD,2CAAuD;AAGvD,IAAI,gBAAgB,GAA4B,IAAI,CAAC;AAErD,SAAgB,WAAW;IACzB,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,6BAA6B;IAC7B,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC7D,gBAAgB,GAAG,IAAI,0BAAmB,EAAE,CAAC;IAC/C,CAAC;SAAM,IACL,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,EAChE,CAAC;QACD,iEAAiE;QACjE,gBAAgB,GAAG,IAAI,gCAAsB,EAAE,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,oEAAoE;QACpE,gBAAgB,GAAG,IAAI,oCAAwB,EAAE,CAAC;IACpD,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,qDAAqD;AACrD,SAAgB,WAAW,CAAC,OAAyB;IACnD,gBAAgB,GAAG,OAAO,CAAC;AAC7B,CAAC;AAED,0BAA0B;AAC1B,SAAgB,aAAa;IAC3B,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC;AAID,+BAA6C;AAApC,2GAAA,mBAAmB,OAAA;AAC5B,qCAAmD;AAA1C,iHAAA,sBAAsB,OAAA;AAC/B,yCAAuD;AAA9C,qHAAA,wBAAwB,OAAA"}
|
package/dist/platform/node.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IPlatformAdapter, IAsyncLocalStorage } from "./types";
|
|
2
|
-
export declare class NodePlatformAdapter implements IPlatformAdapter {
|
|
3
|
-
onUncaughtException(handler: (error: any) => void): () => void;
|
|
4
|
-
onUnhandledRejection(handler: (reason: any) => void): () => void;
|
|
5
|
-
onShutdownSignal(handler: () => void): () => void;
|
|
6
|
-
exit(code: number): void;
|
|
7
|
-
getEnv(key: string): string | undefined;
|
|
8
|
-
createAsyncLocalStorage<T>(): IAsyncLocalStorage<T>;
|
|
9
|
-
setTimeout: typeof setTimeout;
|
|
10
|
-
clearTimeout: typeof clearTimeout;
|
|
11
|
-
}
|
package/dist/platform/node.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NodePlatformAdapter = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Node.js Platform Adapter
|
|
6
|
-
* Uses Node.js-specific APIs for process management and async context
|
|
7
|
-
*/
|
|
8
|
-
const node_async_hooks_1 = require("node:async_hooks");
|
|
9
|
-
class NodePlatformAdapter {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.setTimeout = globalThis.setTimeout;
|
|
12
|
-
this.clearTimeout = globalThis.clearTimeout;
|
|
13
|
-
}
|
|
14
|
-
onUncaughtException(handler) {
|
|
15
|
-
process.on("uncaughtException", handler);
|
|
16
|
-
return () => process.off("uncaughtException", handler);
|
|
17
|
-
}
|
|
18
|
-
onUnhandledRejection(handler) {
|
|
19
|
-
process.on("unhandledRejection", handler);
|
|
20
|
-
return () => process.off("unhandledRejection", handler);
|
|
21
|
-
}
|
|
22
|
-
onShutdownSignal(handler) {
|
|
23
|
-
process.on("SIGINT", handler);
|
|
24
|
-
process.on("SIGTERM", handler);
|
|
25
|
-
return () => {
|
|
26
|
-
process.off("SIGINT", handler);
|
|
27
|
-
process.off("SIGTERM", handler);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
exit(code) {
|
|
31
|
-
process.exit(code);
|
|
32
|
-
}
|
|
33
|
-
getEnv(key) {
|
|
34
|
-
return process.env[key];
|
|
35
|
-
}
|
|
36
|
-
createAsyncLocalStorage() {
|
|
37
|
-
const als = new node_async_hooks_1.AsyncLocalStorage();
|
|
38
|
-
return {
|
|
39
|
-
getStore: () => als.getStore(),
|
|
40
|
-
run: (store, callback) => als.run(store, callback),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.NodePlatformAdapter = NodePlatformAdapter;
|
|
45
|
-
//# sourceMappingURL=node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/platform/node.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uDAAqD;AAGrD,MAAa,mBAAmB;IAAhC;QAoCE,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,iBAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IACzC,CAAC;IArCC,mBAAmB,CAAC,OAA6B;QAC/C,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;QACzC,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,oBAAoB,CAAC,OAA8B;QACjD,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC1C,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,gBAAgB,CAAC,OAAmB;QAClC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAY;QACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAED,uBAAuB;QACrB,MAAM,GAAG,GAAG,IAAI,oCAAiB,EAAK,CAAC;QACvC,OAAO;YACL,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE;YAC9B,GAAG,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC;SACnD,CAAC;IACJ,CAAC;CAIF;AAtCD,kDAsCC"}
|
package/dist/platform/types.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform abstraction interface for universal compatibility
|
|
3
|
-
* Inspired by Remix's approach to Web APIs and runtime-agnostic design
|
|
4
|
-
*/
|
|
5
|
-
export interface IPlatformAdapter {
|
|
6
|
-
onUncaughtException(handler: (error: Error) => void): () => void;
|
|
7
|
-
onUnhandledRejection(handler: (reason: unknown) => void): () => void;
|
|
8
|
-
onShutdownSignal(handler: () => void): () => void;
|
|
9
|
-
exit(code: number): void;
|
|
10
|
-
getEnv(key: string): string | undefined;
|
|
11
|
-
createAsyncLocalStorage<T>(): IAsyncLocalStorage<T>;
|
|
12
|
-
setTimeout: typeof globalThis.setTimeout;
|
|
13
|
-
clearTimeout: typeof globalThis.clearTimeout;
|
|
14
|
-
}
|
|
15
|
-
export interface IAsyncLocalStorage<T> {
|
|
16
|
-
getStore(): T | undefined;
|
|
17
|
-
run<R>(store: T, callback: () => R): R;
|
|
18
|
-
}
|
|
19
|
-
export interface BrowserErrorEvent extends ErrorEvent {
|
|
20
|
-
error: Error;
|
|
21
|
-
}
|
|
22
|
-
export interface BrowserPromiseRejectionEvent extends PromiseRejectionEvent {
|
|
23
|
-
reason: unknown;
|
|
24
|
-
promise: Promise<unknown>;
|
|
25
|
-
}
|
|
26
|
-
export declare const isBrowser: () => boolean;
|
|
27
|
-
export declare const isWebWorker: () => boolean;
|
|
28
|
-
export declare const isNode: () => boolean;
|
package/dist/platform/types.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Platform abstraction interface for universal compatibility
|
|
4
|
-
* Inspired by Remix's approach to Web APIs and runtime-agnostic design
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.isNode = exports.isWebWorker = exports.isBrowser = void 0;
|
|
8
|
-
// Environment detection utilities
|
|
9
|
-
const isBrowser = () => typeof window !== "undefined" && typeof document !== "undefined";
|
|
10
|
-
exports.isBrowser = isBrowser;
|
|
11
|
-
const isWebWorker = () => typeof self !== "undefined" &&
|
|
12
|
-
typeof window === "undefined" &&
|
|
13
|
-
typeof globalThis.importScripts === "function";
|
|
14
|
-
exports.isWebWorker = isWebWorker;
|
|
15
|
-
const isNode = () => typeof process !== "undefined" &&
|
|
16
|
-
process.versions != null &&
|
|
17
|
-
process.versions.node != null;
|
|
18
|
-
exports.isNode = isNode;
|
|
19
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/platform/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmCH,kCAAkC;AAC3B,MAAM,SAAS,GAAG,GAAY,EAAE,CACrC,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,CAAC;AADtD,QAAA,SAAS,aAC6C;AAE5D,MAAM,WAAW,GAAG,GAAY,EAAE,CACvC,OAAO,IAAI,KAAK,WAAW;IAC3B,OAAO,MAAM,KAAK,WAAW;IAC7B,OAAQ,UAAkB,CAAC,aAAa,KAAK,UAAU,CAAC;AAH7C,QAAA,WAAW,eAGkC;AAEnD,MAAM,MAAM,GAAG,GAAY,EAAE,CAClC,OAAO,OAAO,KAAK,WAAW;IAC9B,OAAO,CAAC,QAAQ,IAAI,IAAI;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC;AAHnB,QAAA,MAAM,UAGa"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Universal Platform Adapter
|
|
3
|
-
* Works in browsers, web workers, edge runtimes, and other non-Node.js environments
|
|
4
|
-
* Uses Web APIs and polyfills where necessary
|
|
5
|
-
*/
|
|
6
|
-
import type { IPlatformAdapter, IAsyncLocalStorage } from "./types";
|
|
7
|
-
export declare class UniversalPlatformAdapter implements IPlatformAdapter {
|
|
8
|
-
onUncaughtException(handler: (error: any) => void): () => void;
|
|
9
|
-
onUnhandledRejection(handler: (reason: any) => void): () => void;
|
|
10
|
-
onShutdownSignal(handler: () => void): () => void;
|
|
11
|
-
exit(code: number): void;
|
|
12
|
-
getEnv(key: string): string | undefined;
|
|
13
|
-
createAsyncLocalStorage<T>(): IAsyncLocalStorage<T>;
|
|
14
|
-
setTimeout: typeof setTimeout;
|
|
15
|
-
clearTimeout: typeof clearTimeout;
|
|
16
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UniversalPlatformAdapter = void 0;
|
|
4
|
-
const errors_1 = require("../errors");
|
|
5
|
-
class UniversalPlatformAdapter {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.setTimeout = globalThis.setTimeout;
|
|
8
|
-
this.clearTimeout = globalThis.clearTimeout;
|
|
9
|
-
}
|
|
10
|
-
onUncaughtException(handler) {
|
|
11
|
-
const listener = (event) => handler(event.error);
|
|
12
|
-
globalThis.addEventListener?.("error", listener);
|
|
13
|
-
return () => globalThis.removeEventListener?.("error", listener);
|
|
14
|
-
}
|
|
15
|
-
onUnhandledRejection(handler) {
|
|
16
|
-
const listener = (event) => handler(event.reason);
|
|
17
|
-
globalThis.addEventListener?.("unhandledrejection", listener);
|
|
18
|
-
return () => globalThis.removeEventListener?.("unhandledrejection", listener);
|
|
19
|
-
}
|
|
20
|
-
onShutdownSignal(handler) {
|
|
21
|
-
// Browser equivalent - beforeunload for graceful cleanup
|
|
22
|
-
const listener = () => handler();
|
|
23
|
-
globalThis.addEventListener?.("beforeunload", listener);
|
|
24
|
-
// Also listen for visibilitychange as a secondary signal
|
|
25
|
-
const visibilityListener = () => {
|
|
26
|
-
const doc = globalThis.document;
|
|
27
|
-
if (doc?.visibilityState === "hidden") {
|
|
28
|
-
handler();
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
globalThis.addEventListener?.("visibilitychange", visibilityListener);
|
|
32
|
-
return () => {
|
|
33
|
-
globalThis.removeEventListener?.("beforeunload", listener);
|
|
34
|
-
globalThis.removeEventListener?.("visibilitychange", visibilityListener);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
exit(code) {
|
|
38
|
-
// Not supported in universal environments (browser/edge workers)
|
|
39
|
-
throw new errors_1.PlatformUnsupportedFunction(`exit(${code})`);
|
|
40
|
-
}
|
|
41
|
-
getEnv(key) {
|
|
42
|
-
// Try various environment sources in order of preference
|
|
43
|
-
return (
|
|
44
|
-
// Vite/build tool injected env
|
|
45
|
-
globalThis.__ENV__?.[key] ||
|
|
46
|
-
// Node.js-like process.env (if available)
|
|
47
|
-
globalThis.process?.env?.[key] ||
|
|
48
|
-
// Browser build-time env (if injected by bundler)
|
|
49
|
-
globalThis.env?.[key] ||
|
|
50
|
-
undefined);
|
|
51
|
-
}
|
|
52
|
-
createAsyncLocalStorage() {
|
|
53
|
-
throw new errors_1.PlatformUnsupportedFunction("createAsyncLocalStorage");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.UniversalPlatformAdapter = UniversalPlatformAdapter;
|
|
57
|
-
//# sourceMappingURL=universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"universal.js","sourceRoot":"","sources":["../../src/platform/universal.ts"],"names":[],"mappings":";;;AAMA,sCAAwD;AAExD,MAAa,wBAAwB;IAArC;QA8DE,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,iBAAY,GAAG,UAAU,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E,CACvC,kBAAkB,EAClB,kBAAkB,CACnB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAY;QACf,iEAAiE;QACjE,MAAM,IAAI,oCAA2B,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,yDAAyD;QACzD,OAAO;QACL,+BAA+B;QAC9B,UAAkB,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;YAClC,0CAA0C;YACzC,UAAkB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC;YACvC,kDAAkD;YACjD,UAAkB,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;YAC9B,SAAS,CACV,CAAC;IACJ,CAAC;IAED,uBAAuB;QACrB,MAAM,IAAI,oCAA2B,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC;CAIF;AAhED,4DAgEC"}
|
package/dist/processHooks.d.ts
DELETED
package/dist/processHooks.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerProcessLevelSafetyNets = registerProcessLevelSafetyNets;
|
|
4
|
-
exports.registerShutdownHook = registerShutdownHook;
|
|
5
|
-
const platform_1 = require("./platform");
|
|
6
|
-
const errors_1 = require("./errors");
|
|
7
|
-
const platform = (0, platform_1.getPlatform)();
|
|
8
|
-
// Global registry of active error handlers for process-level safety nets
|
|
9
|
-
const activeErrorHandlers = new Set();
|
|
10
|
-
let processSafetyNetsInstalled = false;
|
|
11
|
-
function installGlobalProcessSafetyNetsOnce() {
|
|
12
|
-
if (processSafetyNetsInstalled)
|
|
13
|
-
return;
|
|
14
|
-
processSafetyNetsInstalled = true;
|
|
15
|
-
const onUncaughtException = async (err) => {
|
|
16
|
-
for (const handler of activeErrorHandlers) {
|
|
17
|
-
try {
|
|
18
|
-
await handler(err, "uncaughtException");
|
|
19
|
-
}
|
|
20
|
-
catch (_) { }
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const onUnhandledRejection = async (reason) => {
|
|
24
|
-
for (const handler of activeErrorHandlers) {
|
|
25
|
-
try {
|
|
26
|
-
await handler(reason, "unhandledRejection");
|
|
27
|
-
}
|
|
28
|
-
catch (_) { }
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
platform.onUncaughtException(onUncaughtException);
|
|
32
|
-
platform.onUnhandledRejection(onUnhandledRejection);
|
|
33
|
-
}
|
|
34
|
-
function registerProcessLevelSafetyNets(handler) {
|
|
35
|
-
installGlobalProcessSafetyNetsOnce();
|
|
36
|
-
activeErrorHandlers.add(handler);
|
|
37
|
-
return () => {
|
|
38
|
-
activeErrorHandlers.delete(handler);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
// Global shutdown registry: one listener per signal, dispatching to active disposers
|
|
42
|
-
const activeDisposers = new Set();
|
|
43
|
-
let shutdownHooksInstalled = false;
|
|
44
|
-
function installGlobalShutdownHooksOnce() {
|
|
45
|
-
if (shutdownHooksInstalled)
|
|
46
|
-
return;
|
|
47
|
-
shutdownHooksInstalled = true;
|
|
48
|
-
const handler = async () => {
|
|
49
|
-
try {
|
|
50
|
-
const disposers = Array.from(activeDisposers);
|
|
51
|
-
for (const d of disposers) {
|
|
52
|
-
try {
|
|
53
|
-
await d();
|
|
54
|
-
}
|
|
55
|
-
catch { }
|
|
56
|
-
activeDisposers.delete(d);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
finally {
|
|
60
|
-
try {
|
|
61
|
-
platform.exit(0);
|
|
62
|
-
}
|
|
63
|
-
catch (e) {
|
|
64
|
-
if (!(e instanceof errors_1.PlatformUnsupportedFunction)) {
|
|
65
|
-
throw e;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
platform.onShutdownSignal(handler);
|
|
71
|
-
}
|
|
72
|
-
function registerShutdownHook(disposeOnce) {
|
|
73
|
-
installGlobalShutdownHooksOnce();
|
|
74
|
-
activeDisposers.add(disposeOnce);
|
|
75
|
-
return () => {
|
|
76
|
-
activeDisposers.delete(disposeOnce);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=processHooks.js.map
|
package/dist/processHooks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processHooks.js","sourceRoot":"","sources":["../src/processHooks.ts"],"names":[],"mappings":";;AAmCA,wEAWC;AA+BD,oDAMC;AAnFD,yCAAyC;AACzC,qCAAuD;AAEvD,MAAM,QAAQ,GAAG,IAAA,sBAAW,GAAE,CAAC;AAE/B,yEAAyE;AACzE,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAKhC,CAAC;AACJ,IAAI,0BAA0B,GAAG,KAAK,CAAC;AAEvC,SAAS,kCAAkC;IACzC,IAAI,0BAA0B;QAAE,OAAO;IACvC,0BAA0B,GAAG,IAAI,CAAC;IAClC,MAAM,mBAAmB,GAAG,KAAK,EAAE,GAAQ,EAAE,EAAE;QAC7C,KAAK,MAAM,OAAO,IAAI,mBAAmB,EAAE,CAAC;YAC1C,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YAC1C,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;IACF,MAAM,oBAAoB,GAAG,KAAK,EAAE,MAAW,EAAE,EAAE;QACjD,KAAK,MAAM,OAAO,IAAI,mBAAmB,EAAE,CAAC;YAC1C,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;YAC9C,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QAChB,CAAC;IACH,CAAC,CAAC;IACF,QAAQ,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IAClD,QAAQ,CAAC,oBAAoB,C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,EAAE;QACV,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/run.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IResource, IResourceWithConfig } from "./defs";
|
|
2
|
-
import { RunResult } from "./models/RunResult";
|
|
3
|
-
import { RunOptions } from "./types/runner";
|
|
4
|
-
/**
|
|
5
|
-
* This is the central function that kicks off you runner. You can run as many resources as you want in a single process, they will run in complete isolation.
|
|
6
|
-
*
|
|
7
|
-
* @param resourceOrResourceWithConfig - The resource or resource with config to run.
|
|
8
|
-
* @param options - The options for the run.
|
|
9
|
-
* @returns A promise that resolves to the result of the run.
|
|
10
|
-
*/
|
|
11
|
-
export declare function run<C, V extends Promise<any>>(resourceOrResourceWithConfig: IResourceWithConfig<C, V> | IResource<void, V, any, any> | IResource<{
|
|
12
|
-
[K in any]?: any;
|
|
13
|
-
}, V, any, any>, // For optional config
|
|
14
|
-
options?: RunOptions): Promise<RunResult<V extends Promise<infer U> ? U : V>>;
|