@forsakringskassan/docs-generator 2.34.0 → 2.35.1

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.
@@ -3,33 +3,33 @@ import { createRequire as $createRequire } from "node:module";
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
5
  import { fileURLToPath, pathToFileURL } from 'node:url';
6
- import path$1, { win32, posix } from 'node:path';
7
- import require$$0$3, { realpathSync as realpathSync$1, readlinkSync, readdirSync, readdir as readdir$1, lstatSync, unwatchFile, watchFile, watch as watch$2, stat as stat$2 } from 'fs';
6
+ import * as sp from 'node:path';
7
+ import sp__default, { win32, posix, resolve, join, relative, sep as sep$1 } from 'node:path';
8
+ import require$$0$3, { realpathSync as realpathSync$1, readlinkSync, readdirSync, readdir as readdir$1, lstatSync } from 'fs';
8
9
  import * as fs$1 from 'node:fs';
9
- import { readFileSync } from 'node:fs';
10
- import { realpath, readlink, readdir, lstat } from 'node:fs/promises';
10
+ import { readFileSync, unwatchFile, watchFile, watch as watch$2, stat as stat$2 } from 'node:fs';
11
+ import { realpath, readlink, readdir, lstat, stat as stat$1, open } from 'node:fs/promises';
11
12
  import { EventEmitter as EventEmitter$1 } from 'node:events';
12
- import Stream from 'node:stream';
13
+ import Stream, { Readable } from 'node:stream';
13
14
  import { StringDecoder } from 'node:string_decoder';
14
15
  import require$$0$1 from 'constants';
15
- import require$$0$2, { Readable } from 'stream';
16
+ import require$$0$2 from 'stream';
16
17
  import require$$1 from 'util';
17
18
  import require$$5 from 'assert';
18
- import * as sysPath from 'path';
19
- import sysPath__default, { resolve, join, relative, sep as sep$1 } from 'path';
19
+ import require$$1$1 from 'path';
20
20
  import { createRequire } from 'node:module';
21
21
  import require$$0$4 from 'readline';
22
- import require$$3, { EventEmitter as EventEmitter$2 } from 'events';
23
- import { lstat as lstat$1, stat as stat$1, readdir as readdir$2, realpath as realpath$1, open } from 'fs/promises';
24
- import require$$0$6, { type as type$2 } from 'os';
25
- import require$$1$4 from 'http';
22
+ import require$$3 from 'events';
23
+ import { type as type$2 } from 'node:os';
24
+ import require$$1$5 from 'http';
26
25
  import require$$2$2 from 'https';
27
26
  import require$$2 from 'url';
28
27
  import require$$0$5 from 'buffer';
29
- import require$$1$1 from 'crypto';
30
- import require$$1$2 from 'net';
28
+ import require$$1$2 from 'crypto';
29
+ import require$$1$3 from 'net';
31
30
  import require$$2$1 from 'tls';
32
- import require$$1$3 from 'tty';
31
+ import require$$1$4 from 'tty';
32
+ import require$$0$6 from 'os';
33
33
  import require$$0$7 from 'querystring';
34
34
 
35
35
  /* eslint-disable no-bitwise */
@@ -22450,7 +22450,7 @@ var hasRequiredUtils$2;
22450
22450
  function requireUtils$2 () {
22451
22451
  if (hasRequiredUtils$2) return utils$2;
22452
22452
  hasRequiredUtils$2 = 1;
22453
- const path = sysPath__default;
22453
+ const path = require$$1$1;
22454
22454
 
22455
22455
  // https://github.com/nodejs/node/issues/8987
22456
22456
  // https://github.com/libuv/libuv/pull/1088
@@ -22596,7 +22596,7 @@ function requireStat () {
22596
22596
  hasRequiredStat = 1;
22597
22597
 
22598
22598
  const fs = requireFs();
22599
- const path = sysPath__default;
22599
+ const path = require$$1$1;
22600
22600
  const u = requireUniversalify().fromPromise;
22601
22601
 
22602
22602
  function getStats (src, dest, opts) {
@@ -22800,7 +22800,7 @@ function requireCopy$1 () {
22800
22800
  hasRequiredCopy$1 = 1;
22801
22801
 
22802
22802
  const fs = requireFs();
22803
- const path = sysPath__default;
22803
+ const path = require$$1$1;
22804
22804
  const { mkdirs } = requireMkdirs();
22805
22805
  const { pathExists } = requirePathExists();
22806
22806
  const { utimesMillis } = requireUtimes();
@@ -22983,7 +22983,7 @@ function requireCopySync () {
22983
22983
  hasRequiredCopySync = 1;
22984
22984
 
22985
22985
  const fs = requireGracefulFs();
22986
- const path = sysPath__default;
22986
+ const path = require$$1$1;
22987
22987
  const mkdirsSync = requireMkdirs().mkdirsSync;
22988
22988
  const utimesMillisSync = requireUtimes().utimesMillisSync;
22989
22989
  const stat = requireStat();
@@ -23203,7 +23203,7 @@ function requireEmpty () {
23203
23203
 
23204
23204
  const u = requireUniversalify().fromPromise;
23205
23205
  const fs = requireFs();
23206
- const path = sysPath__default;
23206
+ const path = require$$1$1;
23207
23207
  const mkdir = requireMkdirs();
23208
23208
  const remove = requireRemove();
23209
23209
 
@@ -23249,7 +23249,7 @@ function requireFile () {
23249
23249
  hasRequiredFile = 1;
23250
23250
 
23251
23251
  const u = requireUniversalify().fromPromise;
23252
- const path = sysPath__default;
23252
+ const path = require$$1$1;
23253
23253
  const fs = requireFs();
23254
23254
  const mkdir = requireMkdirs();
23255
23255
 
@@ -23323,7 +23323,7 @@ function requireLink () {
23323
23323
  hasRequiredLink = 1;
23324
23324
 
23325
23325
  const u = requireUniversalify().fromPromise;
23326
- const path = sysPath__default;
23326
+ const path = require$$1$1;
23327
23327
  const fs = requireFs();
23328
23328
  const mkdir = requireMkdirs();
23329
23329
  const { pathExists } = requirePathExists();
@@ -23394,7 +23394,7 @@ function requireSymlinkPaths () {
23394
23394
  if (hasRequiredSymlinkPaths) return symlinkPaths_1;
23395
23395
  hasRequiredSymlinkPaths = 1;
23396
23396
 
23397
- const path = sysPath__default;
23397
+ const path = require$$1$1;
23398
23398
  const fs = requireFs();
23399
23399
  const { pathExists } = requirePathExists();
23400
23400
 
@@ -23546,7 +23546,7 @@ function requireSymlink () {
23546
23546
  hasRequiredSymlink = 1;
23547
23547
 
23548
23548
  const u = requireUniversalify().fromPromise;
23549
- const path = sysPath__default;
23549
+ const path = require$$1$1;
23550
23550
  const fs = requireFs();
23551
23551
 
23552
23552
  const { mkdirs, mkdirsSync } = requireMkdirs();
@@ -23792,7 +23792,7 @@ function requireOutputFile () {
23792
23792
 
23793
23793
  const u = requireUniversalify().fromPromise;
23794
23794
  const fs = requireFs();
23795
- const path = sysPath__default;
23795
+ const path = require$$1$1;
23796
23796
  const mkdir = requireMkdirs();
23797
23797
  const pathExists = requirePathExists().pathExists;
23798
23798
 
@@ -23894,7 +23894,7 @@ function requireMove$1 () {
23894
23894
  hasRequiredMove$1 = 1;
23895
23895
 
23896
23896
  const fs = requireFs();
23897
- const path = sysPath__default;
23897
+ const path = require$$1$1;
23898
23898
  const { copy } = requireCopy();
23899
23899
  const { remove } = requireRemove();
23900
23900
  const { mkdirp } = requireMkdirs();
@@ -23961,7 +23961,7 @@ function requireMoveSync () {
23961
23961
  hasRequiredMoveSync = 1;
23962
23962
 
23963
23963
  const fs = requireGracefulFs();
23964
- const path = sysPath__default;
23964
+ const path = require$$1$1;
23965
23965
  const copySync = requireCopy().copySync;
23966
23966
  const removeSync = requireRemove().removeSync;
23967
23967
  const mkdirpSync = requireMkdirs().mkdirpSync;
@@ -26224,6 +26224,7 @@ class I18n extends EventEmitter {
26224
26224
  clone.store = new ResourceStore(clonedData, mergedOptions);
26225
26225
  clone.services.resourceStore = clone.store;
26226
26226
  }
26227
+ if (options.interpolation) clone.services.interpolator = new Interpolator(mergedOptions);
26227
26228
  clone.translator = new Translator(clone.services, mergedOptions);
26228
26229
  clone.translator.on('*', (event, ...args) => {
26229
26230
  clone.emit(event, ...args);
@@ -26370,7 +26371,7 @@ function requireResolvePackagePath () {
26370
26371
  // extracted in part from: https://github.com/stefanpenner/hash-for-dep/blob/15b2ebcf22024ceb2eb7907f8c412ae40f87b15e/lib/resolve-package-path.js#L1
26371
26372
  //
26372
26373
  const fs = require$$0$3;
26373
- const path = sysPath__default;
26374
+ const path = require$$1$1;
26374
26375
  const pathRoot = requirePathRoot();
26375
26376
  const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
26376
26377
  /*
@@ -26678,7 +26679,7 @@ function requireLib$1 () {
26678
26679
  var __importDefault = (lib$1 && lib$1.__importDefault) || function (mod) {
26679
26680
  return (mod && mod.__esModule) ? mod : { "default": mod };
26680
26681
  };
26681
- const path_1 = __importDefault(sysPath__default);
26682
+ const path_1 = __importDefault(require$$1$1);
26682
26683
  const resolve_package_path_1 = __importDefault(requireResolvePackagePath());
26683
26684
  const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
26684
26685
  const ALLOWED_ERROR_CODES = [
@@ -26854,14 +26855,14 @@ var moduleImporter = {
26854
26855
  readFileSync(packagePath, { encoding: "utf-8" })
26855
26856
  );
26856
26857
  }
26857
- const moduleDirectory = path$1.dirname(packagePath);
26858
+ const moduleDirectory = sp__default.dirname(packagePath);
26858
26859
  try {
26859
26860
  const match = o(packageJson, filePath.substring(1), {
26860
26861
  conditions: ["sass"]
26861
26862
  });
26862
26863
  if (match && match.length === 1) {
26863
26864
  return new URL(
26864
- pathToFileURL(path$1.join(moduleDirectory, match[0]))
26865
+ pathToFileURL(sp__default.join(moduleDirectory, match[0]))
26865
26866
  );
26866
26867
  }
26867
26868
  } catch {
@@ -26870,12 +26871,12 @@ var moduleImporter = {
26870
26871
  const match = i(packageJson, { fields: ["sass", "main"] });
26871
26872
  if (match) {
26872
26873
  return new URL(
26873
- pathToFileURL(path$1.join(moduleDirectory, match))
26874
+ pathToFileURL(sp__default.join(moduleDirectory, match))
26874
26875
  );
26875
26876
  }
26876
26877
  }
26877
- const directory = path$1.dirname(filePath);
26878
- const fileName = path$1.basename(filePath);
26878
+ const directory = sp__default.dirname(filePath);
26879
+ const fileName = sp__default.basename(filePath);
26879
26880
  const search = [
26880
26881
  `${fileName}.css`,
26881
26882
  `${fileName}.scss`,
@@ -26885,7 +26886,7 @@ var moduleImporter = {
26885
26886
  ];
26886
26887
  for (const variant of search) {
26887
26888
  try {
26888
- const moduleName = path$1.posix.join(
26889
+ const moduleName = sp__default.posix.join(
26889
26890
  moduleDirectory,
26890
26891
  directory,
26891
26892
  variant
@@ -45407,30 +45408,44 @@ var HighlightJS = /*@__PURE__*/getDefaultExportFromCjs(commonExports);
45407
45408
 
45408
45409
  // https://nodejs.org/api/packages.html#packages_writing_dual_packages_while_avoiding_or_minimizing_hazards
45409
45410
 
45410
- function defaultOptions() {
45411
- return {
45412
- root: '.',
45413
- fileFilter: (_path) => true,
45414
- directoryFilter: (_path) => true,
45415
- type: FILE_TYPE,
45416
- lstat: false,
45417
- depth: 2147483648,
45418
- alwaysStat: false,
45419
- highWaterMark: 4096,
45420
- };
45421
- }
45411
+ const EntryTypes = {
45412
+ FILE_TYPE: 'files',
45413
+ DIR_TYPE: 'directories',
45414
+ FILE_DIR_TYPE: 'files_directories',
45415
+ EVERYTHING_TYPE: 'all',
45416
+ };
45417
+ const defaultOptions = {
45418
+ root: '.',
45419
+ fileFilter: (_entryInfo) => true,
45420
+ directoryFilter: (_entryInfo) => true,
45421
+ type: EntryTypes.FILE_TYPE,
45422
+ lstat: false,
45423
+ depth: 2147483648,
45424
+ alwaysStat: false,
45425
+ highWaterMark: 4096,
45426
+ };
45427
+ Object.freeze(defaultOptions);
45422
45428
  const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
45423
45429
  const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
45424
- const FILE_TYPE = 'files';
45425
- const DIR_TYPE = 'directories';
45426
- const FILE_DIR_TYPE = 'files_directories';
45427
- const EVERYTHING_TYPE = 'all';
45428
- const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
45429
- const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
45430
- const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
45430
+ const ALL_TYPES = [
45431
+ EntryTypes.DIR_TYPE,
45432
+ EntryTypes.EVERYTHING_TYPE,
45433
+ EntryTypes.FILE_DIR_TYPE,
45434
+ EntryTypes.FILE_TYPE,
45435
+ ];
45436
+ const DIR_TYPES = new Set([
45437
+ EntryTypes.DIR_TYPE,
45438
+ EntryTypes.EVERYTHING_TYPE,
45439
+ EntryTypes.FILE_DIR_TYPE,
45440
+ ]);
45441
+ const FILE_TYPES = new Set([
45442
+ EntryTypes.EVERYTHING_TYPE,
45443
+ EntryTypes.FILE_DIR_TYPE,
45444
+ EntryTypes.FILE_TYPE,
45445
+ ]);
45431
45446
  const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
45432
45447
  const wantBigintFsStats = process.platform === 'win32';
45433
- const emptyFn = (_path) => true;
45448
+ const emptyFn = (_entryInfo) => true;
45434
45449
  const normalizeFilter = (filter) => {
45435
45450
  if (filter === undefined)
45436
45451
  return emptyFn;
@@ -45446,18 +45461,33 @@ const normalizeFilter = (filter) => {
45446
45461
  }
45447
45462
  return emptyFn;
45448
45463
  };
45464
+ /** Readable readdir stream, emitting new files as they're being listed. */
45449
45465
  class ReaddirpStream extends Readable {
45466
+ parents;
45467
+ reading;
45468
+ parent;
45469
+ _stat;
45470
+ _maxDepth;
45471
+ _wantsDir;
45472
+ _wantsFile;
45473
+ _wantsEverything;
45474
+ _root;
45475
+ _isDirent;
45476
+ _statsProp;
45477
+ _rdOptions;
45478
+ _fileFilter;
45479
+ _directoryFilter;
45450
45480
  constructor(options = {}) {
45451
45481
  super({
45452
45482
  objectMode: true,
45453
45483
  autoDestroy: true,
45454
45484
  highWaterMark: options.highWaterMark,
45455
45485
  });
45456
- const opts = { ...defaultOptions(), ...options };
45486
+ const opts = { ...defaultOptions, ...options };
45457
45487
  const { root, type } = opts;
45458
45488
  this._fileFilter = normalizeFilter(opts.fileFilter);
45459
45489
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
45460
- const statMethod = opts.lstat ? lstat$1 : stat$1;
45490
+ const statMethod = opts.lstat ? lstat : stat$1;
45461
45491
  // Use bigint stats if it's windows and stat() supports options (node 10+).
45462
45492
  if (wantBigintFsStats) {
45463
45493
  this._stat = (path) => statMethod(path, { bigint: true });
@@ -45465,10 +45495,11 @@ class ReaddirpStream extends Readable {
45465
45495
  else {
45466
45496
  this._stat = statMethod;
45467
45497
  }
45468
- this._maxDepth = opts.depth;
45469
- this._wantsDir = DIR_TYPES.has(type);
45470
- this._wantsFile = FILE_TYPES.has(type);
45471
- this._wantsEverything = type === EVERYTHING_TYPE;
45498
+ this._maxDepth =
45499
+ opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
45500
+ this._wantsDir = type ? DIR_TYPES.has(type) : false;
45501
+ this._wantsFile = type ? FILE_TYPES.has(type) : false;
45502
+ this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
45472
45503
  this._root = resolve(root);
45473
45504
  this._isDirent = !opts.alwaysStat;
45474
45505
  this._statsProp = this._isDirent ? 'dirent' : 'stats';
@@ -45491,10 +45522,8 @@ class ReaddirpStream extends Readable {
45491
45522
  const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
45492
45523
  const awaited = await Promise.all(slice);
45493
45524
  for (const entry of awaited) {
45494
- if (!entry) {
45495
- batch--;
45496
- return;
45497
- }
45525
+ if (!entry)
45526
+ continue;
45498
45527
  if (this.destroyed)
45499
45528
  return;
45500
45529
  const entryType = await this._getEntryType(entry);
@@ -45538,7 +45567,7 @@ class ReaddirpStream extends Readable {
45538
45567
  async _exploreDir(path, depth) {
45539
45568
  let files;
45540
45569
  try {
45541
- files = await readdir$2(path, this._rdOptions);
45570
+ files = await readdir(path, this._rdOptions);
45542
45571
  }
45543
45572
  catch (error) {
45544
45573
  this._onError(error);
@@ -45581,8 +45610,8 @@ class ReaddirpStream extends Readable {
45581
45610
  if (stats && stats.isSymbolicLink()) {
45582
45611
  const full = entry.fullPath;
45583
45612
  try {
45584
- const entryRealPath = await realpath$1(full);
45585
- const entryRealPathStats = await lstat$1(entryRealPath);
45613
+ const entryRealPath = await realpath(full);
45614
+ const entryRealPathStats = await lstat(entryRealPath);
45586
45615
  if (entryRealPathStats.isFile()) {
45587
45616
  return 'file';
45588
45617
  }
@@ -45609,15 +45638,16 @@ class ReaddirpStream extends Readable {
45609
45638
  }
45610
45639
  }
45611
45640
  /**
45612
- * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
45641
+ * Streaming version: Reads all files and directories in given root recursively.
45642
+ * Consumes ~constant small amount of RAM.
45613
45643
  * @param root Root directory
45614
45644
  * @param options Options to specify root (start directory), filters and recursion depth
45615
45645
  */
45616
- const readdirp = (root, options = {}) => {
45646
+ function readdirp(root, options = {}) {
45617
45647
  // @ts-ignore
45618
45648
  let type = options.entryType || options.type;
45619
45649
  if (type === 'both')
45620
- type = FILE_DIR_TYPE; // backwards-compatibility
45650
+ type = EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
45621
45651
  if (type)
45622
45652
  options.type = type;
45623
45653
  if (!root) {
@@ -45631,7 +45661,7 @@ const readdirp = (root, options = {}) => {
45631
45661
  }
45632
45662
  options.root = root;
45633
45663
  return new ReaddirpStream(options);
45634
- };
45664
+ }
45635
45665
 
45636
45666
  const STR_DATA = 'data';
45637
45667
  const STR_END = 'end';
@@ -45656,7 +45686,7 @@ const EVENTS = {
45656
45686
  };
45657
45687
  const EV = EVENTS;
45658
45688
  const THROTTLE_MODE_WATCH = 'watch';
45659
- const statMethods = { lstat: lstat$1, stat: stat$1 };
45689
+ const statMethods = { lstat, stat: stat$1 };
45660
45690
  const KEY_LISTENERS = 'listeners';
45661
45691
  const KEY_ERR = 'errHandlers';
45662
45692
  const KEY_RAW = 'rawEmitters';
@@ -45696,7 +45726,7 @@ const binaryExtensions = new Set([
45696
45726
  'xmind', 'xpi', 'xpm', 'xwd', 'xz',
45697
45727
  'z', 'zip', 'zipx',
45698
45728
  ]);
45699
- const isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
45729
+ const isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
45700
45730
  // TODO: emit errors properly. Example: EMFILE on Macos.
45701
45731
  const foreach = (val, fn) => {
45702
45732
  if (val instanceof Set) {
@@ -45749,7 +45779,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
45749
45779
  // emit based on events occurring for files from a directory's watcher in
45750
45780
  // case the file's watcher misses it (and rely on throttling to de-dupe)
45751
45781
  if (evPath && path !== evPath) {
45752
- fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
45782
+ fsWatchBroadcast(sp.resolve(path, evPath), KEY_LISTENERS, sp.join(path, evPath));
45753
45783
  }
45754
45784
  };
45755
45785
  try {
@@ -45920,6 +45950,8 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
45920
45950
  * @mixin
45921
45951
  */
45922
45952
  class NodeFsHandler {
45953
+ fsw;
45954
+ _boundHandleError;
45923
45955
  constructor(fsW) {
45924
45956
  this.fsw = fsW;
45925
45957
  this._boundHandleError = (error) => fsW._handleError(error);
@@ -45932,11 +45964,11 @@ class NodeFsHandler {
45932
45964
  */
45933
45965
  _watchWithNodeFs(path, listener) {
45934
45966
  const opts = this.fsw.options;
45935
- const directory = sysPath.dirname(path);
45936
- const basename = sysPath.basename(path);
45967
+ const directory = sp.dirname(path);
45968
+ const basename = sp.basename(path);
45937
45969
  const parent = this.fsw._getWatchedDir(directory);
45938
45970
  parent.add(basename);
45939
- const absolutePath = sysPath.resolve(path);
45971
+ const absolutePath = sp.resolve(path);
45940
45972
  const options = {
45941
45973
  persistent: opts.persistent,
45942
45974
  };
@@ -45968,8 +46000,8 @@ class NodeFsHandler {
45968
46000
  if (this.fsw.closed) {
45969
46001
  return;
45970
46002
  }
45971
- const dirname = sysPath.dirname(file);
45972
- const basename = sysPath.basename(file);
46003
+ const dirname = sp.dirname(file);
46004
+ const basename = sp.basename(file);
45973
46005
  const parent = this.fsw._getWatchedDir(dirname);
45974
46006
  // stats is always present
45975
46007
  let prevStats = stats;
@@ -46046,7 +46078,7 @@ class NodeFsHandler {
46046
46078
  this.fsw._incrReadyCount();
46047
46079
  let linkPath;
46048
46080
  try {
46049
- linkPath = await realpath$1(path);
46081
+ linkPath = await realpath(path);
46050
46082
  }
46051
46083
  catch (e) {
46052
46084
  this.fsw._emitReady();
@@ -46076,8 +46108,9 @@ class NodeFsHandler {
46076
46108
  }
46077
46109
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
46078
46110
  // Normalize the directory name on Windows
46079
- directory = sysPath.join(directory, '');
46080
- throttler = this.fsw._throttle('readdir', directory, 1000);
46111
+ directory = sp.join(directory, '');
46112
+ const throttleKey = target ? `${directory}:${target}` : directory;
46113
+ throttler = this.fsw._throttle('readdir', throttleKey, 1000);
46081
46114
  if (!throttler)
46082
46115
  return;
46083
46116
  const previous = this.fsw._getWatchedDir(wh.path);
@@ -46095,7 +46128,7 @@ class NodeFsHandler {
46095
46128
  return;
46096
46129
  }
46097
46130
  const item = entry.path;
46098
- let path = sysPath.join(directory, item);
46131
+ let path = sp.join(directory, item);
46099
46132
  current.add(item);
46100
46133
  if (entry.stats.isSymbolicLink() &&
46101
46134
  (await this._handleSymlink(entry, directory, path, item))) {
@@ -46111,7 +46144,7 @@ class NodeFsHandler {
46111
46144
  if (item === target || (!target && !previous.has(item))) {
46112
46145
  this.fsw._incrReadyCount();
46113
46146
  // ensure relativeness of path is preserved in case of watcher reuse
46114
- path = sysPath.join(dir, sysPath.relative(dir, path));
46147
+ path = sp.join(dir, sp.relative(dir, path));
46115
46148
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
46116
46149
  }
46117
46150
  })
@@ -46156,13 +46189,13 @@ class NodeFsHandler {
46156
46189
  * @returns closer for the watcher instance.
46157
46190
  */
46158
46191
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
46159
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
46160
- const tracked = parentDir.has(sysPath.basename(dir));
46192
+ const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
46193
+ const tracked = parentDir.has(sp.basename(dir));
46161
46194
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
46162
46195
  this.fsw._emit(EV.ADD_DIR, dir, stats);
46163
46196
  }
46164
46197
  // ensure dir is tracked (harmless if redundant)
46165
- parentDir.add(sysPath.basename(dir));
46198
+ parentDir.add(sp.basename(dir));
46166
46199
  this.fsw._getWatchedDir(dir);
46167
46200
  let throttler;
46168
46201
  let closer;
@@ -46214,8 +46247,8 @@ class NodeFsHandler {
46214
46247
  const follow = this.fsw.options.followSymlinks;
46215
46248
  let closer;
46216
46249
  if (stats.isDirectory()) {
46217
- const absPath = sysPath.resolve(path);
46218
- const targetPath = follow ? await realpath$1(path) : path;
46250
+ const absPath = sp.resolve(path);
46251
+ const targetPath = follow ? await realpath(path) : path;
46219
46252
  if (this.fsw.closed)
46220
46253
  return;
46221
46254
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -46227,10 +46260,10 @@ class NodeFsHandler {
46227
46260
  }
46228
46261
  }
46229
46262
  else if (stats.isSymbolicLink()) {
46230
- const targetPath = follow ? await realpath$1(path) : path;
46263
+ const targetPath = follow ? await realpath(path) : path;
46231
46264
  if (this.fsw.closed)
46232
46265
  return;
46233
- const parent = sysPath.dirname(wh.watchPath);
46266
+ const parent = sp.dirname(wh.watchPath);
46234
46267
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
46235
46268
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
46236
46269
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
@@ -46238,7 +46271,7 @@ class NodeFsHandler {
46238
46271
  return;
46239
46272
  // preserve this symlink's target path
46240
46273
  if (targetPath !== undefined) {
46241
- this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
46274
+ this.fsw._symlinkPaths.set(sp.resolve(path), targetPath);
46242
46275
  }
46243
46276
  }
46244
46277
  else {
@@ -46265,7 +46298,7 @@ const ONE_DOT = '.';
46265
46298
  const TWO_DOTS = '..';
46266
46299
  const STRING_TYPE = 'string';
46267
46300
  const BACK_SLASH_RE = /\\/g;
46268
- const DOUBLE_SLASH_RE = /\/\//;
46301
+ const DOUBLE_SLASH_RE = /\/\//g;
46269
46302
  const DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
46270
46303
  const REPLACER_RE = /^\.[/\\]/;
46271
46304
  function arrify(item) {
@@ -46284,11 +46317,11 @@ function createPattern(matcher) {
46284
46317
  if (matcher.path === string)
46285
46318
  return true;
46286
46319
  if (matcher.recursive) {
46287
- const relative = sysPath.relative(matcher.path, string);
46320
+ const relative = sp.relative(matcher.path, string);
46288
46321
  if (!relative) {
46289
46322
  return false;
46290
46323
  }
46291
- return !relative.startsWith('..') && !sysPath.isAbsolute(relative);
46324
+ return !relative.startsWith('..') && !sp.isAbsolute(relative);
46292
46325
  }
46293
46326
  return false;
46294
46327
  };
@@ -46298,14 +46331,12 @@ function createPattern(matcher) {
46298
46331
  function normalizePath(path) {
46299
46332
  if (typeof path !== 'string')
46300
46333
  throw new Error('string expected');
46301
- path = sysPath.normalize(path);
46334
+ path = sp.normalize(path);
46302
46335
  path = path.replace(/\\/g, '/');
46303
46336
  let prepend = false;
46304
46337
  if (path.startsWith('//'))
46305
46338
  prepend = true;
46306
- const DOUBLE_SLASH_RE = /\/\//;
46307
- while (path.match(DOUBLE_SLASH_RE))
46308
- path = path.replace(DOUBLE_SLASH_RE, '/');
46339
+ path = path.replace(DOUBLE_SLASH_RE, '/');
46309
46340
  if (prepend)
46310
46341
  path = '/' + path;
46311
46342
  return path;
@@ -46348,9 +46379,7 @@ const toUnix = (string) => {
46348
46379
  if (str.startsWith(SLASH_SLASH)) {
46349
46380
  prepend = true;
46350
46381
  }
46351
- while (str.match(DOUBLE_SLASH_RE)) {
46352
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
46353
- }
46382
+ str = str.replace(DOUBLE_SLASH_RE, SLASH);
46354
46383
  if (prepend) {
46355
46384
  str = SLASH + str;
46356
46385
  }
@@ -46358,27 +46387,30 @@ const toUnix = (string) => {
46358
46387
  };
46359
46388
  // Our version of upath.normalize
46360
46389
  // TODO: this is not equal to path-normalize module - investigate why
46361
- const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
46390
+ const normalizePathToUnix = (path) => toUnix(sp.normalize(toUnix(path)));
46362
46391
  // TODO: refactor
46363
46392
  const normalizeIgnored = (cwd = '') => (path) => {
46364
46393
  if (typeof path === 'string') {
46365
- return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
46394
+ return normalizePathToUnix(sp.isAbsolute(path) ? path : sp.join(cwd, path));
46366
46395
  }
46367
46396
  else {
46368
46397
  return path;
46369
46398
  }
46370
46399
  };
46371
46400
  const getAbsolutePath = (path, cwd) => {
46372
- if (sysPath.isAbsolute(path)) {
46401
+ if (sp.isAbsolute(path)) {
46373
46402
  return path;
46374
46403
  }
46375
- return sysPath.join(cwd, path);
46404
+ return sp.join(cwd, path);
46376
46405
  };
46377
46406
  const EMPTY_SET = Object.freeze(new Set());
46378
46407
  /**
46379
46408
  * Directory entry.
46380
46409
  */
46381
46410
  class DirEntry {
46411
+ path;
46412
+ _removeWatcher;
46413
+ items;
46382
46414
  constructor(dir, removeWatcher) {
46383
46415
  this.path = dir;
46384
46416
  this._removeWatcher = removeWatcher;
@@ -46400,11 +46432,11 @@ class DirEntry {
46400
46432
  return;
46401
46433
  const dir = this.path;
46402
46434
  try {
46403
- await readdir$2(dir);
46435
+ await readdir(dir);
46404
46436
  }
46405
46437
  catch (err) {
46406
46438
  if (this._removeWatcher) {
46407
- this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
46439
+ this._removeWatcher(sp.dirname(dir), sp.basename(dir));
46408
46440
  }
46409
46441
  }
46410
46442
  }
@@ -46431,12 +46463,19 @@ class DirEntry {
46431
46463
  const STAT_METHOD_F = 'stat';
46432
46464
  const STAT_METHOD_L = 'lstat';
46433
46465
  class WatchHelper {
46466
+ fsw;
46467
+ path;
46468
+ watchPath;
46469
+ fullWatchPath;
46470
+ dirParts;
46471
+ followSymlinks;
46472
+ statMethod;
46434
46473
  constructor(path, follow, fsw) {
46435
46474
  this.fsw = fsw;
46436
46475
  const watchPath = path;
46437
46476
  this.path = path = path.replace(REPLACER_RE, '');
46438
46477
  this.watchPath = watchPath;
46439
- this.fullWatchPath = sysPath.resolve(watchPath);
46478
+ this.fullWatchPath = sp.resolve(watchPath);
46440
46479
  this.dirParts = [];
46441
46480
  this.dirParts.forEach((parts) => {
46442
46481
  if (parts.length > 1)
@@ -46446,7 +46485,7 @@ class WatchHelper {
46446
46485
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
46447
46486
  }
46448
46487
  entryPath(entry) {
46449
- return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, entry.fullPath));
46488
+ return sp.join(this.watchPath, sp.relative(this.watchPath, entry.fullPath));
46450
46489
  }
46451
46490
  filterPath(entry) {
46452
46491
  const { stats } = entry;
@@ -46468,7 +46507,25 @@ class WatchHelper {
46468
46507
  * .add(directories)
46469
46508
  * .on('add', path => log('File', path, 'was added'))
46470
46509
  */
46471
- class FSWatcher extends EventEmitter$2 {
46510
+ class FSWatcher extends EventEmitter$1 {
46511
+ closed;
46512
+ options;
46513
+ _closers;
46514
+ _ignoredPaths;
46515
+ _throttled;
46516
+ _streams;
46517
+ _symlinkPaths;
46518
+ _watched;
46519
+ _pendingWrites;
46520
+ _pendingUnlinks;
46521
+ _readyCount;
46522
+ _emitReady;
46523
+ _closePromise;
46524
+ _userIgnored;
46525
+ _readyEmitted;
46526
+ _emitRaw;
46527
+ _boundRemove;
46528
+ _nodeFsHandler;
46472
46529
  // Not indenting methods for history sake; for now.
46473
46530
  constructor(_opts = {}) {
46474
46531
  super();
@@ -46602,7 +46659,7 @@ class FSWatcher extends EventEmitter$2 {
46602
46659
  return;
46603
46660
  results.forEach((item) => {
46604
46661
  if (item)
46605
- this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
46662
+ this.add(sp.dirname(item), sp.basename(_origAdd || item));
46606
46663
  });
46607
46664
  });
46608
46665
  return this;
@@ -46617,10 +46674,10 @@ class FSWatcher extends EventEmitter$2 {
46617
46674
  const { cwd } = this.options;
46618
46675
  paths.forEach((path) => {
46619
46676
  // convert to absolute path unless relative path already matches
46620
- if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
46677
+ if (!sp.isAbsolute(path) && !this._closers.has(path)) {
46621
46678
  if (cwd)
46622
- path = sysPath.join(cwd, path);
46623
- path = sysPath.resolve(path);
46679
+ path = sp.join(cwd, path);
46680
+ path = sp.resolve(path);
46624
46681
  }
46625
46682
  this._closePath(path);
46626
46683
  this._addIgnoredPath(path);
@@ -46674,7 +46731,7 @@ class FSWatcher extends EventEmitter$2 {
46674
46731
  getWatched() {
46675
46732
  const watchList = {};
46676
46733
  this._watched.forEach((entry, dir) => {
46677
- const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
46734
+ const key = this.options.cwd ? sp.relative(this.options.cwd, dir) : dir;
46678
46735
  const index = key || ONE_DOT;
46679
46736
  watchList[index] = entry.getChildren().sort();
46680
46737
  });
@@ -46700,9 +46757,9 @@ class FSWatcher extends EventEmitter$2 {
46700
46757
  return;
46701
46758
  const opts = this.options;
46702
46759
  if (isWindows)
46703
- path = sysPath.normalize(path);
46760
+ path = sp.normalize(path);
46704
46761
  if (opts.cwd)
46705
- path = sysPath.relative(opts.cwd, path);
46762
+ path = sp.relative(opts.cwd, path);
46706
46763
  const args = [path];
46707
46764
  if (stats != null)
46708
46765
  args.push(stats);
@@ -46758,7 +46815,7 @@ class FSWatcher extends EventEmitter$2 {
46758
46815
  if (opts.alwaysStat &&
46759
46816
  stats === undefined &&
46760
46817
  (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
46761
- const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
46818
+ const fullPath = opts.cwd ? sp.join(opts.cwd, path) : path;
46762
46819
  let stats;
46763
46820
  try {
46764
46821
  stats = await stat$1(fullPath);
@@ -46841,8 +46898,8 @@ class FSWatcher extends EventEmitter$2 {
46841
46898
  const pollInterval = awf.pollInterval;
46842
46899
  let timeoutHandler;
46843
46900
  let fullPath = path;
46844
- if (this.options.cwd && !sysPath.isAbsolute(path)) {
46845
- fullPath = sysPath.join(this.options.cwd, path);
46901
+ if (this.options.cwd && !sp.isAbsolute(path)) {
46902
+ fullPath = sp.join(this.options.cwd, path);
46846
46903
  }
46847
46904
  const now = new Date();
46848
46905
  const writes = this._pendingWrites;
@@ -46913,7 +46970,7 @@ class FSWatcher extends EventEmitter$2 {
46913
46970
  * @param directory path of the directory
46914
46971
  */
46915
46972
  _getWatchedDir(directory) {
46916
- const dir = sysPath.resolve(directory);
46973
+ const dir = sp.resolve(directory);
46917
46974
  if (!this._watched.has(dir))
46918
46975
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
46919
46976
  return this._watched.get(dir);
@@ -46939,8 +46996,8 @@ class FSWatcher extends EventEmitter$2 {
46939
46996
  // if what is being deleted is a directory, get that directory's paths
46940
46997
  // for recursive deleting and cleaning of watched object
46941
46998
  // if it is not a directory, nestedDirectoryChildren will be empty array
46942
- const path = sysPath.join(directory, item);
46943
- const fullPath = sysPath.resolve(path);
46999
+ const path = sp.join(directory, item);
47000
+ const fullPath = sp.resolve(path);
46944
47001
  isDirectory =
46945
47002
  isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
46946
47003
  // prevent duplicate handling in case of arriving here nearly simultaneously
@@ -46972,7 +47029,7 @@ class FSWatcher extends EventEmitter$2 {
46972
47029
  // If we wait for this file to be fully written, cancel the wait.
46973
47030
  let relPath = path;
46974
47031
  if (this.options.cwd)
46975
- relPath = sysPath.relative(this.options.cwd, path);
47032
+ relPath = sp.relative(this.options.cwd, path);
46976
47033
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
46977
47034
  const event = this._pendingWrites.get(relPath).cancelWait();
46978
47035
  if (event === EVENTS.ADD)
@@ -46993,8 +47050,8 @@ class FSWatcher extends EventEmitter$2 {
46993
47050
  */
46994
47051
  _closePath(path) {
46995
47052
  this._closeFile(path);
46996
- const dir = sysPath.dirname(path);
46997
- this._getWatchedDir(dir).remove(sysPath.basename(path));
47053
+ const dir = sp.dirname(path);
47054
+ this._getWatchedDir(dir).remove(sp.basename(path));
46998
47055
  }
46999
47056
  /**
47000
47057
  * Closes only file-specific watchers
@@ -48905,7 +48962,7 @@ function requireHybi () {
48905
48962
  hasRequiredHybi = 1;
48906
48963
 
48907
48964
  var Buffer = requireSafeBuffer().Buffer,
48908
- crypto = require$$1$1,
48965
+ crypto = require$$1$2,
48909
48966
  util = require$$1,
48910
48967
  Extensions = requireWebsocket_extensions(),
48911
48968
  Base = requireBase(),
@@ -49503,7 +49560,7 @@ function requireClient$2 () {
49503
49560
  hasRequiredClient$2 = 1;
49504
49561
 
49505
49562
  var Buffer = requireSafeBuffer().Buffer,
49506
- crypto = require$$1$1,
49563
+ crypto = require$$1$2,
49507
49564
  url = require$$2,
49508
49565
  util = require$$1,
49509
49566
  HttpParser = requireHttp_parser(),
@@ -49786,7 +49843,7 @@ function requireDraft76 () {
49786
49843
  var Buffer = requireSafeBuffer().Buffer,
49787
49844
  Base = requireBase(),
49788
49845
  Draft75 = requireDraft75(),
49789
- crypto = require$$1$1,
49846
+ crypto = require$$1$2,
49790
49847
  util = require$$1;
49791
49848
 
49792
49849
 
@@ -50355,7 +50412,7 @@ function requireClient$1 () {
50355
50412
  hasRequiredClient$1 = 1;
50356
50413
 
50357
50414
  var util = require$$1,
50358
- net = require$$1$2,
50415
+ net = require$$1$3,
50359
50416
  tls = require$$2$1,
50360
50417
  url = require$$2,
50361
50418
  driver = requireDriver(),
@@ -51377,7 +51434,7 @@ function requireSupportsColor () {
51377
51434
  if (hasRequiredSupportsColor) return supportsColor_1;
51378
51435
  hasRequiredSupportsColor = 1;
51379
51436
  const os = require$$0$6;
51380
- const tty = require$$1$3;
51437
+ const tty = require$$1$4;
51381
51438
  const hasFlag = requireHasFlag();
51382
51439
 
51383
51440
  const {env} = process;
@@ -51523,7 +51580,7 @@ function requireNode () {
51523
51580
  /**
51524
51581
  * Module dependencies.
51525
51582
  */
51526
- var tty = require$$1$3;
51583
+ var tty = require$$1$4;
51527
51584
 
51528
51585
  var util = require$$1;
51529
51586
  /**
@@ -55815,7 +55872,7 @@ function requireServer () {
55815
55872
 
55816
55873
  var _fs2 = _interopRequireDefault(_fs);
55817
55874
 
55818
- var _http = require$$1$4;
55875
+ var _http = require$$1$5;
55819
55876
 
55820
55877
  var _http2 = _interopRequireDefault(_http);
55821
55878
 
@@ -56277,4 +56334,4 @@ var srcExports = requireSrc();
56277
56334
  var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
56278
56335
 
56279
56336
  export { HighlightJS as H, MarkdownIt as M, deflist_plugin as a, closest as b, createTwoFilesPatch as c, dedent as d, distance as e, fm as f, globSync as g, glob as h, isCI as i, moduleImporter as j, cliProgress as k, createInstance as l, minimatch as m, fse as n, inter as o, tinylr as t, watch$1 as w };
56280
- //# sourceMappingURL=vendor-BPf0gRBB.mjs.map
56337
+ //# sourceMappingURL=vendor-DMxJoCDS.mjs.map