@powerlines/plugin-env 0.16.50 → 0.16.52

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 (209) hide show
  1. package/dist/babel/plugin.mjs +1 -2
  2. package/dist/components/docs.cjs +1 -1
  3. package/dist/components/docs.mjs +2 -3
  4. package/dist/components/env-builtin.mjs +1 -2
  5. package/dist/helpers/automd-generator.cjs +1 -1
  6. package/dist/helpers/automd-generator.mjs +2 -3
  7. package/dist/helpers/create-reflection-resource.mjs +1 -2
  8. package/dist/helpers/docs-helper.cjs +1 -1
  9. package/dist/helpers/docs-helper.mjs +2 -3
  10. package/dist/helpers/load.cjs +1 -1
  11. package/dist/helpers/load.mjs +2 -3
  12. package/dist/helpers/persistence.cjs +1 -1
  13. package/dist/helpers/persistence.mjs +2 -3
  14. package/dist/helpers/reflect.cjs +2 -2
  15. package/dist/helpers/reflect.mjs +3 -4
  16. package/dist/helpers/source-file-env.mjs +1 -2
  17. package/dist/helpers/template-helpers.mjs +1 -2
  18. package/dist/index.cjs +3 -3
  19. package/dist/index.mjs +4 -5
  20. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/parse-type-definition.cjs +1 -1
  21. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/parse-type-definition.mjs +2 -3
  22. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/to-array.cjs +1 -1
  23. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/to-array.mjs +2 -3
  24. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +1 -1
  25. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +2 -3
  26. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +1 -1
  27. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +2 -3
  28. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +1 -1
  29. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +2 -3
  30. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +1 -1
  31. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +2 -3
  32. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +1 -1
  33. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +2 -3
  34. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +1 -1
  35. package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +2 -3
  36. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-parent-path.cjs +1 -1
  37. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-parent-path.mjs +2 -3
  38. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-type.cjs +1 -1
  39. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/is-type.mjs +2 -3
  40. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/join-paths.cjs +1 -1
  41. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/join-paths.mjs +2 -3
  42. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/regex.cjs +1 -1
  43. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/regex.mjs +2 -3
  44. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/slash.cjs +1 -1
  45. package/dist/node_modules/.pnpm/{@stryke_path@0.26.17 → @stryke_path@0.26.19}/node_modules/@stryke/path/dist/slash.mjs +2 -3
  46. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +1 -2
  47. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +1 -2
  48. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +1 -2
  49. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +1 -2
  50. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +1 -2
  51. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +1 -2
  52. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +1 -2
  53. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +1 -2
  54. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +1 -2
  55. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +1 -2
  56. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs +1 -2
  57. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +1 -2
  58. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +1 -2
  59. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +1 -2
  60. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +1 -2
  61. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -2
  62. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +1 -2
  63. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -2
  64. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1 -2
  65. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +1 -2
  66. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +1 -2
  67. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +1 -2
  68. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -2
  69. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +1 -2
  70. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +1 -2
  71. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -2
  72. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -2
  73. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +1 -2
  74. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +1 -2
  75. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +1 -2
  76. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +1 -2
  77. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +1 -2
  78. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +1 -2
  79. package/dist/types/plugin.mjs +1 -2
  80. package/dist/types/runtime.mjs +1 -2
  81. package/package.json +18 -18
  82. package/dist/babel/index.d.cts +0 -2
  83. package/dist/babel/index.d.mts +0 -2
  84. package/dist/babel/plugin.d.cts +0 -9
  85. package/dist/babel/plugin.d.cts.map +0 -1
  86. package/dist/babel/plugin.d.mts +0 -9
  87. package/dist/babel/plugin.d.mts.map +0 -1
  88. package/dist/babel/plugin.mjs.map +0 -1
  89. package/dist/components/docs.d.cts +0 -25
  90. package/dist/components/docs.d.cts.map +0 -1
  91. package/dist/components/docs.d.mts +0 -25
  92. package/dist/components/docs.d.mts.map +0 -1
  93. package/dist/components/docs.mjs.map +0 -1
  94. package/dist/components/env-builtin.d.cts +0 -23
  95. package/dist/components/env-builtin.d.cts.map +0 -1
  96. package/dist/components/env-builtin.d.mts +0 -23
  97. package/dist/components/env-builtin.d.mts.map +0 -1
  98. package/dist/components/env-builtin.mjs.map +0 -1
  99. package/dist/components/index.d.cts +0 -3
  100. package/dist/components/index.d.mts +0 -3
  101. package/dist/helpers/automd-generator.d.cts +0 -15
  102. package/dist/helpers/automd-generator.d.cts.map +0 -1
  103. package/dist/helpers/automd-generator.d.mts +0 -15
  104. package/dist/helpers/automd-generator.d.mts.map +0 -1
  105. package/dist/helpers/automd-generator.mjs.map +0 -1
  106. package/dist/helpers/create-reflection-resource.d.cts +0 -14
  107. package/dist/helpers/create-reflection-resource.d.cts.map +0 -1
  108. package/dist/helpers/create-reflection-resource.d.mts +0 -14
  109. package/dist/helpers/create-reflection-resource.d.mts.map +0 -1
  110. package/dist/helpers/create-reflection-resource.mjs.map +0 -1
  111. package/dist/helpers/docs-helper.d.cts +0 -14
  112. package/dist/helpers/docs-helper.d.cts.map +0 -1
  113. package/dist/helpers/docs-helper.d.mts +0 -14
  114. package/dist/helpers/docs-helper.d.mts.map +0 -1
  115. package/dist/helpers/docs-helper.mjs.map +0 -1
  116. package/dist/helpers/index.d.cts +0 -7
  117. package/dist/helpers/index.d.mts +0 -7
  118. package/dist/helpers/load.d.cts +0 -36
  119. package/dist/helpers/load.d.cts.map +0 -1
  120. package/dist/helpers/load.d.mts +0 -36
  121. package/dist/helpers/load.d.mts.map +0 -1
  122. package/dist/helpers/load.mjs.map +0 -1
  123. package/dist/helpers/persistence.d.cts +0 -85
  124. package/dist/helpers/persistence.d.cts.map +0 -1
  125. package/dist/helpers/persistence.d.mts +0 -85
  126. package/dist/helpers/persistence.d.mts.map +0 -1
  127. package/dist/helpers/persistence.mjs.map +0 -1
  128. package/dist/helpers/reflect.d.cts +0 -69
  129. package/dist/helpers/reflect.d.cts.map +0 -1
  130. package/dist/helpers/reflect.d.mts +0 -69
  131. package/dist/helpers/reflect.d.mts.map +0 -1
  132. package/dist/helpers/reflect.mjs.map +0 -1
  133. package/dist/helpers/source-file-env.d.cts +0 -9
  134. package/dist/helpers/source-file-env.d.cts.map +0 -1
  135. package/dist/helpers/source-file-env.d.mts +0 -9
  136. package/dist/helpers/source-file-env.d.mts.map +0 -1
  137. package/dist/helpers/source-file-env.mjs.map +0 -1
  138. package/dist/helpers/template-helpers.d.cts +0 -16
  139. package/dist/helpers/template-helpers.d.cts.map +0 -1
  140. package/dist/helpers/template-helpers.d.mts +0 -16
  141. package/dist/helpers/template-helpers.d.mts.map +0 -1
  142. package/dist/helpers/template-helpers.mjs.map +0 -1
  143. package/dist/index.d.cts +0 -18
  144. package/dist/index.d.cts.map +0 -1
  145. package/dist/index.d.mts +0 -18
  146. package/dist/index.d.mts.map +0 -1
  147. package/dist/index.mjs.map +0 -1
  148. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
  150. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
  152. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
  154. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/@stryke_convert@0.6.51/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
  156. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
  158. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
  160. package/dist/node_modules/.pnpm/@stryke_path@0.26.17/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +0 -1
  162. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
  164. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +0 -1
  166. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +0 -1
  168. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +0 -1
  170. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs.map +0 -1
  172. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
  174. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +0 -1
  176. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
  178. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +0 -1
  180. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +0 -1
  182. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
  184. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +0 -1
  186. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +0 -1
  188. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +0 -1
  190. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
  192. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +0 -1
  194. package/dist/types/index.d.cts +0 -3
  195. package/dist/types/index.d.mts +0 -3
  196. package/dist/types/plugin.d.cts +0 -168
  197. package/dist/types/plugin.d.cts.map +0 -1
  198. package/dist/types/plugin.d.mts +0 -168
  199. package/dist/types/plugin.d.mts.map +0 -1
  200. package/dist/types/plugin.mjs.map +0 -1
  201. package/dist/types/runtime.d.cts +0 -792
  202. package/dist/types/runtime.d.cts.map +0 -1
  203. package/dist/types/runtime.d.mts +0 -792
  204. package/dist/types/runtime.d.mts.map +0 -1
  205. package/dist/types/runtime.mjs.map +0 -1
  206. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
  207. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
  208. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
  209. /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.51 → @stryke_convert@0.6.53}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
@@ -1,15 +0,0 @@
1
- import { UnresolvedContext } from "powerlines";
2
- import * as automd0 from "automd";
3
-
4
- //#region src/helpers/automd-generator.d.ts
5
-
6
- /**
7
- * AutoMD generator to generate environment variable documentation
8
- *
9
- * @param context - The generator context.
10
- * @returns The generated documentation content.
11
- */
12
- declare const env: (context: UnresolvedContext) => automd0.Generator;
13
- //#endregion
14
- export { env };
15
- //# sourceMappingURL=automd-generator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automd-generator.d.mts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;cAAa,eAAgB,sBAAiB,OAAA,CAAA"}
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { EnvPluginContext } from "../types/plugin.cjs";
2
-
3
- //#region src/helpers/create-reflection-resource.d.ts
4
-
5
- /**
6
- * Creates a reflection resource for the environment configuration.
7
- *
8
- * @param _context - The environment plugin context.
9
- * @returns A resource that provides the reflection of the environment configuration.
10
- */
11
- declare function createReflection(_context: EnvPluginContext): {};
12
- //#endregion
13
- export { createReflection };
14
- //# sourceMappingURL=create-reflection-resource.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-reflection-resource.d.cts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,gBAAA,WAA2B"}
@@ -1,14 +0,0 @@
1
- import { EnvPluginContext } from "../types/plugin.mjs";
2
-
3
- //#region src/helpers/create-reflection-resource.d.ts
4
-
5
- /**
6
- * Creates a reflection resource for the environment configuration.
7
- *
8
- * @param _context - The environment plugin context.
9
- * @returns A resource that provides the reflection of the environment configuration.
10
- */
11
- declare function createReflection(_context: EnvPluginContext): {};
12
- //#endregion
13
- export { createReflection };
14
- //# sourceMappingURL=create-reflection-resource.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-reflection-resource.d.mts","names":[],"sources":["../../src/helpers/create-reflection-resource.ts"],"sourcesContent":[],"mappings":";;;;;;AA0BA;;;;iBAAgB,gBAAA,WAA2B"}
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { EnvPluginContext } from "../types/plugin.cjs";
2
-
3
- //#region src/helpers/docs-helper.d.ts
4
-
5
- /**
6
- * Gets the output path for the generated environment documentation.
7
- *
8
- * @param context - The environment plugin context.
9
- * @returns The output path for the generated environment documentation.
10
- */
11
- declare function getDocsOutputPath(context: EnvPluginContext): string;
12
- //#endregion
13
- export { getDocsOutputPath };
14
- //# sourceMappingURL=docs-helper.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docs-helper.d.cts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,iBAAA,UAA2B"}
@@ -1,14 +0,0 @@
1
- import { EnvPluginContext } from "../types/plugin.mjs";
2
-
3
- //#region src/helpers/docs-helper.d.ts
4
-
5
- /**
6
- * Gets the output path for the generated environment documentation.
7
- *
8
- * @param context - The environment plugin context.
9
- * @returns The output path for the generated environment documentation.
10
- */
11
- declare function getDocsOutputPath(context: EnvPluginContext): string;
12
- //#endregion
13
- export { getDocsOutputPath };
14
- //# sourceMappingURL=docs-helper.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docs-helper.d.mts","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":[],"mappings":";;;;;;AA2BA;;;;iBAAgB,iBAAA,UAA2B"}
@@ -1 +0,0 @@
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,7 +0,0 @@
1
- import { createReflection } from "./create-reflection-resource.cjs";
2
- import { loadEnv, loadEnvFromContext } from "./load.cjs";
3
- import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./persistence.cjs";
4
- import { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from "./reflect.cjs";
5
- import { formatEnvField, removeEnvPrefix } from "./source-file-env.cjs";
6
- import { createTemplateReflection } from "./template-helpers.cjs";
7
- export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
@@ -1,7 +0,0 @@
1
- import { createReflection } from "./create-reflection-resource.mjs";
2
- import { loadEnv, loadEnvFromContext } from "./load.mjs";
3
- import { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection } from "./persistence.mjs";
4
- import { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from "./reflect.mjs";
5
- import { formatEnvField, removeEnvPrefix } from "./source-file-env.mjs";
6
- import { createTemplateReflection } from "./template-helpers.mjs";
7
- export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createReflection, createSecretsReflection, createTemplateReflection, formatEnvField, getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, loadEnv, loadEnvFromContext, mergeEnvReflections, mergeSecretsReflections, readEnvReflection, readEnvTypeReflection, readSecretsReflection, reflectEnv, reflectSecrets, removeEnvPrefix, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
@@ -1,36 +0,0 @@
1
- import { EnvPluginContext, EnvPluginOptions } from "../types/plugin.cjs";
2
- import { DotenvParseOutput } from "@stryke/env/types";
3
-
4
- //#region src/helpers/load.d.ts
5
-
6
- /**
7
- * Retrieves various dotenv configuration parameters from the context.
8
- *
9
- * @param context - The context to retrieve the dotenv configuration from.
10
- * @param parsed - The parsed dotenv configuration.
11
- * @returns An object containing the dotenv configuration.
12
- */
13
- declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
14
- APP_NAME: string | undefined;
15
- APP_VERSION: string | undefined;
16
- BUILD_ID: string;
17
- BUILD_TIMESTAMP: string;
18
- BUILD_CHECKSUM: string;
19
- RELEASE_ID: string;
20
- RELEASE_TAG: string;
21
- DEFAULT_LOCALE: string | undefined;
22
- DEFAULT_TIMEZONE: string | undefined;
23
- LOG_LEVEL: "error" | "warn" | "info" | "debug" | null;
24
- ERROR_URL: string | undefined;
25
- ORGANIZATION: string | undefined;
26
- PLATFORM: "node" | "browser" | "neutral";
27
- MODE: "development" | "test" | "production";
28
- TEST: boolean;
29
- DEBUG: boolean;
30
- STACKTRACE: boolean;
31
- ENVIRONMENT: string;
32
- };
33
- declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
34
- //#endregion
35
- export { loadEnv, loadEnvFromContext };
36
- //# sourceMappingURL=load.d.cts.map
@@ -1 +0,0 @@
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,36 +0,0 @@
1
- import { EnvPluginContext, EnvPluginOptions } from "../types/plugin.mjs";
2
- import { DotenvParseOutput } from "@stryke/env/types";
3
-
4
- //#region src/helpers/load.d.ts
5
-
6
- /**
7
- * Retrieves various dotenv configuration parameters from the context.
8
- *
9
- * @param context - The context to retrieve the dotenv configuration from.
10
- * @param parsed - The parsed dotenv configuration.
11
- * @returns An object containing the dotenv configuration.
12
- */
13
- declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvParseOutput): {
14
- APP_NAME: string | undefined;
15
- APP_VERSION: string | undefined;
16
- BUILD_ID: string;
17
- BUILD_TIMESTAMP: string;
18
- BUILD_CHECKSUM: string;
19
- RELEASE_ID: string;
20
- RELEASE_TAG: string;
21
- DEFAULT_LOCALE: string | undefined;
22
- DEFAULT_TIMEZONE: string | undefined;
23
- LOG_LEVEL: "error" | "warn" | "info" | "debug" | null;
24
- ERROR_URL: string | undefined;
25
- ORGANIZATION: string | undefined;
26
- PLATFORM: "node" | "browser" | "neutral";
27
- MODE: "development" | "test" | "production";
28
- TEST: boolean;
29
- DEBUG: boolean;
30
- STACKTRACE: boolean;
31
- ENVIRONMENT: string;
32
- };
33
- declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
34
- //#endregion
35
- export { loadEnv, loadEnvFromContext };
36
- //# sourceMappingURL=load.d.mts.map
@@ -1 +0,0 @@
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 +0,0 @@
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":"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"}
@@ -1,85 +0,0 @@
1
- import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.cjs";
2
- import { Context, UnresolvedContext } from "powerlines";
3
- import { TypeDefinition } from "@stryke/types/configuration";
4
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
5
-
6
- //#region src/helpers/persistence.d.ts
7
-
8
- /**
9
- * Resolves the runtime type definition file for the environment variables.
10
- *
11
- * @param context - The plugin context.
12
- * @returns The runtime type definition file for the environment variables.
13
- */
14
- declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
15
- /**
16
- * Gets the default type definition for the environment variables.
17
- *
18
- * @param context - The plugin context.
19
- * @returns The default type definition for the environment variables.
20
- */
21
- declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
22
- /** Gets the default type definition for the environment secrets.
23
- *
24
- * @param context - The plugin context.
25
- * @returns The default type definition for the environment secrets.
26
- */
27
- declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
28
- /**
29
- * Gets the path to the environment type reflections.
30
- *
31
- * @param context - The plugin context.
32
- * @param name - The name of the type reflections.
33
- * @returns The path to the environment type reflections.
34
- */
35
- declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
36
- /**
37
- * Reads the environment type reflection from the file system.
38
- *
39
- * @param context - The plugin context.
40
- * @param name - The name of the type reflections.
41
- * @returns The environment type reflection.
42
- */
43
- declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
44
- /**
45
- * Writes the environment type reflection to the file system.
46
- *
47
- * @param context - The plugin context.
48
- * @param reflection - The environment type reflection to write.
49
- * @param name - The name of the type reflections.
50
- */
51
- declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
52
- declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
53
- /**
54
- * Reads the environment reflection data from the file system.
55
- *
56
- * @param context - The plugin context.
57
- * @returns The environment reflection data.
58
- */
59
- declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
60
- /**
61
- * Reads the secret environment reflection data from the file system.
62
- *
63
- * @param context - The plugin context.
64
- * @returns The environment reflection data.
65
- */
66
- declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
67
- /**
68
- * Writes the environment reflection data to the file system.
69
- *
70
- * @param context - The plugin context.
71
- * @param reflection - The reflection data to write.
72
- * @param name - The name of the reflection (either "env" or "secrets").
73
- */
74
- declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
75
- /**
76
- * Writes the environment reflection data to the file system.
77
- *
78
- * @param context - The plugin context.
79
- * @param reflection - The reflection data to write.
80
- * @param name - The name of the reflection (either "env" or "secrets").
81
- */
82
- declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
83
- //#endregion
84
- export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
85
- //# sourceMappingURL=persistence.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistence.d.cts","names":[],"sources":["../../src/helpers/persistence.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAoDA;;;;AAEU,iBAFY,sBAAA,CAEZ,OAAA,EADC,iBACD,CADmB,uBACnB,CAAA,CAAA,EAAP,OAAO,CAAA,MAAA,CAAA;AAmBV;;;;;;AAcsB,iBAdA,2BAAA,CAc+B,OAAA,EAb1C,iBAa0C,CAbxB,uBAawB,CAAA,CAAA,EAZlD,OAYkD,CAZ1C,cAY0C,CAAA;;;;;;AAgBrC,iBAhBM,+BAAA,CAgBmB,OAAA,EAf9B,iBAe8B,CAfZ,uBAeY,CAAA,CAAA,EAdtC,OAcsC,CAd9B,cAc8B,CAAA;;;;;AAczC;;;AAGW,iBAjBK,yBAAA,CAiBL,OAAA,EAhBA,OAgBA,CAhBQ,uBAgBR,CAAA,EAAA,IAAA,CAAA,EAfH,OAeG,CAAA,EAAA,MAAA;;;AAuCX;;;;;AAGuB,iBA7CD,qBAAA,CA6CC,OAAA,EA5CZ,gBA4CY,EAAA,IAAA,CAAA,EA3Cf,OA2Ce,CAAA,EA1CpB,OA0CoB,CA1CZ,eA0CY,CAAA,GAAA,CAAA,CAAA;AAevB;AAaA;;;;;AAyDA;AACW,iBAzFW,sBAAA,CAyFX,OAAA,EAxFA,gBAwFA,EAAA,UAAA,EAvFG,eAuFH,CAAA,GAAA,CAAA,EAAA,IAAA,CAAA,EAtFH,OAsFG,CAAA,EAtFY,OAsFZ,CAAA,IAAA,CAAA;AACA,iBAxEK,qBAAA,CAwEL,OAAA,EAvEA,gBAuEA,EAAA,IAAA,EAtEH,OAsEG,CAAA,EAAA,MAAA;;;AA2DX;;;;AAGuB,iBAzHD,iBAAA,CAyHC,OAAA,EAxHZ,gBAwHY,CAAA,EAvHpB,OAuHoB,CAvHZ,eAuHY,CAAA,GAAA,CAAA,CAAA;;AAsBvB;;;;;iBAtFsB,qBAAA,UACX,mBACR,QAAQ;;;;;;;;iBA2DW,kBAAA,UACX,8BACG,6BACN,UAAe;;;;;;;;iBAsBP,sBAAA,UACL,8BACG,6BACN"}
@@ -1,85 +0,0 @@
1
- import { EnvPluginContext, EnvPluginResolvedConfig, EnvType } from "../types/plugin.mjs";
2
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
- import { Context, UnresolvedContext } from "powerlines";
4
- import { TypeDefinition } from "@stryke/types/configuration";
5
-
6
- //#region src/helpers/persistence.d.ts
7
-
8
- /**
9
- * Resolves the runtime type definition file for the environment variables.
10
- *
11
- * @param context - The plugin context.
12
- * @returns The runtime type definition file for the environment variables.
13
- */
14
- declare function resolveRuntimeTypeFile(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<string>;
15
- /**
16
- * Gets the default type definition for the environment variables.
17
- *
18
- * @param context - The plugin context.
19
- * @returns The default type definition for the environment variables.
20
- */
21
- declare function getEnvDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
22
- /** Gets the default type definition for the environment secrets.
23
- *
24
- * @param context - The plugin context.
25
- * @returns The default type definition for the environment secrets.
26
- */
27
- declare function getSecretsDefaultTypeDefinition(context: UnresolvedContext<EnvPluginResolvedConfig>): Promise<TypeDefinition>;
28
- /**
29
- * Gets the path to the environment type reflections.
30
- *
31
- * @param context - The plugin context.
32
- * @param name - The name of the type reflections.
33
- * @returns The path to the environment type reflections.
34
- */
35
- declare function getEnvTypeReflectionsPath(context: Context<EnvPluginResolvedConfig>, name?: EnvType): string;
36
- /**
37
- * Reads the environment type reflection from the file system.
38
- *
39
- * @param context - The plugin context.
40
- * @param name - The name of the type reflections.
41
- * @returns The environment type reflection.
42
- */
43
- declare function readEnvTypeReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
44
- /**
45
- * Writes the environment type reflection to the file system.
46
- *
47
- * @param context - The plugin context.
48
- * @param reflection - The environment type reflection to write.
49
- * @param name - The name of the type reflections.
50
- */
51
- declare function writeEnvTypeReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
52
- declare function getEnvReflectionsPath(context: EnvPluginContext, name: EnvType): string;
53
- /**
54
- * Reads the environment reflection data from the file system.
55
- *
56
- * @param context - The plugin context.
57
- * @returns The environment reflection data.
58
- */
59
- declare function readEnvReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
60
- /**
61
- * Reads the secret environment reflection data from the file system.
62
- *
63
- * @param context - The plugin context.
64
- * @returns The environment reflection data.
65
- */
66
- declare function readSecretsReflection(context: EnvPluginContext): Promise<ReflectionClass<any>>;
67
- /**
68
- * Writes the environment reflection data to the file system.
69
- *
70
- * @param context - The plugin context.
71
- * @param reflection - The reflection data to write.
72
- * @param name - The name of the reflection (either "env" or "secrets").
73
- */
74
- declare function writeEnvReflection(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): Promise<void>;
75
- /**
76
- * Writes the environment reflection data to the file system.
77
- *
78
- * @param context - The plugin context.
79
- * @param reflection - The reflection data to write.
80
- * @param name - The name of the reflection (either "env" or "secrets").
81
- */
82
- declare function writeEnvReflectionSync(context: EnvPluginContext, reflection: ReflectionClass<any>, name?: EnvType): void;
83
- //#endregion
84
- export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectionsPath, getSecretsDefaultTypeDefinition, readEnvReflection, readEnvTypeReflection, readSecretsReflection, resolveRuntimeTypeFile, writeEnvReflection, writeEnvReflectionSync, writeEnvTypeReflection };
85
- //# sourceMappingURL=persistence.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistence.d.mts","names":[],"sources":["../../src/helpers/persistence.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAoDA;;;;AAEU,iBAFY,sBAAA,CAEZ,OAAA,EADC,iBACD,CADmB,uBACnB,CAAA,CAAA,EAAP,OAAO,CAAA,MAAA,CAAA;AAmBV;;;;;;AAcsB,iBAdA,2BAAA,CAc+B,OAAA,EAb1C,iBAa0C,CAbxB,uBAawB,CAAA,CAAA,EAZlD,OAYkD,CAZ1C,cAY0C,CAAA;;;;;;AAgBrC,iBAhBM,+BAAA,CAgBmB,OAAA,EAf9B,iBAe8B,CAfZ,uBAeY,CAAA,CAAA,EAdtC,OAcsC,CAd9B,cAc8B,CAAA;;;;;AAczC;;;AAGW,iBAjBK,yBAAA,CAiBL,OAAA,EAhBA,OAgBA,CAhBQ,uBAgBR,CAAA,EAAA,IAAA,CAAA,EAfH,OAeG,CAAA,EAAA,MAAA;;;AAuCX;;;;;AAGuB,iBA7CD,qBAAA,CA6CC,OAAA,EA5CZ,gBA4CY,EAAA,IAAA,CAAA,EA3Cf,OA2Ce,CAAA,EA1CpB,OA0CoB,CA1CZ,eA0CY,CAAA,GAAA,CAAA,CAAA;AAevB;AAaA;;;;;AAyDA;AACW,iBAzFW,sBAAA,CAyFX,OAAA,EAxFA,gBAwFA,EAAA,UAAA,EAvFG,eAuFH,CAAA,GAAA,CAAA,EAAA,IAAA,CAAA,EAtFH,OAsFG,CAAA,EAtFY,OAsFZ,CAAA,IAAA,CAAA;AACA,iBAxEK,qBAAA,CAwEL,OAAA,EAvEA,gBAuEA,EAAA,IAAA,EAtEH,OAsEG,CAAA,EAAA,MAAA;;;AA2DX;;;;AAGuB,iBAzHD,iBAAA,CAyHC,OAAA,EAxHZ,gBAwHY,CAAA,EAvHpB,OAuHoB,CAvHZ,eAuHY,CAAA,GAAA,CAAA,CAAA;;AAsBvB;;;;;iBAtFsB,qBAAA,UACX,mBACR,QAAQ;;;;;;;;iBA2DW,kBAAA,UACX,8BACG,6BACN,UAAe;;;;;;;;iBAsBP,sBAAA,UACL,8BACG,6BACN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistence.mjs","names":[],"sources":["../../src/helpers/persistence.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 { convertFromCapnp, convertToCapnp } from \"@powerlines/deepkit/capnp\";\nimport { getReflectionsPath } from \"@powerlines/deepkit/resolve-reflections\";\nimport { SerializedTypes } from \"@powerlines/deepkit/schemas/reflection\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n deserializeType,\n ReflectionClass,\n ReflectionKind,\n resolveClassType\n} from \"@powerlines/deepkit/vendor/type\";\nimport * as capnp from \"@stryke/capnp\";\nimport {\n readFileBuffer,\n writeFileBuffer,\n writeFileBufferSync\n} from \"@stryke/fs/buffer\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport type { TypeDefinition } from \"@stryke/types/configuration\";\nimport { existsSync } from \"node:fs\";\nimport { Context, UnresolvedContext } from \"powerlines\";\nimport {\n EnvPluginContext,\n EnvPluginResolvedConfig,\n EnvType\n} from \"../types/plugin\";\nimport { createEnvReflection } from \"./reflect\";\n\n/**\n * Resolves the runtime type definition file for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The runtime type definition file for the environment variables.\n */\nexport async function resolveRuntimeTypeFile(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<string> {\n const resolved = await context.fs.resolve(\n \"@powerlines/plugin-env/types/runtime\"\n );\n if (!resolved) {\n throw new Error(\n `Failed to resolve the runtime type definition file for the environment variables. Please ensure that the \"@powerlines/plugin-env\" package is installed.`\n );\n }\n\n return resolved;\n}\n\n/**\n * Gets the default type definition for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment variables.\n */\nexport async function getEnvDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"EnvInterface\"\n };\n}\n\n/** Gets the default type definition for the environment secrets.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment secrets.\n */\nexport async function getSecretsDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"SecretsInterface\"\n };\n}\n\n/**\n * Gets the path to the environment type reflections.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The path to the environment type reflections.\n */\nexport function getEnvTypeReflectionsPath(\n context: Context<EnvPluginResolvedConfig>,\n name: EnvType = \"env\"\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}-types.bin`);\n}\n\n/**\n * Reads the environment type reflection from the file system.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The environment type reflection.\n */\nexport async function readEnvTypeReflection(\n context: EnvPluginContext,\n name: EnvType = \"env\"\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvTypeReflectionsPath(context, name);\n if (!existsSync(filePath)) {\n if (!context.env.types.env || isEmptyObject(context.env.types.env)) {\n const reflection = createEnvReflection(context) as Reflection;\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.types.env = reflection;\n await writeEnvTypeReflection(context, context.env.types.env, name);\n }\n\n return context.env.types.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.types[name] = reflection;\n context.env.types[name].messageRoot = messageRoot;\n context.env.types[name].dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment type reflection to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The environment type reflection to write.\n * @param name - The name of the type reflections.\n */\nexport async function writeEnvTypeReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvTypeReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\nexport function getEnvReflectionsPath(\n context: EnvPluginContext,\n name: EnvType\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}.bin`);\n}\n\n/**\n * Reads the environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readEnvReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"env\");\n if (!existsSync(filePath)) {\n if (!context.env.types.env) {\n context.env.types.env = await readEnvTypeReflection(context, \"env\");\n }\n\n if (!context.env.used.env || isEmptyObject(context.env.used.env)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.env\n }) as Reflection;\n reflection.name = \"Env\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.env = reflection;\n await writeEnvReflection(context, context.env.used.env, \"env\");\n }\n\n return context.env.used.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.env = reflection;\n context.env.used.env.messageRoot = messageRoot;\n context.env.used.env.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Reads the secret environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readSecretsReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"secrets\");\n if (!existsSync(filePath)) {\n if (!context.env.types.secrets) {\n context.env.types.secrets = await readEnvTypeReflection(\n context,\n \"secrets\"\n );\n }\n\n if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.secrets\n }) as Reflection;\n reflection.name = \"Secrets\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.secrets = reflection;\n await writeEnvReflection(context, context.env.used.secrets, \"secrets\");\n }\n\n return context.env.used.secrets;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.secrets = reflection;\n context.env.used.secrets.messageRoot = messageRoot;\n context.env.used.secrets.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport async function writeEnvReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport function writeEnvReflectionSync(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n writeFileBufferSync(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n"],"mappings":"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"}
@@ -1,69 +0,0 @@
1
- import { EnvInterface, SecretsInterface } from "../types/runtime.cjs";
2
- import { EnvPluginContext } from "../types/plugin.cjs";
3
- import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
4
-
5
- //#region src/helpers/reflect.d.ts
6
- declare function mergeEnvReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
7
- declare function mergeSecretsReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
8
- interface CreateEnvReflectionOptions {
9
- type?: TypeObjectLiteral | TypeClass;
10
- superReflection?: ReflectionClass<any>;
11
- }
12
- declare class BaseEnv implements EnvInterface {
13
- APP_NAME: string;
14
- APP_VERSION: string;
15
- BUILD_ID: string;
16
- BUILD_TIMESTAMP: string;
17
- BUILD_CHECKSUM: string;
18
- RELEASE_ID: string;
19
- RELEASE_TAG: string;
20
- ORGANIZATION: string;
21
- PLATFORM: "node" | "browser" | "neutral";
22
- MODE: "development" | "test" | "production";
23
- ENVIRONMENT: string;
24
- DEBUG: boolean;
25
- TEST: boolean;
26
- MINIMAL: boolean;
27
- NO_COLOR: boolean;
28
- FORCE_COLOR: number | boolean;
29
- FORCE_HYPERLINK: number | boolean;
30
- STACKTRACE: boolean;
31
- INCLUDE_ERROR_DATA: boolean;
32
- ERROR_URL: string;
33
- DEFAULT_TIMEZONE: string;
34
- DEFAULT_LOCALE: string;
35
- CI: boolean;
36
- }
37
- declare class BaseSecrets implements SecretsInterface {
38
- ENCRYPTION_KEY: string;
39
- }
40
- declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
41
- declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
42
- /**
43
- * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.
44
- *
45
- * @remarks
46
- * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.
47
- *
48
- * @param context - The plugin context
49
- * @param file - The file path to reflect the environment configuration type definition from
50
- * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.
51
- * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.
52
- */
53
- declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
54
- /**
55
- * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.
56
- *
57
- * @remarks
58
- * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.
59
- *
60
- * @param context - The plugin context
61
- * @param file - The file path to reflect the secrets configuration type definition from
62
- * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.
63
- * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.
64
- */
65
- declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
66
- declare type __ΩCreateEnvReflectionOptions = any[];
67
- //#endregion
68
- export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
69
- //# sourceMappingURL=reflect.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflect.d.cts","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":[],"mappings":";;;;;iBAuCgB,mBAAA,UACL,+BACI,yBACZ;iBAQa,uBAAA,UACL,+BACI,yBACZ;AAda,UAsBC,0BAAA,CAtBkB;EACxB,IAAA,CAAA,EAsBF,iBAtBE,GAsBkB,SAtBlB;EACI,eAAA,CAAA,EAsBK,eAtBL,CAAA,GAAA,CAAA;;AACG,cAwBL,OAAA,YAAmB,YAxBd,CAAA;EAQF,QAAA,EAAA,MAAA;EACL,WAAA,EAAA,MAAA;EACI,QAAA,EAAA,MAAA;EACZ,eAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAQD,UAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EAAoB,YAAA,EAAA,MAAA;EACT,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,SAAA;EAAe,IAAA,EAAA,aAAA,GAAA,MAAA,GAAA,YAAA;EAGtB,WAAQ,EAAA,MAAA;EAgDR,KAAA,EAAA,OAAY;EAIT,IAAA,EAAA,OAAA;EACL,OAAA,EAAA,OAAA;EACA,QAAA,EAAA,OAAA;EACR,WAAA,EAAA,MAAA,GAAA,OAAA;EAAe,eAAA,EAAA,MAAA,GAAA,OAAA;EAyCF,UAAA,EAAA,OAAA;EACL,kBAAA,EAAA,OAAA;EACA,SAAA,EAAA,MAAA;EACR,gBAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAoDI,EAAA,EAAA,OAAA;;AAGP,cA1GF,WAAA,YAAuB,gBA0GrB,CAAA;EAAA,cAAA,EAAA,MAAA;;AAqCO,iBA3IN,mBAAA,CA2IoB,OAAA,EA1IzB,gBA0IyB,EAAA,OAAA,CAAA,EAzIzB,0BAyIyB,CAAA,EAxIjC,eAwIiC,CAAA,GAAA,CAAA;AACzB,iBAhGK,uBAAA,CAgGL,OAAA,EA/FA,gBA+FA,EAAA,OAAA,CAAA,EA9FA,0BA8FA,CAAA,EA7FR,eA6FQ,CAAA,GAAA,CAAA;;;;;;;;;;;;iBAzCW,UAAA,UACX,iDAEI,QAAA;;;;;;;;;;;;iBAqCO,cAAA,UACX,iDAEI,QAAA"}
@@ -1,69 +0,0 @@
1
- import { EnvInterface, SecretsInterface } from "../types/runtime.mjs";
2
- import { EnvPluginContext } from "../types/plugin.mjs";
3
- import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
4
-
5
- //#region src/helpers/reflect.d.ts
6
- declare function mergeEnvReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
7
- declare function mergeSecretsReflections(context: EnvPluginContext, reflections: ReflectionClass<any>[]): ReflectionClass<any>;
8
- interface CreateEnvReflectionOptions {
9
- type?: TypeObjectLiteral | TypeClass;
10
- superReflection?: ReflectionClass<any>;
11
- }
12
- declare class BaseEnv implements EnvInterface {
13
- APP_NAME: string;
14
- APP_VERSION: string;
15
- BUILD_ID: string;
16
- BUILD_TIMESTAMP: string;
17
- BUILD_CHECKSUM: string;
18
- RELEASE_ID: string;
19
- RELEASE_TAG: string;
20
- ORGANIZATION: string;
21
- PLATFORM: "node" | "browser" | "neutral";
22
- MODE: "development" | "test" | "production";
23
- ENVIRONMENT: string;
24
- DEBUG: boolean;
25
- TEST: boolean;
26
- MINIMAL: boolean;
27
- NO_COLOR: boolean;
28
- FORCE_COLOR: number | boolean;
29
- FORCE_HYPERLINK: number | boolean;
30
- STACKTRACE: boolean;
31
- INCLUDE_ERROR_DATA: boolean;
32
- ERROR_URL: string;
33
- DEFAULT_TIMEZONE: string;
34
- DEFAULT_LOCALE: string;
35
- CI: boolean;
36
- }
37
- declare class BaseSecrets implements SecretsInterface {
38
- ENCRYPTION_KEY: string;
39
- }
40
- declare function createEnvReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
41
- declare function createSecretsReflection(context: EnvPluginContext, options?: CreateEnvReflectionOptions): ReflectionClass<any>;
42
- /**
43
- * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.
44
- *
45
- * @remarks
46
- * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.
47
- *
48
- * @param context - The plugin context
49
- * @param file - The file path to reflect the environment configuration type definition from
50
- * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.
51
- * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.
52
- */
53
- declare function reflectEnv(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
54
- /**
55
- * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.
56
- *
57
- * @remarks
58
- * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.
59
- *
60
- * @param context - The plugin context
61
- * @param file - The file path to reflect the secrets configuration type definition from
62
- * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.
63
- * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.
64
- */
65
- declare function reflectSecrets(context: EnvPluginContext, file?: string, name?: string): Promise<ReflectionClass<any>>;
66
- declare type __ΩCreateEnvReflectionOptions = any[];
67
- //#endregion
68
- export { BaseEnv, BaseSecrets, CreateEnvReflectionOptions, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
69
- //# sourceMappingURL=reflect.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reflect.d.mts","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":[],"mappings":";;;;;iBAuCgB,mBAAA,UACL,+BACI,yBACZ;iBAQa,uBAAA,UACL,+BACI,yBACZ;AAda,UAsBC,0BAAA,CAtBkB;EACxB,IAAA,CAAA,EAsBF,iBAtBE,GAsBkB,SAtBlB;EACI,eAAA,CAAA,EAsBK,eAtBL,CAAA,GAAA,CAAA;;AACG,cAwBL,OAAA,YAAmB,YAxBd,CAAA;EAQF,QAAA,EAAA,MAAA;EACL,WAAA,EAAA,MAAA;EACI,QAAA,EAAA,MAAA;EACZ,eAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAQD,UAAA,EAAA,MAAA;EACR,WAAA,EAAA,MAAA;EAAoB,YAAA,EAAA,MAAA;EACT,QAAA,EAAA,MAAA,GAAA,SAAA,GAAA,SAAA;EAAe,IAAA,EAAA,aAAA,GAAA,MAAA,GAAA,YAAA;EAGtB,WAAQ,EAAA,MAAA;EAgDR,KAAA,EAAA,OAAY;EAIT,IAAA,EAAA,OAAA;EACL,OAAA,EAAA,OAAA;EACA,QAAA,EAAA,OAAA;EACR,WAAA,EAAA,MAAA,GAAA,OAAA;EAAe,eAAA,EAAA,MAAA,GAAA,OAAA;EAyCF,UAAA,EAAA,OAAA;EACL,kBAAA,EAAA,OAAA;EACA,SAAA,EAAA,MAAA;EACR,gBAAA,EAAA,MAAA;EAAe,cAAA,EAAA,MAAA;EAoDI,EAAA,EAAA,OAAA;;AAGP,cA1GF,WAAA,YAAuB,gBA0GrB,CAAA;EAAA,cAAA,EAAA,MAAA;;AAqCO,iBA3IN,mBAAA,CA2IoB,OAAA,EA1IzB,gBA0IyB,EAAA,OAAA,CAAA,EAzIzB,0BAyIyB,CAAA,EAxIjC,eAwIiC,CAAA,GAAA,CAAA;AACzB,iBAhGK,uBAAA,CAgGL,OAAA,EA/FA,gBA+FA,EAAA,OAAA,CAAA,EA9FA,0BA8FA,CAAA,EA7FR,eA6FQ,CAAA,GAAA,CAAA;;;;;;;;;;;;iBAzCW,UAAA,UACX,iDAEI,QAAA;;;;;;;;;;;;iBAqCO,cAAA,UACX,iDAEI,QAAA"}