@wolfstar/env-utilities 2.2.1-next-20260927214047 → 2.2.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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_src = require('./src-CLN39Nmy.cjs');
2
+ const require_src = require('./src-4t0fxvAg.cjs');
3
3
 
4
4
  exports.envIsDefined = require_src.envIsDefined;
5
5
  exports.envIsNull = require_src.envIsNull;
@@ -1,4 +1,4 @@
1
- const require_src = require('./src-CLN39Nmy.cjs');
1
+ const require_src = require('./src-4t0fxvAg.cjs');
2
2
 
3
3
  //#region src/setup.ts
4
4
  require_src.setup();
@@ -6,7 +6,7 @@ let node_module = require("node:module");
6
6
  let node_path = require("node:path");
7
7
 
8
8
  //#region src/lib/env-loader.ts
9
- const packageVersion = "2.2.1-next-20260927214047";
9
+ const packageVersion = "2.2.1";
10
10
  function resolveDebugLogger() {
11
11
  return _sapphire_pieces.container.logger ?? console;
12
12
  }
@@ -350,4 +350,4 @@ Object.defineProperty(exports, 'setup', {
350
350
  return setup;
351
351
  }
352
352
  });
353
- //# sourceMappingURL=src-CLN39Nmy.cjs.map
353
+ //# sourceMappingURL=src-4t0fxvAg.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"src-CLN39Nmy.cjs","names":["container","resolve","fileURLToPath","basename","config","expand","join","dirname","fileURLToPath"],"sources":["../../src/lib/utils.ts","../../src/lib/setup.ts"],"sourcesContent":["import type { Env, EnvAny, EnvArray, EnvBoolean, EnvInteger, EnvNumber, EnvString } from './types';\n\nexport function envParseInteger(key: EnvInteger, defaultValue?: number): number;\nexport function envParseInteger(key: EnvInteger, defaultValue: number | null): number | null;\nexport function envParseInteger(key: EnvInteger, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an integer, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (Number.isInteger(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be an integer, but received '${value}'.`);\n}\n\nexport function envParseNumber(key: EnvNumber, defaultValue?: number): number;\nexport function envParseNumber(key: EnvNumber, defaultValue: number | null): number | null;\nexport function envParseNumber(key: EnvNumber, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a number, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (!Number.isNaN(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a number, but received '${value}'.`);\n}\n\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean): boolean;\nexport function envParseBoolean(key: EnvBoolean, defaultValue: boolean | null): boolean | null;\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean | null): boolean | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a boolean, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tif (value.length === 4 && value.toLowerCase() === 'true') return true;\n\tif (value.length === 5 && value.toLowerCase() === 'false') return false;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a boolean, but received '${value}'.`);\n}\n\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K]): NonNullable<Env[K]>;\nexport function envParseString<K extends EnvString>(key: K, defaultValue: Env[K] | null): NonNullable<Env[K]> | null;\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K] | null): NonNullable<Env[K]> | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a string, but is empty or undefined.`);\n\t\treturn defaultValue!;\n\t}\n\n\treturn value!;\n}\n\nexport function envParseArray(key: EnvArray, defaultValue?: string[]): string[];\nexport function envParseArray(key: EnvArray, defaultValue: string[] | null): string[] | null;\nexport function envParseArray(key: EnvArray, defaultValue?: string[] | null): string[] | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an array, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\treturn value.split(' ');\n}\n\n/**\n * Checks if the value of the specified environment variable is null.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNull(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn typeof value === 'string' && (value === '0' || (value.length === 4 && value.toLowerCase() === 'null'));\n}\n\n/**\n * Checks if the value of the specified environment variable is undefined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n */\nexport function envIsUndefined(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn value === undefined || value.length === 0;\n}\n\n/**\n * Checks if the value of the specified environment variable is nullish.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNullish(key: EnvAny): boolean {\n\treturn envIsUndefined(key) || envIsNull(key);\n}\n\n/**\n * Checks if any of the specified environment variables is defined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of any of the specified environment variables is a non-empty string\n */\nexport function envIsDefined(...keys: readonly EnvAny[]): boolean {\n\treturn keys.every((key) => !envIsUndefined(key));\n}\n","import type { DotenvConfigOutput } from 'dotenv';\nimport { fileURLToPath } from 'node:url';\nimport { loadEnvFiles, type EnvLoaderOptions } from './env-loader';\nimport { envIsDefined, envParseBoolean } from './utils';\n\nexport function setup(pathOrOptions?: string | URL | EnvSetupOptions): DotenvConfigOutput {\n\t// Unless explicitly defined, set NODE_ENV as development:\n\tprocess.env.NODE_ENV ??= 'development';\n\n\tlet options: EnvLoaderOptions;\n\tif (typeof pathOrOptions === 'undefined') {\n\t\toptions = {};\n\t} else if (typeof pathOrOptions === 'string') {\n\t\toptions = { path: pathOrOptions };\n\t} else if (typeof pathOrOptions === 'object') {\n\t\tif (pathOrOptions instanceof URL) {\n\t\t\toptions = { path: fileURLToPath(pathOrOptions) };\n\t\t} else {\n\t\t\tconst { path, ...rest } = pathOrOptions;\n\t\t\toptions = { path: typeof path === 'undefined' ? path : typeof path === 'string' ? path : fileURLToPath(path), ...rest };\n\t\t}\n\t} else {\n\t\tthrow new TypeError('Expected undefined, string, URL, or EnvSetupOptions');\n\t}\n\n\treturn loadEnvFiles({\n\t\tdebug: envIsDefined('DOTENV_DEBUG') ? envParseBoolean('DOTENV_DEBUG') : undefined,\n\t\tencoding: process.env.DOTENV_ENCODING,\n\t\tenv: process.env.DOTENV_ENV,\n\t\tpath: process.env.DOTENV_PATH,\n\t\tprefix: process.env.DOTENV_PREFIX,\n\t\tloader: process.env.DOTENV_LOADER,\n\t\t...options\n\t});\n}\n\nexport interface EnvSetupOptions extends Omit<EnvLoaderOptions, 'path'> {\n\t/**\n\t * You may specify a custom path if your file containing environment variables is located elsewhere.\n\t */\n\tpath?: string | URL;\n}\n\nexport type EnvSetupResult = DotenvConfigOutput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAgB,gBAAgB,KAAiB,cAA6C;CAC7F,MAAM,QAAQ,QAAQ,IAAI;CAC1B,IAAI,CAAC,OAAO;EACX,IAAI,iBAAiB,QAAW,MAAM,IAAI,eAAe,SAAS,IAAI,0DAA0D;EAChI,OAAO;CACR;CAEA,MAAM,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AsB;CAC/C,MAAM,QAAQ,QAAQ,IAAI;CAC1B,OAAO,OAAO,UAAU,aAAa,UAAU,OAAQ,MAAM,WAAW,KAAK,MAAM,YAAY,MAAM;AACtG;;;;;;;;AASA,SAAgB,eAAe,KAAsB;CACpD,MAAM,QAAQ,QAAQ,IAAI;CAC1B,OAAO,UAAU,UAAa,MAAM,WAAW;AAChD;;;;;;;;;;AAWA,SAAgB,aAAa,KAAsB;CAClD,OAAO,eAAe,GAAG,KAAK,UAAU,GAAG;AAC5C;;;;;;AAOA,SAAgB,aAAa,GAAG,MAAkC;CACjE,OAAO,KAAK,OAAO,QAAQ,CAAC,eAAe,GAAG,CAAC;AAChD;;;;AC3GA,SAAgB,MAAM,eAAoE;CAEzF,QAAQ,IAAI,aAAa;CAEzB,IAAI;CACJ,IAAI,OAAO,kBAAkB,aAC5B,UAAU,CAAC;MACL,IAAI,OAAO,kBAAkB,UACnC,UAAU,EAAE,MAAM,cAAc;MAC1B,IAAI,OAAO,kBAAkB,UAAU;EAC7C,IAAI,yBAAyB,KAC5B,UAAU,EAAE,UAAMQ,wBAAc,aAAa,EAAE;OACzC;GACN,MAAM,EAAE,MAAM,GAAG,SAAS;GAC1B,UAAU;IAAE,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,SAAS,WAAW,WAAOA,wBAAc,IAAI;IAAG,GAAG;GAAK;EACvH;CACD,OACC,MAAM,IAAI,UAAU,qDAAqD;CAG1E,OAAO,aAAa;EACnB,OAAO,aAAa,cAAc,IAAI,gBAAgB,cAAc,IAAI;EACxE,UAAU,QAAQ,IAAI;EACtB,KAAK,QAAQ,IAAI;EACjB,MAAM,QAAQ,IAAI;EAClB,QAAQ,QAAQ,IAAI;EACpB,QAAQ,QAAQ,IAAI;EACpB,GAAG;CACJ,CAAC;AACF"}
1
+ {"version":3,"file":"src-4t0fxvAg.cjs","names":["container","resolve","fileURLToPath","basename","config","expand","join","dirname","fileURLToPath"],"sources":["../../src/lib/utils.ts","../../src/lib/setup.ts"],"sourcesContent":["import type { Env, EnvAny, EnvArray, EnvBoolean, EnvInteger, EnvNumber, EnvString } from './types';\n\nexport function envParseInteger(key: EnvInteger, defaultValue?: number): number;\nexport function envParseInteger(key: EnvInteger, defaultValue: number | null): number | null;\nexport function envParseInteger(key: EnvInteger, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an integer, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (Number.isInteger(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be an integer, but received '${value}'.`);\n}\n\nexport function envParseNumber(key: EnvNumber, defaultValue?: number): number;\nexport function envParseNumber(key: EnvNumber, defaultValue: number | null): number | null;\nexport function envParseNumber(key: EnvNumber, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a number, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (!Number.isNaN(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a number, but received '${value}'.`);\n}\n\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean): boolean;\nexport function envParseBoolean(key: EnvBoolean, defaultValue: boolean | null): boolean | null;\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean | null): boolean | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a boolean, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tif (value.length === 4 && value.toLowerCase() === 'true') return true;\n\tif (value.length === 5 && value.toLowerCase() === 'false') return false;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a boolean, but received '${value}'.`);\n}\n\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K]): NonNullable<Env[K]>;\nexport function envParseString<K extends EnvString>(key: K, defaultValue: Env[K] | null): NonNullable<Env[K]> | null;\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K] | null): NonNullable<Env[K]> | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a string, but is empty or undefined.`);\n\t\treturn defaultValue!;\n\t}\n\n\treturn value!;\n}\n\nexport function envParseArray(key: EnvArray, defaultValue?: string[]): string[];\nexport function envParseArray(key: EnvArray, defaultValue: string[] | null): string[] | null;\nexport function envParseArray(key: EnvArray, defaultValue?: string[] | null): string[] | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an array, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\treturn value.split(' ');\n}\n\n/**\n * Checks if the value of the specified environment variable is null.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNull(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn typeof value === 'string' && (value === '0' || (value.length === 4 && value.toLowerCase() === 'null'));\n}\n\n/**\n * Checks if the value of the specified environment variable is undefined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n */\nexport function envIsUndefined(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn value === undefined || value.length === 0;\n}\n\n/**\n * Checks if the value of the specified environment variable is nullish.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNullish(key: EnvAny): boolean {\n\treturn envIsUndefined(key) || envIsNull(key);\n}\n\n/**\n * Checks if any of the specified environment variables is defined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of any of the specified environment variables is a non-empty string\n */\nexport function envIsDefined(...keys: readonly EnvAny[]): boolean {\n\treturn keys.every((key) => !envIsUndefined(key));\n}\n","import type { DotenvConfigOutput } from 'dotenv';\nimport { fileURLToPath } from 'node:url';\nimport { loadEnvFiles, type EnvLoaderOptions } from './env-loader';\nimport { envIsDefined, envParseBoolean } from './utils';\n\nexport function setup(pathOrOptions?: string | URL | EnvSetupOptions): DotenvConfigOutput {\n\t// Unless explicitly defined, set NODE_ENV as development:\n\tprocess.env.NODE_ENV ??= 'development';\n\n\tlet options: EnvLoaderOptions;\n\tif (typeof pathOrOptions === 'undefined') {\n\t\toptions = {};\n\t} else if (typeof pathOrOptions === 'string') {\n\t\toptions = { path: pathOrOptions };\n\t} else if (typeof pathOrOptions === 'object') {\n\t\tif (pathOrOptions instanceof URL) {\n\t\t\toptions = { path: fileURLToPath(pathOrOptions) };\n\t\t} else {\n\t\t\tconst { path, ...rest } = pathOrOptions;\n\t\t\toptions = { path: typeof path === 'undefined' ? path : typeof path === 'string' ? path : fileURLToPath(path), ...rest };\n\t\t}\n\t} else {\n\t\tthrow new TypeError('Expected undefined, string, URL, or EnvSetupOptions');\n\t}\n\n\treturn loadEnvFiles({\n\t\tdebug: envIsDefined('DOTENV_DEBUG') ? envParseBoolean('DOTENV_DEBUG') : undefined,\n\t\tencoding: process.env.DOTENV_ENCODING,\n\t\tenv: process.env.DOTENV_ENV,\n\t\tpath: process.env.DOTENV_PATH,\n\t\tprefix: process.env.DOTENV_PREFIX,\n\t\tloader: process.env.DOTENV_LOADER,\n\t\t...options\n\t});\n}\n\nexport interface EnvSetupOptions extends Omit<EnvLoaderOptions, 'path'> {\n\t/**\n\t * You may specify a custom path if your file containing environment variables is located elsewhere.\n\t */\n\tpath?: string | URL;\n}\n\nexport type EnvSetupResult = DotenvConfigOutput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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gBAAgB,cAAc,IAAI;EACxE,UAAU,QAAQ,IAAI;EACtB,KAAK,QAAQ,IAAI;EACjB,MAAM,QAAQ,IAAI;EAClB,QAAQ,QAAQ,IAAI;EACpB,QAAQ,QAAQ,IAAI;EACpB,GAAG;CACJ,CAAC;AACF"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as envIsUndefined, c as envParseInteger, i as envIsNullish, l as envParseNumber, n as envIsDefined, o as envParseArray, r as envIsNull, s as envParseBoolean, t as setup, u as envParseString } from "./src-KOqRF--T.js";
1
+ import { a as envIsUndefined, c as envParseInteger, i as envIsNullish, l as envParseNumber, n as envIsDefined, o as envParseArray, r as envIsNull, s as envParseBoolean, t as setup, u as envParseString } from "./src-BrXDSlkk.js";
2
2
 
3
3
  export { envIsDefined, envIsNull, envIsNullish, envIsUndefined, envParseArray, envParseBoolean, envParseInteger, envParseNumber, envParseString, setup };
package/dist/esm/setup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as setup } from "./src-KOqRF--T.js";
1
+ import { t as setup } from "./src-BrXDSlkk.js";
2
2
 
3
3
  //#region src/setup.ts
4
4
  setup();
@@ -6,7 +6,7 @@ import { expand } from "dotenv-expand";
6
6
  import { basename, dirname, join, resolve } from "node:path";
7
7
 
8
8
  //#region src/lib/env-loader.ts
9
- const packageVersion = "2.2.1-next-20260927214047";
9
+ const packageVersion = "2.2.1";
10
10
  function resolveDebugLogger() {
11
11
  return container.logger ?? console;
12
12
  }
@@ -291,4 +291,4 @@ function setup(pathOrOptions) {
291
291
 
292
292
  //#endregion
293
293
  export { envIsUndefined as a, envParseInteger as c, envIsNullish as i, envParseNumber as l, envIsDefined as n, envParseArray as o, envIsNull as r, envParseBoolean as s, setup as t, envParseString as u };
294
- //# sourceMappingURL=src-KOqRF--T.js.map
294
+ //# sourceMappingURL=src-BrXDSlkk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"src-KOqRF--T.js","names":[],"sources":["../../src/lib/utils.ts","../../src/lib/setup.ts"],"sourcesContent":["import type { Env, EnvAny, EnvArray, EnvBoolean, EnvInteger, EnvNumber, EnvString } from './types';\n\nexport function envParseInteger(key: EnvInteger, defaultValue?: number): number;\nexport function envParseInteger(key: EnvInteger, defaultValue: number | null): number | null;\nexport function envParseInteger(key: EnvInteger, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an integer, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (Number.isInteger(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be an integer, but received '${value}'.`);\n}\n\nexport function envParseNumber(key: EnvNumber, defaultValue?: number): number;\nexport function envParseNumber(key: EnvNumber, defaultValue: number | null): number | null;\nexport function envParseNumber(key: EnvNumber, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a number, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (!Number.isNaN(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a number, but received '${value}'.`);\n}\n\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean): boolean;\nexport function envParseBoolean(key: EnvBoolean, defaultValue: boolean | null): boolean | null;\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean | null): boolean | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a boolean, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tif (value.length === 4 && value.toLowerCase() === 'true') return true;\n\tif (value.length === 5 && value.toLowerCase() === 'false') return false;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a boolean, but received '${value}'.`);\n}\n\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K]): NonNullable<Env[K]>;\nexport function envParseString<K extends EnvString>(key: K, defaultValue: Env[K] | null): NonNullable<Env[K]> | null;\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K] | null): NonNullable<Env[K]> | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a string, but is empty or undefined.`);\n\t\treturn defaultValue!;\n\t}\n\n\treturn value!;\n}\n\nexport function envParseArray(key: EnvArray, defaultValue?: string[]): string[];\nexport function envParseArray(key: EnvArray, defaultValue: string[] | null): string[] | null;\nexport function envParseArray(key: EnvArray, defaultValue?: string[] | null): string[] | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an array, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\treturn value.split(' ');\n}\n\n/**\n * Checks if the value of the specified environment variable is null.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNull(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn typeof value === 'string' && (value === '0' || (value.length === 4 && value.toLowerCase() === 'null'));\n}\n\n/**\n * Checks if the value of the specified environment variable is undefined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n */\nexport function envIsUndefined(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn value === undefined || value.length === 0;\n}\n\n/**\n * Checks if the value of the specified environment variable is nullish.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNullish(key: EnvAny): boolean {\n\treturn envIsUndefined(key) || envIsNull(key);\n}\n\n/**\n * Checks if any of the specified environment variables is defined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of any of the specified environment variables is a non-empty string\n */\nexport function envIsDefined(...keys: readonly EnvAny[]): boolean {\n\treturn keys.every((key) => !envIsUndefined(key));\n}\n","import type { DotenvConfigOutput } from 'dotenv';\nimport { fileURLToPath } from 'node:url';\nimport { loadEnvFiles, type EnvLoaderOptions } from './env-loader';\nimport { envIsDefined, envParseBoolean } from './utils';\n\nexport function setup(pathOrOptions?: string | URL | EnvSetupOptions): DotenvConfigOutput {\n\t// Unless explicitly defined, set NODE_ENV as development:\n\tprocess.env.NODE_ENV ??= 'development';\n\n\tlet options: EnvLoaderOptions;\n\tif (typeof pathOrOptions === 'undefined') {\n\t\toptions = {};\n\t} else if (typeof pathOrOptions === 'string') {\n\t\toptions = { path: pathOrOptions };\n\t} else if (typeof pathOrOptions === 'object') {\n\t\tif (pathOrOptions instanceof URL) {\n\t\t\toptions = { path: fileURLToPath(pathOrOptions) };\n\t\t} else {\n\t\t\tconst { path, ...rest } = pathOrOptions;\n\t\t\toptions = { path: typeof path === 'undefined' ? path : typeof path === 'string' ? path : fileURLToPath(path), ...rest };\n\t\t}\n\t} else {\n\t\tthrow new TypeError('Expected undefined, string, URL, or EnvSetupOptions');\n\t}\n\n\treturn loadEnvFiles({\n\t\tdebug: envIsDefined('DOTENV_DEBUG') ? envParseBoolean('DOTENV_DEBUG') : undefined,\n\t\tencoding: process.env.DOTENV_ENCODING,\n\t\tenv: process.env.DOTENV_ENV,\n\t\tpath: process.env.DOTENV_PATH,\n\t\tprefix: process.env.DOTENV_PREFIX,\n\t\tloader: process.env.DOTENV_LOADER,\n\t\t...options\n\t});\n}\n\nexport interface EnvSetupOptions extends Omit<EnvLoaderOptions, 'path'> {\n\t/**\n\t * You may specify a custom path if your file containing environment variables is located elsewhere.\n\t */\n\tpath?: string | URL;\n}\n\nexport type EnvSetupResult = DotenvConfigOutput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,gBAAgB,cAAc,IAAI;EACxE,UAAU,QAAQ,IAAI;EACtB,KAAK,QAAQ,IAAI;EACjB,MAAM,QAAQ,IAAI;EAClB,QAAQ,QAAQ,IAAI;EACpB,QAAQ,QAAQ,IAAI;EACpB,GAAG;CACJ,CAAC;AACF"}
1
+ {"version":3,"file":"src-BrXDSlkk.js","names":[],"sources":["../../src/lib/utils.ts","../../src/lib/setup.ts"],"sourcesContent":["import type { Env, EnvAny, EnvArray, EnvBoolean, EnvInteger, EnvNumber, EnvString } from './types';\n\nexport function envParseInteger(key: EnvInteger, defaultValue?: number): number;\nexport function envParseInteger(key: EnvInteger, defaultValue: number | null): number | null;\nexport function envParseInteger(key: EnvInteger, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an integer, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (Number.isInteger(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be an integer, but received '${value}'.`);\n}\n\nexport function envParseNumber(key: EnvNumber, defaultValue?: number): number;\nexport function envParseNumber(key: EnvNumber, defaultValue: number | null): number | null;\nexport function envParseNumber(key: EnvNumber, defaultValue?: number | null): number | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a number, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tconst integer = Number(value);\n\tif (!Number.isNaN(integer)) return integer;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a number, but received '${value}'.`);\n}\n\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean): boolean;\nexport function envParseBoolean(key: EnvBoolean, defaultValue: boolean | null): boolean | null;\nexport function envParseBoolean(key: EnvBoolean, defaultValue?: boolean | null): boolean | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a boolean, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\tif (value.length === 4 && value.toLowerCase() === 'true') return true;\n\tif (value.length === 5 && value.toLowerCase() === 'false') return false;\n\tthrow new TypeError(`[ENV] ${key} - The key must be a boolean, but received '${value}'.`);\n}\n\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K]): NonNullable<Env[K]>;\nexport function envParseString<K extends EnvString>(key: K, defaultValue: Env[K] | null): NonNullable<Env[K]> | null;\nexport function envParseString<K extends EnvString>(key: K, defaultValue?: Env[K] | null): NonNullable<Env[K]> | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be a string, but is empty or undefined.`);\n\t\treturn defaultValue!;\n\t}\n\n\treturn value!;\n}\n\nexport function envParseArray(key: EnvArray, defaultValue?: string[]): string[];\nexport function envParseArray(key: EnvArray, defaultValue: string[] | null): string[] | null;\nexport function envParseArray(key: EnvArray, defaultValue?: string[] | null): string[] | null {\n\tconst value = process.env[key];\n\tif (!value) {\n\t\tif (defaultValue === undefined) throw new ReferenceError(`[ENV] ${key} - The key must be an array, but is empty or undefined.`);\n\t\treturn defaultValue;\n\t}\n\n\treturn value.split(' ');\n}\n\n/**\n * Checks if the value of the specified environment variable is null.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNull(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn typeof value === 'string' && (value === '0' || (value.length === 4 && value.toLowerCase() === 'null'));\n}\n\n/**\n * Checks if the value of the specified environment variable is undefined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n */\nexport function envIsUndefined(key: EnvAny): boolean {\n\tconst value = process.env[key];\n\treturn value === undefined || value.length === 0;\n}\n\n/**\n * Checks if the value of the specified environment variable is nullish.\n * @param key - The name of the environment variable.\n * @returns Whether the value of the specified environment variable is:\n * - `undefined`\n * - An empty string (`\"\"`)\n * - The string `\"0\"`\n * - The string `\"null\"`, case insensitive\n */\nexport function envIsNullish(key: EnvAny): boolean {\n\treturn envIsUndefined(key) || envIsNull(key);\n}\n\n/**\n * Checks if any of the specified environment variables is defined.\n * @param key - The name of the environment variable.\n * @returns Whether the value of any of the specified environment variables is a non-empty string\n */\nexport function envIsDefined(...keys: readonly EnvAny[]): boolean {\n\treturn keys.every((key) => !envIsUndefined(key));\n}\n","import type { DotenvConfigOutput } from 'dotenv';\nimport { fileURLToPath } from 'node:url';\nimport { loadEnvFiles, type EnvLoaderOptions } from './env-loader';\nimport { envIsDefined, envParseBoolean } from './utils';\n\nexport function setup(pathOrOptions?: string | URL | EnvSetupOptions): DotenvConfigOutput {\n\t// Unless explicitly defined, set NODE_ENV as development:\n\tprocess.env.NODE_ENV ??= 'development';\n\n\tlet options: EnvLoaderOptions;\n\tif (typeof pathOrOptions === 'undefined') {\n\t\toptions = {};\n\t} else if (typeof pathOrOptions === 'string') {\n\t\toptions = { path: pathOrOptions };\n\t} else if (typeof pathOrOptions === 'object') {\n\t\tif (pathOrOptions instanceof URL) {\n\t\t\toptions = { path: fileURLToPath(pathOrOptions) };\n\t\t} else {\n\t\t\tconst { path, ...rest } = pathOrOptions;\n\t\t\toptions = { path: typeof path === 'undefined' ? path : typeof path === 'string' ? path : fileURLToPath(path), ...rest };\n\t\t}\n\t} else {\n\t\tthrow new TypeError('Expected undefined, string, URL, or EnvSetupOptions');\n\t}\n\n\treturn loadEnvFiles({\n\t\tdebug: envIsDefined('DOTENV_DEBUG') ? envParseBoolean('DOTENV_DEBUG') : undefined,\n\t\tencoding: process.env.DOTENV_ENCODING,\n\t\tenv: process.env.DOTENV_ENV,\n\t\tpath: process.env.DOTENV_PATH,\n\t\tprefix: process.env.DOTENV_PREFIX,\n\t\tloader: process.env.DOTENV_LOADER,\n\t\t...options\n\t});\n}\n\nexport interface EnvSetupOptions extends Omit<EnvLoaderOptions, 'path'> {\n\t/**\n\t * You may specify a custom path if your file containing environment variables is located elsewhere.\n\t */\n\tpath?: string | URL;\n}\n\nexport type EnvSetupResult = DotenvConfigOutput;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAgB,gBAAgB,KAAiB,cAA6C;CAC7F,MAAM,QAAQ,QAAQ,IAAI;CAC1B,IAAI,CAAC,OAAO;EACX,IAAI,iBAAiB,QAAW,MAAM,IAAI,eAAe,SAAS,IAAI,0DAA0D;EAChI,OAAO;CACR;CAEA,MAAM,UAAU,OAAO,KAAK;CAC5B,IAAI,OAAO,UAAU,OAAO,GAAG,OAAO;CACtC,MAAM,IAAI,UAAU,SAAS,IAAI,+CAA+C,MAAM,GAAG;AAC1F;AAIA,SAAgB,eAAe,KAAgB,cAA6C;CAC3F,MAAM,QAAQ,QAAQ,IAAI;CAC1B,IAAI,CAAC,OAAO;EACX,IAAI,iBAAiB,QAAW,MAAM,IAAI,eAAe,SAAS,IAAI,wDAAwD;EAC9H,OAAO;CACR;CAEA,MAAM,UAAU,OAAO,KAAK;CAC5B,IAAI,CAAC,OAAO,MAAM,OAAO,GAAG,OAAO;CACnC,MAAM,IAAI,UAAU,SAAS,IAAI,6CAA6C,MAAM,GAAG;AACxF;AAIA,SAAgB,gBAAgB,KAAiB,cAA+C;CAC/F,MAAM,QAAQ,QAAQ,IAAI;CAC1B,IAAI,CAAC,OAAO;EACX,IAAI,iBAAiB,QAAW,MAAM,IAAI,eAAe,SAAS,IAAI,yDAAyD;EAC/H,OAAO;CACR;CAEA,IAAI,MAAM,WAAW,KAAK,MAAM,YAAY,MAAM,QAAQ,OAAO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,aAAa,EAAE;OACzC;GACN,MAAM,EAAE,MAAM,GAAG,SAAS;GAC1B,UAAU;IAAE,MAAM,OAAO,SAAS,cAAc,OAAO,OAAO,SAAS,WAAW,OAAO,cAAc,IAAI;IAAG,GAAG;GAAK;EACvH;CACD,OACC,MAAM,IAAI,UAAU,qDAAqD;CAG1E,OAAO,aAAa;EACnB,OAAO,aAAa,cAAc,IAAI,gBAAgB,cAAc,IAAI;EACxE,UAAU,QAAQ,IAAI;EACtB,KAAK,QAAQ,IAAI;EACjB,MAAM,QAAQ,IAAI;EAClB,QAAQ,QAAQ,IAAI;EACpB,QAAQ,QAAQ,IAAI;EACpB,GAAG;CACJ,CAAC;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wolfstar/env-utilities",
3
- "version": "2.2.1-next-20260927214047",
3
+ "version": "2.2.1",
4
4
  "description": "Functional utilities for reading and parsing environmental variables",
5
5
  "keywords": [
6
6
  "api",