@soda-gql/common 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/LICENSE +21 -0
- package/dist/canonical-id/index.cjs +9 -0
- package/dist/canonical-id/index.d.cts +2 -0
- package/dist/canonical-id/index.d.ts +2 -0
- package/dist/canonical-id/index.js +4 -0
- package/dist/canonical-id-Bn6ZPdZl.js +155 -0
- package/dist/canonical-id-Bn6ZPdZl.js.map +1 -0
- package/dist/canonical-id-CE4Xjo2C.cjs +192 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/index-B_QJzQA2.d.cts +9 -0
- package/dist/index-B_QJzQA2.d.cts.map +1 -0
- package/dist/index-C0n5gWc3.d.cts +88 -0
- package/dist/index-C0n5gWc3.d.cts.map +1 -0
- package/dist/index-C8yyrGd7.d.cts +124 -0
- package/dist/index-C8yyrGd7.d.cts.map +1 -0
- package/dist/index-CcSB32XQ.d.ts +60 -0
- package/dist/index-CcSB32XQ.d.ts.map +1 -0
- package/dist/index-D6Lx478n.d.ts +124 -0
- package/dist/index-D6Lx478n.d.ts.map +1 -0
- package/dist/index-DN4VW1v7.d.ts +9 -0
- package/dist/index-DN4VW1v7.d.ts.map +1 -0
- package/dist/index-Fi3RpHje.d.cts +60 -0
- package/dist/index-Fi3RpHje.d.cts.map +1 -0
- package/dist/index-LjtXZhxM.d.ts +88 -0
- package/dist/index-LjtXZhxM.d.ts.map +1 -0
- package/dist/index.cjs +30 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/portable/index.cjs +13 -0
- package/dist/portable/index.d.cts +2 -0
- package/dist/portable/index.d.ts +2 -0
- package/dist/portable/index.js +3 -0
- package/dist/portable-BqSEwase.js +249 -0
- package/dist/portable-BqSEwase.js.map +1 -0
- package/dist/portable-Bq_Qob6b.cjs +308 -0
- package/dist/utils/index.cjs +9 -0
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils-DxBnV8tL.js +100 -0
- package/dist/utils-DxBnV8tL.js.map +1 -0
- package/dist/utils-NBAPoMgh.cjs +143 -0
- package/dist/zod/index.cjs +3 -0
- package/dist/zod/index.d.cts +2 -0
- package/dist/zod/index.d.ts +2 -0
- package/dist/zod/index.js +3 -0
- package/dist/zod-B1gOOwdX.cjs +16 -0
- package/dist/zod-BPbnZc6i.js +10 -0
- package/dist/zod-BPbnZc6i.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region packages/common/src/portable/runtime.ts
|
|
8
|
+
/**
|
|
9
|
+
* Runtime detection utilities for portable API implementation
|
|
10
|
+
*/
|
|
11
|
+
const runtime = {
|
|
12
|
+
isBun: typeof Bun !== "undefined",
|
|
13
|
+
isNode: typeof process !== "undefined" && typeof Bun === "undefined",
|
|
14
|
+
supportsWebCrypto: typeof crypto !== "undefined" && typeof crypto.subtle !== "undefined"
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Helper to cache module imports to avoid repeated dynamic imports
|
|
18
|
+
*/
|
|
19
|
+
function once(fn) {
|
|
20
|
+
let result;
|
|
21
|
+
let called = false;
|
|
22
|
+
return () => {
|
|
23
|
+
if (!called) {
|
|
24
|
+
result = fn();
|
|
25
|
+
called = true;
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reset runtime state for testing purposes only
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
function resetPortableForTests() {}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region packages/common/src/portable/fs.ts
|
|
38
|
+
const getNodeFS = once(async () => {
|
|
39
|
+
const fs = await import("node:fs/promises");
|
|
40
|
+
return fs;
|
|
41
|
+
});
|
|
42
|
+
function createPortableFS() {
|
|
43
|
+
if (runtime.isBun) {
|
|
44
|
+
return {
|
|
45
|
+
async readFile(path) {
|
|
46
|
+
const file = Bun.file(path);
|
|
47
|
+
return await file.text();
|
|
48
|
+
},
|
|
49
|
+
async writeFile(path, content) {
|
|
50
|
+
await Bun.write(path, content);
|
|
51
|
+
},
|
|
52
|
+
async exists(path) {
|
|
53
|
+
const nodeFS = await getNodeFS();
|
|
54
|
+
try {
|
|
55
|
+
await nodeFS.stat(path);
|
|
56
|
+
return true;
|
|
57
|
+
} catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
async stat(path) {
|
|
62
|
+
const file = Bun.file(path);
|
|
63
|
+
const size = file.size;
|
|
64
|
+
const nodeFS = await getNodeFS();
|
|
65
|
+
const { mtime } = await nodeFS.stat(path);
|
|
66
|
+
return {
|
|
67
|
+
mtime,
|
|
68
|
+
size
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
async rename(oldPath, newPath) {
|
|
72
|
+
const nodeFS = await getNodeFS();
|
|
73
|
+
await nodeFS.rename(oldPath, newPath);
|
|
74
|
+
},
|
|
75
|
+
async mkdir(path, options) {
|
|
76
|
+
const nodeFS = await getNodeFS();
|
|
77
|
+
await nodeFS.mkdir(path, options);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
async readFile(path) {
|
|
83
|
+
const nodeFS = await getNodeFS();
|
|
84
|
+
return await nodeFS.readFile(path, "utf-8");
|
|
85
|
+
},
|
|
86
|
+
async writeFile(path, content) {
|
|
87
|
+
const nodeFS = await getNodeFS();
|
|
88
|
+
const pathModule = await import("node:path");
|
|
89
|
+
const dir = pathModule.dirname(path);
|
|
90
|
+
await nodeFS.mkdir(dir, { recursive: true });
|
|
91
|
+
await nodeFS.writeFile(path, content, "utf-8");
|
|
92
|
+
},
|
|
93
|
+
async exists(path) {
|
|
94
|
+
const nodeFS = await getNodeFS();
|
|
95
|
+
try {
|
|
96
|
+
await nodeFS.access(path);
|
|
97
|
+
return true;
|
|
98
|
+
} catch {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
async stat(path) {
|
|
103
|
+
const nodeFS = await getNodeFS();
|
|
104
|
+
const stats = await nodeFS.stat(path);
|
|
105
|
+
return {
|
|
106
|
+
mtime: stats.mtime,
|
|
107
|
+
size: stats.size
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
async rename(oldPath, newPath) {
|
|
111
|
+
const nodeFS = await getNodeFS();
|
|
112
|
+
await nodeFS.rename(oldPath, newPath);
|
|
113
|
+
},
|
|
114
|
+
async mkdir(path, options) {
|
|
115
|
+
const nodeFS = await getNodeFS();
|
|
116
|
+
await nodeFS.mkdir(path, options);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
let fsInstance = null;
|
|
121
|
+
function getPortableFS() {
|
|
122
|
+
if (!fsInstance) {
|
|
123
|
+
fsInstance = createPortableFS();
|
|
124
|
+
}
|
|
125
|
+
return fsInstance;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Reset the filesystem singleton for testing
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
function __resetPortableFSForTests() {
|
|
132
|
+
fsInstance = null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region packages/common/src/portable/hash.ts
|
|
137
|
+
/**
|
|
138
|
+
* Pads a hex string to the specified length
|
|
139
|
+
*/
|
|
140
|
+
function padHex(hex, length) {
|
|
141
|
+
return hex.padStart(length, "0");
|
|
142
|
+
}
|
|
143
|
+
function createPortableHasher() {
|
|
144
|
+
if (runtime.isBun) {
|
|
145
|
+
return { hash(content, algorithm = "xxhash") {
|
|
146
|
+
if (algorithm === "sha256") {
|
|
147
|
+
const hasher = new Bun.CryptoHasher("sha256");
|
|
148
|
+
hasher.update(content);
|
|
149
|
+
return hasher.digest("hex");
|
|
150
|
+
}
|
|
151
|
+
const hashNum = Bun.hash(content);
|
|
152
|
+
return padHex(hashNum.toString(16), 16);
|
|
153
|
+
} };
|
|
154
|
+
}
|
|
155
|
+
return { hash(content, algorithm = "xxhash") {
|
|
156
|
+
if (algorithm === "sha256") {
|
|
157
|
+
const crypto$2 = __require("node:crypto");
|
|
158
|
+
return crypto$2.createHash("sha256").update(content).digest("hex");
|
|
159
|
+
}
|
|
160
|
+
const crypto$1 = __require("node:crypto");
|
|
161
|
+
const sha256Hash = crypto$1.createHash("sha256").update(content).digest("hex");
|
|
162
|
+
return sha256Hash.substring(0, 16);
|
|
163
|
+
} };
|
|
164
|
+
}
|
|
165
|
+
let hasherInstance = null;
|
|
166
|
+
function getPortableHasher() {
|
|
167
|
+
if (!hasherInstance) {
|
|
168
|
+
hasherInstance = createPortableHasher();
|
|
169
|
+
}
|
|
170
|
+
return hasherInstance;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Reset the hasher singleton for testing
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
function __resetPortableHasherForTests() {
|
|
177
|
+
hasherInstance = null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region packages/common/src/portable/id.ts
|
|
182
|
+
/**
|
|
183
|
+
* Generate a unique ID
|
|
184
|
+
* Uses UUIDv7 on Bun (monotonic), falls back to randomUUID on Node.js
|
|
185
|
+
*/
|
|
186
|
+
function generateId() {
|
|
187
|
+
if (runtime.isBun && typeof Bun !== "undefined" && typeof Bun.randomUUIDv7 === "function") {
|
|
188
|
+
return Bun.randomUUIDv7();
|
|
189
|
+
}
|
|
190
|
+
const crypto$1 = __require("node:crypto");
|
|
191
|
+
return crypto$1.randomUUID();
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
//#endregion
|
|
195
|
+
//#region packages/common/src/portable/spawn.ts
|
|
196
|
+
async function spawn(options) {
|
|
197
|
+
if (runtime.isBun) {
|
|
198
|
+
const proc = Bun.spawn(options.cmd, {
|
|
199
|
+
cwd: options.cwd,
|
|
200
|
+
env: options.env,
|
|
201
|
+
stdout: "pipe",
|
|
202
|
+
stderr: "pipe"
|
|
203
|
+
});
|
|
204
|
+
const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);
|
|
205
|
+
const exitCode = await proc.exited;
|
|
206
|
+
return {
|
|
207
|
+
stdout,
|
|
208
|
+
stderr,
|
|
209
|
+
exitCode
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
const { execFile } = await import("node:child_process");
|
|
213
|
+
const { promisify } = await import("node:util");
|
|
214
|
+
const execFilePromise = promisify(execFile);
|
|
215
|
+
const [command, ...args] = options.cmd;
|
|
216
|
+
if (!command) {
|
|
217
|
+
return {
|
|
218
|
+
stdout: "",
|
|
219
|
+
stderr: "Error: No command provided",
|
|
220
|
+
exitCode: 1
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
try {
|
|
224
|
+
const execOptions = { encoding: "utf-8" };
|
|
225
|
+
if (options.cwd) {
|
|
226
|
+
execOptions.cwd = options.cwd;
|
|
227
|
+
}
|
|
228
|
+
if (options.env) {
|
|
229
|
+
execOptions.env = options.env;
|
|
230
|
+
}
|
|
231
|
+
const { stdout, stderr } = await execFilePromise(command, args, execOptions);
|
|
232
|
+
return {
|
|
233
|
+
stdout: stdout || "",
|
|
234
|
+
stderr: stderr || "",
|
|
235
|
+
exitCode: 0
|
|
236
|
+
};
|
|
237
|
+
} catch (error) {
|
|
238
|
+
const err = error;
|
|
239
|
+
return {
|
|
240
|
+
stdout: err.stdout || "",
|
|
241
|
+
stderr: err.stderr || "",
|
|
242
|
+
exitCode: err.code || 1
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
//#endregion
|
|
248
|
+
export { __resetPortableFSForTests, __resetPortableHasherForTests, createPortableFS, createPortableHasher, generateId, getPortableFS, getPortableHasher, once, resetPortableForTests, runtime, spawn };
|
|
249
|
+
//# sourceMappingURL=portable-BqSEwase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portable-BqSEwase.js","names":["result: T | undefined","fsInstance: PortableFS | null","crypto","hasherInstance: PortableHasher | null","crypto","execOptions: {\n cwd?: string;\n env?: Record<string, string>;\n encoding: BufferEncoding;\n }","error: unknown"],"sources":["../src/portable/runtime.ts","../src/portable/fs.ts","../src/portable/hash.ts","../src/portable/id.ts","../src/portable/spawn.ts"],"sourcesContent":["/**\n * Runtime detection utilities for portable API implementation\n */\n\nexport const runtime = {\n isBun: typeof Bun !== \"undefined\",\n isNode: typeof process !== \"undefined\" && typeof Bun === \"undefined\",\n supportsWebCrypto: typeof crypto !== \"undefined\" && typeof crypto.subtle !== \"undefined\",\n} as const;\n\n/**\n * Helper to cache module imports to avoid repeated dynamic imports\n */\nexport function once<T>(fn: () => T): () => T {\n let result: T | undefined;\n let called = false;\n\n return () => {\n if (!called) {\n result = fn();\n called = true;\n }\n return result as T;\n };\n}\n\n/**\n * Reset runtime state for testing purposes only\n * @internal\n */\nexport function resetPortableForTests(): void {\n // This is a marker function that portable modules can use\n // to reset their singleton state in tests\n}\n","/**\n * Portable filesystem API that works on both Bun and Node.js\n */\n\nimport { once, runtime } from \"./runtime\";\n\nexport interface PortableFS {\n readFile(path: string): Promise<string>;\n writeFile(path: string, content: string): Promise<void>;\n exists(path: string): Promise<boolean>;\n stat(path: string): Promise<{ mtime: Date; size: number }>;\n rename(oldPath: string, newPath: string): Promise<void>;\n mkdir(path: string, options?: { recursive?: boolean }): Promise<void>;\n}\n\ninterface FSPromises {\n readFile: (path: string, encoding: string) => Promise<string>;\n writeFile: (path: string, content: string, encoding: string) => Promise<void>;\n access: (path: string) => Promise<void>;\n stat: (path: string) => Promise<{\n mtime: Date;\n size: number;\n isDirectory: () => boolean;\n }>;\n rename: (oldPath: string, newPath: string) => Promise<void>;\n mkdir: (path: string, options?: { recursive?: boolean }) => Promise<void>;\n}\n\n// Cache the fs/promises import\nconst getNodeFS = once(async (): Promise<FSPromises> => {\n const fs = await import(\"node:fs/promises\");\n return fs as FSPromises;\n});\n\nexport function createPortableFS(): PortableFS {\n if (runtime.isBun) {\n return {\n async readFile(path) {\n const file = Bun.file(path);\n return await file.text();\n },\n\n async writeFile(path, content) {\n // Bun.write auto-creates parent directories\n await Bun.write(path, content);\n },\n\n async exists(path) {\n // Bun.file().exists() only works for files, use fs.stat for both files and dirs\n const nodeFS = await getNodeFS();\n try {\n await nodeFS.stat(path);\n return true;\n } catch {\n return false;\n }\n },\n\n async stat(path) {\n const file = Bun.file(path);\n const size = file.size;\n // Bun doesn't expose mtime directly, use Node fs.stat\n const nodeFS = await getNodeFS();\n const { mtime } = await nodeFS.stat(path);\n return { mtime, size };\n },\n\n async rename(oldPath, newPath) {\n const nodeFS = await getNodeFS();\n await nodeFS.rename(oldPath, newPath);\n },\n\n async mkdir(path, options) {\n const nodeFS = await getNodeFS();\n await nodeFS.mkdir(path, options);\n },\n };\n }\n\n // Node.js implementation\n return {\n async readFile(path) {\n const nodeFS = await getNodeFS();\n return await nodeFS.readFile(path, \"utf-8\");\n },\n\n async writeFile(path, content) {\n const nodeFS = await getNodeFS();\n // Auto-create parent directories like Bun.write does\n const pathModule = await import(\"node:path\");\n const dir = pathModule.dirname(path);\n await nodeFS.mkdir(dir, { recursive: true });\n await nodeFS.writeFile(path, content, \"utf-8\");\n },\n\n async exists(path) {\n const nodeFS = await getNodeFS();\n try {\n await nodeFS.access(path);\n return true;\n } catch {\n return false;\n }\n },\n\n async stat(path) {\n const nodeFS = await getNodeFS();\n const stats = await nodeFS.stat(path);\n return { mtime: stats.mtime, size: stats.size };\n },\n\n async rename(oldPath, newPath) {\n const nodeFS = await getNodeFS();\n await nodeFS.rename(oldPath, newPath);\n },\n\n async mkdir(path, options) {\n const nodeFS = await getNodeFS();\n await nodeFS.mkdir(path, options);\n },\n };\n}\n\n// Singleton to avoid recreating instances\nlet fsInstance: PortableFS | null = null;\n\nexport function getPortableFS(): PortableFS {\n if (!fsInstance) {\n fsInstance = createPortableFS();\n }\n return fsInstance;\n}\n\n/**\n * Reset the filesystem singleton for testing\n * @internal\n */\nexport function __resetPortableFSForTests(): void {\n fsInstance = null;\n}\n","/**\n * Portable hashing API that works on both Bun and Node.js\n */\n\nimport { runtime } from \"./runtime\";\n\nexport type HashAlgorithm = \"sha256\" | \"xxhash\";\n\nexport interface PortableHasher {\n hash(content: string, algorithm?: HashAlgorithm): string;\n}\n\n/**\n * Pads a hex string to the specified length\n */\nfunction padHex(hex: string, length: number): string {\n return hex.padStart(length, \"0\");\n}\n\nexport function createPortableHasher(): PortableHasher {\n if (runtime.isBun) {\n return {\n hash(content, algorithm = \"xxhash\") {\n if (algorithm === \"sha256\") {\n const hasher = new Bun.CryptoHasher(\"sha256\");\n hasher.update(content);\n return hasher.digest(\"hex\");\n }\n // xxhash - Bun.hash returns a number\n const hashNum = Bun.hash(content);\n // Convert to hex and pad to 16 chars for consistency\n return padHex(hashNum.toString(16), 16);\n },\n };\n }\n\n // Node.js implementation\n return {\n hash(content, algorithm = \"xxhash\") {\n if (algorithm === \"sha256\") {\n const crypto = require(\"node:crypto\");\n return crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n }\n // xxhash fallback: use sha256 for now (can add xxhash package later if needed)\n // This ensures consistent behavior across runtimes\n const crypto = require(\"node:crypto\");\n const sha256Hash = crypto.createHash(\"sha256\").update(content).digest(\"hex\");\n // Take first 16 chars to match xxhash output length\n return sha256Hash.substring(0, 16);\n },\n };\n}\n\n// Singleton to avoid recreating instances\nlet hasherInstance: PortableHasher | null = null;\n\nexport function getPortableHasher(): PortableHasher {\n if (!hasherInstance) {\n hasherInstance = createPortableHasher();\n }\n return hasherInstance;\n}\n\n/**\n * Reset the hasher singleton for testing\n * @internal\n */\nexport function __resetPortableHasherForTests(): void {\n hasherInstance = null;\n}\n","/**\n * Portable ID generation that works on both Bun and Node.js\n */\n\nimport { runtime } from \"./runtime\";\n\n/**\n * Generate a unique ID\n * Uses UUIDv7 on Bun (monotonic), falls back to randomUUID on Node.js\n */\nexport function generateId(): string {\n if (runtime.isBun && typeof Bun !== \"undefined\" && typeof Bun.randomUUIDv7 === \"function\") {\n return Bun.randomUUIDv7();\n }\n\n // Node.js fallback: use crypto.randomUUID\n const crypto = require(\"node:crypto\");\n return crypto.randomUUID();\n}\n","/**\n * Portable subprocess spawning that works on both Bun and Node.js\n */\n\nimport { runtime } from \"./runtime\";\n\nexport interface SpawnOptions {\n cmd: string[];\n cwd?: string;\n env?: Record<string, string>;\n}\n\nexport interface SpawnResult {\n stdout: string;\n stderr: string;\n exitCode: number;\n}\n\nexport async function spawn(options: SpawnOptions): Promise<SpawnResult> {\n if (runtime.isBun) {\n const proc = Bun.spawn(options.cmd, {\n cwd: options.cwd,\n env: options.env,\n stdout: \"pipe\",\n stderr: \"pipe\",\n });\n\n const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);\n\n const exitCode = await proc.exited;\n\n return { stdout, stderr, exitCode };\n }\n\n // Node.js implementation\n const { execFile } = await import(\"node:child_process\");\n const { promisify } = await import(\"node:util\");\n const execFilePromise = promisify(execFile);\n\n const [command, ...args] = options.cmd;\n if (!command) {\n return {\n stdout: \"\",\n stderr: \"Error: No command provided\",\n exitCode: 1,\n };\n }\n\n try {\n const execOptions: {\n cwd?: string;\n env?: Record<string, string>;\n encoding: BufferEncoding;\n } = {\n encoding: \"utf-8\",\n };\n\n if (options.cwd) {\n execOptions.cwd = options.cwd;\n }\n if (options.env) {\n execOptions.env = options.env;\n }\n\n const { stdout, stderr } = await execFilePromise(command, args, execOptions);\n return {\n stdout: stdout || \"\",\n stderr: stderr || \"\",\n exitCode: 0,\n };\n } catch (error: unknown) {\n const err = error as {\n stdout?: string;\n stderr?: string;\n code?: number;\n };\n return {\n stdout: err.stdout || \"\",\n stderr: err.stderr || \"\",\n exitCode: err.code || 1,\n };\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
|
|
2
|
+
//#region packages/common/src/portable/runtime.ts
|
|
3
|
+
/**
|
|
4
|
+
* Runtime detection utilities for portable API implementation
|
|
5
|
+
*/
|
|
6
|
+
const runtime = {
|
|
7
|
+
isBun: typeof Bun !== "undefined",
|
|
8
|
+
isNode: typeof process !== "undefined" && typeof Bun === "undefined",
|
|
9
|
+
supportsWebCrypto: typeof crypto !== "undefined" && typeof crypto.subtle !== "undefined"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Helper to cache module imports to avoid repeated dynamic imports
|
|
13
|
+
*/
|
|
14
|
+
function once(fn) {
|
|
15
|
+
let result;
|
|
16
|
+
let called = false;
|
|
17
|
+
return () => {
|
|
18
|
+
if (!called) {
|
|
19
|
+
result = fn();
|
|
20
|
+
called = true;
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Reset runtime state for testing purposes only
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
function resetPortableForTests() {}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region packages/common/src/portable/fs.ts
|
|
33
|
+
const getNodeFS = once(async () => {
|
|
34
|
+
const fs = await import("node:fs/promises");
|
|
35
|
+
return fs;
|
|
36
|
+
});
|
|
37
|
+
function createPortableFS() {
|
|
38
|
+
if (runtime.isBun) {
|
|
39
|
+
return {
|
|
40
|
+
async readFile(path) {
|
|
41
|
+
const file = Bun.file(path);
|
|
42
|
+
return await file.text();
|
|
43
|
+
},
|
|
44
|
+
async writeFile(path, content) {
|
|
45
|
+
await Bun.write(path, content);
|
|
46
|
+
},
|
|
47
|
+
async exists(path) {
|
|
48
|
+
const nodeFS = await getNodeFS();
|
|
49
|
+
try {
|
|
50
|
+
await nodeFS.stat(path);
|
|
51
|
+
return true;
|
|
52
|
+
} catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
async stat(path) {
|
|
57
|
+
const file = Bun.file(path);
|
|
58
|
+
const size = file.size;
|
|
59
|
+
const nodeFS = await getNodeFS();
|
|
60
|
+
const { mtime } = await nodeFS.stat(path);
|
|
61
|
+
return {
|
|
62
|
+
mtime,
|
|
63
|
+
size
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
async rename(oldPath, newPath) {
|
|
67
|
+
const nodeFS = await getNodeFS();
|
|
68
|
+
await nodeFS.rename(oldPath, newPath);
|
|
69
|
+
},
|
|
70
|
+
async mkdir(path, options) {
|
|
71
|
+
const nodeFS = await getNodeFS();
|
|
72
|
+
await nodeFS.mkdir(path, options);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
async readFile(path) {
|
|
78
|
+
const nodeFS = await getNodeFS();
|
|
79
|
+
return await nodeFS.readFile(path, "utf-8");
|
|
80
|
+
},
|
|
81
|
+
async writeFile(path, content) {
|
|
82
|
+
const nodeFS = await getNodeFS();
|
|
83
|
+
const pathModule = await import("node:path");
|
|
84
|
+
const dir = pathModule.dirname(path);
|
|
85
|
+
await nodeFS.mkdir(dir, { recursive: true });
|
|
86
|
+
await nodeFS.writeFile(path, content, "utf-8");
|
|
87
|
+
},
|
|
88
|
+
async exists(path) {
|
|
89
|
+
const nodeFS = await getNodeFS();
|
|
90
|
+
try {
|
|
91
|
+
await nodeFS.access(path);
|
|
92
|
+
return true;
|
|
93
|
+
} catch {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
async stat(path) {
|
|
98
|
+
const nodeFS = await getNodeFS();
|
|
99
|
+
const stats = await nodeFS.stat(path);
|
|
100
|
+
return {
|
|
101
|
+
mtime: stats.mtime,
|
|
102
|
+
size: stats.size
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
async rename(oldPath, newPath) {
|
|
106
|
+
const nodeFS = await getNodeFS();
|
|
107
|
+
await nodeFS.rename(oldPath, newPath);
|
|
108
|
+
},
|
|
109
|
+
async mkdir(path, options) {
|
|
110
|
+
const nodeFS = await getNodeFS();
|
|
111
|
+
await nodeFS.mkdir(path, options);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
let fsInstance = null;
|
|
116
|
+
function getPortableFS() {
|
|
117
|
+
if (!fsInstance) {
|
|
118
|
+
fsInstance = createPortableFS();
|
|
119
|
+
}
|
|
120
|
+
return fsInstance;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Reset the filesystem singleton for testing
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
function __resetPortableFSForTests() {
|
|
127
|
+
fsInstance = null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region packages/common/src/portable/hash.ts
|
|
132
|
+
/**
|
|
133
|
+
* Pads a hex string to the specified length
|
|
134
|
+
*/
|
|
135
|
+
function padHex(hex, length) {
|
|
136
|
+
return hex.padStart(length, "0");
|
|
137
|
+
}
|
|
138
|
+
function createPortableHasher() {
|
|
139
|
+
if (runtime.isBun) {
|
|
140
|
+
return { hash(content, algorithm = "xxhash") {
|
|
141
|
+
if (algorithm === "sha256") {
|
|
142
|
+
const hasher = new Bun.CryptoHasher("sha256");
|
|
143
|
+
hasher.update(content);
|
|
144
|
+
return hasher.digest("hex");
|
|
145
|
+
}
|
|
146
|
+
const hashNum = Bun.hash(content);
|
|
147
|
+
return padHex(hashNum.toString(16), 16);
|
|
148
|
+
} };
|
|
149
|
+
}
|
|
150
|
+
return { hash(content, algorithm = "xxhash") {
|
|
151
|
+
if (algorithm === "sha256") {
|
|
152
|
+
const crypto$2 = require("node:crypto");
|
|
153
|
+
return crypto$2.createHash("sha256").update(content).digest("hex");
|
|
154
|
+
}
|
|
155
|
+
const crypto$1 = require("node:crypto");
|
|
156
|
+
const sha256Hash = crypto$1.createHash("sha256").update(content).digest("hex");
|
|
157
|
+
return sha256Hash.substring(0, 16);
|
|
158
|
+
} };
|
|
159
|
+
}
|
|
160
|
+
let hasherInstance = null;
|
|
161
|
+
function getPortableHasher() {
|
|
162
|
+
if (!hasherInstance) {
|
|
163
|
+
hasherInstance = createPortableHasher();
|
|
164
|
+
}
|
|
165
|
+
return hasherInstance;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Reset the hasher singleton for testing
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
function __resetPortableHasherForTests() {
|
|
172
|
+
hasherInstance = null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region packages/common/src/portable/id.ts
|
|
177
|
+
/**
|
|
178
|
+
* Generate a unique ID
|
|
179
|
+
* Uses UUIDv7 on Bun (monotonic), falls back to randomUUID on Node.js
|
|
180
|
+
*/
|
|
181
|
+
function generateId() {
|
|
182
|
+
if (runtime.isBun && typeof Bun !== "undefined" && typeof Bun.randomUUIDv7 === "function") {
|
|
183
|
+
return Bun.randomUUIDv7();
|
|
184
|
+
}
|
|
185
|
+
const crypto$1 = require("node:crypto");
|
|
186
|
+
return crypto$1.randomUUID();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region packages/common/src/portable/spawn.ts
|
|
191
|
+
async function spawn(options) {
|
|
192
|
+
if (runtime.isBun) {
|
|
193
|
+
const proc = Bun.spawn(options.cmd, {
|
|
194
|
+
cwd: options.cwd,
|
|
195
|
+
env: options.env,
|
|
196
|
+
stdout: "pipe",
|
|
197
|
+
stderr: "pipe"
|
|
198
|
+
});
|
|
199
|
+
const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);
|
|
200
|
+
const exitCode = await proc.exited;
|
|
201
|
+
return {
|
|
202
|
+
stdout,
|
|
203
|
+
stderr,
|
|
204
|
+
exitCode
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const { execFile } = await import("node:child_process");
|
|
208
|
+
const { promisify } = await import("node:util");
|
|
209
|
+
const execFilePromise = promisify(execFile);
|
|
210
|
+
const [command, ...args] = options.cmd;
|
|
211
|
+
if (!command) {
|
|
212
|
+
return {
|
|
213
|
+
stdout: "",
|
|
214
|
+
stderr: "Error: No command provided",
|
|
215
|
+
exitCode: 1
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
try {
|
|
219
|
+
const execOptions = { encoding: "utf-8" };
|
|
220
|
+
if (options.cwd) {
|
|
221
|
+
execOptions.cwd = options.cwd;
|
|
222
|
+
}
|
|
223
|
+
if (options.env) {
|
|
224
|
+
execOptions.env = options.env;
|
|
225
|
+
}
|
|
226
|
+
const { stdout, stderr } = await execFilePromise(command, args, execOptions);
|
|
227
|
+
return {
|
|
228
|
+
stdout: stdout || "",
|
|
229
|
+
stderr: stderr || "",
|
|
230
|
+
exitCode: 0
|
|
231
|
+
};
|
|
232
|
+
} catch (error) {
|
|
233
|
+
const err = error;
|
|
234
|
+
return {
|
|
235
|
+
stdout: err.stdout || "",
|
|
236
|
+
stderr: err.stderr || "",
|
|
237
|
+
exitCode: err.code || 1
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
//#endregion
|
|
243
|
+
Object.defineProperty(exports, '__resetPortableFSForTests', {
|
|
244
|
+
enumerable: true,
|
|
245
|
+
get: function () {
|
|
246
|
+
return __resetPortableFSForTests;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
Object.defineProperty(exports, '__resetPortableHasherForTests', {
|
|
250
|
+
enumerable: true,
|
|
251
|
+
get: function () {
|
|
252
|
+
return __resetPortableHasherForTests;
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
Object.defineProperty(exports, 'createPortableFS', {
|
|
256
|
+
enumerable: true,
|
|
257
|
+
get: function () {
|
|
258
|
+
return createPortableFS;
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
Object.defineProperty(exports, 'createPortableHasher', {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function () {
|
|
264
|
+
return createPortableHasher;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
Object.defineProperty(exports, 'generateId', {
|
|
268
|
+
enumerable: true,
|
|
269
|
+
get: function () {
|
|
270
|
+
return generateId;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
Object.defineProperty(exports, 'getPortableFS', {
|
|
274
|
+
enumerable: true,
|
|
275
|
+
get: function () {
|
|
276
|
+
return getPortableFS;
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(exports, 'getPortableHasher', {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
get: function () {
|
|
282
|
+
return getPortableHasher;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
Object.defineProperty(exports, 'once', {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
get: function () {
|
|
288
|
+
return once;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
Object.defineProperty(exports, 'resetPortableForTests', {
|
|
292
|
+
enumerable: true,
|
|
293
|
+
get: function () {
|
|
294
|
+
return resetPortableForTests;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
Object.defineProperty(exports, 'runtime', {
|
|
298
|
+
enumerable: true,
|
|
299
|
+
get: function () {
|
|
300
|
+
return runtime;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
Object.defineProperty(exports, 'spawn', {
|
|
304
|
+
enumerable: true,
|
|
305
|
+
get: function () {
|
|
306
|
+
return spawn;
|
|
307
|
+
}
|
|
308
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const require_utils = require('../utils-NBAPoMgh.cjs');
|
|
2
|
+
|
|
3
|
+
exports.MODULE_EXTENSION_CANDIDATES = require_utils.MODULE_EXTENSION_CANDIDATES;
|
|
4
|
+
exports.cachedFn = require_utils.cachedFn;
|
|
5
|
+
exports.isExternalSpecifier = require_utils.isExternalSpecifier;
|
|
6
|
+
exports.isRelativeSpecifier = require_utils.isRelativeSpecifier;
|
|
7
|
+
exports.normalizePath = require_utils.normalizePath;
|
|
8
|
+
exports.resolveRelativeImportWithExistenceCheck = require_utils.resolveRelativeImportWithExistenceCheck;
|
|
9
|
+
exports.resolveRelativeImportWithReferences = require_utils.resolveRelativeImportWithReferences;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences } from "../index-Fi3RpHje.cjs";
|
|
2
|
+
export { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences } from "../index-CcSB32XQ.js";
|
|
2
|
+
export { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences } from "../utils-DxBnV8tL.js";
|
|
2
|
+
|
|
3
|
+
export { MODULE_EXTENSION_CANDIDATES, cachedFn, isExternalSpecifier, isRelativeSpecifier, normalizePath, resolveRelativeImportWithExistenceCheck, resolveRelativeImportWithReferences };
|