@workglow/indexeddb 0.2.31 → 0.2.32

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 (31) hide show
  1. package/README.md +34 -0
  2. package/dist/job-queue/IndexedDbQueueStorage.d.ts +16 -11
  3. package/dist/job-queue/IndexedDbQueueStorage.d.ts.map +1 -1
  4. package/dist/job-queue/IndexedDbRateLimiterStorage.d.ts +15 -4
  5. package/dist/job-queue/IndexedDbRateLimiterStorage.d.ts.map +1 -1
  6. package/dist/job-queue/browser.js +399 -351
  7. package/dist/job-queue/browser.js.map +9 -6
  8. package/dist/job-queue/common.d.ts +3 -0
  9. package/dist/job-queue/common.d.ts.map +1 -1
  10. package/dist/job-queue/node.js +399 -351
  11. package/dist/job-queue/node.js.map +9 -6
  12. package/dist/migrations/IndexedDbMigrationRunner.d.ts +93 -0
  13. package/dist/migrations/IndexedDbMigrationRunner.d.ts.map +1 -0
  14. package/dist/migrations/indexedDbQueueMigrations.d.ts +24 -0
  15. package/dist/migrations/indexedDbQueueMigrations.d.ts.map +1 -0
  16. package/dist/migrations/indexedDbRateLimiterMigrations.d.ts +37 -0
  17. package/dist/migrations/indexedDbRateLimiterMigrations.d.ts.map +1 -0
  18. package/dist/storage/IndexedDbTable.d.ts.map +1 -1
  19. package/dist/storage/IndexedDbTabularMigrationApplier.d.ts +84 -0
  20. package/dist/storage/IndexedDbTabularMigrationApplier.d.ts.map +1 -0
  21. package/dist/storage/IndexedDbTabularStorage.d.ts +21 -2
  22. package/dist/storage/IndexedDbTabularStorage.d.ts.map +1 -1
  23. package/dist/storage/browser.js +472 -30
  24. package/dist/storage/browser.js.map +8 -5
  25. package/dist/storage/common.d.ts +3 -0
  26. package/dist/storage/common.d.ts.map +1 -1
  27. package/dist/storage/node.js +472 -30
  28. package/dist/storage/node.js.map +8 -5
  29. package/dist/storage/openIdb.d.ts +19 -0
  30. package/dist/storage/openIdb.d.ts.map +1 -0
  31. package/package.json +7 -7
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Opens an IDB connection and wires `onversionchange` so a future schema
8
+ * bump in another tab can close this connection rather than blocking the
9
+ * upgrade indefinitely.
10
+ *
11
+ * Pass `version` + `onUpgradeNeeded` only when the call site is itself
12
+ * running a schema upgrade. Most callers want the no-arg form: open at
13
+ * the database's current version and use it for reads/writes.
14
+ */
15
+ export declare function openIdb(dbName: string, options?: {
16
+ readonly version?: number;
17
+ readonly onUpgradeNeeded?: (event: IDBVersionChangeEvent) => void;
18
+ }): Promise<IDBDatabase>;
19
+ //# sourceMappingURL=openIdb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openIdb.d.ts","sourceRoot":"","sources":["../../src/storage/openIdb.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IACP,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAC9D,GACL,OAAO,CAAC,WAAW,CAAC,CAwBtB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workglow/indexeddb",
3
3
  "type": "module",
4
- "version": "0.2.31",
4
+ "version": "0.2.32",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/workglow-dev/workglow.git",
@@ -54,9 +54,9 @@
54
54
  }
55
55
  },
56
56
  "peerDependencies": {
57
- "@workglow/job-queue": "0.2.31",
58
- "@workglow/storage": "0.2.31",
59
- "@workglow/util": "0.2.31"
57
+ "@workglow/job-queue": "0.2.32",
58
+ "@workglow/storage": "0.2.32",
59
+ "@workglow/util": "0.2.32"
60
60
  },
61
61
  "peerDependenciesMeta": {
62
62
  "@workglow/job-queue": {
@@ -71,9 +71,9 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "fake-indexeddb": "^6.2.4",
74
- "@workglow/job-queue": "0.2.31",
75
- "@workglow/storage": "0.2.31",
76
- "@workglow/util": "0.2.31"
74
+ "@workglow/job-queue": "0.2.32",
75
+ "@workglow/storage": "0.2.32",
76
+ "@workglow/util": "0.2.32"
77
77
  },
78
78
  "files": [
79
79
  "dist",