@powerlines/plugin-env 0.14.4 → 0.14.6

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