@e-n-v/env 0.0.7 → 0.0.8
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/{BooleanMap-B7MeMkJC.d.ts → BooleanMap-BPQuO3Ae.d.ts} +1 -3
- package/dist/{BooleanMap-D93UJnv5.d.cts → BooleanMap-CX_YrPCf.d.cts} +1 -3
- package/dist/EnvChannelOptions-BbKeuO-o.d.cts +366 -0
- package/dist/EnvChannelOptions-BbKeuO-o.d.ts +366 -0
- package/dist/{EnvSource-DA3ZGlES.js → EnvSource-WAGWqRVM.js} +6 -10
- package/dist/{EnvSource-BVnmdHku.cjs → EnvSource-s8F_M_6O.cjs} +21 -28
- package/dist/EnvVarSchema-CDZGmnex.cjs +15 -0
- package/dist/EnvVarSchema-Dr6q7jf6.js +10 -0
- package/dist/{ProcessEnvChannel-Do4-yiLI.d.ts → ProcessEnvChannel-CwhV7_EB.d.ts} +2 -4
- package/dist/{ProcessEnvChannel-D465c-dp.d.cts → ProcessEnvChannel-DWHPZePe.d.cts} +2 -4
- package/dist/channels.cjs +3 -4
- package/dist/channels.d.cts +3 -4
- package/dist/channels.d.ts +3 -4
- package/dist/channels.js +2 -4
- package/dist/cli.cjs +10 -23
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -13
- package/dist/core.cjs +13 -14
- package/dist/core.d.cts +147 -6
- package/dist/core.d.ts +147 -6
- package/dist/core.js +9 -11
- package/dist/{custom-Bt_wnxIu.js → custom-Bd-jLg80.js} +3 -12
- package/dist/{custom-D_Rqjm09.cjs → custom-Dyb9TnER.cjs} +48 -58
- package/dist/files.cjs +6 -6
- package/dist/files.d.cts +2 -2
- package/dist/files.d.ts +2 -2
- package/dist/files.js +2 -5
- package/dist/{parse-awxwtQ1N.d.ts → index-B2eNij2x.d.cts} +1 -2
- package/dist/{parse-5fpTbjTr.d.cts → index-BHTM8nxS.d.ts} +1 -2
- package/dist/{prompt-DG8haZjn.d.ts → index-BKBW9Dxs.d.cts} +3 -4
- package/dist/{prompt-lmZdPaBh.d.cts → index-CEyOIRdj.d.ts} +3 -4
- package/dist/{EnvModel-BiT0OiDZ.d.ts → index-Cb0abjLf.d.ts} +59 -7
- package/dist/{EnvModel-I0fWZZ_n.d.cts → index-Cz3frUwZ.d.cts} +58 -6
- package/dist/index.cjs +27 -30
- package/dist/index.d.cts +11 -13
- package/dist/index.d.ts +11 -13
- package/dist/index.js +8 -14
- package/dist/model.cjs +10 -11
- package/dist/model.d.cts +2 -35
- package/dist/model.d.ts +2 -35
- package/dist/model.js +2 -6
- package/dist/parse.cjs +14 -14
- package/dist/parse.d.cts +5 -8
- package/dist/parse.d.ts +5 -8
- package/dist/parse.js +4 -7
- package/dist/preprocessors-BKuIcZa1.d.ts +83 -0
- package/dist/preprocessors-DFVyF0c7.d.cts +83 -0
- package/dist/prompt.cjs +12 -15
- package/dist/prompt.d.cts +5 -10
- package/dist/prompt.d.ts +5 -10
- package/dist/prompt.js +3 -9
- package/dist/{redis-Cazgs3_J.cjs → redis-CyTF0SYT.cjs} +260 -268
- package/dist/{redis-DXhlNtvD.js → redis-D18f4ztf.js} +15 -22
- package/dist/{index-UQm0jdkG.d.cts → redis-DsW-Vkwq.d.cts} +2 -6
- package/dist/{index-ClKndmJv.d.ts → redis-tRD4nAy_.d.ts} +2 -6
- package/dist/{resolveChannel-v9BDsw-M.js → resolveChannel-D1Fzl4TL.js} +59 -63
- package/dist/{resolveChannel-CjAuxy3p.cjs → resolveChannel-DxZNYdDe.cjs} +84 -92
- package/dist/{chunk-pbleEpgJ.cjs → rolldown-runtime-C0BPl7ul.cjs} +15 -16
- package/dist/{chunk-Bp6m_JJh.js → rolldown-runtime-D7D4PA-g.js} +4 -4
- package/dist/{schema-DdDa3Qjy.d.cts → schema-B-JLVS42.d.ts} +1 -3
- package/dist/{schema-CHypJTDK.d.ts → schema-B1i83alz.d.cts} +1 -3
- package/dist/schema-CtP5lpU1.js +11 -0
- package/dist/schema-D9nJKipf.cjs +22 -0
- package/dist/schemas/zod.cjs +42 -340
- package/dist/schemas/zod.d.cts +112 -114
- package/dist/schemas/zod.d.ts +112 -114
- package/dist/schemas/zod.js +111 -401
- package/dist/schemas.cjs +152 -155
- package/dist/schemas.d.cts +1 -2
- package/dist/schemas.d.ts +1 -2
- package/dist/schemas.js +2 -6
- package/dist/{src-CdqOYilA.cjs → src-5GYFbR9n.cjs} +21 -24
- package/dist/{src-BrNrE0hX.js → src-8rEOvFG5.js} +11 -14
- package/dist/{src-DI-VW4dW.js → src-CdzAzdq-.js} +77 -110
- package/dist/{src-B5Qu-M-r.js → src-Cg49gGJb.js} +9 -43
- package/dist/{src-dO72HN6e.cjs → src-CttkcdpE.cjs} +90 -130
- package/dist/{src-PHSSk-t3.cjs → src-D5KzIEH_.cjs} +130 -110
- package/dist/{src-DVdOONrX.cjs → src-DB0Har0j.cjs} +911 -932
- package/dist/{src-DQaQ28lz.js → src-DWc-WWjX.js} +107 -89
- package/dist/{src-vBXlFkSP.js → src-DvUBRBe3.js} +115 -136
- package/dist/{src-DywfI0fM.cjs → src-TZx_e95f.cjs} +78 -131
- package/dist/{vars-DF9DoAF4.d.ts → vars-DtzGL5Nc.d.cts} +1 -4
- package/dist/{vars-KUgv2rti.d.cts → vars-obKYxaSu.d.ts} +1 -4
- package/dist/vars.cjs +175 -160
- package/dist/vars.d.cts +2 -6
- package/dist/vars.d.ts +2 -6
- package/dist/vars.js +21 -9
- package/package.json +3 -2
- package/dist/EnvChannelOptions-BPkWDrmr.d.cts +0 -108
- package/dist/EnvChannelOptions-CRwDLWjd.d.ts +0 -108
- package/dist/coerce-DNIuYAx4.js +0 -11028
- package/dist/coerce-b7UVodS9.cjs +0 -12365
- package/dist/model-BNDYMM9l.d.ts +0 -29
- package/dist/model-CJMnbGuS.d.cts +0 -29
- package/dist/validate-8HbVniNt.d.cts +0 -204
- package/dist/validate-CE8hQ5JG.d.ts +0 -204
- package/dist/vars-BHXXBiY1.cjs +0 -27
- package/dist/vars-FOuH_HuL.js +0 -22
- /package/dist/{EnvChannel-LMIRYvT1.d.cts → EnvChannel-CfSwa_25.d.cts} +0 -0
- /package/dist/{EnvChannel-w27PEm7x.d.ts → EnvChannel-CfSwa_25.d.ts} +0 -0
- /package/dist/{StringEnvVarSchema-BwSGgmeG.d.ts → StringEnvVarSchema-D9Jr1Aws.d.cts} +0 -0
- /package/dist/{StringEnvVarSchema-DnsZTIS0.d.cts → StringEnvVarSchema-D9Jr1Aws.d.ts} +0 -0
package/dist/model.cjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_src = require("./src-D5KzIEH_.cjs");
|
|
6
6
|
//#region src/model.ts
|
|
7
|
-
var model_default = require_src
|
|
8
|
-
|
|
7
|
+
var model_default = require_src.define;
|
|
9
8
|
//#endregion
|
|
10
|
-
exports.EnvModel = require_src
|
|
9
|
+
exports.EnvModel = require_src.EnvModel;
|
|
11
10
|
exports.default = model_default;
|
|
12
|
-
exports.define = require_src
|
|
13
|
-
exports.resolveSchema = require_src
|
|
14
|
-
exports.resolveSchemas = require_src
|
|
11
|
+
exports.define = require_src.define;
|
|
12
|
+
exports.resolveSchema = require_src.resolveSchema;
|
|
13
|
+
exports.resolveSchemas = require_src.resolveSchemas;
|
package/dist/model.d.cts
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
import { a as SupportedSchema, i as InferSchemaType, n as EnvModelOptions, o as Schema, r as InferEnvType, t as EnvModel } from "./EnvModel-I0fWZZ_n.cjs";
|
|
4
|
-
import { t as define } from "./model-CJMnbGuS.cjs";
|
|
5
|
-
|
|
6
|
-
//#region ../models/src/resolve.d.ts
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Resolve any supported schema to a EnvVarSchema.
|
|
10
|
-
*
|
|
11
|
-
* This is the main entry point for converting external schemas
|
|
12
|
-
* (like Zod schemas) to envcredible's internal schema format.
|
|
13
|
-
* If the input is already a EnvVarSchema, it returns it directly.
|
|
14
|
-
*
|
|
15
|
-
* @param schema - The schema to convert (e.g., Zod v3/v4 schema or EnvVarSchema)
|
|
16
|
-
* @returns EnvVarSchema that can be used with envcredible
|
|
17
|
-
* @throws Error if no converter can handle the schema
|
|
18
|
-
*/
|
|
19
|
-
declare function resolveSchema(schema: Schema): EnvVarSchema;
|
|
20
|
-
/**
|
|
21
|
-
* Resolve mixed schema map (Zod schemas or EnvVarSchema) to pure EnvVarSchema map.
|
|
22
|
-
*
|
|
23
|
-
* This function takes a map where values can be:
|
|
24
|
-
* - Zod v3 schemas
|
|
25
|
-
* - Zod v4 schemas
|
|
26
|
-
* - Already resolved EnvVarSchema instances
|
|
27
|
-
*
|
|
28
|
-
* And converts everything to EnvVarSchema instances that can be used throughout envcredible.
|
|
29
|
-
*
|
|
30
|
-
* @param schemas - Object mapping environment variable names to various schema types
|
|
31
|
-
* @returns Record mapping env var names to EnvVarSchema instances
|
|
32
|
-
*/
|
|
33
|
-
declare function resolveSchemas(schemas: Record<string, Schema>): Record<string, EnvVarSchema>;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { EnvModel, EnvModelOptions, InferEnvType, InferSchemaType, SupportedSchema, define as default, define, resolveSchema, resolveSchemas };
|
|
1
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, n as resolveSchemas, o as InferEnvType, r as define, s as InferSchemaType, t as resolveSchema } from "./index-Cz3frUwZ.cjs";
|
|
2
|
+
export { EnvModel, type EnvModelOptions, type InferEnvType, type InferSchemaType, type SupportedSchema, define as default, define, resolveSchema, resolveSchemas };
|
package/dist/model.d.ts
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
import { a as SupportedSchema, i as InferSchemaType, n as EnvModelOptions, o as Schema, r as InferEnvType, t as EnvModel } from "./EnvModel-BiT0OiDZ.js";
|
|
4
|
-
import { t as define } from "./model-BNDYMM9l.js";
|
|
5
|
-
|
|
6
|
-
//#region ../models/src/resolve.d.ts
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Resolve any supported schema to a EnvVarSchema.
|
|
10
|
-
*
|
|
11
|
-
* This is the main entry point for converting external schemas
|
|
12
|
-
* (like Zod schemas) to envcredible's internal schema format.
|
|
13
|
-
* If the input is already a EnvVarSchema, it returns it directly.
|
|
14
|
-
*
|
|
15
|
-
* @param schema - The schema to convert (e.g., Zod v3/v4 schema or EnvVarSchema)
|
|
16
|
-
* @returns EnvVarSchema that can be used with envcredible
|
|
17
|
-
* @throws Error if no converter can handle the schema
|
|
18
|
-
*/
|
|
19
|
-
declare function resolveSchema(schema: Schema): EnvVarSchema;
|
|
20
|
-
/**
|
|
21
|
-
* Resolve mixed schema map (Zod schemas or EnvVarSchema) to pure EnvVarSchema map.
|
|
22
|
-
*
|
|
23
|
-
* This function takes a map where values can be:
|
|
24
|
-
* - Zod v3 schemas
|
|
25
|
-
* - Zod v4 schemas
|
|
26
|
-
* - Already resolved EnvVarSchema instances
|
|
27
|
-
*
|
|
28
|
-
* And converts everything to EnvVarSchema instances that can be used throughout envcredible.
|
|
29
|
-
*
|
|
30
|
-
* @param schemas - Object mapping environment variable names to various schema types
|
|
31
|
-
* @returns Record mapping env var names to EnvVarSchema instances
|
|
32
|
-
*/
|
|
33
|
-
declare function resolveSchemas(schemas: Record<string, Schema>): Record<string, EnvVarSchema>;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { EnvModel, EnvModelOptions, InferEnvType, InferSchemaType, SupportedSchema, define as default, define, resolveSchema, resolveSchemas };
|
|
1
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, n as resolveSchemas, o as InferEnvType, r as define, s as InferSchemaType, t as resolveSchema } from "./index-Cb0abjLf.js";
|
|
2
|
+
export { EnvModel, type EnvModelOptions, type InferEnvType, type InferSchemaType, type SupportedSchema, define as default, define, resolveSchema, resolveSchemas };
|
package/dist/model.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import "./src-
|
|
2
|
-
import "./coerce-DNIuYAx4.js";
|
|
3
|
-
import { i as resolveSchemas, n as EnvModel, r as resolveSchema, t as define } from "./src-DQaQ28lz.js";
|
|
4
|
-
|
|
1
|
+
import { i as resolveSchemas, n as EnvModel, r as resolveSchema, t as define } from "./src-DWc-WWjX.js";
|
|
5
2
|
//#region src/model.ts
|
|
6
3
|
var model_default = define;
|
|
7
|
-
|
|
8
4
|
//#endregion
|
|
9
|
-
export { EnvModel, model_default as default, define, resolveSchema, resolveSchemas };
|
|
5
|
+
export { EnvModel, model_default as default, define, resolveSchema, resolveSchemas };
|
package/dist/parse.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_schema = require("./schema-D9nJKipf.cjs");
|
|
6
|
+
const require_src = require("./src-D5KzIEH_.cjs");
|
|
7
|
+
const require_src$1 = require("./src-5GYFbR9n.cjs");
|
|
7
8
|
//#region src/parse.ts
|
|
8
|
-
var parse_default = require_src$
|
|
9
|
-
|
|
9
|
+
var parse_default = require_src$1.parse;
|
|
10
10
|
//#endregion
|
|
11
|
-
exports.EnvModel = require_src
|
|
12
|
-
exports.EnvParseError = require_src$
|
|
11
|
+
exports.EnvModel = require_src.EnvModel;
|
|
12
|
+
exports.EnvParseError = require_src$1.EnvParseError;
|
|
13
13
|
exports.default = parse_default;
|
|
14
|
-
exports.define = require_src
|
|
15
|
-
exports.parse = require_src$
|
|
16
|
-
exports.s =
|
|
17
|
-
exports.schema =
|
|
14
|
+
exports.define = require_src.define;
|
|
15
|
+
exports.parse = require_src$1.parse;
|
|
16
|
+
exports.s = require_schema.s;
|
|
17
|
+
exports.schema = require_schema.schema;
|
package/dist/parse.d.cts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as define } from "./model-CJMnbGuS.cjs";
|
|
6
|
-
import { n as ParseEnvOptions, t as parse } from "./parse-5fpTbjTr.cjs";
|
|
7
|
-
|
|
1
|
+
import { i as EnvVarSchema } from "./BooleanMap-CX_YrPCf.cjs";
|
|
2
|
+
import { n as schema, t as s } from "./schema-B1i83alz.cjs";
|
|
3
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, r as define } from "./index-Cz3frUwZ.cjs";
|
|
4
|
+
import { n as ParseEnvOptions, t as parse } from "./index-B2eNij2x.cjs";
|
|
8
5
|
//#region ../parse/src/errors/EnvParseError.d.ts
|
|
9
6
|
type EnvParseIssueMissing = {
|
|
10
7
|
type: "missing";
|
|
@@ -49,4 +46,4 @@ declare class EnvParseError<TValue = Record<string, unknown>> extends Error {
|
|
|
49
46
|
private static formatMessage;
|
|
50
47
|
}
|
|
51
48
|
//#endregion
|
|
52
|
-
export { EnvModel, EnvModelOptions, EnvParseError, EnvParseIssue, EnvParseIssueInvalid, EnvParseIssueMissing, EnvParseResult, EnvVarSchema, ParseEnvOptions, SupportedSchema, parse as default, parse, define, s, schema };
|
|
49
|
+
export { EnvModel, type EnvModelOptions, EnvParseError, type EnvParseIssue, type EnvParseIssueInvalid, type EnvParseIssueMissing, type EnvParseResult, type EnvVarSchema, type ParseEnvOptions, type SupportedSchema, parse as default, parse, define, s, schema };
|
package/dist/parse.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as define } from "./model-BNDYMM9l.js";
|
|
6
|
-
import { n as ParseEnvOptions, t as parse } from "./parse-awxwtQ1N.js";
|
|
7
|
-
|
|
1
|
+
import { i as EnvVarSchema } from "./BooleanMap-BPQuO3Ae.js";
|
|
2
|
+
import { n as schema, t as s } from "./schema-B-JLVS42.js";
|
|
3
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, r as define } from "./index-Cb0abjLf.js";
|
|
4
|
+
import { n as ParseEnvOptions, t as parse } from "./index-BHTM8nxS.js";
|
|
8
5
|
//#region ../parse/src/errors/EnvParseError.d.ts
|
|
9
6
|
type EnvParseIssueMissing = {
|
|
10
7
|
type: "missing";
|
|
@@ -49,4 +46,4 @@ declare class EnvParseError<TValue = Record<string, unknown>> extends Error {
|
|
|
49
46
|
private static formatMessage;
|
|
50
47
|
}
|
|
51
48
|
//#endregion
|
|
52
|
-
export { EnvModel, EnvModelOptions, EnvParseError, EnvParseIssue, EnvParseIssueInvalid, EnvParseIssueMissing, EnvParseResult, EnvVarSchema, ParseEnvOptions, SupportedSchema, parse as default, parse, define, s, schema };
|
|
49
|
+
export { EnvModel, type EnvModelOptions, EnvParseError, type EnvParseIssue, type EnvParseIssueInvalid, type EnvParseIssueMissing, type EnvParseResult, type EnvVarSchema, type ParseEnvOptions, type SupportedSchema, parse as default, parse, define, s, schema };
|
package/dist/parse.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { n as schema, t as s } from "./
|
|
2
|
-
import "./
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as EnvParseError, t as parse } from "./src-BrNrE0hX.js";
|
|
5
|
-
|
|
1
|
+
import { n as schema, t as s } from "./schema-CtP5lpU1.js";
|
|
2
|
+
import { n as EnvModel, t as define } from "./src-DWc-WWjX.js";
|
|
3
|
+
import { n as EnvParseError, t as parse } from "./src-8rEOvFG5.js";
|
|
6
4
|
//#region src/parse.ts
|
|
7
5
|
var parse_default = parse;
|
|
8
|
-
|
|
9
6
|
//#endregion
|
|
10
|
-
export { EnvModel, EnvParseError, parse_default as default, define, parse, s, schema };
|
|
7
|
+
export { EnvModel, EnvParseError, parse_default as default, define, parse, s, schema };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { f as Processor } from "./StringEnvVarSchema-D9Jr1Aws.js";
|
|
2
|
+
import { n as Preprocessor, t as BooleanMap } from "./BooleanMap-BPQuO3Ae.js";
|
|
3
|
+
//#region ../core/src/processing/types/Check.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Check type definition.
|
|
6
|
+
* A check returns an array of requirement strings if the check fails, or an empty array if valid.
|
|
7
|
+
*/
|
|
8
|
+
type Check<T> = (value: T) => string[];
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../core/src/processing/processors/typed/string.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* String processor with optional validation checks.
|
|
13
|
+
* This is the primary string processor - the base stringProcessor() calls this with no checks.
|
|
14
|
+
*/
|
|
15
|
+
declare function string$1(...checks: Array<Check<string>>): Processor<string>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../core/src/processing/processors/typed/number.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Number processor with optional validation checks.
|
|
20
|
+
* This is the primary number processor - the base numberProcessor() calls this with no checks.
|
|
21
|
+
*/
|
|
22
|
+
declare function number$1(...checks: Array<Check<number>>): Processor<number>;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../core/src/processing/processors/typed/boolean.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Boolean processor.
|
|
27
|
+
* This is the primary boolean processor - the base booleanProcessor() calls this.
|
|
28
|
+
*/
|
|
29
|
+
declare function boolean$1(): Processor<boolean>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../core/src/processing/processors/typed/enumeration.d.ts
|
|
32
|
+
/**
|
|
33
|
+
* Enum processor with optional validation checks.
|
|
34
|
+
* This is the primary enum processor - the base enumProcessor() calls this with no checks.
|
|
35
|
+
*/
|
|
36
|
+
declare function enumeration$1(allowedValues: readonly string[], ...checks: Array<Check<string>>): Processor<string>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../core/src/processing/processors/processors.d.ts
|
|
39
|
+
/**
|
|
40
|
+
* Default processors for environment variable types.
|
|
41
|
+
* Each processor factory returns a function that takes a value and returns T | undefined.
|
|
42
|
+
* Returns undefined for empty/null values, throws descriptive errors for invalid values.
|
|
43
|
+
*/
|
|
44
|
+
declare const processors: {
|
|
45
|
+
readonly boolean: typeof boolean$1;
|
|
46
|
+
readonly enum: typeof enumeration$1;
|
|
47
|
+
readonly number: typeof number$1;
|
|
48
|
+
readonly string: typeof string$1;
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../core/src/processing/preprocessors/typed/number.d.ts
|
|
52
|
+
/**
|
|
53
|
+
* Create a number preprocessor that strips commas and whitespace
|
|
54
|
+
*/
|
|
55
|
+
declare const number: () => Preprocessor<number>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../core/src/processing/preprocessors/typed/boolean.d.ts
|
|
58
|
+
declare const boolean: (options?: BooleanMap) => Preprocessor<boolean>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ../core/src/processing/preprocessors/typed/enumeration.d.ts
|
|
61
|
+
/**
|
|
62
|
+
* Create an enum preprocessor - pass through unchanged
|
|
63
|
+
*/
|
|
64
|
+
declare const enumeration: () => Preprocessor<string>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../core/src/processing/preprocessors/typed/string.d.ts
|
|
67
|
+
/**
|
|
68
|
+
* Create a string preprocessor - pass through unchanged
|
|
69
|
+
*/
|
|
70
|
+
declare const string: () => Preprocessor<string>;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../core/src/processing/preprocessors/preprocessors.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Default preprocessors map for each environment variable type
|
|
75
|
+
*/
|
|
76
|
+
declare const preprocessors: {
|
|
77
|
+
readonly boolean: typeof boolean;
|
|
78
|
+
readonly enum: typeof enumeration;
|
|
79
|
+
readonly number: typeof number;
|
|
80
|
+
readonly string: typeof string;
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { number$1 as a, boolean$1 as i, processors as n, string$1 as o, enumeration$1 as r, Check as s, preprocessors as t };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { f as Processor } from "./StringEnvVarSchema-D9Jr1Aws.cjs";
|
|
2
|
+
import { n as Preprocessor, t as BooleanMap } from "./BooleanMap-CX_YrPCf.cjs";
|
|
3
|
+
//#region ../core/src/processing/types/Check.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Check type definition.
|
|
6
|
+
* A check returns an array of requirement strings if the check fails, or an empty array if valid.
|
|
7
|
+
*/
|
|
8
|
+
type Check<T> = (value: T) => string[];
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../core/src/processing/processors/typed/string.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* String processor with optional validation checks.
|
|
13
|
+
* This is the primary string processor - the base stringProcessor() calls this with no checks.
|
|
14
|
+
*/
|
|
15
|
+
declare function string$1(...checks: Array<Check<string>>): Processor<string>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../core/src/processing/processors/typed/number.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Number processor with optional validation checks.
|
|
20
|
+
* This is the primary number processor - the base numberProcessor() calls this with no checks.
|
|
21
|
+
*/
|
|
22
|
+
declare function number$1(...checks: Array<Check<number>>): Processor<number>;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../core/src/processing/processors/typed/boolean.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Boolean processor.
|
|
27
|
+
* This is the primary boolean processor - the base booleanProcessor() calls this.
|
|
28
|
+
*/
|
|
29
|
+
declare function boolean$1(): Processor<boolean>;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../core/src/processing/processors/typed/enumeration.d.ts
|
|
32
|
+
/**
|
|
33
|
+
* Enum processor with optional validation checks.
|
|
34
|
+
* This is the primary enum processor - the base enumProcessor() calls this with no checks.
|
|
35
|
+
*/
|
|
36
|
+
declare function enumeration$1(allowedValues: readonly string[], ...checks: Array<Check<string>>): Processor<string>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../core/src/processing/processors/processors.d.ts
|
|
39
|
+
/**
|
|
40
|
+
* Default processors for environment variable types.
|
|
41
|
+
* Each processor factory returns a function that takes a value and returns T | undefined.
|
|
42
|
+
* Returns undefined for empty/null values, throws descriptive errors for invalid values.
|
|
43
|
+
*/
|
|
44
|
+
declare const processors: {
|
|
45
|
+
readonly boolean: typeof boolean$1;
|
|
46
|
+
readonly enum: typeof enumeration$1;
|
|
47
|
+
readonly number: typeof number$1;
|
|
48
|
+
readonly string: typeof string$1;
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region ../core/src/processing/preprocessors/typed/number.d.ts
|
|
52
|
+
/**
|
|
53
|
+
* Create a number preprocessor that strips commas and whitespace
|
|
54
|
+
*/
|
|
55
|
+
declare const number: () => Preprocessor<number>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../core/src/processing/preprocessors/typed/boolean.d.ts
|
|
58
|
+
declare const boolean: (options?: BooleanMap) => Preprocessor<boolean>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ../core/src/processing/preprocessors/typed/enumeration.d.ts
|
|
61
|
+
/**
|
|
62
|
+
* Create an enum preprocessor - pass through unchanged
|
|
63
|
+
*/
|
|
64
|
+
declare const enumeration: () => Preprocessor<string>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../core/src/processing/preprocessors/typed/string.d.ts
|
|
67
|
+
/**
|
|
68
|
+
* Create a string preprocessor - pass through unchanged
|
|
69
|
+
*/
|
|
70
|
+
declare const string: () => Preprocessor<string>;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../core/src/processing/preprocessors/preprocessors.d.ts
|
|
73
|
+
/**
|
|
74
|
+
* Default preprocessors map for each environment variable type
|
|
75
|
+
*/
|
|
76
|
+
declare const preprocessors: {
|
|
77
|
+
readonly boolean: typeof boolean;
|
|
78
|
+
readonly enum: typeof enumeration;
|
|
79
|
+
readonly number: typeof number;
|
|
80
|
+
readonly string: typeof string;
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { number$1 as a, boolean$1 as i, processors as n, string$1 as o, enumeration$1 as r, Check as s, preprocessors as t };
|
package/dist/prompt.cjs
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require(
|
|
6
|
-
require(
|
|
7
|
-
require('./src-PHSSk-t3.cjs');
|
|
8
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_resolveChannel = require("./resolveChannel-DxZNYdDe.cjs");
|
|
6
|
+
const require_src = require("./src-CttkcdpE.cjs");
|
|
9
7
|
//#region src/prompt.ts
|
|
10
8
|
var prompt_default = require_src.prompt;
|
|
11
|
-
|
|
12
9
|
//#endregion
|
|
13
10
|
exports.DefaultEnvChannel = require_resolveChannel.DefaultEnvChannel;
|
|
14
11
|
exports.DotEnvXChannel = require_resolveChannel.DotEnvXChannel;
|
|
15
12
|
exports.ProcessEnvChannel = require_resolveChannel.ProcessEnvChannel;
|
|
16
13
|
exports.default = prompt_default;
|
|
17
|
-
Object.defineProperty(exports,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
Object.defineProperty(exports, "defaults", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function() {
|
|
17
|
+
return require_src.defaults_exports;
|
|
18
|
+
}
|
|
22
19
|
});
|
|
23
20
|
exports.prompt = require_src.prompt;
|
|
24
|
-
exports.resolveChannel = require_resolveChannel.resolveChannel;
|
|
21
|
+
exports.resolveChannel = require_resolveChannel.resolveChannel;
|
package/dist/prompt.d.cts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { a as DotEnvXChannelConfig, i as DefaultChannelConfig, n as ProcessChannelConfig, r as ProcessEnvChannelConfig, t as EnvChannelOptions } from "./EnvChannelOptions-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import { t as
|
|
5
|
-
import { i as resolveChannel, n as DotEnvXChannel, r as DefaultEnvChannel, t as ProcessEnvChannel } from "./ProcessEnvChannel-D465c-dp.cjs";
|
|
6
|
-
import "./EnvModel-I0fWZZ_n.cjs";
|
|
7
|
-
import { n as PromptEnvOptions, t as prompt } from "./prompt-lmZdPaBh.cjs";
|
|
8
|
-
|
|
9
|
-
//#region ../prompt/src/options/defaults.d.ts
|
|
1
|
+
import { a as DotEnvXChannelConfig, i as DefaultChannelConfig, n as ProcessChannelConfig, r as ProcessEnvChannelConfig, t as EnvChannelOptions } from "./EnvChannelOptions-BbKeuO-o.cjs";
|
|
2
|
+
import { t as EnvChannel } from "./EnvChannel-CfSwa_25.cjs";
|
|
3
|
+
import { i as resolveChannel, n as DotEnvXChannel, r as DefaultEnvChannel, t as ProcessEnvChannel } from "./ProcessEnvChannel-DWHPZePe.cjs";
|
|
4
|
+
import { n as PromptEnvOptions, t as prompt } from "./index-BKBW9Dxs.cjs";
|
|
10
5
|
declare namespace defaults_d_exports {
|
|
11
6
|
export { ENV_PATH, SECRET_PATTERNS, TRUNCATE_LENGTH };
|
|
12
7
|
}
|
|
@@ -14,4 +9,4 @@ declare const ENV_PATH = ".env";
|
|
|
14
9
|
declare const TRUNCATE_LENGTH = 40;
|
|
15
10
|
declare const SECRET_PATTERNS: ReadonlyArray<RegExp | string>;
|
|
16
11
|
//#endregion
|
|
17
|
-
export { DefaultChannelConfig, DefaultEnvChannel, DotEnvXChannel, DotEnvXChannelConfig, EnvChannel, EnvChannelOptions, ProcessChannelConfig, ProcessEnvChannel, ProcessEnvChannelConfig, PromptEnvOptions, prompt as default, prompt, defaults_d_exports as defaults, resolveChannel };
|
|
12
|
+
export { type DefaultChannelConfig, DefaultEnvChannel, DotEnvXChannel, type DotEnvXChannelConfig, type EnvChannel, type EnvChannelOptions, type ProcessChannelConfig, ProcessEnvChannel, type ProcessEnvChannelConfig, type PromptEnvOptions, prompt as default, prompt, defaults_d_exports as defaults, resolveChannel, __exportAll as t };
|
package/dist/prompt.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { a as DotEnvXChannelConfig, i as DefaultChannelConfig, n as ProcessChannelConfig, r as ProcessEnvChannelConfig, t as EnvChannelOptions } from "./EnvChannelOptions-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import { t as
|
|
5
|
-
import { i as resolveChannel, n as DotEnvXChannel, r as DefaultEnvChannel, t as ProcessEnvChannel } from "./ProcessEnvChannel-Do4-yiLI.js";
|
|
6
|
-
import "./EnvModel-BiT0OiDZ.js";
|
|
7
|
-
import { n as PromptEnvOptions, t as prompt } from "./prompt-DG8haZjn.js";
|
|
8
|
-
|
|
9
|
-
//#region ../prompt/src/options/defaults.d.ts
|
|
1
|
+
import { a as DotEnvXChannelConfig, i as DefaultChannelConfig, n as ProcessChannelConfig, r as ProcessEnvChannelConfig, t as EnvChannelOptions } from "./EnvChannelOptions-BbKeuO-o.js";
|
|
2
|
+
import { t as EnvChannel } from "./EnvChannel-CfSwa_25.js";
|
|
3
|
+
import { i as resolveChannel, n as DotEnvXChannel, r as DefaultEnvChannel, t as ProcessEnvChannel } from "./ProcessEnvChannel-CwhV7_EB.js";
|
|
4
|
+
import { n as PromptEnvOptions, t as prompt } from "./index-CEyOIRdj.js";
|
|
10
5
|
declare namespace defaults_d_exports {
|
|
11
6
|
export { ENV_PATH, SECRET_PATTERNS, TRUNCATE_LENGTH };
|
|
12
7
|
}
|
|
@@ -14,4 +9,4 @@ declare const ENV_PATH = ".env";
|
|
|
14
9
|
declare const TRUNCATE_LENGTH = 40;
|
|
15
10
|
declare const SECRET_PATTERNS: ReadonlyArray<RegExp | string>;
|
|
16
11
|
//#endregion
|
|
17
|
-
export { DefaultChannelConfig, DefaultEnvChannel, DotEnvXChannel, DotEnvXChannelConfig, EnvChannel, EnvChannelOptions, ProcessChannelConfig, ProcessEnvChannel, ProcessEnvChannelConfig, PromptEnvOptions, prompt as default, prompt, defaults_d_exports as defaults, resolveChannel };
|
|
12
|
+
export { type DefaultChannelConfig, DefaultEnvChannel, DotEnvXChannel, type DotEnvXChannelConfig, type EnvChannel, type EnvChannelOptions, type ProcessChannelConfig, ProcessEnvChannel, type ProcessEnvChannelConfig, type PromptEnvOptions, prompt as default, prompt, defaults_d_exports as defaults, resolveChannel };
|
package/dist/prompt.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import { n as defaults_exports, t as prompt } from "./src-DI-VW4dW.js";
|
|
4
|
-
import "./src-B5Qu-M-r.js";
|
|
5
|
-
import "./coerce-DNIuYAx4.js";
|
|
6
|
-
import "./src-DQaQ28lz.js";
|
|
7
|
-
|
|
1
|
+
import { a as DefaultEnvChannel, i as DotEnvXChannel, r as ProcessEnvChannel, t as resolveChannel } from "./resolveChannel-D1Fzl4TL.js";
|
|
2
|
+
import { n as defaults_exports, t as prompt } from "./src-CdzAzdq-.js";
|
|
8
3
|
//#region src/prompt.ts
|
|
9
4
|
var prompt_default = prompt;
|
|
10
|
-
|
|
11
5
|
//#endregion
|
|
12
|
-
export { DefaultEnvChannel, DotEnvXChannel, ProcessEnvChannel, prompt_default as default, defaults_exports as defaults, prompt, resolveChannel };
|
|
6
|
+
export { DefaultEnvChannel, DotEnvXChannel, ProcessEnvChannel, prompt_default as default, defaults_exports as defaults, prompt, resolveChannel };
|