silgi 0.18.3 → 0.18.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.18.3";
1
+ const version = "0.18.4";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -60,16 +60,23 @@ async function silgiGenerateType(silgi) {
60
60
  }
61
61
  const userTsConfig = {
62
62
  compilerOptions: {
63
- forceConsistentCasingInFileNames: true,
64
- strict: silgi.options.typescript.strict,
65
- noEmit: true,
63
+ /* Base options: */
64
+ esModuleInterop: true,
65
+ allowSyntheticDefaultImports: true,
66
+ skipLibCheck: true,
66
67
  target: "ESNext",
67
- module: "ESNext",
68
- moduleResolution: "Bundler",
69
68
  allowJs: true,
70
69
  resolveJsonModule: true,
71
- allowSyntheticDefaultImports: true,
72
- allowImportingTsExtensions: true,
70
+ moduleDetection: "force",
71
+ isolatedModules: true,
72
+ verbatimModuleSyntax: true,
73
+ /* Strictness */
74
+ strict: silgi.options.typescript.strict,
75
+ noUncheckedIndexedAccess: true,
76
+ noImplicitOverride: true,
77
+ forceConsistentCasingInFileNames: true,
78
+ /* If NOT transpiling with TypeScript: */
79
+ module: "Preserve",
73
80
  customConditions: silgi.options.typescript.customConditions,
74
81
  paths: {
75
82
  "#silgiImports": [
@@ -350,7 +350,7 @@ async function loadSilgiModuleInstance(silgiModule) {
350
350
  }
351
351
  return { silgiModule };
352
352
  }
353
- async function installModules(silgi) {
353
+ async function installModules(silgi, prepare = false) {
354
354
  const jiti = createJiti(silgi.options.rootDir, {
355
355
  alias: silgi.options.alias
356
356
  });
@@ -367,19 +367,22 @@ async function installModules(silgi) {
367
367
  silgi.scanModules = silgi.scanModules.filter((m) => m.entryPath !== module.entryPath);
368
368
  continue;
369
369
  }
370
- await installModule(silgiModule, silgi);
370
+ await installModule(silgiModule, silgi, prepare);
371
371
  } catch (err) {
372
372
  silgi.logger.error(err);
373
373
  }
374
374
  }
375
375
  }
376
- async function installModule(moduleToInstall, silgi = useSilgiCLI(), inlineOptions) {
376
+ async function installModule(moduleToInstall, silgi = useSilgiCLI(), inlineOptions, prepare = false) {
377
377
  const { silgiModule } = await loadSilgiModuleInstance(moduleToInstall);
378
- const res = await silgiModule({}, silgi) ?? {};
378
+ const res = await silgiModule(inlineOptions || {}, silgi) ?? {};
379
379
  if (res === false) {
380
380
  return false;
381
381
  }
382
382
  const metaData = await silgiModule.getMeta?.();
383
+ if (prepare) {
384
+ return metaData;
385
+ }
383
386
  const installedModule = silgi.scanModules.find((m) => m.meta.configKey === metaData?.configKey);
384
387
  if (installedModule) {
385
388
  installedModule.installed = true;
@@ -1478,6 +1481,7 @@ async function createSilgiCLI(config = {}, opts = {}) {
1478
1481
  console.error("Please fix type errors before continuing");
1479
1482
  process.exit(1);
1480
1483
  }
1484
+ await installModules(silgi, true);
1481
1485
  await writeScanFiles(silgi);
1482
1486
  silgi.storage = await createStorageCLI(silgi);
1483
1487
  silgi.hooks.hook("close", async () => {
@@ -1,4 +1,4 @@
1
- const version = "0.18.3";
1
+ const version = "0.18.4";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.18.3";
1
+ const version = "0.18.4";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
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.18.3",
4
+ "version": "0.18.4",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {