@powerlines/plugin-rspack 0.5.298 → 0.5.300

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 (114) hide show
  1. package/dist/core/src/lib/logger.mjs +40 -0
  2. package/dist/core/src/lib/logger.mjs.map +1 -0
  3. package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
  4. package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
  5. package/dist/core/src/lib/unplugin/index.mjs +5 -0
  6. package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
  7. package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
  8. package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
  9. package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
  10. package/dist/core/src/lib/utilities/source-file.mjs +22 -0
  11. package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
  12. package/dist/core/src/types/api.d.mts +103 -0
  13. package/dist/core/src/types/api.d.mts.map +1 -0
  14. package/dist/core/src/types/commands.d.mts +10 -0
  15. package/dist/core/src/types/commands.d.mts.map +1 -0
  16. package/dist/core/src/types/config.d.mts +551 -0
  17. package/dist/core/src/types/config.d.mts.map +1 -0
  18. package/dist/core/src/types/context.d.mts +511 -0
  19. package/dist/core/src/types/context.d.mts.map +1 -0
  20. package/dist/core/src/types/fs.d.mts +487 -0
  21. package/dist/core/src/types/fs.d.mts.map +1 -0
  22. package/dist/core/src/types/hooks.d.mts +99 -0
  23. package/dist/core/src/types/hooks.d.mts.map +1 -0
  24. package/dist/core/src/types/index.d.mts +9 -0
  25. package/dist/core/src/types/plugin.d.mts +204 -0
  26. package/dist/core/src/types/plugin.d.mts.map +1 -0
  27. package/dist/core/src/types/tsconfig.d.mts +70 -0
  28. package/dist/core/src/types/tsconfig.d.mts.map +1 -0
  29. package/dist/core/src/types/unplugin.d.mts +25 -0
  30. package/dist/core/src/types/unplugin.d.mts.map +1 -0
  31. package/dist/core/src/types/unplugin.mjs +22 -0
  32. package/dist/core/src/types/unplugin.mjs.map +1 -0
  33. package/dist/helpers/index.d.mts +2 -1
  34. package/dist/helpers/index.mjs +2 -1
  35. package/dist/helpers/resolve-options.d.mts +16 -0
  36. package/dist/helpers/resolve-options.d.mts.map +1 -0
  37. package/dist/helpers/resolve-options.mjs +37 -0
  38. package/dist/helpers/resolve-options.mjs.map +1 -0
  39. package/dist/helpers/unplugin.mjs +3 -2
  40. package/dist/helpers/unplugin.mjs.map +1 -1
  41. package/dist/index.d.mts +6 -3
  42. package/dist/index.d.mts.map +1 -1
  43. package/dist/index.mjs +3 -3
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/types/build.d.mts +8 -0
  46. package/dist/types/build.d.mts.map +1 -0
  47. package/dist/types/build.mjs +1 -0
  48. package/dist/types/index.d.mts +3 -2
  49. package/dist/types/plugin.d.mts +13 -6
  50. package/dist/types/plugin.d.mts.map +1 -1
  51. package/package.json +27 -98
  52. package/dist/_virtual/rolldown_runtime.cjs +0 -31
  53. package/dist/_virtual/rolldown_runtime.mjs +0 -32
  54. package/dist/helpers/index.cjs +0 -3
  55. package/dist/helpers/index.d.cts +0 -2
  56. package/dist/helpers/unplugin.cjs +0 -11
  57. package/dist/helpers/unplugin.d.cts +0 -8
  58. package/dist/helpers/unplugin.d.cts.map +0 -1
  59. package/dist/index.cjs +0 -37
  60. package/dist/index.d.cts +0 -14
  61. package/dist/index.d.cts.map +0 -1
  62. package/dist/node_modules/.pnpm/@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.cjs +0 -2
  63. package/dist/node_modules/.pnpm/@jridgewell_gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +0 -4
  64. package/dist/node_modules/.pnpm/@jridgewell_remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.cjs +0 -2
  65. package/dist/node_modules/.pnpm/@jridgewell_remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs +0 -4
  66. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -15
  67. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -16
  68. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +0 -1
  69. package/dist/node_modules/.pnpm/@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.cjs +0 -1
  70. package/dist/node_modules/.pnpm/@jridgewell_trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +0 -3
  71. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.cjs +0 -28
  72. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs +0 -24
  73. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.mjs.map +0 -1
  74. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.cjs +0 -175
  75. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs +0 -171
  76. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.mjs.map +0 -1
  77. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.cjs +0 -871
  78. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs +0 -867
  79. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.mjs.map +0 -1
  80. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.cjs +0 -307
  81. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs +0 -303
  82. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.mjs.map +0 -1
  83. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.cjs +0 -300
  84. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs +0 -296
  85. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.mjs.map +0 -1
  86. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.cjs +0 -60
  87. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs +0 -56
  88. package/dist/node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.mjs.map +0 -1
  89. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.cjs +0 -46
  90. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs +0 -45
  91. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs.map +0 -1
  92. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.cjs +0 -142
  93. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.mjs +0 -141
  94. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/index.mjs.map +0 -1
  95. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.cjs +0 -114
  96. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.mjs +0 -113
  97. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/parse-CRORloGP.mjs.map +0 -1
  98. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.cjs +0 -59
  99. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.mjs +0 -55
  100. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/utils-CuyC8gTr.mjs.map +0 -1
  101. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.cjs +0 -35
  102. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.mjs +0 -34
  103. package/dist/node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/webpack-like-BU9ULG6P.mjs.map +0 -1
  104. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.cjs +0 -236
  105. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.mjs +0 -232
  106. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/index.mjs.map +0 -1
  107. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.cjs +0 -54
  108. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.mjs +0 -50
  109. package/dist/node_modules/.pnpm/webpack-virtual-modules@0.6.2/node_modules/webpack-virtual-modules/lib/virtual-stats.mjs.map +0 -1
  110. package/dist/types/index.cjs +0 -0
  111. package/dist/types/index.d.cts +0 -2
  112. package/dist/types/plugin.cjs +0 -0
  113. package/dist/types/plugin.d.cts +0 -14
  114. package/dist/types/plugin.d.cts.map +0 -1
@@ -1,296 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_constants } from "./constants.mjs";
3
- import { require_utils } from "./utils.mjs";
4
-
5
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
6
- var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
- const utils = require_utils();
8
- const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
9
- const isPathSeparator = (code) => {
10
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
11
- };
12
- const depth = (token) => {
13
- if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
14
- };
15
- /**
16
- * Quickly scans a glob pattern and returns an object with a handful of
17
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
18
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
19
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
20
- *
21
- * ```js
22
- * const pm = require('picomatch');
23
- * console.log(pm.scan('foo/bar/*.js'));
24
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
25
- * ```
26
- * @param {String} `str`
27
- * @param {Object} `options`
28
- * @return {Object} Returns an object with tokens and regex source string.
29
- * @api public
30
- */
31
- const scan = (input, options) => {
32
- const opts = options || {};
33
- const length = input.length - 1;
34
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
35
- const slashes = [];
36
- const tokens = [];
37
- const parts = [];
38
- let str = input;
39
- let index = -1;
40
- let start = 0;
41
- let lastIndex = 0;
42
- let isBrace = false;
43
- let isBracket = false;
44
- let isGlob = false;
45
- let isExtglob = false;
46
- let isGlobstar = false;
47
- let braceEscaped = false;
48
- let backslashes = false;
49
- let negated = false;
50
- let negatedExtglob = false;
51
- let finished = false;
52
- let braces = 0;
53
- let prev;
54
- let code;
55
- let token = {
56
- value: "",
57
- depth: 0,
58
- isGlob: false
59
- };
60
- const eos = () => index >= length;
61
- const peek = () => str.charCodeAt(index + 1);
62
- const advance = () => {
63
- prev = code;
64
- return str.charCodeAt(++index);
65
- };
66
- while (index < length) {
67
- code = advance();
68
- let next;
69
- if (code === CHAR_BACKWARD_SLASH) {
70
- backslashes = token.backslashes = true;
71
- code = advance();
72
- if (code === CHAR_LEFT_CURLY_BRACE) braceEscaped = true;
73
- continue;
74
- }
75
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
76
- braces++;
77
- while (eos() !== true && (code = advance())) {
78
- if (code === CHAR_BACKWARD_SLASH) {
79
- backslashes = token.backslashes = true;
80
- advance();
81
- continue;
82
- }
83
- if (code === CHAR_LEFT_CURLY_BRACE) {
84
- braces++;
85
- continue;
86
- }
87
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
88
- isBrace = token.isBrace = true;
89
- isGlob = token.isGlob = true;
90
- finished = true;
91
- if (scanToEnd === true) continue;
92
- break;
93
- }
94
- if (braceEscaped !== true && code === CHAR_COMMA) {
95
- isBrace = token.isBrace = true;
96
- isGlob = token.isGlob = true;
97
- finished = true;
98
- if (scanToEnd === true) continue;
99
- break;
100
- }
101
- if (code === CHAR_RIGHT_CURLY_BRACE) {
102
- braces--;
103
- if (braces === 0) {
104
- braceEscaped = false;
105
- isBrace = token.isBrace = true;
106
- finished = true;
107
- break;
108
- }
109
- }
110
- }
111
- if (scanToEnd === true) continue;
112
- break;
113
- }
114
- if (code === CHAR_FORWARD_SLASH) {
115
- slashes.push(index);
116
- tokens.push(token);
117
- token = {
118
- value: "",
119
- depth: 0,
120
- isGlob: false
121
- };
122
- if (finished === true) continue;
123
- if (prev === CHAR_DOT && index === start + 1) {
124
- start += 2;
125
- continue;
126
- }
127
- lastIndex = index + 1;
128
- continue;
129
- }
130
- if (opts.noext !== true) {
131
- if ((code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === true && peek() === CHAR_LEFT_PARENTHESES) {
132
- isGlob = token.isGlob = true;
133
- isExtglob = token.isExtglob = true;
134
- finished = true;
135
- if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
136
- if (scanToEnd === true) {
137
- while (eos() !== true && (code = advance())) {
138
- if (code === CHAR_BACKWARD_SLASH) {
139
- backslashes = token.backslashes = true;
140
- code = advance();
141
- continue;
142
- }
143
- if (code === CHAR_RIGHT_PARENTHESES) {
144
- isGlob = token.isGlob = true;
145
- finished = true;
146
- break;
147
- }
148
- }
149
- continue;
150
- }
151
- break;
152
- }
153
- }
154
- if (code === CHAR_ASTERISK) {
155
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
156
- isGlob = token.isGlob = true;
157
- finished = true;
158
- if (scanToEnd === true) continue;
159
- break;
160
- }
161
- if (code === CHAR_QUESTION_MARK) {
162
- isGlob = token.isGlob = true;
163
- finished = true;
164
- if (scanToEnd === true) continue;
165
- break;
166
- }
167
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
168
- while (eos() !== true && (next = advance())) {
169
- if (next === CHAR_BACKWARD_SLASH) {
170
- backslashes = token.backslashes = true;
171
- advance();
172
- continue;
173
- }
174
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
175
- isBracket = token.isBracket = true;
176
- isGlob = token.isGlob = true;
177
- finished = true;
178
- break;
179
- }
180
- }
181
- if (scanToEnd === true) continue;
182
- break;
183
- }
184
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
185
- negated = token.negated = true;
186
- start++;
187
- continue;
188
- }
189
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
190
- isGlob = token.isGlob = true;
191
- if (scanToEnd === true) {
192
- while (eos() !== true && (code = advance())) {
193
- if (code === CHAR_LEFT_PARENTHESES) {
194
- backslashes = token.backslashes = true;
195
- code = advance();
196
- continue;
197
- }
198
- if (code === CHAR_RIGHT_PARENTHESES) {
199
- finished = true;
200
- break;
201
- }
202
- }
203
- continue;
204
- }
205
- break;
206
- }
207
- if (isGlob === true) {
208
- finished = true;
209
- if (scanToEnd === true) continue;
210
- break;
211
- }
212
- }
213
- if (opts.noext === true) {
214
- isExtglob = false;
215
- isGlob = false;
216
- }
217
- let base = str;
218
- let prefix = "";
219
- let glob = "";
220
- if (start > 0) {
221
- prefix = str.slice(0, start);
222
- str = str.slice(start);
223
- lastIndex -= start;
224
- }
225
- if (base && isGlob === true && lastIndex > 0) {
226
- base = str.slice(0, lastIndex);
227
- glob = str.slice(lastIndex);
228
- } else if (isGlob === true) {
229
- base = "";
230
- glob = str;
231
- } else base = str;
232
- if (base && base !== "" && base !== "/" && base !== str) {
233
- if (isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1);
234
- }
235
- if (opts.unescape === true) {
236
- if (glob) glob = utils.removeBackslashes(glob);
237
- if (base && backslashes === true) base = utils.removeBackslashes(base);
238
- }
239
- const state = {
240
- prefix,
241
- input,
242
- start,
243
- base,
244
- glob,
245
- isBrace,
246
- isBracket,
247
- isGlob,
248
- isExtglob,
249
- isGlobstar,
250
- negated,
251
- negatedExtglob
252
- };
253
- if (opts.tokens === true) {
254
- state.maxDepth = 0;
255
- if (!isPathSeparator(code)) tokens.push(token);
256
- state.tokens = tokens;
257
- }
258
- if (opts.parts === true || opts.tokens === true) {
259
- let prevIndex;
260
- for (let idx = 0; idx < slashes.length; idx++) {
261
- const n = prevIndex ? prevIndex + 1 : start;
262
- const i = slashes[idx];
263
- const value = input.slice(n, i);
264
- if (opts.tokens) {
265
- if (idx === 0 && start !== 0) {
266
- tokens[idx].isPrefix = true;
267
- tokens[idx].value = prefix;
268
- } else tokens[idx].value = value;
269
- depth(tokens[idx]);
270
- state.maxDepth += tokens[idx].depth;
271
- }
272
- if (idx !== 0 || value !== "") parts.push(value);
273
- prevIndex = i;
274
- }
275
- if (prevIndex && prevIndex + 1 < input.length) {
276
- const value = input.slice(prevIndex + 1);
277
- parts.push(value);
278
- if (opts.tokens) {
279
- tokens[tokens.length - 1].value = value;
280
- depth(tokens[tokens.length - 1]);
281
- state.maxDepth += tokens[tokens.length - 1].depth;
282
- }
283
- }
284
- state.slashes = slashes;
285
- state.parts = parts;
286
- }
287
- return state;
288
- };
289
- module.exports = scan;
290
- }));
291
-
292
- //#endregion
293
- export default require_scan();
294
-
295
- export { require_scan };
296
- //# sourceMappingURL=scan.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scan.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js"],"sourcesContent":["'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,MAAM;CACN,MAAM,EACJ,eACA,SACA,qBACA,YACA,UACA,uBACA,oBACA,uBACA,uBACA,0BACA,WACA,oBACA,wBACA,wBACA;CAGF,MAAM,mBAAkB,SAAQ;AAC9B,SAAO,SAAS,sBAAsB,SAAS;;CAGjD,MAAM,SAAQ,UAAS;AACrB,MAAI,MAAM,aAAa,KACrB,OAAM,QAAQ,MAAM,aAAa,WAAW;;;;;;;;;;;;;;;;;;CAqBhD,MAAM,QAAQ,OAAO,YAAY;EAC/B,MAAM,OAAO,WAAW,EAAE;EAE1B,MAAM,SAAS,MAAM,SAAS;EAC9B,MAAM,YAAY,KAAK,UAAU,QAAQ,KAAK,cAAc;EAC5D,MAAM,UAAU,EAAE;EAClB,MAAM,SAAS,EAAE;EACjB,MAAM,QAAQ,EAAE;EAEhB,IAAI,MAAM;EACV,IAAI,QAAQ;EACZ,IAAI,QAAQ;EACZ,IAAI,YAAY;EAChB,IAAI,UAAU;EACd,IAAI,YAAY;EAChB,IAAI,SAAS;EACb,IAAI,YAAY;EAChB,IAAI,aAAa;EACjB,IAAI,eAAe;EACnB,IAAI,cAAc;EAClB,IAAI,UAAU;EACd,IAAI,iBAAiB;EACrB,IAAI,WAAW;EACf,IAAI,SAAS;EACb,IAAI;EACJ,IAAI;EACJ,IAAI,QAAQ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AAI,YAAY,YAAY,IAAI;IACtC,MAAM,IAAI,QAAQ;IAClB,MAAM,QAAQ,MAAM,MAAM,GAAG,EAAE;AAC/B,QAAI,KAAK,QAAQ;AACf,SAAI,QAAQ,KAAK,UAAU,GAAG;AAC5B,aAAO,KAAK,WAAW;AACvB,aAAO,KAAK,QAAQ;WAEpB,QAAO,KAAK,QAAQ;AAEtB,WAAM,OAAO,KAAK;AAClB,WAAM,YAAY,OAAO,KAAK;;AAEhC,QAAI,QAAQ,KAAK,UAAU,GACzB,OAAM,KAAK,MAAM;AAEnB,gBAAY;;AAGd,OAAI,aAAa,YAAY,IAAI,MAAM,QAAQ;IAC7C,MAAM,QAAQ,MAAM,MAAM,YAAY,EAAE;AACxC,UAAM,KAAK,MAAM;AAEjB,QAAI,KAAK,QAAQ;AACf,YAAO,OAAO,SAAS,GAAG,QAAQ;AAClC,WAAM,OAAO,OAAO,SAAS,GAAG;AAChC,WAAM,YAAY,OAAO,OAAO,SAAS,GAAG;;;AAIhD,SAAM,UAAU;AAChB,SAAM,QAAQ;;AAGhB,SAAO;;AAGT,QAAO,UAAU"}
@@ -1,60 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
4
- const require_constants$1 = require('./constants.cjs');
5
-
6
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
7
- var require_utils = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
8
- const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1.default;
9
- exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
10
- exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
11
- exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
12
- exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
13
- exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
14
- exports.isWindows = () => {
15
- if (typeof navigator !== "undefined" && navigator.platform) {
16
- const platform = navigator.platform.toLowerCase();
17
- return platform === "win32" || platform === "windows";
18
- }
19
- if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
20
- return false;
21
- };
22
- exports.removeBackslashes = (str) => {
23
- return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
24
- return match === "\\" ? "" : match;
25
- });
26
- };
27
- exports.escapeLast = (input, char, lastIdx) => {
28
- const idx = input.lastIndexOf(char, lastIdx);
29
- if (idx === -1) return input;
30
- if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
31
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
32
- };
33
- exports.removePrefix = (input, state = {}) => {
34
- let output = input;
35
- if (output.startsWith("./")) {
36
- output = output.slice(2);
37
- state.prefix = "./";
38
- }
39
- return output;
40
- };
41
- exports.wrapOutput = (input, state = {}, options = {}) => {
42
- let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`;
43
- if (state.negated === true) output = `(?:^(?!${output}).*$)`;
44
- return output;
45
- };
46
- exports.basename = (path, { windows } = {}) => {
47
- const segs = path.split(windows ? /[\\/]/ : "/");
48
- const last = segs[segs.length - 1];
49
- if (last === "") return segs[segs.length - 2];
50
- return last;
51
- };
52
- }));
53
-
54
- //#endregion
55
- Object.defineProperty(exports, 'default', {
56
- enumerable: true,
57
- get: function () {
58
- return require_utils();
59
- }
60
- });
@@ -1,56 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/rolldown_runtime.mjs";
2
- import { require_constants } from "./constants.mjs";
3
-
4
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
5
- var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
7
- exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
8
- exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
9
- exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
10
- exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
11
- exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
12
- exports.isWindows = () => {
13
- if (typeof navigator !== "undefined" && navigator.platform) {
14
- const platform = navigator.platform.toLowerCase();
15
- return platform === "win32" || platform === "windows";
16
- }
17
- if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
18
- return false;
19
- };
20
- exports.removeBackslashes = (str) => {
21
- return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
22
- return match === "\\" ? "" : match;
23
- });
24
- };
25
- exports.escapeLast = (input, char, lastIdx) => {
26
- const idx = input.lastIndexOf(char, lastIdx);
27
- if (idx === -1) return input;
28
- if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
29
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
30
- };
31
- exports.removePrefix = (input, state = {}) => {
32
- let output = input;
33
- if (output.startsWith("./")) {
34
- output = output.slice(2);
35
- state.prefix = "./";
36
- }
37
- return output;
38
- };
39
- exports.wrapOutput = (input, state = {}, options = {}) => {
40
- let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`;
41
- if (state.negated === true) output = `(?:^(?!${output}).*$)`;
42
- return output;
43
- };
44
- exports.basename = (path, { windows } = {}) => {
45
- const segs = path.split(windows ? /[\\/]/ : "/");
46
- const last = segs[segs.length - 1];
47
- if (last === "") return segs[segs.length - 2];
48
- return last;
49
- };
50
- }));
51
-
52
- //#endregion
53
- export default require_utils();
54
-
55
- export { require_utils };
56
- //# sourceMappingURL=utils.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js"],"sourcesContent":["/*global navigator*/\n'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.isWindows = () => {\n if (typeof navigator !== 'undefined' && navigator.platform) {\n const platform = navigator.platform.toLowerCase();\n return platform === 'win32' || platform === 'windows';\n }\n\n if (typeof process !== 'undefined' && process.platform) {\n return process.platform === 'win32';\n }\n\n return false;\n};\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n const segs = path.split(windows ? /[\\\\/]/ : '/');\n const last = segs[segs.length - 1];\n\n if (last === '') {\n return segs[segs.length - 2];\n }\n\n return last;\n};\n"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AK,IAGhB,KAAK,MAAM,GAFpB,QAAQ,WAAW,KAAK;AAGvC,MAAI,MAAM,YAAY,KACpB,UAAS,UAAU,OAAO;AAE5B,SAAO;;AAGT,SAAQ,YAAY,MAAM,EAAE,YAAY,EAAE,KAAK;EAC7C,MAAM,OAAO,KAAK,MAAM,UAAU,UAAU,IAAI;EAChD,MAAM,OAAO,KAAK,KAAK,SAAS;AAEhC,MAAI,SAAS,GACX,QAAO,KAAK,KAAK,SAAS;AAG5B,SAAO"}
@@ -1,46 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_parse_CRORloGP = require('./parse-CRORloGP.cjs');
3
- let node_path = require("node:path");
4
- let node_buffer = require("node:buffer");
5
-
6
- //#region ../../node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs
7
- function createBuildContext(compiler, compilation, loaderContext, inputSourceMap) {
8
- return {
9
- getNativeBuildContext() {
10
- return {
11
- framework: "rspack",
12
- compiler,
13
- compilation,
14
- loaderContext,
15
- inputSourceMap
16
- };
17
- },
18
- addWatchFile(file) {
19
- const cwd = process.cwd();
20
- compilation.fileDependencies.add((0, node_path.resolve)(cwd, file));
21
- },
22
- getWatchFiles() {
23
- return Array.from(compilation.fileDependencies);
24
- },
25
- parse: require_parse_CRORloGP.parse,
26
- emitFile(emittedFile) {
27
- const outFileName = emittedFile.fileName || emittedFile.name;
28
- if (emittedFile.source && outFileName) {
29
- const { sources } = compilation.compiler.webpack;
30
- compilation.emitAsset(outFileName, new sources.RawSource(typeof emittedFile.source === "string" ? emittedFile.source : node_buffer.Buffer.from(emittedFile.source)));
31
- }
32
- }
33
- };
34
- }
35
- function normalizeMessage(error) {
36
- const err = new Error(typeof error === "string" ? error : error.message);
37
- if (typeof error === "object") {
38
- err.stack = error.stack;
39
- err.cause = error.meta;
40
- }
41
- return err;
42
- }
43
-
44
- //#endregion
45
- exports.createBuildContext = createBuildContext;
46
- exports.normalizeMessage = normalizeMessage;
@@ -1,45 +0,0 @@
1
- import { parse } from "./parse-CRORloGP.mjs";
2
- import { resolve } from "node:path";
3
- import { Buffer } from "node:buffer";
4
-
5
- //#region ../../node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs
6
- function createBuildContext(compiler, compilation, loaderContext, inputSourceMap) {
7
- return {
8
- getNativeBuildContext() {
9
- return {
10
- framework: "rspack",
11
- compiler,
12
- compilation,
13
- loaderContext,
14
- inputSourceMap
15
- };
16
- },
17
- addWatchFile(file) {
18
- const cwd = process.cwd();
19
- compilation.fileDependencies.add(resolve(cwd, file));
20
- },
21
- getWatchFiles() {
22
- return Array.from(compilation.fileDependencies);
23
- },
24
- parse,
25
- emitFile(emittedFile) {
26
- const outFileName = emittedFile.fileName || emittedFile.name;
27
- if (emittedFile.source && outFileName) {
28
- const { sources } = compilation.compiler.webpack;
29
- compilation.emitAsset(outFileName, new sources.RawSource(typeof emittedFile.source === "string" ? emittedFile.source : Buffer.from(emittedFile.source)));
30
- }
31
- }
32
- };
33
- }
34
- function normalizeMessage(error) {
35
- const err = new Error(typeof error === "string" ? error : error.message);
36
- if (typeof error === "object") {
37
- err.stack = error.stack;
38
- err.cause = error.meta;
39
- }
40
- return err;
41
- }
42
-
43
- //#endregion
44
- export { createBuildContext, normalizeMessage };
45
- //# sourceMappingURL=context-CehLHpzV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-CehLHpzV.mjs","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/unplugin@3.0.0-beta.3/node_modules/unplugin/dist/context-CehLHpzV.mjs"],"sourcesContent":["import { t as parse } from \"./parse-CRORloGP.mjs\";\nimport { resolve } from \"node:path\";\nimport { Buffer } from \"node:buffer\";\n\n//#region src/rspack/context.ts\nfunction createBuildContext(compiler, compilation, loaderContext, inputSourceMap) {\n\treturn {\n\t\tgetNativeBuildContext() {\n\t\t\treturn {\n\t\t\t\tframework: \"rspack\",\n\t\t\t\tcompiler,\n\t\t\t\tcompilation,\n\t\t\t\tloaderContext,\n\t\t\t\tinputSourceMap\n\t\t\t};\n\t\t},\n\t\taddWatchFile(file) {\n\t\t\tconst cwd = process.cwd();\n\t\t\tcompilation.fileDependencies.add(resolve(cwd, file));\n\t\t},\n\t\tgetWatchFiles() {\n\t\t\treturn Array.from(compilation.fileDependencies);\n\t\t},\n\t\tparse,\n\t\temitFile(emittedFile) {\n\t\t\tconst outFileName = emittedFile.fileName || emittedFile.name;\n\t\t\tif (emittedFile.source && outFileName) {\n\t\t\t\tconst { sources } = compilation.compiler.webpack;\n\t\t\t\tcompilation.emitAsset(outFileName, new sources.RawSource(typeof emittedFile.source === \"string\" ? emittedFile.source : Buffer.from(emittedFile.source)));\n\t\t\t}\n\t\t}\n\t};\n}\nfunction createContext(loader) {\n\treturn {\n\t\terror: (error) => loader.emitError(normalizeMessage(error)),\n\t\twarn: (message) => loader.emitWarning(normalizeMessage(message))\n\t};\n}\nfunction normalizeMessage(error) {\n\tconst err = new Error(typeof error === \"string\" ? error : error.message);\n\tif (typeof error === \"object\") {\n\t\terr.stack = error.stack;\n\t\terr.cause = error.meta;\n\t}\n\treturn err;\n}\n\n//#endregion\nexport { createContext as n, normalizeMessage as r, createBuildContext as t };"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAS,mBAAmB,UAAU,aAAa,eAAe,gBAAgB;AACjF,QAAO;EACN,wBAAwB;AACvB,UAAO;IACN,WAAW;IACX;IACA;IACA;IACA;IACA;;EAEF,aAAa,MAAM;GAClB,MAAM,MAAM,QAAQ,KAAK;AACzB,eAAY,iBAAiB,IAAI,QAAQ,KAAK,KAAK,CAAC;;EAErD,gBAAgB;AACf,UAAO,MAAM,KAAK,YAAY,iBAAiB;;EAEhD;EACA,SAAS,aAAa;GACrB,MAAM,cAAc,YAAY,YAAY,YAAY;AACxD,OAAI,YAAY,UAAU,aAAa;IACtC,MAAM,EAAE,YAAY,YAAY,SAAS;AACzC,gBAAY,UAAU,aAAa,IAAI,QAAQ,UAAU,OAAO,YAAY,WAAW,WAAW,YAAY,SAAS,OAAO,KAAK,YAAY,OAAO,CAAC,CAAC;;;EAG1J;;AAQF,SAAS,iBAAiB,OAAO;CAChC,MAAM,MAAM,IAAI,MAAM,OAAO,UAAU,WAAW,QAAQ,MAAM,QAAQ;AACxE,KAAI,OAAO,UAAU,UAAU;AAC9B,MAAI,QAAQ,MAAM;AAClB,MAAI,QAAQ,MAAM;;AAEnB,QAAO"}