@powerlines/plugin-env 0.14.3 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/{_virtual/rolldown_runtime.mjs → chunk-D1UamjDs.mjs} +1 -1
  2. package/dist/components/docs.cjs +1 -1
  3. package/dist/components/docs.d.cts +1 -8
  4. package/dist/components/docs.d.mts +1 -8
  5. package/dist/components/docs.mjs +1 -1
  6. package/dist/components/env.cjs +1 -34
  7. package/dist/components/env.d.cts +1 -19
  8. package/dist/components/env.d.mts +1 -19
  9. package/dist/components/env.mjs +1 -31
  10. package/dist/components/index.cjs +1 -1
  11. package/dist/components/index.d.cts +3 -2
  12. package/dist/components/index.d.mts +3 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/components-ByVHjWXF.mjs +1 -0
  15. package/dist/components-C9bYrQVK.cjs +0 -0
  16. package/dist/create-reflection-resource-D6mTRo2f.mjs +17 -0
  17. package/dist/create-reflection-resource-I684bqD1.cjs +17 -0
  18. package/dist/docs-BEsuuE9f.mjs +1 -0
  19. package/dist/docs-CKCRAUnO.d.mts +9 -0
  20. package/dist/docs-CdtUw4WA.d.cts +9 -0
  21. package/dist/docs-qvDyetF0.cjs +1 -0
  22. package/dist/env-CHnpBV7X.mjs +31 -0
  23. package/dist/env-COWzTupf.d.cts +20 -0
  24. package/dist/env-CgSzbXBL.cjs +34 -0
  25. package/dist/env-DqPOEUEu.d.mts +20 -0
  26. package/dist/index-B_e8BwCm.d.cts +1 -0
  27. package/dist/index-CW2WHUXP.d.mts +1 -0
  28. package/dist/index-DCQ5Y2ED.d.mts +1 -0
  29. package/dist/index-DWPDThxu.d.cts +1 -0
  30. package/dist/index.cjs +8 -4
  31. package/dist/index.d.cts +185 -12
  32. package/dist/index.d.mts +185 -17
  33. package/dist/index.mjs +8 -4
  34. package/dist/{deepkit/schemas/reflection.d.cts → plugin-CPy0CKXL.d.cts} +237 -1
  35. package/dist/plugin-CyRU_Pln.mjs +1 -0
  36. package/dist/{deepkit/schemas/reflection.d.mts → plugin-Cz3MZ6FL.d.mts} +239 -1
  37. package/dist/plugin-D5qyQPqC.cjs +0 -0
  38. package/dist/runtime-B7kcxFAf.d.mts +2499 -0
  39. package/dist/runtime-Bisl_1Ja.cjs +0 -0
  40. package/dist/runtime-Bo02eIQ-.d.cts +2497 -0
  41. package/dist/runtime-g_eXGBBi.mjs +1 -0
  42. package/dist/types/index.cjs +1 -0
  43. package/dist/types/index.d.cts +3 -2
  44. package/dist/types/index.d.mts +3 -2
  45. package/dist/types/index.mjs +1 -1
  46. package/dist/types/plugin.cjs +1 -0
  47. package/dist/types/plugin.d.cts +2 -148
  48. package/dist/types/plugin.d.mts +2 -149
  49. package/dist/types/plugin.mjs +1 -1
  50. package/dist/types/runtime.cjs +1 -0
  51. package/dist/types/runtime.d.cts +1 -793
  52. package/dist/types/runtime.d.mts +1 -793
  53. package/dist/types/runtime.mjs +1 -1
  54. package/dist/types-DMh7K7VC.mjs +1 -0
  55. package/dist/types-MYBaygjr.cjs +0 -0
  56. package/package.json +11 -9
  57. package/dist/_virtual/rolldown_runtime.cjs +0 -1
  58. package/dist/alloy/src/core/components/output.cjs +0 -1
  59. package/dist/alloy/src/core/components/output.mjs +0 -1
  60. package/dist/alloy/src/core/components/single-line-comment.cjs +0 -1
  61. package/dist/alloy/src/core/components/single-line-comment.mjs +0 -1
  62. package/dist/alloy/src/core/components/source-file.cjs +0 -1
  63. package/dist/alloy/src/core/components/source-file.d.cts +0 -22
  64. package/dist/alloy/src/core/components/source-file.d.mts +0 -22
  65. package/dist/alloy/src/core/components/source-file.mjs +0 -1
  66. package/dist/alloy/src/core/contexts/context.cjs +0 -1
  67. package/dist/alloy/src/core/contexts/context.mjs +0 -1
  68. package/dist/alloy/src/core/contexts/reflection.cjs +0 -1
  69. package/dist/alloy/src/core/contexts/reflection.mjs +0 -1
  70. package/dist/alloy/src/create-plugin.cjs +0 -2
  71. package/dist/alloy/src/create-plugin.mjs +0 -2
  72. package/dist/alloy/src/helpers/refkey.cjs +0 -1
  73. package/dist/alloy/src/helpers/refkey.mjs +0 -1
  74. package/dist/alloy/src/markdown/components/markdown-file.cjs +0 -1
  75. package/dist/alloy/src/markdown/components/markdown-file.mjs +0 -1
  76. package/dist/alloy/src/markdown/components/markdown-table.cjs +0 -1
  77. package/dist/alloy/src/markdown/components/markdown-table.mjs +0 -1
  78. package/dist/alloy/src/markdown/contexts/markdown-table.cjs +0 -1
  79. package/dist/alloy/src/markdown/contexts/markdown-table.mjs +0 -1
  80. package/dist/alloy/src/types/components.d.cts +0 -19
  81. package/dist/alloy/src/types/components.d.mts +0 -23
  82. package/dist/alloy/src/typescript/components/builtin-file.cjs +0 -1
  83. package/dist/alloy/src/typescript/components/builtin-file.d.cts +0 -25
  84. package/dist/alloy/src/typescript/components/builtin-file.d.mts +0 -26
  85. package/dist/alloy/src/typescript/components/builtin-file.mjs +0 -1
  86. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +0 -1
  87. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +0 -1
  88. package/dist/alloy/src/typescript/components/tsdoc.cjs +0 -1
  89. package/dist/alloy/src/typescript/components/tsdoc.d.cts +0 -27
  90. package/dist/alloy/src/typescript/components/tsdoc.d.mts +0 -28
  91. package/dist/alloy/src/typescript/components/tsdoc.mjs +0 -1
  92. package/dist/alloy/src/typescript/components/typescript-file.cjs +0 -1
  93. package/dist/alloy/src/typescript/components/typescript-file.d.cts +0 -14
  94. package/dist/alloy/src/typescript/components/typescript-file.d.mts +0 -15
  95. package/dist/alloy/src/typescript/components/typescript-file.mjs +0 -1
  96. package/dist/alloy/src/typescript/components/typescript-interface.cjs +0 -1
  97. package/dist/alloy/src/typescript/components/typescript-interface.d.cts +0 -11
  98. package/dist/alloy/src/typescript/components/typescript-interface.d.mts +0 -12
  99. package/dist/alloy/src/typescript/components/typescript-interface.mjs +0 -1
  100. package/dist/alloy/src/typescript/components/typescript-object.cjs +0 -1
  101. package/dist/alloy/src/typescript/components/typescript-object.mjs +0 -1
  102. package/dist/babel/index.cjs +0 -1
  103. package/dist/babel/index.d.cts +0 -2
  104. package/dist/babel/index.d.mts +0 -2
  105. package/dist/babel/index.mjs +0 -1
  106. package/dist/babel/plugin.cjs +0 -5
  107. package/dist/babel/plugin.d.cts +0 -7
  108. package/dist/babel/plugin.d.mts +0 -9
  109. package/dist/babel/plugin.mjs +0 -5
  110. package/dist/deepkit/schemas/reflection.cjs +0 -1
  111. package/dist/deepkit/schemas/reflection.mjs +0 -1
  112. package/dist/deepkit/schemas/reflection2.cjs +0 -1
  113. package/dist/deepkit/schemas/reflection2.mjs +0 -1
  114. package/dist/deepkit/src/capnp.cjs +0 -1
  115. package/dist/deepkit/src/capnp.mjs +0 -1
  116. package/dist/deepkit/src/esbuild-plugin.cjs +0 -4
  117. package/dist/deepkit/src/esbuild-plugin.mjs +0 -4
  118. package/dist/deepkit/src/reflect-type.cjs +0 -1
  119. package/dist/deepkit/src/reflect-type.mjs +0 -1
  120. package/dist/deepkit/src/resolve-reflections.cjs +0 -1
  121. package/dist/deepkit/src/resolve-reflections.mjs +0 -1
  122. package/dist/deepkit/src/transformer.cjs +0 -1
  123. package/dist/deepkit/src/transformer.mjs +0 -1
  124. package/dist/deepkit/src/transpile.cjs +0 -1
  125. package/dist/deepkit/src/transpile.mjs +0 -1
  126. package/dist/deepkit/src/types.d.cts +0 -10
  127. package/dist/deepkit/src/types.d.mts +0 -10
  128. package/dist/deepkit/src/utilities.cjs +0 -1
  129. package/dist/deepkit/src/utilities.mjs +0 -1
  130. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -1
  131. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -1
  132. package/dist/deepkit/src/vendor/type.cjs +0 -1
  133. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  134. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  135. package/dist/deepkit/src/vendor/type.mjs +0 -1
  136. package/dist/helpers/automd-generator.cjs +0 -1
  137. package/dist/helpers/automd-generator.d.cts +0 -14
  138. package/dist/helpers/automd-generator.d.mts +0 -14
  139. package/dist/helpers/automd-generator.mjs +0 -1
  140. package/dist/helpers/create-reflection-resource.cjs +0 -1
  141. package/dist/helpers/create-reflection-resource.d.cts +0 -15
  142. package/dist/helpers/create-reflection-resource.d.mts +0 -15
  143. package/dist/helpers/create-reflection-resource.mjs +0 -1
  144. package/dist/helpers/index.cjs +0 -1
  145. package/dist/helpers/index.d.cts +0 -7
  146. package/dist/helpers/index.d.mts +0 -7
  147. package/dist/helpers/index.mjs +0 -1
  148. package/dist/helpers/load.cjs +0 -1
  149. package/dist/helpers/load.d.cts +0 -35
  150. package/dist/helpers/load.d.mts +0 -36
  151. package/dist/helpers/load.mjs +0 -1
  152. package/dist/helpers/persistence.cjs +0 -1
  153. package/dist/helpers/persistence.d.cts +0 -84
  154. package/dist/helpers/persistence.d.mts +0 -84
  155. package/dist/helpers/persistence.mjs +0 -1
  156. package/dist/helpers/reflect.cjs +0 -1
  157. package/dist/helpers/reflect.d.cts +0 -46
  158. package/dist/helpers/reflect.d.mts +0 -46
  159. package/dist/helpers/reflect.mjs +0 -1
  160. package/dist/helpers/source-file-env.cjs +0 -1
  161. package/dist/helpers/source-file-env.d.cts +0 -8
  162. package/dist/helpers/source-file-env.d.mts +0 -8
  163. package/dist/helpers/source-file-env.mjs +0 -1
  164. package/dist/helpers/template-helpers.cjs +0 -1
  165. package/dist/helpers/template-helpers.d.cts +0 -15
  166. package/dist/helpers/template-helpers.d.mts +0 -15
  167. package/dist/helpers/template-helpers.mjs +0 -1
  168. package/dist/plugin-automd/src/index.cjs +0 -1
  169. package/dist/plugin-automd/src/index.mjs +0 -1
  170. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  171. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  172. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  173. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  174. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -1
  175. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -1
  176. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -1
  177. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -1
  178. package/dist/plugin-babel/src/helpers/filters.cjs +0 -1
  179. package/dist/plugin-babel/src/helpers/filters.mjs +0 -1
  180. package/dist/plugin-babel/src/helpers/index.cjs +0 -1
  181. package/dist/plugin-babel/src/helpers/index.mjs +0 -1
  182. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -1
  183. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -1
  184. package/dist/plugin-babel/src/helpers/options.cjs +0 -1
  185. package/dist/plugin-babel/src/helpers/options.mjs +0 -1
  186. package/dist/plugin-babel/src/index.cjs +0 -1
  187. package/dist/plugin-babel/src/index.mjs +0 -1
  188. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  189. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  190. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  191. package/dist/powerlines/schemas/fs.d.mts +0 -1
  192. package/dist/powerlines/src/api.d.mts +0 -7
  193. package/dist/powerlines/src/index.d.mts +0 -12
  194. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
  195. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -14
  196. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -14
  197. package/dist/powerlines/src/lib/entry.cjs +0 -1
  198. package/dist/powerlines/src/lib/entry.mjs +0 -1
  199. package/dist/powerlines/src/lib/logger.cjs +0 -1
  200. package/dist/powerlines/src/lib/logger.mjs +0 -1
  201. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -1
  202. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -1
  203. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -1
  204. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -1
  205. package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -1
  206. package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -1
  207. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  208. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -1
  209. package/dist/powerlines/src/types/api.d.mts +0 -5
  210. package/dist/powerlines/src/types/babel.d.cts +0 -23
  211. package/dist/powerlines/src/types/babel.d.mts +0 -23
  212. package/dist/powerlines/src/types/build.d.cts +0 -145
  213. package/dist/powerlines/src/types/build.d.mts +0 -147
  214. package/dist/powerlines/src/types/commands.d.cts +0 -8
  215. package/dist/powerlines/src/types/commands.d.mts +0 -9
  216. package/dist/powerlines/src/types/config.d.cts +0 -368
  217. package/dist/powerlines/src/types/config.d.mts +0 -369
  218. package/dist/powerlines/src/types/context.d.cts +0 -373
  219. package/dist/powerlines/src/types/context.d.mts +0 -375
  220. package/dist/powerlines/src/types/fs.d.cts +0 -458
  221. package/dist/powerlines/src/types/fs.d.mts +0 -458
  222. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  223. package/dist/powerlines/src/types/index.d.mts +0 -12
  224. package/dist/powerlines/src/types/plugin.d.cts +0 -232
  225. package/dist/powerlines/src/types/plugin.d.mts +0 -232
  226. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  227. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  228. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  229. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  230. package/dist/powerlines/src/types/unplugin.d.mts +0 -7
@@ -0,0 +1,2497 @@
1
+ import { ResolveOptions } from "@stryke/fs/resolve";
2
+ import { FunctionLike, MaybePromise, NonUndefined } from "@stryke/types/base";
3
+ import { AssetGlob } from "@stryke/types/file";
4
+ import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
5
+ import { PreviewOptions, ResolvedPreviewOptions } from "vite";
6
+ import { PluginItem, PluginObj, PluginPass, transformAsync } from "@babel/core";
7
+ import { Format } from "@storm-software/build-tools/types";
8
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
9
+ import { StormWorkspaceConfig } from "@storm-software/config/types";
10
+ import { BabelAPI } from "@babel/helper-plugin-utils";
11
+ import { EnvPaths } from "@stryke/env/get-env-paths";
12
+ import { FetchRequestOptions } from "@stryke/http/fetch";
13
+ import { PackageJson } from "@stryke/types/package-json";
14
+ import { Jiti } from "jiti";
15
+ import { SourceMap } from "magic-string";
16
+ import { ParseResult, ParserOptions } from "oxc-parser";
17
+ import { Range } from "semver";
18
+ import { Project } from "ts-morph";
19
+ import { RequestInfo, Response } from "undici";
20
+ import { ExternalIdResult, HookFilter, TransformResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage, UnpluginOptions } from "unplugin";
21
+ import { ArrayValues } from "@stryke/types/array";
22
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
23
+ import ts from "typescript";
24
+
25
+ //#region ../powerlines/src/types/fs.d.ts
26
+ type StoragePreset = "fs" | "virtual";
27
+ /**
28
+ * Interface defining the methods and properties for a storage adapter.
29
+ */
30
+ interface StorageAdapter {
31
+ /**
32
+ * A name identifying the storage adapter type.
33
+ */
34
+ name: string;
35
+ /**
36
+ * Checks if a key exists in the storage.
37
+ *
38
+ * @param key - The key to check for existence.
39
+ * @returns A promise that resolves to `true` if the key exists, otherwise `false`.
40
+ */
41
+ exists: (key: string) => Promise<boolean>;
42
+ /**
43
+ * Synchronously checks if a key exists in the storage.
44
+ *
45
+ * @param key - The key to check for existence.
46
+ * @returns Returns `true` if the key exists, otherwise `false`.
47
+ */
48
+ existsSync: (key: string) => boolean;
49
+ /**
50
+ * Read a value associated with a key from the storage.
51
+ *
52
+ * @param key - The key to read the value for.
53
+ * @returns A promise that resolves to the value if found, otherwise `null`.
54
+ */
55
+ get: (key: string) => Promise<string | null>;
56
+ /**
57
+ * Synchronously reads the value associated with a key from the storage.
58
+ *
59
+ * @param key - The key to read the value for.
60
+ * @returns The value if found, otherwise `null`.
61
+ */
62
+ getSync: (key: string) => string | null;
63
+ /**
64
+ * Writes a value to the storage for the given key.
65
+ *
66
+ * @param key - The key to associate the value with.
67
+ * @param value - The value to store.
68
+ */
69
+ set: (key: string, value: string) => Promise<void>;
70
+ /**
71
+ * Synchronously writes a value to the storage for the given key.
72
+ *
73
+ * @param key - The key to associate the value with.
74
+ * @param value - The value to store.
75
+ */
76
+ setSync: (key: string, value: string) => void;
77
+ /**
78
+ * Removes a value from the storage.
79
+ *
80
+ * @param key - The key whose value should be removed.
81
+ */
82
+ remove: (key: string) => Promise<void>;
83
+ /**
84
+ * Synchronously removes a value from the storage.
85
+ *
86
+ * @param key - The key whose value should be removed.
87
+ */
88
+ removeSync: (key: string) => void;
89
+ /**
90
+ * Creates a directory at the specified path.
91
+ *
92
+ * @param dirPath - The path of the directory to create.
93
+ */
94
+ mkdir: (dirPath: string) => Promise<void>;
95
+ /**
96
+ * Synchronously creates a directory at the specified path.
97
+ *
98
+ * @param dirPath - The path of the directory to create.
99
+ */
100
+ mkdirSync: (dirPath: string) => void;
101
+ /**
102
+ * Remove all entries from the storage that match the provided base path.
103
+ *
104
+ * @param base - The base path or prefix to clear entries from.
105
+ */
106
+ clear: (base?: string) => Promise<void>;
107
+ /**
108
+ * Synchronously remove all entries from the storage that match the provided base path.
109
+ *
110
+ * @param base - The base path or prefix to clear entries from.
111
+ */
112
+ clearSync: (base?: string) => void;
113
+ /**
114
+ * Lists all keys under the provided base path.
115
+ *
116
+ * @param base - The base path or prefix to list keys from.
117
+ * @returns A promise resolving to the list of keys.
118
+ */
119
+ list: (base?: string) => Promise<string[]>;
120
+ /**
121
+ * Synchronously lists all keys under the provided base path.
122
+ *
123
+ * @param base - The base path or prefix to list keys from.
124
+ * @returns The list of keys.
125
+ */
126
+ listSync: (base?: string) => string[];
127
+ /**
128
+ * Checks if the given key is a directory.
129
+ *
130
+ * @param key - The key to check.
131
+ * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
132
+ */
133
+ isDirectory: (key: string) => Promise<boolean>;
134
+ /**
135
+ * Synchronously checks if the given key is a directory.
136
+ *
137
+ * @param key - The key to check.
138
+ * @returns `true` if the key is a directory, otherwise `false`.
139
+ */
140
+ isDirectorySync: (key: string) => boolean;
141
+ /**
142
+ * Checks if the given key is a file.
143
+ *
144
+ * @param key - The key to check.
145
+ * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
146
+ */
147
+ isFile: (key: string) => Promise<boolean>;
148
+ /**
149
+ * Synchronously checks if the given key is a file.
150
+ *
151
+ * @param key - The key to check.
152
+ * @returns `true` if the key is a file, otherwise `false`.
153
+ */
154
+ isFileSync: (key: string) => boolean;
155
+ /**
156
+ * Releases any resources held by the storage adapter.
157
+ */
158
+ dispose: () => MaybePromise<void>;
159
+ }
160
+ /**
161
+ * A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
162
+ */
163
+ type StoragePort = Record<string, StorageAdapter>;
164
+ interface VirtualFileMetadata {
165
+ /**
166
+ * The identifier for the file data.
167
+ */
168
+ id: string;
169
+ /**
170
+ * The timestamp of the virtual file.
171
+ */
172
+ timestamp: number;
173
+ /**
174
+ * The type of the file.
175
+ *
176
+ * @remarks
177
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
178
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
179
+ * - `entry`: Indicates that the file is an entry point for execution.
180
+ * - `normal`: Indicates that the file is a standard file without any special role.
181
+ */
182
+ type: string;
183
+ /**
184
+ * Additional metadata associated with the file.
185
+ */
186
+ properties: Record<string, string | undefined>;
187
+ }
188
+ interface VirtualFileData {
189
+ /**
190
+ * The identifier for the file data.
191
+ */
192
+ id?: string;
193
+ /**
194
+ * The contents of the virtual file.
195
+ */
196
+ code: string;
197
+ /**
198
+ * The type of the file.
199
+ *
200
+ * @remarks
201
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
202
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
203
+ * - `entry`: Indicates that the file is an entry point for execution.
204
+ * - `normal`: Indicates that the file is a standard file without any special role.
205
+ */
206
+ type?: string;
207
+ /**
208
+ * Additional metadata associated with the file.
209
+ */
210
+ properties?: Record<string, string | undefined>;
211
+ }
212
+ interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
213
+ /**
214
+ * An additional name for the file.
215
+ */
216
+ path: string;
217
+ /**
218
+ * The timestamp of the virtual file.
219
+ */
220
+ timestamp: number;
221
+ }
222
+ interface WriteOptions {
223
+ /**
224
+ * Should the file skip formatting before being written?
225
+ *
226
+ * @defaultValue false
227
+ */
228
+ skipFormat?: boolean;
229
+ /**
230
+ * Additional metadata for the file.
231
+ */
232
+ meta?: Partial<VirtualFileMetadata>;
233
+ }
234
+ interface ResolveOptions$1 extends ResolveOptions {
235
+ /**
236
+ * If true, the module is being resolved as an entry point.
237
+ */
238
+ isEntry?: boolean;
239
+ /**
240
+ * If true, the resolver will skip using the cache when resolving modules.
241
+ */
242
+ skipCache?: boolean;
243
+ /**
244
+ * An array of external modules or patterns to exclude from resolution.
245
+ */
246
+ external?: (string | RegExp)[];
247
+ /**
248
+ * An array of modules or patterns to include in the resolution, even if they are marked as external.
249
+ */
250
+ noExternal?: (string | RegExp)[];
251
+ /**
252
+ * An array of patterns to match when resolving modules.
253
+ */
254
+ skipNodeModulesBundle?: boolean;
255
+ }
256
+ interface VirtualFileSystemInterface {
257
+ /**
258
+ * The underlying file metadata.
259
+ */
260
+ metadata: Readonly<Record<string, VirtualFileMetadata>>;
261
+ /**
262
+ * A map of file paths to their module ids.
263
+ */
264
+ ids: Readonly<Record<string, string>>;
265
+ /**
266
+ * A map of module ids to their file paths.
267
+ */
268
+ paths: Readonly<Record<string, string>>;
269
+ /**
270
+ * Checks if a file exists in the virtual file system (VFS).
271
+ *
272
+ * @param path - The path or id of the file.
273
+ * @returns `true` if the file exists, otherwise `false`.
274
+ */
275
+ exists: (path: string) => Promise<boolean>;
276
+ /**
277
+ * Synchronously Checks if a file exists in the virtual file system (VFS).
278
+ *
279
+ * @param path - The path or id of the file.
280
+ * @returns `true` if the file exists, otherwise `false`.
281
+ */
282
+ existsSync: (path: string) => boolean;
283
+ /**
284
+ * Checks if a file is virtual in the virtual file system (VFS).
285
+ *
286
+ * @param path - The path or id of the file.
287
+ * @returns `true` if the file is virtual, otherwise `false`.
288
+ */
289
+ isVirtual: (path: string) => boolean;
290
+ /**
291
+ * Checks if the given key is a directory.
292
+ *
293
+ * @param key - The key to check.
294
+ * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
295
+ */
296
+ isDirectory: (key: string) => Promise<boolean>;
297
+ /**
298
+ * Synchronously checks if the given key is a directory.
299
+ *
300
+ * @param key - The key to check.
301
+ * @returns `true` if the key is a directory, otherwise `false`.
302
+ */
303
+ isDirectorySync: (key: string) => boolean;
304
+ /**
305
+ * Checks if the given key is a file.
306
+ *
307
+ * @param key - The key to check.
308
+ * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
309
+ */
310
+ isFile: (key: string) => Promise<boolean>;
311
+ /**
312
+ * Synchronously checks if the given key is a file.
313
+ *
314
+ * @param key - The key to check.
315
+ * @returns `true` if the key is a file, otherwise `false`.
316
+ */
317
+ isFileSync: (key: string) => boolean;
318
+ /**
319
+ * Gets the metadata of a file in the virtual file system (VFS).
320
+ *
321
+ * @param path - The path or id of the file.
322
+ * @returns The metadata of the file if it exists, otherwise undefined.
323
+ */
324
+ getMetadata: (path: string) => VirtualFileMetadata | undefined;
325
+ /**
326
+ * Lists files in a given path.
327
+ *
328
+ * @param path - The path to list files from.
329
+ * @returns An array of file names in the specified path.
330
+ */
331
+ listSync: (path: string) => string[];
332
+ /**
333
+ * Lists files in a given path.
334
+ *
335
+ * @param path - The path to list files from.
336
+ * @returns An array of file names in the specified path.
337
+ */
338
+ list: (path: string) => Promise<string[]>;
339
+ /**
340
+ * Removes a file or symbolic link in the virtual file system (VFS).
341
+ *
342
+ * @param path - The path to the file to remove.
343
+ * @returns A promise that resolves when the file is removed.
344
+ */
345
+ removeSync: (path: string) => void;
346
+ /**
347
+ * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
348
+ *
349
+ * @param path - The path to the file to remove.
350
+ * @returns A promise that resolves when the file is removed.
351
+ */
352
+ remove: (path: string) => Promise<void>;
353
+ /**
354
+ * Reads a file from the virtual file system (VFS).
355
+ *
356
+ * @param path - The path or id of the file.
357
+ * @returns The contents of the file if it exists, otherwise undefined.
358
+ */
359
+ read: (path: string) => Promise<string | undefined>;
360
+ /**
361
+ * Reads a file from the virtual file system (VFS).
362
+ *
363
+ * @param path - The path or id of the file.
364
+ */
365
+ readSync: (path: string) => string | undefined;
366
+ /**
367
+ * Writes a file to the virtual file system (VFS).
368
+ *
369
+ * @param path - The path to the file.
370
+ * @param data - The contents of the file.
371
+ * @param options - Options for writing the file.
372
+ * @returns A promise that resolves when the file is written.
373
+ */
374
+ write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
375
+ /**
376
+ * Writes a file to the virtual file system (VFS).
377
+ *
378
+ * @param path - The path to the file.
379
+ * @param data - The contents of the file.
380
+ * @param options - Options for writing the file.
381
+ */
382
+ writeSync: (path: string, data: string, options?: WriteOptions) => void;
383
+ /**
384
+ * Creates a directory at the specified path.
385
+ *
386
+ * @param dirPath - The path of the directory to create.
387
+ */
388
+ mkdir: (dirPath: string) => Promise<void>;
389
+ /**
390
+ * Synchronously creates a directory at the specified path.
391
+ *
392
+ * @param dirPath - The path of the directory to create.
393
+ */
394
+ mkdirSync: (dirPath: string) => void;
395
+ /**
396
+ * Moves a file from one path to another in the virtual file system (VFS).
397
+ *
398
+ * @param srcPath - The source path to move
399
+ * @param destPath - The destination path to move to
400
+ */
401
+ move: (srcPath: string, destPath: string) => Promise<void>;
402
+ /**
403
+ * Synchronously moves a file from one path to another in the virtual file system (VFS).
404
+ *
405
+ * @param srcPath - The source path to move
406
+ * @param destPath - The destination path to move to
407
+ */
408
+ moveSync: (srcPath: string, destPath: string) => void;
409
+ /**
410
+ * Copies a file from one path to another in the virtual file system (VFS).
411
+ *
412
+ * @param srcPath - The source path to copy
413
+ * @param destPath - The destination path to copy to
414
+ */
415
+ copy: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => Promise<void>;
416
+ /**
417
+ * Synchronously copies a file from one path to another in the virtual file system (VFS).
418
+ *
419
+ * @param srcPath - The source path to copy
420
+ * @param destPath - The destination path to copy to
421
+ */
422
+ copySync: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => void;
423
+ /**
424
+ * Glob files in the virtual file system (VFS) based on the provided pattern(s).
425
+ *
426
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
427
+ * @returns An array of file paths matching the provided pattern(s)
428
+ */
429
+ glob: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => Promise<string[]>;
430
+ /**
431
+ * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).
432
+ *
433
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
434
+ * @returns An array of file paths matching the provided pattern(s)
435
+ */
436
+ globSync: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => string[];
437
+ /**
438
+ * A helper function to resolve modules using the Jiti resolver
439
+ *
440
+ * @remarks
441
+ * This function can be used to resolve modules relative to the project root directory.
442
+ *
443
+ * @example
444
+ * ```ts
445
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
446
+ * ```
447
+ *
448
+ * @param id - The module to resolve.
449
+ * @param importer - An optional path to the importer module.
450
+ * @param options - Additional resolution options.
451
+ * @returns A promise that resolves to the resolved module path.
452
+ */
453
+ resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<string | undefined>;
454
+ /**
455
+ * A synchronous helper function to resolve modules using the Jiti resolver
456
+ *
457
+ * @remarks
458
+ * This function can be used to resolve modules relative to the project root directory.
459
+ *
460
+ * @example
461
+ * ```ts
462
+ * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
463
+ * ```
464
+ *
465
+ * @param id - The module to resolve.
466
+ * @param importer - An optional path to the importer module.
467
+ * @param options - Additional resolution options.
468
+ * @returns The resolved module path.
469
+ */
470
+ resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
471
+ /**
472
+ * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
473
+ */
474
+ dispose: () => Promise<void>;
475
+ }
476
+ //#endregion
477
+ //#region ../powerlines/src/types/build.d.ts
478
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
479
+ interface BuildConfig {
480
+ /**
481
+ * The platform to build the project for
482
+ *
483
+ * @defaultValue "neutral"
484
+ */
485
+ platform?: "node" | "browser" | "neutral";
486
+ /**
487
+ * Array of strings indicating the polyfills to include for the build.
488
+ *
489
+ * @remarks
490
+ * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
491
+ *
492
+ * @example
493
+ * ```ts
494
+ * {
495
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
496
+ * }
497
+ * ```
498
+ */
499
+ polyfill?: string[];
500
+ /**
501
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
502
+ *
503
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
504
+ */
505
+ mainFields?: string[];
506
+ /**
507
+ * Array of strings indicating what conditions should be used for module resolution.
508
+ */
509
+ conditions?: string[];
510
+ /**
511
+ * Array of strings indicating what file extensions should be used for module resolution.
512
+ *
513
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
514
+ */
515
+ extensions?: string[];
516
+ /**
517
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
518
+ *
519
+ * @remarks
520
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
521
+ */
522
+ dedupe?: string[];
523
+ /**
524
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
525
+ */
526
+ builtins?: (string | RegExp)[];
527
+ /**
528
+ * Define global variable replacements.
529
+ *
530
+ * @remarks
531
+ * This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
532
+ *
533
+ * @example
534
+ * ```ts
535
+ * {
536
+ * define: {
537
+ * __VERSION__: '"1.0.0"',
538
+ * __DEV__: 'process.env.NODE_ENV !== "production"'
539
+ * }
540
+ * }
541
+ * ```
542
+ *
543
+ * @see https://esbuild.github.io/api/#define
544
+ * @see https://vitejs.dev/config/build-options.html#define
545
+ * @see https://github.com/rollup/plugins/tree/master/packages/replace
546
+ */
547
+ define?: Record<string, any>;
548
+ /**
549
+ * Global variables that will have import statements injected where necessary
550
+ *
551
+ * @remarks
552
+ * This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
553
+ *
554
+ * @example
555
+ * ```ts
556
+ * {
557
+ * inject: {
558
+ * process: 'process/browser',
559
+ * Buffer: ['buffer', 'Buffer'],
560
+ * }
561
+ * }
562
+ * ```
563
+ *
564
+ * @see https://github.com/rollup/plugins/tree/master/packages/inject
565
+ */
566
+ inject?: Record<string, string | string[]>;
567
+ /**
568
+ * The alias mappings to use for module resolution during the build process.
569
+ *
570
+ * @remarks
571
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
572
+ *
573
+ * @example
574
+ * ```ts
575
+ * {
576
+ * alias: {
577
+ * "@utils": "./src/utils",
578
+ * "@components": "./src/components"
579
+ * }
580
+ * }
581
+ * ```
582
+ *
583
+ * @see https://github.com/rollup/plugins/tree/master/packages/alias
584
+ */
585
+ alias?: Record<string, string> | Array<{
586
+ find: string | RegExp;
587
+ replacement: string;
588
+ }>;
589
+ /**
590
+ * A list of modules that should not be bundled, even if they are external dependencies.
591
+ *
592
+ * @remarks
593
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
594
+ */
595
+ external?: (string | RegExp)[];
596
+ /**
597
+ * A list of modules that should always be bundled, even if they are external dependencies.
598
+ */
599
+ noExternal?: (string | RegExp)[];
600
+ /**
601
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
602
+ */
603
+ skipNodeModulesBundle?: boolean;
604
+ /**
605
+ * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
606
+ *
607
+ * @defaultValue false
608
+ */
609
+ keepProcessEnv?: boolean;
610
+ /**
611
+ * An optional set of override options to apply to the selected build variant.
612
+ *
613
+ * @remarks
614
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
615
+ */
616
+ override?: Record<string, any>;
617
+ }
618
+ type BuildResolvedConfig = Omit<BuildConfig, "override">;
619
+ //#endregion
620
+ //#region ../powerlines/src/types/commands.d.ts
621
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
622
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
623
+ //#endregion
624
+ //#region ../powerlines/src/types/plugin.d.ts
625
+ interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
626
+ /**
627
+ * The order in which the plugin should be applied.
628
+ */
629
+ order?: "pre" | "post" | null | undefined;
630
+ /**
631
+ * A filter to determine when the hook should be called.
632
+ */
633
+ filter?: Pick<HookFilter, TFilter>;
634
+ /**
635
+ * The hook function to be called.
636
+ */
637
+ handler: THookFunction;
638
+ }
639
+ type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> = THookFunction | PluginHookObject<THookFunction, TFilter>;
640
+ /**
641
+ * A result returned by the plugin from the `types` hook that describes the declaration types output file.
642
+ */
643
+ interface TypesResult {
644
+ directives?: string[];
645
+ code: string;
646
+ }
647
+ type DeepPartial$1<T> = { [K in keyof T]?: DeepPartial$1<T[K]> };
648
+ type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial$1<TContext["config"]> & Record<string, any>;
649
+ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
650
+ /**
651
+ * A function that returns configuration options to be merged with the build context's options.
652
+ *
653
+ * @remarks
654
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
655
+ *
656
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.
657
+ *
658
+ * @see https://vitejs.dev/guide/api-plugin#config
659
+ *
660
+ * @param this - The build context.
661
+ * @param config - The partial configuration object to be modified.
662
+ * @returns A promise that resolves to a partial configuration object.
663
+ */
664
+ config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
665
+ /**
666
+ * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
667
+ *
668
+ * @remarks
669
+ * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
670
+ *
671
+ * @see https://vitejs.dev/guide/api-plugin#configenvironment
672
+ *
673
+ * @param this - The build context.
674
+ * @param name - The name of the environment being configured.
675
+ * @param environment - The Vite-like environment object containing information about the current build environment.
676
+ * @returns A promise that resolves when the hook is complete.
677
+ */
678
+ configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
679
+ /**
680
+ * A hook that is called when the plugin is resolved.
681
+ *
682
+ * @see https://vitejs.dev/guide/api-plugin#configresolved
683
+ *
684
+ * @param this - The build context.
685
+ * @returns A promise that resolves when the hook is complete.
686
+ */
687
+ configResolved: (this: TContext) => MaybePromise<void>;
688
+ /**
689
+ * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
690
+ *
691
+ * @param this - The build context.
692
+ * @param code - The source code to generate types for.
693
+ * @returns A promise that resolves when the hook is complete.
694
+ */
695
+ types: (this: TContext, code: string) => MaybePromise<TypesResult | string | undefined | null>;
696
+ /**
697
+ * A hook that is called at the start of the build process.
698
+ *
699
+ * @param this - The build context and unplugin build context.
700
+ * @returns A promise that resolves when the hook is complete.
701
+ */
702
+ buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
703
+ /**
704
+ * A hook that is called at the end of the build process.
705
+ *
706
+ * @param this - The build context and unplugin build context.
707
+ * @returns A promise that resolves when the hook is complete.
708
+ */
709
+ buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
710
+ /**
711
+ * A hook that is called to transform the source code.
712
+ *
713
+ * @param this - The build context, unplugin build context, and unplugin context.
714
+ * @param code - The source code to transform.
715
+ * @param id - The identifier of the source code.
716
+ * @returns A promise that resolves when the hook is complete.
717
+ */
718
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
719
+ /**
720
+ * A hook that is called to load the source code.
721
+ *
722
+ * @param this - The build context, unplugin build context, and unplugin context.
723
+ * @param id - The identifier of the source code.
724
+ * @returns A promise that resolves when the hook is complete.
725
+ */
726
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
727
+ /**
728
+ * A hook that is called to resolve the identifier of the source code.
729
+ *
730
+ * @param this - The build context, unplugin build context, and unplugin context.
731
+ * @param id - The identifier of the source code.
732
+ * @param importer - The importer of the source code.
733
+ * @param options - The options for resolving the identifier.
734
+ * @returns A promise that resolves when the hook is complete.
735
+ */
736
+ resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
737
+ isEntry: boolean;
738
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>;
739
+ /**
740
+ * A hook that is called to write the bundle to disk.
741
+ *
742
+ * @param this - The build context.
743
+ * @returns A promise that resolves when the hook is complete.
744
+ */
745
+ writeBundle: (this: TContext) => MaybePromise<void>;
746
+ }
747
+ type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant$1 extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant$1] = Required<UnpluginOptions>[TBuildVariant$1]> = { [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike ? (this: ThisParameterType<TOptions[TKey]> & TContext, ...args: Parameters<TOptions[TKey]>) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>> : TOptions[TKey] };
748
+ type PluginHooks<TContext extends PluginContext = PluginContext> = { [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]> } & {
749
+ /**
750
+ * A function that returns configuration options to be merged with the build context's options.
751
+ *
752
+ * @remarks
753
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
754
+ *
755
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
756
+ *
757
+ * @see https://vitejs.dev/guide/api-plugin#config
758
+ *
759
+ * @param this - The build context.
760
+ * @param config - The partial configuration object to be modified.
761
+ * @returns A promise that resolves to a partial configuration object.
762
+ */
763
+ config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
764
+ /**
765
+ * A hook that is called to transform the source code.
766
+ *
767
+ * @param this - The build context, unplugin build context, and unplugin context.
768
+ * @param code - The source code to transform.
769
+ * @param id - The identifier of the source code.
770
+ * @returns A promise that resolves when the hook is complete.
771
+ */
772
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
773
+ /**
774
+ * A hook that is called to load the source code.
775
+ *
776
+ * @param this - The build context, unplugin build context, and unplugin context.
777
+ * @param id - The identifier of the source code.
778
+ * @returns A promise that resolves when the hook is complete.
779
+ */
780
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
781
+ /**
782
+ * A hook that is called to resolve the identifier of the source code.
783
+ *
784
+ * @param this - The build context, unplugin build context, and unplugin context.
785
+ * @param id - The identifier of the source code.
786
+ * @param importer - The importer of the source code.
787
+ * @param options - The options for resolving the identifier.
788
+ * @returns A promise that resolves when the hook is complete.
789
+ */
790
+ resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
791
+ isEntry: boolean;
792
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
793
+ };
794
+ type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = { [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant> };
795
+ interface Plugin<TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
796
+ /**
797
+ * The name of the plugin, for use in deduplication, error messages and logs.
798
+ */
799
+ name: string;
800
+ /**
801
+ * An API object that can be used for inter-plugin communication.
802
+ *
803
+ * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
804
+ */
805
+ api?: Record<string, any>;
806
+ /**
807
+ * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
808
+ *
809
+ * @remarks
810
+ * The Plugin invocation order is as follows:
811
+ * - `enforce: 'pre'` plugins
812
+ * - `order: 'pre'` plugin hooks
813
+ * - any other plugins (normal)
814
+ * - `order: 'post'` plugin hooks
815
+ * - `enforce: 'post'` plugins
816
+ *
817
+ * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
818
+ * @see https://rollupjs.org/plugin-development/#build-hooks
819
+ * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
820
+ * @see https://esbuild.github.io/plugins/#concepts
821
+ */
822
+ enforce?: "pre" | "post";
823
+ /**
824
+ * A function to determine if two plugins are the same and can be de-duplicated.
825
+ *
826
+ * @remarks
827
+ * If this is not provided, plugins are de-duplicated by comparing their names.
828
+ *
829
+ * @param other - The other plugin to compare against.
830
+ * @returns `true` if the two plugins are the same, `false` otherwise.
831
+ */
832
+ dedupe?: false | ((other: Plugin<any>) => boolean);
833
+ /**
834
+ * A list of pre-requisite plugins that must be loaded before this plugin can be used.
835
+ */
836
+ /**
837
+ * Define environments where this plugin should be active. By default, the plugin is active in all environments.
838
+ *
839
+ * @param environment - The environment to check.
840
+ * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
841
+ */
842
+ applyToEnvironment?: (environment: EnvironmentResolvedConfig) => boolean | PluginConfig<TContext>;
843
+ }
844
+ //#endregion
845
+ //#region ../powerlines/src/types/tsconfig.d.ts
846
+ type ReflectionMode = "default" | "explicit" | "never";
847
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
848
+ /**
849
+ * Defines the level of reflection to be used during the transpilation process.
850
+ *
851
+ * @remarks
852
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
853
+ * - `minimal` - Only the essential type information is captured.
854
+ * - `normal` - Additional type information is captured, including some contextual data.
855
+ * - `verbose` - All available type information is captured, including detailed contextual data.
856
+ */
857
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
858
+ interface DeepkitOptions {
859
+ /**
860
+ * Either true to activate reflection for all files compiled using this tsconfig,
861
+ * or a list of globs/file paths relative to this tsconfig.json.
862
+ * Globs/file paths can be prefixed with a ! to exclude them.
863
+ */
864
+ reflection?: RawReflectionMode;
865
+ /**
866
+ * Defines the level of reflection to be used during the transpilation process.
867
+ *
868
+ * @remarks
869
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
870
+ * - `minimal` - Only the essential type information is captured.
871
+ * - `normal` - Additional type information is captured, including some contextual data.
872
+ * - `verbose` - All available type information is captured, including detailed contextual data.
873
+ */
874
+ reflectionLevel?: ReflectionLevel;
875
+ }
876
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
877
+ /**
878
+ * The TypeScript compiler configuration.
879
+ *
880
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
881
+ */
882
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
883
+ /**
884
+ * Either true to activate reflection for all files compiled using this tsconfig,
885
+ * or a list of globs/file paths relative to this tsconfig.json.
886
+ * Globs/file paths can be prefixed with a ! to exclude them.
887
+ */
888
+ reflection?: RawReflectionMode;
889
+ /**
890
+ * Defines the level of reflection to be used during the transpilation process.
891
+ *
892
+ * @remarks
893
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
894
+ * - `minimal` - Only the essential type information is captured.
895
+ * - `normal` - Additional type information is captured, including some contextual data.
896
+ * - `verbose` - All available type information is captured, including detailed contextual data.
897
+ */
898
+ reflectionLevel?: ReflectionLevel;
899
+ /**
900
+ * Instructs the TypeScript compiler how to compile `.ts` files.
901
+ */
902
+ compilerOptions?: TSCompilerOptions;
903
+ }
904
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
905
+ originalTsconfigJson: TsConfigJson;
906
+ tsconfigJson: TSConfig;
907
+ tsconfigFilePath: string;
908
+ };
909
+ //#endregion
910
+ //#region ../powerlines/src/types/context.d.ts
911
+ /**
912
+ * The severity level of a {@link LogRecord}.
913
+ */
914
+ type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
915
+ declare const LogLevel: {
916
+ DEBUG: LogLevel;
917
+ INFO: LogLevel;
918
+ WARNING: LogLevel;
919
+ ERROR: LogLevel;
920
+ FATAL: LogLevel;
921
+ };
922
+ interface MetaInfo {
923
+ /**
924
+ * The checksum generated from the resolved options
925
+ */
926
+ checksum: string;
927
+ /**
928
+ * The build id
929
+ */
930
+ buildId: string;
931
+ /**
932
+ * The release id
933
+ */
934
+ releaseId: string;
935
+ /**
936
+ * The build timestamp
937
+ */
938
+ timestamp: number;
939
+ /**
940
+ * A hash that represents the path to the project root directory
941
+ */
942
+ projectRootHash: string;
943
+ /**
944
+ * A hash that represents the path to the project root directory
945
+ */
946
+ configHash: string;
947
+ }
948
+ interface Resolver extends Jiti {
949
+ plugin: Jiti;
950
+ }
951
+ interface TransformResult$1 {
952
+ code: string;
953
+ map: SourceMap | null;
954
+ }
955
+ /**
956
+ * Options for initializing or updating the context with new configuration values
957
+ */
958
+ interface InitContextOptions {
959
+ /**
960
+ * If false, the plugin will be loaded after all other plugins.
961
+ *
962
+ * @defaultValue true
963
+ */
964
+ isHighPriority: boolean;
965
+ }
966
+ /**
967
+ * Options for fetch requests made via the context's {@link Context.fetch} method
968
+ */
969
+ interface FetchOptions extends FetchRequestOptions {
970
+ /**
971
+ * An indicator specifying that the request should bypass any caching
972
+ */
973
+ skipCache?: boolean;
974
+ }
975
+ /**
976
+ * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
977
+ */
978
+ interface ParseOptions extends ParserOptions {
979
+ /**
980
+ * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
981
+ */
982
+ allowReturnOutsideFunction?: boolean;
983
+ }
984
+ /**
985
+ * Options for emitting entry virtual files
986
+ */
987
+ type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
988
+ /**
989
+ * The unresolved Powerlines context.
990
+ *
991
+ * @remarks
992
+ * This context is used before the user configuration has been fully resolved after the `config`.
993
+ */
994
+ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
995
+ /**
996
+ * The Storm workspace configuration
997
+ */
998
+ workspaceConfig: WorkspaceConfig;
999
+ /**
1000
+ * An object containing the options provided to Powerlines
1001
+ */
1002
+ config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1003
+ projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1004
+ sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
1005
+ output: TResolvedConfig["output"];
1006
+ };
1007
+ /**
1008
+ * A logging function for the Powerlines engine
1009
+ */
1010
+ log: LogFn;
1011
+ /**
1012
+ * A logging function for fatal messages
1013
+ */
1014
+ fatal: (message: string | UnpluginMessage) => void;
1015
+ /**
1016
+ * A logging function for error messages
1017
+ */
1018
+ error: (message: string | UnpluginMessage) => void;
1019
+ /**
1020
+ * A logging function for warning messages
1021
+ */
1022
+ warn: (message: string | UnpluginMessage) => void;
1023
+ /**
1024
+ * A logging function for informational messages
1025
+ */
1026
+ info: (message: string | UnpluginMessage) => void;
1027
+ /**
1028
+ * A logging function for debug messages
1029
+ */
1030
+ debug: (message: string | UnpluginMessage) => void;
1031
+ /**
1032
+ * A logging function for trace messages
1033
+ */
1034
+ trace: (message: string | UnpluginMessage) => void;
1035
+ /**
1036
+ * The metadata information
1037
+ */
1038
+ meta: MetaInfo;
1039
+ /**
1040
+ * The metadata information currently written to disk
1041
+ */
1042
+ persistedMeta?: MetaInfo;
1043
+ /**
1044
+ * The Powerlines artifacts directory
1045
+ */
1046
+ artifactsPath: string;
1047
+ /**
1048
+ * The path to the Powerlines builtin runtime modules directory
1049
+ */
1050
+ builtinsPath: string;
1051
+ /**
1052
+ * The path to the Powerlines entry modules directory
1053
+ */
1054
+ entryPath: string;
1055
+ /**
1056
+ * The path to the Powerlines TypeScript declaration files directory
1057
+ */
1058
+ dtsPath: string;
1059
+ /**
1060
+ * The path to a directory where the reflection data buffers (used by the build processes) are stored
1061
+ */
1062
+ dataPath: string;
1063
+ /**
1064
+ * The path to a directory where the project cache (used by the build processes) is stored
1065
+ */
1066
+ cachePath: string;
1067
+ /**
1068
+ * The Powerlines environment paths
1069
+ */
1070
+ envPaths: EnvPaths;
1071
+ /**
1072
+ * The file system path to the Powerlines package installation
1073
+ */
1074
+ powerlinesPath: string;
1075
+ /**
1076
+ * The relative path to the Powerlines workspace root directory
1077
+ */
1078
+ relativeToWorkspaceRoot: string;
1079
+ /**
1080
+ * The project's `package.json` file content
1081
+ */
1082
+ packageJson: PackageJson & Record<string, any>;
1083
+ /**
1084
+ * The project's `project.json` file content
1085
+ */
1086
+ projectJson?: Record<string, any>;
1087
+ /**
1088
+ * The dependency installations required by the project
1089
+ */
1090
+ dependencies: Record<string, string | Range>;
1091
+ /**
1092
+ * The development dependency installations required by the project
1093
+ */
1094
+ devDependencies: Record<string, string | Range>;
1095
+ /**
1096
+ * The parsed TypeScript configuration from the `tsconfig.json` file
1097
+ */
1098
+ tsconfig: ParsedTypeScriptConfig;
1099
+ /**
1100
+ * The entry points of the source code
1101
+ */
1102
+ entry: ResolvedEntryTypeDefinition[];
1103
+ /**
1104
+ * The virtual file system manager used during the build process to reference generated runtime files
1105
+ */
1106
+ fs: VirtualFileSystemInterface;
1107
+ /**
1108
+ * The Jiti module resolver
1109
+ */
1110
+ resolver: Resolver;
1111
+ /**
1112
+ * The builtin module id that exist in the Powerlines virtual file system
1113
+ */
1114
+ builtins: string[];
1115
+ /**
1116
+ * The {@link Project} instance used for type reflection and module manipulation
1117
+ *
1118
+ * @see https://ts-morph.com/
1119
+ *
1120
+ * @remarks
1121
+ * This instance is created lazily on first access.
1122
+ */
1123
+ program: Project;
1124
+ /**
1125
+ * A function to perform HTTP fetch requests
1126
+ *
1127
+ * @remarks
1128
+ * This function uses a caching layer to avoid duplicate requests during the Powerlines process.
1129
+ *
1130
+ * @example
1131
+ * ```ts
1132
+ * const response = await context.fetch("https://api.example.com/data");
1133
+ * const data = await response.json();
1134
+ * ```
1135
+ *
1136
+ * @see https://github.com/nodejs/undici
1137
+ *
1138
+ * @param input - The URL to fetch.
1139
+ * @param options - The fetch request options.
1140
+ * @returns A promise that resolves to a response returned by the fetch.
1141
+ */
1142
+ fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
1143
+ /**
1144
+ * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
1145
+ *
1146
+ * @remarks
1147
+ * This function can be used to parse TypeScript code into an AST for further analysis or transformation.
1148
+ *
1149
+ * @example
1150
+ * ```ts
1151
+ * const ast = context.parse("const x: number = 42;");
1152
+ * ```
1153
+ *
1154
+ * @see https://rollupjs.org/plugin-development/#this-parse
1155
+ * @see https://github.com/oxc/oxc
1156
+ *
1157
+ * @param code - The source code to parse.
1158
+ * @param options - The options to pass to the parser.
1159
+ * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
1160
+ */
1161
+ parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
1162
+ /**
1163
+ * A helper function to resolve modules using the Jiti resolver
1164
+ *
1165
+ * @remarks
1166
+ * This function can be used to resolve modules relative to the project root directory.
1167
+ *
1168
+ * @example
1169
+ * ```ts
1170
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1171
+ * ```
1172
+ *
1173
+ * @param id - The module to resolve.
1174
+ * @param importer - An optional path to the importer module.
1175
+ * @param options - Additional resolution options.
1176
+ * @returns A promise that resolves to the resolved module path.
1177
+ */
1178
+ resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<ExternalIdResult | undefined>;
1179
+ /**
1180
+ * A helper function to load modules using the Jiti resolver
1181
+ *
1182
+ * @remarks
1183
+ * This function can be used to load modules relative to the project root directory.
1184
+ *
1185
+ * @example
1186
+ * ```ts
1187
+ * const module = await context.load("some-module", "/path/to/importer");
1188
+ * ```
1189
+ *
1190
+ * @param id - The module to load.
1191
+ * @returns A promise that resolves to the loaded module.
1192
+ */
1193
+ load: (id: string) => Promise<TransformResult$1 | undefined>;
1194
+ /**
1195
+ * The Powerlines builtin virtual files
1196
+ */
1197
+ getBuiltins: () => Promise<VirtualFile[]>;
1198
+ /**
1199
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1200
+ *
1201
+ * @param code - The source code of the builtin file
1202
+ * @param id - The unique identifier of the builtin file
1203
+ * @param path - An optional path to write the builtin file to
1204
+ * @param options - Additional options for writing the builtin file
1205
+ */
1206
+ emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
1207
+ /**
1208
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1209
+ *
1210
+ * @param code - The source code of the entry file
1211
+ * @param path - An optional path to write the entry file to
1212
+ * @param options - Additional options for writing the entry file
1213
+ */
1214
+ emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
1215
+ /**
1216
+ * A function to update the context fields using a new user configuration options
1217
+ */
1218
+ withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
1219
+ /**
1220
+ * A function to update the context fields using inline configuration options
1221
+ */
1222
+ withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1223
+ /**
1224
+ * Create a new logger instance
1225
+ *
1226
+ * @param name - The name to use for the logger instance
1227
+ * @returns A logger function
1228
+ */
1229
+ createLog: (name: string | null) => LogFn;
1230
+ /**
1231
+ * Extend the current logger instance with a new name
1232
+ *
1233
+ * @param name - The name to use for the extended logger instance
1234
+ * @returns A logger function
1235
+ */
1236
+ extendLog: (name: string) => LogFn;
1237
+ /**
1238
+ * Generates a checksum representing the current context state
1239
+ *
1240
+ * @returns A promise that resolves to a string representing the checksum
1241
+ */
1242
+ generateChecksum: () => Promise<string>;
1243
+ }
1244
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1245
+ /**
1246
+ * The fully resolved Powerlines configuration
1247
+ */
1248
+ config: TResolvedConfig;
1249
+ };
1250
+ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1251
+ /**
1252
+ * The environment specific resolved configuration
1253
+ */
1254
+ environment: EnvironmentResolvedConfig;
1255
+ /**
1256
+ * An alternative property name for the {@link log} property
1257
+ *
1258
+ * @remarks
1259
+ * This is provided for compatibility with other logging libraries that expect a `logger` property.
1260
+ */
1261
+ logger: LogFn;
1262
+ }
1263
+ type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
1264
+ //#endregion
1265
+ //#region ../powerlines/src/types/babel.d.ts
1266
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
1267
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
1268
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
1269
+ name: string;
1270
+ log: LogFn;
1271
+ api: BabelAPI;
1272
+ options: TOptions;
1273
+ context: TContext;
1274
+ dirname: string;
1275
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
1276
+ $$name: string;
1277
+ };
1278
+ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
1279
+ //#endregion
1280
+ //#region ../powerlines/src/types/config.d.ts
1281
+ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
1282
+ /**
1283
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
1284
+ */
1285
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
1286
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
1287
+ /**
1288
+ * A configuration tuple for a Powerlines plugin.
1289
+ */
1290
+ type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
1291
+ /**
1292
+ * A configuration object for a Powerlines plugin.
1293
+ */
1294
+ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
1295
+ plugin: string | PluginFactory<TContext, TOptions>;
1296
+ options: TOptions;
1297
+ } | {
1298
+ plugin: Plugin<TContext>;
1299
+ options?: never;
1300
+ };
1301
+ /**
1302
+ * A configuration tuple for a Powerlines plugin.
1303
+ */
1304
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Plugin<TContext>[] | Promise<Plugin<TContext> | Plugin<TContext>[]> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1305
+ type ProjectType = "application" | "library";
1306
+ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
1307
+ /**
1308
+ * The Babel plugins to be used during the build process
1309
+ */
1310
+ plugins?: BabelTransformPluginOptions[];
1311
+ /**
1312
+ * The Babel presets to be used during the build process
1313
+ */
1314
+ presets?: BabelTransformPluginOptions[];
1315
+ };
1316
+ interface DeployConfig {
1317
+ /**
1318
+ * The deployment variant being used by the Powerlines engine.
1319
+ *
1320
+ * @example
1321
+ * ```ts
1322
+ * export default defineConfig({
1323
+ * deploy: {
1324
+ * variant: "cloudflare"
1325
+ * }
1326
+ * });
1327
+ *
1328
+ * ```
1329
+ */
1330
+ variant?: string;
1331
+ }
1332
+ interface OutputConfig {
1333
+ /**
1334
+ * The path to output the final compiled files to
1335
+ *
1336
+ * @remarks
1337
+ * If a value is not provided, Powerlines will attempt to:
1338
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
1339
+ * 2. Use the `dist` directory in the project root directory.
1340
+ *
1341
+ * @defaultValue "dist/\{projectRoot\}"
1342
+ */
1343
+ outputPath?: string;
1344
+ /**
1345
+ * The output directory path for the project build.
1346
+ *
1347
+ * @remarks
1348
+ * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
1349
+ *
1350
+ * @defaultValue "\{projectRoot\}/dist"
1351
+ */
1352
+ buildPath?: string;
1353
+ /**
1354
+ * The folder where the generated runtime artifacts will be located
1355
+ *
1356
+ * @remarks
1357
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
1358
+ *
1359
+ * @defaultValue "\{projectRoot\}/.powerlines"
1360
+ */
1361
+ artifactsPath?: string;
1362
+ /**
1363
+ * The path of the generated runtime declaration file relative to the workspace root.
1364
+ *
1365
+ * @defaultValue "\{projectRoot\}/powerlines.d.ts"
1366
+ */
1367
+ dts?: string | false;
1368
+ /**
1369
+ * A prefix to use for identifying builtin modules
1370
+ *
1371
+ * @remarks
1372
+ * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
1373
+ *
1374
+ * @defaultValue "powerlines"
1375
+ */
1376
+ builtinPrefix?: string;
1377
+ /**
1378
+ * The module format of the output files
1379
+ *
1380
+ * @remarks
1381
+ * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
1382
+ *
1383
+ * @defaultValue "esm"
1384
+ */
1385
+ format?: Format | Format[];
1386
+ /**
1387
+ * A list of assets to copy to the output directory
1388
+ *
1389
+ * @remarks
1390
+ * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
1391
+ */
1392
+ assets?: Array<string | AssetGlob>;
1393
+ /**
1394
+ * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
1395
+ *
1396
+ * @remarks
1397
+ * If a string preset is provided, it must be one of the following values:
1398
+ * - `"virtual"`: Uses the local file system for storage.
1399
+ * - `"fs"`: Uses an in-memory virtual file system for storage.
1400
+ *
1401
+ * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
1402
+ *
1403
+ * @defaultValue "virtual"
1404
+ */
1405
+ storage?: StoragePort | StoragePreset;
1406
+ }
1407
+ interface BaseConfig {
1408
+ /**
1409
+ * The entry point(s) for the application
1410
+ */
1411
+ entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
1412
+ /**
1413
+ * Configuration for the output of the build process
1414
+ */
1415
+ output?: OutputConfig;
1416
+ /**
1417
+ * Configuration for cleaning the build artifacts
1418
+ *
1419
+ * @remarks
1420
+ * If set to `false`, the cleaning process will be disabled.
1421
+ */
1422
+ clean?: Record<string, any> | false;
1423
+ /**
1424
+ * Configuration for linting the source code
1425
+ *
1426
+ * @remarks
1427
+ * If set to `false`, linting will be disabled.
1428
+ */
1429
+ lint?: Record<string, any> | false;
1430
+ /**
1431
+ * Configuration for testing the source code
1432
+ *
1433
+ * @remarks
1434
+ * If set to `false`, testing will be disabled.
1435
+ */
1436
+ test?: Record<string, any> | false;
1437
+ /**
1438
+ * Configuration for the transformation of the source code
1439
+ */
1440
+ transform?: Record<string, any>;
1441
+ /**
1442
+ * Configuration provided to build processes
1443
+ *
1444
+ * @remarks
1445
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1446
+ */
1447
+ build?: BuildConfig;
1448
+ /**
1449
+ * Configuration for documentation generation
1450
+ *
1451
+ * @remarks
1452
+ * This configuration will be used by the documentation generation plugins during the `docs` command.
1453
+ */
1454
+ docs?: Record<string, any>;
1455
+ /**
1456
+ * Configuration for deploying the source code
1457
+ *
1458
+ * @remarks
1459
+ * If set to `false`, the deployment will be disabled.
1460
+ */
1461
+ deploy?: DeployConfig | false;
1462
+ /**
1463
+ * The path to the tsconfig file to be used by the compiler
1464
+ *
1465
+ * @remarks
1466
+ * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
1467
+ *
1468
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
1469
+ */
1470
+ tsconfig?: string;
1471
+ /**
1472
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
1473
+ *
1474
+ * @see https://www.typescriptlang.org/tsconfig
1475
+ *
1476
+ * @remarks
1477
+ * If populated, this option takes higher priority than `tsconfig`
1478
+ */
1479
+ tsconfigRaw?: TSConfig;
1480
+ }
1481
+ interface EnvironmentConfig extends BaseConfig {
1482
+ /**
1483
+ * Configuration options for the preview server
1484
+ */
1485
+ preview?: PreviewOptions;
1486
+ /**
1487
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
1488
+ */
1489
+ ssr?: boolean;
1490
+ /**
1491
+ * Define if this environment is used for Server-Side Rendering
1492
+ *
1493
+ * @defaultValue "server" (if it isn't the client environment)
1494
+ */
1495
+ consumer?: "client" | "server";
1496
+ }
1497
+ interface CommonUserConfig extends BaseConfig {
1498
+ /**
1499
+ * The name of the project
1500
+ */
1501
+ name?: string;
1502
+ /**
1503
+ * The project display title
1504
+ *
1505
+ * @remarks
1506
+ * This option is used in documentation generation and other places where a human-readable title is needed.
1507
+ */
1508
+ title?: string;
1509
+ /**
1510
+ * A description of the project
1511
+ *
1512
+ * @remarks
1513
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
1514
+ */
1515
+ description?: string;
1516
+ /**
1517
+ * The log level to use for the Powerlines processes.
1518
+ *
1519
+ * @defaultValue "info"
1520
+ */
1521
+ logLevel?: LogLevelLabel | null;
1522
+ /**
1523
+ * A custom logger function to use for logging messages
1524
+ */
1525
+ customLogger?: LogFn;
1526
+ /**
1527
+ * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
1528
+ *
1529
+ * @defaultValue "production"
1530
+ */
1531
+ mode?: "development" | "test" | "production";
1532
+ /**
1533
+ * The type of project being built
1534
+ *
1535
+ * @defaultValue "application"
1536
+ */
1537
+ type?: ProjectType;
1538
+ /**
1539
+ * The root directory of the project
1540
+ */
1541
+ root: string;
1542
+ /**
1543
+ * The root directory of the project's source code
1544
+ *
1545
+ * @defaultValue "\{root\}/src"
1546
+ */
1547
+ sourceRoot?: string;
1548
+ /**
1549
+ * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
1550
+ *
1551
+ * @remarks
1552
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
1553
+ */
1554
+ configFile?: string;
1555
+ /**
1556
+ * Should the Powerlines CLI processes skip installing missing packages?
1557
+ *
1558
+ * @remarks
1559
+ * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
1560
+ *
1561
+ * @defaultValue false
1562
+ */
1563
+ skipInstalls?: boolean;
1564
+ /**
1565
+ * Should the compiler processes skip any improvements that make use of cache?
1566
+ *
1567
+ * @defaultValue false
1568
+ */
1569
+ skipCache?: boolean;
1570
+ /**
1571
+ * A list of resolvable paths to plugins used during the build process
1572
+ */
1573
+ plugins?: PluginConfig<any>[];
1574
+ /**
1575
+ * Environment-specific configurations
1576
+ */
1577
+ environments?: Record<string, EnvironmentConfig>;
1578
+ /**
1579
+ * Should a single `build` process be ran for each environment?
1580
+ *
1581
+ * @remarks
1582
+ * This option determines how environments are managed during the `build` process. The available options are:
1583
+ *
1584
+ * - `false`: A separate build is ran for each environment.
1585
+ * - `true`: A single build is ran for all environments.
1586
+ *
1587
+ * @defaultValue false
1588
+ */
1589
+ singleBuild?: boolean;
1590
+ /**
1591
+ * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
1592
+ *
1593
+ * @remarks
1594
+ * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
1595
+ *
1596
+ * @defaultValue "powerlines"
1597
+ */
1598
+ framework?: string;
1599
+ }
1600
+ interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant$1 extends string = any> extends Omit<CommonUserConfig, "build"> {
1601
+ /**
1602
+ * Configuration provided to build processes
1603
+ *
1604
+ * @remarks
1605
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1606
+ */
1607
+ build: Omit<TBuildConfig, "override"> & {
1608
+ /**
1609
+ * The build variant being used by the Powerlines engine.
1610
+ */
1611
+ variant?: TBuildVariant$1;
1612
+ /**
1613
+ * An optional set of override options to apply to the selected build variant.
1614
+ *
1615
+ * @remarks
1616
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
1617
+ */
1618
+ override?: Partial<TBuildResolvedConfig>;
1619
+ };
1620
+ }
1621
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
1622
+ /**
1623
+ * The configuration provided while executing Powerlines commands.
1624
+ */
1625
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
1626
+ /**
1627
+ * A string identifier for the Powerlines command being executed
1628
+ */
1629
+ command: PowerlinesCommand;
1630
+ };
1631
+ //#endregion
1632
+ //#region ../powerlines/src/types/resolved.d.ts
1633
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
1634
+ /**
1635
+ * The user provided entry point in the source code
1636
+ */
1637
+ input?: TypeDefinition;
1638
+ /**
1639
+ * An optional name to use in the package export during the build process
1640
+ */
1641
+ output?: string;
1642
+ }
1643
+ type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
1644
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
1645
+ /**
1646
+ * The name of the environment
1647
+ */
1648
+ name: string;
1649
+ /**
1650
+ * Configuration options for the preview server
1651
+ */
1652
+ preview?: ResolvedPreviewOptions;
1653
+ };
1654
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
1655
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
1656
+ assets: ResolvedAssetGlob[];
1657
+ }> & Pick<OutputConfig, "storage">;
1658
+ /**
1659
+ * The resolved options for the Powerlines project configuration.
1660
+ */
1661
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
1662
+ /**
1663
+ * The configuration options that were provided inline to the Powerlines CLI.
1664
+ */
1665
+ inlineConfig: InlineConfig<TUserConfig>;
1666
+ /**
1667
+ * The original configuration options that were provided by the user to the Powerlines process.
1668
+ */
1669
+ userConfig: TUserConfig;
1670
+ /**
1671
+ * A string identifier for the Powerlines command being executed.
1672
+ */
1673
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
1674
+ /**
1675
+ * The root directory of the project's source code
1676
+ *
1677
+ * @defaultValue "\{projectRoot\}/src"
1678
+ */
1679
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
1680
+ /**
1681
+ * The root directory of the project.
1682
+ */
1683
+ projectRoot: NonUndefined<TUserConfig["root"]>;
1684
+ /**
1685
+ * The type of project being built.
1686
+ */
1687
+ projectType: NonUndefined<TUserConfig["type"]>;
1688
+ /**
1689
+ * The output configuration options to use for the build process
1690
+ */
1691
+ output: OutputResolvedConfig;
1692
+ /**
1693
+ * Configuration provided to build processes
1694
+ *
1695
+ * @remarks
1696
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1697
+ */
1698
+ build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
1699
+ /**
1700
+ * The log level to use for the Powerlines processes.
1701
+ *
1702
+ * @defaultValue "info"
1703
+ */
1704
+ logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
1705
+ };
1706
+ //#endregion
1707
+ //#region src/types/runtime.d.ts
1708
+ /**
1709
+ * The base environment configuration used by Powerlines applications
1710
+ *
1711
+ * @remarks
1712
+ * This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
1713
+ *
1714
+ * @categoryDescription Platform
1715
+ * The name of the platform the configuration parameter is intended for use in.
1716
+ *
1717
+ * @showCategories
1718
+ */
1719
+ interface EnvInterface {
1720
+ /**
1721
+ * The name of the application.
1722
+ *
1723
+ * @readonly
1724
+ * @category neutral
1725
+ */
1726
+ readonly APP_NAME: string;
1727
+ /**
1728
+ * The version of the application.
1729
+ *
1730
+ * @defaultValue "1.0.0"
1731
+ *
1732
+ * @readonly
1733
+ * @category neutral
1734
+ */
1735
+ readonly APP_VERSION: string;
1736
+ /**
1737
+ * The unique identifier for the build.
1738
+ *
1739
+ * @readonly
1740
+ * @category neutral
1741
+ */
1742
+ readonly BUILD_ID: string;
1743
+ /**
1744
+ * The timestamp the build was ran at.
1745
+ *
1746
+ * @readonly
1747
+ * @category neutral
1748
+ */
1749
+ readonly BUILD_TIMESTAMP: string;
1750
+ /**
1751
+ * A checksum hash created during the build.
1752
+ *
1753
+ * @readonly
1754
+ * @category neutral
1755
+ */
1756
+ readonly BUILD_CHECKSUM: string;
1757
+ /**
1758
+ * The unique identifier for the release.
1759
+ *
1760
+ * @readonly
1761
+ * @category neutral
1762
+ */
1763
+ readonly RELEASE_ID: string;
1764
+ /**
1765
+ * The tag for the release. This is generally in the format of "\<APP_NAME\>\@\<APP_VERSION\>".
1766
+ *
1767
+ * @readonly
1768
+ * @category neutral
1769
+ */
1770
+ readonly RELEASE_TAG: string;
1771
+ /**
1772
+ * The name of the organization that maintains the application.
1773
+ *
1774
+ * @remarks
1775
+ * This variable is used to specify the name of the organization that maintains the application. If not provided in an environment, it will try to use the value in {@link @storm-software/config-tools/StormWorkspaceConfig#organization}.
1776
+ *
1777
+ * @alias ORG
1778
+ * @alias ORG_ID
1779
+ * @category neutral
1780
+ */
1781
+ ORGANIZATION: string;
1782
+ /**
1783
+ * The platform for which the application was built.
1784
+ *
1785
+ * @defaultValue "neutral"
1786
+ *
1787
+ * @category neutral
1788
+ */
1789
+ PLATFORM: "node" | "neutral" | "browser";
1790
+ /**
1791
+ * The mode in which the application is running.
1792
+ *
1793
+ * @defaultValue "production"
1794
+ *
1795
+ * @alias NODE_ENV
1796
+ *
1797
+ * @category neutral
1798
+ */
1799
+ MODE: "development" | "test" | "production";
1800
+ /**
1801
+ * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.
1802
+ *
1803
+ * @defaultValue "production"
1804
+ *
1805
+ * @alias ENV
1806
+ * @alias VERCEL_ENV
1807
+ * @category neutral
1808
+ */
1809
+ ENVIRONMENT: string;
1810
+ /**
1811
+ * Indicates if the application is running in debug mode.
1812
+ *
1813
+ * @category neutral
1814
+ */
1815
+ DEBUG: boolean;
1816
+ /**
1817
+ * An indicator that specifies the current runtime is a test environment.
1818
+ *
1819
+ * @category neutral
1820
+ */
1821
+ TEST: boolean;
1822
+ /**
1823
+ * An indicator that specifies the current runtime is a minimal environment.
1824
+ *
1825
+ * @category node
1826
+ */
1827
+ MINIMAL: boolean;
1828
+ /**
1829
+ * An indicator that specifies the current runtime is a no color environment.
1830
+ *
1831
+ * @category node
1832
+ */
1833
+ NO_COLOR: boolean;
1834
+ /**
1835
+ * An indicator that specifies the current runtime is a force color environment.
1836
+ *
1837
+ * @category node
1838
+ */
1839
+ FORCE_COLOR: boolean | number;
1840
+ /**
1841
+ * An indicator that specifies the current runtime should force hyperlinks in terminal output.
1842
+ *
1843
+ * @remarks
1844
+ * This variable is used to force hyperlinks in terminal output, even if the terminal does not support them. This is useful for debugging and development purposes.
1845
+ * @category node
1846
+ */
1847
+ FORCE_HYPERLINK: boolean | number;
1848
+ /**
1849
+ * The name of the agent running the application. This variable is set by certain CI/CD systems.
1850
+ *
1851
+ * @readonly
1852
+ * @category neutral
1853
+ */
1854
+ readonly AGENT_NAME?: string;
1855
+ /**
1856
+ * The color terminal type. This variable is set by certain terminal emulators.
1857
+ *
1858
+ * @readonly
1859
+ * @category node
1860
+ */
1861
+ readonly COLORTERM?: string;
1862
+ /**
1863
+ * The terminal type. This variable is set by certain CI/CD systems.
1864
+ *
1865
+ * @remarks
1866
+ * This variable is used to specify the terminal type that the application is running in. It can be used to determine how to format output for the terminal.
1867
+ *
1868
+ * @readonly
1869
+ * @category node
1870
+ */
1871
+ readonly TERM?: string;
1872
+ /**
1873
+ * The terminal program name. This variable is set by certain terminal emulators.
1874
+ *
1875
+ * @readonly
1876
+ * @category node
1877
+ */
1878
+ readonly TERM_PROGRAM?: string;
1879
+ /**
1880
+ * The terminal program version. This variable is set by certain terminal emulators.
1881
+ *
1882
+ * @readonly
1883
+ * @category node
1884
+ */
1885
+ readonly TERM_PROGRAM_VERSION?: string;
1886
+ /**
1887
+ * The terminal emulator name. This variable is set by certain terminal emulators.
1888
+ *
1889
+ * @readonly
1890
+ * @category node
1891
+ */
1892
+ readonly TERMINAL_EMULATOR?: string;
1893
+ /**
1894
+ * The terminal emulator session ID. This variable is set by certain terminal emulators.
1895
+ *
1896
+ * @readonly
1897
+ * @category node
1898
+ */
1899
+ readonly WT_SESSION?: string;
1900
+ /**
1901
+ * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.
1902
+ *
1903
+ * @readonly
1904
+ * @category node
1905
+ */
1906
+ readonly TERMINUS_SUBLIME?: boolean;
1907
+ /**
1908
+ * The ConEmu task name. This variable is set by certain terminal emulators.
1909
+ *
1910
+ * @readonly
1911
+ * @category node
1912
+ */
1913
+ readonly ConEmuTask?: string;
1914
+ /**
1915
+ * The cursor trace ID. This variable is set by certain terminal emulators.
1916
+ *
1917
+ * @readonly
1918
+ * @category node
1919
+ */
1920
+ readonly CURSOR_TRACE_ID?: string;
1921
+ /**
1922
+ * The VTE version. This variable is set by certain terminal emulators.
1923
+ *
1924
+ * @readonly
1925
+ * @category node
1926
+ */
1927
+ readonly VTE_VERSION?: string;
1928
+ /**
1929
+ * Indicates if error stack traces should be captured.
1930
+ *
1931
+ * @category neutral
1932
+ */
1933
+ STACKTRACE: boolean;
1934
+ /**
1935
+ * Indicates if error data should be included.
1936
+ *
1937
+ * @category neutral
1938
+ */
1939
+ INCLUDE_ERROR_DATA: boolean;
1940
+ /**
1941
+ * A web page to lookup error messages and display additional information given an error code.
1942
+ *
1943
+ * @remarks
1944
+ * This variable is used to provide a URL to a page that can be used to look up error messages given an error code. This is used to provide a more user-friendly error message to the user.
1945
+ *
1946
+ * @title Error Details URL
1947
+ * @category neutral
1948
+ */
1949
+ ERROR_URL: string;
1950
+ /**
1951
+ * The default timezone for the application.
1952
+ *
1953
+ * @defaultValue "America/New_York"
1954
+ * @category neutral
1955
+ */
1956
+ DEFAULT_TIMEZONE: string;
1957
+ /**
1958
+ * The default locale to be used in the application.
1959
+ *
1960
+ * @defaultValue "en_US"
1961
+ * @category neutral
1962
+ */
1963
+ DEFAULT_LOCALE: string;
1964
+ /**
1965
+ * The default lowest log level to accept. If `null`, the logger will reject all records. This value only applies if `lowestLogLevel` is not provided to the `logs` configuration.
1966
+ *
1967
+ * @defaultValue "info"
1968
+ *
1969
+ * @category neutral
1970
+ */
1971
+ LOG_LEVEL?: LogLevel | null;
1972
+ /**
1973
+ * An indicator that specifies the current runtime is a continuous integration environment.
1974
+ *
1975
+ * @title Continuous Integration
1976
+ * @alias CONTINUOUS_INTEGRATION
1977
+ * @category neutral
1978
+ */
1979
+ CI: boolean;
1980
+ /**
1981
+ * The unique identifier for the current run. This value is set by certain CI/CD systems.
1982
+ *
1983
+ * @readonly
1984
+ * @category node
1985
+ */
1986
+ readonly RUN_ID?: string;
1987
+ /**
1988
+ * The agola git reference. This value is set by certain CI/CD systems.
1989
+ *
1990
+ * @readonly
1991
+ * @category node
1992
+ */
1993
+ readonly AGOLA_GIT_REF?: string;
1994
+ /**
1995
+ * The appcircle build ID. This value is set by certain CI/CD systems.
1996
+ *
1997
+ * @readonly
1998
+ * @category node
1999
+ */
2000
+ readonly AC_APPCIRCLE?: string;
2001
+ /**
2002
+ * The appveyor build ID. This value is set by certain CI/CD systems.
2003
+ *
2004
+ * @readonly
2005
+ * @category node
2006
+ */
2007
+ readonly APPVEYOR?: string;
2008
+ /**
2009
+ * The codebuild build ID. This value is set by certain CI/CD systems.
2010
+ *
2011
+ * @readonly
2012
+ * @category node
2013
+ */
2014
+ readonly CODEBUILD?: string;
2015
+ /**
2016
+ * The task force build ID. This value is set by certain CI/CD systems.
2017
+ *
2018
+ * @readonly
2019
+ * @category node
2020
+ */
2021
+ readonly TF_BUILD?: string;
2022
+ /**
2023
+ * The bamboo plan key. This value is set by certain CI/CD systems.
2024
+ *
2025
+ * @readonly
2026
+ * @category node
2027
+ */
2028
+ readonly bamboo_planKey?: string;
2029
+ /**
2030
+ * The bitbucket commit. This value is set by certain CI/CD systems.
2031
+ *
2032
+ * @readonly
2033
+ * @category node
2034
+ */
2035
+ readonly BITBUCKET_COMMIT?: string;
2036
+ /**
2037
+ * The bitrise build ID. This value is set by certain CI/CD systems.
2038
+ *
2039
+ * @readonly
2040
+ * @category node
2041
+ */
2042
+ readonly BITRISE_IO?: string;
2043
+ /**
2044
+ * The buddy workspace ID. This value is set by certain CI/CD systems.
2045
+ *
2046
+ * @readonly
2047
+ * @category node
2048
+ */
2049
+ readonly BUDDY_WORKSPACE_ID?: string;
2050
+ /**
2051
+ * The buildkite build ID. This value is set by certain CI/CD systems.
2052
+ *
2053
+ * @readonly
2054
+ * @category node
2055
+ */
2056
+ readonly BUILDKITE?: string;
2057
+ /**
2058
+ * The circleci build ID. This value is set by certain CI/CD systems.
2059
+ *
2060
+ * @readonly
2061
+ * @category node
2062
+ */
2063
+ readonly CIRCLECI?: string;
2064
+ /**
2065
+ * The cirrus-ci build ID. This value is set by certain CI/CD systems.
2066
+ *
2067
+ * @readonly
2068
+ * @category node
2069
+ */
2070
+ readonly CIRRUS_CI?: string;
2071
+ /**
2072
+ * The cf build ID. This value is set by certain CI/CD systems.
2073
+ *
2074
+ * @readonly
2075
+ * @category node
2076
+ */
2077
+ readonly CF_BUILD_ID?: string;
2078
+ /**
2079
+ * The cm build ID. This value is set by certain CI/CD systems.
2080
+ *
2081
+ * @readonly
2082
+ * @category node
2083
+ */
2084
+ readonly CM_BUILD_ID?: string;
2085
+ /**
2086
+ * The ci name. This value is set by certain CI/CD systems.
2087
+ *
2088
+ * @readonly
2089
+ * @category node
2090
+ */
2091
+ readonly CI_NAME?: string;
2092
+ /**
2093
+ * The drone build ID. This value is set by certain CI/CD systems.
2094
+ *
2095
+ * @readonly
2096
+ * @category node
2097
+ */
2098
+ readonly DRONE?: string;
2099
+ /**
2100
+ * The dsari build ID. This value is set by certain CI/CD systems.
2101
+ *
2102
+ * @readonly
2103
+ * @category node
2104
+ */
2105
+ readonly DSARI?: string;
2106
+ /**
2107
+ * The earthly build ID. This value is set by certain CI/CD systems.
2108
+ *
2109
+ * @readonly
2110
+ * @category node
2111
+ */
2112
+ readonly EARTHLY_CI?: string;
2113
+ /**
2114
+ * The eas build ID. This value is set by certain CI/CD systems.
2115
+ *
2116
+ * @readonly
2117
+ * @category node
2118
+ */
2119
+ readonly EAS_BUILD?: string;
2120
+ /**
2121
+ * The gerrit project. This value is set by certain CI/CD systems.
2122
+ *
2123
+ * @readonly
2124
+ * @category node
2125
+ */
2126
+ readonly GERRIT_PROJECT?: string;
2127
+ /**
2128
+ * The gitea actions build ID. This value is set by certain CI/CD systems.
2129
+ *
2130
+ * @readonly
2131
+ * @category node
2132
+ */
2133
+ readonly GITEA_ACTIONS?: string;
2134
+ /**
2135
+ * The github actions build ID. This value is set by certain CI/CD systems.
2136
+ *
2137
+ * @readonly
2138
+ * @category node
2139
+ */
2140
+ readonly GITHUB_ACTIONS?: string;
2141
+ /**
2142
+ * The gitlab ci build ID. This value is set by certain CI/CD systems.
2143
+ *
2144
+ * @readonly
2145
+ * @category node
2146
+ */
2147
+ readonly GITLAB_CI?: string;
2148
+ /**
2149
+ * The go cd build ID. This value is set by certain CI/CD systems.
2150
+ *
2151
+ * @readonly
2152
+ * @category node
2153
+ */
2154
+ readonly GOCD?: string;
2155
+ /**
2156
+ * The builder output build ID. This value is set by certain CI/CD systems.
2157
+ *
2158
+ * @readonly
2159
+ * @category node
2160
+ */
2161
+ readonly BUILDER_OUTPUT?: string;
2162
+ /**
2163
+ * The harness build ID. This value is set by certain CI/CD systems.
2164
+ *
2165
+ * @readonly
2166
+ * @category node
2167
+ */
2168
+ readonly HARNESS_BUILD_ID?: string;
2169
+ /**
2170
+ * The jenkins url. This value is set by certain CI/CD systems.
2171
+ *
2172
+ * @readonly
2173
+ * @category node
2174
+ */
2175
+ readonly JENKINS_URL?: string;
2176
+ /**
2177
+ * The layerci build ID. This value is set by certain CI/CD systems.
2178
+ *
2179
+ * @readonly
2180
+ * @category node
2181
+ */
2182
+ readonly LAYERCI?: string;
2183
+ /**
2184
+ * The magnum build ID. This value is set by certain CI/CD systems.
2185
+ *
2186
+ * @readonly
2187
+ * @category node
2188
+ */
2189
+ readonly MAGNUM?: string;
2190
+ /**
2191
+ * The netlify build ID. This value is set by certain CI/CD systems.
2192
+ *
2193
+ * @readonly
2194
+ * @category node
2195
+ */
2196
+ readonly NETLIFY?: string;
2197
+ /**
2198
+ * The nevercode build ID. This value is set by certain CI/CD systems.
2199
+ *
2200
+ * @readonly
2201
+ * @category node
2202
+ */
2203
+ readonly NEVERCODE?: string;
2204
+ /**
2205
+ * The prow job ID. This value is set by certain CI/CD systems.
2206
+ *
2207
+ * @readonly
2208
+ * @category node
2209
+ */
2210
+ readonly PROW_JOB_ID?: string;
2211
+ /**
2212
+ * The release build ID. This value is set by certain CI/CD systems.
2213
+ *
2214
+ * @readonly
2215
+ * @category node
2216
+ */
2217
+ readonly RELEASE_BUILD_ID?: string;
2218
+ /**
2219
+ * The render build ID. This value is set by certain CI/CD systems.
2220
+ *
2221
+ * @readonly
2222
+ * @category node
2223
+ */
2224
+ readonly RENDER?: string;
2225
+ /**
2226
+ * The sailci build ID. This value is set by certain CI/CD systems.
2227
+ *
2228
+ * @readonly
2229
+ * @category node
2230
+ */
2231
+ readonly SAILCI?: string;
2232
+ /**
2233
+ * The hudson build ID. This value is set by certain CI/CD systems.
2234
+ *
2235
+ * @readonly
2236
+ * @category node
2237
+ */
2238
+ readonly HUDSON?: string;
2239
+ /**
2240
+ * The screwdriver build ID. This value is set by certain CI/CD systems.
2241
+ *
2242
+ * @readonly
2243
+ * @category node
2244
+ */
2245
+ readonly SCREWDRIVER?: string;
2246
+ /**
2247
+ * The semaphore build ID. This value is set by certain CI/CD systems.
2248
+ *
2249
+ * @readonly
2250
+ * @category node
2251
+ */
2252
+ readonly SEMAPHORE?: string;
2253
+ /**
2254
+ * The sourcehut build ID. This value is set by certain CI/CD systems.
2255
+ *
2256
+ * @readonly
2257
+ * @category node
2258
+ */
2259
+ readonly SOURCEHUT?: string;
2260
+ /**
2261
+ * The spaceship build ID. This value is set by certain CI/CD systems.
2262
+ *
2263
+ * @readonly
2264
+ * @category node
2265
+ */
2266
+ readonly SPACESHIP_CI?: string;
2267
+ /**
2268
+ * The strider build ID. This value is set by certain CI/CD systems.
2269
+ *
2270
+ * @readonly
2271
+ * @category node
2272
+ */
2273
+ readonly STRIDER?: string;
2274
+ /**
2275
+ * The task ID. This value is set by certain CI/CD systems.
2276
+ *
2277
+ * @readonly
2278
+ * @category node
2279
+ */
2280
+ readonly TASK_ID?: string;
2281
+ /**
2282
+ * The teamcity version. This value is set by certain CI/CD systems.
2283
+ *
2284
+ * @readonly
2285
+ * @category node
2286
+ */
2287
+ readonly TEAMCITY_VERSION?: string;
2288
+ /**
2289
+ * The travis build ID. This value is set by certain CI/CD systems.
2290
+ *
2291
+ * @readonly
2292
+ * @category node
2293
+ */
2294
+ readonly TRAVIS?: string;
2295
+ /**
2296
+ * The vela build ID. This value is set by certain CI/CD systems.
2297
+ *
2298
+ * @readonly
2299
+ * @category node
2300
+ */
2301
+ readonly VELA?: string;
2302
+ /**
2303
+ * The now builder build ID. This value is set by certain CI/CD systems.
2304
+ *
2305
+ * @readonly
2306
+ * @category node
2307
+ */
2308
+ readonly NOW_BUILDER?: string;
2309
+ /**
2310
+ * The appcenter build ID. This value is set by certain CI/CD systems.
2311
+ *
2312
+ * @readonly
2313
+ * @category node
2314
+ */
2315
+ readonly APPCENTER_BUILD_ID?: string;
2316
+ /**
2317
+ * The xcode project build ID. This value is set by certain CI/CD systems.
2318
+ *
2319
+ * @readonly
2320
+ * @category node
2321
+ */
2322
+ readonly CI_XCODE_PROJECT?: string;
2323
+ /**
2324
+ * The xcode server build ID. This value is set by certain CI/CD systems.
2325
+ *
2326
+ * @readonly
2327
+ * @category node
2328
+ */
2329
+ readonly XCS?: string;
2330
+ /**
2331
+ * The application's runtime data directory.
2332
+ *
2333
+ * @remarks
2334
+ * This variable is used to override the base path of the system's local application data directory. This variable is used to set the \`$storm.paths.data\` property.
2335
+ *
2336
+ * @title Data Directory
2337
+ * @category node
2338
+ */
2339
+ DATA_DIR?: string;
2340
+ /**
2341
+ * The application's configuration data directory.
2342
+ *
2343
+ * @remarks
2344
+ * This variable is used to override the base path of the system's local application configuration directory. This variable is used to set the \`$storm.paths.config\` property.
2345
+ *
2346
+ * @title Configuration Directory
2347
+ * @category node
2348
+ */
2349
+ CONFIG_DIR?: string;
2350
+ /**
2351
+ * The application's cached data directory.
2352
+ *
2353
+ * @remarks
2354
+ * This variable is used to override the base path of the system's local cache data directory. This variable is used to set the \`$storm.paths.cache\` property.
2355
+ *
2356
+ * @title Cache Directory
2357
+ * @category node
2358
+ */
2359
+ CACHE_DIR?: string;
2360
+ /**
2361
+ * The application's logging directory.
2362
+ *
2363
+ * @remarks
2364
+ * This variable is used to override the base path of the system's local application log directory. This variable is used to set the \`$storm.paths.log\` property.
2365
+ *
2366
+ * @title Log Directory
2367
+ * @category node
2368
+ */
2369
+ LOG_DIR?: string;
2370
+ /**
2371
+ * The application's temporary data directory.
2372
+ *
2373
+ * @remarks
2374
+ * This variable is used to override the base path of the system's local temporary data directory. This variable is used to set the \`$storm.paths.temp\` property.
2375
+ *
2376
+ * @title Temporary Directory
2377
+ * @category node
2378
+ */
2379
+ TEMP_DIR?: string;
2380
+ /**
2381
+ * A variable that specifies the current user's local application data directory on Windows.
2382
+ *
2383
+ * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
2384
+ *
2385
+ * @remarks
2386
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\`, \`$storm.paths.cache\`, and \`$storm.paths.log\` properties.
2387
+ *
2388
+ * @readonly
2389
+ * @category node
2390
+ */
2391
+ readonly LOCALAPPDATA?: string;
2392
+ /**
2393
+ * A variable that specifies the application data directory on Windows.
2394
+ *
2395
+ * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
2396
+ *
2397
+ * @remarks
2398
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
2399
+ *
2400
+ * @readonly
2401
+ * @category node
2402
+ */
2403
+ readonly APPDATA?: string;
2404
+ /**
2405
+ * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.
2406
+ *
2407
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2408
+ *
2409
+ * @remarks
2410
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\` property.
2411
+ *
2412
+ * @readonly
2413
+ * @category node
2414
+ */
2415
+ readonly XDG_DATA_HOME?: string;
2416
+ /**
2417
+ * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.
2418
+ *
2419
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2420
+ *
2421
+ * @remarks
2422
+ * This variable is used to specify a path to configuration data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
2423
+ *
2424
+ * @readonly
2425
+ * @category node
2426
+ */
2427
+ readonly XDG_CONFIG_HOME?: string;
2428
+ /**
2429
+ * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.
2430
+ *
2431
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2432
+ *
2433
+ * @remarks
2434
+ * This variable is used to specify a path to cache data that is specific to the current user. This variable can be used to set the \`$storm.paths.cache\` property.
2435
+ *
2436
+ * @readonly
2437
+ * @category node
2438
+ */
2439
+ readonly XDG_CACHE_HOME?: string;
2440
+ /**
2441
+ * A variable that specifies the state directory on Linux systems using the XDG base directory specification.
2442
+ *
2443
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2444
+ *
2445
+ * @remarks
2446
+ * This variable is used to specify a path to application state data that is specific to the current user. This variable can be used to set the \`$storm.paths.state\` property.
2447
+ *
2448
+ * @readonly
2449
+ * @category node
2450
+ */
2451
+ readonly XDG_STATE_HOME?: string;
2452
+ /**
2453
+ * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.
2454
+ *
2455
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
2456
+ *
2457
+ * @remarks
2458
+ * This variable is used to specify a path to runtime data that is specific to the current user. This variable can be used to set the \`$storm.paths.temp\` property.
2459
+ *
2460
+ * @readonly
2461
+ * @category node
2462
+ */
2463
+ readonly XDG_RUNTIME_DIR?: string;
2464
+ /**
2465
+ * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.
2466
+ *
2467
+ * @see https://devenv.sh/files-and-variables/#devenv_dotfile
2468
+ * @see https://nixos.org/
2469
+ *
2470
+ * @remarks
2471
+ * This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \`$storm.paths.temp\` property.
2472
+ *
2473
+ * @category node
2474
+ */
2475
+ DEVENV_RUNTIME?: string;
2476
+ }
2477
+ /**
2478
+ * The base secrets configuration used by Powerlines applications
2479
+ *
2480
+ * @remarks
2481
+ * This interface is used to define the secret configuration options used by Powerlines applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`storm docs\` command. Since these are secrets, no default values should be provided and the values should be kept confidential (excluded from the client).
2482
+ */
2483
+ interface SecretsInterface {
2484
+ /**
2485
+ * The secret key used for encryption and decryption.
2486
+ *
2487
+ * @remarks
2488
+ * This variable is used to provide a secret key for encryption and decryption of sensitive data. It is important that this value is kept confidential and not exposed in client-side code or public repositories.
2489
+ *
2490
+ * @title Encryption Key
2491
+ */
2492
+ ENCRYPTION_KEY: string;
2493
+ }
2494
+ declare type __ΩEnvInterface = any[];
2495
+ declare type __ΩSecretsInterface = any[];
2496
+ //#endregion
2497
+ export { BabelResolvedConfig as a, UserConfig as c, UnresolvedContext as d, __ΩSecretsInterface as i, Context as l, SecretsInterface as n, ResolvedConfig as o, __ΩEnvInterface as r, BabelUserConfig as s, EnvInterface as t, PluginContext as u };