@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.
Files changed (346) hide show
  1. package/dist/{chunk-CNVrAnJR.cjs → _virtual/rolldown_runtime.cjs} +3 -18
  2. package/dist/{chunk-CsF2CmBJ.mjs → _virtual/rolldown_runtime.mjs} +1 -1
  3. package/dist/babel/index.cjs +2 -5
  4. package/dist/babel/index.d.cts +1 -14
  5. package/dist/babel/index.d.mts +1 -14
  6. package/dist/babel/index.mjs +1 -4
  7. package/dist/babel/plugin.cjs +140 -4
  8. package/dist/babel/plugin.d.cts +9 -15
  9. package/dist/babel/plugin.d.cts.map +1 -0
  10. package/dist/babel/plugin.d.mts +9 -15
  11. package/dist/babel/plugin.d.mts.map +1 -0
  12. package/dist/babel/plugin.mjs +140 -4
  13. package/dist/babel/plugin.mjs.map +1 -0
  14. package/dist/components/docs.cjs +66 -6
  15. package/dist/components/docs.d.cts +25 -2
  16. package/dist/components/docs.d.cts.map +1 -0
  17. package/dist/components/docs.d.mts +25 -2
  18. package/dist/components/docs.d.mts.map +1 -0
  19. package/dist/components/docs.mjs +66 -6
  20. package/dist/components/docs.mjs.map +1 -0
  21. package/dist/components/env.cjs +582 -11
  22. package/dist/components/env.d.cts +23 -2
  23. package/dist/components/env.d.cts.map +1 -0
  24. package/dist/components/env.d.mts +23 -2
  25. package/dist/components/env.d.mts.map +1 -0
  26. package/dist/components/env.mjs +581 -10
  27. package/dist/components/env.mjs.map +1 -0
  28. package/dist/components/index.cjs +5 -15
  29. package/dist/components/index.d.cts +2 -3
  30. package/dist/components/index.d.mts +2 -3
  31. package/dist/components/index.mjs +2 -12
  32. package/dist/helpers/automd-generator.cjs +31 -3
  33. package/dist/helpers/automd-generator.mjs +31 -3
  34. package/dist/helpers/automd-generator.mjs.map +1 -0
  35. package/dist/helpers/create-reflection-resource.cjs +21 -4
  36. package/dist/helpers/create-reflection-resource.d.cts +14 -4
  37. package/dist/helpers/create-reflection-resource.d.cts.map +1 -0
  38. package/dist/helpers/create-reflection-resource.d.mts +14 -4
  39. package/dist/helpers/create-reflection-resource.d.mts.map +1 -0
  40. package/dist/helpers/create-reflection-resource.mjs +22 -4
  41. package/dist/helpers/create-reflection-resource.mjs.map +1 -0
  42. package/dist/helpers/docs-helper.cjs +22 -5
  43. package/dist/helpers/docs-helper.d.cts +1 -2
  44. package/dist/helpers/docs-helper.d.cts.map +1 -1
  45. package/dist/helpers/docs-helper.d.mts +1 -2
  46. package/dist/helpers/docs-helper.d.mts.map +1 -1
  47. package/dist/helpers/docs-helper.mjs +23 -5
  48. package/dist/helpers/docs-helper.mjs.map +1 -0
  49. package/dist/helpers/index.cjs +32 -38
  50. package/dist/helpers/index.d.cts +6 -9
  51. package/dist/helpers/index.d.mts +6 -9
  52. package/dist/helpers/index.mjs +6 -12
  53. package/dist/helpers/load.cjs +133 -10
  54. package/dist/helpers/load.d.cts +36 -4
  55. package/dist/helpers/load.d.cts.map +1 -0
  56. package/dist/helpers/load.d.mts +36 -4
  57. package/dist/helpers/load.d.mts.map +1 -0
  58. package/dist/helpers/load.mjs +132 -9
  59. package/dist/helpers/load.mjs.map +1 -0
  60. package/dist/helpers/persistence.cjs +321 -15
  61. package/dist/helpers/persistence.d.cts +85 -4
  62. package/dist/helpers/persistence.d.cts.map +1 -0
  63. package/dist/helpers/persistence.d.mts +85 -4
  64. package/dist/helpers/persistence.d.mts.map +1 -0
  65. package/dist/helpers/persistence.mjs +310 -5
  66. package/dist/helpers/persistence.mjs.map +1 -0
  67. package/dist/helpers/reflect.cjs +262 -13
  68. package/dist/helpers/reflect.d.cts +47 -4
  69. package/dist/helpers/reflect.d.cts.map +1 -0
  70. package/dist/helpers/reflect.d.mts +47 -4
  71. package/dist/helpers/reflect.d.mts.map +1 -0
  72. package/dist/helpers/reflect.mjs +254 -5
  73. package/dist/helpers/reflect.mjs.map +1 -0
  74. package/dist/helpers/source-file-env.cjs +57 -3
  75. package/dist/helpers/source-file-env.d.cts +9 -2
  76. package/dist/helpers/source-file-env.d.cts.map +1 -0
  77. package/dist/helpers/source-file-env.d.mts +9 -2
  78. package/dist/helpers/source-file-env.d.mts.map +1 -0
  79. package/dist/helpers/source-file-env.mjs +56 -2
  80. package/dist/helpers/source-file-env.mjs.map +1 -0
  81. package/dist/helpers/template-helpers.cjs +69 -6
  82. package/dist/helpers/template-helpers.d.cts +16 -4
  83. package/dist/helpers/template-helpers.d.cts.map +1 -0
  84. package/dist/helpers/template-helpers.d.mts +16 -4
  85. package/dist/helpers/template-helpers.d.mts.map +1 -0
  86. package/dist/helpers/template-helpers.mjs +69 -6
  87. package/dist/helpers/template-helpers.mjs.map +1 -0
  88. package/dist/index.cjs +98 -258
  89. package/dist/index.d.cts +25 -15
  90. package/dist/index.d.cts.map +1 -0
  91. package/dist/index.d.mts +25 -15
  92. package/dist/index.d.mts.map +1 -0
  93. package/dist/index.mjs +22 -182
  94. package/dist/index.mjs.map +1 -1
  95. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.cjs +37 -0
  96. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs +38 -0
  97. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +1 -0
  98. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.cjs +15 -0
  99. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs +15 -0
  100. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/to-array.mjs.map +1 -0
  101. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +15 -0
  102. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +15 -0
  103. 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
  104. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +3 -0
  105. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +5 -0
  106. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
  107. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +7 -0
  108. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +1 -0
  109. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +1 -0
  110. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +3 -0
  111. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +19 -0
  112. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +20 -0
  113. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +1 -0
  114. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +63 -0
  115. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +64 -0
  116. 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
  117. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
  118. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +12 -0
  119. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +1 -0
  120. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +15 -0
  121. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +17 -0
  122. package/dist/node_modules/.pnpm/@stryke_convert@0.6.38/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +1 -0
  123. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.cjs +32 -0
  124. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs +33 -0
  125. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-parent-path.mjs.map +1 -0
  126. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.cjs +28 -0
  127. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs +29 -0
  128. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/is-type.mjs.map +1 -0
  129. package/dist/{join-paths-B0RBTuuw.cjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.cjs} +13 -65
  130. package/dist/{join-paths-Dd9KxuyL.mjs → node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs} +5 -45
  131. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/join-paths.mjs.map +1 -0
  132. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.cjs +12 -0
  133. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs +9 -0
  134. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/regex.mjs.map +1 -0
  135. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.cjs +15 -0
  136. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs +15 -0
  137. package/dist/node_modules/.pnpm/@stryke_path@0.26.4/node_modules/@stryke/path/dist/slash.mjs.map +1 -0
  138. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +346 -0
  139. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +347 -0
  140. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs.map +1 -0
  141. package/dist/{json5-DEV_07Nb.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.cjs} +1 -1
  142. package/dist/{json5-jq90mF9X.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs} +2 -2
  143. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs.map +1 -0
  144. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.cjs +3 -0
  145. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/jsonc.mjs +3 -0
  146. package/dist/{confbox.DA7CpUDY-DShUZ_rW.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.cjs} +2 -2
  147. package/dist/{confbox.DA7CpUDY-r6FXRsI6.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs} +2 -7
  148. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DA7CpUDY.mjs.map +1 -0
  149. package/dist/{confbox.DnMsyigM-C13n3X-S.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.cjs} +3 -13
  150. package/dist/{confbox.DnMsyigM-V6Wj0LPC.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs} +3 -3
  151. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/shared/confbox.DnMsyigM.mjs.map +1 -0
  152. package/dist/{toml-DvrxV201.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.cjs} +1 -1
  153. package/dist/{toml-uuOYvEAO.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs} +2 -2
  154. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/toml.mjs.map +1 -0
  155. package/dist/{yaml-CQSFMRMS.cjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.cjs} +1 -1
  156. package/dist/{yaml-CIn2Gddw.mjs → node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs} +2 -2
  157. package/dist/node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/yaml.mjs.map +1 -0
  158. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +43 -0
  159. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +43 -0
  160. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +1 -0
  161. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +46 -0
  162. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +46 -0
  163. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +1 -0
  164. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.cjs +288 -0
  165. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs +286 -0
  166. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.mjs.map +1 -0
  167. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.cjs +71 -0
  168. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs +69 -0
  169. package/dist/node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.mjs.map +1 -0
  170. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +1013 -0
  171. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1008 -0
  172. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -0
  173. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +23 -0
  174. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +14 -0
  175. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +1 -0
  176. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +2698 -0
  177. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +2686 -0
  178. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -0
  179. package/dist/{load-CC_Pu2Om.cjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs} +195 -2332
  180. package/dist/{load-EM4edkA2.mjs → node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs} +195 -2319
  181. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -0
  182. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +29 -0
  183. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +30 -0
  184. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +1 -0
  185. 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
  186. 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
  187. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -0
  188. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +22 -0
  189. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +18 -0
  190. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +1 -0
  191. package/dist/{node-Co8KdzkZ.cjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs} +796 -814
  192. package/dist/{node-D9MigVDD.mjs → node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs} +795 -807
  193. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -0
  194. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +11768 -0
  195. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +11764 -0
  196. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -0
  197. 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
  198. 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
  199. 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
  200. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +20 -0
  201. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +18 -0
  202. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +1 -0
  203. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.cjs +194 -0
  204. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs +192 -0
  205. package/dist/node_modules/.pnpm/nypm@0.6.4/node_modules/nypm/dist/index.mjs.map +1 -0
  206. package/dist/{dist-BQc8ZRwl.cjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs} +1 -1
  207. package/dist/{dist-mV5Swt78.mjs → node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs} +1 -1
  208. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +1 -0
  209. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +3 -0
  210. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +3 -0
  211. package/dist/{defu-DV5Grr85.mjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs} +8 -43
  212. package/dist/{defu-CrqNIh1A.cjs → node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs} +2 -90
  213. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +1 -0
  214. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +127 -0
  215. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +126 -0
  216. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -0
  217. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +138 -0
  218. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +137 -0
  219. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -0
  220. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +629 -0
  221. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +628 -0
  222. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -0
  223. package/dist/types/index.cjs +9 -10
  224. package/dist/types/index.d.cts +2 -3
  225. package/dist/types/index.d.mts +2 -3
  226. package/dist/types/index.mjs +2 -3
  227. package/dist/types/plugin.cjs +133 -7
  228. package/dist/types/plugin.d.cts +155 -3
  229. package/dist/types/plugin.d.cts.map +1 -0
  230. package/dist/types/plugin.d.mts +155 -3
  231. package/dist/types/plugin.d.mts.map +1 -0
  232. package/dist/types/plugin.mjs +129 -3
  233. package/dist/types/plugin.mjs.map +1 -0
  234. package/dist/types/runtime.cjs +242 -3
  235. package/dist/types/runtime.d.cts +792 -2
  236. package/dist/{runtime-BDzzR4wH.d.cts.map → types/runtime.d.cts.map} +1 -1
  237. package/dist/types/runtime.d.mts +792 -2
  238. package/dist/{runtime-lYSIZdMn.d.mts.map → types/runtime.d.mts.map} +1 -1
  239. package/dist/types/runtime.mjs +241 -2
  240. package/dist/types/runtime.mjs.map +1 -0
  241. package/package.json +9 -9
  242. package/dist/automd-generator-BpvZRK0k.mjs +0 -32
  243. package/dist/automd-generator-BpvZRK0k.mjs.map +0 -1
  244. package/dist/automd-generator-CxG1owAE.cjs +0 -37
  245. package/dist/babel-BZqmdVF4.cjs +0 -0
  246. package/dist/babel-DgietUY3.mjs +0 -1
  247. package/dist/components-BUo6Koax.cjs +0 -0
  248. package/dist/components-DDFmImcI.mjs +0 -1
  249. package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs.map +0 -1
  250. package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs.map +0 -1
  251. package/dist/create-reflection-resource-3svZm2rY.d.cts +0 -14
  252. package/dist/create-reflection-resource-3svZm2rY.d.cts.map +0 -1
  253. package/dist/create-reflection-resource-CCpA76Yq.d.mts +0 -14
  254. package/dist/create-reflection-resource-CCpA76Yq.d.mts.map +0 -1
  255. package/dist/create-reflection-resource-D0QrD1Td.mjs +0 -23
  256. package/dist/create-reflection-resource-D0QrD1Td.mjs.map +0 -1
  257. package/dist/create-reflection-resource-d2zdTyOE.cjs +0 -27
  258. package/dist/defu-DV5Grr85.mjs.map +0 -1
  259. package/dist/dist-C_a6goTt.cjs +0 -15282
  260. package/dist/dist-CjWvISyq.mjs +0 -15271
  261. package/dist/dist-CjWvISyq.mjs.map +0 -1
  262. package/dist/dist-mV5Swt78.mjs.map +0 -1
  263. package/dist/docs-BAKwE4PJ.d.cts +0 -25
  264. package/dist/docs-BAKwE4PJ.d.cts.map +0 -1
  265. package/dist/docs-CVf-w8oz.d.mts +0 -25
  266. package/dist/docs-CVf-w8oz.d.mts.map +0 -1
  267. package/dist/docs-E0aCTO7H.cjs +0 -72
  268. package/dist/docs-WdCIcQmw.mjs +0 -67
  269. package/dist/docs-WdCIcQmw.mjs.map +0 -1
  270. package/dist/docs-helper-BSYSI2cH.mjs +0 -24
  271. package/dist/docs-helper-BSYSI2cH.mjs.map +0 -1
  272. package/dist/docs-helper-BWe1dt1m.cjs +0 -28
  273. package/dist/env-BSCEigpj.cjs +0 -593
  274. package/dist/env-D0KBPuAd.d.mts +0 -23
  275. package/dist/env-D0KBPuAd.d.mts.map +0 -1
  276. package/dist/env-DqI7dwC-.mjs +0 -582
  277. package/dist/env-DqI7dwC-.mjs.map +0 -1
  278. package/dist/env-DwM7pJm7.d.cts +0 -23
  279. package/dist/env-DwM7pJm7.d.cts.map +0 -1
  280. package/dist/helpers-45e1bvAO.mjs +0 -1
  281. package/dist/helpers-DgYP3uej.cjs +0 -0
  282. package/dist/index-BNRXMhlr.d.mts +0 -1
  283. package/dist/index-Bdi8CvaN.d.cts +0 -16
  284. package/dist/index-Bdi8CvaN.d.cts.map +0 -1
  285. package/dist/index-CEDY7cmG.d.cts +0 -1
  286. package/dist/index-CREkvfw9.d.mts +0 -1
  287. package/dist/index-DSiHnMH2.d.cts +0 -1
  288. package/dist/index-Drhzdkqe.d.mts +0 -16
  289. package/dist/index-Drhzdkqe.d.mts.map +0 -1
  290. package/dist/index-dhjtMp5F.d.mts +0 -1
  291. package/dist/index-uTS5iDq_.d.cts +0 -1
  292. package/dist/join-paths-Dd9KxuyL.mjs.map +0 -1
  293. package/dist/json5-jq90mF9X.mjs.map +0 -1
  294. package/dist/jsonc-CBh70baJ.cjs +0 -4
  295. package/dist/jsonc-CDLU6bgi.mjs +0 -4
  296. package/dist/load-EM4edkA2.mjs.map +0 -1
  297. package/dist/load-GpP6cojj.d.mts +0 -36
  298. package/dist/load-GpP6cojj.d.mts.map +0 -1
  299. package/dist/load-PHGmxX_X.d.cts +0 -36
  300. package/dist/load-PHGmxX_X.d.cts.map +0 -1
  301. package/dist/multipart-parser-D65rtMfY.mjs.map +0 -1
  302. package/dist/node-D9MigVDD.mjs.map +0 -1
  303. package/dist/persistence-5S3EirDm.mjs +0 -586
  304. package/dist/persistence-5S3EirDm.mjs.map +0 -1
  305. package/dist/persistence-BR4cUaN6.d.cts +0 -85
  306. package/dist/persistence-BR4cUaN6.d.cts.map +0 -1
  307. package/dist/persistence-DrKQZNCv.d.mts +0 -85
  308. package/dist/persistence-DrKQZNCv.d.mts.map +0 -1
  309. package/dist/persistence-DzS7SzMj.cjs +0 -712
  310. package/dist/plugin-CM1TSv1B.cjs +0 -159
  311. package/dist/plugin-CSVnrdpE.cjs +0 -146
  312. package/dist/plugin-CSe5f2cD.d.cts +0 -155
  313. package/dist/plugin-CSe5f2cD.d.cts.map +0 -1
  314. package/dist/plugin-DMbVjdcQ.d.mts +0 -155
  315. package/dist/plugin-DMbVjdcQ.d.mts.map +0 -1
  316. package/dist/plugin-Vyvy9w9Z.mjs +0 -141
  317. package/dist/plugin-Vyvy9w9Z.mjs.map +0 -1
  318. package/dist/plugin-eBjQJP6x.mjs +0 -130
  319. package/dist/plugin-eBjQJP6x.mjs.map +0 -1
  320. package/dist/reflect-Dm8a3c29.d.cts +0 -47
  321. package/dist/reflect-Dm8a3c29.d.cts.map +0 -1
  322. package/dist/reflect-Dpz8ifa0.d.mts +0 -47
  323. package/dist/reflect-Dpz8ifa0.d.mts.map +0 -1
  324. package/dist/runtime-BDzzR4wH.d.cts +0 -792
  325. package/dist/runtime-C5ukCv3P.mjs +0 -242
  326. package/dist/runtime-C5ukCv3P.mjs.map +0 -1
  327. package/dist/runtime-g0TEIoZK.cjs +0 -253
  328. package/dist/runtime-lYSIZdMn.d.mts +0 -792
  329. package/dist/source-file-env-4Vdtzc5-.cjs +0 -68
  330. package/dist/source-file-env-Brfopjyr.d.cts +0 -9
  331. package/dist/source-file-env-Brfopjyr.d.cts.map +0 -1
  332. package/dist/source-file-env-DWejSP2U.d.mts +0 -9
  333. package/dist/source-file-env-DWejSP2U.d.mts.map +0 -1
  334. package/dist/source-file-env-Tj-6qobx.mjs +0 -57
  335. package/dist/source-file-env-Tj-6qobx.mjs.map +0 -1
  336. package/dist/template-helpers-1SKodHKt.d.mts +0 -16
  337. package/dist/template-helpers-1SKodHKt.d.mts.map +0 -1
  338. package/dist/template-helpers-Cw8aba1r.mjs +0 -70
  339. package/dist/template-helpers-Cw8aba1r.mjs.map +0 -1
  340. package/dist/template-helpers-DoFoTIAC.cjs +0 -75
  341. package/dist/template-helpers-zyitPfMz.d.cts +0 -16
  342. package/dist/template-helpers-zyitPfMz.d.cts.map +0 -1
  343. package/dist/toml-uuOYvEAO.mjs.map +0 -1
  344. package/dist/types-DyPQho_C.mjs +0 -1
  345. package/dist/types-o3zWarRp.cjs +0 -0
  346. package/dist/yaml-CIn2Gddw.mjs.map +0 -1
@@ -1,593 +0,0 @@
1
- const require_chunk = require('./chunk-CNVrAnJR.cjs');
2
- const require_defu = require('./defu-CrqNIh1A.cjs');
3
- const require_load = require('./load-CC_Pu2Om.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
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
- let __alloy_js_core = require("@alloy-js/core");
8
- let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
9
- let __alloy_js_typescript = require("@alloy-js/typescript");
10
- let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
11
- let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
12
- let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
13
- let __powerlines_plugin_alloy_typescript_components_typescript_interface = require("@powerlines/plugin-alloy/typescript/components/typescript-interface");
14
- let __powerlines_plugin_alloy_typescript_components_typescript_object = require("@powerlines/plugin-alloy/typescript/components/typescript-object");
15
-
16
- //#region src/components/env.tsx
17
- /**
18
- * Generates the environment configuration typescript definition for the Powerlines project.
19
- */
20
- function EnvTypeDefinition(props) {
21
- const [{ defaultValue, reflection }] = (0, __alloy_js_core.splitProps)(props, ["defaultValue", "reflection"]);
22
- const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
23
- return [
24
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_interface.TypeScriptInterface, {
25
- name: " EnvBase",
26
- defaultValue,
27
- reflection,
28
- "export": true
29
- }),
30
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
31
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
32
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
33
- heading: "The environment configuration object with prefixed keys.",
34
- get children() {
35
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The \`Env\` type extends the \`EnvBase\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.` });
36
- }
37
- }),
38
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeDeclaration, {
39
- name: "Env",
40
- "export": true,
41
- get children() {
42
- return __alloy_js_core.code` {
43
- [Key in keyof EnvBase as Key ${context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``).join(" ")}]: EnvBase[Key];
44
- }
45
- `;
46
- }
47
- }),
48
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
49
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
50
- ];
51
- }
52
- function ConfigPropertyConditional(props) {
53
- const [{ context, name }] = (0, __alloy_js_core.splitProps)(props, ["context", "name"]);
54
- return __alloy_js_core.code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
55
- }
56
- function ConfigPropertyGet(props) {
57
- const [{ context, property, index }] = (0, __alloy_js_core.splitProps)(props, [
58
- "context",
59
- "property",
60
- "index"
61
- ]);
62
- return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
63
- get condition() {
64
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
65
- get name() {
66
- return property.getNameAsString();
67
- },
68
- context
69
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
70
- get when() {
71
- return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
72
- },
73
- get children() {
74
- return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
75
- get each() {
76
- return property.getAlias();
77
- },
78
- joiner: __alloy_js_core.code` || `,
79
- children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
80
- name: alias,
81
- context
82
- })
83
- })];
84
- }
85
- })];
86
- },
87
- get children() {
88
- return __alloy_js_core.code`return target["${property.getNameAsString()}"];`;
89
- }
90
- }) : (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
91
- get condition() {
92
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
93
- get name() {
94
- return property.getNameAsString();
95
- },
96
- context
97
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
98
- get when() {
99
- return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
100
- },
101
- get children() {
102
- return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
103
- get each() {
104
- return property.getAlias();
105
- },
106
- joiner: __alloy_js_core.code` || `,
107
- children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
108
- name: alias,
109
- context
110
- })
111
- })];
112
- }
113
- })];
114
- },
115
- get children() {
116
- return __alloy_js_core.code`return target["${property.getNameAsString()}"];`;
117
- }
118
- })];
119
- }
120
- function ConfigPropertySet(props) {
121
- const [{ context, property, index }] = (0, __alloy_js_core.splitProps)(props, [
122
- "context",
123
- "property",
124
- "index"
125
- ]);
126
- return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
127
- get condition() {
128
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
129
- get name() {
130
- return property.getNameAsString();
131
- },
132
- context
133
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
134
- get when() {
135
- return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
136
- },
137
- get children() {
138
- return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
139
- get each() {
140
- return property.getAlias();
141
- },
142
- joiner: __alloy_js_core.code` || `,
143
- children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
144
- name: alias,
145
- context
146
- })
147
- })];
148
- }
149
- })];
150
- },
151
- get children() {
152
- return __alloy_js_core.code`
153
- target["${property.getNameAsString()}"] = newValue;
154
- return true;
155
- `;
156
- }
157
- }) : (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
158
- get condition() {
159
- return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
160
- get name() {
161
- return property.getNameAsString();
162
- },
163
- context
164
- }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
165
- get when() {
166
- return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
167
- },
168
- get children() {
169
- return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
170
- get each() {
171
- return property.getAlias();
172
- },
173
- joiner: __alloy_js_core.code` || `,
174
- children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
175
- name: alias,
176
- context
177
- })
178
- })];
179
- }
180
- })];
181
- },
182
- get children() {
183
- return __alloy_js_core.code`
184
- target["${property.getNameAsString()}"] = newValue;
185
- return true;
186
- `;
187
- }
188
- })];
189
- }
190
- const createEnvRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("createEnv");
191
- const envRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("env");
192
- const envSerializerRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("EnvSerializer");
193
- /**
194
- * Generates the environment configuration module for the Powerlines project.
195
- */
196
- function EnvBuiltin(props) {
197
- const [{ defaultConfig, reflection, children }, rest] = (0, __alloy_js_core.splitProps)(props, [
198
- "defaultConfig",
199
- "reflection",
200
- "children"
201
- ]);
202
- const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlines)();
203
- const defaultValue = (0, __alloy_js_core.computed)(() => context && require_load.loadEnvFromContext(context, process.env));
204
- const envInstance = (0, __alloy_js_core.computed)(() => {
205
- return new __powerlines_deepkit_vendor_type.ReflectionClass({
206
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
207
- description: `The initial environment configuration state for the ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.name)} project.`,
208
- types: []
209
- }, reflection);
210
- });
211
- const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
212
- const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
213
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_builtin_file.BuiltinFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({
214
- id: "env",
215
- description: "The environment configuration module provides an interface to define environment configuration parameters."
216
- }, rest, {
217
- get imports() {
218
- return require_defu.defu({ "@powerlines/deepkit/vendor/type": [
219
- "stringify",
220
- "serializer",
221
- "serializeFunction",
222
- "deserializeFunction",
223
- "ReflectionKind",
224
- "Serializer",
225
- "TemplateState",
226
- "Type",
227
- "TypeProperty",
228
- "TypePropertySignature"
229
- ] }, rest.imports ?? {});
230
- },
231
- get children() {
232
- return [
233
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
234
- get when() {
235
- return Boolean(reflection);
236
- },
237
- get children() {
238
- return [
239
- (0, __alloy_js_core_jsx_runtime.createComponent)(EnvTypeDefinition, {
240
- get defaultValue() {
241
- return defaultValue.value;
242
- },
243
- reflection
244
- }),
245
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
246
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
247
- ];
248
- }
249
- }),
250
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_object.TypescriptObject, {
251
- name: "initialEnv",
252
- type: "Partial<EnvBase>",
253
- defaultValue,
254
- reflection: envInstance,
255
- "export": true,
256
- "const": true,
257
- doc: "The initial environment configuration object values for the runtime."
258
- }),
259
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
260
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
261
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
262
- heading: "The environment configuration serializer for the Powerlines application.",
263
- get children() {
264
- return [
265
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://deepkit.io/docs/serialization/serializers` }),
266
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918` }),
267
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This serializer is used to serialize and deserialize the Powerlines environment configuration.` })
268
- ];
269
- }
270
- }),
271
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ClassDeclaration, {
272
- refkey: envSerializerRefkey,
273
- name: "EnvSerializer",
274
- "extends": "Serializer",
275
- "export": true,
276
- get children() {
277
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ClassMethod, {
278
- name: "constructor",
279
- "public": true,
280
- doc: "Initializes a new instance of the `EnvSerializer` class.",
281
- children: __alloy_js_core.code`
282
- super("env");
283
-
284
- this.deserializeRegistry.register(
285
- ReflectionKind.boolean,
286
- (type: Type, state: TemplateState) => {
287
- state.addSetter(
288
- \`typeof \${state.accessor.toString()} !== "boolean" ? \${state.accessor.toString()} === 1 || \${state.accessor.toString()} === "1" || \${state.accessor.toString()}.toLowerCase() === "t" || \${state.accessor.toString()}.toLowerCase() === "true" || \${state.accessor.toString()}.toLowerCase() === "y" || \${state.accessor.toString()}.toLowerCase() === "yes" : \${state.accessor.toString()}\`
289
- );
290
- }
291
- );
292
- `
293
- });
294
- }
295
- }),
296
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
297
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
298
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
299
- heading: "A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.",
300
- get children() {
301
- return [
302
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://deepkit.io/docs/serialization/serializers` }),
303
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918` }),
304
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This serializer is used to serialize and deserialize the Powerlines environment configuration.` })
305
- ];
306
- }
307
- }),
308
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
309
- name: "envSerializer",
310
- "export": false,
311
- "const": true,
312
- get initializer() {
313
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.NewExpression, {
314
- args: [],
315
- target: "EnvSerializer"
316
- });
317
- }
318
- }),
319
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
320
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
321
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
322
- heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
323
- get children() {
324
- return [
325
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The resulting JSON object can be stringified using \`JSON.stringify()\`.` }),
326
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocExample, { children: `const json = serializeEnv(env);` }),
327
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocThrows, { children: `ValidationError when serialization or validation fails.` })
328
- ];
329
- }
330
- }),
331
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
332
- name: "serializeEnv",
333
- "export": true,
334
- "const": true,
335
- initializer: "serializeFunction<EnvBase>(envSerializer)"
336
- }),
337
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
338
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
339
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
340
- heading: "Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.",
341
- get children() {
342
- return [
343
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `Types that are already correct will be used as-is.` }),
344
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocExample, { children: `const env = deserializeEnv(json);` }),
345
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocThrows, { children: `ValidationError when deserialization fails.` })
346
- ];
347
- }
348
- }),
349
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
350
- name: "deserializeEnv",
351
- "export": true,
352
- "const": true,
353
- initializer: "deserializeFunction<EnvBase>(envSerializer)"
354
- }),
355
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
356
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
357
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
358
- heading: "Initializes the Powerlines environment configuration module.",
359
- get children() {
360
- return [
361
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
362
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
363
- name: "environmentConfig",
364
- children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
365
- }),
366
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocReturns, { children: `The initialized Powerlines configuration object.` })
367
- ];
368
- }
369
- }),
370
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
371
- get when() {
372
- return Boolean(context?.entryPath);
373
- },
374
- get children() {
375
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.FunctionDeclaration, {
376
- refkey: createEnvRefkey,
377
- async: false,
378
- "export": true,
379
- name: "createEnv",
380
- parameters: [{
381
- name: "environmentConfig",
382
- type: `Partial<Env>`,
383
- optional: false,
384
- default: "{}"
385
- }],
386
- returnType: "Env",
387
- get children() {
388
- return [
389
- __alloy_js_core.code`
390
- return new Proxy<Env>(
391
- deserializeEnv({
392
- ...initialEnv,
393
- ...environmentConfig
394
- }) as Env,
395
- {
396
- get: (target: EnvBase, propertyName: string) => { `,
397
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
398
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
399
- each: reflectionGetProperties,
400
- children: (property, index) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyGet, {
401
- index,
402
- context,
403
- property
404
- })
405
- }),
406
- __alloy_js_core.code`
407
- return undefined;
408
- }, `,
409
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
410
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
411
- __alloy_js_core.code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,
412
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
413
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
414
- each: reflectionSetProperties,
415
- ender: __alloy_js_core.code` else `,
416
- children: (property, index) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertySet, {
417
- index,
418
- context,
419
- property
420
- })
421
- }),
422
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
423
- __alloy_js_core.code`return false;
424
- }
425
- }
426
- );
427
- `
428
- ];
429
- }
430
- });
431
- }
432
- }),
433
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
434
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
435
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
436
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
437
- heading: "The environment configuration object.",
438
- get children() {
439
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This object provides access to the environment configuration parameters in the application runtime.` });
440
- }
441
- }),
442
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
443
- refkey: envRefkey,
444
- name: "env",
445
- type: "Env",
446
- "export": true,
447
- "const": true,
448
- get initializer() {
449
- return [__alloy_js_core.code`createEnv(${defaultConfig || "{}"} as Partial<Env>);`];
450
- }
451
- }),
452
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
453
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
454
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
455
- "export": true,
456
- "const": true,
457
- name: "isCI",
458
- doc: "Detect if the application is running in a continuous integration (CI) environment.",
459
- initializer: __alloy_js_core.code`Boolean(
460
- env.CI ||
461
- env.RUN_ID ||
462
- env.AGOLA_GIT_REF ||
463
- env.AC_APPCIRCLE ||
464
- env.APPVEYOR ||
465
- env.CODEBUILD ||
466
- env.TF_BUILD ||
467
- env.bamboo_planKey ||
468
- env.BITBUCKET_COMMIT ||
469
- env.BITRISE_IO ||
470
- env.BUDDY_WORKSPACE_ID ||
471
- env.BUILDKITE ||
472
- env.CIRCLECI ||
473
- env.CIRRUS_CI ||
474
- env.CF_BUILD_ID ||
475
- env.CM_BUILD_ID ||
476
- env.CI_NAME ||
477
- env.DRONE ||
478
- env.DSARI ||
479
- env.EARTHLY_CI ||
480
- env.EAS_BUILD ||
481
- env.GERRIT_PROJECT ||
482
- env.GITEA_ACTIONS ||
483
- env.GITHUB_ACTIONS ||
484
- env.GITLAB_CI ||
485
- env.GOCD ||
486
- env.BUILDER_OUTPUT ||
487
- env.HARNESS_BUILD_ID ||
488
- env.JENKINS_URL ||
489
- env.LAYERCI ||
490
- env.MAGNUM ||
491
- env.NETLIFY ||
492
- env.NEVERCODE ||
493
- env.PROW_JOB_ID ||
494
- env.RELEASE_BUILD_ID ||
495
- env.RENDER ||
496
- env.SAILCI ||
497
- env.HUDSON ||
498
- env.SCREWDRIVER ||
499
- env.SEMAPHORE ||
500
- env.SOURCEHUT ||
501
- env.STRIDER ||
502
- env.TASK_ID ||
503
- env.RUN_ID ||
504
- env.TEAMCITY_VERSION ||
505
- env.TRAVIS ||
506
- env.VELA ||
507
- env.NOW_BUILDER ||
508
- env.APPCENTER_BUILD_ID ||
509
- env.CI_XCODE_PROJECT ||
510
- env.XCS || false
511
- );
512
- `
513
- }),
514
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
515
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
516
- (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
517
- heading: "Detect the \\`mode\\` of the current runtime environment.",
518
- get children() {
519
- return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: __alloy_js_core.code`The \`mode\` is determined by the \`MODE\` environment variable, or falls back to the \`NEXT_PUBLIC_VERCEL_ENV\`, \`NODE_ENV\`, or defaults to \`production\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:
520
- - \`production\`
521
- - \`test\`
522
- - \`development\`
523
- ` });
524
- }
525
- }),
526
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
527
- "export": true,
528
- "const": true,
529
- name: "mode",
530
- initializer: __alloy_js_core.code`String(env.MODE) || "production"; `
531
- }),
532
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
533
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
534
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
535
- "export": true,
536
- "const": true,
537
- name: "isProduction",
538
- doc: "Detect if the application is running in `\"production\"` mode",
539
- initializer: __alloy_js_core.code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
540
- }),
541
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
542
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
543
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
544
- "export": true,
545
- "const": true,
546
- name: "isTest",
547
- doc: "Detect if the application is running in `\"test\"` mode",
548
- initializer: __alloy_js_core.code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
549
- }),
550
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
551
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
552
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
553
- "export": true,
554
- "const": true,
555
- name: "isDevelopment",
556
- doc: "Detect if the application is running in `\"development\"` mode",
557
- initializer: __alloy_js_core.code`["dev", "development"].includes(mode.toLowerCase()); `
558
- }),
559
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
560
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
561
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
562
- "export": true,
563
- "const": true,
564
- name: "isDebug",
565
- doc: "Detect if the application is currently being debugged",
566
- initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
567
- }),
568
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
569
- (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
570
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
571
- get when() {
572
- return Boolean(children);
573
- },
574
- children
575
- })
576
- ];
577
- }
578
- }));
579
- }
580
-
581
- //#endregion
582
- Object.defineProperty(exports, 'EnvBuiltin', {
583
- enumerable: true,
584
- get: function () {
585
- return EnvBuiltin;
586
- }
587
- });
588
- Object.defineProperty(exports, 'EnvTypeDefinition', {
589
- enumerable: true,
590
- get: function () {
591
- return EnvTypeDefinition;
592
- }
593
- });
@@ -1,23 +0,0 @@
1
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
2
- import { Children } from "@alloy-js/core";
3
- import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
4
- import { TypeScriptInterfaceProps } from "@powerlines/plugin-alloy/typescript/components/typescript-interface";
5
-
6
- //#region src/components/env.d.ts
7
-
8
- /**
9
- * Generates the environment configuration typescript definition for the Powerlines project.
10
- */
11
- declare function EnvTypeDefinition(props: Omit<TypeScriptInterfaceProps, "name">): Children;
12
- interface EnvBuiltinProps extends Omit<BuiltinFileProps, "id"> {
13
- defaultConfig?: Children;
14
- reflection: ReflectionClass<any>;
15
- }
16
- /**
17
- * Generates the environment configuration module for the Powerlines project.
18
- */
19
- declare function EnvBuiltin(props: EnvBuiltinProps): Children;
20
- declare type __ΩEnvBuiltinProps = any[];
21
- //#endregion
22
- export { __ΩEnvBuiltinProps as i, EnvBuiltinProps as n, EnvTypeDefinition as r, EnvBuiltin as t };
23
- //# sourceMappingURL=env-D0KBPuAd.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env-D0KBPuAd.d.mts","names":[],"sources":["../src/components/env.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAsEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,wBAAA,EAAA,MAAA,CAAA,CAAA,EAAiC,QAAjC;AAAL,UAqLQ,eAAA,SAAwB,IArLhC,CAqLqC,gBArLrC,EAAA,IAAA,CAAA,CAAA;EAAsC,aAAA,CAAA,EAsL7B,QAtL6B;EAAA,UAAA,EAuLjC,eAvLiC,CAAA,GAAA,CAAA;AAqL/C;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}