silgi 0.37.16 → 0.37.18
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 +4 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/watch.mjs +9 -1
- package/package.json +1 -1
package/dist/cli/dev.mjs
CHANGED
|
@@ -16,6 +16,10 @@ async function prepareBuild(config) {
|
|
|
16
16
|
commandType: config?.commandType || "prepare",
|
|
17
17
|
...config
|
|
18
18
|
});
|
|
19
|
+
globalThis.__nitro__ = globalThis.__nitro__ || {};
|
|
20
|
+
globalThis.__nitro__.useRuntimeConfig = function() {
|
|
21
|
+
return silgi?.options?.runtimeConfig || {};
|
|
22
|
+
};
|
|
19
23
|
await build(silgi);
|
|
20
24
|
return silgi;
|
|
21
25
|
}
|
package/dist/cli/index.mjs
CHANGED
package/dist/cli/watch.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import consola from 'consola';
|
|
|
3
3
|
import { version } from 'silgi/meta';
|
|
4
4
|
import { w as watchDev } from './dev.mjs';
|
|
5
5
|
import { b as commonArgs, a as command$1 } from './prepare.mjs';
|
|
6
|
+
import { useSilgiCLI } from 'silgi';
|
|
6
7
|
import 'chokidar';
|
|
7
8
|
import 'pathe';
|
|
8
9
|
import 'perfect-debounce';
|
|
9
10
|
import '../_chunks/silgiApp.mjs';
|
|
10
11
|
import 'unctx';
|
|
11
|
-
import 'silgi';
|
|
12
12
|
import './build.mjs';
|
|
13
13
|
import 'hookable';
|
|
14
14
|
import 'silgi/kit';
|
|
@@ -69,6 +69,14 @@ const command = defineCommand({
|
|
|
69
69
|
rawArgs: ["--commandType", "dev", "--dev", "true"]
|
|
70
70
|
});
|
|
71
71
|
const watch = await watchDev();
|
|
72
|
+
const silgi = useSilgiCLI();
|
|
73
|
+
if (!silgi) {
|
|
74
|
+
throw new Error("Silgi is not initialized");
|
|
75
|
+
}
|
|
76
|
+
globalThis.__nitro__ = globalThis.__nitro__ || {};
|
|
77
|
+
globalThis.__nitro__.useRuntimeConfig = function() {
|
|
78
|
+
return silgi?.options?.runtimeConfig || {};
|
|
79
|
+
};
|
|
72
80
|
process.on("SIGINT", async () => {
|
|
73
81
|
consola.withTag("silgi").info("Shutting down...");
|
|
74
82
|
if (watch) {
|