@unional/async-context 9.0.17 → 10.0.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/cjs/AsyncContext.d.ts +2 -3
- package/cjs/AsyncContext.d.ts.map +1 -1
- package/cjs/AsyncContext.js +5 -5
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/assertClassBrand.js +1 -1
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/checkPrivateRedeclaration.js +1 -1
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldGet2.js +1 -1
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldInitSpec.js +1 -1
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldSet2.js +1 -1
- package/cjs/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateMethodInitSpec.js +1 -1
- package/cjs/errors.d.ts +2 -3
- package/cjs/errors.d.ts.map +1 -1
- package/esm/AsyncContext.d.ts +2 -3
- package/esm/AsyncContext.d.ts.map +1 -1
- package/esm/AsyncContext.js +5 -5
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/assertClassBrand.js +1 -1
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/checkPrivateRedeclaration.js +1 -1
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldGet2.js +1 -1
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldInitSpec.js +1 -1
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateFieldSet2.js +1 -1
- package/esm/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/classPrivateMethodInitSpec.js +1 -1
- package/esm/errors.d.ts +2 -3
- package/esm/errors.d.ts.map +1 -1
- package/package.json +7 -7
package/cjs/AsyncContext.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { LeftJoin } from "type-plus";
|
|
2
2
|
//#region ts/AsyncContext.d.ts
|
|
3
|
-
declare class AsyncContext<Init extends Record<string | symbol, any>, Context extends Record<string | symbol, any> = Init> {
|
|
3
|
+
export declare class AsyncContext<Init extends Record<string | symbol, any>, Context extends Record<string | symbol, any> = Init> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(init?: Init | Promise<Init> | AsyncContext.Initializer<Init>);
|
|
6
6
|
initialize<I extends Init = Init>(init: I | Promise<I> | AsyncContext.Initializer<I>): AsyncContext<I>;
|
|
7
7
|
extend<CurrentContext extends Record<string | symbol, any> = Context, AdditionalContext extends Record<string | symbol, any> = Record<string | symbol, any>>(context: AdditionalContext | Promise<AdditionalContext> | AsyncContext.Transformer<Context, AdditionalContext>): AsyncContext<Init, LeftJoin<CurrentContext, AdditionalContext>>;
|
|
8
8
|
get<C = Context>(): Promise<C>;
|
|
9
9
|
}
|
|
10
|
-
declare namespace AsyncContext {
|
|
10
|
+
export declare namespace AsyncContext {
|
|
11
11
|
type Initializer<Init> = () => Init | Promise<Init>;
|
|
12
12
|
type Transformer<CurrentContext, AdditionalContext> = (context: CurrentContext) => AdditionalContext | Promise<AdditionalContext>;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
export { AsyncContext };
|
|
16
15
|
//# sourceMappingURL=AsyncContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncContext.d.ts","names":[],"sources":["../ts/AsyncContext.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"AsyncContext.d.ts","names":[],"sources":["../ts/AsyncContext.ts"],"mappings":";;qBAGa,aACZ,aAAa,8BACb,gBAAgB,+BAA+B;;EAO/C,YAAY,OAAO,OAAO,QAAQ,QAAQ,aAAa,YAAY;EAGnE,WAAW,UAAU,OAAO,MAAM,MAAM,IAAI,QAAQ,KAAK,aAAa,YAAY,KAAK,aAAa;EAOpG,OACC,uBAAuB,+BAA+B,SACtD,0BAA0B,+BAA+B,8BAEzD,SAAS,oBAAoB,QAAQ,qBAAqB,aAAa,YAAY,SAAS,qBAC1F,aAAa,MAAM,SAAS,gBAAgB;EAgBzC,IAAI,IAAI,YAAY,QAAQ;;yBASlB;OACJ,YAAY,cAAc,OAAO,QAAQ;OACzC,YAAY,gBAAgB,sBACvC,SAAS,mBACL,oBAAoB,QAAQ"}
|
package/cjs/AsyncContext.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_errors = require("./errors.js");
|
|
2
|
-
const require_classPrivateMethodInitSpec = require("./_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
const require_classPrivateFieldInitSpec = require("./_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
const require_assertClassBrand = require("./_virtual/_@oxc-project_runtime@0.
|
|
5
|
-
const require_classPrivateFieldSet2 = require("./_virtual/_@oxc-project_runtime@0.
|
|
6
|
-
const require_classPrivateFieldGet2 = require("./_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
const require_classPrivateMethodInitSpec = require("./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateMethodInitSpec.js");
|
|
3
|
+
const require_classPrivateFieldInitSpec = require("./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldInitSpec.js");
|
|
4
|
+
const require_assertClassBrand = require("./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/assertClassBrand.js");
|
|
5
|
+
const require_classPrivateFieldSet2 = require("./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldSet2.js");
|
|
6
|
+
const require_classPrivateFieldGet2 = require("./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldGet2.js");
|
|
7
7
|
//#region ts/AsyncContext.ts
|
|
8
8
|
var _resolving = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
var _resolvers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/assertClassBrand.js
|
|
2
2
|
function _assertClassBrand(e, t, n) {
|
|
3
3
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
4
4
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/checkPrivateRedeclaration.js
|
|
2
2
|
function _checkPrivateRedeclaration(e, t) {
|
|
3
3
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_assertClassBrand = require("./assertClassBrand.js");
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldGet2.js
|
|
3
3
|
function _classPrivateFieldGet2(s, a) {
|
|
4
4
|
return s.get(require_assertClassBrand.default(s, a));
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
3
3
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
4
4
|
require_checkPrivateRedeclaration.default(e, t), t.set(e, a);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_assertClassBrand = require("./assertClassBrand.js");
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldSet2.js
|
|
3
3
|
function _classPrivateFieldSet2(s, a, r) {
|
|
4
4
|
return s.set(require_assertClassBrand.default(s, a), r), r;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
3
3
|
function _classPrivateMethodInitSpec(e, a) {
|
|
4
4
|
require_checkPrivateRedeclaration.default(e, a), a.add(e);
|
|
5
5
|
}
|
package/cjs/errors.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ModuleError } from "iso-error";
|
|
2
2
|
//#region ts/errors.d.ts
|
|
3
|
-
declare class ContextAlreadyInitialized extends ModuleError {
|
|
3
|
+
export declare class ContextAlreadyInitialized extends ModuleError {
|
|
4
4
|
constructor(options?: ModuleError.Options);
|
|
5
5
|
}
|
|
6
|
-
declare class BlockingGetDetected extends ModuleError {
|
|
6
|
+
export declare class BlockingGetDetected extends ModuleError {
|
|
7
7
|
constructor(options?: ModuleError.Options);
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { BlockingGetDetected, ContextAlreadyInitialized };
|
|
11
10
|
//# sourceMappingURL=errors.d.ts.map
|
package/cjs/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","names":[],"sources":["../ts/errors.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":[],"sources":["../ts/errors.ts"],"mappings":";;qBAEa,kCAAkC;EAC9C,YAAY,UAAU,YAAY;;qBAKtB,4BAA4B;EACxC,YAAY,UAAU,YAAY"}
|
package/esm/AsyncContext.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { LeftJoin } from "type-plus";
|
|
2
2
|
//#region ts/AsyncContext.d.ts
|
|
3
|
-
declare class AsyncContext<Init extends Record<string | symbol, any>, Context extends Record<string | symbol, any> = Init> {
|
|
3
|
+
export declare class AsyncContext<Init extends Record<string | symbol, any>, Context extends Record<string | symbol, any> = Init> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(init?: Init | Promise<Init> | AsyncContext.Initializer<Init>);
|
|
6
6
|
initialize<I extends Init = Init>(init: I | Promise<I> | AsyncContext.Initializer<I>): AsyncContext<I>;
|
|
7
7
|
extend<CurrentContext extends Record<string | symbol, any> = Context, AdditionalContext extends Record<string | symbol, any> = Record<string | symbol, any>>(context: AdditionalContext | Promise<AdditionalContext> | AsyncContext.Transformer<Context, AdditionalContext>): AsyncContext<Init, LeftJoin<CurrentContext, AdditionalContext>>;
|
|
8
8
|
get<C = Context>(): Promise<C>;
|
|
9
9
|
}
|
|
10
|
-
declare namespace AsyncContext {
|
|
10
|
+
export declare namespace AsyncContext {
|
|
11
11
|
type Initializer<Init> = () => Init | Promise<Init>;
|
|
12
12
|
type Transformer<CurrentContext, AdditionalContext> = (context: CurrentContext) => AdditionalContext | Promise<AdditionalContext>;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
export { AsyncContext };
|
|
16
15
|
//# sourceMappingURL=AsyncContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncContext.d.ts","names":[],"sources":["../ts/AsyncContext.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"AsyncContext.d.ts","names":[],"sources":["../ts/AsyncContext.ts"],"mappings":";;qBAGa,aACZ,aAAa,8BACb,gBAAgB,+BAA+B;;EAO/C,YAAY,OAAO,OAAO,QAAQ,QAAQ,aAAa,YAAY;EAGnE,WAAW,UAAU,OAAO,MAAM,MAAM,IAAI,QAAQ,KAAK,aAAa,YAAY,KAAK,aAAa;EAOpG,OACC,uBAAuB,+BAA+B,SACtD,0BAA0B,+BAA+B,8BAEzD,SAAS,oBAAoB,QAAQ,qBAAqB,aAAa,YAAY,SAAS,qBAC1F,aAAa,MAAM,SAAS,gBAAgB;EAgBzC,IAAI,IAAI,YAAY,QAAQ;;yBASlB;OACJ,YAAY,cAAc,OAAO,QAAQ;OACzC,YAAY,gBAAgB,sBACvC,SAAS,mBACL,oBAAoB,QAAQ"}
|
package/esm/AsyncContext.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BlockingGetDetected, ContextAlreadyInitialized } from "./errors.js";
|
|
2
|
-
import _classPrivateMethodInitSpec from "./_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import _classPrivateFieldInitSpec from "./_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import _assertClassBrand from "./_virtual/_@oxc-project_runtime@0.
|
|
5
|
-
import _classPrivateFieldSet2 from "./_virtual/_@oxc-project_runtime@0.
|
|
6
|
-
import _classPrivateFieldGet2 from "./_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _classPrivateMethodInitSpec from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateMethodInitSpec.js";
|
|
3
|
+
import _classPrivateFieldInitSpec from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldInitSpec.js";
|
|
4
|
+
import _assertClassBrand from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/assertClassBrand.js";
|
|
5
|
+
import _classPrivateFieldSet2 from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldSet2.js";
|
|
6
|
+
import _classPrivateFieldGet2 from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldGet2.js";
|
|
7
7
|
//#region ts/AsyncContext.ts
|
|
8
8
|
var _resolving = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
var _resolvers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/assertClassBrand.js
|
|
2
2
|
function _assertClassBrand(e, t, n) {
|
|
3
3
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
4
4
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/checkPrivateRedeclaration.js
|
|
2
2
|
function _checkPrivateRedeclaration(e, t) {
|
|
3
3
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _assertClassBrand from "./assertClassBrand.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldGet2.js
|
|
3
3
|
function _classPrivateFieldGet2(s, a) {
|
|
4
4
|
return s.get(_assertClassBrand(s, a));
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _checkPrivateRedeclaration from "./checkPrivateRedeclaration.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
3
3
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
4
4
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _assertClassBrand from "./assertClassBrand.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateFieldSet2.js
|
|
3
3
|
function _classPrivateFieldSet2(s, a, r) {
|
|
4
4
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _checkPrivateRedeclaration from "./checkPrivateRedeclaration.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
3
3
|
function _classPrivateMethodInitSpec(e, a) {
|
|
4
4
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
5
5
|
}
|
package/esm/errors.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ModuleError } from "iso-error";
|
|
2
2
|
//#region ts/errors.d.ts
|
|
3
|
-
declare class ContextAlreadyInitialized extends ModuleError {
|
|
3
|
+
export declare class ContextAlreadyInitialized extends ModuleError {
|
|
4
4
|
constructor(options?: ModuleError.Options);
|
|
5
5
|
}
|
|
6
|
-
declare class BlockingGetDetected extends ModuleError {
|
|
6
|
+
export declare class BlockingGetDetected extends ModuleError {
|
|
7
7
|
constructor(options?: ModuleError.Options);
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export { BlockingGetDetected, ContextAlreadyInitialized };
|
|
11
10
|
//# sourceMappingURL=errors.d.ts.map
|
package/esm/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","names":[],"sources":["../ts/errors.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","names":[],"sources":["../ts/errors.ts"],"mappings":";;qBAEa,kCAAkC;EAC9C,YAAY,UAAU,YAAY;;qBAKtB,4BAA4B;EACxC,YAAY,UAAU,YAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unional/async-context",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Asynchronous context for functional style programming",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"async",
|
|
@@ -48,21 +48,21 @@
|
|
|
48
48
|
"!**/*.{spec,test,unit,accept,integrate,system}.*"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"iso-error": "^
|
|
52
|
-
"type-plus": "
|
|
51
|
+
"iso-error": "^7.0.0",
|
|
52
|
+
"type-plus": "8.0.0-beta.12"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@repobuddy/typescript": "^2.
|
|
55
|
+
"@repobuddy/typescript": "^2.2.0",
|
|
56
56
|
"@types/setimmediate": "^1.0.4",
|
|
57
57
|
"@vitest/coverage-v8": "^4.1.11",
|
|
58
|
-
"assertron": "^11.
|
|
58
|
+
"assertron": "^11.7.0",
|
|
59
59
|
"rimraf": "^6.1.3",
|
|
60
60
|
"setimmediate": "^1.0.5",
|
|
61
|
-
"tsdown": "^0.
|
|
61
|
+
"tsdown": "^0.23.0",
|
|
62
62
|
"vitest": "^4.1.11"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
65
|
+
"node": ">= 20"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|