@powerlines/plugin-env 0.15.140 → 0.15.142
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/automd-generator-BNg74tyV.cjs +37 -0
- package/dist/automd-generator-DoKLIMuw.mjs +32 -0
- package/dist/automd-generator-DoKLIMuw.mjs.map +1 -0
- package/dist/babel/index.cjs +5 -2
- package/dist/babel/index.d.cts +14 -1
- package/dist/babel/index.d.mts +14 -1
- package/dist/babel/index.mjs +4 -1
- package/dist/babel/plugin.cjs +4 -140
- package/dist/babel/plugin.d.cts +14 -7
- package/dist/babel/plugin.d.mts +14 -7
- package/dist/babel/plugin.mjs +3 -138
- package/dist/babel-BZqmdVF4.cjs +0 -0
- package/dist/babel-DgietUY3.mjs +1 -0
- package/dist/chunk-CNVrAnJR.cjs +48 -0
- package/dist/{_virtual/rolldown_runtime.cjs → chunk-CsF2CmBJ.mjs} +6 -2
- package/dist/components/docs.cjs +13 -69
- package/dist/components/docs.d.cts +1 -21
- package/dist/components/docs.d.mts +1 -21
- package/dist/components/docs.mjs +12 -67
- package/dist/components/env.cjs +13 -588
- package/dist/components/env.d.cts +1 -19
- package/dist/components/env.d.mts +1 -19
- package/dist/components/env.mjs +11 -584
- package/dist/components/index.cjs +17 -5
- package/dist/components/index.d.cts +3 -2
- package/dist/components/index.d.mts +3 -2
- package/dist/components/index.mjs +14 -2
- package/dist/components-BUo6Koax.cjs +0 -0
- package/dist/components-DDFmImcI.mjs +1 -0
- package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs +23 -0
- package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs.map +1 -0
- package/dist/confbox.DA7CpUDY-r6FXRsI6.cjs +28 -0
- package/dist/confbox.DnMsyigM-C13n3X-S.cjs +415 -0
- package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs +405 -0
- package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs.map +1 -0
- package/dist/create-reflection-resource-B3friIs9.mjs +98 -0
- package/dist/create-reflection-resource-B3friIs9.mjs.map +1 -0
- package/dist/create-reflection-resource-BJj83ii4.cjs +103 -0
- package/dist/create-reflection-resource-DSLbLsX2.d.cts +16 -0
- package/dist/create-reflection-resource-DSLbLsX2.d.cts.map +1 -0
- package/dist/create-reflection-resource-DwWJAo-G.d.mts +16 -0
- package/dist/create-reflection-resource-DwWJAo-G.d.mts.map +1 -0
- package/dist/defu-CrqNIh1A.cjs +227 -0
- package/dist/defu-DV5Grr85.mjs +180 -0
- package/dist/defu-DV5Grr85.mjs.map +1 -0
- package/dist/dist-BQc8ZRwl.cjs +13 -0
- package/dist/dist-C_a6goTt.cjs +15282 -0
- package/dist/dist-CjWvISyq.mjs +15271 -0
- package/dist/dist-CjWvISyq.mjs.map +1 -0
- package/dist/dist-mV5Swt78.mjs +13 -0
- package/dist/dist-mV5Swt78.mjs.map +1 -0
- package/dist/docs-B-SDRHeg.cjs +75 -0
- package/dist/docs-B0d8pdIg.d.mts +23 -0
- package/dist/docs-B0d8pdIg.d.mts.map +1 -0
- package/dist/docs-DMfzQuvP.d.cts +23 -0
- package/dist/docs-DMfzQuvP.d.cts.map +1 -0
- package/dist/docs-DbRoWmL_.mjs +70 -0
- package/dist/docs-DbRoWmL_.mjs.map +1 -0
- package/dist/docs-helper-2fe7M3Th.mjs +24 -0
- package/dist/docs-helper-2fe7M3Th.mjs.map +1 -0
- package/dist/docs-helper-4MoQ5-R3.cjs +28 -0
- package/dist/env-BIyd8CTA.d.cts +21 -0
- package/dist/env-BIyd8CTA.d.cts.map +1 -0
- package/dist/env-BKmI7DyR.d.mts +21 -0
- package/dist/env-BKmI7DyR.d.mts.map +1 -0
- package/dist/env-D9oCn-AS.mjs +587 -0
- package/dist/env-D9oCn-AS.mjs.map +1 -0
- package/dist/env-R63eR4RP.cjs +598 -0
- package/dist/helpers/automd-generator.cjs +3 -31
- package/dist/helpers/automd-generator.d.cts +2 -1
- package/dist/helpers/automd-generator.d.cts.map +1 -0
- package/dist/helpers/automd-generator.d.mts +2 -1
- package/dist/helpers/automd-generator.d.mts.map +1 -0
- package/dist/helpers/automd-generator.mjs +2 -29
- package/dist/helpers/create-reflection-resource.cjs +11 -97
- package/dist/helpers/create-reflection-resource.d.cts +3 -14
- package/dist/helpers/create-reflection-resource.d.mts +3 -14
- package/dist/helpers/create-reflection-resource.mjs +10 -95
- package/dist/helpers/docs-helper.cjs +5 -23
- package/dist/helpers/docs-helper.d.cts +4 -2
- package/dist/helpers/docs-helper.d.cts.map +1 -0
- package/dist/helpers/docs-helper.d.mts +4 -2
- package/dist/helpers/docs-helper.d.mts.map +1 -0
- package/dist/helpers/docs-helper.mjs +4 -21
- package/dist/helpers/index.cjs +38 -32
- package/dist/helpers/index.d.cts +9 -6
- package/dist/helpers/index.d.mts +9 -6
- package/dist/helpers/index.mjs +12 -6
- package/dist/helpers/load.cjs +10 -134
- package/dist/helpers/load.d.cts +3 -34
- package/dist/helpers/load.d.mts +3 -34
- package/dist/helpers/load.mjs +8 -130
- package/dist/helpers/persistence.cjs +15 -321
- package/dist/helpers/persistence.d.cts +3 -83
- package/dist/helpers/persistence.d.mts +3 -83
- package/dist/helpers/persistence.mjs +4 -308
- package/dist/helpers/reflect.cjs +13 -262
- package/dist/helpers/reflect.d.cts +3 -45
- package/dist/helpers/reflect.d.mts +3 -45
- package/dist/helpers/reflect.mjs +4 -252
- package/dist/helpers/source-file-env.cjs +3 -57
- package/dist/helpers/source-file-env.d.cts +1 -7
- package/dist/helpers/source-file-env.d.mts +1 -7
- package/dist/helpers/source-file-env.mjs +1 -54
- package/dist/helpers/template-helpers.cjs +6 -69
- package/dist/helpers/template-helpers.d.cts +3 -14
- package/dist/helpers/template-helpers.d.mts +3 -14
- package/dist/helpers/template-helpers.mjs +5 -67
- package/dist/helpers-45e1bvAO.mjs +1 -0
- package/dist/helpers-DgYP3uej.cjs +0 -0
- package/dist/index-BNRXMhlr.d.mts +1 -0
- package/dist/index-Bdi8CvaN.d.cts +16 -0
- package/dist/index-Bdi8CvaN.d.cts.map +1 -0
- package/dist/index-CEDY7cmG.d.cts +1 -0
- package/dist/index-CREkvfw9.d.mts +1 -0
- package/dist/index-DSiHnMH2.d.cts +1 -0
- package/dist/index-Drhzdkqe.d.mts +16 -0
- package/dist/index-Drhzdkqe.d.mts.map +1 -0
- package/dist/index-dhjtMp5F.d.mts +1 -0
- package/dist/index-uTS5iDq_.d.cts +1 -0
- package/dist/index.cjs +257 -98
- package/dist/index.d.cts +14 -23
- package/dist/index.d.mts +14 -23
- package/dist/index.mjs +184 -23
- package/dist/index.mjs.map +1 -0
- package/dist/join-paths-BMg51Ddi.mjs +148 -0
- package/dist/join-paths-BMg51Ddi.mjs.map +1 -0
- package/dist/join-paths-Bc4rM2TX.cjs +159 -0
- package/dist/json5-DEV_07Nb.cjs +786 -0
- package/dist/json5-jq90mF9X.mjs +787 -0
- package/dist/json5-jq90mF9X.mjs.map +1 -0
- package/dist/jsonc-CBh70baJ.cjs +4 -0
- package/dist/jsonc-CDLU6bgi.mjs +4 -0
- package/dist/load-DPB0maqs.cjs +6594 -0
- package/dist/load-Dr5ybfL7.mjs +6579 -0
- package/dist/load-Dr5ybfL7.mjs.map +1 -0
- package/dist/load-GpP6cojj.d.mts +36 -0
- package/dist/load-GpP6cojj.d.mts.map +1 -0
- package/dist/load-PHGmxX_X.d.cts +36 -0
- package/dist/load-PHGmxX_X.d.cts.map +1 -0
- package/dist/multipart-parser-D65rtMfY.mjs +176 -0
- package/dist/multipart-parser-D65rtMfY.mjs.map +1 -0
- package/dist/multipart-parser-aEF5a4Xf.cjs +178 -0
- package/dist/node-Co8KdzkZ.cjs +3985 -0
- package/dist/node-D9MigVDD.mjs +3975 -0
- package/dist/node-D9MigVDD.mjs.map +1 -0
- package/dist/persistence-BR4cUaN6.d.cts +85 -0
- package/dist/persistence-BR4cUaN6.d.cts.map +1 -0
- package/dist/persistence-BsBxs9wt.mjs +586 -0
- package/dist/persistence-BsBxs9wt.mjs.map +1 -0
- package/dist/persistence-D_clXRxP.cjs +712 -0
- package/dist/persistence-DrKQZNCv.d.mts +85 -0
- package/dist/persistence-DrKQZNCv.d.mts.map +1 -0
- package/dist/plugin-CM1TSv1B.cjs +159 -0
- package/dist/plugin-CSVnrdpE.cjs +146 -0
- package/dist/plugin-CSe5f2cD.d.cts +155 -0
- package/dist/plugin-CSe5f2cD.d.cts.map +1 -0
- package/dist/plugin-DMbVjdcQ.d.mts +155 -0
- package/dist/plugin-DMbVjdcQ.d.mts.map +1 -0
- package/dist/plugin-Vyvy9w9Z.mjs +141 -0
- package/dist/plugin-Vyvy9w9Z.mjs.map +1 -0
- package/dist/plugin-eBjQJP6x.mjs +130 -0
- package/dist/plugin-eBjQJP6x.mjs.map +1 -0
- package/dist/reflect-Dm8a3c29.d.cts +47 -0
- package/dist/reflect-Dm8a3c29.d.cts.map +1 -0
- package/dist/reflect-Dpz8ifa0.d.mts +47 -0
- package/dist/reflect-Dpz8ifa0.d.mts.map +1 -0
- package/dist/runtime-BDzzR4wH.d.cts +792 -0
- package/dist/runtime-BDzzR4wH.d.cts.map +1 -0
- package/dist/runtime-C5ukCv3P.mjs +242 -0
- package/dist/runtime-C5ukCv3P.mjs.map +1 -0
- package/dist/runtime-g0TEIoZK.cjs +253 -0
- package/dist/runtime-lYSIZdMn.d.mts +792 -0
- package/dist/runtime-lYSIZdMn.d.mts.map +1 -0
- package/dist/source-file-env-4Vdtzc5-.cjs +68 -0
- package/dist/source-file-env-Brfopjyr.d.cts +9 -0
- package/dist/source-file-env-Brfopjyr.d.cts.map +1 -0
- package/dist/source-file-env-DWejSP2U.d.mts +9 -0
- package/dist/source-file-env-DWejSP2U.d.mts.map +1 -0
- package/dist/source-file-env-Tj-6qobx.mjs +57 -0
- package/dist/source-file-env-Tj-6qobx.mjs.map +1 -0
- package/dist/template-helpers-1SKodHKt.d.mts +16 -0
- package/dist/template-helpers-1SKodHKt.d.mts.map +1 -0
- package/dist/template-helpers-CCEjhw1B.mjs +70 -0
- package/dist/template-helpers-CCEjhw1B.mjs.map +1 -0
- package/dist/template-helpers-YVcwxmoF.cjs +75 -0
- package/dist/template-helpers-zyitPfMz.d.cts +16 -0
- package/dist/template-helpers-zyitPfMz.d.cts.map +1 -0
- package/dist/toml-DvrxV201.cjs +657 -0
- package/dist/toml-uuOYvEAO.mjs +658 -0
- package/dist/toml-uuOYvEAO.mjs.map +1 -0
- package/dist/types/index.cjs +10 -9
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.mts +3 -2
- package/dist/types/index.mjs +3 -2
- package/dist/types/plugin.cjs +7 -133
- package/dist/types/plugin.d.cts +2 -153
- package/dist/types/plugin.d.mts +2 -153
- package/dist/types/plugin.mjs +2 -127
- package/dist/types/runtime.cjs +3 -242
- package/dist/types/runtime.d.cts +1 -790
- package/dist/types/runtime.d.mts +1 -790
- package/dist/types/runtime.mjs +1 -239
- package/dist/types-DyPQho_C.mjs +1 -0
- package/dist/types-o3zWarRp.cjs +0 -0
- package/dist/yaml-CIn2Gddw.mjs +1055 -0
- package/dist/yaml-CIn2Gddw.mjs.map +1 -0
- package/dist/yaml-CQSFMRMS.cjs +1054 -0
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -1,40 +1,199 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
require('./types
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
require('./
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
require('./
|
|
18
|
-
const
|
|
19
|
-
require('./
|
|
2
|
+
const require_chunk = require('./chunk-CNVrAnJR.cjs');
|
|
3
|
+
const require_runtime = require('./runtime-g0TEIoZK.cjs');
|
|
4
|
+
const require_plugin = require('./plugin-CM1TSv1B.cjs');
|
|
5
|
+
require('./types-o3zWarRp.cjs');
|
|
6
|
+
const require_join_paths = require('./join-paths-Bc4rM2TX.cjs');
|
|
7
|
+
const require_persistence = require('./persistence-D_clXRxP.cjs');
|
|
8
|
+
const require_template_helpers = require('./template-helpers-YVcwxmoF.cjs');
|
|
9
|
+
const require_source_file_env = require('./source-file-env-4Vdtzc5-.cjs');
|
|
10
|
+
const require_defu = require('./defu-CrqNIh1A.cjs');
|
|
11
|
+
const require_load = require('./load-DPB0maqs.cjs');
|
|
12
|
+
require('./confbox.DA7CpUDY-r6FXRsI6.cjs');
|
|
13
|
+
require('./confbox.DnMsyigM-C13n3X-S.cjs');
|
|
14
|
+
const require_create_reflection_resource = require('./create-reflection-resource-BJj83ii4.cjs');
|
|
15
|
+
require('./helpers-DgYP3uej.cjs');
|
|
16
|
+
const require_docs_helper = require('./docs-helper-4MoQ5-R3.cjs');
|
|
17
|
+
const require_automd_generator = require('./automd-generator-BNg74tyV.cjs');
|
|
18
|
+
const require_docs = require('./docs-B-SDRHeg.cjs');
|
|
19
|
+
const require_env = require('./env-R63eR4RP.cjs');
|
|
20
|
+
require('./components-BUo6Koax.cjs');
|
|
21
|
+
const require_plugin$1 = require('./plugin-CSVnrdpE.cjs');
|
|
22
|
+
require('./babel-BZqmdVF4.cjs');
|
|
20
23
|
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
21
|
-
let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
22
24
|
let __stryke_env_types = require("@stryke/env/types");
|
|
23
|
-
let defu = require("defu");
|
|
24
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
25
|
-
let __stryke_path_join = require("@stryke/path/join");
|
|
26
25
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
27
26
|
let __powerlines_plugin_alloy = require("@powerlines/plugin-alloy");
|
|
28
|
-
__powerlines_plugin_alloy =
|
|
27
|
+
__powerlines_plugin_alloy = require_chunk.__toESM(__powerlines_plugin_alloy);
|
|
29
28
|
let __powerlines_plugin_automd = require("@powerlines/plugin-automd");
|
|
30
|
-
__powerlines_plugin_automd =
|
|
29
|
+
__powerlines_plugin_automd = require_chunk.__toESM(__powerlines_plugin_automd);
|
|
31
30
|
let __powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
32
|
-
__powerlines_plugin_babel =
|
|
33
|
-
let __stryke_convert_parse_type_definition = require("@stryke/convert/parse-type-definition");
|
|
34
|
-
let __stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
31
|
+
__powerlines_plugin_babel = require_chunk.__toESM(__powerlines_plugin_babel);
|
|
35
32
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
36
33
|
let __stryke_string_format_constant_case = require("@stryke/string-format/constant-case");
|
|
37
34
|
|
|
35
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs
|
|
36
|
+
/**
|
|
37
|
+
* Gets the `toStringTag` of `obj`.
|
|
38
|
+
*
|
|
39
|
+
* @param value - The obj to query.
|
|
40
|
+
* @returns Returns the `toStringTag`.
|
|
41
|
+
*/
|
|
42
|
+
const getObjectTag = (value) => {
|
|
43
|
+
if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
|
|
44
|
+
return Object.prototype.toString.call(value);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs
|
|
49
|
+
/**
|
|
50
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
51
|
+
* and has a `typeof` result of "object".
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* isObjectLike({})
|
|
56
|
+
* // => true
|
|
57
|
+
*
|
|
58
|
+
* isObjectLike([1, 2, 3])
|
|
59
|
+
* // => true
|
|
60
|
+
*
|
|
61
|
+
* isObjectLike(Function)
|
|
62
|
+
* // => false
|
|
63
|
+
*
|
|
64
|
+
* isObjectLike(null)
|
|
65
|
+
* // => false
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param value - The value to check.
|
|
69
|
+
* @returns Returns `true` if `value` is object-like, else `false`.
|
|
70
|
+
*/
|
|
71
|
+
const isObjectLike = (obj) => {
|
|
72
|
+
return typeof obj === "object" && obj !== null;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Checks if `obj` is a plain object, that is, an object created by the `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* function Foo() {
|
|
80
|
+
* this.a = 1
|
|
81
|
+
* }
|
|
82
|
+
*
|
|
83
|
+
* isPlainObject(new Foo)
|
|
84
|
+
* // => false
|
|
85
|
+
*
|
|
86
|
+
* isPlainObject([1, 2, 3])
|
|
87
|
+
* // => false
|
|
88
|
+
*
|
|
89
|
+
* isPlainObject({ 'x': 0, 'y': 0 })
|
|
90
|
+
* // => true
|
|
91
|
+
*
|
|
92
|
+
* isPlainObject(Object.create(null))
|
|
93
|
+
* // => true
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @param obj - The value to check.
|
|
97
|
+
* @returns Returns `true` if `obj` is a plain object, else `false`.
|
|
98
|
+
*/
|
|
99
|
+
const isPlainObject = (obj) => {
|
|
100
|
+
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") return false;
|
|
101
|
+
if (Object.getPrototypeOf(obj) === null) return true;
|
|
102
|
+
let proto = obj;
|
|
103
|
+
while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
|
|
104
|
+
return Object.getPrototypeOf(obj) === proto;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs
|
|
109
|
+
/**
|
|
110
|
+
* Check if the provided value's type is `Object`
|
|
111
|
+
*
|
|
112
|
+
* @param value - The value to type check
|
|
113
|
+
* @returns An indicator specifying if the value provided is of type `Object`
|
|
114
|
+
*/
|
|
115
|
+
const isObject = (value) => {
|
|
116
|
+
try {
|
|
117
|
+
return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject(value);
|
|
118
|
+
} catch {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs
|
|
125
|
+
const isString = (value) => {
|
|
126
|
+
try {
|
|
127
|
+
return typeof value === "string";
|
|
128
|
+
} catch {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs
|
|
135
|
+
const isBufferExists = typeof Buffer !== "undefined";
|
|
136
|
+
isBufferExists && Buffer.isBuffer.bind(Buffer);
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs
|
|
140
|
+
((Obj) => {
|
|
141
|
+
if (typeof globalThis === "object") return globalThis;
|
|
142
|
+
Object.defineProperty(Obj, "typeDetectGlobalObject", {
|
|
143
|
+
get() {
|
|
144
|
+
return this;
|
|
145
|
+
},
|
|
146
|
+
configurable: true
|
|
147
|
+
});
|
|
148
|
+
return globalThis;
|
|
149
|
+
})(Object.prototype);
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/parse-type-definition.mjs
|
|
153
|
+
/**
|
|
154
|
+
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
155
|
+
*
|
|
156
|
+
* @param param - The parameter to parse
|
|
157
|
+
* @returns The parsed type definition
|
|
158
|
+
*/
|
|
159
|
+
const parseTypeDefinition = (param) => {
|
|
160
|
+
if (isString(param)) {
|
|
161
|
+
if (param.includes(":")) {
|
|
162
|
+
const params = param.split(":");
|
|
163
|
+
if (params.length > 1 && params[0]) return {
|
|
164
|
+
file: params[0],
|
|
165
|
+
name: params[1]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (param.includes("#")) {
|
|
169
|
+
const params = param.split("#");
|
|
170
|
+
if (params.length > 1 && params[0]) return {
|
|
171
|
+
file: params[0],
|
|
172
|
+
name: params[1]
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
return { file: param };
|
|
176
|
+
}
|
|
177
|
+
if (isObject(param)) return {
|
|
178
|
+
file: param.file,
|
|
179
|
+
name: param.name
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.37/node_modules/@stryke/convert/dist/to-array.mjs
|
|
185
|
+
/**
|
|
186
|
+
* Convert `Arrayable<T>` to `Array<T>`
|
|
187
|
+
*
|
|
188
|
+
* @param array - The `Arrayable<T>` to convert
|
|
189
|
+
* @returns An `Array<T>` containing the elements of the input
|
|
190
|
+
*/
|
|
191
|
+
function toArray(array) {
|
|
192
|
+
array = array ?? [];
|
|
193
|
+
return Array.isArray(array) ? array : [array];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
38
197
|
//#region src/index.tsx
|
|
39
198
|
/**
|
|
40
199
|
* A Powerlines plugin to inject environment variables into the source code.
|
|
@@ -48,24 +207,24 @@ const plugin = (options = {}) => {
|
|
|
48
207
|
async config() {
|
|
49
208
|
this.debug("Providing default configuration for the Powerlines `env` build plugin.");
|
|
50
209
|
const config = {
|
|
51
|
-
env:
|
|
210
|
+
env: require_defu.defu(options, {
|
|
52
211
|
types: {},
|
|
53
212
|
prefix: []
|
|
54
213
|
}),
|
|
55
|
-
transform: { babel: { plugins: [
|
|
214
|
+
transform: { babel: { plugins: [require_plugin$1.envBabelPlugin] } }
|
|
56
215
|
};
|
|
57
|
-
if (config.env.types) config.env.types =
|
|
216
|
+
if (config.env.types) config.env.types = parseTypeDefinition(config.env.types);
|
|
58
217
|
else {
|
|
59
218
|
this.warn("The `env.types` configuration parameter was not provided. Please ensure this is expected.");
|
|
60
|
-
const envDefaultTypeDefinition = await
|
|
61
|
-
config.env.types =
|
|
219
|
+
const envDefaultTypeDefinition = await require_persistence.getEnvDefaultTypeDefinition(this);
|
|
220
|
+
config.env.types = parseTypeDefinition(`${envDefaultTypeDefinition.file}#${envDefaultTypeDefinition.name}`);
|
|
62
221
|
}
|
|
63
|
-
if (config.env.secrets) config.env.secrets =
|
|
222
|
+
if (config.env.secrets) config.env.secrets = parseTypeDefinition(config.env.secrets);
|
|
64
223
|
else {
|
|
65
|
-
const secretsDefaultTypeDefinition = await
|
|
66
|
-
config.env.secrets =
|
|
224
|
+
const secretsDefaultTypeDefinition = await require_persistence.getSecretsDefaultTypeDefinition(this);
|
|
225
|
+
config.env.secrets = parseTypeDefinition(`${secretsDefaultTypeDefinition.file}#${secretsDefaultTypeDefinition.name}`);
|
|
67
226
|
}
|
|
68
|
-
config.env.prefix =
|
|
227
|
+
config.env.prefix = toArray(config.env.prefix ?? []).reduce((ret, prefix) => {
|
|
69
228
|
const formattedPrefix = (0, __stryke_string_format_constant_case.constantCase)(prefix);
|
|
70
229
|
if (!ret.includes(formattedPrefix)) ret.push(formattedPrefix);
|
|
71
230
|
return ret;
|
|
@@ -74,7 +233,7 @@ const plugin = (options = {}) => {
|
|
|
74
233
|
"POWERLINES_",
|
|
75
234
|
this.config.framework && this.config.framework !== "powerlines" && `${(0, __stryke_string_format_constant_case.constantCase)(this.config.framework)}_`
|
|
76
235
|
].filter(Boolean));
|
|
77
|
-
config.env.prefix =
|
|
236
|
+
config.env.prefix = toArray(config.env.prefix).reduce((ret, prefix) => {
|
|
78
237
|
if (!ret.includes(prefix.replace(/_$/g, ""))) ret.push(prefix.replace(/_$/g, ""));
|
|
79
238
|
return ret;
|
|
80
239
|
}, []);
|
|
@@ -82,7 +241,7 @@ const plugin = (options = {}) => {
|
|
|
82
241
|
},
|
|
83
242
|
async configResolved() {
|
|
84
243
|
this.debug(`Environment plugin configuration has been resolved for the Powerlines project.`);
|
|
85
|
-
this.env =
|
|
244
|
+
this.env = require_defu.defu({ parsed: await require_load.loadEnv(this, this.config.env) }, this.env ?? {}, {
|
|
86
245
|
types: { env: {} },
|
|
87
246
|
used: {
|
|
88
247
|
env: {},
|
|
@@ -91,23 +250,23 @@ const plugin = (options = {}) => {
|
|
|
91
250
|
parsed: {},
|
|
92
251
|
injected: {}
|
|
93
252
|
});
|
|
94
|
-
if (this.config.command !== "prepare" && !this.config.skipCache && this.persistedMeta?.checksum === this.meta.checksum && (0, __stryke_fs_exists.existsSync)(
|
|
253
|
+
if (this.config.command !== "prepare" && !this.config.skipCache && this.persistedMeta?.checksum === this.meta.checksum && (0, __stryke_fs_exists.existsSync)(require_persistence.getEnvTypeReflectionsPath(this, "env"))) {
|
|
95
254
|
this.debug(`Skipping reflection initialization as the meta checksum has not changed.`);
|
|
96
|
-
this.env.types.env = await
|
|
97
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
98
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
99
|
-
if ((0, __stryke_fs_exists.existsSync)(
|
|
255
|
+
this.env.types.env = await require_persistence.readEnvTypeReflection(this, "env");
|
|
256
|
+
if ((0, __stryke_fs_exists.existsSync)(require_persistence.getEnvReflectionsPath(this, "env"))) this.env.used.env = await require_persistence.readEnvReflection(this);
|
|
257
|
+
if ((0, __stryke_fs_exists.existsSync)(require_persistence.getEnvTypeReflectionsPath(this, "secrets"))) this.env.types.secrets = await require_persistence.readEnvTypeReflection(this, "secrets");
|
|
258
|
+
if ((0, __stryke_fs_exists.existsSync)(require_persistence.getEnvReflectionsPath(this, "secrets"))) this.env.used.secrets = await require_persistence.readSecretsReflection(this);
|
|
100
259
|
} else {
|
|
101
260
|
this.debug(`Starting environment configuration reflection initialization.`);
|
|
102
|
-
this.env.types.env = await
|
|
261
|
+
this.env.types.env = await require_persistence.reflectEnv(this, this.config.env.types?.file ? require_persistence.isParentPath(this.config.env.types?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.types?.file : require_join_paths.joinPaths(this.config.projectRoot, this.config.env.types?.file) : void 0, this.config.env.types?.name);
|
|
103
262
|
if (!this.env.types.env) throw new Error("Failed to find the environment configuration type reflection in the context.");
|
|
104
|
-
await
|
|
105
|
-
this.env.types.secrets = await
|
|
263
|
+
await require_persistence.writeEnvTypeReflection(this, this.env.types.env, "env");
|
|
264
|
+
this.env.types.secrets = await require_persistence.reflectSecrets(this, this.config.env.secrets?.file ? require_persistence.isParentPath(this.config.env.secrets?.file, this.workspaceConfig.workspaceRoot) ? this.config.env.secrets?.file : require_join_paths.joinPaths(this.config.projectRoot, this.config.env.secrets?.file) : void 0, this.config.env.secrets?.name);
|
|
106
265
|
if (!this.env.types.secrets) throw new Error("Failed to find the secrets configuration type reflection in the context.");
|
|
107
|
-
await
|
|
266
|
+
await require_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
|
|
108
267
|
this.debug(`Resolved ${this.env.types.env.getProperties().length ?? 0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length ?? 0} secret configuration parameters`);
|
|
109
268
|
const envWithAlias = this.env.types.env.getProperties().filter((prop) => prop.getAlias().length > 0);
|
|
110
|
-
Object.entries(await
|
|
269
|
+
Object.entries(await require_load.loadEnv(this, this.config.env)).forEach(([key, value]) => {
|
|
111
270
|
const unprefixedKey = this.config.env.prefix.reduce((ret, prefix) => {
|
|
112
271
|
if (key.replace(/_$/g, "").startsWith(prefix)) return key.replace(/_$/g, "").slice(prefix.length);
|
|
113
272
|
return ret;
|
|
@@ -121,23 +280,23 @@ const plugin = (options = {}) => {
|
|
|
121
280
|
description: `An object containing the environment configuration parameters used by the ${this.config.name ? `${this.config.name} application` : "application"}.`,
|
|
122
281
|
types: []
|
|
123
282
|
}, this.env.types.env);
|
|
124
|
-
await
|
|
283
|
+
await require_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
125
284
|
if (this.env.types.secrets) {
|
|
126
|
-
await
|
|
285
|
+
await require_persistence.writeEnvTypeReflection(this, this.env.types.secrets, "secrets");
|
|
127
286
|
this.env.used.secrets = new __powerlines_deepkit_vendor_type.ReflectionClass({
|
|
128
287
|
kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
|
|
129
288
|
typeName: "Secrets",
|
|
130
289
|
description: `An object containing the secret configuration parameters used by the ${this.config.name ? `${this.config.name} application` : "application"}.`,
|
|
131
290
|
types: []
|
|
132
291
|
}, this.env.types.secrets);
|
|
133
|
-
await
|
|
292
|
+
await require_persistence.writeEnvReflection(this, this.env.used.secrets, "secrets");
|
|
134
293
|
}
|
|
135
294
|
}
|
|
136
295
|
},
|
|
137
296
|
async prepare() {
|
|
138
297
|
const _self$ = this;
|
|
139
298
|
this.debug(`Preparing the Environment runtime artifacts for the Powerlines project.`);
|
|
140
|
-
return this.render((0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
299
|
+
return this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_env.EnvBuiltin, { get defaultConfig() {
|
|
141
300
|
return _self$.config.env.defaultConfig;
|
|
142
301
|
} }));
|
|
143
302
|
},
|
|
@@ -145,29 +304,29 @@ const plugin = (options = {}) => {
|
|
|
145
304
|
order: "post",
|
|
146
305
|
async handler() {
|
|
147
306
|
if (this.env.used.env.getProperties().length > 0) {
|
|
148
|
-
this.trace(`Persisting used environment configuration reflections to ${
|
|
149
|
-
await
|
|
307
|
+
this.trace(`Persisting used environment configuration reflections to ${require_persistence.getEnvReflectionsPath(this, "env")}.`);
|
|
308
|
+
await require_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
150
309
|
}
|
|
151
310
|
if (this.env.used.secrets.getProperties().length > 0) {
|
|
152
|
-
this.trace(`Persisting used secret configuration reflections to ${
|
|
153
|
-
await
|
|
311
|
+
this.trace(`Persisting used secret configuration reflections to ${require_persistence.getEnvReflectionsPath(this, "secrets")}.`);
|
|
312
|
+
await require_persistence.writeEnvReflection(this, this.env.used.secrets, "secrets");
|
|
154
313
|
}
|
|
155
314
|
}
|
|
156
315
|
},
|
|
157
316
|
async docs() {
|
|
158
|
-
this.debug(`Documenting environment variables configuration values in "${
|
|
159
|
-
return this.render((0, __alloy_js_core_jsx_runtime.createComponent)(
|
|
317
|
+
this.debug(`Documenting environment variables configuration values in "${require_join_paths.joinPaths(require_docs_helper.getDocsOutputPath(this), "env.md")}"`);
|
|
318
|
+
return this.render((0, __alloy_js_core_jsx_runtime.createComponent)(require_docs.EnvDocsFile, { levelOffset: 0 }));
|
|
160
319
|
},
|
|
161
320
|
async buildEnd() {
|
|
162
|
-
const reflectionPath =
|
|
321
|
+
const reflectionPath = require_persistence.getEnvReflectionsPath(this, "env");
|
|
163
322
|
this.debug(`Writing env reflection types to ${reflectionPath}.`);
|
|
164
|
-
await
|
|
323
|
+
await require_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
165
324
|
}
|
|
166
325
|
},
|
|
167
326
|
{
|
|
168
327
|
name: "env:automd-generator",
|
|
169
328
|
config() {
|
|
170
|
-
return { automd:
|
|
329
|
+
return { automd: require_defu.defu(options.automd ?? {}, { generators: { "env": require_automd_generator.env(this) } }) };
|
|
171
330
|
}
|
|
172
331
|
},
|
|
173
332
|
{
|
|
@@ -182,42 +341,42 @@ const plugin = (options = {}) => {
|
|
|
182
341
|
var src_default = plugin;
|
|
183
342
|
|
|
184
343
|
//#endregion
|
|
185
|
-
exports.BaseEnv =
|
|
186
|
-
exports.BaseSecrets =
|
|
187
|
-
exports.EnvBuiltin =
|
|
188
|
-
exports.EnvDocsFile =
|
|
189
|
-
exports.EnvTypeDefinition =
|
|
190
|
-
exports.__ΩCreateEnvReflectionOptions =
|
|
191
|
-
exports.__ΩEnvInterface =
|
|
192
|
-
exports.__ΩEnvPluginContext =
|
|
193
|
-
exports.__ΩEnvPluginOptions =
|
|
194
|
-
exports.__ΩEnvPluginResolvedConfig =
|
|
195
|
-
exports.__ΩEnvPluginUserConfig =
|
|
196
|
-
exports.__ΩEnvType =
|
|
197
|
-
exports.__ΩSecretsInterface =
|
|
198
|
-
exports.createEnvReflection =
|
|
199
|
-
exports.createReflectionResource =
|
|
200
|
-
exports.createSecretsReflection =
|
|
201
|
-
exports.createTemplateReflection =
|
|
344
|
+
exports.BaseEnv = require_persistence.BaseEnv;
|
|
345
|
+
exports.BaseSecrets = require_persistence.BaseSecrets;
|
|
346
|
+
exports.EnvBuiltin = require_env.EnvBuiltin;
|
|
347
|
+
exports.EnvDocsFile = require_docs.EnvDocsFile;
|
|
348
|
+
exports.EnvTypeDefinition = require_env.EnvTypeDefinition;
|
|
349
|
+
exports.__ΩCreateEnvReflectionOptions = require_persistence.__ΩCreateEnvReflectionOptions;
|
|
350
|
+
exports.__ΩEnvInterface = require_runtime.__ΩEnvInterface;
|
|
351
|
+
exports.__ΩEnvPluginContext = require_plugin.__ΩEnvPluginContext;
|
|
352
|
+
exports.__ΩEnvPluginOptions = require_plugin.__ΩEnvPluginOptions;
|
|
353
|
+
exports.__ΩEnvPluginResolvedConfig = require_plugin.__ΩEnvPluginResolvedConfig;
|
|
354
|
+
exports.__ΩEnvPluginUserConfig = require_plugin.__ΩEnvPluginUserConfig;
|
|
355
|
+
exports.__ΩEnvType = require_plugin.__ΩEnvType;
|
|
356
|
+
exports.__ΩSecretsInterface = require_runtime.__ΩSecretsInterface;
|
|
357
|
+
exports.createEnvReflection = require_persistence.createEnvReflection;
|
|
358
|
+
exports.createReflectionResource = require_create_reflection_resource.createReflectionResource;
|
|
359
|
+
exports.createSecretsReflection = require_persistence.createSecretsReflection;
|
|
360
|
+
exports.createTemplateReflection = require_template_helpers.createTemplateReflection;
|
|
202
361
|
exports.default = src_default;
|
|
203
|
-
exports.envBabelPlugin =
|
|
204
|
-
exports.formatEnvField =
|
|
205
|
-
exports.getEnvDefaultTypeDefinition =
|
|
206
|
-
exports.getEnvReflectionsPath =
|
|
207
|
-
exports.getEnvTypeReflectionsPath =
|
|
208
|
-
exports.getSecretsDefaultTypeDefinition =
|
|
209
|
-
exports.loadEnv =
|
|
210
|
-
exports.loadEnvFromContext =
|
|
211
|
-
exports.mergeEnvReflections =
|
|
212
|
-
exports.mergeSecretsReflections =
|
|
362
|
+
exports.envBabelPlugin = require_plugin$1.envBabelPlugin;
|
|
363
|
+
exports.formatEnvField = require_source_file_env.formatEnvField;
|
|
364
|
+
exports.getEnvDefaultTypeDefinition = require_persistence.getEnvDefaultTypeDefinition;
|
|
365
|
+
exports.getEnvReflectionsPath = require_persistence.getEnvReflectionsPath;
|
|
366
|
+
exports.getEnvTypeReflectionsPath = require_persistence.getEnvTypeReflectionsPath;
|
|
367
|
+
exports.getSecretsDefaultTypeDefinition = require_persistence.getSecretsDefaultTypeDefinition;
|
|
368
|
+
exports.loadEnv = require_load.loadEnv;
|
|
369
|
+
exports.loadEnvFromContext = require_load.loadEnvFromContext;
|
|
370
|
+
exports.mergeEnvReflections = require_persistence.mergeEnvReflections;
|
|
371
|
+
exports.mergeSecretsReflections = require_persistence.mergeSecretsReflections;
|
|
213
372
|
exports.plugin = plugin;
|
|
214
|
-
exports.readEnvReflection =
|
|
215
|
-
exports.readEnvTypeReflection =
|
|
216
|
-
exports.readSecretsReflection =
|
|
217
|
-
exports.reflectEnv =
|
|
218
|
-
exports.reflectSecrets =
|
|
219
|
-
exports.removeEnvPrefix =
|
|
220
|
-
exports.resolveRuntimeTypeFile =
|
|
221
|
-
exports.writeEnvReflection =
|
|
222
|
-
exports.writeEnvReflectionSync =
|
|
223
|
-
exports.writeEnvTypeReflection =
|
|
373
|
+
exports.readEnvReflection = require_persistence.readEnvReflection;
|
|
374
|
+
exports.readEnvTypeReflection = require_persistence.readEnvTypeReflection;
|
|
375
|
+
exports.readSecretsReflection = require_persistence.readSecretsReflection;
|
|
376
|
+
exports.reflectEnv = require_persistence.reflectEnv;
|
|
377
|
+
exports.reflectSecrets = require_persistence.reflectSecrets;
|
|
378
|
+
exports.removeEnvPrefix = require_source_file_env.removeEnvPrefix;
|
|
379
|
+
exports.resolveRuntimeTypeFile = require_persistence.resolveRuntimeTypeFile;
|
|
380
|
+
exports.writeEnvReflection = require_persistence.writeEnvReflection;
|
|
381
|
+
exports.writeEnvReflectionSync = require_persistence.writeEnvReflectionSync;
|
|
382
|
+
exports.writeEnvTypeReflection = require_persistence.writeEnvTypeReflection;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import { createReflectionResource } from "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { createTemplateReflection } from "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import { envBabelPlugin } from "./
|
|
15
|
-
import "./babel/index.cjs";
|
|
16
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
17
|
-
|
|
18
|
-
//#region src/index.d.ts
|
|
19
|
-
/**
|
|
20
|
-
* A Powerlines plugin to inject environment variables into the source code.
|
|
21
|
-
*/
|
|
22
|
-
declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
|
|
23
|
-
//#endregion
|
|
1
|
+
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-BDzzR4wH.cjs";
|
|
2
|
+
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-CSe5f2cD.cjs";
|
|
3
|
+
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-DMfzQuvP.cjs";
|
|
4
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-BIyd8CTA.cjs";
|
|
5
|
+
import "./index-uTS5iDq_.cjs";
|
|
6
|
+
import { t as createReflectionResource } from "./create-reflection-resource-DSLbLsX2.cjs";
|
|
7
|
+
import { n as loadEnvFromContext, t as loadEnv } from "./load-PHGmxX_X.cjs";
|
|
8
|
+
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "./persistence-BR4cUaN6.cjs";
|
|
9
|
+
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "./reflect-Dm8a3c29.cjs";
|
|
10
|
+
import { n as removeEnvPrefix, t as formatEnvField } from "./source-file-env-Brfopjyr.cjs";
|
|
11
|
+
import { t as createTemplateReflection } from "./template-helpers-zyitPfMz.cjs";
|
|
12
|
+
import "./index-CEDY7cmG.cjs";
|
|
13
|
+
import "./index-DSiHnMH2.cjs";
|
|
14
|
+
import { n as plugin, t as envBabelPlugin } from "./index-Bdi8CvaN.cjs";
|
|
24
15
|
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection, createReflectionResource, createSecretsReflection, createTemplateReflection, plugin as default, plugin, envBabelPlugin, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import { createReflectionResource } from "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { createTemplateReflection } from "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import { envBabelPlugin } from "./
|
|
15
|
-
import "./babel/index.mjs";
|
|
16
|
-
import { Plugin } from "powerlines/types/plugin";
|
|
17
|
-
|
|
18
|
-
//#region src/index.d.ts
|
|
19
|
-
/**
|
|
20
|
-
* A Powerlines plugin to inject environment variables into the source code.
|
|
21
|
-
*/
|
|
22
|
-
declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
|
|
23
|
-
//#endregion
|
|
1
|
+
import { i as __ΩSecretsInterface, n as SecretsInterface, r as __ΩEnvInterface, t as EnvInterface } from "./runtime-lYSIZdMn.mjs";
|
|
2
|
+
import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "./plugin-DMbVjdcQ.mjs";
|
|
3
|
+
import { n as EnvDocsFileProps, r as __ΩEnvDocsFileProps, t as EnvDocsFile } from "./docs-B0d8pdIg.mjs";
|
|
4
|
+
import { i as __ΩEnvBuiltinProps, n as EnvBuiltinProps, r as EnvTypeDefinition, t as EnvBuiltin } from "./env-BKmI7DyR.mjs";
|
|
5
|
+
import "./index-BNRXMhlr.mjs";
|
|
6
|
+
import { t as createReflectionResource } from "./create-reflection-resource-DwWJAo-G.mjs";
|
|
7
|
+
import { n as loadEnvFromContext, t as loadEnv } from "./load-GpP6cojj.mjs";
|
|
8
|
+
import { a as readEnvReflection, c as resolveRuntimeTypeFile, d as writeEnvTypeReflection, i as getSecretsDefaultTypeDefinition, l as writeEnvReflection, n as getEnvReflectionsPath, o as readEnvTypeReflection, r as getEnvTypeReflectionsPath, s as readSecretsReflection, t as getEnvDefaultTypeDefinition, u as writeEnvReflectionSync } from "./persistence-DrKQZNCv.mjs";
|
|
9
|
+
import { a as createEnvReflection, c as mergeSecretsReflections, i as __ΩCreateEnvReflectionOptions, l as reflectEnv, n as BaseSecrets, o as createSecretsReflection, r as CreateEnvReflectionOptions, s as mergeEnvReflections, t as BaseEnv, u as reflectSecrets } from "./reflect-Dpz8ifa0.mjs";
|
|
10
|
+
import { n as removeEnvPrefix, t as formatEnvField } from "./source-file-env-DWejSP2U.mjs";
|
|
11
|
+
import { t as createTemplateReflection } from "./template-helpers-1SKodHKt.mjs";
|
|
12
|
+
import "./index-dhjtMp5F.mjs";
|
|
13
|
+
import "./index-CREkvfw9.mjs";
|
|
14
|
+
import { n as plugin, t as envBabelPlugin } from "./index-Drhzdkqe.mjs";
|
|
24
15
|
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, EnvBuiltin, EnvBuiltinProps, EnvDocsFile, EnvDocsFileProps, EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, EnvTypeDefinition, SecretsInterface, __ΩCreateEnvReflectionOptions, __ΩEnvBuiltinProps, __ΩEnvDocsFileProps, __ΩEnvInterface, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType, __ΩSecretsInterface, createEnvReflection, createReflectionResource, createSecretsReflection, createTemplateReflection, plugin as default, plugin, envBabelPlugin, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
|