@powerlines/plugin-env 0.15.4 → 0.15.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 (264) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/babel/index.cjs +1 -0
  3. package/dist/babel/index.d.cts +1 -0
  4. package/dist/babel/index.d.mts +1 -0
  5. package/dist/babel/index.mjs +3 -0
  6. package/dist/babel/plugin.cjs +200 -0
  7. package/dist/babel/plugin.d.cts +8 -0
  8. package/dist/babel/plugin.d.mts +9 -0
  9. package/dist/babel/plugin.mjs +198 -0
  10. package/dist/components/docs.cjs +70 -3
  11. package/dist/components/docs.d.cts +8 -1
  12. package/dist/components/docs.d.mts +8 -1
  13. package/dist/components/docs.mjs +68 -2
  14. package/dist/components/env.cjs +574 -4
  15. package/dist/components/env.d.cts +19 -2
  16. package/dist/components/env.d.mts +19 -3
  17. package/dist/components/env.mjs +570 -2
  18. package/dist/components/index.cjs +5 -7
  19. package/dist/components/index.d.cts +2 -4
  20. package/dist/components/index.d.mts +2 -5
  21. package/dist/components/index.mjs +2 -4
  22. package/dist/deepkit/schemas/reflection.cjs +5368 -0
  23. package/dist/{plugin-BwuEBScL.d.cts → deepkit/schemas/reflection.d.cts} +1 -268
  24. package/dist/{plugin-BaInAuAh.d.mts → deepkit/schemas/reflection.d.mts} +59 -326
  25. package/dist/deepkit/schemas/reflection.mjs +5365 -0
  26. package/dist/deepkit/schemas/reflection2.cjs +4112 -0
  27. package/dist/deepkit/schemas/reflection2.mjs +4110 -0
  28. package/dist/deepkit/src/capnp.cjs +1692 -0
  29. package/dist/deepkit/src/capnp.mjs +1690 -0
  30. package/dist/deepkit/src/esbuild-plugin.cjs +99 -0
  31. package/dist/deepkit/src/esbuild-plugin.mjs +98 -0
  32. package/dist/deepkit/src/reflect-type.cjs +40 -0
  33. package/dist/deepkit/src/reflect-type.mjs +38 -0
  34. package/dist/deepkit/src/resolve-reflections.cjs +23 -0
  35. package/dist/deepkit/src/resolve-reflections.mjs +22 -0
  36. package/dist/deepkit/src/transformer.cjs +92 -0
  37. package/dist/deepkit/src/transformer.mjs +89 -0
  38. package/dist/deepkit/src/transpile.cjs +39 -0
  39. package/dist/deepkit/src/transpile.mjs +37 -0
  40. package/dist/deepkit/src/types.cjs +22 -0
  41. package/dist/deepkit/src/types.d.cts +10 -0
  42. package/dist/deepkit/src/types.d.mts +10 -0
  43. package/dist/deepkit/src/types.mjs +21 -0
  44. package/dist/deepkit/src/utilities.cjs +182 -0
  45. package/dist/deepkit/src/utilities.mjs +181 -0
  46. package/dist/helpers/automd-generator.cjs +32 -0
  47. package/dist/helpers/automd-generator.mjs +31 -0
  48. package/dist/helpers/create-reflection-resource.cjs +98 -0
  49. package/dist/helpers/create-reflection-resource.d.cts +15 -0
  50. package/dist/helpers/create-reflection-resource.d.mts +15 -0
  51. package/dist/helpers/create-reflection-resource.mjs +97 -0
  52. package/dist/helpers/index.cjs +6 -0
  53. package/dist/helpers/index.d.cts +6 -0
  54. package/dist/helpers/index.d.mts +6 -0
  55. package/dist/helpers/index.mjs +8 -0
  56. package/dist/helpers/load.cjs +134 -0
  57. package/dist/helpers/load.d.cts +35 -0
  58. package/dist/helpers/load.d.mts +36 -0
  59. package/dist/helpers/load.mjs +131 -0
  60. package/dist/helpers/persistence.cjs +320 -0
  61. package/dist/helpers/persistence.d.cts +84 -0
  62. package/dist/helpers/persistence.d.mts +84 -0
  63. package/dist/helpers/persistence.mjs +308 -0
  64. package/dist/helpers/reflect.cjs +263 -0
  65. package/dist/helpers/reflect.d.cts +46 -0
  66. package/dist/helpers/reflect.d.mts +46 -0
  67. package/dist/helpers/reflect.mjs +254 -0
  68. package/dist/helpers/source-file-env.cjs +58 -0
  69. package/dist/helpers/source-file-env.d.cts +8 -0
  70. package/dist/helpers/source-file-env.d.mts +8 -0
  71. package/dist/helpers/source-file-env.mjs +56 -0
  72. package/dist/helpers/template-helpers.cjs +70 -0
  73. package/dist/helpers/template-helpers.d.cts +15 -0
  74. package/dist/helpers/template-helpers.d.mts +15 -0
  75. package/dist/helpers/template-helpers.mjs +69 -0
  76. package/dist/index.cjs +82 -696
  77. package/dist/index.d.cts +16 -185
  78. package/dist/index.d.mts +17 -190
  79. package/dist/index.mjs +31 -648
  80. package/dist/plugin-alloy/src/core/components/output.cjs +45 -0
  81. package/dist/plugin-alloy/src/core/components/output.mjs +44 -0
  82. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +22 -0
  83. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +21 -0
  84. package/dist/plugin-alloy/src/core/components/source-file.cjs +64 -0
  85. package/dist/plugin-alloy/src/core/components/source-file.d.cts +23 -0
  86. package/dist/plugin-alloy/src/core/components/source-file.d.mts +23 -0
  87. package/dist/plugin-alloy/src/core/components/source-file.mjs +62 -0
  88. package/dist/plugin-alloy/src/core/contexts/context.cjs +136 -0
  89. package/dist/plugin-alloy/src/core/contexts/context.mjs +128 -0
  90. package/dist/plugin-alloy/src/core/contexts/index.cjs +2 -0
  91. package/dist/plugin-alloy/src/core/contexts/index.mjs +4 -0
  92. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +110 -0
  93. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +101 -0
  94. package/dist/plugin-alloy/src/helpers/refkey.cjs +23 -0
  95. package/dist/plugin-alloy/src/helpers/refkey.mjs +22 -0
  96. package/dist/plugin-alloy/src/index.cjs +93 -0
  97. package/dist/plugin-alloy/src/index.mjs +91 -0
  98. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +115 -0
  99. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +114 -0
  100. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +39 -0
  101. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +38 -0
  102. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +72 -0
  103. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +71 -0
  104. package/dist/plugin-alloy/src/types/components.cjs +22 -0
  105. package/dist/plugin-alloy/src/types/components.d.cts +22 -0
  106. package/dist/{components-8W0Zgj0y.d.mts → plugin-alloy/src/types/components.d.mts} +2 -1
  107. package/dist/plugin-alloy/src/types/components.mjs +21 -0
  108. package/dist/plugin-alloy/src/types/index.d.mts +2 -0
  109. package/dist/plugin-alloy/src/types/plugin.cjs +55 -0
  110. package/dist/plugin-alloy/src/types/plugin.d.cts +37 -0
  111. package/dist/plugin-alloy/src/types/plugin.d.mts +37 -0
  112. package/dist/plugin-alloy/src/types/plugin.mjs +52 -0
  113. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +57 -0
  114. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +25 -0
  115. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +26 -0
  116. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +56 -0
  117. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +126 -0
  118. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +124 -0
  119. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +442 -0
  120. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +27 -0
  121. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +28 -0
  122. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +433 -0
  123. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +194 -0
  124. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +14 -0
  125. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +15 -0
  126. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +191 -0
  127. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +68 -0
  128. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +11 -0
  129. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +12 -0
  130. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +67 -0
  131. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +124 -0
  132. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +123 -0
  133. package/dist/plugin-automd/src/index.cjs +127 -0
  134. package/dist/plugin-automd/src/index.mjs +124 -0
  135. package/dist/plugin-automd/src/types/plugin.cjs +47 -0
  136. package/dist/plugin-automd/src/types/plugin.d.cts +38 -0
  137. package/dist/plugin-automd/src/types/plugin.d.mts +40 -0
  138. package/dist/plugin-automd/src/types/plugin.mjs +47 -0
  139. package/dist/plugin-automd/src/types/toc.cjs +26 -0
  140. package/dist/plugin-automd/src/types/toc.d.cts +33 -0
  141. package/dist/plugin-automd/src/types/toc.d.mts +33 -0
  142. package/dist/plugin-automd/src/types/toc.mjs +25 -0
  143. package/dist/plugin-babel/src/helpers/ast-utils.cjs +74 -0
  144. package/dist/plugin-babel/src/helpers/ast-utils.mjs +70 -0
  145. package/dist/plugin-babel/src/helpers/create-plugin.cjs +71 -0
  146. package/dist/plugin-babel/src/helpers/create-plugin.mjs +69 -0
  147. package/dist/plugin-babel/src/helpers/filters.cjs +158 -0
  148. package/dist/plugin-babel/src/helpers/filters.mjs +154 -0
  149. package/dist/plugin-babel/src/helpers/index.cjs +5 -0
  150. package/dist/plugin-babel/src/helpers/index.mjs +7 -0
  151. package/dist/plugin-babel/src/helpers/module-helpers.cjs +200 -0
  152. package/dist/plugin-babel/src/helpers/module-helpers.mjs +192 -0
  153. package/dist/plugin-babel/src/helpers/options.cjs +74 -0
  154. package/dist/plugin-babel/src/helpers/options.mjs +71 -0
  155. package/dist/plugin-babel/src/index.cjs +134 -0
  156. package/dist/plugin-babel/src/index.mjs +132 -0
  157. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  158. package/dist/plugin-babel/src/types/plugin.cjs +42 -0
  159. package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
  160. package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
  161. package/dist/plugin-babel/src/types/plugin.mjs +39 -0
  162. package/dist/powerlines/schemas/fs.d.mts +1 -0
  163. package/dist/powerlines/src/api.d.mts +7 -0
  164. package/dist/powerlines/src/index.d.mts +12 -0
  165. package/dist/powerlines/src/internal/helpers/hooks.cjs +119 -0
  166. package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
  167. package/dist/powerlines/src/internal/helpers/hooks.mjs +118 -0
  168. package/dist/powerlines/src/lib/build/esbuild.cjs +161 -0
  169. package/dist/powerlines/src/lib/build/esbuild.mjs +159 -0
  170. package/dist/powerlines/src/lib/entry.cjs +203 -0
  171. package/dist/powerlines/src/lib/entry.mjs +201 -0
  172. package/dist/powerlines/src/lib/logger.cjs +108 -0
  173. package/dist/powerlines/src/lib/logger.mjs +106 -0
  174. package/dist/powerlines/src/lib/utilities/bundle.cjs +67 -0
  175. package/dist/powerlines/src/lib/utilities/bundle.mjs +66 -0
  176. package/dist/powerlines/src/lib/utilities/resolve.cjs +49 -0
  177. package/dist/powerlines/src/lib/utilities/resolve.mjs +48 -0
  178. package/dist/powerlines/src/plugin-utils/paths.cjs +46 -0
  179. package/dist/powerlines/src/plugin-utils/paths.mjs +45 -0
  180. package/dist/powerlines/src/types/api.cjs +1 -0
  181. package/dist/powerlines/src/types/api.d.mts +5 -0
  182. package/dist/powerlines/src/types/api.mjs +3 -0
  183. package/dist/powerlines/src/types/babel.cjs +156 -0
  184. package/dist/powerlines/src/types/babel.d.cts +23 -0
  185. package/dist/powerlines/src/types/babel.d.mts +23 -0
  186. package/dist/powerlines/src/types/babel.mjs +147 -0
  187. package/dist/powerlines/src/types/build.cjs +105 -0
  188. package/dist/powerlines/src/types/build.d.cts +145 -0
  189. package/dist/powerlines/src/types/build.d.mts +147 -0
  190. package/dist/powerlines/src/types/build.mjs +101 -0
  191. package/dist/powerlines/src/types/commands.cjs +16 -0
  192. package/dist/powerlines/src/types/commands.d.cts +8 -0
  193. package/dist/powerlines/src/types/commands.d.mts +9 -0
  194. package/dist/powerlines/src/types/commands.mjs +15 -0
  195. package/dist/powerlines/src/types/config.cjs +306 -0
  196. package/dist/powerlines/src/types/config.d.cts +387 -0
  197. package/dist/powerlines/src/types/config.d.mts +388 -0
  198. package/dist/powerlines/src/types/config.mjs +293 -0
  199. package/dist/powerlines/src/types/context.cjs +324 -0
  200. package/dist/powerlines/src/types/context.d.cts +414 -0
  201. package/dist/powerlines/src/types/context.d.mts +416 -0
  202. package/dist/powerlines/src/types/context.mjs +311 -0
  203. package/dist/powerlines/src/types/fs.cjs +78 -0
  204. package/dist/powerlines/src/types/fs.d.cts +486 -0
  205. package/dist/powerlines/src/types/fs.d.mts +486 -0
  206. package/dist/powerlines/src/types/fs.mjs +75 -0
  207. package/dist/powerlines/src/types/hooks.cjs +52 -0
  208. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  209. package/dist/powerlines/src/types/hooks.mjs +48 -0
  210. package/dist/powerlines/src/types/index.cjs +11 -0
  211. package/dist/powerlines/src/types/index.d.mts +12 -0
  212. package/dist/powerlines/src/types/index.mjs +13 -0
  213. package/dist/powerlines/src/types/plugin.cjs +249 -0
  214. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  215. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  216. package/dist/powerlines/src/types/plugin.mjs +240 -0
  217. package/dist/powerlines/src/types/resolved.cjs +153 -0
  218. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  219. package/dist/powerlines/src/types/resolved.d.mts +83 -0
  220. package/dist/powerlines/src/types/resolved.mjs +148 -0
  221. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  222. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  223. package/dist/powerlines/src/types/unplugin.cjs +1 -0
  224. package/dist/powerlines/src/types/unplugin.d.mts +7 -0
  225. package/dist/powerlines/src/types/unplugin.mjs +3 -0
  226. package/dist/types/index.cjs +10 -3
  227. package/dist/types/index.d.cts +2 -4
  228. package/dist/types/index.d.mts +2 -5
  229. package/dist/types/index.mjs +3 -4
  230. package/dist/types/plugin.cjs +133 -1
  231. package/dist/types/plugin.d.cts +156 -3
  232. package/dist/types/plugin.d.mts +158 -4
  233. package/dist/types/plugin.mjs +128 -2
  234. package/dist/types/runtime.cjs +242 -1
  235. package/dist/types/runtime.d.cts +793 -2
  236. package/dist/types/runtime.d.mts +793 -2
  237. package/dist/types/runtime.mjs +240 -2
  238. package/package.json +13 -9
  239. package/dist/components-C9bYrQVK.cjs +0 -0
  240. package/dist/components-CNIQFfeK.mjs +0 -1
  241. package/dist/create-reflection-resource-BNYxBgW2.mjs +0 -9846
  242. package/dist/create-reflection-resource-BWYhmX7O.cjs +0 -10085
  243. package/dist/docs-5r844zC1.d.mts +0 -9
  244. package/dist/docs-B66b9li3.mjs +0 -219
  245. package/dist/docs-_MmTNBQX.d.cts +0 -9
  246. package/dist/docs-hBlKCRWK.cjs +0 -224
  247. package/dist/env-BPodCdD1.d.cts +0 -116
  248. package/dist/env-IQvgnabX.mjs +0 -1578
  249. package/dist/env-cO4BUDn1.cjs +0 -1596
  250. package/dist/env-zhzvpUI5.d.mts +0 -98
  251. package/dist/index-BXxhKmeA.d.mts +0 -1
  252. package/dist/index-Cc7fCJU9.d.mts +0 -1
  253. package/dist/index-CqdNToYT.d.cts +0 -1
  254. package/dist/index-DWPDThxu.d.cts +0 -1
  255. package/dist/plugin-D3B5E_Hg.mjs +0 -1
  256. package/dist/plugin-D5qyQPqC.cjs +0 -0
  257. package/dist/resolved-BZG2cwRG.d.cts +0 -1789
  258. package/dist/resolved-V5COsfDu.d.mts +0 -1791
  259. package/dist/runtime-Bisl_1Ja.cjs +0 -0
  260. package/dist/runtime-Q8Ni8SeN.d.cts +0 -794
  261. package/dist/runtime-azNoeKr-.mjs +0 -1
  262. package/dist/runtime-qZ0Z2kEd.d.mts +0 -794
  263. package/dist/types-DwElXV6q.mjs +0 -1
  264. package/dist/types-MYBaygjr.cjs +0 -0
@@ -1,4 +1,157 @@
1
- import "../resolved-BZG2cwRG.cjs";
2
- import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "../plugin-BwuEBScL.cjs";
3
- import "../runtime-Q8Ni8SeN.cjs";
1
+ import { Reflection } from "../deepkit/src/types.cjs";
2
+ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "../plugin-alloy/src/types/plugin.cjs";
3
+ import { AutoMDPluginOptions } from "../plugin-automd/src/types/plugin.cjs";
4
+ import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.cjs";
5
+ import { EnvInterface, SecretsInterface } from "./runtime.cjs";
6
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
7
+ import { Children } from "@alloy-js/core/jsx-runtime";
8
+ import { DotenvParseOutput } from "@stryke/env/types";
9
+
10
+ //#region src/types/plugin.d.ts
11
+ type EnvType = "env" | "secrets";
12
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
13
+ /**
14
+ * 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"`.
15
+ */
16
+ types?: TypeDefinitionParameter;
17
+ /**
18
+ * 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"`.
19
+ */
20
+ secrets?: TypeDefinitionParameter;
21
+ /**
22
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
23
+ *
24
+ * @remarks
25
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
26
+ */
27
+ prefix?: string | string[];
28
+ /**
29
+ * Should the plugin inject the env variables in the source code with their values?
30
+ *
31
+ * @remarks
32
+ * This option is set to `true` when building an application project.
33
+ *
34
+ * @defaultValue false
35
+ */
36
+ inject?: boolean;
37
+ /**
38
+ * The default configuration to use when loading environment variables.
39
+ *
40
+ * @remarks
41
+ * 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.
42
+ */
43
+ defaultConfig?: Children;
44
+ /**
45
+ * Babel configuration options to use when injecting environment variables into the source code.
46
+ *
47
+ * @remarks
48
+ * 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.
49
+ */
50
+ babel?: BabelPluginOptions;
51
+ /**
52
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
53
+ *
54
+ * @remarks
55
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
56
+ */
57
+ automd?: AutoMDPluginOptions;
58
+ /**
59
+ * Alloy configuration options to use when injecting environment variables into the source code.
60
+ *
61
+ * @remarks
62
+ * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.
63
+ */
64
+ alloy?: AlloyPluginOptions;
65
+ };
66
+ type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
67
+ env: EnvPluginOptions;
68
+ };
69
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
70
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
71
+ /**
72
+ * The type definition for the expected env variable parameters
73
+ *
74
+ * @remarks
75
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
76
+ */
77
+ types: TypeDefinition;
78
+ /**
79
+ * The type definition for the expected env secret parameters
80
+ *
81
+ * @remarks
82
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
83
+ */
84
+ secrets: TypeDefinition;
85
+ /**
86
+ * Should the plugin inject the env variables in the source code with their values?
87
+ *
88
+ * @remarks
89
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
90
+ */
91
+ inject: EnvPluginOptions["inject"];
92
+ /**
93
+ * The prefix used for environment variables
94
+ *
95
+ * @remarks
96
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
97
+ */
98
+ prefix: string[];
99
+ };
100
+ };
101
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
102
+ env: {
103
+ /**
104
+ * The type definitions reflection for the env variables and secrets
105
+ *
106
+ * @remarks
107
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
108
+ */
109
+ types: {
110
+ /**
111
+ * The type definitions for the expected env variables
112
+ */
113
+ env: Reflection;
114
+ /**
115
+ * The type definitions for the expected env secrets
116
+ */
117
+ secrets: Reflection;
118
+ };
119
+ /**
120
+ * The current **used** environment variables and secrets reflection
121
+ *
122
+ * @remarks
123
+ * 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.
124
+ */
125
+ used: {
126
+ /**
127
+ * The current env variables reflection
128
+ */
129
+ env: Reflection<EnvInterface>;
130
+ /**
131
+ * The current env secrets reflection
132
+ */
133
+ secrets: Reflection<SecretsInterface>;
134
+ };
135
+ /**
136
+ * The parsed .env configuration object
137
+ *
138
+ * @remarks
139
+ * 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}
140
+ */
141
+ parsed: DotenvParseOutput;
142
+ /**
143
+ * The injected environment variables and secrets reflection
144
+ *
145
+ * @remarks
146
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
147
+ */
148
+ injected: Reflection;
149
+ };
150
+ }
151
+ declare type __ΩEnvType = any[];
152
+ declare type __ΩEnvPluginOptions = any[];
153
+ declare type __ΩEnvPluginUserConfig = any[];
154
+ declare type __ΩEnvPluginResolvedConfig = any[];
155
+ declare type __ΩEnvPluginContext = any[];
156
+ //#endregion
4
157
  export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };
@@ -1,5 +1,159 @@
1
- import "../resolved-V5COsfDu.mjs";
2
- import "../components-8W0Zgj0y.mjs";
3
- import { a as EnvType, c as __ΩEnvPluginResolvedConfig, i as EnvPluginUserConfig, l as __ΩEnvPluginUserConfig, n as EnvPluginOptions, o as __ΩEnvPluginContext, r as EnvPluginResolvedConfig, s as __ΩEnvPluginOptions, t as EnvPluginContext, u as __ΩEnvType } from "../plugin-BaInAuAh.mjs";
4
- import "../runtime-qZ0Z2kEd.mjs";
1
+ import { Reflection } from "../deepkit/src/types.mjs";
2
+ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "../plugin-alloy/src/types/plugin.mjs";
3
+ import "../plugin-alloy/src/types/index.mjs";
4
+ import { AutoMDPluginOptions } from "../plugin-automd/src/types/plugin.mjs";
5
+ import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.mjs";
6
+ import "../plugin-babel/src/types/index.mjs";
7
+ import { EnvInterface, SecretsInterface } from "./runtime.mjs";
8
+ import { Children } from "@alloy-js/core/jsx-runtime";
9
+ import { DotenvParseOutput } from "@stryke/env/types";
10
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
11
+
12
+ //#region src/types/plugin.d.ts
13
+ type EnvType = "env" | "secrets";
14
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
15
+ /**
16
+ * 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"`.
17
+ */
18
+ types?: TypeDefinitionParameter;
19
+ /**
20
+ * 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"`.
21
+ */
22
+ secrets?: TypeDefinitionParameter;
23
+ /**
24
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
25
+ *
26
+ * @remarks
27
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
28
+ */
29
+ prefix?: string | string[];
30
+ /**
31
+ * Should the plugin inject the env variables in the source code with their values?
32
+ *
33
+ * @remarks
34
+ * This option is set to `true` when building an application project.
35
+ *
36
+ * @defaultValue false
37
+ */
38
+ inject?: boolean;
39
+ /**
40
+ * The default configuration to use when loading environment variables.
41
+ *
42
+ * @remarks
43
+ * 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.
44
+ */
45
+ defaultConfig?: Children;
46
+ /**
47
+ * Babel configuration options to use when injecting environment variables into the source code.
48
+ *
49
+ * @remarks
50
+ * 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.
51
+ */
52
+ babel?: BabelPluginOptions;
53
+ /**
54
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
55
+ *
56
+ * @remarks
57
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
58
+ */
59
+ automd?: AutoMDPluginOptions;
60
+ /**
61
+ * Alloy configuration options to use when injecting environment variables into the source code.
62
+ *
63
+ * @remarks
64
+ * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.
65
+ */
66
+ alloy?: AlloyPluginOptions;
67
+ };
68
+ type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
69
+ env: EnvPluginOptions;
70
+ };
71
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
72
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
73
+ /**
74
+ * The type definition for the expected env variable parameters
75
+ *
76
+ * @remarks
77
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
78
+ */
79
+ types: TypeDefinition;
80
+ /**
81
+ * The type definition for the expected env secret parameters
82
+ *
83
+ * @remarks
84
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
85
+ */
86
+ secrets: TypeDefinition;
87
+ /**
88
+ * Should the plugin inject the env variables in the source code with their values?
89
+ *
90
+ * @remarks
91
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
92
+ */
93
+ inject: EnvPluginOptions["inject"];
94
+ /**
95
+ * The prefix used for environment variables
96
+ *
97
+ * @remarks
98
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
99
+ */
100
+ prefix: string[];
101
+ };
102
+ };
103
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
104
+ env: {
105
+ /**
106
+ * The type definitions reflection for the env variables and secrets
107
+ *
108
+ * @remarks
109
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
110
+ */
111
+ types: {
112
+ /**
113
+ * The type definitions for the expected env variables
114
+ */
115
+ env: Reflection;
116
+ /**
117
+ * The type definitions for the expected env secrets
118
+ */
119
+ secrets: Reflection;
120
+ };
121
+ /**
122
+ * The current **used** environment variables and secrets reflection
123
+ *
124
+ * @remarks
125
+ * 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.
126
+ */
127
+ used: {
128
+ /**
129
+ * The current env variables reflection
130
+ */
131
+ env: Reflection<EnvInterface>;
132
+ /**
133
+ * The current env secrets reflection
134
+ */
135
+ secrets: Reflection<SecretsInterface>;
136
+ };
137
+ /**
138
+ * The parsed .env configuration object
139
+ *
140
+ * @remarks
141
+ * 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}
142
+ */
143
+ parsed: DotenvParseOutput;
144
+ /**
145
+ * The injected environment variables and secrets reflection
146
+ *
147
+ * @remarks
148
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
149
+ */
150
+ injected: Reflection;
151
+ };
152
+ }
153
+ declare type __ΩEnvType = any[];
154
+ declare type __ΩEnvPluginOptions = any[];
155
+ declare type __ΩEnvPluginUserConfig = any[];
156
+ declare type __ΩEnvPluginResolvedConfig = any[];
157
+ declare type __ΩEnvPluginContext = any[];
158
+ //#endregion
5
159
  export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };
@@ -1,3 +1,129 @@
1
- import "../plugin-D3B5E_Hg.mjs";
1
+ import { __ΩAutoMDPluginOptions } from "../plugin-automd/src/types/plugin.mjs";
2
+ import { __ΩBabelPluginContext, __ΩBabelPluginOptions, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "../plugin-babel/src/types/plugin.mjs";
3
+ import { __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "../plugin-alloy/src/types/plugin.mjs";
4
+ import { __ΩReflection } from "../deepkit/src/types.mjs";
5
+ import { __ΩEnvInterface, __ΩSecretsInterface } from "./runtime.mjs";
2
6
 
3
- export { };
7
+ //#region src/types/plugin.ts
8
+ const __ΩOmit = [
9
+ "T",
10
+ "K",
11
+ () => __ΩPick,
12
+ () => __ΩExclude,
13
+ "Omit",
14
+ "b!b\"e!!e!!ge!\"o$#o##w%y"
15
+ ];
16
+ const __ΩRequired = [
17
+ "T",
18
+ "Required",
19
+ "l+e#!e\"!fRb!Pde\"!gN##w\"y"
20
+ ];
21
+ const __ΩPick = [
22
+ "T",
23
+ "K",
24
+ "Pick",
25
+ "l+e#!e\"!fRb!b\"Pde\"\"N#!w#y"
26
+ ];
27
+ const __ΩExclude = [
28
+ "T",
29
+ "U",
30
+ "Exclude",
31
+ "l6!Re$!RPe#!e$\"qk#%QRb!b\"Pde\"!p)w#y"
32
+ ];
33
+ const __ΩEnvType = [
34
+ "env",
35
+ "secrets",
36
+ "EnvType",
37
+ "P.!.\"Jw#y"
38
+ ];
39
+ const __ΩEnvPluginOptions = [
40
+ () => __ΩOmit,
41
+ "types",
42
+ "types",
43
+ "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\"`.",
44
+ "secrets",
45
+ "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\"`.",
46
+ "prefix",
47
+ "An additional prefix (or list of additional prefixes) to apply to the environment variables",
48
+ "inject",
49
+ true,
50
+ "Should the plugin inject the env variables in the source code with their values?",
51
+ "Children",
52
+ "defaultConfig",
53
+ "The default configuration to use when loading environment variables.",
54
+ () => __ΩBabelPluginOptions,
55
+ "babel",
56
+ "Babel configuration options to use when injecting environment variables into the source code.",
57
+ () => __ΩAutoMDPluginOptions,
58
+ "automd",
59
+ "AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.",
60
+ () => __ΩAlloyPluginOptions,
61
+ "alloy",
62
+ "Alloy configuration options to use when injecting environment variables into the source code.",
63
+ "EnvPluginOptions",
64
+ "P!.\"o!#P!4#8?$!4%8?&P&&FJ4'8?()4)8>*?+\"w,4-8?.n/408?1n2438?4n5468?7MKw8y"
65
+ ];
66
+ const __ΩEnvPluginUserConfig = [
67
+ () => __ΩBabelPluginUserConfig,
68
+ () => __ΩAlloyPluginUserConfig,
69
+ () => __ΩEnvPluginOptions,
70
+ "env",
71
+ "EnvPluginUserConfig",
72
+ "Pn!n\"Pn#4$MKw%y"
73
+ ];
74
+ const __ΩEnvPluginResolvedConfig = [
75
+ () => __ΩBabelPluginResolvedConfig,
76
+ () => __ΩAlloyPluginResolvedConfig,
77
+ () => __ΩRequired,
78
+ () => __ΩPick,
79
+ "additionalFiles",
80
+ () => __ΩRequired,
81
+ () => __ΩPick,
82
+ () => __ΩEnvPluginOptions,
83
+ "defaultConfig",
84
+ "types",
85
+ "The type definition for the expected env variable parameters",
86
+ "secrets",
87
+ "The type definition for the expected env secret parameters",
88
+ () => __ΩEnvPluginOptions,
89
+ "inject",
90
+ "inject",
91
+ "Should the plugin inject the env variables in the source code with their values?",
92
+ "prefix",
93
+ "The prefix used for environment variables",
94
+ "env",
95
+ "EnvPluginResolvedConfig",
96
+ "Pn!n\"PP!.%o$#o#\"n(.)o'#o&\"P!4*?+!4,?-n../f40?1&F42?3MK44MKw5y"
97
+ ];
98
+ const __ΩEnvPluginContext = [
99
+ () => __ΩEnvPluginResolvedConfig,
100
+ "TResolvedConfig",
101
+ () => __ΩBabelPluginContext,
102
+ () => __ΩAlloyPluginContext,
103
+ () => __ΩReflection,
104
+ "env",
105
+ "The type definitions for the expected env variables",
106
+ () => __ΩReflection,
107
+ "secrets",
108
+ "The type definitions for the expected env secrets",
109
+ "The type definitions reflection for the env variables and secrets",
110
+ "types",
111
+ () => __ΩReflection,
112
+ () => __ΩEnvInterface,
113
+ "The current env variables reflection",
114
+ () => __ΩReflection,
115
+ () => __ΩSecretsInterface,
116
+ "The current env secrets reflection",
117
+ "The current **used** environment variables and secrets reflection",
118
+ "used",
119
+ "parsed",
120
+ "The parsed .env configuration object",
121
+ () => __ΩReflection,
122
+ "injected",
123
+ "The injected environment variables and secrets reflection",
124
+ "EnvPluginContext",
125
+ "n!c\"Pe\"!o#\"e\"!o$\"PPn%4&?'n(4)?*M?+4,?+Pn.o-\"4&?/n1o0\"4)?2M?344?3!45?6n748?9M4&Mw:y"
126
+ ];
127
+
128
+ //#endregion
129
+ export { __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType };