@powerlines/plugin-react 0.1.58 → 0.1.59

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