@rspack/dev-server 2.0.0-rc.1 → 2.0.0-rc.3

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.
@@ -0,0 +1,57 @@
1
+ /*!
2
+ * connect
3
+ * Copyright(c) 2010 Sencha Inc.
4
+ * Copyright(c) 2011 TJ Holowaychuk
5
+ * Copyright(c) 2015 Douglas Christopher Wilson
6
+ * Copyright(c) 2025 Rstackjs
7
+ * MIT Licensed
8
+ */
9
+
10
+ /*!
11
+ * ee-first
12
+ * Copyright(c) 2014 Jonathan Ong
13
+ * MIT Licensed
14
+ */
15
+
16
+ /*!
17
+ * encodeurl
18
+ * Copyright(c) 2016 Douglas Christopher Wilson
19
+ * MIT Licensed
20
+ */
21
+
22
+ /*!
23
+ * escape-html
24
+ * Copyright(c) 2012-2013 TJ Holowaychuk
25
+ * Copyright(c) 2015 Andreas Lubbe
26
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
27
+ * MIT Licensed
28
+ */
29
+
30
+ /*!
31
+ * finalhandler
32
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
33
+ * MIT Licensed
34
+ */
35
+
36
+ /*!
37
+ * on-finished
38
+ * Copyright(c) 2013 Jonathan Ong
39
+ * Copyright(c) 2014 Douglas Christopher Wilson
40
+ * MIT Licensed
41
+ */
42
+
43
+ /*!
44
+ * parseurl
45
+ * Copyright(c) 2014 Jonathan Ong
46
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
47
+ * MIT Licensed
48
+ */
49
+
50
+ /*!
51
+ * statuses
52
+ * Copyright(c) 2014 Jonathan Ong
53
+ * Copyright(c) 2016 Douglas Christopher Wilson
54
+ * MIT Licensed
55
+ */
56
+
57
+ /*! LICENSE: index.js.LICENSE.txt */
package/dist/0~debug.js CHANGED
@@ -1,5 +1,5 @@
1
- import { __webpack_require__ } from "./621.js";
2
- import "./621.js";
1
+ import { __webpack_require__ } from "./937.js";
2
+ import "./937.js";
3
3
  __webpack_require__.add({
4
4
  "./node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js" (module, exports, __webpack_require__) {
5
5
  exports.formatArgs = formatArgs;
@@ -1,6 +1,6 @@
1
1
  /*! LICENSE: 0~http-proxy-middleware.js.LICENSE.txt */
2
- import { __webpack_require__ } from "./621.js";
3
- import "./621.js";
2
+ import { __webpack_require__ } from "./937.js";
3
+ import "./937.js";
4
4
  import "./0~debug.js";
5
5
  __webpack_require__.add({
6
6
  "./node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js" (module, __unused_rspack_exports, __webpack_require__) {
@@ -854,7 +854,7 @@ __webpack_require__.add({
854
854
  };
855
855
  module.exports = fill;
856
856
  },
857
- "./node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.3/node_modules/follow-redirects/debug.js" (module, __unused_rspack_exports, __webpack_require__) {
857
+ "./node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js" (module, __unused_rspack_exports, __webpack_require__) {
858
858
  var debug;
859
859
  module.exports = function() {
860
860
  if (!debug) {
@@ -866,14 +866,14 @@ __webpack_require__.add({
866
866
  debug.apply(null, arguments);
867
867
  };
868
868
  },
869
- "./node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.3/node_modules/follow-redirects/index.js" (module, __unused_rspack_exports, __webpack_require__) {
869
+ "./node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js" (module, __unused_rspack_exports, __webpack_require__) {
870
870
  var url = __webpack_require__("url");
871
871
  var URL = url.URL;
872
872
  var http = __webpack_require__("http");
873
873
  var https = __webpack_require__("https");
874
874
  var Writable = __webpack_require__("stream").Writable;
875
875
  var assert = __webpack_require__("assert");
876
- var debug = __webpack_require__("./node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.3/node_modules/follow-redirects/debug.js");
876
+ var debug = __webpack_require__("./node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js");
877
877
  (function() {
878
878
  var looksLikeNode = "u" > typeof process;
879
879
  var looksLikeBrowser = "u" > typeof window && "u" > typeof document;
@@ -1496,7 +1496,7 @@ __webpack_require__.add({
1496
1496
  };
1497
1497
  },
1498
1498
  "./node_modules/.pnpm/http-proxy@1.18.1_debug@4.4.3/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js" (module, __unused_rspack_exports, __webpack_require__) {
1499
- var httpNative = __webpack_require__("http"), httpsNative = __webpack_require__("https"), web_o = __webpack_require__("./node_modules/.pnpm/http-proxy@1.18.1_debug@4.4.3/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js"), common = __webpack_require__("./node_modules/.pnpm/http-proxy@1.18.1_debug@4.4.3/node_modules/http-proxy/lib/http-proxy/common.js"), followRedirects = __webpack_require__("./node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.3/node_modules/follow-redirects/index.js");
1499
+ var httpNative = __webpack_require__("http"), httpsNative = __webpack_require__("https"), web_o = __webpack_require__("./node_modules/.pnpm/http-proxy@1.18.1_debug@4.4.3/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js"), common = __webpack_require__("./node_modules/.pnpm/http-proxy@1.18.1_debug@4.4.3/node_modules/http-proxy/lib/http-proxy/common.js"), followRedirects = __webpack_require__("./node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js");
1500
1500
  web_o = Object.keys(web_o).map(function(pass) {
1501
1501
  return web_o[pass];
1502
1502
  });
@@ -1880,8 +1880,8 @@ __webpack_require__.add({
1880
1880
  "./node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
1881
1881
  const util = __webpack_require__("util");
1882
1882
  const braces = __webpack_require__("./node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js");
1883
- const picomatch = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js");
1884
- const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js");
1883
+ const picomatch = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js");
1884
+ const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js");
1885
1885
  const isEmptyString = (v)=>'' === v || './' === v;
1886
1886
  const hasBraces = (v)=>{
1887
1887
  const index = v.indexOf('{');
@@ -2020,13 +2020,14 @@ __webpack_require__.add({
2020
2020
  micromatch.hasBraces = hasBraces;
2021
2021
  module.exports = micromatch;
2022
2022
  },
2023
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2024
- module.exports = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js");
2023
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
2024
+ module.exports = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js");
2025
2025
  },
2026
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js" (module, __unused_rspack_exports, __webpack_require__) {
2026
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js" (module, __unused_rspack_exports, __webpack_require__) {
2027
2027
  const path = __webpack_require__("path");
2028
2028
  const WIN_SLASH = '\\\\/';
2029
2029
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2030
+ const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
2030
2031
  const DOT_LITERAL = '\\.';
2031
2032
  const PLUS_LITERAL = '\\+';
2032
2033
  const QMARK_LITERAL = '\\?';
@@ -2074,6 +2075,7 @@ __webpack_require__.add({
2074
2075
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
2075
2076
  };
2076
2077
  const POSIX_REGEX_SOURCE = {
2078
+ __proto__: null,
2077
2079
  alnum: 'a-zA-Z0-9',
2078
2080
  alpha: 'a-zA-Z',
2079
2081
  ascii: '\\x00-\\x7F',
@@ -2090,6 +2092,7 @@ __webpack_require__.add({
2090
2092
  xdigit: 'A-Fa-f0-9'
2091
2093
  };
2092
2094
  module.exports = {
2095
+ DEFAULT_MAX_EXTGLOB_RECURSION,
2093
2096
  MAX_LENGTH: 65536,
2094
2097
  POSIX_REGEX_SOURCE,
2095
2098
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
@@ -2099,6 +2102,7 @@ __webpack_require__.add({
2099
2102
  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
2100
2103
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
2101
2104
  REPLACEMENTS: {
2105
+ __proto__: null,
2102
2106
  '***': '*',
2103
2107
  '**/**': '**',
2104
2108
  '**/**/**': '**'
@@ -2181,9 +2185,9 @@ __webpack_require__.add({
2181
2185
  }
2182
2186
  };
2183
2187
  },
2184
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
2185
- const constants = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js");
2186
- const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js");
2188
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
2189
+ const constants = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js");
2190
+ const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js");
2187
2191
  const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
2188
2192
  const expandRange = (args, options)=>{
2189
2193
  if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
@@ -2197,6 +2201,189 @@ __webpack_require__.add({
2197
2201
  return value;
2198
2202
  };
2199
2203
  const syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
2204
+ const splitTopLevel = (input)=>{
2205
+ const parts = [];
2206
+ let bracket = 0;
2207
+ let paren = 0;
2208
+ let quote = 0;
2209
+ let value = '';
2210
+ let escaped = false;
2211
+ for (const ch of input){
2212
+ if (true === escaped) {
2213
+ value += ch;
2214
+ escaped = false;
2215
+ continue;
2216
+ }
2217
+ if ('\\' === ch) {
2218
+ value += ch;
2219
+ escaped = true;
2220
+ continue;
2221
+ }
2222
+ if ('"' === ch) {
2223
+ quote = 1 === quote ? 0 : 1;
2224
+ value += ch;
2225
+ continue;
2226
+ }
2227
+ if (0 === quote) {
2228
+ if ('[' === ch) bracket++;
2229
+ else if (']' === ch && bracket > 0) bracket--;
2230
+ else if (0 === bracket) {
2231
+ if ('(' === ch) paren++;
2232
+ else if (')' === ch && paren > 0) paren--;
2233
+ else if ('|' === ch && 0 === paren) {
2234
+ parts.push(value);
2235
+ value = '';
2236
+ continue;
2237
+ }
2238
+ }
2239
+ }
2240
+ value += ch;
2241
+ }
2242
+ parts.push(value);
2243
+ return parts;
2244
+ };
2245
+ const isPlainBranch = (branch)=>{
2246
+ let escaped = false;
2247
+ for (const ch of branch){
2248
+ if (true === escaped) {
2249
+ escaped = false;
2250
+ continue;
2251
+ }
2252
+ if ('\\' === ch) {
2253
+ escaped = true;
2254
+ continue;
2255
+ }
2256
+ if (/[?*+@!()[\]{}]/.test(ch)) return false;
2257
+ }
2258
+ return true;
2259
+ };
2260
+ const normalizeSimpleBranch = (branch)=>{
2261
+ let value = branch.trim();
2262
+ let changed = true;
2263
+ while(true === changed){
2264
+ changed = false;
2265
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
2266
+ value = value.slice(2, -1);
2267
+ changed = true;
2268
+ }
2269
+ }
2270
+ if (!isPlainBranch(value)) return;
2271
+ return value.replace(/\\(.)/g, '$1');
2272
+ };
2273
+ const hasRepeatedCharPrefixOverlap = (branches)=>{
2274
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
2275
+ for(let i = 0; i < values.length; i++)for(let j = i + 1; j < values.length; j++){
2276
+ const a = values[i];
2277
+ const b = values[j];
2278
+ const char = a[0];
2279
+ if (char && a === char.repeat(a.length) && b === char.repeat(b.length)) {
2280
+ if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
2281
+ }
2282
+ }
2283
+ return false;
2284
+ };
2285
+ const parseRepeatedExtglob = (pattern, requireEnd = true)=>{
2286
+ if ('+' !== pattern[0] && '*' !== pattern[0] || '(' !== pattern[1]) return;
2287
+ let bracket = 0;
2288
+ let paren = 0;
2289
+ let quote = 0;
2290
+ let escaped = false;
2291
+ for(let i = 1; i < pattern.length; i++){
2292
+ const ch = pattern[i];
2293
+ if (true === escaped) {
2294
+ escaped = false;
2295
+ continue;
2296
+ }
2297
+ if ('\\' === ch) {
2298
+ escaped = true;
2299
+ continue;
2300
+ }
2301
+ if ('"' === ch) {
2302
+ quote = 1 === quote ? 0 : 1;
2303
+ continue;
2304
+ }
2305
+ if (1 !== quote) {
2306
+ if ('[' === ch) {
2307
+ bracket++;
2308
+ continue;
2309
+ }
2310
+ if (']' === ch && bracket > 0) {
2311
+ bracket--;
2312
+ continue;
2313
+ }
2314
+ if (!(bracket > 0)) {
2315
+ if ('(' === ch) {
2316
+ paren++;
2317
+ continue;
2318
+ }
2319
+ if (')' === ch) {
2320
+ paren--;
2321
+ if (0 === paren) {
2322
+ if (true === requireEnd && i !== pattern.length - 1) return;
2323
+ return {
2324
+ type: pattern[0],
2325
+ body: pattern.slice(2, i),
2326
+ end: i
2327
+ };
2328
+ }
2329
+ }
2330
+ }
2331
+ }
2332
+ }
2333
+ };
2334
+ const getStarExtglobSequenceOutput = (pattern)=>{
2335
+ let index = 0;
2336
+ const chars = [];
2337
+ while(index < pattern.length){
2338
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
2339
+ if (!match || '*' !== match.type) return;
2340
+ const branches = splitTopLevel(match.body).map((branch)=>branch.trim());
2341
+ if (1 !== branches.length) return;
2342
+ const branch = normalizeSimpleBranch(branches[0]);
2343
+ if (!branch || 1 !== branch.length) return;
2344
+ chars.push(branch);
2345
+ index += match.end + 1;
2346
+ }
2347
+ if (chars.length < 1) return;
2348
+ const source = 1 === chars.length ? utils.escapeRegex(chars[0]) : `[${chars.map((ch)=>utils.escapeRegex(ch)).join('')}]`;
2349
+ return `${source}*`;
2350
+ };
2351
+ const repeatedExtglobRecursion = (pattern)=>{
2352
+ let depth = 0;
2353
+ let value = pattern.trim();
2354
+ let match = parseRepeatedExtglob(value);
2355
+ while(match){
2356
+ depth++;
2357
+ value = match.body.trim();
2358
+ match = parseRepeatedExtglob(value);
2359
+ }
2360
+ return depth;
2361
+ };
2362
+ const analyzeRepeatedExtglob = (body, options)=>{
2363
+ if (false === options.maxExtglobRecursion) return {
2364
+ risky: false
2365
+ };
2366
+ const max = 'number' == typeof options.maxExtglobRecursion ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
2367
+ const branches = splitTopLevel(body).map((branch)=>branch.trim());
2368
+ if (branches.length > 1) {
2369
+ if (branches.some((branch)=>'' === branch) || branches.some((branch)=>/^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return {
2370
+ risky: true
2371
+ };
2372
+ }
2373
+ for (const branch of branches){
2374
+ const safeOutput = getStarExtglobSequenceOutput(branch);
2375
+ if (safeOutput) return {
2376
+ risky: true,
2377
+ safeOutput
2378
+ };
2379
+ if (repeatedExtglobRecursion(branch) > max) return {
2380
+ risky: true
2381
+ };
2382
+ }
2383
+ return {
2384
+ risky: false
2385
+ };
2386
+ };
2200
2387
  const parse = (input, options)=>{
2201
2388
  if ('string' != typeof input) throw new TypeError('Expected a string');
2202
2389
  input = REPLACEMENTS[input] || input;
@@ -2313,6 +2500,8 @@ __webpack_require__.add({
2313
2500
  token.prev = prev;
2314
2501
  token.parens = state.parens;
2315
2502
  token.output = state.output;
2503
+ token.startIndex = state.index;
2504
+ token.tokensIndex = tokens.length;
2316
2505
  const output = (opts.capture ? '(' : '') + token.open;
2317
2506
  increment('parens');
2318
2507
  push({
@@ -2329,6 +2518,31 @@ __webpack_require__.add({
2329
2518
  extglobs.push(token);
2330
2519
  };
2331
2520
  const extglobClose = (token)=>{
2521
+ const literal = input.slice(token.startIndex, state.index + 1);
2522
+ const body = input.slice(token.startIndex + 2, state.index);
2523
+ const analysis = analyzeRepeatedExtglob(body, opts);
2524
+ if (('plus' === token.type || 'star' === token.type) && analysis.risky) {
2525
+ const safeOutput = analysis.safeOutput ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
2526
+ const open = tokens[token.tokensIndex];
2527
+ open.type = 'text';
2528
+ open.value = literal;
2529
+ open.output = safeOutput || utils.escapeRegex(literal);
2530
+ for(let i = token.tokensIndex + 1; i < tokens.length; i++){
2531
+ tokens[i].value = '';
2532
+ tokens[i].output = '';
2533
+ delete tokens[i].suffix;
2534
+ }
2535
+ state.output = token.output + open.output;
2536
+ state.backtrack = true;
2537
+ push({
2538
+ type: 'paren',
2539
+ extglob: true,
2540
+ value,
2541
+ output: ''
2542
+ });
2543
+ decrement('parens');
2544
+ return;
2545
+ }
2332
2546
  let output = token.close + (opts.capture ? ')' : '');
2333
2547
  let rest;
2334
2548
  if ('negate' === token.type) {
@@ -2972,12 +3186,12 @@ __webpack_require__.add({
2972
3186
  };
2973
3187
  module.exports = parse;
2974
3188
  },
2975
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
3189
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
2976
3190
  const path = __webpack_require__("path");
2977
- const scan = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js");
2978
- const parse = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js");
2979
- const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js");
2980
- const constants = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js");
3191
+ const scan = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js");
3192
+ const parse = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js");
3193
+ const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js");
3194
+ const constants = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js");
2981
3195
  const isObject = (val)=>val && 'object' == typeof val && !Array.isArray(val);
2982
3196
  const picomatch = (glob, options, returnState = false)=>{
2983
3197
  if (Array.isArray(glob)) {
@@ -3106,9 +3320,9 @@ __webpack_require__.add({
3106
3320
  picomatch.constants = constants;
3107
3321
  module.exports = picomatch;
3108
3322
  },
3109
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
3110
- const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js");
3111
- const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js");
3323
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
3324
+ const utils = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js");
3325
+ const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js");
3112
3326
  const isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
3113
3327
  const depth = (token)=>{
3114
3328
  if (true !== token.isPrefix) token.depth = token.isGlobstar ? 1 / 0 : 1;
@@ -3374,10 +3588,10 @@ __webpack_require__.add({
3374
3588
  };
3375
3589
  module.exports = scan;
3376
3590
  },
3377
- "./node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
3591
+ "./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
3378
3592
  const path = __webpack_require__("path");
3379
3593
  const win32 = 'win32' === process.platform;
3380
- const { 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");
3594
+ const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("./node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js");
3381
3595
  exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val);
3382
3596
  exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str);
3383
3597
  exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str);
@@ -1,5 +1,5 @@
1
- import { __webpack_require__ } from "./621.js";
2
- import "./621.js";
1
+ import { __webpack_require__ } from "./937.js";
2
+ import "./937.js";
3
3
  __webpack_require__.add({
4
4
  "./node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js" (module) {
5
5
  module.exports = {
package/dist/0~open.js CHANGED
@@ -47,10 +47,10 @@ const isWsl = ()=>{
47
47
  return true;
48
48
  }
49
49
  try {
50
- return node_fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ? !isInsideContainer() : false;
51
- } catch {
52
- return false;
53
- }
50
+ if (node_fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) return !isInsideContainer();
51
+ } catch {}
52
+ if (node_fs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop') || node_fs.existsSync('/run/WSL')) return !isInsideContainer();
53
+ return false;
54
54
  };
55
55
  const is_wsl = node_process.env.__IS_WSL_TEST__ ? isWsl : isWsl();
56
56
  const execFile = promisify(node_child_process.execFile);
@@ -174,19 +174,23 @@ async function defaultBrowserId() {
174
174
  'LSHandlers'
175
175
  ]);
176
176
  const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
177
- return match?.groups.id ?? 'com.apple.Safari';
177
+ const browserId = match?.groups.id ?? 'com.apple.Safari';
178
+ if ('com.apple.safari' === browserId) return 'com.apple.Safari';
179
+ return browserId;
178
180
  }
179
181
  const run_applescript_execFileAsync = promisify(external_node_child_process_execFile);
180
- async function runAppleScript(script, { humanReadableOutput = true } = {}) {
182
+ async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
181
183
  if ('darwin' !== node_process.platform) throw new Error('macOS only');
182
184
  const outputArguments = humanReadableOutput ? [] : [
183
185
  '-ss'
184
186
  ];
187
+ const execOptions = {};
188
+ if (signal) execOptions.signal = signal;
185
189
  const { stdout } = await run_applescript_execFileAsync("osascript", [
186
190
  '-e',
187
191
  script,
188
192
  outputArguments
189
- ]);
193
+ ], execOptions);
190
194
  return stdout.trim();
191
195
  }
192
196
  async function bundleName(bundleId) {
package/dist/0~p-retry.js CHANGED
@@ -2,19 +2,22 @@ const objectToString = Object.prototype.toString;
2
2
  const isError = (value)=>'[object Error]' === objectToString.call(value);
3
3
  const errorMessages = new Set([
4
4
  'network error',
5
- 'Failed to fetch',
6
5
  'NetworkError when attempting to fetch resource.',
7
6
  'The Internet connection appears to be offline.',
8
- 'Load failed',
9
7
  'Network request failed',
10
8
  'fetch failed',
11
- 'terminated'
9
+ 'terminated',
10
+ ' A network error occurred.',
11
+ 'Network connection lost'
12
12
  ]);
13
13
  function isNetworkError(error) {
14
14
  const isValid = error && isError(error) && 'TypeError' === error.name && 'string' == typeof error.message;
15
15
  if (!isValid) return false;
16
- if ('Load failed' === error.message) return void 0 === error.stack;
17
- return errorMessages.has(error.message);
16
+ const { message, stack } = error;
17
+ if ('Load failed' === message) return void 0 === stack || '__sentry_captured__' in error;
18
+ if (message.startsWith('error sending request for url')) return true;
19
+ if ('Failed to fetch' === message || message.startsWith('Failed to fetch (') && message.endsWith(')')) return true;
20
+ return errorMessages.has(message);
18
21
  }
19
22
  function validateRetries(retries) {
20
23
  if ('number' == typeof retries) {
@@ -1,6 +1,6 @@
1
1
  /*! LICENSE: 0~serve-static.js.LICENSE.txt */
2
- import { __webpack_require__ } from "./621.js";
3
- import "./621.js";
2
+ import { __webpack_require__ } from "./937.js";
3
+ import "./937.js";
4
4
  import "./0~debug.js";
5
5
  __webpack_require__.add({
6
6
  "./node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js" (module, __unused_rspack_exports, __webpack_require__) {