@powerlines/plugin-env 0.14.4 → 0.14.6

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 (230) hide show
  1. package/dist/{_virtual/rolldown_runtime.mjs → chunk-D1UamjDs.mjs} +1 -1
  2. package/dist/components/docs.cjs +1 -1
  3. package/dist/components/docs.d.cts +1 -8
  4. package/dist/components/docs.d.mts +1 -8
  5. package/dist/components/docs.mjs +1 -1
  6. package/dist/components/env.cjs +1 -34
  7. package/dist/components/env.d.cts +1 -19
  8. package/dist/components/env.d.mts +1 -19
  9. package/dist/components/env.mjs +1 -31
  10. package/dist/components/index.cjs +1 -1
  11. package/dist/components/index.d.cts +3 -2
  12. package/dist/components/index.d.mts +3 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/components-ByVHjWXF.mjs +1 -0
  15. package/dist/components-C9bYrQVK.cjs +0 -0
  16. package/dist/create-reflection-resource-BtYlphp1.mjs +17 -0
  17. package/dist/create-reflection-resource-CdrQyUuT.cjs +17 -0
  18. package/dist/docs-CKCRAUnO.d.mts +9 -0
  19. package/dist/docs-CMoOO30q.mjs +1 -0
  20. package/dist/docs-CdtUw4WA.d.cts +9 -0
  21. package/dist/docs-DWXbRrEK.cjs +1 -0
  22. package/dist/env-Bwys2dqb.mjs +31 -0
  23. package/dist/env-COWzTupf.d.cts +20 -0
  24. package/dist/env-DqPOEUEu.d.mts +20 -0
  25. package/dist/env-mhFQyGk4.cjs +34 -0
  26. package/dist/index-B_e8BwCm.d.cts +1 -0
  27. package/dist/index-CW2WHUXP.d.mts +1 -0
  28. package/dist/index-DCQ5Y2ED.d.mts +1 -0
  29. package/dist/index-DWPDThxu.d.cts +1 -0
  30. package/dist/index.cjs +8 -4
  31. package/dist/index.d.cts +185 -12
  32. package/dist/index.d.mts +185 -17
  33. package/dist/index.mjs +8 -4
  34. package/dist/{deepkit/schemas/reflection.d.mts → plugin-CuDS8_K8.d.mts} +261 -1
  35. package/dist/plugin-CyRU_Pln.mjs +1 -0
  36. package/dist/plugin-D5qyQPqC.cjs +0 -0
  37. package/dist/{deepkit/schemas/reflection.d.cts → plugin-vBgCrEuY.d.cts} +260 -1
  38. package/dist/runtime-Bisl_1Ja.cjs +0 -0
  39. package/dist/runtime-CRLPiOqf.d.mts +2499 -0
  40. package/dist/runtime-g_eXGBBi.mjs +1 -0
  41. package/dist/runtime-rhT2IfSg.d.cts +2497 -0
  42. package/dist/types/index.cjs +1 -0
  43. package/dist/types/index.d.cts +3 -2
  44. package/dist/types/index.d.mts +3 -2
  45. package/dist/types/index.mjs +1 -1
  46. package/dist/types/plugin.cjs +1 -0
  47. package/dist/types/plugin.d.cts +2 -148
  48. package/dist/types/plugin.d.mts +2 -149
  49. package/dist/types/plugin.mjs +1 -1
  50. package/dist/types/runtime.cjs +1 -0
  51. package/dist/types/runtime.d.cts +1 -793
  52. package/dist/types/runtime.d.mts +1 -793
  53. package/dist/types/runtime.mjs +1 -1
  54. package/dist/types-DMh7K7VC.mjs +1 -0
  55. package/dist/types-MYBaygjr.cjs +0 -0
  56. package/package.json +10 -8
  57. package/dist/_virtual/rolldown_runtime.cjs +0 -1
  58. package/dist/alloy/src/core/components/output.cjs +0 -1
  59. package/dist/alloy/src/core/components/output.mjs +0 -1
  60. package/dist/alloy/src/core/components/single-line-comment.cjs +0 -1
  61. package/dist/alloy/src/core/components/single-line-comment.mjs +0 -1
  62. package/dist/alloy/src/core/components/source-file.cjs +0 -1
  63. package/dist/alloy/src/core/components/source-file.d.cts +0 -22
  64. package/dist/alloy/src/core/components/source-file.d.mts +0 -22
  65. package/dist/alloy/src/core/components/source-file.mjs +0 -1
  66. package/dist/alloy/src/core/contexts/context.cjs +0 -1
  67. package/dist/alloy/src/core/contexts/context.mjs +0 -1
  68. package/dist/alloy/src/core/contexts/reflection.cjs +0 -1
  69. package/dist/alloy/src/core/contexts/reflection.mjs +0 -1
  70. package/dist/alloy/src/create-plugin.cjs +0 -2
  71. package/dist/alloy/src/create-plugin.mjs +0 -2
  72. package/dist/alloy/src/helpers/refkey.cjs +0 -1
  73. package/dist/alloy/src/helpers/refkey.mjs +0 -1
  74. package/dist/alloy/src/markdown/components/markdown-file.cjs +0 -1
  75. package/dist/alloy/src/markdown/components/markdown-file.mjs +0 -1
  76. package/dist/alloy/src/markdown/components/markdown-table.cjs +0 -1
  77. package/dist/alloy/src/markdown/components/markdown-table.mjs +0 -1
  78. package/dist/alloy/src/markdown/contexts/markdown-table.cjs +0 -1
  79. package/dist/alloy/src/markdown/contexts/markdown-table.mjs +0 -1
  80. package/dist/alloy/src/types/components.d.cts +0 -19
  81. package/dist/alloy/src/types/components.d.mts +0 -23
  82. package/dist/alloy/src/typescript/components/builtin-file.cjs +0 -1
  83. package/dist/alloy/src/typescript/components/builtin-file.d.cts +0 -25
  84. package/dist/alloy/src/typescript/components/builtin-file.d.mts +0 -26
  85. package/dist/alloy/src/typescript/components/builtin-file.mjs +0 -1
  86. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +0 -1
  87. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +0 -1
  88. package/dist/alloy/src/typescript/components/tsdoc.cjs +0 -1
  89. package/dist/alloy/src/typescript/components/tsdoc.d.cts +0 -27
  90. package/dist/alloy/src/typescript/components/tsdoc.d.mts +0 -28
  91. package/dist/alloy/src/typescript/components/tsdoc.mjs +0 -1
  92. package/dist/alloy/src/typescript/components/typescript-file.cjs +0 -1
  93. package/dist/alloy/src/typescript/components/typescript-file.d.cts +0 -14
  94. package/dist/alloy/src/typescript/components/typescript-file.d.mts +0 -15
  95. package/dist/alloy/src/typescript/components/typescript-file.mjs +0 -1
  96. package/dist/alloy/src/typescript/components/typescript-interface.cjs +0 -1
  97. package/dist/alloy/src/typescript/components/typescript-interface.d.cts +0 -11
  98. package/dist/alloy/src/typescript/components/typescript-interface.d.mts +0 -12
  99. package/dist/alloy/src/typescript/components/typescript-interface.mjs +0 -1
  100. package/dist/alloy/src/typescript/components/typescript-object.cjs +0 -1
  101. package/dist/alloy/src/typescript/components/typescript-object.mjs +0 -1
  102. package/dist/babel/index.cjs +0 -1
  103. package/dist/babel/index.d.cts +0 -2
  104. package/dist/babel/index.d.mts +0 -2
  105. package/dist/babel/index.mjs +0 -1
  106. package/dist/babel/plugin.cjs +0 -5
  107. package/dist/babel/plugin.d.cts +0 -7
  108. package/dist/babel/plugin.d.mts +0 -9
  109. package/dist/babel/plugin.mjs +0 -5
  110. package/dist/deepkit/schemas/reflection.cjs +0 -1
  111. package/dist/deepkit/schemas/reflection.mjs +0 -1
  112. package/dist/deepkit/schemas/reflection2.cjs +0 -1
  113. package/dist/deepkit/schemas/reflection2.mjs +0 -1
  114. package/dist/deepkit/src/capnp.cjs +0 -1
  115. package/dist/deepkit/src/capnp.mjs +0 -1
  116. package/dist/deepkit/src/esbuild-plugin.cjs +0 -4
  117. package/dist/deepkit/src/esbuild-plugin.mjs +0 -4
  118. package/dist/deepkit/src/reflect-type.cjs +0 -1
  119. package/dist/deepkit/src/reflect-type.mjs +0 -1
  120. package/dist/deepkit/src/resolve-reflections.cjs +0 -1
  121. package/dist/deepkit/src/resolve-reflections.mjs +0 -1
  122. package/dist/deepkit/src/transformer.cjs +0 -1
  123. package/dist/deepkit/src/transformer.mjs +0 -1
  124. package/dist/deepkit/src/transpile.cjs +0 -1
  125. package/dist/deepkit/src/transpile.mjs +0 -1
  126. package/dist/deepkit/src/types.d.cts +0 -10
  127. package/dist/deepkit/src/types.d.mts +0 -10
  128. package/dist/deepkit/src/utilities.cjs +0 -1
  129. package/dist/deepkit/src/utilities.mjs +0 -1
  130. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -1
  131. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -1
  132. package/dist/deepkit/src/vendor/type.cjs +0 -1
  133. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  134. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  135. package/dist/deepkit/src/vendor/type.mjs +0 -1
  136. package/dist/helpers/automd-generator.cjs +0 -1
  137. package/dist/helpers/automd-generator.d.cts +0 -14
  138. package/dist/helpers/automd-generator.d.mts +0 -14
  139. package/dist/helpers/automd-generator.mjs +0 -1
  140. package/dist/helpers/create-reflection-resource.cjs +0 -1
  141. package/dist/helpers/create-reflection-resource.d.cts +0 -15
  142. package/dist/helpers/create-reflection-resource.d.mts +0 -15
  143. package/dist/helpers/create-reflection-resource.mjs +0 -1
  144. package/dist/helpers/index.cjs +0 -1
  145. package/dist/helpers/index.d.cts +0 -7
  146. package/dist/helpers/index.d.mts +0 -7
  147. package/dist/helpers/index.mjs +0 -1
  148. package/dist/helpers/load.cjs +0 -1
  149. package/dist/helpers/load.d.cts +0 -35
  150. package/dist/helpers/load.d.mts +0 -36
  151. package/dist/helpers/load.mjs +0 -1
  152. package/dist/helpers/persistence.cjs +0 -1
  153. package/dist/helpers/persistence.d.cts +0 -84
  154. package/dist/helpers/persistence.d.mts +0 -84
  155. package/dist/helpers/persistence.mjs +0 -1
  156. package/dist/helpers/reflect.cjs +0 -1
  157. package/dist/helpers/reflect.d.cts +0 -46
  158. package/dist/helpers/reflect.d.mts +0 -46
  159. package/dist/helpers/reflect.mjs +0 -1
  160. package/dist/helpers/source-file-env.cjs +0 -1
  161. package/dist/helpers/source-file-env.d.cts +0 -8
  162. package/dist/helpers/source-file-env.d.mts +0 -8
  163. package/dist/helpers/source-file-env.mjs +0 -1
  164. package/dist/helpers/template-helpers.cjs +0 -1
  165. package/dist/helpers/template-helpers.d.cts +0 -15
  166. package/dist/helpers/template-helpers.d.mts +0 -15
  167. package/dist/helpers/template-helpers.mjs +0 -1
  168. package/dist/plugin-automd/src/index.cjs +0 -1
  169. package/dist/plugin-automd/src/index.mjs +0 -1
  170. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  171. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  172. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  173. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  174. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -1
  175. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -1
  176. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -1
  177. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -1
  178. package/dist/plugin-babel/src/helpers/filters.cjs +0 -1
  179. package/dist/plugin-babel/src/helpers/filters.mjs +0 -1
  180. package/dist/plugin-babel/src/helpers/index.cjs +0 -1
  181. package/dist/plugin-babel/src/helpers/index.mjs +0 -1
  182. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -1
  183. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -1
  184. package/dist/plugin-babel/src/helpers/options.cjs +0 -1
  185. package/dist/plugin-babel/src/helpers/options.mjs +0 -1
  186. package/dist/plugin-babel/src/index.cjs +0 -1
  187. package/dist/plugin-babel/src/index.mjs +0 -1
  188. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  189. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  190. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  191. package/dist/powerlines/schemas/fs.d.mts +0 -1
  192. package/dist/powerlines/src/api.d.mts +0 -7
  193. package/dist/powerlines/src/index.d.mts +0 -12
  194. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
  195. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -14
  196. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -14
  197. package/dist/powerlines/src/lib/entry.cjs +0 -1
  198. package/dist/powerlines/src/lib/entry.mjs +0 -1
  199. package/dist/powerlines/src/lib/logger.cjs +0 -1
  200. package/dist/powerlines/src/lib/logger.mjs +0 -1
  201. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -1
  202. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -1
  203. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -1
  204. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -1
  205. package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -1
  206. package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -1
  207. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  208. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -1
  209. package/dist/powerlines/src/types/api.d.mts +0 -5
  210. package/dist/powerlines/src/types/babel.d.cts +0 -23
  211. package/dist/powerlines/src/types/babel.d.mts +0 -23
  212. package/dist/powerlines/src/types/build.d.cts +0 -145
  213. package/dist/powerlines/src/types/build.d.mts +0 -147
  214. package/dist/powerlines/src/types/commands.d.cts +0 -8
  215. package/dist/powerlines/src/types/commands.d.mts +0 -9
  216. package/dist/powerlines/src/types/config.d.cts +0 -368
  217. package/dist/powerlines/src/types/config.d.mts +0 -369
  218. package/dist/powerlines/src/types/context.d.cts +0 -373
  219. package/dist/powerlines/src/types/context.d.mts +0 -375
  220. package/dist/powerlines/src/types/fs.d.cts +0 -458
  221. package/dist/powerlines/src/types/fs.d.mts +0 -458
  222. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  223. package/dist/powerlines/src/types/index.d.mts +0 -12
  224. package/dist/powerlines/src/types/plugin.d.cts +0 -232
  225. package/dist/powerlines/src/types/plugin.d.mts +0 -232
  226. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  227. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  228. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  229. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  230. package/dist/powerlines/src/types/unplugin.d.mts +0 -7
package/dist/index.mjs CHANGED
@@ -1,10 +1,14 @@
1
- import{type_exports as e}from"./deepkit/src/vendor/type.mjs";import{BaseEnv as t,BaseSecrets as n,createEnvReflection as r,createSecretsReflection as i,mergeEnvReflections as a,mergeSecretsReflections as o,reflectEnv as s,reflectSecrets as c}from"./helpers/reflect.mjs";import{getEnvDefaultTypeDefinition as l,getEnvReflectionsPath as u,getEnvTypeReflectionsPath as d,getSecretsDefaultTypeDefinition as f,readEnvReflection as p,readEnvTypeReflection as m,readSecretsReflection as h,resolveRuntimeTypeFile as g,writeEnvReflection as _,writeEnvReflectionSync as v,writeEnvTypeReflection as y}from"./helpers/persistence.mjs";import{createTemplateReflection as b}from"./helpers/template-helpers.mjs";import{formatEnvField as x,removeEnvPrefix as S}from"./helpers/source-file-env.mjs";import{loadEnv as C,loadEnvFromContext as w}from"./helpers/load.mjs";import{createReflectionResource as T}from"./helpers/create-reflection-resource.mjs";import"./helpers/index.mjs";import{env as E}from"./helpers/automd-generator.mjs";import{EnvDocs as D}from"./components/docs.mjs";import{EnvBuiltin as O,EnvTypeDefinition as k}from"./components/env.mjs";import"./components/index.mjs";import{envBabelPlugin as A}from"./babel/plugin.mjs";import"./babel/index.mjs";import{createAlloyPlugin as j}from"./alloy/src/create-plugin.mjs";import M from"./plugin-automd/src/index.mjs";import N from"./plugin-babel/src/index.mjs";import{titleCase as P}from"@stryke/string-format/title-case";import F from"defu";import{parseTypeDefinition as I}from"@stryke/convert/parse-type-definition";import{LogLevelLabel as L}from"@storm-software/config-tools/types";import{toArray as R}from"@stryke/convert/to-array";import{isParentPath as z}from"@stryke/path/is-parent-path";import{ENV_PREFIXES as B}from"@stryke/env/types";import{createComponent as V}from"@alloy-js/core/jsx-runtime";import{joinPaths as H}from"@stryke/path/join";import{existsSync as U}from"@stryke/fs/exists";import{createDirectory as W}from"@stryke/fs/helpers";import{constantCase as G}from"@stryke/string-format/constant-case";const K=j((t={})=>({name:`env`,async config(){this.log(L.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let e={env:F(t,{types:{},prefix:[]}),transform:{babel:{plugins:[A]}}};if(e.env.types)e.env.types=I(e.env.types);else{this.log(L.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let t=await l(this);e.env.types=I(`${t.file}#${t.name}`)}if(e.env.secrets)e.env.secrets=I(e.env.secrets);else{let t=await f(this);e.env.secrets=I(`${t.file}#${t.name}`)}return e.env.prefix=R(e.env.prefix??[]).reduce((e,t)=>{let n=G(t);return e.includes(n)||e.push(n),e},[...B,`POWERLINES_`]),e.env.prefix=e.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),e},async configResolved(){if(this.log(L.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=F({parsed:await C(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&U(d(this,`env`)))this.log(L.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await m(this,`env`),U(u(this,`env`))&&(this.env.used.env=await p(this)),U(d(this,`secrets`))&&(this.env.types.secrets=await m(this,`secrets`)),U(u(this,`secrets`))&&(this.env.used.secrets=await h(this));else{if(this.env.types.env=await s(this,this.config.env.types?.file?z(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:H(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await y(this,this.env.types.env,`env`),this.env.types.secrets=await c(this,this.config.env.secrets?.file?z(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:H(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await y(this,this.env.types.secrets,`secrets`),this.log(L.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let t=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await C(this,this.config.env)).forEach(([e,n])=>{let r=this.config.env.prefix.reduce((t,n)=>e.replace(/_$/g,``).startsWith(n)?e.replace(/_$/g,``).slice(n.length):t,e),i=t.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(n)}),this.env.used.env=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await _(this,this.env.used.env,`env`),this.env.types.secrets&&(await y(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await _(this,this.env.used.secrets,`secrets`))}},render(){let e=this;return this.log(L.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),V(O,{get defaultConfig(){return e.config.env.defaultConfig}})},async docs(){this.log(L.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let t=H(this.config.projectRoot,`docs`,`generated`);U(t)||await W(t);let n=await m(this,`env`),r=H(t,`env.md`);this.log(L.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${P(this.config.framework)||`Powerlines`} -->
1
+ import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as ee,l as p,m,n as h,o as g,p as te,r as ne,s as _,t as re,u as v,v as ie,w as y,x as ae,y as oe}from"./create-reflection-resource-BtYlphp1.mjs";import{n as se,t as b}from"./env-Bwys2dqb.mjs";import{t as x}from"./docs-CMoOO30q.mjs";import"./components-ByVHjWXF.mjs";import"./plugin-CyRU_Pln.mjs";import"./runtime-g_eXGBBi.mjs";import"./types-DMh7K7VC.mjs";import{toArray as S}from"@stryke/convert/to-array";import{isDirectory as ce}from"@stryke/fs/is-file";import{listFiles as le}from"@stryke/fs/list-files";import{appendPath as C}from"@stryke/path/append";import{isAbsolutePath as w}from"@stryke/path/is-type";import{joinPaths as T}from"@stryke/path/join-paths";import{replacePath as ue}from"@stryke/path/replace";import{defineGenerator as de,loadConfig as fe,resolveConfig as pe,transform as me}from"automd";import{loadConfig as he}from"c12";import E from"defu";import ge from"markdown-toc";import{transformAsync as _e}from"@babel/core";import{LogLevelLabel as D}from"@storm-software/config-tools/types";import{findFileExtension as ve,findFileExtensionSafe as ye}from"@stryke/path/file-path-fns";import{isParentPath as O}from"@stryke/path/is-parent-path";import{isSetObject as be}from"@stryke/type-checks/is-set-object";import{isFunction as k}from"@stryke/type-checks/is-function";import"@stryke/type-checks/is-object";import{isSetString as A}from"@stryke/type-checks/is-set-string";import j from"chalk";import M from"@babel/generator";import"@babel/parser";import{declare as N}from"@babel/helper-plugin-utils";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";import{kebabCase as xe}from"@stryke/string-format/kebab-case";import{titleCase as P}from"@stryke/string-format/title-case";import*as F from"@babel/types";import{isString as I}from"@stryke/type-checks/is-string";import{parseTypeDefinition as L}from"@stryke/convert/parse-type-definition";import{ENV_PREFIXES as Se}from"@stryke/env/types";import{existsSync as R}from"@stryke/fs/exists";import{createDirectory as Ce}from"@stryke/fs/helpers";import{joinPaths as z}from"@stryke/path/join";import{constantCase as we}from"@stryke/string-format/constant-case";import*as Te from"@stryke/capnp";import{getUniqueBy as B}from"@stryke/helpers/get-unique";import{StormJSON as V}from"@stryke/json/storm-json";import{isNull as Ee}from"@stryke/type-checks/is-null";import{isUndefined as De}from"@stryke/type-checks/is-undefined";import{readFileBufferSync as Oe}from"@stryke/fs/buffer";import{existsSync as ke}from"node:fs";import{jsx as Ae}from"@alloy-js/core/jsx-runtime";var je=(e={})=>({name:`automd`,async config(){let t=await fe(T(this.workspaceConfig.workspaceRoot,this.config.projectRoot),e);return(!t.prefix||!Array.isArray(t.prefix))&&(t.prefix=S(t.prefix??[])),t.prefix.includes(`automd`)||t.prefix.push(`automd`),t.prefix.includes(`powerlines`)||t.prefix.push(`powerlines`),{automd:E(t??{},{configFile:e.configFile,allowIssues:!0,dir:this.config.projectRoot,watch:!1,input:`README.md`,toc:{maxDepth:6,bullets:`-`}})}},async configResolved(){if(this.config.framework&&!S(this.config.automd.prefix).includes(this.config.framework)&&(this.config.automd.prefix=S(this.config.automd.prefix).concat(this.config.framework)),this.config.automd.configFile){let{config:e}=await he({cwd:this.config.automd.dir,configFile:this.config.automd.configFile,defaults:{ignore:[`**/node_modules`,`**/dist`,`**/.*`],dir:this.config.automd.dir}});this.config.automd=pe(E(this.config.automd,{...e,prefix:S(e.prefix??[])}))}this.config.automd.input=(await Promise.all(S(this.config.automd.input).map(async e=>e.includes(`*`)?le(w(e)?e:C(e,this.config.projectRoot),{ignore:this.config.automd.ignore}):w(e)?e:C(e,this.config.projectRoot)))).flat(),this.config.automd.output&&!w(this.config.automd.output)&&(this.config.automd.output=C(this.config.automd.output,this.config.projectRoot)),this.config.automd.generators??={},this.config.automd.toc!==!1&&(this.config.automd.generators.toc??={name:`toc`,generate:e=>{let t=this.config.automd.toc??{};return{contents:ge(e.block.md,{...t,maxdepth:t.maxDepth,first1:t.firstH1}).content}}})},async docs(){await Promise.all(S(this.config.automd.input).map(async e=>{let t=await this.fs.read(e);if(t){let n=await me(t,this.config.automd);if(n.hasIssues&&this.config.automd.allowIssues===!1)throw Error(`AutoMD found issues in file "${e}". Please resolve the issues or set \`allowIssues\` to true in the plugin configuration to ignore them.`);n.hasChanged&&await this.fs.write(C(this.config.automd.output?ce(this.config.automd.output)?ue(e,this.config.automd.output):this.config.automd.output:e,this.config.projectRoot),n.contents)}}))}});function H(e){return A(e)?e:Array.isArray(e)&&e.length>0?H(e[0]):e.$$name||e.name?e.$$name||e.name:void 0}function U(e,t){return!!(H(t)&&e.some(e=>Array.isArray(e)&&H(e[0])===H(t)))}function W(e,t){try{return Array.isArray(t)&&t.length>0&&t[0]?k(t[0])?t[0](e):t[0]:k(t)?t(e):t}catch{return t[0]}}function G(e,t,n,r){if(Array.isArray(r)&&r.length>0&&r[0]){if(r.length>2&&r[2]&&k(r[2])&&!r[2](t,n)){e.log(D.TRACE,`Skipping filtered Babel plugin ${j.bold.cyanBright(H(r)||`unnamed`)} for ${n}`);return}return r.length>2?[W(e,r),r[1],r[2]]:[W(e,r),r[1],null]}return[W(e,r),{},null]}let K=M;`default`in K&&(K=K.default);const q=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#D8B4FE`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`,`#8B5CF6`],Me=(e,t)=>(n,...r)=>e(n,` ${j.inverse.hex(q[t.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%q.length]||q[0])(` ${P(t)} `)} ${r.join(` `)} `);function Ne(e,t){let n=n=>N((r,i,a)=>{r.cache.using(()=>n.meta.checksum),r.assertVersion(`^7.0.0-0`);let o=Me(n.log,e);o(D.TRACE,`Initializing the ${j.bold.cyanBright(e)} Babel plugin`);let s=t({log:o,name:e,api:r,options:i,context:n,dirname:a});return s.name=e,o(D.TRACE,`Completed initialization of the ${j.bold.cyanBright(e)} Babel plugin`),s});return n.$$name=e,n}function J(e,t){Ie(e.scope.getProgramParent().path,t)}function Pe(e){return e.get(`specifiers`).filter(Boolean).every(e=>e?.isImportSpecifier())&&e.node.importKind!==`type`&&e.node.importKind!==`typeof`}function Fe(e){let t=new Map;return e.traverse({ImportDeclaration(e){Pe(e)&&t.set(e.node.source.value,e)}}),t}function Ie(e,t){Fe(e).get(t.module)||e.unshiftContainer(`body`,F.importDeclaration([F.importSpecifier(F.identifier(t.name||t.imported),F.identifier(t.imported))],F.stringLiteral(t.module)))}var Le=(e={})=>({name:`babel`,config(){if(be(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=E(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(t,n){if(O(n,this.powerlinesPath)||t.includes(`/* @storm-ignore */`)||t.includes(`/* @storm-disable */`))return this.log(D.TRACE,`Skipping Babel transformation for: ${n}`),{code:t,id:n};this.log(D.TRACE,`Babel transforming file: ${n}`);let r=this.config.transform.babel.plugins.map(e=>G(this,t,n,e)).filter((e,t,n)=>e&&!U(n,e)),i=this.config.transform.babel.presets.map(e=>G(this,t,n,e)).filter((e,t,n)=>e&&!U(n,e));if(Array.isArray(r)&&r.length===0&&Array.isArray(i)&&i.length===0)return{code:t,id:n};[`ts`,`cts`,`mts`,`tsx`].includes(ye(n))&&!U(r,`@babel/plugin-syntax-typescript`)&&!U(i,`@babel/preset-typescript`)&&r.unshift([`@babel/plugin-syntax-typescript`,{isTSX:ve(n)===`.tsx`}]);let a=await _e(t,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:n,plugins:r.map(t=>Array.isArray(t)&&t.length>=2?[t[0],E(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:i.map(t=>Array.isArray(t)&&t.length>=2?[t[0],E(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!a?.code)throw Error(`Powerlines - Babel plugin failed to compile ${n}`);return{code:a.code,id:n}}});function Y(e,t){return Z(e.type,t??e.getDefaultValue())}function X(e){return`"${String(e).replaceAll(`"`,`\\"`)}"`}function Z(e,n){return De(n)?`undefined`:Ee(n)?`null`:e.kind===t.ReflectionKind.boolean?String(n).trim().toLowerCase()===`true`?`true`:`false`:e.kind===t.ReflectionKind.string||e.kind===t.ReflectionKind.literal&&I(e.literal)?X(n):e.kind===t.ReflectionKind.enum?Re(e).kind===t.ReflectionKind.string?X(n):`${String(n)}`:e.kind===t.ReflectionKind.union?Be(e)?X(n):`${String(n)}`:e.kind===t.ReflectionKind.array?X(V.stringify(n)):e.kind===t.ReflectionKind.object||e.kind===t.ReflectionKind.objectLiteral?V.stringify(n):e.kind===t.ReflectionKind.property||e.kind===t.ReflectionKind.parameter?Z(e.type,n):String(n)}function Re(e){if(e.kind!==t.ReflectionKind.enum)throw Error(`Expected a TypeEnum, but received ${e.kind}.`);let n=B(e.values.filter(e=>e!=null),e=>I(e)?{kind:t.ReflectionKind.string}:{kind:t.ReflectionKind.number});if(n.length===0)throw Error(`No valid enum members could be found.`);return n[0]&&I(n[0])?{kind:t.ReflectionKind.string}:{kind:t.ReflectionKind.number}}function ze(e){if(e.kind===t.ReflectionKind.union&&e.types.length>0)return B(e.types,e=>e.kind);throw Error(`Expected a TypeUnion, but received ${e.kind}.`)}function Be(e){return ze(e).some(e=>e.kind===t.ReflectionKind.string||e.kind===t.ReflectionKind.literal&&I(e.literal))}const Q=Ne(`env`,({log:e,context:r})=>{function a(t,n,i=!1){let a=r.env.types.env?.getProperties().filter(e=>e.getAlias().length>0);if(t.name){let o=r.config.env.prefix.find(e=>t.name&&t.name.startsWith(e)&&(r.env.types.env?.hasProperty(t.name.replace(`${e}_`,``))||a.some(n=>n.getAlias().includes(t.name.replace(`${e}_`,``))))),s=t.name;if(o&&(s=t.name.replace(`${o}_`,``)),e(D.TRACE,`Environment variable ${s} found in ${n.filename||`unknown file`}.`),r.env.types.env?.hasProperty(s)||a.some(e=>e.getAlias().includes(s))){let e=r.env.types.env.hasProperty(s)?r.env.types.env.getProperty(s):a.find(e=>e.getAlias().includes(s));if(!e||e.isIgnored())return;if(r.env.used.env.hasProperty(s)||r.env.used.env.addProperty(e.property),r.config.env.inject&&i){let t=r.env.parsed?.[s];if(t===void 0){let e=r.config.env.prefix.find(e=>r.env.parsed[`${e.replace(/_$/g,``)}_${s}`]);e&&(t=r.env.parsed[`${e.replace(/_$/g,``)}_${s}`])}if(t??=e.getDefaultValue(),e.isValueRequired()&&t===void 0)throw Error(`Environment variable \`${s}\` is not defined in the .env configuration files`);return Y(e,t)}}else throw Error(`The "${s}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${n.filename?n.filename:`unknown`}.
2
+
3
+ The following environment configuration names are defined in the \`env\` type definition: \n${r.env.types.env?.getPropertyNames().sort((e,t)=>String(e).localeCompare(String(t))).map(e=>` - ${String(e)} ${a.some(t=>t.getNameAsString()===String(e)&&t.getAlias().length>0)?`(Alias: ${a?.find(t=>t.getNameAsString()===String(e))?.getAlias().join(`, `)})`:``}`).join(`
4
+ `)} \n\nUsing the following env prefix: \n${r.config.env.prefix.map(e=>` - ${e}`).join(`
5
+ `)} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`)}}return{visitor:{MemberExpression(e,t){if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`$storm`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;a(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),J(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isCallExpression({callee:{name:`useStorm`,type:`Identifier`}})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;a(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),J(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`process`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;a(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),J(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isMetaProperty()&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;a(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),J(e,{module:`storm:env`,name:`env`,imported:`env`})}}},post(){e(D.TRACE,`Adding environment variables from ${this.filename||`unknown file`} to env.json.`);let a=t.ReflectionClass.from({kind:t.ReflectionKind.objectLiteral,description:`An object containing the environment variables used by the application.`,types:[]}),o=_(r,`env`);o&&ke(o)&&(e(D.TRACE,`Environment reflection file found at ${o}, reading existing reflection.`),a=(0,t.resolveClassType)((0,t.deserializeType)(n(new Te.Message(Oe(o),!1).getRoot(i).types)))),e(D.TRACE,`Adding new variables to env reflection at ${o}.`),a.getProperties().filter(e=>e.getNameAsString()&&!r.env.used.env.hasProperty(e.getNameAsString())).forEach(e=>{r.env.used.env.addProperty({...e,name:e.getNameAsString(),description:e.getDescription()??`The ${e.getNameAsString()} variable.`,default:e.getDefaultValue(),optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,visibility:e.getVisibility(),type:e.getType(),tags:e.getTags()})})}}}),Ve=e=>de({name:`env`,async generate(){let t=T(e.config.projectRoot,`docs`,`generated`,`env.md`);return e.fs.existsSync(t)?{contents:await e.fs.read(t)||``}:{contents:``}}});async function He(e,t){let n=await l(e,t);return n.getProperties().forEach(e=>{e.getAlias().filter(Boolean).forEach(t=>{n.addProperty({name:t,optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,description:e.getDescription(),visibility:e.getVisibility(),type:e.getType(),default:e.getDefaultValue(),tags:{hidden:e.isHidden(),ignore:e.isIgnored(),internal:e.isInternal(),alias:e.getAlias().filter(e=>e!==t).concat(e.name),title:e.getTitle()||P(e.name),readonly:e.isReadonly(),permission:e.getPermission(),domain:e.getDomain()}})})}),n}const $=(n={})=>[Le(n.babel),{name:`env`,async config(){this.log(D.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let e={env:E(n,{types:{},prefix:[]}),transform:{babel:{plugins:[Q]}}};if(e.env.types)e.env.types=L(e.env.types);else{this.log(D.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let t=await g(this);e.env.types=L(`${t.file}#${t.name}`)}if(e.env.secrets)e.env.secrets=L(e.env.secrets);else{let t=await p(this);e.env.secrets=L(`${t.file}#${t.name}`)}return e.env.prefix=S(e.env.prefix??[]).reduce((e,t)=>{let n=we(t);return e.includes(n)||e.push(n),e},[...Se,`POWERLINES_`]),e.env.prefix=e.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),e},async configResolved(){if(this.log(D.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=E({parsed:await h(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&R(c(this,`env`)))this.log(D.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await l(this,`env`),R(_(this,`env`))&&(this.env.used.env=await v(this)),R(c(this,`secrets`))&&(this.env.types.secrets=await l(this,`secrets`)),R(_(this,`secrets`))&&(this.env.used.secrets=await u(this));else{if(this.env.types.env=await e(this,this.config.env.types?.file?O(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:z(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await d(this,this.env.types.env,`env`),this.env.types.secrets=await y(this,this.config.env.secrets?.file?O(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:z(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await d(this,this.env.types.secrets,`secrets`),this.log(D.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let n=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await h(this,this.config.env)).forEach(([e,t])=>{let r=this.config.env.prefix.reduce((t,n)=>e.replace(/_$/g,``).startsWith(n)?e.replace(/_$/g,``).slice(n.length):t,e),i=n.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(t)}),this.env.used.env=new t.ReflectionClass({kind:t.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await m(this,this.env.used.env,`env`),this.env.types.secrets&&(await d(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new t.ReflectionClass({kind:t.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await m(this,this.env.used.secrets,`secrets`))}},async prepare(){return this.log(D.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),this.render(Ae(b,{defaultConfig:this.config.env.defaultConfig}))},async docs(){this.log(D.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let e=z(this.config.projectRoot,`docs`,`generated`);R(e)||await Ce(e);let n=await l(this,`env`),r=z(e,`env.md`);this.log(D.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${P(this.config.framework)||`Powerlines`} -->
2
6
 
3
7
  Below is a list of environment variables used by the [${this.packageJson.name}](https://www.npmjs.com/package/${this.packageJson.name}) package. These values can be updated in the \`.env\` file in the root of the project. The variables in the list below are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.
4
8
 
5
9
  | Name | Description | Type | Default Value | Required |
6
10
  | ---- | ----------- | ---- | ------------- | :------: |
7
- ${n.getProperties().filter(e=>e.getNameAsString()!==`__POWERLINES_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(t=>`| ${t.getNameAsString().trim()} | ${(t.getDescription()?.replaceAll(`\r`,``)?.replaceAll(`
8
- `,``)??``).trim()} | ${(0,e.stringifyType)(t.getType()).trim().replaceAll(` | `,`, or `)} | ${t.hasDefault()?String(t.getDefaultValue())?.includes(`"`)?t.getDefaultValue():`\`${t.getDefaultValue()}\``:``} | ${t.isValueRequired()?``:`✔`} |`).join(`
11
+ ${n.getProperties().filter(e=>e.getNameAsString()!==`__POWERLINES_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(e=>`| ${e.getNameAsString().trim()} | ${(e.getDescription()?.replaceAll(`\r`,``)?.replaceAll(`
12
+ `,``)??``).trim()} | ${(0,t.stringifyType)(e.getType()).trim().replaceAll(` | `,`, or `)} | ${e.hasDefault()?String(e.getDefaultValue())?.includes(`"`)?e.getDefaultValue():`\`${e.getDefaultValue()}\``:``} | ${e.isValueRequired()?``:`✔`} |`).join(`
9
13
  `)}
10
- `)},async buildEnd(){let e=u(this,`env`);this.log(L.TRACE,`Writing env reflection types to ${e}.`),await _(this,this.env.used.env,`env`)}})),q=(e={})=>[N(e.babel),K(e),{name:`env:automd-generator`,config(){return{automd:F(e.automd??{},{generators:{env:E(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},M(e.automd)];var J=q;export{t as BaseEnv,n as BaseSecrets,O as EnvBuiltin,D as EnvDocs,k as EnvTypeDefinition,r as createEnvReflection,T as createReflectionResource,i as createSecretsReflection,b as createTemplateReflection,J as default,A as envBabelPlugin,x as formatEnvField,l as getEnvDefaultTypeDefinition,u as getEnvReflectionsPath,d as getEnvTypeReflectionsPath,f as getSecretsDefaultTypeDefinition,C as loadEnv,w as loadEnvFromContext,a as mergeEnvReflections,o as mergeSecretsReflections,q as plugin,p as readEnvReflection,m as readEnvTypeReflection,h as readSecretsReflection,s as reflectEnv,c as reflectSecrets,S as removeEnvPrefix,g as resolveRuntimeTypeFile,_ as writeEnvReflection,v as writeEnvReflectionSync,y as writeEnvTypeReflection};
14
+ `)},async buildEnd(){let e=_(this,`env`);this.log(D.TRACE,`Writing env reflection types to ${e}.`),await m(this,this.env.used.env,`env`)}},{name:`env:automd-generator`,config(){return{automd:E(n.automd??{},{generators:{env:Ve(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},je(n.automd)];var Ue=$;export{a as BaseEnv,ie as BaseSecrets,b as EnvBuiltin,x as EnvDocs,se as EnvTypeDefinition,oe as createEnvReflection,re as createReflectionResource,s as createSecretsReflection,He as createTemplateReflection,Ue as default,Q as envBabelPlugin,ee as formatEnvField,g as getEnvDefaultTypeDefinition,_ as getEnvReflectionsPath,c as getEnvTypeReflectionsPath,p as getSecretsDefaultTypeDefinition,h as loadEnv,ne as loadEnvFromContext,ae as mergeEnvReflections,r as mergeSecretsReflections,$ as plugin,v as readEnvReflection,l as readEnvTypeReflection,u as readSecretsReflection,e as reflectEnv,y as reflectSecrets,o as removeEnvPrefix,te as resolveRuntimeTypeFile,m as writeEnvReflection,f as writeEnvReflectionSync,d as writeEnvTypeReflection};
@@ -1,5 +1,16 @@
1
+ import { a as BabelResolvedConfig, c as UserConfig, n as SecretsInterface, o as ResolvedConfig, s as BabelUserConfig, t as EnvInterface, u as PluginContext } from "./runtime-CRLPiOqf.mjs";
2
+ import { Config } from "automd";
3
+ import { DotenvParseOutput } from "@stryke/env/types";
1
4
  import * as $ from "@stryke/capnp";
5
+ import { PrintTreeOptions } from "@alloy-js/core";
6
+ import "@alloy-js/typescript";
7
+ import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
8
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
2
9
 
10
+ //#region ../deepkit/src/vendor/type.d.ts
11
+
12
+ import * as import___deepkit_type from "@deepkit/type";
13
+ //#endregion
3
14
  //#region ../deepkit/schemas/reflection.d.ts
4
15
  declare const ReflectionKind: {
5
16
  readonly NEVER: 0;
@@ -1557,4 +1568,253 @@ declare class SerializedTypes extends $.Struct {
1557
1568
  toString(): string;
1558
1569
  }
1559
1570
  //#endregion
1560
- export { SerializedTypes };
1571
+ //#region ../deepkit/src/types.d.ts
1572
+ type Reflection<T extends Record<string, any> = Record<string, any>> = type_d_exports.ReflectionClass<T> & {
1573
+ dataBuffer?: ArrayBuffer;
1574
+ messageRoot?: SerializedTypes;
1575
+ };
1576
+ //#endregion
1577
+ //#region ../plugin-alloy/src/types/plugin.d.ts
1578
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
1579
+ /**
1580
+ * If true, the Alloy framework is used to generate Typescript output files.
1581
+ *
1582
+ * @defaultValue true
1583
+ */
1584
+ typescript?: boolean;
1585
+ /**
1586
+ * If true, the Alloy framework is used to generate JSON output files.
1587
+ *
1588
+ * @defaultValue false
1589
+ */
1590
+ json?: boolean;
1591
+ /**
1592
+ * If true, the Alloy framework is used to generate Markdown output files.
1593
+ *
1594
+ * @defaultValue false
1595
+ */
1596
+ markdown?: boolean;
1597
+ };
1598
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
1599
+ alloy: AlloyPluginOptions;
1600
+ };
1601
+ type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1602
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children$1) => Promise<void>;
1603
+ };
1604
+ //#endregion
1605
+ //#region ../plugin-automd/src/types/toc.d.ts
1606
+ interface TOCOptions {
1607
+ /**
1608
+ * A slugify function to generate slugs for the headings.
1609
+ */
1610
+ slugify?: (str: string) => string;
1611
+ /**
1612
+ * The maximum depth of headings to include in the TOC.
1613
+ *
1614
+ * @defaultValue 6
1615
+ */
1616
+ maxDepth?: number;
1617
+ /**
1618
+ * Whether to include the first H1 heading in the TOC.
1619
+ */
1620
+ firstH1?: boolean;
1621
+ /**
1622
+ * The bullet character to use for list items in the TOC.
1623
+ *
1624
+ * @defaultValue "-"
1625
+ */
1626
+ bullets?: string;
1627
+ /**
1628
+ * A prefix to add to each heading in the TOC.
1629
+ */
1630
+ prefix?: string;
1631
+ /**
1632
+ * A filter function to determine which headings to include in the TOC.
1633
+ */
1634
+ filter?: (str: string, level: number) => boolean;
1635
+ }
1636
+ //#endregion
1637
+ //#region ../plugin-automd/src/types/plugin.d.ts
1638
+ type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1639
+ /**
1640
+ * Path to the AutoMD configuration file.
1641
+ *
1642
+ * @remarks
1643
+ * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1644
+ */
1645
+ configFile?: string;
1646
+ /**
1647
+ * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1648
+ *
1649
+ * @defaultValue true
1650
+ */
1651
+ allowIssues?: boolean;
1652
+ /**
1653
+ * Alternate prefix strings to use for finding generators
1654
+ *
1655
+ * @remarks
1656
+ * By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
1657
+ *
1658
+ * @defaultValue ["automd", "powerlines", "\{framework\}"]
1659
+ */
1660
+ prefix?: string | string[];
1661
+ /**
1662
+ * Table of Contents generator options
1663
+ *
1664
+ * @remarks
1665
+ * If set to `false`, the built-in Table of Contents generator will be disabled.
1666
+ */
1667
+ toc?: false | TOCOptions;
1668
+ };
1669
+ //#endregion
1670
+ //#region ../plugin-babel/src/types/plugin.d.ts
1671
+ type BabelPluginOptions = Partial<BabelUserConfig>;
1672
+ type BabelPluginUserConfig = UserConfig;
1673
+ interface BabelPluginResolvedConfig extends ResolvedConfig {
1674
+ transform: {
1675
+ babel: BabelResolvedConfig;
1676
+ };
1677
+ }
1678
+ type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
1679
+ //#endregion
1680
+ //#region src/types/plugin.d.ts
1681
+ type EnvType = "env" | "secrets";
1682
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1683
+ /**
1684
+ * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
1685
+ */
1686
+ types?: TypeDefinitionParameter;
1687
+ /**
1688
+ * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
1689
+ */
1690
+ secrets?: TypeDefinitionParameter;
1691
+ /**
1692
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
1693
+ *
1694
+ * @remarks
1695
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1696
+ */
1697
+ prefix?: string | string[];
1698
+ /**
1699
+ * Should the plugin inject the env variables in the source code with their values?
1700
+ *
1701
+ * @remarks
1702
+ * This option is set to `true` when building an application project.
1703
+ *
1704
+ * @defaultValue false
1705
+ */
1706
+ inject?: boolean;
1707
+ /**
1708
+ * The default configuration to use when loading environment variables.
1709
+ *
1710
+ * @remarks
1711
+ * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
1712
+ */
1713
+ defaultConfig?: Children$1;
1714
+ /**
1715
+ * Babel configuration options to use when injecting environment variables into the source code.
1716
+ *
1717
+ * @remarks
1718
+ * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
1719
+ */
1720
+ babel?: BabelPluginOptions;
1721
+ /**
1722
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1723
+ *
1724
+ * @remarks
1725
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1726
+ */
1727
+ automd?: AutoMDPluginOptions;
1728
+ };
1729
+ type EnvPluginUserConfig = BabelPluginUserConfig & {
1730
+ env: EnvPluginOptions;
1731
+ };
1732
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
1733
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1734
+ /**
1735
+ * The type definition for the expected env variable parameters
1736
+ *
1737
+ * @remarks
1738
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
1739
+ */
1740
+ types: TypeDefinition;
1741
+ /**
1742
+ * The type definition for the expected env secret parameters
1743
+ *
1744
+ * @remarks
1745
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1746
+ */
1747
+ secrets: TypeDefinition;
1748
+ /**
1749
+ * Should the plugin inject the env variables in the source code with their values?
1750
+ *
1751
+ * @remarks
1752
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1753
+ */
1754
+ inject: EnvPluginOptions["inject"];
1755
+ /**
1756
+ * The prefix used for environment variables
1757
+ *
1758
+ * @remarks
1759
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1760
+ */
1761
+ prefix: string[];
1762
+ };
1763
+ };
1764
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1765
+ env: {
1766
+ /**
1767
+ * The type definitions reflection for the env variables and secrets
1768
+ *
1769
+ * @remarks
1770
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1771
+ */
1772
+ types: {
1773
+ /**
1774
+ * The type definitions for the expected env variables
1775
+ */
1776
+ env: Reflection;
1777
+ /**
1778
+ * The type definitions for the expected env secrets
1779
+ */
1780
+ secrets: Reflection;
1781
+ };
1782
+ /**
1783
+ * The current **used** environment variables and secrets reflection
1784
+ *
1785
+ * @remarks
1786
+ * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
1787
+ */
1788
+ used: {
1789
+ /**
1790
+ * The current env variables reflection
1791
+ */
1792
+ env: Reflection<EnvInterface>;
1793
+ /**
1794
+ * The current env secrets reflection
1795
+ */
1796
+ secrets: Reflection<SecretsInterface>;
1797
+ };
1798
+ /**
1799
+ * The parsed .env configuration object
1800
+ *
1801
+ * @remarks
1802
+ * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
1803
+ */
1804
+ parsed: DotenvParseOutput;
1805
+ /**
1806
+ * The injected environment variables and secrets reflection
1807
+ *
1808
+ * @remarks
1809
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1810
+ */
1811
+ injected: Reflection;
1812
+ };
1813
+ }
1814
+ declare type __ΩEnvType = any[];
1815
+ declare type __ΩEnvPluginOptions = any[];
1816
+ declare type __ΩEnvPluginUserConfig = any[];
1817
+ declare type __ΩEnvPluginResolvedConfig = any[];
1818
+ declare type __ΩEnvPluginContext = any[];
1819
+ //#endregion
1820
+ export { EnvType as a, __ΩEnvPluginResolvedConfig as c, type_d_exports as d, EnvPluginUserConfig as i, __ΩEnvPluginUserConfig as l, EnvPluginOptions as n, __ΩEnvPluginContext as o, EnvPluginResolvedConfig as r, __ΩEnvPluginOptions as s, EnvPluginContext as t, __ΩEnvType as u };
@@ -0,0 +1 @@
1
+ export{};
File without changes
@@ -1,5 +1,15 @@
1
+ import { a as BabelResolvedConfig, c as UserConfig, n as SecretsInterface, o as ResolvedConfig, s as BabelUserConfig, t as EnvInterface, u as PluginContext } from "./runtime-rhT2IfSg.cjs";
2
+ import { PrintTreeOptions } from "@alloy-js/core";
3
+ import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
1
4
  import * as $ from "@stryke/capnp";
5
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
6
+ import { Config } from "automd";
7
+ import { DotenvParseOutput } from "@stryke/env/types";
2
8
 
9
+ //#region rolldown:runtime
10
+
11
+ import * as import___deepkit_type from "@deepkit/type";
12
+ //#endregion
3
13
  //#region ../deepkit/schemas/reflection.d.ts
4
14
  declare const ReflectionKind: {
5
15
  readonly NEVER: 0;
@@ -1557,4 +1567,253 @@ declare class SerializedTypes extends $.Struct {
1557
1567
  toString(): string;
1558
1568
  }
1559
1569
  //#endregion
1560
- export { SerializedTypes };
1570
+ //#region ../deepkit/src/types.d.ts
1571
+ type Reflection<T extends Record<string, any> = Record<string, any>> = type_d_exports.ReflectionClass<T> & {
1572
+ dataBuffer?: ArrayBuffer;
1573
+ messageRoot?: SerializedTypes;
1574
+ };
1575
+ //#endregion
1576
+ //#region ../plugin-alloy/src/types/plugin.d.ts
1577
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
1578
+ /**
1579
+ * If true, the Alloy framework is used to generate Typescript output files.
1580
+ *
1581
+ * @defaultValue true
1582
+ */
1583
+ typescript?: boolean;
1584
+ /**
1585
+ * If true, the Alloy framework is used to generate JSON output files.
1586
+ *
1587
+ * @defaultValue false
1588
+ */
1589
+ json?: boolean;
1590
+ /**
1591
+ * If true, the Alloy framework is used to generate Markdown output files.
1592
+ *
1593
+ * @defaultValue false
1594
+ */
1595
+ markdown?: boolean;
1596
+ };
1597
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
1598
+ alloy: AlloyPluginOptions;
1599
+ };
1600
+ type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1601
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children$1) => Promise<void>;
1602
+ };
1603
+ //#endregion
1604
+ //#region ../plugin-automd/src/types/toc.d.ts
1605
+ interface TOCOptions {
1606
+ /**
1607
+ * A slugify function to generate slugs for the headings.
1608
+ */
1609
+ slugify?: (str: string) => string;
1610
+ /**
1611
+ * The maximum depth of headings to include in the TOC.
1612
+ *
1613
+ * @defaultValue 6
1614
+ */
1615
+ maxDepth?: number;
1616
+ /**
1617
+ * Whether to include the first H1 heading in the TOC.
1618
+ */
1619
+ firstH1?: boolean;
1620
+ /**
1621
+ * The bullet character to use for list items in the TOC.
1622
+ *
1623
+ * @defaultValue "-"
1624
+ */
1625
+ bullets?: string;
1626
+ /**
1627
+ * A prefix to add to each heading in the TOC.
1628
+ */
1629
+ prefix?: string;
1630
+ /**
1631
+ * A filter function to determine which headings to include in the TOC.
1632
+ */
1633
+ filter?: (str: string, level: number) => boolean;
1634
+ }
1635
+ //#endregion
1636
+ //#region ../plugin-automd/src/types/plugin.d.ts
1637
+ type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1638
+ /**
1639
+ * Path to the AutoMD configuration file.
1640
+ *
1641
+ * @remarks
1642
+ * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1643
+ */
1644
+ configFile?: string;
1645
+ /**
1646
+ * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1647
+ *
1648
+ * @defaultValue true
1649
+ */
1650
+ allowIssues?: boolean;
1651
+ /**
1652
+ * Alternate prefix strings to use for finding generators
1653
+ *
1654
+ * @remarks
1655
+ * By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
1656
+ *
1657
+ * @defaultValue ["automd", "powerlines", "\{framework\}"]
1658
+ */
1659
+ prefix?: string | string[];
1660
+ /**
1661
+ * Table of Contents generator options
1662
+ *
1663
+ * @remarks
1664
+ * If set to `false`, the built-in Table of Contents generator will be disabled.
1665
+ */
1666
+ toc?: false | TOCOptions;
1667
+ };
1668
+ //#endregion
1669
+ //#region ../plugin-babel/src/types/plugin.d.ts
1670
+ type BabelPluginOptions = Partial<BabelUserConfig>;
1671
+ type BabelPluginUserConfig = UserConfig;
1672
+ interface BabelPluginResolvedConfig extends ResolvedConfig {
1673
+ transform: {
1674
+ babel: BabelResolvedConfig;
1675
+ };
1676
+ }
1677
+ type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
1678
+ //#endregion
1679
+ //#region src/types/plugin.d.ts
1680
+ type EnvType = "env" | "secrets";
1681
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1682
+ /**
1683
+ * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
1684
+ */
1685
+ types?: TypeDefinitionParameter;
1686
+ /**
1687
+ * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
1688
+ */
1689
+ secrets?: TypeDefinitionParameter;
1690
+ /**
1691
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
1692
+ *
1693
+ * @remarks
1694
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1695
+ */
1696
+ prefix?: string | string[];
1697
+ /**
1698
+ * Should the plugin inject the env variables in the source code with their values?
1699
+ *
1700
+ * @remarks
1701
+ * This option is set to `true` when building an application project.
1702
+ *
1703
+ * @defaultValue false
1704
+ */
1705
+ inject?: boolean;
1706
+ /**
1707
+ * The default configuration to use when loading environment variables.
1708
+ *
1709
+ * @remarks
1710
+ * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
1711
+ */
1712
+ defaultConfig?: Children$1;
1713
+ /**
1714
+ * Babel configuration options to use when injecting environment variables into the source code.
1715
+ *
1716
+ * @remarks
1717
+ * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
1718
+ */
1719
+ babel?: BabelPluginOptions;
1720
+ /**
1721
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1722
+ *
1723
+ * @remarks
1724
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1725
+ */
1726
+ automd?: AutoMDPluginOptions;
1727
+ };
1728
+ type EnvPluginUserConfig = BabelPluginUserConfig & {
1729
+ env: EnvPluginOptions;
1730
+ };
1731
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
1732
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1733
+ /**
1734
+ * The type definition for the expected env variable parameters
1735
+ *
1736
+ * @remarks
1737
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
1738
+ */
1739
+ types: TypeDefinition;
1740
+ /**
1741
+ * The type definition for the expected env secret parameters
1742
+ *
1743
+ * @remarks
1744
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1745
+ */
1746
+ secrets: TypeDefinition;
1747
+ /**
1748
+ * Should the plugin inject the env variables in the source code with their values?
1749
+ *
1750
+ * @remarks
1751
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1752
+ */
1753
+ inject: EnvPluginOptions["inject"];
1754
+ /**
1755
+ * The prefix used for environment variables
1756
+ *
1757
+ * @remarks
1758
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1759
+ */
1760
+ prefix: string[];
1761
+ };
1762
+ };
1763
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1764
+ env: {
1765
+ /**
1766
+ * The type definitions reflection for the env variables and secrets
1767
+ *
1768
+ * @remarks
1769
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1770
+ */
1771
+ types: {
1772
+ /**
1773
+ * The type definitions for the expected env variables
1774
+ */
1775
+ env: Reflection;
1776
+ /**
1777
+ * The type definitions for the expected env secrets
1778
+ */
1779
+ secrets: Reflection;
1780
+ };
1781
+ /**
1782
+ * The current **used** environment variables and secrets reflection
1783
+ *
1784
+ * @remarks
1785
+ * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
1786
+ */
1787
+ used: {
1788
+ /**
1789
+ * The current env variables reflection
1790
+ */
1791
+ env: Reflection<EnvInterface>;
1792
+ /**
1793
+ * The current env secrets reflection
1794
+ */
1795
+ secrets: Reflection<SecretsInterface>;
1796
+ };
1797
+ /**
1798
+ * The parsed .env configuration object
1799
+ *
1800
+ * @remarks
1801
+ * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
1802
+ */
1803
+ parsed: DotenvParseOutput;
1804
+ /**
1805
+ * The injected environment variables and secrets reflection
1806
+ *
1807
+ * @remarks
1808
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1809
+ */
1810
+ injected: Reflection;
1811
+ };
1812
+ }
1813
+ declare type __ΩEnvType = any[];
1814
+ declare type __ΩEnvPluginOptions = any[];
1815
+ declare type __ΩEnvPluginUserConfig = any[];
1816
+ declare type __ΩEnvPluginResolvedConfig = any[];
1817
+ declare type __ΩEnvPluginContext = any[];
1818
+ //#endregion
1819
+ export { EnvType as a, __ΩEnvPluginResolvedConfig as c, type_d_exports as d, EnvPluginUserConfig as i, __ΩEnvPluginUserConfig as l, EnvPluginOptions as n, __ΩEnvPluginContext as o, EnvPluginResolvedConfig as r, __ΩEnvPluginOptions as s, EnvPluginContext as t, __ΩEnvType as u };
File without changes