@powerlines/plugin-env 0.13.53 → 0.13.54

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