@e-n-v/env 0.0.7 → 0.0.9
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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
//#region ../core/src/processing/checks/minLength.ts
|
|
3
2
|
/**
|
|
4
3
|
* String check: minimum length.
|
|
@@ -9,7 +8,6 @@ function minLength(min, trait) {
|
|
|
9
8
|
return [];
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
//#endregion
|
|
14
12
|
//#region ../core/src/processing/checks/lengthBetween.ts
|
|
15
13
|
/**
|
|
@@ -21,7 +19,6 @@ function lengthBetween(min, max, trait) {
|
|
|
21
19
|
return [];
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
//#endregion
|
|
26
23
|
//#region ../core/src/processing/checks/exactLength.ts
|
|
27
24
|
/**
|
|
@@ -33,7 +30,6 @@ function exactLength(length, trait) {
|
|
|
33
30
|
return [];
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
|
-
|
|
37
33
|
//#endregion
|
|
38
34
|
//#region ../core/src/processing/checks/pattern.ts
|
|
39
35
|
/**
|
|
@@ -45,7 +41,6 @@ function pattern(regex, trait) {
|
|
|
45
41
|
return [];
|
|
46
42
|
};
|
|
47
43
|
}
|
|
48
|
-
|
|
49
44
|
//#endregion
|
|
50
45
|
//#region ../core/src/processing/checks/url.ts
|
|
51
46
|
/**
|
|
@@ -61,7 +56,6 @@ function url(trait) {
|
|
|
61
56
|
}
|
|
62
57
|
};
|
|
63
58
|
}
|
|
64
|
-
|
|
65
59
|
//#endregion
|
|
66
60
|
//#region ../core/src/processing/checks/oneOf.ts
|
|
67
61
|
/**
|
|
@@ -73,7 +67,6 @@ function oneOf(values, trait) {
|
|
|
73
67
|
return [];
|
|
74
68
|
};
|
|
75
69
|
}
|
|
76
|
-
|
|
77
70
|
//#endregion
|
|
78
71
|
//#region ../core/src/processing/checks/integer.ts
|
|
79
72
|
/**
|
|
@@ -85,7 +78,6 @@ function integer(trait) {
|
|
|
85
78
|
return [];
|
|
86
79
|
};
|
|
87
80
|
}
|
|
88
|
-
|
|
89
81
|
//#endregion
|
|
90
82
|
//#region ../core/src/processing/checks/between.ts
|
|
91
83
|
/**
|
|
@@ -93,11 +85,10 @@ function integer(trait) {
|
|
|
93
85
|
*/
|
|
94
86
|
function between(minimum, maximum, trait) {
|
|
95
87
|
return (value) => {
|
|
96
|
-
if (value < minimum || value > maximum) return trait ? [trait] : [`between ${minimum} and ${maximum}`];
|
|
88
|
+
if (Number.isNaN(value) || value < minimum || value > maximum) return trait ? [trait] : [`between ${minimum} and ${maximum}`];
|
|
97
89
|
return [];
|
|
98
90
|
};
|
|
99
91
|
}
|
|
100
|
-
|
|
101
92
|
//#endregion
|
|
102
93
|
//#region ../core/src/processing/checks/custom.ts
|
|
103
94
|
/**
|
|
@@ -106,63 +97,62 @@ function between(minimum, maximum, trait) {
|
|
|
106
97
|
*/
|
|
107
98
|
function custom(fn, ...traits) {
|
|
108
99
|
return (value) => {
|
|
109
|
-
if (!fn(value)) return traits;
|
|
100
|
+
if (!fn(value)) return traits.length > 0 ? [...traits] : ["a valid value"];
|
|
110
101
|
return [];
|
|
111
102
|
};
|
|
112
103
|
}
|
|
113
|
-
|
|
114
104
|
//#endregion
|
|
115
|
-
Object.defineProperty(exports,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
Object.defineProperty(exports, "between", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function() {
|
|
108
|
+
return between;
|
|
109
|
+
}
|
|
120
110
|
});
|
|
121
|
-
Object.defineProperty(exports,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
Object.defineProperty(exports, "custom", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function() {
|
|
114
|
+
return custom;
|
|
115
|
+
}
|
|
126
116
|
});
|
|
127
|
-
Object.defineProperty(exports,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
117
|
+
Object.defineProperty(exports, "exactLength", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function() {
|
|
120
|
+
return exactLength;
|
|
121
|
+
}
|
|
132
122
|
});
|
|
133
|
-
Object.defineProperty(exports,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
123
|
+
Object.defineProperty(exports, "integer", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function() {
|
|
126
|
+
return integer;
|
|
127
|
+
}
|
|
138
128
|
});
|
|
139
|
-
Object.defineProperty(exports,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
129
|
+
Object.defineProperty(exports, "lengthBetween", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function() {
|
|
132
|
+
return lengthBetween;
|
|
133
|
+
}
|
|
144
134
|
});
|
|
145
|
-
Object.defineProperty(exports,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
135
|
+
Object.defineProperty(exports, "minLength", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function() {
|
|
138
|
+
return minLength;
|
|
139
|
+
}
|
|
150
140
|
});
|
|
151
|
-
Object.defineProperty(exports,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
141
|
+
Object.defineProperty(exports, "oneOf", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function() {
|
|
144
|
+
return oneOf;
|
|
145
|
+
}
|
|
156
146
|
});
|
|
157
|
-
Object.defineProperty(exports,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
Object.defineProperty(exports, "pattern", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function() {
|
|
150
|
+
return pattern;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(exports, "url", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function() {
|
|
156
|
+
return url;
|
|
157
|
+
}
|
|
162
158
|
});
|
|
163
|
-
Object.defineProperty(exports, 'url', {
|
|
164
|
-
enumerable: true,
|
|
165
|
-
get: function () {
|
|
166
|
-
return url;
|
|
167
|
-
}
|
|
168
|
-
});
|
package/dist/files.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_EnvSource = require("./EnvSource-s8F_M_6O.cjs");
|
|
4
6
|
//#region ../files/src/source.ts
|
|
5
7
|
function source(filePath) {
|
|
6
8
|
return new require_EnvSource.EnvSource(filePath);
|
|
7
9
|
}
|
|
8
|
-
|
|
9
10
|
//#endregion
|
|
10
11
|
//#region src/files.ts
|
|
11
12
|
var files_default = source;
|
|
12
|
-
|
|
13
13
|
//#endregion
|
|
14
14
|
exports.EnvSource = require_EnvSource.EnvSource;
|
|
15
15
|
exports.default = files_default;
|
|
16
16
|
exports.get = require_EnvSource.get;
|
|
17
17
|
exports.set = require_EnvSource.set;
|
|
18
|
-
exports.source = source;
|
|
18
|
+
exports.source = source;
|
package/dist/files.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region ../files/src/types.d.ts
|
|
2
2
|
type EnvRecord = Record<string, string>;
|
|
3
|
-
type EnvSelectionRecord<T extends readonly string[]> = { [K in T[number]]: string | undefined };
|
|
3
|
+
type EnvSelectionRecord<T extends readonly string[]> = { [K in T[number]]: string | undefined; };
|
|
4
4
|
type EnvPrimitiveValue = string | number | boolean | bigint;
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region ../files/src/EnvSource.d.ts
|
|
@@ -35,4 +35,4 @@ declare function set(content: string, values: Record<string, EnvPrimitiveValue>)
|
|
|
35
35
|
//#region ../files/src/source.d.ts
|
|
36
36
|
declare function source(filePath: string): EnvSource;
|
|
37
37
|
//#endregion
|
|
38
|
-
export { EnvPrimitiveValue, EnvRecord, EnvSelectionRecord, EnvSource, source as default, source, get, set };
|
|
38
|
+
export { type EnvPrimitiveValue, type EnvRecord, type EnvSelectionRecord, EnvSource, source as default, source, get, set };
|
package/dist/files.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region ../files/src/types.d.ts
|
|
2
2
|
type EnvRecord = Record<string, string>;
|
|
3
|
-
type EnvSelectionRecord<T extends readonly string[]> = { [K in T[number]]: string | undefined };
|
|
3
|
+
type EnvSelectionRecord<T extends readonly string[]> = { [K in T[number]]: string | undefined; };
|
|
4
4
|
type EnvPrimitiveValue = string | number | boolean | bigint;
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region ../files/src/EnvSource.d.ts
|
|
@@ -35,4 +35,4 @@ declare function set(content: string, values: Record<string, EnvPrimitiveValue>)
|
|
|
35
35
|
//#region ../files/src/source.d.ts
|
|
36
36
|
declare function source(filePath: string): EnvSource;
|
|
37
37
|
//#endregion
|
|
38
|
-
export { EnvPrimitiveValue, EnvRecord, EnvSelectionRecord, EnvSource, source as default, source, get, set };
|
|
38
|
+
export { type EnvPrimitiveValue, type EnvRecord, type EnvSelectionRecord, EnvSource, source as default, source, get, set };
|
package/dist/files.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { n as set, r as get, t as EnvSource } from "./EnvSource-
|
|
2
|
-
|
|
1
|
+
import { n as set, r as get, t as EnvSource } from "./EnvSource-WAGWqRVM.js";
|
|
3
2
|
//#region ../files/src/source.ts
|
|
4
3
|
function source(filePath) {
|
|
5
4
|
return new EnvSource(filePath);
|
|
6
5
|
}
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
//#region src/files.ts
|
|
10
8
|
var files_default = source;
|
|
11
|
-
|
|
12
9
|
//#endregion
|
|
13
|
-
export { EnvSource, files_default as default, get, set, source };
|
|
10
|
+
export { EnvSource, files_default as default, get, set, source };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
1
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, o as InferEnvType } from "./index-Cz3frUwZ.cjs";
|
|
3
2
|
//#region ../parse/ParseEnvOptions.d.ts
|
|
4
3
|
type ParseEnvOptions<T extends Record<string, SupportedSchema> = Record<string, SupportedSchema>> = EnvModelOptions<T>;
|
|
5
4
|
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
|
|
1
|
+
import { a as EnvModelOptions, c as SupportedSchema, i as EnvModel, o as InferEnvType } from "./index-Cb0abjLf.js";
|
|
3
2
|
//#region ../parse/ParseEnvOptions.d.ts
|
|
4
3
|
type ParseEnvOptions<T extends Record<string, SupportedSchema> = Record<string, SupportedSchema>> = EnvModelOptions<T>;
|
|
5
4
|
//#endregion
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as EnvChannelOptions } from "./EnvChannelOptions-
|
|
2
|
-
import { t as EnvChannel } from "./EnvChannel-
|
|
3
|
-
import {
|
|
1
|
+
import { t as EnvChannelOptions } from "./EnvChannelOptions-BbKeuO-o.cjs";
|
|
2
|
+
import { t as EnvChannel } from "./EnvChannel-CfSwa_25.cjs";
|
|
3
|
+
import { a as EnvModelOptions, i as EnvModel } from "./index-Cz3frUwZ.cjs";
|
|
4
4
|
import { Formatter } from "picocolors/types";
|
|
5
|
-
|
|
6
5
|
//#region ../prompt/src/options/PromptEnvInteractiveOptions.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Configuration options for the prompt function
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as EnvChannelOptions } from "./EnvChannelOptions-
|
|
2
|
-
import { t as EnvChannel } from "./EnvChannel-
|
|
3
|
-
import {
|
|
1
|
+
import { t as EnvChannelOptions } from "./EnvChannelOptions-BbKeuO-o.js";
|
|
2
|
+
import { t as EnvChannel } from "./EnvChannel-CfSwa_25.js";
|
|
3
|
+
import { a as EnvModelOptions, i as EnvModel } from "./index-Cb0abjLf.js";
|
|
4
4
|
import { Formatter } from "picocolors/types";
|
|
5
|
-
|
|
6
5
|
//#region ../prompt/src/options/PromptEnvInteractiveOptions.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Configuration options for the prompt function
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { a as EnumEnvVarSchema, l as EnvVarSchemaBase, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-
|
|
2
|
-
import { i as EnvVarSchema, n as Preprocessor, t as BooleanMap } from "./BooleanMap-
|
|
3
|
-
import { AnySchema } from "joi";
|
|
1
|
+
import { a as EnumEnvVarSchema, l as EnvVarSchemaBase, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-D9Jr1Aws.js";
|
|
2
|
+
import { i as EnvVarSchema, n as Preprocessor, t as BooleanMap } from "./BooleanMap-BPQuO3Ae.js";
|
|
4
3
|
import { ZodTypeAny } from "zod";
|
|
5
4
|
import { $ZodType } from "zod/v4/core";
|
|
5
|
+
import { AnySchema } from "joi";
|
|
6
6
|
import { Struct } from "superstruct";
|
|
7
|
-
|
|
8
7
|
//#region ../models/src/schemas.d.ts
|
|
9
8
|
type JoiSchema = AnySchema;
|
|
10
9
|
type ZodV3Schema = ZodTypeAny;
|
|
@@ -58,13 +57,13 @@ type InferOptional<T> = T extends {
|
|
|
58
57
|
/**
|
|
59
58
|
* Utility type to flatten complex generic types for better IDE display
|
|
60
59
|
*/
|
|
61
|
-
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
60
|
+
type Simplify<T> = { [K in keyof T]: T[K]; } & {};
|
|
62
61
|
/**
|
|
63
62
|
* Infer the complete environment type from a schemas record
|
|
64
63
|
* Handles optional vs required fields properly
|
|
65
64
|
* Uses Simplify to flatten the type display in IDEs
|
|
66
65
|
*/
|
|
67
|
-
type InferEnvType<T extends Record<string, SupportedSchema>> = Simplify<{ [K in keyof T]: InferOptional<T[K]> extends true ? InferSchemaType<T[K]> | undefined : InferSchemaType<T[K]
|
|
66
|
+
type InferEnvType<T extends Record<string, SupportedSchema>> = Simplify<{ [K in keyof T]: InferOptional<T[K]> extends true ? InferSchemaType<T[K]> | undefined : InferSchemaType<T[K]>; }>;
|
|
68
67
|
//#endregion
|
|
69
68
|
//#region ../models/src/EnvModelOptions.d.ts
|
|
70
69
|
type PreprocessorToggle<T> = Preprocessor<T> | boolean | undefined;
|
|
@@ -131,4 +130,57 @@ declare class EnvModel<T extends Record<string, SupportedSchema> = Record<string
|
|
|
131
130
|
private resolvePreprocessors;
|
|
132
131
|
}
|
|
133
132
|
//#endregion
|
|
134
|
-
|
|
133
|
+
//#region ../models/src/model.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Create an environment variable model
|
|
136
|
+
*
|
|
137
|
+
* Sugar utility for creating EnvModel instances with full type inference
|
|
138
|
+
*
|
|
139
|
+
* @param options - Model options
|
|
140
|
+
* @returns EnvModel instance with inferred types
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* import { define, s } from "@e-n-v/models";
|
|
145
|
+
*
|
|
146
|
+
* export default define({
|
|
147
|
+
* schemas: {
|
|
148
|
+
* PORT: s.number({ default: 3000 }),
|
|
149
|
+
* DATABASE_URL: s.string(),
|
|
150
|
+
* DEBUG: s.boolean({ default: false })
|
|
151
|
+
* },
|
|
152
|
+
* preprocess: true
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
declare function define<T extends Record<string, SupportedSchema>>(options: EnvModelOptions<T>): EnvModel<T>;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region ../models/src/resolve.d.ts
|
|
159
|
+
/**
|
|
160
|
+
* Resolve any supported schema to a EnvVarSchema.
|
|
161
|
+
*
|
|
162
|
+
* This is the main entry point for converting external schemas
|
|
163
|
+
* (like Zod schemas) to envcredible's internal schema format.
|
|
164
|
+
* If the input is already a EnvVarSchema, it returns it directly.
|
|
165
|
+
*
|
|
166
|
+
* @param schema - The schema to convert (e.g., Zod v3/v4 schema or EnvVarSchema)
|
|
167
|
+
* @returns EnvVarSchema that can be used with envcredible
|
|
168
|
+
* @throws Error if no converter can handle the schema
|
|
169
|
+
*/
|
|
170
|
+
declare function resolveSchema(schema: Schema): EnvVarSchema;
|
|
171
|
+
/**
|
|
172
|
+
* Resolve mixed schema map (Zod schemas or EnvVarSchema) to pure EnvVarSchema map.
|
|
173
|
+
*
|
|
174
|
+
* This function takes a map where values can be:
|
|
175
|
+
* - Zod v3 schemas
|
|
176
|
+
* - Zod v4 schemas
|
|
177
|
+
* - Already resolved EnvVarSchema instances
|
|
178
|
+
*
|
|
179
|
+
* And converts everything to EnvVarSchema instances that can be used throughout envcredible.
|
|
180
|
+
*
|
|
181
|
+
* @param schemas - Object mapping environment variable names to various schema types
|
|
182
|
+
* @returns Record mapping env var names to EnvVarSchema instances
|
|
183
|
+
*/
|
|
184
|
+
declare function resolveSchemas(schemas: Record<string, Schema>): Record<string, EnvVarSchema>;
|
|
185
|
+
//#endregion
|
|
186
|
+
export { EnvModelOptions as a, SupportedSchema as c, EnvModel as i, resolveSchemas as n, InferEnvType as o, define as r, InferSchemaType as s, resolveSchema as t };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { a as EnumEnvVarSchema, l as EnvVarSchemaBase, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-
|
|
2
|
-
import { i as EnvVarSchema, n as Preprocessor, t as BooleanMap } from "./BooleanMap-
|
|
1
|
+
import { a as EnumEnvVarSchema, l as EnvVarSchemaBase, r as NumberEnvVarSchema, s as BooleanEnvVarSchema, t as StringEnvVarSchema } from "./StringEnvVarSchema-D9Jr1Aws.cjs";
|
|
2
|
+
import { i as EnvVarSchema, n as Preprocessor, t as BooleanMap } from "./BooleanMap-CX_YrPCf.cjs";
|
|
3
3
|
import { AnySchema } from "joi";
|
|
4
4
|
import { ZodTypeAny } from "zod";
|
|
5
5
|
import { $ZodType } from "zod/v4/core";
|
|
6
6
|
import { Struct } from "superstruct";
|
|
7
|
-
|
|
8
7
|
//#region ../models/src/schemas.d.ts
|
|
9
8
|
type JoiSchema = AnySchema;
|
|
10
9
|
type ZodV3Schema = ZodTypeAny;
|
|
@@ -58,13 +57,13 @@ type InferOptional<T> = T extends {
|
|
|
58
57
|
/**
|
|
59
58
|
* Utility type to flatten complex generic types for better IDE display
|
|
60
59
|
*/
|
|
61
|
-
type Simplify<T> = { [K in keyof T]: T[K] } & {};
|
|
60
|
+
type Simplify<T> = { [K in keyof T]: T[K]; } & {};
|
|
62
61
|
/**
|
|
63
62
|
* Infer the complete environment type from a schemas record
|
|
64
63
|
* Handles optional vs required fields properly
|
|
65
64
|
* Uses Simplify to flatten the type display in IDEs
|
|
66
65
|
*/
|
|
67
|
-
type InferEnvType<T extends Record<string, SupportedSchema>> = Simplify<{ [K in keyof T]: InferOptional<T[K]> extends true ? InferSchemaType<T[K]> | undefined : InferSchemaType<T[K]
|
|
66
|
+
type InferEnvType<T extends Record<string, SupportedSchema>> = Simplify<{ [K in keyof T]: InferOptional<T[K]> extends true ? InferSchemaType<T[K]> | undefined : InferSchemaType<T[K]>; }>;
|
|
68
67
|
//#endregion
|
|
69
68
|
//#region ../models/src/EnvModelOptions.d.ts
|
|
70
69
|
type PreprocessorToggle<T> = Preprocessor<T> | boolean | undefined;
|
|
@@ -131,4 +130,57 @@ declare class EnvModel<T extends Record<string, SupportedSchema> = Record<string
|
|
|
131
130
|
private resolvePreprocessors;
|
|
132
131
|
}
|
|
133
132
|
//#endregion
|
|
134
|
-
|
|
133
|
+
//#region ../models/src/model.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Create an environment variable model
|
|
136
|
+
*
|
|
137
|
+
* Sugar utility for creating EnvModel instances with full type inference
|
|
138
|
+
*
|
|
139
|
+
* @param options - Model options
|
|
140
|
+
* @returns EnvModel instance with inferred types
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* import { define, s } from "@e-n-v/models";
|
|
145
|
+
*
|
|
146
|
+
* export default define({
|
|
147
|
+
* schemas: {
|
|
148
|
+
* PORT: s.number({ default: 3000 }),
|
|
149
|
+
* DATABASE_URL: s.string(),
|
|
150
|
+
* DEBUG: s.boolean({ default: false })
|
|
151
|
+
* },
|
|
152
|
+
* preprocess: true
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
declare function define<T extends Record<string, SupportedSchema>>(options: EnvModelOptions<T>): EnvModel<T>;
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region ../models/src/resolve.d.ts
|
|
159
|
+
/**
|
|
160
|
+
* Resolve any supported schema to a EnvVarSchema.
|
|
161
|
+
*
|
|
162
|
+
* This is the main entry point for converting external schemas
|
|
163
|
+
* (like Zod schemas) to envcredible's internal schema format.
|
|
164
|
+
* If the input is already a EnvVarSchema, it returns it directly.
|
|
165
|
+
*
|
|
166
|
+
* @param schema - The schema to convert (e.g., Zod v3/v4 schema or EnvVarSchema)
|
|
167
|
+
* @returns EnvVarSchema that can be used with envcredible
|
|
168
|
+
* @throws Error if no converter can handle the schema
|
|
169
|
+
*/
|
|
170
|
+
declare function resolveSchema(schema: Schema): EnvVarSchema;
|
|
171
|
+
/**
|
|
172
|
+
* Resolve mixed schema map (Zod schemas or EnvVarSchema) to pure EnvVarSchema map.
|
|
173
|
+
*
|
|
174
|
+
* This function takes a map where values can be:
|
|
175
|
+
* - Zod v3 schemas
|
|
176
|
+
* - Zod v4 schemas
|
|
177
|
+
* - Already resolved EnvVarSchema instances
|
|
178
|
+
*
|
|
179
|
+
* And converts everything to EnvVarSchema instances that can be used throughout envcredible.
|
|
180
|
+
*
|
|
181
|
+
* @param schemas - Object mapping environment variable names to various schema types
|
|
182
|
+
* @returns Record mapping env var names to EnvVarSchema instances
|
|
183
|
+
*/
|
|
184
|
+
declare function resolveSchemas(schemas: Record<string, Schema>): Record<string, EnvVarSchema>;
|
|
185
|
+
//#endregion
|
|
186
|
+
export { EnvModelOptions as a, SupportedSchema as c, EnvModel as i, resolveSchemas as n, InferEnvType as o, define as r, InferSchemaType as s, resolveSchema as t };
|
package/dist/index.cjs
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const require_src
|
|
6
|
-
require(
|
|
7
|
-
require(
|
|
8
|
-
const require_src$2 = require(
|
|
9
|
-
const require_src$3 = require(
|
|
10
|
-
require(
|
|
11
|
-
const
|
|
12
|
-
const require_vars = require('./vars-BHXXBiY1.cjs');
|
|
13
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_src = require("./src-TZx_e95f.cjs");
|
|
6
|
+
const require_schema = require("./schema-D9nJKipf.cjs");
|
|
7
|
+
const require_src$1 = require("./src-D5KzIEH_.cjs");
|
|
8
|
+
const require_src$2 = require("./src-5GYFbR9n.cjs");
|
|
9
|
+
const require_src$3 = require("./src-CttkcdpE.cjs");
|
|
10
|
+
const require_src$4 = require("./src-DB0Har0j.cjs");
|
|
11
|
+
const require_vars = require("./vars.cjs");
|
|
14
12
|
//#region src/index.ts
|
|
15
13
|
var src_default = {
|
|
16
|
-
parse: require_src$
|
|
17
|
-
prompt: require_src.prompt,
|
|
18
|
-
define: require_src$
|
|
14
|
+
parse: require_src$2.parse,
|
|
15
|
+
prompt: require_src$3.prompt,
|
|
16
|
+
define: require_src$1.define
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
//#endregion
|
|
22
19
|
exports.default = src_default;
|
|
23
|
-
exports.define = require_src$
|
|
24
|
-
exports.parse = require_src$
|
|
25
|
-
exports.preprocessors = require_src
|
|
26
|
-
exports.processors = require_src
|
|
27
|
-
exports.prompt = require_src.prompt;
|
|
28
|
-
exports.s =
|
|
29
|
-
exports.schema =
|
|
30
|
-
Object.defineProperty(exports,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
exports.define = require_src$1.define;
|
|
21
|
+
exports.parse = require_src$2.parse;
|
|
22
|
+
exports.preprocessors = require_src.preprocessors;
|
|
23
|
+
exports.processors = require_src.processors;
|
|
24
|
+
exports.prompt = require_src$3.prompt;
|
|
25
|
+
exports.s = require_schema.s;
|
|
26
|
+
exports.schema = require_schema.schema;
|
|
27
|
+
Object.defineProperty(exports, "schemas", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function() {
|
|
30
|
+
return require_src$4.src_exports;
|
|
31
|
+
}
|
|
35
32
|
});
|
|
36
|
-
exports.vars = require_vars.
|
|
33
|
+
exports.vars = require_vars.default;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { t as vars } from "./vars-KUgv2rti.cjs";
|
|
13
|
-
|
|
1
|
+
import { n as processors, t as preprocessors } from "./preprocessors-DFVyF0c7.cjs";
|
|
2
|
+
import { n as schema, t as s } from "./schema-B1i83alz.cjs";
|
|
3
|
+
import { r as define } from "./index-Cz3frUwZ.cjs";
|
|
4
|
+
import { t as parse } from "./index-B2eNij2x.cjs";
|
|
5
|
+
import { t as prompt } from "./index-BKBW9Dxs.cjs";
|
|
6
|
+
import { $ as KAFKA_BROKERS, $t as DATABASE_URL, A as openaiTimeout, An as AWS_SECRET_ACCESS_KEY, At as gelSecretKey, B as nodeEnv, Bn as apiBaseUrl, Bt as DOCKER_REGISTRY_URL, C as OPENAI_PROJECT_ID, Cn as azureServiceBusConnectionString, Ct as gelClientTlsSecurity, D as openaiModel, Dn as AWS_ACCESS_KEY_ID, Dt as gelInstance, E as openaiBaseUrl, En as azureStorageConnectionString, Et as gelHost, F as oauthClientId, Fn as awsSecretAccessKey, Ft as ELASTICSEARCH_USERNAME, G as SENTRY_DSN, Gt as DATABASE_HOST, H as JAEGER_ENDPOINT, Hn as apiTimeout, Ht as dockerRegistryPassword, I as oauthClientSecret, In as awsSqsQueueUrl, It as elasticsearchPassword, J as newRelicLicenseKey, Jt as DATABASE_POOL_SIZE, K as datadogApiKey, Kt as DATABASE_NAME, L as oauthRedirectUri, Ln as API_BASE_URL, Lt as elasticsearchUrl, M as OAUTH_CLIENT_SECRET, Mn as awsAccessKeyId, Mt as gelUser, N as OAUTH_REDIRECT_URI, Nn as awsRegion, Nt as ELASTICSEARCH_PASSWORD, O as openaiOrganizationId, On as AWS_REGION, Ot as gelPassword, P as OAUTH_SCOPE, Pn as awsS3BucketName, Pt as ELASTICSEARCH_URL, Q as logLevel, Qt as DATABASE_TIMEOUT, R as oauthScope, Rn as API_KEY, Rt as elasticsearchUsername, S as OPENAI_ORGANIZATION_ID, Sn as azureEventHubConnectionString, St as gelBranch, T as openaiApiKey, Tn as azureStorageAccountName, Tt as gelDsn, U as NEW_RELIC_LICENSE_KEY, Ut as dockerRegistryUrl, V as DATADOG_API_KEY, Vn as apiKey, Vt as DOCKER_REGISTRY_USERNAME, W as PROMETHEUS_PORT, Wt as dockerRegistryUsername, X as sentryDsn, Xt as DATABASE_SCHEMA, Y as prometheusPort, Yt as DATABASE_PORT, Z as LOG_LEVEL, Zt as DATABASE_SSL, _ as RABBITMQ_URL, _n as AZURE_EVENT_HUB_CONNECTION_STRING, _t as GEL_PASSWORD, a as REDIS_TLS, an as databasePort, at as JWT_SECRET, b as OPENAI_BASE_URL, bn as AZURE_STORAGE_ACCOUNT_NAME, bt as GEL_TLS_CA_FILE, c as REDIS_USERNAME, cn as databaseTimeout, ct as jwtSecret, d as redisPassword, dn as CORS_ORIGIN, dt as GEL_BRANCH, en as DATABASE_USERNAME, et as KAFKA_CLIENT_ID, f as redisPort, fn as corsOrigin, ft as GEL_CLIENT_TLS_SECURITY, g as redisUsername, gn as port, gt as GEL_INSTANCE, h as redisUrl, hn as debug, ht as GEL_HOST, i as REDIS_PORT, in as databasePoolSize, it as JWT_REFRESH_TOKEN_EXPIRES_IN, j as OAUTH_CLIENT_ID, jn as AWS_SQS_QUEUE_URL, jt as gelTlsCaFile, k as openaiProjectId, kn as AWS_S3_BUCKET_NAME, kt as gelPort, l as redisDb, ln as databaseUrl, lt as HOST, m as redisTlsCaCertPath, mn as PORT, mt as GEL_DSN, n as REDIS_HOST, nn as databaseName, nt as kafkaClientId, o as REDIS_TLS_CA_CERT_PATH, on as databaseSchema, ot as jwtAccessTokenExpiresIn, p as redisTls, pn as DEBUG, pt as GEL_CREDENTIALS_FILE, q as jaegerEndpoint, qt as DATABASE_PASSWORD, r as REDIS_PASSWORD, rn as databasePassword, rt as JWT_ACCESS_TOKEN_EXPIRES_IN, s as REDIS_URL, sn as databaseSsl, st as jwtRefreshTokenExpiresIn, t as REDIS_DB, tn as databaseHost, tt as kafkaBrokers, u as redisHost, un as databaseUsername, ut as host, v as rabbitmqUrl, vn as AZURE_SERVICE_BUS_CONNECTION_STRING, vt as GEL_PORT, w as OPENAI_TIMEOUT, wn as azureStorageAccountKey, wt as gelCredentialsFile, x as OPENAI_MODEL, xn as AZURE_STORAGE_CONNECTION_STRING, xt as GEL_USER, y as OPENAI_API_KEY, yn as AZURE_STORAGE_ACCOUNT_KEY, yt as GEL_SECRET_KEY, z as NODE_ENV, zn as API_TIMEOUT, zt as DOCKER_REGISTRY_PASSWORD } from "./redis-DsW-Vkwq.cjs";
|
|
7
|
+
import { t as vars } from "./vars-DtzGL5Nc.cjs";
|
|
8
|
+
declare namespace index_d_exports {
|
|
9
|
+
export { API_BASE_URL, API_KEY, API_TIMEOUT, AWS_ACCESS_KEY_ID, AWS_REGION, AWS_S3_BUCKET_NAME, AWS_SECRET_ACCESS_KEY, AWS_SQS_QUEUE_URL, AZURE_EVENT_HUB_CONNECTION_STRING, AZURE_SERVICE_BUS_CONNECTION_STRING, AZURE_STORAGE_ACCOUNT_KEY, AZURE_STORAGE_ACCOUNT_NAME, AZURE_STORAGE_CONNECTION_STRING, CORS_ORIGIN, DATABASE_HOST, DATABASE_NAME, DATABASE_PASSWORD, DATABASE_POOL_SIZE, DATABASE_PORT, DATABASE_SCHEMA, DATABASE_SSL, DATABASE_TIMEOUT, DATABASE_URL, DATABASE_USERNAME, DATADOG_API_KEY, DEBUG, DOCKER_REGISTRY_PASSWORD, DOCKER_REGISTRY_URL, DOCKER_REGISTRY_USERNAME, ELASTICSEARCH_PASSWORD, ELASTICSEARCH_URL, ELASTICSEARCH_USERNAME, GEL_BRANCH, GEL_CLIENT_TLS_SECURITY, GEL_CREDENTIALS_FILE, GEL_DSN, GEL_HOST, GEL_INSTANCE, GEL_PASSWORD, GEL_PORT, GEL_SECRET_KEY, GEL_TLS_CA_FILE, GEL_USER, HOST, JAEGER_ENDPOINT, JWT_ACCESS_TOKEN_EXPIRES_IN, JWT_REFRESH_TOKEN_EXPIRES_IN, JWT_SECRET, KAFKA_BROKERS, KAFKA_CLIENT_ID, LOG_LEVEL, NEW_RELIC_LICENSE_KEY, NODE_ENV, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_REDIRECT_URI, OAUTH_SCOPE, OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL, OPENAI_ORGANIZATION_ID, OPENAI_PROJECT_ID, OPENAI_TIMEOUT, PORT, PROMETHEUS_PORT, RABBITMQ_URL, REDIS_DB, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REDIS_TLS, REDIS_TLS_CA_CERT_PATH, REDIS_URL, REDIS_USERNAME, SENTRY_DSN, apiBaseUrl, apiKey, apiTimeout, awsAccessKeyId, awsRegion, awsS3BucketName, awsSecretAccessKey, awsSqsQueueUrl, azureEventHubConnectionString, azureServiceBusConnectionString, azureStorageAccountKey, azureStorageAccountName, azureStorageConnectionString, corsOrigin, databaseHost, databaseName, databasePassword, databasePoolSize, databasePort, databaseSchema, databaseSsl, databaseTimeout, databaseUrl, databaseUsername, datadogApiKey, debug, dockerRegistryPassword, dockerRegistryUrl, dockerRegistryUsername, elasticsearchPassword, elasticsearchUrl, elasticsearchUsername, gelBranch, gelClientTlsSecurity, gelCredentialsFile, gelDsn, gelHost, gelInstance, gelPassword, gelPort, gelSecretKey, gelTlsCaFile, gelUser, host, jaegerEndpoint, jwtAccessTokenExpiresIn, jwtRefreshTokenExpiresIn, jwtSecret, kafkaBrokers, kafkaClientId, logLevel, newRelicLicenseKey, nodeEnv, oauthClientId, oauthClientSecret, oauthRedirectUri, oauthScope, openaiApiKey, openaiBaseUrl, openaiModel, openaiOrganizationId, openaiProjectId, openaiTimeout, port, prometheusPort, rabbitmqUrl, redisDb, redisHost, redisPassword, redisPort, redisTls, redisTlsCaCertPath, redisUrl, redisUsername, sentryDsn };
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
14
12
|
//#region src/index.d.ts
|
|
15
13
|
declare const _default: {
|
|
16
14
|
parse: typeof parse;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import { t as vars } from "./vars-DF9DoAF4.js";
|
|
13
|
-
|
|
1
|
+
import { n as processors, t as preprocessors } from "./preprocessors-BKuIcZa1.js";
|
|
2
|
+
import { n as schema, t as s } from "./schema-B-JLVS42.js";
|
|
3
|
+
import { r as define } from "./index-Cb0abjLf.js";
|
|
4
|
+
import { t as parse } from "./index-BHTM8nxS.js";
|
|
5
|
+
import { t as prompt } from "./index-CEyOIRdj.js";
|
|
6
|
+
import { $ as KAFKA_BROKERS, $t as DATABASE_URL, A as openaiTimeout, An as AWS_SECRET_ACCESS_KEY, At as gelSecretKey, B as nodeEnv, Bn as apiBaseUrl, Bt as DOCKER_REGISTRY_URL, C as OPENAI_PROJECT_ID, Cn as azureServiceBusConnectionString, Ct as gelClientTlsSecurity, D as openaiModel, Dn as AWS_ACCESS_KEY_ID, Dt as gelInstance, E as openaiBaseUrl, En as azureStorageConnectionString, Et as gelHost, F as oauthClientId, Fn as awsSecretAccessKey, Ft as ELASTICSEARCH_USERNAME, G as SENTRY_DSN, Gt as DATABASE_HOST, H as JAEGER_ENDPOINT, Hn as apiTimeout, Ht as dockerRegistryPassword, I as oauthClientSecret, In as awsSqsQueueUrl, It as elasticsearchPassword, J as newRelicLicenseKey, Jt as DATABASE_POOL_SIZE, K as datadogApiKey, Kt as DATABASE_NAME, L as oauthRedirectUri, Ln as API_BASE_URL, Lt as elasticsearchUrl, M as OAUTH_CLIENT_SECRET, Mn as awsAccessKeyId, Mt as gelUser, N as OAUTH_REDIRECT_URI, Nn as awsRegion, Nt as ELASTICSEARCH_PASSWORD, O as openaiOrganizationId, On as AWS_REGION, Ot as gelPassword, P as OAUTH_SCOPE, Pn as awsS3BucketName, Pt as ELASTICSEARCH_URL, Q as logLevel, Qt as DATABASE_TIMEOUT, R as oauthScope, Rn as API_KEY, Rt as elasticsearchUsername, S as OPENAI_ORGANIZATION_ID, Sn as azureEventHubConnectionString, St as gelBranch, T as openaiApiKey, Tn as azureStorageAccountName, Tt as gelDsn, U as NEW_RELIC_LICENSE_KEY, Ut as dockerRegistryUrl, V as DATADOG_API_KEY, Vn as apiKey, Vt as DOCKER_REGISTRY_USERNAME, W as PROMETHEUS_PORT, Wt as dockerRegistryUsername, X as sentryDsn, Xt as DATABASE_SCHEMA, Y as prometheusPort, Yt as DATABASE_PORT, Z as LOG_LEVEL, Zt as DATABASE_SSL, _ as RABBITMQ_URL, _n as AZURE_EVENT_HUB_CONNECTION_STRING, _t as GEL_PASSWORD, a as REDIS_TLS, an as databasePort, at as JWT_SECRET, b as OPENAI_BASE_URL, bn as AZURE_STORAGE_ACCOUNT_NAME, bt as GEL_TLS_CA_FILE, c as REDIS_USERNAME, cn as databaseTimeout, ct as jwtSecret, d as redisPassword, dn as CORS_ORIGIN, dt as GEL_BRANCH, en as DATABASE_USERNAME, et as KAFKA_CLIENT_ID, f as redisPort, fn as corsOrigin, ft as GEL_CLIENT_TLS_SECURITY, g as redisUsername, gn as port, gt as GEL_INSTANCE, h as redisUrl, hn as debug, ht as GEL_HOST, i as REDIS_PORT, in as databasePoolSize, it as JWT_REFRESH_TOKEN_EXPIRES_IN, j as OAUTH_CLIENT_ID, jn as AWS_SQS_QUEUE_URL, jt as gelTlsCaFile, k as openaiProjectId, kn as AWS_S3_BUCKET_NAME, kt as gelPort, l as redisDb, ln as databaseUrl, lt as HOST, m as redisTlsCaCertPath, mn as PORT, mt as GEL_DSN, n as REDIS_HOST, nn as databaseName, nt as kafkaClientId, o as REDIS_TLS_CA_CERT_PATH, on as databaseSchema, ot as jwtAccessTokenExpiresIn, p as redisTls, pn as DEBUG, pt as GEL_CREDENTIALS_FILE, q as jaegerEndpoint, qt as DATABASE_PASSWORD, r as REDIS_PASSWORD, rn as databasePassword, rt as JWT_ACCESS_TOKEN_EXPIRES_IN, s as REDIS_URL, sn as databaseSsl, st as jwtRefreshTokenExpiresIn, t as REDIS_DB, tn as databaseHost, tt as kafkaBrokers, u as redisHost, un as databaseUsername, ut as host, v as rabbitmqUrl, vn as AZURE_SERVICE_BUS_CONNECTION_STRING, vt as GEL_PORT, w as OPENAI_TIMEOUT, wn as azureStorageAccountKey, wt as gelCredentialsFile, x as OPENAI_MODEL, xn as AZURE_STORAGE_CONNECTION_STRING, xt as GEL_USER, y as OPENAI_API_KEY, yn as AZURE_STORAGE_ACCOUNT_KEY, yt as GEL_SECRET_KEY, z as NODE_ENV, zn as API_TIMEOUT, zt as DOCKER_REGISTRY_PASSWORD } from "./redis-tRD4nAy_.js";
|
|
7
|
+
import { t as vars } from "./vars-obKYxaSu.js";
|
|
8
|
+
declare namespace index_d_exports {
|
|
9
|
+
export { API_BASE_URL, API_KEY, API_TIMEOUT, AWS_ACCESS_KEY_ID, AWS_REGION, AWS_S3_BUCKET_NAME, AWS_SECRET_ACCESS_KEY, AWS_SQS_QUEUE_URL, AZURE_EVENT_HUB_CONNECTION_STRING, AZURE_SERVICE_BUS_CONNECTION_STRING, AZURE_STORAGE_ACCOUNT_KEY, AZURE_STORAGE_ACCOUNT_NAME, AZURE_STORAGE_CONNECTION_STRING, CORS_ORIGIN, DATABASE_HOST, DATABASE_NAME, DATABASE_PASSWORD, DATABASE_POOL_SIZE, DATABASE_PORT, DATABASE_SCHEMA, DATABASE_SSL, DATABASE_TIMEOUT, DATABASE_URL, DATABASE_USERNAME, DATADOG_API_KEY, DEBUG, DOCKER_REGISTRY_PASSWORD, DOCKER_REGISTRY_URL, DOCKER_REGISTRY_USERNAME, ELASTICSEARCH_PASSWORD, ELASTICSEARCH_URL, ELASTICSEARCH_USERNAME, GEL_BRANCH, GEL_CLIENT_TLS_SECURITY, GEL_CREDENTIALS_FILE, GEL_DSN, GEL_HOST, GEL_INSTANCE, GEL_PASSWORD, GEL_PORT, GEL_SECRET_KEY, GEL_TLS_CA_FILE, GEL_USER, HOST, JAEGER_ENDPOINT, JWT_ACCESS_TOKEN_EXPIRES_IN, JWT_REFRESH_TOKEN_EXPIRES_IN, JWT_SECRET, KAFKA_BROKERS, KAFKA_CLIENT_ID, LOG_LEVEL, NEW_RELIC_LICENSE_KEY, NODE_ENV, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_REDIRECT_URI, OAUTH_SCOPE, OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODEL, OPENAI_ORGANIZATION_ID, OPENAI_PROJECT_ID, OPENAI_TIMEOUT, PORT, PROMETHEUS_PORT, RABBITMQ_URL, REDIS_DB, REDIS_HOST, REDIS_PASSWORD, REDIS_PORT, REDIS_TLS, REDIS_TLS_CA_CERT_PATH, REDIS_URL, REDIS_USERNAME, SENTRY_DSN, apiBaseUrl, apiKey, apiTimeout, awsAccessKeyId, awsRegion, awsS3BucketName, awsSecretAccessKey, awsSqsQueueUrl, azureEventHubConnectionString, azureServiceBusConnectionString, azureStorageAccountKey, azureStorageAccountName, azureStorageConnectionString, corsOrigin, databaseHost, databaseName, databasePassword, databasePoolSize, databasePort, databaseSchema, databaseSsl, databaseTimeout, databaseUrl, databaseUsername, datadogApiKey, debug, dockerRegistryPassword, dockerRegistryUrl, dockerRegistryUsername, elasticsearchPassword, elasticsearchUrl, elasticsearchUsername, gelBranch, gelClientTlsSecurity, gelCredentialsFile, gelDsn, gelHost, gelInstance, gelPassword, gelPort, gelSecretKey, gelTlsCaFile, gelUser, host, jaegerEndpoint, jwtAccessTokenExpiresIn, jwtRefreshTokenExpiresIn, jwtSecret, kafkaBrokers, kafkaClientId, logLevel, newRelicLicenseKey, nodeEnv, oauthClientId, oauthClientSecret, oauthRedirectUri, oauthScope, openaiApiKey, openaiBaseUrl, openaiModel, openaiOrganizationId, openaiProjectId, openaiTimeout, port, prometheusPort, rabbitmqUrl, redisDb, redisHost, redisPassword, redisPort, redisTls, redisTlsCaCertPath, redisUrl, redisUsername, sentryDsn };
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
14
12
|
//#region src/index.d.ts
|
|
15
13
|
declare const _default: {
|
|
16
14
|
parse: typeof parse;
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import
|
|
8
|
-
import { t as parse } from "./src-BrNrE0hX.js";
|
|
9
|
-
import "./redis-DXhlNtvD.js";
|
|
10
|
-
import { t as src_exports } from "./src-vBXlFkSP.js";
|
|
11
|
-
import { t as vars } from "./vars-FOuH_HuL.js";
|
|
12
|
-
|
|
1
|
+
import { n as preprocessors, s as processors } from "./src-Cg49gGJb.js";
|
|
2
|
+
import { n as schema, t as s } from "./schema-CtP5lpU1.js";
|
|
3
|
+
import { t as define } from "./src-DWc-WWjX.js";
|
|
4
|
+
import { t as parse } from "./src-8rEOvFG5.js";
|
|
5
|
+
import { t as prompt } from "./src-CdzAzdq-.js";
|
|
6
|
+
import { t as src_exports } from "./src-DvUBRBe3.js";
|
|
7
|
+
import vars from "./vars.js";
|
|
13
8
|
//#region src/index.ts
|
|
14
9
|
var src_default = {
|
|
15
10
|
parse,
|
|
16
11
|
prompt,
|
|
17
12
|
define
|
|
18
13
|
};
|
|
19
|
-
|
|
20
14
|
//#endregion
|
|
21
|
-
export { src_default as default, define, parse, preprocessors, processors, prompt, s, schema, src_exports as schemas, vars };
|
|
15
|
+
export { src_default as default, define, parse, preprocessors, processors, prompt, s, schema, src_exports as schemas, vars };
|