@neocompose/cli 0.70.4 → 0.70.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/neo.mjs +546 -217
- package/dist/test-worker.mjs +543 -214
- package/package.json +8 -8
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
package/dist/neo.mjs
CHANGED
|
@@ -8893,13 +8893,15 @@ var require_ignore = __commonJS({
|
|
|
8893
8893
|
var EMPTY2 = "";
|
|
8894
8894
|
var SPACE = " ";
|
|
8895
8895
|
var ESCAPE = "\\";
|
|
8896
|
-
var
|
|
8896
|
+
var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
|
|
8897
|
+
var BOM = "\uFEFF";
|
|
8897
8898
|
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
8898
8899
|
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
8899
8900
|
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
8900
8901
|
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
8901
|
-
var
|
|
8902
|
-
var
|
|
8902
|
+
var DOUBLE_SLASH = "//";
|
|
8903
|
+
var SLASH_CODE = 47;
|
|
8904
|
+
var DOT_CODE = 46;
|
|
8903
8905
|
var SLASH = "/";
|
|
8904
8906
|
var TMP_KEY_IGNORE = "node-ignore";
|
|
8905
8907
|
if (typeof Symbol !== "undefined") {
|
|
@@ -8910,44 +8912,173 @@ var require_ignore = __commonJS({
|
|
|
8910
8912
|
Object.defineProperty(object2, key, { value });
|
|
8911
8913
|
return value;
|
|
8912
8914
|
};
|
|
8913
|
-
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
|
|
8914
8915
|
var RETURN_FALSE = () => false;
|
|
8915
|
-
var sanitizeRange = (range2) => range2.replace(
|
|
8916
|
-
REGEX_REGEXP_RANGE,
|
|
8917
|
-
(match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY2
|
|
8918
|
-
);
|
|
8919
|
-
var negateRange = (range2) => range2.startsWith("!") || range2.startsWith("\\^") ? `^${range2.slice(range2[0] === "!" ? 1 : 2)}` : range2;
|
|
8920
8916
|
var cleanRangeBackSlash = (slashes) => {
|
|
8921
8917
|
const { length } = slashes;
|
|
8922
8918
|
return slashes.slice(0, length - length % 2);
|
|
8923
8919
|
};
|
|
8920
|
+
var POSIX_CLASSES = {
|
|
8921
|
+
alnum: "0-9A-Za-z",
|
|
8922
|
+
alpha: "A-Za-z",
|
|
8923
|
+
blank: " \\t",
|
|
8924
|
+
cntrl: "\\x00-\\x1f\\x7f",
|
|
8925
|
+
digit: "0-9",
|
|
8926
|
+
graph: "!-.0-~",
|
|
8927
|
+
lower: "a-z",
|
|
8928
|
+
print: " -.0-~",
|
|
8929
|
+
punct: "!-.:-@\\[-`{-~",
|
|
8930
|
+
// git's `sane-ctype.h` classifies \v and \f as control, not space,
|
|
8931
|
+
// unlike C's `isspace`
|
|
8932
|
+
space: " \\t\\n\\r",
|
|
8933
|
+
upper: "A-Z",
|
|
8934
|
+
xdigit: "0-9A-Fa-f"
|
|
8935
|
+
};
|
|
8936
|
+
var CLASS_MEMBERS_TO_ESCAPE = "\\]^-[";
|
|
8937
|
+
var escapeMember = (char) => CLASS_MEMBERS_TO_ESCAPE.indexOf(char) < 0 ? char : ESCAPE + char;
|
|
8938
|
+
var NON_SLASH = "(?!\\/)";
|
|
8939
|
+
var classSource = (negated, body) => {
|
|
8940
|
+
if (negated) {
|
|
8941
|
+
return `[^\\/${body}]`;
|
|
8942
|
+
}
|
|
8943
|
+
const source = `[${body}]`;
|
|
8944
|
+
return new RegExp(source).test("/") ? NON_SLASH + source : source;
|
|
8945
|
+
};
|
|
8946
|
+
var scanBracket = (pattern, start) => {
|
|
8947
|
+
const { length } = pattern;
|
|
8948
|
+
let index = start + 1;
|
|
8949
|
+
let negated = EMPTY2;
|
|
8950
|
+
const lead = pattern[index];
|
|
8951
|
+
if (lead === "!" || lead === "^") {
|
|
8952
|
+
negated = "^";
|
|
8953
|
+
index++;
|
|
8954
|
+
}
|
|
8955
|
+
let body = EMPTY2;
|
|
8956
|
+
let prev = EMPTY2;
|
|
8957
|
+
for (; ; ) {
|
|
8958
|
+
const char = pattern[index];
|
|
8959
|
+
if (char === UNDEFINED) {
|
|
8960
|
+
return null;
|
|
8961
|
+
}
|
|
8962
|
+
if (char === ESCAPE) {
|
|
8963
|
+
const escaped = pattern[index + 1];
|
|
8964
|
+
if (escaped === UNDEFINED) {
|
|
8965
|
+
return null;
|
|
8966
|
+
}
|
|
8967
|
+
body += escapeMember(escaped);
|
|
8968
|
+
prev = escaped;
|
|
8969
|
+
index++;
|
|
8970
|
+
} else if (char === "-" && prev && index + 1 < length && pattern[index + 1] !== "]") {
|
|
8971
|
+
index++;
|
|
8972
|
+
let to = pattern[index];
|
|
8973
|
+
if (to === ESCAPE) {
|
|
8974
|
+
to = pattern[index += 1];
|
|
8975
|
+
}
|
|
8976
|
+
if (prev <= to) {
|
|
8977
|
+
body += `-${escapeMember(to)}`;
|
|
8978
|
+
}
|
|
8979
|
+
prev = EMPTY2;
|
|
8980
|
+
} else if (char === "[" && pattern[index + 1] === ":") {
|
|
8981
|
+
const nameStart = index + 2;
|
|
8982
|
+
let end = nameStart;
|
|
8983
|
+
while (end < length && pattern[end] !== "]") {
|
|
8984
|
+
end++;
|
|
8985
|
+
}
|
|
8986
|
+
if (end === length) {
|
|
8987
|
+
return null;
|
|
8988
|
+
}
|
|
8989
|
+
if (end > nameStart && pattern[end - 1] === ":") {
|
|
8990
|
+
const expanded = POSIX_CLASSES[pattern.slice(nameStart, end - 1)];
|
|
8991
|
+
if (expanded === UNDEFINED) {
|
|
8992
|
+
return null;
|
|
8993
|
+
}
|
|
8994
|
+
body += expanded;
|
|
8995
|
+
prev = EMPTY2;
|
|
8996
|
+
index = end;
|
|
8997
|
+
} else {
|
|
8998
|
+
body += escapeMember("[");
|
|
8999
|
+
prev = "[";
|
|
9000
|
+
index = nameStart - 2;
|
|
9001
|
+
}
|
|
9002
|
+
} else {
|
|
9003
|
+
body += escapeMember(char);
|
|
9004
|
+
prev = char;
|
|
9005
|
+
}
|
|
9006
|
+
index++;
|
|
9007
|
+
if (pattern[index] === "]") {
|
|
9008
|
+
return {
|
|
9009
|
+
end: index,
|
|
9010
|
+
source: classSource(negated, body)
|
|
9011
|
+
};
|
|
9012
|
+
}
|
|
9013
|
+
}
|
|
9014
|
+
};
|
|
9015
|
+
var NEVER_MATCH = "[]";
|
|
9016
|
+
var PLACEHOLDER = "\0";
|
|
9017
|
+
var REGEX_RESTORE_PLACEHOLDER = new RegExp(
|
|
9018
|
+
`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`,
|
|
9019
|
+
"g"
|
|
9020
|
+
);
|
|
9021
|
+
var TRAILING_WILDCARD = "\uE000";
|
|
9022
|
+
var TRAILING_DOUBLESTAR = "\uE001";
|
|
9023
|
+
var extractBrackets = (pattern) => {
|
|
9024
|
+
const sources2 = [];
|
|
9025
|
+
const hold = (source) => `${PLACEHOLDER}${sources2.push(source) - 1}${PLACEHOLDER}`;
|
|
9026
|
+
const { length } = pattern;
|
|
9027
|
+
let out = EMPTY2;
|
|
9028
|
+
let index = 0;
|
|
9029
|
+
while (index < length) {
|
|
9030
|
+
const char = pattern[index];
|
|
9031
|
+
if (char === ESCAPE) {
|
|
9032
|
+
const escaped = pattern[index + 1];
|
|
9033
|
+
if (escaped === UNDEFINED || escaped === SLASH && index + 2 === length) {
|
|
9034
|
+
out += hold(NEVER_MATCH);
|
|
9035
|
+
} else if (escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE) {
|
|
9036
|
+
out += pattern.slice(index, index + 2);
|
|
9037
|
+
} else {
|
|
9038
|
+
out += hold(
|
|
9039
|
+
REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : escaped
|
|
9040
|
+
);
|
|
9041
|
+
}
|
|
9042
|
+
index += 2;
|
|
9043
|
+
} else if (char === PLACEHOLDER) {
|
|
9044
|
+
out += hold(`[${PLACEHOLDER}]`);
|
|
9045
|
+
index++;
|
|
9046
|
+
} else if (char === "[") {
|
|
9047
|
+
const scanned = scanBracket(pattern, index);
|
|
9048
|
+
if (scanned === null) {
|
|
9049
|
+
out += hold(NEVER_MATCH);
|
|
9050
|
+
index = length;
|
|
9051
|
+
} else {
|
|
9052
|
+
out += hold(scanned.source);
|
|
9053
|
+
index = scanned.end + 1;
|
|
9054
|
+
}
|
|
9055
|
+
} else {
|
|
9056
|
+
out += char;
|
|
9057
|
+
index++;
|
|
9058
|
+
}
|
|
9059
|
+
}
|
|
9060
|
+
return {
|
|
9061
|
+
source: out,
|
|
9062
|
+
sources: sources2
|
|
9063
|
+
};
|
|
9064
|
+
};
|
|
9065
|
+
var DIRECT = null;
|
|
9066
|
+
var REGEX_INNER_SLASH = /\/(?!$)/;
|
|
8924
9067
|
var REPLACERS = [
|
|
8925
|
-
[
|
|
8926
|
-
// Remove BOM
|
|
8927
|
-
// TODO:
|
|
8928
|
-
// Other similar zero-width characters?
|
|
8929
|
-
/^\uFEFF/,
|
|
8930
|
-
() => EMPTY2
|
|
8931
|
-
],
|
|
8932
|
-
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
8933
|
-
[
|
|
8934
|
-
// (a\ ) -> (a )
|
|
8935
|
-
// (a ) -> (a)
|
|
8936
|
-
// (a ) -> (a)
|
|
8937
|
-
// (a \ ) -> (a )
|
|
8938
|
-
/((?:\\\\)*?)(\\?\s+)$/,
|
|
8939
|
-
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY2)
|
|
8940
|
-
],
|
|
8941
9068
|
// Replace (\ ) with ' '
|
|
9069
|
+
// Only a space: an escaped tab or other whitespace is already a literal by
|
|
9070
|
+
// the time it reaches here, and a bare tab must be left as one, not turned
|
|
9071
|
+
// into a space.
|
|
8942
9072
|
// (\ ) -> ' '
|
|
8943
9073
|
// (\\ ) -> '\\ '
|
|
8944
9074
|
// (\\\ ) -> '\\ '
|
|
8945
9075
|
[
|
|
8946
|
-
|
|
8947
|
-
(
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
9076
|
+
// A run of backslashes is taken whole, from its first one, so no match
|
|
9077
|
+
// ever starts again inside it -- `(\\+?) ` did, which made a long run
|
|
9078
|
+
// quadratic.
|
|
9079
|
+
/(\\+)( ?)/g,
|
|
9080
|
+
(_, run, space) => space ? run.slice(0, run.length - run.length % 2) + SPACE : run,
|
|
9081
|
+
ESCAPE + SPACE
|
|
8951
9082
|
],
|
|
8952
9083
|
// Escape metacharacters
|
|
8953
9084
|
// which is written down by users but means special for regular expressions.
|
|
@@ -8972,7 +9103,8 @@ var require_ignore = __commonJS({
|
|
|
8972
9103
|
[
|
|
8973
9104
|
// > a question mark (?) matches a single character
|
|
8974
9105
|
/(?!\\)\?/g,
|
|
8975
|
-
() => "[^/]"
|
|
9106
|
+
() => "[^/]",
|
|
9107
|
+
"?"
|
|
8976
9108
|
],
|
|
8977
9109
|
// leading slash
|
|
8978
9110
|
[
|
|
@@ -8980,12 +9112,14 @@ var require_ignore = __commonJS({
|
|
|
8980
9112
|
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
8981
9113
|
// A leading slash matches the beginning of the pathname
|
|
8982
9114
|
/^\//,
|
|
8983
|
-
() => "^"
|
|
9115
|
+
() => "^",
|
|
9116
|
+
SLASH
|
|
8984
9117
|
],
|
|
8985
9118
|
// replace special metacharacter slash after the leading slash
|
|
8986
9119
|
[
|
|
8987
9120
|
/\//g,
|
|
8988
|
-
() => "\\/"
|
|
9121
|
+
() => "\\/",
|
|
9122
|
+
SLASH
|
|
8989
9123
|
],
|
|
8990
9124
|
[
|
|
8991
9125
|
// > A leading "**" followed by a slash means match in all directories.
|
|
@@ -8996,16 +9130,21 @@ var require_ignore = __commonJS({
|
|
|
8996
9130
|
// Notice that the '*'s have been replaced as '\\*'
|
|
8997
9131
|
/^\^*(?:\\\*\\\*\\\/)+/,
|
|
8998
9132
|
// '**/foo' <-> 'foo'
|
|
8999
|
-
() => "^(?:.*\\/)?"
|
|
9133
|
+
() => "^(?:.*\\/)?",
|
|
9134
|
+
"*"
|
|
9000
9135
|
],
|
|
9001
9136
|
// starting
|
|
9002
9137
|
[
|
|
9003
9138
|
// there will be no leading '/'
|
|
9004
9139
|
// (which has been replaced by section "leading slash")
|
|
9005
9140
|
// If starts with '**', adding a '^' to the regular expression also works
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9141
|
+
DIRECT,
|
|
9142
|
+
(source, pattern) => {
|
|
9143
|
+
if (!source || source[0] === "^") {
|
|
9144
|
+
return source;
|
|
9145
|
+
}
|
|
9146
|
+
const anchor = !REGEX_INNER_SLASH.test(pattern) ? "(?:^|\\/)" : "^";
|
|
9147
|
+
return anchor + source;
|
|
9009
9148
|
}
|
|
9010
9149
|
],
|
|
9011
9150
|
// two globstars
|
|
@@ -9015,7 +9154,8 @@ var require_ignore = __commonJS({
|
|
|
9015
9154
|
// Zero, one or several directories
|
|
9016
9155
|
// should not use '*', or it will be replaced by the next replacer
|
|
9017
9156
|
// Check if it is not the last `'/**'`
|
|
9018
|
-
(_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)
|
|
9157
|
+
(_, index, str) => index + 6 < str.length ? str.slice(index + 6) === "\\/" ? "(?:\\/[^\\/]+)+" : "(?:\\/[^\\/]+)*" : `\\/${TRAILING_DOUBLESTAR}`,
|
|
9158
|
+
"*"
|
|
9019
9159
|
],
|
|
9020
9160
|
// normal intermediate wildcards
|
|
9021
9161
|
[
|
|
@@ -9030,32 +9170,56 @@ var require_ignore = __commonJS({
|
|
|
9030
9170
|
(_, p1, p2) => {
|
|
9031
9171
|
const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
9032
9172
|
return p1 + unescaped;
|
|
9033
|
-
}
|
|
9173
|
+
},
|
|
9174
|
+
"*"
|
|
9175
|
+
],
|
|
9176
|
+
// trailing wildcard, held apart from a literal star
|
|
9177
|
+
[
|
|
9178
|
+
// The step above leaves a trailing `*` alone, so a single `\*` is all that
|
|
9179
|
+
// can be left at the end here. Whether it is a wildcard or a literal
|
|
9180
|
+
// turns on the backslashes the user put in front of it: the escaper has
|
|
9181
|
+
// since doubled every one, so what stands here is those `2N` doubled
|
|
9182
|
+
// backslashes and then the star's own escape. An even number of the
|
|
9183
|
+
// original `N` leaves the star unescaped -- a wildcard -- and an odd
|
|
9184
|
+
// number escapes it -- a literal. This runs while the two are still
|
|
9185
|
+
// distinct, before the unescape steps below collapse the literal onto
|
|
9186
|
+
// the very `\*` a wildcard leaves behind.
|
|
9187
|
+
/(^|[^\\])((?:\\\\)*)\\\*$/,
|
|
9188
|
+
(match, p1, p2) => (
|
|
9189
|
+
// `p2` holds the doubled user backslashes; half of them is `N`.
|
|
9190
|
+
p2.length / 2 % 2 === 0 ? p1 + p2 + TRAILING_WILDCARD : match
|
|
9191
|
+
),
|
|
9192
|
+
"*"
|
|
9034
9193
|
],
|
|
9035
9194
|
[
|
|
9036
9195
|
// unescape, revert step 3 except for back slash
|
|
9037
9196
|
// For example, if a user escape a '\\*',
|
|
9038
9197
|
// after step 3, the result will be '\\\\\\*'
|
|
9039
9198
|
/\\\\\\(?=[$.|*+(){^])/g,
|
|
9040
|
-
() => ESCAPE
|
|
9199
|
+
() => ESCAPE,
|
|
9200
|
+
ESCAPE + ESCAPE
|
|
9041
9201
|
],
|
|
9042
9202
|
[
|
|
9043
9203
|
// '\\\\' -> '\\'
|
|
9044
9204
|
/\\\\/g,
|
|
9045
|
-
() => ESCAPE
|
|
9205
|
+
() => ESCAPE,
|
|
9206
|
+
ESCAPE + ESCAPE
|
|
9046
9207
|
],
|
|
9047
9208
|
[
|
|
9048
|
-
//
|
|
9049
|
-
//
|
|
9209
|
+
// Every real bracket expression -- POSIX classes included -- has already
|
|
9210
|
+
// been held aside by `extractBrackets`, so the only `[` left in the
|
|
9211
|
+
// pattern is an escaped, literal one.
|
|
9050
9212
|
// `\` is escaped by step 3
|
|
9051
|
-
|
|
9052
|
-
|
|
9213
|
+
/\\\[([^\]/]*?)(\\*)($|\])/g,
|
|
9214
|
+
// '\\[bar]' -> '\\\\[bar\\]'
|
|
9215
|
+
(match, range2, endEscape, close) => `\\[${range2}${cleanRangeBackSlash(endEscape)}${close}`,
|
|
9216
|
+
"["
|
|
9053
9217
|
],
|
|
9054
9218
|
// ending
|
|
9055
9219
|
[
|
|
9056
9220
|
// 'js' will not match 'js.'
|
|
9057
9221
|
// 'ab' will not match 'abc'
|
|
9058
|
-
|
|
9222
|
+
DIRECT,
|
|
9059
9223
|
// WTF!
|
|
9060
9224
|
// https://git-scm.com/docs/gitignore
|
|
9061
9225
|
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
@@ -9066,29 +9230,175 @@ var require_ignore = __commonJS({
|
|
|
9066
9230
|
// 'js*' will not match 'a.js'
|
|
9067
9231
|
// 'js/' will not match 'a.js'
|
|
9068
9232
|
// 'js' will match 'a.js' and 'a.js/'
|
|
9069
|
-
(
|
|
9233
|
+
(source) => {
|
|
9234
|
+
const last = source[source.length - 1];
|
|
9235
|
+
if (!last || last === TRAILING_WILDCARD || last === TRAILING_DOUBLESTAR) {
|
|
9236
|
+
return source;
|
|
9237
|
+
}
|
|
9238
|
+
return last === SLASH ? `${source}$` : `${source}(?=$|\\/$)`;
|
|
9239
|
+
}
|
|
9070
9240
|
]
|
|
9071
9241
|
];
|
|
9072
|
-
var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)
|
|
9242
|
+
var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/;
|
|
9073
9243
|
var MODE_IGNORE = "regex";
|
|
9074
9244
|
var MODE_CHECK_IGNORE = "checkRegex";
|
|
9075
9245
|
var UNDERSCORE = "_";
|
|
9076
|
-
var
|
|
9077
|
-
[
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9246
|
+
var replaceTrailingWildcard = (_, p1) => {
|
|
9247
|
+
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
9248
|
+
return `${prefix}(?=$|\\/$)`;
|
|
9249
|
+
};
|
|
9250
|
+
var REGEX_REPLACE_TRAILING_DOUBLESTAR = /\uE001$/;
|
|
9251
|
+
var replaceTrailingDoublestar = () => ".+(?=$|\\/$)";
|
|
9252
|
+
var WILDCARD = "[^\\/]*";
|
|
9253
|
+
var separatorAfter = (run, at3) => {
|
|
9254
|
+
let separator = EMPTY2;
|
|
9255
|
+
for (let index = at3 + 1; index < run.length && !run[index].wildcard; index++) {
|
|
9256
|
+
separator += run[index].single;
|
|
9257
|
+
}
|
|
9258
|
+
return separator;
|
|
9259
|
+
};
|
|
9260
|
+
var pinWildcards = (source) => {
|
|
9261
|
+
if (source.indexOf(WILDCARD) < 0) {
|
|
9262
|
+
return source;
|
|
9263
|
+
}
|
|
9264
|
+
const tokens = [];
|
|
9265
|
+
const { length } = source;
|
|
9266
|
+
let index = 0;
|
|
9267
|
+
while (index < length) {
|
|
9268
|
+
const char = source[index];
|
|
9269
|
+
if (source.startsWith(WILDCARD, index)) {
|
|
9270
|
+
tokens.push({ wildcard: true });
|
|
9271
|
+
index += WILDCARD.length;
|
|
9272
|
+
} else if (char === "[") {
|
|
9273
|
+
let end = index + 1;
|
|
9274
|
+
if (source[end] === "^") {
|
|
9275
|
+
end++;
|
|
9276
|
+
}
|
|
9277
|
+
if (source[end] === "]") {
|
|
9278
|
+
end++;
|
|
9279
|
+
}
|
|
9280
|
+
while (end < length && source[end] !== "]") {
|
|
9281
|
+
end += source[end] === ESCAPE ? 2 : 1;
|
|
9282
|
+
}
|
|
9283
|
+
end++;
|
|
9284
|
+
tokens.push({ single: source.slice(index, end) });
|
|
9285
|
+
index = end;
|
|
9286
|
+
} else if (char === ESCAPE) {
|
|
9287
|
+
tokens.push({ single: source.slice(index, index + 2) });
|
|
9288
|
+
index += 2;
|
|
9289
|
+
} else if (char === "(") {
|
|
9290
|
+
let depth = 0;
|
|
9291
|
+
let end = index;
|
|
9292
|
+
do {
|
|
9293
|
+
if (source[end] === ESCAPE) {
|
|
9294
|
+
end++;
|
|
9295
|
+
} else if (source[end] === "(") {
|
|
9296
|
+
depth++;
|
|
9297
|
+
} else if (source[end] === ")") {
|
|
9298
|
+
depth--;
|
|
9299
|
+
}
|
|
9300
|
+
end++;
|
|
9301
|
+
} while (end < length && depth > 0);
|
|
9302
|
+
if ("*+?".indexOf(source[end]) >= 0) {
|
|
9303
|
+
end++;
|
|
9304
|
+
}
|
|
9305
|
+
tokens.push({ boundary: source.slice(index, end) });
|
|
9306
|
+
index = end;
|
|
9307
|
+
} else if (char === "^" || char === "$") {
|
|
9308
|
+
tokens.push({ boundary: char });
|
|
9309
|
+
index++;
|
|
9310
|
+
} else {
|
|
9311
|
+
tokens.push({ single: char });
|
|
9312
|
+
index++;
|
|
9313
|
+
}
|
|
9084
9314
|
}
|
|
9315
|
+
let out = EMPTY2;
|
|
9316
|
+
let run = [];
|
|
9317
|
+
const flush = () => {
|
|
9318
|
+
let lastWildcard;
|
|
9319
|
+
run.forEach((token, at3) => {
|
|
9320
|
+
if (token.wildcard) {
|
|
9321
|
+
lastWildcard = at3;
|
|
9322
|
+
}
|
|
9323
|
+
});
|
|
9324
|
+
run.forEach((token, at3) => {
|
|
9325
|
+
if (!token.wildcard) {
|
|
9326
|
+
out += token.single;
|
|
9327
|
+
return;
|
|
9328
|
+
}
|
|
9329
|
+
out += at3 === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run, at3)})[^\\/])*`;
|
|
9330
|
+
});
|
|
9331
|
+
run = [];
|
|
9332
|
+
};
|
|
9333
|
+
tokens.forEach((token) => {
|
|
9334
|
+
if (token.boundary === void 0) {
|
|
9335
|
+
run.push(token);
|
|
9336
|
+
return;
|
|
9337
|
+
}
|
|
9338
|
+
flush();
|
|
9339
|
+
out += token.boundary;
|
|
9340
|
+
});
|
|
9341
|
+
flush();
|
|
9342
|
+
return out;
|
|
9343
|
+
};
|
|
9344
|
+
var makeRegexPrefix = (pattern) => {
|
|
9345
|
+
const { source, sources: sources2 } = extractBrackets(pattern);
|
|
9346
|
+
const replaced = REPLACERS.reduce(
|
|
9347
|
+
// A pass whose matcher finds nothing hands back the very string it was
|
|
9348
|
+
// given, so asking first costs a search and saves a rewrite. Ten of the
|
|
9349
|
+
// fifteen passes never fire for a typical .gitignore line, and between
|
|
9350
|
+
// them they were 45% of this chain.
|
|
9351
|
+
(prev, [matcher, replacer, required2]) => {
|
|
9352
|
+
if (matcher === DIRECT) {
|
|
9353
|
+
return replacer(prev, pattern);
|
|
9354
|
+
}
|
|
9355
|
+
if (required2 !== UNDEFINED && prev.indexOf(required2) < 0) {
|
|
9356
|
+
return prev;
|
|
9357
|
+
}
|
|
9358
|
+
return matcher.test(prev) ? prev.replace(matcher, replacer.bind(pattern)) : prev;
|
|
9359
|
+
},
|
|
9360
|
+
source
|
|
9361
|
+
);
|
|
9362
|
+
return sources2.length ? replaced.replace(
|
|
9363
|
+
REGEX_RESTORE_PLACEHOLDER,
|
|
9364
|
+
(match, index) => sources2[index]
|
|
9365
|
+
) : replaced;
|
|
9366
|
+
};
|
|
9367
|
+
var checkSourceOf = (body, prefix) => {
|
|
9368
|
+
if (body[body.length - 1] === SLASH) {
|
|
9369
|
+
prefix = makeRegexPrefix(body.slice(0, -1));
|
|
9370
|
+
}
|
|
9371
|
+
const head = prefix.slice(0, -1);
|
|
9372
|
+
const last = prefix[prefix.length - 1];
|
|
9373
|
+
return last === TRAILING_WILDCARD ? `${head}$` : last === TRAILING_DOUBLESTAR ? `${head}.*$` : NEVER_MATCH;
|
|
9374
|
+
};
|
|
9375
|
+
var matchesBasename = (body) => {
|
|
9376
|
+
const index = body.indexOf(SLASH);
|
|
9377
|
+
return index < 0 || index === body.length - 1;
|
|
9378
|
+
};
|
|
9379
|
+
var basenameOf = (path) => {
|
|
9380
|
+
const end = path.length - 1;
|
|
9381
|
+
const index = path.lastIndexOf(
|
|
9382
|
+
SLASH,
|
|
9383
|
+
path[end] === SLASH ? end - 1 : end
|
|
9384
|
+
);
|
|
9385
|
+
return index < 0 ? path : path.slice(index + 1);
|
|
9386
|
+
};
|
|
9387
|
+
var parentOf = (path) => {
|
|
9388
|
+
if (path.charCodeAt(0) === SLASH_CODE || path.indexOf(DOUBLE_SLASH) >= 0) {
|
|
9389
|
+
const slices = path.split(SLASH).filter(Boolean);
|
|
9390
|
+
slices.pop();
|
|
9391
|
+
return slices.length ? slices.join(SLASH) + SLASH : EMPTY2;
|
|
9392
|
+
}
|
|
9393
|
+
const end = path.length - 1;
|
|
9394
|
+
const cut = path.lastIndexOf(
|
|
9395
|
+
SLASH,
|
|
9396
|
+
path.charCodeAt(end) === SLASH_CODE ? end - 1 : end
|
|
9397
|
+
);
|
|
9398
|
+
return cut < 0 ? EMPTY2 : path.slice(0, cut + 1);
|
|
9085
9399
|
};
|
|
9086
|
-
var makeRegexPrefix = (pattern) => REPLACERS.reduce(
|
|
9087
|
-
(prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
|
|
9088
|
-
pattern
|
|
9089
|
-
);
|
|
9090
9400
|
var isString2 = (subject) => typeof subject === "string";
|
|
9091
|
-
var checkPattern = (pattern) => pattern && isString2(pattern) && !
|
|
9401
|
+
var checkPattern = (pattern) => pattern && isString2(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern);
|
|
9092
9402
|
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
|
|
9093
9403
|
var IgnoreRule = class {
|
|
9094
9404
|
constructor(pattern, mark, body, ignoreCase, negative, prefix) {
|
|
@@ -9099,6 +9409,14 @@ var require_ignore = __commonJS({
|
|
|
9099
9409
|
define(this, "ignoreCase", ignoreCase);
|
|
9100
9410
|
define(this, "regexPrefix", prefix);
|
|
9101
9411
|
}
|
|
9412
|
+
// Worked out on first use and kept behind an own property, the way `regex`
|
|
9413
|
+
// caches itself in `_regex`. Deciding it in the constructor instead would
|
|
9414
|
+
// add a fourth `defineProperty` to every rule ever built, which cost 4% of
|
|
9415
|
+
// every compile -- including the compiles of rules that are never matched
|
|
9416
|
+
// against anything.
|
|
9417
|
+
get _basenameOnly() {
|
|
9418
|
+
return define(this, "_basenameOnly", matchesBasename(this.body));
|
|
9419
|
+
}
|
|
9102
9420
|
get regex() {
|
|
9103
9421
|
const key = UNDERSCORE + MODE_IGNORE;
|
|
9104
9422
|
if (this[key]) {
|
|
@@ -9114,24 +9432,51 @@ var require_ignore = __commonJS({
|
|
|
9114
9432
|
return this._make(MODE_CHECK_IGNORE, key);
|
|
9115
9433
|
}
|
|
9116
9434
|
_make(mode, key) {
|
|
9117
|
-
const str =
|
|
9118
|
-
REGEX_REPLACE_TRAILING_WILDCARD,
|
|
9119
|
-
// It does not need to bind pattern
|
|
9120
|
-
TRAILING_WILD_CARD_REPLACERS[mode]
|
|
9435
|
+
const str = pinWildcards(
|
|
9436
|
+
mode === MODE_IGNORE ? this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, replaceTrailingWildcard).replace(REGEX_REPLACE_TRAILING_DOUBLESTAR, replaceTrailingDoublestar) : checkSourceOf(this.body, this.regexPrefix)
|
|
9121
9437
|
);
|
|
9122
9438
|
const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
|
|
9123
9439
|
return define(this, key, regex);
|
|
9124
9440
|
}
|
|
9125
9441
|
};
|
|
9442
|
+
var isLineEnd = (char) => char === "\r" || char === "\n";
|
|
9443
|
+
var trimEnd4 = (body) => {
|
|
9444
|
+
let end = body.length;
|
|
9445
|
+
while (end && isLineEnd(body[end - 1])) {
|
|
9446
|
+
end--;
|
|
9447
|
+
}
|
|
9448
|
+
const lineEnd = end;
|
|
9449
|
+
while (end && body[end - 1] === SPACE) {
|
|
9450
|
+
end--;
|
|
9451
|
+
}
|
|
9452
|
+
if (end === lineEnd) {
|
|
9453
|
+
return body.slice(0, end);
|
|
9454
|
+
}
|
|
9455
|
+
let backslashes = 0;
|
|
9456
|
+
while (backslashes < end && body[end - backslashes - 1] === ESCAPE) {
|
|
9457
|
+
backslashes++;
|
|
9458
|
+
}
|
|
9459
|
+
return backslashes % 2 ? body.slice(0, end - 1) + SPACE : body.slice(0, end);
|
|
9460
|
+
};
|
|
9126
9461
|
var createRule = ({
|
|
9127
9462
|
pattern,
|
|
9128
9463
|
mark
|
|
9129
9464
|
}, ignoreCase) => {
|
|
9465
|
+
let body = pattern[0] === BOM ? pattern.slice(1) : pattern;
|
|
9466
|
+
if (body[0] === "#") {
|
|
9467
|
+
return;
|
|
9468
|
+
}
|
|
9130
9469
|
let negative = false;
|
|
9131
|
-
|
|
9132
|
-
if (body.indexOf("!") === 0) {
|
|
9470
|
+
if (body[0] === "!") {
|
|
9133
9471
|
negative = true;
|
|
9134
|
-
body = body.
|
|
9472
|
+
body = body.slice(1);
|
|
9473
|
+
}
|
|
9474
|
+
const last = body[body.length - 1];
|
|
9475
|
+
if (last === SPACE || last === "\r" || last === "\n") {
|
|
9476
|
+
body = trimEnd4(body);
|
|
9477
|
+
}
|
|
9478
|
+
if (!body) {
|
|
9479
|
+
return;
|
|
9135
9480
|
}
|
|
9136
9481
|
body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
|
|
9137
9482
|
const regexPrefix = makeRegexPrefix(body);
|
|
@@ -9148,10 +9493,12 @@ var require_ignore = __commonJS({
|
|
|
9148
9493
|
constructor(ignoreCase) {
|
|
9149
9494
|
this._ignoreCase = ignoreCase;
|
|
9150
9495
|
this._rules = [];
|
|
9496
|
+
this._basenameCount = 0;
|
|
9151
9497
|
}
|
|
9152
9498
|
_add(pattern) {
|
|
9153
9499
|
if (pattern && pattern[KEY_IGNORE]) {
|
|
9154
9500
|
this._rules = this._rules.concat(pattern._rules._rules);
|
|
9501
|
+
this._basenameCount += pattern._rules._basenameCount;
|
|
9155
9502
|
this._added = true;
|
|
9156
9503
|
return;
|
|
9157
9504
|
}
|
|
@@ -9160,10 +9507,13 @@ var require_ignore = __commonJS({
|
|
|
9160
9507
|
pattern
|
|
9161
9508
|
};
|
|
9162
9509
|
}
|
|
9163
|
-
|
|
9164
|
-
|
|
9510
|
+
const rule = checkPattern(pattern.pattern) && createRule(pattern, this._ignoreCase);
|
|
9511
|
+
if (rule) {
|
|
9165
9512
|
this._added = true;
|
|
9166
9513
|
this._rules.push(rule);
|
|
9514
|
+
if (matchesBasename(rule.body)) {
|
|
9515
|
+
this._basenameCount++;
|
|
9516
|
+
}
|
|
9167
9517
|
}
|
|
9168
9518
|
}
|
|
9169
9519
|
// @param {Array<string> | string | Ignore} pattern
|
|
@@ -9172,8 +9522,39 @@ var require_ignore = __commonJS({
|
|
|
9172
9522
|
makeArray(
|
|
9173
9523
|
isString2(pattern) ? splitPattern(pattern) : pattern
|
|
9174
9524
|
).forEach(this._add, this);
|
|
9525
|
+
if (this._added) {
|
|
9526
|
+
this._literalRules = UNDEFINED;
|
|
9527
|
+
}
|
|
9175
9528
|
return this._added;
|
|
9176
9529
|
}
|
|
9530
|
+
// Match the literal 'abc/' for `checkIgnore`, last rule wins. Only a rule
|
|
9531
|
+
// ending in a wildcard can match it (see `checkSourceOf`), so the rest
|
|
9532
|
+
// are left out once, rather than tested or compiled for every path.
|
|
9533
|
+
testLiteral(path) {
|
|
9534
|
+
const rules = this._literalRules || (this._literalRules = this._rules.filter(
|
|
9535
|
+
({ body }) => body[body.length - (body[body.length - 1] === SLASH ? 2 : 1)] === "*"
|
|
9536
|
+
));
|
|
9537
|
+
let ignored = false;
|
|
9538
|
+
let unignored = false;
|
|
9539
|
+
let matchedRule;
|
|
9540
|
+
for (let index = rules.length - 1; index >= 0; index--) {
|
|
9541
|
+
const rule = rules[index];
|
|
9542
|
+
if (rule.checkRegex.test(path)) {
|
|
9543
|
+
ignored = !rule.negative;
|
|
9544
|
+
unignored = rule.negative;
|
|
9545
|
+
matchedRule = rule.negative ? UNDEFINED : rule;
|
|
9546
|
+
break;
|
|
9547
|
+
}
|
|
9548
|
+
}
|
|
9549
|
+
const ret = {
|
|
9550
|
+
ignored,
|
|
9551
|
+
unignored
|
|
9552
|
+
};
|
|
9553
|
+
if (matchedRule) {
|
|
9554
|
+
ret.rule = matchedRule;
|
|
9555
|
+
}
|
|
9556
|
+
return ret;
|
|
9557
|
+
}
|
|
9177
9558
|
// Test one single path without recursively checking parent directories
|
|
9178
9559
|
//
|
|
9179
9560
|
// - checkUnignored `boolean` whether should check if the path is unignored,
|
|
@@ -9185,19 +9566,22 @@ var require_ignore = __commonJS({
|
|
|
9185
9566
|
let ignored = false;
|
|
9186
9567
|
let unignored = false;
|
|
9187
9568
|
let matchedRule;
|
|
9188
|
-
this._rules
|
|
9569
|
+
const rules = this._rules;
|
|
9570
|
+
const { length } = rules;
|
|
9571
|
+
const shortcut = this._basenameCount * 2 >= length;
|
|
9572
|
+
const basename5 = shortcut ? basenameOf(path) : path;
|
|
9573
|
+
for (let index = 0; index < length; index++) {
|
|
9574
|
+
const rule = rules[index];
|
|
9189
9575
|
const { negative } = rule;
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9576
|
+
const skip = unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored;
|
|
9577
|
+
if (!skip && rule[mode].test(
|
|
9578
|
+
shortcut && rule._basenameOnly ? basename5 : path
|
|
9579
|
+
)) {
|
|
9580
|
+
ignored = !negative;
|
|
9581
|
+
unignored = negative;
|
|
9582
|
+
matchedRule = negative ? UNDEFINED : rule;
|
|
9196
9583
|
}
|
|
9197
|
-
|
|
9198
|
-
unignored = negative;
|
|
9199
|
-
matchedRule = negative ? UNDEFINED : rule;
|
|
9200
|
-
});
|
|
9584
|
+
}
|
|
9201
9585
|
const ret = {
|
|
9202
9586
|
ignored,
|
|
9203
9587
|
unignored
|
|
@@ -9230,7 +9614,26 @@ var require_ignore = __commonJS({
|
|
|
9230
9614
|
}
|
|
9231
9615
|
return true;
|
|
9232
9616
|
};
|
|
9233
|
-
var isNotRelative = (path) =>
|
|
9617
|
+
var isNotRelative = (path) => {
|
|
9618
|
+
const first = path.charCodeAt(0);
|
|
9619
|
+
if (first === SLASH_CODE) {
|
|
9620
|
+
return true;
|
|
9621
|
+
}
|
|
9622
|
+
if (first !== DOT_CODE) {
|
|
9623
|
+
return false;
|
|
9624
|
+
}
|
|
9625
|
+
if (path.length === 1) {
|
|
9626
|
+
return true;
|
|
9627
|
+
}
|
|
9628
|
+
const second = path.charCodeAt(1);
|
|
9629
|
+
if (second === SLASH_CODE) {
|
|
9630
|
+
return true;
|
|
9631
|
+
}
|
|
9632
|
+
if (second !== DOT_CODE) {
|
|
9633
|
+
return false;
|
|
9634
|
+
}
|
|
9635
|
+
return path.length === 2 || path.charCodeAt(2) === SLASH_CODE;
|
|
9636
|
+
};
|
|
9234
9637
|
checkPath.isNotRelative = isNotRelative;
|
|
9235
9638
|
checkPath.convert = (p) => p;
|
|
9236
9639
|
var Ignore = class {
|
|
@@ -9259,52 +9662,33 @@ var require_ignore = __commonJS({
|
|
|
9259
9662
|
return this.add(pattern);
|
|
9260
9663
|
}
|
|
9261
9664
|
// @returns {TestResult}
|
|
9262
|
-
_test(originalPath, cache, checkUnignored
|
|
9665
|
+
_test(originalPath, cache, checkUnignored) {
|
|
9263
9666
|
const path = originalPath && checkPath.convert(originalPath);
|
|
9264
9667
|
checkPath(
|
|
9265
9668
|
path,
|
|
9266
9669
|
originalPath,
|
|
9267
9670
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
9268
9671
|
);
|
|
9269
|
-
return this._t(path, cache, checkUnignored
|
|
9672
|
+
return this._t(path, cache, checkUnignored);
|
|
9270
9673
|
}
|
|
9271
9674
|
checkIgnore(path) {
|
|
9272
|
-
if (
|
|
9675
|
+
if (path.charCodeAt(path.length - 1) !== SLASH_CODE) {
|
|
9273
9676
|
return this.test(path);
|
|
9274
9677
|
}
|
|
9275
|
-
const
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
const parent = this._t(
|
|
9279
|
-
slices.join(SLASH) + SLASH,
|
|
9280
|
-
this._testCache,
|
|
9281
|
-
true,
|
|
9282
|
-
slices
|
|
9283
|
-
);
|
|
9284
|
-
if (parent.ignored) {
|
|
9285
|
-
return parent;
|
|
9286
|
-
}
|
|
9678
|
+
const dir = this._t(path, this._testCache, true);
|
|
9679
|
+
if (dir.ignored) {
|
|
9680
|
+
return dir;
|
|
9287
9681
|
}
|
|
9288
|
-
|
|
9682
|
+
const literal3 = this._rules.testLiteral(path);
|
|
9683
|
+
return literal3.ignored || literal3.unignored ? literal3 : dir;
|
|
9289
9684
|
}
|
|
9290
|
-
_t(path, cache, checkUnignored
|
|
9685
|
+
_t(path, cache, checkUnignored) {
|
|
9291
9686
|
if (path in cache) {
|
|
9292
9687
|
return cache[path];
|
|
9293
9688
|
}
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
slices.pop();
|
|
9298
|
-
if (!slices.length) {
|
|
9299
|
-
return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE);
|
|
9300
|
-
}
|
|
9301
|
-
const parent = this._t(
|
|
9302
|
-
slices.join(SLASH) + SLASH,
|
|
9303
|
-
cache,
|
|
9304
|
-
checkUnignored,
|
|
9305
|
-
slices
|
|
9306
|
-
);
|
|
9307
|
-
return cache[path] = parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
|
|
9689
|
+
const parentPath = parentOf(path);
|
|
9690
|
+
const parent = parentPath ? this._t(parentPath, cache, checkUnignored) : UNDEFINED;
|
|
9691
|
+
return cache[path] = parent && parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
|
|
9308
9692
|
}
|
|
9309
9693
|
ignores(path) {
|
|
9310
9694
|
return this._test(path, this._ignoreCache, false).ignored;
|
|
@@ -31933,7 +32317,7 @@ var init_registry = __esm({
|
|
|
31933
32317
|
"../packages/manifest/schema-contract/registry.mjs"() {
|
|
31934
32318
|
"use strict";
|
|
31935
32319
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
31936
|
-
cliVersion: "0.70.
|
|
32320
|
+
cliVersion: "0.70.5",
|
|
31937
32321
|
projectFileUploadBatchSize: 32,
|
|
31938
32322
|
documentRecords: {
|
|
31939
32323
|
member: {
|
|
@@ -34968,19 +35352,8 @@ function _addIssue(context, label, dataset, config$1, other) {
|
|
|
34968
35352
|
else dataset.issues = [issue];
|
|
34969
35353
|
}
|
|
34970
35354
|
// @__NO_SIDE_EFFECTS__
|
|
34971
|
-
function
|
|
34972
|
-
|
|
34973
|
-
if (!cached) {
|
|
34974
|
-
cached = {
|
|
34975
|
-
version: 1,
|
|
34976
|
-
vendor: "valibot",
|
|
34977
|
-
validate(value$1) {
|
|
34978
|
-
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
34979
|
-
}
|
|
34980
|
-
};
|
|
34981
|
-
_standardCache.set(context, cached);
|
|
34982
|
-
}
|
|
34983
|
-
return cached;
|
|
35355
|
+
function _isSameValueZero(value1, value2) {
|
|
35356
|
+
return value1 === value2 || Number.isNaN(value1) && Number.isNaN(value2);
|
|
34984
35357
|
}
|
|
34985
35358
|
// @__NO_SIDE_EFFECTS__
|
|
34986
35359
|
function _isValidObjectKey(object$1, key) {
|
|
@@ -34992,6 +35365,14 @@ function _joinExpects(values$1, separator) {
|
|
|
34992
35365
|
if (list.length > 1) return `(${list.join(` ${separator} `)})`;
|
|
34993
35366
|
return list[0] ?? "never";
|
|
34994
35367
|
}
|
|
35368
|
+
function _standardSchema(schema) {
|
|
35369
|
+
schema["~standard"] = {
|
|
35370
|
+
version: 1,
|
|
35371
|
+
vendor: "valibot",
|
|
35372
|
+
validate: (value$1) => schema["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig())
|
|
35373
|
+
};
|
|
35374
|
+
return schema;
|
|
35375
|
+
}
|
|
34995
35376
|
// @__NO_SIDE_EFFECTS__
|
|
34996
35377
|
function check(requirement, message$1) {
|
|
34997
35378
|
return {
|
|
@@ -35177,7 +35558,7 @@ function getDefault(schema, dataset, config$1) {
|
|
|
35177
35558
|
}
|
|
35178
35559
|
// @__NO_SIDE_EFFECTS__
|
|
35179
35560
|
function array2(item, message$1) {
|
|
35180
|
-
return {
|
|
35561
|
+
return _standardSchema({
|
|
35181
35562
|
kind: "schema",
|
|
35182
35563
|
type: "array",
|
|
35183
35564
|
reference: array2,
|
|
@@ -35185,9 +35566,6 @@ function array2(item, message$1) {
|
|
|
35185
35566
|
async: false,
|
|
35186
35567
|
item,
|
|
35187
35568
|
message: message$1,
|
|
35188
|
-
get "~standard"() {
|
|
35189
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35190
|
-
},
|
|
35191
35569
|
"~run"(dataset, config$1) {
|
|
35192
35570
|
const input = dataset.value;
|
|
35193
35571
|
if (Array.isArray(input)) {
|
|
@@ -35221,30 +35599,27 @@ function array2(item, message$1) {
|
|
|
35221
35599
|
} else _addIssue(this, "type", dataset, config$1);
|
|
35222
35600
|
return dataset;
|
|
35223
35601
|
}
|
|
35224
|
-
};
|
|
35602
|
+
});
|
|
35225
35603
|
}
|
|
35226
35604
|
// @__NO_SIDE_EFFECTS__
|
|
35227
35605
|
function boolean(message$1) {
|
|
35228
|
-
return {
|
|
35606
|
+
return _standardSchema({
|
|
35229
35607
|
kind: "schema",
|
|
35230
35608
|
type: "boolean",
|
|
35231
35609
|
reference: boolean,
|
|
35232
35610
|
expects: "boolean",
|
|
35233
35611
|
async: false,
|
|
35234
35612
|
message: message$1,
|
|
35235
|
-
get "~standard"() {
|
|
35236
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35237
|
-
},
|
|
35238
35613
|
"~run"(dataset, config$1) {
|
|
35239
35614
|
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
35240
35615
|
else _addIssue(this, "type", dataset, config$1);
|
|
35241
35616
|
return dataset;
|
|
35242
35617
|
}
|
|
35243
|
-
};
|
|
35618
|
+
});
|
|
35244
35619
|
}
|
|
35245
35620
|
// @__NO_SIDE_EFFECTS__
|
|
35246
35621
|
function custom(check$1, message$1) {
|
|
35247
|
-
return {
|
|
35622
|
+
return _standardSchema({
|
|
35248
35623
|
kind: "schema",
|
|
35249
35624
|
type: "custom",
|
|
35250
35625
|
reference: custom,
|
|
@@ -35252,19 +35627,16 @@ function custom(check$1, message$1) {
|
|
|
35252
35627
|
async: false,
|
|
35253
35628
|
check: check$1,
|
|
35254
35629
|
message: message$1,
|
|
35255
|
-
get "~standard"() {
|
|
35256
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35257
|
-
},
|
|
35258
35630
|
"~run"(dataset, config$1) {
|
|
35259
35631
|
if (this.check(dataset.value)) dataset.typed = true;
|
|
35260
35632
|
else _addIssue(this, "type", dataset, config$1);
|
|
35261
35633
|
return dataset;
|
|
35262
35634
|
}
|
|
35263
|
-
};
|
|
35635
|
+
});
|
|
35264
35636
|
}
|
|
35265
35637
|
// @__NO_SIDE_EFFECTS__
|
|
35266
35638
|
function exactOptional(wrapped, default_) {
|
|
35267
|
-
return {
|
|
35639
|
+
return _standardSchema({
|
|
35268
35640
|
kind: "schema",
|
|
35269
35641
|
type: "exact_optional",
|
|
35270
35642
|
reference: exactOptional,
|
|
@@ -35272,34 +35644,28 @@ function exactOptional(wrapped, default_) {
|
|
|
35272
35644
|
async: false,
|
|
35273
35645
|
wrapped,
|
|
35274
35646
|
default: default_,
|
|
35275
|
-
get "~standard"() {
|
|
35276
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35277
|
-
},
|
|
35278
35647
|
"~run"(dataset, config$1) {
|
|
35279
35648
|
return this.wrapped["~run"](dataset, config$1);
|
|
35280
35649
|
}
|
|
35281
|
-
};
|
|
35650
|
+
});
|
|
35282
35651
|
}
|
|
35283
35652
|
// @__NO_SIDE_EFFECTS__
|
|
35284
35653
|
function lazy(getter) {
|
|
35285
|
-
return {
|
|
35654
|
+
return _standardSchema({
|
|
35286
35655
|
kind: "schema",
|
|
35287
35656
|
type: "lazy",
|
|
35288
35657
|
reference: lazy,
|
|
35289
35658
|
expects: "unknown",
|
|
35290
35659
|
async: false,
|
|
35291
35660
|
getter,
|
|
35292
|
-
get "~standard"() {
|
|
35293
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35294
|
-
},
|
|
35295
35661
|
"~run"(dataset, config$1) {
|
|
35296
35662
|
return this.getter(dataset.value)["~run"](dataset, config$1);
|
|
35297
35663
|
}
|
|
35298
|
-
};
|
|
35664
|
+
});
|
|
35299
35665
|
}
|
|
35300
35666
|
// @__NO_SIDE_EFFECTS__
|
|
35301
35667
|
function literal2(literal_, message$1) {
|
|
35302
|
-
return {
|
|
35668
|
+
return _standardSchema({
|
|
35303
35669
|
kind: "schema",
|
|
35304
35670
|
type: "literal",
|
|
35305
35671
|
reference: literal2,
|
|
@@ -35307,37 +35673,31 @@ function literal2(literal_, message$1) {
|
|
|
35307
35673
|
async: false,
|
|
35308
35674
|
literal: literal_,
|
|
35309
35675
|
message: message$1,
|
|
35310
|
-
get "~standard"() {
|
|
35311
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35312
|
-
},
|
|
35313
35676
|
"~run"(dataset, config$1) {
|
|
35314
|
-
if (dataset.value
|
|
35677
|
+
if (/* @__PURE__ */ _isSameValueZero(dataset.value, this.literal)) dataset.typed = true;
|
|
35315
35678
|
else _addIssue(this, "type", dataset, config$1);
|
|
35316
35679
|
return dataset;
|
|
35317
35680
|
}
|
|
35318
|
-
};
|
|
35681
|
+
});
|
|
35319
35682
|
}
|
|
35320
35683
|
// @__NO_SIDE_EFFECTS__
|
|
35321
35684
|
function never(message$1) {
|
|
35322
|
-
return {
|
|
35685
|
+
return _standardSchema({
|
|
35323
35686
|
kind: "schema",
|
|
35324
35687
|
type: "never",
|
|
35325
35688
|
reference: never,
|
|
35326
35689
|
expects: "never",
|
|
35327
35690
|
async: false,
|
|
35328
35691
|
message: message$1,
|
|
35329
|
-
get "~standard"() {
|
|
35330
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35331
|
-
},
|
|
35332
35692
|
"~run"(dataset, config$1) {
|
|
35333
35693
|
_addIssue(this, "type", dataset, config$1);
|
|
35334
35694
|
return dataset;
|
|
35335
35695
|
}
|
|
35336
|
-
};
|
|
35696
|
+
});
|
|
35337
35697
|
}
|
|
35338
35698
|
// @__NO_SIDE_EFFECTS__
|
|
35339
35699
|
function nullable(wrapped, default_) {
|
|
35340
|
-
return {
|
|
35700
|
+
return _standardSchema({
|
|
35341
35701
|
kind: "schema",
|
|
35342
35702
|
type: "nullable",
|
|
35343
35703
|
reference: nullable,
|
|
@@ -35345,9 +35705,6 @@ function nullable(wrapped, default_) {
|
|
|
35345
35705
|
async: false,
|
|
35346
35706
|
wrapped,
|
|
35347
35707
|
default: default_,
|
|
35348
|
-
get "~standard"() {
|
|
35349
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35350
|
-
},
|
|
35351
35708
|
"~run"(dataset, config$1) {
|
|
35352
35709
|
if (dataset.value === null) {
|
|
35353
35710
|
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
@@ -35358,30 +35715,27 @@ function nullable(wrapped, default_) {
|
|
|
35358
35715
|
}
|
|
35359
35716
|
return this.wrapped["~run"](dataset, config$1);
|
|
35360
35717
|
}
|
|
35361
|
-
};
|
|
35718
|
+
});
|
|
35362
35719
|
}
|
|
35363
35720
|
// @__NO_SIDE_EFFECTS__
|
|
35364
35721
|
function number(message$1) {
|
|
35365
|
-
return {
|
|
35722
|
+
return _standardSchema({
|
|
35366
35723
|
kind: "schema",
|
|
35367
35724
|
type: "number",
|
|
35368
35725
|
reference: number,
|
|
35369
35726
|
expects: "number",
|
|
35370
35727
|
async: false,
|
|
35371
35728
|
message: message$1,
|
|
35372
|
-
get "~standard"() {
|
|
35373
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35374
|
-
},
|
|
35375
35729
|
"~run"(dataset, config$1) {
|
|
35376
35730
|
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
35377
35731
|
else _addIssue(this, "type", dataset, config$1);
|
|
35378
35732
|
return dataset;
|
|
35379
35733
|
}
|
|
35380
|
-
};
|
|
35734
|
+
});
|
|
35381
35735
|
}
|
|
35382
35736
|
// @__NO_SIDE_EFFECTS__
|
|
35383
35737
|
function optional(wrapped, default_) {
|
|
35384
|
-
return {
|
|
35738
|
+
return _standardSchema({
|
|
35385
35739
|
kind: "schema",
|
|
35386
35740
|
type: "optional",
|
|
35387
35741
|
reference: optional,
|
|
@@ -35389,9 +35743,6 @@ function optional(wrapped, default_) {
|
|
|
35389
35743
|
async: false,
|
|
35390
35744
|
wrapped,
|
|
35391
35745
|
default: default_,
|
|
35392
|
-
get "~standard"() {
|
|
35393
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35394
|
-
},
|
|
35395
35746
|
"~run"(dataset, config$1) {
|
|
35396
35747
|
if (dataset.value === void 0) {
|
|
35397
35748
|
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
@@ -35402,11 +35753,11 @@ function optional(wrapped, default_) {
|
|
|
35402
35753
|
}
|
|
35403
35754
|
return this.wrapped["~run"](dataset, config$1);
|
|
35404
35755
|
}
|
|
35405
|
-
};
|
|
35756
|
+
});
|
|
35406
35757
|
}
|
|
35407
35758
|
// @__NO_SIDE_EFFECTS__
|
|
35408
35759
|
function picklist(options, message$1) {
|
|
35409
|
-
return {
|
|
35760
|
+
return _standardSchema({
|
|
35410
35761
|
kind: "schema",
|
|
35411
35762
|
type: "picklist",
|
|
35412
35763
|
reference: picklist,
|
|
@@ -35414,19 +35765,16 @@ function picklist(options, message$1) {
|
|
|
35414
35765
|
async: false,
|
|
35415
35766
|
options,
|
|
35416
35767
|
message: message$1,
|
|
35417
|
-
get "~standard"() {
|
|
35418
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35419
|
-
},
|
|
35420
35768
|
"~run"(dataset, config$1) {
|
|
35421
35769
|
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
35422
35770
|
else _addIssue(this, "type", dataset, config$1);
|
|
35423
35771
|
return dataset;
|
|
35424
35772
|
}
|
|
35425
|
-
};
|
|
35773
|
+
});
|
|
35426
35774
|
}
|
|
35427
35775
|
// @__NO_SIDE_EFFECTS__
|
|
35428
35776
|
function record2(key, value$1, message$1) {
|
|
35429
|
-
return {
|
|
35777
|
+
return _standardSchema({
|
|
35430
35778
|
kind: "schema",
|
|
35431
35779
|
type: "record",
|
|
35432
35780
|
reference: record2,
|
|
@@ -35435,9 +35783,6 @@ function record2(key, value$1, message$1) {
|
|
|
35435
35783
|
key,
|
|
35436
35784
|
value: value$1,
|
|
35437
35785
|
message: message$1,
|
|
35438
|
-
get "~standard"() {
|
|
35439
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35440
|
-
},
|
|
35441
35786
|
"~run"(dataset, config$1) {
|
|
35442
35787
|
const input = dataset.value;
|
|
35443
35788
|
if (input && typeof input === "object") {
|
|
@@ -35490,11 +35835,11 @@ function record2(key, value$1, message$1) {
|
|
|
35490
35835
|
} else _addIssue(this, "type", dataset, config$1);
|
|
35491
35836
|
return dataset;
|
|
35492
35837
|
}
|
|
35493
|
-
};
|
|
35838
|
+
});
|
|
35494
35839
|
}
|
|
35495
35840
|
// @__NO_SIDE_EFFECTS__
|
|
35496
35841
|
function strictObject(entries$1, message$1) {
|
|
35497
|
-
return {
|
|
35842
|
+
return _standardSchema({
|
|
35498
35843
|
kind: "schema",
|
|
35499
35844
|
type: "strict_object",
|
|
35500
35845
|
reference: strictObject,
|
|
@@ -35502,9 +35847,6 @@ function strictObject(entries$1, message$1) {
|
|
|
35502
35847
|
async: false,
|
|
35503
35848
|
entries: entries$1,
|
|
35504
35849
|
message: message$1,
|
|
35505
|
-
get "~standard"() {
|
|
35506
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35507
|
-
},
|
|
35508
35850
|
"~run"(dataset, config$1) {
|
|
35509
35851
|
const input = dataset.value;
|
|
35510
35852
|
if (input && typeof input === "object") {
|
|
@@ -35553,7 +35895,7 @@ function strictObject(entries$1, message$1) {
|
|
|
35553
35895
|
}
|
|
35554
35896
|
}
|
|
35555
35897
|
if (!dataset.issues || !config$1.abortEarly) {
|
|
35556
|
-
for (const key in input) if (!(
|
|
35898
|
+
for (const key in input) if (!Object.prototype.hasOwnProperty.call(this.entries, key)) {
|
|
35557
35899
|
_addIssue(this, "key", dataset, config$1, {
|
|
35558
35900
|
input: key,
|
|
35559
35901
|
expected: "never",
|
|
@@ -35571,26 +35913,23 @@ function strictObject(entries$1, message$1) {
|
|
|
35571
35913
|
} else _addIssue(this, "type", dataset, config$1);
|
|
35572
35914
|
return dataset;
|
|
35573
35915
|
}
|
|
35574
|
-
};
|
|
35916
|
+
});
|
|
35575
35917
|
}
|
|
35576
35918
|
// @__NO_SIDE_EFFECTS__
|
|
35577
35919
|
function string2(message$1) {
|
|
35578
|
-
return {
|
|
35920
|
+
return _standardSchema({
|
|
35579
35921
|
kind: "schema",
|
|
35580
35922
|
type: "string",
|
|
35581
35923
|
reference: string2,
|
|
35582
35924
|
expects: "string",
|
|
35583
35925
|
async: false,
|
|
35584
35926
|
message: message$1,
|
|
35585
|
-
get "~standard"() {
|
|
35586
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35587
|
-
},
|
|
35588
35927
|
"~run"(dataset, config$1) {
|
|
35589
35928
|
if (typeof dataset.value === "string") dataset.typed = true;
|
|
35590
35929
|
else _addIssue(this, "type", dataset, config$1);
|
|
35591
35930
|
return dataset;
|
|
35592
35931
|
}
|
|
35593
|
-
};
|
|
35932
|
+
});
|
|
35594
35933
|
}
|
|
35595
35934
|
// @__NO_SIDE_EFFECTS__
|
|
35596
35935
|
function _subIssues(datasets) {
|
|
@@ -35601,7 +35940,7 @@ function _subIssues(datasets) {
|
|
|
35601
35940
|
}
|
|
35602
35941
|
// @__NO_SIDE_EFFECTS__
|
|
35603
35942
|
function union(options, message$1) {
|
|
35604
|
-
return {
|
|
35943
|
+
return _standardSchema({
|
|
35605
35944
|
kind: "schema",
|
|
35606
35945
|
type: "union",
|
|
35607
35946
|
reference: union,
|
|
@@ -35609,9 +35948,6 @@ function union(options, message$1) {
|
|
|
35609
35948
|
async: false,
|
|
35610
35949
|
options,
|
|
35611
35950
|
message: message$1,
|
|
35612
|
-
get "~standard"() {
|
|
35613
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35614
|
-
},
|
|
35615
35951
|
"~run"(dataset, config$1) {
|
|
35616
35952
|
let validDataset;
|
|
35617
35953
|
let typedDatasets;
|
|
@@ -35636,11 +35972,11 @@ function union(options, message$1) {
|
|
|
35636
35972
|
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
35637
35973
|
return dataset;
|
|
35638
35974
|
}
|
|
35639
|
-
};
|
|
35975
|
+
});
|
|
35640
35976
|
}
|
|
35641
35977
|
// @__NO_SIDE_EFFECTS__
|
|
35642
35978
|
function variant(key, options, message$1) {
|
|
35643
|
-
return {
|
|
35979
|
+
return _standardSchema({
|
|
35644
35980
|
kind: "schema",
|
|
35645
35981
|
type: "variant",
|
|
35646
35982
|
reference: variant,
|
|
@@ -35649,9 +35985,6 @@ function variant(key, options, message$1) {
|
|
|
35649
35985
|
key,
|
|
35650
35986
|
options,
|
|
35651
35987
|
message: message$1,
|
|
35652
|
-
get "~standard"() {
|
|
35653
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35654
|
-
},
|
|
35655
35988
|
"~run"(dataset, config$1) {
|
|
35656
35989
|
const input = dataset.value;
|
|
35657
35990
|
if (input && typeof input === "object") {
|
|
@@ -35706,7 +36039,7 @@ function variant(key, options, message$1) {
|
|
|
35706
36039
|
} else _addIssue(this, "type", dataset, config$1);
|
|
35707
36040
|
return dataset;
|
|
35708
36041
|
}
|
|
35709
|
-
};
|
|
36042
|
+
});
|
|
35710
36043
|
}
|
|
35711
36044
|
function parse(schema, input, config$1) {
|
|
35712
36045
|
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
@@ -35715,12 +36048,9 @@ function parse(schema, input, config$1) {
|
|
|
35715
36048
|
}
|
|
35716
36049
|
// @__NO_SIDE_EFFECTS__
|
|
35717
36050
|
function pipe(...pipe$1) {
|
|
35718
|
-
return {
|
|
36051
|
+
return _standardSchema({
|
|
35719
36052
|
...pipe$1[0],
|
|
35720
36053
|
pipe: pipe$1,
|
|
35721
|
-
get "~standard"() {
|
|
35722
|
-
return /* @__PURE__ */ _getStandardProps(this);
|
|
35723
|
-
},
|
|
35724
36054
|
"~run"(dataset, config$1) {
|
|
35725
36055
|
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
35726
36056
|
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
@@ -35731,7 +36061,7 @@ function pipe(...pipe$1) {
|
|
|
35731
36061
|
}
|
|
35732
36062
|
return dataset;
|
|
35733
36063
|
}
|
|
35734
|
-
};
|
|
36064
|
+
});
|
|
35735
36065
|
}
|
|
35736
36066
|
// @__NO_SIDE_EFFECTS__
|
|
35737
36067
|
function safeParse(schema, input, config$1) {
|
|
@@ -35743,7 +36073,7 @@ function safeParse(schema, input, config$1) {
|
|
|
35743
36073
|
issues: dataset.issues
|
|
35744
36074
|
};
|
|
35745
36075
|
}
|
|
35746
|
-
var store$4, DEFAULT_CONFIG, store$3, store$2, store$1,
|
|
36076
|
+
var store$4, DEFAULT_CONFIG, store$3, store$2, store$1, ValiError, EMOJI_REGEX, ABORT_EARLY_CONFIG;
|
|
35747
36077
|
var init_dist = __esm({
|
|
35748
36078
|
"node_modules/valibot/dist/index.mjs"() {
|
|
35749
36079
|
DEFAULT_CONFIG = {
|
|
@@ -35752,7 +36082,6 @@ var init_dist = __esm({
|
|
|
35752
36082
|
abortEarly: void 0,
|
|
35753
36083
|
abortPipeEarly: void 0
|
|
35754
36084
|
};
|
|
35755
|
-
_standardCache = /* @__PURE__ */ new WeakMap();
|
|
35756
36085
|
ValiError = class extends Error {
|
|
35757
36086
|
/**
|
|
35758
36087
|
* Creates a Valibot error with useful information.
|
|
@@ -182152,7 +182481,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
182152
182481
|
async function main() {
|
|
182153
182482
|
const args = parseArgs(process.argv.slice(2));
|
|
182154
182483
|
if (args.command === "--version") {
|
|
182155
|
-
console.log("0.70.
|
|
182484
|
+
console.log("0.70.5");
|
|
182156
182485
|
return;
|
|
182157
182486
|
}
|
|
182158
182487
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|