silgi 0.20.19 → 0.20.21
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/_chunks/index.mjs +1 -1
- package/dist/cli/common.mjs +28 -0
- package/dist/cli/dev.mjs +1 -1
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/common.mjs
CHANGED
|
@@ -916,12 +916,20 @@ async function prepareServerFiles(silgi) {
|
|
|
916
916
|
customImports: [],
|
|
917
917
|
importItems
|
|
918
918
|
};
|
|
919
|
+
function reset() {
|
|
920
|
+
scanned.services = [];
|
|
921
|
+
scanned.shareds = [];
|
|
922
|
+
scanned.schemas = [];
|
|
923
|
+
scanned.modulesURIs = {};
|
|
924
|
+
scanned.customImports = [];
|
|
925
|
+
}
|
|
919
926
|
if (silgi.uris) {
|
|
920
927
|
defu$1(scanned.uris, silgi.uris);
|
|
921
928
|
}
|
|
922
929
|
if (silgi.modulesURIs) {
|
|
923
930
|
defu$1(scanned.modulesURIs, silgi.modulesURIs);
|
|
924
931
|
}
|
|
932
|
+
reset();
|
|
925
933
|
await silgi.callHook("prepare:scan.ts", scanned);
|
|
926
934
|
if (importItems["#silgi/vfs"].import.length === 0) {
|
|
927
935
|
delete importItems["#silgi/vfs"];
|
|
@@ -2156,6 +2164,26 @@ async function prepareSchema(silgi) {
|
|
|
2156
2164
|
routeRules: [],
|
|
2157
2165
|
routeRulesConfig: []
|
|
2158
2166
|
};
|
|
2167
|
+
function reset() {
|
|
2168
|
+
data.options = [];
|
|
2169
|
+
data.contexts = [];
|
|
2170
|
+
data.actions = [];
|
|
2171
|
+
data.shareds = [
|
|
2172
|
+
{
|
|
2173
|
+
key: "modulesURIs",
|
|
2174
|
+
value: "{ modulesURIs: typeof modulesURIs }"
|
|
2175
|
+
}
|
|
2176
|
+
];
|
|
2177
|
+
data.events = [];
|
|
2178
|
+
data.storeBase = [];
|
|
2179
|
+
data.hooks = [];
|
|
2180
|
+
data.runtimeHooks = [];
|
|
2181
|
+
data.runtimeOptions = [];
|
|
2182
|
+
data.methods = [];
|
|
2183
|
+
data.routeRules = [];
|
|
2184
|
+
data.routeRulesConfig = [];
|
|
2185
|
+
}
|
|
2186
|
+
reset();
|
|
2159
2187
|
await silgi.callHook("prepare:schema.ts", data);
|
|
2160
2188
|
relativeWithDot(silgi.options.build.typesDir, `${silgi.options.silgi.serverDir}/core.ts`);
|
|
2161
2189
|
const silgiScanTS = relativeWithDot(silgi.options.build.typesDir, `${silgi.options.silgi.serverDir}/scan.ts`);
|
package/dist/cli/dev.mjs
CHANGED
|
@@ -99,9 +99,9 @@ const dev = defineCommand({
|
|
|
99
99
|
process.on("SIGINT", async () => {
|
|
100
100
|
consola.withTag("silgi").info("Shutting down...");
|
|
101
101
|
await close();
|
|
102
|
+
await silgi.callHook("close", silgi);
|
|
102
103
|
process.exit(0);
|
|
103
104
|
});
|
|
104
|
-
await silgi.callHook("close", silgi);
|
|
105
105
|
consola.withTag("silgi").success("Prepare completed");
|
|
106
106
|
consola.withTag("silgi").info("Process is still running. Press Ctrl+C to exit.");
|
|
107
107
|
setInterval(() => {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED