@powerlines/plugin-biome 0.2.127 → 0.2.128
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.
- package/dist/index-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +2 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-CnfgQ02k.d.mts +1914 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DPLa1Ipz.d.cts +1914 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -169
- package/dist/types/plugin.d.mts +1 -169
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +2 -2
- package/dist/powerlines/src/types/babel.d.mts +0 -2
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { BiomePluginContext,
|
|
1
|
+
import { a as __ΩBiomePluginContext, c as __ΩBiomePluginUserConfig, i as BiomePluginUserConfig, n as BiomePluginOptions, o as __ΩBiomePluginOptions, r as BiomePluginResolvedConfig, s as __ΩBiomePluginResolvedConfig, t as BiomePluginContext } from "../plugin-DPLa1Ipz.cjs";
|
|
2
|
+
import "../index-CEgs-Dz2.cjs";
|
|
2
3
|
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { BiomePluginContext,
|
|
1
|
+
import { a as __ΩBiomePluginContext, c as __ΩBiomePluginUserConfig, i as BiomePluginUserConfig, n as BiomePluginOptions, o as __ΩBiomePluginOptions, r as BiomePluginResolvedConfig, s as __ΩBiomePluginResolvedConfig, t as BiomePluginContext } from "../plugin-CnfgQ02k.mjs";
|
|
2
|
+
import "../index-BgAdqTbb.mjs";
|
|
2
3
|
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,170 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
|
|
3
|
-
import { PluginContext } from "../powerlines/src/types/context.cjs";
|
|
4
|
-
|
|
5
|
-
//#region src/types/plugin.d.ts
|
|
6
|
-
interface BiomePluginOptions {
|
|
7
|
-
/**
|
|
8
|
-
* A glob pattern or path to ignore files and directories.
|
|
9
|
-
*/
|
|
10
|
-
ignorePatterns?: string | string[];
|
|
11
|
-
/**
|
|
12
|
-
* The path to the Biome configuration file.
|
|
13
|
-
*
|
|
14
|
-
* @defaultValue "biome.json"
|
|
15
|
-
*/
|
|
16
|
-
configFile?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to write changes to disk.
|
|
19
|
-
*
|
|
20
|
-
* @defaultValue false
|
|
21
|
-
*/
|
|
22
|
-
fix?: boolean | "unsafe";
|
|
23
|
-
/**
|
|
24
|
-
* Whether to enable the JavaScript linter.
|
|
25
|
-
*/
|
|
26
|
-
javascriptLinterEnabled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to enable the JSON linter.
|
|
29
|
-
*/
|
|
30
|
-
jsonLinterEnabled?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* The maximum file size to lint.
|
|
33
|
-
*/
|
|
34
|
-
filesMaxSize?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Whether to ignore unknown files.
|
|
37
|
-
*/
|
|
38
|
-
filesIgnoreUnknown?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Set the formatting mode for markup: `false` prints everything as plain text, `“force”` forces the formatting of markup using ANSI even if the console output is determined to be incompatible.
|
|
41
|
-
*/
|
|
42
|
-
colors?: false | "force";
|
|
43
|
-
/**
|
|
44
|
-
* The output format to use.
|
|
45
|
-
*
|
|
46
|
-
* @defaultValue "stylish"
|
|
47
|
-
*/
|
|
48
|
-
format?: "stylish" | "compact" | "json" | "json-pretty" | "junit" | "github";
|
|
49
|
-
/**
|
|
50
|
-
* The maximum number of diagnostics to report.
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue 20
|
|
53
|
-
*/
|
|
54
|
-
maxDiagnostics?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Skip over files containing syntax errors instead of emitting an error diagnostic.
|
|
57
|
-
*/
|
|
58
|
-
skipParseErrors?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Silence errors that would be emitted in case no files were processed during the execution of the command.
|
|
61
|
-
*/
|
|
62
|
-
noErrorsOnUnmatched?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Tell Biome to exit with an error code if some diagnostics emit warnings.
|
|
65
|
-
*/
|
|
66
|
-
errorOnWarnings?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Allows JSON files with comments to be used as configuration files.
|
|
69
|
-
*/
|
|
70
|
-
jsonParseAllowComments?: true;
|
|
71
|
-
/**
|
|
72
|
-
* Allows JSON files with trailing commas to be used as configuration files.
|
|
73
|
-
*/
|
|
74
|
-
jsonParseAllowTrailingCommas?: true;
|
|
75
|
-
/**
|
|
76
|
-
* Allows to change how diagnostics and summary are reported.
|
|
77
|
-
*/
|
|
78
|
-
reporter?: "json" | "json-pretty" | "github" | "junit" | "summary" | "gitlab" | "checkstyle" | "rdjson";
|
|
79
|
-
/**
|
|
80
|
-
* The output format to use.
|
|
81
|
-
*
|
|
82
|
-
* @defaultValue "pretty"
|
|
83
|
-
*/
|
|
84
|
-
logKind?: "pretty" | "compact" | "json";
|
|
85
|
-
/**
|
|
86
|
-
* The level of diagnostics to report.
|
|
87
|
-
*
|
|
88
|
-
* @defaultValue "info"
|
|
89
|
-
*/
|
|
90
|
-
diagnosticLevel?: "error" | "warn" | "info";
|
|
91
|
-
/**
|
|
92
|
-
* Fixes lint rule violations with comment suppressions instead of using a rule code action (fix)
|
|
93
|
-
*/
|
|
94
|
-
suppress?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* The reason for suppressing a lint rule violation.
|
|
97
|
-
*/
|
|
98
|
-
reason?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Run only the given rule, group of rules or domain. If the severity level of a rule is `off`, then the severity level of the rule is set to `error` if it is a recommended rule or `warn` otherwise.
|
|
101
|
-
*/
|
|
102
|
-
only?: string[];
|
|
103
|
-
/**
|
|
104
|
-
* Skip the given rule, group of rules or domain by setting the severity level of the rules to `off`. This option takes precedence over {@link only}.
|
|
105
|
-
*/
|
|
106
|
-
skip?: string[];
|
|
107
|
-
/**
|
|
108
|
-
* Use this option when you want to format code piped from stdin, and print the output to stdout.
|
|
109
|
-
*/
|
|
110
|
-
stdinFilePath?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Whether to enable version control system integration.
|
|
113
|
-
*/
|
|
114
|
-
vcsEnabled?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* The kind of version control system client.
|
|
117
|
-
*
|
|
118
|
-
* @defaultValue "git"
|
|
119
|
-
*/
|
|
120
|
-
vcsClientKind?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Whether to use the VCS ignore file to exclude files from linting.
|
|
123
|
-
*/
|
|
124
|
-
vcsUseIgnoreFile?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* The default branch name in the version control system.
|
|
127
|
-
*
|
|
128
|
-
* @defaultValue "main"
|
|
129
|
-
*/
|
|
130
|
-
vcsDefaultBranch?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Whether to lint only staged files in the version control system.
|
|
133
|
-
*/
|
|
134
|
-
staged?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Whether to lint only changed files in the version control system.
|
|
137
|
-
*/
|
|
138
|
-
changed?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Additional parameters to pass to the Biome CLI
|
|
141
|
-
*/
|
|
142
|
-
params?: string;
|
|
143
|
-
/**
|
|
144
|
-
* The path to the Biome binary
|
|
145
|
-
*/
|
|
146
|
-
biomePath?: string;
|
|
147
|
-
}
|
|
148
|
-
interface BiomePluginUserConfig extends UserConfig {
|
|
149
|
-
/**
|
|
150
|
-
* Options for the Biome plugin.
|
|
151
|
-
*/
|
|
152
|
-
lint?: {
|
|
153
|
-
biome?: BiomePluginOptions;
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
interface BiomePluginResolvedConfig extends ResolvedConfig {
|
|
157
|
-
/**
|
|
158
|
-
* Options for the Biome plugin.
|
|
159
|
-
*/
|
|
160
|
-
lint: {
|
|
161
|
-
biome: BiomePluginOptions;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
type BiomePluginContext<TResolvedConfig extends BiomePluginResolvedConfig = BiomePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
165
|
-
declare type __ΩBiomePluginOptions = any[];
|
|
166
|
-
declare type __ΩBiomePluginUserConfig = any[];
|
|
167
|
-
declare type __ΩBiomePluginResolvedConfig = any[];
|
|
168
|
-
declare type __ΩBiomePluginContext = any[];
|
|
169
|
-
//#endregion
|
|
1
|
+
import { a as __ΩBiomePluginContext, c as __ΩBiomePluginUserConfig, i as BiomePluginUserConfig, n as BiomePluginOptions, o as __ΩBiomePluginOptions, r as BiomePluginResolvedConfig, s as __ΩBiomePluginResolvedConfig, t as BiomePluginContext } from "../plugin-DPLa1Ipz.cjs";
|
|
170
2
|
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,170 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
|
|
3
|
-
import { PluginContext } from "../powerlines/src/types/context.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/types/plugin.d.ts
|
|
6
|
-
interface BiomePluginOptions {
|
|
7
|
-
/**
|
|
8
|
-
* A glob pattern or path to ignore files and directories.
|
|
9
|
-
*/
|
|
10
|
-
ignorePatterns?: string | string[];
|
|
11
|
-
/**
|
|
12
|
-
* The path to the Biome configuration file.
|
|
13
|
-
*
|
|
14
|
-
* @defaultValue "biome.json"
|
|
15
|
-
*/
|
|
16
|
-
configFile?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to write changes to disk.
|
|
19
|
-
*
|
|
20
|
-
* @defaultValue false
|
|
21
|
-
*/
|
|
22
|
-
fix?: boolean | "unsafe";
|
|
23
|
-
/**
|
|
24
|
-
* Whether to enable the JavaScript linter.
|
|
25
|
-
*/
|
|
26
|
-
javascriptLinterEnabled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to enable the JSON linter.
|
|
29
|
-
*/
|
|
30
|
-
jsonLinterEnabled?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* The maximum file size to lint.
|
|
33
|
-
*/
|
|
34
|
-
filesMaxSize?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Whether to ignore unknown files.
|
|
37
|
-
*/
|
|
38
|
-
filesIgnoreUnknown?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Set the formatting mode for markup: `false` prints everything as plain text, `“force”` forces the formatting of markup using ANSI even if the console output is determined to be incompatible.
|
|
41
|
-
*/
|
|
42
|
-
colors?: false | "force";
|
|
43
|
-
/**
|
|
44
|
-
* The output format to use.
|
|
45
|
-
*
|
|
46
|
-
* @defaultValue "stylish"
|
|
47
|
-
*/
|
|
48
|
-
format?: "stylish" | "compact" | "json" | "json-pretty" | "junit" | "github";
|
|
49
|
-
/**
|
|
50
|
-
* The maximum number of diagnostics to report.
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue 20
|
|
53
|
-
*/
|
|
54
|
-
maxDiagnostics?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Skip over files containing syntax errors instead of emitting an error diagnostic.
|
|
57
|
-
*/
|
|
58
|
-
skipParseErrors?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Silence errors that would be emitted in case no files were processed during the execution of the command.
|
|
61
|
-
*/
|
|
62
|
-
noErrorsOnUnmatched?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Tell Biome to exit with an error code if some diagnostics emit warnings.
|
|
65
|
-
*/
|
|
66
|
-
errorOnWarnings?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Allows JSON files with comments to be used as configuration files.
|
|
69
|
-
*/
|
|
70
|
-
jsonParseAllowComments?: true;
|
|
71
|
-
/**
|
|
72
|
-
* Allows JSON files with trailing commas to be used as configuration files.
|
|
73
|
-
*/
|
|
74
|
-
jsonParseAllowTrailingCommas?: true;
|
|
75
|
-
/**
|
|
76
|
-
* Allows to change how diagnostics and summary are reported.
|
|
77
|
-
*/
|
|
78
|
-
reporter?: "json" | "json-pretty" | "github" | "junit" | "summary" | "gitlab" | "checkstyle" | "rdjson";
|
|
79
|
-
/**
|
|
80
|
-
* The output format to use.
|
|
81
|
-
*
|
|
82
|
-
* @defaultValue "pretty"
|
|
83
|
-
*/
|
|
84
|
-
logKind?: "pretty" | "compact" | "json";
|
|
85
|
-
/**
|
|
86
|
-
* The level of diagnostics to report.
|
|
87
|
-
*
|
|
88
|
-
* @defaultValue "info"
|
|
89
|
-
*/
|
|
90
|
-
diagnosticLevel?: "error" | "warn" | "info";
|
|
91
|
-
/**
|
|
92
|
-
* Fixes lint rule violations with comment suppressions instead of using a rule code action (fix)
|
|
93
|
-
*/
|
|
94
|
-
suppress?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* The reason for suppressing a lint rule violation.
|
|
97
|
-
*/
|
|
98
|
-
reason?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Run only the given rule, group of rules or domain. If the severity level of a rule is `off`, then the severity level of the rule is set to `error` if it is a recommended rule or `warn` otherwise.
|
|
101
|
-
*/
|
|
102
|
-
only?: string[];
|
|
103
|
-
/**
|
|
104
|
-
* Skip the given rule, group of rules or domain by setting the severity level of the rules to `off`. This option takes precedence over {@link only}.
|
|
105
|
-
*/
|
|
106
|
-
skip?: string[];
|
|
107
|
-
/**
|
|
108
|
-
* Use this option when you want to format code piped from stdin, and print the output to stdout.
|
|
109
|
-
*/
|
|
110
|
-
stdinFilePath?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Whether to enable version control system integration.
|
|
113
|
-
*/
|
|
114
|
-
vcsEnabled?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* The kind of version control system client.
|
|
117
|
-
*
|
|
118
|
-
* @defaultValue "git"
|
|
119
|
-
*/
|
|
120
|
-
vcsClientKind?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Whether to use the VCS ignore file to exclude files from linting.
|
|
123
|
-
*/
|
|
124
|
-
vcsUseIgnoreFile?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* The default branch name in the version control system.
|
|
127
|
-
*
|
|
128
|
-
* @defaultValue "main"
|
|
129
|
-
*/
|
|
130
|
-
vcsDefaultBranch?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Whether to lint only staged files in the version control system.
|
|
133
|
-
*/
|
|
134
|
-
staged?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Whether to lint only changed files in the version control system.
|
|
137
|
-
*/
|
|
138
|
-
changed?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Additional parameters to pass to the Biome CLI
|
|
141
|
-
*/
|
|
142
|
-
params?: string;
|
|
143
|
-
/**
|
|
144
|
-
* The path to the Biome binary
|
|
145
|
-
*/
|
|
146
|
-
biomePath?: string;
|
|
147
|
-
}
|
|
148
|
-
interface BiomePluginUserConfig extends UserConfig {
|
|
149
|
-
/**
|
|
150
|
-
* Options for the Biome plugin.
|
|
151
|
-
*/
|
|
152
|
-
lint?: {
|
|
153
|
-
biome?: BiomePluginOptions;
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
interface BiomePluginResolvedConfig extends ResolvedConfig {
|
|
157
|
-
/**
|
|
158
|
-
* Options for the Biome plugin.
|
|
159
|
-
*/
|
|
160
|
-
lint: {
|
|
161
|
-
biome: BiomePluginOptions;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
type BiomePluginContext<TResolvedConfig extends BiomePluginResolvedConfig = BiomePluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
165
|
-
declare type __ΩBiomePluginOptions = any[];
|
|
166
|
-
declare type __ΩBiomePluginUserConfig = any[];
|
|
167
|
-
declare type __ΩBiomePluginResolvedConfig = any[];
|
|
168
|
-
declare type __ΩBiomePluginContext = any[];
|
|
169
|
-
//#endregion
|
|
1
|
+
import { a as __ΩBiomePluginContext, c as __ΩBiomePluginUserConfig, i as BiomePluginUserConfig, n as BiomePluginOptions, o as __ΩBiomePluginOptions, r as BiomePluginResolvedConfig, s as __ΩBiomePluginResolvedConfig, t as BiomePluginContext } from "../plugin-CnfgQ02k.mjs";
|
|
170
2
|
export { BiomePluginContext, BiomePluginOptions, BiomePluginResolvedConfig, BiomePluginUserConfig, __ΩBiomePluginContext, __ΩBiomePluginOptions, __ΩBiomePluginResolvedConfig, __ΩBiomePluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-biome",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.128",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for running Biome linting on the codebase.",
|
|
6
6
|
"repository": {
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"@types/node": "^24.10.4"
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": { "access": "public" },
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "a703a2dd9be6175a67a9bf4847d0217be4e920af"
|
|
121
121
|
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
//#region ../powerlines/src/types/build.d.ts
|
|
2
|
-
|
|
3
|
-
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
4
|
-
interface BuildConfig {
|
|
5
|
-
/**
|
|
6
|
-
* The platform to build the project for
|
|
7
|
-
*
|
|
8
|
-
* @defaultValue "neutral"
|
|
9
|
-
*/
|
|
10
|
-
platform?: "node" | "browser" | "neutral";
|
|
11
|
-
/**
|
|
12
|
-
* Array of strings indicating the polyfills to include for the build.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* 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).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* {
|
|
20
|
-
* polyfill: ['{projectRoot}/custom-polyfill.ts']
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
polyfill?: string[];
|
|
25
|
-
/**
|
|
26
|
-
* 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.
|
|
27
|
-
*
|
|
28
|
-
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
29
|
-
*/
|
|
30
|
-
mainFields?: string[];
|
|
31
|
-
/**
|
|
32
|
-
* Array of strings indicating what conditions should be used for module resolution.
|
|
33
|
-
*/
|
|
34
|
-
conditions?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* Array of strings indicating what file extensions should be used for module resolution.
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
39
|
-
*/
|
|
40
|
-
extensions?: string[];
|
|
41
|
-
/**
|
|
42
|
-
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* 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.
|
|
46
|
-
*/
|
|
47
|
-
dedupe?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
50
|
-
*/
|
|
51
|
-
builtins?: (string | RegExp)[];
|
|
52
|
-
/**
|
|
53
|
-
* Define global variable replacements.
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* 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.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* {
|
|
61
|
-
* define: {
|
|
62
|
-
* __VERSION__: '"1.0.0"',
|
|
63
|
-
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
64
|
-
* }
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @see https://esbuild.github.io/api/#define
|
|
69
|
-
* @see https://vitejs.dev/config/build-options.html#define
|
|
70
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
71
|
-
*/
|
|
72
|
-
define?: Record<string, any>;
|
|
73
|
-
/**
|
|
74
|
-
* Global variables that will have import statements injected where necessary
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* 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.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```ts
|
|
81
|
-
* {
|
|
82
|
-
* inject: {
|
|
83
|
-
* process: 'process/browser',
|
|
84
|
-
* Buffer: ['buffer', 'Buffer'],
|
|
85
|
-
* }
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
90
|
-
*/
|
|
91
|
-
inject?: Record<string, string | string[]>;
|
|
92
|
-
/**
|
|
93
|
-
* The alias mappings to use for module resolution during the build process.
|
|
94
|
-
*
|
|
95
|
-
* @remarks
|
|
96
|
-
* This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```ts
|
|
100
|
-
* {
|
|
101
|
-
* alias: {
|
|
102
|
-
* "@utils": "./src/utils",
|
|
103
|
-
* "@components": "./src/components"
|
|
104
|
-
* }
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
109
|
-
*/
|
|
110
|
-
alias?: Record<string, string> | Array<{
|
|
111
|
-
find: string | RegExp;
|
|
112
|
-
replacement: string;
|
|
113
|
-
}>;
|
|
114
|
-
/**
|
|
115
|
-
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
116
|
-
*
|
|
117
|
-
* @remarks
|
|
118
|
-
* 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.
|
|
119
|
-
*/
|
|
120
|
-
external?: (string | RegExp)[];
|
|
121
|
-
/**
|
|
122
|
-
* A list of modules that should always be bundled, even if they are external dependencies.
|
|
123
|
-
*/
|
|
124
|
-
noExternal?: (string | RegExp)[];
|
|
125
|
-
/**
|
|
126
|
-
* Should the Powerlines CLI processes skip bundling the `node_modules` directory?
|
|
127
|
-
*/
|
|
128
|
-
skipNodeModulesBundle?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* 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.
|
|
131
|
-
*
|
|
132
|
-
* @defaultValue false
|
|
133
|
-
*/
|
|
134
|
-
keepProcessEnv?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* An optional set of override options to apply to the selected build variant.
|
|
137
|
-
*
|
|
138
|
-
* @remarks
|
|
139
|
-
* 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.
|
|
140
|
-
*/
|
|
141
|
-
override?: Record<string, any>;
|
|
142
|
-
}
|
|
143
|
-
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
144
|
-
//#endregion
|
|
145
|
-
export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
//#region ../powerlines/src/types/build.d.ts
|
|
2
|
-
|
|
3
|
-
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
4
|
-
interface BuildConfig {
|
|
5
|
-
/**
|
|
6
|
-
* The platform to build the project for
|
|
7
|
-
*
|
|
8
|
-
* @defaultValue "neutral"
|
|
9
|
-
*/
|
|
10
|
-
platform?: "node" | "browser" | "neutral";
|
|
11
|
-
/**
|
|
12
|
-
* Array of strings indicating the polyfills to include for the build.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* 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).
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* {
|
|
20
|
-
* polyfill: ['{projectRoot}/custom-polyfill.ts']
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
polyfill?: string[];
|
|
25
|
-
/**
|
|
26
|
-
* 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.
|
|
27
|
-
*
|
|
28
|
-
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
29
|
-
*/
|
|
30
|
-
mainFields?: string[];
|
|
31
|
-
/**
|
|
32
|
-
* Array of strings indicating what conditions should be used for module resolution.
|
|
33
|
-
*/
|
|
34
|
-
conditions?: string[];
|
|
35
|
-
/**
|
|
36
|
-
* Array of strings indicating what file extensions should be used for module resolution.
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
39
|
-
*/
|
|
40
|
-
extensions?: string[];
|
|
41
|
-
/**
|
|
42
|
-
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* 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.
|
|
46
|
-
*/
|
|
47
|
-
dedupe?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
50
|
-
*/
|
|
51
|
-
builtins?: (string | RegExp)[];
|
|
52
|
-
/**
|
|
53
|
-
* Define global variable replacements.
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* 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.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* {
|
|
61
|
-
* define: {
|
|
62
|
-
* __VERSION__: '"1.0.0"',
|
|
63
|
-
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
64
|
-
* }
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @see https://esbuild.github.io/api/#define
|
|
69
|
-
* @see https://vitejs.dev/config/build-options.html#define
|
|
70
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
71
|
-
*/
|
|
72
|
-
define?: Record<string, any>;
|
|
73
|
-
/**
|
|
74
|
-
* Global variables that will have import statements injected where necessary
|
|
75
|
-
*
|
|
76
|
-
* @remarks
|
|
77
|
-
* 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.
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```ts
|
|
81
|
-
* {
|
|
82
|
-
* inject: {
|
|
83
|
-
* process: 'process/browser',
|
|
84
|
-
* Buffer: ['buffer', 'Buffer'],
|
|
85
|
-
* }
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
90
|
-
*/
|
|
91
|
-
inject?: Record<string, string | string[]>;
|
|
92
|
-
/**
|
|
93
|
-
* The alias mappings to use for module resolution during the build process.
|
|
94
|
-
*
|
|
95
|
-
* @remarks
|
|
96
|
-
* This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```ts
|
|
100
|
-
* {
|
|
101
|
-
* alias: {
|
|
102
|
-
* "@utils": "./src/utils",
|
|
103
|
-
* "@components": "./src/components"
|
|
104
|
-
* }
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
109
|
-
*/
|
|
110
|
-
alias?: Record<string, string> | Array<{
|
|
111
|
-
find: string | RegExp;
|
|
112
|
-
replacement: string;
|
|
113
|
-
}>;
|
|
114
|
-
/**
|
|
115
|
-
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
116
|
-
*
|
|
117
|
-
* @remarks
|
|
118
|
-
* 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.
|
|
119
|
-
*/
|
|
120
|
-
external?: (string | RegExp)[];
|
|
121
|
-
/**
|
|
122
|
-
* A list of modules that should always be bundled, even if they are external dependencies.
|
|
123
|
-
*/
|
|
124
|
-
noExternal?: (string | RegExp)[];
|
|
125
|
-
/**
|
|
126
|
-
* Should the Powerlines CLI processes skip bundling the `node_modules` directory?
|
|
127
|
-
*/
|
|
128
|
-
skipNodeModulesBundle?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* 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.
|
|
131
|
-
*
|
|
132
|
-
* @defaultValue false
|
|
133
|
-
*/
|
|
134
|
-
keepProcessEnv?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* An optional set of override options to apply to the selected build variant.
|
|
137
|
-
*
|
|
138
|
-
* @remarks
|
|
139
|
-
* 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.
|
|
140
|
-
*/
|
|
141
|
-
override?: Record<string, any>;
|
|
142
|
-
}
|
|
143
|
-
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
144
|
-
//#endregion
|
|
145
|
-
export { BuildConfig, BuildResolvedConfig, UnpluginBuildVariant };
|