@warp-drive/core 5.9.0-alpha.0 → 5.9.0-alpha.10

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 (48) hide show
  1. package/declarations/types/request.d.ts +4 -0
  2. package/dist/{configure-DPUFCemT.js → configure-BlQ9ebNX.js} +1 -1
  3. package/dist/configure.js +1 -1
  4. package/dist/{future-BKkJJkj7.js → future-CPfkKOvf.js} +1 -1
  5. package/dist/graph/-private.js +1 -1
  6. package/dist/{index-CQP2NSqg.js → index-D1MSdV3_.js} +22 -4
  7. package/dist/index.js +2 -2
  8. package/dist/reactive.js +2 -2
  9. package/dist/request.js +1 -1
  10. package/dist/signals/-leaked.js +1 -1
  11. package/dist/store/-private.js +1 -1
  12. package/dist/types/-private.js +1 -1
  13. package/dist/unpkg/dev/{-leaked-Co0EI6Go.js → -leaked-BYj8zMi0.js} +1 -1
  14. package/dist/unpkg/dev/configure.js +1 -1
  15. package/dist/unpkg/dev/{future-DFfOzSoe.js → future-DUuPqyLj.js} +1 -1
  16. package/dist/unpkg/dev/graph/-private.js +1 -1
  17. package/dist/unpkg/dev/{index-CepUPZlc.js → index-BRuavm7L.js} +22 -4
  18. package/dist/unpkg/dev/index.js +2 -2
  19. package/dist/unpkg/dev/reactive.js +2 -2
  20. package/dist/unpkg/dev/request.js +1 -1
  21. package/dist/unpkg/dev/signals/-leaked.js +1 -1
  22. package/dist/unpkg/dev/store/-private.js +2 -2
  23. package/dist/unpkg/dev/types/-private.js +1 -1
  24. package/dist/unpkg/dev-deprecated/{-leaked-DjMeRqdU.js → -leaked-D0KHC8Qz.js} +1 -1
  25. package/dist/unpkg/dev-deprecated/configure.js +1 -1
  26. package/dist/unpkg/dev-deprecated/{future-DFfOzSoe.js → future-DUuPqyLj.js} +1 -1
  27. package/dist/unpkg/dev-deprecated/graph/-private.js +1 -1
  28. package/dist/unpkg/dev-deprecated/{index-C_EEmn_3.js → index-BwwP9hpV.js} +22 -4
  29. package/dist/unpkg/dev-deprecated/index.js +2 -2
  30. package/dist/unpkg/dev-deprecated/reactive.js +2 -2
  31. package/dist/unpkg/dev-deprecated/request.js +1 -1
  32. package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
  33. package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
  34. package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
  35. package/dist/unpkg/prod/{handler-EU_8ncB2.js → handler-DeouKoRZ.js} +1 -1
  36. package/dist/unpkg/prod/index.js +4 -4
  37. package/dist/unpkg/prod/reactive.js +2 -2
  38. package/dist/unpkg/prod/{schema-BSkHyoWz.js → schema-DlxmDxns.js} +19 -1
  39. package/dist/unpkg/prod/store/-private.js +3 -3
  40. package/dist/unpkg/prod/types/-private.js +1 -1
  41. package/dist/unpkg/prod-deprecated/{handler-CCIu4sQ3.js → handler-BVKoq9bM.js} +1 -1
  42. package/dist/unpkg/prod-deprecated/{hooks-Dv4Np0MY.js → hooks-CfCFjO7d.js} +1 -1
  43. package/dist/unpkg/prod-deprecated/index.js +5 -5
  44. package/dist/unpkg/prod-deprecated/reactive.js +2 -2
  45. package/dist/unpkg/prod-deprecated/{schema-CJcjHv0E.js → schema-_W00LRDb.js} +19 -1
  46. package/dist/unpkg/prod-deprecated/store/-private.js +2 -2
  47. package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
  48. package/package.json +8 -8
@@ -250,6 +250,10 @@ interface NativeRequestInit {
250
250
  *
251
251
  */
252
252
  mode?: RequestMode;
253
+ /**
254
+ * provides an explicit priority hint for the request.
255
+ */
256
+ priority?: RequestPriority;
253
257
  /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
254
258
  */
255
259
  redirect?: RequestRedirect;
@@ -1,7 +1,7 @@
1
1
  import { getOrSetGlobal, peekTransient, setTransient } from './types/-private.js';
2
2
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
3
3
  import './types/request.js';
4
- import { g as getPromiseResult, s as setPromiseResult } from "./future-BKkJJkj7.js";
4
+ import { g as getPromiseResult, s as setPromiseResult } from "./future-CPfkKOvf.js";
5
5
 
6
6
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
7
 
package/dist/configure.js CHANGED
@@ -1,2 +1,2 @@
1
- export { u as setupSignals } from "./configure-DPUFCemT.js";
1
+ export { u as setupSignals } from "./configure-BlQ9ebNX.js";
2
2
  import '@embroider/macros';
@@ -5,7 +5,7 @@ const BODY_TYPES = {
5
5
  type: 'string',
6
6
  klass: ['Blob', 'ArrayBuffer', 'TypedArray', 'DataView', 'FormData', 'URLSearchParams', 'ReadableStream']
7
7
  };
8
- const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
8
+ const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['priority', ['high', 'low', 'auto']], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
9
9
  const IS_FROZEN = getOrSetGlobal('IS_FROZEN', Symbol('FROZEN'));
10
10
  const IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));
11
11
  function freezeHeaders(headers) {
@@ -67,7 +67,7 @@ function assertValidRelationshipPayload(graph, op) {
67
67
  kind
68
68
  } = definition;
69
69
  if (payload.links) {
70
- warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || !!payload.data || state.hasReceivedData, {
70
+ warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || payload.data === null || !!payload.data || state.hasReceivedData, {
71
71
  id: 'ds.store.push-link-for-sync-relationship'
72
72
  });
73
73
  } else if (payload.data) {
@@ -1,10 +1,10 @@
1
- import { a as defineGate, c as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, j as willSyncFlushWatchers, k as getOrCreateInternalSignal, l as consumeInternalSignal, o as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, q as createSignalDescriptor, b as defineSignal, e as entangleSignal, r as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, t as createInternalMemo, w as waitFor } from "./configure-DPUFCemT.js";
1
+ import { a as defineGate, c as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, j as willSyncFlushWatchers, k as getOrCreateInternalSignal, l as consumeInternalSignal, o as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, q as createSignalDescriptor, b as defineSignal, e as entangleSignal, r as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, t as createInternalMemo, w as waitFor } from "./configure-BlQ9ebNX.js";
2
2
  import { deprecate, warn } from '@ember/debug';
3
3
  import { EnableHydration, SkipCache, STRUCTURED } from './types/request.js';
4
4
  import { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from '@embroider/macros';
5
5
  import { D as Destroy, a as Context, S as SOURCE, C as Checkout, b as Commit } from "./symbols-3C1OkYtZ.js";
6
6
  import { isResourceSchema } from './types/schema/fields.js';
7
- import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-BKkJJkj7.js";
7
+ import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-CPfkKOvf.js";
8
8
  import { getOrSetGlobal, peekTransient, setTransient, peekUniversalTransient, setUniversalTransient } from './types/-private.js';
9
9
  import { D as DefaultCachePolicy } from "./default-cache-policy-D7_u4YRH.js";
10
10
  import { withBrand } from './request.js';
@@ -6517,7 +6517,25 @@ function _MUTATE(target, receiver, prop, args, _SIGNAL) {
6517
6517
  }
6518
6518
  case 'splice':
6519
6519
  {
6520
- const [start, deleteCount, ...adds] = args;
6520
+ const [start, _deleteCount, ...adds] = args;
6521
+
6522
+ // Don't know if I like this approach, is there not a way where we can just use splice, see what it deleted and go from there?
6523
+ let deleteCount;
6524
+ if (args.length === 1) {
6525
+ // Omitting deleteCount: remove ALL elements (a.k.a. Infinity)
6526
+ deleteCount = Infinity;
6527
+ } else {
6528
+ // deleteCount is undefined, not a valid number, a negative number...
6529
+ if (typeof _deleteCount !== 'number' || _deleteCount < 0) {
6530
+ // do not remove any elements
6531
+ deleteCount = 0;
6532
+ } else {
6533
+ deleteCount = _deleteCount;
6534
+ }
6535
+ }
6536
+
6537
+ // sanitize deleteCount to not exceed length / amount of items from index to end
6538
+ deleteCount = Math.min(collection[Context].source.length - start, deleteCount);
6521
6539
 
6522
6540
  // detect a full replace
6523
6541
  if (start === 0 && deleteCount === collection[Context].source.length) {
@@ -9602,7 +9620,7 @@ const Fetch = {
9602
9620
  }
9603
9621
  }
9604
9622
  context.setResponse(response);
9605
- if (response.status === 204) {
9623
+ if (response.status === 204 || context.request.method === 'HEAD') {
9606
9624
  return null;
9607
9625
  }
9608
9626
  let text = '';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { C as CacheHandler, F as Fetch, z as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, E as setIdentifierForgetMethod, B as setIdentifierGenerationMethod, G as setIdentifierResetMethod, D as setIdentifierUpdateMethod, H as setKeyInfoForResource, s as storeFor, A as useRecommendedStore } from "./index-CQP2NSqg.js";
1
+ export { C as CacheHandler, F as Fetch, z as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, E as setIdentifierForgetMethod, B as setIdentifierGenerationMethod, G as setIdentifierResetMethod, D as setIdentifierUpdateMethod, H as setKeyInfoForResource, s as storeFor, A as useRecommendedStore } from "./index-D1MSdV3_.js";
2
2
  import "./symbols-3C1OkYtZ.js";
3
- import "./configure-DPUFCemT.js";
3
+ import "./configure-BlQ9ebNX.js";
4
4
  import '@embroider/macros';
5
5
  import "./default-cache-policy-D7_u4YRH.js";
6
6
  import '@ember/debug';
package/dist/reactive.js CHANGED
@@ -1,4 +1,4 @@
1
- export { u as SchemaService, p as checkout, y as commit, v as fromIdentity, q as instantiateRecord, x as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-CQP2NSqg.js";
1
+ export { u as SchemaService, p as checkout, y as commit, v as fromIdentity, q as instantiateRecord, x as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-D1MSdV3_.js";
2
2
  export { C as Checkout } from "./symbols-3C1OkYtZ.js";
3
- export { f as createRequestSubscription, i as getPromiseState, h as getRequestState } from "./configure-DPUFCemT.js";
3
+ export { f as createRequestSubscription, i as getPromiseState, h as getRequestState } from "./configure-BlQ9ebNX.js";
4
4
  import '@embroider/macros';
package/dist/request.js CHANGED
@@ -1,4 +1,4 @@
1
- export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-BKkJJkj7.js";
1
+ export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-CPfkKOvf.js";
2
2
 
3
3
  /**
4
4
  * Brands the supplied object with the supplied response type.
@@ -1 +1 @@
1
- export { D as DISPOSE, a as defineGate, d as defineNonEnumerableSignal, b as defineSignal, e as entangleSignal, g as gate, m as memoized, n as notifyInternalSignal, p as peekInternalSignal, s as signal, w as waitFor, c as withSignalStore } from "../configure-DPUFCemT.js";
1
+ export { D as DISPOSE, a as defineGate, d as defineNonEnumerableSignal, b as defineSignal, e as entangleSignal, g as gate, m as memoized, n as notifyInternalSignal, p as peekInternalSignal, s as signal, w as waitFor, c as withSignalStore } from "../configure-BlQ9ebNX.js";
@@ -1 +1 @@
1
- export { C as CacheHandler, R as RecordArrayManager, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, l as createLegacyManyArray, e as ensureStringId, f as fastPush, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, r as recordIdentifierFor, j as setRecordIdentifier, s as storeFor } from "../index-CQP2NSqg.js";
1
+ export { C as CacheHandler, R as RecordArrayManager, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, l as createLegacyManyArray, e as ensureStringId, f as fastPush, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, r as recordIdentifierFor, j as setRecordIdentifier, s as storeFor } from "../index-D1MSdV3_.js";
@@ -1,6 +1,6 @@
1
1
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
2
2
  const name = "@warp-drive/core";
3
- const version = "5.9.0-alpha.0";
3
+ const version = "5.9.0-alpha.10";
4
4
 
5
5
  // in testing mode, we utilize globals to ensure only one copy exists of
6
6
  // these maps, due to bugs in ember-auto-import
@@ -1,6 +1,6 @@
1
1
  import { getOrSetGlobal, peekTransient, setTransient } from './types/-private.js';
2
2
  import './types/request.js';
3
- import { g as getPromiseResult, s as setPromiseResult } from "./future-DFfOzSoe.js";
3
+ import { g as getPromiseResult, s as setPromiseResult } from "./future-DUuPqyLj.js";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
6
 
@@ -1 +1 @@
1
- export { s as setupSignals } from "./-leaked-Co0EI6Go.js";
1
+ export { s as setupSignals } from "./-leaked-BYj8zMi0.js";
@@ -4,7 +4,7 @@ const BODY_TYPES = {
4
4
  type: 'string',
5
5
  klass: ['Blob', 'ArrayBuffer', 'TypedArray', 'DataView', 'FormData', 'URLSearchParams', 'ReadableStream']
6
6
  };
7
- const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
7
+ const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['priority', ['high', 'low', 'auto']], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
8
8
  const IS_FROZEN = getOrSetGlobal('IS_FROZEN', Symbol('FROZEN'));
9
9
  const IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));
10
10
  function freezeHeaders(headers) {
@@ -55,7 +55,7 @@ function assertValidRelationshipPayload(graph, op) {
55
55
  kind
56
56
  } = definition;
57
57
  if (payload.links) {
58
- console.warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || !!payload.data || state.hasReceivedData, {
58
+ console.warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || payload.data === null || !!payload.data || state.hasReceivedData, {
59
59
  id: 'ds.store.push-link-for-sync-relationship'
60
60
  });
61
61
  } else if (payload.data) {
@@ -1,8 +1,8 @@
1
1
  import { D as Destroy, C as Context, S as SOURCE, a as Checkout, b as Commit } from "./-private-sql1_mdx.js";
2
- import { d as defineGate, w as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, a as willSyncFlushWatchers, g as getOrCreateInternalSignal, c as consumeInternalSignal, b as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, e as createSignalDescriptor, f as defineSignal, h as entangleSignal, i as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, j as createInternalMemo, o as waitFor } from "./-leaked-Co0EI6Go.js";
2
+ import { d as defineGate, w as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, a as willSyncFlushWatchers, g as getOrCreateInternalSignal, c as consumeInternalSignal, b as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, e as createSignalDescriptor, f as defineSignal, h as entangleSignal, i as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, j as createInternalMemo, o as waitFor } from "./-leaked-BYj8zMi0.js";
3
3
  import { EnableHydration, SkipCache, STRUCTURED } from './types/request.js';
4
4
  import { isResourceSchema } from './types/schema/fields.js';
5
- import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-DFfOzSoe.js";
5
+ import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-DUuPqyLj.js";
6
6
  import { getOrSetGlobal, setTransient, peekTransient, peekUniversalTransient, setUniversalTransient } from './types/-private.js';
7
7
  import { DefaultCachePolicy } from './store.js';
8
8
  import { withBrand } from './request.js';
@@ -5952,7 +5952,25 @@ function _MUTATE(target, receiver, prop, args, _SIGNAL) {
5952
5952
  }
5953
5953
  case 'splice':
5954
5954
  {
5955
- const [start, deleteCount, ...adds] = args;
5955
+ const [start, _deleteCount, ...adds] = args;
5956
+
5957
+ // Don't know if I like this approach, is there not a way where we can just use splice, see what it deleted and go from there?
5958
+ let deleteCount;
5959
+ if (args.length === 1) {
5960
+ // Omitting deleteCount: remove ALL elements (a.k.a. Infinity)
5961
+ deleteCount = Infinity;
5962
+ } else {
5963
+ // deleteCount is undefined, not a valid number, a negative number...
5964
+ if (typeof _deleteCount !== 'number' || _deleteCount < 0) {
5965
+ // do not remove any elements
5966
+ deleteCount = 0;
5967
+ } else {
5968
+ deleteCount = _deleteCount;
5969
+ }
5970
+ }
5971
+
5972
+ // sanitize deleteCount to not exceed length / amount of items from index to end
5973
+ deleteCount = Math.min(collection[Context].source.length - start, deleteCount);
5956
5974
 
5957
5975
  // detect a full replace
5958
5976
  if (start === 0 && deleteCount === collection[Context].source.length) {
@@ -8921,7 +8939,7 @@ const Fetch = {
8921
8939
  }
8922
8940
  }
8923
8941
  context.setResponse(response);
8924
- if (response.status === 204) {
8942
+ if (response.status === 204 || context.request.method === 'HEAD') {
8925
8943
  return null;
8926
8944
  }
8927
8945
  let text = '';
@@ -1,6 +1,6 @@
1
- export { C as CacheHandler, F as Fetch, y as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, D as setIdentifierForgetMethod, A as setIdentifierGenerationMethod, E as setIdentifierResetMethod, B as setIdentifierUpdateMethod, G as setKeyInfoForResource, s as storeFor, z as useRecommendedStore } from "./index-CepUPZlc.js";
1
+ export { C as CacheHandler, F as Fetch, y as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, D as setIdentifierForgetMethod, A as setIdentifierGenerationMethod, E as setIdentifierResetMethod, B as setIdentifierUpdateMethod, G as setKeyInfoForResource, s as storeFor, z as useRecommendedStore } from "./index-BRuavm7L.js";
2
2
  import "./-private-sql1_mdx.js";
3
- import "./-leaked-Co0EI6Go.js";
3
+ import "./-leaked-BYj8zMi0.js";
4
4
  import './store.js';
5
5
  import './types/request.js';
6
6
  import './types/runtime.js';
@@ -1,3 +1,3 @@
1
- export { q as SchemaService, o as checkout, x as commit, u as fromIdentity, p as instantiateRecord, v as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-CepUPZlc.js";
1
+ export { q as SchemaService, o as checkout, x as commit, u as fromIdentity, p as instantiateRecord, v as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-BRuavm7L.js";
2
2
  export { a as Checkout } from "./-private-sql1_mdx.js";
3
- export { k as createRequestSubscription, m as getPromiseState, l as getRequestState } from "./-leaked-Co0EI6Go.js";
3
+ export { k as createRequestSubscription, m as getPromiseState, l as getRequestState } from "./-leaked-BYj8zMi0.js";
@@ -1,4 +1,4 @@
1
- export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-DFfOzSoe.js";
1
+ export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-DUuPqyLj.js";
2
2
 
3
3
  /**
4
4
  * Brands the supplied object with the supplied response type.
@@ -1 +1 @@
1
- export { D as DISPOSE, d as defineGate, q as defineNonEnumerableSignal, f as defineSignal, h as entangleSignal, t as gate, u as memoized, n as notifyInternalSignal, p as peekInternalSignal, r as signal, o as waitFor, w as withSignalStore } from "../-leaked-Co0EI6Go.js";
1
+ export { D as DISPOSE, d as defineGate, q as defineNonEnumerableSignal, f as defineSignal, h as entangleSignal, t as gate, u as memoized, n as notifyInternalSignal, p as peekInternalSignal, r as signal, o as waitFor, w as withSignalStore } from "../-leaked-BYj8zMi0.js";
@@ -1,6 +1,6 @@
1
1
  import '../types/request.js';
2
- import { i as isResourceKey, c as coerceId } from "../index-CepUPZlc.js";
3
- export { C as CacheHandler, R as RecordArrayManager, S as Store, j as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, g as assertPrivateCapabilities, b as assertPrivateStore, k as createLegacyManyArray, e as ensureStringId, f as fastPush, d as isPrivateStore, a as isRequestKey, l as log, m as logGroup, r as recordIdentifierFor, h as setRecordIdentifier, s as storeFor } from "../index-CepUPZlc.js";
2
+ import { i as isResourceKey, c as coerceId } from "../index-BRuavm7L.js";
3
+ export { C as CacheHandler, R as RecordArrayManager, S as Store, j as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, g as assertPrivateCapabilities, b as assertPrivateStore, k as createLegacyManyArray, e as ensureStringId, f as fastPush, d as isPrivateStore, a as isRequestKey, l as log, m as logGroup, r as recordIdentifierFor, h as setRecordIdentifier, s as storeFor } from "../index-BRuavm7L.js";
4
4
  function isNonEmptyString(str) {
5
5
  return Boolean(str && typeof str === 'string');
6
6
  }
@@ -1,5 +1,5 @@
1
1
  const name = "@warp-drive/core";
2
- const version = "5.9.0-alpha.0";
2
+ const version = "5.9.0-alpha.10";
3
3
 
4
4
  // in testing mode, we utilize globals to ensure only one copy exists of
5
5
  // these maps, due to bugs in ember-auto-import
@@ -1,6 +1,6 @@
1
1
  import { getOrSetGlobal, peekTransient, setTransient } from './types/-private.js';
2
2
  import './types/request.js';
3
- import { g as getPromiseResult, s as setPromiseResult } from "./future-DFfOzSoe.js";
3
+ import { g as getPromiseResult, s as setPromiseResult } from "./future-DUuPqyLj.js";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
6
 
@@ -1 +1 @@
1
- export { s as setupSignals } from "./-leaked-DjMeRqdU.js";
1
+ export { s as setupSignals } from "./-leaked-D0KHC8Qz.js";
@@ -4,7 +4,7 @@ const BODY_TYPES = {
4
4
  type: 'string',
5
5
  klass: ['Blob', 'ArrayBuffer', 'TypedArray', 'DataView', 'FormData', 'URLSearchParams', 'ReadableStream']
6
6
  };
7
- const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
7
+ const ValidKeys = new Map([['duplex', ['half']], ['records', 'array'], ['data', 'json'], ['body', BODY_TYPES], ['disableTestWaiter', 'boolean'], ['options', 'object'], ['cacheOptions', 'object'], ['priority', ['high', 'low', 'auto']], ['op', 'string'], ['store', 'object'], ['url', 'string'], ['cache', ['default', 'force-cache', 'no-cache', 'no-store', 'only-if-cached', 'reload']], ['credentials', ['include', 'omit', 'same-origin']], ['destination', ['', 'object', 'audio', 'audioworklet', 'document', 'embed', 'font', 'frame', 'iframe', 'image', 'manifest', 'paintworklet', 'report', 'script', 'sharedworker', 'style', 'track', 'video', 'worker', 'xslt']], ['headers', 'headers'], ['integrity', 'string'], ['keepalive', 'boolean'], ['method', ['QUERY', 'GET', 'PUT', 'PATCH', 'DELETE', 'POST', 'OPTIONS', 'HEAD', 'CONNECT', 'TRACE']], ['mode', ['same-origin', 'cors', 'navigate', 'no-cors']], ['redirect', ['error', 'follow', 'manual']], ['referrer', 'string'], ['signal', 'AbortSignal'], ['controller', 'AbortController'], ['referrerPolicy', ['', 'same-origin', 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url']]]);
8
8
  const IS_FROZEN = getOrSetGlobal('IS_FROZEN', Symbol('FROZEN'));
9
9
  const IS_COLLECTION = getOrSetGlobal('IS_COLLECTION', Symbol.for('Collection'));
10
10
  function freezeHeaders(headers) {
@@ -59,7 +59,7 @@ function assertValidRelationshipPayload(graph, op) {
59
59
  kind
60
60
  } = definition;
61
61
  if (payload.links) {
62
- console.warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || !!payload.data || state.hasReceivedData, {
62
+ console.warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || payload.data === null || !!payload.data || state.hasReceivedData, {
63
63
  id: 'ds.store.push-link-for-sync-relationship'
64
64
  });
65
65
  } else if (payload.data) {
@@ -1,8 +1,8 @@
1
- import { d as defineGate, w as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, b as willSyncFlushWatchers, e as getOrCreateInternalSignal, f as consumeInternalSignal, h as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, i as createSignalDescriptor, j as defineSignal, k as entangleSignal, l as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, m as createInternalMemo, o as waitFor } from "./-leaked-DjMeRqdU.js";
1
+ import { d as defineGate, w as withSignalStore, n as notifyInternalSignal, p as peekInternalSignal, b as willSyncFlushWatchers, e as getOrCreateInternalSignal, f as consumeInternalSignal, h as createInternalSignal, A as ARRAY_SIGNAL, S as Signals, i as createSignalDescriptor, j as defineSignal, k as entangleSignal, l as entangleInitiallyStaleSignal, O as OBJECT_SIGNAL, m as createInternalMemo, o as waitFor } from "./-leaked-D0KHC8Qz.js";
2
2
  import { EnableHydration, SkipCache, STRUCTURED } from './types/request.js';
3
3
  import { D as Destroy, a as Context, S as SOURCE, C as Checkout, b as Commit } from "./-private-3C1OkYtZ.js";
4
4
  import { isResourceSchema } from './types/schema/fields.js';
5
- import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-DFfOzSoe.js";
5
+ import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./future-DUuPqyLj.js";
6
6
  import { getOrSetGlobal, peekTransient, setTransient, peekUniversalTransient, setUniversalTransient } from './types/-private.js';
7
7
  import { DefaultCachePolicy } from './store.js';
8
8
  import { withBrand } from './request.js';
@@ -6515,7 +6515,25 @@ function _MUTATE(target, receiver, prop, args, _SIGNAL) {
6515
6515
  }
6516
6516
  case 'splice':
6517
6517
  {
6518
- const [start, deleteCount, ...adds] = args;
6518
+ const [start, _deleteCount, ...adds] = args;
6519
+
6520
+ // Don't know if I like this approach, is there not a way where we can just use splice, see what it deleted and go from there?
6521
+ let deleteCount;
6522
+ if (args.length === 1) {
6523
+ // Omitting deleteCount: remove ALL elements (a.k.a. Infinity)
6524
+ deleteCount = Infinity;
6525
+ } else {
6526
+ // deleteCount is undefined, not a valid number, a negative number...
6527
+ if (typeof _deleteCount !== 'number' || _deleteCount < 0) {
6528
+ // do not remove any elements
6529
+ deleteCount = 0;
6530
+ } else {
6531
+ deleteCount = _deleteCount;
6532
+ }
6533
+ }
6534
+
6535
+ // sanitize deleteCount to not exceed length / amount of items from index to end
6536
+ deleteCount = Math.min(collection[Context].source.length - start, deleteCount);
6519
6537
 
6520
6538
  // detect a full replace
6521
6539
  if (start === 0 && deleteCount === collection[Context].source.length) {
@@ -9536,7 +9554,7 @@ const Fetch = {
9536
9554
  }
9537
9555
  }
9538
9556
  context.setResponse(response);
9539
- if (response.status === 204) {
9557
+ if (response.status === 204 || context.request.method === 'HEAD') {
9540
9558
  return null;
9541
9559
  }
9542
9560
  let text = '';
@@ -1,5 +1,5 @@
1
- export { C as CacheHandler, F as Fetch, z as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, E as setIdentifierForgetMethod, B as setIdentifierGenerationMethod, G as setIdentifierResetMethod, D as setIdentifierUpdateMethod, H as setKeyInfoForResource, s as storeFor, A as useRecommendedStore } from "./index-C_EEmn_3.js";
1
+ export { C as CacheHandler, F as Fetch, z as RequestManager, S as Store, r as cacheKeyFor, r as recordIdentifierFor, E as setIdentifierForgetMethod, B as setIdentifierGenerationMethod, G as setIdentifierResetMethod, D as setIdentifierUpdateMethod, H as setKeyInfoForResource, s as storeFor, A as useRecommendedStore } from "./index-BwwP9hpV.js";
2
2
  import "./-private-3C1OkYtZ.js";
3
- import "./-leaked-DjMeRqdU.js";
3
+ import "./-leaked-D0KHC8Qz.js";
4
4
  import './store.js';
5
5
  import './types/runtime.js';
@@ -1,3 +1,3 @@
1
- export { u as SchemaService, p as checkout, y as commit, v as fromIdentity, q as instantiateRecord, x as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-C_EEmn_3.js";
1
+ export { u as SchemaService, p as checkout, y as commit, v as fromIdentity, q as instantiateRecord, x as registerDerivations, t as teardownRecord, w as withDefaults } from "./index-BwwP9hpV.js";
2
2
  export { C as Checkout } from "./-private-3C1OkYtZ.js";
3
- export { c as createRequestSubscription, a as getPromiseState, g as getRequestState } from "./-leaked-DjMeRqdU.js";
3
+ export { c as createRequestSubscription, a as getPromiseState, g as getRequestState } from "./-leaked-D0KHC8Qz.js";
@@ -1,4 +1,4 @@
1
- export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-DFfOzSoe.js";
1
+ export { c as createDeferred, g as getPromiseResult, s as setPromiseResult } from "./future-DUuPqyLj.js";
2
2
 
3
3
  /**
4
4
  * Brands the supplied object with the supplied response type.
@@ -1 +1 @@
1
- export { D as DISPOSE, d as defineGate, q as defineNonEnumerableSignal, j as defineSignal, k as entangleSignal, t as gate, u as memoized, n as notifyInternalSignal, p as peekInternalSignal, r as signal, o as waitFor, w as withSignalStore } from "../-leaked-DjMeRqdU.js";
1
+ export { D as DISPOSE, d as defineGate, q as defineNonEnumerableSignal, j as defineSignal, k as entangleSignal, t as gate, u as memoized, n as notifyInternalSignal, p as peekInternalSignal, r as signal, o as waitFor, w as withSignalStore } from "../-leaked-D0KHC8Qz.js";
@@ -1 +1 @@
1
- export { C as CacheHandler, R as RecordArrayManager, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, l as createLegacyManyArray, e as ensureStringId, f as fastPush, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, r as recordIdentifierFor, j as setRecordIdentifier, s as storeFor } from "../index-C_EEmn_3.js";
1
+ export { C as CacheHandler, R as RecordArrayManager, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, l as createLegacyManyArray, e as ensureStringId, f as fastPush, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, r as recordIdentifierFor, j as setRecordIdentifier, s as storeFor } from "../index-BwwP9hpV.js";
@@ -1,5 +1,5 @@
1
1
  const name = "@warp-drive/core";
2
- const version = "5.9.0-alpha.0";
2
+ const version = "5.9.0-alpha.10";
3
3
 
4
4
  // in testing mode, we utilize globals to ensure only one copy exists of
5
5
  // these maps, due to bugs in ember-auto-import
@@ -1,4 +1,4 @@
1
- import { i as isResourceKey, h as isRequestKey, C as CacheKeyManager, R as RecordArrayManager, I as InstanceCache, o as normalizeModelName, g as coerceId, q as getNewRecord, t as peekResourceKey, j as ensureStringId, a as recordIdentifierFor, u as createReactiveDocument } from "./schema-BSkHyoWz.js";
1
+ import { i as isResourceKey, h as isRequestKey, C as CacheKeyManager, R as RecordArrayManager, I as InstanceCache, o as normalizeModelName, g as coerceId, q as getNewRecord, t as peekResourceKey, j as ensureStringId, a as recordIdentifierFor, u as createReactiveDocument } from "./schema-DlxmDxns.js";
2
2
  import { getOrSetGlobal } from './types/-private.js';
3
3
  import { w as willSyncFlushWatchers } from "./-leaked-DUONXQDB.js";
4
4
  import { EnableHydration, SkipCache } from './types/request.js';
@@ -1,5 +1,5 @@
1
- import { r as registerDerivations, S as SchemaService } from "./schema-BSkHyoWz.js";
2
- export { a as cacheKeyFor, a as recordIdentifierFor, d as setIdentifierForgetMethod, b as setIdentifierGenerationMethod, e as setIdentifierResetMethod, c as setIdentifierUpdateMethod, f as setKeyInfoForResource, s as storeFor } from "./schema-BSkHyoWz.js";
1
+ import { r as registerDerivations, S as SchemaService } from "./schema-DlxmDxns.js";
2
+ export { a as cacheKeyFor, a as recordIdentifierFor, d as setIdentifierForgetMethod, b as setIdentifierGenerationMethod, e as setIdentifierResetMethod, c as setIdentifierUpdateMethod, f as setKeyInfoForResource, s as storeFor } from "./schema-DlxmDxns.js";
3
3
  import { instantiateRecord, teardownRecord } from './reactive.js';
4
4
  import { peekUniversalTransient, setUniversalTransient } from './types/-private.js';
5
5
  import "./-leaked-DUONXQDB.js";
@@ -7,7 +7,7 @@ import { c as cloneResponseProperties, I as IS_CACHE_HANDLER, e as executeNextHa
7
7
  import { EnableHydration } from './types/request.js';
8
8
  import { g as getRequestResult, s as setPromiseResult, c as clearRequestResult } from "./promise-cache-DIT8Ypjq.js";
9
9
  import { DefaultCachePolicy } from './store.js';
10
- import { S as Store, C as CacheHandler } from "./handler-EU_8ncB2.js";
10
+ import { S as Store, C as CacheHandler } from "./handler-DeouKoRZ.js";
11
11
  import './types/runtime.js';
12
12
 
13
13
  // Lazily close over fetch to avoid breaking Mirage
@@ -75,7 +75,7 @@ const Fetch = {
75
75
  }
76
76
  }
77
77
  context.setResponse(response);
78
- if (response.status === 204) {
78
+ if (response.status === 204 || context.request.method === 'HEAD') {
79
79
  return null;
80
80
  }
81
81
  let text = '';
@@ -1,5 +1,5 @@
1
- import { v as ReactiveResource } from "./schema-BSkHyoWz.js";
2
- export { S as SchemaService, w as checkout, z as commit, y as fromIdentity, r as registerDerivations, x as withDefaults } from "./schema-BSkHyoWz.js";
1
+ import { v as ReactiveResource } from "./schema-DlxmDxns.js";
2
+ export { S as SchemaService, w as checkout, z as commit, y as fromIdentity, r as registerDerivations, x as withDefaults } from "./schema-DlxmDxns.js";
3
3
  import { D as Destroy } from "./-private-sql1_mdx.js";
4
4
  export { a as Checkout } from "./-private-sql1_mdx.js";
5
5
  export { k as createRequestSubscription, m as getPromiseState, l as getRequestState } from "./-leaked-DUONXQDB.js";
@@ -2788,7 +2788,25 @@ function _MUTATE(target, receiver, prop, args, _SIGNAL) {
2788
2788
  }
2789
2789
  case 'splice':
2790
2790
  {
2791
- const [start, deleteCount, ...adds] = args;
2791
+ const [start, _deleteCount, ...adds] = args;
2792
+
2793
+ // Don't know if I like this approach, is there not a way where we can just use splice, see what it deleted and go from there?
2794
+ let deleteCount;
2795
+ if (args.length === 1) {
2796
+ // Omitting deleteCount: remove ALL elements (a.k.a. Infinity)
2797
+ deleteCount = Infinity;
2798
+ } else {
2799
+ // deleteCount is undefined, not a valid number, a negative number...
2800
+ if (typeof _deleteCount !== 'number' || _deleteCount < 0) {
2801
+ // do not remove any elements
2802
+ deleteCount = 0;
2803
+ } else {
2804
+ deleteCount = _deleteCount;
2805
+ }
2806
+ }
2807
+
2808
+ // sanitize deleteCount to not exceed length / amount of items from index to end
2809
+ deleteCount = Math.min(collection[Context].source.length - start, deleteCount);
2792
2810
 
2793
2811
  // detect a full replace
2794
2812
  if (start === 0 && deleteCount === collection[Context].source.length) {
@@ -1,7 +1,7 @@
1
1
  import '../types/-private.js';
2
- export { C as CacheHandler, S as Store, a as assertPrivateStore, i as isPrivateStore } from "../handler-EU_8ncB2.js";
3
- import { i as isResourceKey, g as coerceId } from "../schema-BSkHyoWz.js";
4
- export { R as RecordArrayManager, n as StoreMap, _ as _clearCaches, o as _deprecatingNormalize, l as assertPrivateCapabilities, p as createLegacyManyArray, j as ensureStringId, k as fastPush, h as isRequestKey, a as recordIdentifierFor, m as setRecordIdentifier, s as storeFor } from "../schema-BSkHyoWz.js";
2
+ export { C as CacheHandler, S as Store, a as assertPrivateStore, i as isPrivateStore } from "../handler-DeouKoRZ.js";
3
+ import { i as isResourceKey, g as coerceId } from "../schema-DlxmDxns.js";
4
+ export { R as RecordArrayManager, n as StoreMap, _ as _clearCaches, o as _deprecatingNormalize, l as assertPrivateCapabilities, p as createLegacyManyArray, j as ensureStringId, k as fastPush, h as isRequestKey, a as recordIdentifierFor, m as setRecordIdentifier, s as storeFor } from "../schema-DlxmDxns.js";
5
5
  const TEXT_COLORS = {
6
6
  TEXT: 'inherit',
7
7
  notify: ['white', 'white', 'inherit', 'magenta', 'inherit'],
@@ -1,5 +1,5 @@
1
1
  const name = "@warp-drive/core";
2
- const version = "5.9.0-alpha.0";
2
+ const version = "5.9.0-alpha.10";
3
3
 
4
4
  // in testing mode, we utilize globals to ensure only one copy exists of
5
5
  // these maps, due to bugs in ember-auto-import
@@ -1,4 +1,4 @@
1
- import { v as createReactiveDocument } from "./schema-CJcjHv0E.js";
1
+ import { v as createReactiveDocument } from "./schema-_W00LRDb.js";
2
2
  import { SkipCache, EnableHydration } from './types/request.js';
3
3
  const MUTATION_OPS = new Set(['createRecord', 'updateRecord', 'deleteRecord']);
4
4
  function calcShouldFetch(store, request, hasCachedValue, identifier) {
@@ -1,4 +1,4 @@
1
- import { u as ReactiveResource } from "./schema-CJcjHv0E.js";
1
+ import { u as ReactiveResource } from "./schema-_W00LRDb.js";
2
2
  import { D as Destroy } from "./-private-3C1OkYtZ.js";
3
3
  function instantiateRecord(store, identifier, createArgs) {
4
4
  const schema = store.schema;
@@ -1,13 +1,13 @@
1
- import { b as Store, r as registerDerivations, S as SchemaService } from "./schema-CJcjHv0E.js";
2
- export { d as cacheKeyFor, d as recordIdentifierFor, z as setIdentifierForgetMethod, x as setIdentifierGenerationMethod, A as setIdentifierResetMethod, y as setIdentifierUpdateMethod, B as setKeyInfoForResource, s as storeFor } from "./schema-CJcjHv0E.js";
3
- import { i as instantiateRecord, t as teardownRecord } from "./hooks-Dv4Np0MY.js";
1
+ import { b as Store, r as registerDerivations, S as SchemaService } from "./schema-_W00LRDb.js";
2
+ export { d as cacheKeyFor, d as recordIdentifierFor, z as setIdentifierForgetMethod, x as setIdentifierGenerationMethod, A as setIdentifierResetMethod, y as setIdentifierUpdateMethod, B as setKeyInfoForResource, s as storeFor } from "./schema-_W00LRDb.js";
3
+ import { i as instantiateRecord, t as teardownRecord } from "./hooks-CfCFjO7d.js";
4
4
  import { peekUniversalTransient, setUniversalTransient } from './types/-private.js';
5
5
  import "./-leaked-DRNv9VIX.js";
6
6
  import { c as cloneResponseProperties, I as IS_CACHE_HANDLER, e as executeNextHandler, u as upgradePromise } from "./request-BrJSCG6r.js";
7
7
  import { EnableHydration } from './types/request.js';
8
8
  import { g as getRequestResult, s as setPromiseResult, c as clearRequestResult } from "./promise-cache-DIT8Ypjq.js";
9
9
  import { DefaultCachePolicy } from './store.js';
10
- import { C as CacheHandler } from "./handler-CCIu4sQ3.js";
10
+ import { C as CacheHandler } from "./handler-BVKoq9bM.js";
11
11
  import './types/runtime.js';
12
12
 
13
13
  // Lazily close over fetch to avoid breaking Mirage
@@ -75,7 +75,7 @@ const Fetch = {
75
75
  }
76
76
  }
77
77
  context.setResponse(response);
78
- if (response.status === 204) {
78
+ if (response.status === 204 || context.request.method === 'HEAD') {
79
79
  return null;
80
80
  }
81
81
  let text = '';
@@ -1,5 +1,5 @@
1
- export { S as SchemaService, c as checkout, a as commit, f as fromIdentity, r as registerDerivations, w as withDefaults } from "./schema-CJcjHv0E.js";
2
- export { i as instantiateRecord, t as teardownRecord } from "./hooks-Dv4Np0MY.js";
1
+ export { S as SchemaService, c as checkout, a as commit, f as fromIdentity, r as registerDerivations, w as withDefaults } from "./schema-_W00LRDb.js";
2
+ export { i as instantiateRecord, t as teardownRecord } from "./hooks-CfCFjO7d.js";
3
3
  export { C as Checkout } from "./-private-3C1OkYtZ.js";
4
4
  export { c as createRequestSubscription, a as getPromiseState, g as getRequestState } from "./-leaked-DRNv9VIX.js";
5
5
  import './types/-private.js';
@@ -4462,7 +4462,25 @@ function _MUTATE(target, receiver, prop, args, _SIGNAL) {
4462
4462
  }
4463
4463
  case 'splice':
4464
4464
  {
4465
- const [start, deleteCount, ...adds] = args;
4465
+ const [start, _deleteCount, ...adds] = args;
4466
+
4467
+ // Don't know if I like this approach, is there not a way where we can just use splice, see what it deleted and go from there?
4468
+ let deleteCount;
4469
+ if (args.length === 1) {
4470
+ // Omitting deleteCount: remove ALL elements (a.k.a. Infinity)
4471
+ deleteCount = Infinity;
4472
+ } else {
4473
+ // deleteCount is undefined, not a valid number, a negative number...
4474
+ if (typeof _deleteCount !== 'number' || _deleteCount < 0) {
4475
+ // do not remove any elements
4476
+ deleteCount = 0;
4477
+ } else {
4478
+ deleteCount = _deleteCount;
4479
+ }
4480
+ }
4481
+
4482
+ // sanitize deleteCount to not exceed length / amount of items from index to end
4483
+ deleteCount = Math.min(collection[Context].source.length - start, deleteCount);
4466
4484
 
4467
4485
  // detect a full replace
4468
4486
  if (start === 0 && deleteCount === collection[Context].source.length) {
@@ -1,5 +1,5 @@
1
- export { R as RecordArrayManager, b as Store, p as StoreMap, _ as _clearCaches, q as _deprecatingNormalize, n as assertPrivateCapabilities, l as assertPrivateStore, h as coerceId, g as constructResource, t as createLegacyManyArray, j as ensureStringId, k as fastPush, m as isPrivateStore, e as isRequestKey, i as isResourceKey, d as recordIdentifierFor, o as setRecordIdentifier, s as storeFor } from "../schema-CJcjHv0E.js";
2
- export { C as CacheHandler } from "../handler-CCIu4sQ3.js";
1
+ export { R as RecordArrayManager, b as Store, p as StoreMap, _ as _clearCaches, q as _deprecatingNormalize, n as assertPrivateCapabilities, l as assertPrivateStore, h as coerceId, g as constructResource, t as createLegacyManyArray, j as ensureStringId, k as fastPush, m as isPrivateStore, e as isRequestKey, i as isResourceKey, d as recordIdentifierFor, o as setRecordIdentifier, s as storeFor } from "../schema-_W00LRDb.js";
2
+ export { C as CacheHandler } from "../handler-BVKoq9bM.js";
3
3
  const TEXT_COLORS = {
4
4
  TEXT: 'inherit',
5
5
  notify: ['white', 'white', 'inherit', 'magenta', 'inherit'],
@@ -1,5 +1,5 @@
1
1
  const name = "@warp-drive/core";
2
- const version = "5.9.0-alpha.0";
2
+ const version = "5.9.0-alpha.10";
3
3
 
4
4
  // in testing mode, we utilize globals to ensure only one copy exists of
5
5
  // these maps, due to bugs in ember-auto-import
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive/core",
3
- "version": "5.9.0-alpha.0",
3
+ "version": "5.9.0-alpha.10",
4
4
  "description": "Core package for WarpDrive | All the Universal Basics",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -44,19 +44,19 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@embroider/macros": "^1.18.1",
48
- "@warp-drive/build-config": "5.9.0-alpha.0"
47
+ "@embroider/macros": "^1.19.6",
48
+ "@warp-drive/build-config": "5.9.0-alpha.10"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@babel/core": "^7.28.3",
52
52
  "@babel/plugin-transform-typescript": "^7.28.0",
53
53
  "@babel/preset-typescript": "^7.27.1",
54
- "@warp-drive/internal-config": "5.9.0-alpha.0",
54
+ "@warp-drive/internal-config": "5.9.0-alpha.10",
55
55
  "decorator-transforms": "^2.3.0",
56
- "ember-source": "~6.6.0",
56
+ "ember-source": "~6.10.0",
57
57
  "expect-type": "^1.2.2",
58
- "typescript": "^5.9.2",
59
- "vite": "^7.1.3"
58
+ "typescript": "^5.9.3",
59
+ "vite": "^7.3.1"
60
60
  },
61
61
  "volta": {
62
62
  "extends": "../../package.json"
@@ -70,7 +70,7 @@
70
70
  "edition": "octane"
71
71
  },
72
72
  "scripts": {
73
- "build:pkg": "vite build;",
73
+ "build:pkg": "vite build",
74
74
  "lint": "eslint . --quiet --cache --cache-strategy=content",
75
75
  "sync": "echo \"syncing\"",
76
76
  "start": "vite"