@powerlines/plugin-react 0.1.46 → 0.1.48

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 (45) hide show
  1. package/dist/components/index.cjs +1 -1
  2. package/dist/components/index.mjs +1 -0
  3. package/dist/components/react-optimized.cjs +1 -8
  4. package/dist/components/react-optimized.mjs +1 -0
  5. package/dist/components-ipRi4DSE.mjs +1 -0
  6. package/dist/index.cjs +67 -8
  7. package/dist/index.mjs +64 -0
  8. package/dist/plugin-Gb47Xzf6.mjs +1 -0
  9. package/dist/react-optimized-9J3fdCI2.mjs +1 -0
  10. package/dist/react-optimized-BO9knQDM.cjs +1 -0
  11. package/dist/runtime-BbUj49s9.mjs +1 -0
  12. package/dist/runtime-Bp9G0scd.cjs +0 -0
  13. package/dist/types/index.cjs +1 -1
  14. package/dist/types/index.mjs +1 -0
  15. package/dist/types/plugin.cjs +1 -1
  16. package/dist/types/plugin.mjs +1 -0
  17. package/dist/types/runtime.cjs +1 -1
  18. package/dist/types/runtime.mjs +1 -0
  19. package/dist/types-CwXe_Ycf.mjs +1 -0
  20. package/dist/types-a8gm_IaQ.cjs +0 -0
  21. package/package.json +46 -35
  22. package/dist/chunk-FBBMZ4NC.cjs +0 -7
  23. package/dist/chunk-UCUR73HG.js +0 -7
  24. package/dist/components/index.d.cts +0 -6
  25. package/dist/components/index.d.ts +0 -6
  26. package/dist/components/index.js +0 -1
  27. package/dist/components/react-optimized.d.cts +0 -95
  28. package/dist/components/react-optimized.d.ts +0 -95
  29. package/dist/components/react-optimized.js +0 -8
  30. package/dist/fs-ECFlqnPg.d.cts +0 -378
  31. package/dist/fs-ECFlqnPg.d.ts +0 -378
  32. package/dist/index.d.cts +0 -62
  33. package/dist/index.d.ts +0 -62
  34. package/dist/index.js +0 -8
  35. package/dist/runtime-4U11u3by.d.ts +0 -1938
  36. package/dist/runtime-BW91guC1.d.cts +0 -1938
  37. package/dist/types/index.d.cts +0 -29
  38. package/dist/types/index.d.ts +0 -29
  39. package/dist/types/index.js +0 -1
  40. package/dist/types/plugin.d.cts +0 -1793
  41. package/dist/types/plugin.d.ts +0 -1793
  42. package/dist/types/runtime.d.cts +0 -35
  43. package/dist/types/runtime.d.ts +0 -35
  44. /package/dist/{types/plugin.js → components-BWLXb7a2.cjs} +0 -0
  45. /package/dist/{types/runtime.js → plugin-pBKbb5K9.cjs} +0 -0
@@ -1,1938 +0,0 @@
1
- import { EnvPaths } from '@stryke/env/get-env-paths';
2
- import { NonUndefined, MaybePromise, FunctionLike } from '@stryke/types/base';
3
- import { PackageJson } from '@stryke/types/package-json';
4
- import { Jiti } from 'jiti';
5
- import { SourceMap } from 'magic-string';
6
- import { Range } from 'semver';
7
- import { Project } from 'ts-morph';
8
- import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
9
- import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
10
- import { Format } from '@storm-software/build-tools/types';
11
- import { LogLevelLabel } from '@storm-software/config-tools/types';
12
- import { StormWorkspaceConfig } from '@storm-software/config/types';
13
- import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
14
- import { AssetGlob } from '@stryke/types/file';
15
- import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
16
- import { BabelAPI } from '@babel/helper-plugin-utils';
17
- import { S as StoragePort, a as StoragePreset, V as VirtualFileSystemInterface, R as ResolveOptions, b as VirtualFile } from './fs-ECFlqnPg.cjs';
18
- import { ArrayValues } from '@stryke/types/array';
19
- import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
20
- import ts from 'typescript';
21
-
22
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
23
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
24
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
25
- name: string;
26
- log: LogFn;
27
- api: BabelAPI;
28
- options: TOptions;
29
- context: TContext;
30
- dirname: string;
31
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
32
- $$name: string;
33
- };
34
- 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] | [
35
- BabelTransformPlugin<TContext, TOptions, TState>,
36
- TOptions,
37
- BabelTransformPluginFilter
38
- ];
39
-
40
- type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
41
- interface BuildConfig {
42
- /**
43
- * The platform to build the project for
44
- *
45
- * @defaultValue "neutral"
46
- */
47
- platform?: "node" | "browser" | "neutral";
48
- /**
49
- * Array of strings indicating the polyfills to include for the build.
50
- *
51
- * @remarks
52
- * 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).
53
- *
54
- * @example
55
- * ```ts
56
- * {
57
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
58
- * }
59
- * ```
60
- */
61
- polyfill?: string[];
62
- /**
63
- * 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.
64
- *
65
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
66
- */
67
- mainFields?: string[];
68
- /**
69
- * Array of strings indicating what conditions should be used for module resolution.
70
- */
71
- conditions?: string[];
72
- /**
73
- * Array of strings indicating what file extensions should be used for module resolution.
74
- *
75
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
76
- */
77
- extensions?: string[];
78
- /**
79
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
80
- *
81
- * @remarks
82
- * 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.
83
- */
84
- dedupe?: string[];
85
- /**
86
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
87
- */
88
- builtins?: (string | RegExp)[];
89
- /**
90
- * Define global variable replacements.
91
- *
92
- * @remarks
93
- * 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.
94
- *
95
- * @example
96
- * ```ts
97
- * {
98
- * define: {
99
- * __VERSION__: '"1.0.0"',
100
- * __DEV__: 'process.env.NODE_ENV !== "production"'
101
- * }
102
- * }
103
- * ```
104
- *
105
- * @see https://esbuild.github.io/api/#define
106
- * @see https://vitejs.dev/config/build-options.html#define
107
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
108
- */
109
- define?: Record<string, any>;
110
- /**
111
- * Global variables that will have import statements injected where necessary
112
- *
113
- * @remarks
114
- * 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.
115
- *
116
- * @example
117
- * ```ts
118
- * {
119
- * inject: {
120
- * process: 'process/browser',
121
- * Buffer: ['buffer', 'Buffer'],
122
- * }
123
- * }
124
- * ```
125
- *
126
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
127
- */
128
- inject?: Record<string, string | string[]>;
129
- /**
130
- * The alias mappings to use for module resolution during the build process.
131
- *
132
- * @remarks
133
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
134
- *
135
- * @example
136
- * ```ts
137
- * {
138
- * alias: {
139
- * "@utils": "./src/utils",
140
- * "@components": "./src/components"
141
- * }
142
- * }
143
- * ```
144
- *
145
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
146
- */
147
- alias?: Record<string, string> | Array<{
148
- find: string | RegExp;
149
- replacement: string;
150
- }>;
151
- /**
152
- * A list of modules that should not be bundled, even if they are external dependencies.
153
- *
154
- * @remarks
155
- * 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.
156
- */
157
- external?: (string | RegExp)[];
158
- /**
159
- * A list of modules that should always be bundled, even if they are external dependencies.
160
- */
161
- noExternal?: (string | RegExp)[];
162
- /**
163
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
164
- */
165
- skipNodeModulesBundle?: boolean;
166
- /**
167
- * An optional set of override options to apply to the selected build variant.
168
- *
169
- * @remarks
170
- * 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.
171
- */
172
- override?: Record<string, any>;
173
- }
174
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
175
-
176
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
177
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
178
-
179
- interface ResolvedEntryTypeDefinition extends TypeDefinition {
180
- /**
181
- * The user provided entry point in the source code
182
- */
183
- input: TypeDefinition;
184
- /**
185
- * An optional name to use in the package export during the build process
186
- */
187
- output?: string;
188
- }
189
- type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
190
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
191
- /**
192
- * The name of the environment
193
- */
194
- name: string;
195
- /**
196
- * Configuration options for the preview server
197
- */
198
- preview?: ResolvedPreviewOptions;
199
- };
200
- type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
201
- type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
202
- assets: ResolvedAssetGlob[];
203
- }> & Pick<OutputConfig, "storage">;
204
- /**
205
- * The resolved options for the Powerlines project configuration.
206
- */
207
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
208
- /**
209
- * The configuration options that were provided inline to the Powerlines CLI.
210
- */
211
- inlineConfig: InlineConfig<TUserConfig>;
212
- /**
213
- * The original configuration options that were provided by the user to the Powerlines process.
214
- */
215
- userConfig: TUserConfig;
216
- /**
217
- * A string identifier for the Powerlines command being executed.
218
- */
219
- command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
220
- /**
221
- * The root directory of the project's source code
222
- *
223
- * @defaultValue "\{projectRoot\}/src"
224
- */
225
- sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
226
- /**
227
- * The root directory of the project.
228
- */
229
- projectRoot: NonUndefined<TUserConfig["root"]>;
230
- /**
231
- * The type of project being built.
232
- */
233
- projectType: NonUndefined<TUserConfig["type"]>;
234
- /**
235
- * The output configuration options to use for the build process
236
- */
237
- output: OutputResolvedConfig;
238
- /**
239
- * Configuration provided to build processes
240
- *
241
- * @remarks
242
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
243
- */
244
- build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
245
- /**
246
- * The log level to use for the Powerlines processes.
247
- *
248
- * @defaultValue "info"
249
- */
250
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
251
- };
252
-
253
- interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
254
- /**
255
- * The order in which the plugin should be applied.
256
- */
257
- order?: "pre" | "post" | null | undefined;
258
- /**
259
- * A filter to determine when the hook should be called.
260
- */
261
- filter?: Pick<HookFilter, TFilter>;
262
- /**
263
- * The hook function to be called.
264
- */
265
- handler: THookFunction;
266
- }
267
- type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> = THookFunction | PluginHookObject<THookFunction, TFilter>;
268
- /**
269
- * A result returned by the plugin from the `generateTypes` hook that describes the declaration types output file.
270
- */
271
- interface GenerateTypesResult {
272
- directives?: string[];
273
- code: string;
274
- }
275
- type DeepPartial<T> = {
276
- [K in keyof T]?: DeepPartial<T[K]>;
277
- };
278
- type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
279
- interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
280
- /**
281
- * A function that returns configuration options to be merged with the build context's options.
282
- *
283
- * @remarks
284
- * 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.
285
- *
286
- * @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.
287
- *
288
- * @see https://vitejs.dev/guide/api-plugin#config
289
- *
290
- * @param this - The build context.
291
- * @param config - The partial configuration object to be modified.
292
- * @returns A promise that resolves to a partial configuration object.
293
- */
294
- config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
295
- /**
296
- * 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.
297
- *
298
- * @remarks
299
- * 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.
300
- *
301
- * @see https://vitejs.dev/guide/api-plugin#configenvironment
302
- *
303
- * @param this - The build context.
304
- * @param name - The name of the environment being configured.
305
- * @param environment - The Vite-like environment object containing information about the current build environment.
306
- * @returns A promise that resolves when the hook is complete.
307
- */
308
- configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
309
- /**
310
- * A hook that is called when the plugin is resolved.
311
- *
312
- * @see https://vitejs.dev/guide/api-plugin#configresolved
313
- *
314
- * @param this - The build context.
315
- * @returns A promise that resolves when the hook is complete.
316
- */
317
- configResolved: (this: TContext) => MaybePromise<void>;
318
- /**
319
- * 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.
320
- *
321
- * @param this - The build context.
322
- * @param code - The source code to generate types for.
323
- * @returns A promise that resolves when the hook is complete.
324
- */
325
- generateTypes: (this: TContext, code: string) => MaybePromise<GenerateTypesResult | string | undefined | null>;
326
- /**
327
- * A hook that is called at the start of the build process.
328
- *
329
- * @param this - The build context and unplugin build context.
330
- * @returns A promise that resolves when the hook is complete.
331
- */
332
- buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
333
- /**
334
- * A hook that is called at the end of the build process.
335
- *
336
- * @param this - The build context and unplugin build context.
337
- * @returns A promise that resolves when the hook is complete.
338
- */
339
- buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
340
- /**
341
- * A hook that is called to transform the source code.
342
- *
343
- * @param this - The build context, unplugin build context, and unplugin context.
344
- * @param code - The source code to transform.
345
- * @param id - The identifier of the source code.
346
- * @returns A promise that resolves when the hook is complete.
347
- */
348
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>;
349
- /**
350
- * A hook that is called to load the source code.
351
- *
352
- * @param this - The build context, unplugin build context, and unplugin context.
353
- * @param id - The identifier of the source code.
354
- * @returns A promise that resolves when the hook is complete.
355
- */
356
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>;
357
- /**
358
- * A hook that is called to resolve the identifier of the source code.
359
- *
360
- * @param this - The build context, unplugin build context, and unplugin context.
361
- * @param id - The identifier of the source code.
362
- * @param importer - The importer of the source code.
363
- * @param options - The options for resolving the identifier.
364
- * @returns A promise that resolves when the hook is complete.
365
- */
366
- resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
367
- isEntry: boolean;
368
- }) => MaybePromise<string | ExternalIdResult | null | undefined>;
369
- /**
370
- * A hook that is called to write the bundle to disk.
371
- *
372
- * @param this - The build context.
373
- * @returns A promise that resolves when the hook is complete.
374
- */
375
- writeBundle: (this: TContext) => MaybePromise<void>;
376
- }
377
- type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant] = Required<UnpluginOptions>[TBuildVariant]> = {
378
- [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];
379
- };
380
- type PluginHooks<TContext extends PluginContext = PluginContext> = {
381
- [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]>;
382
- } & {
383
- /**
384
- * A function that returns configuration options to be merged with the build context's options.
385
- *
386
- * @remarks
387
- * 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.
388
- *
389
- * @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.
390
- *
391
- * @see https://vitejs.dev/guide/api-plugin#config
392
- *
393
- * @param this - The build context.
394
- * @param config - The partial configuration object to be modified.
395
- * @returns A promise that resolves to a partial configuration object.
396
- */
397
- config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
398
- /**
399
- * A hook that is called to transform the source code.
400
- *
401
- * @param this - The build context, unplugin build context, and unplugin context.
402
- * @param code - The source code to transform.
403
- * @param id - The identifier of the source code.
404
- * @returns A promise that resolves when the hook is complete.
405
- */
406
- transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult$1>, "code" | "id">;
407
- /**
408
- * A hook that is called to load the source code.
409
- *
410
- * @param this - The build context, unplugin build context, and unplugin context.
411
- * @param id - The identifier of the source code.
412
- * @returns A promise that resolves when the hook is complete.
413
- */
414
- load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult$1>, "id">;
415
- /**
416
- * A hook that is called to resolve the identifier of the source code.
417
- *
418
- * @param this - The build context, unplugin build context, and unplugin context.
419
- * @param id - The identifier of the source code.
420
- * @param importer - The importer of the source code.
421
- * @param options - The options for resolving the identifier.
422
- * @returns A promise that resolves when the hook is complete.
423
- */
424
- resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
425
- isEntry: boolean;
426
- }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
427
- };
428
- type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
429
- [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
430
- };
431
- interface Plugin<in out TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
432
- /**
433
- * The name of the plugin, for use in deduplication, error messages and logs.
434
- */
435
- name: string;
436
- /**
437
- * An API object that can be used for inter-plugin communication.
438
- *
439
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
440
- */
441
- api?: Record<string, any>;
442
- /**
443
- * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
444
- *
445
- * @remarks
446
- * The Plugin invocation order is as follows:
447
- * - `enforce: 'pre'` plugins
448
- * - `order: 'pre'` plugin hooks
449
- * - any other plugins (normal)
450
- * - `order: 'post'` plugin hooks
451
- * - `enforce: 'post'` plugins
452
- *
453
- * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
454
- * @see https://rollupjs.org/plugin-development/#build-hooks
455
- * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
456
- * @see https://esbuild.github.io/plugins/#concepts
457
- */
458
- enforce?: "pre" | "post";
459
- /**
460
- * A function to determine if two plugins are the same and can be de-duplicated.
461
- *
462
- * @remarks
463
- * If this is not provided, plugins are de-duplicated by comparing their names.
464
- *
465
- * @param other - The other plugin to compare against.
466
- * @returns `true` if the two plugins are the same, `false` otherwise.
467
- */
468
- dedupe?: false | ((other: Plugin<any>) => boolean);
469
- /**
470
- * A list of pre-requisite plugins that must be loaded before this plugin can be used.
471
- */
472
- dependsOn?: PluginConfig<any>[];
473
- /**
474
- * Define environments where this plugin should be active. By default, the plugin is active in all environments.
475
- *
476
- * @param environment - The environment to check.
477
- * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
478
- */
479
- applyToEnvironment?: (environment: EnvironmentResolvedConfig) => MaybePromise<boolean | Plugin<TContext>>;
480
- }
481
-
482
- type ReflectionMode = "default" | "explicit" | "never";
483
- type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
484
- /**
485
- * Defines the level of reflection to be used during the transpilation process.
486
- *
487
- * @remarks
488
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
489
- * - `minimal` - Only the essential type information is captured.
490
- * - `normal` - Additional type information is captured, including some contextual data.
491
- * - `verbose` - All available type information is captured, including detailed contextual data.
492
- */
493
- type ReflectionLevel = "minimal" | "normal" | "verbose";
494
- interface DeepkitOptions {
495
- /**
496
- * Either true to activate reflection for all files compiled using this tsconfig,
497
- * or a list of globs/file paths relative to this tsconfig.json.
498
- * Globs/file paths can be prefixed with a ! to exclude them.
499
- */
500
- reflection?: RawReflectionMode;
501
- /**
502
- * Defines the level of reflection to be used during the transpilation process.
503
- *
504
- * @remarks
505
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
506
- * - `minimal` - Only the essential type information is captured.
507
- * - `normal` - Additional type information is captured, including some contextual data.
508
- * - `verbose` - All available type information is captured, including detailed contextual data.
509
- */
510
- reflectionLevel?: ReflectionLevel;
511
- }
512
- type TSCompilerOptions = CompilerOptions & DeepkitOptions;
513
- /**
514
- * The TypeScript compiler configuration.
515
- *
516
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
517
- */
518
- interface TSConfig extends Omit<TsConfigJson, "reflection"> {
519
- /**
520
- * Either true to activate reflection for all files compiled using this tsconfig,
521
- * or a list of globs/file paths relative to this tsconfig.json.
522
- * Globs/file paths can be prefixed with a ! to exclude them.
523
- */
524
- reflection?: RawReflectionMode;
525
- /**
526
- * Defines the level of reflection to be used during the transpilation process.
527
- *
528
- * @remarks
529
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
530
- * - `minimal` - Only the essential type information is captured.
531
- * - `normal` - Additional type information is captured, including some contextual data.
532
- * - `verbose` - All available type information is captured, including detailed contextual data.
533
- */
534
- reflectionLevel?: ReflectionLevel;
535
- /**
536
- * Instructs the TypeScript compiler how to compile `.ts` files.
537
- */
538
- compilerOptions?: TSCompilerOptions;
539
- }
540
- type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
541
- originalTsconfigJson: TsConfigJson;
542
- tsconfigJson: TSConfig;
543
- tsconfigFilePath: string;
544
- };
545
-
546
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
547
- /**
548
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
549
- */
550
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
551
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
552
- /**
553
- * A configuration tuple for a Powerlines plugin.
554
- */
555
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
556
- /**
557
- * A configuration object for a Powerlines plugin.
558
- */
559
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
560
- plugin: string | PluginFactory<TContext, TOptions>;
561
- options: TOptions;
562
- } | {
563
- plugin: Plugin<TContext>;
564
- options?: never;
565
- };
566
- /**
567
- * A configuration tuple for a Powerlines plugin.
568
- */
569
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
570
- type ProjectType = "application" | "library";
571
- type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
572
- /**
573
- * The Babel plugins to be used during the build process
574
- */
575
- plugins?: BabelTransformPluginOptions[];
576
- /**
577
- * The Babel presets to be used during the build process
578
- */
579
- presets?: BabelTransformPluginOptions[];
580
- };
581
- interface OutputConfig {
582
- /**
583
- * The path to output the final compiled files to
584
- *
585
- * @remarks
586
- * If a value is not provided, Powerlines will attempt to:
587
- * 1. Use the `outDir` value in the `tsconfig.json` file.
588
- * 2. Use the `dist` directory in the project root directory.
589
- *
590
- * @defaultValue "dist/\{projectRoot\}"
591
- */
592
- outputPath?: string;
593
- /**
594
- * The output directory path for the project build.
595
- *
596
- * @remarks
597
- * 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.
598
- *
599
- * @defaultValue "\{projectRoot\}/dist"
600
- */
601
- buildPath?: string;
602
- /**
603
- * The folder where the generated runtime artifacts will be located
604
- *
605
- * @remarks
606
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
607
- *
608
- * @defaultValue "\{projectRoot\}/.powerlines"
609
- */
610
- artifactsPath?: string;
611
- /**
612
- * The path of the generated runtime declaration file relative to the workspace root.
613
- *
614
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
615
- */
616
- dts?: string | false;
617
- /**
618
- * A prefix to use for identifying builtin modules
619
- *
620
- * @remarks
621
- * 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"`.
622
- *
623
- * @defaultValue "powerlines"
624
- */
625
- builtinPrefix?: string;
626
- /**
627
- * The module format of the output files
628
- *
629
- * @remarks
630
- * 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.
631
- *
632
- * @defaultValue "esm"
633
- */
634
- format?: Format | Format[];
635
- /**
636
- * A list of assets to copy to the output directory
637
- *
638
- * @remarks
639
- * 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.
640
- */
641
- assets?: Array<string | AssetGlob>;
642
- /**
643
- * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
644
- *
645
- * @remarks
646
- * If a string preset is provided, it must be one of the following values:
647
- * - `"virtual"`: Uses the local file system for storage.
648
- * - `"fs"`: Uses an in-memory virtual file system for storage.
649
- *
650
- * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
651
- *
652
- * @defaultValue "virtual"
653
- */
654
- storage?: StoragePort | StoragePreset;
655
- }
656
- interface BaseConfig {
657
- /**
658
- * The entry point(s) for the application
659
- */
660
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
661
- /**
662
- * Configuration for the output of the build process
663
- */
664
- output?: OutputConfig;
665
- /**
666
- * Configuration for linting the source code
667
- *
668
- * @remarks
669
- * If set to `false`, linting will be disabled.
670
- */
671
- lint?: Record<string, any> | false;
672
- /**
673
- * Configuration for testing the source code
674
- *
675
- * @remarks
676
- * If set to `false`, testing will be disabled.
677
- */
678
- test?: Record<string, any> | false;
679
- /**
680
- * Configuration for the transformation of the source code
681
- */
682
- transform?: Record<string, any>;
683
- /**
684
- * Configuration provided to build processes
685
- *
686
- * @remarks
687
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
688
- */
689
- build?: BuildConfig;
690
- /**
691
- * Configuration for documentation generation
692
- *
693
- * @remarks
694
- * This configuration will be used by the documentation generation plugins during the `docs` command.
695
- */
696
- docs?: Record<string, any>;
697
- /**
698
- * Configuration for deploying the source code
699
- *
700
- * @remarks
701
- * If set to `false`, the deployment will be disabled.
702
- */
703
- deploy?: Record<string, any> | false;
704
- /**
705
- * The path to the tsconfig file to be used by the compiler
706
- *
707
- * @remarks
708
- * 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).
709
- *
710
- * @defaultValue "\{projectRoot\}/tsconfig.json"
711
- */
712
- tsconfig?: string;
713
- /**
714
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
715
- *
716
- * @see https://www.typescriptlang.org/tsconfig
717
- *
718
- * @remarks
719
- * If populated, this option takes higher priority than `tsconfig`
720
- */
721
- tsconfigRaw?: TSConfig;
722
- }
723
- interface EnvironmentConfig extends BaseConfig {
724
- /**
725
- * Configuration options for the preview server
726
- */
727
- preview?: PreviewOptions;
728
- /**
729
- * A flag indicating whether the build is for a Server-Side Rendering environment.
730
- */
731
- ssr?: boolean;
732
- /**
733
- * Define if this environment is used for Server-Side Rendering
734
- *
735
- * @defaultValue "server" (if it isn't the client environment)
736
- */
737
- consumer?: "client" | "server";
738
- }
739
- interface CommonUserConfig extends BaseConfig {
740
- /**
741
- * The name of the project
742
- */
743
- name?: string;
744
- /**
745
- * The project display title
746
- *
747
- * @remarks
748
- * This option is used in documentation generation and other places where a human-readable title is needed.
749
- */
750
- title?: string;
751
- /**
752
- * A description of the project
753
- *
754
- * @remarks
755
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
756
- */
757
- description?: string;
758
- /**
759
- * The log level to use for the Powerlines processes.
760
- *
761
- * @defaultValue "info"
762
- */
763
- logLevel?: LogLevelLabel | null;
764
- /**
765
- * A custom logger function to use for logging messages
766
- */
767
- customLogger?: LogFn;
768
- /**
769
- * 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.
770
- *
771
- * @defaultValue "production"
772
- */
773
- mode?: "development" | "test" | "production";
774
- /**
775
- * The type of project being built
776
- *
777
- * @defaultValue "application"
778
- */
779
- type?: ProjectType;
780
- /**
781
- * The root directory of the project
782
- */
783
- root: string;
784
- /**
785
- * The root directory of the project's source code
786
- *
787
- * @defaultValue "\{root\}/src"
788
- */
789
- sourceRoot?: string;
790
- /**
791
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
792
- *
793
- * @remarks
794
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
795
- */
796
- configFile?: string;
797
- /**
798
- * Should the Powerlines CLI processes skip installing missing packages?
799
- *
800
- * @remarks
801
- * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
802
- *
803
- * @defaultValue false
804
- */
805
- skipInstalls?: boolean;
806
- /**
807
- * Should the compiler processes skip any improvements that make use of cache?
808
- *
809
- * @defaultValue false
810
- */
811
- skipCache?: boolean;
812
- /**
813
- * A list of resolvable paths to plugins used during the build process
814
- */
815
- plugins?: PluginConfig<PluginContext<any>>[];
816
- /**
817
- * Environment-specific configurations
818
- */
819
- environments?: Record<string, EnvironmentConfig>;
820
- /**
821
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
822
- *
823
- * @remarks
824
- * 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.
825
- *
826
- * @defaultValue "powerlines"
827
- */
828
- framework?: string;
829
- }
830
- type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
831
- /**
832
- * Configuration provided to build processes
833
- *
834
- * @remarks
835
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
836
- */
837
- build: Omit<TBuildConfig, "override"> & {
838
- /**
839
- * The build variant being used by the Powerlines engine.
840
- */
841
- variant?: TBuildVariant;
842
- /**
843
- * An optional set of override options to apply to the selected build variant.
844
- *
845
- * @remarks
846
- * 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.
847
- */
848
- override?: Partial<TBuildResolvedConfig>;
849
- };
850
- };
851
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
852
- /**
853
- * The configuration provided while executing Powerlines commands.
854
- */
855
- type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
856
- /**
857
- * A string identifier for the Powerlines command being executed
858
- */
859
- command: PowerlinesCommand;
860
- };
861
-
862
- /**
863
- * The severity level of a {@link LogRecord}.
864
- */
865
- type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
866
- declare const LogLevel: {
867
- DEBUG: LogLevel;
868
- INFO: LogLevel;
869
- WARNING: LogLevel;
870
- ERROR: LogLevel;
871
- FATAL: LogLevel;
872
- };
873
- interface MetaInfo {
874
- /**
875
- * The checksum generated from the resolved options
876
- */
877
- checksum: string;
878
- /**
879
- * The build id
880
- */
881
- buildId: string;
882
- /**
883
- * The release id
884
- */
885
- releaseId: string;
886
- /**
887
- * The build timestamp
888
- */
889
- timestamp: number;
890
- /**
891
- * A hash that represents the path to the project root directory
892
- */
893
- projectRootHash: string;
894
- /**
895
- * A hash that represents the path to the project root directory
896
- */
897
- configHash: string;
898
- }
899
- interface Resolver extends Jiti {
900
- plugin: Jiti;
901
- }
902
- interface TransformResult {
903
- code: string;
904
- map: SourceMap | null;
905
- }
906
- interface InitContextOptions {
907
- /**
908
- * If false, the plugin will be loaded after all other plugins.
909
- *
910
- * @defaultValue true
911
- */
912
- isHighPriority: boolean;
913
- }
914
- /**
915
- * The unresolved Powerlines context.
916
- *
917
- * @remarks
918
- * This context is used before the user configuration has been fully resolved after the `config`.
919
- */
920
- interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
921
- /**
922
- * The Storm workspace configuration
923
- */
924
- workspaceConfig: WorkspaceConfig;
925
- /**
926
- * An object containing the options provided to Powerlines
927
- */
928
- config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
929
- projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
930
- output: TResolvedConfig["output"];
931
- };
932
- /**
933
- * A logging function for the Powerlines engine
934
- */
935
- log: LogFn;
936
- /**
937
- * A logging function for fatal messages
938
- */
939
- fatal: (message: string | UnpluginMessage) => void;
940
- /**
941
- * A logging function for error messages
942
- */
943
- error: (message: string | UnpluginMessage) => void;
944
- /**
945
- * A logging function for warning messages
946
- */
947
- warn: (message: string | UnpluginMessage) => void;
948
- /**
949
- * A logging function for informational messages
950
- */
951
- info: (message: string | UnpluginMessage) => void;
952
- /**
953
- * A logging function for debug messages
954
- */
955
- debug: (message: string | UnpluginMessage) => void;
956
- /**
957
- * A logging function for trace messages
958
- */
959
- trace: (message: string | UnpluginMessage) => void;
960
- /**
961
- * The metadata information
962
- */
963
- meta: MetaInfo;
964
- /**
965
- * The metadata information currently written to disk
966
- */
967
- persistedMeta?: MetaInfo;
968
- /**
969
- * The Powerlines artifacts directory
970
- */
971
- artifactsPath: string;
972
- /**
973
- * The path to the Powerlines builtin runtime modules directory
974
- */
975
- builtinsPath: string;
976
- /**
977
- * The path to the Powerlines entry modules directory
978
- */
979
- entryPath: string;
980
- /**
981
- * The path to the Powerlines TypeScript declaration files directory
982
- */
983
- dtsPath: string;
984
- /**
985
- * The path to a directory where the reflection data buffers (used by the build processes) are stored
986
- */
987
- dataPath: string;
988
- /**
989
- * The path to a directory where the project cache (used by the build processes) is stored
990
- */
991
- cachePath: string;
992
- /**
993
- * The Powerlines environment paths
994
- */
995
- envPaths: EnvPaths;
996
- /**
997
- * The file system path to the Powerlines package installation
998
- */
999
- powerlinesPath: string;
1000
- /**
1001
- * The relative path to the Powerlines workspace root directory
1002
- */
1003
- relativeToWorkspaceRoot: string;
1004
- /**
1005
- * The project's `package.json` file content
1006
- */
1007
- packageJson: PackageJson & Record<string, any>;
1008
- /**
1009
- * The project's `project.json` file content
1010
- */
1011
- projectJson?: Record<string, any>;
1012
- /**
1013
- * The dependency installations required by the project
1014
- */
1015
- dependencies: Record<string, string | Range>;
1016
- /**
1017
- * The development dependency installations required by the project
1018
- */
1019
- devDependencies: Record<string, string | Range>;
1020
- /**
1021
- * The parsed TypeScript configuration from the `tsconfig.json` file
1022
- */
1023
- tsconfig: ParsedTypeScriptConfig;
1024
- /**
1025
- * The entry points of the source code
1026
- */
1027
- entry: ResolvedEntryTypeDefinition[];
1028
- /**
1029
- * The virtual file system manager used during the build process to reference generated runtime files
1030
- */
1031
- fs: VirtualFileSystemInterface;
1032
- /**
1033
- * The Jiti module resolver
1034
- */
1035
- resolver: Resolver;
1036
- /**
1037
- * The builtin module id that exist in the Powerlines virtual file system
1038
- */
1039
- builtins: string[];
1040
- /**
1041
- * The {@link Project} instance used for type reflection and module manipulation
1042
- *
1043
- * @see https://ts-morph.com/
1044
- *
1045
- * @remarks
1046
- * This instance is created lazily on first access.
1047
- */
1048
- program: Project;
1049
- /**
1050
- * A helper function to resolve modules using the Jiti resolver
1051
- *
1052
- * @remarks
1053
- * This function can be used to resolve modules relative to the project root directory.
1054
- *
1055
- * @example
1056
- * ```ts
1057
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1058
- * ```
1059
- *
1060
- * @param id - The module to resolve.
1061
- * @param importer - An optional path to the importer module.
1062
- * @param options - Additional resolution options.
1063
- * @returns A promise that resolves to the resolved module path.
1064
- */
1065
- resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1066
- /**
1067
- * A helper function to load modules using the Jiti resolver
1068
- *
1069
- * @remarks
1070
- * This function can be used to load modules relative to the project root directory.
1071
- *
1072
- * @example
1073
- * ```ts
1074
- * const module = await context.load("some-module", "/path/to/importer");
1075
- * ```
1076
- *
1077
- * @param id - The module to load.
1078
- * @returns A promise that resolves to the loaded module.
1079
- */
1080
- load: (id: string) => Promise<TransformResult | undefined>;
1081
- /**
1082
- * The Powerlines builtin virtual files
1083
- */
1084
- getBuiltins: () => Promise<VirtualFile[]>;
1085
- /**
1086
- * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1087
- *
1088
- * @param code - The source code of the builtin file
1089
- * @param id - The unique identifier of the builtin file
1090
- * @param path - An optional path to write the builtin file to
1091
- */
1092
- emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
1093
- /**
1094
- * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1095
- *
1096
- * @param code - The source code of the entry file
1097
- * @param path - An optional path to write the entry file to
1098
- */
1099
- emitEntry: (code: string, path: string) => Promise<void>;
1100
- /**
1101
- * A function to update the context fields using a new user configuration options
1102
- */
1103
- withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
1104
- /**
1105
- * A function to update the context fields using inline configuration options
1106
- */
1107
- withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1108
- /**
1109
- * Create a new logger instance
1110
- *
1111
- * @param name - The name to use for the logger instance
1112
- * @returns A logger function
1113
- */
1114
- createLog: (name: string | null) => LogFn;
1115
- /**
1116
- * Extend the current logger instance with a new name
1117
- *
1118
- * @param name - The name to use for the extended logger instance
1119
- * @returns A logger function
1120
- */
1121
- extendLog: (name: string) => LogFn;
1122
- /**
1123
- * Generates a checksum representing the current context state
1124
- *
1125
- * @returns A promise that resolves to a string representing the checksum
1126
- */
1127
- generateChecksum: () => Promise<string>;
1128
- }
1129
- type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1130
- /**
1131
- * The fully resolved Powerlines configuration
1132
- */
1133
- config: TResolvedConfig;
1134
- };
1135
- interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1136
- /**
1137
- * The environment specific resolved configuration
1138
- */
1139
- environment: EnvironmentResolvedConfig;
1140
- /**
1141
- * An alternative property name for the {@link log} property
1142
- *
1143
- * @remarks
1144
- * This is provided for compatibility with other logging libraries that expect a `logger` property.
1145
- */
1146
- logger: LogFn;
1147
- }
1148
- type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1149
-
1150
- /**
1151
- * The base environment configuration used by Powerlines applications
1152
- *
1153
- * @remarks
1154
- * 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.
1155
- *
1156
- * @categoryDescription Platform
1157
- * The name of the platform the configuration parameter is intended for use in.
1158
- *
1159
- * @showCategories
1160
- */
1161
- interface EnvInterface {
1162
- /**
1163
- * The name of the application.
1164
- *
1165
- * @readonly
1166
- * @category neutral
1167
- */
1168
- readonly APP_NAME: string;
1169
- /**
1170
- * The version of the application.
1171
- *
1172
- * @defaultValue "1.0.0"
1173
- *
1174
- * @readonly
1175
- * @category neutral
1176
- */
1177
- readonly APP_VERSION: string;
1178
- /**
1179
- * The unique identifier for the build.
1180
- *
1181
- * @readonly
1182
- * @category neutral
1183
- */
1184
- readonly BUILD_ID: string;
1185
- /**
1186
- * The timestamp the build was ran at.
1187
- *
1188
- * @readonly
1189
- * @category neutral
1190
- */
1191
- readonly BUILD_TIMESTAMP: string;
1192
- /**
1193
- * A checksum hash created during the build.
1194
- *
1195
- * @readonly
1196
- * @category neutral
1197
- */
1198
- readonly BUILD_CHECKSUM: string;
1199
- /**
1200
- * The unique identifier for the release.
1201
- *
1202
- * @readonly
1203
- * @category neutral
1204
- */
1205
- readonly RELEASE_ID: string;
1206
- /**
1207
- * The tag for the release. This is generally in the format of "\<APP_NAME\>\@\<APP_VERSION\>".
1208
- *
1209
- * @readonly
1210
- * @category neutral
1211
- */
1212
- readonly RELEASE_TAG: string;
1213
- /**
1214
- * The name of the organization that maintains the application.
1215
- *
1216
- * @remarks
1217
- * 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}.
1218
- *
1219
- * @alias ORG
1220
- * @alias ORG_ID
1221
- * @category neutral
1222
- */
1223
- ORGANIZATION: string;
1224
- /**
1225
- * The platform for which the application was built.
1226
- *
1227
- * @defaultValue "neutral"
1228
- *
1229
- * @category neutral
1230
- */
1231
- PLATFORM: "node" | "neutral" | "browser";
1232
- /**
1233
- * The mode in which the application is running.
1234
- *
1235
- * @defaultValue "production"
1236
- *
1237
- * @alias NODE_ENV
1238
- *
1239
- * @category neutral
1240
- */
1241
- MODE: "development" | "test" | "production";
1242
- /**
1243
- * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.
1244
- *
1245
- * @defaultValue "production"
1246
- *
1247
- * @alias ENV
1248
- * @alias VERCEL_ENV
1249
- * @category neutral
1250
- */
1251
- ENVIRONMENT: string;
1252
- /**
1253
- * Indicates if the application is running in debug mode.
1254
- *
1255
- * @category neutral
1256
- */
1257
- DEBUG: boolean;
1258
- /**
1259
- * An indicator that specifies the current runtime is a test environment.
1260
- *
1261
- * @category neutral
1262
- */
1263
- TEST: boolean;
1264
- /**
1265
- * An indicator that specifies the current runtime is a minimal environment.
1266
- *
1267
- * @category node
1268
- */
1269
- MINIMAL: boolean;
1270
- /**
1271
- * An indicator that specifies the current runtime is a no color environment.
1272
- *
1273
- * @category node
1274
- */
1275
- NO_COLOR: boolean;
1276
- /**
1277
- * An indicator that specifies the current runtime is a force color environment.
1278
- *
1279
- * @category node
1280
- */
1281
- FORCE_COLOR: boolean | number;
1282
- /**
1283
- * An indicator that specifies the current runtime should force hyperlinks in terminal output.
1284
- *
1285
- * @remarks
1286
- * 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.
1287
-
1288
- * @category node
1289
- */
1290
- FORCE_HYPERLINK: boolean | number;
1291
- /**
1292
- * The name of the agent running the application. This variable is set by certain CI/CD systems.
1293
- *
1294
- * @readonly
1295
- * @category neutral
1296
- */
1297
- readonly AGENT_NAME?: string;
1298
- /**
1299
- * The color terminal type. This variable is set by certain terminal emulators.
1300
- *
1301
- * @readonly
1302
- * @category node
1303
- */
1304
- readonly COLORTERM?: string;
1305
- /**
1306
- * The terminal type. This variable is set by certain CI/CD systems.
1307
- *
1308
- * @remarks
1309
- * 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.
1310
- *
1311
- * @readonly
1312
- * @category node
1313
- */
1314
- readonly TERM?: string;
1315
- /**
1316
- * The terminal program name. This variable is set by certain terminal emulators.
1317
- *
1318
- * @readonly
1319
- * @category node
1320
- */
1321
- readonly TERM_PROGRAM?: string;
1322
- /**
1323
- * The terminal program version. This variable is set by certain terminal emulators.
1324
- *
1325
- * @readonly
1326
- * @category node
1327
- */
1328
- readonly TERM_PROGRAM_VERSION?: string;
1329
- /**
1330
- * The terminal emulator name. This variable is set by certain terminal emulators.
1331
- *
1332
- * @readonly
1333
- * @category node
1334
- */
1335
- readonly TERMINAL_EMULATOR?: string;
1336
- /**
1337
- * The terminal emulator session ID. This variable is set by certain terminal emulators.
1338
- *
1339
- * @readonly
1340
- * @category node
1341
- */
1342
- readonly WT_SESSION?: string;
1343
- /**
1344
- * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.
1345
- *
1346
- * @readonly
1347
- * @category node
1348
- */
1349
- readonly TERMINUS_SUBLIME?: boolean;
1350
- /**
1351
- * The ConEmu task name. This variable is set by certain terminal emulators.
1352
- *
1353
- * @readonly
1354
- * @category node
1355
- */
1356
- readonly ConEmuTask?: string;
1357
- /**
1358
- * The cursor trace ID. This variable is set by certain terminal emulators.
1359
- *
1360
- * @readonly
1361
- * @category node
1362
- */
1363
- readonly CURSOR_TRACE_ID?: string;
1364
- /**
1365
- * The VTE version. This variable is set by certain terminal emulators.
1366
- *
1367
- * @readonly
1368
- * @category node
1369
- */
1370
- readonly VTE_VERSION?: string;
1371
- /**
1372
- * Indicates if error stack traces should be captured.
1373
- *
1374
- * @category neutral
1375
- */
1376
- STACKTRACE: boolean;
1377
- /**
1378
- * Indicates if error data should be included.
1379
- *
1380
- * @category neutral
1381
- */
1382
- INCLUDE_ERROR_DATA: boolean;
1383
- /**
1384
- * A web page to lookup error messages and display additional information given an error code.
1385
- *
1386
- * @remarks
1387
- * 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.
1388
- *
1389
- * @title Error Details URL
1390
- * @category neutral
1391
- */
1392
- ERROR_URL: string;
1393
- /**
1394
- * The default timezone for the application.
1395
- *
1396
- * @defaultValue "America/New_York"
1397
- * @category neutral
1398
- */
1399
- DEFAULT_TIMEZONE: string;
1400
- /**
1401
- * The default locale to be used in the application.
1402
- *
1403
- * @defaultValue "en_US"
1404
- * @category neutral
1405
- */
1406
- DEFAULT_LOCALE: string;
1407
- /**
1408
- * 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.
1409
- *
1410
- * @defaultValue "info"
1411
- *
1412
- * @category neutral
1413
- */
1414
- LOG_LEVEL?: LogLevel | null;
1415
- /**
1416
- * An indicator that specifies the current runtime is a continuous integration environment.
1417
- *
1418
- * @title Continuous Integration
1419
- * @alias CONTINUOUS_INTEGRATION
1420
- * @category neutral
1421
- */
1422
- CI: boolean;
1423
- /**
1424
- * The unique identifier for the current run. This value is set by certain CI/CD systems.
1425
- *
1426
- * @readonly
1427
- * @category node
1428
- */
1429
- readonly RUN_ID?: string;
1430
- /**
1431
- * The agola git reference. This value is set by certain CI/CD systems.
1432
- *
1433
- * @readonly
1434
- * @category node
1435
- */
1436
- readonly AGOLA_GIT_REF?: string;
1437
- /**
1438
- * The appcircle build ID. This value is set by certain CI/CD systems.
1439
- *
1440
- * @readonly
1441
- * @category node
1442
- */
1443
- readonly AC_APPCIRCLE?: string;
1444
- /**
1445
- * The appveyor build ID. This value is set by certain CI/CD systems.
1446
- *
1447
- * @readonly
1448
- * @category node
1449
- */
1450
- readonly APPVEYOR?: string;
1451
- /**
1452
- * The codebuild build ID. This value is set by certain CI/CD systems.
1453
- *
1454
- * @readonly
1455
- * @category node
1456
- */
1457
- readonly CODEBUILD?: string;
1458
- /**
1459
- * The task force build ID. This value is set by certain CI/CD systems.
1460
- *
1461
- * @readonly
1462
- * @category node
1463
- */
1464
- readonly TF_BUILD?: string;
1465
- /**
1466
- * The bamboo plan key. This value is set by certain CI/CD systems.
1467
- *
1468
- * @readonly
1469
- * @category node
1470
- */
1471
- readonly bamboo_planKey?: string;
1472
- /**
1473
- * The bitbucket commit. This value is set by certain CI/CD systems.
1474
- *
1475
- * @readonly
1476
- * @category node
1477
- */
1478
- readonly BITBUCKET_COMMIT?: string;
1479
- /**
1480
- * The bitrise build ID. This value is set by certain CI/CD systems.
1481
- *
1482
- * @readonly
1483
- * @category node
1484
- */
1485
- readonly BITRISE_IO?: string;
1486
- /**
1487
- * The buddy workspace ID. This value is set by certain CI/CD systems.
1488
- *
1489
- * @readonly
1490
- * @category node
1491
- */
1492
- readonly BUDDY_WORKSPACE_ID?: string;
1493
- /**
1494
- * The buildkite build ID. This value is set by certain CI/CD systems.
1495
- *
1496
- * @readonly
1497
- * @category node
1498
- */
1499
- readonly BUILDKITE?: string;
1500
- /**
1501
- * The circleci build ID. This value is set by certain CI/CD systems.
1502
- *
1503
- * @readonly
1504
- * @category node
1505
- */
1506
- readonly CIRCLECI?: string;
1507
- /**
1508
- * The cirrus-ci build ID. This value is set by certain CI/CD systems.
1509
- *
1510
- * @readonly
1511
- * @category node
1512
- */
1513
- readonly CIRRUS_CI?: string;
1514
- /**
1515
- * The cf build ID. This value is set by certain CI/CD systems.
1516
- *
1517
- * @readonly
1518
- * @category node
1519
- */
1520
- readonly CF_BUILD_ID?: string;
1521
- /**
1522
- * The cm build ID. This value is set by certain CI/CD systems.
1523
- *
1524
- * @readonly
1525
- * @category node
1526
- */
1527
- readonly CM_BUILD_ID?: string;
1528
- /**
1529
- * The ci name. This value is set by certain CI/CD systems.
1530
- *
1531
- * @readonly
1532
- * @category node
1533
- */
1534
- readonly CI_NAME?: string;
1535
- /**
1536
- * The drone build ID. This value is set by certain CI/CD systems.
1537
- *
1538
- * @readonly
1539
- * @category node
1540
- */
1541
- readonly DRONE?: string;
1542
- /**
1543
- * The dsari build ID. This value is set by certain CI/CD systems.
1544
- *
1545
- * @readonly
1546
- * @category node
1547
- */
1548
- readonly DSARI?: string;
1549
- /**
1550
- * The earthly build ID. This value is set by certain CI/CD systems.
1551
- *
1552
- * @readonly
1553
- * @category node
1554
- */
1555
- readonly EARTHLY_CI?: string;
1556
- /**
1557
- * The eas build ID. This value is set by certain CI/CD systems.
1558
- *
1559
- * @readonly
1560
- * @category node
1561
- */
1562
- readonly EAS_BUILD?: string;
1563
- /**
1564
- * The gerrit project. This value is set by certain CI/CD systems.
1565
- *
1566
- * @readonly
1567
- * @category node
1568
- */
1569
- readonly GERRIT_PROJECT?: string;
1570
- /**
1571
- * The gitea actions build ID. This value is set by certain CI/CD systems.
1572
- *
1573
- * @readonly
1574
- * @category node
1575
- */
1576
- readonly GITEA_ACTIONS?: string;
1577
- /**
1578
- * The github actions build ID. This value is set by certain CI/CD systems.
1579
- *
1580
- * @readonly
1581
- * @category node
1582
- */
1583
- readonly GITHUB_ACTIONS?: string;
1584
- /**
1585
- * The gitlab ci build ID. This value is set by certain CI/CD systems.
1586
- *
1587
- * @readonly
1588
- * @category node
1589
- */
1590
- readonly GITLAB_CI?: string;
1591
- /**
1592
- * The go cd build ID. This value is set by certain CI/CD systems.
1593
- *
1594
- * @readonly
1595
- * @category node
1596
- */
1597
- readonly GOCD?: string;
1598
- /**
1599
- * The builder output build ID. This value is set by certain CI/CD systems.
1600
- *
1601
- * @readonly
1602
- * @category node
1603
- */
1604
- readonly BUILDER_OUTPUT?: string;
1605
- /**
1606
- * The harness build ID. This value is set by certain CI/CD systems.
1607
- *
1608
- * @readonly
1609
- * @category node
1610
- */
1611
- readonly HARNESS_BUILD_ID?: string;
1612
- /**
1613
- * The jenkins url. This value is set by certain CI/CD systems.
1614
- *
1615
- * @readonly
1616
- * @category node
1617
- */
1618
- readonly JENKINS_URL?: string;
1619
- /**
1620
- * The layerci build ID. This value is set by certain CI/CD systems.
1621
- *
1622
- * @readonly
1623
- * @category node
1624
- */
1625
- readonly LAYERCI?: string;
1626
- /**
1627
- * The magnum build ID. This value is set by certain CI/CD systems.
1628
- *
1629
- * @readonly
1630
- * @category node
1631
- */
1632
- readonly MAGNUM?: string;
1633
- /**
1634
- * The netlify build ID. This value is set by certain CI/CD systems.
1635
- *
1636
- * @readonly
1637
- * @category node
1638
- */
1639
- readonly NETLIFY?: string;
1640
- /**
1641
- * The nevercode build ID. This value is set by certain CI/CD systems.
1642
- *
1643
- * @readonly
1644
- * @category node
1645
- */
1646
- readonly NEVERCODE?: string;
1647
- /**
1648
- * The prow job ID. This value is set by certain CI/CD systems.
1649
- *
1650
- * @readonly
1651
- * @category node
1652
- */
1653
- readonly PROW_JOB_ID?: string;
1654
- /**
1655
- * The release build ID. This value is set by certain CI/CD systems.
1656
- *
1657
- * @readonly
1658
- * @category node
1659
- */
1660
- readonly RELEASE_BUILD_ID?: string;
1661
- /**
1662
- * The render build ID. This value is set by certain CI/CD systems.
1663
- *
1664
- * @readonly
1665
- * @category node
1666
- */
1667
- readonly RENDER?: string;
1668
- /**
1669
- * The sailci build ID. This value is set by certain CI/CD systems.
1670
- *
1671
- * @readonly
1672
- * @category node
1673
- */
1674
- readonly SAILCI?: string;
1675
- /**
1676
- * The hudson build ID. This value is set by certain CI/CD systems.
1677
- *
1678
- * @readonly
1679
- * @category node
1680
- */
1681
- readonly HUDSON?: string;
1682
- /**
1683
- * The screwdriver build ID. This value is set by certain CI/CD systems.
1684
- *
1685
- * @readonly
1686
- * @category node
1687
- */
1688
- readonly SCREWDRIVER?: string;
1689
- /**
1690
- * The semaphore build ID. This value is set by certain CI/CD systems.
1691
- *
1692
- * @readonly
1693
- * @category node
1694
- */
1695
- readonly SEMAPHORE?: string;
1696
- /**
1697
- * The sourcehut build ID. This value is set by certain CI/CD systems.
1698
- *
1699
- * @readonly
1700
- * @category node
1701
- */
1702
- readonly SOURCEHUT?: string;
1703
- /**
1704
- * The spaceship build ID. This value is set by certain CI/CD systems.
1705
- *
1706
- * @readonly
1707
- * @category node
1708
- */
1709
- readonly SPACESHIP_CI?: string;
1710
- /**
1711
- * The strider build ID. This value is set by certain CI/CD systems.
1712
- *
1713
- * @readonly
1714
- * @category node
1715
- */
1716
- readonly STRIDER?: string;
1717
- /**
1718
- * The task ID. This value is set by certain CI/CD systems.
1719
- *
1720
- * @readonly
1721
- * @category node
1722
- */
1723
- readonly TASK_ID?: string;
1724
- /**
1725
- * The teamcity version. This value is set by certain CI/CD systems.
1726
- *
1727
- * @readonly
1728
- * @category node
1729
- */
1730
- readonly TEAMCITY_VERSION?: string;
1731
- /**
1732
- * The travis build ID. This value is set by certain CI/CD systems.
1733
- *
1734
- * @readonly
1735
- * @category node
1736
- */
1737
- readonly TRAVIS?: string;
1738
- /**
1739
- * The vela build ID. This value is set by certain CI/CD systems.
1740
- *
1741
- * @readonly
1742
- * @category node
1743
- */
1744
- readonly VELA?: string;
1745
- /**
1746
- * The now builder build ID. This value is set by certain CI/CD systems.
1747
- *
1748
- * @readonly
1749
- * @category node
1750
- */
1751
- readonly NOW_BUILDER?: string;
1752
- /**
1753
- * The appcenter build ID. This value is set by certain CI/CD systems.
1754
- *
1755
- * @readonly
1756
- * @category node
1757
- */
1758
- readonly APPCENTER_BUILD_ID?: string;
1759
- /**
1760
- * The xcode project build ID. This value is set by certain CI/CD systems.
1761
- *
1762
- * @readonly
1763
- * @category node
1764
- */
1765
- readonly CI_XCODE_PROJECT?: string;
1766
- /**
1767
- * The xcode server build ID. This value is set by certain CI/CD systems.
1768
- *
1769
- * @readonly
1770
- * @category node
1771
- */
1772
- readonly XCS?: string;
1773
- /**
1774
- * The application's runtime data directory.
1775
- *
1776
- * @remarks
1777
- * 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.
1778
- *
1779
- * @title Data Directory
1780
- * @category node
1781
- */
1782
- DATA_DIR?: string;
1783
- /**
1784
- * The application's configuration data directory.
1785
- *
1786
- * @remarks
1787
- * 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.
1788
- *
1789
- * @title Configuration Directory
1790
- * @category node
1791
- */
1792
- CONFIG_DIR?: string;
1793
- /**
1794
- * The application's cached data directory.
1795
- *
1796
- * @remarks
1797
- * 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.
1798
- *
1799
- * @title Cache Directory
1800
- * @category node
1801
- */
1802
- CACHE_DIR?: string;
1803
- /**
1804
- * The application's logging directory.
1805
- *
1806
- * @remarks
1807
- * 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.
1808
- *
1809
- * @title Log Directory
1810
- * @category node
1811
- */
1812
- LOG_DIR?: string;
1813
- /**
1814
- * The application's temporary data directory.
1815
- *
1816
- * @remarks
1817
- * 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.
1818
- *
1819
- * @title Temporary Directory
1820
- * @category node
1821
- */
1822
- TEMP_DIR?: string;
1823
- /**
1824
- * A variable that specifies the current user's local application data directory on Windows.
1825
- *
1826
- * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
1827
- *
1828
- * @remarks
1829
- * 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.
1830
- *
1831
- * @readonly
1832
- * @category node
1833
- */
1834
- readonly LOCALAPPDATA?: string;
1835
- /**
1836
- * A variable that specifies the application data directory on Windows.
1837
- *
1838
- * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
1839
- *
1840
- * @remarks
1841
- * 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.
1842
- *
1843
- * @readonly
1844
- * @category node
1845
- */
1846
- readonly APPDATA?: string;
1847
- /**
1848
- * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.
1849
- *
1850
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
1851
- *
1852
- * @remarks
1853
- * 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.
1854
- *
1855
- * @readonly
1856
- * @category node
1857
- */
1858
- readonly XDG_DATA_HOME?: string;
1859
- /**
1860
- * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.
1861
- *
1862
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
1863
- *
1864
- * @remarks
1865
- * 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.
1866
- *
1867
- * @readonly
1868
- * @category node
1869
- */
1870
- readonly XDG_CONFIG_HOME?: string;
1871
- /**
1872
- * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.
1873
- *
1874
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
1875
- *
1876
- * @remarks
1877
- * 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.
1878
- *
1879
- * @readonly
1880
- * @category node
1881
- */
1882
- readonly XDG_CACHE_HOME?: string;
1883
- /**
1884
- * A variable that specifies the state directory on Linux systems using the XDG base directory specification.
1885
- *
1886
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
1887
- *
1888
- * @remarks
1889
- * 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.
1890
- *
1891
- * @readonly
1892
- * @category node
1893
- */
1894
- readonly XDG_STATE_HOME?: string;
1895
- /**
1896
- * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.
1897
- *
1898
- * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
1899
- *
1900
- * @remarks
1901
- * 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.
1902
- *
1903
- * @readonly
1904
- * @category node
1905
- */
1906
- readonly XDG_RUNTIME_DIR?: string;
1907
- /**
1908
- * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.
1909
- *
1910
- * @see https://devenv.sh/files-and-variables/#devenv_dotfile
1911
- * @see https://nixos.org/
1912
- *
1913
- * @remarks
1914
- * 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.
1915
- *
1916
- * @category node
1917
- */
1918
- DEVENV_RUNTIME?: string;
1919
- }
1920
- /**
1921
- * The base secrets configuration used by Powerlines applications
1922
- *
1923
- * @remarks
1924
- * 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).
1925
- */
1926
- interface SecretsInterface {
1927
- /**
1928
- * The secret key used for encryption and decryption.
1929
- *
1930
- * @remarks
1931
- * 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.
1932
- *
1933
- * @title Encryption Key
1934
- */
1935
- ENCRYPTION_KEY: string;
1936
- }
1937
-
1938
- export type { BabelUserConfig as B, EnvInterface as E, PluginContext as P, ResolvedConfig as R, SecretsInterface as S, UserConfig as U, Plugin as a, BabelResolvedConfig as b };