@prisma/cli-init 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_-WIN5AVS3.js → _-YBFA2SJO.js} +1 -1
- package/dist/accelerate-YEFEYVGD.js +138706 -0
- package/dist/{chunk-ASMCGOOW.js → chunk-7C5I22R2.js} +487 -10
- package/dist/{chunk-SORRSNB3.js → chunk-OCHZ4DEX.js} +1 -1
- package/dist/index.js +89 -38
- package/package.json +2 -2
- package/dist/accelerate-GABM6I4V.js +0 -221
|
@@ -756,8 +756,8 @@ import { setTimeout } from "timers/promises";
|
|
|
756
756
|
// ../../common/stuff/with-resolvers.ts
|
|
757
757
|
function withResolvers(options) {
|
|
758
758
|
let succeed, fail;
|
|
759
|
-
const promise = new Promise((
|
|
760
|
-
succeed =
|
|
759
|
+
const promise = new Promise((resolve2, reject) => {
|
|
760
|
+
succeed = resolve2;
|
|
761
761
|
fail = reject;
|
|
762
762
|
});
|
|
763
763
|
let failOnce = (reason) => {
|
|
@@ -856,7 +856,7 @@ var K = P?.name || "";
|
|
|
856
856
|
|
|
857
857
|
// ../../dev/server/src/filesystem.ts
|
|
858
858
|
import { createWriteStream, WriteStream } from "fs";
|
|
859
|
-
import { access, chmod, constants, mkdir, readdir, readFile, writeFile } from "fs/promises";
|
|
859
|
+
import { access, chmod, constants, mkdir, readdir, readFile, rm, writeFile } from "fs/promises";
|
|
860
860
|
import { promisify } from "util";
|
|
861
861
|
import { unzip } from "zlib";
|
|
862
862
|
|
|
@@ -916,6 +916,483 @@ function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
|
916
916
|
return linux(name);
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
+
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/utils.js
|
|
920
|
+
var isArray = (value) => {
|
|
921
|
+
return Array.isArray(value);
|
|
922
|
+
};
|
|
923
|
+
var isFunction = (value) => {
|
|
924
|
+
return typeof value === "function";
|
|
925
|
+
};
|
|
926
|
+
var isFunctionNullary = (value) => {
|
|
927
|
+
return value.length === 0;
|
|
928
|
+
};
|
|
929
|
+
var isFunctionStrictlyNullaryOrUnary = (() => {
|
|
930
|
+
const { toString } = Function.prototype;
|
|
931
|
+
const re = /(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;
|
|
932
|
+
return (value) => {
|
|
933
|
+
return (value.length === 0 || value.length === 1) && re.test(toString.call(value));
|
|
934
|
+
};
|
|
935
|
+
})();
|
|
936
|
+
var isNumber = (value) => {
|
|
937
|
+
return typeof value === "number";
|
|
938
|
+
};
|
|
939
|
+
var isObject = (value) => {
|
|
940
|
+
return typeof value === "object" && value !== null;
|
|
941
|
+
};
|
|
942
|
+
var isRegExp = (value) => {
|
|
943
|
+
return value instanceof RegExp;
|
|
944
|
+
};
|
|
945
|
+
var isRegExpCapturing = /* @__PURE__ */ (() => {
|
|
946
|
+
const sourceRe = /\\\(|\((?!\?(?::|=|!|<=|<!))/;
|
|
947
|
+
return (re) => {
|
|
948
|
+
return sourceRe.test(re.source);
|
|
949
|
+
};
|
|
950
|
+
})();
|
|
951
|
+
var isRegExpStatic = /* @__PURE__ */ (() => {
|
|
952
|
+
const sourceRe = /^[a-zA-Z0-9_-]+$/;
|
|
953
|
+
return (re) => {
|
|
954
|
+
return sourceRe.test(re.source) && !re.flags.includes("i");
|
|
955
|
+
};
|
|
956
|
+
})();
|
|
957
|
+
var isString = (value) => {
|
|
958
|
+
return typeof value === "string";
|
|
959
|
+
};
|
|
960
|
+
var isUndefined = (value) => {
|
|
961
|
+
return value === void 0;
|
|
962
|
+
};
|
|
963
|
+
var memoize = (fn) => {
|
|
964
|
+
const cache = /* @__PURE__ */ new Map();
|
|
965
|
+
return (arg) => {
|
|
966
|
+
const cached = cache.get(arg);
|
|
967
|
+
if (cached !== void 0)
|
|
968
|
+
return cached;
|
|
969
|
+
const value = fn(arg);
|
|
970
|
+
cache.set(arg, value);
|
|
971
|
+
return value;
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
// ../../node_modules/.pnpm/grammex@3.1.10/node_modules/grammex/dist/index.js
|
|
976
|
+
var parse = (input, rule, options = {}) => {
|
|
977
|
+
const state = { cache: {}, input, index: 0, indexBacktrackMax: 0, options, output: [] };
|
|
978
|
+
const matched = resolve(rule)(state);
|
|
979
|
+
const indexMax = Math.max(state.index, state.indexBacktrackMax);
|
|
980
|
+
if (matched && state.index === input.length) {
|
|
981
|
+
return state.output;
|
|
982
|
+
} else {
|
|
983
|
+
throw new Error(`Failed to parse at index ${indexMax}`);
|
|
984
|
+
}
|
|
985
|
+
};
|
|
986
|
+
var match = (target, handler) => {
|
|
987
|
+
if (isArray(target)) {
|
|
988
|
+
return chars(target, handler);
|
|
989
|
+
} else if (isString(target)) {
|
|
990
|
+
return string2(target, handler);
|
|
991
|
+
} else {
|
|
992
|
+
return regex2(target, handler);
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
var chars = (target, handler) => {
|
|
996
|
+
const charCodes = {};
|
|
997
|
+
for (const char of target) {
|
|
998
|
+
if (char.length !== 1)
|
|
999
|
+
throw new Error(`Invalid character: "${char}"`);
|
|
1000
|
+
const charCode = char.charCodeAt(0);
|
|
1001
|
+
charCodes[charCode] = true;
|
|
1002
|
+
}
|
|
1003
|
+
return (state) => {
|
|
1004
|
+
const input = state.input;
|
|
1005
|
+
let indexStart = state.index;
|
|
1006
|
+
let indexEnd = indexStart;
|
|
1007
|
+
while (indexEnd < input.length) {
|
|
1008
|
+
const charCode = input.charCodeAt(indexEnd);
|
|
1009
|
+
if (!(charCode in charCodes))
|
|
1010
|
+
break;
|
|
1011
|
+
indexEnd += 1;
|
|
1012
|
+
}
|
|
1013
|
+
if (indexEnd > indexStart) {
|
|
1014
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
1015
|
+
const target2 = input.slice(indexStart, indexEnd);
|
|
1016
|
+
const output = isFunction(handler) ? handler(target2, input, `${indexStart}`) : handler;
|
|
1017
|
+
if (!isUndefined(output)) {
|
|
1018
|
+
state.output.push(output);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
state.index = indexEnd;
|
|
1022
|
+
}
|
|
1023
|
+
return true;
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
var regex2 = (target, handler) => {
|
|
1027
|
+
if (isRegExpStatic(target)) {
|
|
1028
|
+
return string2(target.source, handler);
|
|
1029
|
+
} else {
|
|
1030
|
+
const source = target.source;
|
|
1031
|
+
const flags = target.flags.replace(/y|$/, "y");
|
|
1032
|
+
const re = new RegExp(source, flags);
|
|
1033
|
+
if (isRegExpCapturing(target) && isFunction(handler) && !isFunctionStrictlyNullaryOrUnary(handler)) {
|
|
1034
|
+
return regexCapturing(re, handler);
|
|
1035
|
+
} else {
|
|
1036
|
+
return regexNonCapturing(re, handler);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
var regexCapturing = (re, handler) => {
|
|
1041
|
+
return (state) => {
|
|
1042
|
+
const indexStart = state.index;
|
|
1043
|
+
const input = state.input;
|
|
1044
|
+
re.lastIndex = indexStart;
|
|
1045
|
+
const match2 = re.exec(input);
|
|
1046
|
+
if (match2) {
|
|
1047
|
+
const indexEnd = re.lastIndex;
|
|
1048
|
+
if (!state.options.silent) {
|
|
1049
|
+
const output = handler(...match2, input, `${indexStart}`);
|
|
1050
|
+
if (!isUndefined(output)) {
|
|
1051
|
+
state.output.push(output);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
state.index = indexEnd;
|
|
1055
|
+
return true;
|
|
1056
|
+
} else {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
var regexNonCapturing = (re, handler) => {
|
|
1062
|
+
return (state) => {
|
|
1063
|
+
const indexStart = state.index;
|
|
1064
|
+
const input = state.input;
|
|
1065
|
+
re.lastIndex = indexStart;
|
|
1066
|
+
const matched = re.test(input);
|
|
1067
|
+
if (matched) {
|
|
1068
|
+
const indexEnd = re.lastIndex;
|
|
1069
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
1070
|
+
const output = isFunction(handler) ? handler(input.slice(indexStart, indexEnd), input, `${indexStart}`) : handler;
|
|
1071
|
+
if (!isUndefined(output)) {
|
|
1072
|
+
state.output.push(output);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
state.index = indexEnd;
|
|
1076
|
+
return true;
|
|
1077
|
+
} else {
|
|
1078
|
+
return false;
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
};
|
|
1082
|
+
var string2 = (target, handler) => {
|
|
1083
|
+
return (state) => {
|
|
1084
|
+
const indexStart = state.index;
|
|
1085
|
+
const input = state.input;
|
|
1086
|
+
const matched = input.startsWith(target, indexStart);
|
|
1087
|
+
if (matched) {
|
|
1088
|
+
if (!isUndefined(handler) && !state.options.silent) {
|
|
1089
|
+
const output = isFunction(handler) ? handler(target, input, `${indexStart}`) : handler;
|
|
1090
|
+
if (!isUndefined(output)) {
|
|
1091
|
+
state.output.push(output);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
state.index += target.length;
|
|
1095
|
+
return true;
|
|
1096
|
+
} else {
|
|
1097
|
+
return false;
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
var repeat = (rule, min, max, handler) => {
|
|
1102
|
+
const erule = resolve(rule);
|
|
1103
|
+
const isBacktrackable = min > 1;
|
|
1104
|
+
return memoizable(handleable(backtrackable((state) => {
|
|
1105
|
+
let repetitions = 0;
|
|
1106
|
+
while (repetitions < max) {
|
|
1107
|
+
const index = state.index;
|
|
1108
|
+
const matched = erule(state);
|
|
1109
|
+
if (!matched)
|
|
1110
|
+
break;
|
|
1111
|
+
repetitions += 1;
|
|
1112
|
+
if (state.index === index)
|
|
1113
|
+
break;
|
|
1114
|
+
}
|
|
1115
|
+
return repetitions >= min;
|
|
1116
|
+
}, isBacktrackable), handler));
|
|
1117
|
+
};
|
|
1118
|
+
var optional2 = (rule, handler) => {
|
|
1119
|
+
return repeat(rule, 0, 1, handler);
|
|
1120
|
+
};
|
|
1121
|
+
var star = (rule, handler) => {
|
|
1122
|
+
return repeat(rule, 0, Infinity, handler);
|
|
1123
|
+
};
|
|
1124
|
+
var and = (rules, handler) => {
|
|
1125
|
+
const erules = rules.map(resolve);
|
|
1126
|
+
return memoizable(handleable(backtrackable((state) => {
|
|
1127
|
+
for (let i2 = 0, l2 = erules.length; i2 < l2; i2++) {
|
|
1128
|
+
if (!erules[i2](state))
|
|
1129
|
+
return false;
|
|
1130
|
+
}
|
|
1131
|
+
return true;
|
|
1132
|
+
}), handler));
|
|
1133
|
+
};
|
|
1134
|
+
var or = (rules, handler) => {
|
|
1135
|
+
const erules = rules.map(resolve);
|
|
1136
|
+
return memoizable(handleable((state) => {
|
|
1137
|
+
for (let i2 = 0, l2 = erules.length; i2 < l2; i2++) {
|
|
1138
|
+
if (erules[i2](state))
|
|
1139
|
+
return true;
|
|
1140
|
+
}
|
|
1141
|
+
return false;
|
|
1142
|
+
}, handler));
|
|
1143
|
+
};
|
|
1144
|
+
var backtrackable = (rule, enabled = true, force = false) => {
|
|
1145
|
+
const erule = resolve(rule);
|
|
1146
|
+
if (!enabled)
|
|
1147
|
+
return erule;
|
|
1148
|
+
return (state) => {
|
|
1149
|
+
const index = state.index;
|
|
1150
|
+
const length = state.output.length;
|
|
1151
|
+
const matched = erule(state);
|
|
1152
|
+
if (!matched && !force) {
|
|
1153
|
+
state.indexBacktrackMax = Math.max(state.indexBacktrackMax, state.index);
|
|
1154
|
+
}
|
|
1155
|
+
if (!matched || force) {
|
|
1156
|
+
state.index = index;
|
|
1157
|
+
if (state.output.length !== length) {
|
|
1158
|
+
state.output.length = length;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
return matched;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
var handleable = (rule, handler) => {
|
|
1165
|
+
const erule = resolve(rule);
|
|
1166
|
+
if (!handler)
|
|
1167
|
+
return erule;
|
|
1168
|
+
return (state) => {
|
|
1169
|
+
if (state.options.silent)
|
|
1170
|
+
return erule(state);
|
|
1171
|
+
const length = state.output.length;
|
|
1172
|
+
const matched = erule(state);
|
|
1173
|
+
if (matched) {
|
|
1174
|
+
const outputs = state.output.splice(length, Infinity);
|
|
1175
|
+
const output = handler(outputs);
|
|
1176
|
+
if (!isUndefined(output)) {
|
|
1177
|
+
state.output.push(output);
|
|
1178
|
+
}
|
|
1179
|
+
return true;
|
|
1180
|
+
} else {
|
|
1181
|
+
return false;
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
var memoizable = /* @__PURE__ */ (() => {
|
|
1186
|
+
let RULE_ID = 0;
|
|
1187
|
+
return (rule) => {
|
|
1188
|
+
const erule = resolve(rule);
|
|
1189
|
+
const ruleId = RULE_ID += 1;
|
|
1190
|
+
return (state) => {
|
|
1191
|
+
var _a;
|
|
1192
|
+
if (state.options.memoization === false)
|
|
1193
|
+
return erule(state);
|
|
1194
|
+
const indexStart = state.index;
|
|
1195
|
+
const cache = (_a = state.cache)[ruleId] || (_a[ruleId] = { indexMax: -1, queue: [] });
|
|
1196
|
+
const cacheQueue = cache.queue;
|
|
1197
|
+
const isPotentiallyCached = indexStart <= cache.indexMax;
|
|
1198
|
+
if (isPotentiallyCached) {
|
|
1199
|
+
const cacheStore = cache.store || (cache.store = /* @__PURE__ */ new Map());
|
|
1200
|
+
if (cacheQueue.length) {
|
|
1201
|
+
for (let i2 = 0, l2 = cacheQueue.length; i2 < l2; i2 += 2) {
|
|
1202
|
+
const key = cacheQueue[i2 * 2];
|
|
1203
|
+
const value = cacheQueue[i2 * 2 + 1];
|
|
1204
|
+
cacheStore.set(key, value);
|
|
1205
|
+
}
|
|
1206
|
+
cacheQueue.length = 0;
|
|
1207
|
+
}
|
|
1208
|
+
const cached = cacheStore.get(indexStart);
|
|
1209
|
+
if (cached === false) {
|
|
1210
|
+
return false;
|
|
1211
|
+
} else if (isNumber(cached)) {
|
|
1212
|
+
state.index = cached;
|
|
1213
|
+
return true;
|
|
1214
|
+
} else if (cached) {
|
|
1215
|
+
state.index = cached.index;
|
|
1216
|
+
if (cached.output?.length) {
|
|
1217
|
+
state.output.push(...cached.output);
|
|
1218
|
+
}
|
|
1219
|
+
return true;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
const lengthStart = state.output.length;
|
|
1223
|
+
const matched = erule(state);
|
|
1224
|
+
cache.indexMax = Math.max(cache.indexMax, indexStart);
|
|
1225
|
+
if (matched) {
|
|
1226
|
+
const indexEnd = state.index;
|
|
1227
|
+
const lengthEnd = state.output.length;
|
|
1228
|
+
if (lengthEnd > lengthStart) {
|
|
1229
|
+
const output = state.output.slice(lengthStart, lengthEnd);
|
|
1230
|
+
cacheQueue.push(indexStart, { index: indexEnd, output });
|
|
1231
|
+
} else {
|
|
1232
|
+
cacheQueue.push(indexStart, indexEnd);
|
|
1233
|
+
}
|
|
1234
|
+
return true;
|
|
1235
|
+
} else {
|
|
1236
|
+
cacheQueue.push(indexStart, false);
|
|
1237
|
+
return false;
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
})();
|
|
1242
|
+
var lazy = (getter) => {
|
|
1243
|
+
let erule;
|
|
1244
|
+
return (state) => {
|
|
1245
|
+
erule || (erule = resolve(getter()));
|
|
1246
|
+
return erule(state);
|
|
1247
|
+
};
|
|
1248
|
+
};
|
|
1249
|
+
var resolve = memoize((rule) => {
|
|
1250
|
+
if (isFunction(rule)) {
|
|
1251
|
+
if (isFunctionNullary(rule)) {
|
|
1252
|
+
return lazy(rule);
|
|
1253
|
+
} else {
|
|
1254
|
+
return rule;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
if (isString(rule) || isRegExp(rule)) {
|
|
1258
|
+
return match(rule);
|
|
1259
|
+
}
|
|
1260
|
+
if (isArray(rule)) {
|
|
1261
|
+
return and(rule);
|
|
1262
|
+
}
|
|
1263
|
+
if (isObject(rule)) {
|
|
1264
|
+
return or(Object.values(rule));
|
|
1265
|
+
}
|
|
1266
|
+
throw new Error("Invalid rule");
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1269
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/utils.js
|
|
1270
|
+
var identity = (value) => {
|
|
1271
|
+
return value;
|
|
1272
|
+
};
|
|
1273
|
+
var makeParser = (grammar) => {
|
|
1274
|
+
return (input) => {
|
|
1275
|
+
return parse(input, grammar, { memoization: false }).join("");
|
|
1276
|
+
};
|
|
1277
|
+
};
|
|
1278
|
+
var memoize2 = (fn) => {
|
|
1279
|
+
const cache = {};
|
|
1280
|
+
return (arg) => {
|
|
1281
|
+
return cache[arg] ?? (cache[arg] = fn(arg));
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/range.js
|
|
1286
|
+
var ALPHABET = "abcdefghijklmnopqrstuvwxyz";
|
|
1287
|
+
var int2alpha = (int) => {
|
|
1288
|
+
let alpha = "";
|
|
1289
|
+
while (int > 0) {
|
|
1290
|
+
const reminder = (int - 1) % 26;
|
|
1291
|
+
alpha = ALPHABET[reminder] + alpha;
|
|
1292
|
+
int = Math.floor((int - 1) / 26);
|
|
1293
|
+
}
|
|
1294
|
+
return alpha;
|
|
1295
|
+
};
|
|
1296
|
+
var alpha2int = (str) => {
|
|
1297
|
+
let int = 0;
|
|
1298
|
+
for (let i2 = 0, l2 = str.length; i2 < l2; i2++) {
|
|
1299
|
+
int = int * 26 + ALPHABET.indexOf(str[i2]) + 1;
|
|
1300
|
+
}
|
|
1301
|
+
return int;
|
|
1302
|
+
};
|
|
1303
|
+
var makeRangeInt = (start, end) => {
|
|
1304
|
+
if (end < start)
|
|
1305
|
+
return makeRangeInt(end, start);
|
|
1306
|
+
const range = [];
|
|
1307
|
+
while (start <= end) {
|
|
1308
|
+
range.push(start++);
|
|
1309
|
+
}
|
|
1310
|
+
return range;
|
|
1311
|
+
};
|
|
1312
|
+
var makeRangePaddedInt = (start, end, paddingLength) => {
|
|
1313
|
+
return makeRangeInt(start, end).map((int) => String(int).padStart(paddingLength, "0"));
|
|
1314
|
+
};
|
|
1315
|
+
var makeRangeAlpha = (start, end) => {
|
|
1316
|
+
return makeRangeInt(alpha2int(start), alpha2int(end)).map(int2alpha);
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/grammar.js
|
|
1320
|
+
var Escaped = match(/\\./, identity);
|
|
1321
|
+
var Escape = match(/[$.*+?^(){}[\]\|]/, (char) => `\\${char}`);
|
|
1322
|
+
var Slash = match(/[\\/]/, "[\\\\/]");
|
|
1323
|
+
var Passthrough = match(/./, identity);
|
|
1324
|
+
var NegationOdd = match(/^(?:!!)*!(.*)$/, (_2, glob) => `(?!^${parser_default(glob)}$).*?`);
|
|
1325
|
+
var NegationEven = match(/^(!!)+/, "");
|
|
1326
|
+
var Negation = or([NegationOdd, NegationEven]);
|
|
1327
|
+
var StarStarBetween = match(/\/(\*\*\/)+/, "(?:[\\\\/].+[\\\\/]|[\\\\/])");
|
|
1328
|
+
var StarStarStart = match(/^(\*\*\/)+/, "(?:^|.*[\\\\/])");
|
|
1329
|
+
var StarStarEnd = match(/\/(\*\*)$/, "(?:[\\\\/].*|$)");
|
|
1330
|
+
var StarStarNone = match(/\*\*/, ".*");
|
|
1331
|
+
var StarStar = or([StarStarBetween, StarStarStart, StarStarEnd, StarStarNone]);
|
|
1332
|
+
var StarDouble = match(/\*\/(?!\*\*\/|\*$)/, "[^\\\\/]*[\\\\/]");
|
|
1333
|
+
var StarSingle = match(/\*/, "[^\\\\/]*");
|
|
1334
|
+
var Star = or([StarDouble, StarSingle]);
|
|
1335
|
+
var Question = match("?", "[^\\\\/]");
|
|
1336
|
+
var ClassOpen = match("[", identity);
|
|
1337
|
+
var ClassClose = match("]", identity);
|
|
1338
|
+
var ClassNegation = match(/[!^]/, "^\\\\/");
|
|
1339
|
+
var ClassRange = match(/[a-z]-[a-z]|[0-9]-[0-9]/i, identity);
|
|
1340
|
+
var ClassEscape = match(/[$.*+?^(){}[\|]/, (char) => `\\${char}`);
|
|
1341
|
+
var ClassPassthrough = match(/[^\]]/, identity);
|
|
1342
|
+
var ClassValue = or([Escaped, ClassEscape, ClassRange, ClassPassthrough]);
|
|
1343
|
+
var Class = and([ClassOpen, optional2(ClassNegation), star(ClassValue), ClassClose]);
|
|
1344
|
+
var RangeOpen = match("{", "(?:");
|
|
1345
|
+
var RangeClose = match("}", ")");
|
|
1346
|
+
var RangeNumeric = match(/(\d+)\.\.(\d+)/, (_2, $1, $2) => makeRangePaddedInt(+$1, +$2, Math.min($1.length, $2.length)).join("|"));
|
|
1347
|
+
var RangeAlphaLower = match(/([a-z]+)\.\.([a-z]+)/, (_2, $1, $2) => makeRangeAlpha($1, $2).join("|"));
|
|
1348
|
+
var RangeAlphaUpper = match(/([A-Z]+)\.\.([A-Z]+)/, (_2, $1, $2) => makeRangeAlpha($1.toLowerCase(), $2.toLowerCase()).join("|").toUpperCase());
|
|
1349
|
+
var RangeValue = or([RangeNumeric, RangeAlphaLower, RangeAlphaUpper]);
|
|
1350
|
+
var Range = and([RangeOpen, RangeValue, RangeClose]);
|
|
1351
|
+
var BracesOpen = match("{", "(?:");
|
|
1352
|
+
var BracesClose = match("}", ")");
|
|
1353
|
+
var BracesComma = match(",", "|");
|
|
1354
|
+
var BracesEscape = match(/[$.*+?^(){[\]\|]/, (char) => `\\${char}`);
|
|
1355
|
+
var BracesPassthrough = match(/[^}]/, identity);
|
|
1356
|
+
var BracesNested = lazy(() => Braces);
|
|
1357
|
+
var BracesValue = or([StarStar, Star, Question, Class, Range, BracesNested, Escaped, BracesEscape, BracesComma, BracesPassthrough]);
|
|
1358
|
+
var Braces = and([BracesOpen, star(BracesValue), BracesClose]);
|
|
1359
|
+
var Grammar = star(or([Negation, StarStar, Star, Question, Class, Range, Braces, Escaped, Escape, Slash, Passthrough]));
|
|
1360
|
+
var grammar_default = Grammar;
|
|
1361
|
+
|
|
1362
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/convert/parser.js
|
|
1363
|
+
var parser = makeParser(grammar_default);
|
|
1364
|
+
var parser_default = parser;
|
|
1365
|
+
|
|
1366
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/grammar.js
|
|
1367
|
+
var Escaped2 = match(/\\./, identity);
|
|
1368
|
+
var Passthrough2 = match(/./, identity);
|
|
1369
|
+
var StarStarStar = match(/\*\*\*+/, "*");
|
|
1370
|
+
var StarStarNoLeft = match(/([^/{[(!])\*\*/, (_2, $1) => `${$1}*`);
|
|
1371
|
+
var StarStarNoRight = match(/(^|.)\*\*(?=[^*/)\]}])/, (_2, $1) => `${$1}*`);
|
|
1372
|
+
var Grammar2 = star(or([Escaped2, StarStarStar, StarStarNoLeft, StarStarNoRight, Passthrough2]));
|
|
1373
|
+
var grammar_default2 = Grammar2;
|
|
1374
|
+
|
|
1375
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/normalize/parser.js
|
|
1376
|
+
var parser2 = makeParser(grammar_default2);
|
|
1377
|
+
var parser_default2 = parser2;
|
|
1378
|
+
|
|
1379
|
+
// ../../node_modules/.pnpm/zeptomatch@2.0.2/node_modules/zeptomatch/dist/index.js
|
|
1380
|
+
var zeptomatch = (glob, path2) => {
|
|
1381
|
+
if (Array.isArray(glob)) {
|
|
1382
|
+
const res = glob.map(zeptomatch.compile);
|
|
1383
|
+
const isMatch = res.some((re) => re.test(path2));
|
|
1384
|
+
return isMatch;
|
|
1385
|
+
} else {
|
|
1386
|
+
const re = zeptomatch.compile(glob);
|
|
1387
|
+
const isMatch = re.test(path2);
|
|
1388
|
+
return isMatch;
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
zeptomatch.compile = memoize2((glob) => {
|
|
1392
|
+
return new RegExp(`^${parser_default(parser_default2(glob))}[\\\\/]?$`, "s");
|
|
1393
|
+
});
|
|
1394
|
+
var dist_default = zeptomatch;
|
|
1395
|
+
|
|
919
1396
|
// ../../dev/server/src/filesystem.ts
|
|
920
1397
|
var GLOBAL_DIR_ROOT_PATH = envPaths("prisma-dev");
|
|
921
1398
|
var unzipAsync = promisify(unzip);
|
|
@@ -960,11 +1437,11 @@ async function readFileAsText(path2) {
|
|
|
960
1437
|
async function ensureDirectory(path2) {
|
|
961
1438
|
await mkdir(path2, { recursive: true });
|
|
962
1439
|
}
|
|
963
|
-
async function readDirectoryNames(path2) {
|
|
1440
|
+
async function readDirectoryNames(path2, globs) {
|
|
964
1441
|
try {
|
|
965
1442
|
const dirents = await readdir(path2, { withFileTypes: true });
|
|
966
1443
|
return dirents.reduce((names, dirent) => {
|
|
967
|
-
if (dirent.isDirectory() && !dirent.name.startsWith(".")) {
|
|
1444
|
+
if (dirent.isDirectory() && !dirent.name.startsWith(".") && (!globs || dist_default(globs, dirent.name))) {
|
|
968
1445
|
names.push(dirent.name);
|
|
969
1446
|
}
|
|
970
1447
|
return names;
|
|
@@ -1064,7 +1541,7 @@ var Engine = class _Engine {
|
|
|
1064
1541
|
if (this.#session != null) {
|
|
1065
1542
|
return await this.#session;
|
|
1066
1543
|
}
|
|
1067
|
-
const { promise: session, reject, resolve } = withResolvers();
|
|
1544
|
+
const { promise: session, reject, resolve: resolve2 } = withResolvers();
|
|
1068
1545
|
this.#session = session;
|
|
1069
1546
|
const engineBinaryPath = PRISMA_DEV_FORCE_ENGINE_BINARY_PATH || await this.#getEngineBinaryPath();
|
|
1070
1547
|
if (this.#options.debug) {
|
|
@@ -1108,7 +1585,7 @@ Received data: ${data}`
|
|
|
1108
1585
|
)
|
|
1109
1586
|
);
|
|
1110
1587
|
}
|
|
1111
|
-
|
|
1588
|
+
resolve2({ childProcess, url: `http://${ip}:${port}` });
|
|
1112
1589
|
};
|
|
1113
1590
|
const errorListener = (error) => {
|
|
1114
1591
|
this.#session = null;
|
|
@@ -1155,9 +1632,9 @@ Received data: ${data}`
|
|
|
1155
1632
|
console.debug("[Query Engine] cache directory path", cacheDirectoryPath);
|
|
1156
1633
|
}
|
|
1157
1634
|
await mkdir2(cacheDirectoryPath, { recursive: true });
|
|
1158
|
-
const {
|
|
1159
|
-
const extension =
|
|
1160
|
-
const engineBinaryPath = join(cacheDirectoryPath, `query-engine-${
|
|
1635
|
+
const { binaryTarget } = this.#options.platform;
|
|
1636
|
+
const extension = binaryTarget === "windows" ? ".exe" : "";
|
|
1637
|
+
const engineBinaryPath = join(cacheDirectoryPath, `query-engine-${binaryTarget}${extension}`);
|
|
1161
1638
|
if (this.#options.debug) {
|
|
1162
1639
|
console.debug("[Query Engine] binary path", engineBinaryPath);
|
|
1163
1640
|
}
|
|
@@ -344,7 +344,7 @@ import internals5 from "@prisma/internals";
|
|
|
344
344
|
import * as Checkpoint from "checkpoint-client";
|
|
345
345
|
|
|
346
346
|
// package.json
|
|
347
|
-
var version = "0.
|
|
347
|
+
var version = "0.5.0";
|
|
348
348
|
|
|
349
349
|
// src/platform/_lib/userAgent.ts
|
|
350
350
|
var debug = Debug("prisma:cli:platform:_lib:userAgent");
|