silgi 0.20.0 → 0.20.2

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.0";
1
+ const version = "0.20.2";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -345,9 +345,6 @@ async function registerModuleExportScan(silgi) {
345
345
  silgi.hook("prepare:schema.ts", async (options) => {
346
346
  for (const module of silgi.scanModules) {
347
347
  const moduleReExports = [];
348
- if (module.entryPath.endsWith("src/module.ts")) {
349
- module.entryPath = module.entryPath.replace(/src\/module\.ts$/, "dist/module.mjs");
350
- }
351
348
  const moduleTypes = await promises.readFile(module.entryPath.replace(/\.mjs$/, "Types.d.ts"), "utf8").catch(() => "");
352
349
  const normalisedModuleTypes = moduleTypes.replace(/export\s*\{.*?\}/gs, (match) => match.replace(/\b(type|interface)\b/g, ""));
353
350
  for (const e of findTypeExports(normalisedModuleTypes)) {
@@ -126,7 +126,7 @@ const run = defineCommand({
126
126
  consola.error("Silgi not found");
127
127
  return;
128
128
  }
129
- const silgi = data.result.silgi;
129
+ const silgi = data?.result?.silgi;
130
130
  if (silgi) {
131
131
  if (silgiCLICtx.tryUse()) {
132
132
  silgiCLICtx.unset();
@@ -162,6 +162,10 @@ const run = defineCommand({
162
162
  return;
163
163
  }
164
164
  } else {
165
+ if (!silgi) {
166
+ consola.error("Silgi not found");
167
+ return;
168
+ }
165
169
  if (Object.keys(cliJson).length === 0) {
166
170
  consola.warn("No commands found in cli.json");
167
171
  return;
@@ -234,7 +238,6 @@ const run = defineCommand({
234
238
  }
235
239
  }
236
240
  for (const cmd of selectedCommands) {
237
- consola.info(`Running ${cmd.command}:${cmd.script}...`);
238
241
  if (cmd.handler.enabled === false) {
239
242
  continue;
240
243
  }
@@ -1,4 +1,4 @@
1
- const version = "0.20.0";
1
+ const version = "0.20.2";
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.0";
1
+ const version = "0.20.2";
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.0",
4
+ "version": "0.20.2",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {