@powerlines/plugin-env 0.15.140 → 0.15.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/automd-generator-BNg74tyV.cjs +37 -0
  2. package/dist/automd-generator-DoKLIMuw.mjs +32 -0
  3. package/dist/automd-generator-DoKLIMuw.mjs.map +1 -0
  4. package/dist/babel/index.cjs +5 -2
  5. package/dist/babel/index.d.cts +14 -1
  6. package/dist/babel/index.d.mts +14 -1
  7. package/dist/babel/index.mjs +4 -1
  8. package/dist/babel/plugin.cjs +4 -140
  9. package/dist/babel/plugin.d.cts +14 -7
  10. package/dist/babel/plugin.d.mts +14 -7
  11. package/dist/babel/plugin.mjs +3 -138
  12. package/dist/babel-BZqmdVF4.cjs +0 -0
  13. package/dist/babel-DgietUY3.mjs +1 -0
  14. package/dist/chunk-CNVrAnJR.cjs +48 -0
  15. package/dist/{_virtual/rolldown_runtime.cjs → chunk-CsF2CmBJ.mjs} +6 -2
  16. package/dist/components/docs.cjs +13 -69
  17. package/dist/components/docs.d.cts +1 -21
  18. package/dist/components/docs.d.mts +1 -21
  19. package/dist/components/docs.mjs +12 -67
  20. package/dist/components/env.cjs +13 -588
  21. package/dist/components/env.d.cts +1 -19
  22. package/dist/components/env.d.mts +1 -19
  23. package/dist/components/env.mjs +11 -584
  24. package/dist/components/index.cjs +17 -5
  25. package/dist/components/index.d.cts +3 -2
  26. package/dist/components/index.d.mts +3 -2
  27. package/dist/components/index.mjs +14 -2
  28. package/dist/components-BUo6Koax.cjs +0 -0
  29. package/dist/components-DDFmImcI.mjs +1 -0
  30. package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs +23 -0
  31. package/dist/confbox.DA7CpUDY-DShUZ_rW.mjs.map +1 -0
  32. package/dist/confbox.DA7CpUDY-r6FXRsI6.cjs +28 -0
  33. package/dist/confbox.DnMsyigM-C13n3X-S.cjs +415 -0
  34. package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs +405 -0
  35. package/dist/confbox.DnMsyigM-V6Wj0LPC.mjs.map +1 -0
  36. package/dist/create-reflection-resource-B3friIs9.mjs +98 -0
  37. package/dist/create-reflection-resource-B3friIs9.mjs.map +1 -0
  38. package/dist/create-reflection-resource-BJj83ii4.cjs +103 -0
  39. package/dist/create-reflection-resource-DSLbLsX2.d.cts +16 -0
  40. package/dist/create-reflection-resource-DSLbLsX2.d.cts.map +1 -0
  41. package/dist/create-reflection-resource-DwWJAo-G.d.mts +16 -0
  42. package/dist/create-reflection-resource-DwWJAo-G.d.mts.map +1 -0
  43. package/dist/defu-CrqNIh1A.cjs +227 -0
  44. package/dist/defu-DV5Grr85.mjs +180 -0
  45. package/dist/defu-DV5Grr85.mjs.map +1 -0
  46. package/dist/dist-BQc8ZRwl.cjs +13 -0
  47. package/dist/dist-C_a6goTt.cjs +15282 -0
  48. package/dist/dist-CjWvISyq.mjs +15271 -0
  49. package/dist/dist-CjWvISyq.mjs.map +1 -0
  50. package/dist/dist-mV5Swt78.mjs +13 -0
  51. package/dist/dist-mV5Swt78.mjs.map +1 -0
  52. package/dist/docs-B-SDRHeg.cjs +75 -0
  53. package/dist/docs-B0d8pdIg.d.mts +23 -0
  54. package/dist/docs-B0d8pdIg.d.mts.map +1 -0
  55. package/dist/docs-DMfzQuvP.d.cts +23 -0
  56. package/dist/docs-DMfzQuvP.d.cts.map +1 -0
  57. package/dist/docs-DbRoWmL_.mjs +70 -0
  58. package/dist/docs-DbRoWmL_.mjs.map +1 -0
  59. package/dist/docs-helper-2fe7M3Th.mjs +24 -0
  60. package/dist/docs-helper-2fe7M3Th.mjs.map +1 -0
  61. package/dist/docs-helper-4MoQ5-R3.cjs +28 -0
  62. package/dist/env-BIyd8CTA.d.cts +21 -0
  63. package/dist/env-BIyd8CTA.d.cts.map +1 -0
  64. package/dist/env-BKmI7DyR.d.mts +21 -0
  65. package/dist/env-BKmI7DyR.d.mts.map +1 -0
  66. package/dist/env-D9oCn-AS.mjs +587 -0
  67. package/dist/env-D9oCn-AS.mjs.map +1 -0
  68. package/dist/env-R63eR4RP.cjs +598 -0
  69. package/dist/helpers/automd-generator.cjs +3 -31
  70. package/dist/helpers/automd-generator.d.cts +2 -1
  71. package/dist/helpers/automd-generator.d.cts.map +1 -0
  72. package/dist/helpers/automd-generator.d.mts +2 -1
  73. package/dist/helpers/automd-generator.d.mts.map +1 -0
  74. package/dist/helpers/automd-generator.mjs +2 -29
  75. package/dist/helpers/create-reflection-resource.cjs +11 -97
  76. package/dist/helpers/create-reflection-resource.d.cts +3 -14
  77. package/dist/helpers/create-reflection-resource.d.mts +3 -14
  78. package/dist/helpers/create-reflection-resource.mjs +10 -95
  79. package/dist/helpers/docs-helper.cjs +5 -23
  80. package/dist/helpers/docs-helper.d.cts +4 -2
  81. package/dist/helpers/docs-helper.d.cts.map +1 -0
  82. package/dist/helpers/docs-helper.d.mts +4 -2
  83. package/dist/helpers/docs-helper.d.mts.map +1 -0
  84. package/dist/helpers/docs-helper.mjs +4 -21
  85. package/dist/helpers/index.cjs +38 -32
  86. package/dist/helpers/index.d.cts +9 -6
  87. package/dist/helpers/index.d.mts +9 -6
  88. package/dist/helpers/index.mjs +12 -6
  89. package/dist/helpers/load.cjs +10 -134
  90. package/dist/helpers/load.d.cts +3 -34
  91. package/dist/helpers/load.d.mts +3 -34
  92. package/dist/helpers/load.mjs +8 -130
  93. package/dist/helpers/persistence.cjs +15 -321
  94. package/dist/helpers/persistence.d.cts +3 -83
  95. package/dist/helpers/persistence.d.mts +3 -83
  96. package/dist/helpers/persistence.mjs +4 -308
  97. package/dist/helpers/reflect.cjs +13 -262
  98. package/dist/helpers/reflect.d.cts +3 -45
  99. package/dist/helpers/reflect.d.mts +3 -45
  100. package/dist/helpers/reflect.mjs +4 -252
  101. package/dist/helpers/source-file-env.cjs +3 -57
  102. package/dist/helpers/source-file-env.d.cts +1 -7
  103. package/dist/helpers/source-file-env.d.mts +1 -7
  104. package/dist/helpers/source-file-env.mjs +1 -54
  105. package/dist/helpers/template-helpers.cjs +6 -69
  106. package/dist/helpers/template-helpers.d.cts +3 -14
  107. package/dist/helpers/template-helpers.d.mts +3 -14
  108. package/dist/helpers/template-helpers.mjs +5 -67
  109. package/dist/helpers-45e1bvAO.mjs +1 -0
  110. package/dist/helpers-DgYP3uej.cjs +0 -0
  111. package/dist/index-BNRXMhlr.d.mts +1 -0
  112. package/dist/index-Bdi8CvaN.d.cts +16 -0
  113. package/dist/index-Bdi8CvaN.d.cts.map +1 -0
  114. package/dist/index-CEDY7cmG.d.cts +1 -0
  115. package/dist/index-CREkvfw9.d.mts +1 -0
  116. package/dist/index-DSiHnMH2.d.cts +1 -0
  117. package/dist/index-Drhzdkqe.d.mts +16 -0
  118. package/dist/index-Drhzdkqe.d.mts.map +1 -0
  119. package/dist/index-dhjtMp5F.d.mts +1 -0
  120. package/dist/index-uTS5iDq_.d.cts +1 -0
  121. package/dist/index.cjs +257 -98
  122. package/dist/index.d.cts +14 -23
  123. package/dist/index.d.mts +14 -23
  124. package/dist/index.mjs +184 -23
  125. package/dist/index.mjs.map +1 -0
  126. package/dist/join-paths-BMg51Ddi.mjs +148 -0
  127. package/dist/join-paths-BMg51Ddi.mjs.map +1 -0
  128. package/dist/join-paths-Bc4rM2TX.cjs +159 -0
  129. package/dist/json5-DEV_07Nb.cjs +786 -0
  130. package/dist/json5-jq90mF9X.mjs +787 -0
  131. package/dist/json5-jq90mF9X.mjs.map +1 -0
  132. package/dist/jsonc-CBh70baJ.cjs +4 -0
  133. package/dist/jsonc-CDLU6bgi.mjs +4 -0
  134. package/dist/load-DPB0maqs.cjs +6594 -0
  135. package/dist/load-Dr5ybfL7.mjs +6579 -0
  136. package/dist/load-Dr5ybfL7.mjs.map +1 -0
  137. package/dist/load-GpP6cojj.d.mts +36 -0
  138. package/dist/load-GpP6cojj.d.mts.map +1 -0
  139. package/dist/load-PHGmxX_X.d.cts +36 -0
  140. package/dist/load-PHGmxX_X.d.cts.map +1 -0
  141. package/dist/multipart-parser-D65rtMfY.mjs +176 -0
  142. package/dist/multipart-parser-D65rtMfY.mjs.map +1 -0
  143. package/dist/multipart-parser-aEF5a4Xf.cjs +178 -0
  144. package/dist/node-Co8KdzkZ.cjs +3985 -0
  145. package/dist/node-D9MigVDD.mjs +3975 -0
  146. package/dist/node-D9MigVDD.mjs.map +1 -0
  147. package/dist/persistence-BR4cUaN6.d.cts +85 -0
  148. package/dist/persistence-BR4cUaN6.d.cts.map +1 -0
  149. package/dist/persistence-BsBxs9wt.mjs +586 -0
  150. package/dist/persistence-BsBxs9wt.mjs.map +1 -0
  151. package/dist/persistence-D_clXRxP.cjs +712 -0
  152. package/dist/persistence-DrKQZNCv.d.mts +85 -0
  153. package/dist/persistence-DrKQZNCv.d.mts.map +1 -0
  154. package/dist/plugin-CM1TSv1B.cjs +159 -0
  155. package/dist/plugin-CSVnrdpE.cjs +146 -0
  156. package/dist/plugin-CSe5f2cD.d.cts +155 -0
  157. package/dist/plugin-CSe5f2cD.d.cts.map +1 -0
  158. package/dist/plugin-DMbVjdcQ.d.mts +155 -0
  159. package/dist/plugin-DMbVjdcQ.d.mts.map +1 -0
  160. package/dist/plugin-Vyvy9w9Z.mjs +141 -0
  161. package/dist/plugin-Vyvy9w9Z.mjs.map +1 -0
  162. package/dist/plugin-eBjQJP6x.mjs +130 -0
  163. package/dist/plugin-eBjQJP6x.mjs.map +1 -0
  164. package/dist/reflect-Dm8a3c29.d.cts +47 -0
  165. package/dist/reflect-Dm8a3c29.d.cts.map +1 -0
  166. package/dist/reflect-Dpz8ifa0.d.mts +47 -0
  167. package/dist/reflect-Dpz8ifa0.d.mts.map +1 -0
  168. package/dist/runtime-BDzzR4wH.d.cts +792 -0
  169. package/dist/runtime-BDzzR4wH.d.cts.map +1 -0
  170. package/dist/runtime-C5ukCv3P.mjs +242 -0
  171. package/dist/runtime-C5ukCv3P.mjs.map +1 -0
  172. package/dist/runtime-g0TEIoZK.cjs +253 -0
  173. package/dist/runtime-lYSIZdMn.d.mts +792 -0
  174. package/dist/runtime-lYSIZdMn.d.mts.map +1 -0
  175. package/dist/source-file-env-4Vdtzc5-.cjs +68 -0
  176. package/dist/source-file-env-Brfopjyr.d.cts +9 -0
  177. package/dist/source-file-env-Brfopjyr.d.cts.map +1 -0
  178. package/dist/source-file-env-DWejSP2U.d.mts +9 -0
  179. package/dist/source-file-env-DWejSP2U.d.mts.map +1 -0
  180. package/dist/source-file-env-Tj-6qobx.mjs +57 -0
  181. package/dist/source-file-env-Tj-6qobx.mjs.map +1 -0
  182. package/dist/template-helpers-1SKodHKt.d.mts +16 -0
  183. package/dist/template-helpers-1SKodHKt.d.mts.map +1 -0
  184. package/dist/template-helpers-CCEjhw1B.mjs +70 -0
  185. package/dist/template-helpers-CCEjhw1B.mjs.map +1 -0
  186. package/dist/template-helpers-YVcwxmoF.cjs +75 -0
  187. package/dist/template-helpers-zyitPfMz.d.cts +16 -0
  188. package/dist/template-helpers-zyitPfMz.d.cts.map +1 -0
  189. package/dist/toml-DvrxV201.cjs +657 -0
  190. package/dist/toml-uuOYvEAO.mjs +658 -0
  191. package/dist/toml-uuOYvEAO.mjs.map +1 -0
  192. package/dist/types/index.cjs +10 -9
  193. package/dist/types/index.d.cts +3 -2
  194. package/dist/types/index.d.mts +3 -2
  195. package/dist/types/index.mjs +3 -2
  196. package/dist/types/plugin.cjs +7 -133
  197. package/dist/types/plugin.d.cts +2 -153
  198. package/dist/types/plugin.d.mts +2 -153
  199. package/dist/types/plugin.mjs +2 -127
  200. package/dist/types/runtime.cjs +3 -242
  201. package/dist/types/runtime.d.cts +1 -790
  202. package/dist/types/runtime.d.mts +1 -790
  203. package/dist/types/runtime.mjs +1 -239
  204. package/dist/types-DyPQho_C.mjs +1 -0
  205. package/dist/types-o3zWarRp.cjs +0 -0
  206. package/dist/yaml-CIn2Gddw.mjs +1055 -0
  207. package/dist/yaml-CIn2Gddw.mjs.map +1 -0
  208. package/dist/yaml-CQSFMRMS.cjs +1054 -0
  209. package/package.json +9 -9
@@ -0,0 +1,598 @@
1
+ const require_chunk = require('./chunk-CNVrAnJR.cjs');
2
+ const require_defu = require('./defu-CrqNIh1A.cjs');
3
+ const require_load = require('./load-DPB0maqs.cjs');
4
+ const require_create_reflection_resource = require('./create-reflection-resource-BJj83ii4.cjs');
5
+ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
6
+ let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
7
+ let __alloy_js_core = require("@alloy-js/core");
8
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
+ let __powerlines_plugin_alloy_core_contexts_context = require("@powerlines/plugin-alloy/core/contexts/context");
10
+ let __alloy_js_typescript = require("@alloy-js/typescript");
11
+ let __powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
12
+ let __powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
13
+ let __powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
14
+ let __powerlines_plugin_alloy_typescript_components_typescript_interface = require("@powerlines/plugin-alloy/typescript/components/typescript-interface");
15
+ let __powerlines_plugin_alloy_typescript_components_typescript_object = require("@powerlines/plugin-alloy/typescript/components/typescript-object");
16
+ let __stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
17
+
18
+ //#region src/components/env.tsx
19
+ /**
20
+ * Generates the environment configuration typescript definition for the Powerlines project.
21
+ */
22
+ function EnvTypeDefinition(props) {
23
+ const [{ defaultValue, reflection }] = (0, __alloy_js_core.splitProps)(props, ["defaultValue", "reflection"]);
24
+ const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlinesSafe)();
25
+ if (!context) return null;
26
+ return [
27
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_interface.TypeScriptInterface, {
28
+ name: " EnvBase",
29
+ defaultValue,
30
+ reflection,
31
+ "export": true
32
+ }),
33
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
34
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
35
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
36
+ heading: "The environment configuration object with prefixed keys.",
37
+ get children() {
38
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The \`Env\` type extends the \`EnvBase\` interface by including additional keys that are prefixed according to the project's configuration. This allows for flexibility in accessing environment variables with different naming conventions.` });
39
+ }
40
+ }),
41
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeDeclaration, {
42
+ name: "Env",
43
+ "export": true,
44
+ get children() {
45
+ return __alloy_js_core.code` {
46
+ [Key in keyof EnvBase as Key ${context.config.env.prefix.map((prefix) => `| \`${prefix.replace(/_$/g, "")}_\${Key}\``).join(" ")}]: EnvBase[Key];
47
+ }
48
+ `;
49
+ }
50
+ }),
51
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
52
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
53
+ ];
54
+ }
55
+ function ConfigPropertyConditional(props) {
56
+ const [{ context, name }] = (0, __alloy_js_core.splitProps)(props, ["context", "name"]);
57
+ if (!context) return null;
58
+ return __alloy_js_core.code`propertyName === "${name}" || propertyName.replace(/^(${context.config.env.prefix.sort((a, b) => a.startsWith(b) ? -1 : b.startsWith(a) ? 1 : a.localeCompare(b)).map((prefix) => `${prefix.replace(/_$/, "")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${name.toLowerCase().replace(/[\s\-_]+/g, "")}"`;
59
+ }
60
+ function ConfigPropertyGet(props) {
61
+ const [{ context, property, index }] = (0, __alloy_js_core.splitProps)(props, [
62
+ "context",
63
+ "property",
64
+ "index"
65
+ ]);
66
+ if (!context) return null;
67
+ return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
68
+ get condition() {
69
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
70
+ get name() {
71
+ return property.getNameAsString();
72
+ },
73
+ context
74
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
75
+ get when() {
76
+ return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
77
+ },
78
+ get children() {
79
+ return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
80
+ get each() {
81
+ return property.getAlias();
82
+ },
83
+ joiner: __alloy_js_core.code` || `,
84
+ children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
85
+ name: alias,
86
+ context
87
+ })
88
+ })];
89
+ }
90
+ })];
91
+ },
92
+ get children() {
93
+ return __alloy_js_core.code`return target["${property.getNameAsString()}"];`;
94
+ }
95
+ }) : (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
96
+ get condition() {
97
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
98
+ get name() {
99
+ return property.getNameAsString();
100
+ },
101
+ context
102
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
103
+ get when() {
104
+ return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
105
+ },
106
+ get children() {
107
+ return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
108
+ get each() {
109
+ return property.getAlias();
110
+ },
111
+ joiner: __alloy_js_core.code` || `,
112
+ children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
113
+ name: alias,
114
+ context
115
+ })
116
+ })];
117
+ }
118
+ })];
119
+ },
120
+ get children() {
121
+ return __alloy_js_core.code`return target["${property.getNameAsString()}"];`;
122
+ }
123
+ })];
124
+ }
125
+ function ConfigPropertySet(props) {
126
+ const [{ context, property, index }] = (0, __alloy_js_core.splitProps)(props, [
127
+ "context",
128
+ "property",
129
+ "index"
130
+ ]);
131
+ if (!context) return null;
132
+ return [index === 0 ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
133
+ get condition() {
134
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
135
+ get name() {
136
+ return property.getNameAsString();
137
+ },
138
+ context
139
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
140
+ get when() {
141
+ return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
142
+ },
143
+ get children() {
144
+ return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
145
+ get each() {
146
+ return property.getAlias();
147
+ },
148
+ joiner: __alloy_js_core.code` || `,
149
+ children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
150
+ name: alias,
151
+ context
152
+ })
153
+ })];
154
+ }
155
+ })];
156
+ },
157
+ get children() {
158
+ return __alloy_js_core.code`
159
+ target["${property.getNameAsString()}"] = newValue;
160
+ return true;
161
+ `;
162
+ }
163
+ }) : (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseIfClause, {
164
+ get condition() {
165
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
166
+ get name() {
167
+ return property.getNameAsString();
168
+ },
169
+ context
170
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
171
+ get when() {
172
+ return (0, __alloy_js_core_jsx_runtime.memo)(() => !!property.getAlias())() && property.getAlias().length > 0;
173
+ },
174
+ get children() {
175
+ return [__alloy_js_core.code` || `, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
176
+ get each() {
177
+ return property.getAlias();
178
+ },
179
+ joiner: __alloy_js_core.code` || `,
180
+ children: (alias) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyConditional, {
181
+ name: alias,
182
+ context
183
+ })
184
+ })];
185
+ }
186
+ })];
187
+ },
188
+ get children() {
189
+ return __alloy_js_core.code`
190
+ target["${property.getNameAsString()}"] = newValue;
191
+ return true;
192
+ `;
193
+ }
194
+ })];
195
+ }
196
+ const createEnvRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("createEnv");
197
+ const envRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("env");
198
+ const envSerializerRefkey = (0, __powerlines_plugin_alloy_helpers_refkey.refkey)("EnvSerializer");
199
+ /**
200
+ * Generates the environment configuration module for the Powerlines project.
201
+ */
202
+ function EnvBuiltin(props) {
203
+ const [{ defaultConfig, children }, rest] = (0, __alloy_js_core.splitProps)(props, ["defaultConfig", "children"]);
204
+ const context = (0, __powerlines_plugin_alloy_core_contexts_context.usePowerlinesSafe)();
205
+ const defaultValue = (0, __alloy_js_core.computed)(() => context && require_load.loadEnvFromContext(context, process.env));
206
+ const reflection = require_create_reflection_resource.createReflectionResource(context);
207
+ const envInstance = (0, __alloy_js_core.computed)(() => {
208
+ return new __powerlines_deepkit_vendor_type.ReflectionClass({
209
+ kind: __powerlines_deepkit_vendor_type.ReflectionKind.objectLiteral,
210
+ description: `The initial environment configuration state for the ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.name)} project.`,
211
+ types: []
212
+ }, reflection.data ?? void 0);
213
+ });
214
+ const reflectionGetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
215
+ const reflectionSetProperties = (0, __alloy_js_core.computed)(() => reflection.data?.getProperties().filter((property) => !property.isIgnored() && !property.isReadonly()).sort((a, b) => a.getNameAsString().localeCompare(b.getNameAsString())) ?? []);
216
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_builtin_file.BuiltinFile, (0, __alloy_js_core_jsx_runtime.mergeProps)({
217
+ id: "env",
218
+ description: "The environment configuration module provides an interface to define environment configuration parameters."
219
+ }, rest, {
220
+ get imports() {
221
+ return require_defu.defu({ "@powerlines/deepkit/vendor/type": [
222
+ "stringify",
223
+ "serializer",
224
+ "serializeFunction",
225
+ "deserializeFunction",
226
+ "ReflectionKind",
227
+ "Serializer",
228
+ "TemplateState",
229
+ "Type",
230
+ "TypeProperty",
231
+ "TypePropertySignature"
232
+ ] }, rest.imports ?? {});
233
+ },
234
+ get children() {
235
+ return [
236
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
237
+ get when() {
238
+ return !(0, __stryke_type_checks_is_null.isNull)(reflection.data);
239
+ },
240
+ get children() {
241
+ return [
242
+ (0, __alloy_js_core_jsx_runtime.createComponent)(EnvTypeDefinition, {
243
+ get defaultValue() {
244
+ return defaultValue.value;
245
+ },
246
+ get reflection() {
247
+ return reflection.data;
248
+ }
249
+ }),
250
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
251
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
252
+ ];
253
+ }
254
+ }),
255
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_typescript_object.TypescriptObject, {
256
+ name: "initialEnv",
257
+ type: "Partial<EnvBase>",
258
+ defaultValue,
259
+ reflection: envInstance,
260
+ "export": true,
261
+ "const": true,
262
+ doc: "The initial environment configuration object values for the runtime."
263
+ }),
264
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
265
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
266
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
267
+ heading: "The environment configuration serializer for the Powerlines application.",
268
+ get children() {
269
+ return [
270
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://deepkit.io/docs/serialization/serializers` }),
271
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918` }),
272
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This serializer is used to serialize and deserialize the Powerlines environment configuration.` })
273
+ ];
274
+ }
275
+ }),
276
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ClassDeclaration, {
277
+ refkey: envSerializerRefkey,
278
+ name: "EnvSerializer",
279
+ "extends": "Serializer",
280
+ "export": true,
281
+ get children() {
282
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ClassMethod, {
283
+ name: "constructor",
284
+ "public": true,
285
+ doc: "Initializes a new instance of the `EnvSerializer` class.",
286
+ children: __alloy_js_core.code`
287
+ super("env");
288
+
289
+ this.deserializeRegistry.register(
290
+ ReflectionKind.boolean,
291
+ (type: Type, state: TemplateState) => {
292
+ state.addSetter(
293
+ \`typeof \${state.accessor.toString()} !== "boolean" ? \${state.accessor.toString()} === 1 || \${state.accessor.toString()} === "1" || \${state.accessor.toString()}.toLowerCase() === "t" || \${state.accessor.toString()}.toLowerCase() === "true" || \${state.accessor.toString()}.toLowerCase() === "y" || \${state.accessor.toString()}.toLowerCase() === "yes" : \${state.accessor.toString()}\`
294
+ );
295
+ }
296
+ );
297
+ `
298
+ });
299
+ }
300
+ }),
301
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
302
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
303
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
304
+ heading: "A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application.",
305
+ get children() {
306
+ return [
307
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://deepkit.io/docs/serialization/serializers` }),
308
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918` }),
309
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This serializer is used to serialize and deserialize the Powerlines environment configuration.` })
310
+ ];
311
+ }
312
+ }),
313
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
314
+ name: "envSerializer",
315
+ "export": false,
316
+ "const": true,
317
+ get initializer() {
318
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.NewExpression, {
319
+ args: [],
320
+ target: "EnvSerializer"
321
+ });
322
+ }
323
+ }),
324
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
325
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
326
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
327
+ heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
328
+ get children() {
329
+ return [
330
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The resulting JSON object can be stringified using \`JSON.stringify()\`.` }),
331
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocExample, { children: `const json = serializeEnv(env);` }),
332
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocThrows, { children: `ValidationError when serialization or validation fails.` })
333
+ ];
334
+ }
335
+ }),
336
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
337
+ name: "serializeEnv",
338
+ "export": true,
339
+ "const": true,
340
+ initializer: "serializeFunction<EnvBase>(envSerializer)"
341
+ }),
342
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
343
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
344
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
345
+ heading: "Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators.",
346
+ get children() {
347
+ return [
348
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `Types that are already correct will be used as-is.` }),
349
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocExample, { children: `const env = deserializeEnv(json);` }),
350
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocThrows, { children: `ValidationError when deserialization fails.` })
351
+ ];
352
+ }
353
+ }),
354
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
355
+ name: "deserializeEnv",
356
+ "export": true,
357
+ "const": true,
358
+ initializer: "deserializeFunction<EnvBase>(envSerializer)"
359
+ }),
360
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
361
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
362
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
363
+ heading: "Initializes the Powerlines environment configuration module.",
364
+ get children() {
365
+ return [
366
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This function initializes the Powerlines environment configuration object.` }),
367
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
368
+ name: "environmentConfig",
369
+ children: `The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime.`
370
+ }),
371
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocReturns, { children: `The initialized Powerlines configuration object.` })
372
+ ];
373
+ }
374
+ }),
375
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
376
+ get when() {
377
+ return Boolean(context?.entryPath);
378
+ },
379
+ get children() {
380
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.FunctionDeclaration, {
381
+ refkey: createEnvRefkey,
382
+ async: false,
383
+ "export": true,
384
+ name: "createEnv",
385
+ parameters: [{
386
+ name: "environmentConfig",
387
+ type: `Partial<Env>`,
388
+ optional: false,
389
+ default: "{}"
390
+ }],
391
+ returnType: "Env",
392
+ get children() {
393
+ return [
394
+ __alloy_js_core.code`
395
+ return new Proxy<Env>(
396
+ deserializeEnv({
397
+ ...initialEnv,
398
+ ...environmentConfig
399
+ }) as Env,
400
+ {
401
+ get: (target: EnvBase, propertyName: string) => { `,
402
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
403
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
404
+ each: reflectionGetProperties,
405
+ children: (property, index) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertyGet, {
406
+ index,
407
+ context,
408
+ property
409
+ })
410
+ }),
411
+ __alloy_js_core.code`
412
+ return undefined;
413
+ }, `,
414
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
415
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
416
+ __alloy_js_core.code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,
417
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
418
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
419
+ each: reflectionSetProperties,
420
+ ender: __alloy_js_core.code` else `,
421
+ children: (property, index) => (0, __alloy_js_core_jsx_runtime.createComponent)(ConfigPropertySet, {
422
+ index,
423
+ context,
424
+ property
425
+ })
426
+ }),
427
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
428
+ __alloy_js_core.code`return false;
429
+ }
430
+ }
431
+ );
432
+ `
433
+ ];
434
+ }
435
+ });
436
+ }
437
+ }),
438
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
439
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
440
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
441
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
442
+ heading: "The environment configuration object.",
443
+ get children() {
444
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `This object provides access to the environment configuration parameters in the application runtime.` });
445
+ }
446
+ }),
447
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
448
+ refkey: envRefkey,
449
+ name: "env",
450
+ type: "Env",
451
+ "export": true,
452
+ "const": true,
453
+ get initializer() {
454
+ return [__alloy_js_core.code`createEnv(${defaultConfig || "{}"} as Partial<Env>);`];
455
+ }
456
+ }),
457
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
458
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
459
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
460
+ "export": true,
461
+ "const": true,
462
+ name: "isCI",
463
+ doc: "Detect if the application is running in a continuous integration (CI) environment.",
464
+ initializer: __alloy_js_core.code`Boolean(
465
+ env.CI ||
466
+ env.RUN_ID ||
467
+ env.AGOLA_GIT_REF ||
468
+ env.AC_APPCIRCLE ||
469
+ env.APPVEYOR ||
470
+ env.CODEBUILD ||
471
+ env.TF_BUILD ||
472
+ env.bamboo_planKey ||
473
+ env.BITBUCKET_COMMIT ||
474
+ env.BITRISE_IO ||
475
+ env.BUDDY_WORKSPACE_ID ||
476
+ env.BUILDKITE ||
477
+ env.CIRCLECI ||
478
+ env.CIRRUS_CI ||
479
+ env.CF_BUILD_ID ||
480
+ env.CM_BUILD_ID ||
481
+ env.CI_NAME ||
482
+ env.DRONE ||
483
+ env.DSARI ||
484
+ env.EARTHLY_CI ||
485
+ env.EAS_BUILD ||
486
+ env.GERRIT_PROJECT ||
487
+ env.GITEA_ACTIONS ||
488
+ env.GITHUB_ACTIONS ||
489
+ env.GITLAB_CI ||
490
+ env.GOCD ||
491
+ env.BUILDER_OUTPUT ||
492
+ env.HARNESS_BUILD_ID ||
493
+ env.JENKINS_URL ||
494
+ env.LAYERCI ||
495
+ env.MAGNUM ||
496
+ env.NETLIFY ||
497
+ env.NEVERCODE ||
498
+ env.PROW_JOB_ID ||
499
+ env.RELEASE_BUILD_ID ||
500
+ env.RENDER ||
501
+ env.SAILCI ||
502
+ env.HUDSON ||
503
+ env.SCREWDRIVER ||
504
+ env.SEMAPHORE ||
505
+ env.SOURCEHUT ||
506
+ env.STRIDER ||
507
+ env.TASK_ID ||
508
+ env.RUN_ID ||
509
+ env.TEAMCITY_VERSION ||
510
+ env.TRAVIS ||
511
+ env.VELA ||
512
+ env.NOW_BUILDER ||
513
+ env.APPCENTER_BUILD_ID ||
514
+ env.CI_XCODE_PROJECT ||
515
+ env.XCS || false
516
+ );
517
+ `
518
+ }),
519
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
520
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
521
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
522
+ heading: "Detect the \\`mode\\` of the current runtime environment.",
523
+ get children() {
524
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: __alloy_js_core.code`The \`mode\` is determined by the \`MODE\` environment variable, or falls back to the \`NEXT_PUBLIC_VERCEL_ENV\`, \`NODE_ENV\`, or defaults to \`production\`. While the value can potentially be any string, it is generally recommended to only allow a value in the following list:
525
+ - \`production\`
526
+ - \`test\`
527
+ - \`development\`
528
+ ` });
529
+ }
530
+ }),
531
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
532
+ "export": true,
533
+ "const": true,
534
+ name: "mode",
535
+ initializer: __alloy_js_core.code`String(env.MODE) || "production"; `
536
+ }),
537
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
538
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
539
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
540
+ "export": true,
541
+ "const": true,
542
+ name: "isProduction",
543
+ doc: "Detect if the application is running in `\"production\"` mode",
544
+ initializer: __alloy_js_core.code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
545
+ }),
546
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
547
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
548
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
549
+ "export": true,
550
+ "const": true,
551
+ name: "isTest",
552
+ doc: "Detect if the application is running in `\"test\"` mode",
553
+ initializer: __alloy_js_core.code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
554
+ }),
555
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
556
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
557
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
558
+ "export": true,
559
+ "const": true,
560
+ name: "isDevelopment",
561
+ doc: "Detect if the application is running in `\"development\"` mode",
562
+ initializer: __alloy_js_core.code`["dev", "development"].includes(mode.toLowerCase()); `
563
+ }),
564
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
565
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
566
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.VarDeclaration, {
567
+ "export": true,
568
+ "const": true,
569
+ name: "isDebug",
570
+ doc: "Detect if the application is currently being debugged",
571
+ initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
572
+ }),
573
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
574
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
575
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
576
+ get when() {
577
+ return Boolean(children);
578
+ },
579
+ children
580
+ })
581
+ ];
582
+ }
583
+ }));
584
+ }
585
+
586
+ //#endregion
587
+ Object.defineProperty(exports, 'EnvBuiltin', {
588
+ enumerable: true,
589
+ get: function () {
590
+ return EnvBuiltin;
591
+ }
592
+ });
593
+ Object.defineProperty(exports, 'EnvTypeDefinition', {
594
+ enumerable: true,
595
+ get: function () {
596
+ return EnvTypeDefinition;
597
+ }
598
+ });
@@ -1,32 +1,4 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let powerlines_types_context = require("powerlines/types/context");
3
- let __stryke_path_join_paths = require("@stryke/path/join-paths");
4
- let automd = require("automd");
1
+ require('../join-paths-Bc4rM2TX.cjs');
2
+ const require_automd_generator = require('../automd-generator-BNg74tyV.cjs');
5
3
 
6
- //#region src/helpers/automd-generator.ts
7
- function __assignType(fn, args) {
8
- fn.__type = args;
9
- return fn;
10
- }
11
- /**
12
- * AutoMD generator to generate environment variable documentation
13
- *
14
- * @param context - The generator context.
15
- * @returns The generated documentation content.
16
- */
17
- const env = __assignType((context) => (0, automd.defineGenerator)({
18
- name: "env",
19
- generate: __assignType(async function generate() {
20
- const envDocFile = (0, __stryke_path_join_paths.joinPaths)(context.config.projectRoot, "docs", "generated", "env.md");
21
- if (!context.fs.existsSync(envDocFile)) return { contents: "" };
22
- return { contents: await context.fs.read(envDocFile) || "" };
23
- }, ["generate", "P\"/!"])
24
- }), [
25
- () => powerlines_types_context.__ΩUnresolvedContext,
26
- "context",
27
- "",
28
- "Pn!2\"\"/#"
29
- ]);
30
-
31
- //#endregion
32
- exports.env = env;
4
+ exports.env = require_automd_generator.env;
@@ -11,4 +11,5 @@ import * as automd0 from "automd";
11
11
  */
12
12
  declare const env: (context: UnresolvedContext) => automd0.Generator;
13
13
  //#endregion
14
- export { env };
14
+ export { env };
15
+ //# sourceMappingURL=automd-generator.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automd-generator.d.cts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;cAAa,eAAgB,sBAAiB,OAAA,CAAA"}
@@ -11,4 +11,5 @@ import * as automd0 from "automd";
11
11
  */
12
12
  declare const env: (context: UnresolvedContext) => automd0.Generator;
13
13
  //#endregion
14
- export { env };
14
+ export { env };
15
+ //# sourceMappingURL=automd-generator.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automd-generator.d.mts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":[],"mappings":";;;;;;;;AA4BA;;;cAAa,eAAgB,sBAAiB,OAAA,CAAA"}