@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
@@ -1,254 +1,6 @@
1
- import { __ΩEnvInterface, __ΩSecretsInterface } from "../types/runtime.mjs";
2
- import { __ΩEnvPluginContext } from "../types/plugin.mjs";
3
- import { getEnvDefaultTypeDefinition, getSecretsDefaultTypeDefinition, readEnvTypeReflection, readSecretsReflection } from "./persistence.mjs";
4
- import { ReflectionClass, ReflectionKind, __ΩTypeClass, __ΩTypeObjectLiteral, merge, resolveClassType } from "@powerlines/deepkit/vendor/type";
5
- import { titleCase } from "@stryke/string-format/title-case";
6
- import { joinPaths } from "@stryke/path/join-paths";
7
- import { reflectType } from "@powerlines/deepkit/reflect-type";
8
- import { isParentPath } from "@stryke/path/is-parent-path";
1
+ import "../runtime-C5ukCv3P.mjs";
2
+ import "../plugin-eBjQJP6x.mjs";
3
+ import "../join-paths-BMg51Ddi.mjs";
4
+ import { _ as mergeEnvReflections, b as reflectSecrets, f as BaseEnv, g as createSecretsReflection, h as createEnvReflection, m as __ΩCreateEnvReflectionOptions, p as BaseSecrets, v as mergeSecretsReflections, y as reflectEnv } from "../persistence-BsBxs9wt.mjs";
9
5
 
10
- //#region src/helpers/reflect.ts
11
- function __assignType(fn, args) {
12
- fn.__type = args;
13
- return fn;
14
- }
15
- function mergeEnvReflections(context, reflections) {
16
- return createEnvReflection(context, { type: merge(reflections.map(__assignType((reflection) => reflection.type, [
17
- "reflection",
18
- "",
19
- "P\"2!\"/\""
20
- ]))) });
21
- }
22
- mergeEnvReflections.__type = [
23
- () => __ΩEnvPluginContext,
24
- "context",
25
- () => ReflectionClass,
26
- "reflections",
27
- () => ReflectionClass,
28
- "mergeEnvReflections",
29
- "Pn!2\"P\"7#F2$P\"7%/&"
30
- ];
31
- function mergeSecretsReflections(context, reflections) {
32
- return createSecretsReflection(context, { type: merge(reflections.map(__assignType((reflection) => reflection.type, [
33
- "reflection",
34
- "",
35
- "P\"2!\"/\""
36
- ]))) });
37
- }
38
- mergeSecretsReflections.__type = [
39
- () => __ΩEnvPluginContext,
40
- "context",
41
- () => ReflectionClass,
42
- "reflections",
43
- () => ReflectionClass,
44
- "mergeSecretsReflections",
45
- "Pn!2\"P\"7#F2$P\"7%/&"
46
- ];
47
- const __ΩCreateEnvReflectionOptions = [
48
- () => __ΩTypeObjectLiteral,
49
- () => __ΩTypeClass,
50
- "type",
51
- () => ReflectionClass,
52
- "superReflection",
53
- "CreateEnvReflectionOptions",
54
- "PPn!n\"J4#8P\"7$4%8Mw&y"
55
- ];
56
- var BaseEnv = class {
57
- PLATFORM = "neutral";
58
- MODE = "production";
59
- DEBUG = false;
60
- TEST = false;
61
- MINIMAL = false;
62
- NO_COLOR = false;
63
- FORCE_COLOR = false;
64
- FORCE_HYPERLINK = false;
65
- STACKTRACE = false;
66
- INCLUDE_ERROR_DATA = false;
67
- CI = false;
68
- static __type = [
69
- "APP_NAME",
70
- "APP_VERSION",
71
- "BUILD_ID",
72
- "BUILD_TIMESTAMP",
73
- "BUILD_CHECKSUM",
74
- "RELEASE_ID",
75
- "RELEASE_TAG",
76
- "ORGANIZATION",
77
- "node",
78
- "browser",
79
- "neutral",
80
- "PLATFORM",
81
- function() {
82
- return "neutral";
83
- },
84
- "development",
85
- "test",
86
- "production",
87
- "MODE",
88
- function() {
89
- return "production";
90
- },
91
- "ENVIRONMENT",
92
- "DEBUG",
93
- function() {
94
- return false;
95
- },
96
- "TEST",
97
- function() {
98
- return false;
99
- },
100
- "MINIMAL",
101
- function() {
102
- return false;
103
- },
104
- "NO_COLOR",
105
- function() {
106
- return false;
107
- },
108
- "FORCE_COLOR",
109
- function() {
110
- return false;
111
- },
112
- "FORCE_HYPERLINK",
113
- function() {
114
- return false;
115
- },
116
- "STACKTRACE",
117
- function() {
118
- return false;
119
- },
120
- "INCLUDE_ERROR_DATA",
121
- function() {
122
- return false;
123
- },
124
- "ERROR_URL",
125
- "DEFAULT_TIMEZONE",
126
- "DEFAULT_LOCALE",
127
- "CI",
128
- function() {
129
- return false;
130
- },
131
- () => __ΩEnvInterface,
132
- "BaseEnv",
133
- "&3!&3\"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx\"wJ"
134
- ];
135
- };
136
- var BaseSecrets = class {
137
- static __type = [
138
- "ENCRYPTION_KEY",
139
- () => __ΩSecretsInterface,
140
- "BaseSecrets",
141
- "&3!5n\"x\"w#"
142
- ];
143
- };
144
- function createEnvReflection(context, options = {}) {
145
- const parent = options.superReflection ?? new ReflectionClass({
146
- kind: ReflectionKind.class,
147
- description: `The base environment configuration definition for the ${titleCase(context.config.name)} project.`,
148
- classType: BaseEnv,
149
- types: [],
150
- implements: [{
151
- kind: ReflectionKind.objectLiteral,
152
- typeName: "EnvInterface",
153
- description: `The environment configuration interface definition for the ${titleCase(context.config.name)} project.`,
154
- types: []
155
- }]
156
- });
157
- parent.name = "Env";
158
- const result = new ReflectionClass(options.type ?? {
159
- kind: ReflectionKind.objectLiteral,
160
- typeName: "Env",
161
- description: `A schema describing the list of available environment variables that can be used by the ${context.config.name ? `${titleCase(context.config.name)} application` : "application"}.`,
162
- types: []
163
- }, parent);
164
- result.name = "Env";
165
- return result;
166
- }
167
- createEnvReflection.__type = [
168
- () => __ΩEnvPluginContext,
169
- "context",
170
- () => __ΩCreateEnvReflectionOptions,
171
- "options",
172
- () => ({}),
173
- () => ReflectionClass,
174
- "createEnvReflection",
175
- "Pn!2\"n#2$>%P\"7&/'"
176
- ];
177
- function createSecretsReflection(context, options = {}) {
178
- const parent = options.superReflection ?? new ReflectionClass({
179
- kind: ReflectionKind.class,
180
- description: `The base secrets configuration definition for the ${titleCase(context.config.name)} project.`,
181
- classType: BaseSecrets,
182
- types: [],
183
- implements: [{
184
- kind: ReflectionKind.objectLiteral,
185
- typeName: "SecretsInterface",
186
- description: `The secrets configuration interface definition for the ${titleCase(context.config.name)} project.`,
187
- types: []
188
- }]
189
- });
190
- parent.name = "Secrets";
191
- const result = new ReflectionClass(options.type ?? {
192
- kind: ReflectionKind.objectLiteral,
193
- typeName: "Secrets",
194
- description: `A schema describing the list of available environment secrets that can be used by the ${context.config.name ? `${titleCase(context.config.name)} application` : "application"}.`,
195
- types: []
196
- }, parent);
197
- result.name = "Secrets";
198
- return result;
199
- }
200
- createSecretsReflection.__type = [
201
- () => __ΩEnvPluginContext,
202
- "context",
203
- () => __ΩCreateEnvReflectionOptions,
204
- "options",
205
- () => ({}),
206
- () => ReflectionClass,
207
- "createSecretsReflection",
208
- "Pn!2\"n#2$>%P\"7&/'"
209
- ];
210
- async function reflectEnv(context, file, name) {
211
- let config;
212
- if (file) config = resolveClassType(await reflectType(context, {
213
- file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
214
- name
215
- }));
216
- const defaultConfigType = await reflectType(context, await getEnvDefaultTypeDefinition(context));
217
- return mergeEnvReflections(context, [
218
- await readEnvTypeReflection(context, "env"),
219
- config,
220
- resolveClassType(defaultConfigType)
221
- ].filter(Boolean));
222
- }
223
- reflectEnv.__type = [
224
- () => __ΩEnvPluginContext,
225
- "context",
226
- "file",
227
- "name",
228
- "reflectEnv",
229
- "Pn!2\"&2#8&2$8\"/%"
230
- ];
231
- async function reflectSecrets(context, file, name) {
232
- let config;
233
- if (file) config = resolveClassType(await reflectType(context, {
234
- file: !isParentPath(file, context.workspaceConfig.workspaceRoot) ? joinPaths(context.workspaceConfig.workspaceRoot, file) : file,
235
- name
236
- }));
237
- const defaultSecretsType = await reflectType(context, await getSecretsDefaultTypeDefinition(context));
238
- return mergeSecretsReflections(context, [
239
- await readSecretsReflection(context),
240
- config,
241
- resolveClassType(defaultSecretsType)
242
- ].filter(Boolean));
243
- }
244
- reflectSecrets.__type = [
245
- () => __ΩEnvPluginContext,
246
- "context",
247
- "file",
248
- "name",
249
- "reflectSecrets",
250
- "Pn!2\"&2#8&2$8\"/%"
251
- ];
252
-
253
- //#endregion
254
6
  export { BaseEnv, BaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets };
@@ -1,58 +1,4 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- let __stryke_env_types = require("@stryke/env/types");
3
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
4
- let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
1
+ const require_source_file_env = require('../source-file-env-4Vdtzc5-.cjs');
5
2
 
6
- //#region src/helpers/source-file-env.ts
7
- function __assignType(fn, args) {
8
- fn.__type = args;
9
- return fn;
10
- }
11
- const __ΩTReturned = [
12
- "TEnv",
13
- "TReturned",
14
- "l2&R!RPe#!&qk#%QRb!Pde\"!p'w\"y"
15
- ];
16
- function removeEnvPrefix(env) {
17
- if ((0, __stryke_type_checks_is_string.isString)(env)) {
18
- let name = __stryke_env_types.ENV_PREFIXES.reduce(__assignType((ret, prefix) => {
19
- if (ret.startsWith(prefix)) ret = ret.slice(prefix.length);
20
- return ret;
21
- }, [
22
- "ret",
23
- "prefix",
24
- "",
25
- "P\"2!\"2\"\"/#"
26
- ]), env.toUpperCase());
27
- while (name.startsWith("_")) name = name.slice(1);
28
- return name;
29
- }
30
- return Object.keys(env).reduce(__assignType((ret, key) => {
31
- const name = removeEnvPrefix(key);
32
- if (name) ret[name] = env[key];
33
- return ret;
34
- }, [
35
- "ret",
36
- "key",
37
- "",
38
- "P\"2!\"2\"\"/#"
39
- ]), {});
40
- }
41
- removeEnvPrefix.__type = [
42
- "env",
43
- () => __ΩTReturned,
44
- "removeEnvPrefix",
45
- "P\"2!\"o\"\"/#"
46
- ];
47
- function formatEnvField(key) {
48
- return (0, __stryke_string_format_camel_case.camelCase)(removeEnvPrefix(key));
49
- }
50
- formatEnvField.__type = [
51
- "key",
52
- "formatEnvField",
53
- "P&2!&/\""
54
- ];
55
-
56
- //#endregion
57
- exports.formatEnvField = formatEnvField;
58
- exports.removeEnvPrefix = removeEnvPrefix;
3
+ exports.formatEnvField = require_source_file_env.formatEnvField;
4
+ exports.removeEnvPrefix = require_source_file_env.removeEnvPrefix;
@@ -1,8 +1,2 @@
1
- import { DotenvParseOutput } from "@stryke/env/types";
2
-
3
- //#region src/helpers/source-file-env.d.ts
4
- type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
5
- declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
6
- declare function formatEnvField(key: string): string;
7
- //#endregion
1
+ import { n as removeEnvPrefix, t as formatEnvField } from "../source-file-env-Brfopjyr.cjs";
8
2
  export { formatEnvField, removeEnvPrefix };
@@ -1,8 +1,2 @@
1
- import { DotenvParseOutput } from "@stryke/env/types";
2
-
3
- //#region src/helpers/source-file-env.d.ts
4
- type TReturned<TEnv> = TEnv extends string ? string : DotenvParseOutput;
5
- declare function removeEnvPrefix<TEnv extends DotenvParseOutput | string>(env: TEnv): TReturned<TEnv>;
6
- declare function formatEnvField(key: string): string;
7
- //#endregion
1
+ import { n as removeEnvPrefix, t as formatEnvField } from "../source-file-env-DWejSP2U.mjs";
8
2
  export { formatEnvField, removeEnvPrefix };
@@ -1,56 +1,3 @@
1
- import { ENV_PREFIXES } from "@stryke/env/types";
2
- import { camelCase } from "@stryke/string-format/camel-case";
3
- import { isString } from "@stryke/type-checks/is-string";
1
+ import { n as removeEnvPrefix, t as formatEnvField } from "../source-file-env-Tj-6qobx.mjs";
4
2
 
5
- //#region src/helpers/source-file-env.ts
6
- function __assignType(fn, args) {
7
- fn.__type = args;
8
- return fn;
9
- }
10
- const __ΩTReturned = [
11
- "TEnv",
12
- "TReturned",
13
- "l2&R!RPe#!&qk#%QRb!Pde\"!p'w\"y"
14
- ];
15
- function removeEnvPrefix(env) {
16
- if (isString(env)) {
17
- let name = ENV_PREFIXES.reduce(__assignType((ret, prefix) => {
18
- if (ret.startsWith(prefix)) ret = ret.slice(prefix.length);
19
- return ret;
20
- }, [
21
- "ret",
22
- "prefix",
23
- "",
24
- "P\"2!\"2\"\"/#"
25
- ]), env.toUpperCase());
26
- while (name.startsWith("_")) name = name.slice(1);
27
- return name;
28
- }
29
- return Object.keys(env).reduce(__assignType((ret, key) => {
30
- const name = removeEnvPrefix(key);
31
- if (name) ret[name] = env[key];
32
- return ret;
33
- }, [
34
- "ret",
35
- "key",
36
- "",
37
- "P\"2!\"2\"\"/#"
38
- ]), {});
39
- }
40
- removeEnvPrefix.__type = [
41
- "env",
42
- () => __ΩTReturned,
43
- "removeEnvPrefix",
44
- "P\"2!\"o\"\"/#"
45
- ];
46
- function formatEnvField(key) {
47
- return camelCase(removeEnvPrefix(key));
48
- }
49
- formatEnvField.__type = [
50
- "key",
51
- "formatEnvField",
52
- "P&2!&/\""
53
- ];
54
-
55
- //#endregion
56
3
  export { formatEnvField, removeEnvPrefix };
@@ -1,70 +1,7 @@
1
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_types_plugin = require('../types/plugin.cjs');
3
- const require_helpers_persistence = require('./persistence.cjs');
4
- let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
5
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
1
+ require('../runtime-g0TEIoZK.cjs');
2
+ require('../plugin-CM1TSv1B.cjs');
3
+ require('../join-paths-Bc4rM2TX.cjs');
4
+ require('../persistence-D_clXRxP.cjs');
5
+ const require_template_helpers = require('../template-helpers-YVcwxmoF.cjs');
6
6
 
7
- //#region src/helpers/template-helpers.ts
8
- function __assignType(fn, args) {
9
- fn.__type = args;
10
- return fn;
11
- }
12
- /**
13
- * Creates the reflection data used when generating runtime template files.
14
- *
15
- * @param context - The context for the configuration plugin.
16
- * @param name - The name of the configuration template.
17
- * @returns The reflection for the specified configuration template.
18
- */
19
- async function createTemplateReflection(context, name) {
20
- const reflection = await require_helpers_persistence.readEnvTypeReflection(context, name);
21
- reflection.getProperties().forEach(__assignType((prop) => {
22
- prop.getAlias().filter(Boolean).forEach(__assignType((alias) => {
23
- reflection.addProperty({
24
- name: alias,
25
- optional: prop.isOptional() ? true : void 0,
26
- readonly: prop.isReadonly() ? true : void 0,
27
- description: prop.getDescription(),
28
- visibility: prop.getVisibility(),
29
- type: prop.getType(),
30
- default: prop.getDefaultValue(),
31
- tags: {
32
- hidden: prop.isHidden(),
33
- ignore: prop.isIgnored(),
34
- internal: prop.isInternal(),
35
- alias: prop.getAlias().filter(__assignType((a) => a !== alias, [
36
- "a",
37
- "",
38
- "P\"2!\"/\""
39
- ])).concat(prop.name),
40
- title: prop.getTitle() || (0, __stryke_string_format_title_case.titleCase)(prop.name),
41
- readonly: prop.isReadonly(),
42
- permission: prop.getPermission(),
43
- domain: prop.getDomain()
44
- }
45
- });
46
- }, [
47
- "alias",
48
- "",
49
- "P\"2!\"/\""
50
- ]));
51
- }, [
52
- "prop",
53
- "",
54
- "P\"2!\"/\""
55
- ]));
56
- return reflection;
57
- }
58
- createTemplateReflection.__type = [
59
- () => require_types_plugin.__ΩEnvPluginContext,
60
- "context",
61
- () => require_types_plugin.__ΩEnvType,
62
- "name",
63
- () => __powerlines_deepkit_vendor_type.ReflectionClass,
64
- "createTemplateReflection",
65
- "Creates the reflection data used when generating runtime template files.",
66
- "Pn!2\"n#2$8P\"7%`/&?'"
67
- ];
68
-
69
- //#endregion
70
- exports.createTemplateReflection = createTemplateReflection;
7
+ exports.createTemplateReflection = require_template_helpers.createTemplateReflection;
@@ -1,15 +1,4 @@
1
- import { EnvPluginContext, EnvType } from "../types/plugin.cjs";
2
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/helpers/template-helpers.d.ts
5
-
6
- /**
7
- * Creates the reflection data used when generating runtime template files.
8
- *
9
- * @param context - The context for the configuration plugin.
10
- * @param name - The name of the configuration template.
11
- * @returns The reflection for the specified configuration template.
12
- */
13
- declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
14
- //#endregion
1
+ import "../runtime-BDzzR4wH.cjs";
2
+ import "../plugin-CSe5f2cD.cjs";
3
+ import { t as createTemplateReflection } from "../template-helpers-zyitPfMz.cjs";
15
4
  export { createTemplateReflection };
@@ -1,15 +1,4 @@
1
- import { EnvPluginContext, EnvType } from "../types/plugin.mjs";
2
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
3
-
4
- //#region src/helpers/template-helpers.d.ts
5
-
6
- /**
7
- * Creates the reflection data used when generating runtime template files.
8
- *
9
- * @param context - The context for the configuration plugin.
10
- * @param name - The name of the configuration template.
11
- * @returns The reflection for the specified configuration template.
12
- */
13
- declare function createTemplateReflection(context: EnvPluginContext, name?: EnvType): Promise<ReflectionClass<any>>;
14
- //#endregion
1
+ import "../runtime-lYSIZdMn.mjs";
2
+ import "../plugin-DMbVjdcQ.mjs";
3
+ import { t as createTemplateReflection } from "../template-helpers-1SKodHKt.mjs";
15
4
  export { createTemplateReflection };
@@ -1,69 +1,7 @@
1
- import { __ΩEnvPluginContext, __ΩEnvType } from "../types/plugin.mjs";
2
- import { readEnvTypeReflection } from "./persistence.mjs";
3
- import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
4
- import { titleCase } from "@stryke/string-format/title-case";
1
+ import "../runtime-C5ukCv3P.mjs";
2
+ import "../plugin-eBjQJP6x.mjs";
3
+ import "../join-paths-BMg51Ddi.mjs";
4
+ import "../persistence-BsBxs9wt.mjs";
5
+ import { t as createTemplateReflection } from "../template-helpers-CCEjhw1B.mjs";
5
6
 
6
- //#region src/helpers/template-helpers.ts
7
- function __assignType(fn, args) {
8
- fn.__type = args;
9
- return fn;
10
- }
11
- /**
12
- * Creates the reflection data used when generating runtime template files.
13
- *
14
- * @param context - The context for the configuration plugin.
15
- * @param name - The name of the configuration template.
16
- * @returns The reflection for the specified configuration template.
17
- */
18
- async function createTemplateReflection(context, name) {
19
- const reflection = await readEnvTypeReflection(context, name);
20
- reflection.getProperties().forEach(__assignType((prop) => {
21
- prop.getAlias().filter(Boolean).forEach(__assignType((alias) => {
22
- reflection.addProperty({
23
- name: alias,
24
- optional: prop.isOptional() ? true : void 0,
25
- readonly: prop.isReadonly() ? true : void 0,
26
- description: prop.getDescription(),
27
- visibility: prop.getVisibility(),
28
- type: prop.getType(),
29
- default: prop.getDefaultValue(),
30
- tags: {
31
- hidden: prop.isHidden(),
32
- ignore: prop.isIgnored(),
33
- internal: prop.isInternal(),
34
- alias: prop.getAlias().filter(__assignType((a) => a !== alias, [
35
- "a",
36
- "",
37
- "P\"2!\"/\""
38
- ])).concat(prop.name),
39
- title: prop.getTitle() || titleCase(prop.name),
40
- readonly: prop.isReadonly(),
41
- permission: prop.getPermission(),
42
- domain: prop.getDomain()
43
- }
44
- });
45
- }, [
46
- "alias",
47
- "",
48
- "P\"2!\"/\""
49
- ]));
50
- }, [
51
- "prop",
52
- "",
53
- "P\"2!\"/\""
54
- ]));
55
- return reflection;
56
- }
57
- createTemplateReflection.__type = [
58
- () => __ΩEnvPluginContext,
59
- "context",
60
- () => __ΩEnvType,
61
- "name",
62
- () => ReflectionClass,
63
- "createTemplateReflection",
64
- "Creates the reflection data used when generating runtime template files.",
65
- "Pn!2\"n#2$8P\"7%`/&?'"
66
- ];
67
-
68
- //#endregion
69
7
  export { createTemplateReflection };
@@ -0,0 +1 @@
1
+ export { };
File without changes
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,16 @@
1
+ import { n as EnvPluginOptions, r as EnvPluginResolvedConfig, t as EnvPluginContext } from "./plugin-CSe5f2cD.cjs";
2
+ import { Plugin } from "powerlines/types/plugin";
3
+ import * as powerlines_types0 from "powerlines/types";
4
+
5
+ //#region src/index.d.ts
6
+
7
+ /**
8
+ * A Powerlines plugin to inject environment variables into the source code.
9
+ */
10
+ declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
11
+ //#endregion
12
+ //#region src/babel/plugin.d.ts
13
+ declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
14
+ //#endregion
15
+ export { plugin as n, envBabelPlugin as t };
16
+ //# sourceMappingURL=index-Bdi8CvaN.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Bdi8CvaN.d.cts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAgZc,cA7UD,MA6UC,EAAA,CAAA,iBA7U0B,gBA6U1B,GA7U6C,gBA6U7C,CAAA,CAAA,OAAA,CAAA,EA5UH,gBA4UG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA;;;cC9WD,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,16 @@
1
+ import { n as EnvPluginOptions, r as EnvPluginResolvedConfig, t as EnvPluginContext } from "./plugin-DMbVjdcQ.mjs";
2
+ import { Plugin } from "powerlines/types/plugin";
3
+ import * as powerlines_types0 from "powerlines/types";
4
+
5
+ //#region src/index.d.ts
6
+
7
+ /**
8
+ * A Powerlines plugin to inject environment variables into the source code.
9
+ */
10
+ declare const plugin: <TContext extends EnvPluginContext = EnvPluginContext>(options?: EnvPluginOptions) => Plugin<TContext>[];
11
+ //#endregion
12
+ //#region src/babel/plugin.d.ts
13
+ declare const envBabelPlugin: powerlines_types0.DeclareBabelTransformPluginReturn<EnvPluginContext<EnvPluginResolvedConfig>, Record<string, any>>;
14
+ //#endregion
15
+ export { plugin as n, envBabelPlugin as t };
16
+ //# sourceMappingURL=index-Drhzdkqe.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Drhzdkqe.d.mts","names":[],"sources":["../src/index.tsx","../src/babel/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AAgZc,cA7UD,MA6UC,EAAA,CAAA,iBA7U0B,gBA6U1B,GA7U6C,gBA6U7C,CAAA,CAAA,OAAA,CAAA,EA5UH,gBA4UG,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA,EAAA;;;cC9WD,gBAAc,iBAAA,CAAA,kCAAA,iBAmM1B,uBAAA,GAnM0B"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };