@powerlines/plugin-env 0.16.60 → 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
@@ -1,16 +1,17 @@
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_reflect = require('./reflect.cjs');
5
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
5
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
6
6
  let powerlines = require("powerlines");
7
- let __powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
8
- let __powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
9
- let __powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
10
- let __stryke_capnp = require("@stryke/capnp");
11
- __stryke_capnp = require_rolldown_runtime.__toESM(__stryke_capnp);
12
- let __stryke_fs_buffer = require("@stryke/fs/buffer");
13
- let __stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
7
+ let _powerlines_deepkit_capnp = require("@powerlines/deepkit/capnp");
8
+ let _powerlines_deepkit_resolve_reflections = require("@powerlines/deepkit/resolve-reflections");
9
+ let _powerlines_deepkit_schemas_reflection = require("@powerlines/deepkit/schemas/reflection");
10
+ let _stryke_capnp = require("@stryke/capnp");
11
+ _stryke_capnp = require_runtime.__toESM(_stryke_capnp);
12
+ let _stryke_fs_buffer = require("@stryke/fs/buffer");
13
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
14
+ let _stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
14
15
  let node_fs = require("node:fs");
15
16
 
16
17
  //#region src/helpers/persistence.ts
@@ -79,7 +80,7 @@ getSecretsDefaultTypeDefinition.__type = [
79
80
  * @returns The path to the environment type reflections.
80
81
  */
81
82
  function getEnvTypeReflectionsPath(context, name = "env") {
82
- return require_join_paths.joinPaths((0, __powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}-types.bin`);
83
+ return (0, _stryke_path_join_paths.joinPaths)((0, _powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}-types.bin`);
83
84
  }
84
85
  getEnvTypeReflectionsPath.__type = [
85
86
  () => powerlines.__ΩContext,
@@ -102,19 +103,19 @@ getEnvTypeReflectionsPath.__type = [
102
103
  async function readEnvTypeReflection(context, name = "env") {
103
104
  const filePath = getEnvTypeReflectionsPath(context, name);
104
105
  if (!(0, node_fs.existsSync)(filePath)) {
105
- if (!context.env.types.env || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.types.env)) {
106
- const reflection$1 = require_helpers_reflect.createEnvReflection(context);
107
- const message = new __stryke_capnp.Message();
108
- reflection$1.messageRoot = message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
109
- reflection$1.dataBuffer = message.toArrayBuffer();
110
- context.env.types.env = reflection$1;
106
+ if (!context.env.types.env || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.types.env)) {
107
+ const reflection = require_helpers_reflect.createEnvReflection(context);
108
+ const message = new _stryke_capnp.Message();
109
+ reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
110
+ reflection.dataBuffer = message.toArrayBuffer();
111
+ context.env.types.env = reflection;
111
112
  await writeEnvTypeReflection(context, context.env.types.env, name);
112
113
  }
113
114
  return context.env.types.env;
114
115
  }
115
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
116
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
117
- const reflection = (0, __powerlines_deepkit_vendor_type.resolveClassType)((0, __powerlines_deepkit_vendor_type.deserializeType)((0, __powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
116
+ const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
117
+ const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
118
+ const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
118
119
  context.env.types[name] = reflection;
119
120
  context.env.types[name].messageRoot = messageRoot;
120
121
  context.env.types[name].dataBuffer = buffer;
@@ -126,7 +127,7 @@ readEnvTypeReflection.__type = [
126
127
  () => require_types_plugin.__ΩEnvType,
127
128
  "name",
128
129
  () => "env",
129
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
130
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
130
131
  "readEnvTypeReflection",
131
132
  "Reads the environment type reflection from the file system.",
132
133
  "Pn!2\"n#2$>%P\"7&`/'?("
@@ -140,14 +141,14 @@ readEnvTypeReflection.__type = [
140
141
  */
141
142
  async function writeEnvTypeReflection(context, reflection, name = "env") {
142
143
  const serialized = reflection.serializeType();
143
- const message = new __stryke_capnp.Message();
144
- (0, __powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
145
- await (0, __stryke_fs_buffer.writeFileBuffer)(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
144
+ const message = new _stryke_capnp.Message();
145
+ (0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
146
+ await (0, _stryke_fs_buffer.writeFileBuffer)(getEnvTypeReflectionsPath(context, name), message.toArrayBuffer());
146
147
  }
147
148
  writeEnvTypeReflection.__type = [
148
149
  () => require_types_plugin.__ΩEnvPluginContext,
149
150
  "context",
150
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
151
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
151
152
  "reflection",
152
153
  () => require_types_plugin.__ΩEnvType,
153
154
  "name",
@@ -157,7 +158,7 @@ writeEnvTypeReflection.__type = [
157
158
  "Pn!2\"P\"7#2$n%2&>'\"/(?)"
158
159
  ];
159
160
  function getEnvReflectionsPath(context, name) {
160
- return require_join_paths.joinPaths((0, __powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}.bin`);
161
+ return (0, _stryke_path_join_paths.joinPaths)((0, _powerlines_deepkit_resolve_reflections.getReflectionsPath)(context), "env", `${name}.bin`);
161
162
  }
162
163
  getEnvReflectionsPath.__type = [
163
164
  () => require_types_plugin.__ΩEnvPluginContext,
@@ -177,28 +178,28 @@ async function readEnvReflection(context) {
177
178
  const filePath = getEnvReflectionsPath(context, "env");
178
179
  if (!(0, node_fs.existsSync)(filePath)) {
179
180
  if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
180
- if (!context.env.used.env || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.env)) {
181
- const reflection$1 = require_helpers_reflect.createEnvReflection(context, {
181
+ if (!context.env.used.env || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.env)) {
182
+ const reflection = require_helpers_reflect.createEnvReflection(context, {
182
183
  type: {
183
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
184
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
184
185
  typeName: "Env",
185
186
  description: `An object containing the environment configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
186
187
  types: []
187
188
  },
188
189
  superReflection: context.env.types.env
189
190
  });
190
- reflection$1.name = "Env";
191
- const message = new __stryke_capnp.Message();
192
- reflection$1.messageRoot = message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
193
- reflection$1.dataBuffer = message.toArrayBuffer();
194
- context.env.used.env = reflection$1;
191
+ reflection.name = "Env";
192
+ const message = new _stryke_capnp.Message();
193
+ reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
194
+ reflection.dataBuffer = message.toArrayBuffer();
195
+ context.env.used.env = reflection;
195
196
  await writeEnvReflection(context, context.env.used.env, "env");
196
197
  }
197
198
  return context.env.used.env;
198
199
  }
199
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
200
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
201
- const reflection = (0, __powerlines_deepkit_vendor_type.resolveClassType)((0, __powerlines_deepkit_vendor_type.deserializeType)((0, __powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
200
+ const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
201
+ const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
202
+ const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
202
203
  context.env.used.env = reflection;
203
204
  context.env.used.env.messageRoot = messageRoot;
204
205
  context.env.used.env.dataBuffer = buffer;
@@ -207,7 +208,7 @@ async function readEnvReflection(context) {
207
208
  readEnvReflection.__type = [
208
209
  () => require_types_plugin.__ΩEnvPluginContext,
209
210
  "context",
210
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
211
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
211
212
  "readEnvReflection",
212
213
  "Reads the environment reflection data from the file system.",
213
214
  "Pn!2\"P\"7#`/$?%"
@@ -222,28 +223,28 @@ async function readSecretsReflection(context) {
222
223
  const filePath = getEnvReflectionsPath(context, "secrets");
223
224
  if (!(0, node_fs.existsSync)(filePath)) {
224
225
  if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
225
- if (!context.env.used.secrets || (0, __stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.secrets)) {
226
- const reflection$1 = require_helpers_reflect.createEnvReflection(context, {
226
+ if (!context.env.used.secrets || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(context.env.used.secrets)) {
227
+ const reflection = require_helpers_reflect.createEnvReflection(context, {
227
228
  type: {
228
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
229
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
229
230
  typeName: "Secrets",
230
231
  description: `An object containing the secret configuration parameters that are used (at least once) by the ${context.config.name ? `${context.config.name} application` : "application"}.`,
231
232
  types: []
232
233
  },
233
234
  superReflection: context.env.types.secrets
234
235
  });
235
- reflection$1.name = "Secrets";
236
- const message = new __stryke_capnp.Message();
237
- reflection$1.messageRoot = message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
238
- reflection$1.dataBuffer = message.toArrayBuffer();
239
- context.env.used.secrets = reflection$1;
236
+ reflection.name = "Secrets";
237
+ const message = new _stryke_capnp.Message();
238
+ reflection.messageRoot = message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
239
+ reflection.dataBuffer = message.toArrayBuffer();
240
+ context.env.used.secrets = reflection;
240
241
  await writeEnvReflection(context, context.env.used.secrets, "secrets");
241
242
  }
242
243
  return context.env.used.secrets;
243
244
  }
244
- const buffer = await (0, __stryke_fs_buffer.readFileBuffer)(filePath);
245
- const messageRoot = new __stryke_capnp.Message(buffer, false).getRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes);
246
- const reflection = (0, __powerlines_deepkit_vendor_type.resolveClassType)((0, __powerlines_deepkit_vendor_type.deserializeType)((0, __powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
245
+ const buffer = await (0, _stryke_fs_buffer.readFileBuffer)(filePath);
246
+ const messageRoot = new _stryke_capnp.Message(buffer, false).getRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes);
247
+ const reflection = (0, _powerlines_deepkit_vendor_type.resolveClassType)((0, _powerlines_deepkit_vendor_type.deserializeType)((0, _powerlines_deepkit_capnp.convertFromCapnp)(messageRoot.types)));
247
248
  context.env.used.secrets = reflection;
248
249
  context.env.used.secrets.messageRoot = messageRoot;
249
250
  context.env.used.secrets.dataBuffer = buffer;
@@ -252,7 +253,7 @@ async function readSecretsReflection(context) {
252
253
  readSecretsReflection.__type = [
253
254
  () => require_types_plugin.__ΩEnvPluginContext,
254
255
  "context",
255
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
256
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
256
257
  "readSecretsReflection",
257
258
  "Reads the secret environment reflection data from the file system.",
258
259
  "Pn!2\"P\"7#`/$?%"
@@ -266,14 +267,14 @@ readSecretsReflection.__type = [
266
267
  */
267
268
  async function writeEnvReflection(context, reflection, name = "env") {
268
269
  const serialized = reflection.serializeType();
269
- const message = new __stryke_capnp.Message();
270
- (0, __powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
271
- await (0, __stryke_fs_buffer.writeFileBuffer)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
270
+ const message = new _stryke_capnp.Message();
271
+ (0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
272
+ await (0, _stryke_fs_buffer.writeFileBuffer)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
272
273
  }
273
274
  writeEnvReflection.__type = [
274
275
  () => require_types_plugin.__ΩEnvPluginContext,
275
276
  "context",
276
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
277
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
277
278
  "reflection",
278
279
  () => require_types_plugin.__ΩEnvType,
279
280
  "name",
@@ -291,14 +292,14 @@ writeEnvReflection.__type = [
291
292
  */
292
293
  function writeEnvReflectionSync(context, reflection, name = "env") {
293
294
  const serialized = reflection.serializeType();
294
- const message = new __stryke_capnp.Message();
295
- (0, __powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(__powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
296
- (0, __stryke_fs_buffer.writeFileBufferSync)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
295
+ const message = new _stryke_capnp.Message();
296
+ (0, _powerlines_deepkit_capnp.convertToCapnp)(serialized, message.initRoot(_powerlines_deepkit_schemas_reflection.SerializedTypes)._initTypes(serialized.length));
297
+ (0, _stryke_fs_buffer.writeFileBufferSync)(getEnvReflectionsPath(context, name), message.toArrayBuffer());
297
298
  }
298
299
  writeEnvReflectionSync.__type = [
299
300
  () => require_types_plugin.__ΩEnvPluginContext,
300
301
  "context",
301
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
302
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
302
303
  "reflection",
303
304
  () => require_types_plugin.__ΩEnvType,
304
305
  "name",
@@ -4,7 +4,6 @@ import { TypeDefinition } from "@stryke/types/configuration";
4
4
  import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
5
5
 
6
6
  //#region src/helpers/persistence.d.ts
7
-
8
7
  /**
9
8
  * Resolves the runtime type definition file for the environment variables.
10
9
  *
@@ -1 +1 @@
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,EA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AAA,CAAQ,eAAA;;;;;;;;iBAuCW,sBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;AAAA,iBAeP,qBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,EAAM,OAAA;;;;AA5ER;;;iBAuFsB,iBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;;;iBAuDW,qBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;AApIX;;;iBA+LsB,kBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;;;;;;;;iBAsBP,sBAAA,CACd,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA"}
@@ -4,7 +4,6 @@ import { Context, UnresolvedContext } from "powerlines";
4
4
  import { TypeDefinition } from "@stryke/types/configuration";
5
5
 
6
6
  //#region src/helpers/persistence.d.ts
7
-
8
7
  /**
9
8
  * Resolves the runtime type definition file for the environment variables.
10
9
  *
@@ -1 +1 @@
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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BR;;;iBA8BsB,qBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,IAAA,GAAM,OAAA,GACL,OAAA,CAAQ,eAAA;;;;;;;;iBAuCW,sBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;AAAA,iBAeP,qBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,EAAM,OAAA;;;;AA5ER;;;iBAuFsB,iBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;;;iBAuDW,qBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;AApIX;;;iBA+LsB,kBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;;;;;;;;iBAsBP,sBAAA,CACd,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA"}
@@ -1,5 +1,4 @@
1
1
  import { __ΩEnvPluginContext, __ΩEnvPluginResolvedConfig, __ΩEnvType } 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 { createEnvReflection } from "./reflect.mjs";
4
3
  import { ReflectionClass, ReflectionKind, deserializeType, resolveClassType } from "@powerlines/deepkit/vendor/type";
5
4
  import { __ΩContext, __ΩUnresolvedContext } from "powerlines";
@@ -8,6 +7,7 @@ import { getReflectionsPath } from "@powerlines/deepkit/resolve-reflections";
8
7
  import { SerializedTypes } from "@powerlines/deepkit/schemas/reflection";
9
8
  import * as capnp from "@stryke/capnp";
10
9
  import { readFileBuffer, writeFileBuffer, writeFileBufferSync } from "@stryke/fs/buffer";
10
+ import { joinPaths } from "@stryke/path/join-paths";
11
11
  import { isEmptyObject } from "@stryke/type-checks/is-empty-object";
12
12
  import { existsSync } from "node:fs";
13
13
 
@@ -101,11 +101,11 @@ async function readEnvTypeReflection(context, name = "env") {
101
101
  const filePath = getEnvTypeReflectionsPath(context, name);
102
102
  if (!existsSync(filePath)) {
103
103
  if (!context.env.types.env || isEmptyObject(context.env.types.env)) {
104
- const reflection$1 = createEnvReflection(context);
104
+ const reflection = createEnvReflection(context);
105
105
  const message = new capnp.Message();
106
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
107
- reflection$1.dataBuffer = message.toArrayBuffer();
108
- context.env.types.env = reflection$1;
106
+ reflection.messageRoot = message.initRoot(SerializedTypes);
107
+ reflection.dataBuffer = message.toArrayBuffer();
108
+ context.env.types.env = reflection;
109
109
  await writeEnvTypeReflection(context, context.env.types.env, name);
110
110
  }
111
111
  return context.env.types.env;
@@ -176,7 +176,7 @@ async function readEnvReflection(context) {
176
176
  if (!existsSync(filePath)) {
177
177
  if (!context.env.types.env) context.env.types.env = await readEnvTypeReflection(context, "env");
178
178
  if (!context.env.used.env || isEmptyObject(context.env.used.env)) {
179
- const reflection$1 = createEnvReflection(context, {
179
+ const reflection = createEnvReflection(context, {
180
180
  type: {
181
181
  kind: ReflectionKind.objectLiteral,
182
182
  typeName: "Env",
@@ -185,11 +185,11 @@ async function readEnvReflection(context) {
185
185
  },
186
186
  superReflection: context.env.types.env
187
187
  });
188
- reflection$1.name = "Env";
188
+ reflection.name = "Env";
189
189
  const message = new capnp.Message();
190
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
191
- reflection$1.dataBuffer = message.toArrayBuffer();
192
- context.env.used.env = reflection$1;
190
+ reflection.messageRoot = message.initRoot(SerializedTypes);
191
+ reflection.dataBuffer = message.toArrayBuffer();
192
+ context.env.used.env = reflection;
193
193
  await writeEnvReflection(context, context.env.used.env, "env");
194
194
  }
195
195
  return context.env.used.env;
@@ -221,7 +221,7 @@ async function readSecretsReflection(context) {
221
221
  if (!existsSync(filePath)) {
222
222
  if (!context.env.types.secrets) context.env.types.secrets = await readEnvTypeReflection(context, "secrets");
223
223
  if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {
224
- const reflection$1 = createEnvReflection(context, {
224
+ const reflection = createEnvReflection(context, {
225
225
  type: {
226
226
  kind: ReflectionKind.objectLiteral,
227
227
  typeName: "Secrets",
@@ -230,11 +230,11 @@ async function readSecretsReflection(context) {
230
230
  },
231
231
  superReflection: context.env.types.secrets
232
232
  });
233
- reflection$1.name = "Secrets";
233
+ reflection.name = "Secrets";
234
234
  const message = new capnp.Message();
235
- reflection$1.messageRoot = message.initRoot(SerializedTypes);
236
- reflection$1.dataBuffer = message.toArrayBuffer();
237
- context.env.used.secrets = reflection$1;
235
+ reflection.messageRoot = message.initRoot(SerializedTypes);
236
+ reflection.dataBuffer = message.toArrayBuffer();
237
+ context.env.used.secrets = reflection;
238
238
  await writeEnvReflection(context, context.env.used.secrets, "secrets");
239
239
  }
240
240
  return context.env.used.secrets;
@@ -1 +1 @@
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":";;;;;;;;;;;;;;;;;;;;AA2CA,eAAsB,uBAAE,SAAA;CACpB,MAAM,WAAW,MAAM,QAAQ,GAAG,QAAQ,uCAAC;eAE7C,OAAA,IAAA,MAAA,0JAAA;AAED,QAAA;;AAED,uBAAuB,SAAS;OAAO;OAA4B;C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;;;;;;;AAQ1C,SAAgB,uBAAsB,SAAA,YAAA,OAAA,OAAA;CAClC,MAAM,aAAa,WAAW,eAAS;CACzC,MAAA,UAAA,IAAA,MAAA,SAAA;AAEE,gBAAe,YADF,QAAQ,SAAS,gBAAS,CACjB,WAAA,WAAA,OAAA,CAAA;AACtB,qBAAoB,sBAAS,SAAA,KAAA,EAAA,QAAA,eAAA,CAAA;;AAEjC,uBAAuB,SAAM;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
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":";;;;;;;;;;;;;;;;;;;;AA2CA,eAAiB,uBAAO,SAAA;CACxB,MAAS,WAAA,MAAA,QAA0B,GAAG,QAAQ,uCAAC;eAE7C,OAAA,IAAA,MAAA,0JAAA;AAED,QAAA;;AAED,uBAAuB,SAAM;OAAU;OAA0B;CAAS;CAAA;CAAA;CAAA;CAAA;;;;;;;AAO1E,eAAG,4BAAA,SAAA;AACC,QAAG;EACH,MAAU,MAAK,uBAAA,QAAA;EACZ,MAAO;EACT;;;;;;;;;;;;;;;AAQL,eAAC,gCAAA,SAAA;AACG,QAAM;EACN,MAAQ,MAAI,uBAA2B,QAAK;EAC9C,MAAA;EACF;;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EAAA,QAAA,eAAA,CAAA;;AAEjC,uBAAkB,SAAW;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA"}
@@ -1,12 +1,13 @@
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_runtime = require('../types/runtime.cjs');
3
4
  const require_types_plugin = require('../types/plugin.cjs');
4
- const require_join_paths = require('../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs');
5
- const require_is_parent_path = require('../node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.cjs');
6
5
  const require_helpers_persistence = require('./persistence.cjs');
7
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
8
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
- let __powerlines_deepkit_reflect_type = require("@powerlines/deepkit/reflect-type");
6
+ let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
7
+ let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
8
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
9
+ let _powerlines_deepkit_reflect_type = require("@powerlines/deepkit/reflect-type");
10
+ let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
10
11
 
11
12
  //#region src/helpers/reflect.ts
12
13
  function __assignType(fn, args) {
@@ -14,7 +15,7 @@ function __assignType(fn, args) {
14
15
  return fn;
15
16
  }
16
17
  function mergeEnvReflections(context, reflections) {
17
- return createEnvReflection(context, { type: (0, __powerlines_deepkit_vendor_type.merge)(reflections.map(__assignType((reflection) => reflection.type, [
18
+ return createEnvReflection(context, { type: (0, _powerlines_deepkit_vendor_type.merge)(reflections.map(__assignType((reflection) => reflection.type, [
18
19
  "reflection",
19
20
  "",
20
21
  "P\"2!\"/\""
@@ -23,14 +24,14 @@ function mergeEnvReflections(context, reflections) {
23
24
  mergeEnvReflections.__type = [
24
25
  () => require_types_plugin.__ΩEnvPluginContext,
25
26
  "context",
26
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
27
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
27
28
  "reflections",
28
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
29
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
29
30
  "mergeEnvReflections",
30
31
  "Pn!2\"P\"7#F2$P\"7%/&"
31
32
  ];
32
33
  function mergeSecretsReflections(context, reflections) {
33
- return createSecretsReflection(context, { type: (0, __powerlines_deepkit_vendor_type.merge)(reflections.map(__assignType((reflection) => reflection.type, [
34
+ return createSecretsReflection(context, { type: (0, _powerlines_deepkit_vendor_type.merge)(reflections.map(__assignType((reflection) => reflection.type, [
34
35
  "reflection",
35
36
  "",
36
37
  "P\"2!\"/\""
@@ -39,17 +40,17 @@ function mergeSecretsReflections(context, reflections) {
39
40
  mergeSecretsReflections.__type = [
40
41
  () => require_types_plugin.__ΩEnvPluginContext,
41
42
  "context",
42
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
43
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
43
44
  "reflections",
44
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
45
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
45
46
  "mergeSecretsReflections",
46
47
  "Pn!2\"P\"7#F2$P\"7%/&"
47
48
  ];
48
49
  const __ΩCreateEnvReflectionOptions = [
49
- () => __powerlines_deepkit_vendor_type.__ΩTypeObjectLiteral,
50
- () => __powerlines_deepkit_vendor_type.__ΩTypeClass,
50
+ () => _powerlines_deepkit_vendor_type.__ΩTypeObjectLiteral,
51
+ () => _powerlines_deepkit_vendor_type.__ΩTypeClass,
51
52
  "type",
52
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
53
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
53
54
  "superReflection",
54
55
  "CreateEnvReflectionOptions",
55
56
  "PPn!n\"J4#8P\"7$4%8Mw&y"
@@ -143,23 +144,23 @@ var BaseSecrets = class {
143
144
  ];
144
145
  };
145
146
  function createEnvReflection(context, options = {}) {
146
- const parent = options.superReflection ?? new __powerlines_deepkit_vendor_type.ReflectionClass({
147
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.class,
148
- description: `The base environment configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
147
+ const parent = options.superReflection ?? new _powerlines_deepkit_vendor_type.ReflectionClass({
148
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.class,
149
+ description: `The base environment configuration definition for the ${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
149
150
  classType: BaseEnv,
150
151
  types: [],
151
152
  implements: [{
152
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
153
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
153
154
  typeName: "EnvInterface",
154
- description: `The environment configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
155
+ description: `The environment configuration interface definition for the ${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
155
156
  types: []
156
157
  }]
157
158
  });
158
159
  parent.name = "Env";
159
- const result = new __powerlines_deepkit_vendor_type.ReflectionClass(options.type ?? {
160
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
160
+ const result = new _powerlines_deepkit_vendor_type.ReflectionClass(options.type ?? {
161
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
161
162
  typeName: "Env",
162
- description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
163
+ description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
163
164
  types: []
164
165
  }, parent);
165
166
  result.name = "Env";
@@ -171,28 +172,28 @@ createEnvReflection.__type = [
171
172
  () => __ΩCreateEnvReflectionOptions,
172
173
  "options",
173
174
  () => ({}),
174
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
175
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
175
176
  "createEnvReflection",
176
177
  "Pn!2\"n#2$>%P\"7&/'"
177
178
  ];
178
179
  function createSecretsReflection(context, options = {}) {
179
- const parent = options.superReflection ?? new __powerlines_deepkit_vendor_type.ReflectionClass({
180
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.class,
181
- description: `The base secrets configuration definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
180
+ const parent = options.superReflection ?? new _powerlines_deepkit_vendor_type.ReflectionClass({
181
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.class,
182
+ description: `The base secrets configuration definition for the ${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
182
183
  classType: BaseSecrets,
183
184
  types: [],
184
185
  implements: [{
185
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
186
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
186
187
  typeName: "SecretsInterface",
187
- description: `The secrets configuration interface definition for the ${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
188
+ description: `The secrets configuration interface definition for the ${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} project.`,
188
189
  types: []
189
190
  }]
190
191
  });
191
192
  parent.name = "Secrets";
192
- const result = new __powerlines_deepkit_vendor_type.ReflectionClass(options.type ?? {
193
- kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
193
+ const result = new _powerlines_deepkit_vendor_type.ReflectionClass(options.type ?? {
194
+ kind: _powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
194
195
  typeName: "Secrets",
195
- description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${(0, __stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
196
+ description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${(0, _stryke_string_format_title_case.titleCase)(context.config.name)} application` : "application"}.`,
196
197
  types: []
197
198
  }, parent);
198
199
  result.name = "Secrets";
@@ -204,7 +205,7 @@ createSecretsReflection.__type = [
204
205
  () => __ΩCreateEnvReflectionOptions,
205
206
  "options",
206
207
  () => ({}),
207
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
208
+ () => _powerlines_deepkit_vendor_type.ReflectionClass,
208
209
  "createSecretsReflection",
209
210
  "Pn!2\"n#2$>%P\"7&/'"
210
211
  ];
@@ -221,14 +222,14 @@ createSecretsReflection.__type = [
221
222
  */
222
223
  async function reflectEnv(context, file, name) {
223
224
  let config;
224
- if (file) config = (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, {
225
- file: !require_is_parent_path.isParentPath(file, context.workspaceConfig.workspaceRoot) ? require_join_paths.joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
225
+ if (file) config = (0, _powerlines_deepkit_vendor_type.resolveClassType)(await (0, _powerlines_deepkit_reflect_type.reflectType)(context, {
226
+ file: !(0, _stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
226
227
  name
227
228
  }));
228
229
  return mergeEnvReflections(context, [
229
230
  await require_helpers_persistence.readEnvTypeReflection(context, "env"),
230
231
  config,
231
- (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getEnvDefaultTypeDefinition(context)))
232
+ (0, _powerlines_deepkit_vendor_type.resolveClassType)(await (0, _powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getEnvDefaultTypeDefinition(context)))
232
233
  ].filter(Boolean));
233
234
  }
234
235
  reflectEnv.__type = [
@@ -253,14 +254,14 @@ reflectEnv.__type = [
253
254
  */
254
255
  async function reflectSecrets(context, file, name) {
255
256
  let config;
256
- if (file) config = (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, {
257
- file: !require_is_parent_path.isParentPath(file, context.workspaceConfig.workspaceRoot) ? require_join_paths.joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
257
+ if (file) config = (0, _powerlines_deepkit_vendor_type.resolveClassType)(await (0, _powerlines_deepkit_reflect_type.reflectType)(context, {
258
+ file: !(0, _stryke_path_is_parent_path.isParentPath)(file, context.workspaceConfig.workspaceRoot) ? (0, _stryke_path_join_paths.joinPaths)(context.workspaceConfig.workspaceRoot, file) : file,
258
259
  name
259
260
  }));
260
261
  return mergeSecretsReflections(context, [
261
262
  await require_helpers_persistence.readSecretsReflection(context),
262
263
  config,
263
- (0, __powerlines_deepkit_vendor_type.resolveClassType)(await (0, __powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getSecretsDefaultTypeDefinition(context)))
264
+ (0, _powerlines_deepkit_vendor_type.resolveClassType)(await (0, _powerlines_deepkit_reflect_type.reflectType)(context, await require_helpers_persistence.getSecretsDefaultTypeDefinition(context)))
264
265
  ].filter(Boolean));
265
266
  }
266
267
  reflectSecrets.__type = [