@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-lYSIZdMn.d.mts","names":[],"sources":["../src/types/runtime.ts"],"sourcesContent":[],"mappings":";;AA6BA;AA81BA;;;;;;;;;UA91BiB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA81BA,gBAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CNVrAnJR.cjs');
|
|
2
|
+
let __stryke_env_types = require("@stryke/env/types");
|
|
3
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
4
|
+
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/source-file-env.ts
|
|
7
|
+
function __assignType(fn, args) {
|
|
8
|
+
fn.__type = args;
|
|
9
|
+
return fn;
|
|
10
|
+
}
|
|
11
|
+
const __ΩTReturned = [
|
|
12
|
+
"TEnv",
|
|
13
|
+
"TReturned",
|
|
14
|
+
"l2&R!RPe#!&qk#%QRb!Pde\"!p'w\"y"
|
|
15
|
+
];
|
|
16
|
+
function removeEnvPrefix(env) {
|
|
17
|
+
if ((0, __stryke_type_checks_is_string.isString)(env)) {
|
|
18
|
+
let name = __stryke_env_types.ENV_PREFIXES.reduce(__assignType((ret, prefix) => {
|
|
19
|
+
if (ret.startsWith(prefix)) ret = ret.slice(prefix.length);
|
|
20
|
+
return ret;
|
|
21
|
+
}, [
|
|
22
|
+
"ret",
|
|
23
|
+
"prefix",
|
|
24
|
+
"",
|
|
25
|
+
"P\"2!\"2\"\"/#"
|
|
26
|
+
]), env.toUpperCase());
|
|
27
|
+
while (name.startsWith("_")) name = name.slice(1);
|
|
28
|
+
return name;
|
|
29
|
+
}
|
|
30
|
+
return Object.keys(env).reduce(__assignType((ret, key) => {
|
|
31
|
+
const name = removeEnvPrefix(key);
|
|
32
|
+
if (name) ret[name] = env[key];
|
|
33
|
+
return ret;
|
|
34
|
+
}, [
|
|
35
|
+
"ret",
|
|
36
|
+
"key",
|
|
37
|
+
"",
|
|
38
|
+
"P\"2!\"2\"\"/#"
|
|
39
|
+
]), {});
|
|
40
|
+
}
|
|
41
|
+
removeEnvPrefix.__type = [
|
|
42
|
+
"env",
|
|
43
|
+
() => __ΩTReturned,
|
|
44
|
+
"removeEnvPrefix",
|
|
45
|
+
"P\"2!\"o\"\"/#"
|
|
46
|
+
];
|
|
47
|
+
function formatEnvField(key) {
|
|
48
|
+
return (0, __stryke_string_format_camel_case.camelCase)(removeEnvPrefix(key));
|
|
49
|
+
}
|
|
50
|
+
formatEnvField.__type = [
|
|
51
|
+
"key",
|
|
52
|
+
"formatEnvField",
|
|
53
|
+
"P&2!&/\""
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
Object.defineProperty(exports, 'formatEnvField', {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () {
|
|
60
|
+
return formatEnvField;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, 'removeEnvPrefix', {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () {
|
|
66
|
+
return removeEnvPrefix;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/source-file-env.d.ts
|
|
4
|
+
type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
|
|
5
|
+
declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
|
|
6
|
+
declare function formatEnvField(key: string): string;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { removeEnvPrefix as n, formatEnvField as t };
|
|
9
|
+
//# sourceMappingURL=source-file-env-Brfopjyr.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env-Brfopjyr.d.cts","names":[],"sources":["../src/helpers/source-file-env.ts"],"sourcesContent":[],"mappings":";;;KAuBK,kBAAkB,+BAA+B;iBAEtC,6BAA6B,iCACtC,OACJ,UAAU;AAJR,iBA+BW,cAAA,CA/BsC,GAAA,EAAA,MAAA,CAAA,EAAA,MAAiB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DotenvParseOutput } from "@stryke/env/types";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/source-file-env.d.ts
|
|
4
|
+
type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
|
|
5
|
+
declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
|
|
6
|
+
declare function formatEnvField(key: string): string;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { removeEnvPrefix as n, formatEnvField as t };
|
|
9
|
+
//# sourceMappingURL=source-file-env-DWejSP2U.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env-DWejSP2U.d.mts","names":[],"sources":["../src/helpers/source-file-env.ts"],"sourcesContent":[],"mappings":";;;KAuBK,kBAAkB,+BAA+B;iBAEtC,6BAA6B,iCACtC,OACJ,UAAU;AAJR,iBA+BW,cAAA,CA/BsC,GAAA,EAAA,MAAA,CAAA,EAAA,MAAiB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ENV_PREFIXES } from "@stryke/env/types";
|
|
2
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
3
|
+
import { isString } from "@stryke/type-checks/is-string";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/source-file-env.ts
|
|
6
|
+
function __assignType(fn, args) {
|
|
7
|
+
fn.__type = args;
|
|
8
|
+
return fn;
|
|
9
|
+
}
|
|
10
|
+
const __ΩTReturned = [
|
|
11
|
+
"TEnv",
|
|
12
|
+
"TReturned",
|
|
13
|
+
"l2&R!RPe#!&qk#%QRb!Pde\"!p'w\"y"
|
|
14
|
+
];
|
|
15
|
+
function removeEnvPrefix(env) {
|
|
16
|
+
if (isString(env)) {
|
|
17
|
+
let name = ENV_PREFIXES.reduce(__assignType((ret, prefix) => {
|
|
18
|
+
if (ret.startsWith(prefix)) ret = ret.slice(prefix.length);
|
|
19
|
+
return ret;
|
|
20
|
+
}, [
|
|
21
|
+
"ret",
|
|
22
|
+
"prefix",
|
|
23
|
+
"",
|
|
24
|
+
"P\"2!\"2\"\"/#"
|
|
25
|
+
]), env.toUpperCase());
|
|
26
|
+
while (name.startsWith("_")) name = name.slice(1);
|
|
27
|
+
return name;
|
|
28
|
+
}
|
|
29
|
+
return Object.keys(env).reduce(__assignType((ret, key) => {
|
|
30
|
+
const name = removeEnvPrefix(key);
|
|
31
|
+
if (name) ret[name] = env[key];
|
|
32
|
+
return ret;
|
|
33
|
+
}, [
|
|
34
|
+
"ret",
|
|
35
|
+
"key",
|
|
36
|
+
"",
|
|
37
|
+
"P\"2!\"2\"\"/#"
|
|
38
|
+
]), {});
|
|
39
|
+
}
|
|
40
|
+
removeEnvPrefix.__type = [
|
|
41
|
+
"env",
|
|
42
|
+
() => __ΩTReturned,
|
|
43
|
+
"removeEnvPrefix",
|
|
44
|
+
"P\"2!\"o\"\"/#"
|
|
45
|
+
];
|
|
46
|
+
function formatEnvField(key) {
|
|
47
|
+
return camelCase(removeEnvPrefix(key));
|
|
48
|
+
}
|
|
49
|
+
formatEnvField.__type = [
|
|
50
|
+
"key",
|
|
51
|
+
"formatEnvField",
|
|
52
|
+
"P&2!&/\""
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { removeEnvPrefix as n, formatEnvField as t };
|
|
57
|
+
//# sourceMappingURL=source-file-env-Tj-6qobx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env-Tj-6qobx.mjs","names":[],"sources":["../src/helpers/source-file-env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { ENV_PREFIXES } from \"@stryke/env/types\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { isString } from \"@stryke/type-checks/is-string\";\n\ntype TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;\n\nexport function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(\n env: TEnv\n): TReturned<TEnv> {\n if (isString(env)) {\n let name: string = ENV_PREFIXES.reduce((ret, prefix) => {\n if (ret.startsWith(prefix)) {\n ret = ret.slice(prefix.length);\n }\n\n return ret;\n }, env.toUpperCase());\n\n while (name.startsWith(\"_\")) {\n name = name.slice(1);\n }\n\n return name as TReturned<TEnv>;\n }\n\n return Object.keys(env).reduce((ret, key) => {\n const name = removeEnvPrefix(key);\n if (name) {\n (ret as DotenvParseOutput)[name] = env[key];\n }\n\n return ret;\n }, {} as TReturned<TEnv>);\n}\n\nexport function formatEnvField(key: string): string {\n return camelCase(removeEnvPrefix(key));\n}\n"],"mappings":";;;;;AAAA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;AAKX,MAAM,eAAe;CAAC;CAAQ;CAAa;CAAiC;;AAExE,KAAI,SAAS,IAAI,EAAE;EACf,IAAI,OAAO,aAAa,OAAO,cAAc,KAAK,WAAW;AACzD,OAAI,IAAI,WAAW,OAAO,CACtB,OAAM,IAAI,MAAM,OAAO,OAAO;AAElC,UAAO;;;;;;;AAEX,SAAO,KAAK,WAAW,IAAI;AAG3B,SAAO;;AAEX,QAAO,OAAO,KAAK,IAAI,CAAC,OAAO,cAAc,KAAK,QAAE;;AAEhD,MAAI;AAGJ,SAAE;IACH;EAAC;EAAO;EAAI;EAAA;EAAA,CAAA,EAAA,EAAA,CAAA;;AAEnB,gBAAgB,SAAS;CAAC;OAAa;CAAc;CAAO;CAAA;AAC5D,SAAgB,eAAe,KAAG;AAC9B,QAAO,UAAU,gBAAgB,IAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { a as EnvType, t as EnvPluginContext } from "./plugin-DMbVjdcQ.mjs";
|
|
2
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/template-helpers.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates the reflection data used when generating runtime template files.
|
|
8
|
+
*
|
|
9
|
+
* @param context - The context for the configuration plugin.
|
|
10
|
+
* @param name - The name of the configuration template.
|
|
11
|
+
* @returns The reflection for the specified configuration template.
|
|
12
|
+
*/
|
|
13
|
+
declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { createTemplateReflection as t };
|
|
16
|
+
//# sourceMappingURL=template-helpers-1SKodHKt.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-helpers-1SKodHKt.d.mts","names":[],"sources":["../src/helpers/template-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;AAGU,iBAHY,wBAAA,CAGZ,OAAA,EAFC,gBAED,EAAA,IAAA,CAAA,EADD,OACC,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA,GAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { a as __ΩEnvType, t as __ΩEnvPluginContext } from "./plugin-eBjQJP6x.mjs";
|
|
2
|
+
import { o as readEnvTypeReflection } from "./persistence-BsBxs9wt.mjs";
|
|
3
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/template-helpers.ts
|
|
7
|
+
function __assignType(fn, args) {
|
|
8
|
+
fn.__type = args;
|
|
9
|
+
return fn;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates the reflection data used when generating runtime template files.
|
|
13
|
+
*
|
|
14
|
+
* @param context - The context for the configuration plugin.
|
|
15
|
+
* @param name - The name of the configuration template.
|
|
16
|
+
* @returns The reflection for the specified configuration template.
|
|
17
|
+
*/
|
|
18
|
+
async function createTemplateReflection(context, name) {
|
|
19
|
+
const reflection = await readEnvTypeReflection(context, name);
|
|
20
|
+
reflection.getProperties().forEach(__assignType((prop) => {
|
|
21
|
+
prop.getAlias().filter(Boolean).forEach(__assignType((alias) => {
|
|
22
|
+
reflection.addProperty({
|
|
23
|
+
name: alias,
|
|
24
|
+
optional: prop.isOptional() ? true : void 0,
|
|
25
|
+
readonly: prop.isReadonly() ? true : void 0,
|
|
26
|
+
description: prop.getDescription(),
|
|
27
|
+
visibility: prop.getVisibility(),
|
|
28
|
+
type: prop.getType(),
|
|
29
|
+
default: prop.getDefaultValue(),
|
|
30
|
+
tags: {
|
|
31
|
+
hidden: prop.isHidden(),
|
|
32
|
+
ignore: prop.isIgnored(),
|
|
33
|
+
internal: prop.isInternal(),
|
|
34
|
+
alias: prop.getAlias().filter(__assignType((a) => a !== alias, [
|
|
35
|
+
"a",
|
|
36
|
+
"",
|
|
37
|
+
"P\"2!\"/\""
|
|
38
|
+
])).concat(prop.name),
|
|
39
|
+
title: prop.getTitle() || titleCase(prop.name),
|
|
40
|
+
readonly: prop.isReadonly(),
|
|
41
|
+
permission: prop.getPermission(),
|
|
42
|
+
domain: prop.getDomain()
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}, [
|
|
46
|
+
"alias",
|
|
47
|
+
"",
|
|
48
|
+
"P\"2!\"/\""
|
|
49
|
+
]));
|
|
50
|
+
}, [
|
|
51
|
+
"prop",
|
|
52
|
+
"",
|
|
53
|
+
"P\"2!\"/\""
|
|
54
|
+
]));
|
|
55
|
+
return reflection;
|
|
56
|
+
}
|
|
57
|
+
createTemplateReflection.__type = [
|
|
58
|
+
() => __ΩEnvPluginContext,
|
|
59
|
+
"context",
|
|
60
|
+
() => __ΩEnvType,
|
|
61
|
+
"name",
|
|
62
|
+
() => ReflectionClass,
|
|
63
|
+
"createTemplateReflection",
|
|
64
|
+
"Creates the reflection data used when generating runtime template files.",
|
|
65
|
+
"Pn!2\"n#2$8P\"7%`/&?'"
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { createTemplateReflection as t };
|
|
70
|
+
//# sourceMappingURL=template-helpers-CCEjhw1B.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-helpers-CCEjhw1B.mjs","names":[],"sources":["../src/helpers/template-helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext, EnvType } from \"../types/plugin\";\nimport { readEnvTypeReflection } from \"./persistence\";\n\n/**\n * Creates the reflection data used when generating runtime template files.\n *\n * @param context - The context for the configuration plugin.\n * @param name - The name of the configuration template.\n * @returns The reflection for the specified configuration template.\n */\nexport async function createTemplateReflection(\n context: EnvPluginContext,\n name?: EnvType\n): Promise<ReflectionClass<any>> {\n const reflection = await readEnvTypeReflection(context, name);\n\n reflection.getProperties().forEach(prop => {\n const aliases = prop.getAlias();\n aliases.filter(Boolean).forEach(alias => {\n reflection.addProperty({\n name: alias,\n optional: prop.isOptional() ? true : undefined,\n readonly: prop.isReadonly() ? true : undefined,\n description: prop.getDescription(),\n visibility: prop.getVisibility(),\n type: prop.getType(),\n default: prop.getDefaultValue(),\n tags: {\n hidden: prop.isHidden(),\n ignore: prop.isIgnored(),\n internal: prop.isInternal(),\n alias: prop\n .getAlias()\n .filter(a => a !== alias)\n .concat(prop.name),\n title: prop.getTitle() || titleCase(prop.name),\n readonly: prop.isReadonly(),\n permission: prop.getPermission(),\n domain: prop.getDomain()\n }\n });\n });\n });\n\n return reflection;\n}\n"],"mappings":";;;;;;AAIA,SAAS,aAAa,IAAI,MAAM;AAC5B,IAAG,SAAS;AACZ,QAAO;;;;;;;;;;CA8BP,MAAM,aAAa,MAAM,sBAAgB,SAAA,KAAA;AACzC,YAAW,eAAe,CAAC,QAAI,cAAA,SAAA;AAE3B,EADgB,KAAK,UAAU,CACvB,OAAO,QAAM,CAAA,QAAA,cAAA,UAAA;AACjB,cAAO,YAAA;IACH,MAAM;IACN,UAAU,KAAK,YAAY,GAAG,OAAO;IACrC,UAAU,KAAK,YAAW,GAAA,OAAA;IAC1B,aAAa,KAAK,gBAAM;IACxB,YAAY,KAAA,eAAA;IACZ,MAAM,KAAK,SAAS;IACtB,SAAA,KAAA,iBAAA;IACE,MAAM;KACF,QAAQ,KAAK,UAAC;KACd,QAAQ,KAAK,WAAI;KACjB,UAAA,KAAA,YAAA;KACA,OAAE,KACG,UAAU,CACV,OAAK,cAAA,MAAA,MAAA,OAAA;MAAA;MAAA;MAAA;MAAA,CAAA,CAAA,CACL,OAAO,KAAK,KAAK;KACtB,OAAO,KAAK,UAAK,IAAA,UAAA,KAAA,KAAA;KACjB,UAAU,KAAK,YAAO;KACtB,YAAY,KAAC,eAAA;KACzB,QAAA,KAAA,WAAA;KACA;IACF,CAAA;KACF;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA;;;;;;AAEA,QAAO"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CNVrAnJR.cjs');
|
|
2
|
+
const require_plugin = require('./plugin-CM1TSv1B.cjs');
|
|
3
|
+
const require_persistence = require('./persistence-D_clXRxP.cjs');
|
|
4
|
+
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
5
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
6
|
+
|
|
7
|
+
//#region src/helpers/template-helpers.ts
|
|
8
|
+
function __assignType(fn, args) {
|
|
9
|
+
fn.__type = args;
|
|
10
|
+
return fn;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates the reflection data used when generating runtime template files.
|
|
14
|
+
*
|
|
15
|
+
* @param context - The context for the configuration plugin.
|
|
16
|
+
* @param name - The name of the configuration template.
|
|
17
|
+
* @returns The reflection for the specified configuration template.
|
|
18
|
+
*/
|
|
19
|
+
async function createTemplateReflection(context, name) {
|
|
20
|
+
const reflection = await require_persistence.readEnvTypeReflection(context, name);
|
|
21
|
+
reflection.getProperties().forEach(__assignType((prop) => {
|
|
22
|
+
prop.getAlias().filter(Boolean).forEach(__assignType((alias) => {
|
|
23
|
+
reflection.addProperty({
|
|
24
|
+
name: alias,
|
|
25
|
+
optional: prop.isOptional() ? true : void 0,
|
|
26
|
+
readonly: prop.isReadonly() ? true : void 0,
|
|
27
|
+
description: prop.getDescription(),
|
|
28
|
+
visibility: prop.getVisibility(),
|
|
29
|
+
type: prop.getType(),
|
|
30
|
+
default: prop.getDefaultValue(),
|
|
31
|
+
tags: {
|
|
32
|
+
hidden: prop.isHidden(),
|
|
33
|
+
ignore: prop.isIgnored(),
|
|
34
|
+
internal: prop.isInternal(),
|
|
35
|
+
alias: prop.getAlias().filter(__assignType((a) => a !== alias, [
|
|
36
|
+
"a",
|
|
37
|
+
"",
|
|
38
|
+
"P\"2!\"/\""
|
|
39
|
+
])).concat(prop.name),
|
|
40
|
+
title: prop.getTitle() || (0, __stryke_string_format_title_case.titleCase)(prop.name),
|
|
41
|
+
readonly: prop.isReadonly(),
|
|
42
|
+
permission: prop.getPermission(),
|
|
43
|
+
domain: prop.getDomain()
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}, [
|
|
47
|
+
"alias",
|
|
48
|
+
"",
|
|
49
|
+
"P\"2!\"/\""
|
|
50
|
+
]));
|
|
51
|
+
}, [
|
|
52
|
+
"prop",
|
|
53
|
+
"",
|
|
54
|
+
"P\"2!\"/\""
|
|
55
|
+
]));
|
|
56
|
+
return reflection;
|
|
57
|
+
}
|
|
58
|
+
createTemplateReflection.__type = [
|
|
59
|
+
() => require_plugin.__ΩEnvPluginContext,
|
|
60
|
+
"context",
|
|
61
|
+
() => require_plugin.__ΩEnvType,
|
|
62
|
+
"name",
|
|
63
|
+
() => __powerlines_deepkit_vendor_type.ReflectionClass,
|
|
64
|
+
"createTemplateReflection",
|
|
65
|
+
"Creates the reflection data used when generating runtime template files.",
|
|
66
|
+
"Pn!2\"n#2$8P\"7%`/&?'"
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
Object.defineProperty(exports, 'createTemplateReflection', {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () {
|
|
73
|
+
return createTemplateReflection;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { a as EnvType, t as EnvPluginContext } from "./plugin-CSe5f2cD.cjs";
|
|
2
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/template-helpers.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates the reflection data used when generating runtime template files.
|
|
8
|
+
*
|
|
9
|
+
* @param context - The context for the configuration plugin.
|
|
10
|
+
* @param name - The name of the configuration template.
|
|
11
|
+
* @returns The reflection for the specified configuration template.
|
|
12
|
+
*/
|
|
13
|
+
declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { createTemplateReflection as t };
|
|
16
|
+
//# sourceMappingURL=template-helpers-zyitPfMz.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-helpers-zyitPfMz.d.cts","names":[],"sources":["../src/helpers/template-helpers.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;AAGU,iBAHY,wBAAA,CAGZ,OAAA,EAFC,gBAED,EAAA,IAAA,CAAA,EADD,OACC,CAAA,EAAP,OAAO,CAAC,eAAD,CAAA,GAAA,CAAA,CAAA"}
|