@powerlines/plugin-env 0.16.59 → 0.16.61

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 (215) hide show
  1. package/README.md +14 -16
  2. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
  3. package/dist/_virtual/{rolldown_runtime.mjs → _rolldown/runtime.mjs} +2 -3
  4. package/dist/babel/index.cjs +1 -0
  5. package/dist/babel/plugin.cjs +20 -19
  6. package/dist/babel/plugin.d.cts +0 -1
  7. package/dist/babel/plugin.d.cts.map +1 -1
  8. package/dist/babel/plugin.d.mts +0 -1
  9. package/dist/babel/plugin.d.mts.map +1 -1
  10. package/dist/babel/plugin.mjs +3 -3
  11. package/dist/babel/plugin.mjs.map +1 -1
  12. package/dist/components/docs.cjs +26 -25
  13. package/dist/components/docs.d.cts.map +1 -1
  14. package/dist/components/docs.d.mts.map +1 -1
  15. package/dist/components/docs.mjs +1 -1
  16. package/dist/components/env-builtin.cjs +155 -153
  17. package/dist/components/env-builtin.d.cts +0 -1
  18. package/dist/components/env-builtin.d.cts.map +1 -1
  19. package/dist/components/env-builtin.d.mts +0 -1
  20. package/dist/components/env-builtin.d.mts.map +1 -1
  21. package/dist/components/env-builtin.mjs +1 -1
  22. package/dist/components/index.cjs +1 -0
  23. package/dist/helpers/automd-generator.cjs +4 -3
  24. package/dist/helpers/automd-generator.d.cts +2 -3
  25. package/dist/helpers/automd-generator.d.cts.map +1 -1
  26. package/dist/helpers/automd-generator.d.mts +2 -3
  27. package/dist/helpers/automd-generator.d.mts.map +1 -1
  28. package/dist/helpers/automd-generator.mjs +1 -1
  29. package/dist/helpers/automd-generator.mjs.map +1 -1
  30. package/dist/helpers/create-reflection-resource.cjs +1 -0
  31. package/dist/helpers/create-reflection-resource.d.cts +0 -1
  32. package/dist/helpers/create-reflection-resource.d.cts.map +1 -1
  33. package/dist/helpers/create-reflection-resource.d.mts +0 -1
  34. package/dist/helpers/create-reflection-resource.d.mts.map +1 -1
  35. package/dist/helpers/create-reflection-resource.mjs.map +1 -1
  36. package/dist/helpers/docs-helper.cjs +4 -2
  37. package/dist/helpers/docs-helper.d.cts +0 -1
  38. package/dist/helpers/docs-helper.d.cts.map +1 -1
  39. package/dist/helpers/docs-helper.d.mts +0 -1
  40. package/dist/helpers/docs-helper.d.mts.map +1 -1
  41. package/dist/helpers/docs-helper.mjs +1 -1
  42. package/dist/helpers/docs-helper.mjs.map +1 -1
  43. package/dist/helpers/index.cjs +1 -0
  44. package/dist/helpers/load.cjs +19 -17
  45. package/dist/helpers/load.d.cts +0 -1
  46. package/dist/helpers/load.d.cts.map +1 -1
  47. package/dist/helpers/load.d.mts +0 -1
  48. package/dist/helpers/load.d.mts.map +1 -1
  49. package/dist/helpers/load.mjs +2 -2
  50. package/dist/helpers/load.mjs.map +1 -1
  51. package/dist/helpers/persistence.cjs +59 -58
  52. package/dist/helpers/persistence.d.cts +0 -1
  53. package/dist/helpers/persistence.d.cts.map +1 -1
  54. package/dist/helpers/persistence.d.mts +0 -1
  55. package/dist/helpers/persistence.d.mts.map +1 -1
  56. package/dist/helpers/persistence.mjs +15 -15
  57. package/dist/helpers/persistence.mjs.map +1 -1
  58. package/dist/helpers/reflect.cjs +40 -39
  59. package/dist/helpers/reflect.d.cts.map +1 -1
  60. package/dist/helpers/reflect.d.mts.map +1 -1
  61. package/dist/helpers/reflect.mjs +2 -2
  62. package/dist/helpers/reflect.mjs.map +1 -1
  63. package/dist/helpers/source-file-env.cjs +8 -7
  64. package/dist/helpers/source-file-env.d.cts.map +1 -1
  65. package/dist/helpers/source-file-env.d.mts.map +1 -1
  66. package/dist/helpers/source-file-env.mjs.map +1 -1
  67. package/dist/helpers/template-helpers.cjs +6 -5
  68. package/dist/helpers/template-helpers.d.cts +0 -1
  69. package/dist/helpers/template-helpers.d.cts.map +1 -1
  70. package/dist/helpers/template-helpers.d.mts +0 -1
  71. package/dist/helpers/template-helpers.d.mts.map +1 -1
  72. package/dist/helpers/template-helpers.mjs.map +1 -1
  73. package/dist/index.cjs +49 -49
  74. package/dist/index.d.cts +0 -1
  75. package/dist/index.d.cts.map +1 -1
  76. package/dist/index.d.mts +0 -1
  77. package/dist/index.d.mts.map +1 -1
  78. package/dist/index.mjs +5 -6
  79. package/dist/index.mjs.map +1 -1
  80. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs +7 -7
  81. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +6 -6
  82. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +1 -1
  83. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +6 -6
  84. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +6 -6
  85. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +1 -1
  86. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +3 -3
  87. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +3 -3
  88. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +1 -1
  89. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.cjs +655 -655
  90. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +655 -655
  91. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +1 -1
  92. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.cjs +179 -179
  93. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +179 -179
  94. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +1 -1
  95. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +188 -188
  96. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +188 -188
  97. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +1 -1
  98. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs +297 -297
  99. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +297 -297
  100. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +1 -1
  101. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.cjs +8 -8
  102. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +8 -8
  103. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +1 -1
  104. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.cjs +3 -3
  105. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +4 -4
  106. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +1 -1
  107. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +3 -3
  108. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +3 -3
  109. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +1 -1
  110. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.cjs +2 -2
  111. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +2 -2
  112. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +1 -1
  113. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.cjs +5 -5
  114. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +4 -4
  115. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +1 -1
  116. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.cjs +2 -2
  117. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -1
  118. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +1 -1
  119. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +18 -18
  120. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +2 -2
  121. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -1
  122. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +1 -1
  123. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -1
  124. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1308 -1311
  125. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1294 -1297
  126. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -1
  127. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +2194 -2194
  128. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +2193 -2193
  129. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -1
  130. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +3 -3
  131. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +2 -2
  132. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +3 -3
  133. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
  134. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -1
  135. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +2 -2
  136. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -1
  137. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +34 -34
  138. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +33 -33
  139. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -1
  140. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +221 -223
  141. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +220 -222
  142. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -1
  143. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +2 -2
  144. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -1
  145. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +2 -2
  146. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -1
  147. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.cjs +3 -3
  148. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +5 -5
  149. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +1 -1
  150. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +1 -1
  151. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +6 -6
  152. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +5 -5
  153. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -1
  154. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +10 -10
  155. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +16 -16
  156. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -1
  157. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +412 -412
  158. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +189 -189
  159. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -1
  160. package/dist/types/index.cjs +1 -0
  161. package/dist/types/plugin.cjs +20 -19
  162. package/dist/types/plugin.d.cts.map +1 -1
  163. package/dist/types/plugin.d.mts.map +1 -1
  164. package/dist/types/plugin.mjs.map +1 -1
  165. package/dist/types/runtime.cjs +1 -0
  166. package/dist/types/runtime.d.cts.map +1 -1
  167. package/dist/types/runtime.d.mts.map +1 -1
  168. package/dist/types/runtime.mjs.map +1 -1
  169. package/package.json +45 -26
  170. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
  171. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -38
  172. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
  174. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs +0 -15
  175. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
  176. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
  177. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -15
  178. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
  180. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
  181. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
  182. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -7
  183. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
  184. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
  185. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
  186. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
  187. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -20
  188. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
  190. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -64
  191. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
  192. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
  193. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -12
  194. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
  196. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -17
  197. package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
  198. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
  199. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -33
  200. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.cjs +0 -28
  202. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs +0 -29
  203. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
  204. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
  205. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
  206. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.cjs +0 -12
  208. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs +0 -9
  209. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
  210. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.cjs +0 -15
  211. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs +0 -15
  212. package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
  214. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -43
  215. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
@@ -4,7 +4,6 @@ import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components
4
4
  import { InterfaceDeclarationProps } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
5
5
 
6
6
  //#region src/components/env-builtin.d.ts
7
-
8
7
  /**
9
8
  * Generates the environment configuration typescript definition for the Powerlines project.
10
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"env-builtin.d.cts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAqEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAkL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;AAAA"}
@@ -4,7 +4,6 @@ import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components
4
4
  import { InterfaceDeclarationProps } from "@powerlines/plugin-alloy/typescript/components/interface-declaration";
5
5
 
6
6
  //#region src/components/env-builtin.d.ts
7
-
8
7
  /**
9
8
  * Generates the environment configuration typescript definition for the Powerlines project.
10
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAqEA;AACc,iBADE,iBAAA,CACF,KAAA,EAAL,IAAK,CAAA,yBAAA,EAAA,MAAA,CAAA,CAAA,EAAkC,QAAlC;AAAL,UAkLQ,eAAA,SAAwB,IAlLhC,CAkLqC,gBAlLrC,EAAA,IAAA,CAAA,CAAA;EAAuC,aAAA,CAAA,EAmL9B,QAnL8B;EAAA,UAAA,EAoLlC,eApLkC,CAAA,GAAA,CAAA;AAkLhD;;;;AAAyC,iBAYzB,UAAA,CAZyB,KAAA,EAYP,eAZO,CAAA,EAYQ,QAZR;AAAI,kCAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"env-builtin.d.mts","names":[],"sources":["../../src/components/env-builtin.tsx"],"mappings":";;;;;;;;AAqEA;iBAAgB,iBAAA,CACd,KAAA,EAAO,IAAA,CAAK,yBAAA,YAAkC,QAAA;AAAA,UAkL/B,eAAA,SAAwB,IAAA,CAAK,gBAAA;EAC5C,aAAA,GAAgB,QAAA;EAChB,UAAA,EAAY,eAAA;AAAA;;;;iBAUE,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;AAAA"}
@@ -1,7 +1,7 @@
1
- import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
2
1
  import { loadEnvFromContext } from "../helpers/load.mjs";
3
2
  import { ReflectionClass, ReflectionKind } from "@powerlines/deepkit/vendor/type";
4
3
  import { titleCase } from "@stryke/string-format/title-case";
4
+ import defu from "defu";
5
5
  import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
6
6
  import { For, Show, code, computed, splitProps } from "@alloy-js/core";
7
7
  import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_components_docs = require('./docs.cjs');
2
3
  const require_components_env_builtin = require('./env-builtin.cjs');
3
4
 
@@ -1,6 +1,7 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let powerlines = require("powerlines");
4
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
4
5
  let automd = require("automd");
5
6
 
6
7
  //#region src/helpers/automd-generator.ts
@@ -17,7 +18,7 @@ function __assignType(fn, args) {
17
18
  const env = __assignType((context) => (0, automd.defineGenerator)({
18
19
  name: "env",
19
20
  generate: __assignType(async function generate() {
20
- const envDocFile = require_join_paths.joinPaths(context.config.root, "docs", "generated", "env.md");
21
+ const envDocFile = (0, _stryke_path_join_paths.joinPaths)(context.config.root, "docs", "generated", "env.md");
21
22
  if (!context.fs.existsSync(envDocFile)) return { contents: "" };
22
23
  return { contents: await context.fs.read(envDocFile) || "" };
23
24
  }, ["generate", "P\"/!"])
@@ -1,15 +1,14 @@
1
1
  import { UnresolvedContext } from "powerlines";
2
- import * as automd0 from "automd";
2
+ import * as automd from "automd";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
5
-
6
5
  /**
7
6
  * AutoMD generator to generate environment variable documentation
8
7
  *
9
8
  * @param context - The generator context.
10
9
  * @returns The generated documentation content.
11
10
  */
12
- declare const env: (context: UnresolvedContext) => automd0.Generator;
11
+ declare const env: (context: UnresolvedContext) => automd.Generator;
13
12
  //#endregion
14
13
  export { env };
15
14
  //# sourceMappingURL=automd-generator.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"automd-generator.d.cts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;cAAa,eAAgB,sBAAiB,OAAA,CAAA"}
1
+ {"version":3,"file":"automd-generator.d.cts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"mappings":";;;;;;;AA4BA;;;cAAa,GAAA,GAAO,OAAA,EAAS,iBAAA,KAAiB,MAAA,CAAA,SAAA"}
@@ -1,15 +1,14 @@
1
1
  import { UnresolvedContext } from "powerlines";
2
- import * as automd0 from "automd";
2
+ import * as automd from "automd";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
5
-
6
5
  /**
7
6
  * AutoMD generator to generate environment variable documentation
8
7
  *
9
8
  * @param context - The generator context.
10
9
  * @returns The generated documentation content.
11
10
  */
12
- declare const env: (context: UnresolvedContext) => automd0.Generator;
11
+ declare const env: (context: UnresolvedContext) => automd.Generator;
13
12
  //#endregion
14
13
  export { env };
15
14
  //# sourceMappingURL=automd-generator.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"automd-generator.d.mts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;cAAa,eAAgB,sBAAiB,OAAA,CAAA"}
1
+ {"version":3,"file":"automd-generator.d.mts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"mappings":";;;;;;;AA4BA;;;cAAa,GAAA,GAAO,OAAA,EAAS,iBAAA,KAAiB,MAAA,CAAA,SAAA"}
@@ -1,5 +1,5 @@
1
- import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs";
2
1
  import { __ΩUnresolvedContext } from "powerlines";
2
+ import { joinPaths } from "@stryke/path/join-paths";
3
3
  import { defineGenerator } from "automd";
4
4
 
5
5
  //#region src/helpers/automd-generator.ts
@@ -1 +1 @@
1
- {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.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 { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate environment variable documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const env = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"env\",\n async generate() {\n const envDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"env.md\"\n );\n\n if (!context.fs.existsSync(envDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(envDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;;AAEA,SAAS,aAAa,IAAI,MAAM;;AAE5B,QAAO;;;;;;;;AA2BX,MAAa,MAAM,cAAE,YAAA,gBAAA;CACjB,MAAM;CACN,UAAU,aAAa,eAAA,WAAA;EACnB,MAAM,aAAA,UAAA,QAAA,OAAA,MAAA,QAAA,aAAA,SAAA;AACN,MAAI,CAAC,QAAM,GAAA,WAAA,WAAA,CACP,QAAG,EACR,UAAA;AAIC,SAAO,EACN,UAFM,MAAA,QAAA,GAAA,KAAA,WAAA,IAEN,IACH;;CAEL,CAAC,EAAE;OAAO;CAAsB;CAAW;CAAI;CAAQ,CAAA"}
1
+ {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.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 { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate environment variable documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const env = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"env\",\n async generate() {\n const envDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"env.md\"\n );\n\n if (!context.fs.existsSync(envDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(envDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;;AAEA,SAAS,aAAY,IAAK,MAAC;;AAE1B,QAAU;;;;;;;;AA2BX,MAAU,MAAS,cAAE,YAAA,gBAAA;CACjB,MAAE;CACF,UAAI,aAAmB,eAAA,WAAA;EACnB,MAAM,aAAA,UAAA,QAAA,OAAA,MAAA,QAAA,aAAA,SAAA;AACN,MAAC,CAAA,QAAU,GAAA,WAAA,WAAA,CACP,QAAG,EACR,UAAA;AAIC,SAAE,EACD,UAFM,MAAA,QAAA,GAAA,KAAA,WAAA,IAEN,IACH;;CAEL,CAAC,EAAE;OAAO;CAAkB;CAAe;CAAC;CAAW,CAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_types_plugin = require('../types/plugin.cjs');
2
3
 
3
4
  //#region src/helpers/create-reflection-resource.ts
@@ -1,7 +1,6 @@
1
1
  import { EnvPluginContext } from "../types/plugin.cjs";
2
2
 
3
3
  //#region src/helpers/create-reflection-resource.d.ts
4
-
5
4
  /**
6
5
  * Creates a reflection resource for the environment configuration.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"create-reflection-resource.d.cts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,gBAAA,WAA2B"}
1
+ {"version":3,"file":"create-reflection-resource.d.cts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,gBAAA,CAAiB,QAAA,EAAU,gBAAA"}
@@ -1,7 +1,6 @@
1
1
  import { EnvPluginContext } from "../types/plugin.mjs";
2
2
 
3
3
  //#region src/helpers/create-reflection-resource.d.ts
4
-
5
4
  /**
6
5
  * Creates a reflection resource for the environment configuration.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"create-reflection-resource.d.mts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,gBAAA,WAA2B"}
1
+ {"version":3,"file":"create-reflection-resource.d.mts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,gBAAA,CAAiB,QAAA,EAAU,gBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-reflection-resource.mjs","names":[],"sources":["../../src/helpers/create-reflection-resource.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 { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Creates a reflection resource for the environment configuration.\n *\n * @param _context - The environment plugin context.\n * @returns A resource that provides the reflection of the environment configuration.\n */\nexport function createReflection(_context: EnvPluginContext) {\n // const defaultValue = computed(\n // () => context && loadEnvFromContext(context, process.env)\n // );\n\n return {};\n\n // return computed(() => {\n // result.getProperties().forEach(prop => {\n // const aliases = prop.getAlias();\n // aliases.filter(Boolean).forEach(alias => {\n // result.addProperty({\n // name: alias,\n // optional: prop.isOptional() ? true : undefined,\n // readonly: prop.isReadonly() ? true : undefined,\n // description: prop.getDescription(),\n // visibility: prop.getVisibility(),\n // type: prop.getType(),\n // default: prop.getDefaultValue(),\n // tags: {\n // hidden: prop.isHidden(),\n // ignore: prop.isIgnored(),\n // internal: prop.isInternal(),\n // alias: prop\n // .getAlias()\n // .filter(a => a !== alias)\n // .concat(prop.name),\n // title: prop.getTitle() || titleCase(prop.name),\n // readonly: prop.isReadonly(),\n // permission: prop.getPermission(),\n // domain: prop.getDomain()\n // }\n // });\n // });\n // });\n\n // result.getProperties().forEach(prop => {\n // prop.setDefaultValue(\n // (defaultValue.value as Record<string, any>)?.[prop.getNameAsString()] ??\n // prop\n // .getAlias()\n // .reduce(\n // (ret, alias) =>\n // ret ?? (defaultValue.value as Record<string, any>)?.[alias],\n // undefined\n // ) ??\n // prop.getDefaultValue()\n // );\n // });\n // });\n}\n"],"mappings":";;;;;;;;;;AAYI,QAAO,EAAE;;AA4Cb,iBAAiB,SAAS;OAAO;CAAK;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"create-reflection-resource.mjs","names":[],"sources":["../../src/helpers/create-reflection-resource.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 { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Creates a reflection resource for the environment configuration.\n *\n * @param _context - The environment plugin context.\n * @returns A resource that provides the reflection of the environment configuration.\n */\nexport function createReflection(_context: EnvPluginContext) {\n // const defaultValue = computed(\n // () => context && loadEnvFromContext(context, process.env)\n // );\n\n return {};\n\n // return computed(() => {\n // result.getProperties().forEach(prop => {\n // const aliases = prop.getAlias();\n // aliases.filter(Boolean).forEach(alias => {\n // result.addProperty({\n // name: alias,\n // optional: prop.isOptional() ? true : undefined,\n // readonly: prop.isReadonly() ? true : undefined,\n // description: prop.getDescription(),\n // visibility: prop.getVisibility(),\n // type: prop.getType(),\n // default: prop.getDefaultValue(),\n // tags: {\n // hidden: prop.isHidden(),\n // ignore: prop.isIgnored(),\n // internal: prop.isInternal(),\n // alias: prop\n // .getAlias()\n // .filter(a => a !== alias)\n // .concat(prop.name),\n // title: prop.getTitle() || titleCase(prop.name),\n // readonly: prop.isReadonly(),\n // permission: prop.getPermission(),\n // domain: prop.getDomain()\n // }\n // });\n // });\n // });\n\n // result.getProperties().forEach(prop => {\n // prop.setDefaultValue(\n // (defaultValue.value as Record<string, any>)?.[prop.getNameAsString()] ??\n // prop\n // .getAlias()\n // .reduce(\n // (ret, alias) =>\n // ret ?? (defaultValue.value as Record<string, any>)?.[alias],\n // undefined\n // ) ??\n // prop.getDefaultValue()\n // );\n // });\n // });\n}\n"],"mappings":";;;;;;;;;;AAYC,QAAU,EAAE;;AA4Cb,iBAAe,SAAQ;OAAK;CAAU;CAAA;CAAA;CAAA;CAAA"}
@@ -1,5 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
1
3
  const require_types_plugin = require('../types/plugin.cjs');
2
- const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs');
4
+ let _stryke_path_join = require("@stryke/path/join");
3
5
 
4
6
  //#region src/helpers/docs-helper.ts
5
7
  /**
@@ -9,7 +11,7 @@ const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.19/n
9
11
  * @returns The output path for the generated environment documentation.
10
12
  */
11
13
  function getDocsOutputPath(context) {
12
- return require_join_paths.joinPaths(context.config.root, "docs", "generated");
14
+ return (0, _stryke_path_join.joinPaths)(context.config.root, "docs", "generated");
13
15
  }
14
16
  getDocsOutputPath.__type = [
15
17
  () => require_types_plugin.__ΩEnvPluginContext,
@@ -1,7 +1,6 @@
1
1
  import { EnvPluginContext } from "../types/plugin.cjs";
2
2
 
3
3
  //#region src/helpers/docs-helper.d.ts
4
-
5
4
  /**
6
5
  * Gets the output path for the generated environment documentation.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"docs-helper.d.cts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,iBAAA,UAA2B"}
1
+ {"version":3,"file":"docs-helper.d.cts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,iBAAA,CAAkB,OAAA,EAAS,gBAAA"}
@@ -1,7 +1,6 @@
1
1
  import { EnvPluginContext } from "../types/plugin.mjs";
2
2
 
3
3
  //#region src/helpers/docs-helper.d.ts
4
-
5
4
  /**
6
5
  * Gets the output path for the generated environment documentation.
7
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"docs-helper.d.mts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,iBAAA,UAA2B"}
1
+ {"version":3,"file":"docs-helper.d.mts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"mappings":";;;;;AA2BA;;;;iBAAgB,iBAAA,CAAkB,OAAA,EAAS,gBAAA"}
@@ -1,5 +1,5 @@
1
1
  import { __ΩEnvPluginContext } from "../types/plugin.mjs";
2
- import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs";
2
+ import { joinPaths } from "@stryke/path/join";
3
3
 
4
4
  //#region src/helpers/docs-helper.ts
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/helpers/docs-helper.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 { joinPaths } from \"@stryke/path/join\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param context - The environment plugin context.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(context: EnvPluginContext): string {\n return joinPaths(context.config.root, \"docs\", \"generated\");\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAE,kBAAA,SAAA;AACE,QAAO,UAAU,QAAQ,OAAO,MAAM,QAAQ,YAAY;;AAE9D,kBAAA,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/helpers/docs-helper.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 { joinPaths } from \"@stryke/path/join\";\nimport { EnvPluginContext } from \"../types/plugin\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param context - The environment plugin context.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(context: EnvPluginContext): string {\n return joinPaths(context.config.root, \"docs\", \"generated\");\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAE,kBAAA,SAAA;AACF,QAAO,UAAS,QAAA,OAAkB,MAAQ,QAAC,YAAmB;;AAE9D,kBAAA,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
@@ -1,3 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
2
  const require_helpers_reflect = require('./reflect.cjs');
2
3
  const require_helpers_persistence = require('./persistence.cjs');
3
4
  const require_helpers_template_helpers = require('./template-helpers.cjs');
@@ -1,13 +1,15 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
3
  const require_types_plugin = require('../types/plugin.cjs');
3
- const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs');
4
4
  const require_helpers_source_file_env = require('./source-file-env.cjs');
5
- const require_defu = require('../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs');
6
5
  const require_index = require('../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs');
7
6
  let powerlines = require("powerlines");
8
- let __stryke_env_load_env = require("@stryke/env/load-env");
9
- let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
10
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
7
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
8
+ let _stryke_env_load_env = require("@stryke/env/load-env");
9
+ let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
10
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
11
+ let defu = require("defu");
12
+ defu = require_runtime.__toESM(defu);
11
13
  let powerlines_utils = require("powerlines/utils");
12
14
 
13
15
  //#region src/helpers/load.ts
@@ -16,14 +18,14 @@ function __assignType(fn, args) {
16
18
  return fn;
17
19
  }
18
20
  async function loadEnvFiles(options, mode, cwd) {
19
- let env = await (0, __stryke_env_load_env.loadEnv)(cwd, mode);
21
+ let env = await (0, _stryke_env_load_env.loadEnv)(cwd, mode);
20
22
  if (options.additionalFiles && options.additionalFiles?.length > 0) {
21
- const additionalEnvFiles = await Promise.all(options.additionalFiles.map(__assignType(async (additionalEnvFile) => (0, __stryke_env_load_env.loadEnvFile)(additionalEnvFile, cwd), [
23
+ const additionalEnvFiles = await Promise.all(options.additionalFiles.map(__assignType(async (additionalEnvFile) => (0, _stryke_env_load_env.loadEnvFile)(additionalEnvFile, cwd), [
22
24
  "additionalEnvFile",
23
25
  "",
24
26
  "P\"2!\"/\""
25
27
  ])));
26
- for (const additionalEnvFile of additionalEnvFiles) env = require_defu.defu(additionalEnvFile, env);
28
+ for (const additionalEnvFile of additionalEnvFiles) env = (0, defu.default)(additionalEnvFile, env);
27
29
  }
28
30
  return require_helpers_source_file_env.removeEnvPrefix(env);
29
31
  }
@@ -49,11 +51,11 @@ async function loadEnvDirectory(options, directory, mode, cacheDir, packageJson,
49
51
  packageJson: true,
50
52
  dotenv: true,
51
53
  jitiOptions: {
52
- fsCache: require_join_paths.joinPaths(cacheDir, "jiti"),
54
+ fsCache: (0, _stryke_path_join_paths.joinPaths)(cacheDir, "jiti"),
53
55
  moduleCache: true
54
56
  }
55
57
  })]);
56
- return require_defu.defu(envResult, c12Result.config, workspaceConfig);
58
+ return (0, defu.default)(envResult, c12Result.config, workspaceConfig);
57
59
  }
58
60
  loadEnvDirectory.__type = [
59
61
  () => require_types_plugin.__ΩEnvPluginOptions,
@@ -75,26 +77,26 @@ loadEnvDirectory.__type = [
75
77
  * @returns An object containing the dotenv configuration.
76
78
  */
77
79
  function loadEnvFromContext(context, parsed) {
78
- return require_defu.defu({
79
- APP_NAME: (0, __stryke_string_format_kebab_case.kebabCase)(context.config.name || context.packageJson.name?.replace(`/${context.workspaceConfig.namespace}`, "")),
80
+ return (0, defu.default)({
81
+ APP_NAME: (0, _stryke_string_format_kebab_case.kebabCase)(context.config.name || context.packageJson.name?.replace(`/${context.workspaceConfig.namespace}`, "")),
80
82
  APP_VERSION: context.packageJson.version,
81
83
  BUILD_ID: context.meta.buildId,
82
84
  BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),
83
85
  BUILD_CHECKSUM: context.meta.checksum,
84
86
  RELEASE_ID: context.meta.releaseId,
85
- RELEASE_TAG: `${(0, __stryke_string_format_kebab_case.kebabCase)(context.config.name)}@${context.packageJson.version}`,
87
+ RELEASE_TAG: `${(0, _stryke_string_format_kebab_case.kebabCase)(context.config.name)}@${context.packageJson.version}`,
86
88
  DEFAULT_LOCALE: context.workspaceConfig.locale,
87
89
  DEFAULT_TIMEZONE: context.workspaceConfig.timezone,
88
90
  LOG_LEVEL: context.config.logLevel === "trace" ? "debug" : context.config.logLevel,
89
91
  ERROR_URL: context.workspaceConfig.error?.url,
90
- ORGANIZATION: context.config.organization || ((0, __stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization) ? context.workspaceConfig.organization.name : context.workspaceConfig.organization),
92
+ ORGANIZATION: context.config.organization || ((0, _stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization) ? context.workspaceConfig.organization.name : context.workspaceConfig.organization),
91
93
  PLATFORM: context.config.platform,
92
94
  MODE: context.config.mode,
93
95
  TEST: context.config.mode === "test",
94
96
  DEBUG: context.config.mode === "development",
95
97
  STACKTRACE: context.config.mode !== "production",
96
98
  ENVIRONMENT: !context.environment.name || context.environment.name === powerlines_utils.DEFAULT_ENVIRONMENT ? context.config.mode : context.environment.name
97
- }, (0, __stryke_type_checks_is_set_object.isSetObject)(context?.env?.types?.env) ? context.env.types.env?.getProperties().reduce(__assignType((ret, prop) => {
99
+ }, (0, _stryke_type_checks_is_set_object.isSetObject)(context?.env?.types?.env) ? context.env.types.env?.getProperties().reduce(__assignType((ret, prop) => {
98
100
  ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();
99
101
  return ret;
100
102
  }, [
@@ -118,7 +120,7 @@ async function loadEnv(context, options) {
118
120
  (loadEnvDirectory.Ω = [["!"]], loadEnvDirectory(options, context.workspaceConfig.workspaceRoot, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig)),
119
121
  (loadEnvDirectory.Ω = [["!"]], loadEnvDirectory(options, context.envPaths.config, context.config.mode, context.cachePath, context.packageJson, context.workspaceConfig))
120
122
  ]);
121
- return require_defu.defu(loadEnvFromContext(context, process.env), project, workspace, config);
123
+ return (0, defu.default)(loadEnvFromContext(context, process.env), project, workspace, config);
122
124
  }
123
125
  loadEnv.__type = [
124
126
  () => require_types_plugin.__ΩEnvPluginContext,
@@ -2,7 +2,6 @@ import { EnvPluginContext, EnvPluginOptions } from "../types/plugin.cjs";
2
2
  import { DotenvParseOutput } from "@stryke/env/types";
3
3
 
4
4
  //#region src/helpers/load.d.ts
5
-
6
5
  /**
7
6
  * Retrieves various dotenv configuration parameters from the context.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgGA;AAoDA;;;;AAEsC,iBAtDtB,kBAAA,CAsDsB,OAAA,EArD3B,gBAqD2B,EAAA,MAAA,EApD5B,iBAoD4B,CAAA,EAAA;EAA2B,QAAA,EAAA,MAAA,GAAA,SAAA;EAAR,WAAA,EAAA,MAAA,GAAA,SAAA;EAAO,QAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;iBAF1C,qBACP,oBAAoB,4BACxB,2BAA2B,mBAAmB,QAAQ"}
1
+ {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;;;;;;;;;;;;;;;;;;;;iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -2,7 +2,6 @@ import { EnvPluginContext, EnvPluginOptions } from "../types/plugin.mjs";
2
2
  import { DotenvParseOutput } from "@stryke/env/types";
3
3
 
4
4
  //#region src/helpers/load.d.ts
5
-
6
5
  /**
7
6
  * Retrieves various dotenv configuration parameters from the context.
8
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgGA;AAoDA;;;;AAEsC,iBAtDtB,kBAAA,CAsDsB,OAAA,EArD3B,gBAqD2B,EAAA,MAAA,EApD5B,iBAoD4B,CAAA,EAAA;EAA2B,QAAA,EAAA,MAAA,GAAA,SAAA;EAAR,WAAA,EAAA,MAAA,GAAA,SAAA;EAAO,QAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;iBAF1C,qBACP,oBAAoB,4BACxB,2BAA2B,mBAAmB,QAAQ"}
1
+ {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;AAgGA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA;;;;;;;;;;;;;;;;;;;;iBAkDY,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -1,12 +1,12 @@
1
1
  import { __ΩEnvPluginContext, __ΩEnvPluginOptions } from "../types/plugin.mjs";
2
- import { joinPaths } from "../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs";
3
2
  import { removeEnvPrefix } from "./source-file-env.mjs";
4
- import { defu } from "../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs";
5
3
  import { loadConfig } from "../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs";
6
4
  import { __ΩWorkspaceConfig } from "powerlines";
5
+ import { joinPaths } from "@stryke/path/join-paths";
7
6
  import { loadEnv as loadEnv$1, loadEnvFile } from "@stryke/env/load-env";
8
7
  import { kebabCase } from "@stryke/string-format/kebab-case";
9
8
  import { isSetObject } from "@stryke/type-checks/is-set-object";
9
+ import defu from "defu";
10
10
  import { DEFAULT_ENVIRONMENT } from "powerlines/utils";
11
11
 
12
12
  //#region src/helpers/load.ts
@@ -1 +1 @@
1
- {"version":3,"file":"load.mjs","names":[],"sources":["../../src/helpers/load.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 {\n loadEnv as loadEnvBase,\n loadEnvFile as loadEnvFileBase\n} from \"@stryke/env/load-env\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig } from \"c12\";\nimport defu from \"defu\";\nimport { WorkspaceConfig } from \"powerlines\";\nimport { DEFAULT_ENVIRONMENT } from \"powerlines/utils\";\nimport { EnvPluginContext, EnvPluginOptions } from \"../types/plugin\";\nimport { removeEnvPrefix } from \"./source-file-env\";\n\nasync function loadEnvFiles<TEnv extends DotenvParseOutput = DotenvParseOutput>(\n options: EnvPluginOptions,\n mode: string,\n cwd: string\n): Promise<TEnv> {\n let env = await loadEnvBase(cwd, mode);\n if (options.additionalFiles && options.additionalFiles?.length > 0) {\n const additionalEnvFiles = await Promise.all(\n options.additionalFiles.map(async additionalEnvFile =>\n loadEnvFileBase(additionalEnvFile, cwd)\n )\n );\n\n for (const additionalEnvFile of additionalEnvFiles) {\n env = defu(additionalEnvFile, env);\n }\n }\n\n return removeEnvPrefix(env) as TEnv;\n}\n\nasync function loadEnvDirectory<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(\n options: EnvPluginOptions,\n directory: string,\n mode: string,\n cacheDir: string,\n packageJson: PackageJson,\n workspaceConfig: WorkspaceConfig\n): Promise<TEnv> {\n const [envResult, c12Result] = await Promise.all([\n loadEnvFiles<TEnv>(options, mode, directory),\n loadConfig({\n cwd: directory,\n name: \"storm\",\n envName: mode,\n defaults: {\n NAME: packageJson.name?.replace(`@${workspaceConfig.namespace}/`, \"\"),\n MODE: mode,\n ORG: workspaceConfig.organization\n },\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jitiOptions: {\n fsCache: joinPaths(cacheDir, \"jiti\"),\n moduleCache: true\n }\n })\n ]);\n\n return defu(envResult as any, c12Result.config, workspaceConfig) as TEnv;\n}\n\n/**\n * Retrieves various dotenv configuration parameters from the context.\n *\n * @param context - The context to retrieve the dotenv configuration from.\n * @param parsed - The parsed dotenv configuration.\n * @returns An object containing the dotenv configuration.\n */\nexport function loadEnvFromContext(\n context: EnvPluginContext,\n parsed: DotenvParseOutput\n) {\n return defu(\n {\n APP_NAME: kebabCase(\n context.config.name ||\n context.packageJson.name?.replace(\n `/${context.workspaceConfig.namespace}`,\n \"\"\n )\n ),\n APP_VERSION: context.packageJson.version,\n BUILD_ID: context.meta.buildId,\n BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),\n BUILD_CHECKSUM: context.meta.checksum,\n RELEASE_ID: context.meta.releaseId,\n RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,\n DEFAULT_LOCALE: context.workspaceConfig.locale,\n DEFAULT_TIMEZONE: context.workspaceConfig.timezone,\n LOG_LEVEL:\n context.config.logLevel === \"trace\" ? \"debug\" : context.config.logLevel,\n ERROR_URL: context.workspaceConfig.error?.url,\n ORGANIZATION:\n context.config.organization ||\n (isSetObject(context.workspaceConfig.organization)\n ? context.workspaceConfig.organization.name\n : context.workspaceConfig.organization),\n PLATFORM: context.config.platform,\n MODE: context.config.mode,\n TEST: context.config.mode === \"test\",\n DEBUG: context.config.mode === \"development\",\n STACKTRACE: context.config.mode !== \"production\",\n ENVIRONMENT:\n !context.environment.name ||\n context.environment.name === DEFAULT_ENVIRONMENT\n ? context.config.mode\n : context.environment.name\n },\n isSetObject(context?.env?.types?.env)\n ? context.env.types.env?.getProperties().reduce(\n (ret, prop) => {\n ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();\n return ret;\n },\n {} as Record<string, any>\n )\n : {}\n );\n}\n\nexport async function loadEnv<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv> {\n const [project, workspace, config] = await Promise.all([\n loadEnvDirectory<TEnv>(\n options,\n context.config.root,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.workspaceConfig.workspaceRoot,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.envPaths.config,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n )\n ]);\n\n return defu(\n loadEnvFromContext(context, process.env),\n project,\n workspace,\n config\n ) as TEnv;\n}\n"],"mappings":";;;;;;;;;;;;AAMA,SAAS,aAAa,IAAI,MAAM;AAC5B,IAAG,SAAS;;;AA4BhB,eAAe,aAAY,SAAA,MAAA,KAAA;CACvB,IAAI,M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AC;AACF,QAAO,KAAK,mBAAmB,SAAS,QAAQ,IAAI,EAAE,SAAS,WAAW,OAAC;;AAE/E,QAAQ,SAAS;OAAC;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"load.mjs","names":[],"sources":["../../src/helpers/load.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 {\n loadEnv as loadEnvBase,\n loadEnvFile as loadEnvFileBase\n} from \"@stryke/env/load-env\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig } from \"c12\";\nimport defu from \"defu\";\nimport { WorkspaceConfig } from \"powerlines\";\nimport { DEFAULT_ENVIRONMENT } from \"powerlines/utils\";\nimport { EnvPluginContext, EnvPluginOptions } from \"../types/plugin\";\nimport { removeEnvPrefix } from \"./source-file-env\";\n\nasync function loadEnvFiles<TEnv extends DotenvParseOutput = DotenvParseOutput>(\n options: EnvPluginOptions,\n mode: string,\n cwd: string\n): Promise<TEnv> {\n let env = await loadEnvBase(cwd, mode);\n if (options.additionalFiles && options.additionalFiles?.length > 0) {\n const additionalEnvFiles = await Promise.all(\n options.additionalFiles.map(async additionalEnvFile =>\n loadEnvFileBase(additionalEnvFile, cwd)\n )\n );\n\n for (const additionalEnvFile of additionalEnvFiles) {\n env = defu(additionalEnvFile, env);\n }\n }\n\n return removeEnvPrefix(env) as TEnv;\n}\n\nasync function loadEnvDirectory<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(\n options: EnvPluginOptions,\n directory: string,\n mode: string,\n cacheDir: string,\n packageJson: PackageJson,\n workspaceConfig: WorkspaceConfig\n): Promise<TEnv> {\n const [envResult, c12Result] = await Promise.all([\n loadEnvFiles<TEnv>(options, mode, directory),\n loadConfig({\n cwd: directory,\n name: \"storm\",\n envName: mode,\n defaults: {\n NAME: packageJson.name?.replace(`@${workspaceConfig.namespace}/`, \"\"),\n MODE: mode,\n ORG: workspaceConfig.organization\n },\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jitiOptions: {\n fsCache: joinPaths(cacheDir, \"jiti\"),\n moduleCache: true\n }\n })\n ]);\n\n return defu(envResult as any, c12Result.config, workspaceConfig) as TEnv;\n}\n\n/**\n * Retrieves various dotenv configuration parameters from the context.\n *\n * @param context - The context to retrieve the dotenv configuration from.\n * @param parsed - The parsed dotenv configuration.\n * @returns An object containing the dotenv configuration.\n */\nexport function loadEnvFromContext(\n context: EnvPluginContext,\n parsed: DotenvParseOutput\n) {\n return defu(\n {\n APP_NAME: kebabCase(\n context.config.name ||\n context.packageJson.name?.replace(\n `/${context.workspaceConfig.namespace}`,\n \"\"\n )\n ),\n APP_VERSION: context.packageJson.version,\n BUILD_ID: context.meta.buildId,\n BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),\n BUILD_CHECKSUM: context.meta.checksum,\n RELEASE_ID: context.meta.releaseId,\n RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,\n DEFAULT_LOCALE: context.workspaceConfig.locale,\n DEFAULT_TIMEZONE: context.workspaceConfig.timezone,\n LOG_LEVEL:\n context.config.logLevel === \"trace\" ? \"debug\" : context.config.logLevel,\n ERROR_URL: context.workspaceConfig.error?.url,\n ORGANIZATION:\n context.config.organization ||\n (isSetObject(context.workspaceConfig.organization)\n ? context.workspaceConfig.organization.name\n : context.workspaceConfig.organization),\n PLATFORM: context.config.platform,\n MODE: context.config.mode,\n TEST: context.config.mode === \"test\",\n DEBUG: context.config.mode === \"development\",\n STACKTRACE: context.config.mode !== \"production\",\n ENVIRONMENT:\n !context.environment.name ||\n context.environment.name === DEFAULT_ENVIRONMENT\n ? context.config.mode\n : context.environment.name\n },\n isSetObject(context?.env?.types?.env)\n ? context.env.types.env?.getProperties().reduce(\n (ret, prop) => {\n ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();\n return ret;\n },\n {} as Record<string, any>\n )\n : {}\n );\n}\n\nexport async function loadEnv<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv> {\n const [project, workspace, config] = await Promise.all([\n loadEnvDirectory<TEnv>(\n options,\n context.config.root,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.workspaceConfig.workspaceRoot,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n options,\n context.envPaths.config,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n context.workspaceConfig\n )\n ]);\n\n return defu(\n loadEnvFromContext(context, process.env),\n project,\n workspace,\n config\n ) as TEnv;\n}\n"],"mappings":";;;;;;;;;;;;AAMA,SAAS,aAAY,IAAI,MAAO;AAC5B,IAAC,SAAU;;;AA4Bf,eAAW,aAAgB,SAAA,MAAA,KAAA;CACzB,IAAM,MAAM,MAAA,UAAA,KAAA,KAAA;AACZ,KAAK,QAAA,mBAAA,QAAA,iBAAA,SAAA,GAAA;EACJ,MAAQ,qBAAM,MAAA,QAAA,IAAA,QAAA,gBAAA,IAAA,aAAA,OAAA,sBAAA,YAAA,mBAAA,IAAA,EAAA;GAAA;GAAA;GAAA;GAAA,CAAA,CAAA,CAAA;AACX,OAAM,MAAM,qBAAsB,mBAClC,OAAQ,KAAA,mBAA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