@cedarjs/context 0.6.1-next.0 → 0.7.0
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/cjs/context.d.ts +0 -1
- package/dist/cjs/context.d.ts.map +1 -1
- package/dist/cjs/context.js +2 -4
- package/dist/context.d.ts +0 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +2 -3
- package/package.json +3 -3
package/dist/cjs/context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;AAmBjE,eAAO,IAAI,OAAO,EAAE,aAAsC,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,eAAgB,aAAa,KAAG,aAWtD,CAAA"}
|
package/dist/cjs/context.js
CHANGED
|
@@ -19,12 +19,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var context_exports = {};
|
|
20
20
|
__export(context_exports, {
|
|
21
21
|
context: () => context,
|
|
22
|
-
createContextProxy: () => createContextProxy,
|
|
23
22
|
setContext: () => setContext
|
|
24
23
|
});
|
|
25
24
|
module.exports = __toCommonJS(context_exports);
|
|
26
25
|
var import_store = require("./store.js");
|
|
27
|
-
|
|
26
|
+
function createContextProxy(target) {
|
|
28
27
|
return new Proxy(target, {
|
|
29
28
|
get: (_target, property) => {
|
|
30
29
|
const store = (0, import_store.getAsyncStoreInstance)().getStore();
|
|
@@ -39,7 +38,7 @@ const createContextProxy = (target) => {
|
|
|
39
38
|
return true;
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
|
-
}
|
|
41
|
+
}
|
|
43
42
|
let context = createContextProxy({});
|
|
44
43
|
const setContext = (newContext) => {
|
|
45
44
|
context = createContextProxy(newContext);
|
|
@@ -50,6 +49,5 @@ const setContext = (newContext) => {
|
|
|
50
49
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
50
|
0 && (module.exports = {
|
|
52
51
|
context,
|
|
53
|
-
createContextProxy,
|
|
54
52
|
setContext
|
|
55
53
|
});
|
package/dist/context.d.ts
CHANGED
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAG;AAmBjE,eAAO,IAAI,OAAO,EAAE,aAAsC,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,eAAgB,aAAa,KAAG,aAWtD,CAAA"}
|
package/dist/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getAsyncStoreInstance } from "./store.js";
|
|
2
|
-
|
|
2
|
+
function createContextProxy(target) {
|
|
3
3
|
return new Proxy(target, {
|
|
4
4
|
get: (_target, property) => {
|
|
5
5
|
const store = getAsyncStoreInstance().getStore();
|
|
@@ -14,7 +14,7 @@ const createContextProxy = (target) => {
|
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
let context = createContextProxy({});
|
|
19
19
|
const setContext = (newContext) => {
|
|
20
20
|
context = createContextProxy(newContext);
|
|
@@ -24,6 +24,5 @@ const setContext = (newContext) => {
|
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
context,
|
|
27
|
-
createContextProxy,
|
|
28
27
|
setContext
|
|
29
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/context",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@arethetypeswrong/cli": "0.18.2",
|
|
61
|
-
"@cedarjs/framework-tools": "0.
|
|
61
|
+
"@cedarjs/framework-tools": "0.7.0",
|
|
62
62
|
"concurrently": "8.2.2",
|
|
63
63
|
"publint": "0.3.12",
|
|
64
64
|
"tsx": "4.20.3",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "9e720ea4b6ca8306d466378104f532f818015531"
|
|
71
71
|
}
|