Commit 713016c
Changed files (5)
build/3rd-party-licenses
@@ -20,7 +20,7 @@ THIRD PARTY LICENSES
sindresorhus/merge-streams
MIT
-@webpod/ps@0.1.0
+@webpod/ps@0.1.1
<unknown>
git://github.com/webpod/ps.git
MIT
@@ -60,7 +60,7 @@ fill-range@7.1.1
jonschlinkert/fill-range
MIT
-fs-extra@11.2.0
+fs-extra@11.3.0
JP Richardson <jprichardson@gmail.com>
https://github.com/jprichardson/node-fs-extra
MIT
@@ -70,7 +70,7 @@ glob-parent@5.1.2
gulpjs/glob-parent
ISC
-globby@14.0.2
+globby@14.1.0
Sindre Sorhus <sindresorhus@gmail.com>
sindresorhus/globby
MIT
@@ -110,7 +110,7 @@ node-fetch-native@1.6.4
unjs/node-fetch-native
MIT
-path-type@5.0.0
+path-type@6.0.0
Sindre Sorhus <sindresorhus@gmail.com>
sindresorhus/path-type
MIT
@@ -130,7 +130,7 @@ to-regex-range@5.0.1
micromatch/to-regex-range
MIT
-unicorn-magic@0.1.0
+unicorn-magic@0.3.0
Sindre Sorhus <sindresorhus@gmail.com>
sindresorhus/unicorn-magic
MIT
@@ -140,12 +140,12 @@ which@5.0.0
git+https://github.com/npm/node-which.git
ISC
-yaml@2.7.0
+yaml@2.7.1
Eemeli Aro <eemeli@gmail.com>
github:eemeli/yaml
ISC
-zurk@0.10.3
+zurk@0.11.2
Anton Golub <antongolub@antongolub.com>
git+https://github.com/webpod/zurk.git
MIT
build/vendor-extra.cjs
@@ -90,7 +90,7 @@ var require_path = __commonJS({
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
var os = require("os");
- var path3 = require("path");
+ var path4 = require("path");
var IS_WINDOWS_PLATFORM = os.platform() === "win32";
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
@@ -102,7 +102,7 @@ var require_path = __commonJS({
}
exports2.unixify = unixify;
function makeAbsolute(cwd, filepath) {
- return path3.resolve(cwd, filepath);
+ return path4.resolve(cwd, filepath);
}
exports2.makeAbsolute = makeAbsolute;
function removeLeadingDotSegment(entry) {
@@ -1401,7 +1401,7 @@ var require_braces = __commonJS({
var require_constants2 = __commonJS({
"node_modules/picomatch/lib/constants.js"(exports2, module2) {
"use strict";
- var path3 = require("path");
+ var path4 = require("path");
var WIN_SLASH = "\\\\/";
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
var DOT_LITERAL = "\\.";
@@ -1570,7 +1570,7 @@ var require_constants2 = __commonJS({
/* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
/* \uFEFF */
- SEP: path3.sep,
+ SEP: path4.sep,
/**
* Create EXTGLOB_CHARS
*/
@@ -1597,7 +1597,7 @@ var require_constants2 = __commonJS({
var require_utils2 = __commonJS({
"node_modules/picomatch/lib/utils.js"(exports2) {
"use strict";
- var path3 = require("path");
+ var path4 = require("path");
var win32 = process.platform === "win32";
var {
REGEX_BACKSLASH,
@@ -1626,7 +1626,7 @@ var require_utils2 = __commonJS({
if (options && typeof options.windows === "boolean") {
return options.windows;
}
- return win32 === true || path3.sep === "\\";
+ return win32 === true || path4.sep === "\\";
};
exports2.escapeLast = (input, char, lastIdx) => {
const idx = input.lastIndexOf(char, lastIdx);
@@ -2761,7 +2761,7 @@ var require_parse2 = __commonJS({
var require_picomatch = __commonJS({
"node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
"use strict";
- var path3 = require("path");
+ var path4 = require("path");
var scan = require_scan();
var parse3 = require_parse2();
var utils = require_utils2();
@@ -2846,7 +2846,7 @@ var require_picomatch = __commonJS({
};
picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => {
const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options);
- return regex.test(path3.basename(input));
+ return regex.test(path4.basename(input));
};
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
picomatch.parse = (pattern, options) => {
@@ -3073,7 +3073,7 @@ var require_pattern = __commonJS({
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
- var path3 = require("path");
+ var path4 = require("path");
var globParent = require_glob_parent();
var micromatch = require_micromatch();
var GLOBSTAR = "**";
@@ -3168,7 +3168,7 @@ var require_pattern = __commonJS({
}
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
function isAffectDepthOfReadingPattern(pattern) {
- const basename = path3.basename(pattern);
+ const basename = path4.basename(pattern);
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
}
exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -3226,7 +3226,7 @@ var require_pattern = __commonJS({
}
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
function isAbsolute(pattern) {
- return path3.isAbsolute(pattern);
+ return path4.isAbsolute(pattern);
}
exports2.isAbsolute = isAbsolute;
}
@@ -3403,8 +3403,8 @@ var require_utils3 = __commonJS({
exports2.errno = errno;
var fs6 = require_fs();
exports2.fs = fs6;
- var path3 = require_path();
- exports2.path = path3;
+ var path4 = require_path();
+ exports2.path = path4;
var pattern = require_pattern();
exports2.pattern = pattern;
var stream = require_stream();
@@ -3516,8 +3516,8 @@ var require_async = __commonJS({
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.read = void 0;
- function read(path3, settings, callback) {
- settings.fs.lstat(path3, (lstatError, lstat) => {
+ function read(path4, settings, callback) {
+ settings.fs.lstat(path4, (lstatError, lstat) => {
if (lstatError !== null) {
callFailureCallback(callback, lstatError);
return;
@@ -3526,7 +3526,7 @@ var require_async = __commonJS({
callSuccessCallback(callback, lstat);
return;
}
- settings.fs.stat(path3, (statError, stat) => {
+ settings.fs.stat(path4, (statError, stat) => {
if (statError !== null) {
if (settings.throwErrorOnBrokenSymbolicLink) {
callFailureCallback(callback, statError);
@@ -3558,13 +3558,13 @@ var require_sync = __commonJS({
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.read = void 0;
- function read(path3, settings) {
- const lstat = settings.fs.lstatSync(path3);
+ function read(path4, settings) {
+ const lstat = settings.fs.lstatSync(path4);
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
return lstat;
}
try {
- const stat = settings.fs.statSync(path3);
+ const stat = settings.fs.statSync(path4);
if (settings.markSymbolicLink) {
stat.isSymbolicLink = () => true;
}
@@ -3635,17 +3635,17 @@ var require_out = __commonJS({
var sync = require_sync();
var settings_1 = require_settings();
exports2.Settings = settings_1.default;
- function stat(path3, optionsOrSettingsOrCallback, callback) {
+ function stat(path4, optionsOrSettingsOrCallback, callback) {
if (typeof optionsOrSettingsOrCallback === "function") {
- async.read(path3, getSettings(), optionsOrSettingsOrCallback);
+ async.read(path4, getSettings(), optionsOrSettingsOrCallback);
return;
}
- async.read(path3, getSettings(optionsOrSettingsOrCallback), callback);
+ async.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
}
exports2.stat = stat;
- function statSync(path3, optionsOrSettings) {
+ function statSync(path4, optionsOrSettings) {
const settings = getSettings(optionsOrSettings);
- return sync.read(path3, settings);
+ return sync.read(path4, settings);
}
exports2.statSync = statSync;
function getSettings(settingsOrOptions = {}) {
@@ -3863,16 +3863,16 @@ var require_async2 = __commonJS({
return;
}
const tasks = names.map((name) => {
- const path3 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
+ const path4 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
return (done) => {
- fsStat.stat(path3, settings.fsStatSettings, (error, stats) => {
+ fsStat.stat(path4, settings.fsStatSettings, (error, stats) => {
if (error !== null) {
done(error);
return;
}
const entry = {
name,
- path: path3,
+ path: path4,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
@@ -3990,7 +3990,7 @@ var require_settings2 = __commonJS({
"node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- var path3 = require("path");
+ var path4 = require("path");
var fsStat = require_out();
var fs6 = require_fs4();
var Settings = class {
@@ -3998,7 +3998,7 @@ var require_settings2 = __commonJS({
this._options = _options;
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
this.fs = fs6.createFileSystemAdapter(this._options.fs);
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path3.sep);
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
this.stats = this._getValue(this._options.stats, false);
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
this.fsStatSettings = new fsStat.Settings({
@@ -4025,17 +4025,17 @@ var require_out2 = __commonJS({
var sync = require_sync2();
var settings_1 = require_settings2();
exports2.Settings = settings_1.default;
- function scandir(path3, optionsOrSettingsOrCallback, callback) {
+ function scandir(path4, optionsOrSettingsOrCallback, callback) {
if (typeof optionsOrSettingsOrCallback === "function") {
- async.read(path3, getSettings(), optionsOrSettingsOrCallback);
+ async.read(path4, getSettings(), optionsOrSettingsOrCallback);
return;
}
- async.read(path3, getSettings(optionsOrSettingsOrCallback), callback);
+ async.read(path4, getSettings(optionsOrSettingsOrCallback), callback);
}
exports2.scandir = scandir;
- function scandirSync(path3, optionsOrSettings) {
+ function scandirSync(path4, optionsOrSettings) {
const settings = getSettings(optionsOrSettings);
- return sync.read(path3, settings);
+ return sync.read(path4, settings);
}
exports2.scandirSync = scandirSync;
function getSettings(settingsOrOptions = {}) {
@@ -4659,7 +4659,7 @@ var require_settings3 = __commonJS({
"node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- var path3 = require("path");
+ var path4 = require("path");
var fsScandir = require_out2();
var Settings = class {
constructor(_options = {}) {
@@ -4669,7 +4669,7 @@ var require_settings3 = __commonJS({
this.deepFilter = this._getValue(this._options.deepFilter, null);
this.entryFilter = this._getValue(this._options.entryFilter, null);
this.errorFilter = this._getValue(this._options.errorFilter, null);
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path3.sep);
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path4.sep);
this.fsScandirSettings = new fsScandir.Settings({
followSymbolicLinks: this._options.followSymbolicLinks,
fs: this._options.fs,
@@ -4731,7 +4731,7 @@ var require_reader2 = __commonJS({
"node_modules/fast-glob/out/readers/reader.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- var path3 = require("path");
+ var path4 = require("path");
var fsStat = require_out();
var utils = require_utils3();
var Reader = class {
@@ -4744,7 +4744,7 @@ var require_reader2 = __commonJS({
});
}
_getFullEntryPath(filepath) {
- return path3.resolve(this._settings.cwd, filepath);
+ return path4.resolve(this._settings.cwd, filepath);
}
_makeEntry(stats, pattern) {
const entry = {
@@ -5162,7 +5162,7 @@ var require_provider = __commonJS({
"node_modules/fast-glob/out/providers/provider.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
- var path3 = require("path");
+ var path4 = require("path");
var deep_1 = require_deep();
var entry_1 = require_entry();
var error_1 = require_error();
@@ -5176,7 +5176,7 @@ var require_provider = __commonJS({
this.entryTransformer = new entry_2.default(this._settings);
}
_getRootDirectory(task) {
- return path3.resolve(this._settings.cwd, task.base);
+ return path4.resolve(this._settings.cwd, task.base);
}
_getReaderOptions(task) {
const basePath = task.base === "." ? "" : task.base;
@@ -5516,13 +5516,14 @@ var require_out4 = __commonJS({
}
});
-// node_modules/ignore/index.js
+// node_modules/globby/node_modules/ignore/index.js
var require_ignore = __commonJS({
- "node_modules/ignore/index.js"(exports2, module2) {
+ "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) {
"use strict";
function makeArray(subject) {
return Array.isArray(subject) ? subject : [subject];
}
+ var UNDEFINED = void 0;
var EMPTY = "";
var SPACE = " ";
var ESCAPE = "\\";
@@ -5532,13 +5533,17 @@ var require_ignore = __commonJS({
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
var REGEX_SPLITALL_CRLF = /\r?\n/g;
var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
+ var REGEX_TEST_TRAILING_SLASH = /\/$/;
var SLASH = "/";
var TMP_KEY_IGNORE = "node-ignore";
if (typeof Symbol !== "undefined") {
TMP_KEY_IGNORE = Symbol.for("node-ignore");
}
var KEY_IGNORE = TMP_KEY_IGNORE;
- var define = (object, key, value) => Object.defineProperty(object, key, { value });
+ var define = (object, key, value) => {
+ Object.defineProperty(object, key, { value });
+ return value;
+ };
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
var RETURN_FALSE = () => false;
var sanitizeRange = (range) => range.replace(
@@ -5551,7 +5556,7 @@ var require_ignore = __commonJS({
};
var REPLACERS = [
[
- // remove BOM
+ // Remove BOM
// TODO:
// Other similar zero-width characters?
/^\uFEFF/,
@@ -5566,7 +5571,7 @@ var require_ignore = __commonJS({
/((?:\\\\)*?)(\\?\s+)$/,
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
],
- // replace (\ ) with ' '
+ // Replace (\ ) with ' '
// (\ ) -> ' '
// (\\ ) -> '\\ '
// (\\\ ) -> '\\ '
@@ -5695,69 +5700,161 @@ var require_ignore = __commonJS({
// 'js/' will not match 'a.js'
// 'js' will match 'a.js' and 'a.js/'
(match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
- ],
- // trailing wildcard
- [
- /(\^|\\\/)?\\\*$/,
- (_, p1) => {
- const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
- return `${prefix}(?=$|\\/$)`;
- }
]
];
- var regexCache = /* @__PURE__ */ Object.create(null);
- var makeRegex = (pattern, ignoreCase) => {
- let source = regexCache[pattern];
- if (!source) {
- source = REPLACERS.reduce(
- (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
- pattern
- );
- regexCache[pattern] = source;
+ var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
+ var MODE_IGNORE = "regex";
+ var MODE_CHECK_IGNORE = "checkRegex";
+ var UNDERSCORE = "_";
+ var TRAILING_WILD_CARD_REPLACERS = {
+ [MODE_IGNORE](_, p1) {
+ const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
+ return `${prefix}(?=$|\\/$)`;
+ },
+ [MODE_CHECK_IGNORE](_, p1) {
+ const prefix = p1 ? `${p1}[^/]*` : "[^/]*";
+ return `${prefix}(?=$|\\/$)`;
}
- return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
};
+ var makeRegexPrefix = (pattern) => REPLACERS.reduce(
+ (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
+ pattern
+ );
var isString = (subject) => typeof subject === "string";
var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
- var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
+ var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
var IgnoreRule = class {
- constructor(origin, pattern, negative, regex) {
- this.origin = origin;
+ constructor(pattern, mark, body, ignoreCase, negative, prefix) {
this.pattern = pattern;
+ this.mark = mark;
this.negative = negative;
- this.regex = regex;
+ define(this, "body", body);
+ define(this, "ignoreCase", ignoreCase);
+ define(this, "regexPrefix", prefix);
+ }
+ get regex() {
+ const key = UNDERSCORE + MODE_IGNORE;
+ if (this[key]) {
+ return this[key];
+ }
+ return this._make(MODE_IGNORE, key);
+ }
+ get checkRegex() {
+ const key = UNDERSCORE + MODE_CHECK_IGNORE;
+ if (this[key]) {
+ return this[key];
+ }
+ return this._make(MODE_CHECK_IGNORE, key);
+ }
+ _make(mode, key) {
+ const str = this.regexPrefix.replace(
+ REGEX_REPLACE_TRAILING_WILDCARD,
+ // It does not need to bind pattern
+ TRAILING_WILD_CARD_REPLACERS[mode]
+ );
+ const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
+ return define(this, key, regex);
}
};
- var createRule = (pattern, ignoreCase) => {
- const origin = pattern;
+ var createRule = ({
+ pattern,
+ mark
+ }, ignoreCase) => {
let negative = false;
- if (pattern.indexOf("!") === 0) {
+ let body = pattern;
+ if (body.indexOf("!") === 0) {
negative = true;
- pattern = pattern.substr(1);
+ body = body.substr(1);
}
- pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
- const regex = makeRegex(pattern, ignoreCase);
+ body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
+ const regexPrefix = makeRegexPrefix(body);
return new IgnoreRule(
- origin,
pattern,
+ mark,
+ body,
+ ignoreCase,
negative,
- regex
+ regexPrefix
);
};
+ var RuleManager = class {
+ constructor(ignoreCase) {
+ this._ignoreCase = ignoreCase;
+ this._rules = [];
+ }
+ _add(pattern) {
+ if (pattern && pattern[KEY_IGNORE]) {
+ this._rules = this._rules.concat(pattern._rules._rules);
+ this._added = true;
+ return;
+ }
+ if (isString(pattern)) {
+ pattern = {
+ pattern
+ };
+ }
+ if (checkPattern(pattern.pattern)) {
+ const rule = createRule(pattern, this._ignoreCase);
+ this._added = true;
+ this._rules.push(rule);
+ }
+ }
+ // @param {Array<string> | string | Ignore} pattern
+ add(pattern) {
+ this._added = false;
+ makeArray(
+ isString(pattern) ? splitPattern(pattern) : pattern
+ ).forEach(this._add, this);
+ return this._added;
+ }
+ // Test one single path without recursively checking parent directories
+ //
+ // - checkUnignored `boolean` whether should check if the path is unignored,
+ // setting `checkUnignored` to `false` could reduce additional
+ // path matching.
+ // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
+ // @returns {TestResult} true if a file is ignored
+ test(path4, checkUnignored, mode) {
+ let ignored = false;
+ let unignored = false;
+ let matchedRule;
+ this._rules.forEach((rule) => {
+ const { negative } = rule;
+ if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
+ return;
+ }
+ const matched = rule[mode].test(path4);
+ if (!matched) {
+ return;
+ }
+ ignored = !negative;
+ unignored = negative;
+ matchedRule = negative ? UNDEFINED : rule;
+ });
+ const ret = {
+ ignored,
+ unignored
+ };
+ if (matchedRule) {
+ ret.rule = matchedRule;
+ }
+ return ret;
+ }
+ };
var throwError = (message, Ctor) => {
throw new Ctor(message);
};
- var checkPath = (path3, originalPath, doThrow) => {
- if (!isString(path3)) {
+ var checkPath = (path4, originalPath, doThrow) => {
+ if (!isString(path4)) {
return doThrow(
`path must be a string, but got \`${originalPath}\``,
TypeError
);
}
- if (!path3) {
+ if (!path4) {
return doThrow(`path must not be empty`, TypeError);
}
- if (checkPath.isNotRelative(path3)) {
+ if (checkPath.isNotRelative(path4)) {
const r = "`path.relative()`d";
return doThrow(
`path should be a ${r} string, but got "${originalPath}"`,
@@ -5766,7 +5863,7 @@ var require_ignore = __commonJS({
}
return true;
};
- var isNotRelative = (path3) => REGEX_TEST_INVALID_PATH.test(path3);
+ var isNotRelative = (path4) => REGEX_TEST_INVALID_PATH.test(path4);
checkPath.isNotRelative = isNotRelative;
checkPath.convert = (p) => p;
var Ignore = class {
@@ -5776,34 +5873,16 @@ var require_ignore = __commonJS({
allowRelativePaths = false
} = {}) {
define(this, KEY_IGNORE, true);
- this._rules = [];
- this._ignoreCase = ignoreCase;
- this._allowRelativePaths = allowRelativePaths;
+ this._rules = new RuleManager(ignoreCase);
+ this._strictPathCheck = !allowRelativePaths;
this._initCache();
}
_initCache() {
this._ignoreCache = /* @__PURE__ */ Object.create(null);
this._testCache = /* @__PURE__ */ Object.create(null);
}
- _addPattern(pattern) {
- if (pattern && pattern[KEY_IGNORE]) {
- this._rules = this._rules.concat(pattern._rules);
- this._added = true;
- return;
- }
- if (checkPattern(pattern)) {
- const rule = createRule(pattern, this._ignoreCase);
- this._added = true;
- this._rules.push(rule);
- }
- }
- // @param {Array<string> | string | Ignore} pattern
add(pattern) {
- this._added = false;
- makeArray(
- isString(pattern) ? splitPattern(pattern) : pattern
- ).forEach(this._addPattern, this);
- if (this._added) {
+ if (this._rules.add(pattern)) {
this._initCache();
}
return this;
@@ -5812,58 +5891,45 @@ var require_ignore = __commonJS({
addPattern(pattern) {
return this.add(pattern);
}
- // | ignored : unignored
- // negative | 0:0 | 0:1 | 1:0 | 1:1
- // -------- | ------- | ------- | ------- | --------
- // 0 | TEST | TEST | SKIP | X
- // 1 | TESTIF | SKIP | TEST | X
- // - SKIP: always skip
- // - TEST: always test
- // - TESTIF: only test if checkUnignored
- // - X: that never happen
- // @param {boolean} whether should check if the path is unignored,
- // setting `checkUnignored` to `false` could reduce additional
- // path matching.
- // @returns {TestResult} true if a file is ignored
- _testOne(path3, checkUnignored) {
- let ignored = false;
- let unignored = false;
- this._rules.forEach((rule) => {
- const { negative } = rule;
- if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
- return;
- }
- const matched = rule.regex.test(path3);
- if (matched) {
- ignored = !negative;
- unignored = negative;
- }
- });
- return {
- ignored,
- unignored
- };
- }
// @returns {TestResult}
_test(originalPath, cache, checkUnignored, slices) {
- const path3 = originalPath && checkPath.convert(originalPath);
+ const path4 = originalPath && checkPath.convert(originalPath);
checkPath(
- path3,
+ path4,
originalPath,
- this._allowRelativePaths ? RETURN_FALSE : throwError
+ this._strictPathCheck ? throwError : RETURN_FALSE
);
- return this._t(path3, cache, checkUnignored, slices);
+ return this._t(path4, cache, checkUnignored, slices);
+ }
+ checkIgnore(path4) {
+ if (!REGEX_TEST_TRAILING_SLASH.test(path4)) {
+ return this.test(path4);
+ }
+ const slices = path4.split(SLASH).filter(Boolean);
+ slices.pop();
+ if (slices.length) {
+ const parent = this._t(
+ slices.join(SLASH) + SLASH,
+ this._testCache,
+ true,
+ slices
+ );
+ if (parent.ignored) {
+ return parent;
+ }
+ }
+ return this._rules.test(path4, false, MODE_CHECK_IGNORE);
}
- _t(path3, cache, checkUnignored, slices) {
- if (path3 in cache) {
- return cache[path3];
+ _t(path4, cache, checkUnignored, slices) {
+ if (path4 in cache) {
+ return cache[path4];
}
if (!slices) {
- slices = path3.split(SLASH);
+ slices = path4.split(SLASH).filter(Boolean);
}
slices.pop();
if (!slices.length) {
- return cache[path3] = this._testOne(path3, checkUnignored);
+ return cache[path4] = this._rules.test(path4, checkUnignored, MODE_IGNORE);
}
const parent = this._t(
slices.join(SLASH) + SLASH,
@@ -5871,36 +5937,36 @@ var require_ignore = __commonJS({
checkUnignored,
slices
);
- return cache[path3] = parent.ignored ? parent : this._testOne(path3, checkUnignored);
+ return cache[path4] = parent.ignored ? parent : this._rules.test(path4, checkUnignored, MODE_IGNORE);
}
- ignores(path3) {
- return this._test(path3, this._ignoreCache, false).ignored;
+ ignores(path4) {
+ return this._test(path4, this._ignoreCache, false).ignored;
}
createFilter() {
- return (path3) => !this.ignores(path3);
+ return (path4) => !this.ignores(path4);
}
filter(paths) {
return makeArray(paths).filter(this.createFilter());
}
// @returns {TestResult}
- test(path3) {
- return this._test(path3, this._testCache, true);
+ test(path4) {
+ return this._test(path4, this._testCache, true);
}
};
var factory = (options) => new Ignore(options);
- var isPathValid = (path3) => checkPath(path3 && checkPath.convert(path3), path3, RETURN_FALSE);
- factory.isPathValid = isPathValid;
- factory.default = factory;
- module2.exports = factory;
+ var isPathValid = (path4) => checkPath(path4 && checkPath.convert(path4), path4, RETURN_FALSE);
if (
// Detect `process` so that it can run in browsers.
typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
) {
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
checkPath.convert = makePosix;
- const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
- checkPath.isNotRelative = (path3) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path3) || isNotRelative(path3);
+ const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
+ checkPath.isNotRelative = (path4) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path4) || isNotRelative(path4);
}
+ module2.exports = factory;
+ factory.default = factory;
+ module2.exports.isPathValid = isPathValid;
}
});
@@ -5985,14 +6051,14 @@ var require_polyfills = __commonJS({
fs6.fstatSync = statFixSync(fs6.fstatSync);
fs6.lstatSync = statFixSync(fs6.lstatSync);
if (fs6.chmod && !fs6.lchmod) {
- fs6.lchmod = function(path3, mode, cb) {
+ fs6.lchmod = function(path4, mode, cb) {
if (cb) process.nextTick(cb);
};
fs6.lchmodSync = function() {
};
}
if (fs6.chown && !fs6.lchown) {
- fs6.lchown = function(path3, uid, gid, cb) {
+ fs6.lchown = function(path4, uid, gid, cb) {
if (cb) process.nextTick(cb);
};
fs6.lchownSync = function() {
@@ -6059,9 +6125,9 @@ var require_polyfills = __commonJS({
};
}(fs6.readSync);
function patchLchmod(fs7) {
- fs7.lchmod = function(path3, mode, callback) {
+ fs7.lchmod = function(path4, mode, callback) {
fs7.open(
- path3,
+ path4,
constants.O_WRONLY | constants.O_SYMLINK,
mode,
function(err, fd) {
@@ -6077,8 +6143,8 @@ var require_polyfills = __commonJS({
}
);
};
- fs7.lchmodSync = function(path3, mode) {
- var fd = fs7.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
+ fs7.lchmodSync = function(path4, mode) {
+ var fd = fs7.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode);
var threw = true;
var ret;
try {
@@ -6099,8 +6165,8 @@ var require_polyfills = __commonJS({
}
function patchLutimes(fs7) {
if (constants.hasOwnProperty("O_SYMLINK") && fs7.futimes) {
- fs7.lutimes = function(path3, at, mt, cb) {
- fs7.open(path3, constants.O_SYMLINK, function(er, fd) {
+ fs7.lutimes = function(path4, at, mt, cb) {
+ fs7.open(path4, constants.O_SYMLINK, function(er, fd) {
if (er) {
if (cb) cb(er);
return;
@@ -6112,8 +6178,8 @@ var require_polyfills = __commonJS({
});
});
};
- fs7.lutimesSync = function(path3, at, mt) {
- var fd = fs7.openSync(path3, constants.O_SYMLINK);
+ fs7.lutimesSync = function(path4, at, mt) {
+ var fd = fs7.openSync(path4, constants.O_SYMLINK);
var ret;
var threw = true;
try {
@@ -6232,11 +6298,11 @@ var require_legacy_streams = __commonJS({
ReadStream,
WriteStream
};
- function ReadStream(path3, options) {
- if (!(this instanceof ReadStream)) return new ReadStream(path3, options);
+ function ReadStream(path4, options) {
+ if (!(this instanceof ReadStream)) return new ReadStream(path4, options);
Stream.call(this);
var self2 = this;
- this.path = path3;
+ this.path = path4;
this.fd = null;
this.readable = true;
this.paused = false;
@@ -6281,10 +6347,10 @@ var require_legacy_streams = __commonJS({
self2._read();
});
}
- function WriteStream(path3, options) {
- if (!(this instanceof WriteStream)) return new WriteStream(path3, options);
+ function WriteStream(path4, options) {
+ if (!(this instanceof WriteStream)) return new WriteStream(path4, options);
Stream.call(this);
- this.path = path3;
+ this.path = path4;
this.fd = null;
this.writable = true;
this.flags = "w";
@@ -6428,14 +6494,14 @@ var require_graceful_fs = __commonJS({
fs7.createWriteStream = createWriteStream;
var fs$readFile = fs7.readFile;
fs7.readFile = readFile;
- function readFile(path3, options, cb) {
+ function readFile(path4, options, cb) {
if (typeof options === "function")
cb = options, options = null;
- return go$readFile(path3, options, cb);
- function go$readFile(path4, options2, cb2, startTime) {
- return fs$readFile(path4, options2, function(err) {
+ return go$readFile(path4, options, cb);
+ function go$readFile(path5, options2, cb2, startTime) {
+ return fs$readFile(path5, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
- enqueue([go$readFile, [path4, options2, cb2], err, startTime || Date.now(), Date.now()]);
+ enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
@@ -6445,14 +6511,14 @@ var require_graceful_fs = __commonJS({
}
var fs$writeFile = fs7.writeFile;
fs7.writeFile = writeFile;
- function writeFile(path3, data, options, cb) {
+ function writeFile(path4, data, options, cb) {
if (typeof options === "function")
cb = options, options = null;
- return go$writeFile(path3, data, options, cb);
- function go$writeFile(path4, data2, options2, cb2, startTime) {
- return fs$writeFile(path4, data2, options2, function(err) {
+ return go$writeFile(path4, data, options, cb);
+ function go$writeFile(path5, data2, options2, cb2, startTime) {
+ return fs$writeFile(path5, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
- enqueue([go$writeFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
+ enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
@@ -6463,14 +6529,14 @@ var require_graceful_fs = __commonJS({
var fs$appendFile = fs7.appendFile;
if (fs$appendFile)
fs7.appendFile = appendFile;
- function appendFile(path3, data, options, cb) {
+ function appendFile(path4, data, options, cb) {
if (typeof options === "function")
cb = options, options = null;
- return go$appendFile(path3, data, options, cb);
- function go$appendFile(path4, data2, options2, cb2, startTime) {
- return fs$appendFile(path4, data2, options2, function(err) {
+ return go$appendFile(path4, data, options, cb);
+ function go$appendFile(path5, data2, options2, cb2, startTime) {
+ return fs$appendFile(path5, data2, options2, function(err) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
- enqueue([go$appendFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
+ enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
@@ -6501,31 +6567,31 @@ var require_graceful_fs = __commonJS({
var fs$readdir = fs7.readdir;
fs7.readdir = readdir;
var noReaddirOptionVersions = /^v[0-5]\./;
- function readdir(path3, options, cb) {
+ function readdir(path4, options, cb) {
if (typeof options === "function")
cb = options, options = null;
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path4, options2, cb2, startTime) {
- return fs$readdir(path4, fs$readdirCallback(
- path4,
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path5, options2, cb2, startTime) {
+ return fs$readdir(path5, fs$readdirCallback(
+ path5,
options2,
cb2,
startTime
));
- } : function go$readdir2(path4, options2, cb2, startTime) {
- return fs$readdir(path4, options2, fs$readdirCallback(
- path4,
+ } : function go$readdir2(path5, options2, cb2, startTime) {
+ return fs$readdir(path5, options2, fs$readdirCallback(
+ path5,
options2,
cb2,
startTime
));
};
- return go$readdir(path3, options, cb);
- function fs$readdirCallback(path4, options2, cb2, startTime) {
+ return go$readdir(path4, options, cb);
+ function fs$readdirCallback(path5, options2, cb2, startTime) {
return function(err, files) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
enqueue([
go$readdir,
- [path4, options2, cb2],
+ [path5, options2, cb2],
err,
startTime || Date.now(),
Date.now()
@@ -6596,7 +6662,7 @@ var require_graceful_fs = __commonJS({
enumerable: true,
configurable: true
});
- function ReadStream(path3, options) {
+ function ReadStream(path4, options) {
if (this instanceof ReadStream)
return fs$ReadStream.apply(this, arguments), this;
else
@@ -6616,7 +6682,7 @@ var require_graceful_fs = __commonJS({
}
});
}
- function WriteStream(path3, options) {
+ function WriteStream(path4, options) {
if (this instanceof WriteStream)
return fs$WriteStream.apply(this, arguments), this;
else
@@ -6634,22 +6700,22 @@ var require_graceful_fs = __commonJS({
}
});
}
- function createReadStream(path3, options) {
- return new fs7.ReadStream(path3, options);
+ function createReadStream(path4, options) {
+ return new fs7.ReadStream(path4, options);
}
- function createWriteStream(path3, options) {
- return new fs7.WriteStream(path3, options);
+ function createWriteStream(path4, options) {
+ return new fs7.WriteStream(path4, options);
}
var fs$open = fs7.open;
fs7.open = open;
- function open(path3, flags, mode, cb) {
+ function open(path4, flags, mode, cb) {
if (typeof mode === "function")
cb = mode, mode = null;
- return go$open(path3, flags, mode, cb);
- function go$open(path4, flags2, mode2, cb2, startTime) {
- return fs$open(path4, flags2, mode2, function(err, fd) {
+ return go$open(path4, flags, mode, cb);
+ function go$open(path5, flags2, mode2, cb2, startTime) {
+ return fs$open(path5, flags2, mode2, function(err, fd) {
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
- enqueue([go$open, [path4, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
+ enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
else {
if (typeof cb2 === "function")
cb2.apply(this, arguments);
@@ -6725,6 +6791,7 @@ var require_fs5 = __commonJS({
"chown",
"close",
"copyFile",
+ "cp",
"fchmod",
"fchown",
"fdatasync",
@@ -6732,8 +6799,10 @@ var require_fs5 = __commonJS({
"fsync",
"ftruncate",
"futimes",
+ "glob",
"lchmod",
"lchown",
+ "lutimes",
"link",
"lstat",
"mkdir",
@@ -6748,6 +6817,7 @@ var require_fs5 = __commonJS({
"rm",
"rmdir",
"stat",
+ "statfs",
"symlink",
"truncate",
"unlink",
@@ -6828,10 +6898,10 @@ var require_fs5 = __commonJS({
var require_utils5 = __commonJS({
"node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
"use strict";
- var path3 = require("path");
+ var path4 = require("path");
module2.exports.checkPath = function checkPath(pth) {
if (process.platform === "win32") {
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path3.parse(pth).root, ""));
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path4.parse(pth).root, ""));
if (pathHasInvalidWinCharacters) {
const error = new Error(`Path contains invalid characters: ${pth}`);
error.code = "EINVAL";
@@ -6895,8 +6965,8 @@ var require_path_exists = __commonJS({
"use strict";
var u2 = require_universalify().fromPromise;
var fs6 = require_fs5();
- function pathExists(path3) {
- return fs6.access(path3).then(() => true).catch(() => false);
+ function pathExists(path4) {
+ return fs6.access(path4).then(() => true).catch(() => false);
}
module2.exports = {
pathExists: u2(pathExists),
@@ -6911,9 +6981,9 @@ var require_utimes = __commonJS({
"use strict";
var fs6 = require_fs5();
var u2 = require_universalify().fromPromise;
- function utimesMillis(path3, atime, mtime) {
+ function utimesMillis(path4, atime, mtime) {
return __async(this, null, function* () {
- const fd = yield fs6.open(path3, "r+");
+ const fd = yield fs6.open(path4, "r+");
let closeErr = null;
try {
yield fs6.futimes(fd, atime, mtime);
@@ -6929,8 +6999,8 @@ var require_utimes = __commonJS({
}
});
}
- function utimesMillisSync(path3, atime, mtime) {
- const fd = fs6.openSync(path3, "r+");
+ function utimesMillisSync(path4, atime, mtime) {
+ const fd = fs6.openSync(path4, "r+");
fs6.futimesSync(fd, atime, mtime);
return fs6.closeSync(fd);
}
@@ -6946,7 +7016,7 @@ var require_stat = __commonJS({
"node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
"use strict";
var fs6 = require_fs5();
- var path3 = require("path");
+ var path4 = require("path");
var u2 = require_universalify().fromPromise;
function getStats(src, dest, opts) {
const statFunc = opts.dereference ? (file) => fs6.stat(file, { bigint: true }) : (file) => fs6.lstat(file, { bigint: true });
@@ -6975,8 +7045,8 @@ var require_stat = __commonJS({
const { srcStat, destStat } = yield getStats(src, dest, opts);
if (destStat) {
if (areIdentical(srcStat, destStat)) {
- const srcBaseName = path3.basename(src);
- const destBaseName = path3.basename(dest);
+ const srcBaseName = path4.basename(src);
+ const destBaseName = path4.basename(dest);
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return { srcStat, destStat, isChangingCase: true };
}
@@ -6999,8 +7069,8 @@ var require_stat = __commonJS({
const { srcStat, destStat } = getStatsSync(src, dest, opts);
if (destStat) {
if (areIdentical(srcStat, destStat)) {
- const srcBaseName = path3.basename(src);
- const destBaseName = path3.basename(dest);
+ const srcBaseName = path4.basename(src);
+ const destBaseName = path4.basename(dest);
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
return { srcStat, destStat, isChangingCase: true };
}
@@ -7020,9 +7090,9 @@ var require_stat = __commonJS({
}
function checkParentPaths(src, srcStat, dest, funcName) {
return __async(this, null, function* () {
- const srcParent = path3.resolve(path3.dirname(src));
- const destParent = path3.resolve(path3.dirname(dest));
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
+ const srcParent = path4.resolve(path4.dirname(src));
+ const destParent = path4.resolve(path4.dirname(dest));
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
let destStat;
try {
destStat = yield fs6.stat(destParent, { bigint: true });
@@ -7037,9 +7107,9 @@ var require_stat = __commonJS({
});
}
function checkParentPathsSync(src, srcStat, dest, funcName) {
- const srcParent = path3.resolve(path3.dirname(src));
- const destParent = path3.resolve(path3.dirname(dest));
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
+ const srcParent = path4.resolve(path4.dirname(src));
+ const destParent = path4.resolve(path4.dirname(dest));
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
let destStat;
try {
destStat = fs6.statSync(destParent, { bigint: true });
@@ -7056,8 +7126,8 @@ var require_stat = __commonJS({
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
}
function isSrcSubdir(src, dest) {
- const srcArr = path3.resolve(src).split(path3.sep).filter((i) => i);
- const destArr = path3.resolve(dest).split(path3.sep).filter((i) => i);
+ const srcArr = path4.resolve(src).split(path4.sep).filter((i) => i);
+ const destArr = path4.resolve(dest).split(path4.sep).filter((i) => i);
return srcArr.every((cur, i) => destArr[i] === cur);
}
function errMsg(src, dest, funcName) {
@@ -7082,7 +7152,7 @@ var require_copy = __commonJS({
"node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
"use strict";
var fs6 = require_fs5();
- var path3 = require("path");
+ var path4 = require("path");
var { mkdirs } = require_mkdirs();
var { pathExists } = require_path_exists();
var { utimesMillis } = require_utimes();
@@ -7105,7 +7175,7 @@ var require_copy = __commonJS({
yield stat.checkParentPaths(src, srcStat, dest, "copy");
const include = yield runFilter(src, dest, opts);
if (!include) return;
- const destParent = path3.dirname(dest);
+ const destParent = path4.dirname(dest);
const dirExists = yield pathExists(destParent);
if (!dirExists) {
yield mkdirs(destParent);
@@ -7167,15 +7237,33 @@ var require_copy = __commonJS({
if (!destStat) {
yield fs6.mkdir(dest);
}
- const items = yield fs6.readdir(src);
- yield Promise.all(items.map((item) => __async(this, null, function* () {
- const srcItem = path3.join(src, item);
- const destItem = path3.join(dest, item);
- const include = yield runFilter(srcItem, destItem, opts);
- if (!include) return;
- const { destStat: destStat2 } = yield stat.checkPaths(srcItem, destItem, "copy", opts);
- return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
- })));
+ const promises = [];
+ try {
+ for (var iter = __forAwait(yield fs6.opendir(src)), more, temp, error; more = !(temp = yield iter.next()).done; more = false) {
+ const item = temp.value;
+ const srcItem = path4.join(src, item.name);
+ const destItem = path4.join(dest, item.name);
+ promises.push(
+ runFilter(srcItem, destItem, opts).then((include) => {
+ if (include) {
+ return stat.checkPaths(srcItem, destItem, "copy", opts).then(({ destStat: destStat2 }) => {
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
+ });
+ }
+ })
+ );
+ }
+ } catch (temp) {
+ error = [temp];
+ } finally {
+ try {
+ more && (temp = iter.return) && (yield temp.call(iter));
+ } finally {
+ if (error)
+ throw error[0];
+ }
+ }
+ yield Promise.all(promises);
if (!destStat) {
yield fs6.chmod(dest, srcStat.mode);
}
@@ -7185,7 +7273,7 @@ var require_copy = __commonJS({
return __async(this, null, function* () {
let resolvedSrc = yield fs6.readlink(src);
if (opts.dereference) {
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
}
if (!destStat) {
return fs6.symlink(resolvedSrc, dest);
@@ -7198,7 +7286,7 @@ var require_copy = __commonJS({
throw e;
}
if (opts.dereference) {
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -7219,7 +7307,7 @@ var require_copy_sync = __commonJS({
"node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
"use strict";
var fs6 = require_graceful_fs();
- var path3 = require("path");
+ var path4 = require("path");
var mkdirsSync = require_mkdirs().mkdirsSync;
var utimesMillisSync = require_utimes().utimesMillisSync;
var stat = require_stat();
@@ -7240,7 +7328,7 @@ var require_copy_sync = __commonJS({
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
stat.checkParentPathsSync(src, srcStat, dest, "copy");
if (opts.filter && !opts.filter(src, dest)) return;
- const destParent = path3.dirname(dest);
+ const destParent = path4.dirname(dest);
if (!fs6.existsSync(destParent)) mkdirsSync(destParent);
return getStats(destStat, src, dest, opts);
}
@@ -7298,11 +7386,19 @@ var require_copy_sync = __commonJS({
return setDestMode(dest, srcMode);
}
function copyDir(src, dest, opts) {
- fs6.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
+ const dir = fs6.opendirSync(src);
+ try {
+ let dirent;
+ while ((dirent = dir.readSync()) !== null) {
+ copyDirItem(dirent.name, src, dest, opts);
+ }
+ } finally {
+ dir.closeSync();
+ }
}
function copyDirItem(item, src, dest, opts) {
- const srcItem = path3.join(src, item);
- const destItem = path3.join(dest, item);
+ const srcItem = path4.join(src, item);
+ const destItem = path4.join(dest, item);
if (opts.filter && !opts.filter(srcItem, destItem)) return;
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
return getStats(destStat, srcItem, destItem, opts);
@@ -7310,7 +7406,7 @@ var require_copy_sync = __commonJS({
function onLink(destStat, src, dest, opts) {
let resolvedSrc = fs6.readlinkSync(src);
if (opts.dereference) {
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
}
if (!destStat) {
return fs6.symlinkSync(resolvedSrc, dest);
@@ -7323,7 +7419,7 @@ var require_copy_sync = __commonJS({
throw err;
}
if (opts.dereference) {
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
}
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -7360,11 +7456,11 @@ var require_remove = __commonJS({
"use strict";
var fs6 = require_graceful_fs();
var u2 = require_universalify().fromCallback;
- function remove(path3, callback) {
- fs6.rm(path3, { recursive: true, force: true }, callback);
+ function remove(path4, callback) {
+ fs6.rm(path4, { recursive: true, force: true }, callback);
}
- function removeSync(path3) {
- fs6.rmSync(path3, { recursive: true, force: true });
+ function removeSync(path4) {
+ fs6.rmSync(path4, { recursive: true, force: true });
}
module2.exports = {
remove: u2(remove),
@@ -7379,7 +7475,7 @@ var require_empty = __commonJS({
"use strict";
var u2 = require_universalify().fromPromise;
var fs6 = require_fs5();
- var path3 = require("path");
+ var path4 = require("path");
var mkdir = require_mkdirs();
var remove = require_remove();
var emptyDir = u2(function emptyDir2(dir) {
@@ -7390,7 +7486,7 @@ var require_empty = __commonJS({
} catch (e) {
return mkdir.mkdirs(dir);
}
- return Promise.all(items.map((item) => remove.remove(path3.join(dir, item))));
+ return Promise.all(items.map((item) => remove.remove(path4.join(dir, item))));
});
});
function emptyDirSync(dir) {
@@ -7401,7 +7497,7 @@ var require_empty = __commonJS({
return mkdir.mkdirsSync(dir);
}
items.forEach((item) => {
- item = path3.join(dir, item);
+ item = path4.join(dir, item);
remove.removeSync(item);
});
}
@@ -7419,7 +7515,7 @@ var require_file = __commonJS({
"node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
"use strict";
var u2 = require_universalify().fromPromise;
- var path3 = require("path");
+ var path4 = require("path");
var fs6 = require_fs5();
var mkdir = require_mkdirs();
function createFile(file) {
@@ -7430,7 +7526,7 @@ var require_file = __commonJS({
} catch (e) {
}
if (stats && stats.isFile()) return;
- const dir = path3.dirname(file);
+ const dir = path4.dirname(file);
let dirStats = null;
try {
dirStats = yield fs6.stat(dir);
@@ -7457,7 +7553,7 @@ var require_file = __commonJS({
} catch (e) {
}
if (stats && stats.isFile()) return;
- const dir = path3.dirname(file);
+ const dir = path4.dirname(file);
try {
if (!fs6.statSync(dir).isDirectory()) {
fs6.readdirSync(dir);
@@ -7480,7 +7576,7 @@ var require_link = __commonJS({
"node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
"use strict";
var u2 = require_universalify().fromPromise;
- var path3 = require("path");
+ var path4 = require("path");
var fs6 = require_fs5();
var mkdir = require_mkdirs();
var { pathExists } = require_path_exists();
@@ -7500,7 +7596,7 @@ var require_link = __commonJS({
throw err;
}
if (dstStat && areIdentical(srcStat, dstStat)) return;
- const dir = path3.dirname(dstpath);
+ const dir = path4.dirname(dstpath);
const dirExists = yield pathExists(dir);
if (!dirExists) {
yield mkdir.mkdirs(dir);
@@ -7521,7 +7617,7 @@ var require_link = __commonJS({
err.message = err.message.replace("lstat", "ensureLink");
throw err;
}
- const dir = path3.dirname(dstpath);
+ const dir = path4.dirname(dstpath);
const dirExists = fs6.existsSync(dir);
if (dirExists) return fs6.linkSync(srcpath, dstpath);
mkdir.mkdirsSync(dir);
@@ -7538,13 +7634,13 @@ var require_link = __commonJS({
var require_symlink_paths = __commonJS({
"node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
"use strict";
- var path3 = require("path");
+ var path4 = require("path");
var fs6 = require_fs5();
var { pathExists } = require_path_exists();
var u2 = require_universalify().fromPromise;
function symlinkPaths(srcpath, dstpath) {
return __async(this, null, function* () {
- if (path3.isAbsolute(srcpath)) {
+ if (path4.isAbsolute(srcpath)) {
try {
yield fs6.lstat(srcpath);
} catch (err) {
@@ -7556,8 +7652,8 @@ var require_symlink_paths = __commonJS({
toDst: srcpath
};
}
- const dstdir = path3.dirname(dstpath);
- const relativeToDst = path3.join(dstdir, srcpath);
+ const dstdir = path4.dirname(dstpath);
+ const relativeToDst = path4.join(dstdir, srcpath);
const exists = yield pathExists(relativeToDst);
if (exists) {
return {
@@ -7573,12 +7669,12 @@ var require_symlink_paths = __commonJS({
}
return {
toCwd: srcpath,
- toDst: path3.relative(dstdir, srcpath)
+ toDst: path4.relative(dstdir, srcpath)
};
});
}
function symlinkPathsSync(srcpath, dstpath) {
- if (path3.isAbsolute(srcpath)) {
+ if (path4.isAbsolute(srcpath)) {
const exists2 = fs6.existsSync(srcpath);
if (!exists2) throw new Error("absolute srcpath does not exist");
return {
@@ -7586,8 +7682,8 @@ var require_symlink_paths = __commonJS({
toDst: srcpath
};
}
- const dstdir = path3.dirname(dstpath);
- const relativeToDst = path3.join(dstdir, srcpath);
+ const dstdir = path4.dirname(dstpath);
+ const relativeToDst = path4.join(dstdir, srcpath);
const exists = fs6.existsSync(relativeToDst);
if (exists) {
return {
@@ -7599,7 +7695,7 @@ var require_symlink_paths = __commonJS({
if (!srcExists) throw new Error("relative srcpath does not exist");
return {
toCwd: srcpath,
- toDst: path3.relative(dstdir, srcpath)
+ toDst: path4.relative(dstdir, srcpath)
};
}
module2.exports = {
@@ -7649,7 +7745,7 @@ var require_symlink = __commonJS({
"node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
"use strict";
var u2 = require_universalify().fromPromise;
- var path3 = require("path");
+ var path4 = require("path");
var fs6 = require_fs5();
var { mkdirs, mkdirsSync } = require_mkdirs();
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
@@ -7673,7 +7769,7 @@ var require_symlink = __commonJS({
const relative = yield symlinkPaths(srcpath, dstpath);
srcpath = relative.toDst;
const toType = yield symlinkType(relative.toCwd, type);
- const dir = path3.dirname(dstpath);
+ const dir = path4.dirname(dstpath);
if (!(yield pathExists(dir))) {
yield mkdirs(dir);
}
@@ -7694,7 +7790,7 @@ var require_symlink = __commonJS({
const relative = symlinkPathsSync(srcpath, dstpath);
srcpath = relative.toDst;
type = symlinkTypeSync(relative.toCwd, type);
- const dir = path3.dirname(dstpath);
+ const dir = path4.dirname(dstpath);
const exists = fs6.existsSync(dir);
if (exists) return fs6.symlinkSync(srcpath, dstpath, type);
mkdirsSync(dir);
@@ -7850,12 +7946,12 @@ var require_output_file = __commonJS({
"use strict";
var u2 = require_universalify().fromPromise;
var fs6 = require_fs5();
- var path3 = require("path");
+ var path4 = require("path");
var mkdir = require_mkdirs();
var pathExists = require_path_exists().pathExists;
function outputFile(file, data, encoding = "utf-8") {
return __async(this, null, function* () {
- const dir = path3.dirname(file);
+ const dir = path4.dirname(file);
if (!(yield pathExists(dir))) {
yield mkdir.mkdirs(dir);
}
@@ -7863,7 +7959,7 @@ var require_output_file = __commonJS({
});
}
function outputFileSync(file, ...args) {
- const dir = path3.dirname(file);
+ const dir = path4.dirname(file);
if (!fs6.existsSync(dir)) {
mkdir.mkdirsSync(dir);
}
@@ -7929,7 +8025,7 @@ var require_move = __commonJS({
"node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
"use strict";
var fs6 = require_fs5();
- var path3 = require("path");
+ var path4 = require("path");
var { copy } = require_copy2();
var { remove } = require_remove();
var { mkdirp } = require_mkdirs();
@@ -7940,8 +8036,8 @@ var require_move = __commonJS({
const overwrite = opts.overwrite || opts.clobber || false;
const { srcStat, isChangingCase = false } = yield stat.checkPaths(src, dest, "move", opts);
yield stat.checkParentPaths(src, srcStat, dest, "move");
- const destParent = path3.dirname(dest);
- const parsedParentPath = path3.parse(destParent);
+ const destParent = path4.dirname(dest);
+ const parsedParentPath = path4.parse(destParent);
if (parsedParentPath.root !== destParent) {
yield mkdirp(destParent);
}
@@ -7987,7 +8083,7 @@ var require_move_sync = __commonJS({
"node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
"use strict";
var fs6 = require_graceful_fs();
- var path3 = require("path");
+ var path4 = require("path");
var copySync = require_copy2().copySync;
var removeSync = require_remove().removeSync;
var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -7997,12 +8093,12 @@ var require_move_sync = __commonJS({
const overwrite = opts.overwrite || opts.clobber || false;
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
stat.checkParentPathsSync(src, srcStat, dest, "move");
- if (!isParentRoot(dest)) mkdirpSync(path3.dirname(dest));
+ if (!isParentRoot(dest)) mkdirpSync(path4.dirname(dest));
return doRename(src, dest, overwrite, isChangingCase);
}
function isParentRoot(dest) {
- const parent = path3.dirname(dest);
- const parsedPath = path3.parse(parent);
+ const parent = path4.dirname(dest);
+ const parsedPath = path4.parse(parent);
return parsedPath.root === parent;
}
function doRename(src, dest, overwrite, isChangingCase) {
@@ -8060,14 +8156,14 @@ var require_create_require = __commonJS({
"node_modules/create-require/create-require.js"(exports2, module2) {
"use strict";
var nativeModule = require("module");
- var path3 = require("path");
+ var path4 = require("path");
var fs6 = require("fs");
function createRequire2(filename) {
if (!filename) {
filename = process.cwd();
}
if (isDir(filename)) {
- filename = path3.join(filename, "index.js");
+ filename = path4.join(filename, "index.js");
}
if (nativeModule.createRequire) {
return nativeModule.createRequire(filename);
@@ -8080,13 +8176,13 @@ var require_create_require = __commonJS({
function _createRequire2(filename) {
const mod = new nativeModule.Module(filename, null);
mod.filename = filename;
- mod.paths = nativeModule.Module._nodeModulePaths(path3.dirname(filename));
+ mod.paths = nativeModule.Module._nodeModulePaths(path4.dirname(filename));
mod._compile("module.exports = require;", filename);
return mod.exports;
}
- function isDir(path4) {
+ function isDir(path5) {
try {
- const stat = fs6.lstatSync(path4);
+ const stat = fs6.lstatSync(path5);
return stat.isDirectory();
} catch (e) {
return false;
@@ -8171,19 +8267,19 @@ function Z(u2, a2) {
return r.end(), H2;
});
}
-var import_node_fs3, import_node_path3, import_node_http, import_node_https, import_node_zlib, import_node_stream2, import_node_buffer, import_node_util, import_node_url2, import_node_net, B, E, D, t2, w, R, g, N, x, P, C, I, M, $, m, F, k;
+var import_node_fs4, import_node_path4, import_node_http, import_node_https, import_node_zlib, import_node_stream2, import_node_buffer, import_node_util2, import_node_url2, import_node_net, B, E, D, t2, w, R, g, N, x, P, C, I, M, $, m, F, k;
var init_multipart_parser = __esm({
"node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs"() {
"use strict";
- import_node_fs3 = require("fs");
- import_node_path3 = require("path");
+ import_node_fs4 = require("fs");
+ import_node_path4 = require("path");
init_node();
import_node_http = require("http");
import_node_https = require("https");
import_node_zlib = require("zlib");
import_node_stream2 = require("stream");
import_node_buffer = require("buffer");
- import_node_util = require("util");
+ import_node_util2 = require("util");
init_node_fetch_native_1a4a356d();
import_node_url2 = require("url");
import_node_net = require("net");
@@ -11122,7 +11218,7 @@ function ji() {
var _a2, _b2, _c;
!((_b2 = (_a2 = globalThis.process) == null ? void 0 : _a2.versions) == null ? void 0 : _b2.node) && !((_c = globalThis.process) == null ? void 0 : _c.env.DISABLE_NODE_FETCH_NATIVE_WARN || true) && console.warn("[node-fetch-native] Node.js compatible build of `node-fetch-native` is being used in a non-Node.js environment. Please make sure you are using proper export conditions or report this issue to https://github.com/unjs/node-fetch-native. You can set `process.env.DISABLE_NODE_FETCH_NATIVE_WARN` to disable this warning.");
}
-var import_node_http2, import_node_https2, import_node_zlib2, import_node_stream3, import_node_buffer2, import_node_util2, import_node_url3, import_node_net2, import_node_fs4, import_node_path4, As, n2, fi, O, be, X, ve, kt, bt, Cr, Ve, Wt, qt, Ot, ee, zt, Ne, He, It, pr, di, $s, hi, pi, Ds, ut, Ms, Us, On, Et, xs, Ns, bi, Hs, mi, zn, Me, br, Un, ft, xn, G, mr, yi, yr, Qs, Ys, Gs, Zs, H, Nn, Ue, Fn, Ks, gi, Js, Xs, gr, jn, Pr, ye, tl, Ln, se, xe, le, rl, Si, nl, $2, At, ll, vr, dt, ul, Hn, _r, fl, cl, $n, dl, hl, pl, bl, wi, Ri, Er, Sr, ml, Ci, Dn, Bi, ki, Wi, wr, Vn, pt, Tr, Mn, zi, El, Al, Fi;
+var import_node_http2, import_node_https2, import_node_zlib2, import_node_stream3, import_node_buffer2, import_node_util3, import_node_url3, import_node_net2, import_node_fs5, import_node_path5, As, n2, fi, O, be, X, ve, kt, bt, Cr, Ve, Wt, qt, Ot, ee, zt, Ne, He, It, pr, di, $s, hi, pi, Ds, ut, Ms, Us, On, Et, xs, Ns, bi, Hs, mi, zn, Me, br, Un, ft, xn, G, mr, yi, yr, Qs, Ys, Gs, Zs, H, Nn, Ue, Fn, Ks, gi, Js, Xs, gr, jn, Pr, ye, tl, Ln, se, xe, le, rl, Si, nl, $2, At, ll, vr, dt, ul, Hn, _r, fl, cl, $n, dl, hl, pl, bl, wi, Ri, Er, Sr, ml, Ci, Dn, Bi, ki, Wi, wr, Vn, pt, Tr, Mn, zi, El, Al, Fi;
var init_node = __esm({
"node_modules/node-fetch-native/dist/node.mjs"() {
"use strict";
@@ -11131,12 +11227,12 @@ var init_node = __esm({
import_node_zlib2 = __toESM(require("zlib"), 1);
import_node_stream3 = __toESM(require("stream"), 1);
import_node_buffer2 = require("buffer");
- import_node_util2 = require("util");
+ import_node_util3 = require("util");
init_node_fetch_native_1a4a356d();
import_node_url3 = require("url");
import_node_net2 = require("net");
- import_node_fs4 = require("fs");
- import_node_path4 = require("path");
+ import_node_fs5 = require("fs");
+ import_node_path5 = require("path");
As = Object.defineProperty;
n2 = (i, o3) => As(i, "name", { value: o3, configurable: true });
fi = (i, o3, a2) => {
@@ -11407,12 +11503,12 @@ var init_node = __esm({
const a2 = new URL(o3).protocol, u2 = new URL(i).protocol;
return a2 === u2;
}, "isSameProtocol");
- Zs = (0, import_node_util2.promisify)(import_node_stream3.default.pipeline);
+ Zs = (0, import_node_util3.promisify)(import_node_stream3.default.pipeline);
H = Symbol("Body internals");
Nn = class Nn2 {
constructor(o3, { size: a2 = 0 } = {}) {
let u2 = null;
- o3 === null ? o3 = null : yi(o3) ? o3 = import_node_buffer2.Buffer.from(o3.toString()) : yr(o3) || import_node_buffer2.Buffer.isBuffer(o3) || (import_node_util2.types.isAnyArrayBuffer(o3) ? o3 = import_node_buffer2.Buffer.from(o3) : ArrayBuffer.isView(o3) ? o3 = import_node_buffer2.Buffer.from(o3.buffer, o3.byteOffset, o3.byteLength) : o3 instanceof import_node_stream3.default || (o3 instanceof br ? (o3 = Vs(o3), u2 = o3.type.split("=")[1]) : o3 = import_node_buffer2.Buffer.from(String(o3))));
+ o3 === null ? o3 = null : yi(o3) ? o3 = import_node_buffer2.Buffer.from(o3.toString()) : yr(o3) || import_node_buffer2.Buffer.isBuffer(o3) || (import_node_util3.types.isAnyArrayBuffer(o3) ? o3 = import_node_buffer2.Buffer.from(o3) : ArrayBuffer.isView(o3) ? o3 = import_node_buffer2.Buffer.from(o3.buffer, o3.byteOffset, o3.byteLength) : o3 instanceof import_node_stream3.default || (o3 instanceof br ? (o3 = Vs(o3), u2 = o3.type.split("=")[1]) : o3 = import_node_buffer2.Buffer.from(String(o3))));
let l2 = o3;
import_node_buffer2.Buffer.isBuffer(o3) ? l2 = import_node_stream3.default.Readable.from(o3) : yr(o3) && (l2 = import_node_stream3.default.Readable.from(o3.stream())), this[H] = { body: o3, stream: l2, boundary: u2, disturbed: false, error: null }, this.size = a2, o3 instanceof import_node_stream3.default && o3.on("error", (p) => {
const h = p instanceof ft ? p : new G(`Invalid response body while trying to fetch ${this.url}: ${p.message}`, "system", p);
@@ -11467,7 +11563,7 @@ var init_node = __esm({
};
n2(Nn, "Body");
Ue = Nn;
- Ue.prototype.buffer = (0, import_node_util2.deprecate)(Ue.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer"), Object.defineProperties(Ue.prototype, { body: { enumerable: true }, bodyUsed: { enumerable: true }, arrayBuffer: { enumerable: true }, blob: { enumerable: true }, json: { enumerable: true }, text: { enumerable: true }, data: { get: (0, import_node_util2.deprecate)(() => {
+ Ue.prototype.buffer = (0, import_node_util3.deprecate)(Ue.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer"), Object.defineProperties(Ue.prototype, { body: { enumerable: true }, bodyUsed: { enumerable: true }, arrayBuffer: { enumerable: true }, blob: { enumerable: true }, json: { enumerable: true }, text: { enumerable: true }, data: { get: (0, import_node_util3.deprecate)(() => {
}, "data doesn't exist, use json(), text(), arrayBuffer(), or body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (response)") } });
n2(In, "consumeBody");
Fn = n2((i, o3) => {
@@ -11475,8 +11571,8 @@ var init_node = __esm({
if (i.bodyUsed) throw new Error("cannot clone body after it is used");
return l2 instanceof import_node_stream3.default && typeof l2.getBoundary != "function" && (a2 = new import_node_stream3.PassThrough({ highWaterMark: o3 }), u2 = new import_node_stream3.PassThrough({ highWaterMark: o3 }), l2.pipe(a2), l2.pipe(u2), i[H].stream = a2, l2 = u2), l2;
}, "clone");
- Ks = (0, import_node_util2.deprecate)((i) => i.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167");
- gi = n2((i, o3) => i === null ? null : typeof i == "string" ? "text/plain;charset=UTF-8" : yi(i) ? "application/x-www-form-urlencoded;charset=UTF-8" : yr(i) ? i.type || null : import_node_buffer2.Buffer.isBuffer(i) || import_node_util2.types.isAnyArrayBuffer(i) || ArrayBuffer.isView(i) ? null : i instanceof br ? `multipart/form-data; boundary=${o3[H].boundary}` : i && typeof i.getBoundary == "function" ? `multipart/form-data;boundary=${Ks(i)}` : i instanceof import_node_stream3.default ? null : "text/plain;charset=UTF-8", "extractContentType");
+ Ks = (0, import_node_util3.deprecate)((i) => i.getBoundary(), "form-data doesn't follow the spec and requires special treatment. Use alternative package", "https://github.com/node-fetch/node-fetch/issues/1167");
+ gi = n2((i, o3) => i === null ? null : typeof i == "string" ? "text/plain;charset=UTF-8" : yi(i) ? "application/x-www-form-urlencoded;charset=UTF-8" : yr(i) ? i.type || null : import_node_buffer2.Buffer.isBuffer(i) || import_node_util3.types.isAnyArrayBuffer(i) || ArrayBuffer.isView(i) ? null : i instanceof br ? `multipart/form-data; boundary=${o3[H].boundary}` : i && typeof i.getBoundary == "function" ? `multipart/form-data;boundary=${Ks(i)}` : i instanceof import_node_stream3.default ? null : "text/plain;charset=UTF-8", "extractContentType");
Js = n2((i) => {
const { body: o3 } = i[H];
return o3 === null ? 0 : yr(o3) ? o3.size : import_node_buffer2.Buffer.isBuffer(o3) ? o3.length : o3 && typeof o3.getLengthSync == "function" && o3.hasKnownLength && o3.hasKnownLength() ? o3.getLengthSync() : null;
@@ -11502,13 +11598,13 @@ var init_node = __esm({
if (o3 instanceof Pr2) {
const u2 = o3.raw();
for (const [l2, p] of Object.entries(u2)) a2.push(...p.map((h) => [l2, h]));
- } else if (o3 != null) if (typeof o3 == "object" && !import_node_util2.types.isBoxedPrimitive(o3)) {
+ } else if (o3 != null) if (typeof o3 == "object" && !import_node_util3.types.isBoxedPrimitive(o3)) {
const u2 = o3[Symbol.iterator];
if (u2 == null) a2.push(...Object.entries(o3));
else {
if (typeof u2 != "function") throw new TypeError("Header pairs must be iterable");
a2 = [...o3].map((l2) => {
- if (typeof l2 != "object" || import_node_util2.types.isBoxedPrimitive(l2)) throw new TypeError("Each header pair must be an iterable object");
+ if (typeof l2 != "object" || import_node_util3.types.isBoxedPrimitive(l2)) throw new TypeError("Each header pair must be an iterable object");
return [...l2];
}).map((l2) => {
if (l2.length !== 2) throw new TypeError("Each header pair must be a name/value tuple");
@@ -11646,7 +11742,7 @@ var init_node = __esm({
n2(sl, "parseReferrerPolicyFromHeader");
$2 = Symbol("Request internals");
At = n2((i) => typeof i == "object" && typeof i[$2] == "object", "isRequest");
- ll = (0, import_node_util2.deprecate)(() => {
+ ll = (0, import_node_util3.deprecate)(() => {
}, ".data is not a valid RequestInit property, use .body instead", "https://github.com/node-fetch/node-fetch/issues/1000 (request)");
vr = class vr2 extends Ue {
constructor(o3, a2 = {}) {
@@ -11736,13 +11832,13 @@ var init_node = __esm({
}
fl = globalThis.DOMException;
cl = f(fl);
- ({ stat: $n } = import_node_fs4.promises);
- dl = n2((i, o3) => wi((0, import_node_fs4.statSync)(i), i, o3), "blobFromSync");
+ ({ stat: $n } = import_node_fs5.promises);
+ dl = n2((i, o3) => wi((0, import_node_fs5.statSync)(i), i, o3), "blobFromSync");
hl = n2((i, o3) => $n(i).then((a2) => wi(a2, i, o3)), "blobFrom");
pl = n2((i, o3) => $n(i).then((a2) => Ri(a2, i, o3)), "fileFrom");
- bl = n2((i, o3) => Ri((0, import_node_fs4.statSync)(i), i, o3), "fileFromSync");
+ bl = n2((i, o3) => Ri((0, import_node_fs5.statSync)(i), i, o3), "fileFromSync");
wi = n2((i, o3, a2 = "") => new ut([new Sr({ path: o3, size: i.size, lastModified: i.mtimeMs, start: 0 })], { type: a2 }), "fromBlob");
- Ri = n2((i, o3, a2 = "") => new On([new Sr({ path: o3, size: i.size, lastModified: i.mtimeMs, start: 0 })], (0, import_node_path4.basename)(o3), { type: a2, lastModified: i.mtimeMs }), "fromFile");
+ Ri = n2((i, o3, a2 = "") => new On([new Sr({ path: o3, size: i.size, lastModified: i.mtimeMs, start: 0 })], (0, import_node_path5.basename)(o3), { type: a2, lastModified: i.mtimeMs }), "fromFile");
Er = class Er2 {
constructor(o3) {
be(this, Ne, void 0);
@@ -11756,7 +11852,7 @@ var init_node = __esm({
return __asyncGenerator(this, null, function* () {
const { mtimeMs: o3 } = yield new __await($n(O(this, Ne)));
if (o3 > this.lastModified) throw new cl("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
- yield* __yieldStar((0, import_node_fs4.createReadStream)(O(this, Ne), { start: O(this, He), end: O(this, He) + this.size - 1 }));
+ yield* __yieldStar((0, import_node_fs5.createReadStream)(O(this, Ne), { start: O(this, He), end: O(this, He) + this.size - 1 }));
});
}
get [Symbol.toStringTag]() {
@@ -12163,8 +12259,8 @@ module.exports = __toCommonJS(vendor_extra_exports);
// node_modules/globby/index.js
var import_node_process2 = __toESM(require("process"), 1);
-var import_node_fs2 = __toESM(require("fs"), 1);
-var import_node_path2 = __toESM(require("path"), 1);
+var import_node_fs3 = __toESM(require("fs"), 1);
+var import_node_path3 = __toESM(require("path"), 1);
// node_modules/@sindresorhus/merge-streams/index.js
var import_node_events = require("events");
@@ -12368,14 +12464,15 @@ var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
var import_fast_glob2 = __toESM(require_out4(), 1);
// node_modules/path-type/index.js
-var import_fs = __toESM(require("fs"), 1);
+var import_node_fs = __toESM(require("fs"), 1);
+var import_promises2 = __toESM(require("fs").promises, 1);
function isType(fsStatType, statsMethodName, filePath) {
return __async(this, null, function* () {
if (typeof filePath !== "string") {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
- const stats = yield import_fs.promises[fsStatType](filePath);
+ const stats = yield import_promises2.default[fsStatType](filePath);
return stats[statsMethodName]();
} catch (error) {
if (error.code === "ENOENT") {
@@ -12390,7 +12487,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
- return import_fs.default[fsStatType](filePath)[statsMethodName]();
+ return import_node_fs.default[fsStatType](filePath)[statsMethodName]();
} catch (error) {
if (error.code === "ENOENT") {
return false;
@@ -12398,34 +12495,39 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
throw error;
}
}
-var isFile = isType.bind(null, "stat", "isFile");
-var isDirectory = isType.bind(null, "stat", "isDirectory");
-var isSymlink = isType.bind(null, "lstat", "isSymbolicLink");
-var isFileSync = isTypeSync.bind(null, "statSync", "isFile");
-var isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory");
-var isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink");
+var isFile = isType.bind(void 0, "stat", "isFile");
+var isDirectory = isType.bind(void 0, "stat", "isDirectory");
+var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink");
+var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile");
+var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory");
+var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink");
// node_modules/unicorn-magic/node.js
+var import_node_util = require("util");
+var import_node_child_process = require("child_process");
+var import_node_path = __toESM(require("path"), 1);
var import_node_url = require("url");
+var execFileOriginal = (0, import_node_util.promisify)(import_node_child_process.execFile);
function toPath(urlOrPath) {
return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
}
+var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
// node_modules/globby/ignore.js
var import_node_process = __toESM(require("process"), 1);
-var import_node_fs = __toESM(require("fs"), 1);
-var import_promises2 = __toESM(require("fs").promises, 1);
-var import_node_path = __toESM(require("path"), 1);
+var import_node_fs2 = __toESM(require("fs"), 1);
+var import_promises3 = __toESM(require("fs").promises, 1);
+var import_node_path2 = __toESM(require("path"), 1);
var import_fast_glob = __toESM(require_out4(), 1);
var import_ignore = __toESM(require_ignore(), 1);
// node_modules/slash/index.js
-function slash(path3) {
- const isExtendedLengthPath = path3.startsWith("\\\\?\\");
+function slash(path4) {
+ const isExtendedLengthPath = path4.startsWith("\\\\?\\");
if (isExtendedLengthPath) {
- return path3;
+ return path4;
}
- return path3.replace(/\\/g, "/");
+ return path4.replace(/\\/g, "/");
}
// node_modules/globby/utilities.js
@@ -12443,16 +12545,16 @@ var ignoreFilesGlobOptions = {
dot: true
};
var GITIGNORE_FILES_PATTERN = "**/.gitignore";
-var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path.default.posix.join(base, pattern.slice(1)) : import_node_path.default.posix.join(base, pattern);
+var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path2.default.posix.join(base, pattern.slice(1)) : import_node_path2.default.posix.join(base, pattern);
var parseIgnoreFile = (file, cwd) => {
- const base = slash(import_node_path.default.relative(cwd, import_node_path.default.dirname(file.filePath)));
+ const base = slash(import_node_path2.default.relative(cwd, import_node_path2.default.dirname(file.filePath)));
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
};
var toRelativePath = (fileOrDirectory, cwd) => {
cwd = slash(cwd);
- if (import_node_path.default.isAbsolute(fileOrDirectory)) {
+ if (import_node_path2.default.isAbsolute(fileOrDirectory)) {
if (slash(fileOrDirectory).startsWith(cwd)) {
- return import_node_path.default.relative(cwd, fileOrDirectory);
+ return import_node_path2.default.relative(cwd, fileOrDirectory);
}
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
}
@@ -12488,7 +12590,7 @@ var isIgnoredByIgnoreFiles = (patterns, options) => __async(void 0, null, functi
paths.map((filePath) => __async(void 0, null, function* () {
return {
filePath,
- content: yield import_promises2.default.readFile(filePath, "utf8")
+ content: yield import_promises3.default.readFile(filePath, "utf8")
};
}))
);
@@ -12504,7 +12606,7 @@ var isIgnoredByIgnoreFilesSync = (patterns, options) => {
}, ignoreFilesGlobOptions));
const files = paths.map((filePath) => ({
filePath,
- content: import_node_fs.default.readFileSync(filePath, "utf8")
+ content: import_node_fs2.default.readFileSync(filePath, "utf8")
}));
return getIsIgnoredPredicate(files, cwd);
};
@@ -12518,12 +12620,12 @@ var assertPatternsInput = (patterns) => {
}
};
var normalizePathForDirectoryGlob = (filePath, cwd) => {
- const path3 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
- return import_node_path2.default.isAbsolute(path3) ? path3 : import_node_path2.default.join(cwd, path3);
+ const path4 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
+ return import_node_path3.default.isAbsolute(path4) ? path4 : import_node_path3.default.join(cwd, path4);
};
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
const extensionGlob = (extensions == null ? void 0 : extensions.length) > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
- return files ? files.map((file) => import_node_path2.default.posix.join(directoryPath, `**/${import_node_path2.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path2.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
+ return files ? files.map((file) => import_node_path3.default.posix.join(directoryPath, `**/${import_node_path3.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path3.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
};
var directoryToGlob = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (directoryPaths, {
cwd = import_node_process2.default.cwd(),
@@ -12553,7 +12655,7 @@ var checkCwdOption = (cwd) => {
}
let stat;
try {
- stat = import_node_fs2.default.statSync(cwd);
+ stat = import_node_fs3.default.statSync(cwd);
} catch (e) {
return;
}
@@ -12599,7 +12701,7 @@ var createFilterFunction = (isIgnored) => {
const seen = /* @__PURE__ */ new Set();
return (fastGlobResult) => {
var _a2;
- const pathKey = import_node_path2.default.normalize((_a2 = fastGlobResult.path) != null ? _a2 : fastGlobResult);
+ const pathKey = import_node_path3.default.normalize((_a2 = fastGlobResult.path) != null ? _a2 : fastGlobResult);
if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) {
return false;
}
@@ -12823,17 +12925,17 @@ function visit(node, visitor) {
visit.BREAK = BREAK;
visit.SKIP = SKIP;
visit.REMOVE = REMOVE;
-function visit_(key, node, visitor, path3) {
- const ctrl = callVisitor(key, node, visitor, path3);
+function visit_(key, node, visitor, path4) {
+ const ctrl = callVisitor(key, node, visitor, path4);
if (isNode(ctrl) || isPair(ctrl)) {
- replaceNode(key, path3, ctrl);
- return visit_(key, ctrl, visitor, path3);
+ replaceNode(key, path4, ctrl);
+ return visit_(key, ctrl, visitor, path4);
}
if (typeof ctrl !== "symbol") {
if (isCollection(node)) {
- path3 = Object.freeze(path3.concat(node));
+ path4 = Object.freeze(path4.concat(node));
for (let i = 0; i < node.items.length; ++i) {
- const ci2 = visit_(i, node.items[i], visitor, path3);
+ const ci2 = visit_(i, node.items[i], visitor, path4);
if (typeof ci2 === "number")
i = ci2 - 1;
else if (ci2 === BREAK)
@@ -12844,13 +12946,13 @@ function visit_(key, node, visitor, path3) {
}
}
} else if (isPair(node)) {
- path3 = Object.freeze(path3.concat(node));
- const ck = visit_("key", node.key, visitor, path3);
+ path4 = Object.freeze(path4.concat(node));
+ const ck = visit_("key", node.key, visitor, path4);
if (ck === BREAK)
return BREAK;
else if (ck === REMOVE)
node.key = null;
- const cv = visit_("value", node.value, visitor, path3);
+ const cv = visit_("value", node.value, visitor, path4);
if (cv === BREAK)
return BREAK;
else if (cv === REMOVE)
@@ -12873,18 +12975,18 @@ function visitAsync(node, visitor) {
visitAsync.BREAK = BREAK;
visitAsync.SKIP = SKIP;
visitAsync.REMOVE = REMOVE;
-function visitAsync_(key, node, visitor, path3) {
+function visitAsync_(key, node, visitor, path4) {
return __async(this, null, function* () {
- const ctrl = yield callVisitor(key, node, visitor, path3);
+ const ctrl = yield callVisitor(key, node, visitor, path4);
if (isNode(ctrl) || isPair(ctrl)) {
- replaceNode(key, path3, ctrl);
- return visitAsync_(key, ctrl, visitor, path3);
+ replaceNode(key, path4, ctrl);
+ return visitAsync_(key, ctrl, visitor, path4);
}
if (typeof ctrl !== "symbol") {
if (isCollection(node)) {
- path3 = Object.freeze(path3.concat(node));
+ path4 = Object.freeze(path4.concat(node));
for (let i = 0; i < node.items.length; ++i) {
- const ci2 = yield visitAsync_(i, node.items[i], visitor, path3);
+ const ci2 = yield visitAsync_(i, node.items[i], visitor, path4);
if (typeof ci2 === "number")
i = ci2 - 1;
else if (ci2 === BREAK)
@@ -12895,13 +12997,13 @@ function visitAsync_(key, node, visitor, path3) {
}
}
} else if (isPair(node)) {
- path3 = Object.freeze(path3.concat(node));
- const ck = yield visitAsync_("key", node.key, visitor, path3);
+ path4 = Object.freeze(path4.concat(node));
+ const ck = yield visitAsync_("key", node.key, visitor, path4);
if (ck === BREAK)
return BREAK;
else if (ck === REMOVE)
node.key = null;
- const cv = yield visitAsync_("value", node.value, visitor, path3);
+ const cv = yield visitAsync_("value", node.value, visitor, path4);
if (cv === BREAK)
return BREAK;
else if (cv === REMOVE)
@@ -12929,24 +13031,24 @@ function initVisitor(visitor) {
}
return visitor;
}
-function callVisitor(key, node, visitor, path3) {
+function callVisitor(key, node, visitor, path4) {
var _a2, _b2, _c, _d, _e;
if (typeof visitor === "function")
- return visitor(key, node, path3);
+ return visitor(key, node, path4);
if (isMap(node))
- return (_a2 = visitor.Map) == null ? void 0 : _a2.call(visitor, key, node, path3);
+ return (_a2 = visitor.Map) == null ? void 0 : _a2.call(visitor, key, node, path4);
if (isSeq(node))
- return (_b2 = visitor.Seq) == null ? void 0 : _b2.call(visitor, key, node, path3);
+ return (_b2 = visitor.Seq) == null ? void 0 : _b2.call(visitor, key, node, path4);
if (isPair(node))
- return (_c = visitor.Pair) == null ? void 0 : _c.call(visitor, key, node, path3);
+ return (_c = visitor.Pair) == null ? void 0 : _c.call(visitor, key, node, path4);
if (isScalar(node))
- return (_d = visitor.Scalar) == null ? void 0 : _d.call(visitor, key, node, path3);
+ return (_d = visitor.Scalar) == null ? void 0 : _d.call(visitor, key, node, path4);
if (isAlias(node))
- return (_e = visitor.Alias) == null ? void 0 : _e.call(visitor, key, node, path3);
+ return (_e = visitor.Alias) == null ? void 0 : _e.call(visitor, key, node, path4);
return void 0;
}
-function replaceNode(key, path3, node) {
- const parent = path3[path3.length - 1];
+function replaceNode(key, path4, node) {
+ const parent = path4[path4.length - 1];
if (isCollection(parent)) {
parent.items[key] = node;
} else if (isPair(parent)) {
@@ -13468,10 +13570,10 @@ function createNode(value, tagName, ctx) {
}
// node_modules/yaml/browser/dist/nodes/Collection.js
-function collectionFromPath(schema4, path3, value) {
+function collectionFromPath(schema4, path4, value) {
let v2 = value;
- for (let i = path3.length - 1; i >= 0; --i) {
- const k2 = path3[i];
+ for (let i = path4.length - 1; i >= 0; --i) {
+ const k2 = path4[i];
if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
const a2 = [];
a2[k2] = v2;
@@ -13490,7 +13592,7 @@ function collectionFromPath(schema4, path3, value) {
sourceObjects: /* @__PURE__ */ new Map()
});
}
-var isEmptyPath = (path3) => path3 == null || typeof path3 === "object" && !!path3[Symbol.iterator]().next().done;
+var isEmptyPath = (path4) => path4 == null || typeof path4 === "object" && !!path4[Symbol.iterator]().next().done;
var Collection = class extends NodeBase {
constructor(type, schema4) {
super(type);
@@ -13520,11 +13622,11 @@ var Collection = class extends NodeBase {
* be a Pair instance or a `{ key, value }` object, which may not have a key
* that already exists in the map.
*/
- addIn(path3, value) {
- if (isEmptyPath(path3))
+ addIn(path4, value) {
+ if (isEmptyPath(path4))
this.add(value);
else {
- const [key, ...rest] = path3;
+ const [key, ...rest] = path4;
const node = this.get(key, true);
if (isCollection(node))
node.addIn(rest, value);
@@ -13538,8 +13640,8 @@ var Collection = class extends NodeBase {
* Removes a value from the collection.
* @returns `true` if the item was found and removed.
*/
- deleteIn(path3) {
- const [key, ...rest] = path3;
+ deleteIn(path4) {
+ const [key, ...rest] = path4;
if (rest.length === 0)
return this.delete(key);
const node = this.get(key, true);
@@ -13553,8 +13655,8 @@ var Collection = class extends NodeBase {
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
- getIn(path3, keepScalar) {
- const [key, ...rest] = path3;
+ getIn(path4, keepScalar) {
+ const [key, ...rest] = path4;
const node = this.get(key, true);
if (rest.length === 0)
return !keepScalar && isScalar(node) ? node.value : node;
@@ -13572,8 +13674,8 @@ var Collection = class extends NodeBase {
/**
* Checks if the collection includes a value with the key `key`.
*/
- hasIn(path3) {
- const [key, ...rest] = path3;
+ hasIn(path4) {
+ const [key, ...rest] = path4;
if (rest.length === 0)
return this.has(key);
const node = this.get(key, true);
@@ -13583,8 +13685,8 @@ var Collection = class extends NodeBase {
* Sets a value in this collection. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
- setIn(path3, value) {
- const [key, ...rest] = path3;
+ setIn(path4, value) {
+ const [key, ...rest] = path4;
if (rest.length === 0) {
this.set(key, value);
} else {
@@ -15025,6 +15127,8 @@ var binary = {
}
},
stringify({ comment, type, value }, ctx, onComment, onChompKeep) {
+ if (!value)
+ return "";
const buf = value;
let str;
if (typeof btoa === "function") {
@@ -15470,7 +15574,10 @@ var timestamp = {
}
return new Date(date);
},
- stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, "")
+ stringify: ({ value }) => {
+ var _a2;
+ return (_a2 = value == null ? void 0 : value.toISOString().replace(/(T00:00:00)?\.000Z$/, "")) != null ? _a2 : "";
+ }
};
// node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js
@@ -15726,9 +15833,9 @@ var Document = class _Document {
this.contents.add(value);
}
/** Adds a value to the document. */
- addIn(path3, value) {
+ addIn(path4, value) {
if (assertCollection(this.contents))
- this.contents.addIn(path3, value);
+ this.contents.addIn(path4, value);
}
/**
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -15803,14 +15910,14 @@ var Document = class _Document {
* Removes a value from the document.
* @returns `true` if the item was found and removed.
*/
- deleteIn(path3) {
- if (isEmptyPath(path3)) {
+ deleteIn(path4) {
+ if (isEmptyPath(path4)) {
if (this.contents == null)
return false;
this.contents = null;
return true;
}
- return assertCollection(this.contents) ? this.contents.deleteIn(path3) : false;
+ return assertCollection(this.contents) ? this.contents.deleteIn(path4) : false;
}
/**
* Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -15825,10 +15932,10 @@ var Document = class _Document {
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
- getIn(path3, keepScalar) {
- if (isEmptyPath(path3))
+ getIn(path4, keepScalar) {
+ if (isEmptyPath(path4))
return !keepScalar && isScalar(this.contents) ? this.contents.value : this.contents;
- return isCollection(this.contents) ? this.contents.getIn(path3, keepScalar) : void 0;
+ return isCollection(this.contents) ? this.contents.getIn(path4, keepScalar) : void 0;
}
/**
* Checks if the document includes a value with the key `key`.
@@ -15839,10 +15946,10 @@ var Document = class _Document {
/**
* Checks if the document includes a value at `path`.
*/
- hasIn(path3) {
- if (isEmptyPath(path3))
+ hasIn(path4) {
+ if (isEmptyPath(path4))
return this.contents !== void 0;
- return isCollection(this.contents) ? this.contents.hasIn(path3) : false;
+ return isCollection(this.contents) ? this.contents.hasIn(path4) : false;
}
/**
* Sets a value in this document. For `!!set`, `value` needs to be a
@@ -15859,13 +15966,13 @@ var Document = class _Document {
* Sets a value in this document. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
- setIn(path3, value) {
- if (isEmptyPath(path3)) {
+ setIn(path4, value) {
+ if (isEmptyPath(path4)) {
this.contents = value;
} else if (this.contents == null) {
- this.contents = collectionFromPath(this.schema, Array.from(path3), value);
+ this.contents = collectionFromPath(this.schema, Array.from(path4), value);
} else if (assertCollection(this.contents)) {
- this.contents.setIn(path3, value);
+ this.contents.setIn(path4, value);
}
}
/**
@@ -16567,7 +16674,7 @@ function resolveCollection(CN2, ctx, token, onError, tagName, tag) {
return coll;
}
function composeCollection(CN2, ctx, token, props, onError) {
- var _a2, _b2;
+ var _a2, _b2, _c;
const tagToken = props.tag;
const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg));
if (token.type === "block-seq") {
@@ -16589,8 +16696,8 @@ function composeCollection(CN2, ctx, token, props, onError) {
ctx.schema.tags.push(Object.assign({}, kt2, { default: false }));
tag = kt2;
} else {
- if (kt2 == null ? void 0 : kt2.collection) {
- onError(tagToken, "BAD_COLLECTION_TYPE", `${kt2.tag} used for ${expType} collection, but expects ${kt2.collection}`, true);
+ if (kt2) {
+ onError(tagToken, "BAD_COLLECTION_TYPE", `${kt2.tag} used for ${expType} collection, but expects ${(_a2 = kt2.collection) != null ? _a2 : "scalar"}`, true);
} else {
onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
}
@@ -16598,7 +16705,7 @@ function composeCollection(CN2, ctx, token, props, onError) {
}
}
const coll = resolveCollection(CN2, ctx, token, onError, tagName, tag);
- const res = (_b2 = (_a2 = tag.resolve) == null ? void 0 : _a2.call(tag, coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options)) != null ? _b2 : coll;
+ const res = (_c = (_b2 = tag.resolve) == null ? void 0 : _b2.call(tag, coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options)) != null ? _c : coll;
const node = isNode(res) ? res : new Scalar(res);
node.range = coll.range;
node.tag = tagName;
@@ -17671,9 +17778,9 @@ function visit2(cst, visitor) {
visit2.BREAK = BREAK2;
visit2.SKIP = SKIP2;
visit2.REMOVE = REMOVE2;
-visit2.itemAtPath = (cst, path3) => {
+visit2.itemAtPath = (cst, path4) => {
let item = cst;
- for (const [field, index] of path3) {
+ for (const [field, index] of path4) {
const tok = item == null ? void 0 : item[field];
if (tok && "items" in tok) {
item = tok.items[index];
@@ -17682,23 +17789,23 @@ visit2.itemAtPath = (cst, path3) => {
}
return item;
};
-visit2.parentCollection = (cst, path3) => {
- const parent = visit2.itemAtPath(cst, path3.slice(0, -1));
- const field = path3[path3.length - 1][0];
+visit2.parentCollection = (cst, path4) => {
+ const parent = visit2.itemAtPath(cst, path4.slice(0, -1));
+ const field = path4[path4.length - 1][0];
const coll = parent == null ? void 0 : parent[field];
if (coll && "items" in coll)
return coll;
throw new Error("Parent collection not found");
};
-function _visit(path3, item, visitor) {
- let ctrl = visitor(item, path3);
+function _visit(path4, item, visitor) {
+ let ctrl = visitor(item, path4);
if (typeof ctrl === "symbol")
return ctrl;
for (const field of ["key", "value"]) {
const token = item[field];
if (token && "items" in token) {
for (let i = 0; i < token.items.length; ++i) {
- const ci2 = _visit(Object.freeze(path3.concat([[field, i]])), token.items[i], visitor);
+ const ci2 = _visit(Object.freeze(path4.concat([[field, i]])), token.items[i], visitor);
if (typeof ci2 === "number")
i = ci2 - 1;
else if (ci2 === BREAK2)
@@ -17709,10 +17816,10 @@ function _visit(path3, item, visitor) {
}
}
if (typeof ctrl === "function" && field === "key")
- ctrl = ctrl(item, path3);
+ ctrl = ctrl(item, path4);
}
}
- return typeof ctrl === "function" ? ctrl(item, path3) : ctrl;
+ return typeof ctrl === "function" ? ctrl(item, path4) : ctrl;
}
// node_modules/yaml/browser/dist/parse/cst.js
@@ -18971,7 +19078,17 @@ var Parser = class {
default: {
const bv = this.startBlockValue(map2);
if (bv) {
- if (atMapIndent && bv.type !== "block-seq") {
+ if (bv.type === "block-seq") {
+ if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) {
+ yield* __yieldStar(this.pop({
+ type: "error",
+ offset: this.offset,
+ message: "Unexpected block-seq-ind on same line with key",
+ source: this.source
+ }));
+ return;
+ }
+ } else if (atMapIndent) {
map2.items.push({ start });
}
this.stack.push(bv);
@@ -19341,12 +19458,12 @@ var import_node_https3 = require("https");
var import_node_zlib3 = require("zlib");
var import_node_stream4 = require("stream");
var import_node_buffer3 = require("buffer");
-var import_node_util3 = require("util");
+var import_node_util4 = require("util");
init_node_fetch_native_1a4a356d();
var import_node_url4 = require("url");
var import_node_net3 = require("net");
-var import_node_fs5 = require("fs");
-var import_node_path5 = require("path");
+var import_node_fs6 = require("fs");
+var import_node_path6 = require("path");
var a = Object.defineProperty;
var t3 = (e, r) => a(e, "name", { value: r, configurable: true });
var f2 = Object.defineProperty;
@@ -19441,16 +19558,16 @@ var extract = (readable, _opts) => {
var import_minimist = __toESM(require_minimist(), 1);
// node_modules/envapi/target/esm/index.mjs
-var import_node_fs6 = __toESM(require("fs"), 1);
-var import_node_path6 = __toESM(require("path"), 1);
-var import_node_util4 = require("util");
+var import_node_fs7 = __toESM(require("fs"), 1);
+var import_node_path7 = __toESM(require("path"), 1);
+var import_node_util5 = require("util");
var DOTENV = ".env";
var Q1 = '"';
var Q2 = "'";
var Q3 = "`";
var KR = /^[a-zA-Z_]\w*$/;
var SR = /\s/;
-var decoder = new import_node_util4.TextDecoder();
+var decoder = new import_node_util5.TextDecoder();
var parse2 = (content) => {
const e = {};
let k2 = "";
@@ -19519,10 +19636,10 @@ var formatValue = (v2) => {
return `${Q3}${v2}${Q3}`;
};
var stringify4 = (env) => Object.entries(env).map(([k2, v2]) => `${k2}=${formatValue(v2 || "")}`).join("\n");
-var _load = (read, ...files) => files.reverse().reduce((m2, f3) => Object.assign(m2, parse2(read(import_node_path6.default.resolve(f3)))), {});
-var load = (...files) => _load((file) => import_node_fs6.default.readFileSync(file, "utf8"), ...files);
+var _load = (read, ...files) => files.reverse().reduce((m2, f3) => Object.assign(m2, parse2(read(import_node_path7.default.resolve(f3)))), {});
+var load = (...files) => _load((file) => import_node_fs7.default.readFileSync(file, "utf8"), ...files);
var loadSafe = (...files) => _load(
- (file) => import_node_fs6.default.existsSync(file) ? import_node_fs6.default.readFileSync(file, "utf8") : "",
+ (file) => import_node_fs7.default.existsSync(file) ? import_node_fs7.default.readFileSync(file, "utf8") : "",
...files
);
var populate = (env, extra) => Object.assign(env, extra);
.size-limit.json
@@ -24,28 +24,28 @@
{
"name": "js parts",
"path": "build/*.{js,cjs}",
- "limit": "812.2 kB",
+ "limit": "815.7 kB",
"brotli": false,
"gzip": false
},
{
"name": "libdefs",
"path": "build/*.d.ts",
- "limit": "40 kB",
+ "limit": "39.55 kB",
"brotli": false,
"gzip": false
},
{
"name": "vendor",
"path": "build/vendor-*",
- "limit": "765.5 kB",
+ "limit": "769.0 kB",
"brotli": false,
"gzip": false
},
{
"name": "all",
"path": ["build/*", "man/*", "README.md", "LICENSE"],
- "limit": "868.0 kB",
+ "limit": "871.5 kB",
"brotli": false,
"gzip": false
}
package-lock.json
@@ -1,12 +1,12 @@
{
"name": "zx",
- "version": "8.5.0",
+ "version": "8.5.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "zx",
- "version": "8.5.0",
+ "version": "8.5.1",
"license": "Apache-2.0",
"bin": {
"zx": "build/cli.js"
@@ -15,10 +15,10 @@
"@size-limit/file": "11.2.0",
"@types/fs-extra": "11.0.4",
"@types/minimist": "1.2.5",
- "@types/node": "22.13.14",
+ "@types/node": "22.13.16",
"@types/which": "3.0.4",
"@webpod/ingrid": "0.0.0-beta.3",
- "@webpod/ps": "0.1.0",
+ "@webpod/ps": "0.1.1",
"c8": "10.1.3",
"chalk": "5.4.1",
"create-require": "1.1.1",
@@ -34,9 +34,9 @@
"esbuild-plugin-resolve": "2.0.0",
"esbuild-plugin-transform-hook": "0.2.0",
"esbuild-plugin-utils": "0.1.0",
- "fs-extra": "11.2.0",
+ "fs-extra": "11.3.0",
"get-port": "7.1.0",
- "globby": "14.0.2",
+ "globby": "14.1.0",
"jsr": "0.13.4",
"lefthook": "1.11.6",
"madge": "8.0.0",
@@ -50,8 +50,8 @@
"typescript": "5.8.2",
"vitepress": "1.6.3",
"which": "5.0.0",
- "yaml": "2.7.0",
- "zurk": "0.10.3"
+ "yaml": "2.7.1",
+ "zurk": "0.11.2"
},
"engines": {
"node": ">= 12.17.0"
@@ -1208,9 +1208,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "22.13.14",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz",
- "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==",
+ "version": "22.13.16",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.16.tgz",
+ "integrity": "sha512-15tM+qA4Ypml/N7kyRdvfRjBQT2RL461uF1Bldn06K0Nzn1lY3nAPgHlsVrJxdZ9WhZiW0Fmc1lOYMtDsAuB3w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1610,14 +1610,14 @@
"license": "MIT"
},
"node_modules/@webpod/ps": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.1.0.tgz",
- "integrity": "sha512-+b2uvW4T75G9RcBBCKuse57uzSYOqni8al2aalcYxyOgyKicdVB2cy0YW5bRX6uASgT7Il4iU/Z10ibjzGO08w==",
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@webpod/ps/-/ps-0.1.1.tgz",
+ "integrity": "sha512-SIgb4wWEVlKgdRByMMz9c3y1hpKfNm2sbretCPD49O9LG6itibULMkiRISdkpMdGRiUpbGHp8tiN3ZLYRDHj1g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@webpod/ingrid": "^0.0.0-beta.3",
- "zurk": "^0.10.2"
+ "zurk": "^0.11.2"
}
},
"node_modules/acorn": {
@@ -3054,9 +3054,9 @@
}
},
"node_modules/fs-extra": {
- "version": "11.2.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
- "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
+ "version": "11.3.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz",
+ "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3193,18 +3193,18 @@
}
},
"node_modules/globby": {
- "version": "14.0.2",
- "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz",
- "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==",
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz",
+ "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sindresorhus/merge-streams": "^2.1.0",
- "fast-glob": "^3.3.2",
- "ignore": "^5.2.4",
- "path-type": "^5.0.0",
+ "fast-glob": "^3.3.3",
+ "ignore": "^7.0.3",
+ "path-type": "^6.0.0",
"slash": "^5.1.0",
- "unicorn-magic": "^0.1.0"
+ "unicorn-magic": "^0.3.0"
},
"engines": {
"node": ">=18"
@@ -3213,6 +3213,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/globby/node_modules/ignore": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz",
+ "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
"node_modules/gonzales-pe": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz",
@@ -4675,13 +4685,13 @@
"license": "ISC"
},
"node_modules/path-type": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz",
- "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz",
+ "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=12"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -6263,9 +6273,9 @@
"license": "MIT"
},
"node_modules/unicorn-magic": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
- "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz",
+ "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6661,9 +6671,9 @@
"license": "ISC"
},
"node_modules/yaml": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz",
- "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
+ "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
"dev": true,
"license": "ISC",
"bin": {
@@ -6726,9 +6736,9 @@
}
},
"node_modules/zurk": {
- "version": "0.10.3",
- "resolved": "https://registry.npmjs.org/zurk/-/zurk-0.10.3.tgz",
- "integrity": "sha512-X2SYUhb2fSaGiMvuNL6R1L6//wmW986g1uooiPPKxtSlnPtNe0KXsSKPA/O5dP8EC00LBQxILaPbScmTexrRrA==",
+ "version": "0.11.2",
+ "resolved": "https://registry.npmjs.org/zurk/-/zurk-0.11.2.tgz",
+ "integrity": "sha512-OKUQsmG588B18hzO4ThzOU0NUwr4C8aKl9NjGQfXUv5fskLfS6Sj3XGNbTzKj3d2+jWvmnqS2cgrwYX6bIkDyA==",
"dev": true,
"license": "MIT"
},
package.json
@@ -1,6 +1,6 @@
{
"name": "zx",
- "version": "8.5.0",
+ "version": "8.5.1",
"description": "A tool for writing better scripts",
"type": "module",
"main": "./build/index.cjs",
@@ -99,10 +99,10 @@
"@size-limit/file": "11.2.0",
"@types/fs-extra": "11.0.4",
"@types/minimist": "1.2.5",
- "@types/node": "22.13.14",
+ "@types/node": "22.13.16",
"@types/which": "3.0.4",
"@webpod/ingrid": "0.0.0-beta.3",
- "@webpod/ps": "0.1.0",
+ "@webpod/ps": "0.1.1",
"c8": "10.1.3",
"chalk": "5.4.1",
"create-require": "1.1.1",
@@ -118,9 +118,9 @@
"esbuild-plugin-resolve": "2.0.0",
"esbuild-plugin-transform-hook": "0.2.0",
"esbuild-plugin-utils": "0.1.0",
- "fs-extra": "11.2.0",
+ "fs-extra": "11.3.0",
"get-port": "7.1.0",
- "globby": "14.0.2",
+ "globby": "14.1.0",
"jsr": "0.13.4",
"lefthook": "1.11.6",
"madge": "8.0.0",
@@ -134,8 +134,8 @@
"typescript": "5.8.2",
"vitepress": "1.6.3",
"which": "5.0.0",
- "yaml": "2.7.0",
- "zurk": "0.10.3"
+ "yaml": "2.7.1",
+ "zurk": "0.11.2"
},
"overrides": {
"globby": {