@cedarjs/context 1.1.1-next.18 → 1.1.1-rc.3

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.
@@ -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;AA+BjE,eAAO,IAAI,OAAO,EAAE,aAAsC,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,aAAa,KAAG,aA6BtD,CAAA"}
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,GAAI,YAAY,aAAa,KAAG,aAWtD,CAAA"}
@@ -28,15 +28,6 @@ function createContextProxy(target) {
28
28
  get: (_target, property) => {
29
29
  const store = (0, import_store.getAsyncStoreInstance)().getStore();
30
30
  const ctx = store?.get("context") || {};
31
- if (process.env.DEBUG_CONTEXT === "true") {
32
- console.log("[Context Debug]", {
33
- property,
34
- hasStore: !!store,
35
- hasContext: !!ctx,
36
- contextKeys: Object.keys(ctx),
37
- currentUser: ctx.currentUser
38
- });
39
- }
40
31
  return ctx[property];
41
32
  },
42
33
  set: (_target, property, newVal) => {
@@ -50,22 +41,8 @@ function createContextProxy(target) {
50
41
  }
51
42
  let context = createContextProxy({});
52
43
  const setContext = (newContext) => {
53
- if (process.env.DEBUG_CONTEXT === "true") {
54
- console.log("[setContext Debug]", {
55
- hasNewContext: !!newContext,
56
- contextKeys: Object.keys(newContext),
57
- currentUser: newContext.currentUser,
58
- stackTrace: new Error().stack
59
- });
60
- }
61
44
  context = createContextProxy(newContext);
62
45
  const store = (0, import_store.getAsyncStoreInstance)().getStore();
63
- if (process.env.DEBUG_CONTEXT === "true") {
64
- console.log("[setContext Debug - Store]", {
65
- hasStore: !!store,
66
- storeHasContext: !!store?.get("context")
67
- });
68
- }
69
46
  store?.set("context", newContext);
70
47
  return context;
71
48
  };
@@ -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;AA+BjE,eAAO,IAAI,OAAO,EAAE,aAAsC,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,aAAa,KAAG,aA6BtD,CAAA"}
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,GAAI,YAAY,aAAa,KAAG,aAWtD,CAAA"}
package/dist/context.js CHANGED
@@ -4,15 +4,6 @@ function createContextProxy(target) {
4
4
  get: (_target, property) => {
5
5
  const store = getAsyncStoreInstance().getStore();
6
6
  const ctx = store?.get("context") || {};
7
- if (process.env.DEBUG_CONTEXT === "true") {
8
- console.log("[Context Debug]", {
9
- property,
10
- hasStore: !!store,
11
- hasContext: !!ctx,
12
- contextKeys: Object.keys(ctx),
13
- currentUser: ctx.currentUser
14
- });
15
- }
16
7
  return ctx[property];
17
8
  },
18
9
  set: (_target, property, newVal) => {
@@ -26,22 +17,8 @@ function createContextProxy(target) {
26
17
  }
27
18
  let context = createContextProxy({});
28
19
  const setContext = (newContext) => {
29
- if (process.env.DEBUG_CONTEXT === "true") {
30
- console.log("[setContext Debug]", {
31
- hasNewContext: !!newContext,
32
- contextKeys: Object.keys(newContext),
33
- currentUser: newContext.currentUser,
34
- stackTrace: new Error().stack
35
- });
36
- }
37
20
  context = createContextProxy(newContext);
38
21
  const store = getAsyncStoreInstance().getStore();
39
- if (process.env.DEBUG_CONTEXT === "true") {
40
- console.log("[setContext Debug - Store]", {
41
- hasStore: !!store,
42
- storeHasContext: !!store?.get("context")
43
- });
44
- }
45
22
  store?.set("context", newContext);
46
23
  return context;
47
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/context",
3
- "version": "1.1.1-next.18+5ffd3124d",
3
+ "version": "1.1.1-rc.3",
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": "1.1.1-next.18",
61
+ "@cedarjs/framework-tools": "1.1.1-rc.3",
62
62
  "concurrently": "8.2.2",
63
63
  "publint": "0.3.12",
64
64
  "tsx": "4.20.5",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "5ffd3124d3d4ceb7843408264c96ecceff8542f5"
70
+ "gitHead": "1332c50070b0ab7f2cfc0d7bc802c60cd8a664a9"
71
71
  }