@prisma/cli-init 0.0.0-dev.202512152131 → 0.0.0-dev.202512161536
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.
|
@@ -669,8 +669,8 @@ import { setTimeout } from "timers/promises";
|
|
|
669
669
|
// ../../common/stuff/with-resolvers.ts
|
|
670
670
|
function withResolvers(options) {
|
|
671
671
|
let succeed, fail;
|
|
672
|
-
const promise = new Promise((
|
|
673
|
-
succeed =
|
|
672
|
+
const promise = new Promise((resolve2, reject) => {
|
|
673
|
+
succeed = resolve2;
|
|
674
674
|
fail = reject;
|
|
675
675
|
});
|
|
676
676
|
let failOnce = (reason) => {
|
|
@@ -829,6 +829,483 @@ function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
|
829
829
|
return linux(name);
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
+
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/utils.js
|
|
833
|
+
var isArray = (value) => {
|
|
834
|
+
return Array.isArray(value);
|
|
835
|
+
};
|
|
836
|
+
var isFunction = (value) => {
|
|
837
|
+
return typeof value === "function";
|
|
838
|
+
};
|
|
839
|
+
var isFunctionNullary = (value) => {
|
|
840
|
+
return value.length === 0;
|
|
841
|
+
};
|
|
842
|
+
var isFunctionStrictlyNullaryOrUnary = (() => {
|
|
843
|
+
const { toString } = Function.prototype;
|
|
844
|
+
const re = /(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;
|
|
845
|
+
return (value) => {
|
|
846
|
+
return (value.length === 0 || value.length === 1) && re.test(toString.call(value));
|
|
847
|
+
};
|
|
848
|
+
})();
|
|
849
|
+
var isNumber = (value) => {
|
|
850
|
+
return typeof value === "number";
|
|
851
|
+
};
|
|
852
|
+
var isObject = (value) => {
|
|
853
|
+
return typeof value === "object" && value !== null;
|
|
854
|
+
};
|
|
855
|
+
var isRegExp = (value) => {
|
|
856
|
+
return value instanceof RegExp;
|
|
857
|
+
};
|
|
858
|
+
var isRegExpCapturing = /* @__PURE__ */ (() => {
|
|
859
|
+
const sourceRe = /\\\(|\((?!\?(?::|=|!|<=|<!))/;
|
|
860
|
+
return (re) => {
|
|
861
|
+
return sourceRe.test(re.source);
|
|
862
|
+
};
|
|
863
|
+
})();
|
|
864
|
+
var isRegExpStatic = /* @__PURE__ */ (() => {
|
|
865
|
+
const sourceRe = /^[a-zA-Z0-9_-]+$/;
|
|
866
|
+
return (re) => {
|
|
867
|
+
return sourceRe.test(re.source) && !re.flags.includes("i");
|
|
868
|
+
};
|
|
869
|
+
})();
|
|
870
|
+
var isString = (value) => {
|
|
871
|
+
return typeof value === "string";
|
|
872
|
+
};
|
|
873
|
+
var isUndefined = (value) => {
|
|
874
|
+
return value === void 0;
|
|
875
|
+
};
|
|
876
|
+
var memoize = (fn) => {
|
|
877
|
+
const cache = /* @__PURE__ */ new Map();
|
|
878
|
+
return (arg) => {
|
|
879
|
+
const cached = cache.get(arg);
|
|
880
|
+
if (cached !== void 0)
|
|
881
|
+
return cached;
|
|
882
|
+
const value = fn(arg);
|
|
883
|
+
cache.set(arg, value);
|
|
884
|
+
return value;
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/index.js
|
|
889
|
+
var parse = (input, rule, options = {}) => {
|
|
890
|
+
const state = { cache: {}, input, index: 0, indexBacktrackMax: 0, options, output: [] };
|
|
891
|
+
const matched = resolve(rule)(state);
|
|
892
|
+
const indexMax = Math.max(state.index, state.indexBacktrackMax);
|
|
893
|
+
if (matched && state.index === input.length) {
|
|
894
|
+
return state.output;
|
|
895
|
+
} else {
|
|
896
|
+
throw new Error(`Failed to parse at index ${indexMax}`);
|
|
897
|
+
}
|
|
898
|
+
};
|
|
899
|
+
var match = (target, handler) => {
|
|
900
|
+
if (isArray(target)) {
|
|
901
|
+
return chars(target, handler);
|
|
902
|
+
} else if (isString(target)) {
|
|
903
|
+
return string2(target, handler);
|
|
904
|
+
} else {
|
|
905
|
+
return regex2(target, handler);
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
var chars = (target, handler) => {
|
|
909
|
+
const charCodes = {};
|
|
910
|
+
for (const char of target) {
|
|
911
|
+
if (char.length !== 1)
|
|
912
|
+
throw new Error(`Invalid character: "${char}"`);
|
|
913
|
+
const charCode = char.charCodeAt(0);
|
|
914
|
+
charCodes[charCode] = true;
|
|
915
|
+
}
|
|
916
|
+
return (state) => {
|
|
917
|
+
const input = state.input;
|
|
918
|
+
let indexStart = state.index;
|
|
919
|
+
let indexEnd = indexStart;
|
|
920
|
+
while (indexEnd < input.length) {
|
|
921
|
+
const charCode = input.charCodeAt(indexEnd);
|
|
922
|
+
if (!(charCode in charCodes))
|
|
923
|
+
break;
|
|
924
|
+
indexEnd += 1;
|
|
925
|
+
}
|
|
926
|
+
if (indexEnd > indexStart) {
|
|
927
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
928
|
+
const target2 = input.slice(indexStart, indexEnd);
|
|
929
|
+
const output = isFunction(handler) ? handler(target2, input, `${indexStart}`) : handler;
|
|
930
|
+
if (!isUndefined(output)) {
|
|
931
|
+
state.output.push(output);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
state.index = indexEnd;
|
|
935
|
+
}
|
|
936
|
+
return true;
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
var regex2 = (target, handler) => {
|
|
940
|
+
if (isRegExpStatic(target)) {
|
|
941
|
+
return string2(target.source, handler);
|
|
942
|
+
} else {
|
|
943
|
+
const source = target.source;
|
|
944
|
+
const flags = target.flags.replace(/y|$/, "y");
|
|
945
|
+
const re = new RegExp(source, flags);
|
|
946
|
+
if (isRegExpCapturing(target) && isFunction(handler) && !isFunctionStrictlyNullaryOrUnary(handler)) {
|
|
947
|
+
return regexCapturing(re, handler);
|
|
948
|
+
} else {
|
|
949
|
+
return regexNonCapturing(re, handler);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
var regexCapturing = (re, handler) => {
|
|
954
|
+
return (state) => {
|
|
955
|
+
const indexStart = state.index;
|
|
956
|
+
const input = state.input;
|
|
957
|
+
re.lastIndex = indexStart;
|
|
958
|
+
const match2 = re.exec(input);
|
|
959
|
+
if (match2) {
|
|
960
|
+
const indexEnd = re.lastIndex;
|
|
961
|
+
if (!state.options.silent) {
|
|
962
|
+
const output = handler(...match2, input, `${indexStart}`);
|
|
963
|
+
if (!isUndefined(output)) {
|
|
964
|
+
state.output.push(output);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
state.index = indexEnd;
|
|
968
|
+
return true;
|
|
969
|
+
} else {
|
|
970
|
+
return false;
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
var regexNonCapturing = (re, handler) => {
|
|
975
|
+
return (state) => {
|
|
976
|
+
const indexStart = state.index;
|
|
977
|
+
const input = state.input;
|
|
978
|
+
re.lastIndex = indexStart;
|
|
979
|
+
const matched = re.test(input);
|
|
980
|
+
if (matched) {
|
|
981
|
+
const indexEnd = re.lastIndex;
|
|
982
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
983
|
+
const output = isFunction(handler) ? handler(input.slice(indexStart, indexEnd), input, `${indexStart}`) : handler;
|
|
984
|
+
if (!isUndefined(output)) {
|
|
985
|
+
state.output.push(output);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
state.index = indexEnd;
|
|
989
|
+
return true;
|
|
990
|
+
} else {
|
|
991
|
+
return false;
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
var string2 = (target, handler) => {
|
|
996
|
+
return (state) => {
|
|
997
|
+
const indexStart = state.index;
|
|
998
|
+
const input = state.input;
|
|
999
|
+
const matched = input.startsWith(target, indexStart);
|
|
1000
|
+
if (matched) {
|
|
1001
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
1002
|
+
const output = isFunction(handler) ? handler(target, input, `${indexStart}`) : handler;
|
|
1003
|
+
if (!isUndefined(output)) {
|
|
1004
|
+
state.output.push(output);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
state.index += target.length;
|
|
1008
|
+
return true;
|
|
1009
|
+
} else {
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
var repeat = (rule, min, max, handler) => {
|
|
1015
|
+
const erule = resolve(rule);
|
|
1016
|
+
const isBacktrackable = min > 1;
|
|
1017
|
+
return memoizable(handleable(backtrackable((state) => {
|
|
1018
|
+
let repetitions = 0;
|
|
1019
|
+
while (repetitions < max) {
|
|
1020
|
+
const index = state.index;
|
|
1021
|
+
const matched = erule(state);
|
|
1022
|
+
if (!matched)
|
|
1023
|
+
break;
|
|
1024
|
+
repetitions += 1;
|
|
1025
|
+
if (state.index === index)
|
|
1026
|
+
break;
|
|
1027
|
+
}
|
|
1028
|
+
return repetitions >= min;
|
|
1029
|
+
}, isBacktrackable), handler));
|
|
1030
|
+
};
|
|
1031
|
+
var optional2 = (rule, handler) => {
|
|
1032
|
+
return repeat(rule, 0, 1, handler);
|
|
1033
|
+
};
|
|
1034
|
+
var star = (rule, handler) => {
|
|
1035
|
+
return repeat(rule, 0, Infinity, handler);
|
|
1036
|
+
};
|
|
1037
|
+
var and = (rules, handler) => {
|
|
1038
|
+
const erules = rules.map(resolve);
|
|
1039
|
+
return memoizable(handleable(backtrackable((state) => {
|
|
1040
|
+
for (let i2 = 0, l2 = erules.length; i2 < l2; i2++) {
|
|
1041
|
+
if (!erules[i2](state))
|
|
1042
|
+
return false;
|
|
1043
|
+
}
|
|
1044
|
+
return true;
|
|
1045
|
+
}), handler));
|
|
1046
|
+
};
|
|
1047
|
+
var or = (rules, handler) => {
|
|
1048
|
+
const erules = rules.map(resolve);
|
|
1049
|
+
return memoizable(handleable((state) => {
|
|
1050
|
+
for (let i2 = 0, l2 = erules.length; i2 < l2; i2++) {
|
|
1051
|
+
if (erules[i2](state))
|
|
1052
|
+
return true;
|
|
1053
|
+
}
|
|
1054
|
+
return false;
|
|
1055
|
+
}, handler));
|
|
1056
|
+
};
|
|
1057
|
+
var backtrackable = (rule, enabled = true, force = false) => {
|
|
1058
|
+
const erule = resolve(rule);
|
|
1059
|
+
if (!enabled)
|
|
1060
|
+
return erule;
|
|
1061
|
+
return (state) => {
|
|
1062
|
+
const index = state.index;
|
|
1063
|
+
const length = state.output.length;
|
|
1064
|
+
const matched = erule(state);
|
|
1065
|
+
if (!matched && !force) {
|
|
1066
|
+
state.indexBacktrackMax = Math.max(state.indexBacktrackMax, state.index);
|
|
1067
|
+
}
|
|
1068
|
+
if (!matched || force) {
|
|
1069
|
+
state.index = index;
|
|
1070
|
+
if (state.output.length !== length) {
|
|
1071
|
+
state.output.length = length;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
return matched;
|
|
1075
|
+
};
|
|
1076
|
+
};
|
|
1077
|
+
var handleable = (rule, handler) => {
|
|
1078
|
+
const erule = resolve(rule);
|
|
1079
|
+
if (!handler)
|
|
1080
|
+
return erule;
|
|
1081
|
+
return (state) => {
|
|
1082
|
+
if (state.options.silent)
|
|
1083
|
+
return erule(state);
|
|
1084
|
+
const length = state.output.length;
|
|
1085
|
+
const matched = erule(state);
|
|
1086
|
+
if (matched) {
|
|
1087
|
+
const outputs = state.output.splice(length, Infinity);
|
|
1088
|
+
const output = handler(outputs);
|
|
1089
|
+
if (!isUndefined(output)) {
|
|
1090
|
+
state.output.push(output);
|
|
1091
|
+
}
|
|
1092
|
+
return true;
|
|
1093
|
+
} else {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
var memoizable = /* @__PURE__ */ (() => {
|
|
1099
|
+
let RULE_ID = 0;
|
|
1100
|
+
return (rule) => {
|
|
1101
|
+
const erule = resolve(rule);
|
|
1102
|
+
const ruleId = RULE_ID += 1;
|
|
1103
|
+
return (state) => {
|
|
1104
|
+
var _a;
|
|
1105
|
+
if (state.options.memoization === false)
|
|
1106
|
+
return erule(state);
|
|
1107
|
+
const indexStart = state.index;
|
|
1108
|
+
const cache = (_a = state.cache)[ruleId] || (_a[ruleId] = { indexMax: -1, queue: [] });
|
|
1109
|
+
const cacheQueue = cache.queue;
|
|
1110
|
+
const isPotentiallyCached = indexStart <= cache.indexMax;
|
|
1111
|
+
if (isPotentiallyCached) {
|
|
1112
|
+
const cacheStore = cache.store || (cache.store = /* @__PURE__ */ new Map());
|
|
1113
|
+
if (cacheQueue.length) {
|
|
1114
|
+
for (let i2 = 0, l2 = cacheQueue.length; i2 < l2; i2 += 2) {
|
|
1115
|
+
const key = cacheQueue[i2 * 2];
|
|
1116
|
+
const value = cacheQueue[i2 * 2 + 1];
|
|
1117
|
+
cacheStore.set(key, value);
|
|
1118
|
+
}
|
|
1119
|
+
cacheQueue.length = 0;
|
|
1120
|
+
}
|
|
1121
|
+
const cached = cacheStore.get(indexStart);
|
|
1122
|
+
if (cached === false) {
|
|
1123
|
+
return false;
|
|
1124
|
+
} else if (isNumber(cached)) {
|
|
1125
|
+
state.index = cached;
|
|
1126
|
+
return true;
|
|
1127
|
+
} else if (cached) {
|
|
1128
|
+
state.index = cached.index;
|
|
1129
|
+
if (cached.output?.length) {
|
|
1130
|
+
state.output.push(...cached.output);
|
|
1131
|
+
}
|
|
1132
|
+
return true;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
const lengthStart = state.output.length;
|
|
1136
|
+
const matched = erule(state);
|
|
1137
|
+
cache.indexMax = Math.max(cache.indexMax, indexStart);
|
|
1138
|
+
if (matched) {
|
|
1139
|
+
const indexEnd = state.index;
|
|
1140
|
+
const lengthEnd = state.output.length;
|
|
1141
|
+
if (lengthEnd > lengthStart) {
|
|
1142
|
+
const output = state.output.slice(lengthStart, lengthEnd);
|
|
1143
|
+
cacheQueue.push(indexStart, { index: indexEnd, output });
|
|
1144
|
+
} else {
|
|
1145
|
+
cacheQueue.push(indexStart, indexEnd);
|
|
1146
|
+
}
|
|
1147
|
+
return true;
|
|
1148
|
+
} else {
|
|
1149
|
+
cacheQueue.push(indexStart, false);
|
|
1150
|
+
return false;
|
|
1151
|
+
}
|
|
1152
|
+
};
|
|
1153
|
+
};
|
|
1154
|
+
})();
|
|
1155
|
+
var lazy = (getter) => {
|
|
1156
|
+
let erule;
|
|
1157
|
+
return (state) => {
|
|
1158
|
+
erule || (erule = resolve(getter()));
|
|
1159
|
+
return erule(state);
|
|
1160
|
+
};
|
|
1161
|
+
};
|
|
1162
|
+
var resolve = memoize((rule) => {
|
|
1163
|
+
if (isFunction(rule)) {
|
|
1164
|
+
if (isFunctionNullary(rule)) {
|
|
1165
|
+
return lazy(rule);
|
|
1166
|
+
} else {
|
|
1167
|
+
return rule;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
if (isString(rule) || isRegExp(rule)) {
|
|
1171
|
+
return match(rule);
|
|
1172
|
+
}
|
|
1173
|
+
if (isArray(rule)) {
|
|
1174
|
+
return and(rule);
|
|
1175
|
+
}
|
|
1176
|
+
if (isObject(rule)) {
|
|
1177
|
+
return or(Object.values(rule));
|
|
1178
|
+
}
|
|
1179
|
+
throw new Error("Invalid rule");
|
|
1180
|
+
});
|
|
1181
|
+
|
|
1182
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/utils.js
|
|
1183
|
+
var identity = (value) => {
|
|
1184
|
+
return value;
|
|
1185
|
+
};
|
|
1186
|
+
var makeParser = (grammar) => {
|
|
1187
|
+
return (input) => {
|
|
1188
|
+
return parse(input, grammar, { memoization: false }).join("");
|
|
1189
|
+
};
|
|
1190
|
+
};
|
|
1191
|
+
var memoize2 = (fn) => {
|
|
1192
|
+
const cache = {};
|
|
1193
|
+
return (arg) => {
|
|
1194
|
+
return cache[arg] ?? (cache[arg] = fn(arg));
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/range.js
|
|
1199
|
+
var ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
1200
|
+
var int2alpha = (int) => {
|
|
1201
|
+
let alpha = "";
|
|
1202
|
+
while (int > 0) {
|
|
1203
|
+
const reminder = (int - 1) % 26;
|
|
1204
|
+
alpha = ALPHABET[reminder] + alpha;
|
|
1205
|
+
int = Math.floor((int - 1) / 26);
|
|
1206
|
+
}
|
|
1207
|
+
return alpha;
|
|
1208
|
+
};
|
|
1209
|
+
var alpha2int = (str) => {
|
|
1210
|
+
let int = 0;
|
|
1211
|
+
for (let i2 = 0, l2 = str.length; i2 < l2; i2++) {
|
|
1212
|
+
int = int * 26 + ALPHABET.indexOf(str[i2]) + 1;
|
|
1213
|
+
}
|
|
1214
|
+
return int;
|
|
1215
|
+
};
|
|
1216
|
+
var makeRangeInt = (start, end) => {
|
|
1217
|
+
if (end < start)
|
|
1218
|
+
return makeRangeInt(end, start);
|
|
1219
|
+
const range = [];
|
|
1220
|
+
while (start <= end) {
|
|
1221
|
+
range.push(start++);
|
|
1222
|
+
}
|
|
1223
|
+
return range;
|
|
1224
|
+
};
|
|
1225
|
+
var makeRangePaddedInt = (start, end, paddingLength) => {
|
|
1226
|
+
return makeRangeInt(start, end).map((int) => String(int).padStart(paddingLength, "0"));
|
|
1227
|
+
};
|
|
1228
|
+
var makeRangeAlpha = (start, end) => {
|
|
1229
|
+
return makeRangeInt(alpha2int(start), alpha2int(end)).map(int2alpha);
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1232
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/grammar.js
|
|
1233
|
+
var Escaped = match(/\\./, identity);
|
|
1234
|
+
var Escape = match(/[$.*+?^(){}[\]\|]/, (char) => `\\${char}`);
|
|
1235
|
+
var Slash = match(/[\\/]/, "[\\\\/]");
|
|
1236
|
+
var Passthrough = match(/./, identity);
|
|
1237
|
+
var NegationOdd = match(/^(?:!!)*!(.*)$/, (_2, glob) => `(?!^${parser_default(glob)}$).*?`);
|
|
1238
|
+
var NegationEven = match(/^(!!)+/, "");
|
|
1239
|
+
var Negation = or([NegationOdd, NegationEven]);
|
|
1240
|
+
var StarStarBetween = match(/\/(\*\*\/)+/, "(?:[\\\\/].+[\\\\/]|[\\\\/])");
|
|
1241
|
+
var StarStarStart = match(/^(\*\*\/)+/, "(?:^|.*[\\\\/])");
|
|
1242
|
+
var StarStarEnd = match(/\/(\*\*)$/, "(?:[\\\\/].*|$)");
|
|
1243
|
+
var StarStarNone = match(/\*\*/, ".*");
|
|
1244
|
+
var StarStar = or([StarStarBetween, StarStarStart, StarStarEnd, StarStarNone]);
|
|
1245
|
+
var StarDouble = match(/\*\/(?!\*\*\/|\*$)/, "[^\\\\/]*[\\\\/]");
|
|
1246
|
+
var StarSingle = match(/\*/, "[^\\\\/]*");
|
|
1247
|
+
var Star = or([StarDouble, StarSingle]);
|
|
1248
|
+
var Question = match("?", "[^\\\\/]");
|
|
1249
|
+
var ClassOpen = match("[", identity);
|
|
1250
|
+
var ClassClose = match("]", identity);
|
|
1251
|
+
var ClassNegation = match(/[!^]/, "^\\\\/");
|
|
1252
|
+
var ClassRange = match(/[a-z]-[a-z]|[0-9]-[0-9]/i, identity);
|
|
1253
|
+
var ClassEscape = match(/[$.*+?^(){}[\|]/, (char) => `\\${char}`);
|
|
1254
|
+
var ClassPassthrough = match(/[^\]]/, identity);
|
|
1255
|
+
var ClassValue = or([Escaped, ClassEscape, ClassRange, ClassPassthrough]);
|
|
1256
|
+
var Class = and([ClassOpen, optional2(ClassNegation), star(ClassValue), ClassClose]);
|
|
1257
|
+
var RangeOpen = match("{", "(?:");
|
|
1258
|
+
var RangeClose = match("}", ")");
|
|
1259
|
+
var RangeNumeric = match(/(\d+)\.\.(\d+)/, (_2, $1, $2) => makeRangePaddedInt(+$1, +$2, Math.min($1.length, $2.length)).join("|"));
|
|
1260
|
+
var RangeAlphaLower = match(/([a-z]+)\.\.([a-z]+)/, (_2, $1, $2) => makeRangeAlpha($1, $2).join("|"));
|
|
1261
|
+
var RangeAlphaUpper = match(/([A-Z]+)\.\.([A-Z]+)/, (_2, $1, $2) => makeRangeAlpha($1.toLowerCase(), $2.toLowerCase()).join("|").toUpperCase());
|
|
1262
|
+
var RangeValue = or([RangeNumeric, RangeAlphaLower, RangeAlphaUpper]);
|
|
1263
|
+
var Range = and([RangeOpen, RangeValue, RangeClose]);
|
|
1264
|
+
var BracesOpen = match("{", "(?:");
|
|
1265
|
+
var BracesClose = match("}", ")");
|
|
1266
|
+
var BracesComma = match(",", "|");
|
|
1267
|
+
var BracesEscape = match(/[$.*+?^(){[\]\|]/, (char) => `\\${char}`);
|
|
1268
|
+
var BracesPassthrough = match(/[^}]/, identity);
|
|
1269
|
+
var BracesNested = lazy(() => Braces);
|
|
1270
|
+
var BracesValue = or([StarStar, Star, Question, Class, Range, BracesNested, Escaped, BracesEscape, BracesComma, BracesPassthrough]);
|
|
1271
|
+
var Braces = and([BracesOpen, star(BracesValue), BracesClose]);
|
|
1272
|
+
var Grammar = star(or([Negation, StarStar, Star, Question, Class, Range, Braces, Escaped, Escape, Slash, Passthrough]));
|
|
1273
|
+
var grammar_default = Grammar;
|
|
1274
|
+
|
|
1275
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/parser.js
|
|
1276
|
+
var parser = makeParser(grammar_default);
|
|
1277
|
+
var parser_default = parser;
|
|
1278
|
+
|
|
1279
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/grammar.js
|
|
1280
|
+
var Escaped2 = match(/\\./, identity);
|
|
1281
|
+
var Passthrough2 = match(/./, identity);
|
|
1282
|
+
var StarStarStar = match(/\*\*\*+/, "*");
|
|
1283
|
+
var StarStarNoLeft = match(/([^/{[(!])\*\*/, (_2, $1) => `${$1}*`);
|
|
1284
|
+
var StarStarNoRight = match(/(^|.)\*\*(?=[^*/)\]}])/, (_2, $1) => `${$1}*`);
|
|
1285
|
+
var Grammar2 = star(or([Escaped2, StarStarStar, StarStarNoLeft, StarStarNoRight, Passthrough2]));
|
|
1286
|
+
var grammar_default2 = Grammar2;
|
|
1287
|
+
|
|
1288
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/parser.js
|
|
1289
|
+
var parser2 = makeParser(grammar_default2);
|
|
1290
|
+
var parser_default2 = parser2;
|
|
1291
|
+
|
|
1292
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/index.js
|
|
1293
|
+
var zeptomatch = (glob, path2) => {
|
|
1294
|
+
if (Array.isArray(glob)) {
|
|
1295
|
+
const res = glob.map(zeptomatch.compile);
|
|
1296
|
+
const isMatch = res.some((re) => re.test(path2));
|
|
1297
|
+
return isMatch;
|
|
1298
|
+
} else {
|
|
1299
|
+
const re = zeptomatch.compile(glob);
|
|
1300
|
+
const isMatch = re.test(path2);
|
|
1301
|
+
return isMatch;
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
zeptomatch.compile = memoize2((glob) => {
|
|
1305
|
+
return new RegExp(`^${parser_default(parser_default2(glob))}[\\\\/]?$`, "s");
|
|
1306
|
+
});
|
|
1307
|
+
var dist_default = zeptomatch;
|
|
1308
|
+
|
|
832
1309
|
// ../../dev/server/src/filesystem.ts
|
|
833
1310
|
var GLOBAL_DIR_ROOT_PATH = envPaths("prisma-dev");
|
|
834
1311
|
var unzipAsync = promisify(unzip);
|
|
@@ -876,9 +1353,8 @@ async function ensureDirectory(path2) {
|
|
|
876
1353
|
async function readDirectoryNames(path2, globs) {
|
|
877
1354
|
try {
|
|
878
1355
|
const dirents = await readdir(path2, { withFileTypes: true });
|
|
879
|
-
const { default: matchGlobs } = await import("./dist-QBUVHVJ2.js");
|
|
880
1356
|
return dirents.reduce((names, dirent) => {
|
|
881
|
-
if (dirent.isDirectory() && !dirent.name.startsWith(".") && (!globs ||
|
|
1357
|
+
if (dirent.isDirectory() && !dirent.name.startsWith(".") && (!globs || dist_default(globs, dirent.name))) {
|
|
882
1358
|
names.push(dirent.name);
|
|
883
1359
|
}
|
|
884
1360
|
return names;
|
|
@@ -978,7 +1454,7 @@ var Engine = class _Engine {
|
|
|
978
1454
|
if (this.#session != null) {
|
|
979
1455
|
return await this.#session;
|
|
980
1456
|
}
|
|
981
|
-
const { promise: session, reject, resolve } = withResolvers();
|
|
1457
|
+
const { promise: session, reject, resolve: resolve2 } = withResolvers();
|
|
982
1458
|
this.#session = session;
|
|
983
1459
|
const engineBinaryPath = PRISMA_DEV_FORCE_ENGINE_BINARY_PATH || await this.#getEngineBinaryPath();
|
|
984
1460
|
if (this.#options.debug) {
|
|
@@ -1022,7 +1498,7 @@ Received data: ${data}`
|
|
|
1022
1498
|
)
|
|
1023
1499
|
);
|
|
1024
1500
|
}
|
|
1025
|
-
|
|
1501
|
+
resolve2({ childProcess, url: `http://${ip}:${port}` });
|
|
1026
1502
|
};
|
|
1027
1503
|
const errorListener = (error) => {
|
|
1028
1504
|
this.#session = null;
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
url,
|
|
22
22
|
withResolvers,
|
|
23
23
|
y
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YTWW6A72.js";
|
|
25
25
|
import {
|
|
26
26
|
__commonJS,
|
|
27
27
|
__require,
|
|
@@ -2638,7 +2638,7 @@ async function getApp(port, dbServer, serverState) {
|
|
|
2638
2638
|
const { debug: debug3 } = serverState;
|
|
2639
2639
|
const [{ Hono }, { accelerateRoute }, { utilityRoute }] = await Promise.all([
|
|
2640
2640
|
import("hono/tiny"),
|
|
2641
|
-
import("./accelerate-
|
|
2641
|
+
import("./accelerate-7HJZB2GE.js"),
|
|
2642
2642
|
import("./utility-QJR3G2JJ.js")
|
|
2643
2643
|
]);
|
|
2644
2644
|
const app = new Hono();
|
|
@@ -2818,6 +2818,31 @@ var StatelessServerState = class extends ServerState {
|
|
|
2818
2818
|
return "memory://";
|
|
2819
2819
|
}
|
|
2820
2820
|
async [PRIVATE_INITIALIZE_SYMBOL]() {
|
|
2821
|
+
let servers;
|
|
2822
|
+
try {
|
|
2823
|
+
servers = await ServerState.scan({ debug: this.debug, onlyMetadata: true });
|
|
2824
|
+
} catch (error) {
|
|
2825
|
+
if (this.debug) {
|
|
2826
|
+
console.warn(
|
|
2827
|
+
`[State] failed to scan for existing servers, assuming filesystem does not exist or other reasons.`,
|
|
2828
|
+
error
|
|
2829
|
+
);
|
|
2830
|
+
}
|
|
2831
|
+
servers = [];
|
|
2832
|
+
}
|
|
2833
|
+
const ports = await pickPorts({
|
|
2834
|
+
debug: this.debug,
|
|
2835
|
+
name: this.name,
|
|
2836
|
+
requestedPorts: {
|
|
2837
|
+
databasePort: this.databasePort,
|
|
2838
|
+
port: this.port,
|
|
2839
|
+
shadowDatabasePort: this.shadowDatabasePort
|
|
2840
|
+
},
|
|
2841
|
+
servers
|
|
2842
|
+
});
|
|
2843
|
+
this._databasePort = ports.databasePort;
|
|
2844
|
+
this._port = ports.port;
|
|
2845
|
+
this._shadowDatabasePort = ports.shadowDatabasePort;
|
|
2821
2846
|
}
|
|
2822
2847
|
async close() {
|
|
2823
2848
|
}
|
package/package.json
CHANGED
package/dist/dist-QBUVHVJ2.js
DELETED
|
@@ -1,482 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import "./chunk-NJX2BODH.js";
|
|
3
|
-
|
|
4
|
-
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/utils.js
|
|
5
|
-
var isArray = (value) => {
|
|
6
|
-
return Array.isArray(value);
|
|
7
|
-
};
|
|
8
|
-
var isFunction = (value) => {
|
|
9
|
-
return typeof value === "function";
|
|
10
|
-
};
|
|
11
|
-
var isFunctionNullary = (value) => {
|
|
12
|
-
return value.length === 0;
|
|
13
|
-
};
|
|
14
|
-
var isFunctionStrictlyNullaryOrUnary = (() => {
|
|
15
|
-
const { toString } = Function.prototype;
|
|
16
|
-
const re = /(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;
|
|
17
|
-
return (value) => {
|
|
18
|
-
return (value.length === 0 || value.length === 1) && re.test(toString.call(value));
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
var isNumber = (value) => {
|
|
22
|
-
return typeof value === "number";
|
|
23
|
-
};
|
|
24
|
-
var isObject = (value) => {
|
|
25
|
-
return typeof value === "object" && value !== null;
|
|
26
|
-
};
|
|
27
|
-
var isRegExp = (value) => {
|
|
28
|
-
return value instanceof RegExp;
|
|
29
|
-
};
|
|
30
|
-
var isRegExpCapturing = /* @__PURE__ */ (() => {
|
|
31
|
-
const sourceRe = /\\\(|\((?!\?(?::|=|!|<=|<!))/;
|
|
32
|
-
return (re) => {
|
|
33
|
-
return sourceRe.test(re.source);
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var isRegExpStatic = /* @__PURE__ */ (() => {
|
|
37
|
-
const sourceRe = /^[a-zA-Z0-9_-]+$/;
|
|
38
|
-
return (re) => {
|
|
39
|
-
return sourceRe.test(re.source) && !re.flags.includes("i");
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
var isString = (value) => {
|
|
43
|
-
return typeof value === "string";
|
|
44
|
-
};
|
|
45
|
-
var isUndefined = (value) => {
|
|
46
|
-
return value === void 0;
|
|
47
|
-
};
|
|
48
|
-
var memoize = (fn) => {
|
|
49
|
-
const cache = /* @__PURE__ */ new Map();
|
|
50
|
-
return (arg) => {
|
|
51
|
-
const cached = cache.get(arg);
|
|
52
|
-
if (cached !== void 0)
|
|
53
|
-
return cached;
|
|
54
|
-
const value = fn(arg);
|
|
55
|
-
cache.set(arg, value);
|
|
56
|
-
return value;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/index.js
|
|
61
|
-
var parse = (input, rule, options = {}) => {
|
|
62
|
-
const state = { cache: {}, input, index: 0, indexBacktrackMax: 0, options, output: [] };
|
|
63
|
-
const matched = resolve(rule)(state);
|
|
64
|
-
const indexMax = Math.max(state.index, state.indexBacktrackMax);
|
|
65
|
-
if (matched && state.index === input.length) {
|
|
66
|
-
return state.output;
|
|
67
|
-
} else {
|
|
68
|
-
throw new Error(`Failed to parse at index ${indexMax}`);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var match = (target, handler) => {
|
|
72
|
-
if (isArray(target)) {
|
|
73
|
-
return chars(target, handler);
|
|
74
|
-
} else if (isString(target)) {
|
|
75
|
-
return string(target, handler);
|
|
76
|
-
} else {
|
|
77
|
-
return regex(target, handler);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
var chars = (target, handler) => {
|
|
81
|
-
const charCodes = {};
|
|
82
|
-
for (const char of target) {
|
|
83
|
-
if (char.length !== 1)
|
|
84
|
-
throw new Error(`Invalid character: "${char}"`);
|
|
85
|
-
const charCode = char.charCodeAt(0);
|
|
86
|
-
charCodes[charCode] = true;
|
|
87
|
-
}
|
|
88
|
-
return (state) => {
|
|
89
|
-
const input = state.input;
|
|
90
|
-
let indexStart = state.index;
|
|
91
|
-
let indexEnd = indexStart;
|
|
92
|
-
while (indexEnd < input.length) {
|
|
93
|
-
const charCode = input.charCodeAt(indexEnd);
|
|
94
|
-
if (!(charCode in charCodes))
|
|
95
|
-
break;
|
|
96
|
-
indexEnd += 1;
|
|
97
|
-
}
|
|
98
|
-
if (indexEnd > indexStart) {
|
|
99
|
-
if (!isUndefined(handler) && !state.options.silent) {
|
|
100
|
-
const target2 = input.slice(indexStart, indexEnd);
|
|
101
|
-
const output = isFunction(handler) ? handler(target2, input, `${indexStart}`) : handler;
|
|
102
|
-
if (!isUndefined(output)) {
|
|
103
|
-
state.output.push(output);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
state.index = indexEnd;
|
|
107
|
-
}
|
|
108
|
-
return true;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
var regex = (target, handler) => {
|
|
112
|
-
if (isRegExpStatic(target)) {
|
|
113
|
-
return string(target.source, handler);
|
|
114
|
-
} else {
|
|
115
|
-
const source = target.source;
|
|
116
|
-
const flags = target.flags.replace(/y|$/, "y");
|
|
117
|
-
const re = new RegExp(source, flags);
|
|
118
|
-
if (isRegExpCapturing(target) && isFunction(handler) && !isFunctionStrictlyNullaryOrUnary(handler)) {
|
|
119
|
-
return regexCapturing(re, handler);
|
|
120
|
-
} else {
|
|
121
|
-
return regexNonCapturing(re, handler);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
var regexCapturing = (re, handler) => {
|
|
126
|
-
return (state) => {
|
|
127
|
-
const indexStart = state.index;
|
|
128
|
-
const input = state.input;
|
|
129
|
-
re.lastIndex = indexStart;
|
|
130
|
-
const match2 = re.exec(input);
|
|
131
|
-
if (match2) {
|
|
132
|
-
const indexEnd = re.lastIndex;
|
|
133
|
-
if (!state.options.silent) {
|
|
134
|
-
const output = handler(...match2, input, `${indexStart}`);
|
|
135
|
-
if (!isUndefined(output)) {
|
|
136
|
-
state.output.push(output);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
state.index = indexEnd;
|
|
140
|
-
return true;
|
|
141
|
-
} else {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
var regexNonCapturing = (re, handler) => {
|
|
147
|
-
return (state) => {
|
|
148
|
-
const indexStart = state.index;
|
|
149
|
-
const input = state.input;
|
|
150
|
-
re.lastIndex = indexStart;
|
|
151
|
-
const matched = re.test(input);
|
|
152
|
-
if (matched) {
|
|
153
|
-
const indexEnd = re.lastIndex;
|
|
154
|
-
if (!isUndefined(handler) && !state.options.silent) {
|
|
155
|
-
const output = isFunction(handler) ? handler(input.slice(indexStart, indexEnd), input, `${indexStart}`) : handler;
|
|
156
|
-
if (!isUndefined(output)) {
|
|
157
|
-
state.output.push(output);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
state.index = indexEnd;
|
|
161
|
-
return true;
|
|
162
|
-
} else {
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
var string = (target, handler) => {
|
|
168
|
-
return (state) => {
|
|
169
|
-
const indexStart = state.index;
|
|
170
|
-
const input = state.input;
|
|
171
|
-
const matched = input.startsWith(target, indexStart);
|
|
172
|
-
if (matched) {
|
|
173
|
-
if (!isUndefined(handler) && !state.options.silent) {
|
|
174
|
-
const output = isFunction(handler) ? handler(target, input, `${indexStart}`) : handler;
|
|
175
|
-
if (!isUndefined(output)) {
|
|
176
|
-
state.output.push(output);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
state.index += target.length;
|
|
180
|
-
return true;
|
|
181
|
-
} else {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
var repeat = (rule, min, max, handler) => {
|
|
187
|
-
const erule = resolve(rule);
|
|
188
|
-
const isBacktrackable = min > 1;
|
|
189
|
-
return memoizable(handleable(backtrackable((state) => {
|
|
190
|
-
let repetitions = 0;
|
|
191
|
-
while (repetitions < max) {
|
|
192
|
-
const index = state.index;
|
|
193
|
-
const matched = erule(state);
|
|
194
|
-
if (!matched)
|
|
195
|
-
break;
|
|
196
|
-
repetitions += 1;
|
|
197
|
-
if (state.index === index)
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
return repetitions >= min;
|
|
201
|
-
}, isBacktrackable), handler));
|
|
202
|
-
};
|
|
203
|
-
var optional = (rule, handler) => {
|
|
204
|
-
return repeat(rule, 0, 1, handler);
|
|
205
|
-
};
|
|
206
|
-
var star = (rule, handler) => {
|
|
207
|
-
return repeat(rule, 0, Infinity, handler);
|
|
208
|
-
};
|
|
209
|
-
var and = (rules, handler) => {
|
|
210
|
-
const erules = rules.map(resolve);
|
|
211
|
-
return memoizable(handleable(backtrackable((state) => {
|
|
212
|
-
for (let i = 0, l = erules.length; i < l; i++) {
|
|
213
|
-
if (!erules[i](state))
|
|
214
|
-
return false;
|
|
215
|
-
}
|
|
216
|
-
return true;
|
|
217
|
-
}), handler));
|
|
218
|
-
};
|
|
219
|
-
var or = (rules, handler) => {
|
|
220
|
-
const erules = rules.map(resolve);
|
|
221
|
-
return memoizable(handleable((state) => {
|
|
222
|
-
for (let i = 0, l = erules.length; i < l; i++) {
|
|
223
|
-
if (erules[i](state))
|
|
224
|
-
return true;
|
|
225
|
-
}
|
|
226
|
-
return false;
|
|
227
|
-
}, handler));
|
|
228
|
-
};
|
|
229
|
-
var backtrackable = (rule, enabled = true, force = false) => {
|
|
230
|
-
const erule = resolve(rule);
|
|
231
|
-
if (!enabled)
|
|
232
|
-
return erule;
|
|
233
|
-
return (state) => {
|
|
234
|
-
const index = state.index;
|
|
235
|
-
const length = state.output.length;
|
|
236
|
-
const matched = erule(state);
|
|
237
|
-
if (!matched && !force) {
|
|
238
|
-
state.indexBacktrackMax = Math.max(state.indexBacktrackMax, state.index);
|
|
239
|
-
}
|
|
240
|
-
if (!matched || force) {
|
|
241
|
-
state.index = index;
|
|
242
|
-
if (state.output.length !== length) {
|
|
243
|
-
state.output.length = length;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return matched;
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
var handleable = (rule, handler) => {
|
|
250
|
-
const erule = resolve(rule);
|
|
251
|
-
if (!handler)
|
|
252
|
-
return erule;
|
|
253
|
-
return (state) => {
|
|
254
|
-
if (state.options.silent)
|
|
255
|
-
return erule(state);
|
|
256
|
-
const length = state.output.length;
|
|
257
|
-
const matched = erule(state);
|
|
258
|
-
if (matched) {
|
|
259
|
-
const outputs = state.output.splice(length, Infinity);
|
|
260
|
-
const output = handler(outputs);
|
|
261
|
-
if (!isUndefined(output)) {
|
|
262
|
-
state.output.push(output);
|
|
263
|
-
}
|
|
264
|
-
return true;
|
|
265
|
-
} else {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
var memoizable = /* @__PURE__ */ (() => {
|
|
271
|
-
let RULE_ID = 0;
|
|
272
|
-
return (rule) => {
|
|
273
|
-
const erule = resolve(rule);
|
|
274
|
-
const ruleId = RULE_ID += 1;
|
|
275
|
-
return (state) => {
|
|
276
|
-
var _a;
|
|
277
|
-
if (state.options.memoization === false)
|
|
278
|
-
return erule(state);
|
|
279
|
-
const indexStart = state.index;
|
|
280
|
-
const cache = (_a = state.cache)[ruleId] || (_a[ruleId] = { indexMax: -1, queue: [] });
|
|
281
|
-
const cacheQueue = cache.queue;
|
|
282
|
-
const isPotentiallyCached = indexStart <= cache.indexMax;
|
|
283
|
-
if (isPotentiallyCached) {
|
|
284
|
-
const cacheStore = cache.store || (cache.store = /* @__PURE__ */ new Map());
|
|
285
|
-
if (cacheQueue.length) {
|
|
286
|
-
for (let i = 0, l = cacheQueue.length; i < l; i += 2) {
|
|
287
|
-
const key = cacheQueue[i * 2];
|
|
288
|
-
const value = cacheQueue[i * 2 + 1];
|
|
289
|
-
cacheStore.set(key, value);
|
|
290
|
-
}
|
|
291
|
-
cacheQueue.length = 0;
|
|
292
|
-
}
|
|
293
|
-
const cached = cacheStore.get(indexStart);
|
|
294
|
-
if (cached === false) {
|
|
295
|
-
return false;
|
|
296
|
-
} else if (isNumber(cached)) {
|
|
297
|
-
state.index = cached;
|
|
298
|
-
return true;
|
|
299
|
-
} else if (cached) {
|
|
300
|
-
state.index = cached.index;
|
|
301
|
-
if (cached.output?.length) {
|
|
302
|
-
state.output.push(...cached.output);
|
|
303
|
-
}
|
|
304
|
-
return true;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const lengthStart = state.output.length;
|
|
308
|
-
const matched = erule(state);
|
|
309
|
-
cache.indexMax = Math.max(cache.indexMax, indexStart);
|
|
310
|
-
if (matched) {
|
|
311
|
-
const indexEnd = state.index;
|
|
312
|
-
const lengthEnd = state.output.length;
|
|
313
|
-
if (lengthEnd > lengthStart) {
|
|
314
|
-
const output = state.output.slice(lengthStart, lengthEnd);
|
|
315
|
-
cacheQueue.push(indexStart, { index: indexEnd, output });
|
|
316
|
-
} else {
|
|
317
|
-
cacheQueue.push(indexStart, indexEnd);
|
|
318
|
-
}
|
|
319
|
-
return true;
|
|
320
|
-
} else {
|
|
321
|
-
cacheQueue.push(indexStart, false);
|
|
322
|
-
return false;
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
})();
|
|
327
|
-
var lazy = (getter) => {
|
|
328
|
-
let erule;
|
|
329
|
-
return (state) => {
|
|
330
|
-
erule || (erule = resolve(getter()));
|
|
331
|
-
return erule(state);
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
var resolve = memoize((rule) => {
|
|
335
|
-
if (isFunction(rule)) {
|
|
336
|
-
if (isFunctionNullary(rule)) {
|
|
337
|
-
return lazy(rule);
|
|
338
|
-
} else {
|
|
339
|
-
return rule;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
if (isString(rule) || isRegExp(rule)) {
|
|
343
|
-
return match(rule);
|
|
344
|
-
}
|
|
345
|
-
if (isArray(rule)) {
|
|
346
|
-
return and(rule);
|
|
347
|
-
}
|
|
348
|
-
if (isObject(rule)) {
|
|
349
|
-
return or(Object.values(rule));
|
|
350
|
-
}
|
|
351
|
-
throw new Error("Invalid rule");
|
|
352
|
-
});
|
|
353
|
-
|
|
354
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/utils.js
|
|
355
|
-
var identity = (value) => {
|
|
356
|
-
return value;
|
|
357
|
-
};
|
|
358
|
-
var makeParser = (grammar) => {
|
|
359
|
-
return (input) => {
|
|
360
|
-
return parse(input, grammar, { memoization: false }).join("");
|
|
361
|
-
};
|
|
362
|
-
};
|
|
363
|
-
var memoize2 = (fn) => {
|
|
364
|
-
const cache = {};
|
|
365
|
-
return (arg) => {
|
|
366
|
-
return cache[arg] ?? (cache[arg] = fn(arg));
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/range.js
|
|
371
|
-
var ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
372
|
-
var int2alpha = (int) => {
|
|
373
|
-
let alpha = "";
|
|
374
|
-
while (int > 0) {
|
|
375
|
-
const reminder = (int - 1) % 26;
|
|
376
|
-
alpha = ALPHABET[reminder] + alpha;
|
|
377
|
-
int = Math.floor((int - 1) / 26);
|
|
378
|
-
}
|
|
379
|
-
return alpha;
|
|
380
|
-
};
|
|
381
|
-
var alpha2int = (str) => {
|
|
382
|
-
let int = 0;
|
|
383
|
-
for (let i = 0, l = str.length; i < l; i++) {
|
|
384
|
-
int = int * 26 + ALPHABET.indexOf(str[i]) + 1;
|
|
385
|
-
}
|
|
386
|
-
return int;
|
|
387
|
-
};
|
|
388
|
-
var makeRangeInt = (start, end) => {
|
|
389
|
-
if (end < start)
|
|
390
|
-
return makeRangeInt(end, start);
|
|
391
|
-
const range = [];
|
|
392
|
-
while (start <= end) {
|
|
393
|
-
range.push(start++);
|
|
394
|
-
}
|
|
395
|
-
return range;
|
|
396
|
-
};
|
|
397
|
-
var makeRangePaddedInt = (start, end, paddingLength) => {
|
|
398
|
-
return makeRangeInt(start, end).map((int) => String(int).padStart(paddingLength, "0"));
|
|
399
|
-
};
|
|
400
|
-
var makeRangeAlpha = (start, end) => {
|
|
401
|
-
return makeRangeInt(alpha2int(start), alpha2int(end)).map(int2alpha);
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/grammar.js
|
|
405
|
-
var Escaped = match(/\\./, identity);
|
|
406
|
-
var Escape = match(/[$.*+?^(){}[\]\|]/, (char) => `\\${char}`);
|
|
407
|
-
var Slash = match(/[\\/]/, "[\\\\/]");
|
|
408
|
-
var Passthrough = match(/./, identity);
|
|
409
|
-
var NegationOdd = match(/^(?:!!)*!(.*)$/, (_, glob) => `(?!^${parser_default(glob)}$).*?`);
|
|
410
|
-
var NegationEven = match(/^(!!)+/, "");
|
|
411
|
-
var Negation = or([NegationOdd, NegationEven]);
|
|
412
|
-
var StarStarBetween = match(/\/(\*\*\/)+/, "(?:[\\\\/].+[\\\\/]|[\\\\/])");
|
|
413
|
-
var StarStarStart = match(/^(\*\*\/)+/, "(?:^|.*[\\\\/])");
|
|
414
|
-
var StarStarEnd = match(/\/(\*\*)$/, "(?:[\\\\/].*|$)");
|
|
415
|
-
var StarStarNone = match(/\*\*/, ".*");
|
|
416
|
-
var StarStar = or([StarStarBetween, StarStarStart, StarStarEnd, StarStarNone]);
|
|
417
|
-
var StarDouble = match(/\*\/(?!\*\*\/|\*$)/, "[^\\\\/]*[\\\\/]");
|
|
418
|
-
var StarSingle = match(/\*/, "[^\\\\/]*");
|
|
419
|
-
var Star = or([StarDouble, StarSingle]);
|
|
420
|
-
var Question = match("?", "[^\\\\/]");
|
|
421
|
-
var ClassOpen = match("[", identity);
|
|
422
|
-
var ClassClose = match("]", identity);
|
|
423
|
-
var ClassNegation = match(/[!^]/, "^\\\\/");
|
|
424
|
-
var ClassRange = match(/[a-z]-[a-z]|[0-9]-[0-9]/i, identity);
|
|
425
|
-
var ClassEscape = match(/[$.*+?^(){}[\|]/, (char) => `\\${char}`);
|
|
426
|
-
var ClassPassthrough = match(/[^\]]/, identity);
|
|
427
|
-
var ClassValue = or([Escaped, ClassEscape, ClassRange, ClassPassthrough]);
|
|
428
|
-
var Class = and([ClassOpen, optional(ClassNegation), star(ClassValue), ClassClose]);
|
|
429
|
-
var RangeOpen = match("{", "(?:");
|
|
430
|
-
var RangeClose = match("}", ")");
|
|
431
|
-
var RangeNumeric = match(/(\d+)\.\.(\d+)/, (_, $1, $2) => makeRangePaddedInt(+$1, +$2, Math.min($1.length, $2.length)).join("|"));
|
|
432
|
-
var RangeAlphaLower = match(/([a-z]+)\.\.([a-z]+)/, (_, $1, $2) => makeRangeAlpha($1, $2).join("|"));
|
|
433
|
-
var RangeAlphaUpper = match(/([A-Z]+)\.\.([A-Z]+)/, (_, $1, $2) => makeRangeAlpha($1.toLowerCase(), $2.toLowerCase()).join("|").toUpperCase());
|
|
434
|
-
var RangeValue = or([RangeNumeric, RangeAlphaLower, RangeAlphaUpper]);
|
|
435
|
-
var Range = and([RangeOpen, RangeValue, RangeClose]);
|
|
436
|
-
var BracesOpen = match("{", "(?:");
|
|
437
|
-
var BracesClose = match("}", ")");
|
|
438
|
-
var BracesComma = match(",", "|");
|
|
439
|
-
var BracesEscape = match(/[$.*+?^(){[\]\|]/, (char) => `\\${char}`);
|
|
440
|
-
var BracesPassthrough = match(/[^}]/, identity);
|
|
441
|
-
var BracesNested = lazy(() => Braces);
|
|
442
|
-
var BracesValue = or([StarStar, Star, Question, Class, Range, BracesNested, Escaped, BracesEscape, BracesComma, BracesPassthrough]);
|
|
443
|
-
var Braces = and([BracesOpen, star(BracesValue), BracesClose]);
|
|
444
|
-
var Grammar = star(or([Negation, StarStar, Star, Question, Class, Range, Braces, Escaped, Escape, Slash, Passthrough]));
|
|
445
|
-
var grammar_default = Grammar;
|
|
446
|
-
|
|
447
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/parser.js
|
|
448
|
-
var parser = makeParser(grammar_default);
|
|
449
|
-
var parser_default = parser;
|
|
450
|
-
|
|
451
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/grammar.js
|
|
452
|
-
var Escaped2 = match(/\\./, identity);
|
|
453
|
-
var Passthrough2 = match(/./, identity);
|
|
454
|
-
var StarStarStar = match(/\*\*\*+/, "*");
|
|
455
|
-
var StarStarNoLeft = match(/([^/{[(!])\*\*/, (_, $1) => `${$1}*`);
|
|
456
|
-
var StarStarNoRight = match(/(^|.)\*\*(?=[^*/)\]}])/, (_, $1) => `${$1}*`);
|
|
457
|
-
var Grammar2 = star(or([Escaped2, StarStarStar, StarStarNoLeft, StarStarNoRight, Passthrough2]));
|
|
458
|
-
var grammar_default2 = Grammar2;
|
|
459
|
-
|
|
460
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/parser.js
|
|
461
|
-
var parser2 = makeParser(grammar_default2);
|
|
462
|
-
var parser_default2 = parser2;
|
|
463
|
-
|
|
464
|
-
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/index.js
|
|
465
|
-
var zeptomatch = (glob, path) => {
|
|
466
|
-
if (Array.isArray(glob)) {
|
|
467
|
-
const res = glob.map(zeptomatch.compile);
|
|
468
|
-
const isMatch = res.some((re) => re.test(path));
|
|
469
|
-
return isMatch;
|
|
470
|
-
} else {
|
|
471
|
-
const re = zeptomatch.compile(glob);
|
|
472
|
-
const isMatch = re.test(path);
|
|
473
|
-
return isMatch;
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
zeptomatch.compile = memoize2((glob) => {
|
|
477
|
-
return new RegExp(`^${parser_default(parser_default2(glob))}[\\\\/]?$`, "s");
|
|
478
|
-
});
|
|
479
|
-
var dist_default = zeptomatch;
|
|
480
|
-
export {
|
|
481
|
-
dist_default as default
|
|
482
|
-
};
|