poe-code 10.0.0 → 10.0.1
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/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-SDKCGJW4.js → chunk-HNGGGIMP.js} +3 -3
- package/packages/safejs/dist/chunks/{chunk-SDKCGJW4.js.map → chunk-HNGGGIMP.js.map} +2 -2
- package/packages/safejs/dist/cli.js +1 -1
- package/packages/safejs/dist/index.js +1 -1
- package/packages/safejs/dist/modules/env.js +2 -2
|
@@ -12,13 +12,13 @@ export class EnvAccessError extends Error {
|
|
|
12
12
|
export function makeEnvModule(input) {
|
|
13
13
|
const options = normalizeEnvOptions(Array.isArray(input) ? { allow: input } : input);
|
|
14
14
|
const allowedNames = new Set(options.allow);
|
|
15
|
-
const values = options.values
|
|
15
|
+
const values = options.values;
|
|
16
16
|
return {
|
|
17
17
|
get(name) {
|
|
18
18
|
const variable = readEnvName(name, "Environment variable name");
|
|
19
19
|
if (!allowedNames.has(variable))
|
|
20
20
|
throw new EnvAccessError(variable);
|
|
21
|
-
return readEnvValue(values, variable);
|
|
21
|
+
return readEnvValue(values ?? process.env, variable);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|