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.
- package/dist/_chunks/index.mjs +1 -1
- package/dist/cli/common.mjs +33 -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
|
@@ -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
|
-
|
|
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)
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED