silgi 0.9.17 → 0.9.18
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 +1 -1
- package/dist/core/index.mjs +2 -0
- package/dist/kit/index.mjs +2 -2
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -627,12 +627,12 @@ async function silgiCoreFile(data, frameworkContext, silgi) {
|
|
|
627
627
|
" modulesURIs,",
|
|
628
628
|
` plugins: [${plugins.join(", ")}],`,
|
|
629
629
|
_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 ")},` : "",
|
|
630
|
+
" runtimeConfig: {},",
|
|
630
631
|
" ...buildOptions,",
|
|
631
632
|
" options: mergeDeep(",
|
|
632
633
|
" moduleOptions || {},",
|
|
633
634
|
" {",
|
|
634
635
|
` present: '${silgi.options.preset}',`,
|
|
635
|
-
" runtimeConfig: {},",
|
|
636
636
|
" ...cliOptions,",
|
|
637
637
|
" },",
|
|
638
638
|
" ) as any,",
|
package/dist/core/index.mjs
CHANGED
|
@@ -503,6 +503,8 @@ async function createSilgi(config) {
|
|
|
503
503
|
ready: () => {
|
|
504
504
|
return hooks.callHook("ready", silgi);
|
|
505
505
|
},
|
|
506
|
+
envOptions: config.envOptions ?? {},
|
|
507
|
+
runtimeConfig: config.runtimeConfig ?? {},
|
|
506
508
|
close: () => hooks.callHook("close", silgi),
|
|
507
509
|
logger: createConsola(defu(config.options?.consolaOptions ?? {}, {
|
|
508
510
|
tag: "silgi"
|
package/dist/kit/index.mjs
CHANGED
|
@@ -248,12 +248,12 @@ function useSilgiRuntimeConfig() {
|
|
|
248
248
|
if (!silgi) {
|
|
249
249
|
return globalThis.$silgiSharedRuntimeConfig;
|
|
250
250
|
}
|
|
251
|
-
return applyEnv(klona(silgi.
|
|
251
|
+
return applyEnv(klona(silgi.runtimeConfig), {
|
|
252
252
|
prefix: "NITRO_",
|
|
253
253
|
altPrefix: "NUXT_",
|
|
254
254
|
silgiPrefix: "SILGI_",
|
|
255
255
|
envExpansion: silgi.options.experimental?.envExpansion ?? !!process$1.env.NITRO_ENV_EXPANSION,
|
|
256
|
-
...silgi.
|
|
256
|
+
...silgi.envOptions
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
function getEnv(key, opts, env = process$1.env) {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -934,6 +934,10 @@ interface Silgi {
|
|
|
934
934
|
close: () => Promise<void>;
|
|
935
935
|
logger: ConsolaInstance;
|
|
936
936
|
storage: Storage;
|
|
937
|
+
envOptions: EnvOptions;
|
|
938
|
+
runtimeConfig: SilgiRuntimeOptions & {
|
|
939
|
+
[key: string]: any;
|
|
940
|
+
};
|
|
937
941
|
options: SilgiOptions & SilgiRuntimeOptions;
|
|
938
942
|
captureError: CaptureError;
|
|
939
943
|
}
|
|
@@ -957,10 +961,6 @@ type CaptureError = (error: Error, context: CapturedErrorContext) => void;
|
|
|
957
961
|
interface SilgiOptions {
|
|
958
962
|
consolaOptions?: Partial<ConsolaOptions>;
|
|
959
963
|
present: PresetNameInput;
|
|
960
|
-
envOptions: EnvOptions;
|
|
961
|
-
runtimeConfig: SilgiRuntimeOptions & {
|
|
962
|
-
[key: string]: any;
|
|
963
|
-
};
|
|
964
964
|
/**
|
|
965
965
|
* Set to `true` to enable debug mode.
|
|
966
966
|
*
|
package/dist/types/index.d.ts
CHANGED
|
@@ -934,6 +934,10 @@ interface Silgi {
|
|
|
934
934
|
close: () => Promise<void>;
|
|
935
935
|
logger: ConsolaInstance;
|
|
936
936
|
storage: Storage;
|
|
937
|
+
envOptions: EnvOptions;
|
|
938
|
+
runtimeConfig: SilgiRuntimeOptions & {
|
|
939
|
+
[key: string]: any;
|
|
940
|
+
};
|
|
937
941
|
options: SilgiOptions & SilgiRuntimeOptions;
|
|
938
942
|
captureError: CaptureError;
|
|
939
943
|
}
|
|
@@ -957,10 +961,6 @@ type CaptureError = (error: Error, context: CapturedErrorContext) => void;
|
|
|
957
961
|
interface SilgiOptions {
|
|
958
962
|
consolaOptions?: Partial<ConsolaOptions>;
|
|
959
963
|
present: PresetNameInput;
|
|
960
|
-
envOptions: EnvOptions;
|
|
961
|
-
runtimeConfig: SilgiRuntimeOptions & {
|
|
962
|
-
[key: string]: any;
|
|
963
|
-
};
|
|
964
964
|
/**
|
|
965
965
|
* Set to `true` to enable debug mode.
|
|
966
966
|
*
|