@proseql/node 0.1.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/LICENSE +21 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/node-adapter-layer.d.ts +22 -0
- package/dist/node-adapter-layer.d.ts.map +1 -0
- package/dist/node-adapter-layer.js +120 -0
- package/dist/node-adapter-layer.js.map +1 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Simon W. Jackson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @proseql/node - Node.js adapter for ProseQL
|
|
3
|
+
*
|
|
4
|
+
* Re-exports everything from @proseql/core plus Node.js filesystem storage.
|
|
5
|
+
*/
|
|
6
|
+
export * from "@proseql/core";
|
|
7
|
+
export type { NodeAdapterConfig } from "./node-adapter-layer.js";
|
|
8
|
+
export { makeNodeStorageLayer, NodeStorageLayer, } from "./node-adapter-layer.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACN,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @proseql/node - Node.js adapter for ProseQL
|
|
3
|
+
*
|
|
4
|
+
* Re-exports everything from @proseql/core plus Node.js filesystem storage.
|
|
5
|
+
*/
|
|
6
|
+
// Re-export everything from core
|
|
7
|
+
export * from "@proseql/core";
|
|
8
|
+
// Export Node.js storage adapter
|
|
9
|
+
export { makeNodeStorageLayer, NodeStorageLayer, } from "./node-adapter-layer.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iCAAiC;AACjC,cAAc,eAAe,CAAC;AAE9B,iCAAiC;AACjC,OAAO,EACN,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js filesystem implementation of StorageAdapter as an Effect Layer.
|
|
3
|
+
* Provides atomic writes (temp file + rename) and retry with exponential backoff.
|
|
4
|
+
*/
|
|
5
|
+
import { StorageAdapterService as StorageAdapter } from "@proseql/core";
|
|
6
|
+
import { Layer } from "effect";
|
|
7
|
+
export interface NodeAdapterConfig {
|
|
8
|
+
readonly maxRetries?: number;
|
|
9
|
+
readonly baseDelay?: number;
|
|
10
|
+
readonly createMissingDirectories?: boolean;
|
|
11
|
+
readonly fileMode?: number;
|
|
12
|
+
readonly dirMode?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates a NodeStorageLayer with custom configuration.
|
|
16
|
+
*/
|
|
17
|
+
export declare const makeNodeStorageLayer: (config?: NodeAdapterConfig) => Layer.Layer<StorageAdapter>;
|
|
18
|
+
/**
|
|
19
|
+
* Default NodeStorageLayer with standard configuration.
|
|
20
|
+
*/
|
|
21
|
+
export declare const NodeStorageLayer: Layer.Layer<StorageAdapter>;
|
|
22
|
+
//# sourceMappingURL=node-adapter-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-adapter-layer.d.ts","sourceRoot":"","sources":["../src/node-adapter-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,qBAAqB,IAAI,cAAc,EAGvC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,KAAK,EAAY,MAAM,QAAQ,CAAC;AAMjD,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC1B;AA2KD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAChC,SAAQ,iBAAsB,KAC5B,KAAK,CAAC,KAAK,CAAC,cAAc,CAG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,cAAc,CAClC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Node.js filesystem implementation of StorageAdapter as an Effect Layer.
|
|
3
|
+
* Provides atomic writes (temp file + rename) and retry with exponential backoff.
|
|
4
|
+
*/
|
|
5
|
+
import { randomBytes } from "node:crypto";
|
|
6
|
+
import { promises as fs, watch as fsWatch } from "node:fs";
|
|
7
|
+
import { dirname } from "node:path";
|
|
8
|
+
import { StorageAdapterService as StorageAdapter, StorageError, } from "@proseql/core";
|
|
9
|
+
import { Effect, Layer, Schedule } from "effect";
|
|
10
|
+
const defaultConfig = {
|
|
11
|
+
maxRetries: 3,
|
|
12
|
+
baseDelay: 100,
|
|
13
|
+
createMissingDirectories: true,
|
|
14
|
+
fileMode: 0o644,
|
|
15
|
+
dirMode: 0o755,
|
|
16
|
+
};
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Helpers
|
|
19
|
+
// ============================================================================
|
|
20
|
+
const toStorageError = (path, operation, error) => new StorageError({
|
|
21
|
+
path,
|
|
22
|
+
operation,
|
|
23
|
+
message: error instanceof Error ? error.message : `Unknown ${operation} error`,
|
|
24
|
+
cause: error,
|
|
25
|
+
});
|
|
26
|
+
const retryPolicy = (config) => Schedule.intersect(Schedule.exponential(config.baseDelay), Schedule.recurs(config.maxRetries));
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// Storage operations
|
|
29
|
+
// ============================================================================
|
|
30
|
+
const makeRead = (config) => (path) => Effect.tryPromise({
|
|
31
|
+
try: () => fs.readFile(path, "utf-8"),
|
|
32
|
+
catch: (error) => toStorageError(path, "read", error),
|
|
33
|
+
}).pipe(Effect.retry(retryPolicy(config)));
|
|
34
|
+
const makeWrite = (config) => (path, data) => {
|
|
35
|
+
const tempPath = `${path}.tmp.${randomBytes(8).toString("hex")}`;
|
|
36
|
+
const ensureParentDir = config.createMissingDirectories
|
|
37
|
+
? Effect.tryPromise({
|
|
38
|
+
try: () => fs.mkdir(dirname(path), {
|
|
39
|
+
recursive: true,
|
|
40
|
+
mode: config.dirMode,
|
|
41
|
+
}),
|
|
42
|
+
catch: (error) => toStorageError(dirname(path), "write", error),
|
|
43
|
+
}).pipe(Effect.asVoid)
|
|
44
|
+
: Effect.void;
|
|
45
|
+
const writeAndRename = Effect.tryPromise({
|
|
46
|
+
try: () => fs.writeFile(tempPath, data, { mode: config.fileMode }),
|
|
47
|
+
catch: (error) => toStorageError(path, "write", error),
|
|
48
|
+
}).pipe(Effect.andThen(Effect.tryPromise({
|
|
49
|
+
try: () => fs.rename(tempPath, path),
|
|
50
|
+
catch: (error) => toStorageError(path, "write", error),
|
|
51
|
+
})), Effect.catchAll((error) => Effect.tryPromise({
|
|
52
|
+
try: () => fs.unlink(tempPath),
|
|
53
|
+
catch: () => error,
|
|
54
|
+
}).pipe(Effect.ignore, Effect.andThen(Effect.fail(error)))));
|
|
55
|
+
return ensureParentDir.pipe(Effect.andThen(writeAndRename), Effect.retry(retryPolicy(config)));
|
|
56
|
+
};
|
|
57
|
+
const makeAppend = (config) => (path, data) => {
|
|
58
|
+
const ensureParentDir = config.createMissingDirectories
|
|
59
|
+
? Effect.tryPromise({
|
|
60
|
+
try: () => fs.mkdir(dirname(path), {
|
|
61
|
+
recursive: true,
|
|
62
|
+
mode: config.dirMode,
|
|
63
|
+
}),
|
|
64
|
+
catch: (error) => toStorageError(dirname(path), "write", error),
|
|
65
|
+
}).pipe(Effect.asVoid)
|
|
66
|
+
: Effect.void;
|
|
67
|
+
return ensureParentDir.pipe(Effect.andThen(Effect.tryPromise({
|
|
68
|
+
try: () => fs.appendFile(path, data, { mode: config.fileMode }),
|
|
69
|
+
catch: (error) => toStorageError(path, "write", error),
|
|
70
|
+
})), Effect.retry(retryPolicy(config)));
|
|
71
|
+
};
|
|
72
|
+
const makeExists = (_config) => (path) => Effect.tryPromise({
|
|
73
|
+
try: () => fs.access(path).then(() => true),
|
|
74
|
+
catch: () => false,
|
|
75
|
+
}).pipe(Effect.catchAll(() => Effect.succeed(false)));
|
|
76
|
+
const makeRemove = (config) => (path) => Effect.tryPromise({
|
|
77
|
+
try: () => fs.unlink(path),
|
|
78
|
+
catch: (error) => toStorageError(path, "delete", error),
|
|
79
|
+
}).pipe(Effect.retry(retryPolicy(config)));
|
|
80
|
+
const makeEnsureDir = (config) => (path) => Effect.tryPromise({
|
|
81
|
+
try: () => fs.mkdir(dirname(path), { recursive: true, mode: config.dirMode }),
|
|
82
|
+
catch: (error) => toStorageError(dirname(path), "write", error),
|
|
83
|
+
}).pipe(Effect.asVoid, Effect.retry(retryPolicy(config)));
|
|
84
|
+
// ============================================================================
|
|
85
|
+
// Layer construction
|
|
86
|
+
// ============================================================================
|
|
87
|
+
const makeWatch = (_config) => (path, onChange) => Effect.try({
|
|
88
|
+
try: () => {
|
|
89
|
+
const watcher = fsWatch(path, { persistent: false }, (eventType) => {
|
|
90
|
+
if (eventType === "change") {
|
|
91
|
+
onChange();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return () => {
|
|
95
|
+
watcher.close();
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
catch: (error) => toStorageError(path, "watch", error),
|
|
99
|
+
});
|
|
100
|
+
const makeAdapter = (config) => ({
|
|
101
|
+
read: makeRead(config),
|
|
102
|
+
write: makeWrite(config),
|
|
103
|
+
append: makeAppend(config),
|
|
104
|
+
exists: makeExists(config),
|
|
105
|
+
remove: makeRemove(config),
|
|
106
|
+
ensureDir: makeEnsureDir(config),
|
|
107
|
+
watch: makeWatch(config),
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Creates a NodeStorageLayer with custom configuration.
|
|
111
|
+
*/
|
|
112
|
+
export const makeNodeStorageLayer = (config = {}) => {
|
|
113
|
+
const resolved = { ...defaultConfig, ...config };
|
|
114
|
+
return Layer.succeed(StorageAdapter, makeAdapter(resolved));
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Default NodeStorageLayer with standard configuration.
|
|
118
|
+
*/
|
|
119
|
+
export const NodeStorageLayer = makeNodeStorageLayer();
|
|
120
|
+
//# sourceMappingURL=node-adapter-layer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-adapter-layer.js","sourceRoot":"","sources":["../src/node-adapter-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACN,qBAAqB,IAAI,cAAc,EAEvC,YAAY,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAcjD,MAAM,aAAa,GAAgC;IAClD,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,GAAG;IACd,wBAAwB,EAAE,IAAI;IAC9B,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK;CACd,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,cAAc,GAAG,CACtB,IAAY,EACZ,SAAoC,EACpC,KAAc,EACC,EAAE,CACjB,IAAI,YAAY,CAAC;IAChB,IAAI;IACJ,SAAS;IACT,OAAO,EACN,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,SAAS,QAAQ;IACtE,KAAK,EAAE,KAAK;CACZ,CAAC,CAAC;AAEJ,MAAM,WAAW,GAAG,CAAC,MAAmC,EAAE,EAAE,CAC3D,QAAQ,C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;YACZ,CAAC;QACF,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACX,OAAO,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC;CACtD,CAAC,CAAC;AAEL,MAAM,WAAW,GAAG,CACnB,MAAmC,EACb,EAAE,CAAC,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC;IACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;IAC1B,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CACnC,SAA4B,EAAE,EACA,EAAE;IAChC,MAAM,QAAQ,GAAG,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,CAAC;IACjD,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC5B,oBAAoB,EAAE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proseql/node",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Node.js file system adapter for ProseQL, re-exports core plus NodeStorageLayer",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "bunx tsc --build",
|
|
8
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
9
|
+
"prepublishOnly": "bun run build && bun test"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Simon W. Jackson",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/simonwjackson/proseql.git",
|
|
32
|
+
"directory": "packages/node"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"database",
|
|
36
|
+
"typescript",
|
|
37
|
+
"effect",
|
|
38
|
+
"yaml",
|
|
39
|
+
"json",
|
|
40
|
+
"plain-text",
|
|
41
|
+
"type-safe",
|
|
42
|
+
"in-memory",
|
|
43
|
+
"node",
|
|
44
|
+
"filesystem"
|
|
45
|
+
],
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=18"
|
|
48
|
+
},
|
|
49
|
+
"sideEffects": false,
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@proseql/core": "workspace:*"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"effect": "^3.15.2"
|
|
55
|
+
}
|
|
56
|
+
}
|