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