silgi 0.8.54 → 0.8.55

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,7 +1,6 @@
1
- const version = "0.8.54";
1
+ const version = "0.8.55";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
- "@fastify/deepmerge": "^2.0.2",
5
4
  "@nuxt/kit": "^3.15.4",
6
5
  "@nuxt/schema": "^3.15.4",
7
6
  "@types/node": "^22.13.1",
@@ -20,6 +20,7 @@ import { useSilgiCLI, silgiCLICtx } from 'silgi/core';
20
20
  import { pascalCase } from 'scule';
21
21
  import { h as hasInstalledModule } from './compatibility.mjs';
22
22
  import { pathToFileURL, fileURLToPath } from 'node:url';
23
+ import { deepmerge } from '@fastify/deepmerge';
23
24
  import { isRelative, withTrailingSlash } from 'ufo';
24
25
  import { globby } from 'globby';
25
26
  import ignore from 'ignore';
@@ -611,6 +612,7 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
611
612
  "silgi/types": {
612
613
  import: [
613
614
  { name: "SilgiRuntimeOptions", type: true },
615
+ { name: "SilgiModuleOptions", type: true },
614
616
  { name: "SilgiOptions", type: true },
615
617
  { name: "FrameworkContext", type: true },
616
618
  { name: "DeepPartial", type: true },
@@ -691,7 +693,7 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
691
693
  ""
692
694
  ];
693
695
  const importData = [
694
- `export const cliOptions: SilgiRuntimeOptions = ${JSON.stringify(_data.cliOptions, null, 2)}`,
696
+ `export const cliOptions: SilgiRuntimeOptions & SilgiModuleOptions = ${JSON.stringify(_data.cliOptions, null, 2)}`,
695
697
  "",
696
698
  ..._data.afterCliOptions,
697
699
  "",
@@ -1008,6 +1010,7 @@ async function installModule(moduleToInstall, silgi = useSilgiCLI(), inlineOptio
1008
1010
  }
1009
1011
 
1010
1012
  const logger$1 = consola$1;
1013
+ const merged = deepmerge({ all: true });
1011
1014
  async function _resolveSilgiModule(mod, silgi) {
1012
1015
  let _url;
1013
1016
  let buildTimeModuleMeta = {};
@@ -1063,10 +1066,10 @@ async function _resolveSilgiModule(mod, silgi) {
1063
1066
  }
1064
1067
  const options = await mod.getOptions?.() || {};
1065
1068
  if (options) {
1066
- silgi.options._c12.config[buildTimeModuleMeta.configKey] = {
1067
- ...silgi.options._c12.config[buildTimeModuleMeta.configKey],
1068
- ...options
1069
- };
1069
+ silgi.options._c12.config[buildTimeModuleMeta.configKey] = merged(
1070
+ silgi.options._c12.config[buildTimeModuleMeta.configKey] || {},
1071
+ options || {}
1072
+ );
1070
1073
  }
1071
1074
  silgi.scanModules.push({
1072
1075
  meta: buildTimeModuleMeta,
@@ -1,7 +1,6 @@
1
- const version = "0.8.54";
1
+ const version = "0.8.55";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
- "@fastify/deepmerge": "^2.0.2",
5
4
  "@nuxt/kit": "^3.15.4",
6
5
  "@nuxt/schema": "^3.15.4",
7
6
  "@types/node": "^22.13.1",
@@ -1,7 +1,6 @@
1
- const version = "0.8.54";
1
+ const version = "0.8.55";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
- "@fastify/deepmerge": "^2.0.2",
5
4
  "@nuxt/kit": "^3.15.4",
6
5
  "@nuxt/schema": "^3.15.4",
7
6
  "@types/node": "^22.13.1",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.8.54",
4
+ "version": "0.8.55",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -76,6 +76,7 @@
76
76
  "runtime-meta.*"
77
77
  ],
78
78
  "peerDependencies": {
79
+ "@fastify/deepmerge": "^2.0.2",
79
80
  "@nuxt/kit": "^3.15.3",
80
81
  "@nuxt/schema": "^3.15.4",
81
82
  "h3": "^1.14.0",
@@ -110,6 +111,7 @@
110
111
  },
111
112
  "dependencies": {
112
113
  "@clack/prompts": "^0.10.0",
114
+ "@fastify/deepmerge": "^2.0.2",
113
115
  "@oxc-parser/wasm": "^0.49.0",
114
116
  "@standard-schema/spec": "^1.0.0",
115
117
  "c12": "^2.0.1",
@@ -144,7 +146,6 @@
144
146
  },
145
147
  "devDependencies": {
146
148
  "@antfu/eslint-config": "^4.2.0",
147
- "@fastify/deepmerge": "^2.0.2",
148
149
  "@nuxt/kit": "^3.15.4",
149
150
  "@nuxt/schema": "^3.15.4",
150
151
  "@types/node": "^22.13.1",