@zudojs/storage 0.0.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 (69) hide show
  1. package/README.md +38 -0
  2. package/dist/database/connectionPool.core.d.ts.map +1 -0
  3. package/dist/database/connectionPool.core.js +166 -0
  4. package/dist/database/connectionPool.core.js.map +1 -0
  5. package/dist/database/index.d.ts +5 -0
  6. package/dist/database/index.d.ts.map +1 -0
  7. package/dist/database/index.js +5 -0
  8. package/dist/database/index.js.map +1 -0
  9. package/dist/health/healthChecker.core.d.ts +53 -0
  10. package/dist/health/healthChecker.core.d.ts.map +1 -0
  11. package/dist/health/healthChecker.core.js +84 -0
  12. package/dist/health/healthChecker.core.js.map +1 -0
  13. package/dist/health/index.d.ts +6 -0
  14. package/dist/health/index.d.ts.map +1 -0
  15. package/dist/health/index.js +5 -0
  16. package/dist/health/index.js.map +1 -0
  17. package/dist/index.d.ts +39 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +36 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/lifecycle/index.d.ts +5 -0
  22. package/dist/lifecycle/index.d.ts.map +1 -0
  23. package/dist/lifecycle/index.js +5 -0
  24. package/dist/lifecycle/index.js.map +1 -0
  25. package/dist/lifecycle/storageLifecycle.core.d.ts +26 -0
  26. package/dist/lifecycle/storageLifecycle.core.d.ts.map +1 -0
  27. package/dist/lifecycle/storageLifecycle.core.js +71 -0
  28. package/dist/lifecycle/storageLifecycle.core.js.map +1 -0
  29. package/dist/locking/inMemoryLock.core.d.ts +28 -0
  30. package/dist/locking/inMemoryLock.core.d.ts.map +1 -0
  31. package/dist/locking/inMemoryLock.core.js +120 -0
  32. package/dist/locking/inMemoryLock.core.js.map +1 -0
  33. package/dist/locking/index.d.ts +5 -0
  34. package/dist/locking/index.d.ts.map +1 -0
  35. package/dist/locking/index.js +5 -0
  36. package/dist/locking/index.js.map +1 -0
  37. package/dist/objectStorage/index.d.ts +5 -0
  38. package/dist/objectStorage/index.d.ts.map +1 -0
  39. package/dist/objectStorage/index.js +5 -0
  40. package/dist/objectStorage/index.js.map +1 -0
  41. package/dist/objectStorage/localObjectStorage.core.d.ts +24 -0
  42. package/dist/objectStorage/localObjectStorage.core.d.ts.map +1 -0
  43. package/dist/objectStorage/localObjectStorage.core.js +151 -0
  44. package/dist/objectStorage/localObjectStorage.core.js.map +1 -0
  45. package/dist/repository/baseRepository.core.d.ts +64 -0
  46. package/dist/repository/baseRepository.core.d.ts.map +1 -0
  47. package/dist/repository/baseRepository.core.js +145 -0
  48. package/dist/repository/baseRepository.core.js.map +1 -0
  49. package/dist/repository/index.d.ts +6 -0
  50. package/dist/repository/index.d.ts.map +1 -0
  51. package/dist/repository/index.js +5 -0
  52. package/dist/repository/index.js.map +1 -0
  53. package/dist/serialization/index.d.ts +5 -0
  54. package/dist/serialization/index.d.ts.map +1 -0
  55. package/dist/serialization/index.js +5 -0
  56. package/dist/serialization/index.js.map +1 -0
  57. package/dist/serialization/jsonSerializer.core.d.ts +21 -0
  58. package/dist/serialization/jsonSerializer.core.d.ts.map +1 -0
  59. package/dist/serialization/jsonSerializer.core.js +29 -0
  60. package/dist/serialization/jsonSerializer.core.js.map +1 -0
  61. package/dist/types/index.d.ts +7 -0
  62. package/dist/types/index.d.ts.map +1 -0
  63. package/dist/types/index.js +7 -0
  64. package/dist/types/index.js.map +1 -0
  65. package/dist/types/storage.type.d.ts +9 -0
  66. package/dist/types/storage.type.d.ts.map +1 -0
  67. package/dist/types/storage.type.js +9 -0
  68. package/dist/types/storage.type.js.map +1 -0
  69. package/package.json +55 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonSerializer.core.d.ts","sourceRoot":"","sources":["../../src/serialization/jsonSerializer.core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGhF;;;;;;GAMG;AACH,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IAEvC,cAEC;IAED,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,UAAU,CAGhE;IAED,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAGjE;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @zudojs/storage — JSON Serializer
3
+ *
4
+ * Serializes/deserializes data for storage with support for BigInt, Date,
5
+ * Map, Set, and Uint8Array via @zudojs/serialization's type preservation.
6
+ */
7
+ import { JSONSerializer } from "@zudojs/serialization";
8
+ /**
9
+ * JSON serializer with extended type support for storage operations.
10
+ *
11
+ * Delegates to @zudojs/serialization's JSONSerializer for type preservation
12
+ * (BigInt, Date, Map, Set, Uint8Array) and wraps the output as Uint8Array
13
+ * to satisfy the storage Serializer contract.
14
+ */
15
+ export class JsonSerializer {
16
+ inner;
17
+ constructor() {
18
+ this.inner = new JSONSerializer();
19
+ }
20
+ serialize(value, _format) {
21
+ const json = this.inner.serialize(value, { preserveTypes: true });
22
+ return new TextEncoder().encode(json);
23
+ }
24
+ deserialize(data, _format) {
25
+ const json = new TextDecoder().decode(data);
26
+ return this.inner.deserialize(json, { preserveTypes: true });
27
+ }
28
+ }
29
+ //# sourceMappingURL=jsonSerializer.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonSerializer.core.js","sourceRoot":"","sources":["../../src/serialization/jsonSerializer.core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACR,KAAK,CAAiB;IAEvC;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,cAAc,EAAE,CAAC;IACpC,CAAC;IAED,SAAS,CAAI,KAAQ,EAAE,OAA6B;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,WAAW,CAAI,IAAgB,EAAE,OAA6B;QAC5D,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAI,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/storage — Types Barrel
3
+ *
4
+ * Re-exports all storage type definitions.
5
+ */
6
+ export type { ConnectionState, TransactionState, IsolationLevel, QueryParameter, Query, QueryResult, ExecuteResult, FieldInfo, Connection, ConnectionPoolOptions, PoolStats, TransactionOptions, Transaction, StorageHealth, Database, ObjectPutOptions, ObjectMetadata, ObjectData, ObjectStorage, ListObjectsResult, Repository, SerializationFormat, Serializer, Lock, LockOptions, LockManager, StorageLifecyclePhase, StorageLifecycle, StorageContext, } from "./storage.type.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,KAAK,EACL,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,SAAS,EACT,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,GACf,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/storage — Types Barrel
3
+ *
4
+ * Re-exports all storage type definitions.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @zudojs/storage — Core Types
3
+ *
4
+ * All interfaces and type definitions for the storage infrastructure.
5
+ */
6
+ export * from "./storageDatabase.type.js";
7
+ export * from "./storageObject.type.js";
8
+ export * from "./storageOther.type.js";
9
+ //# sourceMappingURL=storage.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.type.d.ts","sourceRoot":"","sources":["../../src/types/storage.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @zudojs/storage — Core Types
3
+ *
4
+ * All interfaces and type definitions for the storage infrastructure.
5
+ */
6
+ export * from "./storageDatabase.type.js";
7
+ export * from "./storageObject.type.js";
8
+ export * from "./storageOther.type.js";
9
+ //# sourceMappingURL=storage.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.type.js","sourceRoot":"","sources":["../../src/types/storage.type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@zudojs/storage",
3
+ "version": "0.0.1",
4
+ "description": "Storage abstractions including database, object storage, repository, serialization, locking, and lifecycle.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.json",
21
+ "clean": "rm -rf dist",
22
+ "typecheck": "tsc -p tsconfig.json --noEmit",
23
+ "test": "vitest run",
24
+ "test:watch": "vitest"
25
+ },
26
+ "dependencies": {
27
+ "@zudojs/errors": "workspace:*",
28
+ "@zudojs/constants": "workspace:*",
29
+ "@zudojs/types": "workspace:*",
30
+ "@zudojs/serialization": "workspace:*"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "7.0.2",
34
+ "vitest": "^4.1.11",
35
+ "@types/node": "^26.4.1"
36
+ },
37
+ "engines": {
38
+ "node": ">=24.0.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "keywords": [
44
+ "zudojs",
45
+ "storage",
46
+ "database",
47
+ "files",
48
+ "cache"
49
+ ],
50
+ "homepage": "https://github.com/oyinlola-tech/zudo#readme",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/oyinlola-tech/zudo"
54
+ }
55
+ }