@powerlines/plugin-env 0.15.161 → 0.15.162
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/{chunk-CNVrAnJR.cjs → _virtual/rolldown_runtime.cjs} +3 -18
- package/dist/{chunk-CsF2CmBJ.mjs → _virtual/rolldown_runtime.mjs} +1 -1
- package/dist/babel/index.cjs +2 -5
- package/dist/babel/index.d.cts +1 -14
- package/dist/babel/index.d.mts +1 -14
- package/dist/babel/index.mjs +1 -4
- package/dist/babel/plugin.cjs +140 -4
- package/dist/babel/plugin.d.cts +9 -15
- package/dist/babel/plugin.d.cts.map +1 -0
- package/dist/babel/plugin.d.mts +9 -15
- package/dist/babel/plugin.d.mts.map +1 -0
- package/dist/babel/plugin.mjs +140 -4
- package/dist/babel/plugin.mjs.map +1 -0
- package/dist/components/docs.cjs +66 -6
- package/dist/components/docs.d.cts +25 -2
- package/dist/components/docs.d.cts.map +1 -0
- package/dist/components/docs.d.mts +25 -2
- package/dist/components/docs.d.mts.map +1 -0
- package/dist/components/docs.mjs +66 -6
- package/dist/components/docs.mjs.map +1 -0
- package/dist/components/env.cjs +582 -11
- package/dist/components/env.d.cts +23 -2
- package/dist/components/env.d.cts.map +1 -0
- package/dist/components/env.d.mts +23 -2
- package/dist/components/env.d.mts.map +1 -0
- package/dist/components/env.mjs +581 -10
- package/dist/components/env.mjs.map +1 -0
- package/dist/components/index.cjs +5 -15
- package/dist/components/index.d.cts +2 -3
- package/dist/components/index.d.mts +2 -3
- package/dist/components/index.mjs +2 -12
- package/dist/helpers/automd-generator.cjs +31 -3
- package/dist/helpers/automd-generator.mjs +31 -3
- package/dist/helpers/automd-generator.mjs.map +1 -0
- package/dist/helpers/create-reflection-resource.cjs +21 -4
- package/dist/helpers/create-reflection-resource.d.cts +14 -4
- package/dist/helpers/create-reflection-resource.d.cts.map +1 -0
- package/dist/helpers/create-reflection-resource.d.mts +14 -4
- package/dist/helpers/create-reflection-resource.d.mts.map +1 -0
- package/dist/helpers/create-reflection-resource.mjs +22 -4
- package/dist/helpers/create-reflection-resource.mjs.map +1 -0
- package/dist/helpers/docs-helper.cjs +22 -5
- package/dist/helpers/docs-helper.d.cts +1 -2
- package/dist/helpers/docs-helper.d.cts.map +1 -1
- package/dist/helpers/docs-helper.d.mts +1 -2
- package/dist/helpers/docs-helper.d.mts.map +1 -1
- package/dist/helpers/docs-helper.mjs +23 -5
- package/dist/helpers/docs-helper.mjs.map +1 -0
- package/dist/helpers/index.cjs +32 -38
- package/dist/helpers/index.d.cts +6 -9
- package/dist/helpers/index.d.mts +6 -9
- package/dist/helpers/index.mjs +6 -12
- package/dist/helpers/load.cjs +133 -10
- package/dist/helpers/load.d.cts +36 -4
- package/dist/helpers/load.d.cts.map +1 -0
- package/dist/helpers/load.d.mts +36 -4
- package/dist/helpers/load.d.mts.map +1 -0
- package/dist/helpers/load.mjs +132 -9
- package/dist/helpers/load.mjs.map +1 -0
- package/dist/helpers/persistence.cjs +321 -15
- package/dist/helpers/persistence.d.cts +85 -4
- package/dist/helpers/persistence.d.cts.map +1 -0
- package/dist/helpers/persistence.d.mts +85 -4
- package/dist/helpers/persistence.d.mts.map +1 -0
- package/dist/helpers/persistence.mjs +310 -5
- package/dist/helpers/persistence.mjs.map +1 -0
- package/dist/helpers/reflect.cjs +262 -13
- package/dist/helpers/reflect.d.cts +47 -4
- package/dist/helpers/reflect.d.cts.map +1 -0
- package/dist/helpers/reflect.d.mts +47 -4
- package/dist/helpers/reflect.d.mts.map +1 -0
- package/dist/helpers/reflect.mjs +254 -5
- package/dist/helpers/reflect.mjs.map +1 -0
- package/dist/helpers/source-file-env.cjs +57 -3
- package/dist/helpers/source-file-env.d.cts +9 -2
- package/dist/helpers/source-file-env.d.cts.map +1 -0
- package/dist/helpers/source-file-env.d.mts +9 -2
- package/dist/helpers/source-file-env.d.mts.map +1 -0
- package/dist/helpers/source-file-env.mjs +56 -2
- package/dist/helpers/source-file-env.mjs.map +1 -0
- package/dist/helpers/template-helpers.cjs +69 -6
- package/dist/helpers/template-helpers.d.cts +16 -4
- package/dist/helpers/template-helpers.d.cts.map +1 -0
- package/dist/helpers/template-helpers.d.mts +16 -4
- package/dist/helpers/template-helpers.d.mts.map +1 -0
- package/dist/helpers/template-helpers.mjs +69 -6
- package/dist/helpers/template-helpers.mjs.map +1 -0
- package/dist/index.cjs +98 -258
- package/dist/index.d.cts +25 -15
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +25 -15
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +22 -182
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.cjs +37 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs +38 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +3 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +5 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +7 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +3 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +20 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +63 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +64 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +17 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.cjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs +33 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.cjs +28 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs +29 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs.map +1 -0
- package/dist/{join-paths-B0RBTuuw.cjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.cjs} +13 -65
- package/dist/{join-paths-Dd9KxuyL.mjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs} +5 -45
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs +9 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs.map +1 -0
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +346 -0
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +347 -0
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs.map +1 -0
- package/dist/{json5-DEV_07Nb.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs} +1 -1
- package/dist/{json5-jq90mF9X.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs} +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs.map +1 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +3 -0
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +3 -0
- package/dist/{confbox.DA7CpUDY-DShUZ_rW.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs} +2 -2
- package/dist/{confbox.DA7CpUDY-r6FXRsI6.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs} +2 -7
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs.map +1 -0
- package/dist/{confbox.DnMsyigM-C13n3X-S.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs} +3 -13
- package/dist/{confbox.DnMsyigM-V6Wj0LPC.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs} +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs.map +1 -0
- package/dist/{toml-DvrxV201.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs} +1 -1
- package/dist/{toml-uuOYvEAO.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs} +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs.map +1 -0
- package/dist/{yaml-CQSFMRMS.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs} +1 -1
- package/dist/{yaml-CIn2Gddw.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs} +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs.map +1 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +43 -0
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +1 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +46 -0
- package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +288 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +286 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs.map +1 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +71 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +69 -0
- package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs.map +1 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1008 -0
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +23 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +14 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +2698 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +2686 -0
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -0
- package/dist/{load-CC_Pu2Om.cjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs} +195 -2332
- package/dist/{load-EM4edkA2.mjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs} +195 -2319
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -0
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +29 -0
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +30 -0
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +1 -0
- package/dist/{multipart-parser-aEF5a4Xf.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs} +8 -5
- package/dist/{multipart-parser-D65rtMfY.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs} +4 -3
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +22 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +18 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +1 -0
- package/dist/{node-Co8KdzkZ.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs} +796 -814
- package/dist/{node-D9MigVDD.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs} +795 -807
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +11768 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +11764 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +25 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +21 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs.map +1 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +20 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +18 -0
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.cjs +194 -0
- package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs +192 -0
- package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs.map +1 -0
- package/dist/{dist-BQc8ZRwl.cjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs} +1 -1
- package/dist/{dist-mV5Swt78.mjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs} +1 -1
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +3 -0
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +3 -0
- package/dist/{defu-DV5Grr85.mjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs} +8 -43
- package/dist/{defu-CrqNIh1A.cjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs} +2 -90
- package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +1 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +127 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +126 -0
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +138 -0
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +137 -0
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +629 -0
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +628 -0
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -0
- package/dist/types/index.cjs +9 -10
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +2 -3
- package/dist/types/plugin.cjs +133 -7
- package/dist/types/plugin.d.cts +155 -3
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +155 -3
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +129 -3
- package/dist/types/plugin.mjs.map +1 -0
- package/dist/types/runtime.cjs +242 -3
- package/dist/types/runtime.d.cts +792 -2
- package/dist/{runtime-BDzzR4wH.d.cts.map → types/runtime.d.cts.map} +1 -1
- package/dist/types/runtime.d.mts +792 -2
- package/dist/{runtime-lYSIZdMn.d.mts.map → types/runtime.d.mts.map} +1 -1
- package/dist/types/runtime.mjs +241 -2
- package/dist/types/runtime.mjs.map +1 -0
- package/package.json +9 -9
- package/dist/automd-generator-BpvZRK0k.mjs +0 -32
- package/dist/automd-generator-BpvZRK0k.mjs.map +0 -1
- package/dist/automd-generator-CxG1owAE.cjs +0 -37
- package/dist/babel-BZqmdVF4.cjs +0 -0
- package/dist/babel-DgietUY3.mjs +0 -1
- package/dist/components-BUo6Koax.cjs +0 -0
- package/dist/components-DDFmImcI.mjs +0 -1
- package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs.map +0 -1
- package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs.map +0 -1
- package/dist/create-reflection-resource-3svZm2rY.d.cts +0 -14
- package/dist/create-reflection-resource-3svZm2rY.d.cts.map +0 -1
- package/dist/create-reflection-resource-CCpA76Yq.d.mts +0 -14
- package/dist/create-reflection-resource-CCpA76Yq.d.mts.map +0 -1
- package/dist/create-reflection-resource-D0QrD1Td.mjs +0 -23
- package/dist/create-reflection-resource-D0QrD1Td.mjs.map +0 -1
- package/dist/create-reflection-resource-d2zdTyOE.cjs +0 -27
- package/dist/defu-DV5Grr85.mjs.map +0 -1
- package/dist/dist-C_a6goTt.cjs +0 -15282
- package/dist/dist-CjWvISyq.mjs +0 -15271
- package/dist/dist-CjWvISyq.mjs.map +0 -1
- package/dist/dist-mV5Swt78.mjs.map +0 -1
- package/dist/docs-BAKwE4PJ.d.cts +0 -25
- package/dist/docs-BAKwE4PJ.d.cts.map +0 -1
- package/dist/docs-CVf-w8oz.d.mts +0 -25
- package/dist/docs-CVf-w8oz.d.mts.map +0 -1
- package/dist/docs-E0aCTO7H.cjs +0 -72
- package/dist/docs-WdCIcQmw.mjs +0 -67
- package/dist/docs-WdCIcQmw.mjs.map +0 -1
- package/dist/docs-helper-BSYSI2cH.mjs +0 -24
- package/dist/docs-helper-BSYSI2cH.mjs.map +0 -1
- package/dist/docs-helper-BWe1dt1m.cjs +0 -28
- package/dist/env-BSCEigpj.cjs +0 -593
- package/dist/env-D0KBPuAd.d.mts +0 -23
- package/dist/env-D0KBPuAd.d.mts.map +0 -1
- package/dist/env-DqI7dwC-.mjs +0 -582
- package/dist/env-DqI7dwC-.mjs.map +0 -1
- package/dist/env-DwM7pJm7.d.cts +0 -23
- package/dist/env-DwM7pJm7.d.cts.map +0 -1
- package/dist/helpers-45e1bvAO.mjs +0 -1
- package/dist/helpers-DgYP3uej.cjs +0 -0
- package/dist/index-BNRXMhlr.d.mts +0 -1
- package/dist/index-Bdi8CvaN.d.cts +0 -16
- package/dist/index-Bdi8CvaN.d.cts.map +0 -1
- package/dist/index-CEDY7cmG.d.cts +0 -1
- package/dist/index-CREkvfw9.d.mts +0 -1
- package/dist/index-DSiHnMH2.d.cts +0 -1
- package/dist/index-Drhzdkqe.d.mts +0 -16
- package/dist/index-Drhzdkqe.d.mts.map +0 -1
- package/dist/index-dhjtMp5F.d.mts +0 -1
- package/dist/index-uTS5iDq_.d.cts +0 -1
- package/dist/join-paths-Dd9KxuyL.mjs.map +0 -1
- package/dist/json5-jq90mF9X.mjs.map +0 -1
- package/dist/jsonc-CBh70baJ.cjs +0 -4
- package/dist/jsonc-CDLU6bgi.mjs +0 -4
- package/dist/load-EM4edkA2.mjs.map +0 -1
- package/dist/load-GpP6cojj.d.mts +0 -36
- package/dist/load-GpP6cojj.d.mts.map +0 -1
- package/dist/load-PHGmxX_X.d.cts +0 -36
- package/dist/load-PHGmxX_X.d.cts.map +0 -1
- package/dist/multipart-parser-D65rtMfY.mjs.map +0 -1
- package/dist/node-D9MigVDD.mjs.map +0 -1
- package/dist/persistence-5S3EirDm.mjs +0 -586
- package/dist/persistence-5S3EirDm.mjs.map +0 -1
- package/dist/persistence-BR4cUaN6.d.cts +0 -85
- package/dist/persistence-BR4cUaN6.d.cts.map +0 -1
- package/dist/persistence-DrKQZNCv.d.mts +0 -85
- package/dist/persistence-DrKQZNCv.d.mts.map +0 -1
- package/dist/persistence-DzS7SzMj.cjs +0 -712
- package/dist/plugin-CM1TSv1B.cjs +0 -159
- package/dist/plugin-CSVnrdpE.cjs +0 -146
- package/dist/plugin-CSe5f2cD.d.cts +0 -155
- package/dist/plugin-CSe5f2cD.d.cts.map +0 -1
- package/dist/plugin-DMbVjdcQ.d.mts +0 -155
- package/dist/plugin-DMbVjdcQ.d.mts.map +0 -1
- package/dist/plugin-Vyvy9w9Z.mjs +0 -141
- package/dist/plugin-Vyvy9w9Z.mjs.map +0 -1
- package/dist/plugin-eBjQJP6x.mjs +0 -130
- package/dist/plugin-eBjQJP6x.mjs.map +0 -1
- package/dist/reflect-Dm8a3c29.d.cts +0 -47
- package/dist/reflect-Dm8a3c29.d.cts.map +0 -1
- package/dist/reflect-Dpz8ifa0.d.mts +0 -47
- package/dist/reflect-Dpz8ifa0.d.mts.map +0 -1
- package/dist/runtime-BDzzR4wH.d.cts +0 -792
- package/dist/runtime-C5ukCv3P.mjs +0 -242
- package/dist/runtime-C5ukCv3P.mjs.map +0 -1
- package/dist/runtime-g0TEIoZK.cjs +0 -253
- package/dist/runtime-lYSIZdMn.d.mts +0 -792
- package/dist/source-file-env-4Vdtzc5-.cjs +0 -68
- package/dist/source-file-env-Brfopjyr.d.cts +0 -9
- package/dist/source-file-env-Brfopjyr.d.cts.map +0 -1
- package/dist/source-file-env-DWejSP2U.d.mts +0 -9
- package/dist/source-file-env-DWejSP2U.d.mts.map +0 -1
- package/dist/source-file-env-Tj-6qobx.mjs +0 -57
- package/dist/source-file-env-Tj-6qobx.mjs.map +0 -1
- package/dist/template-helpers-1SKodHKt.d.mts +0 -16
- package/dist/template-helpers-1SKodHKt.d.mts.map +0 -1
- package/dist/template-helpers-Cw8aba1r.mjs +0 -70
- package/dist/template-helpers-Cw8aba1r.mjs.map +0 -1
- package/dist/template-helpers-DoFoTIAC.cjs +0 -75
- package/dist/template-helpers-zyitPfMz.d.cts +0 -16
- package/dist/template-helpers-zyitPfMz.d.cts.map +0 -1
- package/dist/toml-uuOYvEAO.mjs.map +0 -1
- package/dist/types-DyPQho_C.mjs +0 -1
- package/dist/types-o3zWarRp.cjs +0 -0
- package/dist/yaml-CIn2Gddw.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflect.d.cts","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":[],"mappings":";;;;;iBAuCgB,mBAAA,UACL,+BACI,yBACZ;iBAQa,uBAAA,UACL,+BACI,yBACZ;AAda,UAsBC,0BAAA,CAtBkB;EACxB,IAAA,CAAA,EAsBF,iBAtBE,GAsBkB,SAtBlB;EACI,eAAA,CAAA,EAsBK,eAtBL,CAAA,GAAA,CAAA;;AACG,cAwBL,OAAA,YAAmB,YAxBd,CAAA;EAQF,QAAA,EAAA,MAAA;EACL,WAAA,EAAA,MAAA;EACI,QAAA,EAAA,MAAA;EACZ,eAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAQD,UAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EAAoB,YAAA,EAAA,MAAA;EACT,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,SAAA;EAAe,IAAA,EAAA,aAAA,GAAA,MAAA,GAAA,YAAA;EAGtB,WAAQ,EAAA,MAAA;EAgDR,KAAA,EAAA,OAAY;EAIT,IAAA,EAAA,OAAA;EACL,OAAA,EAAA,OAAA;EACA,QAAA,EAAA,OAAA;EACR,WAAA,EAAA,MAAA,GAAA,OAAA;EAAe,eAAA,EAAA,MAAA,GAAA,OAAA;EAyCF,UAAA,EAAA,OAAA;EACL,kBAAA,EAAA,OAAA;EACA,SAAA,EAAA,MAAA;EACR,gBAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAyCI,EAAA,EAAA,OAAA;;AAGP,cA/FF,WAAA,YAAuB,gBA+FrB,CAAA;EAAA,cAAA,EAAA,MAAA;;AAwCO,iBAnIN,mBAAA,CAmIoB,OAAA,EAlIzB,gBAkIyB,EAAA,OAAA,CAAA,EAjIzB,0BAiIyB,CAAA,EAhIjC,eAgIiC,CAAA,GAAA,CAAA;AACzB,iBAxFK,uBAAA,CAwFL,OAAA,EAvFA,gBAuFA,EAAA,OAAA,CAAA,EAtFA,0BAsFA,CAAA,EArFR,eAqFQ,CAAA,GAAA,CAAA;AAEI,iBA9CO,UAAA,CA8CP,OAAA,EA7CJ,gBA6CI,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EA3CA,OA2CA,CA3CA,eA2CA,CAAA,GAAA,CAAA,CAAA;AAAA,iBAHO,cAAA,CAGP,OAAA,EAFJ,gBAEI,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA;AAAA,6CAAA,GAAA,EAAA"}
|
|
@@ -1,4 +1,47 @@
|
|
|
1
|
-
import "../runtime
|
|
2
|
-
import "../plugin
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { EnvInterface, SecretsInterface } from "../types/runtime.mjs";
|
|
2
|
+
import { EnvPluginContext } from "../types/plugin.mjs";
|
|
3
|
+
import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
|
|
4
|
+
|
|
5
|
+
//#region src/helpers/reflect.d.ts
|
|
6
|
+
declare function mergeEnvReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
7
|
+
declare function mergeSecretsReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
|
|
8
|
+
interface CreateEnvReflectionOptions {
|
|
9
|
+
type?: TypeObjectLiteral | TypeClass;
|
|
10
|
+
superReflection?: ReflectionClass<any>;
|
|
11
|
+
}
|
|
12
|
+
declare class BaseEnv implements EnvInterface {
|
|
13
|
+
APP_NAME: string;
|
|
14
|
+
APP_VERSION: string;
|
|
15
|
+
BUILD_ID: string;
|
|
16
|
+
BUILD_TIMESTAMP: string;
|
|
17
|
+
BUILD_CHECKSUM: string;
|
|
18
|
+
RELEASE_ID: string;
|
|
19
|
+
RELEASE_TAG: string;
|
|
20
|
+
ORGANIZATION: string;
|
|
21
|
+
PLATFORM: "node" | "browser" | "neutral";
|
|
22
|
+
MODE: "development" | "test" | "production";
|
|
23
|
+
ENVIRONMENT: string;
|
|
24
|
+
DEBUG: boolean;
|
|
25
|
+
TEST: boolean;
|
|
26
|
+
MINIMAL: boolean;
|
|
27
|
+
NO_COLOR: boolean;
|
|
28
|
+
FORCE_COLOR: number | boolean;
|
|
29
|
+
FORCE_HYPERLINK: number | boolean;
|
|
30
|
+
STACKTRACE: boolean;
|
|
31
|
+
INCLUDE_ERROR_DATA: boolean;
|
|
32
|
+
ERROR_URL: string;
|
|
33
|
+
DEFAULT_TIMEZONE: string;
|
|
34
|
+
DEFAULT_LOCALE: string;
|
|
35
|
+
CI: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare class BaseSecrets implements SecretsInterface {
|
|
38
|
+
ENCRYPTION_KEY: string;
|
|
39
|
+
}
|
|
40
|
+
declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
41
|
+
declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
|
|
42
|
+
declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
43
|
+
declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
|
|
44
|
+
declare type __ΩCreateEnvReflectionOptions = any[];
|
|
45
|
+
//#endregion
|
|
46
|
+
export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
|
|
47
|
+
//# sourceMappingURL=reflect.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflect.d.mts","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":[],"mappings":";;;;;iBAuCgB,mBAAA,UACL,+BACI,yBACZ;iBAQa,uBAAA,UACL,+BACI,yBACZ;AAda,UAsBC,0BAAA,CAtBkB;EACxB,IAAA,CAAA,EAsBF,iBAtBE,GAsBkB,SAtBlB;EACI,eAAA,CAAA,EAsBK,eAtBL,CAAA,GAAA,CAAA;;AACG,cAwBL,OAAA,YAAmB,YAxBd,CAAA;EAQF,QAAA,EAAA,MAAA;EACL,WAAA,EAAA,MAAA;EACI,QAAA,EAAA,MAAA;EACZ,eAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAQD,UAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EAAoB,YAAA,EAAA,MAAA;EACT,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,SAAA;EAAe,IAAA,EAAA,aAAA,GAAA,MAAA,GAAA,YAAA;EAGtB,WAAQ,EAAA,MAAA;EAgDR,KAAA,EAAA,OAAY;EAIT,IAAA,EAAA,OAAA;EACL,OAAA,EAAA,OAAA;EACA,QAAA,EAAA,OAAA;EACR,WAAA,EAAA,MAAA,GAAA,OAAA;EAAe,eAAA,EAAA,MAAA,GAAA,OAAA;EAyCF,UAAA,EAAA,OAAA;EACL,kBAAA,EAAA,OAAA;EACA,SAAA,EAAA,MAAA;EACR,gBAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAyCI,EAAA,EAAA,OAAA;;AAGP,cA/FF,WAAA,YAAuB,gBA+FrB,CAAA;EAAA,cAAA,EAAA,MAAA;;AAwCO,iBAnIN,mBAAA,CAmIoB,OAAA,EAlIzB,gBAkIyB,EAAA,OAAA,CAAA,EAjIzB,0BAiIyB,CAAA,EAhIjC,eAgIiC,CAAA,GAAA,CAAA;AACzB,iBAxFK,uBAAA,CAwFL,OAAA,EAvFA,gBAuFA,EAAA,OAAA,CAAA,EAtFA,0BAsFA,CAAA,EArFR,eAqFQ,CAAA,GAAA,CAAA;AAEI,iBA9CO,UAAA,CA8CP,OAAA,EA7CJ,gBA6CI,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EA3CA,OA2CA,CA3CA,eA2CA,CAAA,GAAA,CAAA,CAAA;AAAA,iBAHO,cAAA,CAGP,OAAA,EAFJ,gBAEI,EAAA,IAAA,CAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAAA,MAAA,CAAA,EAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA;AAAA,6CAAA,GAAA,EAAA"}
|
package/dist/helpers/reflect.mjs
CHANGED
|
@@ -1,6 +1,255 @@
|
|
|
1
|
-
import "../runtime
|
|
2
|
-
import "../plugin
|
|
3
|
-
import "../join-paths
|
|
4
|
-
import {
|
|
1
|
+
import { __ΩEnvInterface, __ΩSecretsInterface } from "../types/runtime.mjs";
|
|
2
|
+
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
3
|
+
import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs";
|
|
4
|
+
import { isParentPath } from "../node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs";
|
|
5
|
+
import { getEnvDefaultTypeDefinition, getSecretsDefaultTypeDefinition, readEnvTypeReflection, readSecretsReflection } from "./persistence.mjs";
|
|
6
|
+
import { ReflectionClass, ReflectionKind, __ΩTypeClass, __ΩTypeObjectLiteral, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
|
|
7
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
8
|
+
import { reflectType } from "@powerlines/deepkit/reflect-type";
|
|
5
9
|
|
|
6
|
-
|
|
10
|
+
//#region src/helpers/reflect.ts
|
|
11
|
+
function __assignType(fn, args) {
|
|
12
|
+
fn.__type = args;
|
|
13
|
+
return fn;
|
|
14
|
+
}
|
|
15
|
+
function mergeEnvReflections(context, reflections) {
|
|
16
|
+
return createEnvReflection(context, { type: merge(reflections.map(__assignType((reflection) => reflection.type, [
|
|
17
|
+
"reflection",
|
|
18
|
+
"",
|
|
19
|
+
"P\"2!\"/\""
|
|
20
|
+
]))) });
|
|
21
|
+
}
|
|
22
|
+
mergeEnvReflections.__type = [
|
|
23
|
+
() => __ΩEnvPluginContext,
|
|
24
|
+
"context",
|
|
25
|
+
() => ReflectionClass,
|
|
26
|
+
"reflections",
|
|
27
|
+
() => ReflectionClass,
|
|
28
|
+
"mergeEnvReflections",
|
|
29
|
+
"Pn!2\"P\"7#F2$P\"7%/&"
|
|
30
|
+
];
|
|
31
|
+
function mergeSecretsReflections(context, reflections) {
|
|
32
|
+
return createSecretsReflection(context, { type: merge(reflections.map(__assignType((reflection) => reflection.type, [
|
|
33
|
+
"reflection",
|
|
34
|
+
"",
|
|
35
|
+
"P\"2!\"/\""
|
|
36
|
+
]))) });
|
|
37
|
+
}
|
|
38
|
+
mergeSecretsReflections.__type = [
|
|
39
|
+
() => __ΩEnvPluginContext,
|
|
40
|
+
"context",
|
|
41
|
+
() => ReflectionClass,
|
|
42
|
+
"reflections",
|
|
43
|
+
() => ReflectionClass,
|
|
44
|
+
"mergeSecretsReflections",
|
|
45
|
+
"Pn!2\"P\"7#F2$P\"7%/&"
|
|
46
|
+
];
|
|
47
|
+
const __ΩCreateEnvReflectionOptions = [
|
|
48
|
+
() => __ΩTypeObjectLiteral,
|
|
49
|
+
() => __ΩTypeClass,
|
|
50
|
+
"type",
|
|
51
|
+
() => ReflectionClass,
|
|
52
|
+
"superReflection",
|
|
53
|
+
"CreateEnvReflectionOptions",
|
|
54
|
+
"PPn!n\"J4#8P\"7$4%8Mw&y"
|
|
55
|
+
];
|
|
56
|
+
var BaseEnv = class {
|
|
57
|
+
PLATFORM = "neutral";
|
|
58
|
+
MODE = "production";
|
|
59
|
+
DEBUG = false;
|
|
60
|
+
TEST = false;
|
|
61
|
+
MINIMAL = false;
|
|
62
|
+
NO_COLOR = false;
|
|
63
|
+
FORCE_COLOR = false;
|
|
64
|
+
FORCE_HYPERLINK = false;
|
|
65
|
+
STACKTRACE = false;
|
|
66
|
+
INCLUDE_ERROR_DATA = false;
|
|
67
|
+
CI = false;
|
|
68
|
+
static __type = [
|
|
69
|
+
"APP_NAME",
|
|
70
|
+
"APP_VERSION",
|
|
71
|
+
"BUILD_ID",
|
|
72
|
+
"BUILD_TIMESTAMP",
|
|
73
|
+
"BUILD_CHECKSUM",
|
|
74
|
+
"RELEASE_ID",
|
|
75
|
+
"RELEASE_TAG",
|
|
76
|
+
"ORGANIZATION",
|
|
77
|
+
"node",
|
|
78
|
+
"browser",
|
|
79
|
+
"neutral",
|
|
80
|
+
"PLATFORM",
|
|
81
|
+
function() {
|
|
82
|
+
return "neutral";
|
|
83
|
+
},
|
|
84
|
+
"development",
|
|
85
|
+
"test",
|
|
86
|
+
"production",
|
|
87
|
+
"MODE",
|
|
88
|
+
function() {
|
|
89
|
+
return "production";
|
|
90
|
+
},
|
|
91
|
+
"ENVIRONMENT",
|
|
92
|
+
"DEBUG",
|
|
93
|
+
function() {
|
|
94
|
+
return false;
|
|
95
|
+
},
|
|
96
|
+
"TEST",
|
|
97
|
+
function() {
|
|
98
|
+
return false;
|
|
99
|
+
},
|
|
100
|
+
"MINIMAL",
|
|
101
|
+
function() {
|
|
102
|
+
return false;
|
|
103
|
+
},
|
|
104
|
+
"NO_COLOR",
|
|
105
|
+
function() {
|
|
106
|
+
return false;
|
|
107
|
+
},
|
|
108
|
+
"FORCE_COLOR",
|
|
109
|
+
function() {
|
|
110
|
+
return false;
|
|
111
|
+
},
|
|
112
|
+
"FORCE_HYPERLINK",
|
|
113
|
+
function() {
|
|
114
|
+
return false;
|
|
115
|
+
},
|
|
116
|
+
"STACKTRACE",
|
|
117
|
+
function() {
|
|
118
|
+
return false;
|
|
119
|
+
},
|
|
120
|
+
"INCLUDE_ERROR_DATA",
|
|
121
|
+
function() {
|
|
122
|
+
return false;
|
|
123
|
+
},
|
|
124
|
+
"ERROR_URL",
|
|
125
|
+
"DEFAULT_TIMEZONE",
|
|
126
|
+
"DEFAULT_LOCALE",
|
|
127
|
+
"CI",
|
|
128
|
+
function() {
|
|
129
|
+
return false;
|
|
130
|
+
},
|
|
131
|
+
() => __ΩEnvInterface,
|
|
132
|
+
"BaseEnv",
|
|
133
|
+
"&3!&3\"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx\"wJ"
|
|
134
|
+
];
|
|
135
|
+
};
|
|
136
|
+
var BaseSecrets = class {
|
|
137
|
+
static __type = [
|
|
138
|
+
"ENCRYPTION_KEY",
|
|
139
|
+
() => __ΩSecretsInterface,
|
|
140
|
+
"BaseSecrets",
|
|
141
|
+
"&3!5n\"x\"w#"
|
|
142
|
+
];
|
|
143
|
+
};
|
|
144
|
+
function createEnvReflection(context, options = {}) {
|
|
145
|
+
const parent = options.superReflection ?? new ReflectionClass({
|
|
146
|
+
kind: ReflectionKind.class,
|
|
147
|
+
description: `The base environment configuration definition for the ${titleCase(context.config.name)} project.`,
|
|
148
|
+
classType: BaseEnv,
|
|
149
|
+
types: [],
|
|
150
|
+
implements: [{
|
|
151
|
+
kind: ReflectionKind.objectLiteral,
|
|
152
|
+
typeName: "EnvInterface",
|
|
153
|
+
description: `The environment configuration interface definition for the ${titleCase(context.config.name)} project.`,
|
|
154
|
+
types: []
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
157
|
+
parent.name = "Env";
|
|
158
|
+
const result = new ReflectionClass(options.type ?? {
|
|
159
|
+
kind: ReflectionKind.objectLiteral,
|
|
160
|
+
typeName: "Env",
|
|
161
|
+
description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${titleCase(context.config.name)} application` : "application"}.`,
|
|
162
|
+
types: []
|
|
163
|
+
}, parent);
|
|
164
|
+
result.name = "Env";
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
createEnvReflection.__type = [
|
|
168
|
+
() => __ΩEnvPluginContext,
|
|
169
|
+
"context",
|
|
170
|
+
() => __ΩCreateEnvReflectionOptions,
|
|
171
|
+
"options",
|
|
172
|
+
() => ({}),
|
|
173
|
+
() => ReflectionClass,
|
|
174
|
+
"createEnvReflection",
|
|
175
|
+
"Pn!2\"n#2$>%P\"7&/'"
|
|
176
|
+
];
|
|
177
|
+
function createSecretsReflection(context, options = {}) {
|
|
178
|
+
const parent = options.superReflection ?? new ReflectionClass({
|
|
179
|
+
kind: ReflectionKind.class,
|
|
180
|
+
description: `The base secrets configuration definition for the ${titleCase(context.config.name)} project.`,
|
|
181
|
+
classType: BaseSecrets,
|
|
182
|
+
types: [],
|
|
183
|
+
implements: [{
|
|
184
|
+
kind: ReflectionKind.objectLiteral,
|
|
185
|
+
typeName: "SecretsInterface",
|
|
186
|
+
description: `The secrets configuration interface definition for the ${titleCase(context.config.name)} project.`,
|
|
187
|
+
types: []
|
|
188
|
+
}]
|
|
189
|
+
});
|
|
190
|
+
parent.name = "Secrets";
|
|
191
|
+
const result = new ReflectionClass(options.type ?? {
|
|
192
|
+
kind: ReflectionKind.objectLiteral,
|
|
193
|
+
typeName: "Secrets",
|
|
194
|
+
description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${titleCase(context.config.name)} application` : "application"}.`,
|
|
195
|
+
types: []
|
|
196
|
+
}, parent);
|
|
197
|
+
result.name = "Secrets";
|
|
198
|
+
return result;
|
|
199
|
+
}
|
|
200
|
+
createSecretsReflection.__type = [
|
|
201
|
+
() => __ΩEnvPluginContext,
|
|
202
|
+
"context",
|
|
203
|
+
() => __ΩCreateEnvReflectionOptions,
|
|
204
|
+
"options",
|
|
205
|
+
() => ({}),
|
|
206
|
+
() => ReflectionClass,
|
|
207
|
+
"createSecretsReflection",
|
|
208
|
+
"Pn!2\"n#2$>%P\"7&/'"
|
|
209
|
+
];
|
|
210
|
+
async function reflectEnv(context, file, name) {
|
|
211
|
+
let config;
|
|
212
|
+
if (file) config = resolveClassType(await reflectType(context, {
|
|
213
|
+
file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
214
|
+
name
|
|
215
|
+
}));
|
|
216
|
+
const defaultConfigType = await reflectType(context, await getEnvDefaultTypeDefinition(context));
|
|
217
|
+
return mergeEnvReflections(context, [
|
|
218
|
+
await readEnvTypeReflection(context, "env"),
|
|
219
|
+
config,
|
|
220
|
+
resolveClassType(defaultConfigType)
|
|
221
|
+
].filter(Boolean));
|
|
222
|
+
}
|
|
223
|
+
reflectEnv.__type = [
|
|
224
|
+
() => __ΩEnvPluginContext,
|
|
225
|
+
"context",
|
|
226
|
+
"file",
|
|
227
|
+
"name",
|
|
228
|
+
"reflectEnv",
|
|
229
|
+
"Pn!2\"&2#8&2$8\"/%"
|
|
230
|
+
];
|
|
231
|
+
async function reflectSecrets(context, file, name) {
|
|
232
|
+
let config;
|
|
233
|
+
if (file) config = resolveClassType(await reflectType(context, {
|
|
234
|
+
file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
|
|
235
|
+
name
|
|
236
|
+
}));
|
|
237
|
+
const defaultSecretsType = await reflectType(context, await getSecretsDefaultTypeDefinition(context));
|
|
238
|
+
return mergeSecretsReflections(context, [
|
|
239
|
+
await readSecretsReflection(context),
|
|
240
|
+
config,
|
|
241
|
+
resolveClassType(defaultSecretsType)
|
|
242
|
+
].filter(Boolean));
|
|
243
|
+
}
|
|
244
|
+
reflectSecrets.__type = [
|
|
245
|
+
() => __ΩEnvPluginContext,
|
|
246
|
+
"context",
|
|
247
|
+
"file",
|
|
248
|
+
"name",
|
|
249
|
+
"reflectSecrets",
|
|
250
|
+
"Pn!2\"&2#8&2$8\"/%"
|
|
251
|
+
];
|
|
252
|
+
|
|
253
|
+
//#endregion
|
|
254
|
+
export { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
|
|
255
|
+
//# sourceMappingURL=reflect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.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 { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport { EnvInterface, SecretsInterface } from \"../types/runtime\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n const defaultConfigType = await reflectType(\n context,\n await getEnvDefaultTypeDefinition(context)\n );\n\n const reflection = await readEnvTypeReflection(context, \"env\");\n\n // const defaultConfig = resolveClassType(defaultConfigType);\n // if (config) {\n // defaultConfig.getProperties().forEach(prop => {\n // if (!config!.hasProperty(prop.getName())) {\n // config!.addProperty(prop.property);\n // }\n // });\n // } else {\n // config = defaultConfig;\n // }\n\n return mergeEnvReflections(\n context,\n [reflection, config, resolveClassType(defaultConfigType)].filter(\n Boolean\n ) as ReflectionClass<any>[]\n );\n}\n\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.workspaceConfig.workspaceRoot)\n ? joinPaths(context.workspaceConfig.workspaceRoot, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n const defaultSecretsType = await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n );\n\n const reflection = await readSecretsReflection(context);\n\n // const defaultConfig = resolveClassType(defaultConfigType);\n // if (config) {\n // defaultConfig.getProperties().forEach(prop => {\n // if (!config!.hasProperty(prop.getName())) {\n // config!.addProperty(prop.property);\n // }\n // });\n // } else {\n // config = defaultConfig;\n // }\n\n return mergeSecretsReflections(\n context,\n [reflection, config, resolveClassType(defaultSecretsType)].filter(\n Boolean\n ) as ReflectionClass<any>[]\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,58 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.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");
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
exports.formatEnvField = formatEnvField;
|
|
58
|
+
exports.removeEnvPrefix = removeEnvPrefix;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 { formatEnvField, removeEnvPrefix };
|
|
9
|
+
//# sourceMappingURL=source-file-env.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env.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"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 { formatEnvField, removeEnvPrefix };
|
|
9
|
+
//# sourceMappingURL=source-file-env.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env.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"}
|
|
@@ -1,3 +1,57 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
2
4
|
|
|
3
|
-
|
|
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 { formatEnvField, removeEnvPrefix };
|
|
57
|
+
//# sourceMappingURL=source-file-env.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file-env.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"}
|
|
@@ -1,7 +1,70 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
require('../plugin
|
|
3
|
-
require('
|
|
4
|
-
require(
|
|
5
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
+
const require_helpers_persistence = require('./persistence.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
6
|
|
|
7
|
-
|
|
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_helpers_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_types_plugin.__ΩEnvPluginContext,
|
|
60
|
+
"context",
|
|
61
|
+
() => require_types_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
|
+
exports.createTemplateReflection = createTemplateReflection;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EnvPluginContext, EnvType } from "../types/plugin.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 };
|
|
16
|
+
//# sourceMappingURL=template-helpers.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-helpers.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"}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EnvPluginContext, EnvType } from "../types/plugin.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 };
|
|
16
|
+
//# sourceMappingURL=template-helpers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-helpers.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"}
|