silgi 0.9.16 → 0.9.17
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.
- package/dist/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +2 -0
- package/dist/kit/index.d.mts +2 -1
- package/dist/kit/index.d.ts +2 -1
- package/dist/kit/index.mjs +1 -1
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -146,6 +146,8 @@ async function readCoreFile(silgi) {
|
|
|
146
146
|
});
|
|
147
147
|
try {
|
|
148
148
|
if (silgi.options.commandType === "prepare") {
|
|
149
|
+
injectedResult.code = `global.$silgiSharedRuntimeConfig = ${JSON.stringify(silgi.options.runtimeConfig)};
|
|
150
|
+
${injectedResult.code}`;
|
|
149
151
|
injectedResult.code = injectedResult.code.replace(/runtimeConfig: \{\}/, `runtimeConfig: ${JSON.stringify(silgi.options.runtimeConfig)}`);
|
|
150
152
|
}
|
|
151
153
|
const coreFile = await jiti.evalModule(
|
package/dist/kit/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import * as consola from 'consola';
|
|
3
3
|
import { ConsolaOptions } from 'consola';
|
|
4
|
+
import * as silgi_types from 'silgi/types';
|
|
4
5
|
import { ModuleOptionsCustom, ModuleDefinition, SilgiModule, SilgiCLI, SilgiPreset, SilgiPresetMeta, EnvOptions, SilgiTemplate, ResolvedSilgiTemplate } from 'silgi/types';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -76,7 +77,7 @@ declare function resolveSilgiModule(base: string, paths: string[]): Promise<stri
|
|
|
76
77
|
*
|
|
77
78
|
* This mirrors the runtime behavior of Nitro.
|
|
78
79
|
*/
|
|
79
|
-
declare function useSilgiRuntimeConfig():
|
|
80
|
+
declare function useSilgiRuntimeConfig(): silgi_types.SilgiRuntimeOptions;
|
|
80
81
|
declare function applyEnv(obj: Record<string, any>, opts: EnvOptions, parentKey?: string): Record<string, any>;
|
|
81
82
|
|
|
82
83
|
/**
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import * as consola from 'consola';
|
|
3
3
|
import { ConsolaOptions } from 'consola';
|
|
4
|
+
import * as silgi_types from 'silgi/types';
|
|
4
5
|
import { ModuleOptionsCustom, ModuleDefinition, SilgiModule, SilgiCLI, SilgiPreset, SilgiPresetMeta, EnvOptions, SilgiTemplate, ResolvedSilgiTemplate } from 'silgi/types';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -76,7 +77,7 @@ declare function resolveSilgiModule(base: string, paths: string[]): Promise<stri
|
|
|
76
77
|
*
|
|
77
78
|
* This mirrors the runtime behavior of Nitro.
|
|
78
79
|
*/
|
|
79
|
-
declare function useSilgiRuntimeConfig():
|
|
80
|
+
declare function useSilgiRuntimeConfig(): silgi_types.SilgiRuntimeOptions;
|
|
80
81
|
declare function applyEnv(obj: Record<string, any>, opts: EnvOptions, parentKey?: string): Record<string, any>;
|
|
81
82
|
|
|
82
83
|
/**
|
package/dist/kit/index.mjs
CHANGED
|
@@ -246,7 +246,7 @@ async function resolveSilgiModule(base, paths) {
|
|
|
246
246
|
function useSilgiRuntimeConfig() {
|
|
247
247
|
const silgi = tryUseSilgi();
|
|
248
248
|
if (!silgi) {
|
|
249
|
-
return
|
|
249
|
+
return globalThis.$silgiSharedRuntimeConfig;
|
|
250
250
|
}
|
|
251
251
|
return applyEnv(klona(silgi.options.runtimeConfig), {
|
|
252
252
|
prefix: "NITRO_",
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED