silgi 0.29.4 → 0.29.6
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/dist/cli/dev.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/install.mjs +1 -1
- package/dist/cli/prepare.mjs +4 -4
- package/dist/cli/silgi.mjs +4 -6
- package/package.json +1 -1
package/dist/cli/dev.mjs
CHANGED
|
@@ -71,7 +71,7 @@ const dev = defineCommand({
|
|
|
71
71
|
},
|
|
72
72
|
async run() {
|
|
73
73
|
await runCommand(prepare, {
|
|
74
|
-
rawArgs: ["--
|
|
74
|
+
rawArgs: ["--commandType", "dev", "--dev", "true"]
|
|
75
75
|
});
|
|
76
76
|
const silgi = useSilgiCLI();
|
|
77
77
|
silgi.options.watchOptions.ignored ??= [];
|
package/dist/cli/index.mjs
CHANGED
package/dist/cli/install.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -114,7 +114,7 @@ const run = defineCommand({
|
|
|
114
114
|
},
|
|
115
115
|
async run({ args }) {
|
|
116
116
|
const data = args.active ? await runCommand(prepare, {
|
|
117
|
-
rawArgs: ["--
|
|
117
|
+
rawArgs: ["--commandType", "run"]
|
|
118
118
|
}) : void 0;
|
|
119
119
|
const silgi = useSilgiCLI$1();
|
|
120
120
|
const commands = await scanCommands();
|
|
@@ -214,7 +214,7 @@ const prepare = defineCommand({
|
|
|
214
214
|
type: "string",
|
|
215
215
|
description: "The environment to use"
|
|
216
216
|
},
|
|
217
|
-
|
|
217
|
+
commandType: {
|
|
218
218
|
type: "string",
|
|
219
219
|
description: "The command type to run"
|
|
220
220
|
}
|
|
@@ -226,11 +226,11 @@ const prepare = defineCommand({
|
|
|
226
226
|
dev: args.dev || args.stub,
|
|
227
227
|
stub: args.stub,
|
|
228
228
|
preset: args.preset,
|
|
229
|
-
commandType: args.
|
|
229
|
+
commandType: args.commandType || "prepare",
|
|
230
230
|
activeEnvironment: args.env
|
|
231
231
|
});
|
|
232
232
|
await build(silgi);
|
|
233
|
-
if (args.
|
|
233
|
+
if (args.commandType !== "run") {
|
|
234
234
|
await runCommand(run, {
|
|
235
235
|
rawArgs: ["--tag", "init", "--active", "false"]
|
|
236
236
|
});
|
package/dist/cli/silgi.mjs
CHANGED
|
@@ -1930,16 +1930,14 @@ async function readScanFile(silgi) {
|
|
|
1930
1930
|
const jiti = createJiti(silgi.options.rootDir, {
|
|
1931
1931
|
fsCache: true,
|
|
1932
1932
|
moduleCache: false,
|
|
1933
|
-
debug: silgi.options.debug,
|
|
1933
|
+
debug: silgi.options.debug === true,
|
|
1934
1934
|
alias: silgi.options.alias
|
|
1935
1935
|
});
|
|
1936
1936
|
try {
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
injectedResult.code = `globalThis._silgi_runtime = ${JSON.stringify(silgi.options.runtimeConfig)};
|
|
1937
|
+
globalThis._silgi_runtime = silgi.options.runtimeConfig;
|
|
1938
|
+
injectedResult.code = `globalThis._silgi_runtime = ${JSON.stringify(silgi.options.runtimeConfig)};
|
|
1940
1939
|
${injectedResult.code}`;
|
|
1941
|
-
|
|
1942
|
-
}
|
|
1940
|
+
injectedResult.code = injectedResult.code.replace(/runtimeConfig: \{\}/, `runtimeConfig: ${JSON.stringify(silgi.options.runtimeConfig)}`);
|
|
1943
1941
|
const scanFile = await jiti.evalModule(
|
|
1944
1942
|
injectedResult.code,
|
|
1945
1943
|
{
|