@warp-drive/core 5.10.0-alpha.7 → 5.10.0-alpha.8

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.
Files changed (128) hide show
  1. package/dist/{-private-DBlBmiNp.js → -private-CjK1Dmuh.js} +3 -3
  2. package/dist/{-private-DBlBmiNp.js.map → -private-CjK1Dmuh.js.map} +1 -1
  3. package/dist/{unpkg/dev-deprecated/-private-6kTp5R1L.js → -private-Dtj8O5W7.js} +2 -2
  4. package/dist/{-private-KOOIu1oa.js.map → -private-Dtj8O5W7.js.map} +1 -1
  5. package/dist/configure.js +1 -1
  6. package/dist/graph/-private.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/reactive/-private.js +1 -1
  9. package/dist/reactive.js +3 -3
  10. package/dist/{request-CU7NcFQP.js → request-Di274pQz.js} +2 -2
  11. package/dist/{request-CU7NcFQP.js.map → request-Di274pQz.js.map} +1 -1
  12. package/dist/request.js +1 -1
  13. package/dist/signals/-leaked.js +1 -1
  14. package/dist/{src-CjNe_Kwe.js → src-BVANmW9j.js} +5 -5
  15. package/dist/{src-CjNe_Kwe.js.map → src-BVANmW9j.js.map} +1 -1
  16. package/dist/store/-private.js +1 -1
  17. package/dist/types/-private.d.ts.map +1 -1
  18. package/dist/types/-private.js +116 -2
  19. package/dist/types/-private.js.map +1 -0
  20. package/dist/types/request.js +1 -1
  21. package/dist/types/runtime.js +1 -1
  22. package/dist/types/symbols.js +1 -1
  23. package/dist/unpkg/dev/{-private-BVekQ7LS.js → -private-DrQgwtNS.js} +3 -3
  24. package/dist/unpkg/{dev-deprecated/-private-BVekQ7LS.js.map → dev/-private-DrQgwtNS.js.map} +1 -1
  25. package/dist/{-private-KOOIu1oa.js → unpkg/dev/-private-Dtj8O5W7.js} +2 -2
  26. package/dist/unpkg/dev/{-private-6kTp5R1L.js.map → -private-Dtj8O5W7.js.map} +1 -1
  27. package/dist/unpkg/dev/configure.js +1 -1
  28. package/dist/unpkg/dev/graph/-private.js +2 -2
  29. package/dist/unpkg/dev/index.js +1 -1
  30. package/dist/unpkg/dev/reactive/-private.js +1 -1
  31. package/dist/unpkg/dev/reactive.js +3 -3
  32. package/dist/unpkg/dev/{request-C21stEc9.js → request-nAaeDlS9.js} +2 -2
  33. package/dist/unpkg/dev/{request-C21stEc9.js.map → request-nAaeDlS9.js.map} +1 -1
  34. package/dist/unpkg/dev/request.js +1 -1
  35. package/dist/unpkg/dev/{runtime-DW881fpw.js → runtime-vtT5WRY_.js} +2 -2
  36. package/dist/unpkg/dev/{runtime-DW881fpw.js.map → runtime-vtT5WRY_.js.map} +1 -1
  37. package/dist/unpkg/dev/signals/-leaked.js +1 -1
  38. package/dist/unpkg/dev/{src-B8mXRVra.js → src-BxlrcSwo.js} +7 -7
  39. package/dist/unpkg/dev/{src-B8mXRVra.js.map → src-BxlrcSwo.js.map} +1 -1
  40. package/dist/unpkg/dev/store/-private.js +1 -1
  41. package/dist/unpkg/{dev-deprecated/store-D-z_1Jxe.js → dev/store-BIFNM_fB.js} +2 -2
  42. package/dist/unpkg/{dev-deprecated/store-D-z_1Jxe.js.map → dev/store-BIFNM_fB.js.map} +1 -1
  43. package/dist/unpkg/dev/store.js +1 -1
  44. package/dist/unpkg/dev/types/-private.js +107 -2
  45. package/dist/unpkg/dev/types/-private.js.map +1 -0
  46. package/dist/unpkg/dev/types/request.js +1 -1
  47. package/dist/unpkg/dev/types/runtime.js +1 -1
  48. package/dist/unpkg/dev/types/symbols.js +1 -1
  49. package/dist/unpkg/dev-deprecated/{-private-BVekQ7LS.js → -private-DrQgwtNS.js} +3 -3
  50. package/dist/unpkg/{dev/-private-BVekQ7LS.js.map → dev-deprecated/-private-DrQgwtNS.js.map} +1 -1
  51. package/dist/unpkg/{dev/-private-6kTp5R1L.js → dev-deprecated/-private-Dtj8O5W7.js} +2 -2
  52. package/dist/unpkg/dev-deprecated/{-private-6kTp5R1L.js.map → -private-Dtj8O5W7.js.map} +1 -1
  53. package/dist/unpkg/dev-deprecated/configure.js +1 -1
  54. package/dist/unpkg/dev-deprecated/graph/-private.js +2 -2
  55. package/dist/unpkg/dev-deprecated/index.js +1 -1
  56. package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -1
  57. package/dist/unpkg/dev-deprecated/reactive.js +3 -3
  58. package/dist/unpkg/dev-deprecated/{request-C21stEc9.js → request-nAaeDlS9.js} +2 -2
  59. package/dist/unpkg/dev-deprecated/{request-C21stEc9.js.map → request-nAaeDlS9.js.map} +1 -1
  60. package/dist/unpkg/dev-deprecated/request.js +1 -1
  61. package/dist/unpkg/dev-deprecated/{runtime-BIra6K31.js → runtime-e4oZ_UWz.js} +2 -2
  62. package/dist/unpkg/dev-deprecated/{runtime-BIra6K31.js.map → runtime-e4oZ_UWz.js.map} +1 -1
  63. package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
  64. package/dist/unpkg/dev-deprecated/{src-Dozi8FJ1.js → src-BEpY2ZqX.js} +8 -8
  65. package/dist/unpkg/dev-deprecated/{src-Dozi8FJ1.js.map → src-BEpY2ZqX.js.map} +1 -1
  66. package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
  67. package/dist/unpkg/{dev/store-C0p6sclI.js → dev-deprecated/store-X1WN7P_O.js} +2 -2
  68. package/dist/unpkg/{dev/store-C0p6sclI.js.map → dev-deprecated/store-X1WN7P_O.js.map} +1 -1
  69. package/dist/unpkg/dev-deprecated/store.js +1 -1
  70. package/dist/unpkg/dev-deprecated/types/-private.js +107 -2
  71. package/dist/unpkg/dev-deprecated/types/-private.js.map +1 -0
  72. package/dist/unpkg/dev-deprecated/types/request.js +1 -1
  73. package/dist/unpkg/dev-deprecated/types/runtime.js +1 -1
  74. package/dist/unpkg/dev-deprecated/types/symbols.js +1 -1
  75. package/dist/unpkg/{prod-deprecated/-private-CDTSpfo8.js → prod/-private-Dg1vsF-H.js} +3 -3
  76. package/dist/unpkg/{prod-deprecated/-private-CDTSpfo8.js.map → prod/-private-Dg1vsF-H.js.map} +1 -1
  77. package/dist/unpkg/prod/-private-Dtj8O5W7.js +22 -0
  78. package/dist/unpkg/prod/{-private-DOd4F2SW.js.map → -private-Dtj8O5W7.js.map} +1 -1
  79. package/dist/unpkg/prod/configure.js +1 -1
  80. package/dist/unpkg/prod/graph/-private.js +1 -1
  81. package/dist/unpkg/prod/index.js +1 -1
  82. package/dist/unpkg/prod/reactive/-private.js +1 -1
  83. package/dist/unpkg/prod/reactive.js +3 -3
  84. package/dist/unpkg/{prod-deprecated/request-BwNFEGCB.js → prod/request-DK7nNaAf.js} +2 -2
  85. package/dist/unpkg/{prod-deprecated/request-BwNFEGCB.js.map → prod/request-DK7nNaAf.js.map} +1 -1
  86. package/dist/unpkg/prod/request.js +1 -1
  87. package/dist/unpkg/prod/signals/-leaked.js +1 -1
  88. package/dist/unpkg/prod/{src-Bvzysa0G.js → src-_zEt-Z_U.js} +5 -5
  89. package/dist/unpkg/prod/{src-Bvzysa0G.js.map → src-_zEt-Z_U.js.map} +1 -1
  90. package/dist/unpkg/prod/store/-private.js +1 -1
  91. package/dist/unpkg/prod/types/-private.js +95 -2
  92. package/dist/unpkg/prod/types/-private.js.map +1 -0
  93. package/dist/unpkg/prod/types/request.js +1 -1
  94. package/dist/unpkg/prod/types/runtime.js +1 -1
  95. package/dist/unpkg/prod/types/symbols.js +1 -1
  96. package/dist/unpkg/{prod/-private-CDTSpfo8.js → prod-deprecated/-private-Dg1vsF-H.js} +3 -3
  97. package/dist/unpkg/{prod/-private-CDTSpfo8.js.map → prod-deprecated/-private-Dg1vsF-H.js.map} +1 -1
  98. package/dist/unpkg/prod-deprecated/{-private-DOd4F2SW.js → -private-Dtj8O5W7.js} +2 -2
  99. package/dist/unpkg/prod-deprecated/{-private-DOd4F2SW.js.map → -private-Dtj8O5W7.js.map} +1 -1
  100. package/dist/unpkg/prod-deprecated/configure.js +1 -1
  101. package/dist/unpkg/prod-deprecated/graph/-private.js +1 -1
  102. package/dist/unpkg/prod-deprecated/index.js +1 -1
  103. package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -1
  104. package/dist/unpkg/prod-deprecated/reactive.js +3 -3
  105. package/dist/unpkg/{prod/request-BwNFEGCB.js → prod-deprecated/request-DK7nNaAf.js} +2 -2
  106. package/dist/unpkg/{prod/request-BwNFEGCB.js.map → prod-deprecated/request-DK7nNaAf.js.map} +1 -1
  107. package/dist/unpkg/prod-deprecated/request.js +1 -1
  108. package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -1
  109. package/dist/unpkg/prod-deprecated/{src-fN7gkcUd.js → src-COK6V0cs.js} +6 -6
  110. package/dist/unpkg/prod-deprecated/{src-fN7gkcUd.js.map → src-COK6V0cs.js.map} +1 -1
  111. package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
  112. package/dist/unpkg/prod-deprecated/types/-private.js +95 -2
  113. package/dist/unpkg/prod-deprecated/types/-private.js.map +1 -0
  114. package/dist/unpkg/prod-deprecated/types/request.js +1 -1
  115. package/dist/unpkg/prod-deprecated/types/runtime.js +1 -1
  116. package/dist/unpkg/prod-deprecated/types/symbols.js +1 -1
  117. package/package.json +6 -6
  118. package/dist/-private-vJakAjAP.js +0 -120
  119. package/dist/-private-vJakAjAP.js.map +0 -1
  120. package/dist/unpkg/dev/-private-qh-3RIJv.js +0 -111
  121. package/dist/unpkg/dev/-private-qh-3RIJv.js.map +0 -1
  122. package/dist/unpkg/dev-deprecated/-private-qh-3RIJv.js +0 -111
  123. package/dist/unpkg/dev-deprecated/-private-qh-3RIJv.js.map +0 -1
  124. package/dist/unpkg/prod/-private-DOd4F2SW.js +0 -22
  125. package/dist/unpkg/prod/-private-PfiN6w09.js +0 -99
  126. package/dist/unpkg/prod/-private-PfiN6w09.js.map +0 -1
  127. package/dist/unpkg/prod-deprecated/-private-PfiN6w09.js +0 -99
  128. package/dist/unpkg/prod-deprecated/-private-PfiN6w09.js.map +0 -1
@@ -1,3 +1,3 @@
1
- import { A as coerceId, C as isResourceKey, F as setRecordIdentifier, I as storeFor, L as assertPrivateCapabilities, M as StoreMap, N as _clearCaches, P as recordIdentifierFor, S as isRequestKey, _ as Store, b as RecordArrayManager, f as log, g as CacheHandler, h as constructResource, j as ensureStringId, k as normalizeModelName, m as createLegacyManyArray, p as logGroup, v as assertPrivateStore, x as fastPush, y as isPrivateStore } from "../src-fN7gkcUd.js";
1
+ import { A as coerceId, C as isResourceKey, F as setRecordIdentifier, I as storeFor, L as assertPrivateCapabilities, M as StoreMap, N as _clearCaches, P as recordIdentifierFor, S as isRequestKey, _ as Store, b as RecordArrayManager, f as log, g as CacheHandler, h as constructResource, j as ensureStringId, k as normalizeModelName, m as createLegacyManyArray, p as logGroup, v as assertPrivateStore, x as fastPush, y as isPrivateStore } from "../src-COK6V0cs.js";
2
2
 
3
3
  export { CacheHandler, RecordArrayManager, Store, StoreMap, _clearCaches, normalizeModelName as _deprecatingNormalize, assertPrivateCapabilities, assertPrivateStore, coerceId, constructResource, createLegacyManyArray, ensureStringId, fastPush, isPrivateStore, isRequestKey, isResourceKey, log, logGroup, recordIdentifierFor, setRecordIdentifier, storeFor };
@@ -1,3 +1,96 @@
1
- import { a as setTransient, i as peekUniversalTransient, n as getOrSetUniversal, o as setUniversalTransient, r as peekTransient, t as getOrSetGlobal } from "../-private-PfiN6w09.js";
1
+ //#region src/types/-private.ts
2
+ const name = "@warp-drive/core";
3
+ const version = "5.10.0-alpha.8";
4
+ const GlobalRef = globalThis;
5
+ const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
6
+ GlobalRef[name] = GlobalRef[name] ?? { __version: version };
7
+ const GlobalSink = GlobalRef[name];
8
+ const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
9
+ if (GlobalSink.__warpDrive_hasOtherCopy) throw new Error("Multiple copies of WarpDrive detected, the application will malfunction.");
10
+ GlobalSink.__warpDrive_hasOtherCopy = true;
11
+ /**
12
+ * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or
13
+ * error class) for `key` so that duplicate copies of this package loaded
14
+ * into the same process observe the same instance instead of each creating
15
+ * their own.
16
+ *
17
+ * In `TESTING` builds this stores/reads `value` from a cache namespaced to
18
+ * this package's name on `globalThis` (see the file-level comments above for
19
+ * why this is necessary). Outside of `TESTING`, only one copy of the package
20
+ * is expected to exist, so this is a no-op that always returns `value`
21
+ * unchanged.
22
+ *
23
+ * The return type lies about symbols being unique to work around the d.ts
24
+ * rollup issue described in `reactive/-private/symbols.ts`.
25
+ *
26
+ * @private
27
+ */
28
+ function getOrSetGlobal(key, value) {
29
+ return value;
30
+ }
31
+ /**
32
+ * Reads back the current value stored for `key` by {@link setTransient}, or
33
+ * `null` if nothing has been stored yet.
34
+ *
35
+ * Unlike {@link getOrSetGlobal}, this always reads through the same
36
+ * package-namespaced cache regardless of the `TESTING` flag, since this is
37
+ * used for genuinely mutable state (not just singleton values) that must
38
+ * stay in sync across any duplicate copies of this package.
39
+ *
40
+ * @private
41
+ */
42
+ function peekTransient(key) {
43
+ const globalKey = `(transient) ${key}`;
44
+ return ModuleScopedCaches[globalKey] ?? null;
45
+ }
46
+ /**
47
+ * Stores `value` for `key`, overwriting whatever was previously stored, so
48
+ * that it can later be read back via {@link peekTransient}.
49
+ *
50
+ * See {@link peekTransient} for details on when/why this cache is shared.
51
+ *
52
+ * @private
53
+ */
54
+ function setTransient(key, value) {
55
+ const globalKey = `(transient) ${key}`;
56
+ return ModuleScopedCaches[globalKey] = value;
57
+ }
58
+ /**
59
+ * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across
60
+ * *all* copies of WarpDrive on `globalThis`, regardless of package name.
61
+ *
62
+ * This is used for keys (e.g. request/promise caches) that must be
63
+ * coordinated even across "mirror" packages published under different
64
+ * names, rather than only across duplicate copies of the same package name.
65
+ *
66
+ * @private
67
+ */
68
+ function getOrSetUniversal(key, value) {
69
+ return value;
70
+ }
71
+ /**
72
+ * Like {@link peekTransient}, but reads from the package-name-independent
73
+ * cache used by {@link getOrSetUniversal}. Always reads through this shared
74
+ * cache regardless of the `TESTING` flag.
75
+ *
76
+ * @private
77
+ */
78
+ function peekUniversalTransient(key) {
79
+ const globalKey = `(transient) ${key}`;
80
+ return UniversalCache[globalKey] ?? null;
81
+ }
82
+ /**
83
+ * Like {@link setTransient}, but writes to the package-name-independent
84
+ * cache used by {@link getOrSetUniversal}, so it can later be read via
85
+ * {@link peekUniversalTransient}.
86
+ *
87
+ * @private
88
+ */
89
+ function setUniversalTransient(key, value) {
90
+ const globalKey = `(transient) ${key}`;
91
+ return UniversalCache[globalKey] = value;
92
+ }
2
93
 
3
- export { getOrSetGlobal, getOrSetUniversal, peekTransient, peekUniversalTransient, setTransient, setUniversalTransient };
94
+ //#endregion
95
+ export { getOrSetGlobal, getOrSetUniversal, peekTransient, peekUniversalTransient, setTransient, setUniversalTransient };
96
+ //# sourceMappingURL=-private.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.js","names":["name","__WARP_DRIVE_PACKAGE_NAME__","version","__WARP_DRIVE_PACKAGE_VERSION__","GlobalRef","globalThis","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","__warpDrive_hasOtherCopy","Error","getOrSetGlobal","key","value","peekTransient","globalKey","setTransient","getOrSetUniversal","peekUniversalTransient","setUniversalTransient"],"sources":["../../../../src/types/-private.ts"],"sourcesContent":["// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\nimport { DEBUG, TESTING } from '@warp-drive/core/build-config/env';\n\n// Substituted at build time (see `tools/internal-config/tsdown/config.js`)\n// with this package's own `name`/`version` from its `package.json`. Reading\n// it via a static import instead would get inlined by tsdown as a synthetic\n// sourcemap source with empty `sourcesContent`, which points outside the\n// published package once the built chunk is re-bundled by a consumer.\ndeclare const __WARP_DRIVE_PACKAGE_NAME__: string;\ndeclare const __WARP_DRIVE_PACKAGE_VERSION__: string;\nconst name = __WARP_DRIVE_PACKAGE_NAME__;\nconst version = __WARP_DRIVE_PACKAGE_VERSION__;\n\ntype UniversalTransientKey =\n // @warp-drive/core/request\n 'REQ_ID';\n\ntype UniversalKey =\n | `(transient) ${UniversalTransientKey}`\n // @warp-drive/core/request\n | 'RequestMap'\n | 'PromiseCache'\n | 'RequestCache'\n // @warp-drive/core-types/request\n | 'SkipCache'\n | 'EnableHydration'\n // @warp-drive/core-types/runtime\n | 'WarpDriveRuntimeConfig';\n\ntype TransientKey =\n // @warp-drive/core/graph\n | 'transactionRef'\n // @warp-drive/core/store\n | 'configuredGenerationMethod'\n | 'configuredUpdateMethod'\n | 'configuredForgetMethod'\n | 'configuredResetMethod'\n | 'configuredKeyInfoMethod'\n | 'signalHooks';\n\ntype GlobalKey =\n | `(transient) ${TransientKey}`\n // @warp-drive/legacy/adapter\n | 'AdapterError'\n | 'InvalidError'\n | 'TimeoutError'\n | 'AbortError'\n | 'UnauthorizedError'\n | 'ForbiddenError'\n | 'NotFoundError'\n | 'ConflictError'\n | 'ServerError'\n // @warp-drive/core/store/reactivity\n | '#{}'\n | '#[]'\n | 'Signals'\n // @warp-drive/legacy LegacySupport\n | 'AvailableShims'\n // @warp-drive/core RecordArrayManager\n | 'FAKE_ARR'\n // @warp-drive/core ReactiveArray\n | '#source'\n | '#update'\n | '#notify'\n | 'IS_COLLECTION'\n // @warp-drive/core RequestCache\n | 'Touching'\n | 'RequestPromise'\n // @warp-drive/legacy/compat FetchManager\n | 'SaveOp'\n // @warp-drive/legacy Model\n | 'LEGACY_SUPPORT'\n | 'LegacySupport'\n // @warp-drive/core/graph\n | 'Graphs'\n // @warp-drive/core/request\n | 'IS_FROZEN'\n | 'IS_CACHE_HANDLER'\n // @warp-drive/utilities\n | 'CONFIG'\n // @warp-drive/core CacheKeyManager\n | 'DEBUG_MAP'\n | 'IDENTIFIERS'\n | 'DOCUMENTS'\n // @warp-drive/core InstanceCache\n | 'RecordCache'\n | 'StoreMap'\n // @warp-drive/core/types/symbols\n | 'Store'\n | '$type'\n | 'TransformName'\n | 'RequestSignature'\n // @warp-drive/core/types/request\n | 'IS_FUTURE'\n | 'DOC'\n // @warp-drive/core NotificationManager\n | 'UnscopedChannel'\n // @warp-drive/core/reactive\n | 'ManagedArrayMap'\n | 'ManagedObjectMap'\n | 'Support'\n | 'SOURCE'\n | 'Destroy'\n | 'Checkout'\n | 'Commit'\n | 'Context';\n\ntype ModuleScopedCaches = Record<GlobalKey, unknown>;\n\nconst GlobalRef = globalThis as unknown as Record<\n string,\n {\n __warpDrive_ModuleScopedCaches?: ModuleScopedCaches;\n __warpDrive_hasOtherCopy?: boolean;\n __version: string;\n }\n> & {\n __warpDrive_universalCache: Record<UniversalKey, unknown>;\n};\nconst UniversalCache = (GlobalRef.__warpDrive_universalCache =\n GlobalRef.__warpDrive_universalCache ?? ({} as Record<UniversalKey, unknown>));\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? { __version: version };\nconst GlobalSink = GlobalRef[name];\n\nif (DEBUG) {\n if (GlobalSink.__version !== version) {\n throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n }\n}\n\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? ({} as ModuleScopedCaches);\nif (TESTING) {\n if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n } else {\n // oxlint-disable-next-line no-console\n console.warn(`\nMultiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import\n in which test assets get their own copy of some v2-addons. This can cause the application to\n malfunction as each copy will maintain its own separate state.`);\n }\n} else {\n if (GlobalSink.__warpDrive_hasOtherCopy) {\n throw new Error('Multiple copies of WarpDrive detected, the application will malfunction.');\n }\n GlobalSink.__warpDrive_hasOtherCopy = true;\n}\n\ntype UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;\ntype UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;\n\n/**\n * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or\n * error class) for `key` so that duplicate copies of this package loaded\n * into the same process observe the same instance instead of each creating\n * their own.\n *\n * In `TESTING` builds this stores/reads `value` from a cache namespaced to\n * this package's name on `globalThis` (see the file-level comments above for\n * why this is necessary). Outside of `TESTING`, only one copy of the package\n * is expected to exist, so this is a no-op that always returns `value`\n * unchanged.\n *\n * The return type lies about symbols being unique to work around the d.ts\n * rollup issue described in `reactive/-private/symbols.ts`.\n *\n * @private\n */\nexport function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = ModuleScopedCaches[key];\n if (existing === undefined) {\n return (ModuleScopedCaches[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Reads back the current value stored for `key` by {@link setTransient}, or\n * `null` if nothing has been stored yet.\n *\n * Unlike {@link getOrSetGlobal}, this always reads through the same\n * package-namespaced cache regardless of the `TESTING` flag, since this is\n * used for genuinely mutable state (not just singleton values) that must\n * stay in sync across any duplicate copies of this package.\n *\n * @private\n */\nexport function peekTransient<T>(key: TransientKey): T | null {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] as T) ?? null;\n}\n\n/**\n * Stores `value` for `key`, overwriting whatever was previously stored, so\n * that it can later be read back via {@link peekTransient}.\n *\n * See {@link peekTransient} for details on when/why this cache is shared.\n *\n * @private\n */\nexport function setTransient<T>(key: TransientKey, value: T): T {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] = value);\n}\n\n/**\n * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across\n * *all* copies of WarpDrive on `globalThis`, regardless of package name.\n *\n * This is used for keys (e.g. request/promise caches) that must be\n * coordinated even across \"mirror\" packages published under different\n * names, rather than only across duplicate copies of the same package name.\n *\n * @private\n */\nexport function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = UniversalCache[key];\n if (existing === undefined) {\n return (UniversalCache[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Like {@link peekTransient}, but reads from the package-name-independent\n * cache used by {@link getOrSetUniversal}. Always reads through this shared\n * cache regardless of the `TESTING` flag.\n *\n * @private\n */\nexport function peekUniversalTransient<T>(key: UniversalTransientKey): T | null {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] as T) ?? null;\n}\n\n/**\n * Like {@link setTransient}, but writes to the package-name-independent\n * cache used by {@link getOrSetUniversal}, so it can later be read via\n * {@link peekUniversalTransient}.\n *\n * @private\n */\nexport function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] = value);\n}\n"],"mappings":";AAWA,MAAMA;AACN,MAAME;AAkGN,MAAME,YAAYC;AAUlB,MAAMC,iBAAkBF,UAAUG,6BAChCH,UAAUG,8BAA+B,CAAC;AAI5CH,UAAUJ,QAAQI,UAAUJ,SAAS,EAAEQ,WAAWN,QAAQ;AAC1D,MAAMO,aAAaL,UAAUJ;AAQ7B,MAAMU,qBAAqBD,WAAWE,kCAAmC,CAAC;AAYxE,IAAIF,WAAWG,0BACb,MAAM,IAAIC,MAAM,0EAA0E;AAE5FJ,WAAWG,2BAA2B;;;;;;;;;;;;;;;;;;AAuBxC,SAAgBE,eAAuCC,KAAQC,OAAgC;CAS3F,OAAOA;AAEX;;;;;;;;;;;;AAaA,SAAgBC,cAAiBF,KAA6B;CAC5D,MAAMG,YAA2C,eAAeH;CAChE,OAAQL,mBAAmBQ,cAAoB;AACjD;;;;;;;;;AAUA,SAAgBC,aAAgBJ,KAAmBC,OAAa;CAC9D,MAAME,YAA2C,eAAeH;CAChE,OAAQL,mBAAmBQ,aAAaF;AAC1C;;;;;;;;;;;AAYA,SAAgBI,kBAA6CL,KAAQC,OAAgC;CASjG,OAAOA;AAEX;;;;;;;;AASA,SAAgBK,uBAA0BN,KAAsC;CAC9E,MAAMG,YAAoD,eAAeH;CACzE,OAAQT,eAAeY,cAAoB;AAC7C;;;;;;;;AASA,SAAgBI,sBAAyBP,KAA4BC,OAAa;CAChF,MAAME,YAAoD,eAAeH;CACzE,OAAQT,eAAeY,aAAaF;AACtC"}
@@ -1,4 +1,4 @@
1
- import { n as getOrSetUniversal, t as getOrSetGlobal } from "../-private-PfiN6w09.js";
1
+ import { getOrSetGlobal, getOrSetUniversal } from "./-private.js";
2
2
 
3
3
  //#region src/types/request.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { n as getOrSetUniversal } from "../-private-PfiN6w09.js";
1
+ import { getOrSetUniversal } from "./-private.js";
2
2
 
3
3
  //#region src/types/runtime.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as getOrSetGlobal } from "../-private-PfiN6w09.js";
1
+ import { getOrSetGlobal } from "./-private.js";
2
2
 
3
3
  //#region src/types/symbols.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive/core",
3
- "version": "5.10.0-alpha.7",
3
+ "version": "5.10.0-alpha.8",
4
4
  "description": "Core package for WarpDrive | All the Universal Basics",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -43,19 +43,19 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@embroider/macros": "^1.20.7",
47
- "@warp-drive/build-config": "5.10.0-alpha.7"
46
+ "@embroider/macros": "^1.21.1",
47
+ "@warp-drive/build-config": "5.10.0-alpha.8"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@babel/core": "^7.29.7",
51
51
  "@babel/plugin-transform-typescript": "^7.29.7",
52
52
  "@babel/preset-typescript": "^7.29.7",
53
- "@warp-drive/internal-config": "5.10.0-alpha.7",
53
+ "@warp-drive/internal-config": "5.10.0-alpha.8",
54
54
  "decorator-transforms": "^2.4.0",
55
- "ember-source": "~7.2.0",
55
+ "ember-source": "~7.3.0",
56
56
  "expect-type": "^1.4.0",
57
57
  "tsdown": "^0.23.0",
58
- "typescript-7": "npm:typescript@7.1.0-dev.20260907.1"
58
+ "typescript-7": "npm:typescript@7.1.0-dev.20260915.1"
59
59
  },
60
60
  "ember-addon": {
61
61
  "main": "addon-main.cjs",
@@ -1,120 +0,0 @@
1
- import { getGlobalConfig, macroCondition } from "@embroider/macros";
2
-
3
- //#region package.json
4
- var name = "@warp-drive/core";
5
- var version = "5.10.0-alpha.7";
6
-
7
- //#endregion
8
- //#region src/types/-private.ts
9
- const GlobalRef = globalThis;
10
- const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
11
- GlobalRef[name] = GlobalRef[name] ?? { __version: version };
12
- const GlobalSink = GlobalRef[name];
13
- if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
14
- if (GlobalSink.__version !== version) throw new Error("Multiple versions of WarpDrive detected, the application will malfunction.");
15
- }
16
- const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
17
- if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
18
- if (!GlobalSink.__warpDrive_ModuleScopedCaches) GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;
19
- else console.warn(`
20
- Multiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import
21
- in which test assets get their own copy of some v2-addons. This can cause the application to
22
- malfunction as each copy will maintain its own separate state.`);
23
- } else {
24
- if (GlobalSink.__warpDrive_hasOtherCopy) throw new Error("Multiple copies of WarpDrive detected, the application will malfunction.");
25
- GlobalSink.__warpDrive_hasOtherCopy = true;
26
- }
27
- /**
28
- * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or
29
- * error class) for `key` so that duplicate copies of this package loaded
30
- * into the same process observe the same instance instead of each creating
31
- * their own.
32
- *
33
- * In `TESTING` builds this stores/reads `value` from a cache namespaced to
34
- * this package's name on `globalThis` (see the file-level comments above for
35
- * why this is necessary). Outside of `TESTING`, only one copy of the package
36
- * is expected to exist, so this is a no-op that always returns `value`
37
- * unchanged.
38
- *
39
- * The return type lies about symbols being unique to work around the d.ts
40
- * rollup issue described in `reactive/-private/symbols.ts`.
41
- *
42
- * @private
43
- */
44
- function getOrSetGlobal(key, value) {
45
- if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
46
- const existing = ModuleScopedCaches[key];
47
- if (existing === void 0) return ModuleScopedCaches[key] = value;
48
- else return existing;
49
- } else return value;
50
- }
51
- /**
52
- * Reads back the current value stored for `key` by {@link setTransient}, or
53
- * `null` if nothing has been stored yet.
54
- *
55
- * Unlike {@link getOrSetGlobal}, this always reads through the same
56
- * package-namespaced cache regardless of the `TESTING` flag, since this is
57
- * used for genuinely mutable state (not just singleton values) that must
58
- * stay in sync across any duplicate copies of this package.
59
- *
60
- * @private
61
- */
62
- function peekTransient(key) {
63
- const globalKey = `(transient) ${key}`;
64
- return ModuleScopedCaches[globalKey] ?? null;
65
- }
66
- /**
67
- * Stores `value` for `key`, overwriting whatever was previously stored, so
68
- * that it can later be read back via {@link peekTransient}.
69
- *
70
- * See {@link peekTransient} for details on when/why this cache is shared.
71
- *
72
- * @private
73
- */
74
- function setTransient(key, value) {
75
- const globalKey = `(transient) ${key}`;
76
- return ModuleScopedCaches[globalKey] = value;
77
- }
78
- /**
79
- * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across
80
- * *all* copies of WarpDrive on `globalThis`, regardless of package name.
81
- *
82
- * This is used for keys (e.g. request/promise caches) that must be
83
- * coordinated even across "mirror" packages published under different
84
- * names, rather than only across duplicate copies of the same package name.
85
- *
86
- * @private
87
- */
88
- function getOrSetUniversal(key, value) {
89
- if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
90
- const existing = UniversalCache[key];
91
- if (existing === void 0) return UniversalCache[key] = value;
92
- else return existing;
93
- } else return value;
94
- }
95
- /**
96
- * Like {@link peekTransient}, but reads from the package-name-independent
97
- * cache used by {@link getOrSetUniversal}. Always reads through this shared
98
- * cache regardless of the `TESTING` flag.
99
- *
100
- * @private
101
- */
102
- function peekUniversalTransient(key) {
103
- const globalKey = `(transient) ${key}`;
104
- return UniversalCache[globalKey] ?? null;
105
- }
106
- /**
107
- * Like {@link setTransient}, but writes to the package-name-independent
108
- * cache used by {@link getOrSetUniversal}, so it can later be read via
109
- * {@link peekUniversalTransient}.
110
- *
111
- * @private
112
- */
113
- function setUniversalTransient(key, value) {
114
- const globalKey = `(transient) ${key}`;
115
- return UniversalCache[globalKey] = value;
116
- }
117
-
118
- //#endregion
119
- export { setTransient as a, peekUniversalTransient as i, getOrSetUniversal as n, setUniversalTransient as o, peekTransient as r, getOrSetGlobal as t };
120
- //# sourceMappingURL=-private-vJakAjAP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"-private-vJakAjAP.js","names":["name","version","getGlobalConfig","macroCondition","GlobalRef","globalThis","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","WarpDrive","env","DEBUG","Error","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","TESTING","console","warn","__warpDrive_hasOtherCopy","getOrSetGlobal","key","value","existing","undefined","peekTransient","globalKey","setTransient","getOrSetUniversal","peekUniversalTransient","setUniversalTransient"],"sources":["../package.json","../src/types/-private.ts"],"sourcesContent":["","// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\nimport { DEBUG, TESTING } from '@warp-drive/core/build-config/env';\n\nimport { name, version } from '../../package.json';\n\ntype UniversalTransientKey =\n // @warp-drive/core/request\n 'REQ_ID';\n\ntype UniversalKey =\n | `(transient) ${UniversalTransientKey}`\n // @warp-drive/core/request\n | 'RequestMap'\n | 'PromiseCache'\n | 'RequestCache'\n // @warp-drive/core-types/request\n | 'SkipCache'\n | 'EnableHydration'\n // @warp-drive/core-types/runtime\n | 'WarpDriveRuntimeConfig';\n\ntype TransientKey =\n // @warp-drive/core/graph\n | 'transactionRef'\n // @warp-drive/core/store\n | 'configuredGenerationMethod'\n | 'configuredUpdateMethod'\n | 'configuredForgetMethod'\n | 'configuredResetMethod'\n | 'configuredKeyInfoMethod'\n | 'signalHooks';\n\ntype GlobalKey =\n | `(transient) ${TransientKey}`\n // @warp-drive/legacy/adapter\n | 'AdapterError'\n | 'InvalidError'\n | 'TimeoutError'\n | 'AbortError'\n | 'UnauthorizedError'\n | 'ForbiddenError'\n | 'NotFoundError'\n | 'ConflictError'\n | 'ServerError'\n // @warp-drive/core/store/reactivity\n | '#{}'\n | '#[]'\n | 'Signals'\n // @warp-drive/legacy LegacySupport\n | 'AvailableShims'\n // @warp-drive/core RecordArrayManager\n | 'FAKE_ARR'\n // @warp-drive/core ReactiveArray\n | '#source'\n | '#update'\n | '#notify'\n | 'IS_COLLECTION'\n // @warp-drive/core RequestCache\n | 'Touching'\n | 'RequestPromise'\n // @warp-drive/legacy/compat FetchManager\n | 'SaveOp'\n // @warp-drive/legacy Model\n | 'LEGACY_SUPPORT'\n | 'LegacySupport'\n // @warp-drive/core/graph\n | 'Graphs'\n // @warp-drive/core/request\n | 'IS_FROZEN'\n | 'IS_CACHE_HANDLER'\n // @warp-drive/utilities\n | 'CONFIG'\n // @warp-drive/core CacheKeyManager\n | 'DEBUG_MAP'\n | 'IDENTIFIERS'\n | 'DOCUMENTS'\n // @warp-drive/core InstanceCache\n | 'RecordCache'\n | 'StoreMap'\n // @warp-drive/core/types/symbols\n | 'Store'\n | '$type'\n | 'TransformName'\n | 'RequestSignature'\n // @warp-drive/core/types/request\n | 'IS_FUTURE'\n | 'DOC'\n // @warp-drive/core NotificationManager\n | 'UnscopedChannel'\n // @warp-drive/core/reactive\n | 'ManagedArrayMap'\n | 'ManagedObjectMap'\n | 'Support'\n | 'SOURCE'\n | 'Destroy'\n | 'Checkout'\n | 'Commit'\n | 'Context';\n\ntype ModuleScopedCaches = Record<GlobalKey, unknown>;\n\nconst GlobalRef = globalThis as unknown as Record<\n string,\n {\n __warpDrive_ModuleScopedCaches?: ModuleScopedCaches;\n __warpDrive_hasOtherCopy?: boolean;\n __version: string;\n }\n> & {\n __warpDrive_universalCache: Record<UniversalKey, unknown>;\n};\nconst UniversalCache = (GlobalRef.__warpDrive_universalCache =\n GlobalRef.__warpDrive_universalCache ?? ({} as Record<UniversalKey, unknown>));\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? { __version: version };\nconst GlobalSink = GlobalRef[name];\n\nif (DEBUG) {\n if (GlobalSink.__version !== version) {\n throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n }\n}\n\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? ({} as ModuleScopedCaches);\nif (TESTING) {\n if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n } else {\n // oxlint-disable-next-line no-console\n console.warn(`\nMultiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import\n in which test assets get their own copy of some v2-addons. This can cause the application to\n malfunction as each copy will maintain its own separate state.`);\n }\n} else {\n if (GlobalSink.__warpDrive_hasOtherCopy) {\n throw new Error('Multiple copies of WarpDrive detected, the application will malfunction.');\n }\n GlobalSink.__warpDrive_hasOtherCopy = true;\n}\n\ntype UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;\ntype UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;\n\n/**\n * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or\n * error class) for `key` so that duplicate copies of this package loaded\n * into the same process observe the same instance instead of each creating\n * their own.\n *\n * In `TESTING` builds this stores/reads `value` from a cache namespaced to\n * this package's name on `globalThis` (see the file-level comments above for\n * why this is necessary). Outside of `TESTING`, only one copy of the package\n * is expected to exist, so this is a no-op that always returns `value`\n * unchanged.\n *\n * The return type lies about symbols being unique to work around the d.ts\n * rollup issue described in `reactive/-private/symbols.ts`.\n *\n * @private\n */\nexport function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = ModuleScopedCaches[key];\n if (existing === undefined) {\n return (ModuleScopedCaches[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Reads back the current value stored for `key` by {@link setTransient}, or\n * `null` if nothing has been stored yet.\n *\n * Unlike {@link getOrSetGlobal}, this always reads through the same\n * package-namespaced cache regardless of the `TESTING` flag, since this is\n * used for genuinely mutable state (not just singleton values) that must\n * stay in sync across any duplicate copies of this package.\n *\n * @private\n */\nexport function peekTransient<T>(key: TransientKey): T | null {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] as T) ?? null;\n}\n\n/**\n * Stores `value` for `key`, overwriting whatever was previously stored, so\n * that it can later be read back via {@link peekTransient}.\n *\n * See {@link peekTransient} for details on when/why this cache is shared.\n *\n * @private\n */\nexport function setTransient<T>(key: TransientKey, value: T): T {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] = value);\n}\n\n/**\n * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across\n * *all* copies of WarpDrive on `globalThis`, regardless of package name.\n *\n * This is used for keys (e.g. request/promise caches) that must be\n * coordinated even across \"mirror\" packages published under different\n * names, rather than only across duplicate copies of the same package name.\n *\n * @private\n */\nexport function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = UniversalCache[key];\n if (existing === undefined) {\n return (UniversalCache[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Like {@link peekTransient}, but reads from the package-name-independent\n * cache used by {@link getOrSetUniversal}. Always reads through this shared\n * cache regardless of the `TESTING` flag.\n *\n * @private\n */\nexport function peekUniversalTransient<T>(key: UniversalTransientKey): T | null {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] as T) ?? null;\n}\n\n/**\n * Like {@link setTransient}, but writes to the package-name-independent\n * cache used by {@link getOrSetUniversal}, so it can later be read via\n * {@link peekUniversalTransient}.\n *\n * @private\n */\nexport function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] = value);\n}\n"],"mappings":";;;;;;;;ACsGA,MAAMI,YAAYC;AAUlB,MAAMC,iBAAkBF,UAAUG,6BAChCH,UAAUG,8BAA+B,CAAC;AAI5CH,UAAUJ,QAAQI,UAAUJ,SAAS,EAAEQ,WAAWP,QAAQ;AAC1D,MAAMQ,aAAaL,UAAUJ;AAE7B,IAAAG,eAAAD,gBAAA,CAAA,CAAAQ,UAAAC,IAAAC,KAAA,GACE;KAAIH,WAAWD,cAAcP,SAC3B,MAAM,IAAIY,MAAM,4EAA4E;AAC9F;AAGF,MAAMC,qBAAqBL,WAAWM,kCAAmC,CAAC;AAC1E,IAAAZ,eAAAD,gBAAA,CAAA,CAAAQ,UAAAC,IAAAK,OAAA,GAAa;CACX,IAAI,CAACP,WAAWM,gCACdN,WAAWM,iCAAiCD;MAG5CG,QAAQC,KAAK;;;iEAGgD;AAEjE,OAAO;CACL,IAAIT,WAAWU,0BACb,MAAM,IAAIN,MAAM,0EAA0E;CAE5FJ,WAAWU,2BAA2B;AACxC;;;;;;;;;;;;;;;;;;AAsBA,SAAgBC,eAAuCC,KAAQC,OAAgC;CAC7F,IAAAnB,eAAAD,gBAAA,CAAA,CAAAQ,UAAAC,IAAAK,OAAA,GAAa;EACX,MAAMO,WAAWT,mBAAmBO;EACpC,IAAIE,aAAaC,QACf,OAAQV,mBAAmBO,OAAOC;OAElC,OAAOC;CAEX,OACE,OAAOD;AAEX;;;;;;;;;;;;AAaA,SAAgBG,cAAiBJ,KAA6B;CAC5D,MAAMK,YAA2C,eAAeL;CAChE,OAAQP,mBAAmBY,cAAoB;AACjD;;;;;;;;;AAUA,SAAgBC,aAAgBN,KAAmBC,OAAa;CAC9D,MAAMI,YAA2C,eAAeL;CAChE,OAAQP,mBAAmBY,aAAaJ;AAC1C;;;;;;;;;;;AAYA,SAAgBM,kBAA6CP,KAAQC,OAAgC;CACnG,IAAAnB,eAAAD,gBAAA,CAAA,CAAAQ,UAAAC,IAAAK,OAAA,GAAa;EACX,MAAMO,WAAWjB,eAAee;EAChC,IAAIE,aAAaC,QACf,OAAQlB,eAAee,OAAOC;OAE9B,OAAOC;CAEX,OACE,OAAOD;AAEX;;;;;;;;AASA,SAAgBO,uBAA0BR,KAAsC;CAC9E,MAAMK,YAAoD,eAAeL;CACzE,OAAQf,eAAeoB,cAAoB;AAC7C;;;;;;;;AASA,SAAgBI,sBAAyBT,KAA4BC,OAAa;CAChF,MAAMI,YAAoD,eAAeL;CACzE,OAAQf,eAAeoB,aAAaJ;AACtC"}
@@ -1,111 +0,0 @@
1
- //#region package.json
2
- var name = "@warp-drive/core";
3
- var version = "5.10.0-alpha.7";
4
-
5
- //#endregion
6
- //#region src/types/-private.ts
7
- const GlobalRef = globalThis;
8
- const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
9
- GlobalRef[name] = GlobalRef[name] ?? { __version: version };
10
- const GlobalSink = GlobalRef[name];
11
- if (GlobalSink.__version !== version) throw new Error("Multiple versions of WarpDrive detected, the application will malfunction.");
12
- const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
13
- if (!GlobalSink.__warpDrive_ModuleScopedCaches) GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;
14
- else console.warn(`
15
- Multiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import
16
- in which test assets get their own copy of some v2-addons. This can cause the application to
17
- malfunction as each copy will maintain its own separate state.`);
18
- /**
19
- * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or
20
- * error class) for `key` so that duplicate copies of this package loaded
21
- * into the same process observe the same instance instead of each creating
22
- * their own.
23
- *
24
- * In `TESTING` builds this stores/reads `value` from a cache namespaced to
25
- * this package's name on `globalThis` (see the file-level comments above for
26
- * why this is necessary). Outside of `TESTING`, only one copy of the package
27
- * is expected to exist, so this is a no-op that always returns `value`
28
- * unchanged.
29
- *
30
- * The return type lies about symbols being unique to work around the d.ts
31
- * rollup issue described in `reactive/-private/symbols.ts`.
32
- *
33
- * @private
34
- */
35
- function getOrSetGlobal(key, value) {
36
- {
37
- const existing = ModuleScopedCaches[key];
38
- if (existing === void 0) return ModuleScopedCaches[key] = value;
39
- else return existing;
40
- }
41
- }
42
- /**
43
- * Reads back the current value stored for `key` by {@link setTransient}, or
44
- * `null` if nothing has been stored yet.
45
- *
46
- * Unlike {@link getOrSetGlobal}, this always reads through the same
47
- * package-namespaced cache regardless of the `TESTING` flag, since this is
48
- * used for genuinely mutable state (not just singleton values) that must
49
- * stay in sync across any duplicate copies of this package.
50
- *
51
- * @private
52
- */
53
- function peekTransient(key) {
54
- const globalKey = `(transient) ${key}`;
55
- return ModuleScopedCaches[globalKey] ?? null;
56
- }
57
- /**
58
- * Stores `value` for `key`, overwriting whatever was previously stored, so
59
- * that it can later be read back via {@link peekTransient}.
60
- *
61
- * See {@link peekTransient} for details on when/why this cache is shared.
62
- *
63
- * @private
64
- */
65
- function setTransient(key, value) {
66
- const globalKey = `(transient) ${key}`;
67
- return ModuleScopedCaches[globalKey] = value;
68
- }
69
- /**
70
- * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across
71
- * *all* copies of WarpDrive on `globalThis`, regardless of package name.
72
- *
73
- * This is used for keys (e.g. request/promise caches) that must be
74
- * coordinated even across "mirror" packages published under different
75
- * names, rather than only across duplicate copies of the same package name.
76
- *
77
- * @private
78
- */
79
- function getOrSetUniversal(key, value) {
80
- {
81
- const existing = UniversalCache[key];
82
- if (existing === void 0) return UniversalCache[key] = value;
83
- else return existing;
84
- }
85
- }
86
- /**
87
- * Like {@link peekTransient}, but reads from the package-name-independent
88
- * cache used by {@link getOrSetUniversal}. Always reads through this shared
89
- * cache regardless of the `TESTING` flag.
90
- *
91
- * @private
92
- */
93
- function peekUniversalTransient(key) {
94
- const globalKey = `(transient) ${key}`;
95
- return UniversalCache[globalKey] ?? null;
96
- }
97
- /**
98
- * Like {@link setTransient}, but writes to the package-name-independent
99
- * cache used by {@link getOrSetUniversal}, so it can later be read via
100
- * {@link peekUniversalTransient}.
101
- *
102
- * @private
103
- */
104
- function setUniversalTransient(key, value) {
105
- const globalKey = `(transient) ${key}`;
106
- return UniversalCache[globalKey] = value;
107
- }
108
-
109
- //#endregion
110
- export { setTransient as a, peekUniversalTransient as i, getOrSetUniversal as n, setUniversalTransient as o, peekTransient as r, getOrSetGlobal as t };
111
- //# sourceMappingURL=-private-qh-3RIJv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"-private-qh-3RIJv.js","names":["name","version","GlobalRef","globalThis","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","Error","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","console","warn","getOrSetGlobal","key","value","existing","undefined","peekTransient","globalKey","setTransient","getOrSetUniversal","peekUniversalTransient","setUniversalTransient"],"sources":["../../../package.json","../../../src/types/-private.ts"],"sourcesContent":["","// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\nimport { DEBUG, TESTING } from '@warp-drive/core/build-config/env';\n\nimport { name, version } from '../../package.json';\n\ntype UniversalTransientKey =\n // @warp-drive/core/request\n 'REQ_ID';\n\ntype UniversalKey =\n | `(transient) ${UniversalTransientKey}`\n // @warp-drive/core/request\n | 'RequestMap'\n | 'PromiseCache'\n | 'RequestCache'\n // @warp-drive/core-types/request\n | 'SkipCache'\n | 'EnableHydration'\n // @warp-drive/core-types/runtime\n | 'WarpDriveRuntimeConfig';\n\ntype TransientKey =\n // @warp-drive/core/graph\n | 'transactionRef'\n // @warp-drive/core/store\n | 'configuredGenerationMethod'\n | 'configuredUpdateMethod'\n | 'configuredForgetMethod'\n | 'configuredResetMethod'\n | 'configuredKeyInfoMethod'\n | 'signalHooks';\n\ntype GlobalKey =\n | `(transient) ${TransientKey}`\n // @warp-drive/legacy/adapter\n | 'AdapterError'\n | 'InvalidError'\n | 'TimeoutError'\n | 'AbortError'\n | 'UnauthorizedError'\n | 'ForbiddenError'\n | 'NotFoundError'\n | 'ConflictError'\n | 'ServerError'\n // @warp-drive/core/store/reactivity\n | '#{}'\n | '#[]'\n | 'Signals'\n // @warp-drive/legacy LegacySupport\n | 'AvailableShims'\n // @warp-drive/core RecordArrayManager\n | 'FAKE_ARR'\n // @warp-drive/core ReactiveArray\n | '#source'\n | '#update'\n | '#notify'\n | 'IS_COLLECTION'\n // @warp-drive/core RequestCache\n | 'Touching'\n | 'RequestPromise'\n // @warp-drive/legacy/compat FetchManager\n | 'SaveOp'\n // @warp-drive/legacy Model\n | 'LEGACY_SUPPORT'\n | 'LegacySupport'\n // @warp-drive/core/graph\n | 'Graphs'\n // @warp-drive/core/request\n | 'IS_FROZEN'\n | 'IS_CACHE_HANDLER'\n // @warp-drive/utilities\n | 'CONFIG'\n // @warp-drive/core CacheKeyManager\n | 'DEBUG_MAP'\n | 'IDENTIFIERS'\n | 'DOCUMENTS'\n // @warp-drive/core InstanceCache\n | 'RecordCache'\n | 'StoreMap'\n // @warp-drive/core/types/symbols\n | 'Store'\n | '$type'\n | 'TransformName'\n | 'RequestSignature'\n // @warp-drive/core/types/request\n | 'IS_FUTURE'\n | 'DOC'\n // @warp-drive/core NotificationManager\n | 'UnscopedChannel'\n // @warp-drive/core/reactive\n | 'ManagedArrayMap'\n | 'ManagedObjectMap'\n | 'Support'\n | 'SOURCE'\n | 'Destroy'\n | 'Checkout'\n | 'Commit'\n | 'Context';\n\ntype ModuleScopedCaches = Record<GlobalKey, unknown>;\n\nconst GlobalRef = globalThis as unknown as Record<\n string,\n {\n __warpDrive_ModuleScopedCaches?: ModuleScopedCaches;\n __warpDrive_hasOtherCopy?: boolean;\n __version: string;\n }\n> & {\n __warpDrive_universalCache: Record<UniversalKey, unknown>;\n};\nconst UniversalCache = (GlobalRef.__warpDrive_universalCache =\n GlobalRef.__warpDrive_universalCache ?? ({} as Record<UniversalKey, unknown>));\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? { __version: version };\nconst GlobalSink = GlobalRef[name];\n\nif (DEBUG) {\n if (GlobalSink.__version !== version) {\n throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n }\n}\n\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? ({} as ModuleScopedCaches);\nif (TESTING) {\n if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n } else {\n // oxlint-disable-next-line no-console\n console.warn(`\nMultiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import\n in which test assets get their own copy of some v2-addons. This can cause the application to\n malfunction as each copy will maintain its own separate state.`);\n }\n} else {\n if (GlobalSink.__warpDrive_hasOtherCopy) {\n throw new Error('Multiple copies of WarpDrive detected, the application will malfunction.');\n }\n GlobalSink.__warpDrive_hasOtherCopy = true;\n}\n\ntype UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;\ntype UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;\n\n/**\n * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or\n * error class) for `key` so that duplicate copies of this package loaded\n * into the same process observe the same instance instead of each creating\n * their own.\n *\n * In `TESTING` builds this stores/reads `value` from a cache namespaced to\n * this package's name on `globalThis` (see the file-level comments above for\n * why this is necessary). Outside of `TESTING`, only one copy of the package\n * is expected to exist, so this is a no-op that always returns `value`\n * unchanged.\n *\n * The return type lies about symbols being unique to work around the d.ts\n * rollup issue described in `reactive/-private/symbols.ts`.\n *\n * @private\n */\nexport function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = ModuleScopedCaches[key];\n if (existing === undefined) {\n return (ModuleScopedCaches[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Reads back the current value stored for `key` by {@link setTransient}, or\n * `null` if nothing has been stored yet.\n *\n * Unlike {@link getOrSetGlobal}, this always reads through the same\n * package-namespaced cache regardless of the `TESTING` flag, since this is\n * used for genuinely mutable state (not just singleton values) that must\n * stay in sync across any duplicate copies of this package.\n *\n * @private\n */\nexport function peekTransient<T>(key: TransientKey): T | null {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] as T) ?? null;\n}\n\n/**\n * Stores `value` for `key`, overwriting whatever was previously stored, so\n * that it can later be read back via {@link peekTransient}.\n *\n * See {@link peekTransient} for details on when/why this cache is shared.\n *\n * @private\n */\nexport function setTransient<T>(key: TransientKey, value: T): T {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] = value);\n}\n\n/**\n * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across\n * *all* copies of WarpDrive on `globalThis`, regardless of package name.\n *\n * This is used for keys (e.g. request/promise caches) that must be\n * coordinated even across \"mirror\" packages published under different\n * names, rather than only across duplicate copies of the same package name.\n *\n * @private\n */\nexport function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = UniversalCache[key];\n if (existing === undefined) {\n return (UniversalCache[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Like {@link peekTransient}, but reads from the package-name-independent\n * cache used by {@link getOrSetUniversal}. Always reads through this shared\n * cache regardless of the `TESTING` flag.\n *\n * @private\n */\nexport function peekUniversalTransient<T>(key: UniversalTransientKey): T | null {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] as T) ?? null;\n}\n\n/**\n * Like {@link setTransient}, but writes to the package-name-independent\n * cache used by {@link getOrSetUniversal}, so it can later be read via\n * {@link peekUniversalTransient}.\n *\n * @private\n */\nexport function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] = value);\n}\n"],"mappings":";;;;;;ACsGA,MAAME,YAAYC;AAUlB,MAAMC,iBAAkBF,UAAUG,6BAChCH,UAAUG,8BAA+B,CAAC;AAI5CH,UAAUF,QAAQE,UAAUF,SAAS,EAAEM,WAAWL,QAAQ;AAC1D,MAAMM,aAAaL,UAAUF;AAG3B,IAAIO,WAAWD,cAAcL,SAC3B,MAAM,IAAIO,MAAM,4EAA4E;AAIhG,MAAMC,qBAAqBF,WAAWG,kCAAmC,CAAC;AAExE,IAAI,CAACH,WAAWG,gCACdH,WAAWG,iCAAiCD;KAG5CE,QAAQC,KAAK;;;iEAGgD;;;;;;;;;;;;;;;;;;AA6BjE,SAAgBC,eAAuCC,KAAQC,OAAgC;CAChF;EACX,MAAMC,WAAWP,mBAAmBK;EACpC,IAAIE,aAAaC,QACf,OAAQR,mBAAmBK,OAAOC;OAElC,OAAOC;CAEX;AAGF;;;;;;;;;;;;AAaA,SAAgBE,cAAiBJ,KAA6B;CAC5D,MAAMK,YAA2C,eAAeL;CAChE,OAAQL,mBAAmBU,cAAoB;AACjD;;;;;;;;;AAUA,SAAgBC,aAAgBN,KAAmBC,OAAa;CAC9D,MAAMI,YAA2C,eAAeL;CAChE,OAAQL,mBAAmBU,aAAaJ;AAC1C;;;;;;;;;;;AAYA,SAAgBM,kBAA6CP,KAAQC,OAAgC;CACtF;EACX,MAAMC,WAAWZ,eAAeU;EAChC,IAAIE,aAAaC,QACf,OAAQb,eAAeU,OAAOC;OAE9B,OAAOC;CAEX;AAGF;;;;;;;;AASA,SAAgBM,uBAA0BR,KAAsC;CAC9E,MAAMK,YAAoD,eAAeL;CACzE,OAAQV,eAAee,cAAoB;AAC7C;;;;;;;;AASA,SAAgBI,sBAAyBT,KAA4BC,OAAa;CAChF,MAAMI,YAAoD,eAAeL;CACzE,OAAQV,eAAee,aAAaJ;AACtC"}
@@ -1,111 +0,0 @@
1
- //#region package.json
2
- var name = "@warp-drive/core";
3
- var version = "5.10.0-alpha.7";
4
-
5
- //#endregion
6
- //#region src/types/-private.ts
7
- const GlobalRef = globalThis;
8
- const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
9
- GlobalRef[name] = GlobalRef[name] ?? { __version: version };
10
- const GlobalSink = GlobalRef[name];
11
- if (GlobalSink.__version !== version) throw new Error("Multiple versions of WarpDrive detected, the application will malfunction.");
12
- const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
13
- if (!GlobalSink.__warpDrive_ModuleScopedCaches) GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;
14
- else console.warn(`
15
- Multiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import
16
- in which test assets get their own copy of some v2-addons. This can cause the application to
17
- malfunction as each copy will maintain its own separate state.`);
18
- /**
19
- * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or
20
- * error class) for `key` so that duplicate copies of this package loaded
21
- * into the same process observe the same instance instead of each creating
22
- * their own.
23
- *
24
- * In `TESTING` builds this stores/reads `value` from a cache namespaced to
25
- * this package's name on `globalThis` (see the file-level comments above for
26
- * why this is necessary). Outside of `TESTING`, only one copy of the package
27
- * is expected to exist, so this is a no-op that always returns `value`
28
- * unchanged.
29
- *
30
- * The return type lies about symbols being unique to work around the d.ts
31
- * rollup issue described in `reactive/-private/symbols.ts`.
32
- *
33
- * @private
34
- */
35
- function getOrSetGlobal(key, value) {
36
- {
37
- const existing = ModuleScopedCaches[key];
38
- if (existing === void 0) return ModuleScopedCaches[key] = value;
39
- else return existing;
40
- }
41
- }
42
- /**
43
- * Reads back the current value stored for `key` by {@link setTransient}, or
44
- * `null` if nothing has been stored yet.
45
- *
46
- * Unlike {@link getOrSetGlobal}, this always reads through the same
47
- * package-namespaced cache regardless of the `TESTING` flag, since this is
48
- * used for genuinely mutable state (not just singleton values) that must
49
- * stay in sync across any duplicate copies of this package.
50
- *
51
- * @private
52
- */
53
- function peekTransient(key) {
54
- const globalKey = `(transient) ${key}`;
55
- return ModuleScopedCaches[globalKey] ?? null;
56
- }
57
- /**
58
- * Stores `value` for `key`, overwriting whatever was previously stored, so
59
- * that it can later be read back via {@link peekTransient}.
60
- *
61
- * See {@link peekTransient} for details on when/why this cache is shared.
62
- *
63
- * @private
64
- */
65
- function setTransient(key, value) {
66
- const globalKey = `(transient) ${key}`;
67
- return ModuleScopedCaches[globalKey] = value;
68
- }
69
- /**
70
- * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across
71
- * *all* copies of WarpDrive on `globalThis`, regardless of package name.
72
- *
73
- * This is used for keys (e.g. request/promise caches) that must be
74
- * coordinated even across "mirror" packages published under different
75
- * names, rather than only across duplicate copies of the same package name.
76
- *
77
- * @private
78
- */
79
- function getOrSetUniversal(key, value) {
80
- {
81
- const existing = UniversalCache[key];
82
- if (existing === void 0) return UniversalCache[key] = value;
83
- else return existing;
84
- }
85
- }
86
- /**
87
- * Like {@link peekTransient}, but reads from the package-name-independent
88
- * cache used by {@link getOrSetUniversal}. Always reads through this shared
89
- * cache regardless of the `TESTING` flag.
90
- *
91
- * @private
92
- */
93
- function peekUniversalTransient(key) {
94
- const globalKey = `(transient) ${key}`;
95
- return UniversalCache[globalKey] ?? null;
96
- }
97
- /**
98
- * Like {@link setTransient}, but writes to the package-name-independent
99
- * cache used by {@link getOrSetUniversal}, so it can later be read via
100
- * {@link peekUniversalTransient}.
101
- *
102
- * @private
103
- */
104
- function setUniversalTransient(key, value) {
105
- const globalKey = `(transient) ${key}`;
106
- return UniversalCache[globalKey] = value;
107
- }
108
-
109
- //#endregion
110
- export { setTransient as a, peekUniversalTransient as i, getOrSetUniversal as n, setUniversalTransient as o, peekTransient as r, getOrSetGlobal as t };
111
- //# sourceMappingURL=-private-qh-3RIJv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"-private-qh-3RIJv.js","names":["name","version","GlobalRef","globalThis","UniversalCache","__warpDrive_universalCache","__version","GlobalSink","Error","ModuleScopedCaches","__warpDrive_ModuleScopedCaches","console","warn","getOrSetGlobal","key","value","existing","undefined","peekTransient","globalKey","setTransient","getOrSetUniversal","peekUniversalTransient","setUniversalTransient"],"sources":["../../../package.json","../../../src/types/-private.ts"],"sourcesContent":["","// in testing mode, we utilize globals to ensure only one copy exists of\n// these maps, due to bugs in ember-auto-import\nimport { DEBUG, TESTING } from '@warp-drive/core/build-config/env';\n\nimport { name, version } from '../../package.json';\n\ntype UniversalTransientKey =\n // @warp-drive/core/request\n 'REQ_ID';\n\ntype UniversalKey =\n | `(transient) ${UniversalTransientKey}`\n // @warp-drive/core/request\n | 'RequestMap'\n | 'PromiseCache'\n | 'RequestCache'\n // @warp-drive/core-types/request\n | 'SkipCache'\n | 'EnableHydration'\n // @warp-drive/core-types/runtime\n | 'WarpDriveRuntimeConfig';\n\ntype TransientKey =\n // @warp-drive/core/graph\n | 'transactionRef'\n // @warp-drive/core/store\n | 'configuredGenerationMethod'\n | 'configuredUpdateMethod'\n | 'configuredForgetMethod'\n | 'configuredResetMethod'\n | 'configuredKeyInfoMethod'\n | 'signalHooks';\n\ntype GlobalKey =\n | `(transient) ${TransientKey}`\n // @warp-drive/legacy/adapter\n | 'AdapterError'\n | 'InvalidError'\n | 'TimeoutError'\n | 'AbortError'\n | 'UnauthorizedError'\n | 'ForbiddenError'\n | 'NotFoundError'\n | 'ConflictError'\n | 'ServerError'\n // @warp-drive/core/store/reactivity\n | '#{}'\n | '#[]'\n | 'Signals'\n // @warp-drive/legacy LegacySupport\n | 'AvailableShims'\n // @warp-drive/core RecordArrayManager\n | 'FAKE_ARR'\n // @warp-drive/core ReactiveArray\n | '#source'\n | '#update'\n | '#notify'\n | 'IS_COLLECTION'\n // @warp-drive/core RequestCache\n | 'Touching'\n | 'RequestPromise'\n // @warp-drive/legacy/compat FetchManager\n | 'SaveOp'\n // @warp-drive/legacy Model\n | 'LEGACY_SUPPORT'\n | 'LegacySupport'\n // @warp-drive/core/graph\n | 'Graphs'\n // @warp-drive/core/request\n | 'IS_FROZEN'\n | 'IS_CACHE_HANDLER'\n // @warp-drive/utilities\n | 'CONFIG'\n // @warp-drive/core CacheKeyManager\n | 'DEBUG_MAP'\n | 'IDENTIFIERS'\n | 'DOCUMENTS'\n // @warp-drive/core InstanceCache\n | 'RecordCache'\n | 'StoreMap'\n // @warp-drive/core/types/symbols\n | 'Store'\n | '$type'\n | 'TransformName'\n | 'RequestSignature'\n // @warp-drive/core/types/request\n | 'IS_FUTURE'\n | 'DOC'\n // @warp-drive/core NotificationManager\n | 'UnscopedChannel'\n // @warp-drive/core/reactive\n | 'ManagedArrayMap'\n | 'ManagedObjectMap'\n | 'Support'\n | 'SOURCE'\n | 'Destroy'\n | 'Checkout'\n | 'Commit'\n | 'Context';\n\ntype ModuleScopedCaches = Record<GlobalKey, unknown>;\n\nconst GlobalRef = globalThis as unknown as Record<\n string,\n {\n __warpDrive_ModuleScopedCaches?: ModuleScopedCaches;\n __warpDrive_hasOtherCopy?: boolean;\n __version: string;\n }\n> & {\n __warpDrive_universalCache: Record<UniversalKey, unknown>;\n};\nconst UniversalCache = (GlobalRef.__warpDrive_universalCache =\n GlobalRef.__warpDrive_universalCache ?? ({} as Record<UniversalKey, unknown>));\n\n// in order to support mirror packages, we ensure that each\n// unique package name has its own global cache\nGlobalRef[name] = GlobalRef[name] ?? { __version: version };\nconst GlobalSink = GlobalRef[name];\n\nif (DEBUG) {\n if (GlobalSink.__version !== version) {\n throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');\n }\n}\n\nconst ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? ({} as ModuleScopedCaches);\nif (TESTING) {\n if (!GlobalSink.__warpDrive_ModuleScopedCaches) {\n GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;\n } else {\n // oxlint-disable-next-line no-console\n console.warn(`\nMultiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import\n in which test assets get their own copy of some v2-addons. This can cause the application to\n malfunction as each copy will maintain its own separate state.`);\n }\n} else {\n if (GlobalSink.__warpDrive_hasOtherCopy) {\n throw new Error('Multiple copies of WarpDrive detected, the application will malfunction.');\n }\n GlobalSink.__warpDrive_hasOtherCopy = true;\n}\n\ntype UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;\ntype UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;\n\n/**\n * Coordinates creation of a singleton `value` (e.g. a symbol, WeakMap, or\n * error class) for `key` so that duplicate copies of this package loaded\n * into the same process observe the same instance instead of each creating\n * their own.\n *\n * In `TESTING` builds this stores/reads `value` from a cache namespaced to\n * this package's name on `globalThis` (see the file-level comments above for\n * why this is necessary). Outside of `TESTING`, only one copy of the package\n * is expected to exist, so this is a no-op that always returns `value`\n * unchanged.\n *\n * The return type lies about symbols being unique to work around the d.ts\n * rollup issue described in `reactive/-private/symbols.ts`.\n *\n * @private\n */\nexport function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = ModuleScopedCaches[key];\n if (existing === undefined) {\n return (ModuleScopedCaches[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Reads back the current value stored for `key` by {@link setTransient}, or\n * `null` if nothing has been stored yet.\n *\n * Unlike {@link getOrSetGlobal}, this always reads through the same\n * package-namespaced cache regardless of the `TESTING` flag, since this is\n * used for genuinely mutable state (not just singleton values) that must\n * stay in sync across any duplicate copies of this package.\n *\n * @private\n */\nexport function peekTransient<T>(key: TransientKey): T | null {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] as T) ?? null;\n}\n\n/**\n * Stores `value` for `key`, overwriting whatever was previously stored, so\n * that it can later be read back via {@link peekTransient}.\n *\n * See {@link peekTransient} for details on when/why this cache is shared.\n *\n * @private\n */\nexport function setTransient<T>(key: TransientKey, value: T): T {\n const globalKey: `(transient) ${TransientKey}` = `(transient) ${key}`;\n return (ModuleScopedCaches[globalKey] = value);\n}\n\n/**\n * Like {@link getOrSetGlobal}, but reads/writes a cache that is shared across\n * *all* copies of WarpDrive on `globalThis`, regardless of package name.\n *\n * This is used for keys (e.g. request/promise caches) that must be\n * coordinated even across \"mirror\" packages published under different\n * names, rather than only across duplicate copies of the same package name.\n *\n * @private\n */\nexport function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K> {\n if (TESTING) {\n const existing = UniversalCache[key];\n if (existing === undefined) {\n return (UniversalCache[key] = value) as UniqueSymbolOr<T, K>;\n } else {\n return existing as UniqueSymbolOr<T, K>;\n }\n } else {\n return value as UniqueSymbolOr<T, K>;\n }\n}\n\n/**\n * Like {@link peekTransient}, but reads from the package-name-independent\n * cache used by {@link getOrSetUniversal}. Always reads through this shared\n * cache regardless of the `TESTING` flag.\n *\n * @private\n */\nexport function peekUniversalTransient<T>(key: UniversalTransientKey): T | null {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] as T) ?? null;\n}\n\n/**\n * Like {@link setTransient}, but writes to the package-name-independent\n * cache used by {@link getOrSetUniversal}, so it can later be read via\n * {@link peekUniversalTransient}.\n *\n * @private\n */\nexport function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T {\n const globalKey: `(transient) ${UniversalTransientKey}` = `(transient) ${key}`;\n return (UniversalCache[globalKey] = value);\n}\n"],"mappings":";;;;;;ACsGA,MAAME,YAAYC;AAUlB,MAAMC,iBAAkBF,UAAUG,6BAChCH,UAAUG,8BAA+B,CAAC;AAI5CH,UAAUF,QAAQE,UAAUF,SAAS,EAAEM,WAAWL,QAAQ;AAC1D,MAAMM,aAAaL,UAAUF;AAG3B,IAAIO,WAAWD,cAAcL,SAC3B,MAAM,IAAIO,MAAM,4EAA4E;AAIhG,MAAMC,qBAAqBF,WAAWG,kCAAmC,CAAC;AAExE,IAAI,CAACH,WAAWG,gCACdH,WAAWG,iCAAiCD;KAG5CE,QAAQC,KAAK;;;iEAGgD;;;;;;;;;;;;;;;;;;AA6BjE,SAAgBC,eAAuCC,KAAQC,OAAgC;CAChF;EACX,MAAMC,WAAWP,mBAAmBK;EACpC,IAAIE,aAAaC,QACf,OAAQR,mBAAmBK,OAAOC;OAElC,OAAOC;CAEX;AAGF;;;;;;;;;;;;AAaA,SAAgBE,cAAiBJ,KAA6B;CAC5D,MAAMK,YAA2C,eAAeL;CAChE,OAAQL,mBAAmBU,cAAoB;AACjD;;;;;;;;;AAUA,SAAgBC,aAAgBN,KAAmBC,OAAa;CAC9D,MAAMI,YAA2C,eAAeL;CAChE,OAAQL,mBAAmBU,aAAaJ;AAC1C;;;;;;;;;;;AAYA,SAAgBM,kBAA6CP,KAAQC,OAAgC;CACtF;EACX,MAAMC,WAAWZ,eAAeU;EAChC,IAAIE,aAAaC,QACf,OAAQb,eAAeU,OAAOC;OAE9B,OAAOC;CAEX;AAGF;;;;;;;;AASA,SAAgBM,uBAA0BR,KAAsC;CAC9E,MAAMK,YAAoD,eAAeL;CACzE,OAAQV,eAAee,cAAoB;AAC7C;;;;;;;;AASA,SAAgBI,sBAAyBT,KAA4BC,OAAa;CAChF,MAAMI,YAAoD,eAAeL;CACzE,OAAQV,eAAee,aAAaJ;AACtC"}
@@ -1,22 +0,0 @@
1
- import { t as getOrSetGlobal } from "./-private-PfiN6w09.js";
2
-
3
- //#region src/reactive/-private/symbols.ts
4
- const SOURCE = getOrSetGlobal("SOURCE", Symbol("#source"));
5
- const Destroy = getOrSetGlobal("Destroy", Symbol.dispose || Symbol.for("Dispose"));
6
- /**
7
- * Symbol for the method used to request a mutable copy of an otherwise
8
- * immutable {@link ReactiveResource}.
9
- *
10
- * @deprecated use the {@link checkout} utility function instead.
11
- */
12
- const Checkout = getOrSetGlobal("Checkout", Symbol("Checkout"));
13
- const Commit = getOrSetGlobal("Commit", Symbol("Commit"));
14
- /**
15
- * Symbol used to stash the internal field/resource context (schema, store,
16
- * mutability, etc.) on a {@link ReactiveResource} or reactive field instance.
17
- */
18
- const Context = getOrSetGlobal("Context", Symbol("Context"));
19
-
20
- //#endregion
21
- export { SOURCE as a, Destroy as i, Commit as n, Context as r, Checkout as t };
22
- //# sourceMappingURL=-private-DOd4F2SW.js.map