@bluelibs/runner 4.5.0-alpha → 4.5.0-alpha.1
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/context.d.ts +1 -1
- package/dist/platform/browser.d.ts +3 -0
- package/dist/platform/browser.js +18 -0
- package/dist/platform/browser.js.map +1 -1
- package/dist/platform/index.d.ts +1 -8
- package/dist/platform/index.js +15 -44
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/node.d.ts +3 -0
- package/dist/platform/node.js +18 -0
- package/dist/platform/node.js.map +1 -1
- package/dist/platform/universal.d.ts +3 -0
- package/dist/platform/universal.js +18 -0
- package/dist/platform/universal.js.map +1 -1
- package/package.json +3 -3
package/dist/context.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface Context<T> {
|
|
|
21
21
|
context: Context<T>;
|
|
22
22
|
}>;
|
|
23
23
|
}
|
|
24
|
-
export declare const storage: import("./platform").IAsyncLocalStorage<Map<symbol, unknown>>;
|
|
24
|
+
export declare const storage: import("./platform/types").IAsyncLocalStorage<Map<symbol, unknown>>;
|
|
25
25
|
/**
|
|
26
26
|
* Create a new typed Context. The result contains helpers similar to React’s
|
|
27
27
|
* Context API but adapted for async usage in Runner.
|
|
@@ -13,3 +13,6 @@ export declare class BrowserPlatformAdapter implements IPlatformAdapter {
|
|
|
13
13
|
setTimeout: typeof setTimeout;
|
|
14
14
|
clearTimeout: typeof clearTimeout;
|
|
15
15
|
}
|
|
16
|
+
export declare function getPlatform(): BrowserPlatformAdapter;
|
|
17
|
+
export declare function setPlatform(adapter: IPlatformAdapter): void;
|
|
18
|
+
export declare function resetPlatform(): void;
|
package/dist/platform/browser.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BrowserPlatformAdapter = void 0;
|
|
4
|
+
exports.getPlatform = getPlatform;
|
|
5
|
+
exports.setPlatform = setPlatform;
|
|
6
|
+
exports.resetPlatform = resetPlatform;
|
|
4
7
|
const errors_1 = require("../errors");
|
|
5
8
|
class BrowserPlatformAdapter {
|
|
6
9
|
constructor() {
|
|
@@ -95,4 +98,19 @@ class BrowserPlatformAdapter {
|
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
exports.BrowserPlatformAdapter = BrowserPlatformAdapter;
|
|
101
|
+
let platformInstance = null;
|
|
102
|
+
function getPlatform() {
|
|
103
|
+
if (!platformInstance) {
|
|
104
|
+
platformInstance = new BrowserPlatformAdapter();
|
|
105
|
+
}
|
|
106
|
+
return platformInstance;
|
|
107
|
+
}
|
|
108
|
+
// Allow manual override for testing or special cases
|
|
109
|
+
function setPlatform(adapter) {
|
|
110
|
+
platformInstance = adapter;
|
|
111
|
+
}
|
|
112
|
+
// Reset to auto-detection
|
|
113
|
+
function resetPlatform() {
|
|
114
|
+
platformInstance = null;
|
|
115
|
+
}
|
|
98
116
|
//# sourceMappingURL=browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/platform/browser.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/platform/browser.ts"],"names":[],"mappings":";;;AAgIA,kCAKC;AAGD,kCAEC;AAGD,sCAEC;AA1ID,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,QA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AqD;AACrD,SAAgB,WAAW,CAAC,OAAyB;IACnD,gBAAgB,GAAG,OAAO,CAAC;AAC7B,CAAC;AAED,0BAA0B;AAC1B,SAAgB,aAAa;IAC3B,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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";
|
|
1
|
+
export * from "./node";
|
package/dist/platform/index.js
CHANGED
|
@@ -1,47 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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();
|
|
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]; } };
|
|
26
7
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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; } });
|
|
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("./node"), exports);
|
|
47
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
|
package/dist/platform/node.d.ts
CHANGED
|
@@ -9,3 +9,6 @@ export declare class NodePlatformAdapter implements IPlatformAdapter {
|
|
|
9
9
|
setTimeout: typeof setTimeout;
|
|
10
10
|
clearTimeout: typeof clearTimeout;
|
|
11
11
|
}
|
|
12
|
+
export declare function getPlatform(): NodePlatformAdapter;
|
|
13
|
+
export declare function setPlatform(adapter: IPlatformAdapter): void;
|
|
14
|
+
export declare function resetPlatform(): void;
|
package/dist/platform/node.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NodePlatformAdapter = void 0;
|
|
4
|
+
exports.getPlatform = getPlatform;
|
|
5
|
+
exports.setPlatform = setPlatform;
|
|
6
|
+
exports.resetPlatform = resetPlatform;
|
|
4
7
|
/**
|
|
5
8
|
* Node.js Platform Adapter
|
|
6
9
|
* Uses Node.js-specific APIs for process management and async context
|
|
@@ -42,4 +45,19 @@ class NodePlatformAdapter {
|
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
exports.NodePlatformAdapter = NodePlatformAdapter;
|
|
48
|
+
let platformInstance = null;
|
|
49
|
+
function getPlatform() {
|
|
50
|
+
if (!platformInstance) {
|
|
51
|
+
platformInstance = new NodePlatformAdapter();
|
|
52
|
+
}
|
|
53
|
+
return platformInstance;
|
|
54
|
+
}
|
|
55
|
+
// Allow manual override for testing or special cases
|
|
56
|
+
function setPlatform(adapter) {
|
|
57
|
+
platformInstance = adapter;
|
|
58
|
+
}
|
|
59
|
+
// Reset to auto-detection
|
|
60
|
+
function resetPlatform() {
|
|
61
|
+
platformInstance = null;
|
|
62
|
+
}
|
|
45
63
|
//# sourceMappingURL=node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/platform/node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/platform/node.ts"],"names":[],"mappings":";;;AAiDA,kCAKC;AAGD,kCAEC;AAGD,sCAEC;AAhED;;;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;AAED,IAAI,gBAAgB,GAA+B,IAAI,CAAC;AAExD,SAAgB,WAAW;IACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,mBAAmB,EAAE,CAAC;IAC/C,CAAC;IACD,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"}
|
|
@@ -14,3 +14,6 @@ export declare class UniversalPlatformAdapter implements IPlatformAdapter {
|
|
|
14
14
|
setTimeout: typeof setTimeout;
|
|
15
15
|
clearTimeout: typeof clearTimeout;
|
|
16
16
|
}
|
|
17
|
+
export declare function getPlatform(): UniversalPlatformAdapter;
|
|
18
|
+
export declare function setPlatform(adapter: IPlatformAdapter): void;
|
|
19
|
+
export declare function resetPlatform(): void;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UniversalPlatformAdapter = void 0;
|
|
4
|
+
exports.getPlatform = getPlatform;
|
|
5
|
+
exports.setPlatform = setPlatform;
|
|
6
|
+
exports.resetPlatform = resetPlatform;
|
|
4
7
|
const errors_1 = require("../errors");
|
|
5
8
|
class UniversalPlatformAdapter {
|
|
6
9
|
constructor() {
|
|
@@ -54,4 +57,19 @@ class UniversalPlatformAdapter {
|
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
59
|
exports.UniversalPlatformAdapter = UniversalPlatformAdapter;
|
|
60
|
+
let platformInstance = null;
|
|
61
|
+
function getPlatform() {
|
|
62
|
+
if (!platformInstance) {
|
|
63
|
+
platformInstance = new UniversalPlatformAdapter();
|
|
64
|
+
}
|
|
65
|
+
return platformInstance;
|
|
66
|
+
}
|
|
67
|
+
// Allow manual override for testing or special cases
|
|
68
|
+
function setPlatform(adapter) {
|
|
69
|
+
platformInstance = adapter;
|
|
70
|
+
}
|
|
71
|
+
// Reset to auto-detection
|
|
72
|
+
function resetPlatform() {
|
|
73
|
+
platformInstance = null;
|
|
74
|
+
}
|
|
57
75
|
//# sourceMappingURL=universal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universal.js","sourceRoot":"","sources":["../../src/platform/universal.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"universal.js","sourceRoot":"","sources":["../../src/platform/universal.ts"],"names":[],"mappings":";;;AA4EA,kCAKC;AAGD,kCAEC;AAGD,sCAEC;AArFD,sCAAwD;AAExD,MAAa,wBAAwB;IAArC;QA8DE,eAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACnC,iBAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IACzC,CAAC;IA/DC,mBAAmB,CAAC,OAA6B;QAC/C,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrD,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,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,C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AC9B,SAAS,CACV,CAAC;IACJ,CAAC;IAED,uBAAuB;QACrB,MAAM,IAAI,oCAA2B,CAAC,yBAAyB,CAAC,CAAC;IACnE,CAAC;CAIF;AAhED,4DAgEC;AAED,IAAI,gBAAgB,GAAoC,IAAI,CAAC;AAE7D,SAAgB,WAAW;IACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,wBAAwB,EAAE,CAAC;IACpD,CAAC;IACD,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluelibs/runner",
|
|
3
|
-
"version": "4.5.0-alpha",
|
|
3
|
+
"version": "4.5.0-alpha.1",
|
|
4
4
|
"description": "BlueLibs Runner",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"default": "./dist/index.js"
|
|
14
14
|
},
|
|
15
15
|
"./platform": {
|
|
16
|
-
"types": "./dist/platform/
|
|
16
|
+
"types": "./dist/platform/types.d.ts",
|
|
17
17
|
"node": "./dist/platform/node.js",
|
|
18
18
|
"browser": "./dist/platform/browser.js",
|
|
19
|
-
"default": "./dist/platform/
|
|
19
|
+
"default": "./dist/platform/universal.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|