@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.
- package/README.md +38 -0
- package/dist/database/connectionPool.core.d.ts.map +1 -0
- package/dist/database/connectionPool.core.js +166 -0
- package/dist/database/connectionPool.core.js.map +1 -0
- package/dist/database/index.d.ts +5 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +5 -0
- package/dist/database/index.js.map +1 -0
- package/dist/health/healthChecker.core.d.ts +53 -0
- package/dist/health/healthChecker.core.d.ts.map +1 -0
- package/dist/health/healthChecker.core.js +84 -0
- package/dist/health/healthChecker.core.js.map +1 -0
- package/dist/health/index.d.ts +6 -0
- package/dist/health/index.d.ts.map +1 -0
- package/dist/health/index.js +5 -0
- package/dist/health/index.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle/index.d.ts +5 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/index.js +5 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle/storageLifecycle.core.d.ts +26 -0
- package/dist/lifecycle/storageLifecycle.core.d.ts.map +1 -0
- package/dist/lifecycle/storageLifecycle.core.js +71 -0
- package/dist/lifecycle/storageLifecycle.core.js.map +1 -0
- package/dist/locking/inMemoryLock.core.d.ts +28 -0
- package/dist/locking/inMemoryLock.core.d.ts.map +1 -0
- package/dist/locking/inMemoryLock.core.js +120 -0
- package/dist/locking/inMemoryLock.core.js.map +1 -0
- package/dist/locking/index.d.ts +5 -0
- package/dist/locking/index.d.ts.map +1 -0
- package/dist/locking/index.js +5 -0
- package/dist/locking/index.js.map +1 -0
- package/dist/objectStorage/index.d.ts +5 -0
- package/dist/objectStorage/index.d.ts.map +1 -0
- package/dist/objectStorage/index.js +5 -0
- package/dist/objectStorage/index.js.map +1 -0
- package/dist/objectStorage/localObjectStorage.core.d.ts +24 -0
- package/dist/objectStorage/localObjectStorage.core.d.ts.map +1 -0
- package/dist/objectStorage/localObjectStorage.core.js +151 -0
- package/dist/objectStorage/localObjectStorage.core.js.map +1 -0
- package/dist/repository/baseRepository.core.d.ts +64 -0
- package/dist/repository/baseRepository.core.d.ts.map +1 -0
- package/dist/repository/baseRepository.core.js +145 -0
- package/dist/repository/baseRepository.core.js.map +1 -0
- package/dist/repository/index.d.ts +6 -0
- package/dist/repository/index.d.ts.map +1 -0
- package/dist/repository/index.js +5 -0
- package/dist/repository/index.js.map +1 -0
- package/dist/serialization/index.d.ts +5 -0
- package/dist/serialization/index.d.ts.map +1 -0
- package/dist/serialization/index.js +5 -0
- package/dist/serialization/index.js.map +1 -0
- package/dist/serialization/jsonSerializer.core.d.ts +21 -0
- package/dist/serialization/jsonSerializer.core.d.ts.map +1 -0
- package/dist/serialization/jsonSerializer.core.js +29 -0
- package/dist/serialization/jsonSerializer.core.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/storage.type.d.ts +9 -0
- package/dist/types/storage.type.d.ts.map +1 -0
- package/dist/types/storage.type.js +9 -0
- package/dist/types/storage.type.js.map +1 -0
- 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 @@
|
|
|
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
|
+
}
|