silgi 0.20.30 → 0.20.31

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.30";
1
+ const version = "0.20.31";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1299,7 +1299,39 @@ async function scanFiles$1(silgi, watchFiles) {
1299
1299
  }
1300
1300
  silgi.hook("prepare:scan.ts", (options) => {
1301
1301
  for (const { exportName, path, _name, type } of scanTS) {
1302
- options.schemas.push(_name);
1302
+ if (type === "service") {
1303
+ options.services.push(_name);
1304
+ }
1305
+ if (type === "shared") {
1306
+ options.shareds.push(_name);
1307
+ }
1308
+ if (type === "schema") {
1309
+ options.schemas.push(_name);
1310
+ }
1311
+ options.importItems[path] ??= {
1312
+ import: [],
1313
+ from: relativeWithDot(silgi.options.silgi.serverDir, path)
1314
+ };
1315
+ options.importItems[path].import.push({
1316
+ name: `${exportName} as ${_name}`,
1317
+ key: _name
1318
+ });
1319
+ }
1320
+ });
1321
+ silgi.hook("prepare:schema.ts", (options) => {
1322
+ for (const { exportName, path, _name, type } of schemaTS) {
1323
+ if (type === "shared") {
1324
+ options.shareds.push({
1325
+ key: _name,
1326
+ value: _name
1327
+ });
1328
+ }
1329
+ if (type === "context") {
1330
+ options.contexts.push({
1331
+ key: _name,
1332
+ value: _name
1333
+ });
1334
+ }
1303
1335
  options.importItems[path] ??= {
1304
1336
  import: [],
1305
1337
  from: relativeWithDot(silgi.options.silgi.serverDir, path)
@@ -1,4 +1,4 @@
1
- const version = "0.20.30";
1
+ const version = "0.20.31";
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.30";
1
+ const version = "0.20.31";
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.30",
4
+ "version": "0.20.31",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {