@zintrust/core 0.4.2 → 0.4.4
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/bin/zintrust-main.js +1 -1
- package/package.json +1 -1
- package/src/cli/OptionalCliExtensions.d.ts +16 -5
- package/src/cli/OptionalCliExtensions.d.ts.map +1 -1
- package/src/cli/OptionalCliExtensions.js +80 -19
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +24 -0
- package/src/index.js +3 -3
package/bin/zintrust-main.js
CHANGED
|
@@ -105,7 +105,7 @@ export async function run() {
|
|
|
105
105
|
try {
|
|
106
106
|
({ OptionalCliExtensions: optionalCliExtensions } =
|
|
107
107
|
await import('../src/cli/OptionalCliExtensions.js'));
|
|
108
|
-
optionalCliStatuses = await optionalCliExtensions.
|
|
108
|
+
optionalCliStatuses = await optionalCliExtensions.loadForArgs(args0);
|
|
109
109
|
}
|
|
110
110
|
catch {
|
|
111
111
|
// best-effort; missing optional extensions must not block the CLI
|
package/package.json
CHANGED
|
@@ -13,20 +13,31 @@ export type OptionalCliExtensionStatus = Readonly<{
|
|
|
13
13
|
loaded: boolean;
|
|
14
14
|
source: OptionalCliExtensionLoadSource;
|
|
15
15
|
}>;
|
|
16
|
+
type OptionalCliExtensionLoadOptions = Readonly<{
|
|
17
|
+
logFailures?: boolean;
|
|
18
|
+
}>;
|
|
16
19
|
export declare const OptionalCliExtensions: Readonly<{
|
|
17
20
|
tryImportInstalledExtensions(): Promise<OptionalCliExtensionStatus[]>;
|
|
21
|
+
loadForArgs(args: string[]): Promise<OptionalCliExtensionStatus[]>;
|
|
18
22
|
findMissingExtensionForArgs(args: string[], statuses: ReadonlyArray<OptionalCliExtensionStatus>): OptionalCliExtensionStatus | undefined;
|
|
19
23
|
getMissingExtensionMessage(status: OptionalCliExtensionStatus): string;
|
|
24
|
+
findRequestedExtension: (args: string[]) => OptionalCliExtension | undefined;
|
|
20
25
|
}>;
|
|
21
26
|
export declare const OptionalCliExtensionsInternal: Readonly<{
|
|
22
27
|
getProjectCwd: () => string;
|
|
23
28
|
resolveProjectRoot: () => string;
|
|
24
|
-
resolveProjectInstalledUrl: (entry: OptionalCliExtension) => string | null;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
resolveProjectInstalledUrl: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => string | null;
|
|
30
|
+
shouldLogFailures: (options?: OptionalCliExtensionLoadOptions) => boolean;
|
|
31
|
+
debugFailure: (message: string, meta: Record<string, unknown>, options?: OptionalCliExtensionLoadOptions) => void;
|
|
32
|
+
tryImportProjectInstalledPackage: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
|
|
33
|
+
tryImportLocalCandidate: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
|
|
34
|
+
tryImportPackageSpecifier: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<boolean>;
|
|
35
|
+
tryImportExtension: (entry: OptionalCliExtension, options?: OptionalCliExtensionLoadOptions) => Promise<OptionalCliExtensionStatus>;
|
|
29
36
|
getRequestedCommand: (args: string[]) => string | undefined;
|
|
37
|
+
findRequestedExtension: (args: string[]) => OptionalCliExtension | undefined;
|
|
38
|
+
isRootHelpRequest: (args: string[]) => boolean;
|
|
39
|
+
getProjectLocalCandidates: (entry: OptionalCliExtension) => string[];
|
|
40
|
+
getLocalCandidates: (entry: OptionalCliExtension) => string[];
|
|
30
41
|
}>;
|
|
31
42
|
export {};
|
|
32
43
|
//# sourceMappingURL=OptionalCliExtensions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalCliExtensions.d.ts","sourceRoot":"","sources":["../../../src/cli/OptionalCliExtensions.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,KAAK,8BAA8B,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAE3F,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,8BAA8B,CAAC;CACxC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"OptionalCliExtensions.d.ts","sourceRoot":"","sources":["../../../src/cli/OptionalCliExtensions.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,KAAK,8BAA8B,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAE3F,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,8BAA8B,CAAC;CACxC,CAAC,CAAC;AAEH,KAAK,+BAA+B,GAAG,QAAQ,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC,CAAC;AAkRH,eAAO,MAAM,qBAAqB;oCACM,OAAO,CAAC,0BAA0B,EAAE,CAAC;sBAQnD,MAAM,EAAE,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC;sCAmBhE,MAAM,EAAE,YACJ,aAAa,CAAC,0BAA0B,CAAC,GAClD,0BAA0B,GAAG,SAAS;uCASN,0BAA0B,GAAG,MAAM;mCArDlC,MAAM,EAAE,KAAG,oBAAoB,GAAG,SAAS;EA8D/E,CAAC;AAEH,eAAO,MAAM,6BAA6B;yBA/ThB,MAAM;8BAQD,MAAM;wCAoF5B,oBAAoB,YACjB,+BAA+B,KACxC,MAAM,GAAG,IAAI;kCAhFqB,+BAA+B,KAAG,OAAO;4BAMnE,MAAM,QACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACnB,+BAA+B,KACxC,IAAI;8CA6FE,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;qCA0BV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;uCAgCV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,OAAO,CAAC;gCAuBV,oBAAoB,YACjB,+BAA+B,KACxC,OAAO,CAAC,0BAA0B,CAAC;gCAwCH,MAAM,EAAE,KAAG,MAAM,GAAG,SAAS;mCAU1B,MAAM,EAAE,KAAG,oBAAoB,GAAG,SAAS;8BAOhD,MAAM,EAAE,KAAG,OAAO;uCAvMT,oBAAoB,KAAG,MAAM,EAAE;gCAwBtC,oBAAoB,KAAG,MAAM,EAAE;EAuPhE,CAAC"}
|
|
@@ -19,6 +19,16 @@ const resolveProjectRoot = () => {
|
|
|
19
19
|
return configured;
|
|
20
20
|
return getProjectCwd();
|
|
21
21
|
};
|
|
22
|
+
const shouldLogFailures = (options) => {
|
|
23
|
+
if (options?.logFailures === true)
|
|
24
|
+
return true;
|
|
25
|
+
return readEnvString('ZINTRUST_DEBUG_OPTIONAL_CLI_EXTENSIONS').trim() === '1';
|
|
26
|
+
};
|
|
27
|
+
const debugFailure = (message, meta, options) => {
|
|
28
|
+
if (!shouldLogFailures(options))
|
|
29
|
+
return;
|
|
30
|
+
Logger.debug(message, meta);
|
|
31
|
+
};
|
|
22
32
|
const OPTIONAL_CLI_EXTENSIONS = Object.freeze([
|
|
23
33
|
{
|
|
24
34
|
packageName: '@zintrust/d1-migrator',
|
|
@@ -28,6 +38,7 @@ const OPTIONAL_CLI_EXTENSIONS = Object.freeze([
|
|
|
28
38
|
localCandidates: [
|
|
29
39
|
path.join(packageRoot, 'packages', 'd1-migrator', 'src', 'register.ts'),
|
|
30
40
|
path.join(packageRoot, 'packages', 'd1-migrator', 'src', 'register.js'),
|
|
41
|
+
path.join(packageRoot, 'packages', 'd1-migrator', 'dist', 'register.js'),
|
|
31
42
|
path.join(packageRoot, 'dist', 'packages', 'd1-migrator', 'src', 'register.js'),
|
|
32
43
|
],
|
|
33
44
|
},
|
|
@@ -47,11 +58,30 @@ const OPTIONAL_CLI_EXTENSIONS = Object.freeze([
|
|
|
47
58
|
localCandidates: [
|
|
48
59
|
path.join(packageRoot, 'packages', 'workers', 'src', 'register.ts'),
|
|
49
60
|
path.join(packageRoot, 'packages', 'workers', 'src', 'register.js'),
|
|
61
|
+
path.join(packageRoot, 'packages', 'workers', 'dist', 'register.js'),
|
|
50
62
|
path.join(packageRoot, 'dist', 'packages', 'workers', 'src', 'register.js'),
|
|
51
63
|
],
|
|
52
64
|
},
|
|
53
65
|
]);
|
|
54
|
-
const
|
|
66
|
+
const getProjectLocalCandidates = (entry) => {
|
|
67
|
+
const projectRoot = resolveProjectRoot();
|
|
68
|
+
if (projectRoot === packageRoot)
|
|
69
|
+
return [];
|
|
70
|
+
return Array.from(new Set(entry.localCandidates.flatMap((candidate) => {
|
|
71
|
+
const relativeCandidate = path.relative(packageRoot, candidate);
|
|
72
|
+
if (relativeCandidate === '' ||
|
|
73
|
+
relativeCandidate === '.' ||
|
|
74
|
+
relativeCandidate === '..' ||
|
|
75
|
+
relativeCandidate.startsWith(`..${path.sep}`)) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
return [path.join(projectRoot, relativeCandidate)];
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
const getLocalCandidates = (entry) => {
|
|
82
|
+
return Array.from(new Set([...getProjectLocalCandidates(entry), ...entry.localCandidates]));
|
|
83
|
+
};
|
|
84
|
+
const resolveProjectInstalledUrl = (entry, options) => {
|
|
55
85
|
try {
|
|
56
86
|
const projectRoot = resolveProjectRoot();
|
|
57
87
|
const requireFromProject = createRequire(path.join(projectRoot, 'package.json'));
|
|
@@ -59,17 +89,17 @@ const resolveProjectInstalledUrl = (entry) => {
|
|
|
59
89
|
return pathToFileURL(resolved).href;
|
|
60
90
|
}
|
|
61
91
|
catch (error) {
|
|
62
|
-
|
|
92
|
+
debugFailure('[cli] Optional CLI extension not resolved from project root', {
|
|
63
93
|
packageName: entry.packageName,
|
|
64
94
|
specifier: entry.specifier,
|
|
65
95
|
projectRoot: resolveProjectRoot(),
|
|
66
96
|
error: error instanceof Error ? error.message : String(error),
|
|
67
|
-
});
|
|
97
|
+
}, options);
|
|
68
98
|
return null;
|
|
69
99
|
}
|
|
70
100
|
};
|
|
71
|
-
const tryImportProjectInstalledPackage = async (entry) => {
|
|
72
|
-
const resolvedUrl = resolveProjectInstalledUrl(entry);
|
|
101
|
+
const tryImportProjectInstalledPackage = async (entry, options) => {
|
|
102
|
+
const resolvedUrl = resolveProjectInstalledUrl(entry, options);
|
|
73
103
|
if (resolvedUrl === null)
|
|
74
104
|
return false;
|
|
75
105
|
try {
|
|
@@ -81,16 +111,16 @@ const tryImportProjectInstalledPackage = async (entry) => {
|
|
|
81
111
|
return true;
|
|
82
112
|
}
|
|
83
113
|
catch (error) {
|
|
84
|
-
|
|
114
|
+
debugFailure('[cli] Optional CLI extension project import failed', {
|
|
85
115
|
packageName: entry.packageName,
|
|
86
116
|
resolvedUrl,
|
|
87
117
|
error: error instanceof Error ? error.message : String(error),
|
|
88
|
-
});
|
|
118
|
+
}, options);
|
|
89
119
|
return false;
|
|
90
120
|
}
|
|
91
121
|
};
|
|
92
|
-
const tryImportLocalCandidate = async (entry) => {
|
|
93
|
-
const existingCandidates = entry.
|
|
122
|
+
const tryImportLocalCandidate = async (entry, options) => {
|
|
123
|
+
const existingCandidates = getLocalCandidates(entry).filter((candidate) => existsSync(candidate));
|
|
94
124
|
if (existingCandidates.length === 0)
|
|
95
125
|
return false;
|
|
96
126
|
const results = await Promise.all(existingCandidates.map(async (candidate) => {
|
|
@@ -103,17 +133,17 @@ const tryImportLocalCandidate = async (entry) => {
|
|
|
103
133
|
return true;
|
|
104
134
|
}
|
|
105
135
|
catch (error) {
|
|
106
|
-
|
|
136
|
+
debugFailure('[cli] Optional CLI extension local fallback failed', {
|
|
107
137
|
packageName: entry.packageName,
|
|
108
138
|
candidate,
|
|
109
139
|
error: error instanceof Error ? error.message : String(error),
|
|
110
|
-
});
|
|
140
|
+
}, options);
|
|
111
141
|
return false;
|
|
112
142
|
}
|
|
113
143
|
}));
|
|
114
144
|
return results.some(Boolean);
|
|
115
145
|
};
|
|
116
|
-
const tryImportPackageSpecifier = async (entry) => {
|
|
146
|
+
const tryImportPackageSpecifier = async (entry, options) => {
|
|
117
147
|
try {
|
|
118
148
|
await import(entry.specifier);
|
|
119
149
|
Logger.debug('[cli] Loaded optional CLI extension package', {
|
|
@@ -123,16 +153,16 @@ const tryImportPackageSpecifier = async (entry) => {
|
|
|
123
153
|
return true;
|
|
124
154
|
}
|
|
125
155
|
catch (error) {
|
|
126
|
-
|
|
156
|
+
debugFailure('[cli] Optional CLI extension package not loaded', {
|
|
127
157
|
packageName: entry.packageName,
|
|
128
158
|
specifier: entry.specifier,
|
|
129
159
|
error: error instanceof Error ? error.message : String(error),
|
|
130
|
-
});
|
|
160
|
+
}, options);
|
|
131
161
|
return false;
|
|
132
162
|
}
|
|
133
163
|
};
|
|
134
|
-
const tryImportExtension = async (entry) => {
|
|
135
|
-
if (await tryImportProjectInstalledPackage(entry)) {
|
|
164
|
+
const tryImportExtension = async (entry, options) => {
|
|
165
|
+
if (await tryImportProjectInstalledPackage(entry, options)) {
|
|
136
166
|
return {
|
|
137
167
|
packageName: entry.packageName,
|
|
138
168
|
commands: [...entry.commands],
|
|
@@ -141,7 +171,7 @@ const tryImportExtension = async (entry) => {
|
|
|
141
171
|
source: 'project',
|
|
142
172
|
};
|
|
143
173
|
}
|
|
144
|
-
if (await tryImportPackageSpecifier(entry)) {
|
|
174
|
+
if (await tryImportPackageSpecifier(entry, options)) {
|
|
145
175
|
return {
|
|
146
176
|
packageName: entry.packageName,
|
|
147
177
|
commands: [...entry.commands],
|
|
@@ -150,7 +180,7 @@ const tryImportExtension = async (entry) => {
|
|
|
150
180
|
source: 'package',
|
|
151
181
|
};
|
|
152
182
|
}
|
|
153
|
-
if (await tryImportLocalCandidate(entry)) {
|
|
183
|
+
if (await tryImportLocalCandidate(entry, options)) {
|
|
154
184
|
return {
|
|
155
185
|
packageName: entry.packageName,
|
|
156
186
|
commands: [...entry.commands],
|
|
@@ -175,9 +205,33 @@ const getRequestedCommand = (args) => {
|
|
|
175
205
|
}
|
|
176
206
|
return typeof args[0] === 'string' && args[0].trim() !== '' ? args[0].trim() : undefined;
|
|
177
207
|
};
|
|
208
|
+
const findRequestedExtension = (args) => {
|
|
209
|
+
const requestedCommand = getRequestedCommand(args);
|
|
210
|
+
if (requestedCommand === undefined)
|
|
211
|
+
return undefined;
|
|
212
|
+
return OPTIONAL_CLI_EXTENSIONS.find((entry) => entry.commands.includes(requestedCommand));
|
|
213
|
+
};
|
|
214
|
+
const isRootHelpRequest = (args) => {
|
|
215
|
+
if (args.length === 0)
|
|
216
|
+
return true;
|
|
217
|
+
const first = typeof args[0] === 'string' ? args[0].trim() : '';
|
|
218
|
+
if (first === '' || first === '-h' || first === '--help')
|
|
219
|
+
return true;
|
|
220
|
+
return first === 'help' && getRequestedCommand(args) === undefined;
|
|
221
|
+
};
|
|
178
222
|
export const OptionalCliExtensions = Object.freeze({
|
|
179
223
|
async tryImportInstalledExtensions() {
|
|
180
|
-
return Promise.all(OPTIONAL_CLI_EXTENSIONS.map(tryImportExtension));
|
|
224
|
+
return Promise.all(OPTIONAL_CLI_EXTENSIONS.map(async (entry) => tryImportExtension(entry, { logFailures: false })));
|
|
225
|
+
},
|
|
226
|
+
async loadForArgs(args) {
|
|
227
|
+
const requestedExtension = findRequestedExtension(args);
|
|
228
|
+
if (requestedExtension !== undefined) {
|
|
229
|
+
return [await tryImportExtension(requestedExtension, { logFailures: false })];
|
|
230
|
+
}
|
|
231
|
+
if (isRootHelpRequest(args)) {
|
|
232
|
+
return Promise.all(OPTIONAL_CLI_EXTENSIONS.map(async (entry) => tryImportExtension(entry, { logFailures: false })));
|
|
233
|
+
}
|
|
234
|
+
return [];
|
|
181
235
|
},
|
|
182
236
|
findMissingExtensionForArgs(args, statuses) {
|
|
183
237
|
const requestedCommand = getRequestedCommand(args);
|
|
@@ -192,14 +246,21 @@ export const OptionalCliExtensions = Object.freeze({
|
|
|
192
246
|
`Install it and try again: ${status.installCommand}`,
|
|
193
247
|
].join(' ');
|
|
194
248
|
},
|
|
249
|
+
findRequestedExtension,
|
|
195
250
|
});
|
|
196
251
|
export const OptionalCliExtensionsInternal = Object.freeze({
|
|
197
252
|
getProjectCwd,
|
|
198
253
|
resolveProjectRoot,
|
|
199
254
|
resolveProjectInstalledUrl,
|
|
255
|
+
shouldLogFailures,
|
|
256
|
+
debugFailure,
|
|
200
257
|
tryImportProjectInstalledPackage,
|
|
201
258
|
tryImportLocalCandidate,
|
|
202
259
|
tryImportPackageSpecifier,
|
|
203
260
|
tryImportExtension,
|
|
204
261
|
getRequestedCommand,
|
|
262
|
+
findRequestedExtension,
|
|
263
|
+
isRootHelpRequest,
|
|
264
|
+
getProjectLocalCandidates,
|
|
265
|
+
getLocalCandidates,
|
|
205
266
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/StartCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"StartCommand.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/StartCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAspBvF,eAAO,MAAM,YAAY;cACb,YAAY;EA6BtB,CAAC"}
|
|
@@ -79,6 +79,28 @@ const resolveRuntime = (options) => {
|
|
|
79
79
|
const raw = typeof options.runtime === 'string' ? options.runtime.trim() : '';
|
|
80
80
|
return raw === '' ? undefined : raw;
|
|
81
81
|
};
|
|
82
|
+
const resolveConfiguredRuntime = (options) => {
|
|
83
|
+
const cliRuntime = resolveRuntime(options);
|
|
84
|
+
if (cliRuntime !== undefined && cliRuntime !== 'auto')
|
|
85
|
+
return cliRuntime;
|
|
86
|
+
const envRuntime = readEnvString('RUNTIME').trim();
|
|
87
|
+
if (envRuntime === '' || envRuntime === 'auto')
|
|
88
|
+
return undefined;
|
|
89
|
+
return envRuntime;
|
|
90
|
+
};
|
|
91
|
+
const isCloudflareRuntimeRequest = (runtime) => {
|
|
92
|
+
if (typeof runtime !== 'string')
|
|
93
|
+
return false;
|
|
94
|
+
const normalized = runtime.trim().toLowerCase();
|
|
95
|
+
return normalized === 'cloudflare' || normalized === 'cloudflare-workers';
|
|
96
|
+
};
|
|
97
|
+
const assertCompatibleStartVariant = (variant, configuredRuntime) => {
|
|
98
|
+
if (variant !== 'node')
|
|
99
|
+
return;
|
|
100
|
+
if (!isCloudflareRuntimeRequest(configuredRuntime))
|
|
101
|
+
return;
|
|
102
|
+
throw ErrorFactory.createCliError('Error: Cloudflare runtime requires Wrangler dev mode. Run "zin start --wg" (or "zin s --wg") instead of plain "zin start".');
|
|
103
|
+
};
|
|
82
104
|
const resolveStartVariant = (options) => {
|
|
83
105
|
const wantWrangler = options.wrangler === true || options.wg === true;
|
|
84
106
|
const wantDeno = options.deno === true;
|
|
@@ -423,6 +445,7 @@ const executeStart = async (options, cmd) => {
|
|
|
423
445
|
const mode = resolveMode(options);
|
|
424
446
|
const port = resolvePort(options);
|
|
425
447
|
const runtime = resolveRuntime(options);
|
|
448
|
+
const configuredRuntime = resolveConfiguredRuntime(options);
|
|
426
449
|
const variant = resolveStartVariant(options);
|
|
427
450
|
const envName = typeof options.env === 'string' ? options.env.trim() : '';
|
|
428
451
|
let effectiveRuntime = runtime;
|
|
@@ -434,6 +457,7 @@ const executeStart = async (options, cmd) => {
|
|
|
434
457
|
await executeSplitStart(cmd, cwd, options);
|
|
435
458
|
return;
|
|
436
459
|
}
|
|
460
|
+
assertCompatibleStartVariant(variant, configuredRuntime);
|
|
437
461
|
const cacheEnabled = resolveCacheEnabledPreference(options);
|
|
438
462
|
EnvFileLoader.applyCliOverrides({
|
|
439
463
|
nodeEnv: mode,
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @zintrust/core v0.4.
|
|
2
|
+
* @zintrust/core v0.4.4
|
|
3
3
|
*
|
|
4
4
|
* ZinTrust Framework - Production-Grade TypeScript Backend
|
|
5
5
|
* Built for performance, type safety, and exceptional developer experience
|
|
6
6
|
*
|
|
7
7
|
* Build Information:
|
|
8
|
-
* Built: 2026-03-
|
|
8
|
+
* Built: 2026-03-20T14:32:19.322Z
|
|
9
9
|
* Node: >=20.0.0
|
|
10
10
|
* License: MIT
|
|
11
11
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* Available at runtime for debugging and health checks
|
|
22
22
|
*/
|
|
23
23
|
export const ZINTRUST_VERSION = '0.1.41';
|
|
24
|
-
export const ZINTRUST_BUILD_DATE = '2026-03-
|
|
24
|
+
export const ZINTRUST_BUILD_DATE = '2026-03-20T14:32:19.289Z'; // Replaced during build
|
|
25
25
|
export { Application } from './boot/Application.js';
|
|
26
26
|
export { AwsSigV4 } from './common/index.js';
|
|
27
27
|
export { SignedRequest } from './security/SignedRequest.js';
|