@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
|
@@ -28,21 +28,6 @@ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeM
|
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return __commonJSMin;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, '__toDynamicImportESM', {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return __toDynamicImportESM;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, '__toESM', {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return __toESM;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
31
|
+
exports.__commonJSMin = __commonJSMin;
|
|
32
|
+
exports.__toDynamicImportESM = __toDynamicImportESM;
|
|
33
|
+
exports.__toESM = __toESM;
|
|
@@ -30,4 +30,4 @@ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeM
|
|
|
30
30
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
|
-
export {
|
|
33
|
+
export { __commonJSMin, __require, __toDynamicImportESM, __toESM };
|
package/dist/babel/index.cjs
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
require('
|
|
2
|
-
require('../plugin-CM1TSv1B.cjs');
|
|
3
|
-
const require_plugin$1 = require('../plugin-CSVnrdpE.cjs');
|
|
4
|
-
require('../babel-BZqmdVF4.cjs');
|
|
1
|
+
const require_babel_plugin = require('./plugin.cjs');
|
|
5
2
|
|
|
6
|
-
exports.envBabelPlugin =
|
|
3
|
+
exports.envBabelPlugin = require_babel_plugin.envBabelPlugin;
|
package/dist/babel/index.d.cts
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "../plugin-CSe5f2cD.cjs";
|
|
3
|
-
import "../docs-BAKwE4PJ.cjs";
|
|
4
|
-
import "../env-DwM7pJm7.cjs";
|
|
5
|
-
import "../index-uTS5iDq_.cjs";
|
|
6
|
-
import "../create-reflection-resource-3svZm2rY.cjs";
|
|
7
|
-
import "../load-PHGmxX_X.cjs";
|
|
8
|
-
import "../persistence-BR4cUaN6.cjs";
|
|
9
|
-
import "../reflect-Dm8a3c29.cjs";
|
|
10
|
-
import "../source-file-env-Brfopjyr.cjs";
|
|
11
|
-
import "../template-helpers-zyitPfMz.cjs";
|
|
12
|
-
import "../index-CEDY7cmG.cjs";
|
|
13
|
-
import "../index-DSiHnMH2.cjs";
|
|
14
|
-
import { t as envBabelPlugin } from "../index-Bdi8CvaN.cjs";
|
|
1
|
+
import { envBabelPlugin } from "./plugin.cjs";
|
|
15
2
|
export { envBabelPlugin };
|
package/dist/babel/index.d.mts
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "../plugin-DMbVjdcQ.mjs";
|
|
3
|
-
import "../docs-CVf-w8oz.mjs";
|
|
4
|
-
import "../env-D0KBPuAd.mjs";
|
|
5
|
-
import "../index-BNRXMhlr.mjs";
|
|
6
|
-
import "../create-reflection-resource-CCpA76Yq.mjs";
|
|
7
|
-
import "../load-GpP6cojj.mjs";
|
|
8
|
-
import "../persistence-DrKQZNCv.mjs";
|
|
9
|
-
import "../reflect-Dpz8ifa0.mjs";
|
|
10
|
-
import "../source-file-env-DWejSP2U.mjs";
|
|
11
|
-
import "../template-helpers-1SKodHKt.mjs";
|
|
12
|
-
import "../index-dhjtMp5F.mjs";
|
|
13
|
-
import "../index-CREkvfw9.mjs";
|
|
14
|
-
import { t as envBabelPlugin } from "../index-Drhzdkqe.mjs";
|
|
1
|
+
import { envBabelPlugin } from "./plugin.mjs";
|
|
15
2
|
export { envBabelPlugin };
|
package/dist/babel/index.mjs
CHANGED
package/dist/babel/plugin.cjs
CHANGED
|
@@ -1,5 +1,141 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
require('../plugin
|
|
3
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
|
+
let powerlines_types_babel = require("powerlines/types/babel");
|
|
4
|
+
let __babel_core = require("@babel/core");
|
|
5
|
+
let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
6
|
+
let __powerlines_plugin_babel_helpers_create_plugin = require("@powerlines/plugin-babel/helpers/create-plugin");
|
|
7
|
+
let __powerlines_plugin_babel_helpers_module_helpers = require("@powerlines/plugin-babel/helpers/module-helpers");
|
|
8
|
+
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
//#region src/babel/plugin.ts
|
|
11
|
+
function __assignType(fn, args) {
|
|
12
|
+
fn.__type = args;
|
|
13
|
+
return fn;
|
|
14
|
+
}
|
|
15
|
+
const envBabelPlugin = (__powerlines_plugin_babel_helpers_create_plugin.createBabelPlugin.Ω = [[() => require_types_plugin.__ΩEnvPluginContext, "n!"]], (0, __powerlines_plugin_babel_helpers_create_plugin.createBabelPlugin)("env", __assignType(({ log, context }) => {
|
|
16
|
+
function extractEnv(node, pass, isInjectable = false) {
|
|
17
|
+
const envTypesAliasProperties = context.env.types.env?.getProperties().filter(__assignType((prop) => prop.getAlias().length > 0, [
|
|
18
|
+
"prop",
|
|
19
|
+
"",
|
|
20
|
+
"P\"2!\"/\""
|
|
21
|
+
]));
|
|
22
|
+
if (node.name) {
|
|
23
|
+
const prefix = context.config.env.prefix.find(__assignType((pre) => node.name && node.name.startsWith(pre) && (context.env.types.env?.hasProperty(node.name.replace(`${pre}_`, "")) || envTypesAliasProperties.some(__assignType((prop) => prop.getAlias().includes(node.name.replace(`${pre}_`, "")), [
|
|
24
|
+
"prop",
|
|
25
|
+
"",
|
|
26
|
+
"P\"2!\"/\""
|
|
27
|
+
]))), [
|
|
28
|
+
"pre",
|
|
29
|
+
"",
|
|
30
|
+
"P\"2!\"/\""
|
|
31
|
+
]));
|
|
32
|
+
let name = node.name;
|
|
33
|
+
if (prefix) name = node.name.replace(`${prefix}_`, "");
|
|
34
|
+
log(__storm_software_config_tools_types.LogLevelLabel.TRACE, `Environment variable ${name} found in ${pass.filename || "unknown file"}.`);
|
|
35
|
+
if (context.env.types.env?.hasProperty(name) || envTypesAliasProperties.some(__assignType((prop) => prop.getAlias().includes(name), [
|
|
36
|
+
"prop",
|
|
37
|
+
"",
|
|
38
|
+
"P\"2!\"/\""
|
|
39
|
+
]))) {
|
|
40
|
+
const envProperty = context.env.types.env.hasProperty(name) ? context.env.types.env.getProperty(name) : envTypesAliasProperties.find(__assignType((prop) => prop.getAlias().includes(name), [
|
|
41
|
+
"prop",
|
|
42
|
+
"",
|
|
43
|
+
"P\"2!\"/\""
|
|
44
|
+
]));
|
|
45
|
+
if (!envProperty || envProperty.isIgnored()) return;
|
|
46
|
+
if (!context.env.used.env.hasProperty(name)) {
|
|
47
|
+
log(__storm_software_config_tools_types.LogLevelLabel.DEBUG, `Adding "${name}" environment variables found in "${pass.filename || "unknown file"}" to used environment configuration reflection object.`);
|
|
48
|
+
context.env.used.env.addProperty(envProperty.property);
|
|
49
|
+
}
|
|
50
|
+
if (context.config.env.inject && isInjectable) {
|
|
51
|
+
let value = context.env.parsed?.[name];
|
|
52
|
+
if (value === void 0) {
|
|
53
|
+
const prefix$1 = context.config.env.prefix.find(__assignType((pre) => {
|
|
54
|
+
return context.env.parsed[`${pre.replace(/_$/g, "")}_${name}`];
|
|
55
|
+
}, [
|
|
56
|
+
"pre",
|
|
57
|
+
"",
|
|
58
|
+
"P\"2!\"/\""
|
|
59
|
+
]));
|
|
60
|
+
if (prefix$1) value = context.env.parsed[`${prefix$1.replace(/_$/g, "")}_${name}`];
|
|
61
|
+
}
|
|
62
|
+
value ??= envProperty.getDefaultValue();
|
|
63
|
+
if (envProperty.isValueRequired() && value === void 0) throw new Error(`Environment variable \`${name}\` is not defined in the .env configuration files`);
|
|
64
|
+
return (0, __powerlines_deepkit_utilities.stringifyDefaultValue)(envProperty, value);
|
|
65
|
+
}
|
|
66
|
+
} else throw new Error(`The "${name}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${pass.filename ? pass.filename : "unknown"}.
|
|
67
|
+
|
|
68
|
+
The following environment configuration names are defined in the \`env\` type definition: \n${context.env.types.env?.getPropertyNames().sort(__assignType((a, b) => String(a).localeCompare(String(b)), [
|
|
69
|
+
"a",
|
|
70
|
+
"b",
|
|
71
|
+
"",
|
|
72
|
+
"P\"2!\"2\"\"/#"
|
|
73
|
+
])).map(__assignType((typeDef) => ` - ${String(typeDef)} ${envTypesAliasProperties.some(__assignType((prop) => prop.getNameAsString() === String(typeDef) && prop.getAlias().length > 0, [
|
|
74
|
+
"prop",
|
|
75
|
+
"",
|
|
76
|
+
"P\"2!\"/\""
|
|
77
|
+
])) ? `(Alias: ${envTypesAliasProperties?.find(__assignType((prop) => prop.getNameAsString() === String(typeDef), [
|
|
78
|
+
"prop",
|
|
79
|
+
"",
|
|
80
|
+
"P\"2!\"/\""
|
|
81
|
+
]))?.getAlias().join(", ")})` : ""}`, [
|
|
82
|
+
"typeDef",
|
|
83
|
+
"",
|
|
84
|
+
"P\"2!\"/\""
|
|
85
|
+
])).join("\n")} \n\nUsing the following env prefix: \n${context.config.env.prefix.map(__assignType((prefix$1) => ` - ${prefix$1}`, [
|
|
86
|
+
"prefix",
|
|
87
|
+
"",
|
|
88
|
+
"P\"2!\"/\""
|
|
89
|
+
])).join("\n")} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
extractEnv.__type = [
|
|
93
|
+
"node",
|
|
94
|
+
() => powerlines_types_babel.__ΩBabelPluginPass,
|
|
95
|
+
"pass",
|
|
96
|
+
"isInjectable",
|
|
97
|
+
"extractEnv",
|
|
98
|
+
"P!2!n\"2#\"2$\"/%"
|
|
99
|
+
];
|
|
100
|
+
return { visitor: { MemberExpression: __assignType(function MemberExpression(path, pass) {
|
|
101
|
+
if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isIdentifier({ name: "process" }) && path.get("property")?.isIdentifier()) {
|
|
102
|
+
const identifier = path.get("property")?.node;
|
|
103
|
+
if (!identifier.name) return;
|
|
104
|
+
extractEnv(identifier, pass, false);
|
|
105
|
+
path.replaceWithSourceString(`env.${identifier.name}`);
|
|
106
|
+
(0, __powerlines_plugin_babel_helpers_module_helpers.addImport)(path, {
|
|
107
|
+
module: `${context.config.framework || "powerlines"}:env`,
|
|
108
|
+
name: "env",
|
|
109
|
+
imported: "env"
|
|
110
|
+
});
|
|
111
|
+
} else if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isMetaProperty() && path.get("property")?.isIdentifier()) {
|
|
112
|
+
const identifier = path.get("property")?.node;
|
|
113
|
+
if (!identifier.name) return;
|
|
114
|
+
extractEnv(identifier, pass, false);
|
|
115
|
+
path.replaceWithSourceString(`env.${identifier.name}`);
|
|
116
|
+
(0, __powerlines_plugin_babel_helpers_module_helpers.addImport)(path, {
|
|
117
|
+
module: `${context.config.framework || "powerlines"}:env`,
|
|
118
|
+
name: "env",
|
|
119
|
+
imported: "env"
|
|
120
|
+
});
|
|
121
|
+
} else if (path.get("object")?.isIdentifier({ name: "env" }) && path.get("property")?.isIdentifier()) {
|
|
122
|
+
const identifier = path.get("property")?.node;
|
|
123
|
+
if (!identifier.name) return;
|
|
124
|
+
extractEnv(identifier, pass, false);
|
|
125
|
+
}
|
|
126
|
+
}, [
|
|
127
|
+
() => __babel_core.NodePath,
|
|
128
|
+
"path",
|
|
129
|
+
() => powerlines_types_babel.__ΩBabelPluginPass,
|
|
130
|
+
"pass",
|
|
131
|
+
"MemberExpression",
|
|
132
|
+
"PP!7!2\"n#2$\"/%"
|
|
133
|
+
]) } };
|
|
134
|
+
}, [
|
|
135
|
+
"param0",
|
|
136
|
+
"",
|
|
137
|
+
"P\"2!\"/\""
|
|
138
|
+
])));
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
exports.envBabelPlugin = envBabelPlugin;
|
package/dist/babel/plugin.d.cts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "../source-file-env-Brfopjyr.cjs";
|
|
11
|
-
import "../template-helpers-zyitPfMz.cjs";
|
|
12
|
-
import "../index-CEDY7cmG.cjs";
|
|
13
|
-
import "../index-DSiHnMH2.cjs";
|
|
14
|
-
import { t as envBabelPlugin } from "../index-Bdi8CvaN.cjs";
|
|
15
|
-
export { envBabelPlugin };
|
|
1
|
+
import { EnvPluginContext, EnvPluginResolvedConfig } from "../types/plugin.cjs";
|
|
2
|
+
import "../index.cjs";
|
|
3
|
+
import * as powerlines_types0 from "powerlines/types";
|
|
4
|
+
|
|
5
|
+
//#region src/babel/plugin.d.ts
|
|
6
|
+
declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { envBabelPlugin };
|
|
9
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;cAkCa,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
|
package/dist/babel/plugin.d.mts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "../source-file-env-DWejSP2U.mjs";
|
|
11
|
-
import "../template-helpers-1SKodHKt.mjs";
|
|
12
|
-
import "../index-dhjtMp5F.mjs";
|
|
13
|
-
import "../index-CREkvfw9.mjs";
|
|
14
|
-
import { t as envBabelPlugin } from "../index-Drhzdkqe.mjs";
|
|
15
|
-
export { envBabelPlugin };
|
|
1
|
+
import { EnvPluginContext, EnvPluginResolvedConfig } from "../types/plugin.mjs";
|
|
2
|
+
import "../index.mjs";
|
|
3
|
+
import * as powerlines_types0 from "powerlines/types";
|
|
4
|
+
|
|
5
|
+
//#region src/babel/plugin.d.ts
|
|
6
|
+
declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { envBabelPlugin };
|
|
9
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;cAkCa,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
|
package/dist/babel/plugin.mjs
CHANGED
|
@@ -1,5 +1,141 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
1
|
+
import { __ΩEnvPluginContext } from "../types/plugin.mjs";
|
|
2
|
+
import { __ΩBabelPluginPass } from "powerlines/types/babel";
|
|
3
|
+
import { NodePath } from "@babel/core";
|
|
4
|
+
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
5
|
+
import { createBabelPlugin } from "@powerlines/plugin-babel/helpers/create-plugin";
|
|
6
|
+
import { addImport } from "@powerlines/plugin-babel/helpers/module-helpers";
|
|
7
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
//#region src/babel/plugin.ts
|
|
10
|
+
function __assignType(fn, args) {
|
|
11
|
+
fn.__type = args;
|
|
12
|
+
return fn;
|
|
13
|
+
}
|
|
14
|
+
const envBabelPlugin = (createBabelPlugin.Ω = [[() => __ΩEnvPluginContext, "n!"]], createBabelPlugin("env", __assignType(({ log, context }) => {
|
|
15
|
+
function extractEnv(node, pass, isInjectable = false) {
|
|
16
|
+
const envTypesAliasProperties = context.env.types.env?.getProperties().filter(__assignType((prop) => prop.getAlias().length > 0, [
|
|
17
|
+
"prop",
|
|
18
|
+
"",
|
|
19
|
+
"P\"2!\"/\""
|
|
20
|
+
]));
|
|
21
|
+
if (node.name) {
|
|
22
|
+
const prefix = context.config.env.prefix.find(__assignType((pre) => node.name && node.name.startsWith(pre) && (context.env.types.env?.hasProperty(node.name.replace(`${pre}_`, "")) || envTypesAliasProperties.some(__assignType((prop) => prop.getAlias().includes(node.name.replace(`${pre}_`, "")), [
|
|
23
|
+
"prop",
|
|
24
|
+
"",
|
|
25
|
+
"P\"2!\"/\""
|
|
26
|
+
]))), [
|
|
27
|
+
"pre",
|
|
28
|
+
"",
|
|
29
|
+
"P\"2!\"/\""
|
|
30
|
+
]));
|
|
31
|
+
let name = node.name;
|
|
32
|
+
if (prefix) name = node.name.replace(`${prefix}_`, "");
|
|
33
|
+
log(LogLevelLabel.TRACE, `Environment variable ${name} found in ${pass.filename || "unknown file"}.`);
|
|
34
|
+
if (context.env.types.env?.hasProperty(name) || envTypesAliasProperties.some(__assignType((prop) => prop.getAlias().includes(name), [
|
|
35
|
+
"prop",
|
|
36
|
+
"",
|
|
37
|
+
"P\"2!\"/\""
|
|
38
|
+
]))) {
|
|
39
|
+
const envProperty = context.env.types.env.hasProperty(name) ? context.env.types.env.getProperty(name) : envTypesAliasProperties.find(__assignType((prop) => prop.getAlias().includes(name), [
|
|
40
|
+
"prop",
|
|
41
|
+
"",
|
|
42
|
+
"P\"2!\"/\""
|
|
43
|
+
]));
|
|
44
|
+
if (!envProperty || envProperty.isIgnored()) return;
|
|
45
|
+
if (!context.env.used.env.hasProperty(name)) {
|
|
46
|
+
log(LogLevelLabel.DEBUG, `Adding "${name}" environment variables found in "${pass.filename || "unknown file"}" to used environment configuration reflection object.`);
|
|
47
|
+
context.env.used.env.addProperty(envProperty.property);
|
|
48
|
+
}
|
|
49
|
+
if (context.config.env.inject && isInjectable) {
|
|
50
|
+
let value = context.env.parsed?.[name];
|
|
51
|
+
if (value === void 0) {
|
|
52
|
+
const prefix$1 = context.config.env.prefix.find(__assignType((pre) => {
|
|
53
|
+
return context.env.parsed[`${pre.replace(/_$/g, "")}_${name}`];
|
|
54
|
+
}, [
|
|
55
|
+
"pre",
|
|
56
|
+
"",
|
|
57
|
+
"P\"2!\"/\""
|
|
58
|
+
]));
|
|
59
|
+
if (prefix$1) value = context.env.parsed[`${prefix$1.replace(/_$/g, "")}_${name}`];
|
|
60
|
+
}
|
|
61
|
+
value ??= envProperty.getDefaultValue();
|
|
62
|
+
if (envProperty.isValueRequired() && value === void 0) throw new Error(`Environment variable \`${name}\` is not defined in the .env configuration files`);
|
|
63
|
+
return stringifyDefaultValue(envProperty, value);
|
|
64
|
+
}
|
|
65
|
+
} else throw new Error(`The "${name}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${pass.filename ? pass.filename : "unknown"}.
|
|
66
|
+
|
|
67
|
+
The following environment configuration names are defined in the \`env\` type definition: \n${context.env.types.env?.getPropertyNames().sort(__assignType((a, b) => String(a).localeCompare(String(b)), [
|
|
68
|
+
"a",
|
|
69
|
+
"b",
|
|
70
|
+
"",
|
|
71
|
+
"P\"2!\"2\"\"/#"
|
|
72
|
+
])).map(__assignType((typeDef) => ` - ${String(typeDef)} ${envTypesAliasProperties.some(__assignType((prop) => prop.getNameAsString() === String(typeDef) && prop.getAlias().length > 0, [
|
|
73
|
+
"prop",
|
|
74
|
+
"",
|
|
75
|
+
"P\"2!\"/\""
|
|
76
|
+
])) ? `(Alias: ${envTypesAliasProperties?.find(__assignType((prop) => prop.getNameAsString() === String(typeDef), [
|
|
77
|
+
"prop",
|
|
78
|
+
"",
|
|
79
|
+
"P\"2!\"/\""
|
|
80
|
+
]))?.getAlias().join(", ")})` : ""}`, [
|
|
81
|
+
"typeDef",
|
|
82
|
+
"",
|
|
83
|
+
"P\"2!\"/\""
|
|
84
|
+
])).join("\n")} \n\nUsing the following env prefix: \n${context.config.env.prefix.map(__assignType((prefix$1) => ` - ${prefix$1}`, [
|
|
85
|
+
"prefix",
|
|
86
|
+
"",
|
|
87
|
+
"P\"2!\"/\""
|
|
88
|
+
])).join("\n")} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
extractEnv.__type = [
|
|
92
|
+
"node",
|
|
93
|
+
() => __ΩBabelPluginPass,
|
|
94
|
+
"pass",
|
|
95
|
+
"isInjectable",
|
|
96
|
+
"extractEnv",
|
|
97
|
+
"P!2!n\"2#\"2$\"/%"
|
|
98
|
+
];
|
|
99
|
+
return { visitor: { MemberExpression: __assignType(function MemberExpression(path, pass) {
|
|
100
|
+
if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isIdentifier({ name: "process" }) && path.get("property")?.isIdentifier()) {
|
|
101
|
+
const identifier = path.get("property")?.node;
|
|
102
|
+
if (!identifier.name) return;
|
|
103
|
+
extractEnv(identifier, pass, false);
|
|
104
|
+
path.replaceWithSourceString(`env.${identifier.name}`);
|
|
105
|
+
addImport(path, {
|
|
106
|
+
module: `${context.config.framework || "powerlines"}:env`,
|
|
107
|
+
name: "env",
|
|
108
|
+
imported: "env"
|
|
109
|
+
});
|
|
110
|
+
} else if (path.get("object")?.get("property")?.isIdentifier({ name: "env" }) && path.get("object")?.get("object")?.isMetaProperty() && path.get("property")?.isIdentifier()) {
|
|
111
|
+
const identifier = path.get("property")?.node;
|
|
112
|
+
if (!identifier.name) return;
|
|
113
|
+
extractEnv(identifier, pass, false);
|
|
114
|
+
path.replaceWithSourceString(`env.${identifier.name}`);
|
|
115
|
+
addImport(path, {
|
|
116
|
+
module: `${context.config.framework || "powerlines"}:env`,
|
|
117
|
+
name: "env",
|
|
118
|
+
imported: "env"
|
|
119
|
+
});
|
|
120
|
+
} else if (path.get("object")?.isIdentifier({ name: "env" }) && path.get("property")?.isIdentifier()) {
|
|
121
|
+
const identifier = path.get("property")?.node;
|
|
122
|
+
if (!identifier.name) return;
|
|
123
|
+
extractEnv(identifier, pass, false);
|
|
124
|
+
}
|
|
125
|
+
}, [
|
|
126
|
+
() => NodePath,
|
|
127
|
+
"path",
|
|
128
|
+
() => __ΩBabelPluginPass,
|
|
129
|
+
"pass",
|
|
130
|
+
"MemberExpression",
|
|
131
|
+
"PP!7!2\"n#2$\"/%"
|
|
132
|
+
]) } };
|
|
133
|
+
}, [
|
|
134
|
+
"param0",
|
|
135
|
+
"",
|
|
136
|
+
"P\"2!\"/\""
|
|
137
|
+
])));
|
|
138
|
+
|
|
139
|
+
//#endregion
|
|
140
|
+
export { envBabelPlugin };
|
|
141
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/babel/plugin.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 { NodePath } from \"@babel/core\";\nimport * as t from \"@babel/types\";\nimport { stringifyDefaultValue } from \"@powerlines/deepkit/utilities\";\n\nimport { createBabelPlugin } from \"@powerlines/plugin-babel/helpers/create-plugin\";\nimport { addImport } from \"@powerlines/plugin-babel/helpers/module-helpers\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { BabelPluginPass } from \"powerlines/types/babel\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/*\n * The Powerlines - Environment Configuration Babel Plugin\n *\n * @param babel - The Babel core module\n * @returns The Babel plugin object\n */\nexport const envBabelPlugin = createBabelPlugin<EnvPluginContext>(\n \"env\",\n ({ log, context }) => {\n function extractEnv(\n node: t.Identifier,\n pass: BabelPluginPass,\n isInjectable = false\n ) {\n const envTypesAliasProperties = context.env.types.env\n ?.getProperties()\n .filter(prop => prop.getAlias().length > 0);\n\n if (node.name) {\n const prefix = context.config.env.prefix.find(\n pre =>\n node.name &&\n node.name.startsWith(pre) &&\n (context.env.types.env?.hasProperty(\n node.name.replace(`${pre}_`, \"\")\n ) ||\n envTypesAliasProperties.some(prop =>\n prop.getAlias().includes(node.name.replace(`${pre}_`, \"\"))\n ))\n );\n\n let name = node.name;\n if (prefix) {\n name = node.name.replace(`${prefix}_`, \"\");\n }\n\n log(\n LogLevelLabel.TRACE,\n `Environment variable ${name} found in ${\n pass.filename || \"unknown file\"\n }.`\n );\n\n if (\n context.env.types.env?.hasProperty(name) ||\n envTypesAliasProperties.some(prop => prop.getAlias().includes(name))\n ) {\n const envProperty = context.env.types.env.hasProperty(name)\n ? context.env.types.env.getProperty(name)\n : envTypesAliasProperties.find(prop =>\n prop.getAlias().includes(name)\n );\n if (!envProperty || envProperty.isIgnored()) {\n return;\n }\n\n if (!context.env.used.env.hasProperty(name)) {\n log(\n LogLevelLabel.DEBUG,\n `Adding \"${name}\" environment variables found in \"${\n pass.filename || \"unknown file\"\n }\" to used environment configuration reflection object.`\n );\n\n context.env.used.env.addProperty(envProperty.property);\n }\n\n if (context.config.env.inject && isInjectable) {\n let value = context.env.parsed?.[name];\n if (value === undefined) {\n const prefix = context.config.env.prefix.find(pre => {\n return context.env.parsed[`${pre.replace(/_$/g, \"\")}_${name}`];\n });\n if (prefix) {\n value =\n context.env.parsed[`${prefix.replace(/_$/g, \"\")}_${name}`];\n }\n }\n\n value ??= envProperty.getDefaultValue();\n\n if (envProperty.isValueRequired() && value === undefined) {\n throw new Error(\n `Environment variable \\`${name}\\` is not defined in the .env configuration files`\n );\n }\n\n return stringifyDefaultValue(envProperty, value);\n }\n } else {\n throw new Error(\n `The \"${name}\" environment variable is not defined in the \\`env\\` type definition, but is used in the source code file ${\n pass.filename ? pass.filename : \"unknown\"\n }.\n\n The following environment configuration names are defined in the \\`env\\` type definition: \\n${context.env.types.env\n ?.getPropertyNames()\n .sort((a, b) => String(a).localeCompare(String(b)))\n .map(\n typeDef =>\n ` - ${String(typeDef)} ${\n envTypesAliasProperties.some(\n prop =>\n prop.getNameAsString() === String(typeDef) &&\n prop.getAlias().length > 0\n )\n ? `(Alias: ${envTypesAliasProperties\n ?.find(\n prop => prop.getNameAsString() === String(typeDef)\n )\n ?.getAlias()\n .join(\", \")})`\n : \"\"\n }`\n )\n .join(\n \"\\n\"\n )} \\n\\nUsing the following env prefix: \\n${context.config.env.prefix\n .map(prefix => ` - ${prefix}`)\n .join(\n \"\\n\"\n )} \\n\\nPlease check your \\`env\\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \\n\\n`\n );\n }\n }\n\n return undefined;\n }\n\n return {\n visitor: {\n MemberExpression(\n path: NodePath<t.MemberExpression>,\n pass: BabelPluginPass\n ) {\n if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path\n .get(\"object\")\n ?.get(\"object\")\n ?.isIdentifier({ name: \"process\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // process.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path\n .get(\"object\")\n ?.get(\"property\")\n ?.isIdentifier({ name: \"env\" }) &&\n path.get(\"object\")?.get(\"object\")?.isMetaProperty() &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // import.meta.env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false);\n\n path.replaceWithSourceString(`env.${identifier.name}`);\n addImport(path, {\n module: `${context.config.framework || \"powerlines\"}:env`,\n name: \"env\",\n imported: \"env\"\n });\n } else if (\n path.get(\"object\")?.isIdentifier({ name: \"env\" }) &&\n path.get(\"property\")?.isIdentifier()\n ) {\n // env.CONFIG_NAME\n\n const identifier = path.get(\"property\")?.node as t.Identifier;\n if (!identifier.name) {\n return;\n }\n\n extractEnv(identifier, pass, false);\n }\n }\n }\n };\n }\n);\n"],"mappings":"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"}
|
package/dist/components/docs.cjs
CHANGED
|
@@ -1,7 +1,67 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
require('../
|
|
3
|
-
require('../
|
|
4
|
-
require(
|
|
5
|
-
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.cjs');
|
|
3
|
+
const require_helpers_docs_helper = require('../helpers/docs-helper.cjs');
|
|
4
|
+
let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let __alloy_js_markdown = require("@alloy-js/markdown");
|
|
8
|
+
let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
|
|
9
|
+
let __powerlines_plugin_alloy_markdown_components_markdown_file = require("@powerlines/plugin-alloy/markdown/components/markdown-file");
|
|
10
|
+
let __powerlines_plugin_alloy_markdown_components_markdown_table = require("@powerlines/plugin-alloy/markdown/components/markdown-table");
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
//#region src/components/docs.tsx
|
|
13
|
+
/**
|
|
14
|
+
* Generates the environment configuration markdown documentation for the Powerlines project.
|
|
15
|
+
*/
|
|
16
|
+
function EnvDocsFile(props) {
|
|
17
|
+
const { levelOffset = 0, reflection, ...rest } = props;
|
|
18
|
+
const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
|
|
19
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_file.MarkdownFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({ get path() {
|
|
20
|
+
return require_join_paths.joinPaths(require_helpers_docs_helper.getDocsOutputPath(context), "env.md");
|
|
21
|
+
} }, rest, { get children() {
|
|
22
|
+
return [
|
|
23
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
24
|
+
level: 1 + levelOffset,
|
|
25
|
+
children: "Environment Configuration"
|
|
26
|
+
}),
|
|
27
|
+
__alloy_js_core.code`Below is a list of environment variables used by the`,
|
|
28
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
29
|
+
get when() {
|
|
30
|
+
return !!context.packageJson.name;
|
|
31
|
+
},
|
|
32
|
+
get children() {
|
|
33
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Link, {
|
|
34
|
+
get href() {
|
|
35
|
+
return `https://www.npmjs.com/package/${context.packageJson.name}`;
|
|
36
|
+
},
|
|
37
|
+
get title() {
|
|
38
|
+
return context.packageJson.name;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
__alloy_js_core.code`package. These values can be updated in the \`.env\` file in the root of the project.`,
|
|
44
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
45
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_markdown.Heading, {
|
|
46
|
+
level: 2 + levelOffset,
|
|
47
|
+
children: "Environment Variables"
|
|
48
|
+
}),
|
|
49
|
+
__alloy_js_core.code`The below list of environment variables are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.`,
|
|
50
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
51
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_markdown_components_markdown_table.MarkdownTable, { get data() {
|
|
52
|
+
return reflection?.getProperties().filter((property) => property.getNameAsString() !== "__STORM_INJECTED__").sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())).map((reflectionProperty) => {
|
|
53
|
+
return {
|
|
54
|
+
name: reflectionProperty.getNameAsString().trim(),
|
|
55
|
+
description: (reflectionProperty.getDescription() ?? "").trim(),
|
|
56
|
+
type: (0, __powerlines_deepkit_vendor_type.stringifyType)(reflectionProperty.getType()).trim().replaceAll(" | ", ", or "),
|
|
57
|
+
defaultValue: reflectionProperty.hasDefault() ? String(reflectionProperty.getDefaultValue())?.includes("\"") ? reflectionProperty.getDefaultValue() : `\`${reflectionProperty.getDefaultValue()}\`` : "",
|
|
58
|
+
required: reflectionProperty.isValueRequired() ? "" : "✔"
|
|
59
|
+
};
|
|
60
|
+
}) ?? [];
|
|
61
|
+
} })
|
|
62
|
+
];
|
|
63
|
+
} }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
exports.EnvDocsFile = EnvDocsFile;
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
3
|
+
import { MarkdownFileProps } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
|
|
4
|
+
|
|
5
|
+
//#region src/components/docs.d.ts
|
|
6
|
+
interface EnvDocsFileProps extends Partial<MarkdownFileProps> {
|
|
7
|
+
/**
|
|
8
|
+
* The heading level offset to apply to the generated documentation.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This is useful when nesting the documentation within other markdown files.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue 0
|
|
14
|
+
*/
|
|
15
|
+
levelOffset?: number;
|
|
16
|
+
reflection: ReflectionClass<any>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generates the environment configuration markdown documentation for the Powerlines project.
|
|
20
|
+
*/
|
|
21
|
+
declare function EnvDocsFile(props: EnvDocsFileProps): _alloy_js_core0.Children;
|
|
22
|
+
declare type __ΩEnvDocsFileProps = any[];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps };
|
|
25
|
+
//# sourceMappingURL=docs.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.cts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;UAkCiB,gBAAA,SAAyB,QAAQ;;;AAAlD;;;;;AAiBA;;cANc;;;;;iBAME,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
import { MarkdownFileProps } from "@powerlines/plugin-alloy/markdown/components/markdown-file";
|
|
4
|
+
|
|
5
|
+
//#region src/components/docs.d.ts
|
|
6
|
+
interface EnvDocsFileProps extends Partial<MarkdownFileProps> {
|
|
7
|
+
/**
|
|
8
|
+
* The heading level offset to apply to the generated documentation.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This is useful when nesting the documentation within other markdown files.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue 0
|
|
14
|
+
*/
|
|
15
|
+
levelOffset?: number;
|
|
16
|
+
reflection: ReflectionClass<any>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generates the environment configuration markdown documentation for the Powerlines project.
|
|
20
|
+
*/
|
|
21
|
+
declare function EnvDocsFile(props: EnvDocsFileProps): _alloy_js_core0.Children;
|
|
22
|
+
declare type __ΩEnvDocsFileProps = any[];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { EnvDocsFile, EnvDocsFileProps, __ΩEnvDocsFileProps };
|
|
25
|
+
//# sourceMappingURL=docs.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.mts","names":[],"sources":["../../src/components/docs.tsx"],"sourcesContent":[],"mappings":";;;;;UAkCiB,gBAAA,SAAyB,QAAQ;;;AAAlD;;;;;AAiBA;;cANc;;;;;iBAME,WAAA,QAAmB,mBAAgB,eAAA,CAAA"}
|