silgi 0.9.29 → 0.9.30
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/kit/index.mjs +9 -7
- 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/kit/index.mjs
CHANGED
|
@@ -12,7 +12,6 @@ import { c as checkSilgiCompatibility } from '../cli/compatibility.mjs';
|
|
|
12
12
|
import { existsSync, promises } from 'node:fs';
|
|
13
13
|
import { fileURLToPath } from 'node:url';
|
|
14
14
|
import { resolveAlias as resolveAlias$1 } from 'pathe/utils';
|
|
15
|
-
import process$1 from 'node:process';
|
|
16
15
|
import destr from 'destr';
|
|
17
16
|
import { klona } from 'klona';
|
|
18
17
|
import 'semver/functions/satisfies.js';
|
|
@@ -256,11 +255,14 @@ async function resolveSilgiModule(base, paths) {
|
|
|
256
255
|
return resolved;
|
|
257
256
|
}
|
|
258
257
|
|
|
259
|
-
const _inlineRuntimeConfig =
|
|
258
|
+
const _inlineRuntimeConfig = (
|
|
259
|
+
/** */
|
|
260
|
+
process.env.RUNTIME_CONFIG
|
|
261
|
+
);
|
|
260
262
|
const envOptions = {
|
|
261
263
|
prefix: "NITRO_",
|
|
262
|
-
altPrefix: _inlineRuntimeConfig?.nitro.envPrefix ?? process
|
|
263
|
-
envExpansion: _inlineRuntimeConfig?.nitro.envExpansion ?? process
|
|
264
|
+
altPrefix: _inlineRuntimeConfig?.nitro.envPrefix ?? process.env.NITRO_ENV_PREFIX ?? "_",
|
|
265
|
+
envExpansion: _inlineRuntimeConfig?.nitro.envExpansion ?? process.env.NITRO_ENV_EXPANSION ?? false
|
|
264
266
|
};
|
|
265
267
|
const _sharedRuntimeConfig = _deepFreeze(
|
|
266
268
|
applyEnv(klona(_inlineRuntimeConfig ?? {}), envOptions)
|
|
@@ -283,11 +285,11 @@ function useSilgiRuntimeConfig(event) {
|
|
|
283
285
|
prefix: "NITRO_",
|
|
284
286
|
altPrefix: "NUXT_",
|
|
285
287
|
silgiPrefix: "SILGI_",
|
|
286
|
-
envExpansion: silgi.options.experimental?.envExpansion ?? !!process
|
|
288
|
+
envExpansion: silgi.options.experimental?.envExpansion ?? !!process.env.NITRO_ENV_EXPANSION,
|
|
287
289
|
...silgi.envOptions
|
|
288
290
|
});
|
|
289
291
|
}
|
|
290
|
-
function getEnv(key, opts, env = process
|
|
292
|
+
function getEnv(key, opts, env = process.env) {
|
|
291
293
|
const envKey = snakeCase(key).toUpperCase();
|
|
292
294
|
return destr(
|
|
293
295
|
env[opts.prefix + envKey] ?? env[opts.altPrefix + envKey] ?? env[opts.silgiPrefix + envKey]
|
|
@@ -319,7 +321,7 @@ function applyEnv(obj, opts, parentKey = "") {
|
|
|
319
321
|
return obj;
|
|
320
322
|
}
|
|
321
323
|
const envExpandRx = /\{\{([^{}]*)\}\}/g;
|
|
322
|
-
function _expandFromEnv(value, env = process
|
|
324
|
+
function _expandFromEnv(value, env = process.env) {
|
|
323
325
|
return value.replace(envExpandRx, (match, key) => {
|
|
324
326
|
return env[key] || match;
|
|
325
327
|
});
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED