@powerlines/plugin-jest 0.1.129 → 0.1.131

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 (40) hide show
  1. package/dist/index-BgAdqTbb.d.mts +1 -0
  2. package/dist/index-CEgs-Dz2.d.cts +1 -0
  3. package/dist/index.cjs +30 -2
  4. package/dist/index.d.cts +2 -2
  5. package/dist/index.d.mts +2 -3
  6. package/dist/index.mjs +2 -0
  7. package/dist/plugin-C3MaN5jp.mjs +1 -0
  8. package/dist/plugin-CvpdyJpL.d.mts +1970 -0
  9. package/dist/plugin-D6-1lgZd.d.cts +1970 -0
  10. package/dist/plugin-DHXHjv16.cjs +0 -0
  11. package/dist/types/index.cjs +2 -0
  12. package/dist/types/index.d.cts +2 -1
  13. package/dist/types/index.d.mts +2 -1
  14. package/dist/types/index.mjs +3 -0
  15. package/dist/types/plugin.cjs +1 -0
  16. package/dist/types/plugin.d.cts +1 -218
  17. package/dist/types/plugin.d.mts +1 -218
  18. package/dist/types/plugin.mjs +2 -0
  19. package/dist/types-CTUnla4x.mjs +1 -0
  20. package/dist/types-DHkg7xmX.cjs +0 -0
  21. package/package.json +4 -4
  22. package/dist/_virtual/rolldown_runtime.cjs +0 -29
  23. package/dist/powerlines/src/types/babel.d.mts +0 -2
  24. package/dist/powerlines/src/types/build.d.cts +0 -145
  25. package/dist/powerlines/src/types/build.d.mts +0 -145
  26. package/dist/powerlines/src/types/commands.d.cts +0 -8
  27. package/dist/powerlines/src/types/commands.d.mts +0 -9
  28. package/dist/powerlines/src/types/config.d.cts +0 -369
  29. package/dist/powerlines/src/types/config.d.mts +0 -369
  30. package/dist/powerlines/src/types/context.d.cts +0 -403
  31. package/dist/powerlines/src/types/context.d.mts +0 -405
  32. package/dist/powerlines/src/types/fs.d.cts +0 -486
  33. package/dist/powerlines/src/types/fs.d.mts +0 -486
  34. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  35. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  36. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  37. package/dist/powerlines/src/types/resolved.d.cts +0 -81
  38. package/dist/powerlines/src/types/resolved.d.mts +0 -81
  39. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  40. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
File without changes
@@ -0,0 +1,2 @@
1
+ require('../plugin-DHXHjv16.cjs');
2
+ require('../types-DHkg7xmX.cjs');
@@ -1,2 +1,3 @@
1
- import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.cjs";
1
+ import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "../plugin-D6-1lgZd.cjs";
2
+ import "../index-CEgs-Dz2.cjs";
2
3
  export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1,2 +1,3 @@
1
- import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./plugin.mjs";
1
+ import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "../plugin-CvpdyJpL.mjs";
2
+ import "../index-BgAdqTbb.mjs";
2
3
  export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1 +1,4 @@
1
+ import "../plugin-C3MaN5jp.mjs";
2
+ import "../types-CTUnla4x.mjs";
3
+
1
4
  export { };
@@ -0,0 +1 @@
1
+ require('../plugin-DHXHjv16.cjs');
@@ -1,219 +1,2 @@
1
- import { UserConfig } from "../powerlines/src/types/config.cjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
- import { PluginContext } from "../powerlines/src/types/context.cjs";
4
- import { Config } from "@jest/types";
5
-
6
- //#region src/types/plugin.d.ts
7
- interface JestPluginOptions {
8
- /**
9
- * Indicates that test coverage information should be collected and reported in the output.
10
- *
11
- * @see https://jestjs.io/docs/cli#--coverage
12
- */
13
- codeCoverage?: boolean;
14
- /**
15
- * The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project.
16
- *
17
- * @see https://jestjs.io/docs/cli#--configpath
18
- */
19
- configFile?: string;
20
- /**
21
- * Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
22
- *
23
- * @see https://jestjs.io/docs/cli#--detectopenhandles
24
- */
25
- detectOpenHandles?: boolean;
26
- /**
27
- * Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
28
- */
29
- logHeapUsage?: boolean;
30
- /**
31
- * **EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked
32
- */
33
- detectLeaks?: boolean;
34
- /**
35
- * The name of the file to test.
36
- */
37
- testFile?: string;
38
- /**
39
- * Exit the test suite immediately after `n` number of failing tests.
40
- *
41
- * @see https://jestjs.io/docs/cli#--bail
42
- */
43
- bail?: boolean | number;
44
- /**
45
- * Continuous Integration mode. If true, Jest will run tests once and exit.
46
- */
47
- ci?: boolean;
48
- /**
49
- * Enables colored output.
50
- */
51
- color?: boolean;
52
- /**
53
- * Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
54
- */
55
- clearCache?: boolean;
56
- /**
57
- * Find and run the tests that cover a list of source files.
58
- *
59
- * @see https://jestjs.io/docs/cli#--findrelatedtests
60
- */
61
- findRelatedTests?: string[];
62
- /**
63
- * Force Jest to exit after all tests have completed running. This is useful when resources set up by test code cannot be adequately cleaned up.
64
- */
65
- forceExit?: boolean;
66
- /**
67
- * Enables JSON output.
68
- */
69
- json?: boolean;
70
- /**
71
- * Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default)
72
- *
73
- * @see https://jestjs.io/docs/cli#--maxworkersnumberstring
74
- */
75
- maxWorkers?: number | string;
76
- /**
77
- * Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment.
78
- *
79
- * @see https://jestjs.io/docs/cli#--onlychanged
80
- */
81
- onlyChanged?: boolean;
82
- /**
83
- * Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested.
84
- *
85
- * @see https://jestjs.io/docs/cli#--changedsince
86
- */
87
- changedSince?: string;
88
- /**
89
- * The path to a JSON file that Jest should write test results to.
90
- */
91
- outputFile?: string;
92
- /**
93
- * Exit with code 0 even if no tests are found.
94
- *
95
- * @see https://jestjs.io/docs/cli#--passwithnotests
96
- *
97
- * @defaultValue true
98
- */
99
- passWithNoTests?: boolean;
100
- /**
101
- * Randomize the order of test execution
102
- */
103
- randomize?: boolean;
104
- /**
105
- * Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI.
106
- *
107
- * @see https://jestjs.io/docs/cli#--runinband
108
- */
109
- runInBand?: boolean;
110
- /**
111
- * Print your Jest config and then exits.
112
- *
113
- * @see https://jestjs.io/docs/cli#--showconfig
114
- */
115
- showConfig?: boolean;
116
- /**
117
- * Prevent tests from printing messages through the console.
118
- *
119
- * @see https://jestjs.io/docs/cli#--silent
120
- */
121
- silent?: boolean;
122
- /**
123
- * Run only tests with a name that matches the regex pattern.
124
- *
125
- * @see https://jestjs.io/docs/cli#--testnamepatternregex
126
- */
127
- testNamePattern?: string;
128
- /**
129
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions.
130
- *
131
- * @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
132
- */
133
- testPathIgnorePatterns?: string[];
134
- /**
135
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run tests with a path that matches the provided regexp expressions.
136
- *
137
- * @see https://jestjs.io/docs/cli#--testpathpatternsregex
138
- */
139
- testPathPatterns?: string[];
140
- /**
141
- * Enables colored output.
142
- */
143
- colors?: boolean;
144
- /**
145
- * A list of reporters to use for test results
146
- */
147
- reporters?: string[];
148
- /**
149
- * Display individual test results with the test suite hierarchy.
150
- *
151
- * @see https://jestjs.io/docs/cli#--verbose
152
- */
153
- verbose?: boolean;
154
- /**
155
- * A list of coverage reporters to use
156
- */
157
- coverageReporters?: string[];
158
- /**
159
- * The directory where Jest should output its coverage files.
160
- */
161
- coverageDirectory?: string;
162
- /**
163
- * A Node module that implements a custom results processor.
164
- */
165
- testResultsProcessor?: string;
166
- /**
167
- * Update snapshots during this test run.
168
- */
169
- updateSnapshot?: boolean;
170
- /**
171
- * Divert all output to stderr.
172
- */
173
- useStderr?: boolean;
174
- /**
175
- * Watch files for changes and rerun tests related to changed files.
176
- */
177
- watch?: boolean;
178
- /**
179
- * Watch files for changes and rerun all tests when something changes.
180
- */
181
- watchAll?: boolean;
182
- /**
183
- * Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
184
- *
185
- * @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
186
- */
187
- testLocationInResults?: boolean;
188
- /**
189
- * Default timeout of a test in milliseconds.
190
- *
191
- * @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
192
- *
193
- * @defaultValue 5000
194
- */
195
- testTimeout?: number;
196
- }
197
- interface JestPluginUserConfig extends UserConfig {
198
- test: {
199
- /**
200
- * Jest transformation options
201
- */
202
- jest: Config.Argv;
203
- };
204
- }
205
- interface JestPluginResolvedConfig extends ResolvedConfig {
206
- test: {
207
- /**
208
- * Resolved Jest transformation options
209
- */
210
- jest: Config.Argv;
211
- };
212
- }
213
- type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
214
- declare type __ΩJestPluginOptions = any[];
215
- declare type __ΩJestPluginUserConfig = any[];
216
- declare type __ΩJestPluginResolvedConfig = any[];
217
- declare type __ΩJestPluginContext = any[];
218
- //#endregion
1
+ import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "../plugin-D6-1lgZd.cjs";
219
2
  export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1,219 +1,2 @@
1
- import { UserConfig } from "../powerlines/src/types/config.mjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
- import { PluginContext } from "../powerlines/src/types/context.mjs";
4
- import { Config } from "@jest/types";
5
-
6
- //#region src/types/plugin.d.ts
7
- interface JestPluginOptions {
8
- /**
9
- * Indicates that test coverage information should be collected and reported in the output.
10
- *
11
- * @see https://jestjs.io/docs/cli#--coverage
12
- */
13
- codeCoverage?: boolean;
14
- /**
15
- * The path to a Jest config file specifying how to find and execute tests. If no `rootDir` is set in the config, the directory containing the config file is assumed to be the `rootDir` for the project.
16
- *
17
- * @see https://jestjs.io/docs/cli#--configpath
18
- */
19
- configFile?: string;
20
- /**
21
- * Attempt to collect and print open handles preventing Jest from exiting cleanly after all tests have completed.
22
- *
23
- * @see https://jestjs.io/docs/cli#--detectopenhandles
24
- */
25
- detectOpenHandles?: boolean;
26
- /**
27
- * Logs the heap usage after every test. Useful to debug memory leaks. Use together with --runInBand and --expose-gc in node.
28
- */
29
- logHeapUsage?: boolean;
30
- /**
31
- * **EXPERIMENTAL**: Detect memory leaks in tests. After executing a test, it will try to garbage collect the global object used, and fail if it was leaked
32
- */
33
- detectLeaks?: boolean;
34
- /**
35
- * The name of the file to test.
36
- */
37
- testFile?: string;
38
- /**
39
- * Exit the test suite immediately after `n` number of failing tests.
40
- *
41
- * @see https://jestjs.io/docs/cli#--bail
42
- */
43
- bail?: boolean | number;
44
- /**
45
- * Continuous Integration mode. If true, Jest will run tests once and exit.
46
- */
47
- ci?: boolean;
48
- /**
49
- * Enables colored output.
50
- */
51
- color?: boolean;
52
- /**
53
- * Deletes the Jest cache directory and then exits without running tests. Will delete Jest's default cache directory.
54
- */
55
- clearCache?: boolean;
56
- /**
57
- * Find and run the tests that cover a list of source files.
58
- *
59
- * @see https://jestjs.io/docs/cli#--findrelatedtests
60
- */
61
- findRelatedTests?: string[];
62
- /**
63
- * Force Jest to exit after all tests have completed running. This is useful when resources set up by test code cannot be adequately cleaned up.
64
- */
65
- forceExit?: boolean;
66
- /**
67
- * Enables JSON output.
68
- */
69
- json?: boolean;
70
- /**
71
- * Specifies the maximum number of workers the worker-pool will spawn for running tests. This defaults to the number of the cores available on your machine. Useful for CI. (its usually best not to override this default)
72
- *
73
- * @see https://jestjs.io/docs/cli#--maxworkersnumberstring
74
- */
75
- maxWorkers?: number | string;
76
- /**
77
- * Attempts to identify which tests to run based on which files have changed in the current repository. Only works if you're running tests in a `git` or `hg` repository at the moment.
78
- *
79
- * @see https://jestjs.io/docs/cli#--onlychanged
80
- */
81
- onlyChanged?: boolean;
82
- /**
83
- * Runs tests related to the changes since the provided branch or commit hash. If the current branch has diverged from the given branch, then only changes made locally will be tested.
84
- *
85
- * @see https://jestjs.io/docs/cli#--changedsince
86
- */
87
- changedSince?: string;
88
- /**
89
- * The path to a JSON file that Jest should write test results to.
90
- */
91
- outputFile?: string;
92
- /**
93
- * Exit with code 0 even if no tests are found.
94
- *
95
- * @see https://jestjs.io/docs/cli#--passwithnotests
96
- *
97
- * @defaultValue true
98
- */
99
- passWithNoTests?: boolean;
100
- /**
101
- * Randomize the order of test execution
102
- */
103
- randomize?: boolean;
104
- /**
105
- * Run all tests serially in the current process (rather than creating a worker pool of child processes that run tests). This is sometimes useful for debugging, but such use cases are pretty rare. Useful for CI.
106
- *
107
- * @see https://jestjs.io/docs/cli#--runinband
108
- */
109
- runInBand?: boolean;
110
- /**
111
- * Print your Jest config and then exits.
112
- *
113
- * @see https://jestjs.io/docs/cli#--showconfig
114
- */
115
- showConfig?: boolean;
116
- /**
117
- * Prevent tests from printing messages through the console.
118
- *
119
- * @see https://jestjs.io/docs/cli#--silent
120
- */
121
- silent?: boolean;
122
- /**
123
- * Run only tests with a name that matches the regex pattern.
124
- *
125
- * @see https://jestjs.io/docs/cli#--testnamepatternregex
126
- */
127
- testNamePattern?: string;
128
- /**
129
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run those tests with a path that does not match with the provided regexp expressions.
130
- *
131
- * @see https://jestjs.io/docs/cli#--testpathignorepatternsregex
132
- */
133
- testPathIgnorePatterns?: string[];
134
- /**
135
- * An array of regexp pattern strings that is matched against all tests paths before executing the test. Only run tests with a path that matches the provided regexp expressions.
136
- *
137
- * @see https://jestjs.io/docs/cli#--testpathpatternsregex
138
- */
139
- testPathPatterns?: string[];
140
- /**
141
- * Enables colored output.
142
- */
143
- colors?: boolean;
144
- /**
145
- * A list of reporters to use for test results
146
- */
147
- reporters?: string[];
148
- /**
149
- * Display individual test results with the test suite hierarchy.
150
- *
151
- * @see https://jestjs.io/docs/cli#--verbose
152
- */
153
- verbose?: boolean;
154
- /**
155
- * A list of coverage reporters to use
156
- */
157
- coverageReporters?: string[];
158
- /**
159
- * The directory where Jest should output its coverage files.
160
- */
161
- coverageDirectory?: string;
162
- /**
163
- * A Node module that implements a custom results processor.
164
- */
165
- testResultsProcessor?: string;
166
- /**
167
- * Update snapshots during this test run.
168
- */
169
- updateSnapshot?: boolean;
170
- /**
171
- * Divert all output to stderr.
172
- */
173
- useStderr?: boolean;
174
- /**
175
- * Watch files for changes and rerun tests related to changed files.
176
- */
177
- watch?: boolean;
178
- /**
179
- * Watch files for changes and rerun all tests when something changes.
180
- */
181
- watchAll?: boolean;
182
- /**
183
- * Adds a location field to test results. Used to report location of a test in a reporter. Example: `{ "column": 4, "line": 5 }`.
184
- *
185
- * @see https://jestjs.io/docs/cli#--testlocationinresultsboolean
186
- */
187
- testLocationInResults?: boolean;
188
- /**
189
- * Default timeout of a test in milliseconds.
190
- *
191
- * @see https://jestjs.io/docs/cli#--testtimeoutmilliseconds
192
- *
193
- * @defaultValue 5000
194
- */
195
- testTimeout?: number;
196
- }
197
- interface JestPluginUserConfig extends UserConfig {
198
- test: {
199
- /**
200
- * Jest transformation options
201
- */
202
- jest: Config.Argv;
203
- };
204
- }
205
- interface JestPluginResolvedConfig extends ResolvedConfig {
206
- test: {
207
- /**
208
- * Resolved Jest transformation options
209
- */
210
- jest: Config.Argv;
211
- };
212
- }
213
- type JestPluginContext<TResolvedConfig extends JestPluginResolvedConfig = JestPluginResolvedConfig> = PluginContext<TResolvedConfig>;
214
- declare type __ΩJestPluginOptions = any[];
215
- declare type __ΩJestPluginUserConfig = any[];
216
- declare type __ΩJestPluginResolvedConfig = any[];
217
- declare type __ΩJestPluginContext = any[];
218
- //#endregion
1
+ import { a as __ΩJestPluginContext, c as __ΩJestPluginUserConfig, i as JestPluginUserConfig, n as JestPluginOptions, o as __ΩJestPluginOptions, r as JestPluginResolvedConfig, s as __ΩJestPluginResolvedConfig, t as JestPluginContext } from "../plugin-CvpdyJpL.mjs";
219
2
  export { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig };
@@ -1 +1,3 @@
1
+ import "../plugin-C3MaN5jp.mjs";
2
+
1
3
  export { };
@@ -0,0 +1 @@
1
+ export { };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-jest",
3
- "version": "0.1.129",
3
+ "version": "0.1.131",
4
4
  "type": "module",
5
5
  "description": "A package containing the Jest testing plugin for Powerlines.",
6
6
  "repository": {
@@ -127,13 +127,13 @@
127
127
  "jest-config": "^30.2.0",
128
128
  "jest-resolve": "^30.2.0",
129
129
  "jest-util": "^30.2.0",
130
- "powerlines": "^0.36.26"
130
+ "powerlines": "^0.36.27"
131
131
  },
132
132
  "devDependencies": {
133
133
  "@jest/types": "^30.2.0",
134
- "@powerlines/nx": "^0.11.52",
134
+ "@powerlines/nx": "^0.11.53",
135
135
  "@types/jest": "^30.0.0"
136
136
  },
137
137
  "publishConfig": { "access": "public" },
138
- "gitHead": "f27028746c0657470a2c93af2e3224565ae7fd61"
138
+ "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
139
139
  }
@@ -1,29 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
- key = keys[i];
12
- if (!__hasOwnProp.call(to, key) && key !== except) {
13
- __defProp(to, key, {
14
- get: ((k) => from[k]).bind(null, key),
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- }
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
-
27
- //#endregion
28
-
29
- exports.__toESM = __toESM;
@@ -1,2 +0,0 @@
1
- import "./config.mjs";
2
- import "./context.mjs";
@@ -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 };