@rsbuild/core 2.0.0-beta.0 → 2.0.0-beta.10
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/compiled/chokidar/index.d.ts +197 -29
- package/compiled/chokidar/package.json +1 -1
- package/compiled/connect-next/index.d.ts +56 -0
- package/compiled/connect-next/license +26 -0
- package/compiled/connect-next/package.json +1 -0
- package/compiled/cors/index.d.ts +56 -0
- package/compiled/cors/license +22 -0
- package/compiled/cors/package.json +1 -0
- package/compiled/css-loader/index.js +2 -2
- package/compiled/css-loader/package.json +1 -1
- package/compiled/html-rspack-plugin/index.d.ts +102 -1
- package/compiled/html-rspack-plugin/index.js +863 -20
- package/compiled/html-rspack-plugin/package.json +1 -1
- package/compiled/http-proxy-middleware/index.d.ts +268 -43
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/jiti/LICENSE +21 -0
- package/compiled/jiti/README.md +243 -0
- package/compiled/jiti/dist/babel.cjs +46699 -0
- package/compiled/jiti/dist/jiti.cjs +4842 -0
- package/compiled/jiti/lib/jiti-cli.mjs +19 -0
- package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
- package/compiled/jiti/lib/jiti-native.mjs +76 -0
- package/compiled/jiti/lib/jiti-register.d.mts +1 -0
- package/compiled/jiti/lib/jiti-register.mjs +2 -0
- package/compiled/jiti/lib/jiti.cjs +24 -0
- package/compiled/jiti/lib/jiti.d.cts +8 -0
- package/compiled/jiti/lib/jiti.d.mts +8 -0
- package/compiled/jiti/lib/jiti.mjs +23 -0
- package/compiled/jiti/lib/types.d.ts +363 -0
- package/compiled/jiti/package.json +133 -0
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/lib/at-rule.d.ts +1 -1
- package/compiled/postcss/lib/comment.d.ts +1 -1
- package/compiled/postcss/lib/container.d.ts +1 -1
- package/compiled/postcss/lib/css-syntax-error.d.ts +1 -1
- package/compiled/postcss/lib/declaration.d.ts +1 -1
- package/compiled/postcss/lib/document.d.ts +1 -1
- package/compiled/postcss/lib/input.d.ts +1 -1
- package/compiled/postcss/lib/lazy-result.d.ts +1 -1
- package/compiled/postcss/lib/no-work-result.d.ts +1 -1
- package/compiled/postcss/lib/node.d.ts +1 -1
- package/compiled/postcss/lib/previous-map.d.ts +1 -1
- package/compiled/postcss/lib/processor.d.ts +1 -1
- package/compiled/postcss/lib/result.d.ts +1 -1
- package/compiled/postcss/lib/root.d.ts +1 -1
- package/compiled/postcss/lib/rule.d.ts +1 -1
- package/compiled/postcss/lib/stringifier.d.ts +1 -1
- package/compiled/postcss/lib/warning.d.ts +1 -1
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +10 -9
- package/compiled/postcss-loader/package.json +1 -1
- package/compiled/rslog/index.d.ts +33 -2
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +0 -5
- package/compiled/rspack-manifest-plugin/index.d.ts +48 -0
- package/compiled/rspack-manifest-plugin/license +21 -0
- package/compiled/rspack-manifest-plugin/package.json +1 -0
- package/compiled/style-loader/index.js +37 -94
- package/compiled/style-loader/package.json +1 -1
- package/dist/{131.js → 958.js} +1706 -1655
- package/dist/chokidar.js +59 -57
- package/dist/client/hmr.js +3 -3
- package/dist/client/overlay.js +2 -2
- package/dist/connect-next.js +268 -0
- package/dist/{connect.js.LICENSE.txt → connect-next.js.LICENSE.txt} +3 -13
- package/dist/cors.js +2 -2
- package/dist/http-proxy-middleware.js +2985 -0
- package/dist/http-proxy-middleware.js.LICENSE.txt +69 -0
- package/dist/index.js +1 -1
- package/dist/launch-editor-middleware.js +96 -16
- package/dist/manifest-plugin.js +543 -21
- package/dist/memfs.js +241 -776
- package/dist/{710.js → mrmime.js} +2 -1
- package/dist/open.js +32 -28
- package/dist/range-parser.js +2 -2
- package/dist/remapping.js +2 -2
- package/dist/rslib-runtime.js +4 -4
- package/dist/sirv.js +14 -14
- package/dist/src.js +510 -0
- package/dist/tinyglobby.js +114 -69
- package/dist/transformLoader.mjs +38 -1
- package/dist/transformRawLoader.mjs +1 -1
- package/dist/ws.js +1549 -0
- package/dist-types/createContext.d.ts +3 -2
- package/dist-types/helpers/format.d.ts +2 -1
- package/dist-types/helpers/fs.d.ts +2 -1
- package/dist-types/helpers/index.d.ts +1 -1
- package/dist-types/helpers/stats.d.ts +4 -3
- package/dist-types/helpers/vendors.d.ts +0 -2
- package/dist-types/hooks.d.ts +3 -3
- package/dist-types/index.d.ts +4 -3
- package/dist-types/initPlugins.d.ts +2 -1
- package/dist-types/logger.d.ts +9 -3
- package/dist-types/pluginManager.d.ts +2 -1
- package/dist-types/restart.d.ts +4 -2
- package/dist-types/server/assets-middleware/index.d.ts +3 -2
- package/dist-types/server/assets-middleware/setupWriteToDisk.d.ts +2 -1
- package/dist-types/server/cliShortcuts.d.ts +4 -1
- package/dist-types/server/devMiddlewares.d.ts +4 -6
- package/dist-types/server/devServer.d.ts +8 -42
- package/dist-types/server/helper.d.ts +50 -16
- package/dist-types/server/historyApiFallback.d.ts +2 -1
- package/dist-types/server/middlewares.d.ts +5 -3
- package/dist-types/server/open.d.ts +4 -2
- package/dist-types/server/previewServer.d.ts +4 -0
- package/dist-types/server/proxy.d.ts +3 -2
- package/dist-types/server/runner/asModule.d.ts +1 -1
- package/dist-types/server/serverSetup.d.ts +2 -0
- package/dist-types/server/socketServer.d.ts +4 -1
- package/dist-types/server/watchFiles.d.ts +1 -1
- package/dist-types/types/config.d.ts +123 -25
- package/dist-types/types/context.d.ts +3 -0
- package/dist-types/types/hooks.d.ts +17 -15
- package/dist-types/types/plugin.d.ts +14 -11
- package/dist-types/types/rsbuild.d.ts +11 -4
- package/dist-types/types/thirdParty.d.ts +15 -6
- package/package.json +23 -26
- package/compiled/chokidar/handler.d.ts +0 -90
- package/compiled/http-proxy-middleware/index.js +0 -5284
- package/compiled/ws/index.d.ts +0 -437
- package/compiled/ws/index.js +0 -3166
- package/compiled/ws/license +0 -20
- package/compiled/ws/package.json +0 -1
- package/dist/397.js +0 -11
- package/dist/7.js +0 -1
- package/dist/743.js +0 -7
- package/dist/88.js +0 -40
- package/dist/connect.js +0 -581
- package/dist-types/server/prodServer.d.ts +0 -24
- /package/compiled/html-rspack-plugin/{loader.js → htmlLoader.js} +0 -0
- /package/dist/{131.js.LICENSE.txt → 958.js.LICENSE.txt} +0 -0
- /package/dist/client/{59.js → 797.js} +0 -0
- /package/dist/{31.js → trace-mapping.js} +0 -0
|
@@ -0,0 +1,2985 @@
|
|
|
1
|
+
/*! LICENSE: http-proxy-middleware.js.LICENSE.txt */
|
|
2
|
+
import * as __rspack_external_assert from "assert";
|
|
3
|
+
import * as __rspack_external_http from "http";
|
|
4
|
+
import * as __rspack_external_https from "https";
|
|
5
|
+
import * as __rspack_external_path from "path";
|
|
6
|
+
import * as __rspack_external_querystring from "querystring";
|
|
7
|
+
import * as __rspack_external_stream from "stream";
|
|
8
|
+
import * as __rspack_external_url from "url";
|
|
9
|
+
import * as __rspack_external_util from "util";
|
|
10
|
+
import * as __rspack_external_zlib from "zlib";
|
|
11
|
+
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
12
|
+
import "./src.js";
|
|
13
|
+
__webpack_require__.add({
|
|
14
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
15
|
+
let stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), compile = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js"), expand = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"), parse = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"), braces = (input, options = {})=>{
|
|
16
|
+
let output = [];
|
|
17
|
+
if (Array.isArray(input)) for (let pattern of input){
|
|
18
|
+
let result = braces.create(pattern, options);
|
|
19
|
+
Array.isArray(result) ? output.push(...result) : output.push(result);
|
|
20
|
+
}
|
|
21
|
+
else output = [].concat(braces.create(input, options));
|
|
22
|
+
return options && !0 === options.expand && !0 === options.nodupes && (output = [
|
|
23
|
+
...new Set(output)
|
|
24
|
+
]), output;
|
|
25
|
+
};
|
|
26
|
+
braces.parse = (input, options = {})=>parse(input, options), braces.stringify = (input, options = {})=>'string' == typeof input ? stringify(braces.parse(input, options), options) : stringify(input, options), braces.compile = (input, options = {})=>('string' == typeof input && (input = braces.parse(input, options)), compile(input, options)), braces.expand = (input, options = {})=>{
|
|
27
|
+
'string' == typeof input && (input = braces.parse(input, options));
|
|
28
|
+
let result = expand(input, options);
|
|
29
|
+
return !0 === options.noempty && (result = result.filter(Boolean)), !0 === options.nodupes && (result = [
|
|
30
|
+
...new Set(result)
|
|
31
|
+
]), result;
|
|
32
|
+
}, braces.create = (input, options = {})=>'' === input || input.length < 3 ? [
|
|
33
|
+
input
|
|
34
|
+
] : !0 !== options.expand ? braces.compile(input, options) : braces.expand(input, options), module.exports = braces;
|
|
35
|
+
},
|
|
36
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
37
|
+
let fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"), utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js");
|
|
38
|
+
module.exports = (ast, options = {})=>{
|
|
39
|
+
let walk = (node, parent = {})=>{
|
|
40
|
+
let invalidBlock = utils.isInvalidBrace(parent), invalidNode = !0 === node.invalid && !0 === options.escapeInvalid, invalid = !0 === invalidBlock || !0 === invalidNode, prefix = !0 === options.escapeInvalid ? '\\' : '', output = '';
|
|
41
|
+
if (!0 === node.isOpen) return prefix + node.value;
|
|
42
|
+
if (!0 === node.isClose) return console.log('node.isClose', prefix, node.value), prefix + node.value;
|
|
43
|
+
if ('open' === node.type) return invalid ? prefix + node.value : '(';
|
|
44
|
+
if ('close' === node.type) return invalid ? prefix + node.value : ')';
|
|
45
|
+
if ('comma' === node.type) return 'comma' === node.prev.type ? '' : invalid ? node.value : '|';
|
|
46
|
+
if (node.value) return node.value;
|
|
47
|
+
if (node.nodes && node.ranges > 0) {
|
|
48
|
+
let args = utils.reduce(node.nodes), range = fill(...args, {
|
|
49
|
+
...options,
|
|
50
|
+
wrap: !1,
|
|
51
|
+
toRegex: !0,
|
|
52
|
+
strictZeros: !0
|
|
53
|
+
});
|
|
54
|
+
if (0 !== range.length) return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
55
|
+
}
|
|
56
|
+
if (node.nodes) for (let child of node.nodes)output += walk(child, node);
|
|
57
|
+
return output;
|
|
58
|
+
};
|
|
59
|
+
return walk(ast);
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js" (module) {
|
|
63
|
+
module.exports = {
|
|
64
|
+
MAX_LENGTH: 10000,
|
|
65
|
+
CHAR_0: '0',
|
|
66
|
+
CHAR_9: '9',
|
|
67
|
+
CHAR_UPPERCASE_A: 'A',
|
|
68
|
+
CHAR_LOWERCASE_A: 'a',
|
|
69
|
+
CHAR_UPPERCASE_Z: 'Z',
|
|
70
|
+
CHAR_LOWERCASE_Z: 'z',
|
|
71
|
+
CHAR_LEFT_PARENTHESES: '(',
|
|
72
|
+
CHAR_RIGHT_PARENTHESES: ')',
|
|
73
|
+
CHAR_ASTERISK: '*',
|
|
74
|
+
CHAR_AMPERSAND: '&',
|
|
75
|
+
CHAR_AT: '@',
|
|
76
|
+
CHAR_BACKSLASH: '\\',
|
|
77
|
+
CHAR_BACKTICK: '`',
|
|
78
|
+
CHAR_CARRIAGE_RETURN: '\r',
|
|
79
|
+
CHAR_CIRCUMFLEX_ACCENT: '^',
|
|
80
|
+
CHAR_COLON: ':',
|
|
81
|
+
CHAR_COMMA: ',',
|
|
82
|
+
CHAR_DOLLAR: '$',
|
|
83
|
+
CHAR_DOT: '.',
|
|
84
|
+
CHAR_DOUBLE_QUOTE: '"',
|
|
85
|
+
CHAR_EQUAL: '=',
|
|
86
|
+
CHAR_EXCLAMATION_MARK: '!',
|
|
87
|
+
CHAR_FORM_FEED: '\f',
|
|
88
|
+
CHAR_FORWARD_SLASH: '/',
|
|
89
|
+
CHAR_HASH: '#',
|
|
90
|
+
CHAR_HYPHEN_MINUS: '-',
|
|
91
|
+
CHAR_LEFT_ANGLE_BRACKET: '<',
|
|
92
|
+
CHAR_LEFT_CURLY_BRACE: '{',
|
|
93
|
+
CHAR_LEFT_SQUARE_BRACKET: '[',
|
|
94
|
+
CHAR_LINE_FEED: '\n',
|
|
95
|
+
CHAR_NO_BREAK_SPACE: '\u00A0',
|
|
96
|
+
CHAR_PERCENT: '%',
|
|
97
|
+
CHAR_PLUS: '+',
|
|
98
|
+
CHAR_QUESTION_MARK: '?',
|
|
99
|
+
CHAR_RIGHT_ANGLE_BRACKET: '>',
|
|
100
|
+
CHAR_RIGHT_CURLY_BRACE: '}',
|
|
101
|
+
CHAR_RIGHT_SQUARE_BRACKET: ']',
|
|
102
|
+
CHAR_SEMICOLON: ';',
|
|
103
|
+
CHAR_SINGLE_QUOTE: '\'',
|
|
104
|
+
CHAR_SPACE: ' ',
|
|
105
|
+
CHAR_TAB: '\t',
|
|
106
|
+
CHAR_UNDERSCORE: '_',
|
|
107
|
+
CHAR_VERTICAL_LINE: '|',
|
|
108
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF'
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
112
|
+
let fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js"), stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js"), append = (queue = '', stash = '', enclose = !1)=>{
|
|
113
|
+
let result = [];
|
|
114
|
+
if (queue = [].concat(queue), !(stash = [].concat(stash)).length) return queue;
|
|
115
|
+
if (!queue.length) return enclose ? utils.flatten(stash).map((ele)=>`{${ele}}`) : stash;
|
|
116
|
+
for (let item of queue)if (Array.isArray(item)) for (let value of item)result.push(append(value, stash, enclose));
|
|
117
|
+
else for (let ele of stash)!0 === enclose && 'string' == typeof ele && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
|
118
|
+
return utils.flatten(result);
|
|
119
|
+
};
|
|
120
|
+
module.exports = (ast, options = {})=>{
|
|
121
|
+
let rangeLimit = void 0 === options.rangeLimit ? 1000 : options.rangeLimit, walk = (node, parent = {})=>{
|
|
122
|
+
node.queue = [];
|
|
123
|
+
let p = parent, q = parent.queue;
|
|
124
|
+
for(; 'brace' !== p.type && 'root' !== p.type && p.parent;)q = (p = p.parent).queue;
|
|
125
|
+
if (node.invalid || node.dollar) return void q.push(append(q.pop(), stringify(node, options)));
|
|
126
|
+
if ('brace' === node.type && !0 !== node.invalid && 2 === node.nodes.length) return void q.push(append(q.pop(), [
|
|
127
|
+
'{}'
|
|
128
|
+
]));
|
|
129
|
+
if (node.nodes && node.ranges > 0) {
|
|
130
|
+
let args = utils.reduce(node.nodes);
|
|
131
|
+
if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
|
132
|
+
let range = fill(...args, options);
|
|
133
|
+
0 === range.length && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
|
|
137
|
+
for(; 'brace' !== block.type && 'root' !== block.type && block.parent;)queue = (block = block.parent).queue;
|
|
138
|
+
for(let i = 0; i < node.nodes.length; i++){
|
|
139
|
+
let child = node.nodes[i];
|
|
140
|
+
if ('comma' === child.type && 'brace' === node.type) {
|
|
141
|
+
1 === i && queue.push(''), queue.push('');
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if ('close' === child.type) {
|
|
145
|
+
q.push(append(q.pop(), queue, enclose));
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (child.value && 'open' !== child.type) {
|
|
149
|
+
queue.push(append(queue.pop(), child.value));
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
child.nodes && walk(child, node);
|
|
153
|
+
}
|
|
154
|
+
return queue;
|
|
155
|
+
};
|
|
156
|
+
return utils.flatten(walk(ast));
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
160
|
+
let stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js"), { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js");
|
|
161
|
+
module.exports = (input, options = {})=>{
|
|
162
|
+
let value;
|
|
163
|
+
if ('string' != typeof input) throw TypeError('Expected a string');
|
|
164
|
+
let opts = options || {}, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
165
|
+
if (input.length > max) throw SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
166
|
+
let ast = {
|
|
167
|
+
type: 'root',
|
|
168
|
+
input,
|
|
169
|
+
nodes: []
|
|
170
|
+
}, stack = [
|
|
171
|
+
ast
|
|
172
|
+
], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, advance = ()=>input[index++], push = (node)=>{
|
|
173
|
+
if ('text' === node.type && 'dot' === prev.type && (prev.type = 'text'), prev && 'text' === prev.type && 'text' === node.type) {
|
|
174
|
+
prev.value += node.value;
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
|
|
178
|
+
};
|
|
179
|
+
for(push({
|
|
180
|
+
type: 'bos'
|
|
181
|
+
}); index < length;)if (block = stack[stack.length - 1], (value = advance()) !== CHAR_ZERO_WIDTH_NOBREAK_SPACE && value !== CHAR_NO_BREAK_SPACE) {
|
|
182
|
+
if (value === CHAR_BACKSLASH) {
|
|
183
|
+
push({
|
|
184
|
+
type: 'text',
|
|
185
|
+
value: (options.keepEscaping ? value : '') + advance()
|
|
186
|
+
});
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
190
|
+
push({
|
|
191
|
+
type: 'text',
|
|
192
|
+
value: '\\' + value
|
|
193
|
+
});
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
197
|
+
let next;
|
|
198
|
+
for(brackets++; index < length && (next = advance());){
|
|
199
|
+
if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
200
|
+
brackets++;
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
if (next === CHAR_BACKSLASH) {
|
|
204
|
+
value += advance();
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET && 0 == --brackets) break;
|
|
208
|
+
}
|
|
209
|
+
push({
|
|
210
|
+
type: 'text',
|
|
211
|
+
value
|
|
212
|
+
});
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (value === CHAR_LEFT_PARENTHESES) {
|
|
216
|
+
block = push({
|
|
217
|
+
type: 'paren',
|
|
218
|
+
nodes: []
|
|
219
|
+
}), stack.push(block), push({
|
|
220
|
+
type: 'text',
|
|
221
|
+
value
|
|
222
|
+
});
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
226
|
+
if ('paren' !== block.type) {
|
|
227
|
+
push({
|
|
228
|
+
type: 'text',
|
|
229
|
+
value
|
|
230
|
+
});
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
block = stack.pop(), push({
|
|
234
|
+
type: 'text',
|
|
235
|
+
value
|
|
236
|
+
}), block = stack[stack.length - 1];
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
240
|
+
let next, open = value;
|
|
241
|
+
for(!0 !== options.keepQuotes && (value = ''); index < length && (next = advance());){
|
|
242
|
+
if (next === CHAR_BACKSLASH) {
|
|
243
|
+
value += next + advance();
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (next === open) {
|
|
247
|
+
!0 === options.keepQuotes && (value += next);
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
value += next;
|
|
251
|
+
}
|
|
252
|
+
push({
|
|
253
|
+
type: 'text',
|
|
254
|
+
value
|
|
255
|
+
});
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
259
|
+
depth++, block = push({
|
|
260
|
+
type: 'brace',
|
|
261
|
+
open: !0,
|
|
262
|
+
close: !1,
|
|
263
|
+
dollar: prev.value && '$' === prev.value.slice(-1) || !0 === block.dollar,
|
|
264
|
+
depth,
|
|
265
|
+
commas: 0,
|
|
266
|
+
ranges: 0,
|
|
267
|
+
nodes: []
|
|
268
|
+
}), stack.push(block), push({
|
|
269
|
+
type: 'open',
|
|
270
|
+
value
|
|
271
|
+
});
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
275
|
+
if ('brace' !== block.type) {
|
|
276
|
+
push({
|
|
277
|
+
type: 'text',
|
|
278
|
+
value
|
|
279
|
+
});
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
(block = stack.pop()).close = !0, push({
|
|
283
|
+
type: 'close',
|
|
284
|
+
value
|
|
285
|
+
}), depth--, block = stack[stack.length - 1];
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (value === CHAR_COMMA && depth > 0) {
|
|
289
|
+
if (block.ranges > 0) {
|
|
290
|
+
block.ranges = 0;
|
|
291
|
+
let open = block.nodes.shift();
|
|
292
|
+
block.nodes = [
|
|
293
|
+
open,
|
|
294
|
+
{
|
|
295
|
+
type: 'text',
|
|
296
|
+
value: stringify(block)
|
|
297
|
+
}
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
push({
|
|
301
|
+
type: 'comma',
|
|
302
|
+
value
|
|
303
|
+
}), block.commas++;
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
if (value === CHAR_DOT && depth > 0 && 0 === block.commas) {
|
|
307
|
+
let siblings = block.nodes;
|
|
308
|
+
if (0 === depth || 0 === siblings.length) {
|
|
309
|
+
push({
|
|
310
|
+
type: 'text',
|
|
311
|
+
value
|
|
312
|
+
});
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
if ('dot' === prev.type) {
|
|
316
|
+
if (block.range = [], prev.value += value, prev.type = 'range', 3 !== block.nodes.length && 5 !== block.nodes.length) {
|
|
317
|
+
block.invalid = !0, block.ranges = 0, prev.type = 'text';
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
block.ranges++, block.args = [];
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if ('range' === prev.type) {
|
|
324
|
+
siblings.pop();
|
|
325
|
+
let before = siblings[siblings.length - 1];
|
|
326
|
+
before.value += prev.value + value, prev = before, block.ranges--;
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
push({
|
|
330
|
+
type: 'dot',
|
|
331
|
+
value
|
|
332
|
+
});
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
push({
|
|
336
|
+
type: 'text',
|
|
337
|
+
value
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
do if ('root' !== (block = stack.pop()).type) {
|
|
341
|
+
block.nodes.forEach((node)=>{
|
|
342
|
+
node.nodes || ('open' === node.type && (node.isOpen = !0), 'close' === node.type && (node.isClose = !0), node.nodes || (node.type = 'text'), node.invalid = !0);
|
|
343
|
+
});
|
|
344
|
+
let parent = stack[stack.length - 1], index = parent.nodes.indexOf(block);
|
|
345
|
+
parent.nodes.splice(index, 1, ...block.nodes);
|
|
346
|
+
}
|
|
347
|
+
while (stack.length > 0);
|
|
348
|
+
return push({
|
|
349
|
+
type: 'eos'
|
|
350
|
+
}), ast;
|
|
351
|
+
};
|
|
352
|
+
},
|
|
353
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
354
|
+
let utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js");
|
|
355
|
+
module.exports = (ast, options = {})=>{
|
|
356
|
+
let stringify = (node, parent = {})=>{
|
|
357
|
+
let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = !0 === node.invalid && !0 === options.escapeInvalid, output = '';
|
|
358
|
+
if (node.value) return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? '\\' + node.value : node.value;
|
|
359
|
+
if (node.value) return node.value;
|
|
360
|
+
if (node.nodes) for (let child of node.nodes)output += stringify(child);
|
|
361
|
+
return output;
|
|
362
|
+
};
|
|
363
|
+
return stringify(ast);
|
|
364
|
+
};
|
|
365
|
+
},
|
|
366
|
+
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js" (__unused_rspack_module, exports) {
|
|
367
|
+
exports.isInteger = (num)=>'number' == typeof num ? Number.isInteger(num) : 'string' == typeof num && '' !== num.trim() && Number.isInteger(Number(num)), exports.find = (node, type)=>node.nodes.find((node)=>node.type === type), exports.exceedsLimit = (min, max, step = 1, limit)=>!1 !== limit && !!exports.isInteger(min) && !!exports.isInteger(max) && (Number(max) - Number(min)) / Number(step) >= limit, exports.escapeNode = (block, n = 0, type)=>{
|
|
368
|
+
let node = block.nodes[n];
|
|
369
|
+
node && (type && node.type === type || 'open' === node.type || 'close' === node.type) && !0 !== node.escaped && (node.value = '\\' + node.value, node.escaped = !0);
|
|
370
|
+
}, exports.encloseBrace = (node)=>'brace' === node.type && node.commas >> 0 + node.ranges == 0 && (node.invalid = !0, !0), exports.isInvalidBrace = (block)=>'brace' === block.type && (!0 === block.invalid || !!block.dollar || (block.commas >> 0 + block.ranges == 0 || !0 !== block.open || !0 !== block.close) && (block.invalid = !0, !0)), exports.isOpenOrClose = (node)=>'open' === node.type || 'close' === node.type || !0 === node.open || !0 === node.close, exports.reduce = (nodes)=>nodes.reduce((acc, node)=>('text' === node.type && acc.push(node.value), 'range' === node.type && (node.type = 'text'), acc), []), exports.flatten = (...args)=>{
|
|
371
|
+
let result = [], flat = (arr)=>{
|
|
372
|
+
for(let i = 0; i < arr.length; i++){
|
|
373
|
+
let ele = arr[i];
|
|
374
|
+
if (Array.isArray(ele)) {
|
|
375
|
+
flat(ele);
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
void 0 !== ele && result.push(ele);
|
|
379
|
+
}
|
|
380
|
+
return result;
|
|
381
|
+
};
|
|
382
|
+
return flat(args), result;
|
|
383
|
+
};
|
|
384
|
+
},
|
|
385
|
+
"../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js" (module) {
|
|
386
|
+
var has = Object.prototype.hasOwnProperty, prefix = '~';
|
|
387
|
+
function Events() {}
|
|
388
|
+
function EE(fn, context, once) {
|
|
389
|
+
this.fn = fn, this.context = context, this.once = once || !1;
|
|
390
|
+
}
|
|
391
|
+
function addListener(emitter, event, fn, context, once) {
|
|
392
|
+
if ('function' != typeof fn) throw TypeError('The listener must be a function');
|
|
393
|
+
var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
|
|
394
|
+
return emitter._events[evt] ? emitter._events[evt].fn ? emitter._events[evt] = [
|
|
395
|
+
emitter._events[evt],
|
|
396
|
+
listener
|
|
397
|
+
] : emitter._events[evt].push(listener) : (emitter._events[evt] = listener, emitter._eventsCount++), emitter;
|
|
398
|
+
}
|
|
399
|
+
function clearEvent(emitter, evt) {
|
|
400
|
+
0 == --emitter._eventsCount ? emitter._events = new Events() : delete emitter._events[evt];
|
|
401
|
+
}
|
|
402
|
+
function EventEmitter() {
|
|
403
|
+
this._events = new Events(), this._eventsCount = 0;
|
|
404
|
+
}
|
|
405
|
+
Object.create && (Events.prototype = Object.create(null), new Events().__proto__ || (prefix = !1)), EventEmitter.prototype.eventNames = function eventNames() {
|
|
406
|
+
var events, name, names = [];
|
|
407
|
+
if (0 === this._eventsCount) return names;
|
|
408
|
+
for(name in events = this._events)has.call(events, name) && names.push(prefix ? name.slice(1) : name);
|
|
409
|
+
return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(events)) : names;
|
|
410
|
+
}, EventEmitter.prototype.listeners = function listeners(event) {
|
|
411
|
+
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
412
|
+
if (!handlers) return [];
|
|
413
|
+
if (handlers.fn) return [
|
|
414
|
+
handlers.fn
|
|
415
|
+
];
|
|
416
|
+
for(var i = 0, l = handlers.length, ee = Array(l); i < l; i++)ee[i] = handlers[i].fn;
|
|
417
|
+
return ee;
|
|
418
|
+
}, EventEmitter.prototype.listenerCount = function listenerCount(event) {
|
|
419
|
+
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
420
|
+
return listeners ? listeners.fn ? 1 : listeners.length : 0;
|
|
421
|
+
}, EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
422
|
+
var evt = prefix ? prefix + event : event;
|
|
423
|
+
if (!this._events[evt]) return !1;
|
|
424
|
+
var args, i, listeners = this._events[evt], len = arguments.length;
|
|
425
|
+
if (listeners.fn) {
|
|
426
|
+
switch(listeners.once && this.removeListener(event, listeners.fn, void 0, !0), len){
|
|
427
|
+
case 1:
|
|
428
|
+
return listeners.fn.call(listeners.context), !0;
|
|
429
|
+
case 2:
|
|
430
|
+
return listeners.fn.call(listeners.context, a1), !0;
|
|
431
|
+
case 3:
|
|
432
|
+
return listeners.fn.call(listeners.context, a1, a2), !0;
|
|
433
|
+
case 4:
|
|
434
|
+
return listeners.fn.call(listeners.context, a1, a2, a3), !0;
|
|
435
|
+
case 5:
|
|
436
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4), !0;
|
|
437
|
+
case 6:
|
|
438
|
+
return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), !0;
|
|
439
|
+
}
|
|
440
|
+
for(i = 1, args = Array(len - 1); i < len; i++)args[i - 1] = arguments[i];
|
|
441
|
+
listeners.fn.apply(listeners.context, args);
|
|
442
|
+
} else {
|
|
443
|
+
var j, length = listeners.length;
|
|
444
|
+
for(i = 0; i < length; i++)switch(listeners[i].once && this.removeListener(event, listeners[i].fn, void 0, !0), len){
|
|
445
|
+
case 1:
|
|
446
|
+
listeners[i].fn.call(listeners[i].context);
|
|
447
|
+
break;
|
|
448
|
+
case 2:
|
|
449
|
+
listeners[i].fn.call(listeners[i].context, a1);
|
|
450
|
+
break;
|
|
451
|
+
case 3:
|
|
452
|
+
listeners[i].fn.call(listeners[i].context, a1, a2);
|
|
453
|
+
break;
|
|
454
|
+
case 4:
|
|
455
|
+
listeners[i].fn.call(listeners[i].context, a1, a2, a3);
|
|
456
|
+
break;
|
|
457
|
+
default:
|
|
458
|
+
if (!args) for(j = 1, args = Array(len - 1); j < len; j++)args[j - 1] = arguments[j];
|
|
459
|
+
listeners[i].fn.apply(listeners[i].context, args);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return !0;
|
|
463
|
+
}, EventEmitter.prototype.on = function on(event, fn, context) {
|
|
464
|
+
return addListener(this, event, fn, context, !1);
|
|
465
|
+
}, EventEmitter.prototype.once = function once(event, fn, context) {
|
|
466
|
+
return addListener(this, event, fn, context, !0);
|
|
467
|
+
}, EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
468
|
+
var evt = prefix ? prefix + event : event;
|
|
469
|
+
if (!this._events[evt]) return this;
|
|
470
|
+
if (!fn) return clearEvent(this, evt), this;
|
|
471
|
+
var listeners = this._events[evt];
|
|
472
|
+
if (listeners.fn) listeners.fn !== fn || once && !listeners.once || context && listeners.context !== context || clearEvent(this, evt);
|
|
473
|
+
else {
|
|
474
|
+
for(var i = 0, events = [], length = listeners.length; i < length; i++)(listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) && events.push(listeners[i]);
|
|
475
|
+
events.length ? this._events[evt] = 1 === events.length ? events[0] : events : clearEvent(this, evt);
|
|
476
|
+
}
|
|
477
|
+
return this;
|
|
478
|
+
}, EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
479
|
+
var evt;
|
|
480
|
+
return event ? (evt = prefix ? prefix + event : event, this._events[evt] && clearEvent(this, evt)) : (this._events = new Events(), this._eventsCount = 0), this;
|
|
481
|
+
}, EventEmitter.prototype.off = EventEmitter.prototype.removeListener, EventEmitter.prototype.addListener = EventEmitter.prototype.on, EventEmitter.prefixed = prefix, EventEmitter.EventEmitter = EventEmitter, module.exports = EventEmitter;
|
|
482
|
+
},
|
|
483
|
+
"../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
484
|
+
let util = __webpack_require__("util?e86d"), toRegexRange = __webpack_require__("../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js"), isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), isValidValue = (value)=>'number' == typeof value || 'string' == typeof value && '' !== value, zeros = (input)=>{
|
|
485
|
+
let value = `${input}`, index = -1;
|
|
486
|
+
if ('-' === value[0] && (value = value.slice(1)), '0' === value) return !1;
|
|
487
|
+
for(; '0' === value[++index];);
|
|
488
|
+
return index > 0;
|
|
489
|
+
}, pad = (input, maxLength, toNumber)=>{
|
|
490
|
+
if (maxLength > 0) {
|
|
491
|
+
let dash = '-' === input[0] ? '-' : '';
|
|
492
|
+
dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, '0');
|
|
493
|
+
}
|
|
494
|
+
return !1 === toNumber ? String(input) : input;
|
|
495
|
+
}, toMaxLen = (input, maxLength)=>{
|
|
496
|
+
let negative = '-' === input[0] ? '-' : '';
|
|
497
|
+
for(negative && (input = input.slice(1), maxLength--); input.length < maxLength;)input = '0' + input;
|
|
498
|
+
return negative ? '-' + input : input;
|
|
499
|
+
}, toRange = (a, b, isNumbers, options)=>{
|
|
500
|
+
if (isNumbers) return toRegexRange(a, b, {
|
|
501
|
+
wrap: !1,
|
|
502
|
+
...options
|
|
503
|
+
});
|
|
504
|
+
let start = String.fromCharCode(a);
|
|
505
|
+
if (a === b) return start;
|
|
506
|
+
let stop = String.fromCharCode(b);
|
|
507
|
+
return `[${start}-${stop}]`;
|
|
508
|
+
}, toRegex = (start, end, options)=>{
|
|
509
|
+
if (Array.isArray(start)) {
|
|
510
|
+
let wrap = !0 === options.wrap, prefix = options.capture ? '' : '?:';
|
|
511
|
+
return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
|
|
512
|
+
}
|
|
513
|
+
return toRegexRange(start, end, options);
|
|
514
|
+
}, rangeError = (...args)=>RangeError('Invalid range arguments: ' + util.inspect(...args)), invalidRange = (start, end, options)=>{
|
|
515
|
+
if (!0 === options.strictRanges) throw rangeError([
|
|
516
|
+
start,
|
|
517
|
+
end
|
|
518
|
+
]);
|
|
519
|
+
return [];
|
|
520
|
+
}, fill = (start, end, step, options = {})=>{
|
|
521
|
+
if (null == end && isValidValue(start)) return [
|
|
522
|
+
start
|
|
523
|
+
];
|
|
524
|
+
if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options);
|
|
525
|
+
if ('function' == typeof step) return fill(start, end, 1, {
|
|
526
|
+
transform: step
|
|
527
|
+
});
|
|
528
|
+
if (isObject(step)) return fill(start, end, 0, step);
|
|
529
|
+
let opts = {
|
|
530
|
+
...options
|
|
531
|
+
};
|
|
532
|
+
if (!0 === opts.capture && (opts.wrap = !0), !Number.isInteger(+(step = step || opts.step || 1))) {
|
|
533
|
+
if (null != step && !isObject(step)) {
|
|
534
|
+
var step1 = step;
|
|
535
|
+
if (!0 === opts.strictRanges) throw TypeError(`Expected step "${step1}" to be a number`);
|
|
536
|
+
return [];
|
|
537
|
+
}
|
|
538
|
+
return fill(start, end, 1, step);
|
|
539
|
+
}
|
|
540
|
+
return Number.isInteger(+start) && Number.isInteger(+end) ? ((start, end, step = 1, options = {})=>{
|
|
541
|
+
let a = Number(start), b = Number(end);
|
|
542
|
+
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
543
|
+
if (!0 === options.strictRanges) throw rangeError([
|
|
544
|
+
start,
|
|
545
|
+
end
|
|
546
|
+
]);
|
|
547
|
+
return [];
|
|
548
|
+
}
|
|
549
|
+
0 === a && (a = 0), 0 === b && (b = 0);
|
|
550
|
+
let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
|
|
551
|
+
step = Math.max(Math.abs(step), 1);
|
|
552
|
+
let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = !1 === padded && !1 == ('string' == typeof start || 'string' == typeof end || !0 === options.stringify), format = options.transform || ((value)=>!0 === toNumber ? Number(value) : String(value));
|
|
553
|
+
if (options.toRegex && 1 === step) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
|
|
554
|
+
let parts = {
|
|
555
|
+
negatives: [],
|
|
556
|
+
positives: []
|
|
557
|
+
}, push = (num)=>parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)), range = [], index = 0;
|
|
558
|
+
for(; descending ? a >= b : a <= b;)!0 === options.toRegex && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
|
|
559
|
+
if (!0 === options.toRegex) {
|
|
560
|
+
let result, prefix, positives, negatives;
|
|
561
|
+
return step > 1 ? (parts.negatives.sort((a, b)=>a < b ? -1 : +(a > b)), parts.positives.sort((a, b)=>a < b ? -1 : +(a > b)), prefix = options.capture ? '' : '?:', positives = '', negatives = '', (parts.positives.length && (positives = parts.positives.map((v)=>toMaxLen(String(v), maxLen)).join('|')), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v)=>toMaxLen(String(v), maxLen)).join('|')})`), result = positives && negatives ? `${positives}|${negatives}` : positives || negatives, options.wrap) ? `(${prefix}${result})` : result) : toRegex(range, null, {
|
|
562
|
+
wrap: !1,
|
|
563
|
+
...options
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
return range;
|
|
567
|
+
})(start, end, step, opts) : ((start, end, step = 1, options = {})=>{
|
|
568
|
+
if (!Number.isInteger(+start) && start.length > 1 || !Number.isInteger(+end) && end.length > 1) return invalidRange(start, end, options);
|
|
569
|
+
let format = options.transform || ((val)=>String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
|
|
570
|
+
if (options.toRegex && 1 === step) return toRange(min, max, !1, options);
|
|
571
|
+
let range = [], index = 0;
|
|
572
|
+
for(; descending ? a >= b : a <= b;)range.push(format(a, index)), a = descending ? a - step : a + step, index++;
|
|
573
|
+
return !0 === options.toRegex ? toRegex(range, null, {
|
|
574
|
+
wrap: !1,
|
|
575
|
+
options
|
|
576
|
+
}) : range;
|
|
577
|
+
})(start, end, Math.max(Math.abs(step), 1), opts);
|
|
578
|
+
};
|
|
579
|
+
module.exports = fill;
|
|
580
|
+
},
|
|
581
|
+
"../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/debug.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
582
|
+
var debug;
|
|
583
|
+
module.exports = function() {
|
|
584
|
+
if (!debug) {
|
|
585
|
+
try {
|
|
586
|
+
debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js")("follow-redirects");
|
|
587
|
+
} catch (error) {}
|
|
588
|
+
"function" != typeof debug && (debug = function() {});
|
|
589
|
+
}
|
|
590
|
+
debug.apply(null, arguments);
|
|
591
|
+
};
|
|
592
|
+
},
|
|
593
|
+
"../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
594
|
+
var looksLikeNode, looksLikeBrowser, looksLikeV8, url = __webpack_require__("url?13be"), URL = url.URL, http = __webpack_require__("http?5e34"), https = __webpack_require__("https?1ab9"), Writable = __webpack_require__("stream?4cc8").Writable, assert = __webpack_require__("assert"), debug = __webpack_require__("../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/debug.js");
|
|
595
|
+
looksLikeNode = "u" > typeof process, looksLikeBrowser = "u" > typeof window && "u" > typeof document, looksLikeV8 = isFunction(Error.captureStackTrace), looksLikeNode || !looksLikeBrowser && looksLikeV8 || console.warn("The follow-redirects package should be excluded from browser builds.");
|
|
596
|
+
var useNativeURL = !1;
|
|
597
|
+
try {
|
|
598
|
+
assert(new URL(""));
|
|
599
|
+
} catch (error) {
|
|
600
|
+
useNativeURL = "ERR_INVALID_URL" === error.code;
|
|
601
|
+
}
|
|
602
|
+
var preservedUrlFields = [
|
|
603
|
+
"auth",
|
|
604
|
+
"host",
|
|
605
|
+
"hostname",
|
|
606
|
+
"href",
|
|
607
|
+
"path",
|
|
608
|
+
"pathname",
|
|
609
|
+
"port",
|
|
610
|
+
"protocol",
|
|
611
|
+
"query",
|
|
612
|
+
"search",
|
|
613
|
+
"hash"
|
|
614
|
+
], events = [
|
|
615
|
+
"abort",
|
|
616
|
+
"aborted",
|
|
617
|
+
"connect",
|
|
618
|
+
"error",
|
|
619
|
+
"socket",
|
|
620
|
+
"timeout"
|
|
621
|
+
], eventHandlers = Object.create(null);
|
|
622
|
+
events.forEach(function(event) {
|
|
623
|
+
eventHandlers[event] = function(arg1, arg2, arg3) {
|
|
624
|
+
this._redirectable.emit(event, arg1, arg2, arg3);
|
|
625
|
+
};
|
|
626
|
+
});
|
|
627
|
+
var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError), RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed"), TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded", RedirectionError), MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit"), WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"), destroy = Writable.prototype.destroy || noop;
|
|
628
|
+
function RedirectableRequest(options, responseCallback) {
|
|
629
|
+
Writable.call(this), this._sanitizeOptions(options), this._options = options, this._ended = !1, this._ending = !1, this._redirectCount = 0, this._redirects = [], this._requestBodyLength = 0, this._requestBodyBuffers = [], responseCallback && this.on("response", responseCallback);
|
|
630
|
+
var self = this;
|
|
631
|
+
this._onNativeResponse = function(response) {
|
|
632
|
+
try {
|
|
633
|
+
self._processResponse(response);
|
|
634
|
+
} catch (cause) {
|
|
635
|
+
self.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({
|
|
636
|
+
cause: cause
|
|
637
|
+
}));
|
|
638
|
+
}
|
|
639
|
+
}, this._performRequest();
|
|
640
|
+
}
|
|
641
|
+
function wrap(protocols) {
|
|
642
|
+
var exports = {
|
|
643
|
+
maxRedirects: 21,
|
|
644
|
+
maxBodyLength: 10485760
|
|
645
|
+
}, nativeProtocols = {};
|
|
646
|
+
return Object.keys(protocols).forEach(function(scheme) {
|
|
647
|
+
var protocol = scheme + ":", nativeProtocol = nativeProtocols[protocol] = protocols[scheme], wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
|
|
648
|
+
function get(input, options, callback) {
|
|
649
|
+
var wrappedRequest = wrappedProtocol.request(input, options, callback);
|
|
650
|
+
return wrappedRequest.end(), wrappedRequest;
|
|
651
|
+
}
|
|
652
|
+
Object.defineProperties(wrappedProtocol, {
|
|
653
|
+
request: {
|
|
654
|
+
value: function request(input, options, callback) {
|
|
655
|
+
return isURL(input) ? input = spreadUrlObject(input) : isString(input) ? input = spreadUrlObject(parseUrl(input)) : (callback = options, options = validateUrl(input), input = {
|
|
656
|
+
protocol: protocol
|
|
657
|
+
}), isFunction(options) && (callback = options, options = null), (options = Object.assign({
|
|
658
|
+
maxRedirects: exports.maxRedirects,
|
|
659
|
+
maxBodyLength: exports.maxBodyLength
|
|
660
|
+
}, input, options)).nativeProtocols = nativeProtocols, isString(options.host) || isString(options.hostname) || (options.hostname = "::1"), assert.equal(options.protocol, protocol, "protocol mismatch"), debug("options", options), new RedirectableRequest(options, callback);
|
|
661
|
+
},
|
|
662
|
+
configurable: !0,
|
|
663
|
+
enumerable: !0,
|
|
664
|
+
writable: !0
|
|
665
|
+
},
|
|
666
|
+
get: {
|
|
667
|
+
value: get,
|
|
668
|
+
configurable: !0,
|
|
669
|
+
enumerable: !0,
|
|
670
|
+
writable: !0
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
}), exports;
|
|
674
|
+
}
|
|
675
|
+
function noop() {}
|
|
676
|
+
function parseUrl(input) {
|
|
677
|
+
var parsed;
|
|
678
|
+
if (useNativeURL) parsed = new URL(input);
|
|
679
|
+
else if (!isString((parsed = validateUrl(url.parse(input))).protocol)) throw new InvalidUrlError({
|
|
680
|
+
input
|
|
681
|
+
});
|
|
682
|
+
return parsed;
|
|
683
|
+
}
|
|
684
|
+
function resolveUrl(relative, base) {
|
|
685
|
+
return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));
|
|
686
|
+
}
|
|
687
|
+
function validateUrl(input) {
|
|
688
|
+
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname) || /^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) throw new InvalidUrlError({
|
|
689
|
+
input: input.href || input
|
|
690
|
+
});
|
|
691
|
+
return input;
|
|
692
|
+
}
|
|
693
|
+
function spreadUrlObject(urlObject, target) {
|
|
694
|
+
var spread = target || {};
|
|
695
|
+
for (var key of preservedUrlFields)spread[key] = urlObject[key];
|
|
696
|
+
return spread.hostname.startsWith("[") && (spread.hostname = spread.hostname.slice(1, -1)), "" !== spread.port && (spread.port = Number(spread.port)), spread.path = spread.search ? spread.pathname + spread.search : spread.pathname, spread;
|
|
697
|
+
}
|
|
698
|
+
function removeMatchingHeaders(regex, headers) {
|
|
699
|
+
var lastValue;
|
|
700
|
+
for(var header in headers)regex.test(header) && (lastValue = headers[header], delete headers[header]);
|
|
701
|
+
return null == lastValue ? void 0 : String(lastValue).trim();
|
|
702
|
+
}
|
|
703
|
+
function createErrorType(code, message, baseClass) {
|
|
704
|
+
function CustomError(properties) {
|
|
705
|
+
isFunction(Error.captureStackTrace) && Error.captureStackTrace(this, this.constructor), Object.assign(this, properties || {}), this.code = code, this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
706
|
+
}
|
|
707
|
+
return CustomError.prototype = new (baseClass || Error)(), Object.defineProperties(CustomError.prototype, {
|
|
708
|
+
constructor: {
|
|
709
|
+
value: CustomError,
|
|
710
|
+
enumerable: !1
|
|
711
|
+
},
|
|
712
|
+
name: {
|
|
713
|
+
value: "Error [" + code + "]",
|
|
714
|
+
enumerable: !1
|
|
715
|
+
}
|
|
716
|
+
}), CustomError;
|
|
717
|
+
}
|
|
718
|
+
function destroyRequest(request, error) {
|
|
719
|
+
for (var event of events)request.removeListener(event, eventHandlers[event]);
|
|
720
|
+
request.on("error", noop), request.destroy(error);
|
|
721
|
+
}
|
|
722
|
+
function isSubdomain(subdomain, domain) {
|
|
723
|
+
assert(isString(subdomain) && isString(domain));
|
|
724
|
+
var dot = subdomain.length - domain.length - 1;
|
|
725
|
+
return dot > 0 && "." === subdomain[dot] && subdomain.endsWith(domain);
|
|
726
|
+
}
|
|
727
|
+
function isString(value) {
|
|
728
|
+
return "string" == typeof value || value instanceof String;
|
|
729
|
+
}
|
|
730
|
+
function isFunction(value) {
|
|
731
|
+
return "function" == typeof value;
|
|
732
|
+
}
|
|
733
|
+
function isBuffer(value) {
|
|
734
|
+
return "object" == typeof value && "length" in value;
|
|
735
|
+
}
|
|
736
|
+
function isURL(value) {
|
|
737
|
+
return URL && value instanceof URL;
|
|
738
|
+
}
|
|
739
|
+
RedirectableRequest.prototype = Object.create(Writable.prototype), RedirectableRequest.prototype.abort = function() {
|
|
740
|
+
destroyRequest(this._currentRequest), this._currentRequest.abort(), this.emit("abort");
|
|
741
|
+
}, RedirectableRequest.prototype.destroy = function(error) {
|
|
742
|
+
return destroyRequest(this._currentRequest, error), destroy.call(this, error), this;
|
|
743
|
+
}, RedirectableRequest.prototype.write = function(data, encoding, callback) {
|
|
744
|
+
if (this._ending) throw new WriteAfterEndError();
|
|
745
|
+
if (!isString(data) && !isBuffer(data)) throw TypeError("data should be a string, Buffer or Uint8Array");
|
|
746
|
+
if (isFunction(encoding) && (callback = encoding, encoding = null), 0 === data.length) {
|
|
747
|
+
callback && callback();
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
this._requestBodyLength + data.length <= this._options.maxBodyLength ? (this._requestBodyLength += data.length, this._requestBodyBuffers.push({
|
|
751
|
+
data: data,
|
|
752
|
+
encoding: encoding
|
|
753
|
+
}), this._currentRequest.write(data, encoding, callback)) : (this.emit("error", new MaxBodyLengthExceededError()), this.abort());
|
|
754
|
+
}, RedirectableRequest.prototype.end = function(data, encoding, callback) {
|
|
755
|
+
if (isFunction(data) ? (callback = data, data = encoding = null) : isFunction(encoding) && (callback = encoding, encoding = null), data) {
|
|
756
|
+
var self = this, currentRequest = this._currentRequest;
|
|
757
|
+
this.write(data, encoding, function() {
|
|
758
|
+
self._ended = !0, currentRequest.end(null, null, callback);
|
|
759
|
+
}), this._ending = !0;
|
|
760
|
+
} else this._ended = this._ending = !0, this._currentRequest.end(null, null, callback);
|
|
761
|
+
}, RedirectableRequest.prototype.setHeader = function(name, value) {
|
|
762
|
+
this._options.headers[name] = value, this._currentRequest.setHeader(name, value);
|
|
763
|
+
}, RedirectableRequest.prototype.removeHeader = function(name) {
|
|
764
|
+
delete this._options.headers[name], this._currentRequest.removeHeader(name);
|
|
765
|
+
}, RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
|
|
766
|
+
var self = this;
|
|
767
|
+
function destroyOnTimeout(socket) {
|
|
768
|
+
socket.setTimeout(msecs), socket.removeListener("timeout", socket.destroy), socket.addListener("timeout", socket.destroy);
|
|
769
|
+
}
|
|
770
|
+
function startTimer(socket) {
|
|
771
|
+
self._timeout && clearTimeout(self._timeout), self._timeout = setTimeout(function() {
|
|
772
|
+
self.emit("timeout"), clearTimer();
|
|
773
|
+
}, msecs), destroyOnTimeout(socket);
|
|
774
|
+
}
|
|
775
|
+
function clearTimer() {
|
|
776
|
+
self._timeout && (clearTimeout(self._timeout), self._timeout = null), self.removeListener("abort", clearTimer), self.removeListener("error", clearTimer), self.removeListener("response", clearTimer), self.removeListener("close", clearTimer), callback && self.removeListener("timeout", callback), self.socket || self._currentRequest.removeListener("socket", startTimer);
|
|
777
|
+
}
|
|
778
|
+
return callback && this.on("timeout", callback), this.socket ? startTimer(this.socket) : this._currentRequest.once("socket", startTimer), this.on("socket", destroyOnTimeout), this.on("abort", clearTimer), this.on("error", clearTimer), this.on("response", clearTimer), this.on("close", clearTimer), this;
|
|
779
|
+
}, [
|
|
780
|
+
"flushHeaders",
|
|
781
|
+
"getHeader",
|
|
782
|
+
"setNoDelay",
|
|
783
|
+
"setSocketKeepAlive"
|
|
784
|
+
].forEach(function(method) {
|
|
785
|
+
RedirectableRequest.prototype[method] = function(a, b) {
|
|
786
|
+
return this._currentRequest[method](a, b);
|
|
787
|
+
};
|
|
788
|
+
}), [
|
|
789
|
+
"aborted",
|
|
790
|
+
"connection",
|
|
791
|
+
"socket"
|
|
792
|
+
].forEach(function(property) {
|
|
793
|
+
Object.defineProperty(RedirectableRequest.prototype, property, {
|
|
794
|
+
get: function() {
|
|
795
|
+
return this._currentRequest[property];
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
}), RedirectableRequest.prototype._sanitizeOptions = function(options) {
|
|
799
|
+
if (options.headers || (options.headers = {}), options.host && (options.hostname || (options.hostname = options.host), delete options.host), !options.pathname && options.path) {
|
|
800
|
+
var searchPos = options.path.indexOf("?");
|
|
801
|
+
searchPos < 0 ? options.pathname = options.path : (options.pathname = options.path.substring(0, searchPos), options.search = options.path.substring(searchPos));
|
|
802
|
+
}
|
|
803
|
+
}, RedirectableRequest.prototype._performRequest = function() {
|
|
804
|
+
var protocol = this._options.protocol, nativeProtocol = this._options.nativeProtocols[protocol];
|
|
805
|
+
if (!nativeProtocol) throw TypeError("Unsupported protocol " + protocol);
|
|
806
|
+
if (this._options.agents) {
|
|
807
|
+
var scheme = protocol.slice(0, -1);
|
|
808
|
+
this._options.agent = this._options.agents[scheme];
|
|
809
|
+
}
|
|
810
|
+
var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
|
|
811
|
+
for (var event of (request._redirectable = this, events))request.on(event, eventHandlers[event]);
|
|
812
|
+
if (this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path, this._isRedirect) {
|
|
813
|
+
var i = 0, self = this, buffers = this._requestBodyBuffers;
|
|
814
|
+
!function writeNext(error) {
|
|
815
|
+
if (request === self._currentRequest) if (error) self.emit("error", error);
|
|
816
|
+
else if (i < buffers.length) {
|
|
817
|
+
var buffer = buffers[i++];
|
|
818
|
+
request.finished || request.write(buffer.data, buffer.encoding, writeNext);
|
|
819
|
+
} else self._ended && request.end();
|
|
820
|
+
}();
|
|
821
|
+
}
|
|
822
|
+
}, RedirectableRequest.prototype._processResponse = function(response) {
|
|
823
|
+
var requestHeaders, statusCode = response.statusCode;
|
|
824
|
+
this._options.trackRedirects && this._redirects.push({
|
|
825
|
+
url: this._currentUrl,
|
|
826
|
+
headers: response.headers,
|
|
827
|
+
statusCode: statusCode
|
|
828
|
+
});
|
|
829
|
+
var location = response.headers.location;
|
|
830
|
+
if (!location || !1 === this._options.followRedirects || statusCode < 300 || statusCode >= 400) {
|
|
831
|
+
response.responseUrl = this._currentUrl, response.redirects = this._redirects, this.emit("response", response), this._requestBodyBuffers = [];
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
if (destroyRequest(this._currentRequest), response.destroy(), ++this._redirectCount > this._options.maxRedirects) throw new TooManyRedirectsError();
|
|
835
|
+
var beforeRedirect = this._options.beforeRedirect;
|
|
836
|
+
beforeRedirect && (requestHeaders = Object.assign({
|
|
837
|
+
Host: response.req.getHeader("host")
|
|
838
|
+
}, this._options.headers));
|
|
839
|
+
var method = this._options.method;
|
|
840
|
+
(301 !== statusCode && 302 !== statusCode || "POST" !== this._options.method) && (303 !== statusCode || /^(?:GET|HEAD)$/.test(this._options.method)) || (this._options.method = "GET", this._requestBodyBuffers = [], removeMatchingHeaders(/^content-/i, this._options.headers));
|
|
841
|
+
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers), currentUrlParts = parseUrl(this._currentUrl), currentHost = currentHostHeader || currentUrlParts.host, currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, {
|
|
842
|
+
host: currentHost
|
|
843
|
+
})), redirectUrl = resolveUrl(location, currentUrl);
|
|
844
|
+
if (debug("redirecting to", redirectUrl.href), this._isRedirect = !0, spreadUrlObject(redirectUrl, this._options), (redirectUrl.protocol === currentUrlParts.protocol || "https:" === redirectUrl.protocol) && (redirectUrl.host === currentHost || isSubdomain(redirectUrl.host, currentHost)) || removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers), isFunction(beforeRedirect)) {
|
|
845
|
+
var responseDetails = {
|
|
846
|
+
headers: response.headers,
|
|
847
|
+
statusCode: statusCode
|
|
848
|
+
}, requestDetails = {
|
|
849
|
+
url: currentUrl,
|
|
850
|
+
method: method,
|
|
851
|
+
headers: requestHeaders
|
|
852
|
+
};
|
|
853
|
+
beforeRedirect(this._options, responseDetails, requestDetails), this._sanitizeOptions(this._options);
|
|
854
|
+
}
|
|
855
|
+
this._performRequest();
|
|
856
|
+
}, module.exports = wrap({
|
|
857
|
+
http: http,
|
|
858
|
+
https: https
|
|
859
|
+
}), module.exports.wrap = wrap;
|
|
860
|
+
},
|
|
861
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
862
|
+
module.exports = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy.js");
|
|
863
|
+
},
|
|
864
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
865
|
+
var ProxyServer = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/index.js").Server;
|
|
866
|
+
function createProxyServer(options) {
|
|
867
|
+
return new ProxyServer(options);
|
|
868
|
+
}
|
|
869
|
+
ProxyServer.createProxyServer = createProxyServer, ProxyServer.createServer = createProxyServer, ProxyServer.createProxy = createProxyServer, module.exports = ProxyServer;
|
|
870
|
+
},
|
|
871
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
872
|
+
var url = __webpack_require__("url?13be"), required = __webpack_require__("../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js"), upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, isSSL = /^https|wss/;
|
|
873
|
+
function hasPort(host) {
|
|
874
|
+
return !!~host.indexOf(':');
|
|
875
|
+
}
|
|
876
|
+
exports.isSSL = isSSL, exports.setupOutgoing = function(outgoing, options, req, forward) {
|
|
877
|
+
outgoing.port = options[forward || 'target'].port || (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80), [
|
|
878
|
+
'host',
|
|
879
|
+
'hostname',
|
|
880
|
+
'socketPath',
|
|
881
|
+
'pfx',
|
|
882
|
+
'key',
|
|
883
|
+
'passphrase',
|
|
884
|
+
'cert',
|
|
885
|
+
'ca',
|
|
886
|
+
'ciphers',
|
|
887
|
+
'secureProtocol'
|
|
888
|
+
].forEach(function(e) {
|
|
889
|
+
outgoing[e] = options[forward || 'target'][e];
|
|
890
|
+
}), outgoing.method = options.method || req.method, outgoing.headers = Object.assign({}, req.headers), options.headers && Object.assign(outgoing.headers, options.headers), options.auth && (outgoing.auth = options.auth), options.ca && (outgoing.ca = options.ca), isSSL.test(options[forward || 'target'].protocol) && (outgoing.rejectUnauthorized = void 0 === options.secure || options.secure), outgoing.agent = options.agent || !1, outgoing.localAddress = options.localAddress, !outgoing.agent && (outgoing.headers = outgoing.headers || {}, 'string' == typeof outgoing.headers.connection && upgradeHeader.test(outgoing.headers.connection) || (outgoing.headers.connection = 'close'));
|
|
891
|
+
var target = options[forward || 'target'], targetPath = target && !1 !== options.prependPath && target.path || '', outgoingPath = options.toProxy ? req.url : url.parse(req.url).path || '';
|
|
892
|
+
return outgoingPath = options.ignorePath ? '' : outgoingPath, outgoing.path = exports.urlJoin(targetPath, outgoingPath), options.changeOrigin && (outgoing.headers.host = required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host) ? outgoing.host + ':' + outgoing.port : outgoing.host), outgoing;
|
|
893
|
+
}, exports.setupSocket = function(socket) {
|
|
894
|
+
return socket.setTimeout(0), socket.setNoDelay(!0), socket.setKeepAlive(!0, 0), socket;
|
|
895
|
+
}, exports.getPort = function(req) {
|
|
896
|
+
var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : '';
|
|
897
|
+
return res ? res[1] : exports.hasEncryptedConnection(req) ? '443' : '80';
|
|
898
|
+
}, exports.hasEncryptedConnection = function(req) {
|
|
899
|
+
return !!(req.connection.encrypted || req.connection.pair);
|
|
900
|
+
}, exports.urlJoin = function() {
|
|
901
|
+
var retSegs, args = Array.prototype.slice.call(arguments), lastIndex = args.length - 1, lastSegs = args[lastIndex].split('?');
|
|
902
|
+
return args[lastIndex] = lastSegs.shift(), (retSegs = [
|
|
903
|
+
args.filter(Boolean).join('/').replace(/\/+/g, '/').replace('http:/', 'http://').replace('https:/', 'https://')
|
|
904
|
+
]).push.apply(retSegs, lastSegs), retSegs.join('?');
|
|
905
|
+
}, exports.rewriteCookieProperty = function rewriteCookieProperty(header, config, property) {
|
|
906
|
+
return Array.isArray(header) ? header.map(function(headerElement) {
|
|
907
|
+
return rewriteCookieProperty(headerElement, config, property);
|
|
908
|
+
}) : header.replace(RegExp("(;\\s*" + property + "=)([^;]+)", 'i'), function(match, prefix, previousValue) {
|
|
909
|
+
var newValue;
|
|
910
|
+
if (previousValue in config) newValue = config[previousValue];
|
|
911
|
+
else {
|
|
912
|
+
if (!('*' in config)) return match;
|
|
913
|
+
newValue = config['*'];
|
|
914
|
+
}
|
|
915
|
+
return newValue ? prefix + newValue : '';
|
|
916
|
+
});
|
|
917
|
+
};
|
|
918
|
+
},
|
|
919
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
920
|
+
var httpProxy = module.exports, parse_url = __webpack_require__("url?13be").parse, EE3 = __webpack_require__("../../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"), http = __webpack_require__("http?5e34"), https = __webpack_require__("https?1ab9"), web = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js"), ws = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js");
|
|
921
|
+
function createRightProxy(type) {
|
|
922
|
+
return function(options) {
|
|
923
|
+
return function(req, res) {
|
|
924
|
+
var head, cbl, passes = 'ws' === type ? this.wsPasses : this.webPasses, args = [].slice.call(arguments), cntr = args.length - 1;
|
|
925
|
+
'function' == typeof args[cntr] && (cbl = args[cntr], cntr--);
|
|
926
|
+
var requestOptions = options;
|
|
927
|
+
if (!(args[cntr] instanceof Buffer) && args[cntr] !== res && (Object.assign(requestOptions = Object.assign({}, options), args[cntr]), cntr--), args[cntr] instanceof Buffer && (head = args[cntr]), [
|
|
928
|
+
'target',
|
|
929
|
+
'forward'
|
|
930
|
+
].forEach(function(e) {
|
|
931
|
+
'string' == typeof requestOptions[e] && (requestOptions[e] = parse_url(requestOptions[e]));
|
|
932
|
+
}), !requestOptions.target && !requestOptions.forward) return this.emit('error', Error('Must provide a proper URL as target'));
|
|
933
|
+
for(var i = 0; i < passes.length && !passes[i](req, res, requestOptions, head, this, cbl); i++);
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
function ProxyServer(options) {
|
|
938
|
+
EE3.call(this), (options = options || {}).prependPath = !1 !== options.prependPath, this.web = this.proxyRequest = createRightProxy('web')(options), this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options), this.options = options, this.webPasses = Object.keys(web).map(function(pass) {
|
|
939
|
+
return web[pass];
|
|
940
|
+
}), this.wsPasses = Object.keys(ws).map(function(pass) {
|
|
941
|
+
return ws[pass];
|
|
942
|
+
}), this.on('error', this.onError, this);
|
|
943
|
+
}
|
|
944
|
+
httpProxy.Server = ProxyServer, httpProxy.createRightProxy = createRightProxy, __webpack_require__("util?e86d").inherits(ProxyServer, EE3), ProxyServer.prototype.onError = function(err) {
|
|
945
|
+
if (1 === this.listeners('error').length) throw err;
|
|
946
|
+
}, ProxyServer.prototype.listen = function(port, hostname) {
|
|
947
|
+
var self = this, closure = function(req, res) {
|
|
948
|
+
self.web(req, res);
|
|
949
|
+
};
|
|
950
|
+
return this._server = this.options.ssl ? https.createServer(this.options.ssl, closure) : http.createServer(closure), this.options.ws && this._server.on('upgrade', function(req, socket, head) {
|
|
951
|
+
self.ws(req, socket, head);
|
|
952
|
+
}), this._server.listen(port, hostname), this;
|
|
953
|
+
}, ProxyServer.prototype.close = function(callback) {
|
|
954
|
+
var self = this;
|
|
955
|
+
function done() {
|
|
956
|
+
self._server = null, callback && callback.apply(null, arguments);
|
|
957
|
+
}
|
|
958
|
+
this._server && this._server.close(done);
|
|
959
|
+
}, ProxyServer.prototype.before = function(type, passName, callback) {
|
|
960
|
+
if ('ws' !== type && 'web' !== type) throw Error('type must be `web` or `ws`');
|
|
961
|
+
var passes = 'ws' === type ? this.wsPasses : this.webPasses, i = !1;
|
|
962
|
+
if (passes.forEach(function(v, idx) {
|
|
963
|
+
v.name === passName && (i = idx);
|
|
964
|
+
}), !1 === i) throw Error('No such pass');
|
|
965
|
+
passes.splice(i, 0, callback);
|
|
966
|
+
}, ProxyServer.prototype.after = function(type, passName, callback) {
|
|
967
|
+
if ('ws' !== type && 'web' !== type) throw Error('type must be `web` or `ws`');
|
|
968
|
+
var passes = 'ws' === type ? this.wsPasses : this.webPasses, i = !1;
|
|
969
|
+
if (passes.forEach(function(v, idx) {
|
|
970
|
+
v.name === passName && (i = idx);
|
|
971
|
+
}), !1 === i) throw Error('No such pass');
|
|
972
|
+
passes.splice(i++, 0, callback);
|
|
973
|
+
};
|
|
974
|
+
},
|
|
975
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
976
|
+
var httpNative = __webpack_require__("http?5e34"), httpsNative = __webpack_require__("https?1ab9"), web_o = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js"), followRedirects = __webpack_require__("../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3_supports-color@10.2.2_/node_modules/follow-redirects/index.js");
|
|
977
|
+
web_o = Object.keys(web_o).map(function(pass) {
|
|
978
|
+
return web_o[pass];
|
|
979
|
+
});
|
|
980
|
+
var nativeAgents = {
|
|
981
|
+
http: httpNative,
|
|
982
|
+
https: httpsNative
|
|
983
|
+
};
|
|
984
|
+
module.exports = {
|
|
985
|
+
deleteLength: function deleteLength(req, res, options) {
|
|
986
|
+
'DELETE' !== req.method && 'OPTIONS' !== req.method || req.headers['content-length'] || (req.headers['content-length'] = '0', delete req.headers['transfer-encoding']);
|
|
987
|
+
},
|
|
988
|
+
timeout: function timeout(req, res, options) {
|
|
989
|
+
options.timeout && req.socket.setTimeout(options.timeout);
|
|
990
|
+
},
|
|
991
|
+
XHeaders: function XHeaders(req, res, options) {
|
|
992
|
+
if (options.xfwd) {
|
|
993
|
+
var encrypted = req.isSpdy || common.hasEncryptedConnection(req), values = {
|
|
994
|
+
for: req.connection.remoteAddress || req.socket.remoteAddress,
|
|
995
|
+
port: common.getPort(req),
|
|
996
|
+
proto: encrypted ? 'https' : 'http'
|
|
997
|
+
};
|
|
998
|
+
[
|
|
999
|
+
'for',
|
|
1000
|
+
'port',
|
|
1001
|
+
'proto'
|
|
1002
|
+
].forEach(function(header) {
|
|
1003
|
+
req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
|
|
1004
|
+
}), req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers.host || '';
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
stream: function stream(req, res, options, _, server, clb) {
|
|
1008
|
+
server.emit('start', req, res, options.target || options.forward);
|
|
1009
|
+
var agents = options.followRedirects ? followRedirects : nativeAgents, http = agents.http, https = agents.https;
|
|
1010
|
+
if (options.forward) {
|
|
1011
|
+
var forwardReq = ('https:' === options.forward.protocol ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req, 'forward')), forwardError = createErrorHandler(forwardReq, options.forward);
|
|
1012
|
+
if (req.on('error', forwardError), forwardReq.on('error', forwardError), (options.buffer || req).pipe(forwardReq), !options.target) return res.end();
|
|
1013
|
+
}
|
|
1014
|
+
var proxyReq = ('https:' === options.target.protocol ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req));
|
|
1015
|
+
proxyReq.on('socket', function(socket) {
|
|
1016
|
+
server && !proxyReq.getHeader('expect') && server.emit('proxyReq', proxyReq, req, res, options);
|
|
1017
|
+
}), options.proxyTimeout && proxyReq.setTimeout(options.proxyTimeout, function() {
|
|
1018
|
+
proxyReq.abort();
|
|
1019
|
+
}), req.on('aborted', function() {
|
|
1020
|
+
proxyReq.abort();
|
|
1021
|
+
});
|
|
1022
|
+
var proxyError = createErrorHandler(proxyReq, options.target);
|
|
1023
|
+
function createErrorHandler(proxyReq, url) {
|
|
1024
|
+
return function proxyError(err) {
|
|
1025
|
+
if (req.socket.destroyed && 'ECONNRESET' === err.code) return server.emit('econnreset', err, req, res, url), proxyReq.abort();
|
|
1026
|
+
clb ? clb(err, req, res, url) : server.emit('error', err, req, res, url);
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
req.on('error', proxyError), proxyReq.on('error', proxyError), (options.buffer || req).pipe(proxyReq), proxyReq.on('response', function(proxyRes) {
|
|
1030
|
+
if (server && server.emit('proxyRes', proxyRes, req, res), !res.headersSent && !options.selfHandleResponse) for(var i = 0; i < web_o.length && !web_o[i](req, res, proxyRes, options); i++);
|
|
1031
|
+
res.finished ? server && server.emit('end', req, res, proxyRes) : (proxyRes.on('end', function() {
|
|
1032
|
+
server && server.emit('end', req, res, proxyRes);
|
|
1033
|
+
}), options.selfHandleResponse || proxyRes.pipe(res));
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
},
|
|
1038
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1039
|
+
var url = __webpack_require__("url?13be"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js"), redirectRegex = /^201|30(1|2|7|8)$/;
|
|
1040
|
+
module.exports = {
|
|
1041
|
+
removeChunked: function removeChunked(req, res, proxyRes) {
|
|
1042
|
+
'1.0' === req.httpVersion && delete proxyRes.headers['transfer-encoding'];
|
|
1043
|
+
},
|
|
1044
|
+
setConnection: function setConnection(req, res, proxyRes) {
|
|
1045
|
+
'1.0' === req.httpVersion ? proxyRes.headers.connection = req.headers.connection || 'close' : '2.0' === req.httpVersion || proxyRes.headers.connection || (proxyRes.headers.connection = req.headers.connection || 'keep-alive');
|
|
1046
|
+
},
|
|
1047
|
+
setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {
|
|
1048
|
+
if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers.location && redirectRegex.test(proxyRes.statusCode)) {
|
|
1049
|
+
var target = url.parse(options.target), u = url.parse(proxyRes.headers.location);
|
|
1050
|
+
target.host == u.host && (options.hostRewrite ? u.host = options.hostRewrite : options.autoRewrite && (u.host = req.headers.host), options.protocolRewrite && (u.protocol = options.protocolRewrite), proxyRes.headers.location = u.format());
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
writeHeaders: function writeHeaders(req, res, proxyRes, options) {
|
|
1054
|
+
var rawHeaderKeyMap, rewriteCookieDomainConfig = options.cookieDomainRewrite, rewriteCookiePathConfig = options.cookiePathRewrite, preserveHeaderKeyCase = options.preserveHeaderKeyCase, setHeader = function(key, header) {
|
|
1055
|
+
void 0 != header && (rewriteCookieDomainConfig && 'set-cookie' === key.toLowerCase() && (header = common.rewriteCookieProperty(header, rewriteCookieDomainConfig, 'domain')), rewriteCookiePathConfig && 'set-cookie' === key.toLowerCase() && (header = common.rewriteCookieProperty(header, rewriteCookiePathConfig, 'path')), res.setHeader(String(key).trim(), header));
|
|
1056
|
+
};
|
|
1057
|
+
if ('string' == typeof rewriteCookieDomainConfig && (rewriteCookieDomainConfig = {
|
|
1058
|
+
'*': rewriteCookieDomainConfig
|
|
1059
|
+
}), 'string' == typeof rewriteCookiePathConfig && (rewriteCookiePathConfig = {
|
|
1060
|
+
'*': rewriteCookiePathConfig
|
|
1061
|
+
}), preserveHeaderKeyCase && void 0 != proxyRes.rawHeaders) {
|
|
1062
|
+
rawHeaderKeyMap = {};
|
|
1063
|
+
for(var i = 0; i < proxyRes.rawHeaders.length; i += 2){
|
|
1064
|
+
var key = proxyRes.rawHeaders[i];
|
|
1065
|
+
rawHeaderKeyMap[key.toLowerCase()] = key;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
Object.keys(proxyRes.headers).forEach(function(key) {
|
|
1069
|
+
var header = proxyRes.headers[key];
|
|
1070
|
+
preserveHeaderKeyCase && rawHeaderKeyMap && (key = rawHeaderKeyMap[key] || key), setHeader(key, header);
|
|
1071
|
+
});
|
|
1072
|
+
},
|
|
1073
|
+
writeStatusCode: function writeStatusCode(req, res, proxyRes) {
|
|
1074
|
+
proxyRes.statusMessage ? (res.statusCode = proxyRes.statusCode, res.statusMessage = proxyRes.statusMessage) : res.statusCode = proxyRes.statusCode;
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
},
|
|
1078
|
+
"../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1079
|
+
var http = __webpack_require__("http?5e34"), https = __webpack_require__("https?1ab9"), common = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/lib/http-proxy/common.js");
|
|
1080
|
+
module.exports = {
|
|
1081
|
+
checkMethodAndHeader: function checkMethodAndHeader(req, socket) {
|
|
1082
|
+
if ('GET' !== req.method || !req.headers.upgrade || 'websocket' !== req.headers.upgrade.toLowerCase()) return socket.destroy(), !0;
|
|
1083
|
+
},
|
|
1084
|
+
XHeaders: function XHeaders(req, socket, options) {
|
|
1085
|
+
if (options.xfwd) {
|
|
1086
|
+
var values = {
|
|
1087
|
+
for: req.connection.remoteAddress || req.socket.remoteAddress,
|
|
1088
|
+
port: common.getPort(req),
|
|
1089
|
+
proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws'
|
|
1090
|
+
};
|
|
1091
|
+
[
|
|
1092
|
+
'for',
|
|
1093
|
+
'port',
|
|
1094
|
+
'proto'
|
|
1095
|
+
].forEach(function(header) {
|
|
1096
|
+
req.headers['x-forwarded-' + header] = (req.headers['x-forwarded-' + header] || '') + (req.headers['x-forwarded-' + header] ? ',' : '') + values[header];
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
stream: function stream(req, socket, options, head, server, clb) {
|
|
1101
|
+
var createHttpHeader = function(line, headers) {
|
|
1102
|
+
return Object.keys(headers).reduce(function(head, key) {
|
|
1103
|
+
var value = headers[key];
|
|
1104
|
+
if (!Array.isArray(value)) return head.push(key + ': ' + value), head;
|
|
1105
|
+
for(var i = 0; i < value.length; i++)head.push(key + ': ' + value[i]);
|
|
1106
|
+
return head;
|
|
1107
|
+
}, [
|
|
1108
|
+
line
|
|
1109
|
+
]).join('\r\n') + '\r\n\r\n';
|
|
1110
|
+
};
|
|
1111
|
+
common.setupSocket(socket), head && head.length && socket.unshift(head);
|
|
1112
|
+
var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request(common.setupOutgoing(options.ssl || {}, options, req));
|
|
1113
|
+
return server && server.emit('proxyReqWs', proxyReq, req, socket, options, head), proxyReq.on('error', onOutgoingError), proxyReq.on('response', function(res) {
|
|
1114
|
+
res.upgrade || (socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers)), res.pipe(socket));
|
|
1115
|
+
}), proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {
|
|
1116
|
+
proxySocket.on('error', onOutgoingError), proxySocket.on('end', function() {
|
|
1117
|
+
server.emit('close', proxyRes, proxySocket, proxyHead);
|
|
1118
|
+
}), socket.on('error', function() {
|
|
1119
|
+
proxySocket.end();
|
|
1120
|
+
}), common.setupSocket(proxySocket), proxyHead && proxyHead.length && proxySocket.unshift(proxyHead), socket.write(createHttpHeader('HTTP/1.1 101 Switching Protocols', proxyRes.headers)), proxySocket.pipe(socket).pipe(proxySocket), server.emit('open', proxySocket), server.emit('proxySocket', proxySocket);
|
|
1121
|
+
}), proxyReq.end();
|
|
1122
|
+
function onOutgoingError(err) {
|
|
1123
|
+
clb ? clb(err, req, socket) : server.emit('error', err, req, socket), socket.end();
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
},
|
|
1128
|
+
"../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js" (module) {
|
|
1129
|
+
module.exports = function isExtglob(str) {
|
|
1130
|
+
var match;
|
|
1131
|
+
if ('string' != typeof str || '' === str) return !1;
|
|
1132
|
+
for(; match = /(\\).|([@?!+*]\(.*\))/g.exec(str);){
|
|
1133
|
+
if (match[2]) return !0;
|
|
1134
|
+
str = str.slice(match.index + match[0].length);
|
|
1135
|
+
}
|
|
1136
|
+
return !1;
|
|
1137
|
+
};
|
|
1138
|
+
},
|
|
1139
|
+
"../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1140
|
+
var isExtglob = __webpack_require__("../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js"), chars = {
|
|
1141
|
+
'{': '}',
|
|
1142
|
+
'(': ')',
|
|
1143
|
+
'[': ']'
|
|
1144
|
+
}, strictCheck = function(str) {
|
|
1145
|
+
if ('!' === str[0]) return !0;
|
|
1146
|
+
for(var index = 0, pipeIndex = -2, closeSquareIndex = -2, closeCurlyIndex = -2, closeParenIndex = -2, backSlashIndex = -2; index < str.length;){
|
|
1147
|
+
if ('*' === str[index] || '?' === str[index + 1] && /[\].+)]/.test(str[index]) || -1 !== closeSquareIndex && '[' === str[index] && ']' !== str[index + 1] && (closeSquareIndex < index && (closeSquareIndex = str.indexOf(']', index)), closeSquareIndex > index) && (-1 === backSlashIndex || backSlashIndex > closeSquareIndex || -1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeSquareIndex) || -1 !== closeCurlyIndex && '{' === str[index] && '}' !== str[index + 1] && (closeCurlyIndex = str.indexOf('}', index)) > index && (-1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeCurlyIndex) || -1 !== closeParenIndex && '(' === str[index] && '?' === str[index + 1] && /[:!=]/.test(str[index + 2]) && ')' !== str[index + 3] && (closeParenIndex = str.indexOf(')', index)) > index && (-1 === (backSlashIndex = str.indexOf('\\', index)) || backSlashIndex > closeParenIndex) || -1 !== pipeIndex && '(' === str[index] && '|' !== str[index + 1] && (pipeIndex < index && (pipeIndex = str.indexOf('|', index)), -1 !== pipeIndex && ')' !== str[pipeIndex + 1] && (closeParenIndex = str.indexOf(')', pipeIndex)) > pipeIndex) && (-1 === (backSlashIndex = str.indexOf('\\', pipeIndex)) || backSlashIndex > closeParenIndex)) return !0;
|
|
1148
|
+
if ('\\' === str[index]) {
|
|
1149
|
+
var open = str[index + 1];
|
|
1150
|
+
index += 2;
|
|
1151
|
+
var close = chars[open];
|
|
1152
|
+
if (close) {
|
|
1153
|
+
var n = str.indexOf(close, index);
|
|
1154
|
+
-1 !== n && (index = n + 1);
|
|
1155
|
+
}
|
|
1156
|
+
if ('!' === str[index]) return !0;
|
|
1157
|
+
} else index++;
|
|
1158
|
+
}
|
|
1159
|
+
return !1;
|
|
1160
|
+
}, relaxedCheck = function(str) {
|
|
1161
|
+
if ('!' === str[0]) return !0;
|
|
1162
|
+
for(var index = 0; index < str.length;){
|
|
1163
|
+
if (/[*?{}()[\]]/.test(str[index])) return !0;
|
|
1164
|
+
if ('\\' === str[index]) {
|
|
1165
|
+
var open = str[index + 1];
|
|
1166
|
+
index += 2;
|
|
1167
|
+
var close = chars[open];
|
|
1168
|
+
if (close) {
|
|
1169
|
+
var n = str.indexOf(close, index);
|
|
1170
|
+
-1 !== n && (index = n + 1);
|
|
1171
|
+
}
|
|
1172
|
+
if ('!' === str[index]) return !0;
|
|
1173
|
+
} else index++;
|
|
1174
|
+
}
|
|
1175
|
+
return !1;
|
|
1176
|
+
};
|
|
1177
|
+
module.exports = function isGlob(str, options) {
|
|
1178
|
+
if ('string' != typeof str || '' === str) return !1;
|
|
1179
|
+
if (isExtglob(str)) return !0;
|
|
1180
|
+
var check = strictCheck;
|
|
1181
|
+
return options && !1 === options.strict && (check = relaxedCheck), check(str);
|
|
1182
|
+
};
|
|
1183
|
+
},
|
|
1184
|
+
"../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js" (module) {
|
|
1185
|
+
module.exports = function(num) {
|
|
1186
|
+
return 'number' == typeof num ? num - num == 0 : 'string' == typeof num && '' !== num.trim() && (Number.isFinite ? Number.isFinite(+num) : isFinite(+num));
|
|
1187
|
+
};
|
|
1188
|
+
},
|
|
1189
|
+
"../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js" (__unused_rspack_module, exports) {
|
|
1190
|
+
function isObject(o) {
|
|
1191
|
+
return '[object Object]' === Object.prototype.toString.call(o);
|
|
1192
|
+
}
|
|
1193
|
+
exports.isPlainObject = function isPlainObject(o) {
|
|
1194
|
+
var ctor, prot;
|
|
1195
|
+
return !1 !== isObject(o) && (void 0 === (ctor = o.constructor) || !1 !== isObject(prot = ctor.prototype) && !1 !== prot.hasOwnProperty('isPrototypeOf'));
|
|
1196
|
+
};
|
|
1197
|
+
},
|
|
1198
|
+
"../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1199
|
+
let util = __webpack_require__("util?e86d"), braces = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), isEmptyString = (v)=>'' === v || './' === v, hasBraces = (v)=>{
|
|
1200
|
+
let index = v.indexOf('{');
|
|
1201
|
+
return index > -1 && v.indexOf('}', index) > -1;
|
|
1202
|
+
}, micromatch = (list, patterns, options)=>{
|
|
1203
|
+
patterns = [].concat(patterns), list = [].concat(list);
|
|
1204
|
+
let omit = new Set(), keep = new Set(), items = new Set(), negatives = 0, onResult = (state)=>{
|
|
1205
|
+
items.add(state.output), options && options.onResult && options.onResult(state);
|
|
1206
|
+
};
|
|
1207
|
+
for(let i = 0; i < patterns.length; i++){
|
|
1208
|
+
let isMatch = picomatch(String(patterns[i]), {
|
|
1209
|
+
...options,
|
|
1210
|
+
onResult
|
|
1211
|
+
}, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
1212
|
+
for (let item of (negated && negatives++, list)){
|
|
1213
|
+
let matched = isMatch(item, !0);
|
|
1214
|
+
(negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
let matches = (negatives === patterns.length ? [
|
|
1218
|
+
...items
|
|
1219
|
+
] : [
|
|
1220
|
+
...keep
|
|
1221
|
+
]).filter((item)=>!omit.has(item));
|
|
1222
|
+
if (options && 0 === matches.length) {
|
|
1223
|
+
if (!0 === options.failglob) throw Error(`No matches found for "${patterns.join(', ')}"`);
|
|
1224
|
+
if (!0 === options.nonull || !0 === options.nullglob) return options.unescape ? patterns.map((p)=>p.replace(/\\/g, '')) : patterns;
|
|
1225
|
+
}
|
|
1226
|
+
return matches;
|
|
1227
|
+
};
|
|
1228
|
+
micromatch.match = micromatch, micromatch.matcher = (pattern, options)=>picomatch(pattern, options), micromatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str), micromatch.any = micromatch.isMatch, micromatch.not = (list, patterns, options = {})=>{
|
|
1229
|
+
patterns = [].concat(patterns).map(String);
|
|
1230
|
+
let result = new Set(), items = [], matches = new Set(micromatch(list, patterns, {
|
|
1231
|
+
...options,
|
|
1232
|
+
onResult: (state)=>{
|
|
1233
|
+
options.onResult && options.onResult(state), items.push(state.output);
|
|
1234
|
+
}
|
|
1235
|
+
}));
|
|
1236
|
+
for (let item of items)matches.has(item) || result.add(item);
|
|
1237
|
+
return [
|
|
1238
|
+
...result
|
|
1239
|
+
];
|
|
1240
|
+
}, micromatch.contains = (str, pattern, options)=>{
|
|
1241
|
+
if ('string' != typeof str) throw TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
1242
|
+
if (Array.isArray(pattern)) return pattern.some((p)=>micromatch.contains(str, p, options));
|
|
1243
|
+
if ('string' == typeof pattern) {
|
|
1244
|
+
if (isEmptyString(str) || isEmptyString(pattern)) return !1;
|
|
1245
|
+
if (str.includes(pattern) || str.startsWith('./') && str.slice(2).includes(pattern)) return !0;
|
|
1246
|
+
}
|
|
1247
|
+
return micromatch.isMatch(str, pattern, {
|
|
1248
|
+
...options,
|
|
1249
|
+
contains: !0
|
|
1250
|
+
});
|
|
1251
|
+
}, micromatch.matchKeys = (obj, patterns, options)=>{
|
|
1252
|
+
if (!utils.isObject(obj)) throw TypeError('Expected the first argument to be an object');
|
|
1253
|
+
let keys = micromatch(Object.keys(obj), patterns, options), res = {};
|
|
1254
|
+
for (let key of keys)res[key] = obj[key];
|
|
1255
|
+
return res;
|
|
1256
|
+
}, micromatch.some = (list, patterns, options)=>{
|
|
1257
|
+
let items = [].concat(list);
|
|
1258
|
+
for (let pattern of [].concat(patterns)){
|
|
1259
|
+
let isMatch = picomatch(String(pattern), options);
|
|
1260
|
+
if (items.some((item)=>isMatch(item))) return !0;
|
|
1261
|
+
}
|
|
1262
|
+
return !1;
|
|
1263
|
+
}, micromatch.every = (list, patterns, options)=>{
|
|
1264
|
+
let items = [].concat(list);
|
|
1265
|
+
for (let pattern of [].concat(patterns)){
|
|
1266
|
+
let isMatch = picomatch(String(pattern), options);
|
|
1267
|
+
if (!items.every((item)=>isMatch(item))) return !1;
|
|
1268
|
+
}
|
|
1269
|
+
return !0;
|
|
1270
|
+
}, micromatch.all = (str, patterns, options)=>{
|
|
1271
|
+
if ('string' != typeof str) throw TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
1272
|
+
return [].concat(patterns).every((p)=>picomatch(p, options)(str));
|
|
1273
|
+
}, micromatch.capture = (glob, input, options)=>{
|
|
1274
|
+
let posix = utils.isWindows(options), match = picomatch.makeRe(String(glob), {
|
|
1275
|
+
...options,
|
|
1276
|
+
capture: !0
|
|
1277
|
+
}).exec(posix ? utils.toPosixSlashes(input) : input);
|
|
1278
|
+
if (match) return match.slice(1).map((v)=>void 0 === v ? '' : v);
|
|
1279
|
+
}, micromatch.makeRe = (...args)=>picomatch.makeRe(...args), micromatch.scan = (...args)=>picomatch.scan(...args), micromatch.parse = (patterns, options)=>{
|
|
1280
|
+
let res = [];
|
|
1281
|
+
for (let pattern of [].concat(patterns || []))for (let str of braces(String(pattern), options))res.push(picomatch.parse(str, options));
|
|
1282
|
+
return res;
|
|
1283
|
+
}, micromatch.braces = (pattern, options)=>{
|
|
1284
|
+
if ('string' != typeof pattern) throw TypeError('Expected a string');
|
|
1285
|
+
return options && !0 === options.nobrace || !hasBraces(pattern) ? [
|
|
1286
|
+
pattern
|
|
1287
|
+
] : braces(pattern, options);
|
|
1288
|
+
}, micromatch.braceExpand = (pattern, options)=>{
|
|
1289
|
+
if ('string' != typeof pattern) throw TypeError('Expected a string');
|
|
1290
|
+
return micromatch.braces(pattern, {
|
|
1291
|
+
...options,
|
|
1292
|
+
expand: !0
|
|
1293
|
+
});
|
|
1294
|
+
}, micromatch.hasBraces = hasBraces, module.exports = micromatch;
|
|
1295
|
+
},
|
|
1296
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1297
|
+
module.exports = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js");
|
|
1298
|
+
},
|
|
1299
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1300
|
+
let path = __webpack_require__("path?e3a4"), WIN_NO_SLASH = "[^\\\\/]", QMARK = '[^/]', END_ANCHOR = "(?:\\/|$)", START_ANCHOR = "(?:^|\\/)", DOTS_SLASH = `\\.{1,2}${END_ANCHOR}`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!\\.{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
|
1301
|
+
DOT_LITERAL: '\\.',
|
|
1302
|
+
PLUS_LITERAL: '\\+',
|
|
1303
|
+
QMARK_LITERAL: '\\?',
|
|
1304
|
+
SLASH_LITERAL: '\\/',
|
|
1305
|
+
ONE_CHAR: '(?=.)',
|
|
1306
|
+
QMARK,
|
|
1307
|
+
END_ANCHOR,
|
|
1308
|
+
DOTS_SLASH,
|
|
1309
|
+
NO_DOT: "(?!\\.)",
|
|
1310
|
+
NO_DOTS,
|
|
1311
|
+
NO_DOT_SLASH,
|
|
1312
|
+
NO_DOTS_SLASH,
|
|
1313
|
+
QMARK_NO_DOT: "[^.\\/]",
|
|
1314
|
+
STAR,
|
|
1315
|
+
START_ANCHOR
|
|
1316
|
+
}, WINDOWS_CHARS = {
|
|
1317
|
+
...POSIX_CHARS,
|
|
1318
|
+
SLASH_LITERAL: "[\\\\/]",
|
|
1319
|
+
QMARK: WIN_NO_SLASH,
|
|
1320
|
+
STAR: `${WIN_NO_SLASH}*?`,
|
|
1321
|
+
DOTS_SLASH: "\\.{1,2}(?:[\\\\/]|$)",
|
|
1322
|
+
NO_DOT: "(?!\\.)",
|
|
1323
|
+
NO_DOTS: "(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",
|
|
1324
|
+
NO_DOT_SLASH: "(?!\\.{0,1}(?:[\\\\/]|$))",
|
|
1325
|
+
NO_DOTS_SLASH: "(?!\\.{1,2}(?:[\\\\/]|$))",
|
|
1326
|
+
QMARK_NO_DOT: "[^.\\\\/]",
|
|
1327
|
+
START_ANCHOR: "(?:^|[\\\\/])",
|
|
1328
|
+
END_ANCHOR: "(?:[\\\\/]|$)"
|
|
1329
|
+
};
|
|
1330
|
+
module.exports = {
|
|
1331
|
+
MAX_LENGTH: 65536,
|
|
1332
|
+
POSIX_REGEX_SOURCE: {
|
|
1333
|
+
alnum: 'a-zA-Z0-9',
|
|
1334
|
+
alpha: 'a-zA-Z',
|
|
1335
|
+
ascii: '\\x00-\\x7F',
|
|
1336
|
+
blank: ' \\t',
|
|
1337
|
+
cntrl: '\\x00-\\x1F\\x7F',
|
|
1338
|
+
digit: '0-9',
|
|
1339
|
+
graph: '\\x21-\\x7E',
|
|
1340
|
+
lower: 'a-z',
|
|
1341
|
+
print: '\\x20-\\x7E ',
|
|
1342
|
+
punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
|
|
1343
|
+
space: ' \\t\\r\\n\\v\\f',
|
|
1344
|
+
upper: 'A-Z',
|
|
1345
|
+
word: 'A-Za-z0-9_',
|
|
1346
|
+
xdigit: 'A-Fa-f0-9'
|
|
1347
|
+
},
|
|
1348
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
1349
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
1350
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
1351
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
1352
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
1353
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
1354
|
+
REPLACEMENTS: {
|
|
1355
|
+
'***': '*',
|
|
1356
|
+
'**/**': '**',
|
|
1357
|
+
'**/**/**': '**'
|
|
1358
|
+
},
|
|
1359
|
+
CHAR_0: 48,
|
|
1360
|
+
CHAR_9: 57,
|
|
1361
|
+
CHAR_UPPERCASE_A: 65,
|
|
1362
|
+
CHAR_LOWERCASE_A: 97,
|
|
1363
|
+
CHAR_UPPERCASE_Z: 90,
|
|
1364
|
+
CHAR_LOWERCASE_Z: 122,
|
|
1365
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
1366
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
1367
|
+
CHAR_ASTERISK: 42,
|
|
1368
|
+
CHAR_AMPERSAND: 38,
|
|
1369
|
+
CHAR_AT: 64,
|
|
1370
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
1371
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
1372
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
1373
|
+
CHAR_COLON: 58,
|
|
1374
|
+
CHAR_COMMA: 44,
|
|
1375
|
+
CHAR_DOT: 46,
|
|
1376
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
1377
|
+
CHAR_EQUAL: 61,
|
|
1378
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
1379
|
+
CHAR_FORM_FEED: 12,
|
|
1380
|
+
CHAR_FORWARD_SLASH: 47,
|
|
1381
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
1382
|
+
CHAR_HASH: 35,
|
|
1383
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
1384
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
1385
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
1386
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
1387
|
+
CHAR_LINE_FEED: 10,
|
|
1388
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
1389
|
+
CHAR_PERCENT: 37,
|
|
1390
|
+
CHAR_PLUS: 43,
|
|
1391
|
+
CHAR_QUESTION_MARK: 63,
|
|
1392
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
1393
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
1394
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
1395
|
+
CHAR_SEMICOLON: 59,
|
|
1396
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
1397
|
+
CHAR_SPACE: 32,
|
|
1398
|
+
CHAR_TAB: 9,
|
|
1399
|
+
CHAR_UNDERSCORE: 95,
|
|
1400
|
+
CHAR_VERTICAL_LINE: 124,
|
|
1401
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
1402
|
+
SEP: path.sep,
|
|
1403
|
+
extglobChars: (chars)=>({
|
|
1404
|
+
'!': {
|
|
1405
|
+
type: 'negate',
|
|
1406
|
+
open: '(?:(?!(?:',
|
|
1407
|
+
close: `))${chars.STAR})`
|
|
1408
|
+
},
|
|
1409
|
+
'?': {
|
|
1410
|
+
type: 'qmark',
|
|
1411
|
+
open: '(?:',
|
|
1412
|
+
close: ')?'
|
|
1413
|
+
},
|
|
1414
|
+
'+': {
|
|
1415
|
+
type: 'plus',
|
|
1416
|
+
open: '(?:',
|
|
1417
|
+
close: ')+'
|
|
1418
|
+
},
|
|
1419
|
+
'*': {
|
|
1420
|
+
type: 'star',
|
|
1421
|
+
open: '(?:',
|
|
1422
|
+
close: ')*'
|
|
1423
|
+
},
|
|
1424
|
+
'@': {
|
|
1425
|
+
type: 'at',
|
|
1426
|
+
open: '(?:',
|
|
1427
|
+
close: ')'
|
|
1428
|
+
}
|
|
1429
|
+
}),
|
|
1430
|
+
globChars: (win32)=>!0 === win32 ? WINDOWS_CHARS : POSIX_CHARS
|
|
1431
|
+
};
|
|
1432
|
+
},
|
|
1433
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1434
|
+
let constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants, expandRange = (args, options)=>{
|
|
1435
|
+
if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
|
|
1436
|
+
args.sort();
|
|
1437
|
+
let value = `[${args.join('-')}]`;
|
|
1438
|
+
try {
|
|
1439
|
+
new RegExp(value);
|
|
1440
|
+
} catch (ex) {
|
|
1441
|
+
return args.map((v)=>utils.escapeRegex(v)).join('..');
|
|
1442
|
+
}
|
|
1443
|
+
return value;
|
|
1444
|
+
}, syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options)=>{
|
|
1445
|
+
let value;
|
|
1446
|
+
if ('string' != typeof input) throw TypeError('Expected a string');
|
|
1447
|
+
input = REPLACEMENTS[input] || input;
|
|
1448
|
+
let opts = {
|
|
1449
|
+
...options
|
|
1450
|
+
}, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
1451
|
+
if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
1452
|
+
let bos = {
|
|
1453
|
+
type: 'bos',
|
|
1454
|
+
value: '',
|
|
1455
|
+
output: opts.prepend || ''
|
|
1456
|
+
}, tokens = [
|
|
1457
|
+
bos
|
|
1458
|
+
], capture = opts.capture ? '' : '?:', win32 = utils.isWindows(options), PLATFORM_CHARS = constants.globChars(win32), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS, globstar = (opts)=>`(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? '' : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = !0 === opts.bash ? globstar(opts) : STAR;
|
|
1459
|
+
opts.capture && (star = `(${star})`), 'boolean' == typeof opts.noext && (opts.noextglob = opts.noext);
|
|
1460
|
+
let state = {
|
|
1461
|
+
input,
|
|
1462
|
+
index: -1,
|
|
1463
|
+
start: 0,
|
|
1464
|
+
dot: !0 === opts.dot,
|
|
1465
|
+
consumed: '',
|
|
1466
|
+
output: '',
|
|
1467
|
+
prefix: '',
|
|
1468
|
+
backtrack: !1,
|
|
1469
|
+
negated: !1,
|
|
1470
|
+
brackets: 0,
|
|
1471
|
+
braces: 0,
|
|
1472
|
+
parens: 0,
|
|
1473
|
+
quotes: 0,
|
|
1474
|
+
globstar: !1,
|
|
1475
|
+
tokens
|
|
1476
|
+
};
|
|
1477
|
+
len = (input = utils.removePrefix(input, state)).length;
|
|
1478
|
+
let extglobs = [], braces = [], stack = [], prev = bos, eos = ()=>state.index === len - 1, peek = state.peek = (n = 1)=>input[state.index + n], advance = state.advance = ()=>input[++state.index] || '', remaining = ()=>input.slice(state.index + 1), consume = (value = '', num = 0)=>{
|
|
1479
|
+
state.consumed += value, state.index += num;
|
|
1480
|
+
}, append = (token)=>{
|
|
1481
|
+
state.output += null != token.output ? token.output : token.value, consume(token.value);
|
|
1482
|
+
}, negate = ()=>{
|
|
1483
|
+
let count = 1;
|
|
1484
|
+
for(; '!' === peek() && ('(' !== peek(2) || '?' === peek(3));)advance(), state.start++, count++;
|
|
1485
|
+
return count % 2 != 0 && (state.negated = !0, state.start++, !0);
|
|
1486
|
+
}, increment = (type)=>{
|
|
1487
|
+
state[type]++, stack.push(type);
|
|
1488
|
+
}, decrement = (type)=>{
|
|
1489
|
+
state[type]--, stack.pop();
|
|
1490
|
+
}, push = (tok)=>{
|
|
1491
|
+
if ('globstar' === prev.type) {
|
|
1492
|
+
let isBrace = state.braces > 0 && ('comma' === tok.type || 'brace' === tok.type), isExtglob = !0 === tok.extglob || extglobs.length && ('pipe' === tok.type || 'paren' === tok.type);
|
|
1493
|
+
'slash' === tok.type || 'paren' === tok.type || isBrace || isExtglob || (state.output = state.output.slice(0, -prev.output.length), prev.type = 'star', prev.value = '*', prev.output = star, state.output += prev.output);
|
|
1494
|
+
}
|
|
1495
|
+
if (extglobs.length && 'paren' !== tok.type && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && 'text' === prev.type && 'text' === tok.type) {
|
|
1496
|
+
prev.value += tok.value, prev.output = (prev.output || '') + tok.value;
|
|
1497
|
+
return;
|
|
1498
|
+
}
|
|
1499
|
+
tok.prev = prev, tokens.push(tok), prev = tok;
|
|
1500
|
+
}, extglobOpen = (type, value)=>{
|
|
1501
|
+
let token = {
|
|
1502
|
+
...EXTGLOB_CHARS[value],
|
|
1503
|
+
conditions: 1,
|
|
1504
|
+
inner: ''
|
|
1505
|
+
};
|
|
1506
|
+
token.prev = prev, token.parens = state.parens, token.output = state.output;
|
|
1507
|
+
let output = (opts.capture ? '(' : '') + token.open;
|
|
1508
|
+
increment('parens'), push({
|
|
1509
|
+
type,
|
|
1510
|
+
value,
|
|
1511
|
+
output: state.output ? '' : ONE_CHAR
|
|
1512
|
+
}), push({
|
|
1513
|
+
type: 'paren',
|
|
1514
|
+
extglob: !0,
|
|
1515
|
+
value: advance(),
|
|
1516
|
+
output
|
|
1517
|
+
}), extglobs.push(token);
|
|
1518
|
+
}, extglobClose = (token)=>{
|
|
1519
|
+
let rest, output = token.close + (opts.capture ? ')' : '');
|
|
1520
|
+
if ('negate' === token.type) {
|
|
1521
|
+
let extglobStar = star;
|
|
1522
|
+
if (token.inner && token.inner.length > 1 && token.inner.includes('/') && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
1523
|
+
let expression = parse(rest, {
|
|
1524
|
+
...options,
|
|
1525
|
+
fastpaths: !1
|
|
1526
|
+
}).output;
|
|
1527
|
+
output = token.close = `)${expression})${extglobStar})`;
|
|
1528
|
+
}
|
|
1529
|
+
'bos' === token.prev.type && (state.negatedExtglob = !0);
|
|
1530
|
+
}
|
|
1531
|
+
push({
|
|
1532
|
+
type: 'paren',
|
|
1533
|
+
extglob: !0,
|
|
1534
|
+
value,
|
|
1535
|
+
output
|
|
1536
|
+
}), decrement('parens');
|
|
1537
|
+
};
|
|
1538
|
+
if (!1 !== opts.fastpaths && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
1539
|
+
let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index)=>'\\' === first ? (backslashes = !0, m) : '?' === first ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : '') : 0 === index ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '') : QMARK.repeat(chars.length) : '.' === first ? DOT_LITERAL.repeat(chars.length) : '*' === first ? esc ? esc + first + (rest ? star : '') : star : esc ? m : `\\${m}`);
|
|
1540
|
+
return (!0 === backslashes && (output = !0 === opts.unescape ? output.replace(/\\/g, '') : output.replace(/\\+/g, (m)=>m.length % 2 == 0 ? '\\\\' : m ? '\\' : '')), output === input && !0 === opts.contains) ? state.output = input : state.output = utils.wrapOutput(output, state, options), state;
|
|
1541
|
+
}
|
|
1542
|
+
for(; !eos();){
|
|
1543
|
+
if ('\u0000' === (value = advance())) continue;
|
|
1544
|
+
if ('\\' === value) {
|
|
1545
|
+
let next = peek();
|
|
1546
|
+
if ('/' === next && !0 !== opts.bash || '.' === next || ';' === next) continue;
|
|
1547
|
+
if (!next) {
|
|
1548
|
+
push({
|
|
1549
|
+
type: 'text',
|
|
1550
|
+
value: value += '\\'
|
|
1551
|
+
});
|
|
1552
|
+
continue;
|
|
1553
|
+
}
|
|
1554
|
+
let match = /^\\+/.exec(remaining()), slashes = 0;
|
|
1555
|
+
if (match && match[0].length > 2 && (slashes = match[0].length, state.index += slashes, slashes % 2 != 0 && (value += '\\')), !0 === opts.unescape ? value = advance() : value += advance(), 0 === state.brackets) {
|
|
1556
|
+
push({
|
|
1557
|
+
type: 'text',
|
|
1558
|
+
value
|
|
1559
|
+
});
|
|
1560
|
+
continue;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
if (state.brackets > 0 && (']' !== value || '[' === prev.value || '[^' === prev.value)) {
|
|
1564
|
+
if (!1 !== opts.posix && ':' === value) {
|
|
1565
|
+
let inner = prev.value.slice(1);
|
|
1566
|
+
if (inner.includes('[') && (prev.posix = !0, inner.includes(':'))) {
|
|
1567
|
+
let idx = prev.value.lastIndexOf('['), pre = prev.value.slice(0, idx), posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
|
|
1568
|
+
if (posix) {
|
|
1569
|
+
prev.value = pre + posix, state.backtrack = !0, advance(), bos.output || 1 !== tokens.indexOf(prev) || (bos.output = ONE_CHAR);
|
|
1570
|
+
continue;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
('[' === value && ':' !== peek() || '-' === value && ']' === peek()) && (value = `\\${value}`), ']' === value && ('[' === prev.value || '[^' === prev.value) && (value = `\\${value}`), !0 === opts.posix && '!' === value && '[' === prev.value && (value = '^'), prev.value += value, append({
|
|
1575
|
+
value
|
|
1576
|
+
});
|
|
1577
|
+
continue;
|
|
1578
|
+
}
|
|
1579
|
+
if (1 === state.quotes && '"' !== value) {
|
|
1580
|
+
value = utils.escapeRegex(value), prev.value += value, append({
|
|
1581
|
+
value
|
|
1582
|
+
});
|
|
1583
|
+
continue;
|
|
1584
|
+
}
|
|
1585
|
+
if ('"' === value) {
|
|
1586
|
+
state.quotes = +(1 !== state.quotes), !0 === opts.keepQuotes && push({
|
|
1587
|
+
type: 'text',
|
|
1588
|
+
value
|
|
1589
|
+
});
|
|
1590
|
+
continue;
|
|
1591
|
+
}
|
|
1592
|
+
if ('(' === value) {
|
|
1593
|
+
increment('parens'), push({
|
|
1594
|
+
type: 'paren',
|
|
1595
|
+
value
|
|
1596
|
+
});
|
|
1597
|
+
continue;
|
|
1598
|
+
}
|
|
1599
|
+
if (')' === value) {
|
|
1600
|
+
if (0 === state.parens && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '('));
|
|
1601
|
+
let extglob = extglobs[extglobs.length - 1];
|
|
1602
|
+
if (extglob && state.parens === extglob.parens + 1) {
|
|
1603
|
+
extglobClose(extglobs.pop());
|
|
1604
|
+
continue;
|
|
1605
|
+
}
|
|
1606
|
+
push({
|
|
1607
|
+
type: 'paren',
|
|
1608
|
+
value,
|
|
1609
|
+
output: state.parens ? ')' : '\\)'
|
|
1610
|
+
}), decrement('parens');
|
|
1611
|
+
continue;
|
|
1612
|
+
}
|
|
1613
|
+
if ('[' === value) {
|
|
1614
|
+
if (!0 !== opts.nobracket && remaining().includes(']')) increment('brackets');
|
|
1615
|
+
else {
|
|
1616
|
+
if (!0 !== opts.nobracket && !0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
|
|
1617
|
+
value = `\\${value}`;
|
|
1618
|
+
}
|
|
1619
|
+
push({
|
|
1620
|
+
type: 'bracket',
|
|
1621
|
+
value
|
|
1622
|
+
});
|
|
1623
|
+
continue;
|
|
1624
|
+
}
|
|
1625
|
+
if (']' === value) {
|
|
1626
|
+
if (!0 === opts.nobracket || prev && 'bracket' === prev.type && 1 === prev.value.length) {
|
|
1627
|
+
push({
|
|
1628
|
+
type: 'text',
|
|
1629
|
+
value,
|
|
1630
|
+
output: `\\${value}`
|
|
1631
|
+
});
|
|
1632
|
+
continue;
|
|
1633
|
+
}
|
|
1634
|
+
if (0 === state.brackets) {
|
|
1635
|
+
if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('opening', '['));
|
|
1636
|
+
push({
|
|
1637
|
+
type: 'text',
|
|
1638
|
+
value,
|
|
1639
|
+
output: `\\${value}`
|
|
1640
|
+
});
|
|
1641
|
+
continue;
|
|
1642
|
+
}
|
|
1643
|
+
decrement('brackets');
|
|
1644
|
+
let prevValue = prev.value.slice(1);
|
|
1645
|
+
if (!0 === prev.posix || '^' !== prevValue[0] || prevValue.includes('/') || (value = `/${value}`), prev.value += value, append({
|
|
1646
|
+
value
|
|
1647
|
+
}), !1 === opts.literalBrackets || utils.hasRegexChars(prevValue)) continue;
|
|
1648
|
+
let escaped = utils.escapeRegex(prev.value);
|
|
1649
|
+
if (state.output = state.output.slice(0, -prev.value.length), !0 === opts.literalBrackets) {
|
|
1650
|
+
state.output += escaped, prev.value = escaped;
|
|
1651
|
+
continue;
|
|
1652
|
+
}
|
|
1653
|
+
prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
|
|
1654
|
+
continue;
|
|
1655
|
+
}
|
|
1656
|
+
if ('{' === value && !0 !== opts.nobrace) {
|
|
1657
|
+
increment('braces');
|
|
1658
|
+
let open = {
|
|
1659
|
+
type: 'brace',
|
|
1660
|
+
value,
|
|
1661
|
+
output: '(',
|
|
1662
|
+
outputIndex: state.output.length,
|
|
1663
|
+
tokensIndex: state.tokens.length
|
|
1664
|
+
};
|
|
1665
|
+
braces.push(open), push(open);
|
|
1666
|
+
continue;
|
|
1667
|
+
}
|
|
1668
|
+
if ('}' === value) {
|
|
1669
|
+
let brace = braces[braces.length - 1];
|
|
1670
|
+
if (!0 === opts.nobrace || !brace) {
|
|
1671
|
+
push({
|
|
1672
|
+
type: 'text',
|
|
1673
|
+
value,
|
|
1674
|
+
output: value
|
|
1675
|
+
});
|
|
1676
|
+
continue;
|
|
1677
|
+
}
|
|
1678
|
+
let output = ')';
|
|
1679
|
+
if (!0 === brace.dots) {
|
|
1680
|
+
let arr = tokens.slice(), range = [];
|
|
1681
|
+
for(let i = arr.length - 1; i >= 0 && (tokens.pop(), 'brace' !== arr[i].type); i--)'dots' !== arr[i].type && range.unshift(arr[i].value);
|
|
1682
|
+
output = expandRange(range, opts), state.backtrack = !0;
|
|
1683
|
+
}
|
|
1684
|
+
if (!0 !== brace.comma && !0 !== brace.dots) {
|
|
1685
|
+
let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
|
|
1686
|
+
for (let t of (brace.value = brace.output = '\\{', value = output = '\\}', state.output = out, toks))state.output += t.output || t.value;
|
|
1687
|
+
}
|
|
1688
|
+
push({
|
|
1689
|
+
type: 'brace',
|
|
1690
|
+
value,
|
|
1691
|
+
output
|
|
1692
|
+
}), decrement('braces'), braces.pop();
|
|
1693
|
+
continue;
|
|
1694
|
+
}
|
|
1695
|
+
if ('|' === value) {
|
|
1696
|
+
extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({
|
|
1697
|
+
type: 'text',
|
|
1698
|
+
value
|
|
1699
|
+
});
|
|
1700
|
+
continue;
|
|
1701
|
+
}
|
|
1702
|
+
if (',' === value) {
|
|
1703
|
+
let output = value, brace = braces[braces.length - 1];
|
|
1704
|
+
brace && 'braces' === stack[stack.length - 1] && (brace.comma = !0, output = '|'), push({
|
|
1705
|
+
type: 'comma',
|
|
1706
|
+
value,
|
|
1707
|
+
output
|
|
1708
|
+
});
|
|
1709
|
+
continue;
|
|
1710
|
+
}
|
|
1711
|
+
if ('/' === value) {
|
|
1712
|
+
if ('dot' === prev.type && state.index === state.start + 1) {
|
|
1713
|
+
state.start = state.index + 1, state.consumed = '', state.output = '', tokens.pop(), prev = bos;
|
|
1714
|
+
continue;
|
|
1715
|
+
}
|
|
1716
|
+
push({
|
|
1717
|
+
type: 'slash',
|
|
1718
|
+
value,
|
|
1719
|
+
output: SLASH_LITERAL
|
|
1720
|
+
});
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
if ('.' === value) {
|
|
1724
|
+
if (state.braces > 0 && 'dot' === prev.type) {
|
|
1725
|
+
'.' === prev.value && (prev.output = DOT_LITERAL);
|
|
1726
|
+
let brace = braces[braces.length - 1];
|
|
1727
|
+
prev.type = 'dots', prev.output += value, prev.value += value, brace.dots = !0;
|
|
1728
|
+
continue;
|
|
1729
|
+
}
|
|
1730
|
+
if (state.braces + state.parens === 0 && 'bos' !== prev.type && 'slash' !== prev.type) {
|
|
1731
|
+
push({
|
|
1732
|
+
type: 'text',
|
|
1733
|
+
value,
|
|
1734
|
+
output: DOT_LITERAL
|
|
1735
|
+
});
|
|
1736
|
+
continue;
|
|
1737
|
+
}
|
|
1738
|
+
push({
|
|
1739
|
+
type: 'dot',
|
|
1740
|
+
value,
|
|
1741
|
+
output: DOT_LITERAL
|
|
1742
|
+
});
|
|
1743
|
+
continue;
|
|
1744
|
+
}
|
|
1745
|
+
if ('?' === value) {
|
|
1746
|
+
if (!(prev && '(' === prev.value) && !0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
|
|
1747
|
+
extglobOpen('qmark', value);
|
|
1748
|
+
continue;
|
|
1749
|
+
}
|
|
1750
|
+
if (prev && 'paren' === prev.type) {
|
|
1751
|
+
let next = peek(), output = value;
|
|
1752
|
+
if ('<' === next && !utils.supportsLookbehinds()) throw Error('Node.js v10 or higher is required for regex lookbehinds');
|
|
1753
|
+
('(' !== prev.value || /[!=<:]/.test(next)) && ('<' !== next || /<([!=]|\w+>)/.test(remaining())) || (output = `\\${value}`), push({
|
|
1754
|
+
type: 'text',
|
|
1755
|
+
value,
|
|
1756
|
+
output
|
|
1757
|
+
});
|
|
1758
|
+
continue;
|
|
1759
|
+
}
|
|
1760
|
+
if (!0 !== opts.dot && ('slash' === prev.type || 'bos' === prev.type)) {
|
|
1761
|
+
push({
|
|
1762
|
+
type: 'qmark',
|
|
1763
|
+
value,
|
|
1764
|
+
output: QMARK_NO_DOT
|
|
1765
|
+
});
|
|
1766
|
+
continue;
|
|
1767
|
+
}
|
|
1768
|
+
push({
|
|
1769
|
+
type: 'qmark',
|
|
1770
|
+
value,
|
|
1771
|
+
output: QMARK
|
|
1772
|
+
});
|
|
1773
|
+
continue;
|
|
1774
|
+
}
|
|
1775
|
+
if ('!' === value) {
|
|
1776
|
+
if (!0 !== opts.noextglob && '(' === peek() && ('?' !== peek(2) || !/[!=<:]/.test(peek(3)))) {
|
|
1777
|
+
extglobOpen('negate', value);
|
|
1778
|
+
continue;
|
|
1779
|
+
}
|
|
1780
|
+
if (!0 !== opts.nonegate && 0 === state.index) {
|
|
1781
|
+
negate();
|
|
1782
|
+
continue;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
if ('+' === value) {
|
|
1786
|
+
if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
|
|
1787
|
+
extglobOpen('plus', value);
|
|
1788
|
+
continue;
|
|
1789
|
+
}
|
|
1790
|
+
if (prev && '(' === prev.value || !1 === opts.regex) {
|
|
1791
|
+
push({
|
|
1792
|
+
type: 'plus',
|
|
1793
|
+
value,
|
|
1794
|
+
output: PLUS_LITERAL
|
|
1795
|
+
});
|
|
1796
|
+
continue;
|
|
1797
|
+
}
|
|
1798
|
+
if (prev && ('bracket' === prev.type || 'paren' === prev.type || 'brace' === prev.type) || state.parens > 0) {
|
|
1799
|
+
push({
|
|
1800
|
+
type: 'plus',
|
|
1801
|
+
value
|
|
1802
|
+
});
|
|
1803
|
+
continue;
|
|
1804
|
+
}
|
|
1805
|
+
push({
|
|
1806
|
+
type: 'plus',
|
|
1807
|
+
value: PLUS_LITERAL
|
|
1808
|
+
});
|
|
1809
|
+
continue;
|
|
1810
|
+
}
|
|
1811
|
+
if ('@' === value) {
|
|
1812
|
+
if (!0 !== opts.noextglob && '(' === peek() && '?' !== peek(2)) {
|
|
1813
|
+
push({
|
|
1814
|
+
type: 'at',
|
|
1815
|
+
extglob: !0,
|
|
1816
|
+
value,
|
|
1817
|
+
output: ''
|
|
1818
|
+
});
|
|
1819
|
+
continue;
|
|
1820
|
+
}
|
|
1821
|
+
push({
|
|
1822
|
+
type: 'text',
|
|
1823
|
+
value
|
|
1824
|
+
});
|
|
1825
|
+
continue;
|
|
1826
|
+
}
|
|
1827
|
+
if ('*' !== value) {
|
|
1828
|
+
('$' === value || '^' === value) && (value = `\\${value}`);
|
|
1829
|
+
let match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
1830
|
+
match && (value += match[0], state.index += match[0].length), push({
|
|
1831
|
+
type: 'text',
|
|
1832
|
+
value
|
|
1833
|
+
});
|
|
1834
|
+
continue;
|
|
1835
|
+
}
|
|
1836
|
+
if (prev && ('globstar' === prev.type || !0 === prev.star)) {
|
|
1837
|
+
prev.type = 'star', prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1840
|
+
let rest = remaining();
|
|
1841
|
+
if (!0 !== opts.noextglob && /^\([^?]/.test(rest)) {
|
|
1842
|
+
extglobOpen('star', value);
|
|
1843
|
+
continue;
|
|
1844
|
+
}
|
|
1845
|
+
if ('star' === prev.type) {
|
|
1846
|
+
if (!0 === opts.noglobstar) {
|
|
1847
|
+
consume(value);
|
|
1848
|
+
continue;
|
|
1849
|
+
}
|
|
1850
|
+
let prior = prev.prev, before = prior.prev, isStart = 'slash' === prior.type || 'bos' === prior.type, afterStar = before && ('star' === before.type || 'globstar' === before.type);
|
|
1851
|
+
if (!0 === opts.bash && (!isStart || rest[0] && '/' !== rest[0])) {
|
|
1852
|
+
push({
|
|
1853
|
+
type: 'star',
|
|
1854
|
+
value,
|
|
1855
|
+
output: ''
|
|
1856
|
+
});
|
|
1857
|
+
continue;
|
|
1858
|
+
}
|
|
1859
|
+
let isBrace = state.braces > 0 && ('comma' === prior.type || 'brace' === prior.type), isExtglob = extglobs.length && ('pipe' === prior.type || 'paren' === prior.type);
|
|
1860
|
+
if (!isStart && 'paren' !== prior.type && !isBrace && !isExtglob) {
|
|
1861
|
+
push({
|
|
1862
|
+
type: 'star',
|
|
1863
|
+
value,
|
|
1864
|
+
output: ''
|
|
1865
|
+
});
|
|
1866
|
+
continue;
|
|
1867
|
+
}
|
|
1868
|
+
for(; '/**' === rest.slice(0, 3);){
|
|
1869
|
+
let after = input[state.index + 4];
|
|
1870
|
+
if (after && '/' !== after) break;
|
|
1871
|
+
rest = rest.slice(3), consume('/**', 3);
|
|
1872
|
+
}
|
|
1873
|
+
if ('bos' === prior.type && eos()) {
|
|
1874
|
+
prev.type = 'globstar', prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
|
|
1875
|
+
continue;
|
|
1876
|
+
}
|
|
1877
|
+
if ('slash' === prior.type && 'bos' !== prior.prev.type && !afterStar && eos()) {
|
|
1878
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
|
|
1879
|
+
continue;
|
|
1880
|
+
}
|
|
1881
|
+
if ('slash' === prior.type && 'bos' !== prior.prev.type && '/' === rest[0]) {
|
|
1882
|
+
let end = void 0 !== rest[1] ? '|$' : '';
|
|
1883
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = 'globstar', prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({
|
|
1884
|
+
type: 'slash',
|
|
1885
|
+
value: '/',
|
|
1886
|
+
output: ''
|
|
1887
|
+
});
|
|
1888
|
+
continue;
|
|
1889
|
+
}
|
|
1890
|
+
if ('bos' === prior.type && '/' === rest[0]) {
|
|
1891
|
+
prev.type = 'globstar', prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({
|
|
1892
|
+
type: 'slash',
|
|
1893
|
+
value: '/',
|
|
1894
|
+
output: ''
|
|
1895
|
+
});
|
|
1896
|
+
continue;
|
|
1897
|
+
}
|
|
1898
|
+
state.output = state.output.slice(0, -prev.output.length), prev.type = 'globstar', prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
|
|
1899
|
+
continue;
|
|
1900
|
+
}
|
|
1901
|
+
let token = {
|
|
1902
|
+
type: 'star',
|
|
1903
|
+
value,
|
|
1904
|
+
output: star
|
|
1905
|
+
};
|
|
1906
|
+
if (!0 === opts.bash) {
|
|
1907
|
+
token.output = '.*?', ('bos' === prev.type || 'slash' === prev.type) && (token.output = nodot + token.output), push(token);
|
|
1908
|
+
continue;
|
|
1909
|
+
}
|
|
1910
|
+
if (prev && ('bracket' === prev.type || 'paren' === prev.type) && !0 === opts.regex) {
|
|
1911
|
+
token.output = value, push(token);
|
|
1912
|
+
continue;
|
|
1913
|
+
}
|
|
1914
|
+
(state.index === state.start || 'slash' === prev.type || 'dot' === prev.type) && ('dot' === prev.type ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : !0 === opts.dot ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), '*' !== peek() && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
|
|
1915
|
+
}
|
|
1916
|
+
for(; state.brackets > 0;){
|
|
1917
|
+
if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ']'));
|
|
1918
|
+
state.output = utils.escapeLast(state.output, '['), decrement('brackets');
|
|
1919
|
+
}
|
|
1920
|
+
for(; state.parens > 0;){
|
|
1921
|
+
if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', ')'));
|
|
1922
|
+
state.output = utils.escapeLast(state.output, '('), decrement('parens');
|
|
1923
|
+
}
|
|
1924
|
+
for(; state.braces > 0;){
|
|
1925
|
+
if (!0 === opts.strictBrackets) throw SyntaxError(syntaxError('closing', '}'));
|
|
1926
|
+
state.output = utils.escapeLast(state.output, '{'), decrement('braces');
|
|
1927
|
+
}
|
|
1928
|
+
if (!0 !== opts.strictSlashes && ('star' === prev.type || 'bracket' === prev.type) && push({
|
|
1929
|
+
type: 'maybe_slash',
|
|
1930
|
+
value: '',
|
|
1931
|
+
output: `${SLASH_LITERAL}?`
|
|
1932
|
+
}), !0 === state.backtrack) for (let token of (state.output = '', state.tokens))state.output += null != token.output ? token.output : token.value, token.suffix && (state.output += token.suffix);
|
|
1933
|
+
return state;
|
|
1934
|
+
};
|
|
1935
|
+
parse.fastpaths = (input, options)=>{
|
|
1936
|
+
let opts = {
|
|
1937
|
+
...options
|
|
1938
|
+
}, max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
1939
|
+
if (len > max) throw SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
1940
|
+
input = REPLACEMENTS[input] || input;
|
|
1941
|
+
let win32 = utils.isWindows(options), { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? '' : '?:', star = !0 === opts.bash ? '.*?' : STAR;
|
|
1942
|
+
opts.capture && (star = `(${star})`);
|
|
1943
|
+
let globstar = (opts)=>!0 === opts.noglobstar ? star : `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str)=>{
|
|
1944
|
+
switch(str){
|
|
1945
|
+
case '*':
|
|
1946
|
+
return `${nodot}${ONE_CHAR}${star}`;
|
|
1947
|
+
case '.*':
|
|
1948
|
+
return `${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1949
|
+
case '*.*':
|
|
1950
|
+
return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1951
|
+
case '*/*':
|
|
1952
|
+
return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
|
|
1953
|
+
case '**':
|
|
1954
|
+
return nodot + globstar(opts);
|
|
1955
|
+
case '**/*':
|
|
1956
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
|
|
1957
|
+
case '**/*.*':
|
|
1958
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1959
|
+
case '**/.*':
|
|
1960
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
1961
|
+
default:
|
|
1962
|
+
{
|
|
1963
|
+
let match = /^(.*?)\.(\w+)$/.exec(str);
|
|
1964
|
+
if (!match) return;
|
|
1965
|
+
let source = create(match[1]);
|
|
1966
|
+
if (!source) return;
|
|
1967
|
+
return source + DOT_LITERAL + match[2];
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
}, source = create(utils.removePrefix(input, {
|
|
1971
|
+
negated: !1,
|
|
1972
|
+
prefix: ''
|
|
1973
|
+
}));
|
|
1974
|
+
return source && !0 !== opts.strictSlashes && (source += `${SLASH_LITERAL}?`), source;
|
|
1975
|
+
}, module.exports = parse;
|
|
1976
|
+
},
|
|
1977
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1978
|
+
let path = __webpack_require__("path?e3a4"), scan = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js"), parse = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), picomatch = (glob, options, returnState = !1)=>{
|
|
1979
|
+
if (Array.isArray(glob)) {
|
|
1980
|
+
let fns = glob.map((input)=>picomatch(input, options, returnState));
|
|
1981
|
+
return (str)=>{
|
|
1982
|
+
for (let isMatch of fns){
|
|
1983
|
+
let state = isMatch(str);
|
|
1984
|
+
if (state) return state;
|
|
1985
|
+
}
|
|
1986
|
+
return !1;
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
let isState = glob && 'object' == typeof glob && !Array.isArray(glob) && glob.tokens && glob.input;
|
|
1990
|
+
if ('' === glob || 'string' != typeof glob && !isState) throw TypeError('Expected pattern to be a non-empty string');
|
|
1991
|
+
let opts = options || {}, posix = utils.isWindows(options), regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
|
|
1992
|
+
delete regex.state;
|
|
1993
|
+
let isIgnored = ()=>!1;
|
|
1994
|
+
if (opts.ignore) {
|
|
1995
|
+
let ignoreOpts = {
|
|
1996
|
+
...options,
|
|
1997
|
+
ignore: null,
|
|
1998
|
+
onMatch: null,
|
|
1999
|
+
onResult: null
|
|
2000
|
+
};
|
|
2001
|
+
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
2002
|
+
}
|
|
2003
|
+
let matcher = (input, returnObject = !1)=>{
|
|
2004
|
+
let { isMatch, match, output } = picomatch.test(input, regex, options, {
|
|
2005
|
+
glob,
|
|
2006
|
+
posix
|
|
2007
|
+
}), result = {
|
|
2008
|
+
glob,
|
|
2009
|
+
state,
|
|
2010
|
+
regex,
|
|
2011
|
+
posix,
|
|
2012
|
+
input,
|
|
2013
|
+
output,
|
|
2014
|
+
match,
|
|
2015
|
+
isMatch
|
|
2016
|
+
};
|
|
2017
|
+
return ('function' == typeof opts.onResult && opts.onResult(result), !1 === isMatch) ? (result.isMatch = !1, !!returnObject && result) : isIgnored(input) ? ('function' == typeof opts.onIgnore && opts.onIgnore(result), result.isMatch = !1, !!returnObject && result) : ('function' == typeof opts.onMatch && opts.onMatch(result), !returnObject || result);
|
|
2018
|
+
};
|
|
2019
|
+
return returnState && (matcher.state = state), matcher;
|
|
2020
|
+
};
|
|
2021
|
+
picomatch.test = (input, regex, options, { glob, posix } = {})=>{
|
|
2022
|
+
if ('string' != typeof input) throw TypeError('Expected input to be a string');
|
|
2023
|
+
if ('' === input) return {
|
|
2024
|
+
isMatch: !1,
|
|
2025
|
+
output: ''
|
|
2026
|
+
};
|
|
2027
|
+
let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match = input === glob, output = match && format ? format(input) : input;
|
|
2028
|
+
return !1 === match && (match = (output = format ? format(input) : input) === glob), (!1 === match || !0 === opts.capture) && (match = !0 === opts.matchBase || !0 === opts.basename ? picomatch.matchBase(input, regex, options, posix) : regex.exec(output)), {
|
|
2029
|
+
isMatch: !!match,
|
|
2030
|
+
match,
|
|
2031
|
+
output
|
|
2032
|
+
};
|
|
2033
|
+
}, picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options))=>(glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path.basename(input)), picomatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str), picomatch.parse = (pattern, options)=>Array.isArray(pattern) ? pattern.map((p)=>picomatch.parse(p, options)) : parse(pattern, {
|
|
2034
|
+
...options,
|
|
2035
|
+
fastpaths: !1
|
|
2036
|
+
}), picomatch.scan = (input, options)=>scan(input, options), picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1)=>{
|
|
2037
|
+
if (!0 === returnOutput) return state.output;
|
|
2038
|
+
let opts = options || {}, prepend = opts.contains ? '' : '^', append = opts.contains ? '' : '$', source = `${prepend}(?:${state.output})${append}`;
|
|
2039
|
+
state && !0 === state.negated && (source = `^(?!${source}).*$`);
|
|
2040
|
+
let regex = picomatch.toRegex(source, options);
|
|
2041
|
+
return !0 === returnState && (regex.state = state), regex;
|
|
2042
|
+
}, picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1)=>{
|
|
2043
|
+
if (!input || 'string' != typeof input) throw TypeError('Expected a non-empty string');
|
|
2044
|
+
let parsed = {
|
|
2045
|
+
negated: !1,
|
|
2046
|
+
fastpaths: !0
|
|
2047
|
+
};
|
|
2048
|
+
return !1 !== options.fastpaths && ('.' === input[0] || '*' === input[0]) && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
2049
|
+
}, picomatch.toRegex = (source, options)=>{
|
|
2050
|
+
try {
|
|
2051
|
+
let opts = options || {};
|
|
2052
|
+
return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
|
|
2053
|
+
} catch (err) {
|
|
2054
|
+
if (options && !0 === options.debug) throw err;
|
|
2055
|
+
return /$^/;
|
|
2056
|
+
}
|
|
2057
|
+
}, picomatch.constants = constants, module.exports = picomatch;
|
|
2058
|
+
},
|
|
2059
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2060
|
+
let utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"), { 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 } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"), isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token)=>{
|
|
2061
|
+
!0 !== token.isPrefix && (token.depth = token.isGlobstar ? 1 / 0 : 1);
|
|
2062
|
+
};
|
|
2063
|
+
module.exports = (input, options)=>{
|
|
2064
|
+
let prev, code, opts = options || {}, length = input.length - 1, scanToEnd = !0 === opts.parts || !0 === opts.scanToEnd, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, token = {
|
|
2065
|
+
value: '',
|
|
2066
|
+
depth: 0,
|
|
2067
|
+
isGlob: !1
|
|
2068
|
+
}, eos = ()=>index >= length, peek = ()=>str.charCodeAt(index + 1), advance = ()=>(prev = code, str.charCodeAt(++index));
|
|
2069
|
+
for(; index < length;){
|
|
2070
|
+
let next;
|
|
2071
|
+
if ((code = advance()) === CHAR_BACKWARD_SLASH) {
|
|
2072
|
+
backslashes = token.backslashes = !0, (code = advance()) === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
|
|
2073
|
+
continue;
|
|
2074
|
+
}
|
|
2075
|
+
if (!0 === braceEscaped || code === CHAR_LEFT_CURLY_BRACE) {
|
|
2076
|
+
for(braces++; !0 !== eos() && (code = advance());){
|
|
2077
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
2078
|
+
backslashes = token.backslashes = !0, advance();
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
2082
|
+
braces++;
|
|
2083
|
+
continue;
|
|
2084
|
+
}
|
|
2085
|
+
if (!0 !== braceEscaped && code === CHAR_DOT && (code = advance()) === CHAR_DOT || !0 !== braceEscaped && code === CHAR_COMMA) {
|
|
2086
|
+
if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
|
|
2087
|
+
break;
|
|
2088
|
+
}
|
|
2089
|
+
if (code === CHAR_RIGHT_CURLY_BRACE && 0 == --braces) {
|
|
2090
|
+
braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
|
|
2091
|
+
break;
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
if (!0 === scanToEnd) continue;
|
|
2095
|
+
break;
|
|
2096
|
+
}
|
|
2097
|
+
if (code === CHAR_FORWARD_SLASH) {
|
|
2098
|
+
if (slashes.push(index), tokens.push(token), token = {
|
|
2099
|
+
value: '',
|
|
2100
|
+
depth: 0,
|
|
2101
|
+
isGlob: !1
|
|
2102
|
+
}, !0 === finished) continue;
|
|
2103
|
+
if (prev === CHAR_DOT && index === start + 1) {
|
|
2104
|
+
start += 2;
|
|
2105
|
+
continue;
|
|
2106
|
+
}
|
|
2107
|
+
lastIndex = index + 1;
|
|
2108
|
+
continue;
|
|
2109
|
+
}
|
|
2110
|
+
if (!0 !== opts.noext && !0 == (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) && peek() === CHAR_LEFT_PARENTHESES) {
|
|
2111
|
+
if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), !0 === scanToEnd) {
|
|
2112
|
+
for(; !0 !== eos() && (code = advance());){
|
|
2113
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
2114
|
+
backslashes = token.backslashes = !0, code = advance();
|
|
2115
|
+
continue;
|
|
2116
|
+
}
|
|
2117
|
+
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
2118
|
+
isGlob = token.isGlob = !0, finished = !0;
|
|
2119
|
+
break;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
continue;
|
|
2123
|
+
}
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
if (code === CHAR_ASTERISK) {
|
|
2127
|
+
if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
|
|
2128
|
+
break;
|
|
2129
|
+
}
|
|
2130
|
+
if (code === CHAR_QUESTION_MARK) {
|
|
2131
|
+
if (isGlob = token.isGlob = !0, finished = !0, !0 === scanToEnd) continue;
|
|
2132
|
+
break;
|
|
2133
|
+
}
|
|
2134
|
+
if (code === CHAR_LEFT_SQUARE_BRACKET) {
|
|
2135
|
+
for(; !0 !== eos() && (next = advance());){
|
|
2136
|
+
if (next === CHAR_BACKWARD_SLASH) {
|
|
2137
|
+
backslashes = token.backslashes = !0, advance();
|
|
2138
|
+
continue;
|
|
2139
|
+
}
|
|
2140
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
2141
|
+
isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
|
|
2142
|
+
break;
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
if (!0 === scanToEnd) continue;
|
|
2146
|
+
break;
|
|
2147
|
+
}
|
|
2148
|
+
if (!0 !== opts.nonegate && code === CHAR_EXCLAMATION_MARK && index === start) {
|
|
2149
|
+
negated = token.negated = !0, start++;
|
|
2150
|
+
continue;
|
|
2151
|
+
}
|
|
2152
|
+
if (!0 !== opts.noparen && code === CHAR_LEFT_PARENTHESES) {
|
|
2153
|
+
if (isGlob = token.isGlob = !0, !0 === scanToEnd) {
|
|
2154
|
+
for(; !0 !== eos() && (code = advance());){
|
|
2155
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
2156
|
+
backslashes = token.backslashes = !0, code = advance();
|
|
2157
|
+
continue;
|
|
2158
|
+
}
|
|
2159
|
+
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
2160
|
+
finished = !0;
|
|
2161
|
+
break;
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
continue;
|
|
2165
|
+
}
|
|
2166
|
+
break;
|
|
2167
|
+
}
|
|
2168
|
+
if (!0 === isGlob) {
|
|
2169
|
+
if (finished = !0, !0 === scanToEnd) continue;
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
!0 === opts.noext && (isExtglob = !1, isGlob = !1);
|
|
2174
|
+
let base = str, prefix = '', glob = '';
|
|
2175
|
+
start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && !0 === isGlob && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : !0 === isGlob ? (base = '', glob = str) : base = str, base && '' !== base && '/' !== base && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), !0 === opts.unescape && (glob && (glob = utils.removeBackslashes(glob)), base && !0 === backslashes && (base = utils.removeBackslashes(base)));
|
|
2176
|
+
let state = {
|
|
2177
|
+
prefix,
|
|
2178
|
+
input,
|
|
2179
|
+
start,
|
|
2180
|
+
base,
|
|
2181
|
+
glob,
|
|
2182
|
+
isBrace,
|
|
2183
|
+
isBracket,
|
|
2184
|
+
isGlob,
|
|
2185
|
+
isExtglob,
|
|
2186
|
+
isGlobstar,
|
|
2187
|
+
negated,
|
|
2188
|
+
negatedExtglob
|
|
2189
|
+
};
|
|
2190
|
+
if (!0 === opts.tokens && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), !0 === opts.parts || !0 === opts.tokens) {
|
|
2191
|
+
let prevIndex;
|
|
2192
|
+
for(let idx = 0; idx < slashes.length; idx++){
|
|
2193
|
+
let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
|
|
2194
|
+
opts.tokens && (0 === idx && 0 !== start ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (0 !== idx || '' !== value) && parts.push(value), prevIndex = i;
|
|
2195
|
+
}
|
|
2196
|
+
if (prevIndex && prevIndex + 1 < input.length) {
|
|
2197
|
+
let value = input.slice(prevIndex + 1);
|
|
2198
|
+
parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
|
|
2199
|
+
}
|
|
2200
|
+
state.slashes = slashes, state.parts = parts;
|
|
2201
|
+
}
|
|
2202
|
+
return state;
|
|
2203
|
+
};
|
|
2204
|
+
},
|
|
2205
|
+
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2206
|
+
let path = __webpack_require__("path?e3a4"), win32 = 'win32' === process.platform, { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js");
|
|
2207
|
+
exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str), exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str), exports.escapeRegex = (str)=>str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'), exports.toPosixSlashes = (str)=>str.replace(REGEX_BACKSLASH, '/'), exports.removeBackslashes = (str)=>str.replace(REGEX_REMOVE_BACKSLASH, (match)=>'\\' === match ? '' : match), exports.supportsLookbehinds = ()=>{
|
|
2208
|
+
let segs = process.version.slice(1).split('.').map(Number);
|
|
2209
|
+
return 3 === segs.length && !!(segs[0] >= 9) || 8 === segs[0] && !!(segs[1] >= 10);
|
|
2210
|
+
}, exports.isWindows = (options)=>options && 'boolean' == typeof options.windows ? options.windows : !0 === win32 || '\\' === path.sep, exports.escapeLast = (input, char, lastIdx)=>{
|
|
2211
|
+
let idx = input.lastIndexOf(char, lastIdx);
|
|
2212
|
+
return -1 === idx ? input : '\\' === input[idx - 1] ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
2213
|
+
}, exports.removePrefix = (input, state = {})=>{
|
|
2214
|
+
let output = input;
|
|
2215
|
+
return output.startsWith('./') && (output = output.slice(2), state.prefix = './'), output;
|
|
2216
|
+
}, exports.wrapOutput = (input, state = {}, options = {})=>{
|
|
2217
|
+
let prepend = options.contains ? '' : '^', append = options.contains ? '' : '$', output = `${prepend}(?:${input})${append}`;
|
|
2218
|
+
return !0 === state.negated && (output = `(?:^(?!${output}).*$)`), output;
|
|
2219
|
+
};
|
|
2220
|
+
},
|
|
2221
|
+
"../../node_modules/.pnpm/requires-port@1.0.0/node_modules/requires-port/index.js" (module) {
|
|
2222
|
+
module.exports = function required(port, protocol) {
|
|
2223
|
+
if (protocol = protocol.split(':')[0], !(port *= 1)) return !1;
|
|
2224
|
+
switch(protocol){
|
|
2225
|
+
case 'http':
|
|
2226
|
+
case 'ws':
|
|
2227
|
+
return 80 !== port;
|
|
2228
|
+
case 'https':
|
|
2229
|
+
case 'wss':
|
|
2230
|
+
return 443 !== port;
|
|
2231
|
+
case 'ftp':
|
|
2232
|
+
return 21 !== port;
|
|
2233
|
+
case 'gopher':
|
|
2234
|
+
return 70 !== port;
|
|
2235
|
+
case 'file':
|
|
2236
|
+
return !1;
|
|
2237
|
+
}
|
|
2238
|
+
return 0 !== port;
|
|
2239
|
+
};
|
|
2240
|
+
},
|
|
2241
|
+
"../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
2242
|
+
let isNumber = __webpack_require__("../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js"), toRegexRange = (min, max, options)=>{
|
|
2243
|
+
if (!1 === isNumber(min)) throw TypeError('toRegexRange: expected the first argument to be a number');
|
|
2244
|
+
if (void 0 === max || min === max) return String(min);
|
|
2245
|
+
if (!1 === isNumber(max)) throw TypeError('toRegexRange: expected the second argument to be a number.');
|
|
2246
|
+
let opts = {
|
|
2247
|
+
relaxZeros: !0,
|
|
2248
|
+
...options
|
|
2249
|
+
};
|
|
2250
|
+
'boolean' == typeof opts.strictZeros && (opts.relaxZeros = !1 === opts.strictZeros);
|
|
2251
|
+
let cacheKey = min + ':' + max + '=' + String(opts.relaxZeros) + String(opts.shorthand) + String(opts.capture) + String(opts.wrap);
|
|
2252
|
+
if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result;
|
|
2253
|
+
let a = Math.min(min, max), b = Math.max(min, max);
|
|
2254
|
+
if (1 === Math.abs(a - b)) {
|
|
2255
|
+
let result = min + '|' + max;
|
|
2256
|
+
return opts.capture ? `(${result})` : !1 === opts.wrap ? result : `(?:${result})`;
|
|
2257
|
+
}
|
|
2258
|
+
let isPadded = hasPadding(min) || hasPadding(max), state = {
|
|
2259
|
+
min,
|
|
2260
|
+
max,
|
|
2261
|
+
a,
|
|
2262
|
+
b
|
|
2263
|
+
}, positives = [], negatives = [];
|
|
2264
|
+
return isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0 && (negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts), a = state.a = 0), b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), !0 === opts.capture ? state.result = `(${state.result})` : !1 !== opts.wrap && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
|
|
2265
|
+
};
|
|
2266
|
+
function collatePatterns(neg, pos, options) {
|
|
2267
|
+
let onlyNegative = filterPatterns(neg, pos, '-', !1, options) || [], onlyPositive = filterPatterns(pos, neg, '', !1, options) || [], intersected = filterPatterns(neg, pos, '-?', !0, options) || [];
|
|
2268
|
+
return onlyNegative.concat(intersected).concat(onlyPositive).join('|');
|
|
2269
|
+
}
|
|
2270
|
+
function splitToRanges(min, max) {
|
|
2271
|
+
let nines = 1, zeros = 1, stop = countNines(min, 1), stops = new Set([
|
|
2272
|
+
max
|
|
2273
|
+
]);
|
|
2274
|
+
for(; min <= stop && stop <= max;)stops.add(stop), nines += 1, stop = countNines(min, nines);
|
|
2275
|
+
for(stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max;)stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
|
|
2276
|
+
return (stops = [
|
|
2277
|
+
...stops
|
|
2278
|
+
]).sort(compare), stops;
|
|
2279
|
+
}
|
|
2280
|
+
function rangeToPattern(start, stop, options) {
|
|
2281
|
+
if (start === stop) return {
|
|
2282
|
+
pattern: start,
|
|
2283
|
+
count: [],
|
|
2284
|
+
digits: 0
|
|
2285
|
+
};
|
|
2286
|
+
let zipped = zip(start, stop), digits = zipped.length, pattern = '', count = 0;
|
|
2287
|
+
for(let i = 0; i < digits; i++){
|
|
2288
|
+
let [startDigit, stopDigit] = zipped[i];
|
|
2289
|
+
startDigit === stopDigit ? pattern += startDigit : '0' !== startDigit || '9' !== stopDigit ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
|
|
2290
|
+
}
|
|
2291
|
+
return count && (pattern += !0 === options.shorthand ? '\\d' : '[0-9]'), {
|
|
2292
|
+
pattern,
|
|
2293
|
+
count: [
|
|
2294
|
+
count
|
|
2295
|
+
],
|
|
2296
|
+
digits
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2299
|
+
function splitToPatterns(min, max, tok, options) {
|
|
2300
|
+
let prev, ranges = splitToRanges(min, max), tokens = [], start = min;
|
|
2301
|
+
for(let i = 0; i < ranges.length; i++){
|
|
2302
|
+
let max = ranges[i], obj = rangeToPattern(String(start), String(max), options), zeros = '';
|
|
2303
|
+
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
2304
|
+
prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max + 1;
|
|
2305
|
+
continue;
|
|
2306
|
+
}
|
|
2307
|
+
tok.isPadded && (zeros = padZeros(max, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max + 1, prev = obj;
|
|
2308
|
+
}
|
|
2309
|
+
return tokens;
|
|
2310
|
+
}
|
|
2311
|
+
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
2312
|
+
let result = [];
|
|
2313
|
+
for (let ele of arr){
|
|
2314
|
+
let { string } = ele;
|
|
2315
|
+
intersection || contains(comparison, 'string', string) || result.push(prefix + string), intersection && contains(comparison, 'string', string) && result.push(prefix + string);
|
|
2316
|
+
}
|
|
2317
|
+
return result;
|
|
2318
|
+
}
|
|
2319
|
+
function zip(a, b) {
|
|
2320
|
+
let arr = [];
|
|
2321
|
+
for(let i = 0; i < a.length; i++)arr.push([
|
|
2322
|
+
a[i],
|
|
2323
|
+
b[i]
|
|
2324
|
+
]);
|
|
2325
|
+
return arr;
|
|
2326
|
+
}
|
|
2327
|
+
function compare(a, b) {
|
|
2328
|
+
return a > b ? 1 : b > a ? -1 : 0;
|
|
2329
|
+
}
|
|
2330
|
+
function contains(arr, key, val) {
|
|
2331
|
+
return arr.some((ele)=>ele[key] === val);
|
|
2332
|
+
}
|
|
2333
|
+
function countNines(min, len) {
|
|
2334
|
+
return Number(String(min).slice(0, -len) + '9'.repeat(len));
|
|
2335
|
+
}
|
|
2336
|
+
function countZeros(integer, zeros) {
|
|
2337
|
+
return integer - integer % Math.pow(10, zeros);
|
|
2338
|
+
}
|
|
2339
|
+
function toQuantifier(digits) {
|
|
2340
|
+
let [start = 0, stop = ''] = digits;
|
|
2341
|
+
return stop || start > 1 ? `{${start + (stop ? ',' + stop : '')}}` : '';
|
|
2342
|
+
}
|
|
2343
|
+
function toCharacterClass(a, b, options) {
|
|
2344
|
+
return `[${a}${b - a == 1 ? '' : '-'}${b}]`;
|
|
2345
|
+
}
|
|
2346
|
+
function hasPadding(str) {
|
|
2347
|
+
return /^-?(0+)\d/.test(str);
|
|
2348
|
+
}
|
|
2349
|
+
function padZeros(value, tok, options) {
|
|
2350
|
+
if (!tok.isPadded) return value;
|
|
2351
|
+
let diff = Math.abs(tok.maxLen - String(value).length), relax = !1 !== options.relaxZeros;
|
|
2352
|
+
switch(diff){
|
|
2353
|
+
case 0:
|
|
2354
|
+
return '';
|
|
2355
|
+
case 1:
|
|
2356
|
+
return relax ? '0?' : '0';
|
|
2357
|
+
case 2:
|
|
2358
|
+
return relax ? '0{0,2}' : '00';
|
|
2359
|
+
default:
|
|
2360
|
+
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
toRegexRange.cache = {}, toRegexRange.clearCache = ()=>toRegexRange.cache = {}, module.exports = toRegexRange;
|
|
2364
|
+
},
|
|
2365
|
+
assert (module) {
|
|
2366
|
+
module.exports = __rspack_external_assert;
|
|
2367
|
+
},
|
|
2368
|
+
"http?5e34" (module) {
|
|
2369
|
+
module.exports = __rspack_external_http;
|
|
2370
|
+
},
|
|
2371
|
+
"https?1ab9" (module) {
|
|
2372
|
+
module.exports = __rspack_external_https;
|
|
2373
|
+
},
|
|
2374
|
+
"path?e3a4" (module) {
|
|
2375
|
+
module.exports = __rspack_external_path;
|
|
2376
|
+
},
|
|
2377
|
+
querystring (module) {
|
|
2378
|
+
module.exports = __rspack_external_querystring;
|
|
2379
|
+
},
|
|
2380
|
+
"stream?4cc8" (module) {
|
|
2381
|
+
module.exports = __rspack_external_stream;
|
|
2382
|
+
},
|
|
2383
|
+
"url?13be" (module) {
|
|
2384
|
+
module.exports = __rspack_external_url;
|
|
2385
|
+
},
|
|
2386
|
+
"url?7328" (module) {
|
|
2387
|
+
module.exports = __rspack_external_url;
|
|
2388
|
+
},
|
|
2389
|
+
"util?e86d" (module) {
|
|
2390
|
+
module.exports = __rspack_external_util;
|
|
2391
|
+
},
|
|
2392
|
+
"zlib?58ec" (module) {
|
|
2393
|
+
module.exports = __rspack_external_zlib;
|
|
2394
|
+
},
|
|
2395
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/configuration.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2396
|
+
exports.verifyConfig = verifyConfig;
|
|
2397
|
+
let errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js");
|
|
2398
|
+
function verifyConfig(options) {
|
|
2399
|
+
if (!options.target && !options.router) throw Error(errors_1.ERRORS.ERR_CONFIG_FACTORY_TARGET_MISSING);
|
|
2400
|
+
}
|
|
2401
|
+
},
|
|
2402
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2403
|
+
exports.Debug = void 0, exports.Debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js")('http-proxy-middleware');
|
|
2404
|
+
},
|
|
2405
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js" (__unused_rspack_module, exports) {
|
|
2406
|
+
var ERRORS, ERRORS1;
|
|
2407
|
+
exports.ERRORS = void 0, (ERRORS1 = ERRORS || (exports.ERRORS = ERRORS = {})).ERR_CONFIG_FACTORY_TARGET_MISSING = "[HPM] Missing \"target\" option. Example: {target: \"http://www.example.org\"}", ERRORS1.ERR_CONTEXT_MATCHER_GENERIC = "[HPM] Invalid pathFilter. Expecting something like: \"/api\" or [\"/api\", \"/ajax\"]", ERRORS1.ERR_CONTEXT_MATCHER_INVALID_ARRAY = "[HPM] Invalid pathFilter. Plain paths (e.g. \"/api\") can not be mixed with globs (e.g. \"/api/**\"). Expecting something like: [\"/api\", \"/ajax\"] or [\"/api/**\", \"!**.html\"].", ERRORS1.ERR_PATH_REWRITER_CONFIG = "[HPM] Invalid pathRewrite config. Expecting object with pathRewrite config or a rewrite function";
|
|
2408
|
+
},
|
|
2409
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2410
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2411
|
+
value: !0
|
|
2412
|
+
}), exports.createProxyMiddleware = createProxyMiddleware;
|
|
2413
|
+
let http_proxy_middleware_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js");
|
|
2414
|
+
function createProxyMiddleware(options) {
|
|
2415
|
+
let { middleware } = new http_proxy_middleware_1.HttpProxyMiddleware(options);
|
|
2416
|
+
return middleware;
|
|
2417
|
+
}
|
|
2418
|
+
},
|
|
2419
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/get-plugins.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2420
|
+
exports.getPlugins = getPlugins;
|
|
2421
|
+
let default_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js");
|
|
2422
|
+
function getPlugins(options) {
|
|
2423
|
+
let maybeErrorResponsePlugin = options.on?.error ? [] : [
|
|
2424
|
+
default_1.errorResponsePlugin
|
|
2425
|
+
];
|
|
2426
|
+
return [
|
|
2427
|
+
...options.ejectPlugins ? [] : [
|
|
2428
|
+
default_1.debugProxyErrorsPlugin,
|
|
2429
|
+
default_1.proxyEventsPlugin,
|
|
2430
|
+
default_1.loggerPlugin,
|
|
2431
|
+
...maybeErrorResponsePlugin
|
|
2432
|
+
],
|
|
2433
|
+
...options.plugins ?? []
|
|
2434
|
+
];
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2438
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2439
|
+
value: !0
|
|
2440
|
+
}), exports.fixRequestBody = fixRequestBody;
|
|
2441
|
+
let querystring = __webpack_require__("querystring");
|
|
2442
|
+
function fixRequestBody(proxyReq, req) {
|
|
2443
|
+
if (0 !== req.readableLength) return;
|
|
2444
|
+
let requestBody = req.body;
|
|
2445
|
+
if (!requestBody) return;
|
|
2446
|
+
let contentType = proxyReq.getHeader('Content-Type');
|
|
2447
|
+
if (!contentType) return;
|
|
2448
|
+
let writeBody = (bodyData)=>{
|
|
2449
|
+
proxyReq.setHeader('Content-Length', Buffer.byteLength(bodyData)), proxyReq.write(bodyData);
|
|
2450
|
+
};
|
|
2451
|
+
contentType.includes('application/json') || contentType.includes('+json') ? writeBody(JSON.stringify(requestBody)) : contentType.includes('application/x-www-form-urlencoded') ? writeBody(querystring.stringify(requestBody)) : contentType.includes('multipart/form-data') && writeBody(handlerFormDataBodyData(contentType, requestBody));
|
|
2452
|
+
}
|
|
2453
|
+
function handlerFormDataBodyData(contentType, data) {
|
|
2454
|
+
let boundary = contentType.replace(/^.*boundary=(.*)$/, '$1'), str = '';
|
|
2455
|
+
for (let [key, value] of Object.entries(data))str += `--${boundary}\r\nContent-Disposition: form-data; name="${key}"\r\n\r\n${value}\r\n`;
|
|
2456
|
+
return str;
|
|
2457
|
+
}
|
|
2458
|
+
},
|
|
2459
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2460
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
2461
|
+
void 0 === k2 && (k2 = k);
|
|
2462
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2463
|
+
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
|
|
2464
|
+
enumerable: !0,
|
|
2465
|
+
get: function() {
|
|
2466
|
+
return m[k];
|
|
2467
|
+
}
|
|
2468
|
+
}), Object.defineProperty(o, k2, desc);
|
|
2469
|
+
} : function(o, m, k, k2) {
|
|
2470
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
2471
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
2472
|
+
for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
2473
|
+
};
|
|
2474
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2475
|
+
value: !0
|
|
2476
|
+
}), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/public.js"), exports);
|
|
2477
|
+
},
|
|
2478
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/public.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2479
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2480
|
+
value: !0
|
|
2481
|
+
}), exports.fixRequestBody = exports.responseInterceptor = void 0;
|
|
2482
|
+
var response_interceptor_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.js");
|
|
2483
|
+
Object.defineProperty(exports, "responseInterceptor", {
|
|
2484
|
+
enumerable: !0,
|
|
2485
|
+
get: function() {
|
|
2486
|
+
return response_interceptor_1.responseInterceptor;
|
|
2487
|
+
}
|
|
2488
|
+
});
|
|
2489
|
+
var fix_request_body_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.js");
|
|
2490
|
+
Object.defineProperty(exports, "fixRequestBody", {
|
|
2491
|
+
enumerable: !0,
|
|
2492
|
+
get: function() {
|
|
2493
|
+
return fix_request_body_1.fixRequestBody;
|
|
2494
|
+
}
|
|
2495
|
+
});
|
|
2496
|
+
},
|
|
2497
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2498
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2499
|
+
value: !0
|
|
2500
|
+
}), exports.responseInterceptor = responseInterceptor;
|
|
2501
|
+
let zlib = __webpack_require__("zlib?58ec"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), debug = debug_1.Debug.extend('response-interceptor');
|
|
2502
|
+
function responseInterceptor(interceptor) {
|
|
2503
|
+
return async function proxyResResponseInterceptor(proxyRes, req, res) {
|
|
2504
|
+
debug('intercept proxy response');
|
|
2505
|
+
let buffer = Buffer.from('', 'utf8'), _proxyRes = decompress(proxyRes, proxyRes.headers['content-encoding']);
|
|
2506
|
+
_proxyRes.on('data', (chunk)=>buffer = Buffer.concat([
|
|
2507
|
+
buffer,
|
|
2508
|
+
chunk
|
|
2509
|
+
])), _proxyRes.on('end', async ()=>{
|
|
2510
|
+
copyHeaders(proxyRes, res), debug('call interceptor function: %s', (0, function_1.getFunctionName)(interceptor));
|
|
2511
|
+
let interceptedBuffer = Buffer.from(await interceptor(buffer, proxyRes, req, res));
|
|
2512
|
+
debug('set content-length: %s', Buffer.byteLength(interceptedBuffer, 'utf8')), res.setHeader('content-length', Buffer.byteLength(interceptedBuffer, 'utf8')), debug('write intercepted response'), res.write(interceptedBuffer), res.end();
|
|
2513
|
+
}), _proxyRes.on('error', (error)=>{
|
|
2514
|
+
res.end(`Error fetching proxied request: ${error.message}`);
|
|
2515
|
+
});
|
|
2516
|
+
};
|
|
2517
|
+
}
|
|
2518
|
+
function decompress(proxyRes, contentEncoding) {
|
|
2519
|
+
let decompress, _proxyRes = proxyRes;
|
|
2520
|
+
switch(contentEncoding){
|
|
2521
|
+
case 'gzip':
|
|
2522
|
+
decompress = zlib.createGunzip();
|
|
2523
|
+
break;
|
|
2524
|
+
case 'br':
|
|
2525
|
+
decompress = zlib.createBrotliDecompress();
|
|
2526
|
+
break;
|
|
2527
|
+
case 'deflate':
|
|
2528
|
+
decompress = zlib.createInflate();
|
|
2529
|
+
}
|
|
2530
|
+
return decompress && (debug("decompress proxy response with 'content-encoding': %s", contentEncoding), _proxyRes.pipe(decompress), _proxyRes = decompress), _proxyRes;
|
|
2531
|
+
}
|
|
2532
|
+
function copyHeaders(originalResponse, response) {
|
|
2533
|
+
if (debug('copy original response headers'), response.statusCode = originalResponse.statusCode, response.statusMessage = originalResponse.statusMessage, response.setHeader) {
|
|
2534
|
+
let keys = Object.keys(originalResponse.headers);
|
|
2535
|
+
(keys = keys.filter((key)=>![
|
|
2536
|
+
'content-encoding',
|
|
2537
|
+
'transfer-encoding'
|
|
2538
|
+
].includes(key))).forEach((key)=>{
|
|
2539
|
+
let value = originalResponse.headers[key];
|
|
2540
|
+
'set-cookie' === key && (value = (value = Array.isArray(value) ? value : [
|
|
2541
|
+
value
|
|
2542
|
+
]).map((x)=>x.replace(/Domain=[^;]+?/i, ''))), response.setHeader(key, value);
|
|
2543
|
+
});
|
|
2544
|
+
} else response.headers = originalResponse.headers;
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2548
|
+
exports.HttpProxyMiddleware = void 0;
|
|
2549
|
+
let httpProxy = __webpack_require__("../../node_modules/.pnpm/http-proxy@1.18.1_patch_hash=424b689da454f1f336d635615733f30568882789c1173f861c30f95ba8_7c4b684cae90eb7d05b3dfae37f0ceb4/node_modules/http-proxy/index.js"), configuration_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/configuration.js"), get_plugins_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/get-plugins.js"), path_filter_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-filter.js"), PathRewriter = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-rewriter.js"), Router = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/router.js"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js");
|
|
2550
|
+
exports.HttpProxyMiddleware = class {
|
|
2551
|
+
constructor(options){
|
|
2552
|
+
this.wsInternalSubscribed = !1, this.serverOnCloseSubscribed = !1, this.middleware = async (req, res, next)=>{
|
|
2553
|
+
if (this.shouldProxy(this.proxyOptions.pathFilter, req)) try {
|
|
2554
|
+
let activeProxyOptions = await this.prepareProxyRequest(req);
|
|
2555
|
+
(0, debug_1.Debug)("proxy request to target: %O", activeProxyOptions.target), this.proxy.web(req, res, activeProxyOptions);
|
|
2556
|
+
} catch (err) {
|
|
2557
|
+
next?.(err);
|
|
2558
|
+
}
|
|
2559
|
+
else next?.();
|
|
2560
|
+
let server = (req.socket ?? req.connection)?.server;
|
|
2561
|
+
server && !this.serverOnCloseSubscribed && (server.on('close', ()=>{
|
|
2562
|
+
(0, debug_1.Debug)('server close signal received: closing proxy server'), this.proxy.close();
|
|
2563
|
+
}), this.serverOnCloseSubscribed = !0), !0 === this.proxyOptions.ws && this.catchUpgradeRequest(server);
|
|
2564
|
+
}, this.catchUpgradeRequest = (server)=>{
|
|
2565
|
+
this.wsInternalSubscribed || ((0, debug_1.Debug)('subscribing to server upgrade event'), server.on('upgrade', this.handleUpgrade), this.wsInternalSubscribed = !0);
|
|
2566
|
+
}, this.handleUpgrade = async (req, socket, head)=>{
|
|
2567
|
+
try {
|
|
2568
|
+
if (this.shouldProxy(this.proxyOptions.pathFilter, req)) {
|
|
2569
|
+
let activeProxyOptions = await this.prepareProxyRequest(req);
|
|
2570
|
+
this.proxy.ws(req, socket, head, activeProxyOptions), (0, debug_1.Debug)('server upgrade event received. Proxying WebSocket');
|
|
2571
|
+
}
|
|
2572
|
+
} catch (err) {
|
|
2573
|
+
this.proxy.emit('error', err, req, socket);
|
|
2574
|
+
}
|
|
2575
|
+
}, this.shouldProxy = (pathFilter, req)=>{
|
|
2576
|
+
try {
|
|
2577
|
+
return (0, path_filter_1.matchPathFilter)(pathFilter, req.url, req);
|
|
2578
|
+
} catch (err) {
|
|
2579
|
+
return (0, debug_1.Debug)('Error: matchPathFilter() called with request url: ', `"${req.url}"`), this.logger.error(err), !1;
|
|
2580
|
+
}
|
|
2581
|
+
}, this.prepareProxyRequest = async (req)=>{
|
|
2582
|
+
this.middleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__ && (req.url = req.originalUrl || req.url);
|
|
2583
|
+
let newProxyOptions = Object.assign({}, this.proxyOptions);
|
|
2584
|
+
return await this.applyRouter(req, newProxyOptions), await this.applyPathRewrite(req, this.pathRewriter), newProxyOptions;
|
|
2585
|
+
}, this.applyRouter = async (req, options)=>{
|
|
2586
|
+
let newTarget;
|
|
2587
|
+
options.router && (newTarget = await Router.getTarget(req, options)) && ((0, debug_1.Debug)('router new target: "%s"', newTarget), options.target = newTarget);
|
|
2588
|
+
}, this.applyPathRewrite = async (req, pathRewriter)=>{
|
|
2589
|
+
if (pathRewriter) {
|
|
2590
|
+
let path = await pathRewriter(req.url, req);
|
|
2591
|
+
'string' == typeof path ? ((0, debug_1.Debug)('pathRewrite new path: %s', req.url), req.url = path) : (0, debug_1.Debug)('pathRewrite: no rewritten path found: %s', req.url);
|
|
2592
|
+
}
|
|
2593
|
+
}, (0, configuration_1.verifyConfig)(options), this.proxyOptions = options, this.logger = (0, logger_1.getLogger)(options), (0, debug_1.Debug)("create proxy server"), this.proxy = httpProxy.createProxyServer({}), this.registerPlugins(this.proxy, this.proxyOptions), this.pathRewriter = PathRewriter.createPathRewriter(this.proxyOptions.pathRewrite), this.middleware.upgrade = (req, socket, head)=>{
|
|
2594
|
+
this.wsInternalSubscribed || this.handleUpgrade(req, socket, head);
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
registerPlugins(proxy, options) {
|
|
2598
|
+
(0, get_plugins_1.getPlugins)(options).forEach((plugin)=>{
|
|
2599
|
+
(0, debug_1.Debug)(`register plugin: "${(0, function_1.getFunctionName)(plugin)}"`), plugin(proxy, options);
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
},
|
|
2604
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2605
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
2606
|
+
void 0 === k2 && (k2 = k);
|
|
2607
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2608
|
+
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
|
|
2609
|
+
enumerable: !0,
|
|
2610
|
+
get: function() {
|
|
2611
|
+
return m[k];
|
|
2612
|
+
}
|
|
2613
|
+
}), Object.defineProperty(o, k2, desc);
|
|
2614
|
+
} : function(o, m, k, k2) {
|
|
2615
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
2616
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
2617
|
+
for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
2618
|
+
};
|
|
2619
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2620
|
+
value: !0
|
|
2621
|
+
}), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/handlers/index.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/index.js"), exports);
|
|
2622
|
+
},
|
|
2623
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2624
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2625
|
+
value: !0
|
|
2626
|
+
}), exports.legacyCreateProxyMiddleware = legacyCreateProxyMiddleware;
|
|
2627
|
+
let factory_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/factory.js"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), options_adapter_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/options-adapter.js"), debug = debug_1.Debug.extend('legacy-create-proxy-middleware');
|
|
2628
|
+
function legacyCreateProxyMiddleware(legacyContext, legacyOptions) {
|
|
2629
|
+
debug('init');
|
|
2630
|
+
let options = (0, options_adapter_1.legacyOptionsAdapter)(legacyContext, legacyOptions), proxyMiddleware = (0, factory_1.createProxyMiddleware)(options);
|
|
2631
|
+
return debug('add marker for patching req.url (old behavior)'), proxyMiddleware.__LEGACY_HTTP_PROXY_MIDDLEWARE__ = !0, proxyMiddleware;
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2635
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
2636
|
+
void 0 === k2 && (k2 = k);
|
|
2637
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2638
|
+
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
|
|
2639
|
+
enumerable: !0,
|
|
2640
|
+
get: function() {
|
|
2641
|
+
return m[k];
|
|
2642
|
+
}
|
|
2643
|
+
}), Object.defineProperty(o, k2, desc);
|
|
2644
|
+
} : function(o, m, k, k2) {
|
|
2645
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
2646
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
2647
|
+
for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
2648
|
+
};
|
|
2649
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2650
|
+
value: !0
|
|
2651
|
+
}), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/public.js"), exports);
|
|
2652
|
+
},
|
|
2653
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/options-adapter.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2654
|
+
exports.legacyOptionsAdapter = legacyOptionsAdapter;
|
|
2655
|
+
let url = __webpack_require__("url?7328"), debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js"), debug = debug_1.Debug.extend('legacy-options-adapter'), proxyEventMap = {
|
|
2656
|
+
onError: 'error',
|
|
2657
|
+
onProxyReq: 'proxyReq',
|
|
2658
|
+
onProxyRes: 'proxyRes',
|
|
2659
|
+
onProxyReqWs: 'proxyReqWs',
|
|
2660
|
+
onOpen: 'open',
|
|
2661
|
+
onClose: 'close'
|
|
2662
|
+
};
|
|
2663
|
+
function legacyOptionsAdapter(legacyContext, legacyOptions) {
|
|
2664
|
+
let logger, options = {};
|
|
2665
|
+
if ('string' == typeof legacyContext && url.parse(legacyContext).host) throw Error(`Shorthand syntax is removed from legacyCreateProxyMiddleware().
|
|
2666
|
+
Please use "legacyCreateProxyMiddleware({ target: 'http://www.example.org' })" instead.
|
|
2667
|
+
|
|
2668
|
+
More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-shorthand-usage
|
|
2669
|
+
`);
|
|
2670
|
+
legacyContext && legacyOptions ? (debug('map legacy context/filter to options.pathFilter'), (logger = getLegacyLogger(options = {
|
|
2671
|
+
...legacyOptions,
|
|
2672
|
+
pathFilter: legacyContext
|
|
2673
|
+
})).warn(`[http-proxy-middleware] Legacy "context" argument is deprecated. Migrate your "context" to "options.pathFilter":
|
|
2674
|
+
|
|
2675
|
+
const options = {
|
|
2676
|
+
pathFilter: '${legacyContext}',
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-context-argument
|
|
2680
|
+
`)) : logger = legacyContext && !legacyOptions ? getLegacyLogger(options = {
|
|
2681
|
+
...legacyContext
|
|
2682
|
+
}) : getLegacyLogger({}), Object.entries(proxyEventMap).forEach(([legacyEventName, proxyEventName])=>{
|
|
2683
|
+
options[legacyEventName] && (options.on = {
|
|
2684
|
+
...options.on
|
|
2685
|
+
}, options.on[proxyEventName] = options[legacyEventName], debug('map legacy event "%s" to "on.%s"', legacyEventName, proxyEventName), logger.warn(`[http-proxy-middleware] Legacy "${legacyEventName}" is deprecated. Migrate to "options.on.${proxyEventName}":
|
|
2686
|
+
|
|
2687
|
+
const options = {
|
|
2688
|
+
on: {
|
|
2689
|
+
${proxyEventName}: () => {},
|
|
2690
|
+
},
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#refactored-proxy-events
|
|
2694
|
+
`));
|
|
2695
|
+
});
|
|
2696
|
+
let logProvider = options.logProvider && options.logProvider(), logLevel = options.logLevel;
|
|
2697
|
+
return debug('legacy logLevel', logLevel), debug('legacy logProvider: %O', logProvider), 'string' == typeof logLevel && 'silent' !== logLevel && (debug('map "logProvider" to "logger"'), logger.warn(`[http-proxy-middleware] Legacy "logLevel" and "logProvider" are deprecated. Migrate to "options.logger":
|
|
2698
|
+
|
|
2699
|
+
const options = {
|
|
2700
|
+
logger: console,
|
|
2701
|
+
}
|
|
2702
|
+
|
|
2703
|
+
More details: https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md#removed-logprovider-and-loglevel-options
|
|
2704
|
+
`)), options;
|
|
2705
|
+
}
|
|
2706
|
+
function getLegacyLogger(options) {
|
|
2707
|
+
let legacyLogger = options.logProvider && options.logProvider();
|
|
2708
|
+
return legacyLogger && (options.logger = legacyLogger), (0, logger_1.getLogger)(options);
|
|
2709
|
+
}
|
|
2710
|
+
},
|
|
2711
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/public.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2712
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2713
|
+
value: !0
|
|
2714
|
+
}), exports.legacyCreateProxyMiddleware = void 0;
|
|
2715
|
+
var create_proxy_middleware_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.js");
|
|
2716
|
+
Object.defineProperty(exports, "legacyCreateProxyMiddleware", {
|
|
2717
|
+
enumerable: !0,
|
|
2718
|
+
get: function() {
|
|
2719
|
+
return create_proxy_middleware_1.legacyCreateProxyMiddleware;
|
|
2720
|
+
}
|
|
2721
|
+
});
|
|
2722
|
+
},
|
|
2723
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js" (__unused_rspack_module, exports) {
|
|
2724
|
+
exports.getLogger = getLogger;
|
|
2725
|
+
let noopLogger = {
|
|
2726
|
+
info: ()=>{},
|
|
2727
|
+
warn: ()=>{},
|
|
2728
|
+
error: ()=>{}
|
|
2729
|
+
};
|
|
2730
|
+
function getLogger(options) {
|
|
2731
|
+
return options.logger || noopLogger;
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-filter.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2735
|
+
exports.matchPathFilter = matchPathFilter;
|
|
2736
|
+
let isGlob = __webpack_require__("../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js"), micromatch = __webpack_require__("../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js"), url = __webpack_require__("url?7328"), errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js");
|
|
2737
|
+
function matchPathFilter(pathFilter = '/', uri, req) {
|
|
2738
|
+
if (isStringPath(pathFilter)) return matchSingleStringPath(pathFilter, uri);
|
|
2739
|
+
if (isGlobPath(pathFilter)) return matchSingleGlobPath(pathFilter, uri);
|
|
2740
|
+
if (Array.isArray(pathFilter)) {
|
|
2741
|
+
if (pathFilter.every(isStringPath)) return matchMultiPath(pathFilter, uri);
|
|
2742
|
+
if (pathFilter.every(isGlobPath)) return matchMultiGlobPath(pathFilter, uri);
|
|
2743
|
+
throw Error(errors_1.ERRORS.ERR_CONTEXT_MATCHER_INVALID_ARRAY);
|
|
2744
|
+
}
|
|
2745
|
+
if ('function' == typeof pathFilter) return pathFilter(getUrlPathName(uri), req);
|
|
2746
|
+
throw Error(errors_1.ERRORS.ERR_CONTEXT_MATCHER_GENERIC);
|
|
2747
|
+
}
|
|
2748
|
+
function matchSingleStringPath(pathFilter, uri) {
|
|
2749
|
+
let pathname = getUrlPathName(uri);
|
|
2750
|
+
return pathname?.indexOf(pathFilter) === 0;
|
|
2751
|
+
}
|
|
2752
|
+
function matchSingleGlobPath(pattern, uri) {
|
|
2753
|
+
let matches = micromatch([
|
|
2754
|
+
getUrlPathName(uri)
|
|
2755
|
+
], pattern);
|
|
2756
|
+
return matches && matches.length > 0;
|
|
2757
|
+
}
|
|
2758
|
+
function matchMultiGlobPath(patternList, uri) {
|
|
2759
|
+
return matchSingleGlobPath(patternList, uri);
|
|
2760
|
+
}
|
|
2761
|
+
function matchMultiPath(pathFilterList, uri) {
|
|
2762
|
+
let isMultiPath = !1;
|
|
2763
|
+
for (let context of pathFilterList)if (matchSingleStringPath(context, uri)) {
|
|
2764
|
+
isMultiPath = !0;
|
|
2765
|
+
break;
|
|
2766
|
+
}
|
|
2767
|
+
return isMultiPath;
|
|
2768
|
+
}
|
|
2769
|
+
function getUrlPathName(uri) {
|
|
2770
|
+
return uri && url.parse(uri).pathname;
|
|
2771
|
+
}
|
|
2772
|
+
function isStringPath(pathFilter) {
|
|
2773
|
+
return 'string' == typeof pathFilter && !isGlob(pathFilter);
|
|
2774
|
+
}
|
|
2775
|
+
function isGlobPath(pathFilter) {
|
|
2776
|
+
return isGlob(pathFilter);
|
|
2777
|
+
}
|
|
2778
|
+
},
|
|
2779
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/path-rewriter.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2780
|
+
exports.createPathRewriter = createPathRewriter;
|
|
2781
|
+
let is_plain_object_1 = __webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js"), errors_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/errors.js"), debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('path-rewriter');
|
|
2782
|
+
function createPathRewriter(rewriteConfig) {
|
|
2783
|
+
let rulesCache;
|
|
2784
|
+
if (isValidRewriteConfig(rewriteConfig)) if ('function' == typeof rewriteConfig) return rewriteConfig;
|
|
2785
|
+
else return rulesCache = parsePathRewriteRules(rewriteConfig), rewritePath;
|
|
2786
|
+
function rewritePath(path) {
|
|
2787
|
+
let result = path;
|
|
2788
|
+
for (let rule of rulesCache)if (rule.regex.test(path)) {
|
|
2789
|
+
debug('rewriting path from "%s" to "%s"', path, result = result.replace(rule.regex, rule.value));
|
|
2790
|
+
break;
|
|
2791
|
+
}
|
|
2792
|
+
return result;
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
function isValidRewriteConfig(rewriteConfig) {
|
|
2796
|
+
if ('function' == typeof rewriteConfig) return !0;
|
|
2797
|
+
if ((0, is_plain_object_1.isPlainObject)(rewriteConfig)) return 0 !== Object.keys(rewriteConfig).length;
|
|
2798
|
+
if (null == rewriteConfig) return !1;
|
|
2799
|
+
throw Error(errors_1.ERRORS.ERR_PATH_REWRITER_CONFIG);
|
|
2800
|
+
}
|
|
2801
|
+
function parsePathRewriteRules(rewriteConfig) {
|
|
2802
|
+
let rules = [];
|
|
2803
|
+
if ((0, is_plain_object_1.isPlainObject)(rewriteConfig)) for (let [key, value] of Object.entries(rewriteConfig))rules.push({
|
|
2804
|
+
regex: new RegExp(key),
|
|
2805
|
+
value: value
|
|
2806
|
+
}), debug('rewrite rule created: "%s" ~> "%s"', key, value);
|
|
2807
|
+
return rules;
|
|
2808
|
+
}
|
|
2809
|
+
},
|
|
2810
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2811
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2812
|
+
value: !0
|
|
2813
|
+
}), exports.debugProxyErrorsPlugin = void 0;
|
|
2814
|
+
let debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('debug-proxy-errors-plugin');
|
|
2815
|
+
exports.debugProxyErrorsPlugin = (proxyServer)=>{
|
|
2816
|
+
proxyServer.on('error', (error, req, res, target)=>{
|
|
2817
|
+
debug(`http-proxy error event: \n%O`, error);
|
|
2818
|
+
}), proxyServer.on('proxyReq', (proxyReq, req, socket)=>{
|
|
2819
|
+
socket.on('error', (error)=>{
|
|
2820
|
+
debug('Socket error in proxyReq event: \n%O', error);
|
|
2821
|
+
});
|
|
2822
|
+
}), proxyServer.on('proxyRes', (proxyRes, req, res)=>{
|
|
2823
|
+
res.on('close', ()=>{
|
|
2824
|
+
res.writableEnded || (debug('Destroying proxyRes in proxyRes close event'), proxyRes.destroy());
|
|
2825
|
+
});
|
|
2826
|
+
}), proxyServer.on('proxyReqWs', (proxyReq, req, socket)=>{
|
|
2827
|
+
socket.on('error', (error)=>{
|
|
2828
|
+
debug('Socket error in proxyReqWs event: \n%O', error);
|
|
2829
|
+
});
|
|
2830
|
+
}), proxyServer.on('open', (proxySocket)=>{
|
|
2831
|
+
proxySocket.on('error', (error)=>{
|
|
2832
|
+
debug('Socket error in open event: \n%O', error);
|
|
2833
|
+
});
|
|
2834
|
+
}), proxyServer.on('close', (req, socket, head)=>{
|
|
2835
|
+
socket.on('error', (error)=>{
|
|
2836
|
+
debug('Socket error in close event: \n%O', error);
|
|
2837
|
+
});
|
|
2838
|
+
}), proxyServer.on('econnreset', (error, req, res, target)=>{
|
|
2839
|
+
debug(`http-proxy econnreset event: \n%O`, error);
|
|
2840
|
+
});
|
|
2841
|
+
};
|
|
2842
|
+
},
|
|
2843
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/error-response-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2844
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2845
|
+
value: !0
|
|
2846
|
+
}), exports.errorResponsePlugin = void 0;
|
|
2847
|
+
let status_code_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/status-code.js");
|
|
2848
|
+
function isResponseLike(obj) {
|
|
2849
|
+
return obj && 'function' == typeof obj.writeHead;
|
|
2850
|
+
}
|
|
2851
|
+
function isSocketLike(obj) {
|
|
2852
|
+
return obj && 'function' == typeof obj.write && !('writeHead' in obj);
|
|
2853
|
+
}
|
|
2854
|
+
exports.errorResponsePlugin = (proxyServer, options)=>{
|
|
2855
|
+
proxyServer.on('error', (err, req, res, target)=>{
|
|
2856
|
+
if (!req && !res) throw err;
|
|
2857
|
+
if (isResponseLike(res)) {
|
|
2858
|
+
if (!res.headersSent) {
|
|
2859
|
+
let statusCode = (0, status_code_1.getStatusCode)(err.code);
|
|
2860
|
+
res.writeHead(statusCode);
|
|
2861
|
+
}
|
|
2862
|
+
let host = req.headers && req.headers.host;
|
|
2863
|
+
res.end(`Error occurred while trying to proxy: ${host}${req.url}`);
|
|
2864
|
+
} else isSocketLike(res) && res.destroy();
|
|
2865
|
+
});
|
|
2866
|
+
};
|
|
2867
|
+
},
|
|
2868
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2869
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
2870
|
+
void 0 === k2 && (k2 = k);
|
|
2871
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2872
|
+
(!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = {
|
|
2873
|
+
enumerable: !0,
|
|
2874
|
+
get: function() {
|
|
2875
|
+
return m[k];
|
|
2876
|
+
}
|
|
2877
|
+
}), Object.defineProperty(o, k2, desc);
|
|
2878
|
+
} : function(o, m, k, k2) {
|
|
2879
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
2880
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
2881
|
+
for(var p in m)"default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
2882
|
+
};
|
|
2883
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2884
|
+
value: !0
|
|
2885
|
+
}), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/error-response-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/logger-plugin.js"), exports), __exportStar(__webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/proxy-events.js"), exports);
|
|
2886
|
+
},
|
|
2887
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/logger-plugin.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2888
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2889
|
+
value: !0
|
|
2890
|
+
}), exports.loggerPlugin = void 0;
|
|
2891
|
+
let url_1 = __webpack_require__("url?7328"), logger_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/logger.js"), logger_plugin_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/logger-plugin.js");
|
|
2892
|
+
exports.loggerPlugin = (proxyServer, options)=>{
|
|
2893
|
+
let logger = (0, logger_1.getLogger)(options);
|
|
2894
|
+
proxyServer.on('error', (err, req, res, target)=>{
|
|
2895
|
+
let hostname = req?.headers?.host, requestHref = `${hostname}${req?.url}`, targetHref = `${target?.href}`;
|
|
2896
|
+
logger.error('[HPM] Error occurred while proxying request %s to %s [%s] (%s)', requestHref, targetHref, err.code || err, 'https://nodejs.org/api/errors.html#errors_common_system_errors');
|
|
2897
|
+
}), proxyServer.on('proxyRes', (proxyRes, req, res)=>{
|
|
2898
|
+
let target, originalUrl = req.originalUrl ?? `${req.baseUrl || ''}${req.url}`;
|
|
2899
|
+
try {
|
|
2900
|
+
let port = (0, logger_plugin_1.getPort)(proxyRes.req?.agent?.sockets), obj = {
|
|
2901
|
+
protocol: proxyRes.req.protocol,
|
|
2902
|
+
host: proxyRes.req.host,
|
|
2903
|
+
pathname: proxyRes.req.path
|
|
2904
|
+
};
|
|
2905
|
+
target = new url_1.URL(`${obj.protocol}//${obj.host}${obj.pathname}`), port && (target.port = port);
|
|
2906
|
+
} catch (err) {
|
|
2907
|
+
(target = new url_1.URL(options.target)).pathname = proxyRes.req.path;
|
|
2908
|
+
}
|
|
2909
|
+
let targetUrl = target.toString(), exchange = `[HPM] ${req.method} ${originalUrl} -> ${targetUrl} [${proxyRes.statusCode}]`;
|
|
2910
|
+
logger.info(exchange);
|
|
2911
|
+
}), proxyServer.on('open', (socket)=>{
|
|
2912
|
+
logger.info('[HPM] Client connected: %o', socket.address());
|
|
2913
|
+
}), proxyServer.on('close', (req, proxySocket, proxyHead)=>{
|
|
2914
|
+
logger.info('[HPM] Client disconnected: %o', proxySocket.address());
|
|
2915
|
+
});
|
|
2916
|
+
};
|
|
2917
|
+
},
|
|
2918
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/plugins/default/proxy-events.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2919
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2920
|
+
value: !0
|
|
2921
|
+
}), exports.proxyEventsPlugin = void 0;
|
|
2922
|
+
let debug_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js"), function_1 = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js"), debug = debug_1.Debug.extend('proxy-events-plugin');
|
|
2923
|
+
exports.proxyEventsPlugin = (proxyServer, options)=>{
|
|
2924
|
+
Object.entries(options.on || {}).forEach(([eventName, handler])=>{
|
|
2925
|
+
debug(`register event handler: "${eventName}" -> "${(0, function_1.getFunctionName)(handler)}"`), proxyServer.on(eventName, handler);
|
|
2926
|
+
});
|
|
2927
|
+
};
|
|
2928
|
+
},
|
|
2929
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/router.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2930
|
+
exports.getTarget = getTarget;
|
|
2931
|
+
let is_plain_object_1 = __webpack_require__("../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.js"), debug = __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/debug.js").Debug.extend('router');
|
|
2932
|
+
async function getTarget(req, config) {
|
|
2933
|
+
let newTarget, router = config.router;
|
|
2934
|
+
return (0, is_plain_object_1.isPlainObject)(router) ? newTarget = getTargetFromProxyTable(req, router) : 'function' == typeof router && (newTarget = await router(req)), newTarget;
|
|
2935
|
+
}
|
|
2936
|
+
function getTargetFromProxyTable(req, table) {
|
|
2937
|
+
let result, host = req.headers.host, hostAndPath = host + req.url;
|
|
2938
|
+
for (let [key, value] of Object.entries(table))if (containsPath(key)) {
|
|
2939
|
+
if (hostAndPath.indexOf(key) > -1) {
|
|
2940
|
+
debug('match: "%s" -> "%s"', key, result = value);
|
|
2941
|
+
break;
|
|
2942
|
+
}
|
|
2943
|
+
} else if (key === host) {
|
|
2944
|
+
debug('match: "%s" -> "%s"', host, result = value);
|
|
2945
|
+
break;
|
|
2946
|
+
}
|
|
2947
|
+
return result;
|
|
2948
|
+
}
|
|
2949
|
+
function containsPath(v) {
|
|
2950
|
+
return v.indexOf('/') > -1;
|
|
2951
|
+
}
|
|
2952
|
+
},
|
|
2953
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/status-code.js" (__unused_rspack_module, exports) {
|
|
2954
|
+
exports.getStatusCode = getStatusCode;
|
|
2955
|
+
function getStatusCode(errorCode) {
|
|
2956
|
+
let statusCode;
|
|
2957
|
+
if (/HPE_INVALID/.test(errorCode)) statusCode = 502;
|
|
2958
|
+
else switch(errorCode){
|
|
2959
|
+
case 'ECONNRESET':
|
|
2960
|
+
case 'ENOTFOUND':
|
|
2961
|
+
case 'ECONNREFUSED':
|
|
2962
|
+
case 'ETIMEDOUT':
|
|
2963
|
+
statusCode = 504;
|
|
2964
|
+
break;
|
|
2965
|
+
default:
|
|
2966
|
+
statusCode = 500;
|
|
2967
|
+
}
|
|
2968
|
+
return statusCode;
|
|
2969
|
+
}
|
|
2970
|
+
},
|
|
2971
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/function.js" (__unused_rspack_module, exports) {
|
|
2972
|
+
exports.getFunctionName = getFunctionName;
|
|
2973
|
+
function getFunctionName(fn) {
|
|
2974
|
+
return fn.name || '[anonymous Function]';
|
|
2975
|
+
}
|
|
2976
|
+
},
|
|
2977
|
+
"../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/utils/logger-plugin.js" (__unused_rspack_module, exports) {
|
|
2978
|
+
exports.getPort = getPort;
|
|
2979
|
+
function getPort(sockets) {
|
|
2980
|
+
return Object.keys(sockets || {})?.[0]?.split(':')[1];
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
}), __webpack_require__("../../node_modules/.pnpm/http-proxy-middleware@3.0.5_supports-color@10.2.2/node_modules/http-proxy-middleware/dist/index.js");
|
|
2984
|
+
var dist__esModule = !0;
|
|
2985
|
+
export { dist__esModule as __esModule };
|