@dotpi/tools 2.9.2 → 2.9.4
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/dotpi_root/dist/@dotpi/avahi-monitor-module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/avahi-monitor-module/package.json +3 -2
- package/dotpi_root/dist/@dotpi/javascript/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/javascript/package.json +3 -2
- package/dotpi_root/dist/@dotpi/module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module/package.json +4 -3
- package/dotpi_root/dist/@dotpi/module-module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module-module/package.json +5 -4
- package/package.json +5 -5
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.d.ts +0 -279
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.js +0 -292
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/package.json +0 -49
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/readme.md +0 -337
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/LICENSE +0 -201
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/README.md +0 -180
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/core.js +0 -273
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.d.ts +0 -206
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.js +0 -70
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/realtime.js +0 -16
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/signals.js +0 -34
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/package.json +0 -64
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.d.ts +0 -35
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.js +0 -8
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/package.json +0 -41
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/readme.md +0 -58
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.d.ts +0 -12
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.js +0 -21
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/package.json +0 -47
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/readme.md +0 -35
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.d.ts +0 -90
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.js +0 -55
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/package.json +0 -52
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/readme.md +0 -104
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.d.ts +0 -31
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.js +0 -12
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/package.json +0 -41
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/readme.md +0 -57
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.d.ts +0 -18
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.js +0 -26
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/package.json +0 -49
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/readme.md +0 -34
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.d.ts +0 -279
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.js +0 -292
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/readme.md +0 -337
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/ignore.js +0 -109
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.d.ts +0 -207
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.js +0 -264
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.d.ts +0 -44
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +0 -223
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/readme.md +0 -53
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/default.js +0 -14
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/index.d.ts +0 -29
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/node.js +0 -7
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/readme.md +0 -25
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/package.json +0 -94
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/readme.md +0 -177
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/utilities.js +0 -1
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/LICENSE +0 -201
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/README.md +0 -180
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/core.js +0 -273
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.d.ts +0 -206
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.js +0 -70
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/realtime.js +0 -16
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/signals.js +0 -34
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/package.json +0 -64
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.d.ts +0 -35
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.js +0 -8
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/package.json +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/readme.md +0 -58
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.d.ts +0 -12
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.js +0 -21
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/package.json +0 -47
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/readme.md +0 -35
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.d.ts +0 -90
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.js +0 -55
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/package.json +0 -52
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/readme.md +0 -104
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.d.ts +0 -31
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.js +0 -12
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/package.json +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/readme.md +0 -57
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.d.ts +0 -51
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.js +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/package.json +0 -47
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/readme.md +0 -74
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.d.ts +0 -23
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.js +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/package.json +0 -39
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/readme.md +0 -36
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.d.ts +0 -18
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.js +0 -26
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/readme.md +0 -34
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import nodePath from 'node:path';
|
|
4
|
-
import mergeStreams from '@sindresorhus/merge-streams';
|
|
5
|
-
import fastGlob from 'fast-glob';
|
|
6
|
-
import {isDirectory, isDirectorySync} from 'path-type';
|
|
7
|
-
import {toPath} from 'unicorn-magic';
|
|
8
|
-
import {
|
|
9
|
-
GITIGNORE_FILES_PATTERN,
|
|
10
|
-
isIgnoredByIgnoreFiles,
|
|
11
|
-
isIgnoredByIgnoreFilesSync,
|
|
12
|
-
} from './ignore.js';
|
|
13
|
-
import {isNegativePattern} from './utilities.js';
|
|
14
|
-
|
|
15
|
-
const assertPatternsInput = patterns => {
|
|
16
|
-
if (patterns.some(pattern => typeof pattern !== 'string')) {
|
|
17
|
-
throw new TypeError('Patterns must be a string or an array of strings');
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
22
|
-
const path = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
23
|
-
return nodePath.isAbsolute(path) ? path : nodePath.join(cwd, path);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const getDirectoryGlob = ({directoryPath, files, extensions}) => {
|
|
27
|
-
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]}` : '';
|
|
28
|
-
return files
|
|
29
|
-
? files.map(file => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`))
|
|
30
|
-
: [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ''}`)];
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const directoryToGlob = async (directoryPaths, {
|
|
34
|
-
cwd = process.cwd(),
|
|
35
|
-
files,
|
|
36
|
-
extensions,
|
|
37
|
-
} = {}) => {
|
|
38
|
-
const globs = await Promise.all(directoryPaths.map(async directoryPath =>
|
|
39
|
-
(await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd))) ? getDirectoryGlob({directoryPath, files, extensions}) : directoryPath),
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
return globs.flat();
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const directoryToGlobSync = (directoryPaths, {
|
|
46
|
-
cwd = process.cwd(),
|
|
47
|
-
files,
|
|
48
|
-
extensions,
|
|
49
|
-
} = {}) => directoryPaths.flatMap(directoryPath => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({directoryPath, files, extensions}) : directoryPath);
|
|
50
|
-
|
|
51
|
-
const toPatternsArray = patterns => {
|
|
52
|
-
patterns = [...new Set([patterns].flat())];
|
|
53
|
-
assertPatternsInput(patterns);
|
|
54
|
-
return patterns;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const checkCwdOption = cwd => {
|
|
58
|
-
if (!cwd) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let stat;
|
|
63
|
-
try {
|
|
64
|
-
stat = fs.statSync(cwd);
|
|
65
|
-
} catch {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (!stat.isDirectory()) {
|
|
70
|
-
throw new Error('The `cwd` option must be a path to a directory');
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const normalizeOptions = (options = {}) => {
|
|
75
|
-
options = {
|
|
76
|
-
...options,
|
|
77
|
-
ignore: options.ignore ?? [],
|
|
78
|
-
expandDirectories: options.expandDirectories ?? true,
|
|
79
|
-
cwd: toPath(options.cwd),
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
checkCwdOption(options.cwd);
|
|
83
|
-
|
|
84
|
-
return options;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const normalizeArguments = function_ => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));
|
|
88
|
-
const normalizeArgumentsSync = function_ => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions(options));
|
|
89
|
-
|
|
90
|
-
const getIgnoreFilesPatterns = options => {
|
|
91
|
-
const {ignoreFiles, gitignore} = options;
|
|
92
|
-
|
|
93
|
-
const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
|
|
94
|
-
if (gitignore) {
|
|
95
|
-
patterns.push(GITIGNORE_FILES_PATTERN);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return patterns;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
const getFilter = async options => {
|
|
102
|
-
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
103
|
-
return createFilterFunction(
|
|
104
|
-
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options),
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const getFilterSync = options => {
|
|
109
|
-
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
110
|
-
return createFilterFunction(
|
|
111
|
-
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options),
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const createFilterFunction = isIgnored => {
|
|
116
|
-
const seen = new Set();
|
|
117
|
-
|
|
118
|
-
return fastGlobResult => {
|
|
119
|
-
const pathKey = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
120
|
-
|
|
121
|
-
if (seen.has(pathKey) || (isIgnored && isIgnored(pathKey))) {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
seen.add(pathKey);
|
|
126
|
-
|
|
127
|
-
return true;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));
|
|
132
|
-
|
|
133
|
-
const convertNegativePatterns = (patterns, options) => {
|
|
134
|
-
const tasks = [];
|
|
135
|
-
|
|
136
|
-
while (patterns.length > 0) {
|
|
137
|
-
const index = patterns.findIndex(pattern => isNegativePattern(pattern));
|
|
138
|
-
|
|
139
|
-
if (index === -1) {
|
|
140
|
-
tasks.push({patterns, options});
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const ignorePattern = patterns[index].slice(1);
|
|
145
|
-
|
|
146
|
-
for (const task of tasks) {
|
|
147
|
-
task.options.ignore.push(ignorePattern);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (index !== 0) {
|
|
151
|
-
tasks.push({
|
|
152
|
-
patterns: patterns.slice(0, index),
|
|
153
|
-
options: {
|
|
154
|
-
...options,
|
|
155
|
-
ignore: [
|
|
156
|
-
...options.ignore,
|
|
157
|
-
ignorePattern,
|
|
158
|
-
],
|
|
159
|
-
},
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
patterns = patterns.slice(index + 1);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return tasks;
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const normalizeExpandDirectoriesOption = (options, cwd) => ({
|
|
170
|
-
...(cwd ? {cwd} : {}),
|
|
171
|
-
...(Array.isArray(options) ? {files: options} : options),
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
const generateTasks = async (patterns, options) => {
|
|
175
|
-
const globTasks = convertNegativePatterns(patterns, options);
|
|
176
|
-
|
|
177
|
-
const {cwd, expandDirectories} = options;
|
|
178
|
-
|
|
179
|
-
if (!expandDirectories) {
|
|
180
|
-
return globTasks;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
184
|
-
|
|
185
|
-
return Promise.all(
|
|
186
|
-
globTasks.map(async task => {
|
|
187
|
-
let {patterns, options} = task;
|
|
188
|
-
|
|
189
|
-
[
|
|
190
|
-
patterns,
|
|
191
|
-
options.ignore,
|
|
192
|
-
] = await Promise.all([
|
|
193
|
-
directoryToGlob(patterns, directoryToGlobOptions),
|
|
194
|
-
directoryToGlob(options.ignore, {cwd}),
|
|
195
|
-
]);
|
|
196
|
-
|
|
197
|
-
return {patterns, options};
|
|
198
|
-
}),
|
|
199
|
-
);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
const generateTasksSync = (patterns, options) => {
|
|
203
|
-
const globTasks = convertNegativePatterns(patterns, options);
|
|
204
|
-
const {cwd, expandDirectories} = options;
|
|
205
|
-
|
|
206
|
-
if (!expandDirectories) {
|
|
207
|
-
return globTasks;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
211
|
-
|
|
212
|
-
return globTasks.map(task => {
|
|
213
|
-
let {patterns, options} = task;
|
|
214
|
-
patterns = directoryToGlobSync(patterns, directoryToGlobSyncOptions);
|
|
215
|
-
options.ignore = directoryToGlobSync(options.ignore, {cwd});
|
|
216
|
-
return {patterns, options};
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
export const globby = normalizeArguments(async (patterns, options) => {
|
|
221
|
-
const [
|
|
222
|
-
tasks,
|
|
223
|
-
filter,
|
|
224
|
-
] = await Promise.all([
|
|
225
|
-
generateTasks(patterns, options),
|
|
226
|
-
getFilter(options),
|
|
227
|
-
]);
|
|
228
|
-
|
|
229
|
-
const results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));
|
|
230
|
-
return unionFastGlobResults(results, filter);
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
export const globbySync = normalizeArgumentsSync((patterns, options) => {
|
|
234
|
-
const tasks = generateTasksSync(patterns, options);
|
|
235
|
-
const filter = getFilterSync(options);
|
|
236
|
-
const results = tasks.map(task => fastGlob.sync(task.patterns, task.options));
|
|
237
|
-
return unionFastGlobResults(results, filter);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
export const globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
241
|
-
const tasks = generateTasksSync(patterns, options);
|
|
242
|
-
const filter = getFilterSync(options);
|
|
243
|
-
const streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));
|
|
244
|
-
const stream = mergeStreams(streams).filter(fastGlobResult => filter(fastGlobResult));
|
|
245
|
-
|
|
246
|
-
// TODO: Make it return a web stream at some point.
|
|
247
|
-
// return Readable.toWeb(stream);
|
|
248
|
-
|
|
249
|
-
return stream;
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
export const isDynamicPattern = normalizeArgumentsSync(
|
|
253
|
-
(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),
|
|
254
|
-
);
|
|
255
|
-
|
|
256
|
-
export const generateGlobTasks = normalizeArguments(generateTasks);
|
|
257
|
-
export const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
258
|
-
|
|
259
|
-
export {
|
|
260
|
-
isGitIgnored,
|
|
261
|
-
isGitIgnoredSync,
|
|
262
|
-
} from './ignore.js';
|
|
263
|
-
|
|
264
|
-
export const {convertPathToPattern} = fastGlob;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {type Readable} from 'node:stream';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
Merges an array of [readable streams](https://nodejs.org/api/stream.html#readable-streams) and returns a new readable stream that emits data from the individual streams as it arrives.
|
|
5
|
-
|
|
6
|
-
If you provide an empty array, it returns an already-ended stream.
|
|
7
|
-
|
|
8
|
-
@example
|
|
9
|
-
```
|
|
10
|
-
import mergeStreams from '@sindresorhus/merge-streams';
|
|
11
|
-
|
|
12
|
-
const stream = mergeStreams([streamA, streamB]);
|
|
13
|
-
|
|
14
|
-
for await (const chunk of stream) {
|
|
15
|
-
console.log(chunk);
|
|
16
|
-
//=> 'A1'
|
|
17
|
-
//=> 'B1'
|
|
18
|
-
//=> 'A2'
|
|
19
|
-
//=> 'B2'
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
*/
|
|
23
|
-
export default function mergeStreams(streams: Readable[]): MergedStream;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
A single stream combining the output of multiple streams.
|
|
27
|
-
*/
|
|
28
|
-
export class MergedStream extends Readable {
|
|
29
|
-
/**
|
|
30
|
-
Pipe a new readable stream.
|
|
31
|
-
|
|
32
|
-
Throws if `MergedStream` has already ended.
|
|
33
|
-
*/
|
|
34
|
-
add(stream: Readable): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
Unpipe a stream previously added using either `mergeStreams(streams)` or `MergedStream.add(stream)`.
|
|
38
|
-
|
|
39
|
-
Returns `false` if the stream was not previously added, or if it was already removed by `MergedStream.remove(stream)`.
|
|
40
|
-
|
|
41
|
-
The removed stream is not automatically ended.
|
|
42
|
-
*/
|
|
43
|
-
remove(stream: Readable): boolean;
|
|
44
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {on, once} from 'node:events';
|
|
2
|
-
import {PassThrough as PassThroughStream} from 'node:stream';
|
|
3
|
-
import {finished} from 'node:stream/promises';
|
|
4
|
-
|
|
5
|
-
export default function mergeStreams(streams) {
|
|
6
|
-
if (!Array.isArray(streams)) {
|
|
7
|
-
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const stream of streams) {
|
|
11
|
-
validateStream(stream);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const objectMode = streams.some(({readableObjectMode}) => readableObjectMode);
|
|
15
|
-
const highWaterMark = getHighWaterMark(streams, objectMode);
|
|
16
|
-
const passThroughStream = new MergedStream({
|
|
17
|
-
objectMode,
|
|
18
|
-
writableHighWaterMark: highWaterMark,
|
|
19
|
-
readableHighWaterMark: highWaterMark,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
for (const stream of streams) {
|
|
23
|
-
passThroughStream.add(stream);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (streams.length === 0) {
|
|
27
|
-
endStream(passThroughStream);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return passThroughStream;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const getHighWaterMark = (streams, objectMode) => {
|
|
34
|
-
if (streams.length === 0) {
|
|
35
|
-
// @todo Use `node:stream` `getDefaultHighWaterMark(objectMode)` in next major release
|
|
36
|
-
return 16_384;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const highWaterMarks = streams
|
|
40
|
-
.filter(({readableObjectMode}) => readableObjectMode === objectMode)
|
|
41
|
-
.map(({readableHighWaterMark}) => readableHighWaterMark);
|
|
42
|
-
return Math.max(...highWaterMarks);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
class MergedStream extends PassThroughStream {
|
|
46
|
-
#streams = new Set([]);
|
|
47
|
-
#ended = new Set([]);
|
|
48
|
-
#aborted = new Set([]);
|
|
49
|
-
#onFinished;
|
|
50
|
-
|
|
51
|
-
add(stream) {
|
|
52
|
-
validateStream(stream);
|
|
53
|
-
|
|
54
|
-
if (this.#streams.has(stream)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
this.#streams.add(stream);
|
|
59
|
-
|
|
60
|
-
this.#onFinished ??= onMergedStreamFinished(this, this.#streams);
|
|
61
|
-
endWhenStreamsDone({
|
|
62
|
-
passThroughStream: this,
|
|
63
|
-
stream,
|
|
64
|
-
streams: this.#streams,
|
|
65
|
-
ended: this.#ended,
|
|
66
|
-
aborted: this.#aborted,
|
|
67
|
-
onFinished: this.#onFinished,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
stream.pipe(this, {end: false});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
remove(stream) {
|
|
74
|
-
validateStream(stream);
|
|
75
|
-
|
|
76
|
-
if (!this.#streams.has(stream)) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
stream.unpipe(this);
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
86
|
-
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
87
|
-
const controller = new AbortController();
|
|
88
|
-
|
|
89
|
-
try {
|
|
90
|
-
await Promise.race([
|
|
91
|
-
onMergedStreamEnd(passThroughStream, controller),
|
|
92
|
-
onInputStreamsUnpipe(passThroughStream, streams, controller),
|
|
93
|
-
]);
|
|
94
|
-
} finally {
|
|
95
|
-
controller.abort();
|
|
96
|
-
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const onMergedStreamEnd = async (passThroughStream, {signal}) => {
|
|
101
|
-
await finished(passThroughStream, {signal, cleanup: true});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const onInputStreamsUnpipe = async (passThroughStream, streams, {signal}) => {
|
|
105
|
-
for await (const [unpipedStream] of on(passThroughStream, 'unpipe', {signal})) {
|
|
106
|
-
if (streams.has(unpipedStream)) {
|
|
107
|
-
unpipedStream.emit(unpipeEvent);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const validateStream = stream => {
|
|
113
|
-
if (typeof stream?.pipe !== 'function') {
|
|
114
|
-
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const endWhenStreamsDone = async ({passThroughStream, stream, streams, ended, aborted, onFinished}) => {
|
|
119
|
-
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
120
|
-
const controller = new AbortController();
|
|
121
|
-
|
|
122
|
-
try {
|
|
123
|
-
await Promise.race([
|
|
124
|
-
afterMergedStreamFinished(onFinished, stream),
|
|
125
|
-
onInputStreamEnd({passThroughStream, stream, streams, ended, aborted, controller}),
|
|
126
|
-
onInputStreamUnpipe({stream, streams, ended, aborted, controller}),
|
|
127
|
-
]);
|
|
128
|
-
} finally {
|
|
129
|
-
controller.abort();
|
|
130
|
-
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (streams.size === ended.size + aborted.size) {
|
|
134
|
-
if (ended.size === 0 && aborted.size > 0) {
|
|
135
|
-
abortStream(passThroughStream);
|
|
136
|
-
} else {
|
|
137
|
-
endStream(passThroughStream);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
// This is the error thrown by `finished()` on `stream.destroy()`
|
|
143
|
-
const isAbortError = error => error?.code === 'ERR_STREAM_PREMATURE_CLOSE';
|
|
144
|
-
|
|
145
|
-
const afterMergedStreamFinished = async (onFinished, stream) => {
|
|
146
|
-
try {
|
|
147
|
-
await onFinished;
|
|
148
|
-
abortStream(stream);
|
|
149
|
-
} catch (error) {
|
|
150
|
-
if (isAbortError(error)) {
|
|
151
|
-
abortStream(stream);
|
|
152
|
-
} else {
|
|
153
|
-
errorStream(stream, error);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
const onInputStreamEnd = async ({passThroughStream, stream, streams, ended, aborted, controller: {signal}}) => {
|
|
159
|
-
try {
|
|
160
|
-
await finished(stream, {signal, cleanup: true, readable: true, writable: false});
|
|
161
|
-
if (streams.has(stream)) {
|
|
162
|
-
ended.add(stream);
|
|
163
|
-
}
|
|
164
|
-
} catch (error) {
|
|
165
|
-
if (signal.aborted || !streams.has(stream)) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
if (isAbortError(error)) {
|
|
170
|
-
aborted.add(stream);
|
|
171
|
-
} else {
|
|
172
|
-
errorStream(passThroughStream, error);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const onInputStreamUnpipe = async ({stream, streams, ended, aborted, controller: {signal}}) => {
|
|
178
|
-
await once(stream, unpipeEvent, {signal});
|
|
179
|
-
streams.delete(stream);
|
|
180
|
-
ended.delete(stream);
|
|
181
|
-
aborted.delete(stream);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
const unpipeEvent = Symbol('unpipe');
|
|
185
|
-
|
|
186
|
-
const endStream = stream => {
|
|
187
|
-
if (stream.writable) {
|
|
188
|
-
stream.end();
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const abortStream = stream => {
|
|
193
|
-
if (stream.readable || stream.writable) {
|
|
194
|
-
stream.destroy();
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// `stream.destroy(error)` crashes the process with `uncaughtException` if no `error` event listener exists on `stream`.
|
|
199
|
-
// We take care of error handling on user behalf, so we do not want this to happen.
|
|
200
|
-
const errorStream = (stream, error) => {
|
|
201
|
-
if (!stream.destroyed) {
|
|
202
|
-
stream.once('error', noop);
|
|
203
|
-
stream.destroy(error);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
const noop = () => {};
|
|
208
|
-
|
|
209
|
-
const updateMaxListeners = (passThroughStream, increment) => {
|
|
210
|
-
const maxListeners = passThroughStream.getMaxListeners();
|
|
211
|
-
if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) {
|
|
212
|
-
passThroughStream.setMaxListeners(maxListeners + increment);
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
// Number of times `passThroughStream.on()` is called regardless of streams:
|
|
217
|
-
// - once due to `finished(passThroughStream)`
|
|
218
|
-
// - once due to `on(passThroughStream)`
|
|
219
|
-
const PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
220
|
-
|
|
221
|
-
// Number of times `passThroughStream.on()` is called per stream:
|
|
222
|
-
// - once due to `stream.pipe(passThroughStream)`
|
|
223
|
-
const PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sindresorhus/merge-streams",
|
|
3
|
-
"version": "2.3.0",
|
|
4
|
-
"description": "Merge multiple streams into a unified stream",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/merge-streams",
|
|
7
|
-
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Sindre Sorhus",
|
|
10
|
-
"email": "sindresorhus@gmail.com",
|
|
11
|
-
"url": "https://sindresorhus.com"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./index.js"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "xo && c8 ava && tsd"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"index.js",
|
|
27
|
-
"index.d.ts"
|
|
28
|
-
],
|
|
29
|
-
"keywords": [
|
|
30
|
-
"merge",
|
|
31
|
-
"stream",
|
|
32
|
-
"streams",
|
|
33
|
-
"readable",
|
|
34
|
-
"passthrough",
|
|
35
|
-
"interleave",
|
|
36
|
-
"interleaved",
|
|
37
|
-
"unify",
|
|
38
|
-
"unified"
|
|
39
|
-
],
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@types/node": "^20.8.9",
|
|
42
|
-
"ava": "^6.1.0",
|
|
43
|
-
"c8": "^9.1.0",
|
|
44
|
-
"tempfile": "^5.0.0",
|
|
45
|
-
"tsd": "^0.30.4",
|
|
46
|
-
"typescript": "^5.2.2",
|
|
47
|
-
"xo": "^0.56.0"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# merge-streams
|
|
2
|
-
|
|
3
|
-
> Merge multiple streams into a unified stream
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```sh
|
|
8
|
-
npm install @sindresorhus/merge-streams
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import mergeStreams from '@sindresorhus/merge-streams';
|
|
15
|
-
|
|
16
|
-
const stream = mergeStreams([streamA, streamB]);
|
|
17
|
-
|
|
18
|
-
for await (const chunk of stream) {
|
|
19
|
-
console.log(chunk);
|
|
20
|
-
//=> 'A1'
|
|
21
|
-
//=> 'B1'
|
|
22
|
-
//=> 'A2'
|
|
23
|
-
//=> 'B2'
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
|
|
29
|
-
### `mergeStreams(streams: stream.Readable[]): MergedStream`
|
|
30
|
-
|
|
31
|
-
Merges an array of [readable streams](https://nodejs.org/api/stream.html#readable-streams) and returns a new readable stream that emits data from the individual streams as it arrives.
|
|
32
|
-
|
|
33
|
-
If you provide an empty array, it returns an already-ended stream.
|
|
34
|
-
|
|
35
|
-
#### `MergedStream`
|
|
36
|
-
|
|
37
|
-
_Type_: `stream.Readable`
|
|
38
|
-
|
|
39
|
-
A single stream combining the output of multiple streams.
|
|
40
|
-
|
|
41
|
-
##### `MergedStream.add(stream: stream.Readable): void`
|
|
42
|
-
|
|
43
|
-
Pipe a new readable stream.
|
|
44
|
-
|
|
45
|
-
Throws if `MergedStream` has already ended.
|
|
46
|
-
|
|
47
|
-
##### `MergedStream.remove(stream: stream.Readable): boolean`
|
|
48
|
-
|
|
49
|
-
Unpipe a stream previously added using either [`mergeStreams(streams)`](#mergestreamsstreams-streamreadable-mergedstream) or [`MergedStream.add(stream)`](#mergedstreamaddstream-streamreadable-void).
|
|
50
|
-
|
|
51
|
-
Returns `false` if the stream was not previously added, or if it was already removed by `MergedStream.remove(stream)`.
|
|
52
|
-
|
|
53
|
-
The removed stream is not automatically ended.
|
package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/default.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export async function delay({seconds, milliseconds} = {}) {
|
|
2
|
-
let duration;
|
|
3
|
-
if (typeof seconds === 'number') {
|
|
4
|
-
duration = seconds * 1000;
|
|
5
|
-
} else if (typeof milliseconds === 'number') {
|
|
6
|
-
duration = milliseconds;
|
|
7
|
-
} else {
|
|
8
|
-
throw new TypeError('Expected an object with either `seconds` or `milliseconds`.');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return new Promise(resolve => {
|
|
12
|
-
setTimeout(resolve, duration);
|
|
13
|
-
});
|
|
14
|
-
}
|
package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/index.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Delay the promise for the given duration.
|
|
3
|
-
|
|
4
|
-
@example
|
|
5
|
-
```
|
|
6
|
-
import {delay} from 'unicorn-magic';
|
|
7
|
-
|
|
8
|
-
await delay({seconds: 1});
|
|
9
|
-
|
|
10
|
-
console.log('1 second later');
|
|
11
|
-
```
|
|
12
|
-
*/
|
|
13
|
-
export function delay(duration: {seconds: number} | {milliseconds: number}): Promise<void>;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
Convert a `URL` or path to a path.
|
|
17
|
-
|
|
18
|
-
**Not available in browsers.**
|
|
19
|
-
|
|
20
|
-
@example
|
|
21
|
-
```
|
|
22
|
-
import path from 'node:path';
|
|
23
|
-
import {toPath} from 'unicorn-magic';
|
|
24
|
-
|
|
25
|
-
// `cwd` can be `URL` or a path string.
|
|
26
|
-
const getUnicornPath = cwd => path.join(toPath(cwd), 'unicorn');
|
|
27
|
-
```
|
|
28
|
-
*/
|
|
29
|
-
export function toPath(urlOrPath: URL | string): string;
|