silgi 0.9.2 → 0.9.4

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.9.2";
1
+ const version = "0.9.4";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
@@ -9,7 +9,6 @@ import { resolveAlias } from 'pathe/utils';
9
9
  import { relativeWithDot, isDirectory, writeFile, resolveAlias as resolveAlias$1, resolvePath as resolvePath$1, normalizeTemplate, useLogger, addTemplate } from 'silgi/kit';
10
10
  import { runtimeDir } from 'silgi/runtime/meta';
11
11
  import { toExports, scanExports, createUnimport } from 'unimport';
12
- import { execSync } from 'node:child_process';
13
12
  import { createJiti } from 'dev-jiti';
14
13
  import { readPackageJSON } from 'pkg-types';
15
14
  import { hash } from 'ohash';
@@ -175,20 +174,6 @@ async function readCoreFile(silgi) {
175
174
  console.error("Failed to read core.ts file:", error);
176
175
  } else {
177
176
  if (error instanceof Error) {
178
- if (error.message.includes("Cannot find module")) {
179
- const isInstall = await consola.withTag("silgi").prompt("The necessary files for the modules need to be added. You must allow this.", {
180
- type: "confirm"
181
- });
182
- if (isInstall) {
183
- execSync('na silgi run --tag="init"', { stdio: "inherit" });
184
- const isSetup = await consola.withTag("silgi").prompt("We need the sample data that the modules need. You must allow this.", {
185
- type: "confirm"
186
- });
187
- if (isSetup) {
188
- execSync('na silgi run --tag="setup"', { stdio: "inherit" });
189
- }
190
- }
191
- }
192
177
  consola.withTag("silgi").error(error.message);
193
178
  }
194
179
  }
@@ -871,11 +856,11 @@ async function nitroFramework(silgi, skip = false) {
871
856
  path: join(runtimeDir, "internal/nitro")
872
857
  });
873
858
  silgi.hook("prepare:core.ts", (_data) => {
874
- if (silgi.options.imports !== false) {
875
- silgi.options.imports.presets ??= [];
876
- silgi.options.imports.presets.push(...getNitroImportsPreset());
877
- }
878
859
  });
860
+ if (silgi.options.imports !== false) {
861
+ silgi.options.imports.presets ??= [];
862
+ silgi.options.imports.presets.push(...getNitroImportsPreset());
863
+ }
879
864
  await h3Framework(silgi, true);
880
865
  }
881
866
  function getNitroImportsPreset() {
@@ -1,4 +1,4 @@
1
- const version = "0.9.2";
1
+ const version = "0.9.4";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
@@ -1,4 +1,4 @@
1
- const version = "0.9.2";
1
+ const version = "0.9.4";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.9.2",
4
+ "version": "0.9.4",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {