@forsakringskassan/docs-generator 2.26.3 → 2.27.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/README.md +5 -5
- package/dist/{create-markdown-renderer-UwFjfK34.js → create-markdown-renderer-B9Y9VYNq.mjs} +27 -33
- package/dist/create-markdown-renderer-B9Y9VYNq.mjs.map +1 -0
- package/dist/{index.d.ts → index.d.mts} +8 -0
- package/dist/{index.js → index.mjs} +195 -182
- package/dist/index.mjs.map +1 -0
- package/dist/markdown.mjs +41 -0
- package/dist/markdown.mjs.map +1 -0
- package/dist/processors/{motd.js → motd.mjs} +0 -2
- package/dist/processors/{selectable-version.js → selectable-version.mjs} +91 -92
- package/dist/{runtime-bootstrap.js → runtime-bootstrap.mjs} +0 -2
- package/dist/{runtime.js → runtime.mjs} +4 -10
- package/dist/tsconfig-path-bG7G_cK8.mjs +11 -0
- package/dist/tsconfig-path-bG7G_cK8.mjs.map +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/{vendor-CIZoJHXd.js → vendor-DiqWVUfS.mjs} +168 -554
- package/dist/vendor-DiqWVUfS.mjs.map +1 -0
- package/dist/{vue3-CkmHk7uJ.js → vue3-BzNzaBbK.mjs} +12 -11
- package/dist/vue3-BzNzaBbK.mjs.map +1 -0
- package/dist/worker-BnI39lrZ.mjs +150 -0
- package/dist/worker-BnI39lrZ.mjs.map +1 -0
- package/package.json +18 -8
- package/dist/compile-example.js +0 -152
- package/dist/compile-example.js.map +0 -1
- package/dist/create-markdown-renderer-UwFjfK34.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown.js +0 -47
- package/dist/markdown.js.map +0 -1
- package/dist/vendor-CIZoJHXd.js.map +0 -1
- package/dist/vue3-CkmHk7uJ.js.map +0 -1
- /package/dist/{markdown.d.ts → markdown.d.mts} +0 -0
- /package/dist/{runtime.d.ts → runtime.d.mts} +0 -0
|
@@ -1,59 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
38
|
-
function _interopNamespaceDefault(e) {
|
|
39
|
-
var n = Object.create(null);
|
|
40
|
-
if (e) {
|
|
41
|
-
Object.keys(e).forEach(function (k) {
|
|
42
|
-
if (k !== 'default') {
|
|
43
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
44
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () { return e[k]; }
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
n.default = e;
|
|
52
|
-
return Object.freeze(n);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs$2);
|
|
56
|
-
var sysPath__namespace = /*#__PURE__*/_interopNamespaceDefault(sysPath);
|
|
1
|
+
import { createRequire as $createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
const require = $createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
|
+
import path$1, { win32, posix } from 'node:path';
|
|
7
|
+
import require$$0$4, { realpathSync as realpathSync$1, readlinkSync, readdirSync, readdir as readdir$1, lstatSync, unwatchFile, watchFile, watch as watch$2, stat as stat$2 } from 'fs';
|
|
8
|
+
import * as fs$1 from 'node:fs';
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { realpath, readlink, readdir, lstat } from 'node:fs/promises';
|
|
11
|
+
import { EventEmitter as EventEmitter$1 } from 'node:events';
|
|
12
|
+
import Stream from 'node:stream';
|
|
13
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
14
|
+
import require$$0$1 from '@vue/compiler-sfc';
|
|
15
|
+
import require$$1 from 'typescript';
|
|
16
|
+
import require$$0$2 from 'constants';
|
|
17
|
+
import require$$0$3, { Readable } from 'stream';
|
|
18
|
+
import require$$1$1 from 'util';
|
|
19
|
+
import require$$5 from 'assert';
|
|
20
|
+
import * as sysPath from 'path';
|
|
21
|
+
import sysPath__default, { resolve, join, relative, sep as sep$1 } from 'path';
|
|
22
|
+
import { createRequire } from 'node:module';
|
|
23
|
+
import require$$0$5 from 'readline';
|
|
24
|
+
import require$$3, { EventEmitter as EventEmitter$2 } from 'events';
|
|
25
|
+
import { lstat as lstat$1, stat as stat$1, readdir as readdir$2, realpath as realpath$1, open } from 'fs/promises';
|
|
26
|
+
import require$$0$7, { type as type$2 } from 'os';
|
|
27
|
+
import require$$1$5 from 'http';
|
|
28
|
+
import require$$2$2 from 'https';
|
|
29
|
+
import require$$2 from 'url';
|
|
30
|
+
import require$$0$6 from 'buffer';
|
|
31
|
+
import require$$1$2 from 'crypto';
|
|
32
|
+
import require$$1$3 from 'net';
|
|
33
|
+
import require$$2$1 from 'tls';
|
|
34
|
+
import require$$1$4 from 'tty';
|
|
35
|
+
import require$$0$8 from 'querystring';
|
|
57
36
|
|
|
58
37
|
/* eslint-disable no-bitwise */
|
|
59
38
|
|
|
@@ -12055,7 +12034,7 @@ const isStream = (s) => !!s &&
|
|
|
12055
12034
|
*/
|
|
12056
12035
|
const isReadable = (s) => !!s &&
|
|
12057
12036
|
typeof s === 'object' &&
|
|
12058
|
-
s instanceof
|
|
12037
|
+
s instanceof EventEmitter$1 &&
|
|
12059
12038
|
typeof s.pipe === 'function' &&
|
|
12060
12039
|
// node core Writable streams have a pipe() method, but it throws
|
|
12061
12040
|
s.pipe !== Stream.Writable.prototype.pipe;
|
|
@@ -12064,7 +12043,7 @@ const isReadable = (s) => !!s &&
|
|
|
12064
12043
|
*/
|
|
12065
12044
|
const isWritable = (s) => !!s &&
|
|
12066
12045
|
typeof s === 'object' &&
|
|
12067
|
-
s instanceof
|
|
12046
|
+
s instanceof EventEmitter$1 &&
|
|
12068
12047
|
typeof s.write === 'function' &&
|
|
12069
12048
|
typeof s.end === 'function';
|
|
12070
12049
|
const EOF = Symbol('EOF');
|
|
@@ -12170,7 +12149,7 @@ const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !==
|
|
|
12170
12149
|
* `Events` is the set of event handler signatures that this object
|
|
12171
12150
|
* will emit, see {@link Minipass.Events}
|
|
12172
12151
|
*/
|
|
12173
|
-
class Minipass extends
|
|
12152
|
+
class Minipass extends EventEmitter$1 {
|
|
12174
12153
|
[FLOWING] = false;
|
|
12175
12154
|
[PAUSED] = false;
|
|
12176
12155
|
[PIPES] = [];
|
|
@@ -12225,7 +12204,7 @@ class Minipass extends node_events.EventEmitter {
|
|
|
12225
12204
|
}
|
|
12226
12205
|
this[ASYNC] = !!options.async;
|
|
12227
12206
|
this[DECODER] = this[ENCODING]
|
|
12228
|
-
? new
|
|
12207
|
+
? new StringDecoder(this[ENCODING])
|
|
12229
12208
|
: null;
|
|
12230
12209
|
//@ts-ignore - private option for debugging and testing
|
|
12231
12210
|
if (options && options.debugExposeBuffer === true) {
|
|
@@ -13049,22 +13028,22 @@ class Minipass extends node_events.EventEmitter {
|
|
|
13049
13028
|
}
|
|
13050
13029
|
}
|
|
13051
13030
|
|
|
13052
|
-
const realpathSync =
|
|
13031
|
+
const realpathSync = realpathSync$1.native;
|
|
13053
13032
|
const defaultFS = {
|
|
13054
|
-
lstatSync
|
|
13055
|
-
readdir:
|
|
13056
|
-
readdirSync
|
|
13057
|
-
readlinkSync
|
|
13033
|
+
lstatSync,
|
|
13034
|
+
readdir: readdir$1,
|
|
13035
|
+
readdirSync,
|
|
13036
|
+
readlinkSync,
|
|
13058
13037
|
realpathSync,
|
|
13059
13038
|
promises: {
|
|
13060
|
-
lstat
|
|
13061
|
-
readdir
|
|
13062
|
-
readlink
|
|
13063
|
-
realpath
|
|
13039
|
+
lstat,
|
|
13040
|
+
readdir,
|
|
13041
|
+
readlink,
|
|
13042
|
+
realpath,
|
|
13064
13043
|
},
|
|
13065
13044
|
};
|
|
13066
13045
|
// if they just gave us require('fs') then use our default
|
|
13067
|
-
const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption ===
|
|
13046
|
+
const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === fs$1 ?
|
|
13068
13047
|
defaultFS
|
|
13069
13048
|
: {
|
|
13070
13049
|
...defaultFS,
|
|
@@ -14219,7 +14198,7 @@ class PathWin32 extends PathBase {
|
|
|
14219
14198
|
* @internal
|
|
14220
14199
|
*/
|
|
14221
14200
|
getRootString(path) {
|
|
14222
|
-
return
|
|
14201
|
+
return win32.parse(path).root;
|
|
14223
14202
|
}
|
|
14224
14203
|
/**
|
|
14225
14204
|
* @internal
|
|
@@ -14339,7 +14318,7 @@ class PathScurryBase {
|
|
|
14339
14318
|
constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
|
|
14340
14319
|
this.#fs = fsFromOption(fs);
|
|
14341
14320
|
if (cwd instanceof URL || cwd.startsWith('file://')) {
|
|
14342
|
-
cwd =
|
|
14321
|
+
cwd = fileURLToPath(cwd);
|
|
14343
14322
|
}
|
|
14344
14323
|
// resolve and split root, and then add to the store.
|
|
14345
14324
|
// this is the only time we call path.resolve()
|
|
@@ -14927,7 +14906,7 @@ class PathScurryWin32 extends PathScurryBase {
|
|
|
14927
14906
|
sep = '\\';
|
|
14928
14907
|
constructor(cwd = process.cwd(), opts = {}) {
|
|
14929
14908
|
const { nocase = true } = opts;
|
|
14930
|
-
super(cwd,
|
|
14909
|
+
super(cwd, win32, '\\', { ...opts, nocase });
|
|
14931
14910
|
this.nocase = nocase;
|
|
14932
14911
|
for (let p = this.cwd; p; p = p.parent) {
|
|
14933
14912
|
p.nocase = this.nocase;
|
|
@@ -14940,7 +14919,7 @@ class PathScurryWin32 extends PathScurryBase {
|
|
|
14940
14919
|
// if the path starts with a single separator, it's not a UNC, and we'll
|
|
14941
14920
|
// just get separator as the root, and driveFromUNC will return \
|
|
14942
14921
|
// In that case, mount \ on the root from the cwd.
|
|
14943
|
-
return
|
|
14922
|
+
return win32.parse(dir).root.toUpperCase();
|
|
14944
14923
|
}
|
|
14945
14924
|
/**
|
|
14946
14925
|
* @internal
|
|
@@ -14969,7 +14948,7 @@ class PathScurryPosix extends PathScurryBase {
|
|
|
14969
14948
|
sep = '/';
|
|
14970
14949
|
constructor(cwd = process.cwd(), opts = {}) {
|
|
14971
14950
|
const { nocase = false } = opts;
|
|
14972
|
-
super(cwd,
|
|
14951
|
+
super(cwd, posix, '/', { ...opts, nocase });
|
|
14973
14952
|
this.nocase = nocase;
|
|
14974
14953
|
}
|
|
14975
14954
|
/**
|
|
@@ -16091,7 +16070,7 @@ class Glob {
|
|
|
16091
16070
|
this.cwd = '';
|
|
16092
16071
|
}
|
|
16093
16072
|
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
|
|
16094
|
-
opts.cwd =
|
|
16073
|
+
opts.cwd = fileURLToPath(opts.cwd);
|
|
16095
16074
|
}
|
|
16096
16075
|
this.cwd = opts.cwd || '';
|
|
16097
16076
|
this.root = opts.root;
|
|
@@ -16339,7 +16318,7 @@ function requireRegisterTs () {
|
|
|
16339
16318
|
if (hasRequiredRegisterTs) return registerTs;
|
|
16340
16319
|
hasRequiredRegisterTs = 1;
|
|
16341
16320
|
if (typeof commonjsRequire !== 'undefined') {
|
|
16342
|
-
require$$0$
|
|
16321
|
+
require$$0$1.registerTS(() => require$$1);
|
|
16343
16322
|
}
|
|
16344
16323
|
return registerTs;
|
|
16345
16324
|
}
|
|
@@ -16358,7 +16337,8 @@ function createDedent(options) {
|
|
|
16358
16337
|
function dedent(strings, ...values) {
|
|
16359
16338
|
const raw = typeof strings === "string" ? [strings] : strings.raw;
|
|
16360
16339
|
const {
|
|
16361
|
-
escapeSpecialCharacters = Array.isArray(strings)
|
|
16340
|
+
escapeSpecialCharacters = Array.isArray(strings),
|
|
16341
|
+
trimWhitespace = true
|
|
16362
16342
|
} = options;
|
|
16363
16343
|
|
|
16364
16344
|
// first, perform interpolation
|
|
@@ -16400,9 +16380,12 @@ function createDedent(options) {
|
|
|
16400
16380
|
}
|
|
16401
16381
|
|
|
16402
16382
|
// dedent eats leading and trailing whitespace too
|
|
16403
|
-
|
|
16383
|
+
if (trimWhitespace) {
|
|
16384
|
+
result = result.trim();
|
|
16385
|
+
}
|
|
16386
|
+
|
|
16387
|
+
// handle escaped newlines at the end to ensure they don't get stripped too
|
|
16404
16388
|
if (escapeSpecialCharacters) {
|
|
16405
|
-
// handle escaped newlines at the end to ensure they don't get stripped too
|
|
16406
16389
|
result = result.replace(/\\n/g, "\n");
|
|
16407
16390
|
}
|
|
16408
16391
|
return result;
|
|
@@ -21296,7 +21279,7 @@ var hasRequiredPolyfills;
|
|
|
21296
21279
|
function requirePolyfills () {
|
|
21297
21280
|
if (hasRequiredPolyfills) return polyfills;
|
|
21298
21281
|
hasRequiredPolyfills = 1;
|
|
21299
|
-
var constants = require$$0$
|
|
21282
|
+
var constants = require$$0$2;
|
|
21300
21283
|
|
|
21301
21284
|
var origCwd = process.cwd;
|
|
21302
21285
|
var cwd = null;
|
|
@@ -21660,7 +21643,7 @@ var hasRequiredLegacyStreams;
|
|
|
21660
21643
|
function requireLegacyStreams () {
|
|
21661
21644
|
if (hasRequiredLegacyStreams) return legacyStreams;
|
|
21662
21645
|
hasRequiredLegacyStreams = 1;
|
|
21663
|
-
var Stream = require$$0$
|
|
21646
|
+
var Stream = require$$0$3.Stream;
|
|
21664
21647
|
|
|
21665
21648
|
legacyStreams = legacy;
|
|
21666
21649
|
|
|
@@ -21818,7 +21801,7 @@ var hasRequiredGracefulFs;
|
|
|
21818
21801
|
function requireGracefulFs () {
|
|
21819
21802
|
if (hasRequiredGracefulFs) return gracefulFs;
|
|
21820
21803
|
hasRequiredGracefulFs = 1;
|
|
21821
|
-
var fs = require$$0$
|
|
21804
|
+
var fs = require$$0$4;
|
|
21822
21805
|
var polyfills = requirePolyfills();
|
|
21823
21806
|
var legacy = requireLegacyStreams();
|
|
21824
21807
|
var clone = requireClone();
|
|
@@ -22433,7 +22416,7 @@ var hasRequiredUtils$2;
|
|
|
22433
22416
|
function requireUtils$2 () {
|
|
22434
22417
|
if (hasRequiredUtils$2) return utils$2;
|
|
22435
22418
|
hasRequiredUtils$2 = 1;
|
|
22436
|
-
const path =
|
|
22419
|
+
const path = sysPath__default;
|
|
22437
22420
|
|
|
22438
22421
|
// https://github.com/nodejs/node/issues/8987
|
|
22439
22422
|
// https://github.com/libuv/libuv/pull/1088
|
|
@@ -22579,7 +22562,7 @@ function requireStat () {
|
|
|
22579
22562
|
hasRequiredStat = 1;
|
|
22580
22563
|
|
|
22581
22564
|
const fs = requireFs();
|
|
22582
|
-
const path =
|
|
22565
|
+
const path = sysPath__default;
|
|
22583
22566
|
const u = requireUniversalify().fromPromise;
|
|
22584
22567
|
|
|
22585
22568
|
function getStats (src, dest, opts) {
|
|
@@ -22745,7 +22728,7 @@ function requireCopy$1 () {
|
|
|
22745
22728
|
hasRequiredCopy$1 = 1;
|
|
22746
22729
|
|
|
22747
22730
|
const fs = requireFs();
|
|
22748
|
-
const path =
|
|
22731
|
+
const path = sysPath__default;
|
|
22749
22732
|
const { mkdirs } = requireMkdirs();
|
|
22750
22733
|
const { pathExists } = requirePathExists();
|
|
22751
22734
|
const { utimesMillis } = requireUtimes();
|
|
@@ -22935,7 +22918,7 @@ function requireCopySync () {
|
|
|
22935
22918
|
hasRequiredCopySync = 1;
|
|
22936
22919
|
|
|
22937
22920
|
const fs = requireGracefulFs();
|
|
22938
|
-
const path =
|
|
22921
|
+
const path = sysPath__default;
|
|
22939
22922
|
const mkdirsSync = requireMkdirs().mkdirsSync;
|
|
22940
22923
|
const utimesMillisSync = requireUtimes().utimesMillisSync;
|
|
22941
22924
|
const stat = requireStat();
|
|
@@ -23155,7 +23138,7 @@ function requireEmpty () {
|
|
|
23155
23138
|
|
|
23156
23139
|
const u = requireUniversalify().fromPromise;
|
|
23157
23140
|
const fs = requireFs();
|
|
23158
|
-
const path =
|
|
23141
|
+
const path = sysPath__default;
|
|
23159
23142
|
const mkdir = requireMkdirs();
|
|
23160
23143
|
const remove = requireRemove();
|
|
23161
23144
|
|
|
@@ -23201,7 +23184,7 @@ function requireFile () {
|
|
|
23201
23184
|
hasRequiredFile = 1;
|
|
23202
23185
|
|
|
23203
23186
|
const u = requireUniversalify().fromPromise;
|
|
23204
|
-
const path =
|
|
23187
|
+
const path = sysPath__default;
|
|
23205
23188
|
const fs = requireFs();
|
|
23206
23189
|
const mkdir = requireMkdirs();
|
|
23207
23190
|
|
|
@@ -23275,7 +23258,7 @@ function requireLink () {
|
|
|
23275
23258
|
hasRequiredLink = 1;
|
|
23276
23259
|
|
|
23277
23260
|
const u = requireUniversalify().fromPromise;
|
|
23278
|
-
const path =
|
|
23261
|
+
const path = sysPath__default;
|
|
23279
23262
|
const fs = requireFs();
|
|
23280
23263
|
const mkdir = requireMkdirs();
|
|
23281
23264
|
const { pathExists } = requirePathExists();
|
|
@@ -23346,7 +23329,7 @@ function requireSymlinkPaths () {
|
|
|
23346
23329
|
if (hasRequiredSymlinkPaths) return symlinkPaths_1;
|
|
23347
23330
|
hasRequiredSymlinkPaths = 1;
|
|
23348
23331
|
|
|
23349
|
-
const path =
|
|
23332
|
+
const path = sysPath__default;
|
|
23350
23333
|
const fs = requireFs();
|
|
23351
23334
|
const { pathExists } = requirePathExists();
|
|
23352
23335
|
|
|
@@ -23498,7 +23481,7 @@ function requireSymlink () {
|
|
|
23498
23481
|
hasRequiredSymlink = 1;
|
|
23499
23482
|
|
|
23500
23483
|
const u = requireUniversalify().fromPromise;
|
|
23501
|
-
const path =
|
|
23484
|
+
const path = sysPath__default;
|
|
23502
23485
|
const fs = requireFs();
|
|
23503
23486
|
|
|
23504
23487
|
const { mkdirs, mkdirsSync } = requireMkdirs();
|
|
@@ -23629,7 +23612,7 @@ function requireJsonfile$1 () {
|
|
|
23629
23612
|
try {
|
|
23630
23613
|
_fs = requireGracefulFs();
|
|
23631
23614
|
} catch (_) {
|
|
23632
|
-
_fs = require$$0$
|
|
23615
|
+
_fs = require$$0$4;
|
|
23633
23616
|
}
|
|
23634
23617
|
const universalify = requireUniversalify();
|
|
23635
23618
|
const { stringify, stripBom } = requireUtils$1();
|
|
@@ -23744,7 +23727,7 @@ function requireOutputFile () {
|
|
|
23744
23727
|
|
|
23745
23728
|
const u = requireUniversalify().fromPromise;
|
|
23746
23729
|
const fs = requireFs();
|
|
23747
|
-
const path =
|
|
23730
|
+
const path = sysPath__default;
|
|
23748
23731
|
const mkdir = requireMkdirs();
|
|
23749
23732
|
const pathExists = requirePathExists().pathExists;
|
|
23750
23733
|
|
|
@@ -23846,7 +23829,7 @@ function requireMove$1 () {
|
|
|
23846
23829
|
hasRequiredMove$1 = 1;
|
|
23847
23830
|
|
|
23848
23831
|
const fs = requireFs();
|
|
23849
|
-
const path =
|
|
23832
|
+
const path = sysPath__default;
|
|
23850
23833
|
const { copy } = requireCopy();
|
|
23851
23834
|
const { remove } = requireRemove();
|
|
23852
23835
|
const { mkdirp } = requireMkdirs();
|
|
@@ -23913,7 +23896,7 @@ function requireMoveSync () {
|
|
|
23913
23896
|
hasRequiredMoveSync = 1;
|
|
23914
23897
|
|
|
23915
23898
|
const fs = requireGracefulFs();
|
|
23916
|
-
const path =
|
|
23899
|
+
const path = sysPath__default;
|
|
23917
23900
|
const copySync = requireCopy().copySync;
|
|
23918
23901
|
const removeSync = requireRemove().removeSync;
|
|
23919
23902
|
const mkdirpSync = requireMkdirs().mkdirpSync;
|
|
@@ -25980,7 +25963,7 @@ class I18n extends EventEmitter {
|
|
|
25980
25963
|
}
|
|
25981
25964
|
if (!this.resolvedLanguage && this.languages.indexOf(l) < 0 && this.store.hasLanguageSomeTranslations(l)) {
|
|
25982
25965
|
this.resolvedLanguage = l;
|
|
25983
|
-
|
|
25966
|
+
this.languages.unshift(l);
|
|
25984
25967
|
}
|
|
25985
25968
|
}
|
|
25986
25969
|
changeLanguage(lng, callback) {
|
|
@@ -26194,12 +26177,13 @@ class I18n extends EventEmitter {
|
|
|
26194
26177
|
prev[l] = {
|
|
26195
26178
|
...this.store.data[l]
|
|
26196
26179
|
};
|
|
26197
|
-
|
|
26180
|
+
prev[l] = Object.keys(prev[l]).reduce((acc, n) => {
|
|
26198
26181
|
acc[n] = {
|
|
26199
26182
|
...prev[l][n]
|
|
26200
26183
|
};
|
|
26201
26184
|
return acc;
|
|
26202
|
-
},
|
|
26185
|
+
}, prev[l]);
|
|
26186
|
+
return prev;
|
|
26203
26187
|
}, {});
|
|
26204
26188
|
clone.store = new ResourceStore(clonedData, mergedOptions);
|
|
26205
26189
|
clone.services.resourceStore = clone.store;
|
|
@@ -26353,8 +26337,8 @@ function requireResolvePackagePath () {
|
|
|
26353
26337
|
// credit goes to https://github.com/davecombs
|
|
26354
26338
|
// extracted in part from: https://github.com/stefanpenner/hash-for-dep/blob/15b2ebcf22024ceb2eb7907f8c412ae40f87b15e/lib/resolve-package-path.js#L1
|
|
26355
26339
|
//
|
|
26356
|
-
const fs = require$$0$
|
|
26357
|
-
const path =
|
|
26340
|
+
const fs = require$$0$4;
|
|
26341
|
+
const path = sysPath__default;
|
|
26358
26342
|
const pathRoot = requirePathRoot();
|
|
26359
26343
|
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
26360
26344
|
/*
|
|
@@ -26662,7 +26646,7 @@ function requireLib$1 () {
|
|
|
26662
26646
|
var __importDefault = (lib$1 && lib$1.__importDefault) || function (mod) {
|
|
26663
26647
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26664
26648
|
};
|
|
26665
|
-
const path_1 = __importDefault(
|
|
26649
|
+
const path_1 = __importDefault(sysPath__default);
|
|
26666
26650
|
const resolve_package_path_1 = __importDefault(requireResolvePackagePath());
|
|
26667
26651
|
const rethrow_unless_code_1 = __importDefault(requireRethrowUnlessCode());
|
|
26668
26652
|
const ALLOWED_ERROR_CODES = [
|
|
@@ -26811,7 +26795,7 @@ function getPackageNameFromPath(input) {
|
|
|
26811
26795
|
|
|
26812
26796
|
// src/importer.js
|
|
26813
26797
|
var { findUpPackagePath } = resolvePackagePath;
|
|
26814
|
-
var require2 =
|
|
26798
|
+
var require2 = createRequire(import.meta.url);
|
|
26815
26799
|
var WEBPACK_NODE_MODULE_PREFIX = "~";
|
|
26816
26800
|
var selfPackageJson = null;
|
|
26817
26801
|
var selfPackageJsonPath = null;
|
|
@@ -26835,7 +26819,7 @@ var moduleImporter = {
|
|
|
26835
26819
|
return null;
|
|
26836
26820
|
}
|
|
26837
26821
|
packageJson = JSON.parse(
|
|
26838
|
-
|
|
26822
|
+
readFileSync(packagePath, { encoding: "utf-8" })
|
|
26839
26823
|
);
|
|
26840
26824
|
}
|
|
26841
26825
|
const moduleDirectory = path$1.dirname(packagePath);
|
|
@@ -26845,7 +26829,7 @@ var moduleImporter = {
|
|
|
26845
26829
|
});
|
|
26846
26830
|
if (match && match.length === 1) {
|
|
26847
26831
|
return new URL(
|
|
26848
|
-
|
|
26832
|
+
pathToFileURL(path$1.join(moduleDirectory, match[0]))
|
|
26849
26833
|
);
|
|
26850
26834
|
}
|
|
26851
26835
|
} catch {
|
|
@@ -26854,7 +26838,7 @@ var moduleImporter = {
|
|
|
26854
26838
|
const match = i(packageJson, { fields: ["sass", "main"] });
|
|
26855
26839
|
if (match) {
|
|
26856
26840
|
return new URL(
|
|
26857
|
-
|
|
26841
|
+
pathToFileURL(path$1.join(moduleDirectory, match))
|
|
26858
26842
|
);
|
|
26859
26843
|
}
|
|
26860
26844
|
}
|
|
@@ -26874,7 +26858,7 @@ var moduleImporter = {
|
|
|
26874
26858
|
variant
|
|
26875
26859
|
);
|
|
26876
26860
|
const resolved = require2.resolve(moduleName);
|
|
26877
|
-
return new URL(
|
|
26861
|
+
return new URL(pathToFileURL(resolved));
|
|
26878
26862
|
} catch (err) {
|
|
26879
26863
|
if (err.code !== "MODULE_NOT_FOUND") {
|
|
26880
26864
|
throw err;
|
|
@@ -26888,7 +26872,7 @@ function setSelfPackage() {
|
|
|
26888
26872
|
if (!selfPackageJson) {
|
|
26889
26873
|
selfPackageJsonPath = findUpPackagePath(process.cwd());
|
|
26890
26874
|
selfPackageJson = JSON.parse(
|
|
26891
|
-
|
|
26875
|
+
readFileSync(selfPackageJsonPath, { encoding: "utf-8" })
|
|
26892
26876
|
);
|
|
26893
26877
|
}
|
|
26894
26878
|
}
|
|
@@ -28366,358 +28350,6 @@ function requireCliProgress () {
|
|
|
28366
28350
|
var cliProgressExports = requireCliProgress();
|
|
28367
28351
|
var cliProgress = /*@__PURE__*/getDefaultExportFromCjs(cliProgressExports);
|
|
28368
28352
|
|
|
28369
|
-
const getContext = raw => ({
|
|
28370
|
-
start: process$1.hrtime.bigint(),
|
|
28371
|
-
command: raw.map(part => getCommandPart(util.stripVTControlCharacters(part))).join(' '),
|
|
28372
|
-
state: {stdout: '', stderr: '', output: ''},
|
|
28373
|
-
});
|
|
28374
|
-
|
|
28375
|
-
const getCommandPart = part => /[^\w./-]/.test(part)
|
|
28376
|
-
? `'${part.replaceAll('\'', '\'\\\'\'')}'`
|
|
28377
|
-
: part;
|
|
28378
|
-
|
|
28379
|
-
const getOptions = ({
|
|
28380
|
-
stdin,
|
|
28381
|
-
stdout,
|
|
28382
|
-
stderr,
|
|
28383
|
-
stdio = [stdin, stdout, stderr],
|
|
28384
|
-
env: envOption,
|
|
28385
|
-
preferLocal,
|
|
28386
|
-
cwd: cwdOption = '.',
|
|
28387
|
-
...options
|
|
28388
|
-
}) => {
|
|
28389
|
-
const cwd = cwdOption instanceof URL ? node_url.fileURLToPath(cwdOption) : path$1.resolve(cwdOption);
|
|
28390
|
-
const env = envOption ? {...process$1.env, ...envOption} : undefined;
|
|
28391
|
-
const input = stdio[0]?.string;
|
|
28392
|
-
return {
|
|
28393
|
-
...options,
|
|
28394
|
-
input,
|
|
28395
|
-
stdio: input === undefined ? stdio : ['pipe', ...stdio.slice(1)],
|
|
28396
|
-
env: preferLocal ? addLocalPath(env ?? process$1.env, cwd) : env,
|
|
28397
|
-
cwd,
|
|
28398
|
-
};
|
|
28399
|
-
};
|
|
28400
|
-
|
|
28401
|
-
const addLocalPath = ({Path = '', PATH = Path, ...env}, cwd) => {
|
|
28402
|
-
const pathParts = PATH.split(path$1.delimiter);
|
|
28403
|
-
const localPaths = getLocalPaths([], path$1.resolve(cwd))
|
|
28404
|
-
.map(localPath => path$1.join(localPath, 'node_modules/.bin'))
|
|
28405
|
-
.filter(localPath => !pathParts.includes(localPath));
|
|
28406
|
-
return {...env, PATH: [...localPaths, PATH].filter(Boolean).join(path$1.delimiter)};
|
|
28407
|
-
};
|
|
28408
|
-
|
|
28409
|
-
const getLocalPaths = (localPaths, localPath) => localPaths.at(-1) === localPath
|
|
28410
|
-
? localPaths
|
|
28411
|
-
: getLocalPaths([...localPaths, localPath], path$1.resolve(localPath, '..'));
|
|
28412
|
-
|
|
28413
|
-
// When setting `shell: true` under-the-hood, we must manually escape the file and arguments.
|
|
28414
|
-
// This ensures arguments are properly split, and prevents command injection.
|
|
28415
|
-
const applyForceShell = async (file, commandArguments, options) => await shouldForceShell(file, options)
|
|
28416
|
-
? [escapeFile(file), commandArguments.map(argument => escapeArgument(argument)), {...options, shell: true}]
|
|
28417
|
-
: [file, commandArguments, options];
|
|
28418
|
-
|
|
28419
|
-
// On Windows, running most executable files (except *.exe and *.com) requires using a shell.
|
|
28420
|
-
// This includes *.cmd and *.bat, which itself includes Node modules binaries.
|
|
28421
|
-
// We detect this situation and automatically:
|
|
28422
|
-
// - Set the `shell: true` option
|
|
28423
|
-
// - Escape shell-specific characters
|
|
28424
|
-
const shouldForceShell = async (file, {shell, cwd, env = process$1.env}) => process$1.platform === 'win32'
|
|
28425
|
-
&& !shell
|
|
28426
|
-
&& !(await isExe(file, cwd, env));
|
|
28427
|
-
|
|
28428
|
-
// Detect whether the executable file is a *.exe or *.com file.
|
|
28429
|
-
// Windows allows omitting file extensions (present in the `PATHEXT` environment variable).
|
|
28430
|
-
// Therefore we must use the `PATH` environment variable and make `stat` calls to check this.
|
|
28431
|
-
// Environment variables are case-insensitive on Windows, so we check both `PATH` and `Path`.
|
|
28432
|
-
// eslint-disable-next-line no-return-assign
|
|
28433
|
-
const isExe = async (file, cwd, {Path = '', PATH = Path}) =>
|
|
28434
|
-
// If the *.exe or *.com file extension was not omitted.
|
|
28435
|
-
// Windows common file systems are case-insensitive.
|
|
28436
|
-
exeExtensions.some(extension => file.toLowerCase().endsWith(extension))
|
|
28437
|
-
// Use returned assignment to keep code small
|
|
28438
|
-
|| (EXE_MEMO[`${file}\0${cwd}\0${PATH}`] ??= await mIsExe(file, cwd, PATH));
|
|
28439
|
-
|
|
28440
|
-
// Memoize the following function, for performance
|
|
28441
|
-
const EXE_MEMO = {};
|
|
28442
|
-
|
|
28443
|
-
const mIsExe = async (file, cwd, PATH) => {
|
|
28444
|
-
const parts = PATH
|
|
28445
|
-
// `PATH` is ;-separated on Windows
|
|
28446
|
-
.split(path$1.delimiter)
|
|
28447
|
-
// `PATH` allows leading/trailing ; on Windows
|
|
28448
|
-
.filter(Boolean)
|
|
28449
|
-
// `PATH` parts can be double quoted on Windows
|
|
28450
|
-
.map(part => part.replace(/^"(.*)"$/, '$1'));
|
|
28451
|
-
|
|
28452
|
-
// For performance, parallelize and stop iteration as soon as an *.exe of *.com file is found
|
|
28453
|
-
try {
|
|
28454
|
-
await Promise.all(exeExtensions
|
|
28455
|
-
.flatMap(extension =>
|
|
28456
|
-
[cwd, ...parts].map(part => `${path$1.resolve(part, file)}${extension}`))
|
|
28457
|
-
.map(async possibleFile => {
|
|
28458
|
-
try {
|
|
28459
|
-
await fs$1.stat(possibleFile);
|
|
28460
|
-
} catch {
|
|
28461
|
-
return;
|
|
28462
|
-
}
|
|
28463
|
-
|
|
28464
|
-
// eslint-disable-next-line no-throw-literal
|
|
28465
|
-
throw 0;
|
|
28466
|
-
}));
|
|
28467
|
-
} catch {
|
|
28468
|
-
return true;
|
|
28469
|
-
}
|
|
28470
|
-
|
|
28471
|
-
return false;
|
|
28472
|
-
};
|
|
28473
|
-
|
|
28474
|
-
// Other file extensions require using a shell
|
|
28475
|
-
const exeExtensions = ['.exe', '.com'];
|
|
28476
|
-
|
|
28477
|
-
// `cmd.exe` escaping for arguments.
|
|
28478
|
-
// Taken from https://github.com/moxystudio/node-cross-spawn
|
|
28479
|
-
const escapeArgument = argument => escapeFile(escapeFile(`"${argument
|
|
28480
|
-
.replaceAll(/(\\*)"/g, '$1$1\\"')
|
|
28481
|
-
.replace(/(\\*)$/, '$1$1')}"`));
|
|
28482
|
-
|
|
28483
|
-
// `cmd.exe` escaping for file and arguments.
|
|
28484
|
-
const escapeFile = file => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, '^$1');
|
|
28485
|
-
|
|
28486
|
-
const getResult = async (nodeChildProcess, {input}, context) => {
|
|
28487
|
-
const instance = await nodeChildProcess;
|
|
28488
|
-
if (input !== undefined) {
|
|
28489
|
-
instance.stdin.end(input);
|
|
28490
|
-
}
|
|
28491
|
-
|
|
28492
|
-
const onClose = node_events.once(instance, 'close');
|
|
28493
|
-
|
|
28494
|
-
try {
|
|
28495
|
-
await Promise.race([
|
|
28496
|
-
onClose,
|
|
28497
|
-
...instance.stdio.filter(Boolean).map(stream => onStreamError(stream)),
|
|
28498
|
-
]);
|
|
28499
|
-
checkFailure(context, getErrorOutput(instance));
|
|
28500
|
-
return getOutputs(context);
|
|
28501
|
-
} catch (error) {
|
|
28502
|
-
await Promise.allSettled([onClose]);
|
|
28503
|
-
throw getResultError(error, instance, context);
|
|
28504
|
-
}
|
|
28505
|
-
};
|
|
28506
|
-
|
|
28507
|
-
const onStreamError = async stream => {
|
|
28508
|
-
for await (const [error] of node_events.on(stream, 'error')) {
|
|
28509
|
-
// Ignore errors that are due to closing errors when the subprocesses exit normally, or due to piping
|
|
28510
|
-
if (!['ERR_STREAM_PREMATURE_CLOSE', 'EPIPE'].includes(error?.code)) {
|
|
28511
|
-
throw error;
|
|
28512
|
-
}
|
|
28513
|
-
}
|
|
28514
|
-
};
|
|
28515
|
-
|
|
28516
|
-
const checkFailure = ({command}, {exitCode, signalName}) => {
|
|
28517
|
-
if (signalName !== undefined) {
|
|
28518
|
-
throw new SubprocessError(`Command was terminated with ${signalName}: ${command}`);
|
|
28519
|
-
}
|
|
28520
|
-
|
|
28521
|
-
if (exitCode !== undefined) {
|
|
28522
|
-
throw new SubprocessError(`Command failed with exit code ${exitCode}: ${command}`);
|
|
28523
|
-
}
|
|
28524
|
-
};
|
|
28525
|
-
|
|
28526
|
-
const getResultError = (error, instance, context) => Object.assign(
|
|
28527
|
-
getErrorInstance(error, context),
|
|
28528
|
-
getErrorOutput(instance),
|
|
28529
|
-
getOutputs(context),
|
|
28530
|
-
);
|
|
28531
|
-
|
|
28532
|
-
const getErrorInstance = (error, {command}) => error instanceof SubprocessError
|
|
28533
|
-
? error
|
|
28534
|
-
: new SubprocessError(`Command failed: ${command}`, {cause: error});
|
|
28535
|
-
|
|
28536
|
-
class SubprocessError extends Error {
|
|
28537
|
-
name = 'SubprocessError';
|
|
28538
|
-
}
|
|
28539
|
-
|
|
28540
|
-
const getErrorOutput = ({exitCode, signalCode}) => ({
|
|
28541
|
-
// `exitCode` can be a negative number (`errno`) when the `error` event is emitted on the `instance`
|
|
28542
|
-
...(exitCode < 1 ? {} : {exitCode}),
|
|
28543
|
-
...(signalCode === null ? {} : {signalName: signalCode}),
|
|
28544
|
-
});
|
|
28545
|
-
|
|
28546
|
-
const getOutputs = ({state: {stdout, stderr, output}, command, start}) => ({
|
|
28547
|
-
stdout: getOutput(stdout),
|
|
28548
|
-
stderr: getOutput(stderr),
|
|
28549
|
-
output: getOutput(output),
|
|
28550
|
-
command,
|
|
28551
|
-
durationMs: Number(process$1.hrtime.bigint() - start) / 1e6,
|
|
28552
|
-
});
|
|
28553
|
-
|
|
28554
|
-
const getOutput = output => output.at(-1) === '\n'
|
|
28555
|
-
? output.slice(0, output.at(-2) === '\r' ? -2 : -1)
|
|
28556
|
-
: output;
|
|
28557
|
-
|
|
28558
|
-
const spawnSubprocess = async (file, commandArguments, options, context) => {
|
|
28559
|
-
try {
|
|
28560
|
-
// When running `node`, keep the current Node version and CLI flags.
|
|
28561
|
-
// Not applied with file paths to `.../node` since those indicate a clear intent to use a specific Node version.
|
|
28562
|
-
// This also provides a way to opting out, e.g. using `process.execPath` instead of `node` to discard current CLI flags.
|
|
28563
|
-
// Does not work with shebangs, but those don't work cross-platform anyway.
|
|
28564
|
-
[file, commandArguments] = ['node', 'node.exe'].includes(file.toLowerCase())
|
|
28565
|
-
? [process$1.execPath, [...process$1.execArgv.filter(flag => !flag.startsWith('--inspect')), ...commandArguments]]
|
|
28566
|
-
: [file, commandArguments];
|
|
28567
|
-
|
|
28568
|
-
const instance = node_child_process.spawn(...await applyForceShell(file, commandArguments, options));
|
|
28569
|
-
bufferOutput(instance.stdout, context, 'stdout');
|
|
28570
|
-
bufferOutput(instance.stderr, context, 'stderr');
|
|
28571
|
-
|
|
28572
|
-
// The `error` event is caught by `once(instance, 'spawn')` and `once(instance, 'close')`.
|
|
28573
|
-
// But it creates an uncaught exception if it happens exactly one tick after 'spawn'.
|
|
28574
|
-
// This prevents that.
|
|
28575
|
-
instance.once('error', () => {});
|
|
28576
|
-
|
|
28577
|
-
await node_events.once(instance, 'spawn');
|
|
28578
|
-
return instance;
|
|
28579
|
-
} catch (error) {
|
|
28580
|
-
throw getResultError(error, {}, context);
|
|
28581
|
-
}
|
|
28582
|
-
};
|
|
28583
|
-
|
|
28584
|
-
const bufferOutput = (stream, {state}, streamName) => {
|
|
28585
|
-
if (stream) {
|
|
28586
|
-
stream.setEncoding('utf8');
|
|
28587
|
-
if (!state.isIterating) {
|
|
28588
|
-
state.isIterating = false;
|
|
28589
|
-
stream.on('data', chunk => {
|
|
28590
|
-
state[streamName] += chunk;
|
|
28591
|
-
state.output += chunk;
|
|
28592
|
-
});
|
|
28593
|
-
}
|
|
28594
|
-
}
|
|
28595
|
-
};
|
|
28596
|
-
|
|
28597
|
-
const handlePipe = async subprocesses => {
|
|
28598
|
-
// Ensure both subprocesses have exited before resolving, and that we handle errors from both
|
|
28599
|
-
const [[from, to]] = await Promise.all([Promise.allSettled(subprocesses), pipeStreams(subprocesses)]);
|
|
28600
|
-
|
|
28601
|
-
// If both subprocesses fail, throw destination error to use a predictable order and avoid race conditions
|
|
28602
|
-
if (to.reason) {
|
|
28603
|
-
to.reason.pipedFrom = from.reason ?? from.value;
|
|
28604
|
-
throw to.reason;
|
|
28605
|
-
}
|
|
28606
|
-
|
|
28607
|
-
if (from.reason) {
|
|
28608
|
-
throw from.reason;
|
|
28609
|
-
}
|
|
28610
|
-
|
|
28611
|
-
return {...to.value, pipedFrom: from.value};
|
|
28612
|
-
};
|
|
28613
|
-
|
|
28614
|
-
const pipeStreams = async subprocesses => {
|
|
28615
|
-
try {
|
|
28616
|
-
const [{stdout}, {stdin}] = await Promise.all(subprocesses.map(({nodeChildProcess}) => nodeChildProcess));
|
|
28617
|
-
if (stdin === null) {
|
|
28618
|
-
throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');
|
|
28619
|
-
}
|
|
28620
|
-
|
|
28621
|
-
if (stdout === null) {
|
|
28622
|
-
throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');
|
|
28623
|
-
}
|
|
28624
|
-
|
|
28625
|
-
// Do not `await` nor handle stream errors since this is already done by each subprocess
|
|
28626
|
-
// eslint-disable-next-line promise/prefer-await-to-then
|
|
28627
|
-
promises.pipeline(stdout, stdin).catch(() => {});
|
|
28628
|
-
} catch (error) {
|
|
28629
|
-
await Promise.allSettled(subprocesses.map(({nodeChildProcess}) => closeStdin(nodeChildProcess)));
|
|
28630
|
-
throw error;
|
|
28631
|
-
}
|
|
28632
|
-
};
|
|
28633
|
-
|
|
28634
|
-
const closeStdin = async nodeChildProcess => {
|
|
28635
|
-
const {stdin} = await nodeChildProcess;
|
|
28636
|
-
stdin.end();
|
|
28637
|
-
};
|
|
28638
|
-
|
|
28639
|
-
const lineIterator = async function * (subprocess, {state}, streamName) {
|
|
28640
|
-
// Prevent buffering when iterating.
|
|
28641
|
-
// This would defeat one of the main goals of iterating: low memory consumption.
|
|
28642
|
-
if (state.isIterating === false) {
|
|
28643
|
-
throw new Error(`The subprocess must be iterated right away, for example:
|
|
28644
|
-
for await (const line of spawn(...)) { ... }`);
|
|
28645
|
-
}
|
|
28646
|
-
|
|
28647
|
-
state.isIterating = true;
|
|
28648
|
-
|
|
28649
|
-
try {
|
|
28650
|
-
const {[streamName]: stream} = await subprocess.nodeChildProcess;
|
|
28651
|
-
if (!stream) {
|
|
28652
|
-
return;
|
|
28653
|
-
}
|
|
28654
|
-
|
|
28655
|
-
let buffer = '';
|
|
28656
|
-
for await (const chunk of stream.iterator({destroyOnReturn: false})) {
|
|
28657
|
-
const lines = `${buffer}${chunk}`.split(/\r?\n/);
|
|
28658
|
-
buffer = lines.pop(); // Keep last line in buffer as it may not be complete
|
|
28659
|
-
yield * lines;
|
|
28660
|
-
}
|
|
28661
|
-
|
|
28662
|
-
if (buffer) {
|
|
28663
|
-
yield buffer; // Yield any remaining data as the last line
|
|
28664
|
-
}
|
|
28665
|
-
} finally {
|
|
28666
|
-
await subprocess;
|
|
28667
|
-
}
|
|
28668
|
-
};
|
|
28669
|
-
|
|
28670
|
-
// Merge two async iterators into one
|
|
28671
|
-
const combineAsyncIterators = async function * (...iterators) {
|
|
28672
|
-
try {
|
|
28673
|
-
let promises = [];
|
|
28674
|
-
while (iterators.length > 0) {
|
|
28675
|
-
promises = iterators.map((iterator, index) => promises[index] ?? getNext(iterator));
|
|
28676
|
-
// eslint-disable-next-line no-await-in-loop
|
|
28677
|
-
const [{value, done}, index] = await Promise.race(promises
|
|
28678
|
-
.map((promise, index) => Promise.all([promise, index])));
|
|
28679
|
-
|
|
28680
|
-
const [iterator] = iterators.splice(index, 1);
|
|
28681
|
-
promises.splice(index, 1);
|
|
28682
|
-
|
|
28683
|
-
if (!done) {
|
|
28684
|
-
iterators.push(iterator);
|
|
28685
|
-
yield value;
|
|
28686
|
-
}
|
|
28687
|
-
}
|
|
28688
|
-
} finally {
|
|
28689
|
-
await Promise.all(iterators.map(iterator => iterator.return()));
|
|
28690
|
-
}
|
|
28691
|
-
};
|
|
28692
|
-
|
|
28693
|
-
const getNext = async iterator => {
|
|
28694
|
-
try {
|
|
28695
|
-
return await iterator.next();
|
|
28696
|
-
} catch (error) {
|
|
28697
|
-
await iterator.throw(error);
|
|
28698
|
-
}
|
|
28699
|
-
};
|
|
28700
|
-
|
|
28701
|
-
function spawn(file, second, third, previous) {
|
|
28702
|
-
const [commandArguments = [], options = {}] = Array.isArray(second) ? [second, third] : [[], second];
|
|
28703
|
-
const context = getContext([file, ...commandArguments]);
|
|
28704
|
-
const spawnOptions = getOptions(options);
|
|
28705
|
-
const nodeChildProcess = spawnSubprocess(file, commandArguments, spawnOptions, context);
|
|
28706
|
-
let subprocess = getResult(nodeChildProcess, spawnOptions, context);
|
|
28707
|
-
Object.assign(subprocess, {nodeChildProcess});
|
|
28708
|
-
subprocess = previous ? handlePipe([previous, subprocess]) : subprocess;
|
|
28709
|
-
|
|
28710
|
-
const stdout = lineIterator(subprocess, context, 'stdout');
|
|
28711
|
-
const stderr = lineIterator(subprocess, context, 'stderr');
|
|
28712
|
-
return Object.assign(subprocess, {
|
|
28713
|
-
nodeChildProcess,
|
|
28714
|
-
stdout,
|
|
28715
|
-
stderr,
|
|
28716
|
-
[Symbol.asyncIterator]: () => combineAsyncIterators(stdout, stderr),
|
|
28717
|
-
pipe: (file, second, third) => spawn(file, second, third, subprocess),
|
|
28718
|
-
});
|
|
28719
|
-
}
|
|
28720
|
-
|
|
28721
28353
|
// Process definition lists
|
|
28722
28354
|
//
|
|
28723
28355
|
function deflist_plugin (md) {
|
|
@@ -46243,7 +45875,7 @@ const normalizeFilter = (filter) => {
|
|
|
46243
45875
|
}
|
|
46244
45876
|
return emptyFn;
|
|
46245
45877
|
};
|
|
46246
|
-
class ReaddirpStream extends
|
|
45878
|
+
class ReaddirpStream extends Readable {
|
|
46247
45879
|
constructor(options = {}) {
|
|
46248
45880
|
super({
|
|
46249
45881
|
objectMode: true,
|
|
@@ -46254,7 +45886,7 @@ class ReaddirpStream extends require$$0$4.Readable {
|
|
|
46254
45886
|
const { root, type } = opts;
|
|
46255
45887
|
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
46256
45888
|
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
46257
|
-
const statMethod = opts.lstat ?
|
|
45889
|
+
const statMethod = opts.lstat ? lstat$1 : stat$1;
|
|
46258
45890
|
// Use bigint stats if it's windows and stat() supports options (node 10+).
|
|
46259
45891
|
if (wantBigintFsStats) {
|
|
46260
45892
|
this._stat = (path) => statMethod(path, { bigint: true });
|
|
@@ -46266,7 +45898,7 @@ class ReaddirpStream extends require$$0$4.Readable {
|
|
|
46266
45898
|
this._wantsDir = DIR_TYPES.has(type);
|
|
46267
45899
|
this._wantsFile = FILE_TYPES.has(type);
|
|
46268
45900
|
this._wantsEverything = type === EVERYTHING_TYPE;
|
|
46269
|
-
this._root =
|
|
45901
|
+
this._root = resolve(root);
|
|
46270
45902
|
this._isDirent = !opts.alwaysStat;
|
|
46271
45903
|
this._statsProp = this._isDirent ? 'dirent' : 'stats';
|
|
46272
45904
|
this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
|
|
@@ -46335,7 +45967,7 @@ class ReaddirpStream extends require$$0$4.Readable {
|
|
|
46335
45967
|
async _exploreDir(path, depth) {
|
|
46336
45968
|
let files;
|
|
46337
45969
|
try {
|
|
46338
|
-
files = await
|
|
45970
|
+
files = await readdir$2(path, this._rdOptions);
|
|
46339
45971
|
}
|
|
46340
45972
|
catch (error) {
|
|
46341
45973
|
this._onError(error);
|
|
@@ -46346,8 +45978,8 @@ class ReaddirpStream extends require$$0$4.Readable {
|
|
|
46346
45978
|
let entry;
|
|
46347
45979
|
const basename = this._isDirent ? dirent.name : dirent;
|
|
46348
45980
|
try {
|
|
46349
|
-
const fullPath =
|
|
46350
|
-
entry = { path:
|
|
45981
|
+
const fullPath = resolve(join(path, basename));
|
|
45982
|
+
entry = { path: relative(this._root, fullPath), fullPath, basename };
|
|
46351
45983
|
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
46352
45984
|
}
|
|
46353
45985
|
catch (err) {
|
|
@@ -46378,14 +46010,14 @@ class ReaddirpStream extends require$$0$4.Readable {
|
|
|
46378
46010
|
if (stats && stats.isSymbolicLink()) {
|
|
46379
46011
|
const full = entry.fullPath;
|
|
46380
46012
|
try {
|
|
46381
|
-
const entryRealPath = await
|
|
46382
|
-
const entryRealPathStats = await
|
|
46013
|
+
const entryRealPath = await realpath$1(full);
|
|
46014
|
+
const entryRealPathStats = await lstat$1(entryRealPath);
|
|
46383
46015
|
if (entryRealPathStats.isFile()) {
|
|
46384
46016
|
return 'file';
|
|
46385
46017
|
}
|
|
46386
46018
|
if (entryRealPathStats.isDirectory()) {
|
|
46387
46019
|
const len = entryRealPath.length;
|
|
46388
|
-
if (full.startsWith(entryRealPath) && full.substr(len, 1) ===
|
|
46020
|
+
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sep$1) {
|
|
46389
46021
|
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
46390
46022
|
// @ts-ignore
|
|
46391
46023
|
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
@@ -46439,7 +46071,7 @@ const isWindows = pl === 'win32';
|
|
|
46439
46071
|
const isMacos = pl === 'darwin';
|
|
46440
46072
|
const isLinux = pl === 'linux';
|
|
46441
46073
|
const isFreeBSD = pl === 'freebsd';
|
|
46442
|
-
const isIBMi =
|
|
46074
|
+
const isIBMi = type$2() === 'OS400';
|
|
46443
46075
|
const EVENTS = {
|
|
46444
46076
|
ALL: 'all',
|
|
46445
46077
|
READY: 'ready',
|
|
@@ -46453,7 +46085,7 @@ const EVENTS = {
|
|
|
46453
46085
|
};
|
|
46454
46086
|
const EV = EVENTS;
|
|
46455
46087
|
const THROTTLE_MODE_WATCH = 'watch';
|
|
46456
|
-
const statMethods = { lstat:
|
|
46088
|
+
const statMethods = { lstat: lstat$1, stat: stat$1 };
|
|
46457
46089
|
const KEY_LISTENERS = 'listeners';
|
|
46458
46090
|
const KEY_ERR = 'errHandlers';
|
|
46459
46091
|
const KEY_RAW = 'rawEmitters';
|
|
@@ -46493,7 +46125,7 @@ const binaryExtensions = new Set([
|
|
|
46493
46125
|
'xmind', 'xpi', 'xpm', 'xwd', 'xz',
|
|
46494
46126
|
'z', 'zip', 'zipx',
|
|
46495
46127
|
]);
|
|
46496
|
-
const isBinaryPath = (filePath) => binaryExtensions.has(
|
|
46128
|
+
const isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
|
|
46497
46129
|
// TODO: emit errors properly. Example: EMFILE on Macos.
|
|
46498
46130
|
const foreach = (val, fn) => {
|
|
46499
46131
|
if (val instanceof Set) {
|
|
@@ -46546,11 +46178,11 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
|
|
|
46546
46178
|
// emit based on events occurring for files from a directory's watcher in
|
|
46547
46179
|
// case the file's watcher misses it (and rely on throttling to de-dupe)
|
|
46548
46180
|
if (evPath && path !== evPath) {
|
|
46549
|
-
fsWatchBroadcast(
|
|
46181
|
+
fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
|
|
46550
46182
|
}
|
|
46551
46183
|
};
|
|
46552
46184
|
try {
|
|
46553
|
-
return
|
|
46185
|
+
return watch$2(path, {
|
|
46554
46186
|
persistent: options.persistent,
|
|
46555
46187
|
}, handleEvent);
|
|
46556
46188
|
}
|
|
@@ -46606,7 +46238,7 @@ const setFsWatchListener = (path, fullPath, options, handlers) => {
|
|
|
46606
46238
|
// Workaround for https://github.com/joyent/node/issues/4337
|
|
46607
46239
|
if (isWindows && error.code === 'EPERM') {
|
|
46608
46240
|
try {
|
|
46609
|
-
const fd = await
|
|
46241
|
+
const fd = await open(path, 'r');
|
|
46610
46242
|
await fd.close();
|
|
46611
46243
|
broadcastErr(error);
|
|
46612
46244
|
}
|
|
@@ -46672,7 +46304,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
46672
46304
|
// doesn't seem worthwhile for the added complexity.
|
|
46673
46305
|
// listeners = cont.listeners;
|
|
46674
46306
|
// rawEmitters = cont.rawEmitters;
|
|
46675
|
-
|
|
46307
|
+
unwatchFile(fullPath);
|
|
46676
46308
|
cont = undefined;
|
|
46677
46309
|
}
|
|
46678
46310
|
if (cont) {
|
|
@@ -46687,7 +46319,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
46687
46319
|
listeners: listener,
|
|
46688
46320
|
rawEmitters: rawEmitter,
|
|
46689
46321
|
options,
|
|
46690
|
-
watcher:
|
|
46322
|
+
watcher: watchFile(fullPath, options, (curr, prev) => {
|
|
46691
46323
|
foreach(cont.rawEmitters, (rawEmitter) => {
|
|
46692
46324
|
rawEmitter(EV.CHANGE, fullPath, { curr, prev });
|
|
46693
46325
|
});
|
|
@@ -46707,7 +46339,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
|
|
|
46707
46339
|
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
46708
46340
|
if (isEmptySet(cont.listeners)) {
|
|
46709
46341
|
FsWatchFileInstances.delete(fullPath);
|
|
46710
|
-
|
|
46342
|
+
unwatchFile(fullPath);
|
|
46711
46343
|
cont.options = cont.watcher = undefined;
|
|
46712
46344
|
Object.freeze(cont);
|
|
46713
46345
|
}
|
|
@@ -46729,11 +46361,11 @@ class NodeFsHandler {
|
|
|
46729
46361
|
*/
|
|
46730
46362
|
_watchWithNodeFs(path, listener) {
|
|
46731
46363
|
const opts = this.fsw.options;
|
|
46732
|
-
const directory =
|
|
46733
|
-
const basename =
|
|
46364
|
+
const directory = sysPath.dirname(path);
|
|
46365
|
+
const basename = sysPath.basename(path);
|
|
46734
46366
|
const parent = this.fsw._getWatchedDir(directory);
|
|
46735
46367
|
parent.add(basename);
|
|
46736
|
-
const absolutePath =
|
|
46368
|
+
const absolutePath = sysPath.resolve(path);
|
|
46737
46369
|
const options = {
|
|
46738
46370
|
persistent: opts.persistent,
|
|
46739
46371
|
};
|
|
@@ -46765,8 +46397,8 @@ class NodeFsHandler {
|
|
|
46765
46397
|
if (this.fsw.closed) {
|
|
46766
46398
|
return;
|
|
46767
46399
|
}
|
|
46768
|
-
const dirname =
|
|
46769
|
-
const basename =
|
|
46400
|
+
const dirname = sysPath.dirname(file);
|
|
46401
|
+
const basename = sysPath.basename(file);
|
|
46770
46402
|
const parent = this.fsw._getWatchedDir(dirname);
|
|
46771
46403
|
// stats is always present
|
|
46772
46404
|
let prevStats = stats;
|
|
@@ -46778,7 +46410,7 @@ class NodeFsHandler {
|
|
|
46778
46410
|
return;
|
|
46779
46411
|
if (!newStats || newStats.mtimeMs === 0) {
|
|
46780
46412
|
try {
|
|
46781
|
-
const newStats = await
|
|
46413
|
+
const newStats = await stat$1(file);
|
|
46782
46414
|
if (this.fsw.closed)
|
|
46783
46415
|
return;
|
|
46784
46416
|
// Check that change event was not fired because of changed only accessTime.
|
|
@@ -46843,7 +46475,7 @@ class NodeFsHandler {
|
|
|
46843
46475
|
this.fsw._incrReadyCount();
|
|
46844
46476
|
let linkPath;
|
|
46845
46477
|
try {
|
|
46846
|
-
linkPath = await
|
|
46478
|
+
linkPath = await realpath$1(path);
|
|
46847
46479
|
}
|
|
46848
46480
|
catch (e) {
|
|
46849
46481
|
this.fsw._emitReady();
|
|
@@ -46873,7 +46505,7 @@ class NodeFsHandler {
|
|
|
46873
46505
|
}
|
|
46874
46506
|
_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
|
|
46875
46507
|
// Normalize the directory name on Windows
|
|
46876
|
-
directory =
|
|
46508
|
+
directory = sysPath.join(directory, '');
|
|
46877
46509
|
throttler = this.fsw._throttle('readdir', directory, 1000);
|
|
46878
46510
|
if (!throttler)
|
|
46879
46511
|
return;
|
|
@@ -46892,7 +46524,7 @@ class NodeFsHandler {
|
|
|
46892
46524
|
return;
|
|
46893
46525
|
}
|
|
46894
46526
|
const item = entry.path;
|
|
46895
|
-
let path =
|
|
46527
|
+
let path = sysPath.join(directory, item);
|
|
46896
46528
|
current.add(item);
|
|
46897
46529
|
if (entry.stats.isSymbolicLink() &&
|
|
46898
46530
|
(await this._handleSymlink(entry, directory, path, item))) {
|
|
@@ -46908,7 +46540,7 @@ class NodeFsHandler {
|
|
|
46908
46540
|
if (item === target || (!target && !previous.has(item))) {
|
|
46909
46541
|
this.fsw._incrReadyCount();
|
|
46910
46542
|
// ensure relativeness of path is preserved in case of watcher reuse
|
|
46911
|
-
path =
|
|
46543
|
+
path = sysPath.join(dir, sysPath.relative(dir, path));
|
|
46912
46544
|
this._addToNodeFs(path, initialAdd, wh, depth + 1);
|
|
46913
46545
|
}
|
|
46914
46546
|
})
|
|
@@ -46953,13 +46585,13 @@ class NodeFsHandler {
|
|
|
46953
46585
|
* @returns closer for the watcher instance.
|
|
46954
46586
|
*/
|
|
46955
46587
|
async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
|
|
46956
|
-
const parentDir = this.fsw._getWatchedDir(
|
|
46957
|
-
const tracked = parentDir.has(
|
|
46588
|
+
const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
|
|
46589
|
+
const tracked = parentDir.has(sysPath.basename(dir));
|
|
46958
46590
|
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
|
|
46959
46591
|
this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
46960
46592
|
}
|
|
46961
46593
|
// ensure dir is tracked (harmless if redundant)
|
|
46962
|
-
parentDir.add(
|
|
46594
|
+
parentDir.add(sysPath.basename(dir));
|
|
46963
46595
|
this.fsw._getWatchedDir(dir);
|
|
46964
46596
|
let throttler;
|
|
46965
46597
|
let closer;
|
|
@@ -47011,8 +46643,8 @@ class NodeFsHandler {
|
|
|
47011
46643
|
const follow = this.fsw.options.followSymlinks;
|
|
47012
46644
|
let closer;
|
|
47013
46645
|
if (stats.isDirectory()) {
|
|
47014
|
-
const absPath =
|
|
47015
|
-
const targetPath = follow ? await
|
|
46646
|
+
const absPath = sysPath.resolve(path);
|
|
46647
|
+
const targetPath = follow ? await realpath$1(path) : path;
|
|
47016
46648
|
if (this.fsw.closed)
|
|
47017
46649
|
return;
|
|
47018
46650
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
@@ -47024,10 +46656,10 @@ class NodeFsHandler {
|
|
|
47024
46656
|
}
|
|
47025
46657
|
}
|
|
47026
46658
|
else if (stats.isSymbolicLink()) {
|
|
47027
|
-
const targetPath = follow ? await
|
|
46659
|
+
const targetPath = follow ? await realpath$1(path) : path;
|
|
47028
46660
|
if (this.fsw.closed)
|
|
47029
46661
|
return;
|
|
47030
|
-
const parent =
|
|
46662
|
+
const parent = sysPath.dirname(wh.watchPath);
|
|
47031
46663
|
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
47032
46664
|
this.fsw._emit(EV.ADD, wh.watchPath, stats);
|
|
47033
46665
|
closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
|
|
@@ -47035,7 +46667,7 @@ class NodeFsHandler {
|
|
|
47035
46667
|
return;
|
|
47036
46668
|
// preserve this symlink's target path
|
|
47037
46669
|
if (targetPath !== undefined) {
|
|
47038
|
-
this.fsw._symlinkPaths.set(
|
|
46670
|
+
this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
|
|
47039
46671
|
}
|
|
47040
46672
|
}
|
|
47041
46673
|
else {
|
|
@@ -47081,11 +46713,11 @@ function createPattern(matcher) {
|
|
|
47081
46713
|
if (matcher.path === string)
|
|
47082
46714
|
return true;
|
|
47083
46715
|
if (matcher.recursive) {
|
|
47084
|
-
const relative =
|
|
46716
|
+
const relative = sysPath.relative(matcher.path, string);
|
|
47085
46717
|
if (!relative) {
|
|
47086
46718
|
return false;
|
|
47087
46719
|
}
|
|
47088
|
-
return !relative.startsWith('..') && !
|
|
46720
|
+
return !relative.startsWith('..') && !sysPath.isAbsolute(relative);
|
|
47089
46721
|
}
|
|
47090
46722
|
return false;
|
|
47091
46723
|
};
|
|
@@ -47095,7 +46727,7 @@ function createPattern(matcher) {
|
|
|
47095
46727
|
function normalizePath(path) {
|
|
47096
46728
|
if (typeof path !== 'string')
|
|
47097
46729
|
throw new Error('string expected');
|
|
47098
|
-
path =
|
|
46730
|
+
path = sysPath.normalize(path);
|
|
47099
46731
|
path = path.replace(/\\/g, '/');
|
|
47100
46732
|
let prepend = false;
|
|
47101
46733
|
if (path.startsWith('//'))
|
|
@@ -47155,21 +46787,21 @@ const toUnix = (string) => {
|
|
|
47155
46787
|
};
|
|
47156
46788
|
// Our version of upath.normalize
|
|
47157
46789
|
// TODO: this is not equal to path-normalize module - investigate why
|
|
47158
|
-
const normalizePathToUnix = (path) => toUnix(
|
|
46790
|
+
const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
|
|
47159
46791
|
// TODO: refactor
|
|
47160
46792
|
const normalizeIgnored = (cwd = '') => (path) => {
|
|
47161
46793
|
if (typeof path === 'string') {
|
|
47162
|
-
return normalizePathToUnix(
|
|
46794
|
+
return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
|
|
47163
46795
|
}
|
|
47164
46796
|
else {
|
|
47165
46797
|
return path;
|
|
47166
46798
|
}
|
|
47167
46799
|
};
|
|
47168
46800
|
const getAbsolutePath = (path, cwd) => {
|
|
47169
|
-
if (
|
|
46801
|
+
if (sysPath.isAbsolute(path)) {
|
|
47170
46802
|
return path;
|
|
47171
46803
|
}
|
|
47172
|
-
return
|
|
46804
|
+
return sysPath.join(cwd, path);
|
|
47173
46805
|
};
|
|
47174
46806
|
const EMPTY_SET = Object.freeze(new Set());
|
|
47175
46807
|
/**
|
|
@@ -47197,11 +46829,11 @@ class DirEntry {
|
|
|
47197
46829
|
return;
|
|
47198
46830
|
const dir = this.path;
|
|
47199
46831
|
try {
|
|
47200
|
-
await
|
|
46832
|
+
await readdir$2(dir);
|
|
47201
46833
|
}
|
|
47202
46834
|
catch (err) {
|
|
47203
46835
|
if (this._removeWatcher) {
|
|
47204
|
-
this._removeWatcher(
|
|
46836
|
+
this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
|
|
47205
46837
|
}
|
|
47206
46838
|
}
|
|
47207
46839
|
}
|
|
@@ -47233,7 +46865,7 @@ class WatchHelper {
|
|
|
47233
46865
|
const watchPath = path;
|
|
47234
46866
|
this.path = path = path.replace(REPLACER_RE, '');
|
|
47235
46867
|
this.watchPath = watchPath;
|
|
47236
|
-
this.fullWatchPath =
|
|
46868
|
+
this.fullWatchPath = sysPath.resolve(watchPath);
|
|
47237
46869
|
this.dirParts = [];
|
|
47238
46870
|
this.dirParts.forEach((parts) => {
|
|
47239
46871
|
if (parts.length > 1)
|
|
@@ -47243,7 +46875,7 @@ class WatchHelper {
|
|
|
47243
46875
|
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
47244
46876
|
}
|
|
47245
46877
|
entryPath(entry) {
|
|
47246
|
-
return
|
|
46878
|
+
return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, entry.fullPath));
|
|
47247
46879
|
}
|
|
47248
46880
|
filterPath(entry) {
|
|
47249
46881
|
const { stats } = entry;
|
|
@@ -47265,7 +46897,7 @@ class WatchHelper {
|
|
|
47265
46897
|
* .add(directories)
|
|
47266
46898
|
* .on('add', path => log('File', path, 'was added'))
|
|
47267
46899
|
*/
|
|
47268
|
-
class FSWatcher extends
|
|
46900
|
+
class FSWatcher extends EventEmitter$2 {
|
|
47269
46901
|
// Not indenting methods for history sake; for now.
|
|
47270
46902
|
constructor(_opts = {}) {
|
|
47271
46903
|
super();
|
|
@@ -47399,7 +47031,7 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47399
47031
|
return;
|
|
47400
47032
|
results.forEach((item) => {
|
|
47401
47033
|
if (item)
|
|
47402
|
-
this.add(
|
|
47034
|
+
this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
|
|
47403
47035
|
});
|
|
47404
47036
|
});
|
|
47405
47037
|
return this;
|
|
@@ -47414,10 +47046,10 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47414
47046
|
const { cwd } = this.options;
|
|
47415
47047
|
paths.forEach((path) => {
|
|
47416
47048
|
// convert to absolute path unless relative path already matches
|
|
47417
|
-
if (!
|
|
47049
|
+
if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
|
|
47418
47050
|
if (cwd)
|
|
47419
|
-
path =
|
|
47420
|
-
path =
|
|
47051
|
+
path = sysPath.join(cwd, path);
|
|
47052
|
+
path = sysPath.resolve(path);
|
|
47421
47053
|
}
|
|
47422
47054
|
this._closePath(path);
|
|
47423
47055
|
this._addIgnoredPath(path);
|
|
@@ -47471,7 +47103,7 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47471
47103
|
getWatched() {
|
|
47472
47104
|
const watchList = {};
|
|
47473
47105
|
this._watched.forEach((entry, dir) => {
|
|
47474
|
-
const key = this.options.cwd ?
|
|
47106
|
+
const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
|
|
47475
47107
|
const index = key || ONE_DOT;
|
|
47476
47108
|
watchList[index] = entry.getChildren().sort();
|
|
47477
47109
|
});
|
|
@@ -47497,9 +47129,9 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47497
47129
|
return;
|
|
47498
47130
|
const opts = this.options;
|
|
47499
47131
|
if (isWindows)
|
|
47500
|
-
path =
|
|
47132
|
+
path = sysPath.normalize(path);
|
|
47501
47133
|
if (opts.cwd)
|
|
47502
|
-
path =
|
|
47134
|
+
path = sysPath.relative(opts.cwd, path);
|
|
47503
47135
|
const args = [path];
|
|
47504
47136
|
if (stats != null)
|
|
47505
47137
|
args.push(stats);
|
|
@@ -47555,10 +47187,10 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47555
47187
|
if (opts.alwaysStat &&
|
|
47556
47188
|
stats === undefined &&
|
|
47557
47189
|
(event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
47558
|
-
const fullPath = opts.cwd ?
|
|
47190
|
+
const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
|
|
47559
47191
|
let stats;
|
|
47560
47192
|
try {
|
|
47561
|
-
stats = await
|
|
47193
|
+
stats = await stat$1(fullPath);
|
|
47562
47194
|
}
|
|
47563
47195
|
catch (err) {
|
|
47564
47196
|
// do nothing
|
|
@@ -47638,13 +47270,13 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47638
47270
|
const pollInterval = awf.pollInterval;
|
|
47639
47271
|
let timeoutHandler;
|
|
47640
47272
|
let fullPath = path;
|
|
47641
|
-
if (this.options.cwd && !
|
|
47642
|
-
fullPath =
|
|
47273
|
+
if (this.options.cwd && !sysPath.isAbsolute(path)) {
|
|
47274
|
+
fullPath = sysPath.join(this.options.cwd, path);
|
|
47643
47275
|
}
|
|
47644
47276
|
const now = new Date();
|
|
47645
47277
|
const writes = this._pendingWrites;
|
|
47646
47278
|
function awaitWriteFinishFn(prevStat) {
|
|
47647
|
-
|
|
47279
|
+
stat$2(fullPath, (err, curStat) => {
|
|
47648
47280
|
if (err || !writes.has(path)) {
|
|
47649
47281
|
if (err && err.code !== 'ENOENT')
|
|
47650
47282
|
awfEmit(err);
|
|
@@ -47710,7 +47342,7 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47710
47342
|
* @param directory path of the directory
|
|
47711
47343
|
*/
|
|
47712
47344
|
_getWatchedDir(directory) {
|
|
47713
|
-
const dir =
|
|
47345
|
+
const dir = sysPath.resolve(directory);
|
|
47714
47346
|
if (!this._watched.has(dir))
|
|
47715
47347
|
this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
47716
47348
|
return this._watched.get(dir);
|
|
@@ -47736,8 +47368,8 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47736
47368
|
// if what is being deleted is a directory, get that directory's paths
|
|
47737
47369
|
// for recursive deleting and cleaning of watched object
|
|
47738
47370
|
// if it is not a directory, nestedDirectoryChildren will be empty array
|
|
47739
|
-
const path =
|
|
47740
|
-
const fullPath =
|
|
47371
|
+
const path = sysPath.join(directory, item);
|
|
47372
|
+
const fullPath = sysPath.resolve(path);
|
|
47741
47373
|
isDirectory =
|
|
47742
47374
|
isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
|
|
47743
47375
|
// prevent duplicate handling in case of arriving here nearly simultaneously
|
|
@@ -47769,7 +47401,7 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47769
47401
|
// If we wait for this file to be fully written, cancel the wait.
|
|
47770
47402
|
let relPath = path;
|
|
47771
47403
|
if (this.options.cwd)
|
|
47772
|
-
relPath =
|
|
47404
|
+
relPath = sysPath.relative(this.options.cwd, path);
|
|
47773
47405
|
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
47774
47406
|
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
47775
47407
|
if (event === EVENTS.ADD)
|
|
@@ -47790,8 +47422,8 @@ class FSWatcher extends require$$3.EventEmitter {
|
|
|
47790
47422
|
*/
|
|
47791
47423
|
_closePath(path) {
|
|
47792
47424
|
this._closeFile(path);
|
|
47793
|
-
const dir =
|
|
47794
|
-
this._getWatchedDir(dir).remove(
|
|
47425
|
+
const dir = sysPath.dirname(path);
|
|
47426
|
+
this._getWatchedDir(dir).remove(sysPath.basename(path));
|
|
47795
47427
|
}
|
|
47796
47428
|
/**
|
|
47797
47429
|
* Closes only file-specific watchers
|
|
@@ -47863,7 +47495,7 @@ function requireSafeBuffer () {
|
|
|
47863
47495
|
hasRequiredSafeBuffer = 1;
|
|
47864
47496
|
(function (module, exports) {
|
|
47865
47497
|
/* eslint-disable node/no-deprecated-api */
|
|
47866
|
-
var buffer = require$$0$
|
|
47498
|
+
var buffer = require$$0$6;
|
|
47867
47499
|
var Buffer = buffer.Buffer;
|
|
47868
47500
|
|
|
47869
47501
|
// alternative to using Object.keys for old browsers
|
|
@@ -47981,7 +47613,7 @@ function requireStreams () {
|
|
|
47981
47613
|
**/
|
|
47982
47614
|
|
|
47983
47615
|
|
|
47984
|
-
var Stream = require$$0$
|
|
47616
|
+
var Stream = require$$0$3.Stream,
|
|
47985
47617
|
util = require$$1$1;
|
|
47986
47618
|
|
|
47987
47619
|
|
|
@@ -50193,7 +49825,7 @@ function requireProxy () {
|
|
|
50193
49825
|
hasRequiredProxy = 1;
|
|
50194
49826
|
|
|
50195
49827
|
var Buffer = requireSafeBuffer().Buffer,
|
|
50196
|
-
Stream = require$$0$
|
|
49828
|
+
Stream = require$$0$3.Stream,
|
|
50197
49829
|
url = require$$2,
|
|
50198
49830
|
util = require$$1$1,
|
|
50199
49831
|
Base = requireBase(),
|
|
@@ -50944,7 +50576,7 @@ function requireApi () {
|
|
|
50944
50576
|
if (hasRequiredApi) return api;
|
|
50945
50577
|
hasRequiredApi = 1;
|
|
50946
50578
|
|
|
50947
|
-
var Stream = require$$0$
|
|
50579
|
+
var Stream = require$$0$3.Stream,
|
|
50948
50580
|
util = require$$1$1,
|
|
50949
50581
|
driver = requireDriver(),
|
|
50950
50582
|
EventTarget = requireEvent_target(),
|
|
@@ -51249,7 +50881,7 @@ function requireEventsource () {
|
|
|
51249
50881
|
if (hasRequiredEventsource) return eventsource;
|
|
51250
50882
|
hasRequiredEventsource = 1;
|
|
51251
50883
|
|
|
51252
|
-
var Stream = require$$0$
|
|
50884
|
+
var Stream = require$$0$3.Stream,
|
|
51253
50885
|
util = require$$1$1,
|
|
51254
50886
|
driver = requireDriver(),
|
|
51255
50887
|
Headers = requireHeaders(),
|
|
@@ -52173,7 +51805,7 @@ var hasRequiredSupportsColor;
|
|
|
52173
51805
|
function requireSupportsColor () {
|
|
52174
51806
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
52175
51807
|
hasRequiredSupportsColor = 1;
|
|
52176
|
-
const os = require$$0$
|
|
51808
|
+
const os = require$$0$7;
|
|
52177
51809
|
const tty = require$$1$4;
|
|
52178
51810
|
const hasFlag = requireHasFlag();
|
|
52179
51811
|
|
|
@@ -53039,7 +52671,7 @@ function requireString_decoder () {
|
|
|
53039
52671
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
53040
52672
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
53041
52673
|
|
|
53042
|
-
var Buffer = require$$0$
|
|
52674
|
+
var Buffer = require$$0$6.Buffer;
|
|
53043
52675
|
|
|
53044
52676
|
var isBufferEncoding = Buffer.isEncoding
|
|
53045
52677
|
|| function(encoding) {
|
|
@@ -56608,7 +56240,7 @@ function requireServer () {
|
|
|
56608
56240
|
|
|
56609
56241
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
56610
56242
|
|
|
56611
|
-
var _fs = require$$0$
|
|
56243
|
+
var _fs = require$$0$4;
|
|
56612
56244
|
|
|
56613
56245
|
var _fs2 = _interopRequireDefault(_fs);
|
|
56614
56246
|
|
|
@@ -57073,23 +56705,5 @@ function requireSrc () {
|
|
|
57073
56705
|
var srcExports = requireSrc();
|
|
57074
56706
|
var tinylr = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
57075
56707
|
|
|
57076
|
-
|
|
57077
|
-
|
|
57078
|
-
exports.cliProgress = cliProgress;
|
|
57079
|
-
exports.closest = closest;
|
|
57080
|
-
exports.createInstance = createInstance;
|
|
57081
|
-
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
57082
|
-
exports.dedent = dedent;
|
|
57083
|
-
exports.deflist_plugin = deflist_plugin;
|
|
57084
|
-
exports.distance = distance;
|
|
57085
|
-
exports.fm = fm;
|
|
57086
|
-
exports.fse = fse;
|
|
57087
|
-
exports.glob = glob;
|
|
57088
|
-
exports.globSync = globSync;
|
|
57089
|
-
exports.isCI = isCI;
|
|
57090
|
-
exports.minimatch = minimatch;
|
|
57091
|
-
exports.moduleImporter = moduleImporter;
|
|
57092
|
-
exports.spawn = spawn;
|
|
57093
|
-
exports.tinylr = tinylr;
|
|
57094
|
-
exports.watch = watch$1;
|
|
57095
|
-
//# sourceMappingURL=vendor-CIZoJHXd.js.map
|
|
56708
|
+
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, tinylr as t, watch$1 as w };
|
|
56709
|
+
//# sourceMappingURL=vendor-DiqWVUfS.mjs.map
|