silgi 0.8.56 → 0.8.58

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.56";
1
+ const version = "0.8.58";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
@@ -660,9 +660,16 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
660
660
  importItems
661
661
  };
662
662
  for (const module of silgi.scanModules) {
663
- _data.cliOptions[module.meta.configKey] = {
664
- ...module.options
665
- };
663
+ if (module.meta.cliToRuntimeOptionsKeys && module.meta.cliToRuntimeOptionsKeys?.length > 0) {
664
+ for (const key of module.meta.cliToRuntimeOptionsKeys) {
665
+ _data.cliOptions[module.meta.configKey] = {
666
+ ..._data.cliOptions[module.meta.configKey],
667
+ [key]: module.options[key]
668
+ };
669
+ }
670
+ } else {
671
+ _data.cliOptions[module.meta.configKey] = {};
672
+ }
666
673
  }
667
674
  await silgi.callHook("prepare:core.ts", _data);
668
675
  if (importItems["#silgi/vfs"].import.length === 0) {
@@ -1073,7 +1080,7 @@ async function _resolveSilgiModule(mod, silgi) {
1073
1080
  meta: buildTimeModuleMeta,
1074
1081
  entryPath: _url,
1075
1082
  installed: false,
1076
- options: await mod.getOptions?.() || {}
1083
+ options
1077
1084
  });
1078
1085
  }
1079
1086
  }
@@ -1,4 +1,4 @@
1
- const version = "0.8.56";
1
+ const version = "0.8.58";
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.8.56";
1
+ const version = "0.8.58";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
@@ -469,6 +469,7 @@ interface ModuleMeta {
469
469
  * @private
470
470
  */
471
471
  _packageName?: string;
472
+ cliToRuntimeOptionsKeys?: string[];
472
473
  readonly afterDependencies?: ReadonlyArray<string>;
473
474
  readonly beforeDependencies?: ReadonlyArray<string>;
474
475
  readonly requiredDependencies?: ReadonlyArray<string>;
@@ -469,6 +469,7 @@ interface ModuleMeta {
469
469
  * @private
470
470
  */
471
471
  _packageName?: string;
472
+ cliToRuntimeOptionsKeys?: string[];
472
473
  readonly afterDependencies?: ReadonlyArray<string>;
473
474
  readonly beforeDependencies?: ReadonlyArray<string>;
474
475
  readonly requiredDependencies?: ReadonlyArray<string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.8.56",
4
+ "version": "0.8.58",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {