@warp-drive-mirror/experiments 0.2.5-alpha.27 → 0.2.5-alpha.28

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,14 +1,6 @@
1
- import type { Store } from "@warp-drive-mirror/core";
2
- import type { RequestKey } from "@warp-drive-mirror/core/types/identifier";
3
1
  import type { ImmutableCreateRequestOptions, ImmutableDeleteRequestOptions, ImmutableRequestInfo, ImmutableUpdateRequestOptions, StructuredDataDocument } from "@warp-drive-mirror/core/types/request";
4
2
  import type { ApiError } from "@warp-drive-mirror/core/types/spec/error";
5
3
  export declare const MUTATION_OPS: Set<string>;
6
- /**
7
- * In a Worker, any time we are asked to make a request, data needs to be returned.
8
- * background requests are ergo no different than foreground requests.
9
- * @internal
10
- */
11
- export declare function calcShouldFetch(store: Store, request: ImmutableRequestInfo, hasCachedValue: boolean, identifier: RequestKey | null): boolean;
12
4
  export declare function isMutation(request: Partial<ImmutableRequestInfo>): request is ImmutableUpdateRequestOptions | ImmutableCreateRequestOptions | ImmutableDeleteRequestOptions;
13
5
  export declare function isCacheAffecting<T>(document: StructuredDataDocument<T>): boolean;
14
6
  type RobustError = Error & {
@@ -1,4 +1,5 @@
1
1
  import { D as DocumentStorage } from "./index-CGCX7hY2.js";
2
+ import { assertPrivateStore } from '@warp-drive-mirror/core/store/-private';
2
3
  import { SkipCache } from '@warp-drive-mirror/core/types/request';
3
4
  import { macroCondition, getGlobalConfig } from '@embroider/macros';
4
5
  const WorkerScope = globalThis.SharedWorkerGlobalScope;
@@ -306,6 +307,7 @@ function updateCacheForSuccess(store, request, document) {
306
307
  }
307
308
  function handleFetchSuccess(store, request, identifier, document) {
308
309
  let response;
310
+ assertPrivateStore(store);
309
311
  store._join(() => {
310
312
  response = updateCacheForSuccess(store, request, document);
311
313
  });
@@ -333,6 +335,7 @@ function handleFetchError(store, request, identifier, error) {
333
335
  if (request.signal?.aborted) {
334
336
  throw error;
335
337
  }
338
+ assertPrivateStore(store);
336
339
  let response;
337
340
  store._join(() => {
338
341
  response = updateCacheForError(store, request, error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-drive-mirror/experiments",
3
3
  "description": "Experimental features for EmberData/WarpDrive",
4
- "version": "0.2.5-alpha.27",
4
+ "version": "0.2.5-alpha.28",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "peerDependencies": {
46
46
  "@sqlite.org/sqlite-wasm": "3.46.0-build2",
47
- "@warp-drive-mirror/core": "5.7.0-alpha.27"
47
+ "@warp-drive-mirror/core": "5.7.0-alpha.28"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "@sqlite.org/sqlite-wasm": {
@@ -59,8 +59,8 @@
59
59
  "@babel/plugin-transform-typescript": "^7.27.0",
60
60
  "@babel/preset-env": "^7.26.9",
61
61
  "@babel/preset-typescript": "^7.27.0",
62
- "@warp-drive/internal-config": "5.7.0-alpha.27",
63
- "@warp-drive-mirror/core": "5.7.0-alpha.27",
62
+ "@warp-drive/internal-config": "5.7.0-alpha.28",
63
+ "@warp-drive-mirror/core": "5.7.0-alpha.28",
64
64
  "@sqlite.org/sqlite-wasm": "3.46.0-build2",
65
65
  "typescript": "^5.8.3",
66
66
  "vite": "^7.0.0"