vite 4.4.0-beta.4 → 4.4.0

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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -6,7 +6,7 @@ import { promisify as promisify$4, format as format$2, inspect } from 'node:util
6
6
  import { performance } from 'node:perf_hooks';
7
7
  import { createRequire as createRequire$1, builtinModules } from 'node:module';
8
8
  import require$$0$3 from 'tty';
9
- import esbuild, { transform as transform$2, formatMessages, build as build$3 } from 'esbuild';
9
+ import esbuild, { transform as transform$1, formatMessages, build as build$3 } from 'esbuild';
10
10
  import require$$0$4, { win32, posix, isAbsolute as isAbsolute$1, resolve as resolve$3, relative as relative$1, basename as basename$1, extname, dirname as dirname$1, join as join$1, sep as sep$1, normalize } from 'path';
11
11
  import * as require$$0$2 from 'fs';
12
12
  import require$$0__default, { existsSync, readFileSync, statSync as statSync$1, promises as promises$1, readdir as readdir$4, readdirSync } from 'fs';
@@ -19,7 +19,7 @@ import require$$1$1 from 'http';
19
19
  import require$$0$7 from 'stream';
20
20
  import require$$2 from 'os';
21
21
  import require$$2$1 from 'child_process';
22
- import os$3 from 'node:os';
22
+ import os$4 from 'node:os';
23
23
  import { exec } from 'node:child_process';
24
24
  import { createHash as createHash$2 } from 'node:crypto';
25
25
  import { promises } from 'node:dns';
@@ -6082,18 +6082,18 @@ function requireGlob () {
6082
6082
  var globExports = requireGlob();
6083
6083
  var glob$1 = /*@__PURE__*/getDefaultExportFromCjs(globExports);
6084
6084
 
6085
- const comma = ','.charCodeAt(0);
6086
- const semicolon = ';'.charCodeAt(0);
6087
- const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
6088
- const intToChar = new Uint8Array(64); // 64 possible chars.
6089
- const charToInt = new Uint8Array(128); // z is 122 in ASCII
6090
- for (let i = 0; i < chars$1.length; i++) {
6091
- const c = chars$1.charCodeAt(i);
6092
- intToChar[i] = c;
6093
- charToInt[c] = i;
6085
+ const comma$1 = ','.charCodeAt(0);
6086
+ const semicolon$1 = ';'.charCodeAt(0);
6087
+ const chars$2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
6088
+ const intToChar$1 = new Uint8Array(64); // 64 possible chars.
6089
+ const charToInt$1 = new Uint8Array(128); // z is 122 in ASCII
6090
+ for (let i = 0; i < chars$2.length; i++) {
6091
+ const c = chars$2.charCodeAt(i);
6092
+ intToChar$1[i] = c;
6093
+ charToInt$1[c] = i;
6094
6094
  }
6095
6095
  // Provide a fallback for older environments.
6096
- const td = typeof TextDecoder !== 'undefined'
6096
+ const td$1 = typeof TextDecoder !== 'undefined'
6097
6097
  ? /* #__PURE__ */ new TextDecoder()
6098
6098
  : typeof Buffer !== 'undefined'
6099
6099
  ? {
@@ -6162,7 +6162,7 @@ function decodeInteger(mappings, pos, state, j) {
6162
6162
  let integer = 0;
6163
6163
  do {
6164
6164
  const c = mappings.charCodeAt(pos++);
6165
- integer = charToInt[c];
6165
+ integer = charToInt$1[c];
6166
6166
  value |= (integer & 31) << shift;
6167
6167
  shift += 5;
6168
6168
  } while (integer & 32);
@@ -6177,7 +6177,7 @@ function decodeInteger(mappings, pos, state, j) {
6177
6177
  function hasMoreVlq(mappings, i, length) {
6178
6178
  if (i >= length)
6179
6179
  return false;
6180
- return mappings.charCodeAt(i) !== comma;
6180
+ return mappings.charCodeAt(i) !== comma$1;
6181
6181
  }
6182
6182
  function sort(line) {
6183
6183
  line.sort(sortComparator$1);
@@ -6185,7 +6185,7 @@ function sort(line) {
6185
6185
  function sortComparator$1(a, b) {
6186
6186
  return a[0] - b[0];
6187
6187
  }
6188
- function encode$1(decoded) {
6188
+ function encode$2(decoded) {
6189
6189
  const state = new Int32Array(5);
6190
6190
  const bufLength = 1024 * 16;
6191
6191
  const subLength = bufLength - 36;
@@ -6197,10 +6197,10 @@ function encode$1(decoded) {
6197
6197
  const line = decoded[i];
6198
6198
  if (i > 0) {
6199
6199
  if (pos === bufLength) {
6200
- out += td.decode(buf);
6200
+ out += td$1.decode(buf);
6201
6201
  pos = 0;
6202
6202
  }
6203
- buf[pos++] = semicolon;
6203
+ buf[pos++] = semicolon$1;
6204
6204
  }
6205
6205
  if (line.length === 0)
6206
6206
  continue;
@@ -6210,26 +6210,26 @@ function encode$1(decoded) {
6210
6210
  // We can push up to 5 ints, each int can take at most 7 chars, and we
6211
6211
  // may push a comma.
6212
6212
  if (pos > subLength) {
6213
- out += td.decode(sub);
6213
+ out += td$1.decode(sub);
6214
6214
  buf.copyWithin(0, subLength, pos);
6215
6215
  pos -= subLength;
6216
6216
  }
6217
6217
  if (j > 0)
6218
- buf[pos++] = comma;
6219
- pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
6218
+ buf[pos++] = comma$1;
6219
+ pos = encodeInteger$1(buf, pos, state, segment, 0); // genColumn
6220
6220
  if (segment.length === 1)
6221
6221
  continue;
6222
- pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
6223
- pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
6224
- pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
6222
+ pos = encodeInteger$1(buf, pos, state, segment, 1); // sourcesIndex
6223
+ pos = encodeInteger$1(buf, pos, state, segment, 2); // sourceLine
6224
+ pos = encodeInteger$1(buf, pos, state, segment, 3); // sourceColumn
6225
6225
  if (segment.length === 4)
6226
6226
  continue;
6227
- pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
6227
+ pos = encodeInteger$1(buf, pos, state, segment, 4); // namesIndex
6228
6228
  }
6229
6229
  }
6230
- return out + td.decode(buf.subarray(0, pos));
6230
+ return out + td$1.decode(buf.subarray(0, pos));
6231
6231
  }
6232
- function encodeInteger(buf, pos, state, segment, j) {
6232
+ function encodeInteger$1(buf, pos, state, segment, j) {
6233
6233
  const next = segment[j];
6234
6234
  let num = next - state[j];
6235
6235
  state[j] = next;
@@ -6239,7 +6239,7 @@ function encodeInteger(buf, pos, state, segment, j) {
6239
6239
  num >>>= 5;
6240
6240
  if (num > 0)
6241
6241
  clamped |= 0b100000;
6242
- buf[pos++] = intToChar[clamped];
6242
+ buf[pos++] = intToChar$1[clamped];
6243
6243
  } while (num > 0);
6244
6244
  return pos;
6245
6245
  }
@@ -6433,7 +6433,7 @@ let SourceMap$2 = class SourceMap {
6433
6433
  this.sources = properties.sources;
6434
6434
  this.sourcesContent = properties.sourcesContent;
6435
6435
  this.names = properties.names;
6436
- this.mappings = encode$1(properties.mappings);
6436
+ this.mappings = encode$2(properties.mappings);
6437
6437
  }
6438
6438
 
6439
6439
  toString() {
@@ -10254,7 +10254,7 @@ class GenMapping {
10254
10254
  };
10255
10255
  toEncodedMap = (map) => {
10256
10256
  const decoded = toDecodedMap(map);
10257
- return Object.assign(Object.assign({}, decoded), { mappings: encode$1(decoded.mappings) });
10257
+ return Object.assign(Object.assign({}, decoded), { mappings: encode$2(decoded.mappings) });
10258
10258
  };
10259
10259
  // Internal helpers
10260
10260
  addSegmentInternal = (skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
@@ -11908,7 +11908,7 @@ function isUrl(path) {
11908
11908
  }
11909
11909
  }
11910
11910
  const isCaseInsensitiveFS = testCaseInsensitiveFS();
11911
- const isWindows$4 = os$3.platform() === 'win32';
11911
+ const isWindows$4 = os$4.platform() === 'win32';
11912
11912
  const VOLUME_RE = /^[A-Z]:/i;
11913
11913
  function normalizePath$3(id) {
11914
11914
  return path$o.posix.normalize(isWindows$4 ? slash$1(id) : id);
@@ -12475,7 +12475,7 @@ async function resolveServerUrls(server, options, config) {
12475
12475
  }
12476
12476
  }
12477
12477
  else {
12478
- Object.values(os$3.networkInterfaces())
12478
+ Object.values(os$4.networkInterfaces())
12479
12479
  .flatMap((nInterface) => nInterface ?? [])
12480
12480
  .filter((detail) => detail &&
12481
12481
  detail.address &&
@@ -13813,6 +13813,13 @@ async function transformWithEsbuild(code, filename, options, inMap) {
13813
13813
  ...compilerOptionsForFile,
13814
13814
  ...tsconfigRaw?.compilerOptions,
13815
13815
  };
13816
+ // esbuild uses `useDefineForClassFields: true` when `tsconfig.compilerOptions.target` isn't declared
13817
+ // but we want `useDefineForClassFields: false` when `tsconfig.compilerOptions.target` isn't declared
13818
+ // to align with the TypeScript's behavior
13819
+ if (compilerOptions.useDefineForClassFields === undefined &&
13820
+ compilerOptions.target === undefined) {
13821
+ compilerOptions.useDefineForClassFields = false;
13822
+ }
13816
13823
  // esbuild uses tsconfig fields when both the normal options and tsconfig was set
13817
13824
  // but we want to prioritize the normal options
13818
13825
  if (options) {
@@ -13843,7 +13850,7 @@ async function transformWithEsbuild(code, filename, options, inMap) {
13843
13850
  // @ts-expect-error jsxInject exists in ESBuildOptions
13844
13851
  delete resolvedOptions.jsxInject;
13845
13852
  try {
13846
- const result = await transform$2(code, resolvedOptions);
13853
+ const result = await transform$1(code, resolvedOptions);
13847
13854
  let map;
13848
13855
  if (inMap && resolvedOptions.sourcemap) {
13849
13856
  const nextMap = JSON.parse(result.map);
@@ -14810,6 +14817,94 @@ function lookup(extn) {
14810
14817
  return mimes$1[!~idx ? tmp : tmp.substring(++idx)];
14811
14818
  }
14812
14819
 
14820
+ const comma = ','.charCodeAt(0);
14821
+ const semicolon = ';'.charCodeAt(0);
14822
+ const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
14823
+ const intToChar = new Uint8Array(64); // 64 possible chars.
14824
+ const charToInt = new Uint8Array(128); // z is 122 in ASCII
14825
+ for (let i = 0; i < chars$1.length; i++) {
14826
+ const c = chars$1.charCodeAt(i);
14827
+ intToChar[i] = c;
14828
+ charToInt[c] = i;
14829
+ }
14830
+ // Provide a fallback for older environments.
14831
+ const td = typeof TextDecoder !== 'undefined'
14832
+ ? /* #__PURE__ */ new TextDecoder()
14833
+ : typeof Buffer !== 'undefined'
14834
+ ? {
14835
+ decode(buf) {
14836
+ const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
14837
+ return out.toString();
14838
+ },
14839
+ }
14840
+ : {
14841
+ decode(buf) {
14842
+ let out = '';
14843
+ for (let i = 0; i < buf.length; i++) {
14844
+ out += String.fromCharCode(buf[i]);
14845
+ }
14846
+ return out;
14847
+ },
14848
+ };
14849
+ function encode$1(decoded) {
14850
+ const state = new Int32Array(5);
14851
+ const bufLength = 1024 * 16;
14852
+ const subLength = bufLength - 36;
14853
+ const buf = new Uint8Array(bufLength);
14854
+ const sub = buf.subarray(0, subLength);
14855
+ let pos = 0;
14856
+ let out = '';
14857
+ for (let i = 0; i < decoded.length; i++) {
14858
+ const line = decoded[i];
14859
+ if (i > 0) {
14860
+ if (pos === bufLength) {
14861
+ out += td.decode(buf);
14862
+ pos = 0;
14863
+ }
14864
+ buf[pos++] = semicolon;
14865
+ }
14866
+ if (line.length === 0)
14867
+ continue;
14868
+ state[0] = 0;
14869
+ for (let j = 0; j < line.length; j++) {
14870
+ const segment = line[j];
14871
+ // We can push up to 5 ints, each int can take at most 7 chars, and we
14872
+ // may push a comma.
14873
+ if (pos > subLength) {
14874
+ out += td.decode(sub);
14875
+ buf.copyWithin(0, subLength, pos);
14876
+ pos -= subLength;
14877
+ }
14878
+ if (j > 0)
14879
+ buf[pos++] = comma;
14880
+ pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
14881
+ if (segment.length === 1)
14882
+ continue;
14883
+ pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
14884
+ pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
14885
+ pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
14886
+ if (segment.length === 4)
14887
+ continue;
14888
+ pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
14889
+ }
14890
+ }
14891
+ return out + td.decode(buf.subarray(0, pos));
14892
+ }
14893
+ function encodeInteger(buf, pos, state, segment, j) {
14894
+ const next = segment[j];
14895
+ let num = next - state[j];
14896
+ state[j] = next;
14897
+ num = num < 0 ? (-num << 1) | 1 : num << 1;
14898
+ do {
14899
+ let clamped = num & 0b011111;
14900
+ num >>>= 5;
14901
+ if (num > 0)
14902
+ clamped |= 0b100000;
14903
+ buf[pos++] = intToChar[clamped];
14904
+ } while (num > 0);
14905
+ return pos;
14906
+ }
14907
+
14813
14908
  class BitSet {
14814
14909
  constructor(arg) {
14815
14910
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -16712,92 +16807,127 @@ var utils$g = {};
16712
16807
 
16713
16808
  var array$1 = {};
16714
16809
 
16715
- Object.defineProperty(array$1, "__esModule", { value: true });
16716
- array$1.splitWhen = array$1.flatten = void 0;
16717
- function flatten$1(items) {
16718
- return items.reduce((collection, item) => [].concat(collection, item), []);
16719
- }
16720
- array$1.flatten = flatten$1;
16721
- function splitWhen(items, predicate) {
16722
- const result = [[]];
16723
- let groupIndex = 0;
16724
- for (const item of items) {
16725
- if (predicate(item)) {
16726
- groupIndex++;
16727
- result[groupIndex] = [];
16728
- }
16729
- else {
16730
- result[groupIndex].push(item);
16731
- }
16732
- }
16733
- return result;
16734
- }
16810
+ Object.defineProperty(array$1, "__esModule", { value: true });
16811
+ array$1.splitWhen = array$1.flatten = void 0;
16812
+ function flatten$1(items) {
16813
+ return items.reduce((collection, item) => [].concat(collection, item), []);
16814
+ }
16815
+ array$1.flatten = flatten$1;
16816
+ function splitWhen(items, predicate) {
16817
+ const result = [[]];
16818
+ let groupIndex = 0;
16819
+ for (const item of items) {
16820
+ if (predicate(item)) {
16821
+ groupIndex++;
16822
+ result[groupIndex] = [];
16823
+ }
16824
+ else {
16825
+ result[groupIndex].push(item);
16826
+ }
16827
+ }
16828
+ return result;
16829
+ }
16735
16830
  array$1.splitWhen = splitWhen;
16736
16831
 
16737
16832
  var errno$1 = {};
16738
16833
 
16739
- Object.defineProperty(errno$1, "__esModule", { value: true });
16740
- errno$1.isEnoentCodeError = void 0;
16741
- function isEnoentCodeError(error) {
16742
- return error.code === 'ENOENT';
16743
- }
16834
+ Object.defineProperty(errno$1, "__esModule", { value: true });
16835
+ errno$1.isEnoentCodeError = void 0;
16836
+ function isEnoentCodeError(error) {
16837
+ return error.code === 'ENOENT';
16838
+ }
16744
16839
  errno$1.isEnoentCodeError = isEnoentCodeError;
16745
16840
 
16746
16841
  var fs$h = {};
16747
16842
 
16748
- Object.defineProperty(fs$h, "__esModule", { value: true });
16749
- fs$h.createDirentFromStats = void 0;
16750
- let DirentFromStats$1 = class DirentFromStats {
16751
- constructor(name, stats) {
16752
- this.name = name;
16753
- this.isBlockDevice = stats.isBlockDevice.bind(stats);
16754
- this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
16755
- this.isDirectory = stats.isDirectory.bind(stats);
16756
- this.isFIFO = stats.isFIFO.bind(stats);
16757
- this.isFile = stats.isFile.bind(stats);
16758
- this.isSocket = stats.isSocket.bind(stats);
16759
- this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
16760
- }
16761
- };
16762
- function createDirentFromStats$1(name, stats) {
16763
- return new DirentFromStats$1(name, stats);
16764
- }
16843
+ Object.defineProperty(fs$h, "__esModule", { value: true });
16844
+ fs$h.createDirentFromStats = void 0;
16845
+ let DirentFromStats$1 = class DirentFromStats {
16846
+ constructor(name, stats) {
16847
+ this.name = name;
16848
+ this.isBlockDevice = stats.isBlockDevice.bind(stats);
16849
+ this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
16850
+ this.isDirectory = stats.isDirectory.bind(stats);
16851
+ this.isFIFO = stats.isFIFO.bind(stats);
16852
+ this.isFile = stats.isFile.bind(stats);
16853
+ this.isSocket = stats.isSocket.bind(stats);
16854
+ this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
16855
+ }
16856
+ };
16857
+ function createDirentFromStats$1(name, stats) {
16858
+ return new DirentFromStats$1(name, stats);
16859
+ }
16765
16860
  fs$h.createDirentFromStats = createDirentFromStats$1;
16766
16861
 
16767
16862
  var path$h = {};
16768
16863
 
16769
- Object.defineProperty(path$h, "__esModule", { value: true });
16770
- path$h.removeLeadingDotSegment = path$h.escape = path$h.makeAbsolute = path$h.unixify = void 0;
16771
- const path$g = require$$0$4;
16772
- const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
16773
- const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
16774
- /**
16775
- * Designed to work only with simple paths: `dir\\file`.
16776
- */
16777
- function unixify(filepath) {
16778
- return filepath.replace(/\\/g, '/');
16779
- }
16780
- path$h.unixify = unixify;
16781
- function makeAbsolute(cwd, filepath) {
16782
- return path$g.resolve(cwd, filepath);
16783
- }
16784
- path$h.makeAbsolute = makeAbsolute;
16785
- function escape$2(pattern) {
16786
- return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
16787
- }
16788
- path$h.escape = escape$2;
16789
- function removeLeadingDotSegment(entry) {
16790
- // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
16791
- // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
16792
- if (entry.charAt(0) === '.') {
16793
- const secondCharactery = entry.charAt(1);
16794
- if (secondCharactery === '/' || secondCharactery === '\\') {
16795
- return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
16796
- }
16797
- }
16798
- return entry;
16799
- }
16864
+ Object.defineProperty(path$h, "__esModule", { value: true });
16865
+ path$h.convertPosixPathToPattern = path$h.convertWindowsPathToPattern = path$h.convertPathToPattern = path$h.escapePosixPath = path$h.escapeWindowsPath = path$h.escape = path$h.removeLeadingDotSegment = path$h.makeAbsolute = path$h.unixify = void 0;
16866
+ const os$3 = require$$2;
16867
+ const path$g = require$$0$4;
16868
+ const IS_WINDOWS_PLATFORM = os$3.platform() === 'win32';
16869
+ const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
16870
+ /**
16871
+ * All non-escaped special characters.
16872
+ * Posix: ()*?[\]{|}, !+@ before (, ! at the beginning, \\ before non-special characters.
16873
+ * Windows: (){}, !+@ before (, ! at the beginning.
16874
+ */
16875
+ const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
16876
+ const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
16877
+ /**
16878
+ * The device path (\\.\ or \\?\).
16879
+ * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths
16880
+ */
16881
+ const DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
16882
+ /**
16883
+ * All backslashes except those escaping special characters.
16884
+ * Windows: !()+@{}
16885
+ * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions
16886
+ */
16887
+ const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@{}])/g;
16888
+ /**
16889
+ * Designed to work only with simple paths: `dir\\file`.
16890
+ */
16891
+ function unixify(filepath) {
16892
+ return filepath.replace(/\\/g, '/');
16893
+ }
16894
+ path$h.unixify = unixify;
16895
+ function makeAbsolute(cwd, filepath) {
16896
+ return path$g.resolve(cwd, filepath);
16897
+ }
16898
+ path$h.makeAbsolute = makeAbsolute;
16899
+ function removeLeadingDotSegment(entry) {
16900
+ // We do not use `startsWith` because this is 10x slower than current implementation for some cases.
16901
+ // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
16902
+ if (entry.charAt(0) === '.') {
16903
+ const secondCharactery = entry.charAt(1);
16904
+ if (secondCharactery === '/' || secondCharactery === '\\') {
16905
+ return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
16906
+ }
16907
+ }
16908
+ return entry;
16909
+ }
16800
16910
  path$h.removeLeadingDotSegment = removeLeadingDotSegment;
16911
+ path$h.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
16912
+ function escapeWindowsPath(pattern) {
16913
+ return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
16914
+ }
16915
+ path$h.escapeWindowsPath = escapeWindowsPath;
16916
+ function escapePosixPath(pattern) {
16917
+ return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
16918
+ }
16919
+ path$h.escapePosixPath = escapePosixPath;
16920
+ path$h.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
16921
+ function convertWindowsPathToPattern(filepath) {
16922
+ return escapeWindowsPath(filepath)
16923
+ .replace(DOS_DEVICE_PATH_RE, '//$1')
16924
+ .replace(WINDOWS_BACKSLASHES_RE, '/');
16925
+ }
16926
+ path$h.convertWindowsPathToPattern = convertWindowsPathToPattern;
16927
+ function convertPosixPathToPattern(filepath) {
16928
+ return escapePosixPath(filepath);
16929
+ }
16930
+ path$h.convertPosixPathToPattern = convertPosixPathToPattern;
16801
16931
 
16802
16932
  var pattern$1 = {};
16803
16933
 
@@ -17476,7 +17606,7 @@ const toRegexRange = toRegexRange_1;
17476
17606
 
17477
17607
  const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
17478
17608
 
17479
- const transform$1 = toNumber => {
17609
+ const transform = toNumber => {
17480
17610
  return value => toNumber === true ? Number(value) : String(value);
17481
17611
  };
17482
17612
 
@@ -17613,7 +17743,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
17613
17743
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
17614
17744
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
17615
17745
  let toNumber = padded === false && stringify$6(start, end, options) === false;
17616
- let format = options.transform || transform$1(toNumber);
17746
+ let format = options.transform || transform(toNumber);
17617
17747
 
17618
17748
  if (options.toRegex && step === 1) {
17619
17749
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
@@ -18902,174 +19032,193 @@ var micromatch_1 = micromatch$1;
18902
19032
 
18903
19033
  var micromatch$2 = /*@__PURE__*/getDefaultExportFromCjs(micromatch_1);
18904
19034
 
18905
- Object.defineProperty(pattern$1, "__esModule", { value: true });
18906
- pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
18907
- const path$f = require$$0$4;
18908
- const globParent$1 = globParent$2;
18909
- const micromatch = micromatch_1;
18910
- const GLOBSTAR$1 = '**';
18911
- const ESCAPE_SYMBOL = '\\';
18912
- const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
18913
- const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
18914
- const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
18915
- const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
18916
- const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
18917
- function isStaticPattern(pattern, options = {}) {
18918
- return !isDynamicPattern(pattern, options);
18919
- }
18920
- pattern$1.isStaticPattern = isStaticPattern;
18921
- function isDynamicPattern(pattern, options = {}) {
18922
- /**
18923
- * A special case with an empty string is necessary for matching patterns that start with a forward slash.
18924
- * An empty string cannot be a dynamic pattern.
18925
- * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
18926
- */
18927
- if (pattern === '') {
18928
- return false;
18929
- }
18930
- /**
18931
- * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
18932
- * filepath directly (without read directory).
18933
- */
18934
- if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
18935
- return true;
18936
- }
18937
- if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
18938
- return true;
18939
- }
18940
- if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
18941
- return true;
18942
- }
18943
- if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
18944
- return true;
18945
- }
18946
- return false;
18947
- }
18948
- pattern$1.isDynamicPattern = isDynamicPattern;
18949
- function hasBraceExpansion(pattern) {
18950
- const openingBraceIndex = pattern.indexOf('{');
18951
- if (openingBraceIndex === -1) {
18952
- return false;
18953
- }
18954
- const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);
18955
- if (closingBraceIndex === -1) {
18956
- return false;
18957
- }
18958
- const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
18959
- return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
18960
- }
18961
- function convertToPositivePattern(pattern) {
18962
- return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
18963
- }
18964
- pattern$1.convertToPositivePattern = convertToPositivePattern;
18965
- function convertToNegativePattern(pattern) {
18966
- return '!' + pattern;
18967
- }
18968
- pattern$1.convertToNegativePattern = convertToNegativePattern;
18969
- function isNegativePattern(pattern) {
18970
- return pattern.startsWith('!') && pattern[1] !== '(';
18971
- }
18972
- pattern$1.isNegativePattern = isNegativePattern;
18973
- function isPositivePattern(pattern) {
18974
- return !isNegativePattern(pattern);
18975
- }
18976
- pattern$1.isPositivePattern = isPositivePattern;
18977
- function getNegativePatterns(patterns) {
18978
- return patterns.filter(isNegativePattern);
18979
- }
18980
- pattern$1.getNegativePatterns = getNegativePatterns;
18981
- function getPositivePatterns$1(patterns) {
18982
- return patterns.filter(isPositivePattern);
18983
- }
18984
- pattern$1.getPositivePatterns = getPositivePatterns$1;
18985
- /**
18986
- * Returns patterns that can be applied inside the current directory.
18987
- *
18988
- * @example
18989
- * // ['./*', '*', 'a/*']
18990
- * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
18991
- */
18992
- function getPatternsInsideCurrentDirectory(patterns) {
18993
- return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
18994
- }
18995
- pattern$1.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
18996
- /**
18997
- * Returns patterns to be expanded relative to (outside) the current directory.
18998
- *
18999
- * @example
19000
- * // ['../*', './../*']
19001
- * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
19002
- */
19003
- function getPatternsOutsideCurrentDirectory(patterns) {
19004
- return patterns.filter(isPatternRelatedToParentDirectory);
19005
- }
19006
- pattern$1.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
19007
- function isPatternRelatedToParentDirectory(pattern) {
19008
- return pattern.startsWith('..') || pattern.startsWith('./..');
19009
- }
19010
- pattern$1.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
19011
- function getBaseDirectory(pattern) {
19012
- return globParent$1(pattern, { flipBackslashes: false });
19013
- }
19014
- pattern$1.getBaseDirectory = getBaseDirectory;
19015
- function hasGlobStar(pattern) {
19016
- return pattern.includes(GLOBSTAR$1);
19017
- }
19018
- pattern$1.hasGlobStar = hasGlobStar;
19019
- function endsWithSlashGlobStar(pattern) {
19020
- return pattern.endsWith('/' + GLOBSTAR$1);
19021
- }
19022
- pattern$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
19023
- function isAffectDepthOfReadingPattern(pattern) {
19024
- const basename = path$f.basename(pattern);
19025
- return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
19026
- }
19027
- pattern$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
19028
- function expandPatternsWithBraceExpansion(patterns) {
19029
- return patterns.reduce((collection, pattern) => {
19030
- return collection.concat(expandBraceExpansion(pattern));
19031
- }, []);
19032
- }
19033
- pattern$1.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
19034
- function expandBraceExpansion(pattern) {
19035
- return micromatch.braces(pattern, {
19036
- expand: true,
19037
- nodupes: true
19038
- });
19039
- }
19040
- pattern$1.expandBraceExpansion = expandBraceExpansion;
19041
- function getPatternParts(pattern, options) {
19042
- let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
19043
- /**
19044
- * The scan method returns an empty array in some cases.
19045
- * See micromatch/picomatch#58 for more details.
19046
- */
19047
- if (parts.length === 0) {
19048
- parts = [pattern];
19049
- }
19050
- /**
19051
- * The scan method does not return an empty part for the pattern with a forward slash.
19052
- * This is another part of micromatch/picomatch#58.
19053
- */
19054
- if (parts[0].startsWith('/')) {
19055
- parts[0] = parts[0].slice(1);
19056
- parts.unshift('');
19057
- }
19058
- return parts;
19059
- }
19060
- pattern$1.getPatternParts = getPatternParts;
19061
- function makeRe(pattern, options) {
19062
- return micromatch.makeRe(pattern, options);
19063
- }
19064
- pattern$1.makeRe = makeRe;
19065
- function convertPatternsToRe(patterns, options) {
19066
- return patterns.map((pattern) => makeRe(pattern, options));
19067
- }
19068
- pattern$1.convertPatternsToRe = convertPatternsToRe;
19069
- function matchAny(entry, patternsRe) {
19070
- return patternsRe.some((patternRe) => patternRe.test(entry));
19071
- }
19035
+ Object.defineProperty(pattern$1, "__esModule", { value: true });
19036
+ pattern$1.removeDuplicateSlashes = pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
19037
+ const path$f = require$$0$4;
19038
+ const globParent$1 = globParent$2;
19039
+ const micromatch = micromatch_1;
19040
+ const GLOBSTAR$1 = '**';
19041
+ const ESCAPE_SYMBOL = '\\';
19042
+ const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
19043
+ const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/;
19044
+ const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
19045
+ const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
19046
+ const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
19047
+ /**
19048
+ * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
19049
+ * The latter is due to the presence of the device path at the beginning of the UNC path.
19050
+ */
19051
+ const DOUBLE_SLASH_RE$1 = /(?!^)\/{2,}/g;
19052
+ function isStaticPattern(pattern, options = {}) {
19053
+ return !isDynamicPattern(pattern, options);
19054
+ }
19055
+ pattern$1.isStaticPattern = isStaticPattern;
19056
+ function isDynamicPattern(pattern, options = {}) {
19057
+ /**
19058
+ * A special case with an empty string is necessary for matching patterns that start with a forward slash.
19059
+ * An empty string cannot be a dynamic pattern.
19060
+ * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
19061
+ */
19062
+ if (pattern === '') {
19063
+ return false;
19064
+ }
19065
+ /**
19066
+ * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
19067
+ * filepath directly (without read directory).
19068
+ */
19069
+ if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {
19070
+ return true;
19071
+ }
19072
+ if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {
19073
+ return true;
19074
+ }
19075
+ if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {
19076
+ return true;
19077
+ }
19078
+ if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {
19079
+ return true;
19080
+ }
19081
+ return false;
19082
+ }
19083
+ pattern$1.isDynamicPattern = isDynamicPattern;
19084
+ function hasBraceExpansion(pattern) {
19085
+ const openingBraceIndex = pattern.indexOf('{');
19086
+ if (openingBraceIndex === -1) {
19087
+ return false;
19088
+ }
19089
+ const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);
19090
+ if (closingBraceIndex === -1) {
19091
+ return false;
19092
+ }
19093
+ const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);
19094
+ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);
19095
+ }
19096
+ function convertToPositivePattern(pattern) {
19097
+ return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
19098
+ }
19099
+ pattern$1.convertToPositivePattern = convertToPositivePattern;
19100
+ function convertToNegativePattern(pattern) {
19101
+ return '!' + pattern;
19102
+ }
19103
+ pattern$1.convertToNegativePattern = convertToNegativePattern;
19104
+ function isNegativePattern(pattern) {
19105
+ return pattern.startsWith('!') && pattern[1] !== '(';
19106
+ }
19107
+ pattern$1.isNegativePattern = isNegativePattern;
19108
+ function isPositivePattern(pattern) {
19109
+ return !isNegativePattern(pattern);
19110
+ }
19111
+ pattern$1.isPositivePattern = isPositivePattern;
19112
+ function getNegativePatterns(patterns) {
19113
+ return patterns.filter(isNegativePattern);
19114
+ }
19115
+ pattern$1.getNegativePatterns = getNegativePatterns;
19116
+ function getPositivePatterns$1(patterns) {
19117
+ return patterns.filter(isPositivePattern);
19118
+ }
19119
+ pattern$1.getPositivePatterns = getPositivePatterns$1;
19120
+ /**
19121
+ * Returns patterns that can be applied inside the current directory.
19122
+ *
19123
+ * @example
19124
+ * // ['./*', '*', 'a/*']
19125
+ * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
19126
+ */
19127
+ function getPatternsInsideCurrentDirectory(patterns) {
19128
+ return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));
19129
+ }
19130
+ pattern$1.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
19131
+ /**
19132
+ * Returns patterns to be expanded relative to (outside) the current directory.
19133
+ *
19134
+ * @example
19135
+ * // ['../*', './../*']
19136
+ * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
19137
+ */
19138
+ function getPatternsOutsideCurrentDirectory(patterns) {
19139
+ return patterns.filter(isPatternRelatedToParentDirectory);
19140
+ }
19141
+ pattern$1.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
19142
+ function isPatternRelatedToParentDirectory(pattern) {
19143
+ return pattern.startsWith('..') || pattern.startsWith('./..');
19144
+ }
19145
+ pattern$1.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
19146
+ function getBaseDirectory(pattern) {
19147
+ return globParent$1(pattern, { flipBackslashes: false });
19148
+ }
19149
+ pattern$1.getBaseDirectory = getBaseDirectory;
19150
+ function hasGlobStar(pattern) {
19151
+ return pattern.includes(GLOBSTAR$1);
19152
+ }
19153
+ pattern$1.hasGlobStar = hasGlobStar;
19154
+ function endsWithSlashGlobStar(pattern) {
19155
+ return pattern.endsWith('/' + GLOBSTAR$1);
19156
+ }
19157
+ pattern$1.endsWithSlashGlobStar = endsWithSlashGlobStar;
19158
+ function isAffectDepthOfReadingPattern(pattern) {
19159
+ const basename = path$f.basename(pattern);
19160
+ return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
19161
+ }
19162
+ pattern$1.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
19163
+ function expandPatternsWithBraceExpansion(patterns) {
19164
+ return patterns.reduce((collection, pattern) => {
19165
+ return collection.concat(expandBraceExpansion(pattern));
19166
+ }, []);
19167
+ }
19168
+ pattern$1.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
19169
+ function expandBraceExpansion(pattern) {
19170
+ const patterns = micromatch.braces(pattern, { expand: true, nodupes: true });
19171
+ /**
19172
+ * Sort the patterns by length so that the same depth patterns are processed side by side.
19173
+ * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`
19174
+ */
19175
+ patterns.sort((a, b) => a.length - b.length);
19176
+ /**
19177
+ * Micromatch can return an empty string in the case of patterns like `{a,}`.
19178
+ */
19179
+ return patterns.filter((pattern) => pattern !== '');
19180
+ }
19181
+ pattern$1.expandBraceExpansion = expandBraceExpansion;
19182
+ function getPatternParts(pattern, options) {
19183
+ let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));
19184
+ /**
19185
+ * The scan method returns an empty array in some cases.
19186
+ * See micromatch/picomatch#58 for more details.
19187
+ */
19188
+ if (parts.length === 0) {
19189
+ parts = [pattern];
19190
+ }
19191
+ /**
19192
+ * The scan method does not return an empty part for the pattern with a forward slash.
19193
+ * This is another part of micromatch/picomatch#58.
19194
+ */
19195
+ if (parts[0].startsWith('/')) {
19196
+ parts[0] = parts[0].slice(1);
19197
+ parts.unshift('');
19198
+ }
19199
+ return parts;
19200
+ }
19201
+ pattern$1.getPatternParts = getPatternParts;
19202
+ function makeRe(pattern, options) {
19203
+ return micromatch.makeRe(pattern, options);
19204
+ }
19205
+ pattern$1.makeRe = makeRe;
19206
+ function convertPatternsToRe(patterns, options) {
19207
+ return patterns.map((pattern) => makeRe(pattern, options));
19208
+ }
19209
+ pattern$1.convertPatternsToRe = convertPatternsToRe;
19210
+ function matchAny(entry, patternsRe) {
19211
+ return patternsRe.some((patternRe) => patternRe.test(entry));
19212
+ }
19072
19213
  pattern$1.matchAny = matchAny;
19214
+ /**
19215
+ * This package only works with forward slashes as a path separator.
19216
+ * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
19217
+ */
19218
+ function removeDuplicateSlashes(pattern) {
19219
+ return pattern.replace(DOUBLE_SLASH_RE$1, '/');
19220
+ }
19221
+ pattern$1.removeDuplicateSlashes = removeDuplicateSlashes;
19073
19222
 
19074
19223
  var stream$4 = {};
19075
19224
 
@@ -19217,156 +19366,163 @@ function pauseStreams (streams, options) {
19217
19366
  return streams
19218
19367
  }
19219
19368
 
19220
- Object.defineProperty(stream$4, "__esModule", { value: true });
19221
- stream$4.merge = void 0;
19222
- const merge2 = merge2_1;
19223
- function merge$1(streams) {
19224
- const mergedStream = merge2(streams);
19225
- streams.forEach((stream) => {
19226
- stream.once('error', (error) => mergedStream.emit('error', error));
19227
- });
19228
- mergedStream.once('close', () => propagateCloseEventToSources(streams));
19229
- mergedStream.once('end', () => propagateCloseEventToSources(streams));
19230
- return mergedStream;
19231
- }
19232
- stream$4.merge = merge$1;
19233
- function propagateCloseEventToSources(streams) {
19234
- streams.forEach((stream) => stream.emit('close'));
19369
+ Object.defineProperty(stream$4, "__esModule", { value: true });
19370
+ stream$4.merge = void 0;
19371
+ const merge2 = merge2_1;
19372
+ function merge$1(streams) {
19373
+ const mergedStream = merge2(streams);
19374
+ streams.forEach((stream) => {
19375
+ stream.once('error', (error) => mergedStream.emit('error', error));
19376
+ });
19377
+ mergedStream.once('close', () => propagateCloseEventToSources(streams));
19378
+ mergedStream.once('end', () => propagateCloseEventToSources(streams));
19379
+ return mergedStream;
19380
+ }
19381
+ stream$4.merge = merge$1;
19382
+ function propagateCloseEventToSources(streams) {
19383
+ streams.forEach((stream) => stream.emit('close'));
19235
19384
  }
19236
19385
 
19237
19386
  var string$2 = {};
19238
19387
 
19239
- Object.defineProperty(string$2, "__esModule", { value: true });
19240
- string$2.isEmpty = string$2.isString = void 0;
19241
- function isString(input) {
19242
- return typeof input === 'string';
19243
- }
19244
- string$2.isString = isString;
19245
- function isEmpty$1(input) {
19246
- return input === '';
19247
- }
19388
+ Object.defineProperty(string$2, "__esModule", { value: true });
19389
+ string$2.isEmpty = string$2.isString = void 0;
19390
+ function isString(input) {
19391
+ return typeof input === 'string';
19392
+ }
19393
+ string$2.isString = isString;
19394
+ function isEmpty$1(input) {
19395
+ return input === '';
19396
+ }
19248
19397
  string$2.isEmpty = isEmpty$1;
19249
19398
 
19250
- Object.defineProperty(utils$g, "__esModule", { value: true });
19251
- utils$g.string = utils$g.stream = utils$g.pattern = utils$g.path = utils$g.fs = utils$g.errno = utils$g.array = void 0;
19252
- const array = array$1;
19253
- utils$g.array = array;
19254
- const errno = errno$1;
19255
- utils$g.errno = errno;
19256
- const fs$g = fs$h;
19257
- utils$g.fs = fs$g;
19258
- const path$e = path$h;
19259
- utils$g.path = path$e;
19260
- const pattern = pattern$1;
19261
- utils$g.pattern = pattern;
19262
- const stream$3 = stream$4;
19263
- utils$g.stream = stream$3;
19264
- const string$1 = string$2;
19399
+ Object.defineProperty(utils$g, "__esModule", { value: true });
19400
+ utils$g.string = utils$g.stream = utils$g.pattern = utils$g.path = utils$g.fs = utils$g.errno = utils$g.array = void 0;
19401
+ const array = array$1;
19402
+ utils$g.array = array;
19403
+ const errno = errno$1;
19404
+ utils$g.errno = errno;
19405
+ const fs$g = fs$h;
19406
+ utils$g.fs = fs$g;
19407
+ const path$e = path$h;
19408
+ utils$g.path = path$e;
19409
+ const pattern = pattern$1;
19410
+ utils$g.pattern = pattern;
19411
+ const stream$3 = stream$4;
19412
+ utils$g.stream = stream$3;
19413
+ const string$1 = string$2;
19265
19414
  utils$g.string = string$1;
19266
19415
 
19267
- Object.defineProperty(tasks, "__esModule", { value: true });
19268
- tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
19269
- const utils$a = utils$g;
19270
- function generate(patterns, settings) {
19271
- const positivePatterns = getPositivePatterns(patterns);
19272
- const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
19273
- const staticPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isStaticPattern(pattern, settings));
19274
- const dynamicPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isDynamicPattern(pattern, settings));
19275
- const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
19276
- const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
19277
- return staticTasks.concat(dynamicTasks);
19278
- }
19279
- tasks.generate = generate;
19280
- /**
19281
- * Returns tasks grouped by basic pattern directories.
19282
- *
19283
- * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
19284
- * This is necessary because directory traversal starts at the base directory and goes deeper.
19285
- */
19286
- function convertPatternsToTasks(positive, negative, dynamic) {
19287
- const tasks = [];
19288
- const patternsOutsideCurrentDirectory = utils$a.pattern.getPatternsOutsideCurrentDirectory(positive);
19289
- const patternsInsideCurrentDirectory = utils$a.pattern.getPatternsInsideCurrentDirectory(positive);
19290
- const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
19291
- const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
19292
- tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
19293
- /*
19294
- * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
19295
- * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
19296
- */
19297
- if ('.' in insideCurrentDirectoryGroup) {
19298
- tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
19299
- }
19300
- else {
19301
- tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
19302
- }
19303
- return tasks;
19304
- }
19305
- tasks.convertPatternsToTasks = convertPatternsToTasks;
19306
- function getPositivePatterns(patterns) {
19307
- return utils$a.pattern.getPositivePatterns(patterns);
19308
- }
19309
- tasks.getPositivePatterns = getPositivePatterns;
19310
- function getNegativePatternsAsPositive(patterns, ignore) {
19311
- const negative = utils$a.pattern.getNegativePatterns(patterns).concat(ignore);
19312
- const positive = negative.map(utils$a.pattern.convertToPositivePattern);
19313
- return positive;
19314
- }
19315
- tasks.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
19316
- function groupPatternsByBaseDirectory(patterns) {
19317
- const group = {};
19318
- return patterns.reduce((collection, pattern) => {
19319
- const base = utils$a.pattern.getBaseDirectory(pattern);
19320
- if (base in collection) {
19321
- collection[base].push(pattern);
19322
- }
19323
- else {
19324
- collection[base] = [pattern];
19325
- }
19326
- return collection;
19327
- }, group);
19328
- }
19329
- tasks.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
19330
- function convertPatternGroupsToTasks(positive, negative, dynamic) {
19331
- return Object.keys(positive).map((base) => {
19332
- return convertPatternGroupToTask(base, positive[base], negative, dynamic);
19333
- });
19334
- }
19335
- tasks.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
19336
- function convertPatternGroupToTask(base, positive, negative, dynamic) {
19337
- return {
19338
- dynamic,
19339
- positive,
19340
- negative,
19341
- base,
19342
- patterns: [].concat(positive, negative.map(utils$a.pattern.convertToNegativePattern))
19343
- };
19344
- }
19416
+ Object.defineProperty(tasks, "__esModule", { value: true });
19417
+ tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
19418
+ const utils$a = utils$g;
19419
+ function generate(input, settings) {
19420
+ const patterns = processPatterns(input, settings);
19421
+ const ignore = processPatterns(settings.ignore, settings);
19422
+ const positivePatterns = getPositivePatterns(patterns);
19423
+ const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
19424
+ const staticPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isStaticPattern(pattern, settings));
19425
+ const dynamicPatterns = positivePatterns.filter((pattern) => utils$a.pattern.isDynamicPattern(pattern, settings));
19426
+ const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
19427
+ const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
19428
+ return staticTasks.concat(dynamicTasks);
19429
+ }
19430
+ tasks.generate = generate;
19431
+ function processPatterns(input, settings) {
19432
+ let patterns = input;
19433
+ /**
19434
+ * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry
19435
+ * and some problems with the micromatch package (see fast-glob issues: #365, #394).
19436
+ *
19437
+ * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown
19438
+ * in matching in the case of a large set of patterns after expansion.
19439
+ */
19440
+ if (settings.braceExpansion) {
19441
+ patterns = utils$a.pattern.expandPatternsWithBraceExpansion(patterns);
19442
+ }
19443
+ /**
19444
+ * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used
19445
+ * at any nesting level.
19446
+ *
19447
+ * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change
19448
+ * the pattern in the filter before creating a regular expression. There is no need to change the patterns
19449
+ * in the application. Only on the input.
19450
+ */
19451
+ if (settings.baseNameMatch) {
19452
+ patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);
19453
+ }
19454
+ /**
19455
+ * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.
19456
+ */
19457
+ return patterns.map((pattern) => utils$a.pattern.removeDuplicateSlashes(pattern));
19458
+ }
19459
+ /**
19460
+ * Returns tasks grouped by basic pattern directories.
19461
+ *
19462
+ * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
19463
+ * This is necessary because directory traversal starts at the base directory and goes deeper.
19464
+ */
19465
+ function convertPatternsToTasks(positive, negative, dynamic) {
19466
+ const tasks = [];
19467
+ const patternsOutsideCurrentDirectory = utils$a.pattern.getPatternsOutsideCurrentDirectory(positive);
19468
+ const patternsInsideCurrentDirectory = utils$a.pattern.getPatternsInsideCurrentDirectory(positive);
19469
+ const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
19470
+ const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
19471
+ tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
19472
+ /*
19473
+ * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
19474
+ * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
19475
+ */
19476
+ if ('.' in insideCurrentDirectoryGroup) {
19477
+ tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
19478
+ }
19479
+ else {
19480
+ tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
19481
+ }
19482
+ return tasks;
19483
+ }
19484
+ tasks.convertPatternsToTasks = convertPatternsToTasks;
19485
+ function getPositivePatterns(patterns) {
19486
+ return utils$a.pattern.getPositivePatterns(patterns);
19487
+ }
19488
+ tasks.getPositivePatterns = getPositivePatterns;
19489
+ function getNegativePatternsAsPositive(patterns, ignore) {
19490
+ const negative = utils$a.pattern.getNegativePatterns(patterns).concat(ignore);
19491
+ const positive = negative.map(utils$a.pattern.convertToPositivePattern);
19492
+ return positive;
19493
+ }
19494
+ tasks.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
19495
+ function groupPatternsByBaseDirectory(patterns) {
19496
+ const group = {};
19497
+ return patterns.reduce((collection, pattern) => {
19498
+ const base = utils$a.pattern.getBaseDirectory(pattern);
19499
+ if (base in collection) {
19500
+ collection[base].push(pattern);
19501
+ }
19502
+ else {
19503
+ collection[base] = [pattern];
19504
+ }
19505
+ return collection;
19506
+ }, group);
19507
+ }
19508
+ tasks.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
19509
+ function convertPatternGroupsToTasks(positive, negative, dynamic) {
19510
+ return Object.keys(positive).map((base) => {
19511
+ return convertPatternGroupToTask(base, positive[base], negative, dynamic);
19512
+ });
19513
+ }
19514
+ tasks.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
19515
+ function convertPatternGroupToTask(base, positive, negative, dynamic) {
19516
+ return {
19517
+ dynamic,
19518
+ positive,
19519
+ negative,
19520
+ base,
19521
+ patterns: [].concat(positive, negative.map(utils$a.pattern.convertToNegativePattern))
19522
+ };
19523
+ }
19345
19524
  tasks.convertPatternGroupToTask = convertPatternGroupToTask;
19346
19525
 
19347
- var patterns = {};
19348
-
19349
- Object.defineProperty(patterns, "__esModule", { value: true });
19350
- patterns.removeDuplicateSlashes = patterns.transform = void 0;
19351
- /**
19352
- * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
19353
- * The latter is due to the presence of the device path at the beginning of the UNC path.
19354
- * @todo rewrite to negative lookbehind with the next major release.
19355
- */
19356
- const DOUBLE_SLASH_RE$1 = /(?!^)\/{2,}/g;
19357
- function transform(patterns) {
19358
- return patterns.map((pattern) => removeDuplicateSlashes(pattern));
19359
- }
19360
- patterns.transform = transform;
19361
- /**
19362
- * This package only works with forward slashes as a path separator.
19363
- * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
19364
- */
19365
- function removeDuplicateSlashes(pattern) {
19366
- return pattern.replace(DOUBLE_SLASH_RE$1, '/');
19367
- }
19368
- patterns.removeDuplicateSlashes = removeDuplicateSlashes;
19369
-
19370
19526
  var async$7 = {};
19371
19527
 
19372
19528
  var async$6 = {};
@@ -20540,129 +20696,129 @@ function getSettings(settingsOrOptions = {}) {
20540
20696
 
20541
20697
  var reader = {};
20542
20698
 
20543
- Object.defineProperty(reader, "__esModule", { value: true });
20544
- const path$b = require$$0$4;
20545
- const fsStat$2 = out$1;
20546
- const utils$6 = utils$g;
20547
- class Reader {
20548
- constructor(_settings) {
20549
- this._settings = _settings;
20550
- this._fsStatSettings = new fsStat$2.Settings({
20551
- followSymbolicLink: this._settings.followSymbolicLinks,
20552
- fs: this._settings.fs,
20553
- throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
20554
- });
20555
- }
20556
- _getFullEntryPath(filepath) {
20557
- return path$b.resolve(this._settings.cwd, filepath);
20558
- }
20559
- _makeEntry(stats, pattern) {
20560
- const entry = {
20561
- name: pattern,
20562
- path: pattern,
20563
- dirent: utils$6.fs.createDirentFromStats(pattern, stats)
20564
- };
20565
- if (this._settings.stats) {
20566
- entry.stats = stats;
20567
- }
20568
- return entry;
20569
- }
20570
- _isFatalError(error) {
20571
- return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
20572
- }
20573
- }
20699
+ Object.defineProperty(reader, "__esModule", { value: true });
20700
+ const path$b = require$$0$4;
20701
+ const fsStat$2 = out$1;
20702
+ const utils$6 = utils$g;
20703
+ class Reader {
20704
+ constructor(_settings) {
20705
+ this._settings = _settings;
20706
+ this._fsStatSettings = new fsStat$2.Settings({
20707
+ followSymbolicLink: this._settings.followSymbolicLinks,
20708
+ fs: this._settings.fs,
20709
+ throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
20710
+ });
20711
+ }
20712
+ _getFullEntryPath(filepath) {
20713
+ return path$b.resolve(this._settings.cwd, filepath);
20714
+ }
20715
+ _makeEntry(stats, pattern) {
20716
+ const entry = {
20717
+ name: pattern,
20718
+ path: pattern,
20719
+ dirent: utils$6.fs.createDirentFromStats(pattern, stats)
20720
+ };
20721
+ if (this._settings.stats) {
20722
+ entry.stats = stats;
20723
+ }
20724
+ return entry;
20725
+ }
20726
+ _isFatalError(error) {
20727
+ return !utils$6.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
20728
+ }
20729
+ }
20574
20730
  reader.default = Reader;
20575
20731
 
20576
20732
  var stream$1 = {};
20577
20733
 
20578
- Object.defineProperty(stream$1, "__esModule", { value: true });
20579
- const stream_1$3 = require$$0$7;
20580
- const fsStat$1 = out$1;
20581
- const fsWalk$2 = out$3;
20582
- const reader_1$2 = reader;
20583
- class ReaderStream extends reader_1$2.default {
20584
- constructor() {
20585
- super(...arguments);
20586
- this._walkStream = fsWalk$2.walkStream;
20587
- this._stat = fsStat$1.stat;
20588
- }
20589
- dynamic(root, options) {
20590
- return this._walkStream(root, options);
20591
- }
20592
- static(patterns, options) {
20593
- const filepaths = patterns.map(this._getFullEntryPath, this);
20594
- const stream = new stream_1$3.PassThrough({ objectMode: true });
20595
- stream._write = (index, _enc, done) => {
20596
- return this._getEntry(filepaths[index], patterns[index], options)
20597
- .then((entry) => {
20598
- if (entry !== null && options.entryFilter(entry)) {
20599
- stream.push(entry);
20600
- }
20601
- if (index === filepaths.length - 1) {
20602
- stream.end();
20603
- }
20604
- done();
20605
- })
20606
- .catch(done);
20607
- };
20608
- for (let i = 0; i < filepaths.length; i++) {
20609
- stream.write(i);
20610
- }
20611
- return stream;
20612
- }
20613
- _getEntry(filepath, pattern, options) {
20614
- return this._getStat(filepath)
20615
- .then((stats) => this._makeEntry(stats, pattern))
20616
- .catch((error) => {
20617
- if (options.errorFilter(error)) {
20618
- return null;
20619
- }
20620
- throw error;
20621
- });
20622
- }
20623
- _getStat(filepath) {
20624
- return new Promise((resolve, reject) => {
20625
- this._stat(filepath, this._fsStatSettings, (error, stats) => {
20626
- return error === null ? resolve(stats) : reject(error);
20627
- });
20628
- });
20629
- }
20630
- }
20734
+ Object.defineProperty(stream$1, "__esModule", { value: true });
20735
+ const stream_1$3 = require$$0$7;
20736
+ const fsStat$1 = out$1;
20737
+ const fsWalk$2 = out$3;
20738
+ const reader_1$2 = reader;
20739
+ class ReaderStream extends reader_1$2.default {
20740
+ constructor() {
20741
+ super(...arguments);
20742
+ this._walkStream = fsWalk$2.walkStream;
20743
+ this._stat = fsStat$1.stat;
20744
+ }
20745
+ dynamic(root, options) {
20746
+ return this._walkStream(root, options);
20747
+ }
20748
+ static(patterns, options) {
20749
+ const filepaths = patterns.map(this._getFullEntryPath, this);
20750
+ const stream = new stream_1$3.PassThrough({ objectMode: true });
20751
+ stream._write = (index, _enc, done) => {
20752
+ return this._getEntry(filepaths[index], patterns[index], options)
20753
+ .then((entry) => {
20754
+ if (entry !== null && options.entryFilter(entry)) {
20755
+ stream.push(entry);
20756
+ }
20757
+ if (index === filepaths.length - 1) {
20758
+ stream.end();
20759
+ }
20760
+ done();
20761
+ })
20762
+ .catch(done);
20763
+ };
20764
+ for (let i = 0; i < filepaths.length; i++) {
20765
+ stream.write(i);
20766
+ }
20767
+ return stream;
20768
+ }
20769
+ _getEntry(filepath, pattern, options) {
20770
+ return this._getStat(filepath)
20771
+ .then((stats) => this._makeEntry(stats, pattern))
20772
+ .catch((error) => {
20773
+ if (options.errorFilter(error)) {
20774
+ return null;
20775
+ }
20776
+ throw error;
20777
+ });
20778
+ }
20779
+ _getStat(filepath) {
20780
+ return new Promise((resolve, reject) => {
20781
+ this._stat(filepath, this._fsStatSettings, (error, stats) => {
20782
+ return error === null ? resolve(stats) : reject(error);
20783
+ });
20784
+ });
20785
+ }
20786
+ }
20631
20787
  stream$1.default = ReaderStream;
20632
20788
 
20633
- Object.defineProperty(async$6, "__esModule", { value: true });
20634
- const fsWalk$1 = out$3;
20635
- const reader_1$1 = reader;
20636
- const stream_1$2 = stream$1;
20637
- class ReaderAsync extends reader_1$1.default {
20638
- constructor() {
20639
- super(...arguments);
20640
- this._walkAsync = fsWalk$1.walk;
20641
- this._readerStream = new stream_1$2.default(this._settings);
20642
- }
20643
- dynamic(root, options) {
20644
- return new Promise((resolve, reject) => {
20645
- this._walkAsync(root, options, (error, entries) => {
20646
- if (error === null) {
20647
- resolve(entries);
20648
- }
20649
- else {
20650
- reject(error);
20651
- }
20652
- });
20653
- });
20654
- }
20655
- async static(patterns, options) {
20656
- const entries = [];
20657
- const stream = this._readerStream.static(patterns, options);
20658
- // After #235, replace it with an asynchronous iterator.
20659
- return new Promise((resolve, reject) => {
20660
- stream.once('error', reject);
20661
- stream.on('data', (entry) => entries.push(entry));
20662
- stream.once('end', () => resolve(entries));
20663
- });
20664
- }
20665
- }
20789
+ Object.defineProperty(async$6, "__esModule", { value: true });
20790
+ const fsWalk$1 = out$3;
20791
+ const reader_1$1 = reader;
20792
+ const stream_1$2 = stream$1;
20793
+ class ReaderAsync extends reader_1$1.default {
20794
+ constructor() {
20795
+ super(...arguments);
20796
+ this._walkAsync = fsWalk$1.walk;
20797
+ this._readerStream = new stream_1$2.default(this._settings);
20798
+ }
20799
+ dynamic(root, options) {
20800
+ return new Promise((resolve, reject) => {
20801
+ this._walkAsync(root, options, (error, entries) => {
20802
+ if (error === null) {
20803
+ resolve(entries);
20804
+ }
20805
+ else {
20806
+ reject(error);
20807
+ }
20808
+ });
20809
+ });
20810
+ }
20811
+ async static(patterns, options) {
20812
+ const entries = [];
20813
+ const stream = this._readerStream.static(patterns, options);
20814
+ // After #235, replace it with an asynchronous iterator.
20815
+ return new Promise((resolve, reject) => {
20816
+ stream.once('error', reject);
20817
+ stream.on('data', (entry) => entries.push(entry));
20818
+ stream.once('end', () => resolve(entries));
20819
+ });
20820
+ }
20821
+ }
20666
20822
  async$6.default = ReaderAsync;
20667
20823
 
20668
20824
  var provider = {};
@@ -20673,568 +20829,594 @@ var partial = {};
20673
20829
 
20674
20830
  var matcher = {};
20675
20831
 
20676
- Object.defineProperty(matcher, "__esModule", { value: true });
20677
- const utils$5 = utils$g;
20678
- class Matcher {
20679
- constructor(_patterns, _settings, _micromatchOptions) {
20680
- this._patterns = _patterns;
20681
- this._settings = _settings;
20682
- this._micromatchOptions = _micromatchOptions;
20683
- this._storage = [];
20684
- this._fillStorage();
20685
- }
20686
- _fillStorage() {
20687
- /**
20688
- * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
20689
- * So, before expand patterns with brace expansion into separated patterns.
20690
- */
20691
- const patterns = utils$5.pattern.expandPatternsWithBraceExpansion(this._patterns);
20692
- for (const pattern of patterns) {
20693
- const segments = this._getPatternSegments(pattern);
20694
- const sections = this._splitSegmentsIntoSections(segments);
20695
- this._storage.push({
20696
- complete: sections.length <= 1,
20697
- pattern,
20698
- segments,
20699
- sections
20700
- });
20701
- }
20702
- }
20703
- _getPatternSegments(pattern) {
20704
- const parts = utils$5.pattern.getPatternParts(pattern, this._micromatchOptions);
20705
- return parts.map((part) => {
20706
- const dynamic = utils$5.pattern.isDynamicPattern(part, this._settings);
20707
- if (!dynamic) {
20708
- return {
20709
- dynamic: false,
20710
- pattern: part
20711
- };
20712
- }
20713
- return {
20714
- dynamic: true,
20715
- pattern: part,
20716
- patternRe: utils$5.pattern.makeRe(part, this._micromatchOptions)
20717
- };
20718
- });
20719
- }
20720
- _splitSegmentsIntoSections(segments) {
20721
- return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
20722
- }
20723
- }
20832
+ Object.defineProperty(matcher, "__esModule", { value: true });
20833
+ const utils$5 = utils$g;
20834
+ class Matcher {
20835
+ constructor(_patterns, _settings, _micromatchOptions) {
20836
+ this._patterns = _patterns;
20837
+ this._settings = _settings;
20838
+ this._micromatchOptions = _micromatchOptions;
20839
+ this._storage = [];
20840
+ this._fillStorage();
20841
+ }
20842
+ _fillStorage() {
20843
+ for (const pattern of this._patterns) {
20844
+ const segments = this._getPatternSegments(pattern);
20845
+ const sections = this._splitSegmentsIntoSections(segments);
20846
+ this._storage.push({
20847
+ complete: sections.length <= 1,
20848
+ pattern,
20849
+ segments,
20850
+ sections
20851
+ });
20852
+ }
20853
+ }
20854
+ _getPatternSegments(pattern) {
20855
+ const parts = utils$5.pattern.getPatternParts(pattern, this._micromatchOptions);
20856
+ return parts.map((part) => {
20857
+ const dynamic = utils$5.pattern.isDynamicPattern(part, this._settings);
20858
+ if (!dynamic) {
20859
+ return {
20860
+ dynamic: false,
20861
+ pattern: part
20862
+ };
20863
+ }
20864
+ return {
20865
+ dynamic: true,
20866
+ pattern: part,
20867
+ patternRe: utils$5.pattern.makeRe(part, this._micromatchOptions)
20868
+ };
20869
+ });
20870
+ }
20871
+ _splitSegmentsIntoSections(segments) {
20872
+ return utils$5.array.splitWhen(segments, (segment) => segment.dynamic && utils$5.pattern.hasGlobStar(segment.pattern));
20873
+ }
20874
+ }
20724
20875
  matcher.default = Matcher;
20725
20876
 
20726
- Object.defineProperty(partial, "__esModule", { value: true });
20727
- const matcher_1 = matcher;
20728
- class PartialMatcher extends matcher_1.default {
20729
- match(filepath) {
20730
- const parts = filepath.split('/');
20731
- const levels = parts.length;
20732
- const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
20733
- for (const pattern of patterns) {
20734
- const section = pattern.sections[0];
20735
- /**
20736
- * In this case, the pattern has a globstar and we must read all directories unconditionally,
20737
- * but only if the level has reached the end of the first group.
20738
- *
20739
- * fixtures/{a,b}/**
20740
- * ^ true/false ^ always true
20741
- */
20742
- if (!pattern.complete && levels > section.length) {
20743
- return true;
20744
- }
20745
- const match = parts.every((part, index) => {
20746
- const segment = pattern.segments[index];
20747
- if (segment.dynamic && segment.patternRe.test(part)) {
20748
- return true;
20749
- }
20750
- if (!segment.dynamic && segment.pattern === part) {
20751
- return true;
20752
- }
20753
- return false;
20754
- });
20755
- if (match) {
20756
- return true;
20757
- }
20758
- }
20759
- return false;
20760
- }
20761
- }
20877
+ Object.defineProperty(partial, "__esModule", { value: true });
20878
+ const matcher_1 = matcher;
20879
+ class PartialMatcher extends matcher_1.default {
20880
+ match(filepath) {
20881
+ const parts = filepath.split('/');
20882
+ const levels = parts.length;
20883
+ const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
20884
+ for (const pattern of patterns) {
20885
+ const section = pattern.sections[0];
20886
+ /**
20887
+ * In this case, the pattern has a globstar and we must read all directories unconditionally,
20888
+ * but only if the level has reached the end of the first group.
20889
+ *
20890
+ * fixtures/{a,b}/**
20891
+ * ^ true/false ^ always true
20892
+ */
20893
+ if (!pattern.complete && levels > section.length) {
20894
+ return true;
20895
+ }
20896
+ const match = parts.every((part, index) => {
20897
+ const segment = pattern.segments[index];
20898
+ if (segment.dynamic && segment.patternRe.test(part)) {
20899
+ return true;
20900
+ }
20901
+ if (!segment.dynamic && segment.pattern === part) {
20902
+ return true;
20903
+ }
20904
+ return false;
20905
+ });
20906
+ if (match) {
20907
+ return true;
20908
+ }
20909
+ }
20910
+ return false;
20911
+ }
20912
+ }
20762
20913
  partial.default = PartialMatcher;
20763
20914
 
20764
- Object.defineProperty(deep, "__esModule", { value: true });
20765
- const utils$4 = utils$g;
20766
- const partial_1 = partial;
20767
- class DeepFilter {
20768
- constructor(_settings, _micromatchOptions) {
20769
- this._settings = _settings;
20770
- this._micromatchOptions = _micromatchOptions;
20771
- }
20772
- getFilter(basePath, positive, negative) {
20773
- const matcher = this._getMatcher(positive);
20774
- const negativeRe = this._getNegativePatternsRe(negative);
20775
- return (entry) => this._filter(basePath, entry, matcher, negativeRe);
20776
- }
20777
- _getMatcher(patterns) {
20778
- return new partial_1.default(patterns, this._settings, this._micromatchOptions);
20779
- }
20780
- _getNegativePatternsRe(patterns) {
20781
- const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
20782
- return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
20783
- }
20784
- _filter(basePath, entry, matcher, negativeRe) {
20785
- if (this._isSkippedByDeep(basePath, entry.path)) {
20786
- return false;
20787
- }
20788
- if (this._isSkippedSymbolicLink(entry)) {
20789
- return false;
20790
- }
20791
- const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
20792
- if (this._isSkippedByPositivePatterns(filepath, matcher)) {
20793
- return false;
20794
- }
20795
- return this._isSkippedByNegativePatterns(filepath, negativeRe);
20796
- }
20797
- _isSkippedByDeep(basePath, entryPath) {
20798
- /**
20799
- * Avoid unnecessary depth calculations when it doesn't matter.
20800
- */
20801
- if (this._settings.deep === Infinity) {
20802
- return false;
20803
- }
20804
- return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
20805
- }
20806
- _getEntryLevel(basePath, entryPath) {
20807
- const entryPathDepth = entryPath.split('/').length;
20808
- if (basePath === '') {
20809
- return entryPathDepth;
20810
- }
20811
- const basePathDepth = basePath.split('/').length;
20812
- return entryPathDepth - basePathDepth;
20813
- }
20814
- _isSkippedSymbolicLink(entry) {
20815
- return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
20816
- }
20817
- _isSkippedByPositivePatterns(entryPath, matcher) {
20818
- return !this._settings.baseNameMatch && !matcher.match(entryPath);
20819
- }
20820
- _isSkippedByNegativePatterns(entryPath, patternsRe) {
20821
- return !utils$4.pattern.matchAny(entryPath, patternsRe);
20822
- }
20823
- }
20915
+ Object.defineProperty(deep, "__esModule", { value: true });
20916
+ const utils$4 = utils$g;
20917
+ const partial_1 = partial;
20918
+ class DeepFilter {
20919
+ constructor(_settings, _micromatchOptions) {
20920
+ this._settings = _settings;
20921
+ this._micromatchOptions = _micromatchOptions;
20922
+ }
20923
+ getFilter(basePath, positive, negative) {
20924
+ const matcher = this._getMatcher(positive);
20925
+ const negativeRe = this._getNegativePatternsRe(negative);
20926
+ return (entry) => this._filter(basePath, entry, matcher, negativeRe);
20927
+ }
20928
+ _getMatcher(patterns) {
20929
+ return new partial_1.default(patterns, this._settings, this._micromatchOptions);
20930
+ }
20931
+ _getNegativePatternsRe(patterns) {
20932
+ const affectDepthOfReadingPatterns = patterns.filter(utils$4.pattern.isAffectDepthOfReadingPattern);
20933
+ return utils$4.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
20934
+ }
20935
+ _filter(basePath, entry, matcher, negativeRe) {
20936
+ if (this._isSkippedByDeep(basePath, entry.path)) {
20937
+ return false;
20938
+ }
20939
+ if (this._isSkippedSymbolicLink(entry)) {
20940
+ return false;
20941
+ }
20942
+ const filepath = utils$4.path.removeLeadingDotSegment(entry.path);
20943
+ if (this._isSkippedByPositivePatterns(filepath, matcher)) {
20944
+ return false;
20945
+ }
20946
+ return this._isSkippedByNegativePatterns(filepath, negativeRe);
20947
+ }
20948
+ _isSkippedByDeep(basePath, entryPath) {
20949
+ /**
20950
+ * Avoid unnecessary depth calculations when it doesn't matter.
20951
+ */
20952
+ if (this._settings.deep === Infinity) {
20953
+ return false;
20954
+ }
20955
+ return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
20956
+ }
20957
+ _getEntryLevel(basePath, entryPath) {
20958
+ const entryPathDepth = entryPath.split('/').length;
20959
+ if (basePath === '') {
20960
+ return entryPathDepth;
20961
+ }
20962
+ const basePathDepth = basePath.split('/').length;
20963
+ return entryPathDepth - basePathDepth;
20964
+ }
20965
+ _isSkippedSymbolicLink(entry) {
20966
+ return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
20967
+ }
20968
+ _isSkippedByPositivePatterns(entryPath, matcher) {
20969
+ return !this._settings.baseNameMatch && !matcher.match(entryPath);
20970
+ }
20971
+ _isSkippedByNegativePatterns(entryPath, patternsRe) {
20972
+ return !utils$4.pattern.matchAny(entryPath, patternsRe);
20973
+ }
20974
+ }
20824
20975
  deep.default = DeepFilter;
20825
20976
 
20826
20977
  var entry$1 = {};
20827
20978
 
20828
- Object.defineProperty(entry$1, "__esModule", { value: true });
20829
- const utils$3 = utils$g;
20830
- class EntryFilter {
20831
- constructor(_settings, _micromatchOptions) {
20832
- this._settings = _settings;
20833
- this._micromatchOptions = _micromatchOptions;
20834
- this.index = new Map();
20835
- }
20836
- getFilter(positive, negative) {
20837
- const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
20838
- const negativeRe = utils$3.pattern.convertPatternsToRe(negative, this._micromatchOptions);
20839
- return (entry) => this._filter(entry, positiveRe, negativeRe);
20840
- }
20841
- _filter(entry, positiveRe, negativeRe) {
20842
- if (this._settings.unique && this._isDuplicateEntry(entry)) {
20843
- return false;
20844
- }
20845
- if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
20846
- return false;
20847
- }
20848
- if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) {
20849
- return false;
20850
- }
20851
- const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
20852
- const isDirectory = entry.dirent.isDirectory();
20853
- const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(entry.path, negativeRe, isDirectory);
20854
- if (this._settings.unique && isMatched) {
20855
- this._createIndexRecord(entry);
20856
- }
20857
- return isMatched;
20858
- }
20859
- _isDuplicateEntry(entry) {
20860
- return this.index.has(entry.path);
20861
- }
20862
- _createIndexRecord(entry) {
20863
- this.index.set(entry.path, undefined);
20864
- }
20865
- _onlyFileFilter(entry) {
20866
- return this._settings.onlyFiles && !entry.dirent.isFile();
20867
- }
20868
- _onlyDirectoryFilter(entry) {
20869
- return this._settings.onlyDirectories && !entry.dirent.isDirectory();
20870
- }
20871
- _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
20872
- if (!this._settings.absolute) {
20873
- return false;
20874
- }
20875
- const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
20876
- return utils$3.pattern.matchAny(fullpath, patternsRe);
20877
- }
20878
- _isMatchToPatterns(entryPath, patternsRe, isDirectory) {
20879
- const filepath = utils$3.path.removeLeadingDotSegment(entryPath);
20880
- // Trying to match files and directories by patterns.
20881
- const isMatched = utils$3.pattern.matchAny(filepath, patternsRe);
20882
- // A pattern with a trailling slash can be used for directory matching.
20883
- // To apply such pattern, we need to add a tralling slash to the path.
20884
- if (!isMatched && isDirectory) {
20885
- return utils$3.pattern.matchAny(filepath + '/', patternsRe);
20886
- }
20887
- return isMatched;
20888
- }
20889
- }
20979
+ Object.defineProperty(entry$1, "__esModule", { value: true });
20980
+ const utils$3 = utils$g;
20981
+ class EntryFilter {
20982
+ constructor(_settings, _micromatchOptions) {
20983
+ this._settings = _settings;
20984
+ this._micromatchOptions = _micromatchOptions;
20985
+ this.index = new Map();
20986
+ }
20987
+ getFilter(positive, negative) {
20988
+ const positiveRe = utils$3.pattern.convertPatternsToRe(positive, this._micromatchOptions);
20989
+ const negativeRe = utils$3.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
20990
+ return (entry) => this._filter(entry, positiveRe, negativeRe);
20991
+ }
20992
+ _filter(entry, positiveRe, negativeRe) {
20993
+ const filepath = utils$3.path.removeLeadingDotSegment(entry.path);
20994
+ if (this._settings.unique && this._isDuplicateEntry(filepath)) {
20995
+ return false;
20996
+ }
20997
+ if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
20998
+ return false;
20999
+ }
21000
+ if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
21001
+ return false;
21002
+ }
21003
+ const isDirectory = entry.dirent.isDirectory();
21004
+ const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
21005
+ if (this._settings.unique && isMatched) {
21006
+ this._createIndexRecord(filepath);
21007
+ }
21008
+ return isMatched;
21009
+ }
21010
+ _isDuplicateEntry(filepath) {
21011
+ return this.index.has(filepath);
21012
+ }
21013
+ _createIndexRecord(filepath) {
21014
+ this.index.set(filepath, undefined);
21015
+ }
21016
+ _onlyFileFilter(entry) {
21017
+ return this._settings.onlyFiles && !entry.dirent.isFile();
21018
+ }
21019
+ _onlyDirectoryFilter(entry) {
21020
+ return this._settings.onlyDirectories && !entry.dirent.isDirectory();
21021
+ }
21022
+ _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
21023
+ if (!this._settings.absolute) {
21024
+ return false;
21025
+ }
21026
+ const fullpath = utils$3.path.makeAbsolute(this._settings.cwd, entryPath);
21027
+ return utils$3.pattern.matchAny(fullpath, patternsRe);
21028
+ }
21029
+ _isMatchToPatterns(filepath, patternsRe, isDirectory) {
21030
+ // Trying to match files and directories by patterns.
21031
+ const isMatched = utils$3.pattern.matchAny(filepath, patternsRe);
21032
+ // A pattern with a trailling slash can be used for directory matching.
21033
+ // To apply such pattern, we need to add a tralling slash to the path.
21034
+ if (!isMatched && isDirectory) {
21035
+ return utils$3.pattern.matchAny(filepath + '/', patternsRe);
21036
+ }
21037
+ return isMatched;
21038
+ }
21039
+ }
20890
21040
  entry$1.default = EntryFilter;
20891
21041
 
20892
21042
  var error$2 = {};
20893
21043
 
20894
- Object.defineProperty(error$2, "__esModule", { value: true });
20895
- const utils$2 = utils$g;
20896
- class ErrorFilter {
20897
- constructor(_settings) {
20898
- this._settings = _settings;
20899
- }
20900
- getFilter() {
20901
- return (error) => this._isNonFatalError(error);
20902
- }
20903
- _isNonFatalError(error) {
20904
- return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
20905
- }
20906
- }
21044
+ Object.defineProperty(error$2, "__esModule", { value: true });
21045
+ const utils$2 = utils$g;
21046
+ class ErrorFilter {
21047
+ constructor(_settings) {
21048
+ this._settings = _settings;
21049
+ }
21050
+ getFilter() {
21051
+ return (error) => this._isNonFatalError(error);
21052
+ }
21053
+ _isNonFatalError(error) {
21054
+ return utils$2.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
21055
+ }
21056
+ }
20907
21057
  error$2.default = ErrorFilter;
20908
21058
 
20909
21059
  var entry = {};
20910
21060
 
20911
- Object.defineProperty(entry, "__esModule", { value: true });
20912
- const utils$1 = utils$g;
20913
- class EntryTransformer {
20914
- constructor(_settings) {
20915
- this._settings = _settings;
20916
- }
20917
- getTransformer() {
20918
- return (entry) => this._transform(entry);
20919
- }
20920
- _transform(entry) {
20921
- let filepath = entry.path;
20922
- if (this._settings.absolute) {
20923
- filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
20924
- filepath = utils$1.path.unixify(filepath);
20925
- }
20926
- if (this._settings.markDirectories && entry.dirent.isDirectory()) {
20927
- filepath += '/';
20928
- }
20929
- if (!this._settings.objectMode) {
20930
- return filepath;
20931
- }
20932
- return Object.assign(Object.assign({}, entry), { path: filepath });
20933
- }
20934
- }
21061
+ Object.defineProperty(entry, "__esModule", { value: true });
21062
+ const utils$1 = utils$g;
21063
+ class EntryTransformer {
21064
+ constructor(_settings) {
21065
+ this._settings = _settings;
21066
+ }
21067
+ getTransformer() {
21068
+ return (entry) => this._transform(entry);
21069
+ }
21070
+ _transform(entry) {
21071
+ let filepath = entry.path;
21072
+ if (this._settings.absolute) {
21073
+ filepath = utils$1.path.makeAbsolute(this._settings.cwd, filepath);
21074
+ filepath = utils$1.path.unixify(filepath);
21075
+ }
21076
+ if (this._settings.markDirectories && entry.dirent.isDirectory()) {
21077
+ filepath += '/';
21078
+ }
21079
+ if (!this._settings.objectMode) {
21080
+ return filepath;
21081
+ }
21082
+ return Object.assign(Object.assign({}, entry), { path: filepath });
21083
+ }
21084
+ }
20935
21085
  entry.default = EntryTransformer;
20936
21086
 
20937
- Object.defineProperty(provider, "__esModule", { value: true });
20938
- const path$a = require$$0$4;
20939
- const deep_1 = deep;
20940
- const entry_1 = entry$1;
20941
- const error_1 = error$2;
20942
- const entry_2 = entry;
20943
- class Provider {
20944
- constructor(_settings) {
20945
- this._settings = _settings;
20946
- this.errorFilter = new error_1.default(this._settings);
20947
- this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
20948
- this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
20949
- this.entryTransformer = new entry_2.default(this._settings);
20950
- }
20951
- _getRootDirectory(task) {
20952
- return path$a.resolve(this._settings.cwd, task.base);
20953
- }
20954
- _getReaderOptions(task) {
20955
- const basePath = task.base === '.' ? '' : task.base;
20956
- return {
20957
- basePath,
20958
- pathSegmentSeparator: '/',
20959
- concurrency: this._settings.concurrency,
20960
- deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
20961
- entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
20962
- errorFilter: this.errorFilter.getFilter(),
20963
- followSymbolicLinks: this._settings.followSymbolicLinks,
20964
- fs: this._settings.fs,
20965
- stats: this._settings.stats,
20966
- throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
20967
- transform: this.entryTransformer.getTransformer()
20968
- };
20969
- }
20970
- _getMicromatchOptions() {
20971
- return {
20972
- dot: this._settings.dot,
20973
- matchBase: this._settings.baseNameMatch,
20974
- nobrace: !this._settings.braceExpansion,
20975
- nocase: !this._settings.caseSensitiveMatch,
20976
- noext: !this._settings.extglob,
20977
- noglobstar: !this._settings.globstar,
20978
- posix: true,
20979
- strictSlashes: false
20980
- };
20981
- }
20982
- }
21087
+ Object.defineProperty(provider, "__esModule", { value: true });
21088
+ const path$a = require$$0$4;
21089
+ const deep_1 = deep;
21090
+ const entry_1 = entry$1;
21091
+ const error_1 = error$2;
21092
+ const entry_2 = entry;
21093
+ class Provider {
21094
+ constructor(_settings) {
21095
+ this._settings = _settings;
21096
+ this.errorFilter = new error_1.default(this._settings);
21097
+ this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
21098
+ this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
21099
+ this.entryTransformer = new entry_2.default(this._settings);
21100
+ }
21101
+ _getRootDirectory(task) {
21102
+ return path$a.resolve(this._settings.cwd, task.base);
21103
+ }
21104
+ _getReaderOptions(task) {
21105
+ const basePath = task.base === '.' ? '' : task.base;
21106
+ return {
21107
+ basePath,
21108
+ pathSegmentSeparator: '/',
21109
+ concurrency: this._settings.concurrency,
21110
+ deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
21111
+ entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
21112
+ errorFilter: this.errorFilter.getFilter(),
21113
+ followSymbolicLinks: this._settings.followSymbolicLinks,
21114
+ fs: this._settings.fs,
21115
+ stats: this._settings.stats,
21116
+ throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
21117
+ transform: this.entryTransformer.getTransformer()
21118
+ };
21119
+ }
21120
+ _getMicromatchOptions() {
21121
+ return {
21122
+ dot: this._settings.dot,
21123
+ matchBase: this._settings.baseNameMatch,
21124
+ nobrace: !this._settings.braceExpansion,
21125
+ nocase: !this._settings.caseSensitiveMatch,
21126
+ noext: !this._settings.extglob,
21127
+ noglobstar: !this._settings.globstar,
21128
+ posix: true,
21129
+ strictSlashes: false
21130
+ };
21131
+ }
21132
+ }
20983
21133
  provider.default = Provider;
20984
21134
 
20985
- Object.defineProperty(async$7, "__esModule", { value: true });
20986
- const async_1$1 = async$6;
20987
- const provider_1$2 = provider;
20988
- class ProviderAsync extends provider_1$2.default {
20989
- constructor() {
20990
- super(...arguments);
20991
- this._reader = new async_1$1.default(this._settings);
20992
- }
20993
- async read(task) {
20994
- const root = this._getRootDirectory(task);
20995
- const options = this._getReaderOptions(task);
20996
- const entries = await this.api(root, task, options);
20997
- return entries.map((entry) => options.transform(entry));
20998
- }
20999
- api(root, task, options) {
21000
- if (task.dynamic) {
21001
- return this._reader.dynamic(root, options);
21002
- }
21003
- return this._reader.static(task.patterns, options);
21004
- }
21005
- }
21135
+ Object.defineProperty(async$7, "__esModule", { value: true });
21136
+ const async_1$1 = async$6;
21137
+ const provider_1$2 = provider;
21138
+ class ProviderAsync extends provider_1$2.default {
21139
+ constructor() {
21140
+ super(...arguments);
21141
+ this._reader = new async_1$1.default(this._settings);
21142
+ }
21143
+ async read(task) {
21144
+ const root = this._getRootDirectory(task);
21145
+ const options = this._getReaderOptions(task);
21146
+ const entries = await this.api(root, task, options);
21147
+ return entries.map((entry) => options.transform(entry));
21148
+ }
21149
+ api(root, task, options) {
21150
+ if (task.dynamic) {
21151
+ return this._reader.dynamic(root, options);
21152
+ }
21153
+ return this._reader.static(task.patterns, options);
21154
+ }
21155
+ }
21006
21156
  async$7.default = ProviderAsync;
21007
21157
 
21008
21158
  var stream = {};
21009
21159
 
21010
- Object.defineProperty(stream, "__esModule", { value: true });
21011
- const stream_1$1 = require$$0$7;
21012
- const stream_2 = stream$1;
21013
- const provider_1$1 = provider;
21014
- class ProviderStream extends provider_1$1.default {
21015
- constructor() {
21016
- super(...arguments);
21017
- this._reader = new stream_2.default(this._settings);
21018
- }
21019
- read(task) {
21020
- const root = this._getRootDirectory(task);
21021
- const options = this._getReaderOptions(task);
21022
- const source = this.api(root, task, options);
21023
- const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
21024
- source
21025
- .once('error', (error) => destination.emit('error', error))
21026
- .on('data', (entry) => destination.emit('data', options.transform(entry)))
21027
- .once('end', () => destination.emit('end'));
21028
- destination
21029
- .once('close', () => source.destroy());
21030
- return destination;
21031
- }
21032
- api(root, task, options) {
21033
- if (task.dynamic) {
21034
- return this._reader.dynamic(root, options);
21035
- }
21036
- return this._reader.static(task.patterns, options);
21037
- }
21038
- }
21160
+ Object.defineProperty(stream, "__esModule", { value: true });
21161
+ const stream_1$1 = require$$0$7;
21162
+ const stream_2 = stream$1;
21163
+ const provider_1$1 = provider;
21164
+ class ProviderStream extends provider_1$1.default {
21165
+ constructor() {
21166
+ super(...arguments);
21167
+ this._reader = new stream_2.default(this._settings);
21168
+ }
21169
+ read(task) {
21170
+ const root = this._getRootDirectory(task);
21171
+ const options = this._getReaderOptions(task);
21172
+ const source = this.api(root, task, options);
21173
+ const destination = new stream_1$1.Readable({ objectMode: true, read: () => { } });
21174
+ source
21175
+ .once('error', (error) => destination.emit('error', error))
21176
+ .on('data', (entry) => destination.emit('data', options.transform(entry)))
21177
+ .once('end', () => destination.emit('end'));
21178
+ destination
21179
+ .once('close', () => source.destroy());
21180
+ return destination;
21181
+ }
21182
+ api(root, task, options) {
21183
+ if (task.dynamic) {
21184
+ return this._reader.dynamic(root, options);
21185
+ }
21186
+ return this._reader.static(task.patterns, options);
21187
+ }
21188
+ }
21039
21189
  stream.default = ProviderStream;
21040
21190
 
21041
21191
  var sync$2 = {};
21042
21192
 
21043
21193
  var sync$1 = {};
21044
21194
 
21045
- Object.defineProperty(sync$1, "__esModule", { value: true });
21046
- const fsStat = out$1;
21047
- const fsWalk = out$3;
21048
- const reader_1 = reader;
21049
- class ReaderSync extends reader_1.default {
21050
- constructor() {
21051
- super(...arguments);
21052
- this._walkSync = fsWalk.walkSync;
21053
- this._statSync = fsStat.statSync;
21054
- }
21055
- dynamic(root, options) {
21056
- return this._walkSync(root, options);
21057
- }
21058
- static(patterns, options) {
21059
- const entries = [];
21060
- for (const pattern of patterns) {
21061
- const filepath = this._getFullEntryPath(pattern);
21062
- const entry = this._getEntry(filepath, pattern, options);
21063
- if (entry === null || !options.entryFilter(entry)) {
21064
- continue;
21065
- }
21066
- entries.push(entry);
21067
- }
21068
- return entries;
21069
- }
21070
- _getEntry(filepath, pattern, options) {
21071
- try {
21072
- const stats = this._getStat(filepath);
21073
- return this._makeEntry(stats, pattern);
21074
- }
21075
- catch (error) {
21076
- if (options.errorFilter(error)) {
21077
- return null;
21078
- }
21079
- throw error;
21080
- }
21081
- }
21082
- _getStat(filepath) {
21083
- return this._statSync(filepath, this._fsStatSettings);
21084
- }
21085
- }
21195
+ Object.defineProperty(sync$1, "__esModule", { value: true });
21196
+ const fsStat = out$1;
21197
+ const fsWalk = out$3;
21198
+ const reader_1 = reader;
21199
+ class ReaderSync extends reader_1.default {
21200
+ constructor() {
21201
+ super(...arguments);
21202
+ this._walkSync = fsWalk.walkSync;
21203
+ this._statSync = fsStat.statSync;
21204
+ }
21205
+ dynamic(root, options) {
21206
+ return this._walkSync(root, options);
21207
+ }
21208
+ static(patterns, options) {
21209
+ const entries = [];
21210
+ for (const pattern of patterns) {
21211
+ const filepath = this._getFullEntryPath(pattern);
21212
+ const entry = this._getEntry(filepath, pattern, options);
21213
+ if (entry === null || !options.entryFilter(entry)) {
21214
+ continue;
21215
+ }
21216
+ entries.push(entry);
21217
+ }
21218
+ return entries;
21219
+ }
21220
+ _getEntry(filepath, pattern, options) {
21221
+ try {
21222
+ const stats = this._getStat(filepath);
21223
+ return this._makeEntry(stats, pattern);
21224
+ }
21225
+ catch (error) {
21226
+ if (options.errorFilter(error)) {
21227
+ return null;
21228
+ }
21229
+ throw error;
21230
+ }
21231
+ }
21232
+ _getStat(filepath) {
21233
+ return this._statSync(filepath, this._fsStatSettings);
21234
+ }
21235
+ }
21086
21236
  sync$1.default = ReaderSync;
21087
21237
 
21088
- Object.defineProperty(sync$2, "__esModule", { value: true });
21089
- const sync_1$1 = sync$1;
21090
- const provider_1 = provider;
21091
- class ProviderSync extends provider_1.default {
21092
- constructor() {
21093
- super(...arguments);
21094
- this._reader = new sync_1$1.default(this._settings);
21095
- }
21096
- read(task) {
21097
- const root = this._getRootDirectory(task);
21098
- const options = this._getReaderOptions(task);
21099
- const entries = this.api(root, task, options);
21100
- return entries.map(options.transform);
21101
- }
21102
- api(root, task, options) {
21103
- if (task.dynamic) {
21104
- return this._reader.dynamic(root, options);
21105
- }
21106
- return this._reader.static(task.patterns, options);
21107
- }
21108
- }
21238
+ Object.defineProperty(sync$2, "__esModule", { value: true });
21239
+ const sync_1$1 = sync$1;
21240
+ const provider_1 = provider;
21241
+ class ProviderSync extends provider_1.default {
21242
+ constructor() {
21243
+ super(...arguments);
21244
+ this._reader = new sync_1$1.default(this._settings);
21245
+ }
21246
+ read(task) {
21247
+ const root = this._getRootDirectory(task);
21248
+ const options = this._getReaderOptions(task);
21249
+ const entries = this.api(root, task, options);
21250
+ return entries.map(options.transform);
21251
+ }
21252
+ api(root, task, options) {
21253
+ if (task.dynamic) {
21254
+ return this._reader.dynamic(root, options);
21255
+ }
21256
+ return this._reader.static(task.patterns, options);
21257
+ }
21258
+ }
21109
21259
  sync$2.default = ProviderSync;
21110
21260
 
21111
21261
  var settings = {};
21112
21262
 
21113
21263
  (function (exports) {
21114
- Object.defineProperty(exports, "__esModule", { value: true });
21115
- exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
21116
- const fs = require$$0__default;
21117
- const os = require$$2;
21118
- /**
21119
- * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
21120
- * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
21121
- */
21122
- const CPU_COUNT = Math.max(os.cpus().length, 1);
21123
- exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
21124
- lstat: fs.lstat,
21125
- lstatSync: fs.lstatSync,
21126
- stat: fs.stat,
21127
- statSync: fs.statSync,
21128
- readdir: fs.readdir,
21129
- readdirSync: fs.readdirSync
21130
- };
21131
- class Settings {
21132
- constructor(_options = {}) {
21133
- this._options = _options;
21134
- this.absolute = this._getValue(this._options.absolute, false);
21135
- this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
21136
- this.braceExpansion = this._getValue(this._options.braceExpansion, true);
21137
- this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
21138
- this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
21139
- this.cwd = this._getValue(this._options.cwd, process.cwd());
21140
- this.deep = this._getValue(this._options.deep, Infinity);
21141
- this.dot = this._getValue(this._options.dot, false);
21142
- this.extglob = this._getValue(this._options.extglob, true);
21143
- this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
21144
- this.fs = this._getFileSystemMethods(this._options.fs);
21145
- this.globstar = this._getValue(this._options.globstar, true);
21146
- this.ignore = this._getValue(this._options.ignore, []);
21147
- this.markDirectories = this._getValue(this._options.markDirectories, false);
21148
- this.objectMode = this._getValue(this._options.objectMode, false);
21149
- this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
21150
- this.onlyFiles = this._getValue(this._options.onlyFiles, true);
21151
- this.stats = this._getValue(this._options.stats, false);
21152
- this.suppressErrors = this._getValue(this._options.suppressErrors, false);
21153
- this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
21154
- this.unique = this._getValue(this._options.unique, true);
21155
- if (this.onlyDirectories) {
21156
- this.onlyFiles = false;
21157
- }
21158
- if (this.stats) {
21159
- this.objectMode = true;
21160
- }
21161
- }
21162
- _getValue(option, value) {
21163
- return option === undefined ? value : option;
21164
- }
21165
- _getFileSystemMethods(methods = {}) {
21166
- return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
21167
- }
21168
- }
21264
+ Object.defineProperty(exports, "__esModule", { value: true });
21265
+ exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
21266
+ const fs = require$$0__default;
21267
+ const os = require$$2;
21268
+ /**
21269
+ * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
21270
+ * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
21271
+ */
21272
+ const CPU_COUNT = Math.max(os.cpus().length, 1);
21273
+ exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
21274
+ lstat: fs.lstat,
21275
+ lstatSync: fs.lstatSync,
21276
+ stat: fs.stat,
21277
+ statSync: fs.statSync,
21278
+ readdir: fs.readdir,
21279
+ readdirSync: fs.readdirSync
21280
+ };
21281
+ class Settings {
21282
+ constructor(_options = {}) {
21283
+ this._options = _options;
21284
+ this.absolute = this._getValue(this._options.absolute, false);
21285
+ this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
21286
+ this.braceExpansion = this._getValue(this._options.braceExpansion, true);
21287
+ this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
21288
+ this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
21289
+ this.cwd = this._getValue(this._options.cwd, process.cwd());
21290
+ this.deep = this._getValue(this._options.deep, Infinity);
21291
+ this.dot = this._getValue(this._options.dot, false);
21292
+ this.extglob = this._getValue(this._options.extglob, true);
21293
+ this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
21294
+ this.fs = this._getFileSystemMethods(this._options.fs);
21295
+ this.globstar = this._getValue(this._options.globstar, true);
21296
+ this.ignore = this._getValue(this._options.ignore, []);
21297
+ this.markDirectories = this._getValue(this._options.markDirectories, false);
21298
+ this.objectMode = this._getValue(this._options.objectMode, false);
21299
+ this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
21300
+ this.onlyFiles = this._getValue(this._options.onlyFiles, true);
21301
+ this.stats = this._getValue(this._options.stats, false);
21302
+ this.suppressErrors = this._getValue(this._options.suppressErrors, false);
21303
+ this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
21304
+ this.unique = this._getValue(this._options.unique, true);
21305
+ if (this.onlyDirectories) {
21306
+ this.onlyFiles = false;
21307
+ }
21308
+ if (this.stats) {
21309
+ this.objectMode = true;
21310
+ }
21311
+ }
21312
+ _getValue(option, value) {
21313
+ return option === undefined ? value : option;
21314
+ }
21315
+ _getFileSystemMethods(methods = {}) {
21316
+ return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
21317
+ }
21318
+ }
21169
21319
  exports.default = Settings;
21170
21320
  } (settings));
21171
21321
 
21172
- const taskManager = tasks;
21173
- const patternManager = patterns;
21174
- const async_1 = async$7;
21175
- const stream_1 = stream;
21176
- const sync_1 = sync$2;
21177
- const settings_1 = settings;
21178
- const utils = utils$g;
21179
- async function FastGlob(source, options) {
21180
- assertPatternsInput(source);
21181
- const works = getWorks(source, async_1.default, options);
21182
- const result = await Promise.all(works);
21183
- return utils.array.flatten(result);
21184
- }
21185
- // https://github.com/typescript-eslint/typescript-eslint/issues/60
21186
- // eslint-disable-next-line no-redeclare
21187
- (function (FastGlob) {
21188
- function sync(source, options) {
21189
- assertPatternsInput(source);
21190
- const works = getWorks(source, sync_1.default, options);
21191
- return utils.array.flatten(works);
21192
- }
21193
- FastGlob.sync = sync;
21194
- function stream(source, options) {
21195
- assertPatternsInput(source);
21196
- const works = getWorks(source, stream_1.default, options);
21197
- /**
21198
- * The stream returned by the provider cannot work with an asynchronous iterator.
21199
- * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
21200
- * This affects performance (+25%). I don't see best solution right now.
21201
- */
21202
- return utils.stream.merge(works);
21203
- }
21204
- FastGlob.stream = stream;
21205
- function generateTasks(source, options) {
21206
- assertPatternsInput(source);
21207
- const patterns = patternManager.transform([].concat(source));
21208
- const settings = new settings_1.default(options);
21209
- return taskManager.generate(patterns, settings);
21210
- }
21211
- FastGlob.generateTasks = generateTasks;
21212
- function isDynamicPattern(source, options) {
21213
- assertPatternsInput(source);
21214
- const settings = new settings_1.default(options);
21215
- return utils.pattern.isDynamicPattern(source, settings);
21216
- }
21217
- FastGlob.isDynamicPattern = isDynamicPattern;
21218
- function escapePath(source) {
21219
- assertPatternsInput(source);
21220
- return utils.path.escape(source);
21221
- }
21222
- FastGlob.escapePath = escapePath;
21223
- })(FastGlob || (FastGlob = {}));
21224
- function getWorks(source, _Provider, options) {
21225
- const patterns = patternManager.transform([].concat(source));
21226
- const settings = new settings_1.default(options);
21227
- const tasks = taskManager.generate(patterns, settings);
21228
- const provider = new _Provider(settings);
21229
- return tasks.map(provider.read, provider);
21230
- }
21231
- function assertPatternsInput(input) {
21232
- const source = [].concat(input);
21233
- const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
21234
- if (!isValidSource) {
21235
- throw new TypeError('Patterns must be a string (non empty) or an array of strings');
21236
- }
21237
- }
21322
+ const taskManager = tasks;
21323
+ const async_1 = async$7;
21324
+ const stream_1 = stream;
21325
+ const sync_1 = sync$2;
21326
+ const settings_1 = settings;
21327
+ const utils = utils$g;
21328
+ async function FastGlob(source, options) {
21329
+ assertPatternsInput(source);
21330
+ const works = getWorks(source, async_1.default, options);
21331
+ const result = await Promise.all(works);
21332
+ return utils.array.flatten(result);
21333
+ }
21334
+ // https://github.com/typescript-eslint/typescript-eslint/issues/60
21335
+ // eslint-disable-next-line no-redeclare
21336
+ (function (FastGlob) {
21337
+ FastGlob.glob = FastGlob;
21338
+ FastGlob.globSync = sync;
21339
+ FastGlob.globStream = stream;
21340
+ FastGlob.async = FastGlob;
21341
+ function sync(source, options) {
21342
+ assertPatternsInput(source);
21343
+ const works = getWorks(source, sync_1.default, options);
21344
+ return utils.array.flatten(works);
21345
+ }
21346
+ FastGlob.sync = sync;
21347
+ function stream(source, options) {
21348
+ assertPatternsInput(source);
21349
+ const works = getWorks(source, stream_1.default, options);
21350
+ /**
21351
+ * The stream returned by the provider cannot work with an asynchronous iterator.
21352
+ * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
21353
+ * This affects performance (+25%). I don't see best solution right now.
21354
+ */
21355
+ return utils.stream.merge(works);
21356
+ }
21357
+ FastGlob.stream = stream;
21358
+ function generateTasks(source, options) {
21359
+ assertPatternsInput(source);
21360
+ const patterns = [].concat(source);
21361
+ const settings = new settings_1.default(options);
21362
+ return taskManager.generate(patterns, settings);
21363
+ }
21364
+ FastGlob.generateTasks = generateTasks;
21365
+ function isDynamicPattern(source, options) {
21366
+ assertPatternsInput(source);
21367
+ const settings = new settings_1.default(options);
21368
+ return utils.pattern.isDynamicPattern(source, settings);
21369
+ }
21370
+ FastGlob.isDynamicPattern = isDynamicPattern;
21371
+ function escapePath(source) {
21372
+ assertPatternsInput(source);
21373
+ return utils.path.escape(source);
21374
+ }
21375
+ FastGlob.escapePath = escapePath;
21376
+ function convertPathToPattern(source) {
21377
+ assertPatternsInput(source);
21378
+ return utils.path.convertPathToPattern(source);
21379
+ }
21380
+ FastGlob.convertPathToPattern = convertPathToPattern;
21381
+ (function (posix) {
21382
+ function escapePath(source) {
21383
+ assertPatternsInput(source);
21384
+ return utils.path.escapePosixPath(source);
21385
+ }
21386
+ posix.escapePath = escapePath;
21387
+ function convertPathToPattern(source) {
21388
+ assertPatternsInput(source);
21389
+ return utils.path.convertPosixPathToPattern(source);
21390
+ }
21391
+ posix.convertPathToPattern = convertPathToPattern;
21392
+ })(FastGlob.posix || (FastGlob.posix = {}));
21393
+ (function (win32) {
21394
+ function escapePath(source) {
21395
+ assertPatternsInput(source);
21396
+ return utils.path.escapeWindowsPath(source);
21397
+ }
21398
+ win32.escapePath = escapePath;
21399
+ function convertPathToPattern(source) {
21400
+ assertPatternsInput(source);
21401
+ return utils.path.convertWindowsPathToPattern(source);
21402
+ }
21403
+ win32.convertPathToPattern = convertPathToPattern;
21404
+ })(FastGlob.win32 || (FastGlob.win32 = {}));
21405
+ })(FastGlob || (FastGlob = {}));
21406
+ function getWorks(source, _Provider, options) {
21407
+ const patterns = [].concat(source);
21408
+ const settings = new settings_1.default(options);
21409
+ const tasks = taskManager.generate(patterns, settings);
21410
+ const provider = new _Provider(settings);
21411
+ return tasks.map(provider.read, provider);
21412
+ }
21413
+ function assertPatternsInput(input) {
21414
+ const source = [].concat(input);
21415
+ const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));
21416
+ if (!isValidSource) {
21417
+ throw new TypeError('Patterns must be a string (non empty) or an array of strings');
21418
+ }
21419
+ }
21238
21420
  var out = FastGlob;
21239
21421
 
21240
21422
  var glob = /*@__PURE__*/getDefaultExportFromCjs(out);
@@ -38692,8 +38874,8 @@ function createCachedImport(imp) {
38692
38874
  return cached;
38693
38875
  };
38694
38876
  }
38695
- const importPostcssImport = createCachedImport(() => import('./dep-42f74405.js').then(function (n) { return n.i; }));
38696
- const importPostcssModules = createCachedImport(() => import('./dep-12ca0d86.js').then(function (n) { return n.i; }));
38877
+ const importPostcssImport = createCachedImport(() => import('./dep-9afe96b1.js').then(function (n) { return n.i; }));
38878
+ const importPostcssModules = createCachedImport(() => import('./dep-c8efd3d9.js').then(function (n) { return n.i; }));
38697
38879
  const importPostcss = createCachedImport(() => import('postcss'));
38698
38880
  /**
38699
38881
  * @experimental
@@ -38915,7 +39097,7 @@ async function minifyCSS(css, config) {
38915
39097
  return code.toString();
38916
39098
  }
38917
39099
  try {
38918
- const { code, warnings } = await transform$2(css, {
39100
+ const { code, warnings } = await transform$1(css, {
38919
39101
  loader: 'css',
38920
39102
  target: config.build.cssTarget || undefined,
38921
39103
  ...resolveMinifyCssEsbuildOptions(config.esbuild || {}),
@@ -42560,7 +42742,7 @@ function definePlugin(config) {
42560
42742
  if (isBuild) {
42561
42743
  const match = key.match(metaEnvRe);
42562
42744
  if (match) {
42563
- userDefineEnv[match[1]] = `__vite__define__${userDefine[key]}`;
42745
+ userDefineEnv[match[1]] = `__vite__define__${key}__define__vite__`;
42564
42746
  }
42565
42747
  }
42566
42748
  }
@@ -42579,7 +42761,7 @@ function definePlugin(config) {
42579
42761
  ...config.env,
42580
42762
  SSR: '__vite__ssr__',
42581
42763
  ...userDefineEnv,
42582
- }).replace(/"__vite__define__(.+?)"([,}])/g, (_, val, suffix) => `${val.replace(/(^\\")|(\\"$)/g, '"')}${suffix}`),
42764
+ }).replace(/"__vite__define__(.+?)__define__vite__"/g, (_, key) => userDefine[key]),
42583
42765
  });
42584
42766
  }
42585
42767
  function getImportMetaKeys(ssr) {
@@ -43834,10 +44016,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
43834
44016
  }
43835
44017
  else {
43836
44018
  combinedMap = combineSourcemaps(cleanUrl(this.filename), [
43837
- {
43838
- ...m,
43839
- sourcesContent: combinedMap.sourcesContent,
43840
- },
44019
+ m,
43841
44020
  combinedMap,
43842
44021
  ]);
43843
44022
  }
@@ -44242,7 +44421,7 @@ function esbuildScanPlugin(config, container, depImports, missing, entries) {
44242
44421
  let transpiledContents;
44243
44422
  // transpile because `transformGlobImport` only expects js
44244
44423
  if (loader !== 'js') {
44245
- transpiledContents = (await transform$2(contents, { loader })).code;
44424
+ transpiledContents = (await transform$1(contents, { loader })).code;
44246
44425
  }
44247
44426
  else {
44248
44427
  transpiledContents = contents;
@@ -46152,7 +46331,7 @@ function indexOfMatchInSlice(str, reg, pos = 0) {
46152
46331
  * the async chunk itself.
46153
46332
  */
46154
46333
  function detectScriptRel() {
46155
- const relList = document.createElement('link').relList;
46334
+ const relList = typeof document !== 'undefined' && document.createElement('link').relList;
46156
46335
  return relList && relList.supports && relList.supports('modulepreload')
46157
46336
  ? 'modulepreload'
46158
46337
  : 'preload';