filter-scan-dir 1.6.0 → 2.0.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 +3 -10
- package/{dist-esm → dist}/index.js +0 -2
- package/{dist-esm → dist}/util.js +0 -1
- package/index.cjs +4 -9
- package/package.json +16 -24
- package/dist-cjs/index.cjs +0 -349
- package/dist-cjs/index.cjs.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist-cjs/util.cjs +0 -46
- package/dist-cjs/util.cjs.map +0 -1
- package/dist-cjs/util.js.map +0 -1
- package/dist-esm/index.d.ts +0 -141
- package/dist-esm/index.js.map +0 -1
- package/dist-esm/tsconfig.esm.tsbuildinfo +0 -1
- package/dist-esm/util.d.ts +0 -20
- package/dist-esm/util.js.map +0 -1
- /package/{dist-cjs → dist}/index.d.ts +0 -0
- /package/{dist-cjs → dist}/util.d.ts +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[![License][license-image]][license-url]
|
|
4
4
|
[![build][build-image]][build-url]
|
|
5
|
-
[![coverage][coverage-image]][coverage-url]
|
|
6
5
|
|
|
7
6
|
[![Downloads][downloads-image]][downloads-url]
|
|
8
7
|
|
|
@@ -41,18 +40,12 @@ Licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses
|
|
|
41
40
|
|
|
42
41
|
[npm-version-svg]: https://badge.fury.io/js/filter-scan-dir.svg
|
|
43
42
|
[package-url]: https://npmjs.com/package/filter-scan-dir
|
|
44
|
-
[deps-svg]: https://david-dm.org/filter-scan-dir.svg
|
|
45
|
-
[deps-url]: https://david-dm.org/filter-scan-dir
|
|
46
|
-
[dev-deps-svg]: https://david-dm.org/filter-scan-dir/dev-status.svg
|
|
47
|
-
[dev-deps-url]: https://david-dm.org/filter-scan-dir#info=devDependencies
|
|
48
43
|
[license-image]: https://img.shields.io/npm/l/filter-scan-dir.svg
|
|
49
44
|
[license-url]: LICENSE
|
|
50
|
-
[build-image]: https://github.com/jchip/
|
|
51
|
-
[build-url]: https://github.com/jchip/
|
|
52
|
-
[coverage-image]: https://coveralls.io/repos/github/jchip/filter-scan-dir/badge.svg?branch=main
|
|
53
|
-
[coverage-url]: https://coveralls.io/github/jchip/filter-scan-dir?branch=main
|
|
45
|
+
[build-image]: https://github.com/jchip/fynjs/actions/workflows/ci.yml/badge.svg
|
|
46
|
+
[build-url]: https://github.com/jchip/fynjs/actions/workflows/ci.yml
|
|
54
47
|
[downloads-image]: https://img.shields.io/npm/dm/filter-scan-dir.svg
|
|
55
48
|
[downloads-url]: https://npm-stat.com/charts.html?package=filter-scan-dir
|
|
56
49
|
[npm-badge-png]: https://nodei.co/npm/filter-scan-dir.png?downloads=true&stars=true
|
|
57
50
|
[api docs]: https://jchip.github.io/filter-scan-dir/modules.html#filterScanDir
|
|
58
|
-
[github]: https://github.com/jchip/filter-scan-dir
|
|
51
|
+
[github]: https://github.com/jchip/fynjs/tree/main/packages/filter-scan-dir
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-statements, complexity, comma-dangle, max-params, max-depth */
|
|
2
1
|
import Fs from "fs";
|
|
3
2
|
import Path from "path";
|
|
4
3
|
import Util from "util";
|
|
@@ -339,4 +338,3 @@ export function filterScanDirSync(options = {}) {
|
|
|
339
338
|
const options2 = makeOptions(options);
|
|
340
339
|
return walkSync(options2.prefix, options2);
|
|
341
340
|
}
|
|
342
|
-
//# sourceMappingURL=index.js.map
|
package/index.cjs
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// ESM-only build; this shim keeps `require("filter-scan-dir")` callable,
|
|
4
|
+
// because require(esm) yields the module namespace rather than a function.
|
|
5
|
+
const m = require("./dist/index.js");
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
return x.filterScanDir(...args);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
module.exports = filterScanDir;
|
|
10
|
-
|
|
11
|
-
filterScanDir.filterScanDir = x.filterScanDir;
|
|
12
|
-
filterScanDir.filterScanDirSync = x.filterScanDirSync;
|
|
7
|
+
module.exports = Object.assign(m.filterScanDir, m);
|
package/package.json
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "filter-scan-dir",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Recursively scan and filter directory for a flat array of files",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"types": "dist
|
|
7
|
-
"main": "
|
|
8
|
-
"module": "dist-esm/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"main": "./index.cjs",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"types": "./dist-cjs/index.d.ts",
|
|
17
|
-
"default": "./index.cjs"
|
|
18
|
-
}
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./index.cjs"
|
|
19
13
|
},
|
|
20
14
|
"./package.json": "./package.json"
|
|
21
15
|
},
|
|
22
16
|
"scripts": {
|
|
23
|
-
"build": "
|
|
17
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
24
18
|
"_clean": "rm -rf dist-*",
|
|
25
|
-
"_build:all": "xrun --concurrent _build:esm _build:cjs",
|
|
26
|
-
"_build:esm": "tsc --build tsconfig.esm.json",
|
|
27
|
-
"_build:cjs": "tsc --build tsconfig.cjs.json",
|
|
28
|
-
"_build:cjs:fix": "ts2mjs --cjs --skip-ts --remove-source dist-cjs",
|
|
29
19
|
"test": "vitest run",
|
|
20
|
+
"ci:check": "tsc --noEmit -p tsconfig.json && npm test",
|
|
30
21
|
"test:watch": "vitest",
|
|
31
22
|
"test:ui": "vitest --ui",
|
|
32
23
|
"coverage": "vitest run --coverage",
|
|
@@ -40,15 +31,15 @@
|
|
|
40
31
|
},
|
|
41
32
|
"repository": {
|
|
42
33
|
"type": "git",
|
|
43
|
-
"url": "git+https://github.com/jchip/
|
|
34
|
+
"url": "git+https://github.com/jchip/fynjs.git",
|
|
35
|
+
"directory": "packages/filter-scan-dir"
|
|
44
36
|
},
|
|
45
37
|
"publishConfig": {
|
|
46
38
|
"registry": "https://registry.npmjs.com/"
|
|
47
39
|
},
|
|
48
40
|
"files": [
|
|
49
41
|
"index.cjs",
|
|
50
|
-
"dist
|
|
51
|
-
"dist-esm"
|
|
42
|
+
"dist"
|
|
52
43
|
],
|
|
53
44
|
"keywords": [
|
|
54
45
|
"util",
|
|
@@ -66,11 +57,12 @@
|
|
|
66
57
|
"author": "Joel Chen <joel123@gmail.com>",
|
|
67
58
|
"license": "Apache-2.0",
|
|
68
59
|
"bugs": {
|
|
69
|
-
"url": "https://github.com/jchip/
|
|
60
|
+
"url": "https://github.com/jchip/fynjs/issues"
|
|
70
61
|
},
|
|
71
|
-
"homepage": "https://github.com/jchip/filter-scan-dir",
|
|
62
|
+
"homepage": "https://github.com/jchip/fynjs/tree/main/packages/filter-scan-dir",
|
|
72
63
|
"dependencies": {},
|
|
73
64
|
"engines": {
|
|
74
|
-
"node": ">=12"
|
|
75
|
-
}
|
|
65
|
+
"node": ">=22.12.0"
|
|
66
|
+
},
|
|
67
|
+
"sideEffects": false
|
|
76
68
|
}
|
package/dist-cjs/index.cjs
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable max-statements, complexity, comma-dangle, max-params, max-depth */
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.filterScanDir = filterScanDir;
|
|
8
|
-
exports.filterScanDirSync = filterScanDirSync;
|
|
9
|
-
const fs_1 = __importDefault(require("fs"));
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const util_1 = __importDefault(require("util"));
|
|
12
|
-
const util_ts_1 = require("./util.cjs");
|
|
13
|
-
/**
|
|
14
|
-
* create a new ExtrasData object
|
|
15
|
-
*
|
|
16
|
-
* @param file
|
|
17
|
-
* @param fullFile
|
|
18
|
-
* @param path
|
|
19
|
-
* @param stat
|
|
20
|
-
* @param options
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
function makeExtrasData(file, fullFile, path, stat, files, options) {
|
|
24
|
-
const dirFile = (0, util_ts_1.join2)(options._sep, path, file);
|
|
25
|
-
const ix = file.lastIndexOf(".");
|
|
26
|
-
if (ix > 0) {
|
|
27
|
-
return {
|
|
28
|
-
file,
|
|
29
|
-
path,
|
|
30
|
-
stat,
|
|
31
|
-
fullFile,
|
|
32
|
-
dirFile,
|
|
33
|
-
ext: file.substring(ix),
|
|
34
|
-
noExt: file.substring(0, ix),
|
|
35
|
-
files,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return {
|
|
40
|
-
file,
|
|
41
|
-
path,
|
|
42
|
-
stat,
|
|
43
|
-
fullFile,
|
|
44
|
-
dirFile,
|
|
45
|
-
ext: "",
|
|
46
|
-
noExt: file,
|
|
47
|
-
files,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Add a file entry to the result
|
|
53
|
-
*
|
|
54
|
-
* @param result
|
|
55
|
-
* @param options
|
|
56
|
-
* @param extras
|
|
57
|
-
*/
|
|
58
|
-
function addResult(result, options, extras) {
|
|
59
|
-
const group = (options.grouping && typeof result === "string" ? result : result && result.group) || "files";
|
|
60
|
-
if (!options.result[group]) {
|
|
61
|
-
options.result[group] = [];
|
|
62
|
-
}
|
|
63
|
-
if (result.formatName !== undefined) {
|
|
64
|
-
options.result[group].push(result.formatName);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
options.result[group].push(options.prependCwd ? extras.fullFile : extras.dirFile);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Process a directory entry
|
|
72
|
-
*
|
|
73
|
-
* @param options
|
|
74
|
-
* @param extras
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
function processDir(options, extras) {
|
|
78
|
-
const filterResult = options.filterDir
|
|
79
|
-
? options.filterDir(extras.file, extras.path, extras)
|
|
80
|
-
: true;
|
|
81
|
-
if (filterResult) {
|
|
82
|
-
if (filterResult.skip !== true && options.includeDir) {
|
|
83
|
-
addResult(filterResult, options, extras);
|
|
84
|
-
}
|
|
85
|
-
return { stop: filterResult.stop, skip: filterResult.skip };
|
|
86
|
-
}
|
|
87
|
-
return { stop: false, skip: true };
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* process a file entry
|
|
91
|
-
*
|
|
92
|
-
* @param options
|
|
93
|
-
* @param extras
|
|
94
|
-
* @returns
|
|
95
|
-
*/
|
|
96
|
-
function processFile(options, extras) {
|
|
97
|
-
// If includeDir is false and includeSymlink is not true, skip symlinks
|
|
98
|
-
// This prevents symlinks to directories from being included as files
|
|
99
|
-
if (!options.includeDir &&
|
|
100
|
-
!options.includeSymlink &&
|
|
101
|
-
extras.stat &&
|
|
102
|
-
extras.stat.isSymbolicLink &&
|
|
103
|
-
extras.stat.isSymbolicLink()) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
if (options.ignoreExt.length > 0 && options.ignoreExt.indexOf(extras.ext) >= 0) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
if (options.filterExt.length > 0 && options.filterExt.indexOf(extras.ext) < 0) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
const filterResult = options.filter ? options.filter(extras.file, extras.path, extras) : true; // default to include
|
|
113
|
-
if (filterResult) {
|
|
114
|
-
if (filterResult.skip !== true) {
|
|
115
|
-
addResult(filterResult, options, extras);
|
|
116
|
-
}
|
|
117
|
-
return filterResult.stop;
|
|
118
|
-
}
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* get the result base on grouping enable flag
|
|
123
|
-
*
|
|
124
|
-
* @param options
|
|
125
|
-
* @returns
|
|
126
|
-
*/
|
|
127
|
-
function getResult(options) {
|
|
128
|
-
return options.grouping
|
|
129
|
-
? Object.assign({ files: [] }, options.result)
|
|
130
|
-
: options.result.files || [];
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* sync version of directory walk
|
|
134
|
-
*
|
|
135
|
-
* @param path
|
|
136
|
-
* @param options
|
|
137
|
-
* @param level
|
|
138
|
-
* @returns
|
|
139
|
-
*/
|
|
140
|
-
function walkSync(path, options, level = 0) {
|
|
141
|
-
try {
|
|
142
|
-
// Use Path.join to normalize the directory path once at entry
|
|
143
|
-
const dir = path_1.default.join(options.dir, path);
|
|
144
|
-
let files = fs_1.default.readdirSync(dir, options.readdirOpts);
|
|
145
|
-
if (options.sortFiles) {
|
|
146
|
-
if (options.fullStat) {
|
|
147
|
-
files = files.sort();
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
files = files.sort(util_ts_1.direntCmp);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
const dirs = [];
|
|
154
|
-
let stop = false;
|
|
155
|
-
// process files first
|
|
156
|
-
for (let ix = 0; !stop && ix < files.length; ix++) {
|
|
157
|
-
const file = files[ix];
|
|
158
|
-
let extras;
|
|
159
|
-
if (options.fullStat) {
|
|
160
|
-
const fullFile = (0, util_ts_1.join2)(options._sep, dir, file);
|
|
161
|
-
const stat = fs_1.default.lstatSync(fullFile);
|
|
162
|
-
extras = makeExtrasData(file, fullFile, path, stat, files, options);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
const fullFile = (0, util_ts_1.join2)(options._sep, dir, file.name);
|
|
166
|
-
extras = makeExtrasData(file.name, fullFile, path, file, files, options);
|
|
167
|
-
}
|
|
168
|
-
if (extras.stat.isDirectory()) {
|
|
169
|
-
dirs.push(extras);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
stop = processFile(options, extras);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
// now process dirs
|
|
176
|
-
if (!stop && dirs.length > 0) {
|
|
177
|
-
for (let ix = 0; ix < dirs.length; ix++) {
|
|
178
|
-
const extras = dirs[ix];
|
|
179
|
-
const flags = processDir(options, extras);
|
|
180
|
-
if (flags.stop) {
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
if (!flags.skip && level < options.maxLevel) {
|
|
184
|
-
walkSync(extras.dirFile, options, level + 1);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
catch (err) {
|
|
190
|
-
if (options.rethrowError) {
|
|
191
|
-
throw err;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return getResult(options);
|
|
195
|
-
}
|
|
196
|
-
const asyncReaddir = util_1.default.promisify(fs_1.default.readdir);
|
|
197
|
-
const asyncLStat = util_1.default.promisify(fs_1.default.lstat);
|
|
198
|
-
/**
|
|
199
|
-
* async version of dir walk
|
|
200
|
-
*
|
|
201
|
-
* @param path
|
|
202
|
-
* @param options
|
|
203
|
-
* @param level
|
|
204
|
-
* @returns
|
|
205
|
-
*/
|
|
206
|
-
async function walk(path, options, level = 0) {
|
|
207
|
-
try {
|
|
208
|
-
// Use Path.join to normalize the directory path once at entry
|
|
209
|
-
const dir = path_1.default.join(options.dir, path);
|
|
210
|
-
let files = await asyncReaddir(dir, options.readdirOpts);
|
|
211
|
-
if (options.sortFiles) {
|
|
212
|
-
if (options.fullStat) {
|
|
213
|
-
files = files.sort();
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
files = files.sort(util_ts_1.direntCmp);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
const dirs = [];
|
|
220
|
-
let stop = false;
|
|
221
|
-
// process files first
|
|
222
|
-
for (let ix = 0; !stop && ix < files.length; ix++) {
|
|
223
|
-
const file = files[ix];
|
|
224
|
-
let extras;
|
|
225
|
-
if (options.fullStat) {
|
|
226
|
-
const fullFile = (0, util_ts_1.join2)(options._sep, dir, file);
|
|
227
|
-
const stat = await asyncLStat(fullFile);
|
|
228
|
-
extras = makeExtrasData(file, fullFile, path, stat, files, options);
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
const fullFile = (0, util_ts_1.join2)(options._sep, dir, file.name);
|
|
232
|
-
extras = makeExtrasData(file.name, fullFile, path, file, files, options);
|
|
233
|
-
}
|
|
234
|
-
if (extras.stat.isDirectory()) {
|
|
235
|
-
dirs.push(extras);
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
stop = processFile(options, extras);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
// now process dirs
|
|
242
|
-
if (!stop && dirs.length > 0) {
|
|
243
|
-
let promises = [];
|
|
244
|
-
for (let ix = 0; ix < dirs.length; ix++) {
|
|
245
|
-
const extras = dirs[ix];
|
|
246
|
-
const flags = processDir(options, extras);
|
|
247
|
-
if (flags.stop) {
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
if (!flags.skip && level < options.maxLevel) {
|
|
251
|
-
const walkP = walk(extras.dirFile, options, level + 1);
|
|
252
|
-
if (options.concurrency > 1) {
|
|
253
|
-
if (options._concurrentCount < options.concurrency) {
|
|
254
|
-
options._concurrentCount++;
|
|
255
|
-
promises.push(walkP);
|
|
256
|
-
}
|
|
257
|
-
else if (promises.length) {
|
|
258
|
-
await Promise.all(promises);
|
|
259
|
-
options._concurrentCount -= promises.length;
|
|
260
|
-
promises = [walkP];
|
|
261
|
-
options._concurrentCount++;
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
await walkP;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
else {
|
|
268
|
-
await walkP;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
if (promises.length) {
|
|
273
|
-
await Promise.all(promises);
|
|
274
|
-
options._concurrentCount -= promises.length;
|
|
275
|
-
promises = [];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
catch (err) {
|
|
280
|
-
if (options.rethrowError) {
|
|
281
|
-
throw err;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return getResult(options);
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* make a copy of the user's options with proper defaults
|
|
288
|
-
*
|
|
289
|
-
* @param opts
|
|
290
|
-
* @returns
|
|
291
|
-
*/
|
|
292
|
-
function makeOptions(opts) {
|
|
293
|
-
const options = typeof opts === "string" ? { cwd: opts } : opts;
|
|
294
|
-
const sep = options.pathSep || path_1.default.posix.sep;
|
|
295
|
-
let cwd = options.cwd || options.dir || process.cwd();
|
|
296
|
-
if (!options.hasOwnProperty("pathSep") && cwd.includes("\\")) {
|
|
297
|
-
cwd = cwd.replace(/\\/g, "/");
|
|
298
|
-
}
|
|
299
|
-
const cleanExt = (ext) => {
|
|
300
|
-
if (!ext) {
|
|
301
|
-
return ext;
|
|
302
|
-
}
|
|
303
|
-
if (ext.startsWith("*.")) {
|
|
304
|
-
return ext.substring(1);
|
|
305
|
-
}
|
|
306
|
-
if (!ext.startsWith(".")) {
|
|
307
|
-
return `.${ext}`;
|
|
308
|
-
}
|
|
309
|
-
return ext;
|
|
310
|
-
};
|
|
311
|
-
// `includeRoot` was renamed to `prependCwd`, this avoid breaking code still using that
|
|
312
|
-
const prependCwd = (options.hasOwnProperty("includeRoot") ? options.includeRoot : options.prependCwd) ||
|
|
313
|
-
false;
|
|
314
|
-
const opts2 = Object.assign({
|
|
315
|
-
_sep: sep,
|
|
316
|
-
maxLevel: Infinity,
|
|
317
|
-
prefix: "",
|
|
318
|
-
prependCwd,
|
|
319
|
-
fullStat: true,
|
|
320
|
-
concurrency: 50,
|
|
321
|
-
readdirOpts: undefined,
|
|
322
|
-
grouping: undefined,
|
|
323
|
-
}, options, {
|
|
324
|
-
dir: cwd,
|
|
325
|
-
result: {},
|
|
326
|
-
ignoreExt: []
|
|
327
|
-
.concat(options.ignoreExt)
|
|
328
|
-
.map(cleanExt)
|
|
329
|
-
.filter((x) => x),
|
|
330
|
-
filterExt: []
|
|
331
|
-
.concat(options.filterExt)
|
|
332
|
-
.map(cleanExt)
|
|
333
|
-
.filter((x) => x),
|
|
334
|
-
_concurrentCount: 0,
|
|
335
|
-
});
|
|
336
|
-
if (!opts2.fullStat) {
|
|
337
|
-
opts2.readdirOpts = { withFileTypes: true };
|
|
338
|
-
}
|
|
339
|
-
return opts2;
|
|
340
|
-
}
|
|
341
|
-
function filterScanDir(options = {}) {
|
|
342
|
-
const options2 = makeOptions(options);
|
|
343
|
-
return walk(options2.prefix, options2);
|
|
344
|
-
}
|
|
345
|
-
function filterScanDirSync(options = {}) {
|
|
346
|
-
const options2 = makeOptions(options);
|
|
347
|
-
return walkSync(options2.prefix, options2);
|
|
348
|
-
}
|
|
349
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist-cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/dist-cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,oFAAoF;;;;;AAgiBpF,sCAGC;AAMD,8CAGC;AA1iBD,4CAAuC;AACvC,gDAAwB;AACxB,gDAAwB;AACxB,uCAA6C;AAyI7C;;;;;;;;;GASG;AACH,SAAS,cAAc,CACrB,IAAY,EACZ,QAAgB,EAChB,IAAY,EACZ,IAAoB,EACpB,KAA0B,EAC1B,OAAqB;IAErB,MAAM,OAAO,GAAW,IAAA,eAAK,EAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxD,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAEjC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACX,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,QAAQ;YACR,OAAO;YACP,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACvB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;YAC5B,KAAK;SACN,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,QAAQ;YACR,OAAO;YACP,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,IAAI;YACX,KAAK;SACN,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,MAAM,EAAE,OAAqB,EAAE,MAAkB;IAClE,MAAM,KAAK,GACT,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAA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C,QAAQ,CAAC;aACb,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACnB,SAAS,EAAE,EAAE;aACV,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aACzB,GAAG,CAAC,QAAQ,CAAC;aACb,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACnB,gBAAgB,EAAE,CAAC;KACpB,CACF,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACpB,KAAK,CAAC,WAAW,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAUD,SAAgB,aAAa,CAAC,UAA4B,EAAE;IAC1D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAMD,SAAgB,iBAAiB,CAAC,UAA4B,EAAE;IAC9D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/util.ts"],"version":"5.9.3"}
|
package/dist-cjs/util.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.join2 = exports.direntCmp = void 0;
|
|
4
|
-
/* @ignore */
|
|
5
|
-
/**
|
|
6
|
-
* compare Dirent for sorting
|
|
7
|
-
*
|
|
8
|
-
* @param a
|
|
9
|
-
* @param b
|
|
10
|
-
* @returns
|
|
11
|
-
* @ignore
|
|
12
|
-
*/
|
|
13
|
-
const direntCmp = (a, b) => {
|
|
14
|
-
if (a.name === b.name) {
|
|
15
|
-
return 0;
|
|
16
|
-
}
|
|
17
|
-
else if (a.name > b.name) {
|
|
18
|
-
return 1;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return -1;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.direntCmp = direntCmp;
|
|
25
|
-
/**
|
|
26
|
-
* Simple and fast path join for 2 arguments.
|
|
27
|
-
* Assumes first argument is already normalized and second is a simple filename.
|
|
28
|
-
*
|
|
29
|
-
* @param sep - path separator to use
|
|
30
|
-
* @param a - base path (should be normalized)
|
|
31
|
-
* @param b - path component to append (typically a filename)
|
|
32
|
-
* @returns joined path
|
|
33
|
-
*/
|
|
34
|
-
const join2 = (sep, a, b) => {
|
|
35
|
-
if (!a || a === ".") {
|
|
36
|
-
return b || a || ".";
|
|
37
|
-
}
|
|
38
|
-
else if (!b || b === ".") {
|
|
39
|
-
return a;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return a + sep + b;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.join2 = join2;
|
|
46
|
-
//# sourceMappingURL=util.cjs.map
|
package/dist-cjs/util.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.cjs","sources":["util.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/dist-cjs/util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAIA,aAAa;AAEb;;;;;;;GAOG;AACI,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IACxD,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QACtB,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;AACH,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB;AAEF;;;;;;;;GAQG;AACI,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,CAAU,EAAE,CAAU,EAAU,EAAE;IACnE,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;IACvB,CAAC;SAAM,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC;AARW,QAAA,KAAK,SAQhB"}
|
package/dist-esm/index.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { Dirent, Stats } from "fs";
|
|
2
|
-
/**
|
|
3
|
-
* type of the 3rd argument for the filter callback
|
|
4
|
-
*/
|
|
5
|
-
export type ExtrasData = {
|
|
6
|
-
/** name of the file being considered */
|
|
7
|
-
file: string;
|
|
8
|
-
/** path to the directory being processed that contains the file */
|
|
9
|
-
path: string;
|
|
10
|
-
/** result from fs.lstat or readdir */
|
|
11
|
-
stat: Dirent | Stats;
|
|
12
|
-
/** full path with cwd + path + file */
|
|
13
|
-
fullFile: string;
|
|
14
|
-
/** path to file without cwd: path + file */
|
|
15
|
-
dirFile: string;
|
|
16
|
-
/** extsion of the file, ie: `.js` */
|
|
17
|
-
ext: string;
|
|
18
|
-
/** file name without the extension */
|
|
19
|
-
noExt: string;
|
|
20
|
-
/** files in the directory */
|
|
21
|
-
files: (string | Dirent)[];
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Info from the filter callback to indicate what to do next
|
|
25
|
-
*/
|
|
26
|
-
export type FilterInfo = {
|
|
27
|
-
/** name of the group to add the file or directory (if grouping is enabled) */
|
|
28
|
-
group?: string;
|
|
29
|
-
/** if `true` then skip the file or directory, else add it */
|
|
30
|
-
skip?: boolean;
|
|
31
|
-
/** stop the scanning and return the result immediately. */
|
|
32
|
-
stop?: boolean;
|
|
33
|
-
/** if not `undefined`, then use this as the value to add to the output */
|
|
34
|
-
formatName?: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* result from the filter callback
|
|
38
|
-
* - `false` or `undefined` - skip the file or directory
|
|
39
|
-
* - `true` - include the file in the default result
|
|
40
|
-
* - _string_ - name of the group to add the file or directory (if grouping is enabled)
|
|
41
|
-
* - _FilterInfo_ - see type {@link FilterInfo} for details
|
|
42
|
-
*/
|
|
43
|
-
export type FilterResult = boolean | string | FilterInfo;
|
|
44
|
-
/**
|
|
45
|
-
* filter callback for file or directory entry
|
|
46
|
-
* @param file - name of the file/dir being considered
|
|
47
|
-
* @param path - path to the directory containing the file. Not the full path,
|
|
48
|
-
* just the relative path from CWD. It's empty string for the files in the
|
|
49
|
-
* first level directory.
|
|
50
|
-
* @param extras - extras data
|
|
51
|
-
*/
|
|
52
|
-
export type FilterCallback = (file: string, path: string, extras: ExtrasData) => FilterResult;
|
|
53
|
-
/**
|
|
54
|
-
* Options for filterScanDir
|
|
55
|
-
*/
|
|
56
|
-
export type Options = {
|
|
57
|
-
/** current working directory to start scanning */
|
|
58
|
-
cwd?: string;
|
|
59
|
-
/**
|
|
60
|
-
* prefix to add to the paths to scan. It's applied after `cwd`.
|
|
61
|
-
* - The `prefix` will be in the resulting paths. Useful if you want
|
|
62
|
-
* to scan a dir further down from `cwd` but you don't want to prepend
|
|
63
|
-
* CWD to the resulting paths.
|
|
64
|
-
*/
|
|
65
|
-
prefix?: string;
|
|
66
|
-
/** prepend CWD to paths returned */
|
|
67
|
-
prependCwd?: boolean;
|
|
68
|
-
/** sort files from each dir */
|
|
69
|
-
sortFiles?: boolean;
|
|
70
|
-
/** include directories in result */
|
|
71
|
-
includeDir?: boolean;
|
|
72
|
-
/** include symlinks in result (when includeDir is false, symlinks to directories are excluded unless this is true) */
|
|
73
|
-
includeSymlink?: boolean;
|
|
74
|
-
/** zero base max level of directories to recurse into. Default: `Infinity` */
|
|
75
|
-
maxLevel?: number;
|
|
76
|
-
/**
|
|
77
|
-
* use `fs.lstat` to get stat of each file, instead of `readir`'s `withFileTypes` option.
|
|
78
|
-
*
|
|
79
|
-
* - *Default*: `true` - for significant performance improvement, set this to `false`
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
fullStat?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* for async version only - numer of directories to process concurrently. *Default*: `50`
|
|
85
|
-
*
|
|
86
|
-
* - Set this to `0` or `1` to disable concurrent mode
|
|
87
|
-
*
|
|
88
|
-
* NOTE: setting this to a very large number, or `Infinity`, could potentially
|
|
89
|
-
* increase performance very significantly, however, there is a dimishing return
|
|
90
|
-
* and more memory usage, so the default is already fairly good.
|
|
91
|
-
*/
|
|
92
|
-
concurrency?: number;
|
|
93
|
-
/** set to `true` to throw errors instead of ignoring them */
|
|
94
|
-
rethrowError?: boolean;
|
|
95
|
-
/** callback to filter files. */
|
|
96
|
-
filter?: FilterCallback;
|
|
97
|
-
/** callback to filter directories. */
|
|
98
|
-
filterDir?: FilterCallback;
|
|
99
|
-
/** array or string of extensions to ignore. ext must include `.`, ie: `".js"` */
|
|
100
|
-
ignoreExt?: string | string[];
|
|
101
|
-
/** array or string of extensions to include only, apply after `ignoreExt` */
|
|
102
|
-
filterExt?: string | string[];
|
|
103
|
-
/**
|
|
104
|
-
* path separator to use to join entries
|
|
105
|
-
*
|
|
106
|
-
* - *Default*: `path.posix.sep`
|
|
107
|
-
* - If you didn't specify this, then `cwd` is automatically converted to use `/`.
|
|
108
|
-
*/
|
|
109
|
-
pathSep?: string;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* options specifically to set grouping flag `true` to enable grouping of files
|
|
113
|
-
*/
|
|
114
|
-
export type GroupingOptions = {
|
|
115
|
-
/**
|
|
116
|
-
* enable grouping of files
|
|
117
|
-
* This is default to disabled, so it's only expecting `true` to enable it.
|
|
118
|
-
*/
|
|
119
|
-
grouping: true;
|
|
120
|
-
} & Options;
|
|
121
|
-
/**
|
|
122
|
-
* The scanned result if grouping is enabled.
|
|
123
|
-
*
|
|
124
|
-
* - The default `files` group will contain all files not assigned a group
|
|
125
|
-
* - All other files with a group will be assigned to that field
|
|
126
|
-
*/
|
|
127
|
-
export type GroupingResult = {
|
|
128
|
-
files: string[];
|
|
129
|
-
} & Record<string, string[]>;
|
|
130
|
-
/**
|
|
131
|
-
* async version of filter scan dir
|
|
132
|
-
* @param options
|
|
133
|
-
* @returns
|
|
134
|
-
*/
|
|
135
|
-
export declare function filterScanDir(options?: string): Promise<string[]>;
|
|
136
|
-
export declare function filterScanDir(options?: Options): Promise<string[]>;
|
|
137
|
-
export declare function filterScanDir(options?: GroupingOptions): Promise<GroupingResult>;
|
|
138
|
-
/** sync version of filter scan dir */
|
|
139
|
-
export declare function filterScanDirSync(options?: string): string[];
|
|
140
|
-
export declare function filterScanDirSync(options?: Options): string[];
|
|
141
|
-
export declare function filterScanDirSync(options?: GroupingOptions): GroupingResult;
|
package/dist-esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,EAAqB,MAAM,IAAI,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK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,WAAW,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAUD,MAAM,UAAU,aAAa,CAAC,UAA4B,EAAE;IAC1D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACzC,CAAC;AAMD,MAAM,UAAU,iBAAiB,CAAC,UAA4B,EAAE;IAC9D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/util.ts"],"version":"5.9.3"}
|
package/dist-esm/util.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Dirent } from "fs";
|
|
2
|
-
/**
|
|
3
|
-
* compare Dirent for sorting
|
|
4
|
-
*
|
|
5
|
-
* @param a
|
|
6
|
-
* @param b
|
|
7
|
-
* @returns
|
|
8
|
-
* @ignore
|
|
9
|
-
*/
|
|
10
|
-
export declare const direntCmp: (a: Dirent, b: Dirent) => number;
|
|
11
|
-
/**
|
|
12
|
-
* Simple and fast path join for 2 arguments.
|
|
13
|
-
* Assumes first argument is already normalized and second is a simple filename.
|
|
14
|
-
*
|
|
15
|
-
* @param sep - path separator to use
|
|
16
|
-
* @param a - base path (should be normalized)
|
|
17
|
-
* @param b - path component to append (typically a filename)
|
|
18
|
-
* @returns joined path
|
|
19
|
-
*/
|
|
20
|
-
export declare const join2: (sep: string, a?: string, b?: string) => string;
|
package/dist-esm/util.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAIA,aAAa;AAEb;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IACxD,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QACtB,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,CAAU,EAAE,CAAU,EAAU,EAAE;IACnE,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;IACvB,CAAC;SAAM,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC"}
|
|
File without changes
|
|
File without changes
|