@workglow/indexeddb 0.2.36 → 0.3.0
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.
- package/dist/job-queue/IndexedDbJobStore.d.ts +42 -0
- package/dist/job-queue/IndexedDbJobStore.d.ts.map +1 -0
- package/dist/job-queue/IndexedDbMessageQueue.d.ts +38 -0
- package/dist/job-queue/IndexedDbMessageQueue.d.ts.map +1 -0
- package/dist/job-queue/IndexedDbQueueStorage.d.ts +55 -7
- package/dist/job-queue/IndexedDbQueueStorage.d.ts.map +1 -1
- package/dist/job-queue/IndexedDbRateLimiterStorage.d.ts +1 -2
- package/dist/job-queue/IndexedDbRateLimiterStorage.d.ts.map +1 -1
- package/dist/job-queue/browser.js +466 -60
- package/dist/job-queue/browser.js.map +10 -7
- package/dist/job-queue/common.d.ts +3 -0
- package/dist/job-queue/common.d.ts.map +1 -1
- package/dist/job-queue/createIndexedDbQueue.d.ts +20 -0
- package/dist/job-queue/createIndexedDbQueue.d.ts.map +1 -0
- package/dist/job-queue/node.js +466 -60
- package/dist/job-queue/node.js.map +10 -7
- package/dist/migrations/IndexedDbMigrationRunner.d.ts +12 -0
- package/dist/migrations/IndexedDbMigrationRunner.d.ts.map +1 -1
- package/dist/migrations/indexedDbQueueMigrations.d.ts +11 -5
- package/dist/migrations/indexedDbQueueMigrations.d.ts.map +1 -1
- package/dist/storage/IndexedDbKvStorage.d.ts +1 -1
- package/dist/storage/IndexedDbKvStorage.d.ts.map +1 -1
- package/dist/storage/IndexedDbTabularStorage.d.ts +14 -1
- package/dist/storage/IndexedDbTabularStorage.d.ts.map +1 -1
- package/dist/storage/IndexedDbVectorStorage.d.ts +2 -2
- package/dist/storage/IndexedDbVectorStorage.d.ts.map +1 -1
- package/dist/storage/browser.js +9 -9
- package/dist/storage/browser.js.map +5 -5
- package/dist/storage/node.js +9 -9
- package/dist/storage/node.js.map +5 -5
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDbMigrationRunner.d.ts","sourceRoot":"","sources":["../../src/migrations/IndexedDbMigrationRunner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAG1B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAerE;;;;;GAKG;AACH,qBAAa,+BAAgC,SAAQ,KAAK;IACxD,YAAY,MAAM,EAAE,MAAM,EAGzB;CACF;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,wBAAyB,YAAW,gBAAgB,CAAC,uBAAuB,CAAC;IAEtF,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAFtB,YACmB,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,UAA2B,EAC/C;
|
|
1
|
+
{"version":3,"file":"IndexedDbMigrationRunner.d.ts","sourceRoot":"","sources":["../../src/migrations/IndexedDbMigrationRunner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAG1B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,UAA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17 @@ import type { IndexedDbMigration, IndexedDbMigrationGroup } from "./IndexedDbMig
|
|
|
12
12
|
* Component name is `queue:indexeddb:<tableName>` so two queues with
|
|
13
13
|
* different table names get tracked independently in `_storage_migrations`.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* v1 is FROZEN byte-for-byte against the pre-PR shape (097b4afa) — it
|
|
16
|
+
* creates the `queue_status_run_after` compound index and reads `run_after`
|
|
17
|
+
* from each row. The rename to `queue_status_visible_at` lives in v2,
|
|
18
|
+
* which also walks every existing row and copies `run_after → visible_at`
|
|
19
|
+
* synchronously inside the upgrade transaction.
|
|
20
|
+
*
|
|
21
|
+
* Schema (post v2): a single object store keyed by `id` plus four compound
|
|
22
|
+
* indexes (queue/status, queue/status/visible_at, queue/job_run_id,
|
|
23
|
+
* queue/fingerprint/status). When `prefixes` is non-empty the prefix
|
|
24
|
+
* columns are prepended to every index key path so per-tenant queries can
|
|
25
|
+
* be served directly by the index.
|
|
20
26
|
*/
|
|
21
27
|
export declare function indexedDbQueueMigrations(tableName: string, prefixes: readonly PrefixColumn[]): IndexedDbMigration[];
|
|
22
28
|
/** Returns the queue migrations packaged with their target IDB database name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexedDbQueueMigrations.d.ts","sourceRoot":"","sources":["../../src/migrations/indexedDbQueueMigrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE9F
|
|
1
|
+
{"version":3,"file":"indexedDbQueueMigrations.d.ts","sourceRoot":"","sources":["../../src/migrations/indexedDbQueueMigrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE9F;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,SAAS,YAAY,EAAE,GAChC,kBAAkB,EAAE,CAuGtB;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,SAAS,YAAY,EAAE,GAChC,uBAAuB,CAKzB"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { DefaultKeyValueKey, DefaultKeyValueSchema, IKvStorage, KvViaTabularStorage } from "@workglow/storage";
|
|
6
7
|
import { JsonSchema } from "@workglow/util/schema";
|
|
7
8
|
import { IndexedDbTabularStorage } from "./IndexedDbTabularStorage";
|
|
8
|
-
import { DefaultKeyValueKey, DefaultKeyValueSchema, IKvStorage, KvViaTabularStorage } from "@workglow/storage";
|
|
9
9
|
export declare const IDB_KV_REPOSITORY: import("@workglow/util").ServiceToken<IKvStorage<string, any, any>>;
|
|
10
10
|
/**
|
|
11
11
|
* A key-value repository implementation that uses IndexedDB for persistent storage in the browser.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDbKvStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbKvStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"IndexedDbKvStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbKvStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,eAAO,MAAM,iBAAiB,qEAE7B,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IAUhD,MAAM,EAAE,MAAM;IAThB,iBAAiB,EAAE,uBAAuB,CAC/C,OAAO,qBAAqB,EAC5B,OAAO,kBAAkB,CAC1B,CAAC;IAEF;;OAEG;IACH,YACS,MAAM,EAAE,MAAM,EACrB,SAAS,GAAE,UAA+B,EAC1C,WAAW,GAAE,UAAe,EAQ7B;CACF"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { AnyTabularStorage, AutoGeneratedKeys, BaseTabularStorage, ClientProvidedKeysOption, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, KeyGenerationStrategy, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions, type ITabularMigration, type ITabularMigrationApplier } from "@workglow/storage";
|
|
6
7
|
import { DataPortSchemaObject, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
|
-
import { BaseTabularStorage, ClientProvidedKeysOption, KeyGenerationStrategy, AnyTabularStorage, AutoGeneratedKeys, CoveringIndexQueryOptions, DeleteSearchCriteria, InsertEntity, QueryOptions, SearchCriteria, SimplifyPrimaryKey, TabularChangePayload, TabularSubscribeOptions, type ITabularMigration, type ITabularMigrationApplier } from "@workglow/storage";
|
|
8
8
|
import { MigrationOptions } from "./IndexedDbTable";
|
|
9
9
|
export declare const IDB_TABULAR_REPOSITORY: import("@workglow/util").ServiceToken<AnyTabularStorage>;
|
|
10
10
|
/**
|
|
@@ -56,6 +56,10 @@ export declare class IndexedDbTabularStorage<Schema extends DataPortSchemaObject
|
|
|
56
56
|
readonly useBroadcastChannel?: boolean;
|
|
57
57
|
readonly backupPollingIntervalMs?: number;
|
|
58
58
|
}, clientProvidedKeys?: ClientProvidedKeysOption, tabularMigrations?: ReadonlyArray<ITabularMigration>);
|
|
59
|
+
/**
|
|
60
|
+
* Internal method to get the database, setting it up if needed.
|
|
61
|
+
* This ensures lazy initialization of the database.
|
|
62
|
+
*/
|
|
59
63
|
private getDb;
|
|
60
64
|
/**
|
|
61
65
|
* Sets up the IndexedDB database table with the required schema and indexes.
|
|
@@ -70,7 +74,16 @@ export declare class IndexedDbTabularStorage<Schema extends DataPortSchemaObject
|
|
|
70
74
|
* InvalidStateError on the next transaction attempt (e.g. during backfill).
|
|
71
75
|
*/
|
|
72
76
|
private rewireOnVersionChange;
|
|
77
|
+
/**
|
|
78
|
+
* Read-only probe: does the object store already exist in the IDB
|
|
79
|
+
* database? Used by `setupDatabase` to decide between the orchestrator's
|
|
80
|
+
* fresh-DB fast path (mark-all-applied) and the run-pending path.
|
|
81
|
+
* Delegates to the shared `idbObjectStoreExists` helper.
|
|
82
|
+
*/
|
|
73
83
|
private probeObjectStoreExists;
|
|
84
|
+
/**
|
|
85
|
+
* Internal method to perform the actual database setup
|
|
86
|
+
*/
|
|
74
87
|
private performSetup;
|
|
75
88
|
getMigrationApplier(): ITabularMigrationApplier | null;
|
|
76
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDbTabularStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"IndexedDbTabularStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbTabularStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EAEpB,YAAY,EAE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,CAAC,MAAM,EAAE,CAAC,CAAC,GAC5C,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAsI5B;IAED;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA0CxB;;;;;;;OAOG;IACa,kBAAkB,CAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAAK,IAAI,EACxD,OAAO,CAAC,EAAE,uBAAuB,GAChC,MAAM,IAAI,CAMZ;IAED;;OAEG;IACa,OAAO,IAAI,IAAI,CAM9B;CACF"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import type { AnyVectorStorage, ClientProvidedKeysOption, IVectorStorage, VectorSearchOptions } from "@workglow/storage";
|
|
6
7
|
import type { DataPortSchemaObject, FromSchema, TypedArray, TypedArrayConstructor, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
7
|
-
import { IndexedDbTabularStorage } from "./IndexedDbTabularStorage";
|
|
8
|
-
import type { ClientProvidedKeysOption, AnyVectorStorage, IVectorStorage, VectorSearchOptions } from "@workglow/storage";
|
|
9
8
|
import type { MigrationOptions } from "./IndexedDbTable";
|
|
9
|
+
import { IndexedDbTabularStorage } from "./IndexedDbTabularStorage";
|
|
10
10
|
export declare const IDB_VECTOR_REPOSITORY: import("@workglow/util").ServiceToken<AnyVectorStorage>;
|
|
11
11
|
/**
|
|
12
12
|
* IndexedDB vector storage implementation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDbVectorStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbVectorStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"IndexedDbVectorStorage.d.ts","sourceRoot":"","sources":["../../src/storage/IndexedDbVectorStorage.ts"],"names":[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B,EACvC,kBAAkB,GAAE,wBAAuC,EAa5D;IAED;;;OAGG;IACH,mBAAmB,IAAI,MAAM,CAE5B;IAEK,gBAAgB,CACpB,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;eAGnB,MAAM;UAmC9C;CACF"}
|
package/dist/storage/browser.js
CHANGED
|
@@ -311,16 +311,21 @@ async function dropIndexedDbTable(tableName) {
|
|
|
311
311
|
return deleteIndexedDbTable(tableName);
|
|
312
312
|
}
|
|
313
313
|
// src/storage/IndexedDbKvStorage.ts
|
|
314
|
+
import {
|
|
315
|
+
DefaultKeyValueKey,
|
|
316
|
+
DefaultKeyValueSchema,
|
|
317
|
+
KvViaTabularStorage
|
|
318
|
+
} from "@workglow/storage";
|
|
314
319
|
import { createServiceToken as createServiceToken2 } from "@workglow/util";
|
|
315
320
|
|
|
316
321
|
// src/storage/IndexedDbTabularStorage.ts
|
|
317
|
-
import { createServiceToken, deepEqual as deepEqual2, makeFingerprint, uuid4 } from "@workglow/util";
|
|
318
322
|
import {
|
|
319
|
-
HybridSubscriptionManager,
|
|
320
323
|
BaseTabularStorage,
|
|
324
|
+
HybridSubscriptionManager,
|
|
321
325
|
isSearchCondition,
|
|
322
326
|
pickCoveringIndex
|
|
323
327
|
} from "@workglow/storage";
|
|
328
|
+
import { createServiceToken, deepEqual as deepEqual2, makeFingerprint, uuid4 } from "@workglow/util";
|
|
324
329
|
|
|
325
330
|
// src/migrations/IndexedDbMigrationRunner.ts
|
|
326
331
|
import {
|
|
@@ -1489,11 +1494,6 @@ function compareWithOperator(a, op, b) {
|
|
|
1489
1494
|
}
|
|
1490
1495
|
|
|
1491
1496
|
// src/storage/IndexedDbKvStorage.ts
|
|
1492
|
-
import {
|
|
1493
|
-
DefaultKeyValueKey,
|
|
1494
|
-
DefaultKeyValueSchema,
|
|
1495
|
-
KvViaTabularStorage
|
|
1496
|
-
} from "@workglow/storage";
|
|
1497
1497
|
var IDB_KV_REPOSITORY = createServiceToken2("storage.kvRepository.indexedDb");
|
|
1498
1498
|
|
|
1499
1499
|
class IndexedDbKvStorage extends KvViaTabularStorage {
|
|
@@ -1506,9 +1506,9 @@ class IndexedDbKvStorage extends KvViaTabularStorage {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
// src/storage/IndexedDbVectorStorage.ts
|
|
1509
|
+
import { getMetadataProperty, getVectorProperty } from "@workglow/storage";
|
|
1509
1510
|
import { createServiceToken as createServiceToken3 } from "@workglow/util";
|
|
1510
1511
|
import { cosineSimilarity } from "@workglow/util/schema";
|
|
1511
|
-
import { getMetadataProperty, getVectorProperty } from "@workglow/storage";
|
|
1512
1512
|
var IDB_VECTOR_REPOSITORY = createServiceToken3("storage.vectorRepository.indexedDb");
|
|
1513
1513
|
function matchesFilter(metadata, filter) {
|
|
1514
1514
|
for (const [key, value] of Object.entries(filter)) {
|
|
@@ -1577,4 +1577,4 @@ export {
|
|
|
1577
1577
|
IDB_KV_REPOSITORY
|
|
1578
1578
|
};
|
|
1579
1579
|
|
|
1580
|
-
//# debugId=
|
|
1580
|
+
//# debugId=CD2FBCB851BA8ED364756E2164756E21
|