silgi 0.8.49 → 0.8.50

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.8.49";
1
+ const version = "0.8.50";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
@@ -9,6 +9,7 @@ import { resolvePath, parseNodeModulePath, lookupNodeModuleSubpath, resolve as r
9
9
  import { resolveAlias } from 'pathe/utils';
10
10
  import { relativeWithDot, isDirectory, writeFile, resolveAlias as resolveAlias$1, resolvePath as resolvePath$1, normalizeTemplate, useLogger, addTemplate } from 'silgi/kit';
11
11
  import { toExports, scanExports, createUnimport } from 'unimport';
12
+ import { execSync } from 'node:child_process';
12
13
  import { createJiti } from 'dev-jiti';
13
14
  import { readPackageJSON } from 'pkg-types';
14
15
  import { hash } from 'ohash';
@@ -277,6 +278,14 @@ async function readCoreFile(silgi) {
277
278
  console.error("Failed to read core.ts file:", error);
278
279
  } else {
279
280
  if (error instanceof Error) {
281
+ if (error.message.includes("Cannot find module")) {
282
+ const isInstall = await consola.withTag("silgi").prompt("pnpm silgi install", {
283
+ type: "confirm"
284
+ });
285
+ if (isInstall) {
286
+ execSync("na silgi install", { stdio: "inherit" });
287
+ }
288
+ }
280
289
  consola.withTag("silgi").error(error.message);
281
290
  }
282
291
  }
@@ -1,4 +1,4 @@
1
- const version = "0.8.49";
1
+ const version = "0.8.50";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
@@ -1,4 +1,4 @@
1
- const version = "0.8.49";
1
+ const version = "0.8.50";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.8.49",
4
+ "version": "0.8.50",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {