@vite-hub/kv 0.4.1 → 0.5.1

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 (62) hide show
  1. package/README.md +7 -3
  2. package/dist/{batch--v0ri69O.js → batch-D-ib5_0P.js} +0 -1
  3. package/dist/{cli-DpPhz_Ek.d.ts → cli-BvVInMht.d.ts} +1 -6
  4. package/dist/cli.d.ts +2 -4
  5. package/dist/cli.js +24 -14
  6. package/dist/{cloudflare-env-lOtHHsgP.js → cloudflare-env-Bm6huR35.js} +4 -4
  7. package/dist/{cloudflare-env-lookup-Bs0VDpU5.js → cloudflare-env-lookup-Dgq5n1Aq.js} +1 -2
  8. package/dist/{cloudflare-kv-C3NO4C21.js → cloudflare-kv-K2MzfP6D.js} +12 -16
  9. package/dist/{cloudflare-kv-local-C2sbIrFy.js → cloudflare-kv-local-lov9LLhU.js} +5 -10
  10. package/dist/{config-LfpUj9hs.js → config-B8FRGmX_.js} +53 -22
  11. package/dist/{create-storage-BORQm2a8.js → create-storage-BMvkkYdM.js} +9 -15
  12. package/dist/{cursor-history-DRHh5bO5.js → cursor-history-C6oG12QO.js} +9 -6
  13. package/dist/{deno-kv-D_VtffFv.js → deno-kv-MnqlNH1e.js} +45 -10
  14. package/dist/{dev-peer-CHafxbtj.js → dev-peer-D0vOxmrD.js} +1 -2
  15. package/dist/driver-bLMl-wMO.d.ts +43 -0
  16. package/dist/durability.d.ts +1 -3
  17. package/dist/durability.js +1 -2
  18. package/dist/{error-diagnostics-C54QQEhN.js → error-diagnostics-DUIp6FhO.js} +7 -4
  19. package/dist/{errors-DzD6YNEH.js → errors-IaVOqzAs.js} +42 -8
  20. package/dist/errors.d.ts +8 -5
  21. package/dist/errors.js +1 -2
  22. package/dist/fs-lite-DhXLUL-H.js +1 -0
  23. package/dist/{fs-lite-BaklCLuV.js → fs-lite-fvNdBEr9.js} +3 -5
  24. package/dist/index.d.ts +1 -3
  25. package/dist/index.js +34 -66
  26. package/dist/{inspect-BIKQsqX4.js → inspect-BWMcVWD8.js} +2 -4
  27. package/dist/{invariant-DolT9EEx.js → invariant-Dj2R1eMr.js} +1 -2
  28. package/dist/{object-Da1zyPCR.js → object-CAK6UYR5.js} +1 -2
  29. package/dist/{operation-definition-nmRu_O3V.d.ts → operation-definition-CqZkx1Rm.d.ts} +8 -6
  30. package/dist/{operations-D2iI9oN4.js → operations-CGAX5ASA.js} +53 -28
  31. package/dist/{operations-CtrWLmPK.js → operations-FgS_sJ3M.js} +27 -45
  32. package/dist/operations.d.ts +2 -8
  33. package/dist/operations.js +8 -12
  34. package/dist/out-By90R-Bo.js +22706 -0
  35. package/dist/{redis-shared-5ogRd3-Y.js → redis-shared-DO7Ib1Sz.js} +2 -3
  36. package/dist/request-log-DllKQXj7.js +104 -0
  37. package/dist/results-emgN7uDS.js +4 -0
  38. package/dist/rolldown-runtime-DegdyBIC.js +25 -0
  39. package/dist/runtime/cloudflare-kv.d.ts +1 -3
  40. package/dist/runtime/cloudflare-kv.js +1 -2
  41. package/dist/runtime/cloudflare-request-env.d.ts +1 -3
  42. package/dist/runtime/cloudflare-request-env.js +2 -3
  43. package/dist/runtime/database.d.ts +2 -0
  44. package/dist/{database-oJdy0ZVX.js → runtime/database.js} +69 -39
  45. package/dist/runtime/nitro-plugin.d.ts +1 -2
  46. package/dist/runtime/nitro-plugin.js +11 -8
  47. package/dist/runtime/redis-driver.d.ts +3 -5
  48. package/dist/runtime/redis-driver.js +6 -10
  49. package/dist/runtime/unstorage-driver.d.ts +2 -4
  50. package/dist/runtime/unstorage-driver.js +2 -3
  51. package/dist/runtime/upstash-driver.d.ts +3 -5
  52. package/dist/runtime/upstash-driver.js +6 -11
  53. package/dist/{types-Bj3EQoRg.d.ts → types-BUb0FcjM.d.ts} +0 -2
  54. package/dist/{types-Dv-OSXZC.d.ts → types-C397WKyf.d.ts} +4 -20
  55. package/dist/{upstash-B-vaUYqO.js → upstash-DQVo1zbz.js} +3 -4
  56. package/dist/{utils2-FozcTsmb.js → utils2-By8eee1x.js} +1 -2
  57. package/dist/vite.d.ts +8 -19
  58. package/dist/vite.js +2676 -104
  59. package/package.json +15 -10
  60. package/dist/driver-R4Z5Z5fl.d.ts +0 -15
  61. package/dist/fs-lite-BAgpmNAF.js +0 -2
  62. package/dist/results-p7nPCnaJ.js +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/kv",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "Vite-first key-value storage primitives and integration for ViteHub.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -46,6 +46,11 @@
46
46
  "import": "./dist/durability.js",
47
47
  "default": "./dist/durability.js"
48
48
  },
49
+ "./runtime/database": {
50
+ "types": "./dist/runtime/database.d.ts",
51
+ "import": "./dist/runtime/database.js",
52
+ "default": "./dist/runtime/database.js"
53
+ },
49
54
  "./runtime/redis-driver": {
50
55
  "types": "./dist/runtime/redis-driver.d.ts",
51
56
  "import": "./dist/runtime/redis-driver.js",
@@ -70,33 +75,33 @@
70
75
  },
71
76
  "dependencies": {
72
77
  "@valibot/to-json-schema": "^1.8.0",
73
- "@vite-hub/runtime": "0.4.1",
78
+ "@vite-hub/runtime": "0.5.1",
74
79
  "birpc": "^4.2.0",
75
80
  "defu": "^6.1.7",
76
81
  "destr": "^2.0.5",
77
- "ioredis": "^5.11.1",
82
+ "ioredis": "^6.1.0",
78
83
  "nostics": "1.4.0",
79
84
  "proper-lockfile": "4.1.2",
80
85
  "unstorage": "2.0.0-beta.0",
81
86
  "valibot": "^1.5.0"
82
87
  },
83
88
  "devDependencies": {
84
- "@types/node": "^24.19.1",
89
+ "@types/node": "^24.19.2",
85
90
  "@libsql/client": "^0.18.0",
86
- "@vite-hub/database": "0.4.1",
91
+ "@vite-hub/database": "0.5.1",
87
92
  "@types/proper-lockfile": "4.1.4",
88
93
  "@vite-hub/internal": "0.0.1",
89
94
  "ofetch": "^1.5.1",
90
95
  "postgres": "^3.4.9",
91
96
  "publint": "^0.3.25",
92
97
  "typescript": "^6.0.3",
93
- "vite": "^8.2.2",
94
- "vite-plus": "^0.3.3",
95
- "vitest": "^4.1.11"
98
+ "vite": "^8.3.8",
99
+ "vite-plus": "^1.7.0",
100
+ "vitest": "5.1.0"
96
101
  },
97
102
  "peerDependencies": {
98
- "@upstash/redis": "^1.39.0",
99
- "@vite-hub/database": "0.4.1",
103
+ "@upstash/redis": "^1.41.0",
104
+ "@vite-hub/database": "0.5.1",
100
105
  "vite": ">=8.0.0"
101
106
  },
102
107
  "peerDependenciesMeta": {
@@ -1,15 +0,0 @@
1
- import { i as TransactionOptions, t as Driver } from "./types-Bj3EQoRg.js";
2
- import { T as KVPageOptions, _ as KVListPage } from "./types-Dv-OSXZC.js";
3
- //#region src/runtime/driver.d.ts
4
- type KVRuntimeDriver = Driver & Record<string, unknown> & {
5
- validateBatch?: (items: Parameters<NonNullable<Driver["setItems"]>>[0], removals: string[], options?: TransactionOptions) => void | Promise<void>;
6
- /** Deletes the key when it holds the serialized `expected` value. Resolves `true` when this call deleted it. */
7
- deleteIfEqualsItem?: (key: string, expected: string) => Promise<boolean>;
8
- getAndDeleteItem?: <T = unknown>(key: string) => Promise<T | null>;
9
- incrementItem?: (key: string, ttl: number) => Promise<number>;
10
- listKeys: (options: KVPageOptions) => Promise<KVListPage>;
11
- /** Writes the serialized value only when the key is missing. Resolves `true` when this call wrote it. */
12
- setIfAbsentItem?: (key: string, value: string, ttl?: number) => Promise<boolean>;
13
- };
14
- //#endregion
15
- export { KVRuntimeDriver as t };
@@ -1,2 +0,0 @@
1
- import { t as createFsLiteKVDriver } from "./fs-lite-BaklCLuV.js";
2
- export { createFsLiteKVDriver as default };
@@ -1,6 +0,0 @@
1
- //#region src/results.ts
2
- /** Results of the `kv.*` operations, as `vitehub kv` and the Console read them. */
3
- /** Largest `--limit` of one `list` page. */
4
- const kvDevMaximumListLimit = 1e3;
5
- //#endregion
6
- export { kvDevMaximumListLimit as t };