@powerlines/plugin-nodejs 0.1.117 → 0.1.118

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 (194) hide show
  1. package/dist/components/env.cjs +14 -14
  2. package/dist/components/env.d.cts +1 -1
  3. package/dist/components/env.d.mts +1 -1
  4. package/dist/components/env.mjs +6 -6
  5. package/dist/index.cjs +8 -6
  6. package/dist/index.d.cts +1 -1
  7. package/dist/index.d.mts +1 -1
  8. package/dist/index.mjs +5 -5
  9. package/dist/types/plugin.d.cts +2 -2
  10. package/dist/types/plugin.d.mts +2 -2
  11. package/package.json +6 -6
  12. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  13. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  14. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  15. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  16. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  17. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  18. package/dist/deepkit/src/capnp.cjs +0 -913
  19. package/dist/deepkit/src/capnp.mjs +0 -911
  20. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  21. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  22. package/dist/deepkit/src/reflect-type.cjs +0 -22
  23. package/dist/deepkit/src/reflect-type.mjs +0 -20
  24. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  25. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  26. package/dist/deepkit/src/transformer.cjs +0 -52
  27. package/dist/deepkit/src/transformer.mjs +0 -49
  28. package/dist/deepkit/src/transpile.cjs +0 -29
  29. package/dist/deepkit/src/transpile.mjs +0 -27
  30. package/dist/deepkit/src/types.d.cts +0 -10
  31. package/dist/deepkit/src/types.d.mts +0 -10
  32. package/dist/deepkit/src/utilities.cjs +0 -67
  33. package/dist/deepkit/src/utilities.mjs +0 -66
  34. package/dist/plugin-alloy/src/core/components/output.cjs +0 -43
  35. package/dist/plugin-alloy/src/core/components/output.mjs +0 -42
  36. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  37. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  38. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  39. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  40. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  41. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  42. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -49
  43. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -44
  44. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  45. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  46. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  47. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  48. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  49. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  50. package/dist/plugin-alloy/src/index.cjs +0 -105
  51. package/dist/plugin-alloy/src/index.mjs +0 -103
  52. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -115
  53. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -114
  54. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -39
  55. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -38
  56. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -18
  57. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  58. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  59. package/dist/plugin-alloy/src/types/components.d.mts +0 -21
  60. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  61. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  62. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  63. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  64. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -62
  65. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  66. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  67. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -61
  68. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -131
  69. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -129
  70. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -451
  71. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  72. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  73. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -442
  74. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -216
  75. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  76. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  77. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -213
  78. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -72
  79. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -4
  80. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -4
  81. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -71
  82. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  83. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  84. package/dist/plugin-automd/src/index.cjs +0 -101
  85. package/dist/plugin-automd/src/index.mjs +0 -98
  86. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  87. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  88. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  89. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  90. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  91. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  92. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  93. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  94. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  95. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  96. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  97. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  98. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  99. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  100. package/dist/plugin-babel/src/helpers/options.cjs +0 -49
  101. package/dist/plugin-babel/src/helpers/options.mjs +0 -46
  102. package/dist/plugin-babel/src/index.cjs +0 -85
  103. package/dist/plugin-babel/src/index.mjs +0 -83
  104. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  105. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  106. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  107. package/dist/plugin-env/src/babel/index.cjs +0 -1
  108. package/dist/plugin-env/src/babel/index.mjs +0 -3
  109. package/dist/plugin-env/src/babel/plugin.cjs +0 -70
  110. package/dist/plugin-env/src/babel/plugin.mjs +0 -69
  111. package/dist/plugin-env/src/components/docs.cjs +0 -70
  112. package/dist/plugin-env/src/components/docs.mjs +0 -69
  113. package/dist/plugin-env/src/components/env.cjs +0 -589
  114. package/dist/plugin-env/src/components/env.d.cts +0 -11
  115. package/dist/plugin-env/src/components/env.d.mts +0 -11
  116. package/dist/plugin-env/src/components/env.mjs +0 -586
  117. package/dist/plugin-env/src/components/index.cjs +0 -2
  118. package/dist/plugin-env/src/components/index.mjs +0 -4
  119. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  120. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  121. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  122. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  123. package/dist/plugin-env/src/helpers/docs-helper.cjs +0 -16
  124. package/dist/plugin-env/src/helpers/docs-helper.mjs +0 -15
  125. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  126. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  127. package/dist/plugin-env/src/helpers/load.cjs +0 -84
  128. package/dist/plugin-env/src/helpers/load.mjs +0 -81
  129. package/dist/plugin-env/src/helpers/persistence.cjs +0 -201
  130. package/dist/plugin-env/src/helpers/persistence.mjs +0 -190
  131. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  132. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  133. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  134. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  135. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  136. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  137. package/dist/plugin-env/src/index.cjs +0 -177
  138. package/dist/plugin-env/src/index.mjs +0 -175
  139. package/dist/plugin-env/src/types/plugin.d.cts +0 -149
  140. package/dist/plugin-env/src/types/plugin.d.mts +0 -150
  141. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  142. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  143. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  144. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -49
  145. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -93
  146. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -91
  147. package/dist/powerlines/src/lib/constants/environments.cjs +0 -6
  148. package/dist/powerlines/src/lib/constants/environments.mjs +0 -5
  149. package/dist/powerlines/src/lib/entry.cjs +0 -11
  150. package/dist/powerlines/src/lib/entry.mjs +0 -13
  151. package/dist/powerlines/src/lib/logger.cjs +0 -41
  152. package/dist/powerlines/src/lib/logger.mjs +0 -39
  153. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -38
  154. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
  155. package/dist/powerlines/src/lib/unplugin/helpers.cjs +0 -3
  156. package/dist/powerlines/src/lib/unplugin/helpers.mjs +0 -5
  157. package/dist/powerlines/src/lib/unplugin/module-resolution.cjs +0 -66
  158. package/dist/powerlines/src/lib/unplugin/module-resolution.mjs +0 -65
  159. package/dist/powerlines/src/lib/unplugin/plugin.cjs +0 -46
  160. package/dist/powerlines/src/lib/unplugin/plugin.mjs +0 -45
  161. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -42
  162. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -40
  163. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -50
  164. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -49
  165. package/dist/powerlines/src/lib/utilities/source-file.cjs +0 -5
  166. package/dist/powerlines/src/lib/utilities/source-file.mjs +0 -5
  167. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  168. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  169. package/dist/powerlines/src/types/api.d.cts +0 -104
  170. package/dist/powerlines/src/types/api.d.mts +0 -104
  171. package/dist/powerlines/src/types/babel.d.cts +0 -22
  172. package/dist/powerlines/src/types/babel.d.mts +0 -22
  173. package/dist/powerlines/src/types/build.cjs +0 -21
  174. package/dist/powerlines/src/types/build.d.cts +0 -185
  175. package/dist/powerlines/src/types/build.d.mts +0 -185
  176. package/dist/powerlines/src/types/build.mjs +0 -21
  177. package/dist/powerlines/src/types/commands.d.cts +0 -8
  178. package/dist/powerlines/src/types/commands.d.mts +0 -9
  179. package/dist/powerlines/src/types/config.d.cts +0 -435
  180. package/dist/powerlines/src/types/config.d.mts +0 -436
  181. package/dist/powerlines/src/types/context.d.cts +0 -514
  182. package/dist/powerlines/src/types/context.d.mts +0 -514
  183. package/dist/powerlines/src/types/fs.d.cts +0 -486
  184. package/dist/powerlines/src/types/fs.d.mts +0 -486
  185. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  186. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  187. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  188. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  189. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  190. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  191. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  192. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  193. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  194. package/dist/powerlines/src/types/unplugin.d.mts +0 -23
@@ -1,435 +0,0 @@
1
- import { StoragePort, StoragePreset } from "./fs.cjs";
2
- import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.cjs";
3
- import { Plugin } from "./plugin.cjs";
4
- import { TSConfig } from "./tsconfig.cjs";
5
- import { PluginContext } from "./context.cjs";
6
- import { BabelTransformPluginOptions } from "./babel.cjs";
7
- import { MaybePromise } from "@stryke/types/base";
8
- import { AssetGlob } from "@stryke/types/file";
9
- import { TypeDefinitionParameter } from "@stryke/types/configuration";
10
- import { PreviewOptions } from "vite";
11
- import { transformAsync } from "@babel/core";
12
- import { Format } from "@storm-software/build-tools/types";
13
- import { LogLevelLabel } from "@storm-software/config-tools/types";
14
- import { StormWorkspaceConfig } from "@storm-software/config/types";
15
- import { DateString } from "compatx";
16
-
17
- //#region ../powerlines/src/types/config.d.ts
18
- type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
19
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
20
- /**
21
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
22
- */
23
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
24
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
25
- /**
26
- * A configuration tuple for a Powerlines plugin.
27
- */
28
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
29
- /**
30
- * A configuration object for a Powerlines plugin.
31
- */
32
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
33
- plugin: string | PluginFactory<TContext, TOptions>;
34
- options: TOptions;
35
- } | {
36
- plugin: Plugin<TContext>;
37
- options?: never;
38
- };
39
- /**
40
- * A configuration tuple for a Powerlines plugin.
41
- */
42
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
43
- type ProjectType = "application" | "library";
44
- type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
45
- /**
46
- * The Babel plugins to be used during the build process
47
- */
48
- plugins?: BabelTransformPluginOptions[];
49
- /**
50
- * The Babel presets to be used during the build process
51
- */
52
- presets?: BabelTransformPluginOptions[];
53
- };
54
- interface DeployConfig {
55
- /**
56
- * The deployment variant being used by the Powerlines engine.
57
- *
58
- * @example
59
- * ```ts
60
- * export default defineConfig({
61
- * deploy: {
62
- * variant: "cloudflare"
63
- * }
64
- * });
65
- *
66
- * ```
67
- */
68
- variant?: string;
69
- }
70
- interface OutputConfig {
71
- /**
72
- * The path to output the final compiled files to
73
- *
74
- * @remarks
75
- * If a value is not provided, Powerlines will attempt to:
76
- * 1. Use the `outDir` value in the `tsconfig.json` file.
77
- * 2. Use the `dist` directory in the project root directory.
78
- *
79
- * @defaultValue "dist/\{projectRoot\}"
80
- */
81
- outputPath?: string;
82
- /**
83
- * The output directory path for the project build.
84
- *
85
- * @remarks
86
- * 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.
87
- *
88
- * @defaultValue "\{projectRoot\}/dist"
89
- */
90
- buildPath?: string;
91
- /**
92
- * The folder where the generated runtime artifacts will be located
93
- *
94
- * @remarks
95
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
96
- *
97
- * @defaultValue "\{projectRoot\}/.powerlines"
98
- */
99
- artifactsPath?: string;
100
- /**
101
- * The path of the generated runtime declaration file relative to the workspace root.
102
- *
103
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
104
- */
105
- dts?: string | false;
106
- /**
107
- * The module format of the output files
108
- *
109
- * @remarks
110
- * 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.
111
- *
112
- * @defaultValue "esm"
113
- */
114
- format?: Format | Format[];
115
- /**
116
- * A list of assets to copy to the output directory
117
- *
118
- * @remarks
119
- * 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.
120
- */
121
- assets?: Array<string | AssetGlob>;
122
- /**
123
- * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
124
- *
125
- * @remarks
126
- * If a string preset is provided, it must be one of the following values:
127
- * - `"virtual"`: Uses the local file system for storage.
128
- * - `"fs"`: Uses an in-memory virtual file system for storage.
129
- *
130
- * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
131
- *
132
- * @defaultValue "virtual"
133
- */
134
- storage?: StoragePort | StoragePreset;
135
- }
136
- interface BaseConfig {
137
- /**
138
- * The entry point(s) for the application
139
- */
140
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
141
- /**
142
- * Configuration for the output of the build process
143
- */
144
- output?: OutputConfig;
145
- /**
146
- * Configuration for cleaning the build artifacts
147
- *
148
- * @remarks
149
- * If set to `false`, the cleaning process will be disabled.
150
- */
151
- clean?: Record<string, any> | false;
152
- /**
153
- * Configuration for linting the source code
154
- *
155
- * @remarks
156
- * If set to `false`, linting will be disabled.
157
- */
158
- lint?: Record<string, any> | false;
159
- /**
160
- * Configuration for testing the source code
161
- *
162
- * @remarks
163
- * If set to `false`, testing will be disabled.
164
- */
165
- test?: Record<string, any> | false;
166
- /**
167
- * Configuration for the transformation of the source code
168
- */
169
- transform?: Record<string, any>;
170
- /**
171
- * Configuration provided to build processes
172
- *
173
- * @remarks
174
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
175
- */
176
- build?: BuildConfig;
177
- /**
178
- * Configuration for documentation generation
179
- *
180
- * @remarks
181
- * This configuration will be used by the documentation generation plugins during the `docs` command.
182
- */
183
- docs?: Record<string, any>;
184
- /**
185
- * Configuration for deploying the source code
186
- *
187
- * @remarks
188
- * If set to `false`, the deployment will be disabled.
189
- */
190
- deploy?: DeployConfig | false;
191
- /**
192
- * The path to the tsconfig file to be used by the compiler
193
- *
194
- * @remarks
195
- * 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).
196
- *
197
- * @defaultValue "\{projectRoot\}/tsconfig.json"
198
- */
199
- tsconfig?: string;
200
- /**
201
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
202
- *
203
- * @see https://www.typescriptlang.org/tsconfig
204
- *
205
- * @remarks
206
- * If populated, this option takes higher priority than `tsconfig`
207
- */
208
- tsconfigRaw?: TSConfig;
209
- }
210
- interface EnvironmentConfig extends BaseConfig {
211
- /**
212
- * Configuration options for the preview server
213
- */
214
- preview?: PreviewOptions;
215
- /**
216
- * A flag indicating whether the build is for a Server-Side Rendering environment.
217
- */
218
- ssr?: boolean;
219
- /**
220
- * Define if this environment is used for Server-Side Rendering
221
- *
222
- * @defaultValue "server" (if it isn't the client environment)
223
- */
224
- consumer?: "client" | "server";
225
- }
226
- interface CommonUserConfig extends BaseConfig {
227
- /**
228
- * The name of the project
229
- */
230
- name?: string;
231
- /**
232
- * The project display title
233
- *
234
- * @remarks
235
- * This option is used in documentation generation and other places where a human-readable title is needed.
236
- */
237
- title?: string;
238
- /**
239
- * A description of the project
240
- *
241
- * @remarks
242
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
243
- */
244
- description?: string;
245
- /**
246
- * The organization or author of the project
247
- *
248
- * @remarks
249
- * If this option is not provided, the build process will try to use the \`author\` value from the \`package.json\` file. If the \`author\` value cannot be determined, the {@link name | name configuration} will be used.
250
- */
251
- organization?: string;
252
- /**
253
- * The date to use for compatibility checks
254
- *
255
- * @remarks
256
- * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
257
- *
258
- * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
259
- * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
260
- * @see https://github.com/unjs/compatx
261
- */
262
- compatibilityDate?: DateString;
263
- /**
264
- * The log level to use for the Powerlines processes.
265
- *
266
- * @defaultValue "info"
267
- */
268
- logLevel?: LogLevel | null;
269
- /**
270
- * A custom logger function to use for logging messages
271
- */
272
- customLogger?: LogFn;
273
- /**
274
- * 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.
275
- *
276
- * @defaultValue "production"
277
- */
278
- mode?: "development" | "test" | "production";
279
- /**
280
- * The type of project being built
281
- *
282
- * @defaultValue "application"
283
- */
284
- type?: ProjectType;
285
- /**
286
- * The root directory of the project
287
- */
288
- root: string;
289
- /**
290
- * The root directory of the project's source code
291
- *
292
- * @defaultValue "\{root\}/src"
293
- */
294
- sourceRoot?: string;
295
- /**
296
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
297
- *
298
- * @remarks
299
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
300
- */
301
- configFile?: string;
302
- /**
303
- * Should the Powerlines processes automatically install missing package dependencies?
304
- *
305
- * @remarks
306
- * When set to `true`, Powerlines will attempt to install any missing dependencies using the package manager detected in the project (e.g., npm, yarn, pnpm). This can be useful for ensuring that all required packages are available during the build and preparation phases.
307
- *
308
- * @defaultValue false
309
- */
310
- autoInstall?: boolean;
311
- /**
312
- * Should the compiler processes skip any improvements that make use of cache?
313
- *
314
- * @defaultValue false
315
- */
316
- skipCache?: boolean;
317
- /**
318
- * A list of resolvable paths to plugins used during the build process
319
- */
320
- plugins?: PluginConfig<any>[];
321
- /**
322
- * Environment-specific configurations
323
- */
324
- environments?: Record<string, EnvironmentConfig>;
325
- /**
326
- * Should a single `build` process be ran for each environment?
327
- *
328
- * @remarks
329
- * This option determines how environments are managed during the `build` process. The available options are:
330
- *
331
- * - `false`: A separate build is ran for each environment.
332
- * - `true`: A single build is ran for all environments.
333
- *
334
- * @defaultValue false
335
- */
336
- singleBuild?: boolean;
337
- /**
338
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
339
- *
340
- * @remarks
341
- * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
342
- *
343
- * @defaultValue "powerlines"
344
- */
345
- framework?: string;
346
- }
347
- interface UserConfig$1<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
348
- /**
349
- * Configuration provided to build processes
350
- *
351
- * @remarks
352
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
353
- */
354
- build: Omit<TBuildConfig, "override"> & {
355
- /**
356
- * The build variant being used by the Powerlines engine.
357
- */
358
- variant?: TBuildVariant;
359
- /**
360
- * An optional set of override options to apply to the selected build variant.
361
- *
362
- * @remarks
363
- * 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.
364
- */
365
- override?: Partial<TBuildResolvedConfig>;
366
- };
367
- }
368
- type WebpackUserConfig = UserConfig$1<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
369
- type RspackUserConfig = UserConfig$1<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
370
- type RollupUserConfig = UserConfig$1<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
371
- type RolldownUserConfig = UserConfig$1<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
372
- type ViteUserConfig = UserConfig$1<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
373
- type ESBuildUserConfig = UserConfig$1<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
374
- type UnbuildUserConfig = UserConfig$1<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
375
- type TsupUserConfig = UserConfig$1<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
376
- type TsdownUserConfig = UserConfig$1<TsdownBuildConfig, TsdownResolvedBuildConfig, "tsdown">;
377
- type FarmUserConfig = UserConfig$1<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
378
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
379
- /**
380
- * The configuration provided while executing Powerlines commands.
381
- */
382
- type InlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Partial<TUserConfig> & {
383
- /**
384
- * A string identifier for the Powerlines command being executed
385
- */
386
- command: PowerlinesCommand;
387
- };
388
- type NewInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
389
- /**
390
- * A string identifier for the Powerlines command being executed
391
- */
392
- command: "new";
393
- /**
394
- * The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
395
- */
396
- packageName?: string;
397
- };
398
- type CleanInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
399
- /**
400
- * A string identifier for the Powerlines command being executed
401
- */
402
- command: "clean";
403
- };
404
- type PrepareInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
405
- /**
406
- * A string identifier for the Powerlines command being executed
407
- */
408
- command: "prepare";
409
- };
410
- type BuildInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
411
- /**
412
- * A string identifier for the Powerlines command being executed
413
- */
414
- command: "build";
415
- };
416
- type LintInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
417
- /**
418
- * A string identifier for the Powerlines command being executed
419
- */
420
- command: "lint";
421
- };
422
- type DocsInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
423
- /**
424
- * A string identifier for the Powerlines command being executed
425
- */
426
- command: "docs";
427
- };
428
- type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
429
- /**
430
- * A string identifier for the Powerlines command being executed
431
- */
432
- command: "deploy";
433
- };
434
- //#endregion
435
- export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };