silgi 0.9.14 → 0.9.16

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.14";
1
+ const version = "0.9.16";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.3.0",
4
4
  "@nuxt/kit": "^3.15.4",
@@ -146,9 +146,8 @@ async function readCoreFile(silgi) {
146
146
  });
147
147
  try {
148
148
  if (silgi.options.commandType === "prepare") {
149
- injectedResult.code = injectedResult.code.replace(/runtimeConfig: \{\}/, "runtimeConfig: globalThis.$silgiSharedRuntimeConfig");
149
+ injectedResult.code = injectedResult.code.replace(/runtimeConfig: \{\}/, `runtimeConfig: ${JSON.stringify(silgi.options.runtimeConfig)}`);
150
150
  }
151
- console.log(injectedResult.code);
152
151
  const coreFile = await jiti.evalModule(
153
152
  injectedResult.code,
154
153
  {
@@ -626,7 +625,6 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
626
625
  " modulesURIs,",
627
626
  ` plugins: [${plugins.join(", ")}],`,
628
627
  _data._silgiConfigs.length > 0 ? ` ${_data._silgiConfigs.map((config) => typeof config === "string" ? config : typeof config === "object" ? Object.entries(config).map(([key, value]) => `${key}: ${value}`).join(",\n ") : "").join(",\n ")},` : "",
629
- " ...global: {},",
630
628
  " ...buildOptions,",
631
629
  " options: mergeDeep(",
632
630
  " moduleOptions || {},",
@@ -1801,7 +1799,7 @@ function useCLIRuntimeConfig(silgi) {
1801
1799
  const _sharedRuntimeConfig = _deepFreeze(
1802
1800
  applyEnv(klona(_inlineRuntimeConfig), envOptions)
1803
1801
  );
1804
- globalThis.$silgiSharedRuntimeConfig = _sharedRuntimeConfig;
1802
+ silgi.options.runtimeConfig = _sharedRuntimeConfig;
1805
1803
  return _sharedRuntimeConfig;
1806
1804
  }
1807
1805
 
@@ -1,4 +1,4 @@
1
- const version = "0.9.14";
1
+ const version = "0.9.16";
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.14";
1
+ const version = "0.9.16";
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.14",
4
+ "version": "0.9.16",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {