@warp-drive/core 5.7.0-alpha.24 → 5.7.0-alpha.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,10 @@
1
1
  import { ARRAY_SIGNAL, OBJECT_SIGNAL, type SignalRef } from "./configure.js";
2
2
  export type { SignalRef };
3
3
  export { ARRAY_SIGNAL, OBJECT_SIGNAL };
4
+ interface Initializer {
5
+ value: () => unknown;
6
+ }
7
+ export declare function makeInitializer(fn: () => unknown): Initializer;
4
8
  /**
5
9
  * A WarpDriveSignal is a wrapper around a framework specific or TC39 signal
6
10
  * that enables us to store and manage the signal in a universal way.
@@ -25,12 +25,29 @@ export declare function defineSignal<T extends object>(obj: T, key: string, v?:
25
25
  * @internal
26
26
  */
27
27
  export declare function defineNonEnumerableSignal<T extends object>(obj: T, key: string, v?: unknown): void;
28
+ interface DecoratorPropertyDescriptor extends PropertyDescriptor {
29
+ initializer?: () => unknown;
30
+ }
31
+ /**
32
+ * Decorator version of creating a signal.
33
+ */
34
+ export declare function signal<
35
+ T extends object,
36
+ K extends keyof T & string
37
+ >(target: T, key: K, descriptor?: DecoratorPropertyDescriptor): void;
38
+ /**
39
+ * Decorator version of creating a memoized getter
40
+ */
28
41
  export declare function memoized<
29
42
  T extends object,
30
43
  K extends keyof T & string
31
44
  >(target: T, key: K, descriptor: PropertyDescriptor): PropertyDescriptor;
45
+ /**
46
+ * Decorator version of creating a gate.
47
+ */
32
48
  export declare function gate<
33
49
  T extends object,
34
50
  K extends keyof T & string
35
51
  >(_target: T, key: K, desc: PropertyDescriptor): PropertyDescriptor;
36
52
  export declare function defineGate<T extends object>(obj: T, key: string, desc: PropertyDescriptor): void;
53
+ export {};
@@ -3,14 +3,25 @@ import type { Future } from "../../../request.js";
3
3
  import type { StructuredErrorDocument } from "../../../types/request.js";
4
4
  import type { RequestState } from "../../-private.js";
5
5
  export declare const DISPOSE: "(symbol) dispose";
6
- interface ErrorFeatures {
6
+ export interface ErrorFeatures {
7
7
  isHidden: boolean;
8
8
  isOnline: boolean;
9
9
  retry: () => Promise<void>;
10
10
  }
11
- type AutorefreshBehaviorType = "online" | "interval" | "invalid";
12
- type AutorefreshBehaviorCombos = boolean | AutorefreshBehaviorType | `${AutorefreshBehaviorType},${AutorefreshBehaviorType}` | `${AutorefreshBehaviorType},${AutorefreshBehaviorType},${AutorefreshBehaviorType}`;
13
- type ContentFeatures<RT> = {
11
+ export type AutorefreshBehaviorType = "online" | "interval" | "invalid";
12
+ export type AutorefreshBehaviorCombos = boolean | AutorefreshBehaviorType | `${AutorefreshBehaviorType},${AutorefreshBehaviorType}` | `${AutorefreshBehaviorType},${AutorefreshBehaviorType},${AutorefreshBehaviorType}`;
13
+ /**
14
+ * Utilities to assist in recovering from the error.
15
+ */
16
+ export interface RecoveryFeatures {
17
+ isOnline: boolean;
18
+ isHidden: boolean;
19
+ retry: () => Promise<void>;
20
+ }
21
+ /**
22
+ * Utilities for keeping the request fresh
23
+ */
24
+ export interface ContentFeatures<RT> {
14
25
  isOnline: boolean;
15
26
  isHidden: boolean;
16
27
  isRefreshing: boolean;
@@ -18,7 +29,22 @@ type ContentFeatures<RT> = {
18
29
  reload: () => Promise<void>;
19
30
  abort?: () => void;
20
31
  latestRequest?: Future<RT>;
21
- };
32
+ }
33
+ export interface RequestArgs<
34
+ RT,
35
+ E
36
+ > extends SubscriptionArgs<RT, E> {
37
+ subscription?: RequestSubscription<RT, E>;
38
+ /**
39
+ * The store instance to use for making requests. If contexts are available,
40
+ * the component will default to using the `store` on the context.
41
+ *
42
+ * This is required if the store is not available via context or should be
43
+ * different from the store provided via context.
44
+ *
45
+ */
46
+ store?: Store;
47
+ }
22
48
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
49
  export interface SubscriptionArgs<
24
50
  RT,
@@ -76,6 +102,20 @@ export interface SubscriptionArgs<
76
102
  */
77
103
  autorefreshBehavior?: "refresh" | "reload" | "policy";
78
104
  }
105
+ export interface RequestComponentArgs<
106
+ RT,
107
+ E
108
+ > extends SubscriptionArgs<RT, E> {
109
+ /**
110
+ * The store instance to use for making requests. If contexts are available,
111
+ * the component will default to using the `store` on the context.
112
+ *
113
+ * This is required if the store is not available via context or should be
114
+ * different from the store provided via context.
115
+ *
116
+ */
117
+ store?: Store | RequestManager;
118
+ }
79
119
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
80
120
  export interface RequestSubscription<
81
121
  RT,
@@ -258,4 +298,3 @@ export declare function createRequestSubscription<
258
298
  RT,
259
299
  E
260
300
  >(store: Store | RequestManager, args: SubscriptionArgs<RT, E>): RequestSubscription<RT, E>;
261
- export {};
@@ -470,7 +470,7 @@ export declare class Store extends BaseClass {
470
470
  * {@link CacheOptions.key | cache key} will have the request result
471
471
  * and document cached.
472
472
  *
473
- * The cache key used is {@link RequestInfo.cacheOptions | RequestInfo.cacheOptions.key}
473
+ * The cache key used is {@link RequestInfo.cacheOptions.key | RequestInfo.cacheOptions.key}
474
474
  * if present, falling back to {@link RequestInfo.url}.
475
475
  *
476
476
  * Params are not serialized as part of the cache-key, so
@@ -25,8 +25,8 @@ export type { StoreRequestInput } from "./-private/cache-handler/handler.js";
25
25
  export { type LegacyManyArray, type LegacyManyArray as RelatedCollection, createLegacyManyArray } from "./-private/record-arrays/legacy-many-array.js";
26
26
  export { log, logGroup } from "./-private/debug/utils.js";
27
27
  export { getPromiseState, type PromiseState } from "./-private/new-core-tmp/promise-state.js";
28
- export { DISPOSE, createRequestSubscription, type SubscriptionArgs, type RequestSubscription } from "./-private/new-core-tmp/request-subscription.js";
28
+ export { DISPOSE, createRequestSubscription, type RequestArgs, type SubscriptionArgs, type RequestComponentArgs, type RequestSubscription, type ContentFeatures, type RecoveryFeatures, type AutorefreshBehaviorCombos, type AutorefreshBehaviorType } from "./-private/new-core-tmp/request-subscription.js";
29
29
  export { getRequestState, type RequestLoadingState, type RequestCacheRequestState as RequestState } from "./-private/new-core-tmp/request-state.js";
30
30
  export { createMemo, type SignalHooks, waitFor } from "./-private/new-core-tmp/reactivity/configure.js";
31
- export { memoized, gate, entangleSignal, defineSignal, defineGate, defineNonEnumerableSignal } from "./-private/new-core-tmp/reactivity/signal.js";
31
+ export { signal, memoized, gate, entangleSignal, defineSignal, defineGate, defineNonEnumerableSignal } from "./-private/new-core-tmp/reactivity/signal.js";
32
32
  export { ARRAY_SIGNAL, OBJECT_SIGNAL, Signals, type WarpDriveSignal, peekInternalSignal, withSignalStore, notifyInternalSignal, consumeInternalSignal, getOrCreateInternalSignal } from "./-private/new-core-tmp/reactivity/internal.js";
@@ -199,12 +199,17 @@ export interface StructuredErrorDocument<T = unknown> extends Error {
199
199
  */
200
200
  export type StructuredDocument<T> = StructuredDataDocument<T> | StructuredErrorDocument<T>;
201
201
  /**
202
- * JavaScript's native Request class.
202
+ * The {@link RequestInit} interface accepted by the native {@link fetch} API.
203
203
  *
204
204
  * WarpDrive provides our own typings due to incompleteness in the native typings.
205
205
  *
206
+ * @privateRemarks
207
+ * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)
208
+ * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)
209
+ * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)
210
+ *
206
211
  */
207
- interface Request {
212
+ interface NativeRequestInit {
208
213
  /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
209
214
  */
210
215
  cache?: RequestCache;
@@ -264,11 +269,21 @@ export interface ImmutableHeaders extends Headers {
264
269
  toJSON(): [string, string][];
265
270
  }
266
271
  /**
267
- * Extends JavaScript's native {@link Request} object with additional
268
- * properties specific to the RequestManager's capabilities.
272
+ * Extends JavaScript's native {@link fetch} {@link NativeRequestInit | RequestInit} with additional
273
+ * properties specific to the {@link RequestManager | RequestManager's} capabilities.
274
+ *
275
+ * This interface is used to define the shape of a request that can be made via
276
+ * either the {@link RequestManager.request} or {@link Store.request} methods.
277
+ *
278
+ * @privateRemarks
279
+ * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)
280
+ * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)
281
+ * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)
269
282
  *
283
+ * @public
284
+ * @since 4.12
270
285
  */
271
- export interface RequestInfo<RT = unknown> extends Request {
286
+ export interface RequestInfo<RT = unknown> extends NativeRequestInit {
272
287
  /**
273
288
  * If provided, used instead of the AbortController auto-configured for each request by the RequestManager
274
289
  *
@@ -281,7 +296,7 @@ export interface RequestInfo<RT = unknown> extends Request {
281
296
  store?: Store;
282
297
  op?: string;
283
298
  /**
284
- * The identifiers of the primary resources involved in the request
299
+ * The {@link ResourceKey | ResourceKeys} of the primary resources involved in the request
285
300
  * (if any). This may be used by handlers to perform transactional
286
301
  * operations on the store.
287
302
  *
@@ -298,7 +313,7 @@ export interface RequestInfo<RT = unknown> extends Request {
298
313
  */
299
314
  data?: Record<string, unknown>;
300
315
  /**
301
- * options specifically intended for handlers
316
+ * options specifically intended for {@link Handler | Handlers}
302
317
  * to utilize to process the request
303
318
  *
304
319
  */
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { macroCondition, getGlobalConfig } from '@embroider/macros';
4
4
  import { w as waitFor } from "./configure-B48bFHOl.js";
5
5
  import { peekUniversalTransient, setUniversalTransient } from './types/-private.js';
6
6
  import { EnableHydration } from './types/request.js';
7
- export { C as CacheHandler, S as Store, r as recordIdentifierFor, M as setIdentifierForgetMethod, K as setIdentifierGenerationMethod, N as setIdentifierResetMethod, L as setIdentifierUpdateMethod, O as setKeyInfoForResource, s as storeFor } from "./request-state-CcOnn4ej.js";
7
+ export { C as CacheHandler, S as Store, r as recordIdentifierFor, N as setIdentifierForgetMethod, L as setIdentifierGenerationMethod, O as setIdentifierResetMethod, M as setIdentifierUpdateMethod, P as setKeyInfoForResource, s as storeFor } from "./request-state-XxA7ZVps.js";
8
8
  import '@ember/debug';
9
9
  import './utils/string.js';
10
10
  import "./symbols-sql1_mdx.js";
package/dist/reactive.js CHANGED
@@ -1,5 +1,5 @@
1
- import { F as ReactiveResource, G as isNonIdentityCacheableField, H as getFieldCacheKeyStrict, r as recordIdentifierFor, z as withSignalStore } from "./request-state-CcOnn4ej.js";
2
- export { I as checkout, J as commit } from "./request-state-CcOnn4ej.js";
1
+ import { G as ReactiveResource, H as isNonIdentityCacheableField, I as getFieldCacheKeyStrict, r as recordIdentifierFor, A as withSignalStore } from "./request-state-XxA7ZVps.js";
2
+ export { J as checkout, K as commit } from "./request-state-XxA7ZVps.js";
3
3
  import { isResourceSchema } from './types/schema/fields.js';
4
4
  import { D as Destroy, C as Context } from "./symbols-sql1_mdx.js";
5
5
  export { a as Checkout } from "./symbols-sql1_mdx.js";
@@ -9,6 +9,19 @@ import { S as SOURCE, C as Context, D as Destroy, a as Checkout, b as Commit } f
9
9
  import { a as createSignal, b as consumeSignal, n as notifySignal, c as createMemo, A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, d as willSyncFlushWatchers } from "./configure-B48bFHOl.js";
10
10
  import { g as getPromiseResult, s as setPromiseResult } from "./context-BNZebmoO.js";
11
11
  import { RecordStore } from './types/symbols.js';
12
+ const INITIALIZER_PROTO = {
13
+ isInitializer: true
14
+ };
15
+ function makeInitializer(fn) {
16
+ // we use a prototype to ensure that the initializer is not enumerable
17
+ // and does not interfere with the signal's value.
18
+ return Object.assign(Object.create(INITIALIZER_PROTO), {
19
+ value: fn
20
+ });
21
+ }
22
+ function isInitializer(obj) {
23
+ return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === INITIALIZER_PROTO;
24
+ }
12
25
 
13
26
  /**
14
27
  * A WarpDriveSignal is a wrapper around a framework specific or TC39 signal
@@ -95,7 +108,7 @@ function createInternalSignal(signals, obj, key, initialValue) {
95
108
  key,
96
109
  context: obj,
97
110
  signal: createSignal(obj, key),
98
- value: initialValue,
111
+ value: isInitializer(initialValue) ? initialValue.value.call(obj) : initialValue,
99
112
  isStale: false
100
113
  };
101
114
  signals.set(key, warpDriveSignal);
@@ -121,12 +134,12 @@ function notifyInternalSignal(signal) {
121
134
  }
122
135
  }
123
136
  function entangleSignal(signals, obj, key, initialValue) {
124
- let signal = peekInternalSignal(signals, key);
125
- if (!signal) {
126
- signal = createInternalSignal(signals, obj, key, initialValue);
137
+ let internalSignal = peekInternalSignal(signals, key);
138
+ if (!internalSignal) {
139
+ internalSignal = createInternalSignal(signals, obj, key, initialValue);
127
140
  }
128
- consumeInternalSignal(signal);
129
- return signal;
141
+ consumeInternalSignal(internalSignal);
142
+ return internalSignal;
130
143
  }
131
144
  function createSignalDescriptor(key, intialValue) {
132
145
  return {
@@ -138,10 +151,10 @@ function createSignalDescriptor(key, intialValue) {
138
151
  },
139
152
  set(value) {
140
153
  const signals = withSignalStore(this);
141
- const signal = getOrCreateInternalSignal(signals, this, key, intialValue);
142
- if (signal.value !== value) {
143
- signal.value = value;
144
- notifyInternalSignal(signal);
154
+ const internalSignal = getOrCreateInternalSignal(signals, this, key, intialValue);
155
+ if (internalSignal.value !== value) {
156
+ internalSignal.value = value;
157
+ notifyInternalSignal(internalSignal);
145
158
  }
146
159
  }
147
160
  };
@@ -171,6 +184,27 @@ function defineNonEnumerableSignal(obj, key, v) {
171
184
  desc.enumerable = false;
172
185
  Object.defineProperty(obj, key, desc);
173
186
  }
187
+ /**
188
+ * Decorator version of creating a signal.
189
+ */
190
+ function signal(target, key, descriptor) {
191
+ // Error on `@signal()`, `@signal(...args)``
192
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
193
+ if (!test) {
194
+ throw new Error('You attempted to use @signal(), which is not necessary nor supported. Remove the parentheses and you will be good to go!');
195
+ }
196
+ })(target !== undefined) : {};
197
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
198
+ if (!test) {
199
+ throw new Error(`You attempted to use @signal on with ${arguments.length > 1 ? 'arguments' : 'an argument'} ( @signal(${Array.from(arguments).map(d => `'${d}'`).join(', ')}) ), which is not supported. Dependencies are automatically tracked, so you can just use ${'`@signal`'}`);
200
+ }
201
+ })(typeof target === 'object' && typeof key === 'string' && typeof descriptor === 'object' && arguments.length === 3) : {};
202
+ return createSignalDescriptor(key, descriptor.initializer ? makeInitializer(descriptor.initializer) : null);
203
+ }
204
+
205
+ /**
206
+ * Decorator version of creating a memoized getter
207
+ */
174
208
  function memoized(target, key, descriptor) {
175
209
  // Error on `@memoized()`, `@memoized(...args)`, and `@memoized propName = value;`
176
210
  macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
@@ -202,6 +236,10 @@ function memoized(target, key, descriptor) {
202
236
  };
203
237
  return descriptor;
204
238
  }
239
+
240
+ /**
241
+ * Decorator version of creating a gate.
242
+ */
205
243
  function gate(_target, key, desc) {
206
244
  // eslint-disable-next-line @typescript-eslint/unbound-method
207
245
  const getter = desc.get;
@@ -210,34 +248,34 @@ function gate(_target, key, desc) {
210
248
  const isLocal = desc.isLocal;
211
249
  desc.get = function () {
212
250
  const signals = withSignalStore(this);
213
- let signal = peekInternalSignal(signals, key);
214
- if (!signal) {
215
- signal = createInternalSignal(signals, this, key, getter.call(this));
216
- } else if (signal.isStale) {
217
- signal.isStale = false;
218
- signal.value = getter.call(this);
219
- }
220
- consumeInternalSignal(signal);
221
- return signal.value;
251
+ let internalSignal = peekInternalSignal(signals, key);
252
+ if (!internalSignal) {
253
+ internalSignal = createInternalSignal(signals, this, key, getter.call(this));
254
+ } else if (internalSignal.isStale) {
255
+ internalSignal.isStale = false;
256
+ internalSignal.value = getter.call(this);
257
+ }
258
+ consumeInternalSignal(internalSignal);
259
+ return internalSignal.value;
222
260
  };
223
261
  if (setter) {
224
262
  desc.set = function (v) {
225
263
  const signals = withSignalStore(this);
226
- let signal = peekInternalSignal(signals, key);
227
- if (!signal) {
264
+ let internalSignal = peekInternalSignal(signals, key);
265
+ if (!internalSignal) {
228
266
  // we can't use `v` as initialValue here because setters don't
229
267
  // return the value and the final value may be different
230
268
  // than what the setter was called with.
231
- signal = createInternalSignal(signals, this, key, undefined);
232
- signal.isStale = true;
269
+ internalSignal = createInternalSignal(signals, this, key, undefined);
270
+ internalSignal.isStale = true;
233
271
  }
234
272
  setter.call(this, v);
235
273
  // when a gate is set, we do not notify the signal
236
274
  // as its update is controlled externally.
237
275
  // unless it specifically sets itself to be locally managed
238
276
  if (isLocal) {
239
- signal.isStale = true;
240
- notifyInternalSignal(signal);
277
+ internalSignal.isStale = true;
278
+ notifyInternalSignal(internalSignal);
241
279
  }
242
280
  };
243
281
  }
@@ -6645,7 +6683,7 @@ class Store extends BaseClass {
6645
6683
  * {@link CacheOptions.key | cache key} will have the request result
6646
6684
  * and document cached.
6647
6685
  *
6648
- * The cache key used is {@link RequestInfo.cacheOptions | RequestInfo.cacheOptions.key}
6686
+ * The cache key used is {@link RequestInfo.cacheOptions.key | RequestInfo.cacheOptions.key}
6649
6687
  * if present, falling back to {@link RequestInfo.url}.
6650
6688
  *
6651
6689
  * Params are not serialized as part of the cache-key, so
@@ -9048,6 +9086,14 @@ function isNeverString(val) {
9048
9086
  return val;
9049
9087
  }
9050
9088
 
9089
+ /**
9090
+ * Utilities to assist in recovering from the error.
9091
+ */
9092
+
9093
+ /**
9094
+ * Utilities for keeping the request fresh
9095
+ */
9096
+
9051
9097
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
9052
9098
 
9053
9099
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -10084,4 +10130,4 @@ function getRequestState(future) {
10084
10130
  }
10085
10131
  return state;
10086
10132
  }
10087
- export { notifyInternalSignal as A, consumeInternalSignal as B, CacheHandler as C, DISPOSE as D, getOrCreateInternalSignal as E, ReactiveResource as F, isNonIdentityCacheableField as G, getFieldCacheKeyStrict as H, checkout as I, commit as J, setIdentifierGenerationMethod as K, setIdentifierUpdateMethod as L, setIdentifierForgetMethod as M, setIdentifierResetMethod as N, setKeyInfoForResource as O, RecordArrayManager as R, Store as S, _clearCaches as _, isRequestKey as a, coerceId as b, constructResource as c, setRecordIdentifier as d, ensureStringId as e, fastPush as f, StoreMap as g, createLegacyManyArray as h, isResourceKey as i, logGroup as j, getPromiseState as k, log as l, createRequestSubscription as m, normalizeModelName as n, getRequestState as o, memoized as p, gate as q, recordIdentifierFor as r, storeFor as s, entangleSignal as t, defineSignal as u, defineGate as v, defineNonEnumerableSignal as w, Signals as x, peekInternalSignal as y, withSignalStore as z };
10133
+ export { withSignalStore as A, notifyInternalSignal as B, CacheHandler as C, DISPOSE as D, consumeInternalSignal as E, getOrCreateInternalSignal as F, ReactiveResource as G, isNonIdentityCacheableField as H, getFieldCacheKeyStrict as I, checkout as J, commit as K, setIdentifierGenerationMethod as L, setIdentifierUpdateMethod as M, setIdentifierForgetMethod as N, setIdentifierResetMethod as O, setKeyInfoForResource as P, RecordArrayManager as R, Store as S, _clearCaches as _, isRequestKey as a, coerceId as b, constructResource as c, setRecordIdentifier as d, ensureStringId as e, fastPush as f, StoreMap as g, createLegacyManyArray as h, isResourceKey as i, logGroup as j, getPromiseState as k, log as l, createRequestSubscription as m, normalizeModelName as n, getRequestState as o, signal as p, memoized as q, recordIdentifierFor as r, storeFor as s, gate as t, entangleSignal as u, defineSignal as v, defineGate as w, defineNonEnumerableSignal as x, Signals as y, peekInternalSignal as z };
@@ -1,2 +1,2 @@
1
- export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager, x as Signals, S as Store, g as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, b as coerceId, c as constructResource, B as consumeInternalSignal, h as createLegacyManyArray, m as createRequestSubscription, v as defineGate, w as defineNonEnumerableSignal, u as defineSignal, e as ensureStringId, t as entangleSignal, f as fastPush, q as gate, E as getOrCreateInternalSignal, k as getPromiseState, o as getRequestState, a as isRequestKey, i as isResourceKey, l as log, j as logGroup, p as memoized, A as notifyInternalSignal, y as peekInternalSignal, r as recordIdentifierFor, d as setRecordIdentifier, s as storeFor, z as withSignalStore } from "../request-state-CcOnn4ej.js";
1
+ export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager, y as Signals, S as Store, g as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, b as coerceId, c as constructResource, E as consumeInternalSignal, h as createLegacyManyArray, m as createRequestSubscription, w as defineGate, x as defineNonEnumerableSignal, v as defineSignal, e as ensureStringId, u as entangleSignal, f as fastPush, t as gate, F as getOrCreateInternalSignal, k as getPromiseState, o as getRequestState, a as isRequestKey, i as isResourceKey, l as log, j as logGroup, q as memoized, B as notifyInternalSignal, z as peekInternalSignal, r as recordIdentifierFor, d as setRecordIdentifier, p as signal, s as storeFor, A as withSignalStore } from "../request-state-XxA7ZVps.js";
2
2
  export { A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, c as createMemo, w as waitFor } from "../configure-B48bFHOl.js";
@@ -1,6 +1,6 @@
1
1
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
2
2
  const name = "@warp-drive/core";
3
- const version = "5.7.0-alpha.24";
3
+ const version = "5.7.0-alpha.25";
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
@@ -37,16 +37,31 @@ const STRUCTURED = getOrSetGlobal('DOC', Symbol('DOC'));
37
37
  */
38
38
 
39
39
  /**
40
- * JavaScript's native Request class.
40
+ * The {@link RequestInit} interface accepted by the native {@link fetch} API.
41
41
  *
42
42
  * WarpDrive provides our own typings due to incompleteness in the native typings.
43
43
  *
44
+ * @privateRemarks
45
+ * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)
46
+ * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)
47
+ * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)
48
+ *
44
49
  */
45
50
 
46
51
  /**
47
- * Extends JavaScript's native {@link Request} object with additional
48
- * properties specific to the RequestManager's capabilities.
52
+ * Extends JavaScript's native {@link fetch} {@link NativeRequestInit | RequestInit} with additional
53
+ * properties specific to the {@link RequestManager | RequestManager's} capabilities.
54
+ *
55
+ * This interface is used to define the shape of a request that can be made via
56
+ * either the {@link RequestManager.request} or {@link Store.request} methods.
57
+ *
58
+ * @privateRemarks
59
+ * - [MDN Reference (fetch)](https://developer.mozilla.org/docs/Web/API/Window/fetch)
60
+ * - [MDN Reference (RequestInit)](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit)
61
+ * - [MDN Reference (Request)](https://developer.mozilla.org/docs/Web/API/Request)
49
62
  *
63
+ * @public
64
+ * @since 4.12
50
65
  */
51
66
 
52
67
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warp-drive/core",
3
- "version": "5.7.0-alpha.24",
3
+ "version": "5.7.0-alpha.25",
4
4
  "description": "Core package for WarpDrive | All the Universal Basics",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@embroider/macros": "^1.16.12",
40
- "@warp-drive/build-config": "5.7.0-alpha.24"
40
+ "@warp-drive/build-config": "5.7.0-alpha.25"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/core": "^7.26.10",
44
44
  "@babel/plugin-transform-typescript": "^7.27.0",
45
45
  "@babel/preset-typescript": "^7.27.0",
46
- "@warp-drive/internal-config": "5.7.0-alpha.24",
46
+ "@warp-drive/internal-config": "5.7.0-alpha.25",
47
47
  "decorator-transforms": "^2.3.0",
48
48
  "ember-source": "~6.3.0",
49
49
  "expect-type": "^1.2.1",