@powerlines/plugin-nodejs 0.1.116 → 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 (65) hide show
  1. package/dist/components/env.d.cts +1 -1
  2. package/dist/components/env.d.mts +1 -1
  3. package/dist/index.d.cts +1 -1
  4. package/dist/index.d.mts +1 -1
  5. package/dist/types/plugin.d.cts +2 -2
  6. package/dist/types/plugin.d.mts +2 -2
  7. package/package.json +6 -6
  8. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  9. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  10. package/dist/deepkit/src/types.d.cts +0 -10
  11. package/dist/deepkit/src/types.d.mts +0 -10
  12. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  13. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  14. package/dist/plugin-alloy/src/types/components.d.cts +0 -20
  15. package/dist/plugin-alloy/src/types/components.d.mts +0 -20
  16. package/dist/plugin-alloy/src/types/index.d.cts +0 -2
  17. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  18. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -36
  19. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -36
  20. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -26
  21. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  22. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -37
  23. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -37
  24. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -16
  25. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -16
  26. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.cts +0 -4
  27. package/dist/plugin-alloy/src/typescript/components/typescript-interface.d.mts +0 -4
  28. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  29. package/dist/plugin-automd/src/types/plugin.d.mts +0 -38
  30. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  31. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  32. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  33. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  34. package/dist/plugin-env/src/components/env.d.cts +0 -11
  35. package/dist/plugin-env/src/components/env.d.mts +0 -11
  36. package/dist/plugin-env/src/types/plugin.d.cts +0 -149
  37. package/dist/plugin-env/src/types/plugin.d.mts +0 -149
  38. package/dist/plugin-env/src/types/runtime.d.cts +0 -789
  39. package/dist/plugin-env/src/types/runtime.d.mts +0 -789
  40. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  41. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -47
  42. package/dist/powerlines/src/types/api.d.cts +0 -104
  43. package/dist/powerlines/src/types/api.d.mts +0 -104
  44. package/dist/powerlines/src/types/babel.d.cts +0 -22
  45. package/dist/powerlines/src/types/babel.d.mts +0 -22
  46. package/dist/powerlines/src/types/build.d.cts +0 -185
  47. package/dist/powerlines/src/types/build.d.mts +0 -185
  48. package/dist/powerlines/src/types/commands.d.cts +0 -8
  49. package/dist/powerlines/src/types/commands.d.mts +0 -8
  50. package/dist/powerlines/src/types/config.d.cts +0 -435
  51. package/dist/powerlines/src/types/config.d.mts +0 -435
  52. package/dist/powerlines/src/types/context.d.cts +0 -514
  53. package/dist/powerlines/src/types/context.d.mts +0 -514
  54. package/dist/powerlines/src/types/fs.d.cts +0 -486
  55. package/dist/powerlines/src/types/fs.d.mts +0 -486
  56. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  57. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  58. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  59. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  60. package/dist/powerlines/src/types/resolved.d.cts +0 -94
  61. package/dist/powerlines/src/types/resolved.d.mts +0 -94
  62. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  63. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  64. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  65. package/dist/powerlines/src/types/unplugin.d.mts +0 -22
@@ -1,185 +0,0 @@
1
- import { DepOptimizationOptions, UserConfig } from "vite";
2
- import { UserConfig as UserConfig$1 } from "@farmfe/core";
3
- import { Configuration } from "@rspack/core";
4
- import { BuildOptions } from "@storm-software/tsup/types";
5
- import { UnbuildOptions } from "@storm-software/unbuild/types";
6
- import { BuildOptions as BuildOptions$1 } from "esbuild";
7
- import { RolldownOptions } from "rolldown";
8
- import { OutputOptions, RollupOptions } from "rollup";
9
- import { UserConfig as UserConfig$2 } from "tsdown";
10
- import { Configuration as Configuration$1 } from "webpack";
11
-
12
- //#region ../powerlines/src/types/build.d.ts
13
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
14
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
15
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
16
- interface BuildConfig {
17
- /**
18
- * The platform to build the project for
19
- *
20
- * @defaultValue "neutral"
21
- */
22
- platform?: "node" | "browser" | "neutral";
23
- /**
24
- * Array of strings indicating the polyfills to include for the build.
25
- *
26
- * @remarks
27
- * 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).
28
- *
29
- * @example
30
- * ```ts
31
- * {
32
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
33
- * }
34
- * ```
35
- */
36
- polyfill?: string[];
37
- /**
38
- * 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.
39
- *
40
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
41
- */
42
- mainFields?: string[];
43
- /**
44
- * Array of strings indicating what conditions should be used for module resolution.
45
- */
46
- conditions?: string[];
47
- /**
48
- * Array of strings indicating what file extensions should be used for module resolution.
49
- *
50
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
51
- */
52
- extensions?: string[];
53
- /**
54
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
55
- *
56
- * @remarks
57
- * 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.
58
- */
59
- dedupe?: string[];
60
- /**
61
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
62
- */
63
- builtins?: (string | RegExp)[];
64
- /**
65
- * Define global variable replacements.
66
- *
67
- * @remarks
68
- * 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.
69
- *
70
- * @example
71
- * ```ts
72
- * {
73
- * define: {
74
- * __VERSION__: '"1.0.0"',
75
- * __DEV__: 'process.env.NODE_ENV !== "production"'
76
- * }
77
- * }
78
- * ```
79
- *
80
- * @see https://esbuild.github.io/api/#define
81
- * @see https://vitejs.dev/config/build-options.html#define
82
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
83
- */
84
- define?: Record<string, any>;
85
- /**
86
- * Global variables that will have import statements injected where necessary
87
- *
88
- * @remarks
89
- * 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.
90
- *
91
- * @example
92
- * ```ts
93
- * {
94
- * inject: {
95
- * process: 'process/browser',
96
- * Buffer: ['buffer', 'Buffer'],
97
- * }
98
- * }
99
- * ```
100
- *
101
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
102
- */
103
- inject?: Record<string, string | string[]>;
104
- /**
105
- * The alias mappings to use for module resolution during the build process.
106
- *
107
- * @remarks
108
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
109
- *
110
- * @example
111
- * ```ts
112
- * {
113
- * alias: {
114
- * "@utils": "./src/utils",
115
- * "@components": "./src/components"
116
- * }
117
- * }
118
- * ```
119
- *
120
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
121
- */
122
- alias?: Record<string, string> | Array<{
123
- find: string | RegExp;
124
- replacement: string;
125
- }>;
126
- /**
127
- * A list of modules that should not be bundled, even if they are external dependencies.
128
- *
129
- * @remarks
130
- * 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.
131
- */
132
- external?: (string | RegExp)[];
133
- /**
134
- * A list of modules that should always be bundled, even if they are external dependencies.
135
- */
136
- noExternal?: (string | RegExp)[];
137
- /**
138
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
139
- */
140
- skipNodeModulesBundle?: boolean;
141
- /**
142
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
143
- *
144
- * @defaultValue false
145
- */
146
- keepProcessEnv?: boolean;
147
- /**
148
- * An optional set of override options to apply to the selected build variant.
149
- *
150
- * @remarks
151
- * 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.
152
- */
153
- override?: Record<string, any>;
154
- }
155
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
156
- type ESBuildBuildConfig = Omit<BuildOptions$1, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
157
- type ESBuildResolvedBuildConfig = Omit<BuildOptions$1, "inject"> & BuildResolvedConfig;
158
- type ViteBuildConfig = Omit<UserConfig, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
159
- /**
160
- * Optimize deps config
161
- */
162
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
163
- };
164
- type ViteResolvedBuildConfig = UserConfig & BuildResolvedConfig;
165
- type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
166
- type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
167
- type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
168
- type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
169
- type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
170
- type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
171
- output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
172
- } & BuildConfig;
173
- type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
174
- type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
175
- type RolldownResolvedBuildConfig = RolldownOptions & BuildResolvedConfig;
176
- type TsupBuildConfig = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
177
- type TsupResolvedBuildConfig = BuildOptions & BuildResolvedConfig;
178
- type TsdownBuildConfig = Partial<Omit<UserConfig$2, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
179
- type TsdownResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
180
- type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
181
- type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
182
- type FarmBuildConfig = Partial<Omit<UserConfig$1, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
183
- type FarmResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
184
- //#endregion
185
- export { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig };
@@ -1,8 +0,0 @@
1
- import { MaybePromise } from "@stryke/types/base";
2
- import { ArrayValues } from "@stryke/types/array";
3
-
4
- //#region ../powerlines/src/types/commands.d.ts
5
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
- //#endregion
8
- export { CommandType };
@@ -1,8 +0,0 @@
1
- import { MaybePromise } from "@stryke/types/base";
2
- import { ArrayValues } from "@stryke/types/array";
3
-
4
- //#region ../powerlines/src/types/commands.d.ts
5
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
6
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
7
- //#endregion
8
- export { CommandType };
@@ -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 };