@forsakringskassan/docs-generator 2.33.1 → 2.35.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.
- package/dist/{create-markdown-renderer-BaSxCpTW.mjs → create-markdown-renderer-CEuJ5uE8.mjs} +7 -7
- package/dist/create-markdown-renderer-CEuJ5uE8.mjs.map +1 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +49 -38
- package/dist/index.mjs.map +1 -1
- package/dist/markdown.mjs +4 -4
- package/dist/style/core.css +23 -42
- package/dist/style/index.css +28 -42
- package/dist/style/site.css +5 -0
- package/dist/style/theme/fkui.css +6 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/{vendor-BAYn8diL.mjs → vendor-CMa7Qsb1.mjs} +214 -140
- package/dist/vendor-CMa7Qsb1.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/create-markdown-renderer-BaSxCpTW.mjs.map +0 -1
- package/dist/vendor-BAYn8diL.mjs.map +0 -1
|
@@ -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
|
|
7
|
-
import
|
|
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
|
|
16
|
+
import require$$0$2 from 'stream';
|
|
16
17
|
import require$$1 from 'util';
|
|
17
18
|
import require$$5 from 'assert';
|
|
18
|
-
import
|
|
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
|
|
23
|
-
import {
|
|
24
|
-
import require$$
|
|
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$
|
|
30
|
-
import require$$1$
|
|
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$
|
|
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 */
|
|
@@ -13083,7 +13083,7 @@ const entToType = (s) => s.isFile() ? IFREG
|
|
|
13083
13083
|
: s.isFIFO() ? IFIFO
|
|
13084
13084
|
: UNKNOWN;
|
|
13085
13085
|
// normalize unicode path names
|
|
13086
|
-
const normalizeCache = new
|
|
13086
|
+
const normalizeCache = new LRUCache({ max: 2 ** 12 });
|
|
13087
13087
|
const normalize = (s) => {
|
|
13088
13088
|
const c = normalizeCache.get(s);
|
|
13089
13089
|
if (c)
|
|
@@ -13092,7 +13092,7 @@ const normalize = (s) => {
|
|
|
13092
13092
|
normalizeCache.set(s, n);
|
|
13093
13093
|
return n;
|
|
13094
13094
|
};
|
|
13095
|
-
const normalizeNocaseCache = new
|
|
13095
|
+
const normalizeNocaseCache = new LRUCache({ max: 2 ** 12 });
|
|
13096
13096
|
const normalizeNocase = (s) => {
|
|
13097
13097
|
const c = normalizeNocaseCache.get(s);
|
|
13098
13098
|
if (c)
|
|
@@ -13281,6 +13281,7 @@ class PathBase {
|
|
|
13281
13281
|
get parentPath() {
|
|
13282
13282
|
return (this.parent || this).fullpath();
|
|
13283
13283
|
}
|
|
13284
|
+
/* c8 ignore start */
|
|
13284
13285
|
/**
|
|
13285
13286
|
* Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
|
|
13286
13287
|
* this property refers to the *parent* path, not the path object itself.
|
|
@@ -13290,6 +13291,7 @@ class PathBase {
|
|
|
13290
13291
|
get path() {
|
|
13291
13292
|
return this.parentPath;
|
|
13292
13293
|
}
|
|
13294
|
+
/* c8 ignore stop */
|
|
13293
13295
|
/**
|
|
13294
13296
|
* Do not create new Path objects directly. They should always be accessed
|
|
13295
13297
|
* via the PathScurry class or other methods on the Path class.
|
|
@@ -18083,6 +18085,22 @@ function requireLoader () {
|
|
|
18083
18085
|
);
|
|
18084
18086
|
}
|
|
18085
18087
|
|
|
18088
|
+
// set a property of a literal object, while protecting against prototype pollution,
|
|
18089
|
+
// see https://github.com/nodeca/js-yaml/issues/164 for more details
|
|
18090
|
+
function setProperty(object, key, value) {
|
|
18091
|
+
// used for this specific key only because Object.defineProperty is slow
|
|
18092
|
+
if (key === '__proto__') {
|
|
18093
|
+
Object.defineProperty(object, key, {
|
|
18094
|
+
configurable: true,
|
|
18095
|
+
enumerable: true,
|
|
18096
|
+
writable: true,
|
|
18097
|
+
value: value
|
|
18098
|
+
});
|
|
18099
|
+
} else {
|
|
18100
|
+
object[key] = value;
|
|
18101
|
+
}
|
|
18102
|
+
}
|
|
18103
|
+
|
|
18086
18104
|
var simpleEscapeCheck = new Array(256); // integer, for fast access
|
|
18087
18105
|
var simpleEscapeMap = new Array(256);
|
|
18088
18106
|
for (var i = 0; i < 256; i++) {
|
|
@@ -18240,7 +18258,7 @@ function requireLoader () {
|
|
|
18240
18258
|
key = sourceKeys[index];
|
|
18241
18259
|
|
|
18242
18260
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
18243
|
-
destination
|
|
18261
|
+
setProperty(destination, key, source[key]);
|
|
18244
18262
|
overridableKeys[key] = true;
|
|
18245
18263
|
}
|
|
18246
18264
|
}
|
|
@@ -18296,7 +18314,7 @@ function requireLoader () {
|
|
|
18296
18314
|
state.position = startPos || state.position;
|
|
18297
18315
|
throwError(state, 'duplicated mapping key');
|
|
18298
18316
|
}
|
|
18299
|
-
_result
|
|
18317
|
+
setProperty(_result, keyNode, valueNode);
|
|
18300
18318
|
delete overridableKeys[keyNode];
|
|
18301
18319
|
}
|
|
18302
18320
|
|
|
@@ -22432,7 +22450,7 @@ var hasRequiredUtils$2;
|
|
|
22432
22450
|
function requireUtils$2 () {
|
|
22433
22451
|
if (hasRequiredUtils$2) return utils$2;
|
|
22434
22452
|
hasRequiredUtils$2 = 1;
|
|
22435
|
-
const path =
|
|
22453
|
+
const path = require$$1$1;
|
|
22436
22454
|
|
|
22437
22455
|
// https://github.com/nodejs/node/issues/8987
|
|
22438
22456
|
// https://github.com/libuv/libuv/pull/1088
|
|
@@ -22578,7 +22596,7 @@ function requireStat () {
|
|
|
22578
22596
|
hasRequiredStat = 1;
|
|
22579
22597
|
|
|
22580
22598
|
const fs = requireFs();
|
|
22581
|
-
const path =
|
|
22599
|
+
const path = require$$1$1;
|
|
22582
22600
|
const u = requireUniversalify().fromPromise;
|
|
22583
22601
|
|
|
22584
22602
|
function getStats (src, dest, opts) {
|
|
@@ -22782,7 +22800,7 @@ function requireCopy$1 () {
|
|
|
22782
22800
|
hasRequiredCopy$1 = 1;
|
|
22783
22801
|
|
|
22784
22802
|
const fs = requireFs();
|
|
22785
|
-
const path =
|
|
22803
|
+
const path = require$$1$1;
|
|
22786
22804
|
const { mkdirs } = requireMkdirs();
|
|
22787
22805
|
const { pathExists } = requirePathExists();
|
|
22788
22806
|
const { utimesMillis } = requireUtimes();
|
|
@@ -22965,7 +22983,7 @@ function requireCopySync () {
|
|
|
22965
22983
|
hasRequiredCopySync = 1;
|
|
22966
22984
|
|
|
22967
22985
|
const fs = requireGracefulFs();
|
|
22968
|
-
const path =
|
|
22986
|
+
const path = require$$1$1;
|
|
22969
22987
|
const mkdirsSync = requireMkdirs().mkdirsSync;
|
|
22970
22988
|
const utimesMillisSync = requireUtimes().utimesMillisSync;
|
|
22971
22989
|
const stat = requireStat();
|
|
@@ -23185,7 +23203,7 @@ function requireEmpty () {
|
|
|
23185
23203
|
|
|
23186
23204
|
const u = requireUniversalify().fromPromise;
|
|
23187
23205
|
const fs = requireFs();
|
|
23188
|
-
const path =
|
|
23206
|
+
const path = require$$1$1;
|
|
23189
23207
|
const mkdir = requireMkdirs();
|
|
23190
23208
|
const remove = requireRemove();
|
|
23191
23209
|
|
|
@@ -23231,7 +23249,7 @@ function requireFile () {
|
|
|
23231
23249
|
hasRequiredFile = 1;
|
|
23232
23250
|
|
|
23233
23251
|
const u = requireUniversalify().fromPromise;
|
|
23234
|
-
const path =
|
|
23252
|
+
const path = require$$1$1;
|
|
23235
23253
|
const fs = requireFs();
|
|
23236
23254
|
const mkdir = requireMkdirs();
|
|
23237
23255
|
|
|
@@ -23305,7 +23323,7 @@ function requireLink () {
|
|
|
23305
23323
|
hasRequiredLink = 1;
|
|
23306
23324
|
|
|
23307
23325
|
const u = requireUniversalify().fromPromise;
|
|
23308
|
-
const path =
|
|
23326
|
+
const path = require$$1$1;
|
|
23309
23327
|
const fs = requireFs();
|
|
23310
23328
|
const mkdir = requireMkdirs();
|
|
23311
23329
|
const { pathExists } = requirePathExists();
|
|
@@ -23376,7 +23394,7 @@ function requireSymlinkPaths () {
|
|
|
23376
23394
|
if (hasRequiredSymlinkPaths) return symlinkPaths_1;
|
|
23377
23395
|
hasRequiredSymlinkPaths = 1;
|
|
23378
23396
|
|
|
23379
|
-
const path =
|
|
23397
|
+
const path = require$$1$1;
|
|
23380
23398
|
const fs = requireFs();
|
|
23381
23399
|
const { pathExists } = requirePathExists();
|
|
23382
23400
|
|
|
@@ -23528,7 +23546,7 @@ function requireSymlink () {
|
|
|
23528
23546
|
hasRequiredSymlink = 1;
|
|
23529
23547
|
|
|
23530
23548
|
const u = requireUniversalify().fromPromise;
|
|
23531
|
-
const path =
|
|
23549
|
+
const path = require$$1$1;
|
|
23532
23550
|
const fs = requireFs();
|
|
23533
23551
|
|
|
23534
23552
|
const { mkdirs, mkdirsSync } = requireMkdirs();
|
|
@@ -23774,7 +23792,7 @@ function requireOutputFile () {
|
|
|
23774
23792
|
|
|
23775
23793
|
const u = requireUniversalify().fromPromise;
|
|
23776
23794
|
const fs = requireFs();
|
|
23777
|
-
const path =
|
|
23795
|
+
const path = require$$1$1;
|
|
23778
23796
|
const mkdir = requireMkdirs();
|
|
23779
23797
|
const pathExists = requirePathExists().pathExists;
|
|
23780
23798
|
|
|
@@ -23876,7 +23894,7 @@ function requireMove$1 () {
|
|
|
23876
23894
|
hasRequiredMove$1 = 1;
|
|
23877
23895
|
|
|
23878
23896
|
const fs = requireFs();
|
|
23879
|
-
const path =
|
|
23897
|
+
const path = require$$1$1;
|
|
23880
23898
|
const { copy } = requireCopy();
|
|
23881
23899
|
const { remove } = requireRemove();
|
|
23882
23900
|
const { mkdirp } = requireMkdirs();
|
|
@@ -23943,7 +23961,7 @@ function requireMoveSync () {
|
|
|
23943
23961
|
hasRequiredMoveSync = 1;
|
|
23944
23962
|
|
|
23945
23963
|
const fs = requireGracefulFs();
|
|
23946
|
-
const path =
|
|
23964
|
+
const path = require$$1$1;
|
|
23947
23965
|
const copySync = requireCopy().copySync;
|
|
23948
23966
|
const removeSync = requireRemove().removeSync;
|
|
23949
23967
|
const mkdirpSync = requireMkdirs().mkdirpSync;
|
|
@@ -26352,7 +26370,7 @@ function requireResolvePackagePath () {
|
|
|
26352
26370
|
// extracted in part from: https://github.com/stefanpenner/hash-for-dep/blob/15b2ebcf22024ceb2eb7907f8c412ae40f87b15e/lib/resolve-package-path.js#L1
|
|
26353
26371
|
//
|
|
26354
26372
|
const fs = require$$0$3;
|
|
26355
|
-
const path =
|
|
26373
|
+
const path = require$$1$1;
|
|
26356
26374
|
const pathRoot = requirePathRoot();
|
|
26357
26375
|
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
26358
26376
|
/*
|
|
@@ -26660,7 +26678,7 @@ function requireLib$1 () {
|
|
|
26660
26678
|
var __importDefault = (lib$1 && lib$1.__importDefault) || function (mod) {
|
|
26661
26679
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26662
26680
|
};
|
|
26663
|
-
const path_1 = __importDefault(
|
|
26681
|
+
const path_1 = __importDefault(require$$1$1);
|
|
26664
26682
|
const resolve_package_path_1 = __importDefault(requireResolvePackagePath());
|
|
26665
26683
|
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
26666
26684
|
const ALLOWED_ERROR_CODES = [
|
|
@@ -26836,14 +26854,14 @@ var moduleImporter = {
|
|
|
26836
26854
|
readFileSync(packagePath, { encoding: "utf-8" })
|
|
26837
26855
|
);
|
|
26838
26856
|
}
|
|
26839
|
-
const moduleDirectory =
|
|
26857
|
+
const moduleDirectory = sp__default.dirname(packagePath);
|
|
26840
26858
|
try {
|
|
26841
26859
|
const match = o(packageJson, filePath.substring(1), {
|
|
26842
26860
|
conditions: ["sass"]
|
|
26843
26861
|
});
|
|
26844
26862
|
if (match && match.length === 1) {
|
|
26845
26863
|
return new URL(
|
|
26846
|
-
pathToFileURL(
|
|
26864
|
+
pathToFileURL(sp__default.join(moduleDirectory, match[0]))
|
|
26847
26865
|
);
|
|
26848
26866
|
}
|
|
26849
26867
|
} catch {
|
|
@@ -26852,12 +26870,12 @@ var moduleImporter = {
|
|
|
26852
26870
|
const match = i(packageJson, { fields: ["sass", "main"] });
|
|
26853
26871
|
if (match) {
|
|
26854
26872
|
return new URL(
|
|
26855
|
-
pathToFileURL(
|
|
26873
|
+
pathToFileURL(sp__default.join(moduleDirectory, match))
|
|
26856
26874
|
);
|
|
26857
26875
|
}
|
|
26858
26876
|
}
|
|
26859
|
-
const directory =
|
|
26860
|
-
const fileName =
|
|
26877
|
+
const directory = sp__default.dirname(filePath);
|
|
26878
|
+
const fileName = sp__default.basename(filePath);
|
|
26861
26879
|
const search = [
|
|
26862
26880
|
`${fileName}.css`,
|
|
26863
26881
|
`${fileName}.scss`,
|
|
@@ -26867,7 +26885,7 @@ var moduleImporter = {
|
|
|
26867
26885
|
];
|
|
26868
26886
|
for (const variant of search) {
|
|
26869
26887
|
try {
|
|
26870
|
-
const moduleName =
|
|
26888
|
+
const moduleName = sp__default.posix.join(
|
|
26871
26889
|
moduleDirectory,
|
|
26872
26890
|
directory,
|
|
26873
26891
|
variant
|
|
@@ -45389,30 +45407,44 @@ var HighlightJS = /*@__PURE__*/getDefaultExportFromCjs(commonExports);
|
|
|
45389
45407
|
|
|
45390
45408
|
// https://nodejs.org/api/packages.html#packages_writing_dual_packages_while_avoiding_or_minimizing_hazards
|
|
45391
45409
|
|
|
45392
|
-
|
|
45393
|
-
|
|
45394
|
-
|
|
45395
|
-
|
|
45396
|
-
|
|
45397
|
-
|
|
45398
|
-
|
|
45399
|
-
|
|
45400
|
-
|
|
45401
|
-
|
|
45402
|
-
|
|
45403
|
-
|
|
45410
|
+
const EntryTypes = {
|
|
45411
|
+
FILE_TYPE: 'files',
|
|
45412
|
+
DIR_TYPE: 'directories',
|
|
45413
|
+
FILE_DIR_TYPE: 'files_directories',
|
|
45414
|
+
EVERYTHING_TYPE: 'all',
|
|
45415
|
+
};
|
|
45416
|
+
const defaultOptions = {
|
|
45417
|
+
root: '.',
|
|
45418
|
+
fileFilter: (_entryInfo) => true,
|
|
45419
|
+
directoryFilter: (_entryInfo) => true,
|
|
45420
|
+
type: EntryTypes.FILE_TYPE,
|
|
45421
|
+
lstat: false,
|
|
45422
|
+
depth: 2147483648,
|
|
45423
|
+
alwaysStat: false,
|
|
45424
|
+
highWaterMark: 4096,
|
|
45425
|
+
};
|
|
45426
|
+
Object.freeze(defaultOptions);
|
|
45404
45427
|
const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
|
|
45405
45428
|
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
|
|
45406
|
-
const
|
|
45407
|
-
|
|
45408
|
-
|
|
45409
|
-
|
|
45410
|
-
|
|
45411
|
-
|
|
45412
|
-
const
|
|
45429
|
+
const ALL_TYPES = [
|
|
45430
|
+
EntryTypes.DIR_TYPE,
|
|
45431
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
45432
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
45433
|
+
EntryTypes.FILE_TYPE,
|
|
45434
|
+
];
|
|
45435
|
+
const DIR_TYPES = new Set([
|
|
45436
|
+
EntryTypes.DIR_TYPE,
|
|
45437
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
45438
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
45439
|
+
]);
|
|
45440
|
+
const FILE_TYPES = new Set([
|
|
45441
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
45442
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
45443
|
+
EntryTypes.FILE_TYPE,
|
|
45444
|
+
]);
|
|
45413
45445
|
const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
|
|
45414
45446
|
const wantBigintFsStats = process.platform === 'win32';
|
|
45415
|
-
const emptyFn = (
|
|
45447
|
+
const emptyFn = (_entryInfo) => true;
|
|
45416
45448
|
const normalizeFilter = (filter) => {
|
|
45417
45449
|
if (filter === undefined)
|
|
45418
45450
|
return emptyFn;
|
|
@@ -45428,18 +45460,33 @@ const normalizeFilter = (filter) => {
|
|
|
45428
45460
|
}
|
|
45429
45461
|
return emptyFn;
|
|
45430
45462
|
};
|
|
45463
|
+
/** Readable readdir stream, emitting new files as they're being listed. */
|
|
45431
45464
|
class ReaddirpStream extends Readable {
|
|
45465
|
+
parents;
|
|
45466
|
+
reading;
|
|
45467
|
+
parent;
|
|
45468
|
+
_stat;
|
|
45469
|
+
_maxDepth;
|
|
45470
|
+
_wantsDir;
|
|
45471
|
+
_wantsFile;
|
|
45472
|
+
_wantsEverything;
|
|
45473
|
+
_root;
|
|
45474
|
+
_isDirent;
|
|
45475
|
+
_statsProp;
|
|
45476
|
+
_rdOptions;
|
|
45477
|
+
_fileFilter;
|
|
45478
|
+
_directoryFilter;
|
|
45432
45479
|
constructor(options = {}) {
|
|
45433
45480
|
super({
|
|
45434
45481
|
objectMode: true,
|
|
45435
45482
|
autoDestroy: true,
|
|
45436
45483
|
highWaterMark: options.highWaterMark,
|
|
45437
45484
|
});
|
|
45438
|
-
const opts = { ...defaultOptions
|
|
45485
|
+
const opts = { ...defaultOptions, ...options };
|
|
45439
45486
|
const { root, type } = opts;
|
|
45440
45487
|
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
45441
45488
|
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
45442
|
-
const statMethod = opts.lstat ? lstat
|
|
45489
|
+
const statMethod = opts.lstat ? lstat : stat$1;
|
|
45443
45490
|
// Use bigint stats if it's windows and stat() supports options (node 10+).
|
|
45444
45491
|
if (wantBigintFsStats) {
|
|
45445
45492
|
this._stat = (path) => statMethod(path, { bigint: true });
|
|
@@ -45447,10 +45494,11 @@ class ReaddirpStream extends Readable {
|
|
|
45447
45494
|
else {
|
|
45448
45495
|
this._stat = statMethod;
|
|
45449
45496
|
}
|
|
45450
|
-
this._maxDepth =
|
|
45451
|
-
|
|
45452
|
-
this.
|
|
45453
|
-
this.
|
|
45497
|
+
this._maxDepth =
|
|
45498
|
+
opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
|
|
45499
|
+
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
45500
|
+
this._wantsFile = type ? FILE_TYPES.has(type) : false;
|
|
45501
|
+
this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
|
|
45454
45502
|
this._root = resolve(root);
|
|
45455
45503
|
this._isDirent = !opts.alwaysStat;
|
|
45456
45504
|
this._statsProp = this._isDirent ? 'dirent' : 'stats';
|
|
@@ -45473,10 +45521,8 @@ class ReaddirpStream extends Readable {
|
|
|
45473
45521
|
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
|
|
45474
45522
|
const awaited = await Promise.all(slice);
|
|
45475
45523
|
for (const entry of awaited) {
|
|
45476
|
-
if (!entry)
|
|
45477
|
-
|
|
45478
|
-
return;
|
|
45479
|
-
}
|
|
45524
|
+
if (!entry)
|
|
45525
|
+
continue;
|
|
45480
45526
|
if (this.destroyed)
|
|
45481
45527
|
return;
|
|
45482
45528
|
const entryType = await this._getEntryType(entry);
|
|
@@ -45520,7 +45566,7 @@ class ReaddirpStream extends Readable {
|
|
|
45520
45566
|
async _exploreDir(path, depth) {
|
|
45521
45567
|
let files;
|
|
45522
45568
|
try {
|
|
45523
|
-
files = await readdir
|
|
45569
|
+
files = await readdir(path, this._rdOptions);
|
|
45524
45570
|
}
|
|
45525
45571
|
catch (error) {
|
|
45526
45572
|
this._onError(error);
|
|
@@ -45563,8 +45609,8 @@ class ReaddirpStream extends Readable {
|
|
|
45563
45609
|
if (stats && stats.isSymbolicLink()) {
|
|
45564
45610
|
const full = entry.fullPath;
|
|
45565
45611
|
try {
|
|
45566
|
-
const entryRealPath = await realpath
|
|
45567
|
-
const entryRealPathStats = await lstat
|
|
45612
|
+
const entryRealPath = await realpath(full);
|
|
45613
|
+
const entryRealPathStats = await lstat(entryRealPath);
|
|
45568
45614
|
if (entryRealPathStats.isFile()) {
|
|
45569
45615
|
return 'file';
|
|
45570
45616
|
}
|
|
@@ -45591,15 +45637,16 @@ class ReaddirpStream extends Readable {
|
|
|
45591
45637
|
}
|
|
45592
45638
|
}
|
|
45593
45639
|
/**
|
|
45594
|
-
*
|
|
45640
|
+
* Streaming version: Reads all files and directories in given root recursively.
|
|
45641
|
+
* Consumes ~constant small amount of RAM.
|
|
45595
45642
|
* @param root Root directory
|
|
45596
45643
|
* @param options Options to specify root (start directory), filters and recursion depth
|
|
45597
45644
|
*/
|
|
45598
|
-
|
|
45645
|
+
function readdirp(root, options = {}) {
|
|
45599
45646
|
// @ts-ignore
|
|
45600
45647
|
let type = options.entryType || options.type;
|
|
45601
45648
|
if (type === 'both')
|
|
45602
|
-
type = FILE_DIR_TYPE; // backwards-compatibility
|
|
45649
|
+
type = EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
|
|
45603
45650
|
if (type)
|
|
45604
45651
|
options.type = type;
|
|
45605
45652
|
if (!root) {
|
|
@@ -45613,7 +45660,7 @@ const readdirp = (root, options = {}) => {
|
|
|
45613
45660
|
}
|
|
45614
45661
|
options.root = root;
|
|
45615
45662
|
return new ReaddirpStream(options);
|
|
45616
|
-
}
|
|
45663
|
+
}
|
|
45617
45664
|
|
|
45618
45665
|
const STR_DATA = 'data';
|
|
45619
45666
|
const STR_END = 'end';
|
|
@@ -45638,7 +45685,7 @@ const EVENTS = {
|
|
|
45638
45685
|
};
|
|
45639
45686
|
const EV = EVENTS;
|
|
45640
45687
|
const THROTTLE_MODE_WATCH = 'watch';
|
|
45641
|
-
const statMethods = { lstat
|
|
45688
|
+
const statMethods = { lstat, stat: stat$1 };
|
|
45642
45689
|
const KEY_LISTENERS = 'listeners';
|
|
45643
45690
|
const KEY_ERR = 'errHandlers';
|
|
45644
45691
|
const KEY_RAW = 'rawEmitters';
|
|
@@ -45678,7 +45725,7 @@ const binaryExtensions = new Set([
|
|
|
45678
45725
|
'xmind', 'xpi', 'xpm', 'xwd', 'xz',
|
|
45679
45726
|
'z', 'zip', 'zipx',
|
|
45680
45727
|
]);
|
|
45681
|
-
const isBinaryPath = (filePath) => binaryExtensions.has(
|
|
45728
|
+
const isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
|
|
45682
45729
|
// TODO: emit errors properly. Example: EMFILE on Macos.
|
|
45683
45730
|
const foreach = (val, fn) => {
|
|
45684
45731
|
if (val instanceof Set) {
|
|
@@ -45731,7 +45778,7 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
|
|
|
45731
45778
|
// emit based on events occurring for files from a directory's watcher in
|
|
45732
45779
|
// case the file's watcher misses it (and rely on throttling to de-dupe)
|
|
45733
45780
|
if (evPath && path !== evPath) {
|
|
45734
|
-
fsWatchBroadcast(
|
|
45781
|
+
fsWatchBroadcast(sp.resolve(path, evPath), KEY_LISTENERS, sp.join(path, evPath));
|
|
45735
45782
|
}
|
|
45736
45783
|
};
|
|
45737
45784
|
try {
|
|
@@ -45902,6 +45949,8 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
45902
45949
|
* @mixin
|
|
45903
45950
|
*/
|
|
45904
45951
|
class NodeFsHandler {
|
|
45952
|
+
fsw;
|
|
45953
|
+
_boundHandleError;
|
|
45905
45954
|
constructor(fsW) {
|
|
45906
45955
|
this.fsw = fsW;
|
|
45907
45956
|
this._boundHandleError = (error) => fsW._handleError(error);
|
|
@@ -45914,11 +45963,11 @@ class NodeFsHandler {
|
|
|
45914
45963
|
*/
|
|
45915
45964
|
_watchWithNodeFs(path, listener) {
|
|
45916
45965
|
const opts = this.fsw.options;
|
|
45917
|
-
const directory =
|
|
45918
|
-
const basename =
|
|
45966
|
+
const directory = sp.dirname(path);
|
|
45967
|
+
const basename = sp.basename(path);
|
|
45919
45968
|
const parent = this.fsw._getWatchedDir(directory);
|
|
45920
45969
|
parent.add(basename);
|
|
45921
|
-
const absolutePath =
|
|
45970
|
+
const absolutePath = sp.resolve(path);
|
|
45922
45971
|
const options = {
|
|
45923
45972
|
persistent: opts.persistent,
|
|
45924
45973
|
};
|
|
@@ -45950,8 +45999,8 @@ class NodeFsHandler {
|
|
|
45950
45999
|
if (this.fsw.closed) {
|
|
45951
46000
|
return;
|
|
45952
46001
|
}
|
|
45953
|
-
const dirname =
|
|
45954
|
-
const basename =
|
|
46002
|
+
const dirname = sp.dirname(file);
|
|
46003
|
+
const basename = sp.basename(file);
|
|
45955
46004
|
const parent = this.fsw._getWatchedDir(dirname);
|
|
45956
46005
|
// stats is always present
|
|
45957
46006
|
let prevStats = stats;
|
|
@@ -46028,7 +46077,7 @@ class NodeFsHandler {
|
|
|
46028
46077
|
this.fsw._incrReadyCount();
|
|
46029
46078
|
let linkPath;
|
|
46030
46079
|
try {
|
|
46031
|
-
linkPath = await realpath
|
|
46080
|
+
linkPath = await realpath(path);
|
|
46032
46081
|
}
|
|
46033
46082
|
catch (e) {
|
|
46034
46083
|
this.fsw._emitReady();
|
|
@@ -46058,8 +46107,9 @@ class NodeFsHandler {
|
|
|
46058
46107
|
}
|
|
46059
46108
|
_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
|
|
46060
46109
|
// Normalize the directory name on Windows
|
|
46061
|
-
directory =
|
|
46062
|
-
|
|
46110
|
+
directory = sp.join(directory, '');
|
|
46111
|
+
const throttleKey = target ? `${directory}:${target}` : directory;
|
|
46112
|
+
throttler = this.fsw._throttle('readdir', throttleKey, 1000);
|
|
46063
46113
|
if (!throttler)
|
|
46064
46114
|
return;
|
|
46065
46115
|
const previous = this.fsw._getWatchedDir(wh.path);
|
|
@@ -46077,7 +46127,7 @@ class NodeFsHandler {
|
|
|
46077
46127
|
return;
|
|
46078
46128
|
}
|
|
46079
46129
|
const item = entry.path;
|
|
46080
|
-
let path =
|
|
46130
|
+
let path = sp.join(directory, item);
|
|
46081
46131
|
current.add(item);
|
|
46082
46132
|
if (entry.stats.isSymbolicLink() &&
|
|
46083
46133
|
(await this._handleSymlink(entry, directory, path, item))) {
|
|
@@ -46093,7 +46143,7 @@ class NodeFsHandler {
|
|
|
46093
46143
|
if (item === target || (!target && !previous.has(item))) {
|
|
46094
46144
|
this.fsw._incrReadyCount();
|
|
46095
46145
|
// ensure relativeness of path is preserved in case of watcher reuse
|
|
46096
|
-
path =
|
|
46146
|
+
path = sp.join(dir, sp.relative(dir, path));
|
|
46097
46147
|
this._addToNodeFs(path, initialAdd, wh, depth + 1);
|
|
46098
46148
|
}
|
|
46099
46149
|
})
|
|
@@ -46138,13 +46188,13 @@ class NodeFsHandler {
|
|
|
46138
46188
|
* @returns closer for the watcher instance.
|
|
46139
46189
|
*/
|
|
46140
46190
|
async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
|
|
46141
|
-
const parentDir = this.fsw._getWatchedDir(
|
|
46142
|
-
const tracked = parentDir.has(
|
|
46191
|
+
const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
|
|
46192
|
+
const tracked = parentDir.has(sp.basename(dir));
|
|
46143
46193
|
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
|
|
46144
46194
|
this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
46145
46195
|
}
|
|
46146
46196
|
// ensure dir is tracked (harmless if redundant)
|
|
46147
|
-
parentDir.add(
|
|
46197
|
+
parentDir.add(sp.basename(dir));
|
|
46148
46198
|
this.fsw._getWatchedDir(dir);
|
|
46149
46199
|
let throttler;
|
|
46150
46200
|
let closer;
|
|
@@ -46196,8 +46246,8 @@ class NodeFsHandler {
|
|
|
46196
46246
|
const follow = this.fsw.options.followSymlinks;
|
|
46197
46247
|
let closer;
|
|
46198
46248
|
if (stats.isDirectory()) {
|
|
46199
|
-
const absPath =
|
|
46200
|
-
const targetPath = follow ? await realpath
|
|
46249
|
+
const absPath = sp.resolve(path);
|
|
46250
|
+
const targetPath = follow ? await realpath(path) : path;
|
|
46201
46251
|
if (this.fsw.closed)
|
|
46202
46252
|
return;
|
|
46203
46253
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
@@ -46209,10 +46259,10 @@ class NodeFsHandler {
|
|
|
46209
46259
|
}
|
|
46210
46260
|
}
|
|
46211
46261
|
else if (stats.isSymbolicLink()) {
|
|
46212
|
-
const targetPath = follow ? await realpath
|
|
46262
|
+
const targetPath = follow ? await realpath(path) : path;
|
|
46213
46263
|
if (this.fsw.closed)
|
|
46214
46264
|
return;
|
|
46215
|
-
const parent =
|
|
46265
|
+
const parent = sp.dirname(wh.watchPath);
|
|
46216
46266
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
46217
46267
|
this.fsw._emit(EV.ADD, wh.watchPath, stats);
|
|
46218
46268
|
closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
|
|
@@ -46220,7 +46270,7 @@ class NodeFsHandler {
|
|
|
46220
46270
|
return;
|
|
46221
46271
|
// preserve this symlink's target path
|
|
46222
46272
|
if (targetPath !== undefined) {
|
|
46223
|
-
this.fsw._symlinkPaths.set(
|
|
46273
|
+
this.fsw._symlinkPaths.set(sp.resolve(path), targetPath);
|
|
46224
46274
|
}
|
|
46225
46275
|
}
|
|
46226
46276
|
else {
|
|
@@ -46247,7 +46297,7 @@ const ONE_DOT = '.';
|
|
|
46247
46297
|
const TWO_DOTS = '..';
|
|
46248
46298
|
const STRING_TYPE = 'string';
|
|
46249
46299
|
const BACK_SLASH_RE = /\\/g;
|
|
46250
|
-
const DOUBLE_SLASH_RE =
|
|
46300
|
+
const DOUBLE_SLASH_RE = /\/\//g;
|
|
46251
46301
|
const DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
46252
46302
|
const REPLACER_RE = /^\.[/\\]/;
|
|
46253
46303
|
function arrify(item) {
|
|
@@ -46266,11 +46316,11 @@ function createPattern(matcher) {
|
|
|
46266
46316
|
if (matcher.path === string)
|
|
46267
46317
|
return true;
|
|
46268
46318
|
if (matcher.recursive) {
|
|
46269
|
-
const relative =
|
|
46319
|
+
const relative = sp.relative(matcher.path, string);
|
|
46270
46320
|
if (!relative) {
|
|
46271
46321
|
return false;
|
|
46272
46322
|
}
|
|
46273
|
-
return !relative.startsWith('..') && !
|
|
46323
|
+
return !relative.startsWith('..') && !sp.isAbsolute(relative);
|
|
46274
46324
|
}
|
|
46275
46325
|
return false;
|
|
46276
46326
|
};
|
|
@@ -46280,14 +46330,12 @@ function createPattern(matcher) {
|
|
|
46280
46330
|
function normalizePath(path) {
|
|
46281
46331
|
if (typeof path !== 'string')
|
|
46282
46332
|
throw new Error('string expected');
|
|
46283
|
-
path =
|
|
46333
|
+
path = sp.normalize(path);
|
|
46284
46334
|
path = path.replace(/\\/g, '/');
|
|
46285
46335
|
let prepend = false;
|
|
46286
46336
|
if (path.startsWith('//'))
|
|
46287
46337
|
prepend = true;
|
|
46288
|
-
|
|
46289
|
-
while (path.match(DOUBLE_SLASH_RE))
|
|
46290
|
-
path = path.replace(DOUBLE_SLASH_RE, '/');
|
|
46338
|
+
path = path.replace(DOUBLE_SLASH_RE, '/');
|
|
46291
46339
|
if (prepend)
|
|
46292
46340
|
path = '/' + path;
|
|
46293
46341
|
return path;
|
|
@@ -46330,9 +46378,7 @@ const toUnix = (string) => {
|
|
|
46330
46378
|
if (str.startsWith(SLASH_SLASH)) {
|
|
46331
46379
|
prepend = true;
|
|
46332
46380
|
}
|
|
46333
|
-
|
|
46334
|
-
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
46335
|
-
}
|
|
46381
|
+
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
46336
46382
|
if (prepend) {
|
|
46337
46383
|
str = SLASH + str;
|
|
46338
46384
|
}
|
|
@@ -46340,27 +46386,30 @@ const toUnix = (string) => {
|
|
|
46340
46386
|
};
|
|
46341
46387
|
// Our version of upath.normalize
|
|
46342
46388
|
// TODO: this is not equal to path-normalize module - investigate why
|
|
46343
|
-
const normalizePathToUnix = (path) => toUnix(
|
|
46389
|
+
const normalizePathToUnix = (path) => toUnix(sp.normalize(toUnix(path)));
|
|
46344
46390
|
// TODO: refactor
|
|
46345
46391
|
const normalizeIgnored = (cwd = '') => (path) => {
|
|
46346
46392
|
if (typeof path === 'string') {
|
|
46347
|
-
return normalizePathToUnix(
|
|
46393
|
+
return normalizePathToUnix(sp.isAbsolute(path) ? path : sp.join(cwd, path));
|
|
46348
46394
|
}
|
|
46349
46395
|
else {
|
|
46350
46396
|
return path;
|
|
46351
46397
|
}
|
|
46352
46398
|
};
|
|
46353
46399
|
const getAbsolutePath = (path, cwd) => {
|
|
46354
|
-
if (
|
|
46400
|
+
if (sp.isAbsolute(path)) {
|
|
46355
46401
|
return path;
|
|
46356
46402
|
}
|
|
46357
|
-
return
|
|
46403
|
+
return sp.join(cwd, path);
|
|
46358
46404
|
};
|
|
46359
46405
|
const EMPTY_SET = Object.freeze(new Set());
|
|
46360
46406
|
/**
|
|
46361
46407
|
* Directory entry.
|
|
46362
46408
|
*/
|
|
46363
46409
|
class DirEntry {
|
|
46410
|
+
path;
|
|
46411
|
+
_removeWatcher;
|
|
46412
|
+
items;
|
|
46364
46413
|
constructor(dir, removeWatcher) {
|
|
46365
46414
|
this.path = dir;
|
|
46366
46415
|
this._removeWatcher = removeWatcher;
|
|
@@ -46382,11 +46431,11 @@ class DirEntry {
|
|
|
46382
46431
|
return;
|
|
46383
46432
|
const dir = this.path;
|
|
46384
46433
|
try {
|
|
46385
|
-
await readdir
|
|
46434
|
+
await readdir(dir);
|
|
46386
46435
|
}
|
|
46387
46436
|
catch (err) {
|
|
46388
46437
|
if (this._removeWatcher) {
|
|
46389
|
-
this._removeWatcher(
|
|
46438
|
+
this._removeWatcher(sp.dirname(dir), sp.basename(dir));
|
|
46390
46439
|
}
|
|
46391
46440
|
}
|
|
46392
46441
|
}
|
|
@@ -46413,12 +46462,19 @@ class DirEntry {
|
|
|
46413
46462
|
const STAT_METHOD_F = 'stat';
|
|
46414
46463
|
const STAT_METHOD_L = 'lstat';
|
|
46415
46464
|
class WatchHelper {
|
|
46465
|
+
fsw;
|
|
46466
|
+
path;
|
|
46467
|
+
watchPath;
|
|
46468
|
+
fullWatchPath;
|
|
46469
|
+
dirParts;
|
|
46470
|
+
followSymlinks;
|
|
46471
|
+
statMethod;
|
|
46416
46472
|
constructor(path, follow, fsw) {
|
|
46417
46473
|
this.fsw = fsw;
|
|
46418
46474
|
const watchPath = path;
|
|
46419
46475
|
this.path = path = path.replace(REPLACER_RE, '');
|
|
46420
46476
|
this.watchPath = watchPath;
|
|
46421
|
-
this.fullWatchPath =
|
|
46477
|
+
this.fullWatchPath = sp.resolve(watchPath);
|
|
46422
46478
|
this.dirParts = [];
|
|
46423
46479
|
this.dirParts.forEach((parts) => {
|
|
46424
46480
|
if (parts.length > 1)
|
|
@@ -46428,7 +46484,7 @@ class WatchHelper {
|
|
|
46428
46484
|
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
46429
46485
|
}
|
|
46430
46486
|
entryPath(entry) {
|
|
46431
|
-
return
|
|
46487
|
+
return sp.join(this.watchPath, sp.relative(this.watchPath, entry.fullPath));
|
|
46432
46488
|
}
|
|
46433
46489
|
filterPath(entry) {
|
|
46434
46490
|
const { stats } = entry;
|
|
@@ -46450,7 +46506,25 @@ class WatchHelper {
|
|
|
46450
46506
|
* .add(directories)
|
|
46451
46507
|
* .on('add', path => log('File', path, 'was added'))
|
|
46452
46508
|
*/
|
|
46453
|
-
class FSWatcher extends EventEmitter$
|
|
46509
|
+
class FSWatcher extends EventEmitter$1 {
|
|
46510
|
+
closed;
|
|
46511
|
+
options;
|
|
46512
|
+
_closers;
|
|
46513
|
+
_ignoredPaths;
|
|
46514
|
+
_throttled;
|
|
46515
|
+
_streams;
|
|
46516
|
+
_symlinkPaths;
|
|
46517
|
+
_watched;
|
|
46518
|
+
_pendingWrites;
|
|
46519
|
+
_pendingUnlinks;
|
|
46520
|
+
_readyCount;
|
|
46521
|
+
_emitReady;
|
|
46522
|
+
_closePromise;
|
|
46523
|
+
_userIgnored;
|
|
46524
|
+
_readyEmitted;
|
|
46525
|
+
_emitRaw;
|
|
46526
|
+
_boundRemove;
|
|
46527
|
+
_nodeFsHandler;
|
|
46454
46528
|
// Not indenting methods for history sake; for now.
|
|
46455
46529
|
constructor(_opts = {}) {
|
|
46456
46530
|
super();
|
|
@@ -46584,7 +46658,7 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46584
46658
|
return;
|
|
46585
46659
|
results.forEach((item) => {
|
|
46586
46660
|
if (item)
|
|
46587
|
-
this.add(
|
|
46661
|
+
this.add(sp.dirname(item), sp.basename(_origAdd || item));
|
|
46588
46662
|
});
|
|
46589
46663
|
});
|
|
46590
46664
|
return this;
|
|
@@ -46599,10 +46673,10 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46599
46673
|
const { cwd } = this.options;
|
|
46600
46674
|
paths.forEach((path) => {
|
|
46601
46675
|
// convert to absolute path unless relative path already matches
|
|
46602
|
-
if (!
|
|
46676
|
+
if (!sp.isAbsolute(path) && !this._closers.has(path)) {
|
|
46603
46677
|
if (cwd)
|
|
46604
|
-
path =
|
|
46605
|
-
path =
|
|
46678
|
+
path = sp.join(cwd, path);
|
|
46679
|
+
path = sp.resolve(path);
|
|
46606
46680
|
}
|
|
46607
46681
|
this._closePath(path);
|
|
46608
46682
|
this._addIgnoredPath(path);
|
|
@@ -46656,7 +46730,7 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46656
46730
|
getWatched() {
|
|
46657
46731
|
const watchList = {};
|
|
46658
46732
|
this._watched.forEach((entry, dir) => {
|
|
46659
|
-
const key = this.options.cwd ?
|
|
46733
|
+
const key = this.options.cwd ? sp.relative(this.options.cwd, dir) : dir;
|
|
46660
46734
|
const index = key || ONE_DOT;
|
|
46661
46735
|
watchList[index] = entry.getChildren().sort();
|
|
46662
46736
|
});
|
|
@@ -46682,9 +46756,9 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46682
46756
|
return;
|
|
46683
46757
|
const opts = this.options;
|
|
46684
46758
|
if (isWindows)
|
|
46685
|
-
path =
|
|
46759
|
+
path = sp.normalize(path);
|
|
46686
46760
|
if (opts.cwd)
|
|
46687
|
-
path =
|
|
46761
|
+
path = sp.relative(opts.cwd, path);
|
|
46688
46762
|
const args = [path];
|
|
46689
46763
|
if (stats != null)
|
|
46690
46764
|
args.push(stats);
|
|
@@ -46740,7 +46814,7 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46740
46814
|
if (opts.alwaysStat &&
|
|
46741
46815
|
stats === undefined &&
|
|
46742
46816
|
(event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
46743
|
-
const fullPath = opts.cwd ?
|
|
46817
|
+
const fullPath = opts.cwd ? sp.join(opts.cwd, path) : path;
|
|
46744
46818
|
let stats;
|
|
46745
46819
|
try {
|
|
46746
46820
|
stats = await stat$1(fullPath);
|
|
@@ -46823,8 +46897,8 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46823
46897
|
const pollInterval = awf.pollInterval;
|
|
46824
46898
|
let timeoutHandler;
|
|
46825
46899
|
let fullPath = path;
|
|
46826
|
-
if (this.options.cwd && !
|
|
46827
|
-
fullPath =
|
|
46900
|
+
if (this.options.cwd && !sp.isAbsolute(path)) {
|
|
46901
|
+
fullPath = sp.join(this.options.cwd, path);
|
|
46828
46902
|
}
|
|
46829
46903
|
const now = new Date();
|
|
46830
46904
|
const writes = this._pendingWrites;
|
|
@@ -46895,7 +46969,7 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46895
46969
|
* @param directory path of the directory
|
|
46896
46970
|
*/
|
|
46897
46971
|
_getWatchedDir(directory) {
|
|
46898
|
-
const dir =
|
|
46972
|
+
const dir = sp.resolve(directory);
|
|
46899
46973
|
if (!this._watched.has(dir))
|
|
46900
46974
|
this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
46901
46975
|
return this._watched.get(dir);
|
|
@@ -46921,8 +46995,8 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46921
46995
|
// if what is being deleted is a directory, get that directory's paths
|
|
46922
46996
|
// for recursive deleting and cleaning of watched object
|
|
46923
46997
|
// if it is not a directory, nestedDirectoryChildren will be empty array
|
|
46924
|
-
const path =
|
|
46925
|
-
const fullPath =
|
|
46998
|
+
const path = sp.join(directory, item);
|
|
46999
|
+
const fullPath = sp.resolve(path);
|
|
46926
47000
|
isDirectory =
|
|
46927
47001
|
isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
|
|
46928
47002
|
// prevent duplicate handling in case of arriving here nearly simultaneously
|
|
@@ -46954,7 +47028,7 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46954
47028
|
// If we wait for this file to be fully written, cancel the wait.
|
|
46955
47029
|
let relPath = path;
|
|
46956
47030
|
if (this.options.cwd)
|
|
46957
|
-
relPath =
|
|
47031
|
+
relPath = sp.relative(this.options.cwd, path);
|
|
46958
47032
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
46959
47033
|
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
46960
47034
|
if (event === EVENTS.ADD)
|
|
@@ -46975,8 +47049,8 @@ class FSWatcher extends EventEmitter$2 {
|
|
|
46975
47049
|
*/
|
|
46976
47050
|
_closePath(path) {
|
|
46977
47051
|
this._closeFile(path);
|
|
46978
|
-
const dir =
|
|
46979
|
-
this._getWatchedDir(dir).remove(
|
|
47052
|
+
const dir = sp.dirname(path);
|
|
47053
|
+
this._getWatchedDir(dir).remove(sp.basename(path));
|
|
46980
47054
|
}
|
|
46981
47055
|
/**
|
|
46982
47056
|
* Closes only file-specific watchers
|
|
@@ -48887,7 +48961,7 @@ function requireHybi () {
|
|
|
48887
48961
|
hasRequiredHybi = 1;
|
|
48888
48962
|
|
|
48889
48963
|
var Buffer = requireSafeBuffer().Buffer,
|
|
48890
|
-
crypto = require$$1$
|
|
48964
|
+
crypto = require$$1$2,
|
|
48891
48965
|
util = require$$1,
|
|
48892
48966
|
Extensions = requireWebsocket_extensions(),
|
|
48893
48967
|
Base = requireBase(),
|
|
@@ -49485,7 +49559,7 @@ function requireClient$2 () {
|
|
|
49485
49559
|
hasRequiredClient$2 = 1;
|
|
49486
49560
|
|
|
49487
49561
|
var Buffer = requireSafeBuffer().Buffer,
|
|
49488
|
-
crypto = require$$1$
|
|
49562
|
+
crypto = require$$1$2,
|
|
49489
49563
|
url = require$$2,
|
|
49490
49564
|
util = require$$1,
|
|
49491
49565
|
HttpParser = requireHttp_parser(),
|
|
@@ -49768,7 +49842,7 @@ function requireDraft76 () {
|
|
|
49768
49842
|
var Buffer = requireSafeBuffer().Buffer,
|
|
49769
49843
|
Base = requireBase(),
|
|
49770
49844
|
Draft75 = requireDraft75(),
|
|
49771
|
-
crypto = require$$1$
|
|
49845
|
+
crypto = require$$1$2,
|
|
49772
49846
|
util = require$$1;
|
|
49773
49847
|
|
|
49774
49848
|
|
|
@@ -50337,7 +50411,7 @@ function requireClient$1 () {
|
|
|
50337
50411
|
hasRequiredClient$1 = 1;
|
|
50338
50412
|
|
|
50339
50413
|
var util = require$$1,
|
|
50340
|
-
net = require$$1$
|
|
50414
|
+
net = require$$1$3,
|
|
50341
50415
|
tls = require$$2$1,
|
|
50342
50416
|
url = require$$2,
|
|
50343
50417
|
driver = requireDriver(),
|
|
@@ -51359,7 +51433,7 @@ function requireSupportsColor () {
|
|
|
51359
51433
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
51360
51434
|
hasRequiredSupportsColor = 1;
|
|
51361
51435
|
const os = require$$0$6;
|
|
51362
|
-
const tty = require$$1$
|
|
51436
|
+
const tty = require$$1$4;
|
|
51363
51437
|
const hasFlag = requireHasFlag();
|
|
51364
51438
|
|
|
51365
51439
|
const {env} = process;
|
|
@@ -51505,7 +51579,7 @@ function requireNode () {
|
|
|
51505
51579
|
/**
|
|
51506
51580
|
* Module dependencies.
|
|
51507
51581
|
*/
|
|
51508
|
-
var tty = require$$1$
|
|
51582
|
+
var tty = require$$1$4;
|
|
51509
51583
|
|
|
51510
51584
|
var util = require$$1;
|
|
51511
51585
|
/**
|
|
@@ -55797,7 +55871,7 @@ function requireServer () {
|
|
|
55797
55871
|
|
|
55798
55872
|
var _fs2 = _interopRequireDefault(_fs);
|
|
55799
55873
|
|
|
55800
|
-
var _http = require$$1$
|
|
55874
|
+
var _http = require$$1$5;
|
|
55801
55875
|
|
|
55802
55876
|
var _http2 = _interopRequireDefault(_http);
|
|
55803
55877
|
|
|
@@ -56259,4 +56333,4 @@ var srcExports = requireSrc();
|
|
|
56259
56333
|
var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
56260
56334
|
|
|
56261
56335
|
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 };
|
|
56262
|
-
//# sourceMappingURL=vendor-
|
|
56336
|
+
//# sourceMappingURL=vendor-CMa7Qsb1.mjs.map
|