@duraxis/cli 0.2.0 → 0.4.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/CHANGELOG.md +27 -0
- package/README.md +20 -53
- package/dist/admin.command-Chb6x9mF.js +413 -0
- package/dist/admin.command-Chb6x9mF.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/commands/admin.command.d.ts +3 -0
- package/dist/commands/doctor.command.d.ts +10 -0
- package/dist/commands/init.command.d.ts +3 -0
- package/dist/commands/migration.command.d.ts +3 -0
- package/dist/config-CjMUqEhV.js +165 -0
- package/dist/config-CjMUqEhV.js.map +1 -0
- package/dist/config.d.ts +6 -2
- package/dist/dependencies/configured-registry.d.ts +3 -0
- package/dist/dependencies/dependency-resolver.d.ts +2 -0
- package/dist/dependencies/installed-package.d.ts +1 -0
- package/dist/dependencies/package-manager.d.ts +10 -0
- package/dist/dependencies/registry-client.d.ts +21 -0
- package/dist/dependencies/version-compatibility.d.ts +9 -0
- package/dist/filesystem/file-plan.d.ts +32 -0
- package/dist/index.js +365 -549
- package/dist/index.js.map +1 -1
- package/dist/init/initialization-options.d.ts +32 -0
- package/dist/init/initialization-planner.d.ts +7 -0
- package/dist/init/managed-project.d.ts +9 -0
- package/dist/init/project-detector.d.ts +27 -0
- package/dist/init.command-B2kKoyfi.js +172 -0
- package/dist/init.command-B2kKoyfi.js.map +1 -0
- package/dist/migration.command-N7ahyx92.js +361 -0
- package/dist/migration.command-N7ahyx92.js.map +1 -0
- package/dist/package-manager-BBRBhsIe.js +972 -0
- package/dist/package-manager-BBRBhsIe.js.map +1 -0
- package/dist/registry/argument-parser.d.ts +65 -0
- package/dist/registry/command-registry.d.ts +198 -0
- package/dist/rolldown-runtime-D8jQpDG7.js +12 -0
- package/dist/templates/project.d.ts +8 -0
- package/dist/terminal/prompts.d.ts +2 -0
- package/package.json +13 -8
package/dist/index.js
CHANGED
|
@@ -1,576 +1,392 @@
|
|
|
1
|
+
import { i as loadConfig, n as defineDuraxisConfig, s as disposeTypeScriptLoader } from "./config-CjMUqEhV.js";
|
|
1
2
|
import { parseArgs } from "node:util";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
3
|
+
// src/registry/command-registry.ts
|
|
4
|
+
var options = {
|
|
5
|
+
config: { type: "string" },
|
|
6
|
+
database: { type: "string" },
|
|
7
|
+
json: { type: "boolean" },
|
|
8
|
+
help: {
|
|
9
|
+
type: "boolean",
|
|
10
|
+
short: "h"
|
|
11
|
+
},
|
|
12
|
+
version: { type: "boolean" },
|
|
13
|
+
framework: { type: "string" },
|
|
14
|
+
driver: { type: "string" },
|
|
15
|
+
orm: { type: "boolean" },
|
|
16
|
+
"no-orm": { type: "boolean" },
|
|
17
|
+
migrations: { type: "boolean" },
|
|
18
|
+
"no-migrations": { type: "boolean" },
|
|
19
|
+
"package-manager": { type: "string" },
|
|
20
|
+
language: { type: "string" },
|
|
21
|
+
"module-format": { type: "string" },
|
|
22
|
+
namespace: { type: "string" },
|
|
23
|
+
directory: { type: "string" },
|
|
24
|
+
"source-dir": { type: "string" },
|
|
25
|
+
"storage-directory": { type: "string" },
|
|
26
|
+
bucket: { type: "string" },
|
|
27
|
+
prefix: { type: "string" },
|
|
28
|
+
region: { type: "string" },
|
|
29
|
+
endpoint: { type: "string" },
|
|
30
|
+
"force-path-style": { type: "boolean" },
|
|
31
|
+
"schema-mode": { type: "string" },
|
|
32
|
+
example: { type: "boolean" },
|
|
33
|
+
"no-example": { type: "boolean" },
|
|
34
|
+
install: { type: "boolean" },
|
|
35
|
+
"no-install": { type: "boolean" },
|
|
36
|
+
"dry-run": { type: "boolean" },
|
|
37
|
+
yes: { type: "boolean" },
|
|
38
|
+
steps: { type: "string" },
|
|
39
|
+
to: { type: "string" },
|
|
40
|
+
"allow-destructive": { type: "boolean" },
|
|
41
|
+
offline: { type: "boolean" },
|
|
42
|
+
persisted: { type: "boolean" },
|
|
43
|
+
schema: { type: "string" },
|
|
44
|
+
live: { type: "boolean" },
|
|
45
|
+
evaluate: { type: "boolean" },
|
|
46
|
+
check: { type: "boolean" },
|
|
47
|
+
apply: { type: "boolean" },
|
|
48
|
+
registry: { type: "string" },
|
|
49
|
+
prerelease: { type: "boolean" },
|
|
50
|
+
"custom-module": { type: "string" },
|
|
51
|
+
"custom-export": { type: "string" },
|
|
52
|
+
"custom-constructor": { type: "boolean" },
|
|
53
|
+
"custom-options": { type: "string" },
|
|
54
|
+
"max-stored-bytes": { type: "string" },
|
|
55
|
+
"max-object-bytes": { type: "string" },
|
|
56
|
+
"max-entries": { type: "string" },
|
|
57
|
+
"max-metadata-bytes": { type: "string" },
|
|
58
|
+
"max-journal-bytes": { type: "string" },
|
|
59
|
+
"max-queued-operations": { type: "string" },
|
|
60
|
+
"max-pending-operations": { type: "string" },
|
|
61
|
+
"max-attempts": { type: "string" },
|
|
62
|
+
"ownership-recovery": { type: "string" },
|
|
63
|
+
"application-id": { type: "string" },
|
|
64
|
+
"resources-file": { type: "string" },
|
|
65
|
+
"cursor-key-env": { type: "string" }
|
|
25
66
|
};
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
load(url, context, nextLoad) {
|
|
75
|
-
if (!modules.has(url)) return nextLoad(url, context);
|
|
76
|
-
const file = localFile(url);
|
|
77
|
-
if (!file) return nextLoad(url, context);
|
|
78
|
-
const path = fileURLToPath(file);
|
|
79
|
-
if (!/\.(?:ts|mts|cts)$/.test(path) || /\.d\.(?:ts|mts|cts)$/.test(path)) return nextLoad(url, context);
|
|
80
|
-
const commonjs = path.endsWith(".cts");
|
|
81
|
-
const result = ts.transpileModule(readFileSync(file, "utf8"), {
|
|
82
|
-
fileName: path,
|
|
83
|
-
reportDiagnostics: true,
|
|
84
|
-
compilerOptions: {
|
|
85
|
-
target: ts.ScriptTarget.ES2022,
|
|
86
|
-
module: commonjs ? ts.ModuleKind.NodeNext : ts.ModuleKind.ESNext,
|
|
87
|
-
...commonjs ? { moduleResolution: ts.ModuleResolutionKind.NodeNext } : {},
|
|
88
|
-
experimentalDecorators: true,
|
|
89
|
-
emitDecoratorMetadata: true,
|
|
90
|
-
useDefineForClassFields: false,
|
|
91
|
-
sourceMap: false
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
const errors = (result.diagnostics ?? []).filter((item) => item.category == ts.DiagnosticCategory.Error);
|
|
95
|
-
if (errors.length) throw new Error(ts.formatDiagnosticsWithColorAndContext(errors, {
|
|
96
|
-
getCurrentDirectory: () => process.cwd(),
|
|
97
|
-
getCanonicalFileName: (file) => file,
|
|
98
|
-
getNewLine: () => "\n"
|
|
99
|
-
}));
|
|
100
|
-
return {
|
|
101
|
-
format: commonjs ? "commonjs" : "module",
|
|
102
|
-
source: (commonjs ? "\"use strict\";\nrequire = require(\"node:module\").createRequire(__filename);\n" : "") + result.outputText,
|
|
103
|
-
shortCircuit: true
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/** Call only when no config/entity/migration callbacks need further dynamic imports. Node's module cache is retained. */
|
|
109
|
-
function disposeTypeScriptLoader() {
|
|
110
|
-
hooks?.deregister();
|
|
111
|
-
hooks = void 0;
|
|
112
|
-
}
|
|
113
|
-
// src/config.ts
|
|
114
|
-
function defineDuraxisConfig(config) {
|
|
115
|
-
return config;
|
|
116
|
-
}
|
|
117
|
-
async function importFile(path) {
|
|
118
|
-
const url = path instanceof URL ? path : pathToFileURL(path);
|
|
119
|
-
initializeTypeScriptLoader(url);
|
|
120
|
-
return import(url.href);
|
|
121
|
-
}
|
|
122
|
-
async function loadConfig(cwd, explicit, database) {
|
|
123
|
-
let path;
|
|
124
|
-
if (explicit) path = resolve(cwd, explicit);
|
|
125
|
-
else {
|
|
126
|
-
let directory = resolve(cwd);
|
|
127
|
-
while (true) {
|
|
128
|
-
for (const name of [
|
|
129
|
-
"duraxis.config.ts",
|
|
130
|
-
"duraxis.config.mts",
|
|
131
|
-
"duraxis.config.js",
|
|
132
|
-
"duraxis.config.mjs",
|
|
133
|
-
"duraxis.config.cts",
|
|
134
|
-
"duraxis.config.cjs"
|
|
135
|
-
]) {
|
|
136
|
-
const candidate = resolve(directory, name);
|
|
137
|
-
try {
|
|
138
|
-
await access(candidate);
|
|
139
|
-
path = candidate;
|
|
140
|
-
break;
|
|
141
|
-
} catch (error) {
|
|
142
|
-
if (error.code != "ENOENT") throw error;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (path || dirname(directory) == directory) break;
|
|
146
|
-
directory = dirname(directory);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (!path) throw new Error("No duraxis.config.ts or JavaScript configuration found");
|
|
150
|
-
const base = (await importFile(path)).default;
|
|
151
|
-
const config = database ? base?.databases?.[database] : base;
|
|
152
|
-
if (!config || typeof config.createDatabase != "function" || !Array.isArray(config.entities) && typeof config.entities != "function" || typeof config.migrations?.directory != "string" || typeof config.migrations.snapshots != "string" || config.migrations.format !== void 0 && !["ts", "js"].includes(config.migrations.format)) throw new Error("Invalid Duraxis configuration or unknown named database");
|
|
67
|
+
var initOptions = [
|
|
68
|
+
"framework",
|
|
69
|
+
"driver",
|
|
70
|
+
"orm",
|
|
71
|
+
"no-orm",
|
|
72
|
+
"migrations",
|
|
73
|
+
"no-migrations",
|
|
74
|
+
"package-manager",
|
|
75
|
+
"language",
|
|
76
|
+
"module-format",
|
|
77
|
+
"namespace",
|
|
78
|
+
"directory",
|
|
79
|
+
"source-dir",
|
|
80
|
+
"storage-directory",
|
|
81
|
+
"bucket",
|
|
82
|
+
"prefix",
|
|
83
|
+
"region",
|
|
84
|
+
"endpoint",
|
|
85
|
+
"force-path-style",
|
|
86
|
+
"schema-mode",
|
|
87
|
+
"example",
|
|
88
|
+
"no-example",
|
|
89
|
+
"install",
|
|
90
|
+
"no-install",
|
|
91
|
+
"dry-run",
|
|
92
|
+
"yes",
|
|
93
|
+
"registry",
|
|
94
|
+
"prerelease",
|
|
95
|
+
"custom-module",
|
|
96
|
+
"custom-export",
|
|
97
|
+
"custom-constructor",
|
|
98
|
+
"custom-options",
|
|
99
|
+
"max-stored-bytes",
|
|
100
|
+
"max-object-bytes",
|
|
101
|
+
"max-entries",
|
|
102
|
+
"max-metadata-bytes",
|
|
103
|
+
"max-journal-bytes",
|
|
104
|
+
"max-queued-operations",
|
|
105
|
+
"max-pending-operations",
|
|
106
|
+
"max-attempts",
|
|
107
|
+
"resources-file",
|
|
108
|
+
"cursor-key-env",
|
|
109
|
+
"ownership-recovery",
|
|
110
|
+
"application-id"
|
|
111
|
+
];
|
|
112
|
+
function command(name, category, description, handler, extra = {}) {
|
|
153
113
|
return {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
114
|
+
name,
|
|
115
|
+
category,
|
|
116
|
+
description,
|
|
117
|
+
handler,
|
|
118
|
+
aliases: [],
|
|
119
|
+
positional: [],
|
|
120
|
+
options: [],
|
|
121
|
+
required: [],
|
|
122
|
+
defaults: {},
|
|
123
|
+
exclusive: [],
|
|
124
|
+
examples: [`duraxis ${name}`],
|
|
125
|
+
configuration: "none",
|
|
126
|
+
database: false,
|
|
127
|
+
interactive: false,
|
|
128
|
+
...extra
|
|
157
129
|
};
|
|
158
130
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
function migrationId(name, previous) {
|
|
219
|
-
if (name.includes("..") || /[\\/]/.test(name)) throw new Error("Migration names cannot contain paths");
|
|
220
|
-
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
|
|
221
|
-
if (!slug || slug.length > 64) throw new Error("Invalid migration name");
|
|
222
|
-
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "");
|
|
223
|
-
const previousStamp = previous?.slice(0, 17);
|
|
224
|
-
return `${previousStamp && previousStamp >= stamp ? (BigInt(previousStamp) + 1n).toString().padStart(17, "0") : stamp}_${slug}`;
|
|
225
|
-
}
|
|
226
|
-
function literal(value) {
|
|
227
|
-
return JSON.stringify(value, null, 2).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
228
|
-
}
|
|
229
|
-
function renderMigration(id, plan) {
|
|
230
|
-
if (!plan) return `import { defineMigration } from "@duraxis/migrations";\n\nexport default defineMigration({\n id: ${JSON.stringify(id)},\n async up(context) {\n throw new Error("Unfinished migration: implement up and provide its expected snapshot");\n },\n});\n`;
|
|
231
|
-
const inverse = diffSchemas(plan.after, plan.before);
|
|
232
|
-
const reversible = !plan.operations.some((operation) => operation.kind == "collection" && operation.after == null) && inverse.operations.every((operation) => operation.risk != "requires-data-transformation");
|
|
233
|
-
return `import { defineMigration, applySchemaPlan } from "@duraxis/migrations";\n\nexport default defineMigration({\n id: ${JSON.stringify(id)},\n async up(context) {\n await applySchemaPlan(context, ${literal(plan)});\n },\n${reversible ? ` async down(context) {\n${inverse.operations.filter((operation) => operation.kind == "collection" && operation.after == null).map((operation) => ` for await (const row of context.scan(${JSON.stringify(operation.collection)})) throw new Error("Cannot drop a populated collection during generated rollback");\n`).join("")} await applySchemaPlan(context, ${literal(inverse)});\n },\n` : " // Irreversible automatically: write an explicit data-safe down() if needed.\n"} });\n`;
|
|
234
|
-
}
|
|
235
|
-
async function withArtifactLock(directory, callback) {
|
|
236
|
-
await mkdir(directory, { recursive: true });
|
|
237
|
-
const lock = join(directory, ".duraxis-artifacts.lock");
|
|
238
|
-
await writeFile(lock, canonicalJSON({
|
|
239
|
-
pid: process.pid,
|
|
240
|
-
purpose: "artifact update; inspect files before removing a stale guard"
|
|
241
|
-
}), { flag: "wx" });
|
|
242
|
-
try {
|
|
243
|
-
return await callback();
|
|
244
|
-
} finally {
|
|
245
|
-
await unlink(lock);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
async function writePair(migrationPath, source, snapshotPath, snapshot) {
|
|
249
|
-
await mkdir(resolve(snapshotPath, ".."), { recursive: true });
|
|
250
|
-
await writeFile(migrationPath, source, { flag: "wx" });
|
|
251
|
-
try {
|
|
252
|
-
await writeFile(snapshotPath, JSON.stringify(snapshot, null, 2) + "\n", { flag: "wx" });
|
|
253
|
-
} catch (error) {
|
|
254
|
-
await unlink(migrationPath);
|
|
255
|
-
throw error;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
async function removePair(migrationPath, snapshotPath) {
|
|
259
|
-
const suffix = `.removing-${randomBytes(6).toString("hex")}`;
|
|
260
|
-
await rename(migrationPath, migrationPath + suffix);
|
|
261
|
-
try {
|
|
262
|
-
await rename(snapshotPath, snapshotPath + suffix);
|
|
263
|
-
} catch (error) {
|
|
264
|
-
await rename(migrationPath + suffix, migrationPath);
|
|
265
|
-
throw error;
|
|
266
|
-
}
|
|
267
|
-
await unlink(migrationPath + suffix);
|
|
268
|
-
await unlink(snapshotPath + suffix);
|
|
269
|
-
}
|
|
270
|
-
// src/cli.ts
|
|
271
|
-
var help = `duraxis <command> [options]
|
|
272
|
-
init
|
|
273
|
-
migration:create <name>
|
|
274
|
-
migration:generate <name> [--allow-destructive]
|
|
275
|
-
migration:snapshot --schema <collections.json>
|
|
276
|
-
migration:remove --yes
|
|
277
|
-
migration:baseline <name> --yes
|
|
278
|
-
migrate:up [--steps N | --to ID] [--dry-run] [--allow-destructive]
|
|
279
|
-
migrate:down [--steps N | --to ID] --yes
|
|
280
|
-
migrate:status
|
|
281
|
-
migrate:diff [--persisted]
|
|
282
|
-
migrate:check [--offline]
|
|
283
|
-
Options: --config PATH --database NAME --json
|
|
284
|
-
Rollback --to retains the target version. Dry-run is a static preview only.`;
|
|
285
|
-
async function withDatabase(config, callback) {
|
|
286
|
-
const database = await config.createDatabase();
|
|
287
|
-
try {
|
|
288
|
-
return await callback(database);
|
|
289
|
-
} finally {
|
|
290
|
-
await database.close({ closeStorage: true });
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
function summary(plan) {
|
|
294
|
-
return plan.operations.length ? plan.operations.map((operation) => `${operation.before == null ? "+" : operation.after == null ? "-" : "~"} ${operation.kind} ${operation.collection}/${operation.name} (${operation.risk})`).join("\n") : "No schema differences.";
|
|
295
|
-
}
|
|
296
|
-
async function init(cwd) {
|
|
297
|
-
const configPath = resolve(cwd, "duraxis.config.ts");
|
|
298
|
-
const base = resolve(cwd, "duraxis/snapshots/baseline.json");
|
|
299
|
-
for (const path of [configPath, base]) try {
|
|
300
|
-
await access(path);
|
|
301
|
-
throw new Error(`Refusing to overwrite ${path}`);
|
|
302
|
-
} catch (error) {
|
|
303
|
-
if (error.code != "ENOENT") throw error;
|
|
304
|
-
}
|
|
305
|
-
await mkdir(resolve(cwd, "duraxis/migrations"), { recursive: true });
|
|
306
|
-
await mkdir(resolve(cwd, "duraxis/snapshots"), { recursive: true });
|
|
307
|
-
await writeFile(configPath, `import { defineDuraxisConfig } from "@duraxis/cli";
|
|
308
|
-
|
|
309
|
-
export default defineDuraxisConfig({
|
|
310
|
-
entities: [], // Import your decorated entity classes here.
|
|
311
|
-
migrations: { directory: "./duraxis/migrations", snapshots: "./duraxis/snapshots", format: "ts" },
|
|
312
|
-
async createDatabase() {
|
|
313
|
-
// Return a DuraxisDatabase configured with your storage driver.
|
|
314
|
-
// The CLI closes this database and its storage after every command.
|
|
315
|
-
throw new Error("Configure createDatabase() before accessing a database");
|
|
316
|
-
},
|
|
317
|
-
});
|
|
318
|
-
`, { flag: "wx" });
|
|
319
|
-
try {
|
|
320
|
-
await writeFile(base, JSON.stringify(createSnapshot(null, null, []), null, 2) + "\n", { flag: "wx" });
|
|
321
|
-
} catch (error) {
|
|
322
|
-
await unlink(configPath);
|
|
323
|
-
throw error;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
async function runCLI(args, io = {}) {
|
|
327
|
-
const cwd = io.cwd ?? process.cwd();
|
|
328
|
-
const out = io.out ?? console.log;
|
|
329
|
-
const errorOut = io.error ?? console.error;
|
|
330
|
-
let jsonErrors = false;
|
|
331
|
-
try {
|
|
332
|
-
const { values, positionals } = parseArgs({
|
|
333
|
-
args: [...args],
|
|
334
|
-
allowPositionals: true,
|
|
335
|
-
strict: true,
|
|
336
|
-
options: {
|
|
337
|
-
config: { type: "string" },
|
|
338
|
-
database: { type: "string" },
|
|
339
|
-
json: { type: "boolean" },
|
|
340
|
-
steps: { type: "string" },
|
|
341
|
-
to: { type: "string" },
|
|
342
|
-
"dry-run": { type: "boolean" },
|
|
343
|
-
"allow-destructive": { type: "boolean" },
|
|
344
|
-
yes: { type: "boolean" },
|
|
345
|
-
offline: { type: "boolean" },
|
|
346
|
-
persisted: { type: "boolean" },
|
|
347
|
-
schema: { type: "string" },
|
|
348
|
-
help: { type: "boolean" }
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
jsonErrors = values.json ?? false;
|
|
352
|
-
const command = positionals[0];
|
|
353
|
-
const name = positionals[1];
|
|
354
|
-
if (!command || values.help) {
|
|
355
|
-
out(help);
|
|
356
|
-
return 0;
|
|
357
|
-
}
|
|
358
|
-
if (![
|
|
359
|
-
"init",
|
|
131
|
+
var commands = [
|
|
132
|
+
command("init", "SETUP", "Initialize and configure Duraxis", "init", {
|
|
133
|
+
options: initOptions,
|
|
134
|
+
interactive: true,
|
|
135
|
+
defaults: {
|
|
136
|
+
driver: "disk",
|
|
137
|
+
framework: "auto",
|
|
138
|
+
language: "auto",
|
|
139
|
+
"module-format": "auto",
|
|
140
|
+
namespace: "default",
|
|
141
|
+
install: true
|
|
142
|
+
},
|
|
143
|
+
exclusive: [
|
|
144
|
+
["orm", "no-orm"],
|
|
145
|
+
["migrations", "no-migrations"],
|
|
146
|
+
["install", "no-install"],
|
|
147
|
+
["example", "no-example"]
|
|
148
|
+
],
|
|
149
|
+
examples: ["duraxis init --driver disk --migrations --yes", "duraxis init --driver memory --no-orm --no-install --yes"]
|
|
150
|
+
}),
|
|
151
|
+
command("doctor", "SETUP", "Diagnose project and environment without executing configuration", "admin"),
|
|
152
|
+
command("config:show", "CONFIGURATION", "Show redacted static configuration (or trusted code with --evaluate)", "admin", {
|
|
153
|
+
options: ["evaluate"],
|
|
154
|
+
configuration: "static"
|
|
155
|
+
}),
|
|
156
|
+
command("config:validate", "CONFIGURATION", "Validate configuration without opening storage", "admin", {
|
|
157
|
+
options: ["evaluate"],
|
|
158
|
+
configuration: "static"
|
|
159
|
+
}),
|
|
160
|
+
command("config:set", "CONFIGURATION", "Set a supported managed connection value", "admin", {
|
|
161
|
+
positional: ["key", "value"],
|
|
162
|
+
options: ["dry-run"],
|
|
163
|
+
configuration: "static"
|
|
164
|
+
}),
|
|
165
|
+
command("connection:add", "CONFIGURATION", "Add a managed named connection", "admin", {
|
|
166
|
+
positional: ["name"],
|
|
167
|
+
options: initOptions,
|
|
168
|
+
configuration: "static"
|
|
169
|
+
}),
|
|
170
|
+
command("connection:list", "CONFIGURATION", "List connections without opening databases", "admin", { configuration: "static" }),
|
|
171
|
+
command("storage:list", "STORAGE", "List official drivers and operational limits", "admin"),
|
|
172
|
+
command("storage:check", "STORAGE", "Check configuration; --live opens storage read-only", "admin", {
|
|
173
|
+
options: ["live"],
|
|
174
|
+
configuration: "static"
|
|
175
|
+
}),
|
|
176
|
+
command("generate:entity", "GENERATORS", "Generate an ORM entity and update a managed registry", "admin", {
|
|
177
|
+
positional: ["name"],
|
|
178
|
+
options: ["dry-run"],
|
|
179
|
+
configuration: "static"
|
|
180
|
+
}),
|
|
181
|
+
command("generate:module", "GENERATORS", "Generate a NestJS feature module", "admin", {
|
|
182
|
+
positional: ["name"],
|
|
183
|
+
options: ["dry-run"],
|
|
184
|
+
configuration: "static"
|
|
185
|
+
}),
|
|
186
|
+
...[
|
|
187
|
+
[
|
|
360
188
|
"migration:create",
|
|
189
|
+
"Create a manual migration",
|
|
190
|
+
["name"],
|
|
191
|
+
[]
|
|
192
|
+
],
|
|
193
|
+
[
|
|
361
194
|
"migration:generate",
|
|
195
|
+
"Generate a schema migration",
|
|
196
|
+
["name"],
|
|
197
|
+
["allow-destructive"]
|
|
198
|
+
],
|
|
199
|
+
[
|
|
362
200
|
"migration:snapshot",
|
|
201
|
+
"Save expected schema snapshot",
|
|
202
|
+
[],
|
|
203
|
+
["schema"]
|
|
204
|
+
],
|
|
205
|
+
[
|
|
363
206
|
"migration:remove",
|
|
207
|
+
"Remove latest unpublished migration",
|
|
208
|
+
[],
|
|
209
|
+
["yes"]
|
|
210
|
+
],
|
|
211
|
+
[
|
|
364
212
|
"migration:baseline",
|
|
213
|
+
"Adopt existing schema",
|
|
214
|
+
["name"],
|
|
215
|
+
["yes"]
|
|
216
|
+
],
|
|
217
|
+
[
|
|
365
218
|
"migrate:up",
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
"migrate:check"
|
|
370
|
-
].includes(command)) throw new Error(`Unknown command: ${command}`);
|
|
371
|
-
if (positionals.length > 2 || name && ![
|
|
372
|
-
"migration:create",
|
|
373
|
-
"migration:generate",
|
|
374
|
-
"migration:baseline"
|
|
375
|
-
].includes(command)) throw new Error("Unexpected positional arguments");
|
|
376
|
-
const allowed = {
|
|
377
|
-
init: [],
|
|
378
|
-
"migration:create": [],
|
|
379
|
-
"migration:generate": ["allow-destructive"],
|
|
380
|
-
"migration:snapshot": ["schema"],
|
|
381
|
-
"migration:remove": ["yes"],
|
|
382
|
-
"migration:baseline": ["yes"],
|
|
383
|
-
"migrate:up": [
|
|
219
|
+
"Apply pending migrations",
|
|
220
|
+
[],
|
|
221
|
+
[
|
|
384
222
|
"steps",
|
|
385
223
|
"to",
|
|
386
224
|
"dry-run",
|
|
387
225
|
"allow-destructive"
|
|
388
|
-
]
|
|
389
|
-
|
|
226
|
+
]
|
|
227
|
+
],
|
|
228
|
+
[
|
|
229
|
+
"migrate:down",
|
|
230
|
+
"Roll back migrations (target retained)",
|
|
231
|
+
[],
|
|
232
|
+
[
|
|
390
233
|
"steps",
|
|
391
234
|
"to",
|
|
392
235
|
"yes"
|
|
393
|
-
]
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
"migrate:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
"
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
]
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
236
|
+
]
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
"migrate:status",
|
|
240
|
+
"Display migration history",
|
|
241
|
+
[],
|
|
242
|
+
[]
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
"migrate:diff",
|
|
246
|
+
"Compare schemas",
|
|
247
|
+
[],
|
|
248
|
+
["persisted"]
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
"migrate:check",
|
|
252
|
+
"Validate migration integrity",
|
|
253
|
+
[],
|
|
254
|
+
["offline"]
|
|
255
|
+
]
|
|
256
|
+
].map(([name, description, positional, supported]) => command(name, "MIGRATIONS", description, "migration", {
|
|
257
|
+
positional,
|
|
258
|
+
options: supported,
|
|
259
|
+
configuration: "migration",
|
|
260
|
+
required: name === "migration:snapshot" ? ["schema"] : [
|
|
261
|
+
"migration:remove",
|
|
262
|
+
"migration:baseline",
|
|
263
|
+
"migrate:down"
|
|
264
|
+
].includes(name) ? ["yes"] : [],
|
|
265
|
+
database: name.startsWith("migrate:") ? "conditional" : ["migration:baseline", "migration:remove"].includes(name),
|
|
266
|
+
exclusive: [["steps", "to"]]
|
|
267
|
+
})),
|
|
268
|
+
command("upgrade", "DEPENDENCIES", "Check or explicitly apply compatible published updates", "admin", {
|
|
269
|
+
options: [
|
|
270
|
+
"check",
|
|
271
|
+
"apply",
|
|
272
|
+
"package-manager",
|
|
273
|
+
"registry",
|
|
274
|
+
"prerelease"
|
|
275
|
+
],
|
|
276
|
+
exclusive: [["check", "apply"]],
|
|
277
|
+
defaults: { check: true }
|
|
278
|
+
}),
|
|
279
|
+
command("help", "INFORMATION", "Display command documentation", "help", {
|
|
280
|
+
positional: ["command"],
|
|
281
|
+
optionalPositionals: true
|
|
282
|
+
}),
|
|
283
|
+
command("version", "INFORMATION", "Display the CLI version", "version", { aliases: ["--version"] })
|
|
284
|
+
];
|
|
285
|
+
function findCommand(name) {
|
|
286
|
+
const found = commands.find((c) => c.name === name || c.aliases.includes(name));
|
|
287
|
+
if (!found) throw new Error(`Unknown command: ${name}. Run duraxis help.`);
|
|
288
|
+
return found;
|
|
289
|
+
}
|
|
290
|
+
function helpText(definition) {
|
|
291
|
+
if (!definition) return `Duraxis CLI\n\nUsage: duraxis <command> [options]\n\n${[...new Set(commands.map((c) => c.category))].map((category) => `${category}\n${commands.filter((c) => c.category === category).map((c) => ` ${c.name.padEnd(22)} ${c.description}`).join("\n")}`).join("\n\n")}\n\nExamples:\n duraxis init\n duraxis doctor\n duraxis help init\n duraxis migrate:status\n duraxis upgrade --check\n`;
|
|
292
|
+
const supportedOptions = [
|
|
293
|
+
"config",
|
|
294
|
+
"database",
|
|
295
|
+
"json",
|
|
296
|
+
"help",
|
|
297
|
+
...definition.options
|
|
298
|
+
];
|
|
299
|
+
return `${definition.description}\n\nUsage: duraxis ${definition.name} ${definition.positional.map((p) => `<${p}>`).join(" ")} [options]\n\n${supportedOptions.map((name) => ` --${name}${options[name].type === "string" ? " <value>" : ""}${definition.defaults[name] !== void 0 ? ` (default: ${definition.defaults[name]})` : ""}${definition.required.includes(name) ? " (required)" : ""}`).join("\n")}\n\nConfiguration: ${definition.configuration}; database access: ${definition.database === "conditional" ? "depends on command flags" : definition.database ? "required" : "not required by default"}.\n${definition.exclusive.map((group) => `Mutually exclusive: ${group.map((n) => `--${n}`).join(", ")}`).join("\n")}\n${definition.name === "storage:check" ? "Live Disk checks may acquire exclusive directory ownership. No test objects are written." : ""}\nExamples:\n${definition.examples.map((e) => ` ${e}`).join("\n")}`;
|
|
300
|
+
}
|
|
301
|
+
// src/registry/argument-parser.ts
|
|
302
|
+
function parseCommand(args) {
|
|
303
|
+
const parsed = parseArgs({
|
|
304
|
+
args: [...args],
|
|
305
|
+
options,
|
|
306
|
+
allowPositionals: true,
|
|
307
|
+
strict: true
|
|
308
|
+
});
|
|
309
|
+
const name = parsed.values.version ? "version" : parsed.positionals[0] ?? "help";
|
|
310
|
+
const definition = findCommand(name);
|
|
311
|
+
const positionals = parsed.positionals.slice(parsed.positionals[0] ? 1 : 0);
|
|
312
|
+
if (positionals.length > definition.positional.length) throw new Error("Unexpected positional arguments");
|
|
313
|
+
for (const option of Object.keys(parsed.values)) if (![
|
|
314
|
+
"config",
|
|
315
|
+
"database",
|
|
316
|
+
"json",
|
|
317
|
+
"help",
|
|
318
|
+
"version",
|
|
319
|
+
...definition.options
|
|
320
|
+
].includes(option)) throw new Error(`Option --${option} is not supported by ${name}`);
|
|
321
|
+
if (!parsed.values.help) {
|
|
322
|
+
if (!definition.optionalPositionals && positionals.length < definition.positional.length) throw new Error(`Missing positional arguments: ${definition.positional.join(", ")}`);
|
|
323
|
+
for (const group of definition.exclusive) if (group.filter((n) => parsed.values[n] !== void 0).length > 1) throw new Error(`Mutually exclusive options: ${group.map((n) => `--${n}`).join(", ")}`);
|
|
324
|
+
for (const option of definition.required) if (parsed.values[option] === void 0) throw new Error(`Missing required --${option}`);
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
...parsed,
|
|
328
|
+
definition,
|
|
329
|
+
positionals
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
// src/cli.ts
|
|
333
|
+
async function runCLI(args, io = {}) {
|
|
334
|
+
const out = io.out ?? console.log;
|
|
335
|
+
const error = io.error ?? console.error;
|
|
336
|
+
let json = args.includes("--json");
|
|
337
|
+
let migrationCommand = false;
|
|
338
|
+
const controller = new AbortController();
|
|
339
|
+
const interrupt = () => controller.abort(/* @__PURE__ */ new Error("Operation cancelled"));
|
|
340
|
+
process.once("SIGINT", interrupt);
|
|
341
|
+
const context = {
|
|
342
|
+
...io,
|
|
343
|
+
signal: io.signal ? AbortSignal.any([io.signal, controller.signal]) : controller.signal
|
|
344
|
+
};
|
|
345
|
+
try {
|
|
346
|
+
const parsed = parseCommand(args);
|
|
347
|
+
json = parsed.values.json ?? false;
|
|
348
|
+
if (parsed.values.help || parsed.definition.handler === "help") {
|
|
349
|
+
const target = parsed.definition.handler === "help" && parsed.positionals[0] ? findCommand(parsed.positionals[0]) : parsed.definition.handler === "help" ? void 0 : parsed.definition;
|
|
350
|
+
out(json ? JSON.stringify({ help: helpText(target) }) : helpText(target));
|
|
486
351
|
return 0;
|
|
487
352
|
}
|
|
488
|
-
if (
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
try {
|
|
499
|
-
await access(snapshotPath);
|
|
500
|
-
} catch (error) {
|
|
501
|
-
if (error.code != "ENOENT") throw error;
|
|
502
|
-
await unlink(join(directory, latestFile));
|
|
503
|
-
return;
|
|
353
|
+
if (parsed.definition.handler === "version") {
|
|
354
|
+
const { readFile } = await import("node:fs/promises");
|
|
355
|
+
const { dirname, join } = await import("node:path");
|
|
356
|
+
let root = import.meta.dirname;
|
|
357
|
+
while (true) {
|
|
358
|
+
try {
|
|
359
|
+
const manifest = JSON.parse(await readFile(join(root, "package.json"), "utf8"));
|
|
360
|
+
if (manifest && typeof manifest === "object" && "name" in manifest && manifest.name === "@duraxis/cli" && "version" in manifest) {
|
|
361
|
+
out(json ? JSON.stringify({ version: manifest.version }) : String(manifest.version));
|
|
362
|
+
return 0;
|
|
504
363
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
const local = await loadArtifacts(config, root);
|
|
512
|
-
if (command == "migrate:diff" && !values.persisted) {
|
|
513
|
-
const plan = diffSchemas(local.artifacts.at(-1)?.snapshot.collections ?? [], await entities());
|
|
514
|
-
print(plan, summary(plan));
|
|
515
|
-
return 0;
|
|
516
|
-
}
|
|
517
|
-
if (command == "migrate:check" && values.offline) {
|
|
518
|
-
validateArtifacts(local.artifacts);
|
|
519
|
-
const plan = diffSchemas(local.artifacts.at(-1)?.snapshot.collections ?? [], await entities());
|
|
520
|
-
if (plan.operations.length) throw new Error(`Unrepresented entity changes:\n${summary(plan)}`);
|
|
521
|
-
print({
|
|
522
|
-
valid: true,
|
|
523
|
-
mode: "offline"
|
|
524
|
-
}, "Local files, snapshots, and entity schema are valid. Database history was not checked.");
|
|
525
|
-
return 0;
|
|
364
|
+
} catch (cause) {
|
|
365
|
+
if (!(cause instanceof Error && "code" in cause && cause.code === "ENOENT")) throw cause;
|
|
366
|
+
}
|
|
367
|
+
if (dirname(root) === root) throw new Error("CLI package version unavailable");
|
|
368
|
+
root = dirname(root);
|
|
369
|
+
}
|
|
526
370
|
}
|
|
527
|
-
if (
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
print({
|
|
533
|
-
dryRun: true,
|
|
534
|
-
appliedStateChecked: false,
|
|
535
|
-
candidates
|
|
536
|
-
}, `Static preview only; database was not opened and applied state was not checked. Migration callbacks were not executed.\n${candidates.join("\n")}`);
|
|
537
|
-
return 0;
|
|
371
|
+
if (parsed.definition.handler === "migration") {
|
|
372
|
+
migrationCommand = true;
|
|
373
|
+
const code = await (await import("./migration.command-N7ahyx92.js")).executeMigration(parsed, context);
|
|
374
|
+
context.signal.throwIfAborted();
|
|
375
|
+
return code;
|
|
538
376
|
}
|
|
539
|
-
await
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
} else if (command == "migrate:down") {
|
|
550
|
-
if (!values.yes) throw new Error("Rollback requires --yes; review backups and down() first");
|
|
551
|
-
const reverted = await runner.down({
|
|
552
|
-
...options,
|
|
553
|
-
allowDestructive: true
|
|
554
|
-
});
|
|
555
|
-
print({ reverted }, `Reverted ${reverted.length} migration(s).`);
|
|
556
|
-
} else if (command == "migrate:status") {
|
|
557
|
-
const status = await runner.status();
|
|
558
|
-
print(status, `Duraxis migration status\nDatabase: ${values.database ?? "default"}\n\nApplied:\n${status.applied.map((entry) => ` ${entry.id}`).join("\n")}\nPending:\n${status.pending.map((id) => ` ${id}`).join("\n")}\nSchema drift: none\n${status.applied.length} applied, ${status.pending.length} pending`);
|
|
559
|
-
} else if (command == "migrate:diff") {
|
|
560
|
-
const plan = await runner.drift();
|
|
561
|
-
print(plan, summary(plan));
|
|
562
|
-
} else if (command == "migrate:check") {
|
|
563
|
-
await runner.status();
|
|
564
|
-
const plan = diffSchemas(local.artifacts.at(-1)?.snapshot.collections ?? [], await entities());
|
|
565
|
-
if (plan.operations.length) throw new Error(`Unrepresented entity changes:\n${summary(plan)}`);
|
|
566
|
-
print({ valid: true }, "Migration files, snapshots, history, schema, and entities are valid.");
|
|
567
|
-
}
|
|
568
|
-
});
|
|
569
|
-
return 0;
|
|
570
|
-
} catch (error) {
|
|
571
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
572
|
-
errorOut(jsonErrors ? JSON.stringify({ error: message }) : message);
|
|
377
|
+
const result = parsed.definition.handler === "init" ? await (await import("./init.command-B2kKoyfi.js")).initialize(parsed, context) : await (await import("./admin.command-Chb6x9mF.js")).administer(parsed, context);
|
|
378
|
+
out(json ? JSON.stringify(result) : typeof result === "string" ? result : JSON.stringify(result, null, 2));
|
|
379
|
+
return result && typeof result === "object" && "failed" in result && result.failed === true ? 1 : 0;
|
|
380
|
+
} catch (cause) {
|
|
381
|
+
const cleanupFailed = cause instanceof Error && cause.name === "DuraxisMigrationCleanupError";
|
|
382
|
+
const message = cleanupFailed ? "Migration database cleanup failed; inspect storage health and migration status before retrying" : context.signal.aborted ? migrationCommand ? "Migration operation cancelled. Inspect local artifacts and migrate:status before retrying; publication may have completed." : "Operation cancelled" : cause instanceof Error ? cause.message : "Command failed";
|
|
383
|
+
error(json ? JSON.stringify({ error: {
|
|
384
|
+
code: cleanupFailed ? "CLEANUP_FAILED" : context.signal.aborted ? "CANCELLED" : "COMMAND_FAILED",
|
|
385
|
+
message
|
|
386
|
+
} }) : message);
|
|
573
387
|
return 1;
|
|
388
|
+
} finally {
|
|
389
|
+
process.removeListener("SIGINT", interrupt);
|
|
574
390
|
}
|
|
575
391
|
}
|
|
576
392
|
export { defineDuraxisConfig, disposeTypeScriptLoader, loadConfig, runCLI };
|