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.
@@ -1,4 +1,4 @@
1
- const version = "0.20.19";
1
+ const version = "0.20.21";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -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(() => {
@@ -1,4 +1,4 @@
1
- const version = "0.20.19";
1
+ const version = "0.20.21";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.20.19";
1
+ const version = "0.20.21";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.20.19",
4
+ "version": "0.20.21",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {