@kevisual/cli 0.1.20 → 0.1.22
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/assistant-opencode.js +945 -902
- package/dist/assistant-server.js +1248 -1140
- package/dist/assistant.js +938 -20454
- package/dist/envision.js +129 -79
- package/package.json +6 -6
|
@@ -5,39 +5,60 @@ var __defProp = Object.defineProperty;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
20
33
|
var __toCommonJS = (from) => {
|
|
21
|
-
var entry = __moduleCache.get(from), desc;
|
|
34
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
22
35
|
if (entry)
|
|
23
36
|
return entry;
|
|
24
37
|
entry = __defProp({}, "__esModule", { value: true });
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
+
for (var key of __getOwnPropNames(from))
|
|
40
|
+
if (!__hasOwnProp.call(entry, key))
|
|
41
|
+
__defProp(entry, key, {
|
|
42
|
+
get: __accessProp.bind(from, key),
|
|
43
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
44
|
+
});
|
|
45
|
+
}
|
|
30
46
|
__moduleCache.set(from, entry);
|
|
31
47
|
return entry;
|
|
32
48
|
};
|
|
49
|
+
var __moduleCache;
|
|
33
50
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
51
|
+
var __returnValue = (v) => v;
|
|
52
|
+
function __exportSetter(name, newValue) {
|
|
53
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
54
|
+
}
|
|
34
55
|
var __export = (target, all) => {
|
|
35
56
|
for (var name in all)
|
|
36
57
|
__defProp(target, name, {
|
|
37
58
|
get: all[name],
|
|
38
59
|
enumerable: true,
|
|
39
60
|
configurable: true,
|
|
40
|
-
set: (
|
|
61
|
+
set: __exportSetter.bind(all, name)
|
|
41
62
|
});
|
|
42
63
|
};
|
|
43
64
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -12338,10 +12359,10 @@ var require_send = __commonJS((exports, module) => {
|
|
|
12338
12359
|
var require_array = __commonJS((exports) => {
|
|
12339
12360
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12340
12361
|
exports.splitWhen = exports.flatten = undefined;
|
|
12341
|
-
function
|
|
12362
|
+
function flatten2(items) {
|
|
12342
12363
|
return items.reduce((collection, item) => [].concat(collection, item), []);
|
|
12343
12364
|
}
|
|
12344
|
-
exports.flatten =
|
|
12365
|
+
exports.flatten = flatten2;
|
|
12345
12366
|
function splitWhen(items, predicate) {
|
|
12346
12367
|
const result = [[]];
|
|
12347
12368
|
let groupIndex = 0;
|
|
@@ -12766,15 +12787,15 @@ var require_to_regex_range = __commonJS((exports, module) => {
|
|
|
12766
12787
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
12767
12788
|
* Released under the MIT License.
|
|
12768
12789
|
*/
|
|
12769
|
-
var
|
|
12790
|
+
var isNumber3 = require_is_number();
|
|
12770
12791
|
var toRegexRange = (min, max, options) => {
|
|
12771
|
-
if (
|
|
12792
|
+
if (isNumber3(min) === false) {
|
|
12772
12793
|
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
12773
12794
|
}
|
|
12774
12795
|
if (max === undefined || min === max) {
|
|
12775
12796
|
return String(min);
|
|
12776
12797
|
}
|
|
12777
|
-
if (
|
|
12798
|
+
if (isNumber3(max) === false) {
|
|
12778
12799
|
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
12779
12800
|
}
|
|
12780
12801
|
let opts = { relaxZeros: true, ...options };
|
|
@@ -12859,7 +12880,7 @@ var require_to_regex_range = __commonJS((exports, module) => {
|
|
|
12859
12880
|
if (start3 === stop3) {
|
|
12860
12881
|
return { pattern: start3, count: [], digits: 0 };
|
|
12861
12882
|
}
|
|
12862
|
-
let zipped =
|
|
12883
|
+
let zipped = zip2(start3, stop3);
|
|
12863
12884
|
let digits = zipped.length;
|
|
12864
12885
|
let pattern2 = "";
|
|
12865
12886
|
let count = 0;
|
|
@@ -12906,20 +12927,20 @@ var require_to_regex_range = __commonJS((exports, module) => {
|
|
|
12906
12927
|
}
|
|
12907
12928
|
return tokens;
|
|
12908
12929
|
}
|
|
12909
|
-
function filterPatterns(arr, comparison, prefix,
|
|
12930
|
+
function filterPatterns(arr, comparison, prefix, intersection3, options) {
|
|
12910
12931
|
let result = [];
|
|
12911
12932
|
for (let ele of arr) {
|
|
12912
12933
|
let { string: string5 } = ele;
|
|
12913
|
-
if (!
|
|
12934
|
+
if (!intersection3 && !contains(comparison, "string", string5)) {
|
|
12914
12935
|
result.push(prefix + string5);
|
|
12915
12936
|
}
|
|
12916
|
-
if (
|
|
12937
|
+
if (intersection3 && contains(comparison, "string", string5)) {
|
|
12917
12938
|
result.push(prefix + string5);
|
|
12918
12939
|
}
|
|
12919
12940
|
}
|
|
12920
12941
|
return result;
|
|
12921
12942
|
}
|
|
12922
|
-
function
|
|
12943
|
+
function zip2(a, b) {
|
|
12923
12944
|
let arr = [];
|
|
12924
12945
|
for (let i = 0;i < a.length; i++)
|
|
12925
12946
|
arr.push([a[i], b[i]]);
|
|
@@ -12990,7 +13011,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
12990
13011
|
var isValidValue = (value) => {
|
|
12991
13012
|
return typeof value === "number" || typeof value === "string" && value !== "";
|
|
12992
13013
|
};
|
|
12993
|
-
var
|
|
13014
|
+
var isNumber3 = (num) => Number.isInteger(+num);
|
|
12994
13015
|
var zeros = (input) => {
|
|
12995
13016
|
let value = `${input}`;
|
|
12996
13017
|
let index = -1;
|
|
@@ -13008,7 +13029,7 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
13008
13029
|
}
|
|
13009
13030
|
return options.stringify === true;
|
|
13010
13031
|
};
|
|
13011
|
-
var
|
|
13032
|
+
var pad2 = (input, maxLength, toNumber) => {
|
|
13012
13033
|
if (maxLength > 0) {
|
|
13013
13034
|
let dash = input[0] === "-" ? "-" : "";
|
|
13014
13035
|
if (dash)
|
|
@@ -13111,24 +13132,24 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
13111
13132
|
}
|
|
13112
13133
|
let parts = { negatives: [], positives: [] };
|
|
13113
13134
|
let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
|
|
13114
|
-
let
|
|
13135
|
+
let range2 = [];
|
|
13115
13136
|
let index = 0;
|
|
13116
13137
|
while (descending ? a >= b : a <= b) {
|
|
13117
13138
|
if (options.toRegex === true && step > 1) {
|
|
13118
13139
|
push(a);
|
|
13119
13140
|
} else {
|
|
13120
|
-
|
|
13141
|
+
range2.push(pad2(format(a, index), maxLen, toNumber));
|
|
13121
13142
|
}
|
|
13122
13143
|
a = descending ? a - step : a + step;
|
|
13123
13144
|
index++;
|
|
13124
13145
|
}
|
|
13125
13146
|
if (options.toRegex === true) {
|
|
13126
|
-
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(
|
|
13147
|
+
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range2, null, { wrap: false, ...options });
|
|
13127
13148
|
}
|
|
13128
|
-
return
|
|
13149
|
+
return range2;
|
|
13129
13150
|
};
|
|
13130
13151
|
var fillLetters = (start3, end, step = 1, options = {}) => {
|
|
13131
|
-
if (!
|
|
13152
|
+
if (!isNumber3(start3) && start3.length > 1 || !isNumber3(end) && end.length > 1) {
|
|
13132
13153
|
return invalidRange(start3, end, options);
|
|
13133
13154
|
}
|
|
13134
13155
|
let format = options.transform || ((val) => String.fromCharCode(val));
|
|
@@ -13140,19 +13161,19 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
13140
13161
|
if (options.toRegex && step === 1) {
|
|
13141
13162
|
return toRange(min, max, false, options);
|
|
13142
13163
|
}
|
|
13143
|
-
let
|
|
13164
|
+
let range2 = [];
|
|
13144
13165
|
let index = 0;
|
|
13145
13166
|
while (descending ? a >= b : a <= b) {
|
|
13146
|
-
|
|
13167
|
+
range2.push(format(a, index));
|
|
13147
13168
|
a = descending ? a - step : a + step;
|
|
13148
13169
|
index++;
|
|
13149
13170
|
}
|
|
13150
13171
|
if (options.toRegex === true) {
|
|
13151
|
-
return toRegex(
|
|
13172
|
+
return toRegex(range2, null, { wrap: false, options });
|
|
13152
13173
|
}
|
|
13153
|
-
return
|
|
13174
|
+
return range2;
|
|
13154
13175
|
};
|
|
13155
|
-
var
|
|
13176
|
+
var fill2 = (start3, end, step, options = {}) => {
|
|
13156
13177
|
if (end == null && isValidValue(start3)) {
|
|
13157
13178
|
return [start3];
|
|
13158
13179
|
}
|
|
@@ -13160,31 +13181,31 @@ var require_fill_range = __commonJS((exports, module) => {
|
|
|
13160
13181
|
return invalidRange(start3, end, options);
|
|
13161
13182
|
}
|
|
13162
13183
|
if (typeof step === "function") {
|
|
13163
|
-
return
|
|
13184
|
+
return fill2(start3, end, 1, { transform: step });
|
|
13164
13185
|
}
|
|
13165
13186
|
if (isObject3(step)) {
|
|
13166
|
-
return
|
|
13187
|
+
return fill2(start3, end, 0, step);
|
|
13167
13188
|
}
|
|
13168
13189
|
let opts = { ...options };
|
|
13169
13190
|
if (opts.capture === true)
|
|
13170
13191
|
opts.wrap = true;
|
|
13171
13192
|
step = step || opts.step || 1;
|
|
13172
|
-
if (!
|
|
13193
|
+
if (!isNumber3(step)) {
|
|
13173
13194
|
if (step != null && !isObject3(step))
|
|
13174
13195
|
return invalidStep(step, opts);
|
|
13175
|
-
return
|
|
13196
|
+
return fill2(start3, end, 1, step);
|
|
13176
13197
|
}
|
|
13177
|
-
if (
|
|
13198
|
+
if (isNumber3(start3) && isNumber3(end)) {
|
|
13178
13199
|
return fillNumbers(start3, end, step, opts);
|
|
13179
13200
|
}
|
|
13180
13201
|
return fillLetters(start3, end, Math.max(Math.abs(step), 1), opts);
|
|
13181
13202
|
};
|
|
13182
|
-
module.exports =
|
|
13203
|
+
module.exports = fill2;
|
|
13183
13204
|
});
|
|
13184
13205
|
|
|
13185
13206
|
// ../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js
|
|
13186
13207
|
var require_compile = __commonJS((exports, module) => {
|
|
13187
|
-
var
|
|
13208
|
+
var fill2 = require_fill_range();
|
|
13188
13209
|
var utils2 = require_utils();
|
|
13189
13210
|
var compile = (ast, options = {}) => {
|
|
13190
13211
|
const walk = (node, parent = {}) => {
|
|
@@ -13214,9 +13235,9 @@ var require_compile = __commonJS((exports, module) => {
|
|
|
13214
13235
|
}
|
|
13215
13236
|
if (node.nodes && node.ranges > 0) {
|
|
13216
13237
|
const args2 = utils2.reduce(node.nodes);
|
|
13217
|
-
const
|
|
13218
|
-
if (
|
|
13219
|
-
return args2.length > 1 &&
|
|
13238
|
+
const range2 = fill2(...args2, { ...options, wrap: false, toRegex: true, strictZeros: true });
|
|
13239
|
+
if (range2.length !== 0) {
|
|
13240
|
+
return args2.length > 1 && range2.length > 1 ? `(${range2})` : range2;
|
|
13220
13241
|
}
|
|
13221
13242
|
}
|
|
13222
13243
|
if (node.nodes) {
|
|
@@ -13233,7 +13254,7 @@ var require_compile = __commonJS((exports, module) => {
|
|
|
13233
13254
|
|
|
13234
13255
|
// ../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js
|
|
13235
13256
|
var require_expand = __commonJS((exports, module) => {
|
|
13236
|
-
var
|
|
13257
|
+
var fill2 = require_fill_range();
|
|
13237
13258
|
var stringify2 = require_stringify();
|
|
13238
13259
|
var utils2 = require_utils();
|
|
13239
13260
|
var append = (queue2 = "", stash = "", enclose = false) => {
|
|
@@ -13283,11 +13304,11 @@ var require_expand = __commonJS((exports, module) => {
|
|
|
13283
13304
|
if (utils2.exceedsLimit(...args2, options.step, rangeLimit)) {
|
|
13284
13305
|
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
13285
13306
|
}
|
|
13286
|
-
let
|
|
13287
|
-
if (
|
|
13288
|
-
|
|
13307
|
+
let range2 = fill2(...args2, options);
|
|
13308
|
+
if (range2.length === 0) {
|
|
13309
|
+
range2 = stringify2(node, options);
|
|
13289
13310
|
}
|
|
13290
|
-
q.push(append(q.pop(),
|
|
13311
|
+
q.push(append(q.pop(), range2));
|
|
13291
13312
|
node.nodes = [];
|
|
13292
13313
|
return;
|
|
13293
13314
|
}
|
|
@@ -13568,9 +13589,9 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
13568
13589
|
}
|
|
13569
13590
|
if (prev.type === "range") {
|
|
13570
13591
|
siblings.pop();
|
|
13571
|
-
const
|
|
13572
|
-
|
|
13573
|
-
prev =
|
|
13592
|
+
const before2 = siblings[siblings.length - 1];
|
|
13593
|
+
before2.value += prev.value + value;
|
|
13594
|
+
prev = before2;
|
|
13574
13595
|
block.ranges--;
|
|
13575
13596
|
continue;
|
|
13576
13597
|
}
|
|
@@ -14285,7 +14306,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14285
14306
|
state.output += token.output != null ? token.output : token.value;
|
|
14286
14307
|
consume(token.value);
|
|
14287
14308
|
};
|
|
14288
|
-
const
|
|
14309
|
+
const negate2 = () => {
|
|
14289
14310
|
let count = 1;
|
|
14290
14311
|
while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
|
|
14291
14312
|
advance();
|
|
@@ -14346,7 +14367,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14346
14367
|
};
|
|
14347
14368
|
const extglobClose = (token) => {
|
|
14348
14369
|
let output = token.close + (opts.capture ? ")" : "");
|
|
14349
|
-
let
|
|
14370
|
+
let rest2;
|
|
14350
14371
|
if (token.type === "negate") {
|
|
14351
14372
|
let extglobStar = star;
|
|
14352
14373
|
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
|
|
@@ -14355,8 +14376,8 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14355
14376
|
if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
|
|
14356
14377
|
output = token.close = `)$))${extglobStar}`;
|
|
14357
14378
|
}
|
|
14358
|
-
if (token.inner.includes("*") && (
|
|
14359
|
-
const expression = parse2(
|
|
14379
|
+
if (token.inner.includes("*") && (rest2 = remaining()) && /^\.[^\\/.]+$/.test(rest2)) {
|
|
14380
|
+
const expression = parse2(rest2, { ...options, fastpaths: false }).output;
|
|
14360
14381
|
output = token.close = `)${expression})${extglobStar})`;
|
|
14361
14382
|
}
|
|
14362
14383
|
if (token.prev.type === "bos") {
|
|
@@ -14368,17 +14389,17 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14368
14389
|
};
|
|
14369
14390
|
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
14370
14391
|
let backslashes = false;
|
|
14371
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc2, chars, first,
|
|
14392
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc2, chars, first, rest2, index) => {
|
|
14372
14393
|
if (first === "\\") {
|
|
14373
14394
|
backslashes = true;
|
|
14374
14395
|
return m;
|
|
14375
14396
|
}
|
|
14376
14397
|
if (first === "?") {
|
|
14377
14398
|
if (esc2) {
|
|
14378
|
-
return esc2 + first + (
|
|
14399
|
+
return esc2 + first + (rest2 ? QMARK.repeat(rest2.length) : "");
|
|
14379
14400
|
}
|
|
14380
14401
|
if (index === 0) {
|
|
14381
|
-
return qmarkNoDot + (
|
|
14402
|
+
return qmarkNoDot + (rest2 ? QMARK.repeat(rest2.length) : "");
|
|
14382
14403
|
}
|
|
14383
14404
|
return QMARK.repeat(chars.length);
|
|
14384
14405
|
}
|
|
@@ -14387,7 +14408,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14387
14408
|
}
|
|
14388
14409
|
if (first === "*") {
|
|
14389
14410
|
if (esc2) {
|
|
14390
|
-
return esc2 + first + (
|
|
14411
|
+
return esc2 + first + (rest2 ? star : "");
|
|
14391
14412
|
}
|
|
14392
14413
|
return star;
|
|
14393
14414
|
}
|
|
@@ -14454,8 +14475,8 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14454
14475
|
if (inner.includes(":")) {
|
|
14455
14476
|
const idx = prev.value.lastIndexOf("[");
|
|
14456
14477
|
const pre = prev.value.slice(0, idx);
|
|
14457
|
-
const
|
|
14458
|
-
const posix = POSIX_REGEX_SOURCE[
|
|
14478
|
+
const rest3 = prev.value.slice(idx + 2);
|
|
14479
|
+
const posix = POSIX_REGEX_SOURCE[rest3];
|
|
14459
14480
|
if (posix) {
|
|
14460
14481
|
prev.value = pre + posix;
|
|
14461
14482
|
state.backtrack = true;
|
|
@@ -14579,17 +14600,17 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14579
14600
|
let output = ")";
|
|
14580
14601
|
if (brace.dots === true) {
|
|
14581
14602
|
const arr = tokens.slice();
|
|
14582
|
-
const
|
|
14603
|
+
const range2 = [];
|
|
14583
14604
|
for (let i = arr.length - 1;i >= 0; i--) {
|
|
14584
14605
|
tokens.pop();
|
|
14585
14606
|
if (arr[i].type === "brace") {
|
|
14586
14607
|
break;
|
|
14587
14608
|
}
|
|
14588
14609
|
if (arr[i].type !== "dots") {
|
|
14589
|
-
|
|
14610
|
+
range2.unshift(arr[i].value);
|
|
14590
14611
|
}
|
|
14591
14612
|
}
|
|
14592
|
-
output = expandRange(
|
|
14613
|
+
output = expandRange(range2, opts);
|
|
14593
14614
|
state.backtrack = true;
|
|
14594
14615
|
}
|
|
14595
14616
|
if (brace.comma !== true && brace.dots !== true) {
|
|
@@ -14687,7 +14708,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14687
14708
|
}
|
|
14688
14709
|
}
|
|
14689
14710
|
if (opts.nonegate !== true && state.index === 0) {
|
|
14690
|
-
|
|
14711
|
+
negate2();
|
|
14691
14712
|
continue;
|
|
14692
14713
|
}
|
|
14693
14714
|
}
|
|
@@ -14737,8 +14758,8 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14737
14758
|
consume(value);
|
|
14738
14759
|
continue;
|
|
14739
14760
|
}
|
|
14740
|
-
let
|
|
14741
|
-
if (opts.noextglob !== true && /^\([^?]/.test(
|
|
14761
|
+
let rest2 = remaining();
|
|
14762
|
+
if (opts.noextglob !== true && /^\([^?]/.test(rest2)) {
|
|
14742
14763
|
extglobOpen("star", value);
|
|
14743
14764
|
continue;
|
|
14744
14765
|
}
|
|
@@ -14748,10 +14769,10 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14748
14769
|
continue;
|
|
14749
14770
|
}
|
|
14750
14771
|
const prior = prev.prev;
|
|
14751
|
-
const
|
|
14772
|
+
const before2 = prior.prev;
|
|
14752
14773
|
const isStart = prior.type === "slash" || prior.type === "bos";
|
|
14753
|
-
const afterStar =
|
|
14754
|
-
if (opts.bash === true && (!isStart ||
|
|
14774
|
+
const afterStar = before2 && (before2.type === "star" || before2.type === "globstar");
|
|
14775
|
+
if (opts.bash === true && (!isStart || rest2[0] && rest2[0] !== "/")) {
|
|
14755
14776
|
push({ type: "star", value, output: "" });
|
|
14756
14777
|
continue;
|
|
14757
14778
|
}
|
|
@@ -14761,12 +14782,12 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14761
14782
|
push({ type: "star", value, output: "" });
|
|
14762
14783
|
continue;
|
|
14763
14784
|
}
|
|
14764
|
-
while (
|
|
14765
|
-
const
|
|
14766
|
-
if (
|
|
14785
|
+
while (rest2.slice(0, 3) === "/**") {
|
|
14786
|
+
const after2 = input[state.index + 4];
|
|
14787
|
+
if (after2 && after2 !== "/") {
|
|
14767
14788
|
break;
|
|
14768
14789
|
}
|
|
14769
|
-
|
|
14790
|
+
rest2 = rest2.slice(3);
|
|
14770
14791
|
consume("/**", 3);
|
|
14771
14792
|
}
|
|
14772
14793
|
if (prior.type === "bos" && eos()) {
|
|
@@ -14789,8 +14810,8 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14789
14810
|
consume(value);
|
|
14790
14811
|
continue;
|
|
14791
14812
|
}
|
|
14792
|
-
if (prior.type === "slash" && prior.prev.type !== "bos" &&
|
|
14793
|
-
const end =
|
|
14813
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && rest2[0] === "/") {
|
|
14814
|
+
const end = rest2[1] !== undefined ? "|$" : "";
|
|
14794
14815
|
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
14795
14816
|
prior.output = `(?:${prior.output}`;
|
|
14796
14817
|
prev.type = "globstar";
|
|
@@ -14802,7 +14823,7 @@ var require_parse2 = __commonJS((exports, module) => {
|
|
|
14802
14823
|
push({ type: "slash", value: "/", output: "" });
|
|
14803
14824
|
continue;
|
|
14804
14825
|
}
|
|
14805
|
-
if (prior.type === "bos" &&
|
|
14826
|
+
if (prior.type === "bos" && rest2[0] === "/") {
|
|
14806
14827
|
prev.type = "globstar";
|
|
14807
14828
|
prev.value += value;
|
|
14808
14829
|
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
|
|
@@ -15112,7 +15133,7 @@ var require_micromatch = __commonJS((exports, module) => {
|
|
|
15112
15133
|
var micromatch = (list3, patterns, options) => {
|
|
15113
15134
|
patterns = [].concat(patterns);
|
|
15114
15135
|
list3 = [].concat(list3);
|
|
15115
|
-
let
|
|
15136
|
+
let omit3 = new Set;
|
|
15116
15137
|
let keep = new Set;
|
|
15117
15138
|
let items = new Set;
|
|
15118
15139
|
let negatives = 0;
|
|
@@ -15133,15 +15154,15 @@ var require_micromatch = __commonJS((exports, module) => {
|
|
|
15133
15154
|
if (!match)
|
|
15134
15155
|
continue;
|
|
15135
15156
|
if (negated) {
|
|
15136
|
-
|
|
15157
|
+
omit3.add(matched.output);
|
|
15137
15158
|
} else {
|
|
15138
|
-
|
|
15159
|
+
omit3.delete(matched.output);
|
|
15139
15160
|
keep.add(matched.output);
|
|
15140
15161
|
}
|
|
15141
15162
|
}
|
|
15142
15163
|
}
|
|
15143
15164
|
let result = negatives === patterns.length ? [...items] : [...keep];
|
|
15144
|
-
let matches = result.filter((item) => !
|
|
15165
|
+
let matches = result.filter((item) => !omit3.has(item));
|
|
15145
15166
|
if (options && matches.length === 0) {
|
|
15146
15167
|
if (options.failglob === true) {
|
|
15147
15168
|
throw new Error(`No matches found for "${patterns.join(", ")}"`);
|
|
@@ -15564,10 +15585,10 @@ var require_stream2 = __commonJS((exports) => {
|
|
|
15564
15585
|
var require_string = __commonJS((exports) => {
|
|
15565
15586
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15566
15587
|
exports.isEmpty = exports.isString = undefined;
|
|
15567
|
-
function
|
|
15588
|
+
function isString2(input) {
|
|
15568
15589
|
return typeof input === "string";
|
|
15569
15590
|
}
|
|
15570
|
-
exports.isString =
|
|
15591
|
+
exports.isString = isString2;
|
|
15571
15592
|
function isEmpty(input) {
|
|
15572
15593
|
return input === "";
|
|
15573
15594
|
}
|
|
@@ -16177,22 +16198,22 @@ var require_out2 = __commonJS((exports) => {
|
|
|
16177
16198
|
// ../node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.js
|
|
16178
16199
|
var require_reusify = __commonJS((exports, module) => {
|
|
16179
16200
|
function reusify(Constructor) {
|
|
16180
|
-
var
|
|
16181
|
-
var
|
|
16201
|
+
var head2 = new Constructor;
|
|
16202
|
+
var tail2 = head2;
|
|
16182
16203
|
function get() {
|
|
16183
|
-
var current =
|
|
16204
|
+
var current = head2;
|
|
16184
16205
|
if (current.next) {
|
|
16185
|
-
|
|
16206
|
+
head2 = current.next;
|
|
16186
16207
|
} else {
|
|
16187
|
-
|
|
16188
|
-
|
|
16208
|
+
head2 = new Constructor;
|
|
16209
|
+
tail2 = head2;
|
|
16189
16210
|
}
|
|
16190
16211
|
current.next = null;
|
|
16191
16212
|
return current;
|
|
16192
16213
|
}
|
|
16193
16214
|
function release(obj) {
|
|
16194
|
-
|
|
16195
|
-
|
|
16215
|
+
tail2.next = obj;
|
|
16216
|
+
tail2 = obj;
|
|
16196
16217
|
}
|
|
16197
16218
|
return {
|
|
16198
16219
|
get,
|
|
@@ -16221,8 +16242,8 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16221
16242
|
var errorHandler = null;
|
|
16222
16243
|
var self2 = {
|
|
16223
16244
|
push,
|
|
16224
|
-
drain:
|
|
16225
|
-
saturated:
|
|
16245
|
+
drain: noop2,
|
|
16246
|
+
saturated: noop2,
|
|
16226
16247
|
pause,
|
|
16227
16248
|
paused: false,
|
|
16228
16249
|
get concurrency() {
|
|
@@ -16246,7 +16267,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16246
16267
|
length,
|
|
16247
16268
|
getQueue,
|
|
16248
16269
|
unshift,
|
|
16249
|
-
empty:
|
|
16270
|
+
empty: noop2,
|
|
16250
16271
|
kill,
|
|
16251
16272
|
killAndDrain,
|
|
16252
16273
|
error: error49
|
|
@@ -16298,7 +16319,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16298
16319
|
current.context = context;
|
|
16299
16320
|
current.release = release;
|
|
16300
16321
|
current.value = value;
|
|
16301
|
-
current.callback = done ||
|
|
16322
|
+
current.callback = done || noop2;
|
|
16302
16323
|
current.errorHandler = errorHandler;
|
|
16303
16324
|
if (_running >= _concurrency || self2.paused) {
|
|
16304
16325
|
if (queueTail) {
|
|
@@ -16319,7 +16340,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16319
16340
|
current.context = context;
|
|
16320
16341
|
current.release = release;
|
|
16321
16342
|
current.value = value;
|
|
16322
|
-
current.callback = done ||
|
|
16343
|
+
current.callback = done || noop2;
|
|
16323
16344
|
current.errorHandler = errorHandler;
|
|
16324
16345
|
if (_running >= _concurrency || self2.paused) {
|
|
16325
16346
|
if (queueHead) {
|
|
@@ -16361,24 +16382,24 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16361
16382
|
function kill() {
|
|
16362
16383
|
queueHead = null;
|
|
16363
16384
|
queueTail = null;
|
|
16364
|
-
self2.drain =
|
|
16385
|
+
self2.drain = noop2;
|
|
16365
16386
|
}
|
|
16366
16387
|
function killAndDrain() {
|
|
16367
16388
|
queueHead = null;
|
|
16368
16389
|
queueTail = null;
|
|
16369
16390
|
self2.drain();
|
|
16370
|
-
self2.drain =
|
|
16391
|
+
self2.drain = noop2;
|
|
16371
16392
|
}
|
|
16372
16393
|
function error49(handler) {
|
|
16373
16394
|
errorHandler = handler;
|
|
16374
16395
|
}
|
|
16375
16396
|
}
|
|
16376
|
-
function
|
|
16397
|
+
function noop2() {}
|
|
16377
16398
|
function Task() {
|
|
16378
16399
|
this.value = null;
|
|
16379
|
-
this.callback =
|
|
16400
|
+
this.callback = noop2;
|
|
16380
16401
|
this.next = null;
|
|
16381
|
-
this.release =
|
|
16402
|
+
this.release = noop2;
|
|
16382
16403
|
this.context = null;
|
|
16383
16404
|
this.errorHandler = null;
|
|
16384
16405
|
var self2 = this;
|
|
@@ -16387,7 +16408,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16387
16408
|
var errorHandler = self2.errorHandler;
|
|
16388
16409
|
var val = self2.value;
|
|
16389
16410
|
self2.value = null;
|
|
16390
|
-
self2.callback =
|
|
16411
|
+
self2.callback = noop2;
|
|
16391
16412
|
if (self2.errorHandler) {
|
|
16392
16413
|
errorHandler(err, val);
|
|
16393
16414
|
}
|
|
@@ -16423,7 +16444,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16423
16444
|
resolve(result);
|
|
16424
16445
|
});
|
|
16425
16446
|
});
|
|
16426
|
-
p.catch(
|
|
16447
|
+
p.catch(noop2);
|
|
16427
16448
|
return p;
|
|
16428
16449
|
}
|
|
16429
16450
|
function unshift(value) {
|
|
@@ -16436,7 +16457,7 @@ var require_queue = __commonJS((exports, module) => {
|
|
|
16436
16457
|
resolve(result);
|
|
16437
16458
|
});
|
|
16438
16459
|
});
|
|
16439
|
-
p.catch(
|
|
16460
|
+
p.catch(noop2);
|
|
16440
16461
|
return p;
|
|
16441
16462
|
}
|
|
16442
16463
|
function drained() {
|
|
@@ -17585,16 +17606,16 @@ var require_eventemitter32 = __commonJS((exports, module) => {
|
|
|
17585
17606
|
if (!new Events().__proto__)
|
|
17586
17607
|
prefix = false;
|
|
17587
17608
|
}
|
|
17588
|
-
function EE(fn, context,
|
|
17609
|
+
function EE(fn, context, once2) {
|
|
17589
17610
|
this.fn = fn;
|
|
17590
17611
|
this.context = context;
|
|
17591
|
-
this.once =
|
|
17612
|
+
this.once = once2 || false;
|
|
17592
17613
|
}
|
|
17593
|
-
function addListener(emitter, event, fn, context,
|
|
17614
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
17594
17615
|
if (typeof fn !== "function") {
|
|
17595
17616
|
throw new TypeError("The listener must be a function");
|
|
17596
17617
|
}
|
|
17597
|
-
var listener = new EE(fn, context || emitter,
|
|
17618
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
17598
17619
|
if (!emitter._events[evt])
|
|
17599
17620
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
17600
17621
|
else if (!emitter._events[evt].fn)
|
|
@@ -17703,10 +17724,10 @@ var require_eventemitter32 = __commonJS((exports, module) => {
|
|
|
17703
17724
|
EventEmitter2.prototype.on = function on(event, fn, context) {
|
|
17704
17725
|
return addListener(this, event, fn, context, false);
|
|
17705
17726
|
};
|
|
17706
|
-
EventEmitter2.prototype.once = function
|
|
17727
|
+
EventEmitter2.prototype.once = function once2(event, fn, context) {
|
|
17707
17728
|
return addListener(this, event, fn, context, true);
|
|
17708
17729
|
};
|
|
17709
|
-
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context,
|
|
17730
|
+
EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
17710
17731
|
var evt = prefix ? prefix + event : event;
|
|
17711
17732
|
if (!this._events[evt])
|
|
17712
17733
|
return this;
|
|
@@ -17716,12 +17737,12 @@ var require_eventemitter32 = __commonJS((exports, module) => {
|
|
|
17716
17737
|
}
|
|
17717
17738
|
var listeners = this._events[evt];
|
|
17718
17739
|
if (listeners.fn) {
|
|
17719
|
-
if (listeners.fn === fn && (!
|
|
17740
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
17720
17741
|
clearEvent(this, evt);
|
|
17721
17742
|
}
|
|
17722
17743
|
} else {
|
|
17723
17744
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
17724
|
-
if (listeners[i].fn !== fn ||
|
|
17745
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
17725
17746
|
events.push(listeners[i]);
|
|
17726
17747
|
}
|
|
17727
17748
|
}
|
|
@@ -18526,25 +18547,25 @@ var require_range = __commonJS((exports, module) => {
|
|
|
18526
18547
|
var SPACE_CHARACTERS = /\s+/g;
|
|
18527
18548
|
|
|
18528
18549
|
class Range {
|
|
18529
|
-
constructor(
|
|
18550
|
+
constructor(range2, options) {
|
|
18530
18551
|
options = parseOptions(options);
|
|
18531
|
-
if (
|
|
18532
|
-
if (
|
|
18533
|
-
return
|
|
18552
|
+
if (range2 instanceof Range) {
|
|
18553
|
+
if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) {
|
|
18554
|
+
return range2;
|
|
18534
18555
|
} else {
|
|
18535
|
-
return new Range(
|
|
18556
|
+
return new Range(range2.raw, options);
|
|
18536
18557
|
}
|
|
18537
18558
|
}
|
|
18538
|
-
if (
|
|
18539
|
-
this.raw =
|
|
18540
|
-
this.set = [[
|
|
18559
|
+
if (range2 instanceof Comparator) {
|
|
18560
|
+
this.raw = range2.value;
|
|
18561
|
+
this.set = [[range2]];
|
|
18541
18562
|
this.formatted = undefined;
|
|
18542
18563
|
return this;
|
|
18543
18564
|
}
|
|
18544
18565
|
this.options = options;
|
|
18545
18566
|
this.loose = !!options.loose;
|
|
18546
18567
|
this.includePrerelease = !!options.includePrerelease;
|
|
18547
|
-
this.raw =
|
|
18568
|
+
this.raw = range2.trim().replace(SPACE_CHARACTERS, " ");
|
|
18548
18569
|
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
18549
18570
|
if (!this.set.length) {
|
|
18550
18571
|
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
@@ -18589,24 +18610,24 @@ var require_range = __commonJS((exports, module) => {
|
|
|
18589
18610
|
toString() {
|
|
18590
18611
|
return this.range;
|
|
18591
18612
|
}
|
|
18592
|
-
parseRange(
|
|
18613
|
+
parseRange(range2) {
|
|
18593
18614
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
18594
|
-
const memoKey = memoOpts + ":" +
|
|
18615
|
+
const memoKey = memoOpts + ":" + range2;
|
|
18595
18616
|
const cached4 = cache2.get(memoKey);
|
|
18596
18617
|
if (cached4) {
|
|
18597
18618
|
return cached4;
|
|
18598
18619
|
}
|
|
18599
18620
|
const loose = this.options.loose;
|
|
18600
18621
|
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
18601
|
-
|
|
18602
|
-
debug("hyphen replace",
|
|
18603
|
-
|
|
18604
|
-
debug("comparator trim",
|
|
18605
|
-
|
|
18606
|
-
debug("tilde trim",
|
|
18607
|
-
|
|
18608
|
-
debug("caret trim",
|
|
18609
|
-
let rangeList =
|
|
18622
|
+
range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
18623
|
+
debug("hyphen replace", range2);
|
|
18624
|
+
range2 = range2.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
18625
|
+
debug("comparator trim", range2);
|
|
18626
|
+
range2 = range2.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
18627
|
+
debug("tilde trim", range2);
|
|
18628
|
+
range2 = range2.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
18629
|
+
debug("caret trim", range2);
|
|
18630
|
+
let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
18610
18631
|
if (loose) {
|
|
18611
18632
|
rangeList = rangeList.filter((comp) => {
|
|
18612
18633
|
debug("loose invalid filter", comp, this.options);
|
|
@@ -18629,12 +18650,12 @@ var require_range = __commonJS((exports, module) => {
|
|
|
18629
18650
|
cache2.set(memoKey, result);
|
|
18630
18651
|
return result;
|
|
18631
18652
|
}
|
|
18632
|
-
intersects(
|
|
18633
|
-
if (!(
|
|
18653
|
+
intersects(range2, options) {
|
|
18654
|
+
if (!(range2 instanceof Range)) {
|
|
18634
18655
|
throw new TypeError("a Range is required");
|
|
18635
18656
|
}
|
|
18636
18657
|
return this.set.some((thisComparators) => {
|
|
18637
|
-
return isSatisfiable(thisComparators, options) &&
|
|
18658
|
+
return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => {
|
|
18638
18659
|
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
18639
18660
|
return rangeComparators.every((rangeComparator) => {
|
|
18640
18661
|
return thisComparator.intersects(rangeComparator, options);
|
|
@@ -19009,13 +19030,13 @@ var require_comparator = __commonJS((exports, module) => {
|
|
|
19009
19030
|
// ../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js
|
|
19010
19031
|
var require_satisfies = __commonJS((exports, module) => {
|
|
19011
19032
|
var Range = require_range();
|
|
19012
|
-
var satisfies = (version4,
|
|
19033
|
+
var satisfies = (version4, range2, options) => {
|
|
19013
19034
|
try {
|
|
19014
|
-
|
|
19035
|
+
range2 = new Range(range2, options);
|
|
19015
19036
|
} catch (er) {
|
|
19016
19037
|
return false;
|
|
19017
19038
|
}
|
|
19018
|
-
return
|
|
19039
|
+
return range2.test(version4);
|
|
19019
19040
|
};
|
|
19020
19041
|
module.exports = satisfies;
|
|
19021
19042
|
});
|
|
@@ -19023,7 +19044,7 @@ var require_satisfies = __commonJS((exports, module) => {
|
|
|
19023
19044
|
// ../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/to-comparators.js
|
|
19024
19045
|
var require_to_comparators = __commonJS((exports, module) => {
|
|
19025
19046
|
var Range = require_range();
|
|
19026
|
-
var toComparators = (
|
|
19047
|
+
var toComparators = (range2, options) => new Range(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
19027
19048
|
module.exports = toComparators;
|
|
19028
19049
|
});
|
|
19029
19050
|
|
|
@@ -19031,12 +19052,12 @@ var require_to_comparators = __commonJS((exports, module) => {
|
|
|
19031
19052
|
var require_max_satisfying = __commonJS((exports, module) => {
|
|
19032
19053
|
var SemVer = require_semver();
|
|
19033
19054
|
var Range = require_range();
|
|
19034
|
-
var maxSatisfying = (versions2,
|
|
19055
|
+
var maxSatisfying = (versions2, range2, options) => {
|
|
19035
19056
|
let max = null;
|
|
19036
19057
|
let maxSV = null;
|
|
19037
19058
|
let rangeObj = null;
|
|
19038
19059
|
try {
|
|
19039
|
-
rangeObj = new Range(
|
|
19060
|
+
rangeObj = new Range(range2, options);
|
|
19040
19061
|
} catch (er) {
|
|
19041
19062
|
return null;
|
|
19042
19063
|
}
|
|
@@ -19057,12 +19078,12 @@ var require_max_satisfying = __commonJS((exports, module) => {
|
|
|
19057
19078
|
var require_min_satisfying = __commonJS((exports, module) => {
|
|
19058
19079
|
var SemVer = require_semver();
|
|
19059
19080
|
var Range = require_range();
|
|
19060
|
-
var minSatisfying = (versions2,
|
|
19081
|
+
var minSatisfying = (versions2, range2, options) => {
|
|
19061
19082
|
let min = null;
|
|
19062
19083
|
let minSV = null;
|
|
19063
19084
|
let rangeObj = null;
|
|
19064
19085
|
try {
|
|
19065
|
-
rangeObj = new Range(
|
|
19086
|
+
rangeObj = new Range(range2, options);
|
|
19066
19087
|
} catch (er) {
|
|
19067
19088
|
return null;
|
|
19068
19089
|
}
|
|
@@ -19084,19 +19105,19 @@ var require_min_version = __commonJS((exports, module) => {
|
|
|
19084
19105
|
var SemVer = require_semver();
|
|
19085
19106
|
var Range = require_range();
|
|
19086
19107
|
var gt3 = require_gt();
|
|
19087
|
-
var minVersion = (
|
|
19088
|
-
|
|
19108
|
+
var minVersion = (range2, loose) => {
|
|
19109
|
+
range2 = new Range(range2, loose);
|
|
19089
19110
|
let minver = new SemVer("0.0.0");
|
|
19090
|
-
if (
|
|
19111
|
+
if (range2.test(minver)) {
|
|
19091
19112
|
return minver;
|
|
19092
19113
|
}
|
|
19093
19114
|
minver = new SemVer("0.0.0-0");
|
|
19094
|
-
if (
|
|
19115
|
+
if (range2.test(minver)) {
|
|
19095
19116
|
return minver;
|
|
19096
19117
|
}
|
|
19097
19118
|
minver = null;
|
|
19098
|
-
for (let i = 0;i <
|
|
19099
|
-
const comparators =
|
|
19119
|
+
for (let i = 0;i < range2.set.length; ++i) {
|
|
19120
|
+
const comparators = range2.set[i];
|
|
19100
19121
|
let setMin = null;
|
|
19101
19122
|
comparators.forEach((comparator) => {
|
|
19102
19123
|
const compver = new SemVer(comparator.semver.version);
|
|
@@ -19125,7 +19146,7 @@ var require_min_version = __commonJS((exports, module) => {
|
|
|
19125
19146
|
minver = setMin;
|
|
19126
19147
|
}
|
|
19127
19148
|
}
|
|
19128
|
-
if (minver &&
|
|
19149
|
+
if (minver && range2.test(minver)) {
|
|
19129
19150
|
return minver;
|
|
19130
19151
|
}
|
|
19131
19152
|
return null;
|
|
@@ -19136,9 +19157,9 @@ var require_min_version = __commonJS((exports, module) => {
|
|
|
19136
19157
|
// ../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/valid.js
|
|
19137
19158
|
var require_valid2 = __commonJS((exports, module) => {
|
|
19138
19159
|
var Range = require_range();
|
|
19139
|
-
var validRange = (
|
|
19160
|
+
var validRange = (range2, options) => {
|
|
19140
19161
|
try {
|
|
19141
|
-
return new Range(
|
|
19162
|
+
return new Range(range2, options).range || "*";
|
|
19142
19163
|
} catch (er) {
|
|
19143
19164
|
return null;
|
|
19144
19165
|
}
|
|
@@ -19157,9 +19178,9 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
19157
19178
|
var lt = require_lt();
|
|
19158
19179
|
var lte = require_lte();
|
|
19159
19180
|
var gte = require_gte();
|
|
19160
|
-
var outside = (version4,
|
|
19181
|
+
var outside = (version4, range2, hilo, options) => {
|
|
19161
19182
|
version4 = new SemVer(version4, options);
|
|
19162
|
-
|
|
19183
|
+
range2 = new Range(range2, options);
|
|
19163
19184
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
19164
19185
|
switch (hilo) {
|
|
19165
19186
|
case ">":
|
|
@@ -19179,11 +19200,11 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
19179
19200
|
default:
|
|
19180
19201
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
19181
19202
|
}
|
|
19182
|
-
if (satisfies(version4,
|
|
19203
|
+
if (satisfies(version4, range2, options)) {
|
|
19183
19204
|
return false;
|
|
19184
19205
|
}
|
|
19185
|
-
for (let i = 0;i <
|
|
19186
|
-
const comparators =
|
|
19206
|
+
for (let i = 0;i < range2.set.length; ++i) {
|
|
19207
|
+
const comparators = range2.set[i];
|
|
19187
19208
|
let high = null;
|
|
19188
19209
|
let low = null;
|
|
19189
19210
|
comparators.forEach((comparator) => {
|
|
@@ -19215,14 +19236,14 @@ var require_outside = __commonJS((exports, module) => {
|
|
|
19215
19236
|
// ../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/gtr.js
|
|
19216
19237
|
var require_gtr = __commonJS((exports, module) => {
|
|
19217
19238
|
var outside = require_outside();
|
|
19218
|
-
var gtr = (version4,
|
|
19239
|
+
var gtr = (version4, range2, options) => outside(version4, range2, ">", options);
|
|
19219
19240
|
module.exports = gtr;
|
|
19220
19241
|
});
|
|
19221
19242
|
|
|
19222
19243
|
// ../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/ltr.js
|
|
19223
19244
|
var require_ltr = __commonJS((exports, module) => {
|
|
19224
19245
|
var outside = require_outside();
|
|
19225
|
-
var ltr = (version4,
|
|
19246
|
+
var ltr = (version4, range2, options) => outside(version4, range2, "<", options);
|
|
19226
19247
|
module.exports = ltr;
|
|
19227
19248
|
});
|
|
19228
19249
|
|
|
@@ -19241,13 +19262,13 @@ var require_intersects = __commonJS((exports, module) => {
|
|
|
19241
19262
|
var require_simplify = __commonJS((exports, module) => {
|
|
19242
19263
|
var satisfies = require_satisfies();
|
|
19243
19264
|
var compare = require_compare();
|
|
19244
|
-
module.exports = (versions2,
|
|
19265
|
+
module.exports = (versions2, range2, options) => {
|
|
19245
19266
|
const set4 = [];
|
|
19246
19267
|
let first = null;
|
|
19247
19268
|
let prev = null;
|
|
19248
19269
|
const v = versions2.sort((a, b) => compare(a, b, options));
|
|
19249
19270
|
for (const version4 of v) {
|
|
19250
|
-
const included = satisfies(version4,
|
|
19271
|
+
const included = satisfies(version4, range2, options);
|
|
19251
19272
|
if (included) {
|
|
19252
19273
|
prev = version4;
|
|
19253
19274
|
if (!first) {
|
|
@@ -19279,8 +19300,8 @@ var require_simplify = __commonJS((exports, module) => {
|
|
|
19279
19300
|
}
|
|
19280
19301
|
}
|
|
19281
19302
|
const simplified = ranges.join(" || ");
|
|
19282
|
-
const original = typeof
|
|
19283
|
-
return simplified.length < original.length ? simplified :
|
|
19303
|
+
const original = typeof range2.raw === "string" ? range2.raw : String(range2);
|
|
19304
|
+
return simplified.length < original.length ? simplified : range2;
|
|
19284
19305
|
};
|
|
19285
19306
|
});
|
|
19286
19307
|
|
|
@@ -19536,46 +19557,6 @@ var require_semver2 = __commonJS((exports, module) => {
|
|
|
19536
19557
|
};
|
|
19537
19558
|
});
|
|
19538
19559
|
|
|
19539
|
-
// ../node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
19540
|
-
var require_cli_width = __commonJS((exports, module) => {
|
|
19541
|
-
module.exports = cliWidth;
|
|
19542
|
-
function normalizeOpts(options) {
|
|
19543
|
-
const defaultOpts = {
|
|
19544
|
-
defaultWidth: 0,
|
|
19545
|
-
output: process.stdout,
|
|
19546
|
-
tty: __require("tty")
|
|
19547
|
-
};
|
|
19548
|
-
if (!options) {
|
|
19549
|
-
return defaultOpts;
|
|
19550
|
-
}
|
|
19551
|
-
Object.keys(defaultOpts).forEach(function(key) {
|
|
19552
|
-
if (!options[key]) {
|
|
19553
|
-
options[key] = defaultOpts[key];
|
|
19554
|
-
}
|
|
19555
|
-
});
|
|
19556
|
-
return options;
|
|
19557
|
-
}
|
|
19558
|
-
function cliWidth(options) {
|
|
19559
|
-
const opts = normalizeOpts(options);
|
|
19560
|
-
if (opts.output.getWindowSize) {
|
|
19561
|
-
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
19562
|
-
}
|
|
19563
|
-
if (opts.tty.getWindowSize) {
|
|
19564
|
-
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
19565
|
-
}
|
|
19566
|
-
if (opts.output.columns) {
|
|
19567
|
-
return opts.output.columns;
|
|
19568
|
-
}
|
|
19569
|
-
if (process.env.CLI_WIDTH) {
|
|
19570
|
-
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
19571
|
-
if (!isNaN(width) && width !== 0) {
|
|
19572
|
-
return width;
|
|
19573
|
-
}
|
|
19574
|
-
}
|
|
19575
|
-
return opts.defaultWidth;
|
|
19576
|
-
}
|
|
19577
|
-
});
|
|
19578
|
-
|
|
19579
19560
|
// ../node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
|
|
19580
19561
|
var require_lib = __commonJS((exports, module) => {
|
|
19581
19562
|
var Stream = __require("stream");
|
|
@@ -19696,7 +19677,47 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
19696
19677
|
module.exports = MuteStream;
|
|
19697
19678
|
});
|
|
19698
19679
|
|
|
19699
|
-
// ../node_modules/.pnpm/
|
|
19680
|
+
// ../node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
|
|
19681
|
+
var require_cli_width = __commonJS((exports, module) => {
|
|
19682
|
+
module.exports = cliWidth;
|
|
19683
|
+
function normalizeOpts(options) {
|
|
19684
|
+
const defaultOpts = {
|
|
19685
|
+
defaultWidth: 0,
|
|
19686
|
+
output: process.stdout,
|
|
19687
|
+
tty: __require("tty")
|
|
19688
|
+
};
|
|
19689
|
+
if (!options) {
|
|
19690
|
+
return defaultOpts;
|
|
19691
|
+
}
|
|
19692
|
+
Object.keys(defaultOpts).forEach(function(key) {
|
|
19693
|
+
if (!options[key]) {
|
|
19694
|
+
options[key] = defaultOpts[key];
|
|
19695
|
+
}
|
|
19696
|
+
});
|
|
19697
|
+
return options;
|
|
19698
|
+
}
|
|
19699
|
+
function cliWidth(options) {
|
|
19700
|
+
const opts = normalizeOpts(options);
|
|
19701
|
+
if (opts.output.getWindowSize) {
|
|
19702
|
+
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
19703
|
+
}
|
|
19704
|
+
if (opts.tty.getWindowSize) {
|
|
19705
|
+
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
19706
|
+
}
|
|
19707
|
+
if (opts.output.columns) {
|
|
19708
|
+
return opts.output.columns;
|
|
19709
|
+
}
|
|
19710
|
+
if (process.env.CLI_WIDTH) {
|
|
19711
|
+
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
19712
|
+
if (!isNaN(width) && width !== 0) {
|
|
19713
|
+
return width;
|
|
19714
|
+
}
|
|
19715
|
+
}
|
|
19716
|
+
return opts.defaultWidth;
|
|
19717
|
+
}
|
|
19718
|
+
});
|
|
19719
|
+
|
|
19720
|
+
// ../node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/dayjs.min.js
|
|
19700
19721
|
var require_dayjs_min = __commonJS((exports, module) => {
|
|
19701
19722
|
(function(t, e) {
|
|
19702
19723
|
typeof exports == "object" && typeof module != "undefined" ? module.exports = e() : typeof define == "function" && define.amd ? define(e) : (t = typeof globalThis != "undefined" ? globalThis : t || self).dayjs = e();
|
|
@@ -21962,14 +21983,14 @@ var require_sbmh = __commonJS((exports, module) => {
|
|
|
21962
21983
|
this._lookbehindSize = 0;
|
|
21963
21984
|
this._bufPos = 0;
|
|
21964
21985
|
}
|
|
21965
|
-
push(
|
|
21986
|
+
push(chunk2, pos) {
|
|
21966
21987
|
let result;
|
|
21967
|
-
if (!Buffer.isBuffer(
|
|
21968
|
-
|
|
21969
|
-
const chunkLen =
|
|
21988
|
+
if (!Buffer.isBuffer(chunk2))
|
|
21989
|
+
chunk2 = Buffer.from(chunk2, "latin1");
|
|
21990
|
+
const chunkLen = chunk2.length;
|
|
21970
21991
|
this._bufPos = pos || 0;
|
|
21971
21992
|
while (result !== chunkLen && this.matches < this.maxMatches)
|
|
21972
|
-
result = feed(this,
|
|
21993
|
+
result = feed(this, chunk2);
|
|
21973
21994
|
return result;
|
|
21974
21995
|
}
|
|
21975
21996
|
destroy() {
|
|
@@ -22078,7 +22099,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22078
22099
|
`);
|
|
22079
22100
|
var BUF_CR = Buffer.from("\r");
|
|
22080
22101
|
var BUF_DASH = Buffer.from("-");
|
|
22081
|
-
function
|
|
22102
|
+
function noop2() {}
|
|
22082
22103
|
var MAX_HEADER_PAIRS = 2000;
|
|
22083
22104
|
var MAX_HEADER_SIZE = 16 * 1024;
|
|
22084
22105
|
var HPARSER_NAME = 0;
|
|
@@ -22105,7 +22126,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22105
22126
|
this.value = "";
|
|
22106
22127
|
this.crlf = 0;
|
|
22107
22128
|
}
|
|
22108
|
-
push(
|
|
22129
|
+
push(chunk2, pos, end) {
|
|
22109
22130
|
let start4 = pos;
|
|
22110
22131
|
while (pos < end) {
|
|
22111
22132
|
switch (this.state) {
|
|
@@ -22115,11 +22136,11 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22115
22136
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22116
22137
|
return -1;
|
|
22117
22138
|
++this.byteCount;
|
|
22118
|
-
const code =
|
|
22139
|
+
const code = chunk2[pos];
|
|
22119
22140
|
if (TOKEN[code] !== 1) {
|
|
22120
22141
|
if (code !== 58)
|
|
22121
22142
|
return -1;
|
|
22122
|
-
this.name +=
|
|
22143
|
+
this.name += chunk2.latin1Slice(start4, pos);
|
|
22123
22144
|
if (this.name.length === 0)
|
|
22124
22145
|
return -1;
|
|
22125
22146
|
++pos;
|
|
@@ -22129,7 +22150,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22129
22150
|
}
|
|
22130
22151
|
}
|
|
22131
22152
|
if (!done) {
|
|
22132
|
-
this.name +=
|
|
22153
|
+
this.name += chunk2.latin1Slice(start4, pos);
|
|
22133
22154
|
break;
|
|
22134
22155
|
}
|
|
22135
22156
|
}
|
|
@@ -22139,7 +22160,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22139
22160
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22140
22161
|
return -1;
|
|
22141
22162
|
++this.byteCount;
|
|
22142
|
-
const code =
|
|
22163
|
+
const code = chunk2[pos];
|
|
22143
22164
|
if (code !== 32 && code !== 9) {
|
|
22144
22165
|
start4 = pos;
|
|
22145
22166
|
done = true;
|
|
@@ -22157,7 +22178,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22157
22178
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22158
22179
|
return -1;
|
|
22159
22180
|
++this.byteCount;
|
|
22160
|
-
const code =
|
|
22181
|
+
const code = chunk2[pos];
|
|
22161
22182
|
if (FIELD_VCHAR[code] !== 1) {
|
|
22162
22183
|
if (code !== 13)
|
|
22163
22184
|
return -1;
|
|
@@ -22165,13 +22186,13 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22165
22186
|
break;
|
|
22166
22187
|
}
|
|
22167
22188
|
}
|
|
22168
|
-
this.value +=
|
|
22189
|
+
this.value += chunk2.latin1Slice(start4, pos++);
|
|
22169
22190
|
break;
|
|
22170
22191
|
case 1:
|
|
22171
22192
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22172
22193
|
return -1;
|
|
22173
22194
|
++this.byteCount;
|
|
22174
|
-
if (
|
|
22195
|
+
if (chunk2[pos++] !== 10)
|
|
22175
22196
|
return -1;
|
|
22176
22197
|
++this.crlf;
|
|
22177
22198
|
break;
|
|
@@ -22179,7 +22200,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22179
22200
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22180
22201
|
return -1;
|
|
22181
22202
|
++this.byteCount;
|
|
22182
|
-
const code =
|
|
22203
|
+
const code = chunk2[pos];
|
|
22183
22204
|
if (code === 32 || code === 9) {
|
|
22184
22205
|
start4 = pos;
|
|
22185
22206
|
this.crlf = 0;
|
|
@@ -22208,7 +22229,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22208
22229
|
if (this.byteCount === MAX_HEADER_SIZE)
|
|
22209
22230
|
return -1;
|
|
22210
22231
|
++this.byteCount;
|
|
22211
|
-
if (
|
|
22232
|
+
if (chunk2[pos++] !== 10)
|
|
22212
22233
|
return -1;
|
|
22213
22234
|
const header = this.header;
|
|
22214
22235
|
this.reset();
|
|
@@ -22246,7 +22267,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22246
22267
|
}
|
|
22247
22268
|
}
|
|
22248
22269
|
var ignoreData = {
|
|
22249
|
-
push: (
|
|
22270
|
+
push: (chunk2, pos) => {},
|
|
22250
22271
|
destroy: () => {}
|
|
22251
22272
|
};
|
|
22252
22273
|
function callAndUnsetCb(self2, err) {
|
|
@@ -22423,7 +22444,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22423
22444
|
return;
|
|
22424
22445
|
}
|
|
22425
22446
|
const writecb = this._writecb;
|
|
22426
|
-
this._writecb =
|
|
22447
|
+
this._writecb = noop2;
|
|
22427
22448
|
ssCb(false, BUF_DASH, 0, 1, false);
|
|
22428
22449
|
this._writecb = writecb;
|
|
22429
22450
|
} else if (matchPostBoundary === 3) {
|
|
@@ -22438,7 +22459,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22438
22459
|
continue retrydata;
|
|
22439
22460
|
} else {
|
|
22440
22461
|
const writecb = this._writecb;
|
|
22441
|
-
this._writecb =
|
|
22462
|
+
this._writecb = noop2;
|
|
22442
22463
|
ssCb(false, BUF_CR, 0, 1, false);
|
|
22443
22464
|
this._writecb = writecb;
|
|
22444
22465
|
}
|
|
@@ -22446,37 +22467,37 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22446
22467
|
}
|
|
22447
22468
|
if (!skipPart) {
|
|
22448
22469
|
if (this._fileStream) {
|
|
22449
|
-
let
|
|
22470
|
+
let chunk2;
|
|
22450
22471
|
const actualLen = Math.min(end - start4, fileSizeLimit - fileSize);
|
|
22451
22472
|
if (!isDataSafe) {
|
|
22452
|
-
|
|
22453
|
-
data.copy(
|
|
22473
|
+
chunk2 = Buffer.allocUnsafe(actualLen);
|
|
22474
|
+
data.copy(chunk2, 0, start4, start4 + actualLen);
|
|
22454
22475
|
} else {
|
|
22455
|
-
|
|
22476
|
+
chunk2 = data.slice(start4, start4 + actualLen);
|
|
22456
22477
|
}
|
|
22457
|
-
fileSize +=
|
|
22478
|
+
fileSize += chunk2.length;
|
|
22458
22479
|
if (fileSize === fileSizeLimit) {
|
|
22459
|
-
if (
|
|
22460
|
-
this._fileStream.push(
|
|
22480
|
+
if (chunk2.length > 0)
|
|
22481
|
+
this._fileStream.push(chunk2);
|
|
22461
22482
|
this._fileStream.emit("limit");
|
|
22462
22483
|
this._fileStream.truncated = true;
|
|
22463
22484
|
skipPart = true;
|
|
22464
|
-
} else if (!this._fileStream.push(
|
|
22485
|
+
} else if (!this._fileStream.push(chunk2)) {
|
|
22465
22486
|
if (this._writecb)
|
|
22466
22487
|
this._fileStream._readcb = this._writecb;
|
|
22467
22488
|
this._writecb = null;
|
|
22468
22489
|
}
|
|
22469
22490
|
} else if (field !== undefined) {
|
|
22470
|
-
let
|
|
22491
|
+
let chunk2;
|
|
22471
22492
|
const actualLen = Math.min(end - start4, fieldSizeLimit - fieldSize);
|
|
22472
22493
|
if (!isDataSafe) {
|
|
22473
|
-
|
|
22474
|
-
data.copy(
|
|
22494
|
+
chunk2 = Buffer.allocUnsafe(actualLen);
|
|
22495
|
+
data.copy(chunk2, 0, start4, start4 + actualLen);
|
|
22475
22496
|
} else {
|
|
22476
|
-
|
|
22497
|
+
chunk2 = data.slice(start4, start4 + actualLen);
|
|
22477
22498
|
}
|
|
22478
22499
|
fieldSize += actualLen;
|
|
22479
|
-
field.push(
|
|
22500
|
+
field.push(chunk2);
|
|
22480
22501
|
if (fieldSize === fieldSizeLimit) {
|
|
22481
22502
|
skipPart = true;
|
|
22482
22503
|
partTruncated = true;
|
|
@@ -22524,9 +22545,9 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
22524
22545
|
static detect(conType) {
|
|
22525
22546
|
return conType.type === "multipart" && conType.subtype === "form-data";
|
|
22526
22547
|
}
|
|
22527
|
-
_write(
|
|
22548
|
+
_write(chunk2, enc, cb) {
|
|
22528
22549
|
this._writecb = cb;
|
|
22529
|
-
this._bparser.push(
|
|
22550
|
+
this._bparser.push(chunk2, 0);
|
|
22530
22551
|
if (this._writecb)
|
|
22531
22552
|
callAndUnsetCb(this);
|
|
22532
22553
|
}
|
|
@@ -23125,14 +23146,14 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23125
23146
|
static detect(conType) {
|
|
23126
23147
|
return conType.type === "application" && conType.subtype === "x-www-form-urlencoded";
|
|
23127
23148
|
}
|
|
23128
|
-
_write(
|
|
23149
|
+
_write(chunk2, enc, cb) {
|
|
23129
23150
|
if (this._fields >= this.fieldsLimit)
|
|
23130
23151
|
return cb();
|
|
23131
23152
|
let i = 0;
|
|
23132
|
-
const len =
|
|
23153
|
+
const len = chunk2.length;
|
|
23133
23154
|
this._lastPos = 0;
|
|
23134
23155
|
if (this._byte !== -2) {
|
|
23135
|
-
i = readPctEnc(this,
|
|
23156
|
+
i = readPctEnc(this, chunk2, i, len);
|
|
23136
23157
|
if (i === -1)
|
|
23137
23158
|
return cb(new Error("Malformed urlencoded form"));
|
|
23138
23159
|
if (i >= len)
|
|
@@ -23145,12 +23166,12 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23145
23166
|
main:
|
|
23146
23167
|
while (i < len) {
|
|
23147
23168
|
if (this._inKey) {
|
|
23148
|
-
i = skipKeyBytes(this,
|
|
23169
|
+
i = skipKeyBytes(this, chunk2, i, len);
|
|
23149
23170
|
while (i < len) {
|
|
23150
|
-
switch (
|
|
23171
|
+
switch (chunk2[i]) {
|
|
23151
23172
|
case 61:
|
|
23152
23173
|
if (this._lastPos < i)
|
|
23153
|
-
this._key +=
|
|
23174
|
+
this._key += chunk2.latin1Slice(this._lastPos, i);
|
|
23154
23175
|
this._lastPos = ++i;
|
|
23155
23176
|
this._key = this._decoder(this._key, this._encode);
|
|
23156
23177
|
this._encode = 0;
|
|
@@ -23158,7 +23179,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23158
23179
|
continue main;
|
|
23159
23180
|
case 38:
|
|
23160
23181
|
if (this._lastPos < i)
|
|
23161
|
-
this._key +=
|
|
23182
|
+
this._key += chunk2.latin1Slice(this._lastPos, i);
|
|
23162
23183
|
this._lastPos = ++i;
|
|
23163
23184
|
this._key = this._decoder(this._key, this._encode);
|
|
23164
23185
|
this._encode = 0;
|
|
@@ -23183,7 +23204,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23183
23204
|
continue;
|
|
23184
23205
|
case 43:
|
|
23185
23206
|
if (this._lastPos < i)
|
|
23186
|
-
this._key +=
|
|
23207
|
+
this._key += chunk2.latin1Slice(this._lastPos, i);
|
|
23187
23208
|
this._key += " ";
|
|
23188
23209
|
this._lastPos = i + 1;
|
|
23189
23210
|
break;
|
|
@@ -23191,31 +23212,31 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23191
23212
|
if (this._encode === 0)
|
|
23192
23213
|
this._encode = 1;
|
|
23193
23214
|
if (this._lastPos < i)
|
|
23194
|
-
this._key +=
|
|
23215
|
+
this._key += chunk2.latin1Slice(this._lastPos, i);
|
|
23195
23216
|
this._lastPos = i + 1;
|
|
23196
23217
|
this._byte = -1;
|
|
23197
|
-
i = readPctEnc(this,
|
|
23218
|
+
i = readPctEnc(this, chunk2, i + 1, len);
|
|
23198
23219
|
if (i === -1)
|
|
23199
23220
|
return cb(new Error("Malformed urlencoded form"));
|
|
23200
23221
|
if (i >= len)
|
|
23201
23222
|
return cb();
|
|
23202
23223
|
++this._bytesKey;
|
|
23203
|
-
i = skipKeyBytes(this,
|
|
23224
|
+
i = skipKeyBytes(this, chunk2, i, len);
|
|
23204
23225
|
continue;
|
|
23205
23226
|
}
|
|
23206
23227
|
++i;
|
|
23207
23228
|
++this._bytesKey;
|
|
23208
|
-
i = skipKeyBytes(this,
|
|
23229
|
+
i = skipKeyBytes(this, chunk2, i, len);
|
|
23209
23230
|
}
|
|
23210
23231
|
if (this._lastPos < i)
|
|
23211
|
-
this._key +=
|
|
23232
|
+
this._key += chunk2.latin1Slice(this._lastPos, i);
|
|
23212
23233
|
} else {
|
|
23213
|
-
i = skipValBytes(this,
|
|
23234
|
+
i = skipValBytes(this, chunk2, i, len);
|
|
23214
23235
|
while (i < len) {
|
|
23215
|
-
switch (
|
|
23236
|
+
switch (chunk2[i]) {
|
|
23216
23237
|
case 38:
|
|
23217
23238
|
if (this._lastPos < i)
|
|
23218
|
-
this._val +=
|
|
23239
|
+
this._val += chunk2.latin1Slice(this._lastPos, i);
|
|
23219
23240
|
this._lastPos = ++i;
|
|
23220
23241
|
this._inKey = true;
|
|
23221
23242
|
this._val = this._decoder(this._val, this._encode);
|
|
@@ -23241,7 +23262,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23241
23262
|
continue main;
|
|
23242
23263
|
case 43:
|
|
23243
23264
|
if (this._lastPos < i)
|
|
23244
|
-
this._val +=
|
|
23265
|
+
this._val += chunk2.latin1Slice(this._lastPos, i);
|
|
23245
23266
|
this._val += " ";
|
|
23246
23267
|
this._lastPos = i + 1;
|
|
23247
23268
|
break;
|
|
@@ -23249,24 +23270,24 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23249
23270
|
if (this._encode === 0)
|
|
23250
23271
|
this._encode = 1;
|
|
23251
23272
|
if (this._lastPos < i)
|
|
23252
|
-
this._val +=
|
|
23273
|
+
this._val += chunk2.latin1Slice(this._lastPos, i);
|
|
23253
23274
|
this._lastPos = i + 1;
|
|
23254
23275
|
this._byte = -1;
|
|
23255
|
-
i = readPctEnc(this,
|
|
23276
|
+
i = readPctEnc(this, chunk2, i + 1, len);
|
|
23256
23277
|
if (i === -1)
|
|
23257
23278
|
return cb(new Error("Malformed urlencoded form"));
|
|
23258
23279
|
if (i >= len)
|
|
23259
23280
|
return cb();
|
|
23260
23281
|
++this._bytesVal;
|
|
23261
|
-
i = skipValBytes(this,
|
|
23282
|
+
i = skipValBytes(this, chunk2, i, len);
|
|
23262
23283
|
continue;
|
|
23263
23284
|
}
|
|
23264
23285
|
++i;
|
|
23265
23286
|
++this._bytesVal;
|
|
23266
|
-
i = skipValBytes(this,
|
|
23287
|
+
i = skipValBytes(this, chunk2, i, len);
|
|
23267
23288
|
}
|
|
23268
23289
|
if (this._lastPos < i)
|
|
23269
|
-
this._val +=
|
|
23290
|
+
this._val += chunk2.latin1Slice(this._lastPos, i);
|
|
23270
23291
|
}
|
|
23271
23292
|
}
|
|
23272
23293
|
cb();
|
|
@@ -23289,17 +23310,17 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23289
23310
|
cb();
|
|
23290
23311
|
}
|
|
23291
23312
|
}
|
|
23292
|
-
function readPctEnc(self2,
|
|
23313
|
+
function readPctEnc(self2, chunk2, pos, len) {
|
|
23293
23314
|
if (pos >= len)
|
|
23294
23315
|
return len;
|
|
23295
23316
|
if (self2._byte === -1) {
|
|
23296
|
-
const hexUpper = HEX_VALUES[
|
|
23317
|
+
const hexUpper = HEX_VALUES[chunk2[pos++]];
|
|
23297
23318
|
if (hexUpper === -1)
|
|
23298
23319
|
return -1;
|
|
23299
23320
|
if (hexUpper >= 8)
|
|
23300
23321
|
self2._encode = 2;
|
|
23301
23322
|
if (pos < len) {
|
|
23302
|
-
const hexLower = HEX_VALUES[
|
|
23323
|
+
const hexLower = HEX_VALUES[chunk2[pos++]];
|
|
23303
23324
|
if (hexLower === -1)
|
|
23304
23325
|
return -1;
|
|
23305
23326
|
if (self2._inKey)
|
|
@@ -23312,7 +23333,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23312
23333
|
self2._byte = hexUpper;
|
|
23313
23334
|
}
|
|
23314
23335
|
} else {
|
|
23315
|
-
const hexLower = HEX_VALUES[
|
|
23336
|
+
const hexLower = HEX_VALUES[chunk2[pos++]];
|
|
23316
23337
|
if (hexLower === -1)
|
|
23317
23338
|
return -1;
|
|
23318
23339
|
if (self2._inKey)
|
|
@@ -23324,15 +23345,15 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23324
23345
|
}
|
|
23325
23346
|
return pos;
|
|
23326
23347
|
}
|
|
23327
|
-
function skipKeyBytes(self2,
|
|
23348
|
+
function skipKeyBytes(self2, chunk2, pos, len) {
|
|
23328
23349
|
if (self2._bytesKey > self2.fieldNameSizeLimit) {
|
|
23329
23350
|
if (!self2._keyTrunc) {
|
|
23330
23351
|
if (self2._lastPos < pos)
|
|
23331
|
-
self2._key +=
|
|
23352
|
+
self2._key += chunk2.latin1Slice(self2._lastPos, pos - 1);
|
|
23332
23353
|
}
|
|
23333
23354
|
self2._keyTrunc = true;
|
|
23334
23355
|
for (;pos < len; ++pos) {
|
|
23335
|
-
const code =
|
|
23356
|
+
const code = chunk2[pos];
|
|
23336
23357
|
if (code === 61 || code === 38)
|
|
23337
23358
|
break;
|
|
23338
23359
|
++self2._bytesKey;
|
|
@@ -23341,15 +23362,15 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
23341
23362
|
}
|
|
23342
23363
|
return pos;
|
|
23343
23364
|
}
|
|
23344
|
-
function skipValBytes(self2,
|
|
23365
|
+
function skipValBytes(self2, chunk2, pos, len) {
|
|
23345
23366
|
if (self2._bytesVal > self2.fieldSizeLimit) {
|
|
23346
23367
|
if (!self2._valTrunc) {
|
|
23347
23368
|
if (self2._lastPos < pos)
|
|
23348
|
-
self2._val +=
|
|
23369
|
+
self2._val += chunk2.latin1Slice(self2._lastPos, pos - 1);
|
|
23349
23370
|
}
|
|
23350
23371
|
self2._valTrunc = true;
|
|
23351
23372
|
for (;pos < len; ++pos) {
|
|
23352
|
-
if (
|
|
23373
|
+
if (chunk2[pos] === 38)
|
|
23353
23374
|
break;
|
|
23354
23375
|
++self2._bytesVal;
|
|
23355
23376
|
}
|
|
@@ -23667,7 +23688,7 @@ var require_lib2 = __commonJS((exports, module) => {
|
|
|
23667
23688
|
};
|
|
23668
23689
|
});
|
|
23669
23690
|
|
|
23670
|
-
// ../node_modules/.pnpm/@kevisual+router@0.
|
|
23691
|
+
// ../node_modules/.pnpm/@kevisual+router@0.1.1/node_modules/@kevisual/router/dist/router.js
|
|
23671
23692
|
import { createRequire as createRequire2 } from "node:module";
|
|
23672
23693
|
import { webcrypto as crypto2 } from "node:crypto";
|
|
23673
23694
|
import http from "node:http";
|
|
@@ -40552,6 +40573,9 @@ var toJSONSchemaRoute = (route) => {
|
|
|
40552
40573
|
if (pickValues?.metadata?.args) {
|
|
40553
40574
|
pickValues.metadata.args = toJSONSchema3(pickValues?.metadata?.args, { mergeObject: false });
|
|
40554
40575
|
}
|
|
40576
|
+
if (pickValues?.metadata?.returns) {
|
|
40577
|
+
pickValues.metadata.returns = toJSONSchema3(pickValues?.metadata?.returns, { mergeObject: false });
|
|
40578
|
+
}
|
|
40555
40579
|
return pickValues;
|
|
40556
40580
|
};
|
|
40557
40581
|
var toJSONSchema3 = toJSONSchema2;
|
|
@@ -41879,7 +41903,7 @@ class App extends QueryRouterServer {
|
|
|
41879
41903
|
}
|
|
41880
41904
|
}
|
|
41881
41905
|
|
|
41882
|
-
// ../node_modules/.pnpm/@kevisual+router@0.
|
|
41906
|
+
// ../node_modules/.pnpm/@kevisual+router@0.1.1/node_modules/@kevisual/router/dist/router-simple.js
|
|
41883
41907
|
import url3 from "node:url";
|
|
41884
41908
|
var __create3 = Object.create;
|
|
41885
41909
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
@@ -42696,13 +42720,6 @@ var envKevisualDir = process.env.ASSISTANT_CONFIG_DIR;
|
|
|
42696
42720
|
if (envKevisualDir) {
|
|
42697
42721
|
kevisualDir = envKevisualDir;
|
|
42698
42722
|
logger.debug("使用环境变量 ASSISTANT_CONFIG_DIR 作为 kevisual 目录:", kevisualDir);
|
|
42699
|
-
} else {
|
|
42700
|
-
if (!kevisualDir) {
|
|
42701
|
-
const isCNB = process.env.CNB_GROUP_SLUG;
|
|
42702
|
-
if (isCNB) {
|
|
42703
|
-
kevisualDir = path.join("/workspace/kevisual");
|
|
42704
|
-
}
|
|
42705
|
-
}
|
|
42706
42723
|
}
|
|
42707
42724
|
var HomeConfigDir = path.join(kevisualDir, "assistant-app");
|
|
42708
42725
|
function parseArgs(args) {
|
|
@@ -44045,6 +44062,9 @@ class AssistantConfig {
|
|
|
44045
44062
|
docs: `${kevisualUrl}/root/cli/docs/`,
|
|
44046
44063
|
home: isCNB ? "/root/cli-center" : "/root/home",
|
|
44047
44064
|
proxy: [],
|
|
44065
|
+
routes: [
|
|
44066
|
+
"@kevisual/cnb/routes"
|
|
44067
|
+
],
|
|
44048
44068
|
share: {
|
|
44049
44069
|
enabled: true,
|
|
44050
44070
|
url: "https://kevisual.cn/ws/proxy"
|
|
@@ -51144,6 +51164,10 @@ var deleteFileAppInfo2 = async (key, appsPath) => {
|
|
|
51144
51164
|
|
|
51145
51165
|
// src/module/local-apps/src/modules/manager.ts
|
|
51146
51166
|
import { fork as fork2 } from "node:child_process";
|
|
51167
|
+
// ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
51168
|
+
function isUnsafeProperty2(key) {
|
|
51169
|
+
return key === "__proto__";
|
|
51170
|
+
}
|
|
51147
51171
|
|
|
51148
51172
|
// ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
51149
51173
|
function isPlainObject5(value) {
|
|
@@ -51158,11 +51182,6 @@ function isPlainObject5(value) {
|
|
|
51158
51182
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
51159
51183
|
}
|
|
51160
51184
|
|
|
51161
|
-
// ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
51162
|
-
function isUnsafeProperty2(key) {
|
|
51163
|
-
return key === "__proto__";
|
|
51164
|
-
}
|
|
51165
|
-
|
|
51166
51185
|
// ../node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/merge.mjs
|
|
51167
51186
|
function merge5(target, source) {
|
|
51168
51187
|
const sourceKeys = Object.keys(source);
|
|
@@ -51852,6 +51871,8 @@ class RemoteApp {
|
|
|
51852
51871
|
reconnectAttempts = 0;
|
|
51853
51872
|
reconnectTimer = null;
|
|
51854
51873
|
isManuallyClosed = false;
|
|
51874
|
+
isInitializing = false;
|
|
51875
|
+
initId = 0;
|
|
51855
51876
|
constructor(opts) {
|
|
51856
51877
|
this.mainApp = opts?.app;
|
|
51857
51878
|
const token = opts.token;
|
|
@@ -51886,12 +51907,12 @@ class RemoteApp {
|
|
|
51886
51907
|
console.log(`远程应用 ${this.id} 正在重连中...`);
|
|
51887
51908
|
}
|
|
51888
51909
|
return new Promise((resolve) => {
|
|
51889
|
-
const
|
|
51910
|
+
const timeout2 = setTimeout(() => {
|
|
51890
51911
|
resolve(false);
|
|
51891
51912
|
that.emitter.off("open", listenOnce);
|
|
51892
51913
|
}, 5000);
|
|
51893
51914
|
const listenOnce = () => {
|
|
51894
|
-
clearTimeout(
|
|
51915
|
+
clearTimeout(timeout2);
|
|
51895
51916
|
that.isConnected = true;
|
|
51896
51917
|
that.remoteIsConnected = true;
|
|
51897
51918
|
resolve(true);
|
|
@@ -51921,10 +51942,17 @@ class RemoteApp {
|
|
|
51921
51942
|
return wsURL;
|
|
51922
51943
|
}
|
|
51923
51944
|
async init() {
|
|
51945
|
+
if (this.isInitializing) {
|
|
51946
|
+
return;
|
|
51947
|
+
}
|
|
51948
|
+
this.isInitializing = true;
|
|
51949
|
+
const currentInitId = ++this.initId;
|
|
51924
51950
|
if (!this.url) {
|
|
51951
|
+
this.isInitializing = false;
|
|
51925
51952
|
throw new Error("No url provided for remote app");
|
|
51926
51953
|
}
|
|
51927
51954
|
if (!this.id) {
|
|
51955
|
+
this.isInitializing = false;
|
|
51928
51956
|
throw new Error("No id provided for remote app");
|
|
51929
51957
|
}
|
|
51930
51958
|
this.isError = false;
|
|
@@ -51934,11 +51962,20 @@ class RemoteApp {
|
|
|
51934
51962
|
const ws = new WebSocket(this.getWsURL(this.url));
|
|
51935
51963
|
const that = this;
|
|
51936
51964
|
ws.onopen = function() {
|
|
51965
|
+
if (currentInitId !== that.initId) {
|
|
51966
|
+
ws.close();
|
|
51967
|
+
return;
|
|
51968
|
+
}
|
|
51937
51969
|
that.isConnected = true;
|
|
51970
|
+
that.isInitializing = false;
|
|
51938
51971
|
that.onOpen();
|
|
51939
51972
|
console.log("[remote-app] WebSocket connection opened");
|
|
51940
51973
|
};
|
|
51941
51974
|
ws.onclose = function() {
|
|
51975
|
+
if (currentInitId !== that.initId) {
|
|
51976
|
+
return;
|
|
51977
|
+
}
|
|
51978
|
+
that.isInitializing = false;
|
|
51942
51979
|
that.isConnected = false;
|
|
51943
51980
|
that.onClose();
|
|
51944
51981
|
};
|
|
@@ -51946,6 +51983,10 @@ class RemoteApp {
|
|
|
51946
51983
|
that.onMessage(event.data);
|
|
51947
51984
|
};
|
|
51948
51985
|
ws.onerror = function(error49) {
|
|
51986
|
+
if (currentInitId !== that.initId) {
|
|
51987
|
+
return;
|
|
51988
|
+
}
|
|
51989
|
+
that.isInitializing = false;
|
|
51949
51990
|
that.onError(error49);
|
|
51950
51991
|
};
|
|
51951
51992
|
this.ws = ws;
|
|
@@ -51971,8 +52012,8 @@ class RemoteApp {
|
|
|
51971
52012
|
if (!this.enableBackoff) {
|
|
51972
52013
|
return this.reconnectDelay;
|
|
51973
52014
|
}
|
|
51974
|
-
const
|
|
51975
|
-
return Math.min(
|
|
52015
|
+
const delay2 = this.reconnectDelay * Math.pow(2, this.reconnectAttempts);
|
|
52016
|
+
return Math.min(delay2, this.maxReconnectDelay);
|
|
51976
52017
|
}
|
|
51977
52018
|
scheduleReconnect() {
|
|
51978
52019
|
if (this.reconnectAttempts >= this.maxReconnectAttempts) {
|
|
@@ -51983,9 +52024,9 @@ class RemoteApp {
|
|
|
51983
52024
|
if (this.reconnectTimer) {
|
|
51984
52025
|
clearTimeout(this.reconnectTimer);
|
|
51985
52026
|
}
|
|
51986
|
-
const
|
|
52027
|
+
const delay2 = this.calculateReconnectDelay();
|
|
51987
52028
|
this.reconnectAttempts++;
|
|
51988
|
-
console.log(`远程应用 ${this.id} 将在 ${
|
|
52029
|
+
console.log(`远程应用 ${this.id} 将在 ${delay2}ms 后尝试第 ${this.reconnectAttempts} 次重连`);
|
|
51989
52030
|
this.reconnectTimer = setTimeout(() => {
|
|
51990
52031
|
this.reconnectTimer = null;
|
|
51991
52032
|
try {
|
|
@@ -51995,7 +52036,7 @@ class RemoteApp {
|
|
|
51995
52036
|
this.emitter.emit("reconnectFailed", { id: this.id, attempt: this.reconnectAttempts, error: error49 });
|
|
51996
52037
|
this.scheduleReconnect();
|
|
51997
52038
|
}
|
|
51998
|
-
},
|
|
52039
|
+
}, delay2);
|
|
51999
52040
|
}
|
|
52000
52041
|
disconnect() {
|
|
52001
52042
|
this.isManuallyClosed = true;
|
|
@@ -52110,10 +52151,10 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
52110
52151
|
const controller = new AbortController;
|
|
52111
52152
|
const signal = controller.signal;
|
|
52112
52153
|
const isPostFile = opts.isPostFile || false;
|
|
52113
|
-
const
|
|
52154
|
+
const timeout2 = opts.timeout || 60000 * 3;
|
|
52114
52155
|
const timer = setTimeout(() => {
|
|
52115
52156
|
controller.abort();
|
|
52116
|
-
},
|
|
52157
|
+
}, timeout2);
|
|
52117
52158
|
let method = overloadOpts?.method || opts?.method || "POST";
|
|
52118
52159
|
let headers = { ...opts?.headers, ...overloadOpts?.headers };
|
|
52119
52160
|
let origin = "";
|
|
@@ -52271,18 +52312,18 @@ class Query {
|
|
|
52271
52312
|
}
|
|
52272
52313
|
async post(body, options) {
|
|
52273
52314
|
const url4 = options?.url || this.url;
|
|
52274
|
-
const { headers, adapter: adapter2, beforeRequest, afterResponse, timeout, ...
|
|
52315
|
+
const { headers, adapter: adapter2, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options || {};
|
|
52275
52316
|
const _headers = { ...this.headers, ...headers };
|
|
52276
52317
|
const _adapter = adapter2 || this.adapter;
|
|
52277
52318
|
const _beforeRequest = beforeRequest || this.beforeRequest;
|
|
52278
52319
|
const _afterResponse = afterResponse || this.afterResponse;
|
|
52279
|
-
const _timeout =
|
|
52320
|
+
const _timeout = timeout2 || this.timeout;
|
|
52280
52321
|
const req = {
|
|
52281
52322
|
url: url4,
|
|
52282
52323
|
headers: _headers,
|
|
52283
52324
|
body,
|
|
52284
52325
|
timeout: _timeout,
|
|
52285
|
-
...
|
|
52326
|
+
...rest2
|
|
52286
52327
|
};
|
|
52287
52328
|
const isStartsWithHttp = req.url.startsWith("http");
|
|
52288
52329
|
if (!isStartsWithHttp) {
|
|
@@ -52391,7 +52432,7 @@ class Query {
|
|
|
52391
52432
|
}
|
|
52392
52433
|
}
|
|
52393
52434
|
|
|
52394
|
-
// ../node_modules/.pnpm/@kevisual+router@0.
|
|
52435
|
+
// ../node_modules/.pnpm/@kevisual+router@0.1.1/node_modules/@kevisual/router/dist/router-browser.js
|
|
52395
52436
|
var __create5 = Object.create;
|
|
52396
52437
|
var __getProtoOf5 = Object.getPrototypeOf;
|
|
52397
52438
|
var __defProp5 = Object.defineProperty;
|
|
@@ -52427,16 +52468,16 @@ var require_eventemitter33 = __commonJS5((exports, module) => {
|
|
|
52427
52468
|
if (!new Events().__proto__)
|
|
52428
52469
|
prefix = false;
|
|
52429
52470
|
}
|
|
52430
|
-
function EE(fn, context,
|
|
52471
|
+
function EE(fn, context, once2) {
|
|
52431
52472
|
this.fn = fn;
|
|
52432
52473
|
this.context = context;
|
|
52433
|
-
this.once =
|
|
52474
|
+
this.once = once2 || false;
|
|
52434
52475
|
}
|
|
52435
|
-
function addListener(emitter, event, fn, context,
|
|
52476
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
52436
52477
|
if (typeof fn !== "function") {
|
|
52437
52478
|
throw new TypeError("The listener must be a function");
|
|
52438
52479
|
}
|
|
52439
|
-
var listener = new EE(fn, context || emitter,
|
|
52480
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
52440
52481
|
if (!emitter._events[evt])
|
|
52441
52482
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
52442
52483
|
else if (!emitter._events[evt].fn)
|
|
@@ -52545,10 +52586,10 @@ var require_eventemitter33 = __commonJS5((exports, module) => {
|
|
|
52545
52586
|
EventEmitter3.prototype.on = function on(event, fn, context) {
|
|
52546
52587
|
return addListener(this, event, fn, context, false);
|
|
52547
52588
|
};
|
|
52548
|
-
EventEmitter3.prototype.once = function
|
|
52589
|
+
EventEmitter3.prototype.once = function once2(event, fn, context) {
|
|
52549
52590
|
return addListener(this, event, fn, context, true);
|
|
52550
52591
|
};
|
|
52551
|
-
EventEmitter3.prototype.removeListener = function removeListener(event, fn, context,
|
|
52592
|
+
EventEmitter3.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
52552
52593
|
var evt = prefix ? prefix + event : event;
|
|
52553
52594
|
if (!this._events[evt])
|
|
52554
52595
|
return this;
|
|
@@ -52558,12 +52599,12 @@ var require_eventemitter33 = __commonJS5((exports, module) => {
|
|
|
52558
52599
|
}
|
|
52559
52600
|
var listeners = this._events[evt];
|
|
52560
52601
|
if (listeners.fn) {
|
|
52561
|
-
if (listeners.fn === fn && (!
|
|
52602
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
52562
52603
|
clearEvent(this, evt);
|
|
52563
52604
|
}
|
|
52564
52605
|
} else {
|
|
52565
52606
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
52566
|
-
if (listeners[i].fn !== fn ||
|
|
52607
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
52567
52608
|
events.push(listeners[i]);
|
|
52568
52609
|
}
|
|
52569
52610
|
}
|
|
@@ -52597,7 +52638,7 @@ var require_eventemitter33 = __commonJS5((exports, module) => {
|
|
|
52597
52638
|
var import__3 = __toESM5(require_eventemitter33(), 1);
|
|
52598
52639
|
var exports_external2 = {};
|
|
52599
52640
|
__export3(exports_external2, {
|
|
52600
|
-
xor: () =>
|
|
52641
|
+
xor: () => xor3,
|
|
52601
52642
|
xid: () => xid22,
|
|
52602
52643
|
void: () => _void22,
|
|
52603
52644
|
uuidv7: () => uuidv72,
|
|
@@ -52608,7 +52649,7 @@ __export3(exports_external2, {
|
|
|
52608
52649
|
url: () => url5,
|
|
52609
52650
|
uppercase: () => _uppercase2,
|
|
52610
52651
|
unknown: () => unknown2,
|
|
52611
|
-
union: () =>
|
|
52652
|
+
union: () => union3,
|
|
52612
52653
|
undefined: () => _undefined32,
|
|
52613
52654
|
ulid: () => ulid22,
|
|
52614
52655
|
uint64: () => uint642,
|
|
@@ -52696,7 +52737,7 @@ __export3(exports_external2, {
|
|
|
52696
52737
|
iso: () => exports_iso2,
|
|
52697
52738
|
ipv6: () => ipv622,
|
|
52698
52739
|
ipv4: () => ipv422,
|
|
52699
|
-
intersection: () =>
|
|
52740
|
+
intersection: () => intersection3,
|
|
52700
52741
|
int64: () => int642,
|
|
52701
52742
|
int32: () => int322,
|
|
52702
52743
|
int: () => int2,
|
|
@@ -52738,7 +52779,7 @@ __export3(exports_external2, {
|
|
|
52738
52779
|
config: () => config2,
|
|
52739
52780
|
coerce: () => exports_coerce2,
|
|
52740
52781
|
codec: () => codec2,
|
|
52741
|
-
clone: () =>
|
|
52782
|
+
clone: () => clone3,
|
|
52742
52783
|
cidrv6: () => cidrv622,
|
|
52743
52784
|
cidrv4: () => cidrv422,
|
|
52744
52785
|
check: () => check2,
|
|
@@ -52873,7 +52914,7 @@ __export3(exports_core22, {
|
|
|
52873
52914
|
createToJSONSchemaMethod: () => createToJSONSchemaMethod2,
|
|
52874
52915
|
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod2,
|
|
52875
52916
|
config: () => config2,
|
|
52876
|
-
clone: () =>
|
|
52917
|
+
clone: () => clone3,
|
|
52877
52918
|
_xor: () => _xor2,
|
|
52878
52919
|
_xid: () => _xid2,
|
|
52879
52920
|
_void: () => _void3,
|
|
@@ -53202,10 +53243,10 @@ __export3(exports_util2, {
|
|
|
53202
53243
|
primitiveTypes: () => primitiveTypes2,
|
|
53203
53244
|
prefixIssues: () => prefixIssues2,
|
|
53204
53245
|
pick: () => pick22,
|
|
53205
|
-
partial: () =>
|
|
53246
|
+
partial: () => partial4,
|
|
53206
53247
|
parsedType: () => parsedType2,
|
|
53207
53248
|
optionalKeys: () => optionalKeys2,
|
|
53208
|
-
omit: () =>
|
|
53249
|
+
omit: () => omit3,
|
|
53209
53250
|
objectClone: () => objectClone2,
|
|
53210
53251
|
numKeys: () => numKeys2,
|
|
53211
53252
|
nullish: () => nullish3,
|
|
@@ -53231,7 +53272,7 @@ __export3(exports_util2, {
|
|
|
53231
53272
|
defineLazy: () => defineLazy2,
|
|
53232
53273
|
createTransparentProxy: () => createTransparentProxy2,
|
|
53233
53274
|
cloneDef: () => cloneDef2,
|
|
53234
|
-
clone: () =>
|
|
53275
|
+
clone: () => clone3,
|
|
53235
53276
|
cleanRegex: () => cleanRegex2,
|
|
53236
53277
|
cleanEnum: () => cleanEnum2,
|
|
53237
53278
|
captureStackTrace: () => captureStackTrace2,
|
|
@@ -53481,7 +53522,7 @@ var primitiveTypes2 = new Set(["string", "number", "bigint", "boolean", "symbol"
|
|
|
53481
53522
|
function escapeRegex2(str) {
|
|
53482
53523
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
53483
53524
|
}
|
|
53484
|
-
function
|
|
53525
|
+
function clone3(inst, def, params) {
|
|
53485
53526
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
53486
53527
|
if (!def || params?.parent)
|
|
53487
53528
|
cl._zod.parent = inst;
|
|
@@ -53582,9 +53623,9 @@ function pick22(schema, mask) {
|
|
|
53582
53623
|
},
|
|
53583
53624
|
checks: []
|
|
53584
53625
|
});
|
|
53585
|
-
return
|
|
53626
|
+
return clone3(schema, def);
|
|
53586
53627
|
}
|
|
53587
|
-
function
|
|
53628
|
+
function omit3(schema, mask) {
|
|
53588
53629
|
const currDef = schema._zod.def;
|
|
53589
53630
|
const checks = currDef.checks;
|
|
53590
53631
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -53607,7 +53648,7 @@ function omit2(schema, mask) {
|
|
|
53607
53648
|
},
|
|
53608
53649
|
checks: []
|
|
53609
53650
|
});
|
|
53610
|
-
return
|
|
53651
|
+
return clone3(schema, def);
|
|
53611
53652
|
}
|
|
53612
53653
|
function extend2(schema, shape) {
|
|
53613
53654
|
if (!isPlainObject22(shape)) {
|
|
@@ -53630,7 +53671,7 @@ function extend2(schema, shape) {
|
|
|
53630
53671
|
return _shape;
|
|
53631
53672
|
}
|
|
53632
53673
|
});
|
|
53633
|
-
return
|
|
53674
|
+
return clone3(schema, def);
|
|
53634
53675
|
}
|
|
53635
53676
|
function safeExtend2(schema, shape) {
|
|
53636
53677
|
if (!isPlainObject22(shape)) {
|
|
@@ -53643,7 +53684,7 @@ function safeExtend2(schema, shape) {
|
|
|
53643
53684
|
return _shape;
|
|
53644
53685
|
}
|
|
53645
53686
|
});
|
|
53646
|
-
return
|
|
53687
|
+
return clone3(schema, def);
|
|
53647
53688
|
}
|
|
53648
53689
|
function merge22(a, b) {
|
|
53649
53690
|
const def = mergeDefs2(a._zod.def, {
|
|
@@ -53657,9 +53698,9 @@ function merge22(a, b) {
|
|
|
53657
53698
|
},
|
|
53658
53699
|
checks: []
|
|
53659
53700
|
});
|
|
53660
|
-
return
|
|
53701
|
+
return clone3(a, def);
|
|
53661
53702
|
}
|
|
53662
|
-
function
|
|
53703
|
+
function partial4(Class2, schema, mask) {
|
|
53663
53704
|
const currDef = schema._zod.def;
|
|
53664
53705
|
const checks = currDef.checks;
|
|
53665
53706
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -53695,7 +53736,7 @@ function partial3(Class2, schema, mask) {
|
|
|
53695
53736
|
},
|
|
53696
53737
|
checks: []
|
|
53697
53738
|
});
|
|
53698
|
-
return
|
|
53739
|
+
return clone3(schema, def);
|
|
53699
53740
|
}
|
|
53700
53741
|
function required2(Class2, schema, mask) {
|
|
53701
53742
|
const def = mergeDefs2(schema._zod.def, {
|
|
@@ -53726,7 +53767,7 @@ function required2(Class2, schema, mask) {
|
|
|
53726
53767
|
return shape;
|
|
53727
53768
|
}
|
|
53728
53769
|
});
|
|
53729
|
-
return
|
|
53770
|
+
return clone3(schema, def);
|
|
53730
53771
|
}
|
|
53731
53772
|
function aborted2(x, startIndex = 0) {
|
|
53732
53773
|
if (x.aborted === true)
|
|
@@ -55403,15 +55444,15 @@ var $ZodDate2 = /* @__PURE__ */ $constructor2("$ZodDate", (inst, def) => {
|
|
|
55403
55444
|
} catch (_err) {}
|
|
55404
55445
|
}
|
|
55405
55446
|
const input = payload.value;
|
|
55406
|
-
const
|
|
55407
|
-
const isValidDate =
|
|
55447
|
+
const isDate3 = input instanceof Date;
|
|
55448
|
+
const isValidDate = isDate3 && !Number.isNaN(input.getTime());
|
|
55408
55449
|
if (isValidDate)
|
|
55409
55450
|
return payload;
|
|
55410
55451
|
payload.issues.push({
|
|
55411
55452
|
expected: "date",
|
|
55412
55453
|
code: "invalid_type",
|
|
55413
55454
|
input,
|
|
55414
|
-
...
|
|
55455
|
+
...isDate3 ? { received: "Invalid Date" } : {},
|
|
55415
55456
|
inst
|
|
55416
55457
|
});
|
|
55417
55458
|
return payload;
|
|
@@ -56016,8 +56057,8 @@ var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => {
|
|
|
56016
56057
|
}
|
|
56017
56058
|
}
|
|
56018
56059
|
if (def.rest) {
|
|
56019
|
-
const
|
|
56020
|
-
for (const el of
|
|
56060
|
+
const rest2 = input.slice(items.length);
|
|
56061
|
+
for (const el of rest2) {
|
|
56021
56062
|
i++;
|
|
56022
56063
|
const result = def.rest._zod.run({
|
|
56023
56064
|
value: el,
|
|
@@ -59743,11 +59784,11 @@ var capitalizeFirstCharacter2 = (text) => {
|
|
|
59743
59784
|
};
|
|
59744
59785
|
function getUnitTypeFromNumber2(number22) {
|
|
59745
59786
|
const abs = Math.abs(number22);
|
|
59746
|
-
const
|
|
59747
|
-
const
|
|
59748
|
-
if (
|
|
59787
|
+
const last2 = abs % 10;
|
|
59788
|
+
const last22 = abs % 100;
|
|
59789
|
+
if (last22 >= 11 && last22 <= 19 || last2 === 0)
|
|
59749
59790
|
return "many";
|
|
59750
|
-
if (
|
|
59791
|
+
if (last2 === 1)
|
|
59751
59792
|
return "one";
|
|
59752
59793
|
return "few";
|
|
59753
59794
|
}
|
|
@@ -62948,11 +62989,11 @@ function _intersection2(Class22, left, right) {
|
|
|
62948
62989
|
function _tuple2(Class22, items, _paramsOrRest, _params) {
|
|
62949
62990
|
const hasRest = _paramsOrRest instanceof $ZodType2;
|
|
62950
62991
|
const params = hasRest ? _params : _paramsOrRest;
|
|
62951
|
-
const
|
|
62992
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
62952
62993
|
return new Class22({
|
|
62953
62994
|
type: "tuple",
|
|
62954
62995
|
items,
|
|
62955
|
-
rest,
|
|
62996
|
+
rest: rest2,
|
|
62956
62997
|
...normalizeParams2(params)
|
|
62957
62998
|
});
|
|
62958
62999
|
}
|
|
@@ -63890,30 +63931,30 @@ var tupleProcessor2 = (schema, ctx, _json, params) => {
|
|
|
63890
63931
|
...params,
|
|
63891
63932
|
path: [...params.path, prefixPath, i]
|
|
63892
63933
|
}));
|
|
63893
|
-
const
|
|
63934
|
+
const rest2 = def.rest ? process5(def.rest, ctx, {
|
|
63894
63935
|
...params,
|
|
63895
63936
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
63896
63937
|
}) : null;
|
|
63897
63938
|
if (ctx.target === "draft-2020-12") {
|
|
63898
63939
|
json2.prefixItems = prefixItems;
|
|
63899
|
-
if (
|
|
63900
|
-
json2.items =
|
|
63940
|
+
if (rest2) {
|
|
63941
|
+
json2.items = rest2;
|
|
63901
63942
|
}
|
|
63902
63943
|
} else if (ctx.target === "openapi-3.0") {
|
|
63903
63944
|
json2.items = {
|
|
63904
63945
|
anyOf: prefixItems
|
|
63905
63946
|
};
|
|
63906
|
-
if (
|
|
63907
|
-
json2.items.anyOf.push(
|
|
63947
|
+
if (rest2) {
|
|
63948
|
+
json2.items.anyOf.push(rest2);
|
|
63908
63949
|
}
|
|
63909
63950
|
json2.minItems = prefixItems.length;
|
|
63910
|
-
if (!
|
|
63951
|
+
if (!rest2) {
|
|
63911
63952
|
json2.maxItems = prefixItems.length;
|
|
63912
63953
|
}
|
|
63913
63954
|
} else {
|
|
63914
63955
|
json2.items = prefixItems;
|
|
63915
|
-
if (
|
|
63916
|
-
json2.additionalItems =
|
|
63956
|
+
if (rest2) {
|
|
63957
|
+
json2.additionalItems = rest2;
|
|
63917
63958
|
}
|
|
63918
63959
|
}
|
|
63919
63960
|
const { minimum, maximum } = schema._zod.bag;
|
|
@@ -64172,7 +64213,7 @@ class JSONSchemaGenerator2 {
|
|
|
64172
64213
|
var exports_json_schema2 = {};
|
|
64173
64214
|
var exports_schemas22 = {};
|
|
64174
64215
|
__export3(exports_schemas22, {
|
|
64175
|
-
xor: () =>
|
|
64216
|
+
xor: () => xor3,
|
|
64176
64217
|
xid: () => xid22,
|
|
64177
64218
|
void: () => _void22,
|
|
64178
64219
|
uuidv7: () => uuidv72,
|
|
@@ -64181,7 +64222,7 @@ __export3(exports_schemas22, {
|
|
|
64181
64222
|
uuid: () => uuid22,
|
|
64182
64223
|
url: () => url5,
|
|
64183
64224
|
unknown: () => unknown2,
|
|
64184
|
-
union: () =>
|
|
64225
|
+
union: () => union3,
|
|
64185
64226
|
undefined: () => _undefined32,
|
|
64186
64227
|
ulid: () => ulid22,
|
|
64187
64228
|
uint64: () => uint642,
|
|
@@ -64229,7 +64270,7 @@ __export3(exports_schemas22, {
|
|
|
64229
64270
|
json: () => json2,
|
|
64230
64271
|
ipv6: () => ipv622,
|
|
64231
64272
|
ipv4: () => ipv422,
|
|
64232
|
-
intersection: () =>
|
|
64273
|
+
intersection: () => intersection3,
|
|
64233
64274
|
int64: () => int642,
|
|
64234
64275
|
int32: () => int322,
|
|
64235
64276
|
int: () => int2,
|
|
@@ -64476,7 +64517,7 @@ var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
|
64476
64517
|
});
|
|
64477
64518
|
};
|
|
64478
64519
|
inst.with = inst.check;
|
|
64479
|
-
inst.clone = (def2, params) =>
|
|
64520
|
+
inst.clone = (def2, params) => clone3(inst, def2, params);
|
|
64480
64521
|
inst.brand = () => inst;
|
|
64481
64522
|
inst.register = (reg, meta22) => {
|
|
64482
64523
|
reg.add(inst, meta22);
|
|
@@ -64504,8 +64545,8 @@ var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
|
|
|
64504
64545
|
inst.nullish = () => optional2(nullable2(inst));
|
|
64505
64546
|
inst.nonoptional = (params) => nonoptional2(inst, params);
|
|
64506
64547
|
inst.array = () => array3(inst);
|
|
64507
|
-
inst.or = (arg) =>
|
|
64508
|
-
inst.and = (arg) =>
|
|
64548
|
+
inst.or = (arg) => union3([inst, arg]);
|
|
64549
|
+
inst.and = (arg) => intersection3(inst, arg);
|
|
64509
64550
|
inst.transform = (tx) => pipe2(inst, transform2(tx));
|
|
64510
64551
|
inst.default = (def2) => _default22(inst, def2);
|
|
64511
64552
|
inst.prefault = (def2) => prefault2(inst, def2);
|
|
@@ -65008,7 +65049,7 @@ var ZodUnion2 = /* @__PURE__ */ $constructor2("ZodUnion", (inst, def) => {
|
|
|
65008
65049
|
inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor2(inst, ctx, json2, params);
|
|
65009
65050
|
inst.options = def.options;
|
|
65010
65051
|
});
|
|
65011
|
-
function
|
|
65052
|
+
function union3(options, params) {
|
|
65012
65053
|
return new ZodUnion2({
|
|
65013
65054
|
type: "union",
|
|
65014
65055
|
options,
|
|
@@ -65021,7 +65062,7 @@ var ZodXor2 = /* @__PURE__ */ $constructor2("ZodXor", (inst, def) => {
|
|
|
65021
65062
|
inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor2(inst, ctx, json2, params);
|
|
65022
65063
|
inst.options = def.options;
|
|
65023
65064
|
});
|
|
65024
|
-
function
|
|
65065
|
+
function xor3(options, params) {
|
|
65025
65066
|
return new ZodXor2({
|
|
65026
65067
|
type: "union",
|
|
65027
65068
|
options,
|
|
@@ -65046,7 +65087,7 @@ var ZodIntersection2 = /* @__PURE__ */ $constructor2("ZodIntersection", (inst, d
|
|
|
65046
65087
|
ZodType2.init(inst, def);
|
|
65047
65088
|
inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor2(inst, ctx, json2, params);
|
|
65048
65089
|
});
|
|
65049
|
-
function
|
|
65090
|
+
function intersection3(left, right) {
|
|
65050
65091
|
return new ZodIntersection2({
|
|
65051
65092
|
type: "intersection",
|
|
65052
65093
|
left,
|
|
@@ -65057,19 +65098,19 @@ var ZodTuple2 = /* @__PURE__ */ $constructor2("ZodTuple", (inst, def) => {
|
|
|
65057
65098
|
$ZodTuple2.init(inst, def);
|
|
65058
65099
|
ZodType2.init(inst, def);
|
|
65059
65100
|
inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor2(inst, ctx, json2, params);
|
|
65060
|
-
inst.rest = (
|
|
65101
|
+
inst.rest = (rest2) => inst.clone({
|
|
65061
65102
|
...inst._zod.def,
|
|
65062
|
-
rest
|
|
65103
|
+
rest: rest2
|
|
65063
65104
|
});
|
|
65064
65105
|
});
|
|
65065
65106
|
function tuple2(items, _paramsOrRest, _params) {
|
|
65066
65107
|
const hasRest = _paramsOrRest instanceof $ZodType2;
|
|
65067
65108
|
const params = hasRest ? _params : _paramsOrRest;
|
|
65068
|
-
const
|
|
65109
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
65069
65110
|
return new ZodTuple2({
|
|
65070
65111
|
type: "tuple",
|
|
65071
65112
|
items,
|
|
65072
|
-
rest,
|
|
65113
|
+
rest: rest2,
|
|
65073
65114
|
...exports_util2.normalizeParams(params)
|
|
65074
65115
|
});
|
|
65075
65116
|
}
|
|
@@ -65089,7 +65130,7 @@ function record2(keyType, valueType, params) {
|
|
|
65089
65130
|
});
|
|
65090
65131
|
}
|
|
65091
65132
|
function partialRecord2(keyType, valueType, params) {
|
|
65092
|
-
const k =
|
|
65133
|
+
const k = clone3(keyType);
|
|
65093
65134
|
k._zod.values = undefined;
|
|
65094
65135
|
return new ZodRecord2({
|
|
65095
65136
|
type: "record",
|
|
@@ -65521,7 +65562,7 @@ var stringbool2 = (...args2) => _stringbool2({
|
|
|
65521
65562
|
}, ...args2);
|
|
65522
65563
|
function json2(params) {
|
|
65523
65564
|
const jsonSchema = lazy2(() => {
|
|
65524
|
-
return
|
|
65565
|
+
return union3([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record2(string22(), jsonSchema)]);
|
|
65525
65566
|
});
|
|
65526
65567
|
return jsonSchema;
|
|
65527
65568
|
}
|
|
@@ -65886,9 +65927,9 @@ function convertBaseSchema2(schema, ctx) {
|
|
|
65886
65927
|
const items = schema.items;
|
|
65887
65928
|
if (prefixItems && Array.isArray(prefixItems)) {
|
|
65888
65929
|
const tupleItems = prefixItems.map((item) => convertSchema2(item, ctx));
|
|
65889
|
-
const
|
|
65890
|
-
if (
|
|
65891
|
-
zodSchema = z2.tuple(tupleItems).rest(
|
|
65930
|
+
const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema2(items, ctx) : undefined;
|
|
65931
|
+
if (rest2) {
|
|
65932
|
+
zodSchema = z2.tuple(tupleItems).rest(rest2);
|
|
65892
65933
|
} else {
|
|
65893
65934
|
zodSchema = z2.tuple(tupleItems);
|
|
65894
65935
|
}
|
|
@@ -65900,9 +65941,9 @@ function convertBaseSchema2(schema, ctx) {
|
|
|
65900
65941
|
}
|
|
65901
65942
|
} else if (Array.isArray(items)) {
|
|
65902
65943
|
const tupleItems = items.map((item) => convertSchema2(item, ctx));
|
|
65903
|
-
const
|
|
65904
|
-
if (
|
|
65905
|
-
zodSchema = z2.tuple(tupleItems).rest(
|
|
65944
|
+
const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema2(schema.additionalItems, ctx) : undefined;
|
|
65945
|
+
if (rest2) {
|
|
65946
|
+
zodSchema = z2.tuple(tupleItems).rest(rest2);
|
|
65906
65947
|
} else {
|
|
65907
65948
|
zodSchema = z2.tuple(tupleItems);
|
|
65908
65949
|
}
|
|
@@ -66035,7 +66076,7 @@ function date42(params) {
|
|
|
66035
66076
|
return _coercedDate2(ZodDate2, params);
|
|
66036
66077
|
}
|
|
66037
66078
|
config2(en_default2());
|
|
66038
|
-
var
|
|
66079
|
+
var random3 = (bytes) => crypto.getRandomValues(new Uint8Array(bytes));
|
|
66039
66080
|
var customRandom2 = (alphabet, defaultSize, getRandom) => {
|
|
66040
66081
|
let mask = (2 << Math.log2(alphabet.length - 1)) - 1;
|
|
66041
66082
|
let step = -~(1.6 * mask * defaultSize / alphabet.length);
|
|
@@ -66052,10 +66093,10 @@ var customRandom2 = (alphabet, defaultSize, getRandom) => {
|
|
|
66052
66093
|
}
|
|
66053
66094
|
};
|
|
66054
66095
|
};
|
|
66055
|
-
var customAlphabet2 = (alphabet, size = 21) => customRandom2(alphabet, size | 0,
|
|
66096
|
+
var customAlphabet2 = (alphabet, size = 21) => customRandom2(alphabet, size | 0, random3);
|
|
66056
66097
|
var nanoid32 = customAlphabet2("abcdefghijklmnopqrstuvwxyz", 16);
|
|
66057
66098
|
|
|
66058
|
-
// ../node_modules/.pnpm/@kevisual+js-filter@0.0.
|
|
66099
|
+
// ../node_modules/.pnpm/@kevisual+js-filter@0.0.6/node_modules/@kevisual/js-filter/dist/index.js
|
|
66059
66100
|
class Lexer {
|
|
66060
66101
|
constructor(input) {
|
|
66061
66102
|
this.pos = 0;
|
|
@@ -66398,7 +66439,7 @@ function filter(data, query) {
|
|
|
66398
66439
|
return executor.execute(ast, data);
|
|
66399
66440
|
}
|
|
66400
66441
|
|
|
66401
|
-
// ../node_modules/.pnpm/@kevisual+api@0.0.
|
|
66442
|
+
// ../node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-proxy/router-api-proxy.ts
|
|
66402
66443
|
var initApi = async (opts) => {
|
|
66403
66444
|
const router = opts?.router;
|
|
66404
66445
|
const item = opts?.item;
|
|
@@ -66481,10 +66522,10 @@ var runCode = async (tsPath, params = {}, opts) => {
|
|
|
66481
66522
|
let child;
|
|
66482
66523
|
let resolved = false;
|
|
66483
66524
|
let isSendParam = false;
|
|
66484
|
-
let
|
|
66525
|
+
let timeout2;
|
|
66485
66526
|
const cleanup = () => {
|
|
66486
|
-
if (
|
|
66487
|
-
clearTimeout(
|
|
66527
|
+
if (timeout2) {
|
|
66528
|
+
clearTimeout(timeout2);
|
|
66488
66529
|
}
|
|
66489
66530
|
if (child && !child.killed) {
|
|
66490
66531
|
child.kill();
|
|
@@ -66554,7 +66595,7 @@ var runCode = async (tsPath, params = {}, opts) => {
|
|
|
66554
66595
|
error: `子进程错误: ${error51?.message}`
|
|
66555
66596
|
});
|
|
66556
66597
|
});
|
|
66557
|
-
|
|
66598
|
+
timeout2 = setTimeout(() => {
|
|
66558
66599
|
resolveOnce({
|
|
66559
66600
|
success: false,
|
|
66560
66601
|
error: "子进程执行超时"
|
|
@@ -66811,7 +66852,7 @@ class ModuleResolver {
|
|
|
66811
66852
|
// ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
66812
66853
|
var exports_external3 = {};
|
|
66813
66854
|
__export(exports_external3, {
|
|
66814
|
-
xor: () =>
|
|
66855
|
+
xor: () => xor4,
|
|
66815
66856
|
xid: () => xid6,
|
|
66816
66857
|
void: () => _void6,
|
|
66817
66858
|
uuidv7: () => uuidv73,
|
|
@@ -66822,7 +66863,7 @@ __export(exports_external3, {
|
|
|
66822
66863
|
url: () => url6,
|
|
66823
66864
|
uppercase: () => _uppercase3,
|
|
66824
66865
|
unknown: () => unknown3,
|
|
66825
|
-
union: () =>
|
|
66866
|
+
union: () => union4,
|
|
66826
66867
|
undefined: () => _undefined8,
|
|
66827
66868
|
ulid: () => ulid6,
|
|
66828
66869
|
uint64: () => uint643,
|
|
@@ -66910,7 +66951,7 @@ __export(exports_external3, {
|
|
|
66910
66951
|
iso: () => exports_iso3,
|
|
66911
66952
|
ipv6: () => ipv66,
|
|
66912
66953
|
ipv4: () => ipv46,
|
|
66913
|
-
intersection: () =>
|
|
66954
|
+
intersection: () => intersection4,
|
|
66914
66955
|
int64: () => int643,
|
|
66915
66956
|
int32: () => int323,
|
|
66916
66957
|
int: () => int3,
|
|
@@ -66952,7 +66993,7 @@ __export(exports_external3, {
|
|
|
66952
66993
|
config: () => config3,
|
|
66953
66994
|
coerce: () => exports_coerce3,
|
|
66954
66995
|
codec: () => codec3,
|
|
66955
|
-
clone: () =>
|
|
66996
|
+
clone: () => clone4,
|
|
66956
66997
|
cidrv6: () => cidrv66,
|
|
66957
66998
|
cidrv4: () => cidrv46,
|
|
66958
66999
|
check: () => check3,
|
|
@@ -67089,7 +67130,7 @@ __export(exports_core3, {
|
|
|
67089
67130
|
createToJSONSchemaMethod: () => createToJSONSchemaMethod3,
|
|
67090
67131
|
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod3,
|
|
67091
67132
|
config: () => config3,
|
|
67092
|
-
clone: () =>
|
|
67133
|
+
clone: () => clone4,
|
|
67093
67134
|
_xor: () => _xor3,
|
|
67094
67135
|
_xid: () => _xid3,
|
|
67095
67136
|
_void: () => _void5,
|
|
@@ -67420,11 +67461,11 @@ __export(exports_util3, {
|
|
|
67420
67461
|
promiseAllObject: () => promiseAllObject3,
|
|
67421
67462
|
primitiveTypes: () => primitiveTypes3,
|
|
67422
67463
|
prefixIssues: () => prefixIssues3,
|
|
67423
|
-
pick: () =>
|
|
67424
|
-
partial: () =>
|
|
67464
|
+
pick: () => pick5,
|
|
67465
|
+
partial: () => partial5,
|
|
67425
67466
|
parsedType: () => parsedType3,
|
|
67426
67467
|
optionalKeys: () => optionalKeys3,
|
|
67427
|
-
omit: () =>
|
|
67468
|
+
omit: () => omit4,
|
|
67428
67469
|
objectClone: () => objectClone3,
|
|
67429
67470
|
numKeys: () => numKeys3,
|
|
67430
67471
|
nullish: () => nullish5,
|
|
@@ -67434,7 +67475,7 @@ __export(exports_util3, {
|
|
|
67434
67475
|
jsonStringifyReplacer: () => jsonStringifyReplacer3,
|
|
67435
67476
|
joinValues: () => joinValues3,
|
|
67436
67477
|
issue: () => issue3,
|
|
67437
|
-
isPlainObject: () =>
|
|
67478
|
+
isPlainObject: () => isPlainObject7,
|
|
67438
67479
|
isObject: () => isObject4,
|
|
67439
67480
|
hexToUint8Array: () => hexToUint8Array3,
|
|
67440
67481
|
getSizableOrigin: () => getSizableOrigin3,
|
|
@@ -67450,7 +67491,7 @@ __export(exports_util3, {
|
|
|
67450
67491
|
defineLazy: () => defineLazy3,
|
|
67451
67492
|
createTransparentProxy: () => createTransparentProxy3,
|
|
67452
67493
|
cloneDef: () => cloneDef3,
|
|
67453
|
-
clone: () =>
|
|
67494
|
+
clone: () => clone4,
|
|
67454
67495
|
cleanRegex: () => cleanRegex3,
|
|
67455
67496
|
cleanEnum: () => cleanEnum3,
|
|
67456
67497
|
captureStackTrace: () => captureStackTrace3,
|
|
@@ -67619,7 +67660,7 @@ var allowsEval3 = cached3(() => {
|
|
|
67619
67660
|
return false;
|
|
67620
67661
|
}
|
|
67621
67662
|
});
|
|
67622
|
-
function
|
|
67663
|
+
function isPlainObject7(o) {
|
|
67623
67664
|
if (isObject4(o) === false)
|
|
67624
67665
|
return false;
|
|
67625
67666
|
const ctor = o.constructor;
|
|
@@ -67636,7 +67677,7 @@ function isPlainObject6(o) {
|
|
|
67636
67677
|
return true;
|
|
67637
67678
|
}
|
|
67638
67679
|
function shallowClone3(o) {
|
|
67639
|
-
if (
|
|
67680
|
+
if (isPlainObject7(o))
|
|
67640
67681
|
return { ...o };
|
|
67641
67682
|
if (Array.isArray(o))
|
|
67642
67683
|
return [...o];
|
|
@@ -67700,7 +67741,7 @@ var primitiveTypes3 = new Set(["string", "number", "bigint", "boolean", "symbol"
|
|
|
67700
67741
|
function escapeRegex3(str) {
|
|
67701
67742
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
67702
67743
|
}
|
|
67703
|
-
function
|
|
67744
|
+
function clone4(inst, def, params) {
|
|
67704
67745
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
67705
67746
|
if (!def || params?.parent)
|
|
67706
67747
|
cl._zod.parent = inst;
|
|
@@ -67778,7 +67819,7 @@ var BIGINT_FORMAT_RANGES3 = {
|
|
|
67778
67819
|
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
67779
67820
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
67780
67821
|
};
|
|
67781
|
-
function
|
|
67822
|
+
function pick5(schema, mask) {
|
|
67782
67823
|
const currDef = schema._zod.def;
|
|
67783
67824
|
const checks = currDef.checks;
|
|
67784
67825
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -67801,9 +67842,9 @@ function pick3(schema, mask) {
|
|
|
67801
67842
|
},
|
|
67802
67843
|
checks: []
|
|
67803
67844
|
});
|
|
67804
|
-
return
|
|
67845
|
+
return clone4(schema, def);
|
|
67805
67846
|
}
|
|
67806
|
-
function
|
|
67847
|
+
function omit4(schema, mask) {
|
|
67807
67848
|
const currDef = schema._zod.def;
|
|
67808
67849
|
const checks = currDef.checks;
|
|
67809
67850
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -67826,10 +67867,10 @@ function omit3(schema, mask) {
|
|
|
67826
67867
|
},
|
|
67827
67868
|
checks: []
|
|
67828
67869
|
});
|
|
67829
|
-
return
|
|
67870
|
+
return clone4(schema, def);
|
|
67830
67871
|
}
|
|
67831
67872
|
function extend3(schema, shape) {
|
|
67832
|
-
if (!
|
|
67873
|
+
if (!isPlainObject7(shape)) {
|
|
67833
67874
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
67834
67875
|
}
|
|
67835
67876
|
const checks = schema._zod.def.checks;
|
|
@@ -67849,10 +67890,10 @@ function extend3(schema, shape) {
|
|
|
67849
67890
|
return _shape;
|
|
67850
67891
|
}
|
|
67851
67892
|
});
|
|
67852
|
-
return
|
|
67893
|
+
return clone4(schema, def);
|
|
67853
67894
|
}
|
|
67854
67895
|
function safeExtend3(schema, shape) {
|
|
67855
|
-
if (!
|
|
67896
|
+
if (!isPlainObject7(shape)) {
|
|
67856
67897
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
67857
67898
|
}
|
|
67858
67899
|
const def = mergeDefs3(schema._zod.def, {
|
|
@@ -67862,7 +67903,7 @@ function safeExtend3(schema, shape) {
|
|
|
67862
67903
|
return _shape;
|
|
67863
67904
|
}
|
|
67864
67905
|
});
|
|
67865
|
-
return
|
|
67906
|
+
return clone4(schema, def);
|
|
67866
67907
|
}
|
|
67867
67908
|
function merge6(a, b) {
|
|
67868
67909
|
const def = mergeDefs3(a._zod.def, {
|
|
@@ -67876,9 +67917,9 @@ function merge6(a, b) {
|
|
|
67876
67917
|
},
|
|
67877
67918
|
checks: []
|
|
67878
67919
|
});
|
|
67879
|
-
return
|
|
67920
|
+
return clone4(a, def);
|
|
67880
67921
|
}
|
|
67881
|
-
function
|
|
67922
|
+
function partial5(Class3, schema, mask) {
|
|
67882
67923
|
const currDef = schema._zod.def;
|
|
67883
67924
|
const checks = currDef.checks;
|
|
67884
67925
|
const hasChecks = checks && checks.length > 0;
|
|
@@ -67914,7 +67955,7 @@ function partial4(Class3, schema, mask) {
|
|
|
67914
67955
|
},
|
|
67915
67956
|
checks: []
|
|
67916
67957
|
});
|
|
67917
|
-
return
|
|
67958
|
+
return clone4(schema, def);
|
|
67918
67959
|
}
|
|
67919
67960
|
function required3(Class3, schema, mask) {
|
|
67920
67961
|
const def = mergeDefs3(schema._zod.def, {
|
|
@@ -67945,7 +67986,7 @@ function required3(Class3, schema, mask) {
|
|
|
67945
67986
|
return shape;
|
|
67946
67987
|
}
|
|
67947
67988
|
});
|
|
67948
|
-
return
|
|
67989
|
+
return clone4(schema, def);
|
|
67949
67990
|
}
|
|
67950
67991
|
function aborted3(x, startIndex = 0) {
|
|
67951
67992
|
if (x.aborted === true)
|
|
@@ -69634,15 +69675,15 @@ var $ZodDate3 = /* @__PURE__ */ $constructor3("$ZodDate", (inst, def) => {
|
|
|
69634
69675
|
} catch (_err) {}
|
|
69635
69676
|
}
|
|
69636
69677
|
const input = payload.value;
|
|
69637
|
-
const
|
|
69638
|
-
const isValidDate =
|
|
69678
|
+
const isDate3 = input instanceof Date;
|
|
69679
|
+
const isValidDate = isDate3 && !Number.isNaN(input.getTime());
|
|
69639
69680
|
if (isValidDate)
|
|
69640
69681
|
return payload;
|
|
69641
69682
|
payload.issues.push({
|
|
69642
69683
|
expected: "date",
|
|
69643
69684
|
code: "invalid_type",
|
|
69644
69685
|
input,
|
|
69645
|
-
...
|
|
69686
|
+
...isDate3 ? { received: "Invalid Date" } : {},
|
|
69646
69687
|
inst
|
|
69647
69688
|
});
|
|
69648
69689
|
return payload;
|
|
@@ -70122,7 +70163,7 @@ function mergeValues3(a, b) {
|
|
|
70122
70163
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
70123
70164
|
return { valid: true, data: a };
|
|
70124
70165
|
}
|
|
70125
|
-
if (
|
|
70166
|
+
if (isPlainObject7(a) && isPlainObject7(b)) {
|
|
70126
70167
|
const bKeys = Object.keys(b);
|
|
70127
70168
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
70128
70169
|
const newObj = { ...a, ...b };
|
|
@@ -70247,8 +70288,8 @@ var $ZodTuple3 = /* @__PURE__ */ $constructor3("$ZodTuple", (inst, def) => {
|
|
|
70247
70288
|
}
|
|
70248
70289
|
}
|
|
70249
70290
|
if (def.rest) {
|
|
70250
|
-
const
|
|
70251
|
-
for (const el of
|
|
70291
|
+
const rest2 = input.slice(items.length);
|
|
70292
|
+
for (const el of rest2) {
|
|
70252
70293
|
i++;
|
|
70253
70294
|
const result = def.rest._zod.run({
|
|
70254
70295
|
value: el,
|
|
@@ -70276,7 +70317,7 @@ var $ZodRecord3 = /* @__PURE__ */ $constructor3("$ZodRecord", (inst, def) => {
|
|
|
70276
70317
|
$ZodType3.init(inst, def);
|
|
70277
70318
|
inst._zod.parse = (payload, ctx) => {
|
|
70278
70319
|
const input = payload.value;
|
|
70279
|
-
if (!
|
|
70320
|
+
if (!isPlainObject7(input)) {
|
|
70280
70321
|
payload.issues.push({
|
|
70281
70322
|
expected: "record",
|
|
70282
70323
|
code: "invalid_type",
|
|
@@ -74004,11 +74045,11 @@ var capitalizeFirstCharacter3 = (text) => {
|
|
|
74004
74045
|
};
|
|
74005
74046
|
function getUnitTypeFromNumber3(number5) {
|
|
74006
74047
|
const abs = Math.abs(number5);
|
|
74007
|
-
const
|
|
74008
|
-
const
|
|
74009
|
-
if (
|
|
74048
|
+
const last2 = abs % 10;
|
|
74049
|
+
const last22 = abs % 100;
|
|
74050
|
+
if (last22 >= 11 && last22 <= 19 || last2 === 0)
|
|
74010
74051
|
return "many";
|
|
74011
|
-
if (
|
|
74052
|
+
if (last2 === 1)
|
|
74012
74053
|
return "one";
|
|
74013
74054
|
return "few";
|
|
74014
74055
|
}
|
|
@@ -77234,11 +77275,11 @@ function _intersection3(Class4, left, right) {
|
|
|
77234
77275
|
function _tuple3(Class4, items, _paramsOrRest, _params) {
|
|
77235
77276
|
const hasRest = _paramsOrRest instanceof $ZodType3;
|
|
77236
77277
|
const params = hasRest ? _params : _paramsOrRest;
|
|
77237
|
-
const
|
|
77278
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
77238
77279
|
return new Class4({
|
|
77239
77280
|
type: "tuple",
|
|
77240
77281
|
items,
|
|
77241
|
-
rest,
|
|
77282
|
+
rest: rest2,
|
|
77242
77283
|
...normalizeParams3(params)
|
|
77243
77284
|
});
|
|
77244
77285
|
}
|
|
@@ -78178,30 +78219,30 @@ var tupleProcessor3 = (schema, ctx, _json, params) => {
|
|
|
78178
78219
|
...params,
|
|
78179
78220
|
path: [...params.path, prefixPath, i]
|
|
78180
78221
|
}));
|
|
78181
|
-
const
|
|
78222
|
+
const rest2 = def.rest ? process6(def.rest, ctx, {
|
|
78182
78223
|
...params,
|
|
78183
78224
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
78184
78225
|
}) : null;
|
|
78185
78226
|
if (ctx.target === "draft-2020-12") {
|
|
78186
78227
|
json3.prefixItems = prefixItems;
|
|
78187
|
-
if (
|
|
78188
|
-
json3.items =
|
|
78228
|
+
if (rest2) {
|
|
78229
|
+
json3.items = rest2;
|
|
78189
78230
|
}
|
|
78190
78231
|
} else if (ctx.target === "openapi-3.0") {
|
|
78191
78232
|
json3.items = {
|
|
78192
78233
|
anyOf: prefixItems
|
|
78193
78234
|
};
|
|
78194
|
-
if (
|
|
78195
|
-
json3.items.anyOf.push(
|
|
78235
|
+
if (rest2) {
|
|
78236
|
+
json3.items.anyOf.push(rest2);
|
|
78196
78237
|
}
|
|
78197
78238
|
json3.minItems = prefixItems.length;
|
|
78198
|
-
if (!
|
|
78239
|
+
if (!rest2) {
|
|
78199
78240
|
json3.maxItems = prefixItems.length;
|
|
78200
78241
|
}
|
|
78201
78242
|
} else {
|
|
78202
78243
|
json3.items = prefixItems;
|
|
78203
|
-
if (
|
|
78204
|
-
json3.additionalItems =
|
|
78244
|
+
if (rest2) {
|
|
78245
|
+
json3.additionalItems = rest2;
|
|
78205
78246
|
}
|
|
78206
78247
|
}
|
|
78207
78248
|
const { minimum, maximum } = schema._zod.bag;
|
|
@@ -78462,7 +78503,7 @@ var exports_json_schema3 = {};
|
|
|
78462
78503
|
// ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
78463
78504
|
var exports_schemas3 = {};
|
|
78464
78505
|
__export(exports_schemas3, {
|
|
78465
|
-
xor: () =>
|
|
78506
|
+
xor: () => xor4,
|
|
78466
78507
|
xid: () => xid6,
|
|
78467
78508
|
void: () => _void6,
|
|
78468
78509
|
uuidv7: () => uuidv73,
|
|
@@ -78471,7 +78512,7 @@ __export(exports_schemas3, {
|
|
|
78471
78512
|
uuid: () => uuid8,
|
|
78472
78513
|
url: () => url6,
|
|
78473
78514
|
unknown: () => unknown3,
|
|
78474
|
-
union: () =>
|
|
78515
|
+
union: () => union4,
|
|
78475
78516
|
undefined: () => _undefined8,
|
|
78476
78517
|
ulid: () => ulid6,
|
|
78477
78518
|
uint64: () => uint643,
|
|
@@ -78519,7 +78560,7 @@ __export(exports_schemas3, {
|
|
|
78519
78560
|
json: () => json3,
|
|
78520
78561
|
ipv6: () => ipv66,
|
|
78521
78562
|
ipv4: () => ipv46,
|
|
78522
|
-
intersection: () =>
|
|
78563
|
+
intersection: () => intersection4,
|
|
78523
78564
|
int64: () => int643,
|
|
78524
78565
|
int32: () => int323,
|
|
78525
78566
|
int: () => int3,
|
|
@@ -78776,7 +78817,7 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
|
|
|
78776
78817
|
});
|
|
78777
78818
|
};
|
|
78778
78819
|
inst.with = inst.check;
|
|
78779
|
-
inst.clone = (def2, params) =>
|
|
78820
|
+
inst.clone = (def2, params) => clone4(inst, def2, params);
|
|
78780
78821
|
inst.brand = () => inst;
|
|
78781
78822
|
inst.register = (reg, meta4) => {
|
|
78782
78823
|
reg.add(inst, meta4);
|
|
@@ -78804,8 +78845,8 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
|
|
|
78804
78845
|
inst.nullish = () => optional3(nullable3(inst));
|
|
78805
78846
|
inst.nonoptional = (params) => nonoptional3(inst, params);
|
|
78806
78847
|
inst.array = () => array4(inst);
|
|
78807
|
-
inst.or = (arg) =>
|
|
78808
|
-
inst.and = (arg) =>
|
|
78848
|
+
inst.or = (arg) => union4([inst, arg]);
|
|
78849
|
+
inst.and = (arg) => intersection4(inst, arg);
|
|
78809
78850
|
inst.transform = (tx) => pipe3(inst, transform3(tx));
|
|
78810
78851
|
inst.default = (def2) => _default6(inst, def2);
|
|
78811
78852
|
inst.prefault = (def2) => prefault3(inst, def2);
|
|
@@ -79308,7 +79349,7 @@ var ZodUnion3 = /* @__PURE__ */ $constructor3("ZodUnion", (inst, def) => {
|
|
|
79308
79349
|
inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
|
|
79309
79350
|
inst.options = def.options;
|
|
79310
79351
|
});
|
|
79311
|
-
function
|
|
79352
|
+
function union4(options, params) {
|
|
79312
79353
|
return new ZodUnion3({
|
|
79313
79354
|
type: "union",
|
|
79314
79355
|
options,
|
|
@@ -79321,7 +79362,7 @@ var ZodXor3 = /* @__PURE__ */ $constructor3("ZodXor", (inst, def) => {
|
|
|
79321
79362
|
inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
|
|
79322
79363
|
inst.options = def.options;
|
|
79323
79364
|
});
|
|
79324
|
-
function
|
|
79365
|
+
function xor4(options, params) {
|
|
79325
79366
|
return new ZodXor3({
|
|
79326
79367
|
type: "union",
|
|
79327
79368
|
options,
|
|
@@ -79346,7 +79387,7 @@ var ZodIntersection3 = /* @__PURE__ */ $constructor3("ZodIntersection", (inst, d
|
|
|
79346
79387
|
ZodType3.init(inst, def);
|
|
79347
79388
|
inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor3(inst, ctx, json3, params);
|
|
79348
79389
|
});
|
|
79349
|
-
function
|
|
79390
|
+
function intersection4(left, right) {
|
|
79350
79391
|
return new ZodIntersection3({
|
|
79351
79392
|
type: "intersection",
|
|
79352
79393
|
left,
|
|
@@ -79357,19 +79398,19 @@ var ZodTuple3 = /* @__PURE__ */ $constructor3("ZodTuple", (inst, def) => {
|
|
|
79357
79398
|
$ZodTuple3.init(inst, def);
|
|
79358
79399
|
ZodType3.init(inst, def);
|
|
79359
79400
|
inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor3(inst, ctx, json3, params);
|
|
79360
|
-
inst.rest = (
|
|
79401
|
+
inst.rest = (rest2) => inst.clone({
|
|
79361
79402
|
...inst._zod.def,
|
|
79362
|
-
rest
|
|
79403
|
+
rest: rest2
|
|
79363
79404
|
});
|
|
79364
79405
|
});
|
|
79365
79406
|
function tuple3(items, _paramsOrRest, _params) {
|
|
79366
79407
|
const hasRest = _paramsOrRest instanceof $ZodType3;
|
|
79367
79408
|
const params = hasRest ? _params : _paramsOrRest;
|
|
79368
|
-
const
|
|
79409
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
79369
79410
|
return new ZodTuple3({
|
|
79370
79411
|
type: "tuple",
|
|
79371
79412
|
items,
|
|
79372
|
-
rest,
|
|
79413
|
+
rest: rest2,
|
|
79373
79414
|
...exports_util3.normalizeParams(params)
|
|
79374
79415
|
});
|
|
79375
79416
|
}
|
|
@@ -79389,7 +79430,7 @@ function record3(keyType, valueType, params) {
|
|
|
79389
79430
|
});
|
|
79390
79431
|
}
|
|
79391
79432
|
function partialRecord3(keyType, valueType, params) {
|
|
79392
|
-
const k =
|
|
79433
|
+
const k = clone4(keyType);
|
|
79393
79434
|
k._zod.values = undefined;
|
|
79394
79435
|
return new ZodRecord3({
|
|
79395
79436
|
type: "record",
|
|
@@ -79821,7 +79862,7 @@ var stringbool3 = (...args2) => _stringbool3({
|
|
|
79821
79862
|
}, ...args2);
|
|
79822
79863
|
function json3(params) {
|
|
79823
79864
|
const jsonSchema = lazy3(() => {
|
|
79824
|
-
return
|
|
79865
|
+
return union4([string8(params), number7(), boolean7(), _null8(), array4(jsonSchema), record3(string8(), jsonSchema)]);
|
|
79825
79866
|
});
|
|
79826
79867
|
return jsonSchema;
|
|
79827
79868
|
}
|
|
@@ -80188,9 +80229,9 @@ function convertBaseSchema3(schema, ctx) {
|
|
|
80188
80229
|
const items = schema.items;
|
|
80189
80230
|
if (prefixItems && Array.isArray(prefixItems)) {
|
|
80190
80231
|
const tupleItems = prefixItems.map((item) => convertSchema3(item, ctx));
|
|
80191
|
-
const
|
|
80192
|
-
if (
|
|
80193
|
-
zodSchema = z3.tuple(tupleItems).rest(
|
|
80232
|
+
const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : undefined;
|
|
80233
|
+
if (rest2) {
|
|
80234
|
+
zodSchema = z3.tuple(tupleItems).rest(rest2);
|
|
80194
80235
|
} else {
|
|
80195
80236
|
zodSchema = z3.tuple(tupleItems);
|
|
80196
80237
|
}
|
|
@@ -80202,9 +80243,9 @@ function convertBaseSchema3(schema, ctx) {
|
|
|
80202
80243
|
}
|
|
80203
80244
|
} else if (Array.isArray(items)) {
|
|
80204
80245
|
const tupleItems = items.map((item) => convertSchema3(item, ctx));
|
|
80205
|
-
const
|
|
80206
|
-
if (
|
|
80207
|
-
zodSchema = z3.tuple(tupleItems).rest(
|
|
80246
|
+
const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : undefined;
|
|
80247
|
+
if (rest2) {
|
|
80248
|
+
zodSchema = z3.tuple(tupleItems).rest(rest2);
|
|
80208
80249
|
} else {
|
|
80209
80250
|
zodSchema = z3.tuple(tupleItems);
|
|
80210
80251
|
}
|
|
@@ -80363,16 +80404,16 @@ function requireEventemitter32() {
|
|
|
80363
80404
|
if (!new Events().__proto__)
|
|
80364
80405
|
prefix = false;
|
|
80365
80406
|
}
|
|
80366
|
-
function EE(fn, context,
|
|
80407
|
+
function EE(fn, context, once2) {
|
|
80367
80408
|
this.fn = fn;
|
|
80368
80409
|
this.context = context;
|
|
80369
|
-
this.once =
|
|
80410
|
+
this.once = once2 || false;
|
|
80370
80411
|
}
|
|
80371
|
-
function addListener(emitter, event, fn, context,
|
|
80412
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
80372
80413
|
if (typeof fn !== "function") {
|
|
80373
80414
|
throw new TypeError("The listener must be a function");
|
|
80374
80415
|
}
|
|
80375
|
-
var listener = new EE(fn, context || emitter,
|
|
80416
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
80376
80417
|
if (!emitter._events[evt])
|
|
80377
80418
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
80378
80419
|
else if (!emitter._events[evt].fn)
|
|
@@ -80481,10 +80522,10 @@ function requireEventemitter32() {
|
|
|
80481
80522
|
EventEmitter3.prototype.on = function on(event, fn, context) {
|
|
80482
80523
|
return addListener(this, event, fn, context, false);
|
|
80483
80524
|
};
|
|
80484
|
-
EventEmitter3.prototype.once = function
|
|
80525
|
+
EventEmitter3.prototype.once = function once2(event, fn, context) {
|
|
80485
80526
|
return addListener(this, event, fn, context, true);
|
|
80486
80527
|
};
|
|
80487
|
-
EventEmitter3.prototype.removeListener = function removeListener(event, fn, context,
|
|
80528
|
+
EventEmitter3.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
80488
80529
|
var evt = prefix ? prefix + event : event;
|
|
80489
80530
|
if (!this._events[evt])
|
|
80490
80531
|
return this;
|
|
@@ -80494,12 +80535,12 @@ function requireEventemitter32() {
|
|
|
80494
80535
|
}
|
|
80495
80536
|
var listeners = this._events[evt];
|
|
80496
80537
|
if (listeners.fn) {
|
|
80497
|
-
if (listeners.fn === fn && (!
|
|
80538
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
80498
80539
|
clearEvent(this, evt);
|
|
80499
80540
|
}
|
|
80500
80541
|
} else {
|
|
80501
80542
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
80502
|
-
if (listeners[i].fn !== fn ||
|
|
80543
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
80503
80544
|
events.push(listeners[i]);
|
|
80504
80545
|
}
|
|
80505
80546
|
}
|
|
@@ -80535,7 +80576,7 @@ function requireEventemitter32() {
|
|
|
80535
80576
|
var eventemitter3Exports2 = requireEventemitter32();
|
|
80536
80577
|
var EventEmitter3 = /* @__PURE__ */ getDefaultExportFromCjs3(eventemitter3Exports2);
|
|
80537
80578
|
var reRunFn2 = (promiseOpts) => {
|
|
80538
|
-
const
|
|
80579
|
+
const timeout2 = promiseOpts.timeout || 5 * 60 * 1000;
|
|
80539
80580
|
const interval = promiseOpts.interval || 1000;
|
|
80540
80581
|
const checkSuccess = promiseOpts?.checkSuccess || (() => true);
|
|
80541
80582
|
const signal = promiseOpts.signal;
|
|
@@ -80547,7 +80588,7 @@ var reRunFn2 = (promiseOpts) => {
|
|
|
80547
80588
|
code: 500,
|
|
80548
80589
|
message: "timeout"
|
|
80549
80590
|
});
|
|
80550
|
-
},
|
|
80591
|
+
}, timeout2);
|
|
80551
80592
|
const fn = promiseOpts.fn || (() => true);
|
|
80552
80593
|
const runFn = async () => {
|
|
80553
80594
|
if (signal?.aborted) {
|
|
@@ -80597,7 +80638,7 @@ class BaseLoad2 {
|
|
|
80597
80638
|
this.loading = false;
|
|
80598
80639
|
}
|
|
80599
80640
|
listenKey(key, listenOpts) {
|
|
80600
|
-
const
|
|
80641
|
+
const timeout2 = listenOpts?.timeout ?? this.timeout;
|
|
80601
80642
|
return new Promise((resolve) => {
|
|
80602
80643
|
const timeoutId = setTimeout(() => {
|
|
80603
80644
|
this.event.removeListener(key, onEvent);
|
|
@@ -80605,7 +80646,7 @@ class BaseLoad2 {
|
|
|
80605
80646
|
code: 500,
|
|
80606
80647
|
message: "timeout"
|
|
80607
80648
|
});
|
|
80608
|
-
},
|
|
80649
|
+
}, timeout2);
|
|
80609
80650
|
const onEvent = (error54) => {
|
|
80610
80651
|
clearTimeout(timeoutId);
|
|
80611
80652
|
if (error54) {
|
|
@@ -80636,9 +80677,9 @@ class BaseLoad2 {
|
|
|
80636
80677
|
const has = this.modules.has(key);
|
|
80637
80678
|
if (!has) {
|
|
80638
80679
|
const isExist = hasLoadOpts?.isExist ?? true;
|
|
80639
|
-
const
|
|
80680
|
+
const timeout2 = hasLoadOpts?.timeout ?? this.timeout;
|
|
80640
80681
|
if (isExist) {
|
|
80641
|
-
return await this.listenKey(key, { timeout });
|
|
80682
|
+
return await this.listenKey(key, { timeout: timeout2 });
|
|
80642
80683
|
}
|
|
80643
80684
|
return {
|
|
80644
80685
|
code: 404
|
|
@@ -80835,13 +80876,13 @@ var useEnvKey2 = (key, init, initKey = "config", opts = {}) => {
|
|
|
80835
80876
|
const voidFn = async () => {
|
|
80836
80877
|
return _env[key];
|
|
80837
80878
|
};
|
|
80838
|
-
const
|
|
80879
|
+
const timeout2 = opts.timeout || 5 * 60 * 1000;
|
|
80839
80880
|
const checkFn = async () => {
|
|
80840
80881
|
const loadRes = await baseLoad.load(voidFn, {
|
|
80841
80882
|
key,
|
|
80842
80883
|
isReRun: true,
|
|
80843
80884
|
checkSuccess: () => _env[key],
|
|
80844
|
-
timeout,
|
|
80885
|
+
timeout: timeout2,
|
|
80845
80886
|
interval: 1000
|
|
80846
80887
|
});
|
|
80847
80888
|
if (loadRes.code !== 200) {
|
|
@@ -80857,14 +80898,14 @@ var useEnvKey2 = (key, init, initKey = "config", opts = {}) => {
|
|
|
80857
80898
|
};
|
|
80858
80899
|
var useEnvKeyNew2 = (key, initKey = "config", opts) => {
|
|
80859
80900
|
const _env = useEnv2({}, initKey);
|
|
80860
|
-
const
|
|
80901
|
+
const timeout2 = opts?.timeout;
|
|
80861
80902
|
if (key) {
|
|
80862
80903
|
delete _env[key];
|
|
80863
80904
|
}
|
|
80864
80905
|
if (opts?.getNew && opts.init) {
|
|
80865
|
-
return useEnvKey2(key, opts.init, initKey, { timeout });
|
|
80906
|
+
return useEnvKey2(key, opts.init, initKey, { timeout: timeout2 });
|
|
80866
80907
|
} else if (opts?.getNew) {
|
|
80867
|
-
return useEnvKey2(key, null, initKey, { timeout });
|
|
80908
|
+
return useEnvKey2(key, null, initKey, { timeout: timeout2 });
|
|
80868
80909
|
}
|
|
80869
80910
|
};
|
|
80870
80911
|
var useContextKey2 = (key, init, opts) => {
|
|
@@ -81239,10 +81280,10 @@ var adapter2 = async (opts = {}, overloadOpts) => {
|
|
|
81239
81280
|
const controller = new AbortController;
|
|
81240
81281
|
const signal = controller.signal;
|
|
81241
81282
|
const isPostFile = opts.isPostFile || false;
|
|
81242
|
-
const
|
|
81283
|
+
const timeout2 = opts.timeout || 60000 * 3;
|
|
81243
81284
|
const timer = setTimeout(() => {
|
|
81244
81285
|
controller.abort();
|
|
81245
|
-
},
|
|
81286
|
+
}, timeout2);
|
|
81246
81287
|
let method = overloadOpts?.method || opts?.method || "POST";
|
|
81247
81288
|
let headers = { ...opts?.headers, ...overloadOpts?.headers };
|
|
81248
81289
|
let origin = "";
|
|
@@ -81400,18 +81441,18 @@ class Query2 {
|
|
|
81400
81441
|
}
|
|
81401
81442
|
async post(body, options) {
|
|
81402
81443
|
const url4 = options?.url || this.url;
|
|
81403
|
-
const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...
|
|
81444
|
+
const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options || {};
|
|
81404
81445
|
const _headers = { ...this.headers, ...headers };
|
|
81405
81446
|
const _adapter = adapter22 || this.adapter;
|
|
81406
81447
|
const _beforeRequest = beforeRequest || this.beforeRequest;
|
|
81407
81448
|
const _afterResponse = afterResponse || this.afterResponse;
|
|
81408
|
-
const _timeout =
|
|
81449
|
+
const _timeout = timeout2 || this.timeout;
|
|
81409
81450
|
const req = {
|
|
81410
81451
|
url: url4,
|
|
81411
81452
|
headers: _headers,
|
|
81412
81453
|
body,
|
|
81413
81454
|
timeout: _timeout,
|
|
81414
|
-
...
|
|
81455
|
+
...rest2
|
|
81415
81456
|
};
|
|
81416
81457
|
const isStartsWithHttp = req.url.startsWith("http");
|
|
81417
81458
|
if (!isStartsWithHttp) {
|
|
@@ -81520,7 +81561,7 @@ class Query2 {
|
|
|
81520
81561
|
}
|
|
81521
81562
|
}
|
|
81522
81563
|
|
|
81523
|
-
// ../node_modules/.pnpm/@kevisual+api@0.0.
|
|
81564
|
+
// ../node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-login-node.js
|
|
81524
81565
|
import { homedir as homedir2 } from "node:os";
|
|
81525
81566
|
import { join, dirname } from "node:path";
|
|
81526
81567
|
import fs13 from "node:fs";
|
|
@@ -81551,16 +81592,16 @@ var require_eventemitter34 = __commonJS6((exports, module) => {
|
|
|
81551
81592
|
if (!new Events().__proto__)
|
|
81552
81593
|
prefix = false;
|
|
81553
81594
|
}
|
|
81554
|
-
function EE(fn, context,
|
|
81595
|
+
function EE(fn, context, once2) {
|
|
81555
81596
|
this.fn = fn;
|
|
81556
81597
|
this.context = context;
|
|
81557
|
-
this.once =
|
|
81598
|
+
this.once = once2 || false;
|
|
81558
81599
|
}
|
|
81559
|
-
function addListener(emitter, event, fn, context,
|
|
81600
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
81560
81601
|
if (typeof fn !== "function") {
|
|
81561
81602
|
throw new TypeError("The listener must be a function");
|
|
81562
81603
|
}
|
|
81563
|
-
var listener = new EE(fn, context || emitter,
|
|
81604
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
81564
81605
|
if (!emitter._events[evt])
|
|
81565
81606
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
81566
81607
|
else if (!emitter._events[evt].fn)
|
|
@@ -81669,10 +81710,10 @@ var require_eventemitter34 = __commonJS6((exports, module) => {
|
|
|
81669
81710
|
EventEmitter22.prototype.on = function on(event, fn, context) {
|
|
81670
81711
|
return addListener(this, event, fn, context, false);
|
|
81671
81712
|
};
|
|
81672
|
-
EventEmitter22.prototype.once = function
|
|
81713
|
+
EventEmitter22.prototype.once = function once2(event, fn, context) {
|
|
81673
81714
|
return addListener(this, event, fn, context, true);
|
|
81674
81715
|
};
|
|
81675
|
-
EventEmitter22.prototype.removeListener = function removeListener(event, fn, context,
|
|
81716
|
+
EventEmitter22.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
81676
81717
|
var evt = prefix ? prefix + event : event;
|
|
81677
81718
|
if (!this._events[evt])
|
|
81678
81719
|
return this;
|
|
@@ -81682,12 +81723,12 @@ var require_eventemitter34 = __commonJS6((exports, module) => {
|
|
|
81682
81723
|
}
|
|
81683
81724
|
var listeners = this._events[evt];
|
|
81684
81725
|
if (listeners.fn) {
|
|
81685
|
-
if (listeners.fn === fn && (!
|
|
81726
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
81686
81727
|
clearEvent(this, evt);
|
|
81687
81728
|
}
|
|
81688
81729
|
} else {
|
|
81689
81730
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
81690
|
-
if (listeners[i].fn !== fn ||
|
|
81731
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
81691
81732
|
events.push(listeners[i]);
|
|
81692
81733
|
}
|
|
81693
81734
|
}
|
|
@@ -81728,10 +81769,10 @@ var adapter3 = async (opts = {}, overloadOpts) => {
|
|
|
81728
81769
|
const controller = new AbortController;
|
|
81729
81770
|
const signal = controller.signal;
|
|
81730
81771
|
const isPostFile = opts.isPostFile || false;
|
|
81731
|
-
const
|
|
81772
|
+
const timeout2 = opts.timeout || 60000 * 3;
|
|
81732
81773
|
const timer = setTimeout(() => {
|
|
81733
81774
|
controller.abort();
|
|
81734
|
-
},
|
|
81775
|
+
}, timeout2);
|
|
81735
81776
|
let method = overloadOpts?.method || opts?.method || "POST";
|
|
81736
81777
|
let headers = { ...opts?.headers, ...overloadOpts?.headers };
|
|
81737
81778
|
let origin = "";
|
|
@@ -81889,18 +81930,18 @@ class Query3 {
|
|
|
81889
81930
|
}
|
|
81890
81931
|
async post(body, options) {
|
|
81891
81932
|
const url4 = options?.url || this.url;
|
|
81892
|
-
const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...
|
|
81933
|
+
const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options || {};
|
|
81893
81934
|
const _headers = { ...this.headers, ...headers };
|
|
81894
81935
|
const _adapter = adapter22 || this.adapter;
|
|
81895
81936
|
const _beforeRequest = beforeRequest || this.beforeRequest;
|
|
81896
81937
|
const _afterResponse = afterResponse || this.afterResponse;
|
|
81897
|
-
const _timeout =
|
|
81938
|
+
const _timeout = timeout2 || this.timeout;
|
|
81898
81939
|
const req = {
|
|
81899
81940
|
url: url4,
|
|
81900
81941
|
headers: _headers,
|
|
81901
81942
|
body,
|
|
81902
81943
|
timeout: _timeout,
|
|
81903
|
-
...
|
|
81944
|
+
...rest2
|
|
81904
81945
|
};
|
|
81905
81946
|
const isStartsWithHttp = req.url.startsWith("http");
|
|
81906
81947
|
if (!isStartsWithHttp) {
|
|
@@ -81920,6 +81961,10 @@ class Query3 {
|
|
|
81920
81961
|
});
|
|
81921
81962
|
}
|
|
81922
81963
|
}
|
|
81964
|
+
const headers2 = req.headers || {};
|
|
81965
|
+
if (options?.token && !headers2["Authorization"]) {
|
|
81966
|
+
headers2["Authorization"] = `Bearer ${options.token}`;
|
|
81967
|
+
}
|
|
81923
81968
|
} catch (e) {
|
|
81924
81969
|
console.error("request beforeFn error", e, req);
|
|
81925
81970
|
return wrapperError3({
|
|
@@ -81980,20 +82025,20 @@ class Query3 {
|
|
|
81980
82025
|
this.afterResponse = fn;
|
|
81981
82026
|
}
|
|
81982
82027
|
async fetchText(urlOrOptions, options) {
|
|
81983
|
-
let _options = { ...options };
|
|
82028
|
+
let _options = { method: "GET", ...options };
|
|
81984
82029
|
if (typeof urlOrOptions === "string" && !_options.url) {
|
|
81985
82030
|
_options.url = urlOrOptions;
|
|
81986
82031
|
}
|
|
81987
82032
|
if (typeof urlOrOptions === "object") {
|
|
81988
82033
|
_options = { ...urlOrOptions, ..._options };
|
|
81989
82034
|
}
|
|
82035
|
+
const headers = { ...this.headers, ..._options.headers };
|
|
82036
|
+
if (options?.token && !headers["Authorization"] && _options.method !== "GET") {
|
|
82037
|
+
headers["Authorization"] = `Bearer ${options.token}`;
|
|
82038
|
+
}
|
|
81990
82039
|
const res = await adapter3({
|
|
81991
|
-
method: "GET",
|
|
81992
82040
|
..._options,
|
|
81993
|
-
headers
|
|
81994
|
-
...this.headers,
|
|
81995
|
-
..._options?.headers || {}
|
|
81996
|
-
}
|
|
82041
|
+
headers
|
|
81997
82042
|
});
|
|
81998
82043
|
if (res && !res.code) {
|
|
81999
82044
|
return {
|
|
@@ -82162,16 +82207,16 @@ function requireEventemitter33() {
|
|
|
82162
82207
|
if (!new Events().__proto__)
|
|
82163
82208
|
prefix = false;
|
|
82164
82209
|
}
|
|
82165
|
-
function EE(fn, context,
|
|
82210
|
+
function EE(fn, context, once2) {
|
|
82166
82211
|
this.fn = fn;
|
|
82167
82212
|
this.context = context;
|
|
82168
|
-
this.once =
|
|
82213
|
+
this.once = once2 || false;
|
|
82169
82214
|
}
|
|
82170
|
-
function addListener(emitter, event, fn, context,
|
|
82215
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
82171
82216
|
if (typeof fn !== "function") {
|
|
82172
82217
|
throw new TypeError("The listener must be a function");
|
|
82173
82218
|
}
|
|
82174
|
-
var listener = new EE(fn, context || emitter,
|
|
82219
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
82175
82220
|
if (!emitter._events[evt])
|
|
82176
82221
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
82177
82222
|
else if (!emitter._events[evt].fn)
|
|
@@ -82280,10 +82325,10 @@ function requireEventemitter33() {
|
|
|
82280
82325
|
EventEmitter4.prototype.on = function on(event, fn, context) {
|
|
82281
82326
|
return addListener(this, event, fn, context, false);
|
|
82282
82327
|
};
|
|
82283
|
-
EventEmitter4.prototype.once = function
|
|
82328
|
+
EventEmitter4.prototype.once = function once2(event, fn, context) {
|
|
82284
82329
|
return addListener(this, event, fn, context, true);
|
|
82285
82330
|
};
|
|
82286
|
-
EventEmitter4.prototype.removeListener = function removeListener(event, fn, context,
|
|
82331
|
+
EventEmitter4.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
82287
82332
|
var evt = prefix ? prefix + event : event;
|
|
82288
82333
|
if (!this._events[evt])
|
|
82289
82334
|
return this;
|
|
@@ -82293,12 +82338,12 @@ function requireEventemitter33() {
|
|
|
82293
82338
|
}
|
|
82294
82339
|
var listeners = this._events[evt];
|
|
82295
82340
|
if (listeners.fn) {
|
|
82296
|
-
if (listeners.fn === fn && (!
|
|
82341
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
82297
82342
|
clearEvent(this, evt);
|
|
82298
82343
|
}
|
|
82299
82344
|
} else {
|
|
82300
82345
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
82301
|
-
if (listeners[i].fn !== fn ||
|
|
82346
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
82302
82347
|
events.push(listeners[i]);
|
|
82303
82348
|
}
|
|
82304
82349
|
}
|
|
@@ -82334,7 +82379,7 @@ function requireEventemitter33() {
|
|
|
82334
82379
|
var eventemitter3Exports3 = requireEventemitter33();
|
|
82335
82380
|
var EventEmitter4 = /* @__PURE__ */ getDefaultExportFromCjs4(eventemitter3Exports3);
|
|
82336
82381
|
var reRunFn3 = (promiseOpts) => {
|
|
82337
|
-
const
|
|
82382
|
+
const timeout2 = promiseOpts.timeout || 5 * 60 * 1000;
|
|
82338
82383
|
const interval = promiseOpts.interval || 1000;
|
|
82339
82384
|
const checkSuccess = promiseOpts?.checkSuccess || (() => true);
|
|
82340
82385
|
const signal = promiseOpts.signal;
|
|
@@ -82346,7 +82391,7 @@ var reRunFn3 = (promiseOpts) => {
|
|
|
82346
82391
|
code: 500,
|
|
82347
82392
|
message: "timeout"
|
|
82348
82393
|
});
|
|
82349
|
-
},
|
|
82394
|
+
}, timeout2);
|
|
82350
82395
|
const fn = promiseOpts.fn || (() => true);
|
|
82351
82396
|
const runFn = async () => {
|
|
82352
82397
|
if (signal?.aborted) {
|
|
@@ -82396,7 +82441,7 @@ class BaseLoad3 {
|
|
|
82396
82441
|
this.loading = false;
|
|
82397
82442
|
}
|
|
82398
82443
|
listenKey(key, listenOpts) {
|
|
82399
|
-
const
|
|
82444
|
+
const timeout2 = listenOpts?.timeout ?? this.timeout;
|
|
82400
82445
|
return new Promise((resolve) => {
|
|
82401
82446
|
const timeoutId = setTimeout(() => {
|
|
82402
82447
|
this.event.removeListener(key, onEvent);
|
|
@@ -82404,7 +82449,7 @@ class BaseLoad3 {
|
|
|
82404
82449
|
code: 500,
|
|
82405
82450
|
message: "timeout"
|
|
82406
82451
|
});
|
|
82407
|
-
},
|
|
82452
|
+
}, timeout2);
|
|
82408
82453
|
const onEvent = (error54) => {
|
|
82409
82454
|
clearTimeout(timeoutId);
|
|
82410
82455
|
if (error54) {
|
|
@@ -82435,9 +82480,9 @@ class BaseLoad3 {
|
|
|
82435
82480
|
const has = this.modules.has(key);
|
|
82436
82481
|
if (!has) {
|
|
82437
82482
|
const isExist = hasLoadOpts?.isExist ?? true;
|
|
82438
|
-
const
|
|
82483
|
+
const timeout2 = hasLoadOpts?.timeout ?? this.timeout;
|
|
82439
82484
|
if (isExist) {
|
|
82440
|
-
return await this.listenKey(key, { timeout });
|
|
82485
|
+
return await this.listenKey(key, { timeout: timeout2 });
|
|
82441
82486
|
}
|
|
82442
82487
|
return {
|
|
82443
82488
|
code: 404
|
|
@@ -83002,7 +83047,7 @@ class QueryLogin extends BaseQuery {
|
|
|
83002
83047
|
return false;
|
|
83003
83048
|
}
|
|
83004
83049
|
}
|
|
83005
|
-
var fileExists2 = (filePath, { createIfNotExists = true, isFile = true, isDir = false } = {}) => {
|
|
83050
|
+
var fileExists2 = (filePath, { createIfNotExists = true, isFile: isFile2 = true, isDir = false } = {}) => {
|
|
83006
83051
|
try {
|
|
83007
83052
|
accessSync(filePath, fs13.constants.F_OK);
|
|
83008
83053
|
return true;
|
|
@@ -83010,7 +83055,7 @@ var fileExists2 = (filePath, { createIfNotExists = true, isFile = true, isDir =
|
|
|
83010
83055
|
if (createIfNotExists && isDir) {
|
|
83011
83056
|
mkdirSync(filePath, { recursive: true });
|
|
83012
83057
|
return true;
|
|
83013
|
-
} else if (createIfNotExists &&
|
|
83058
|
+
} else if (createIfNotExists && isFile2) {
|
|
83014
83059
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
83015
83060
|
return false;
|
|
83016
83061
|
}
|
|
@@ -83696,39 +83741,38 @@ var chalk2 = new Chalk({ level: 3 });
|
|
|
83696
83741
|
// src/services/init/common.ts
|
|
83697
83742
|
var configJson = `{
|
|
83698
83743
|
"name": "assistant-app",
|
|
83699
|
-
"version": "1.0.
|
|
83744
|
+
"version": "1.0.3",
|
|
83700
83745
|
"description": "assistant-app package pnpm, node pkgs projects",
|
|
83701
83746
|
"type": "module",
|
|
83702
83747
|
"scripts": {
|
|
83703
83748
|
"start": "pm2 start apps/code-center/dist/app.mjs --name code-center",
|
|
83704
|
-
"proxy": "pm2 start apps/page-proxy/dist/app.mjs --name page-proxy",
|
|
83705
83749
|
"preview": "pnpm i && ASSISTANT_CONFIG_DIR=/workspace/kevisual asst server -s"
|
|
83706
83750
|
},
|
|
83707
83751
|
"keywords": [],
|
|
83708
83752
|
"author": "",
|
|
83709
83753
|
"license": "ISC",
|
|
83710
83754
|
"dependencies": {
|
|
83711
|
-
"@aws-sdk/client-s3": "^3.
|
|
83712
|
-
"@kevisual/oss": "^0.0.
|
|
83713
|
-
"@kevisual/query": "^0.0.
|
|
83714
|
-
"
|
|
83715
|
-
"@kevisual/
|
|
83755
|
+
"@aws-sdk/client-s3": "^3.1007.0",
|
|
83756
|
+
"@kevisual/oss": "^0.0.20",
|
|
83757
|
+
"@kevisual/query": "^0.0.53",
|
|
83758
|
+
"@kevisual/router": "^0.1.1",
|
|
83759
|
+
"@kevisual/cnb": "^0.0.42",
|
|
83716
83760
|
"@kevisual/use-config": "^1.0.30",
|
|
83717
|
-
"ioredis": "^5.9.3",
|
|
83718
|
-
"pg": "^8.18.0",
|
|
83719
|
-
"pm2": "^6.0.14",
|
|
83720
|
-
"crypto-js": "^4.2.0",
|
|
83721
|
-
"unstorage": "^1.17.4",
|
|
83722
83761
|
"dayjs": "^1.11.19",
|
|
83723
|
-
"
|
|
83762
|
+
"dotenv": "^17.3.1",
|
|
83763
|
+
"es-toolkit": "^1.45.1",
|
|
83764
|
+
"eventemitter3": "^5.0.4",
|
|
83765
|
+
"ioredis": "^5.10.0",
|
|
83724
83766
|
"node-cron": "^4.2.1",
|
|
83725
|
-
"
|
|
83767
|
+
"pg": "^8.20.0",
|
|
83768
|
+
"pm2": "^6.0.14",
|
|
83769
|
+
"unstorage": "^1.17.4"
|
|
83726
83770
|
},
|
|
83727
83771
|
"devDependencies": {
|
|
83728
83772
|
"@kevisual/types": "^0.0.12",
|
|
83729
|
-
"@types/bun": "^1.3.
|
|
83730
|
-
"@types/
|
|
83731
|
-
"
|
|
83773
|
+
"@types/bun": "^1.3.10",
|
|
83774
|
+
"@types/node": "^25.4.0",
|
|
83775
|
+
"semver": "^7.7.4"
|
|
83732
83776
|
}
|
|
83733
83777
|
}
|
|
83734
83778
|
`;
|
|
@@ -84053,7 +84097,7 @@ var simpleRouter = useContextKey("simpleRouter", () => {
|
|
|
84053
84097
|
});
|
|
84054
84098
|
app.createRouteList();
|
|
84055
84099
|
|
|
84056
|
-
// ../node_modules/.pnpm/@kevisual+router@0.
|
|
84100
|
+
// ../node_modules/.pnpm/@kevisual+router@0.1.1/node_modules/@kevisual/router/dist/opencode.js
|
|
84057
84101
|
import { webcrypto as crypto4 } from "node:crypto";
|
|
84058
84102
|
var __create7 = Object.create;
|
|
84059
84103
|
var __getProtoOf7 = Object.getPrototypeOf;
|
|
@@ -84090,16 +84134,16 @@ var require_eventemitter35 = __commonJS7((exports, module) => {
|
|
|
84090
84134
|
if (!new Events().__proto__)
|
|
84091
84135
|
prefix = false;
|
|
84092
84136
|
}
|
|
84093
|
-
function EE(fn, context,
|
|
84137
|
+
function EE(fn, context, once2) {
|
|
84094
84138
|
this.fn = fn;
|
|
84095
84139
|
this.context = context;
|
|
84096
|
-
this.once =
|
|
84140
|
+
this.once = once2 || false;
|
|
84097
84141
|
}
|
|
84098
|
-
function addListener(emitter, event, fn, context,
|
|
84142
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
84099
84143
|
if (typeof fn !== "function") {
|
|
84100
84144
|
throw new TypeError("The listener must be a function");
|
|
84101
84145
|
}
|
|
84102
|
-
var listener = new EE(fn, context || emitter,
|
|
84146
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
84103
84147
|
if (!emitter._events[evt])
|
|
84104
84148
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
84105
84149
|
else if (!emitter._events[evt].fn)
|
|
@@ -84208,10 +84252,10 @@ var require_eventemitter35 = __commonJS7((exports, module) => {
|
|
|
84208
84252
|
EventEmitter22.prototype.on = function on(event, fn, context) {
|
|
84209
84253
|
return addListener(this, event, fn, context, false);
|
|
84210
84254
|
};
|
|
84211
|
-
EventEmitter22.prototype.once = function
|
|
84255
|
+
EventEmitter22.prototype.once = function once2(event, fn, context) {
|
|
84212
84256
|
return addListener(this, event, fn, context, true);
|
|
84213
84257
|
};
|
|
84214
|
-
EventEmitter22.prototype.removeListener = function removeListener(event, fn, context,
|
|
84258
|
+
EventEmitter22.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
84215
84259
|
var evt = prefix ? prefix + event : event;
|
|
84216
84260
|
if (!this._events[evt])
|
|
84217
84261
|
return this;
|
|
@@ -84221,12 +84265,12 @@ var require_eventemitter35 = __commonJS7((exports, module) => {
|
|
|
84221
84265
|
}
|
|
84222
84266
|
var listeners = this._events[evt];
|
|
84223
84267
|
if (listeners.fn) {
|
|
84224
|
-
if (listeners.fn === fn && (!
|
|
84268
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
84225
84269
|
clearEvent(this, evt);
|
|
84226
84270
|
}
|
|
84227
84271
|
} else {
|
|
84228
84272
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
84229
|
-
if (listeners[i].fn !== fn ||
|
|
84273
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
84230
84274
|
events.push(listeners[i]);
|
|
84231
84275
|
}
|
|
84232
84276
|
}
|
|
@@ -84275,16 +84319,16 @@ function requireEventemitter34() {
|
|
|
84275
84319
|
if (!new Events().__proto__)
|
|
84276
84320
|
prefix = false;
|
|
84277
84321
|
}
|
|
84278
|
-
function EE(fn, context,
|
|
84322
|
+
function EE(fn, context, once2) {
|
|
84279
84323
|
this.fn = fn;
|
|
84280
84324
|
this.context = context;
|
|
84281
|
-
this.once =
|
|
84325
|
+
this.once = once2 || false;
|
|
84282
84326
|
}
|
|
84283
|
-
function addListener(emitter, event, fn, context,
|
|
84327
|
+
function addListener(emitter, event, fn, context, once2) {
|
|
84284
84328
|
if (typeof fn !== "function") {
|
|
84285
84329
|
throw new TypeError("The listener must be a function");
|
|
84286
84330
|
}
|
|
84287
|
-
var listener = new EE(fn, context || emitter,
|
|
84331
|
+
var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
|
|
84288
84332
|
if (!emitter._events[evt])
|
|
84289
84333
|
emitter._events[evt] = listener, emitter._eventsCount++;
|
|
84290
84334
|
else if (!emitter._events[evt].fn)
|
|
@@ -84393,10 +84437,10 @@ function requireEventemitter34() {
|
|
|
84393
84437
|
EventEmitter5.prototype.on = function on(event, fn, context) {
|
|
84394
84438
|
return addListener(this, event, fn, context, false);
|
|
84395
84439
|
};
|
|
84396
|
-
EventEmitter5.prototype.once = function
|
|
84440
|
+
EventEmitter5.prototype.once = function once2(event, fn, context) {
|
|
84397
84441
|
return addListener(this, event, fn, context, true);
|
|
84398
84442
|
};
|
|
84399
|
-
EventEmitter5.prototype.removeListener = function removeListener(event, fn, context,
|
|
84443
|
+
EventEmitter5.prototype.removeListener = function removeListener(event, fn, context, once2) {
|
|
84400
84444
|
var evt = prefix ? prefix + event : event;
|
|
84401
84445
|
if (!this._events[evt])
|
|
84402
84446
|
return this;
|
|
@@ -84406,12 +84450,12 @@ function requireEventemitter34() {
|
|
|
84406
84450
|
}
|
|
84407
84451
|
var listeners = this._events[evt];
|
|
84408
84452
|
if (listeners.fn) {
|
|
84409
|
-
if (listeners.fn === fn && (!
|
|
84453
|
+
if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
|
|
84410
84454
|
clearEvent(this, evt);
|
|
84411
84455
|
}
|
|
84412
84456
|
} else {
|
|
84413
84457
|
for (var i = 0, events = [], length = listeners.length;i < length; i++) {
|
|
84414
|
-
if (listeners[i].fn !== fn ||
|
|
84458
|
+
if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
|
|
84415
84459
|
events.push(listeners[i]);
|
|
84416
84460
|
}
|
|
84417
84461
|
}
|
|
@@ -84447,7 +84491,7 @@ function requireEventemitter34() {
|
|
|
84447
84491
|
var eventemitter3Exports4 = requireEventemitter34();
|
|
84448
84492
|
var EventEmitter5 = /* @__PURE__ */ getDefaultExportFromCjs5(eventemitter3Exports4);
|
|
84449
84493
|
var reRunFn4 = (promiseOpts) => {
|
|
84450
|
-
const
|
|
84494
|
+
const timeout2 = promiseOpts.timeout || 5 * 60 * 1000;
|
|
84451
84495
|
const interval = promiseOpts.interval || 1000;
|
|
84452
84496
|
const checkSuccess = promiseOpts?.checkSuccess || (() => true);
|
|
84453
84497
|
const signal = promiseOpts.signal;
|
|
@@ -84459,7 +84503,7 @@ var reRunFn4 = (promiseOpts) => {
|
|
|
84459
84503
|
code: 500,
|
|
84460
84504
|
message: "timeout"
|
|
84461
84505
|
});
|
|
84462
|
-
},
|
|
84506
|
+
}, timeout2);
|
|
84463
84507
|
const fn = promiseOpts.fn || (() => true);
|
|
84464
84508
|
const runFn = async () => {
|
|
84465
84509
|
if (signal?.aborted) {
|
|
@@ -84509,7 +84553,7 @@ class BaseLoad4 {
|
|
|
84509
84553
|
this.loading = false;
|
|
84510
84554
|
}
|
|
84511
84555
|
listenKey(key, listenOpts) {
|
|
84512
|
-
const
|
|
84556
|
+
const timeout2 = listenOpts?.timeout ?? this.timeout;
|
|
84513
84557
|
return new Promise((resolve) => {
|
|
84514
84558
|
const timeoutId = setTimeout(() => {
|
|
84515
84559
|
this.event.removeListener(key, onEvent);
|
|
@@ -84517,7 +84561,7 @@ class BaseLoad4 {
|
|
|
84517
84561
|
code: 500,
|
|
84518
84562
|
message: "timeout"
|
|
84519
84563
|
});
|
|
84520
|
-
},
|
|
84564
|
+
}, timeout2);
|
|
84521
84565
|
const onEvent = (error54) => {
|
|
84522
84566
|
clearTimeout(timeoutId);
|
|
84523
84567
|
if (error54) {
|
|
@@ -84548,9 +84592,9 @@ class BaseLoad4 {
|
|
|
84548
84592
|
const has = this.modules.has(key);
|
|
84549
84593
|
if (!has) {
|
|
84550
84594
|
const isExist = hasLoadOpts?.isExist ?? true;
|
|
84551
|
-
const
|
|
84595
|
+
const timeout2 = hasLoadOpts?.timeout ?? this.timeout;
|
|
84552
84596
|
if (isExist) {
|
|
84553
|
-
return await this.listenKey(key, { timeout });
|
|
84597
|
+
return await this.listenKey(key, { timeout: timeout2 });
|
|
84554
84598
|
}
|
|
84555
84599
|
return {
|
|
84556
84600
|
code: 404
|
|
@@ -84747,13 +84791,13 @@ var useEnvKey3 = (key, init, initKey = "config", opts = {}) => {
|
|
|
84747
84791
|
const voidFn = async () => {
|
|
84748
84792
|
return _env[key];
|
|
84749
84793
|
};
|
|
84750
|
-
const
|
|
84794
|
+
const timeout2 = opts.timeout || 5 * 60 * 1000;
|
|
84751
84795
|
const checkFn = async () => {
|
|
84752
84796
|
const loadRes = await baseLoad.load(voidFn, {
|
|
84753
84797
|
key,
|
|
84754
84798
|
isReRun: true,
|
|
84755
84799
|
checkSuccess: () => _env[key],
|
|
84756
|
-
timeout,
|
|
84800
|
+
timeout: timeout2,
|
|
84757
84801
|
interval: 1000
|
|
84758
84802
|
});
|
|
84759
84803
|
if (loadRes.code !== 200) {
|
|
@@ -84769,14 +84813,14 @@ var useEnvKey3 = (key, init, initKey = "config", opts = {}) => {
|
|
|
84769
84813
|
};
|
|
84770
84814
|
var useEnvKeyNew3 = (key, initKey = "config", opts) => {
|
|
84771
84815
|
const _env = useEnv3({}, initKey);
|
|
84772
|
-
const
|
|
84816
|
+
const timeout2 = opts?.timeout;
|
|
84773
84817
|
if (key) {
|
|
84774
84818
|
delete _env[key];
|
|
84775
84819
|
}
|
|
84776
84820
|
if (opts?.getNew && opts.init) {
|
|
84777
|
-
return useEnvKey3(key, opts.init, initKey, { timeout });
|
|
84821
|
+
return useEnvKey3(key, opts.init, initKey, { timeout: timeout2 });
|
|
84778
84822
|
} else if (opts?.getNew) {
|
|
84779
|
-
return useEnvKey3(key, null, initKey, { timeout });
|
|
84823
|
+
return useEnvKey3(key, null, initKey, { timeout: timeout2 });
|
|
84780
84824
|
}
|
|
84781
84825
|
};
|
|
84782
84826
|
var useContextKey3 = (key, init, opts) => {
|
|
@@ -84812,7 +84856,7 @@ InitEnv3.init();
|
|
|
84812
84856
|
var import__5 = __toESM7(require_eventemitter35(), 1);
|
|
84813
84857
|
var exports_external4 = {};
|
|
84814
84858
|
__export4(exports_external4, {
|
|
84815
|
-
xor: () =>
|
|
84859
|
+
xor: () => xor5,
|
|
84816
84860
|
xid: () => xid23,
|
|
84817
84861
|
void: () => _void23,
|
|
84818
84862
|
uuidv7: () => uuidv74,
|
|
@@ -84823,7 +84867,7 @@ __export4(exports_external4, {
|
|
|
84823
84867
|
url: () => url7,
|
|
84824
84868
|
uppercase: () => _uppercase4,
|
|
84825
84869
|
unknown: () => unknown4,
|
|
84826
|
-
union: () =>
|
|
84870
|
+
union: () => union5,
|
|
84827
84871
|
undefined: () => _undefined33,
|
|
84828
84872
|
ulid: () => ulid23,
|
|
84829
84873
|
uint64: () => uint644,
|
|
@@ -84911,7 +84955,7 @@ __export4(exports_external4, {
|
|
|
84911
84955
|
iso: () => exports_iso4,
|
|
84912
84956
|
ipv6: () => ipv623,
|
|
84913
84957
|
ipv4: () => ipv423,
|
|
84914
|
-
intersection: () =>
|
|
84958
|
+
intersection: () => intersection5,
|
|
84915
84959
|
int64: () => int644,
|
|
84916
84960
|
int32: () => int324,
|
|
84917
84961
|
int: () => int4,
|
|
@@ -84953,7 +84997,7 @@ __export4(exports_external4, {
|
|
|
84953
84997
|
config: () => config6,
|
|
84954
84998
|
coerce: () => exports_coerce4,
|
|
84955
84999
|
codec: () => codec4,
|
|
84956
|
-
clone: () =>
|
|
85000
|
+
clone: () => clone5,
|
|
84957
85001
|
cidrv6: () => cidrv623,
|
|
84958
85002
|
cidrv4: () => cidrv423,
|
|
84959
85003
|
check: () => check4,
|
|
@@ -85088,7 +85132,7 @@ __export4(exports_core23, {
|
|
|
85088
85132
|
createToJSONSchemaMethod: () => createToJSONSchemaMethod4,
|
|
85089
85133
|
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod4,
|
|
85090
85134
|
config: () => config6,
|
|
85091
|
-
clone: () =>
|
|
85135
|
+
clone: () => clone5,
|
|
85092
85136
|
_xor: () => _xor4,
|
|
85093
85137
|
_xid: () => _xid4,
|
|
85094
85138
|
_void: () => _void7,
|
|
@@ -85416,11 +85460,11 @@ __export4(exports_util4, {
|
|
|
85416
85460
|
promiseAllObject: () => promiseAllObject4,
|
|
85417
85461
|
primitiveTypes: () => primitiveTypes4,
|
|
85418
85462
|
prefixIssues: () => prefixIssues4,
|
|
85419
|
-
pick: () =>
|
|
85420
|
-
partial: () =>
|
|
85463
|
+
pick: () => pick6,
|
|
85464
|
+
partial: () => partial6,
|
|
85421
85465
|
parsedType: () => parsedType4,
|
|
85422
85466
|
optionalKeys: () => optionalKeys4,
|
|
85423
|
-
omit: () =>
|
|
85467
|
+
omit: () => omit5,
|
|
85424
85468
|
objectClone: () => objectClone4,
|
|
85425
85469
|
numKeys: () => numKeys4,
|
|
85426
85470
|
nullish: () => nullish7,
|
|
@@ -85430,7 +85474,7 @@ __export4(exports_util4, {
|
|
|
85430
85474
|
jsonStringifyReplacer: () => jsonStringifyReplacer4,
|
|
85431
85475
|
joinValues: () => joinValues4,
|
|
85432
85476
|
issue: () => issue4,
|
|
85433
|
-
isPlainObject: () =>
|
|
85477
|
+
isPlainObject: () => isPlainObject8,
|
|
85434
85478
|
isObject: () => isObject5,
|
|
85435
85479
|
hexToUint8Array: () => hexToUint8Array4,
|
|
85436
85480
|
getSizableOrigin: () => getSizableOrigin4,
|
|
@@ -85446,7 +85490,7 @@ __export4(exports_util4, {
|
|
|
85446
85490
|
defineLazy: () => defineLazy4,
|
|
85447
85491
|
createTransparentProxy: () => createTransparentProxy4,
|
|
85448
85492
|
cloneDef: () => cloneDef4,
|
|
85449
|
-
clone: () =>
|
|
85493
|
+
clone: () => clone5,
|
|
85450
85494
|
cleanRegex: () => cleanRegex4,
|
|
85451
85495
|
cleanEnum: () => cleanEnum4,
|
|
85452
85496
|
captureStackTrace: () => captureStackTrace4,
|
|
@@ -85615,7 +85659,7 @@ var allowsEval4 = cached4(() => {
|
|
|
85615
85659
|
return false;
|
|
85616
85660
|
}
|
|
85617
85661
|
});
|
|
85618
|
-
function
|
|
85662
|
+
function isPlainObject8(o) {
|
|
85619
85663
|
if (isObject5(o) === false)
|
|
85620
85664
|
return false;
|
|
85621
85665
|
const ctor = o.constructor;
|
|
@@ -85632,7 +85676,7 @@ function isPlainObject7(o) {
|
|
|
85632
85676
|
return true;
|
|
85633
85677
|
}
|
|
85634
85678
|
function shallowClone4(o) {
|
|
85635
|
-
if (
|
|
85679
|
+
if (isPlainObject8(o))
|
|
85636
85680
|
return { ...o };
|
|
85637
85681
|
if (Array.isArray(o))
|
|
85638
85682
|
return [...o];
|
|
@@ -85696,7 +85740,7 @@ var primitiveTypes4 = new Set(["string", "number", "bigint", "boolean", "symbol"
|
|
|
85696
85740
|
function escapeRegex4(str) {
|
|
85697
85741
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
85698
85742
|
}
|
|
85699
|
-
function
|
|
85743
|
+
function clone5(inst, def, params) {
|
|
85700
85744
|
const cl = new inst._zod.constr(def ?? inst._zod.def);
|
|
85701
85745
|
if (!def || params?.parent)
|
|
85702
85746
|
cl._zod.parent = inst;
|
|
@@ -85774,7 +85818,7 @@ var BIGINT_FORMAT_RANGES4 = {
|
|
|
85774
85818
|
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
85775
85819
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
85776
85820
|
};
|
|
85777
|
-
function
|
|
85821
|
+
function pick6(schema, mask) {
|
|
85778
85822
|
const currDef = schema._zod.def;
|
|
85779
85823
|
const checks3 = currDef.checks;
|
|
85780
85824
|
const hasChecks = checks3 && checks3.length > 0;
|
|
@@ -85797,9 +85841,9 @@ function pick5(schema, mask) {
|
|
|
85797
85841
|
},
|
|
85798
85842
|
checks: []
|
|
85799
85843
|
});
|
|
85800
|
-
return
|
|
85844
|
+
return clone5(schema, def);
|
|
85801
85845
|
}
|
|
85802
|
-
function
|
|
85846
|
+
function omit5(schema, mask) {
|
|
85803
85847
|
const currDef = schema._zod.def;
|
|
85804
85848
|
const checks3 = currDef.checks;
|
|
85805
85849
|
const hasChecks = checks3 && checks3.length > 0;
|
|
@@ -85822,10 +85866,10 @@ function omit4(schema, mask) {
|
|
|
85822
85866
|
},
|
|
85823
85867
|
checks: []
|
|
85824
85868
|
});
|
|
85825
|
-
return
|
|
85869
|
+
return clone5(schema, def);
|
|
85826
85870
|
}
|
|
85827
85871
|
function extend4(schema, shape) {
|
|
85828
|
-
if (!
|
|
85872
|
+
if (!isPlainObject8(shape)) {
|
|
85829
85873
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
85830
85874
|
}
|
|
85831
85875
|
const checks3 = schema._zod.def.checks;
|
|
@@ -85845,10 +85889,10 @@ function extend4(schema, shape) {
|
|
|
85845
85889
|
return _shape;
|
|
85846
85890
|
}
|
|
85847
85891
|
});
|
|
85848
|
-
return
|
|
85892
|
+
return clone5(schema, def);
|
|
85849
85893
|
}
|
|
85850
85894
|
function safeExtend4(schema, shape) {
|
|
85851
|
-
if (!
|
|
85895
|
+
if (!isPlainObject8(shape)) {
|
|
85852
85896
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
85853
85897
|
}
|
|
85854
85898
|
const def = mergeDefs4(schema._zod.def, {
|
|
@@ -85858,7 +85902,7 @@ function safeExtend4(schema, shape) {
|
|
|
85858
85902
|
return _shape;
|
|
85859
85903
|
}
|
|
85860
85904
|
});
|
|
85861
|
-
return
|
|
85905
|
+
return clone5(schema, def);
|
|
85862
85906
|
}
|
|
85863
85907
|
function merge7(a, b) {
|
|
85864
85908
|
const def = mergeDefs4(a._zod.def, {
|
|
@@ -85872,9 +85916,9 @@ function merge7(a, b) {
|
|
|
85872
85916
|
},
|
|
85873
85917
|
checks: []
|
|
85874
85918
|
});
|
|
85875
|
-
return
|
|
85919
|
+
return clone5(a, def);
|
|
85876
85920
|
}
|
|
85877
|
-
function
|
|
85921
|
+
function partial6(Class4, schema, mask) {
|
|
85878
85922
|
const currDef = schema._zod.def;
|
|
85879
85923
|
const checks3 = currDef.checks;
|
|
85880
85924
|
const hasChecks = checks3 && checks3.length > 0;
|
|
@@ -85910,7 +85954,7 @@ function partial5(Class4, schema, mask) {
|
|
|
85910
85954
|
},
|
|
85911
85955
|
checks: []
|
|
85912
85956
|
});
|
|
85913
|
-
return
|
|
85957
|
+
return clone5(schema, def);
|
|
85914
85958
|
}
|
|
85915
85959
|
function required4(Class4, schema, mask) {
|
|
85916
85960
|
const def = mergeDefs4(schema._zod.def, {
|
|
@@ -85941,7 +85985,7 @@ function required4(Class4, schema, mask) {
|
|
|
85941
85985
|
return shape;
|
|
85942
85986
|
}
|
|
85943
85987
|
});
|
|
85944
|
-
return
|
|
85988
|
+
return clone5(schema, def);
|
|
85945
85989
|
}
|
|
85946
85990
|
function aborted4(x, startIndex = 0) {
|
|
85947
85991
|
if (x.aborted === true)
|
|
@@ -87618,15 +87662,15 @@ var $ZodDate4 = /* @__PURE__ */ $constructor4("$ZodDate", (inst, def) => {
|
|
|
87618
87662
|
} catch (_err) {}
|
|
87619
87663
|
}
|
|
87620
87664
|
const input = payload.value;
|
|
87621
|
-
const
|
|
87622
|
-
const isValidDate =
|
|
87665
|
+
const isDate3 = input instanceof Date;
|
|
87666
|
+
const isValidDate = isDate3 && !Number.isNaN(input.getTime());
|
|
87623
87667
|
if (isValidDate)
|
|
87624
87668
|
return payload;
|
|
87625
87669
|
payload.issues.push({
|
|
87626
87670
|
expected: "date",
|
|
87627
87671
|
code: "invalid_type",
|
|
87628
87672
|
input,
|
|
87629
|
-
...
|
|
87673
|
+
...isDate3 ? { received: "Invalid Date" } : {},
|
|
87630
87674
|
inst
|
|
87631
87675
|
});
|
|
87632
87676
|
return payload;
|
|
@@ -88106,7 +88150,7 @@ function mergeValues4(a, b) {
|
|
|
88106
88150
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
88107
88151
|
return { valid: true, data: a };
|
|
88108
88152
|
}
|
|
88109
|
-
if (
|
|
88153
|
+
if (isPlainObject8(a) && isPlainObject8(b)) {
|
|
88110
88154
|
const bKeys = Object.keys(b);
|
|
88111
88155
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
88112
88156
|
const newObj = { ...a, ...b };
|
|
@@ -88231,8 +88275,8 @@ var $ZodTuple4 = /* @__PURE__ */ $constructor4("$ZodTuple", (inst, def) => {
|
|
|
88231
88275
|
}
|
|
88232
88276
|
}
|
|
88233
88277
|
if (def.rest) {
|
|
88234
|
-
const
|
|
88235
|
-
for (const el of
|
|
88278
|
+
const rest2 = input.slice(items.length);
|
|
88279
|
+
for (const el of rest2) {
|
|
88236
88280
|
i++;
|
|
88237
88281
|
const result = def.rest._zod.run({
|
|
88238
88282
|
value: el,
|
|
@@ -88260,7 +88304,7 @@ var $ZodRecord4 = /* @__PURE__ */ $constructor4("$ZodRecord", (inst, def) => {
|
|
|
88260
88304
|
$ZodType4.init(inst, def);
|
|
88261
88305
|
inst._zod.parse = (payload, ctx) => {
|
|
88262
88306
|
const input = payload.value;
|
|
88263
|
-
if (!
|
|
88307
|
+
if (!isPlainObject8(input)) {
|
|
88264
88308
|
payload.issues.push({
|
|
88265
88309
|
expected: "record",
|
|
88266
88310
|
code: "invalid_type",
|
|
@@ -91958,11 +92002,11 @@ var capitalizeFirstCharacter4 = (text) => {
|
|
|
91958
92002
|
};
|
|
91959
92003
|
function getUnitTypeFromNumber4(number23) {
|
|
91960
92004
|
const abs = Math.abs(number23);
|
|
91961
|
-
const
|
|
91962
|
-
const
|
|
91963
|
-
if (
|
|
92005
|
+
const last2 = abs % 10;
|
|
92006
|
+
const last22 = abs % 100;
|
|
92007
|
+
if (last22 >= 11 && last22 <= 19 || last2 === 0)
|
|
91964
92008
|
return "many";
|
|
91965
|
-
if (
|
|
92009
|
+
if (last2 === 1)
|
|
91966
92010
|
return "one";
|
|
91967
92011
|
return "few";
|
|
91968
92012
|
}
|
|
@@ -95163,11 +95207,11 @@ function _intersection4(Class22, left, right) {
|
|
|
95163
95207
|
function _tuple4(Class22, items, _paramsOrRest, _params) {
|
|
95164
95208
|
const hasRest = _paramsOrRest instanceof $ZodType4;
|
|
95165
95209
|
const params = hasRest ? _params : _paramsOrRest;
|
|
95166
|
-
const
|
|
95210
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
95167
95211
|
return new Class22({
|
|
95168
95212
|
type: "tuple",
|
|
95169
95213
|
items,
|
|
95170
|
-
rest,
|
|
95214
|
+
rest: rest2,
|
|
95171
95215
|
...normalizeParams4(params)
|
|
95172
95216
|
});
|
|
95173
95217
|
}
|
|
@@ -96105,30 +96149,30 @@ var tupleProcessor4 = (schema, ctx, _json, params) => {
|
|
|
96105
96149
|
...params,
|
|
96106
96150
|
path: [...params.path, prefixPath, i]
|
|
96107
96151
|
}));
|
|
96108
|
-
const
|
|
96152
|
+
const rest2 = def.rest ? process9(def.rest, ctx, {
|
|
96109
96153
|
...params,
|
|
96110
96154
|
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
96111
96155
|
}) : null;
|
|
96112
96156
|
if (ctx.target === "draft-2020-12") {
|
|
96113
96157
|
json4.prefixItems = prefixItems;
|
|
96114
|
-
if (
|
|
96115
|
-
json4.items =
|
|
96158
|
+
if (rest2) {
|
|
96159
|
+
json4.items = rest2;
|
|
96116
96160
|
}
|
|
96117
96161
|
} else if (ctx.target === "openapi-3.0") {
|
|
96118
96162
|
json4.items = {
|
|
96119
96163
|
anyOf: prefixItems
|
|
96120
96164
|
};
|
|
96121
|
-
if (
|
|
96122
|
-
json4.items.anyOf.push(
|
|
96165
|
+
if (rest2) {
|
|
96166
|
+
json4.items.anyOf.push(rest2);
|
|
96123
96167
|
}
|
|
96124
96168
|
json4.minItems = prefixItems.length;
|
|
96125
|
-
if (!
|
|
96169
|
+
if (!rest2) {
|
|
96126
96170
|
json4.maxItems = prefixItems.length;
|
|
96127
96171
|
}
|
|
96128
96172
|
} else {
|
|
96129
96173
|
json4.items = prefixItems;
|
|
96130
|
-
if (
|
|
96131
|
-
json4.additionalItems =
|
|
96174
|
+
if (rest2) {
|
|
96175
|
+
json4.additionalItems = rest2;
|
|
96132
96176
|
}
|
|
96133
96177
|
}
|
|
96134
96178
|
const { minimum, maximum } = schema._zod.bag;
|
|
@@ -96387,7 +96431,7 @@ class JSONSchemaGenerator4 {
|
|
|
96387
96431
|
var exports_json_schema4 = {};
|
|
96388
96432
|
var exports_schemas23 = {};
|
|
96389
96433
|
__export4(exports_schemas23, {
|
|
96390
|
-
xor: () =>
|
|
96434
|
+
xor: () => xor5,
|
|
96391
96435
|
xid: () => xid23,
|
|
96392
96436
|
void: () => _void23,
|
|
96393
96437
|
uuidv7: () => uuidv74,
|
|
@@ -96396,7 +96440,7 @@ __export4(exports_schemas23, {
|
|
|
96396
96440
|
uuid: () => uuid23,
|
|
96397
96441
|
url: () => url7,
|
|
96398
96442
|
unknown: () => unknown4,
|
|
96399
|
-
union: () =>
|
|
96443
|
+
union: () => union5,
|
|
96400
96444
|
undefined: () => _undefined33,
|
|
96401
96445
|
ulid: () => ulid23,
|
|
96402
96446
|
uint64: () => uint644,
|
|
@@ -96444,7 +96488,7 @@ __export4(exports_schemas23, {
|
|
|
96444
96488
|
json: () => json4,
|
|
96445
96489
|
ipv6: () => ipv623,
|
|
96446
96490
|
ipv4: () => ipv423,
|
|
96447
|
-
intersection: () =>
|
|
96491
|
+
intersection: () => intersection5,
|
|
96448
96492
|
int64: () => int644,
|
|
96449
96493
|
int32: () => int324,
|
|
96450
96494
|
int: () => int4,
|
|
@@ -96691,7 +96735,7 @@ var ZodType4 = /* @__PURE__ */ $constructor4("ZodType", (inst, def) => {
|
|
|
96691
96735
|
});
|
|
96692
96736
|
};
|
|
96693
96737
|
inst.with = inst.check;
|
|
96694
|
-
inst.clone = (def2, params) =>
|
|
96738
|
+
inst.clone = (def2, params) => clone5(inst, def2, params);
|
|
96695
96739
|
inst.brand = () => inst;
|
|
96696
96740
|
inst.register = (reg, meta23) => {
|
|
96697
96741
|
reg.add(inst, meta23);
|
|
@@ -96719,8 +96763,8 @@ var ZodType4 = /* @__PURE__ */ $constructor4("ZodType", (inst, def) => {
|
|
|
96719
96763
|
inst.nullish = () => optional4(nullable4(inst));
|
|
96720
96764
|
inst.nonoptional = (params) => nonoptional4(inst, params);
|
|
96721
96765
|
inst.array = () => array5(inst);
|
|
96722
|
-
inst.or = (arg) =>
|
|
96723
|
-
inst.and = (arg) =>
|
|
96766
|
+
inst.or = (arg) => union5([inst, arg]);
|
|
96767
|
+
inst.and = (arg) => intersection5(inst, arg);
|
|
96724
96768
|
inst.transform = (tx) => pipe4(inst, transform4(tx));
|
|
96725
96769
|
inst.default = (def2) => _default23(inst, def2);
|
|
96726
96770
|
inst.prefault = (def2) => prefault4(inst, def2);
|
|
@@ -97223,7 +97267,7 @@ var ZodUnion4 = /* @__PURE__ */ $constructor4("ZodUnion", (inst, def) => {
|
|
|
97223
97267
|
inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor4(inst, ctx, json4, params);
|
|
97224
97268
|
inst.options = def.options;
|
|
97225
97269
|
});
|
|
97226
|
-
function
|
|
97270
|
+
function union5(options, params) {
|
|
97227
97271
|
return new ZodUnion4({
|
|
97228
97272
|
type: "union",
|
|
97229
97273
|
options,
|
|
@@ -97236,7 +97280,7 @@ var ZodXor4 = /* @__PURE__ */ $constructor4("ZodXor", (inst, def) => {
|
|
|
97236
97280
|
inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor4(inst, ctx, json4, params);
|
|
97237
97281
|
inst.options = def.options;
|
|
97238
97282
|
});
|
|
97239
|
-
function
|
|
97283
|
+
function xor5(options, params) {
|
|
97240
97284
|
return new ZodXor4({
|
|
97241
97285
|
type: "union",
|
|
97242
97286
|
options,
|
|
@@ -97261,7 +97305,7 @@ var ZodIntersection4 = /* @__PURE__ */ $constructor4("ZodIntersection", (inst, d
|
|
|
97261
97305
|
ZodType4.init(inst, def);
|
|
97262
97306
|
inst._zod.processJSONSchema = (ctx, json4, params) => intersectionProcessor4(inst, ctx, json4, params);
|
|
97263
97307
|
});
|
|
97264
|
-
function
|
|
97308
|
+
function intersection5(left, right) {
|
|
97265
97309
|
return new ZodIntersection4({
|
|
97266
97310
|
type: "intersection",
|
|
97267
97311
|
left,
|
|
@@ -97272,19 +97316,19 @@ var ZodTuple4 = /* @__PURE__ */ $constructor4("ZodTuple", (inst, def) => {
|
|
|
97272
97316
|
$ZodTuple4.init(inst, def);
|
|
97273
97317
|
ZodType4.init(inst, def);
|
|
97274
97318
|
inst._zod.processJSONSchema = (ctx, json4, params) => tupleProcessor4(inst, ctx, json4, params);
|
|
97275
|
-
inst.rest = (
|
|
97319
|
+
inst.rest = (rest2) => inst.clone({
|
|
97276
97320
|
...inst._zod.def,
|
|
97277
|
-
rest
|
|
97321
|
+
rest: rest2
|
|
97278
97322
|
});
|
|
97279
97323
|
});
|
|
97280
97324
|
function tuple4(items, _paramsOrRest, _params) {
|
|
97281
97325
|
const hasRest = _paramsOrRest instanceof $ZodType4;
|
|
97282
97326
|
const params = hasRest ? _params : _paramsOrRest;
|
|
97283
|
-
const
|
|
97327
|
+
const rest2 = hasRest ? _paramsOrRest : null;
|
|
97284
97328
|
return new ZodTuple4({
|
|
97285
97329
|
type: "tuple",
|
|
97286
97330
|
items,
|
|
97287
|
-
rest,
|
|
97331
|
+
rest: rest2,
|
|
97288
97332
|
...exports_util4.normalizeParams(params)
|
|
97289
97333
|
});
|
|
97290
97334
|
}
|
|
@@ -97304,7 +97348,7 @@ function record4(keyType, valueType, params) {
|
|
|
97304
97348
|
});
|
|
97305
97349
|
}
|
|
97306
97350
|
function partialRecord4(keyType, valueType, params) {
|
|
97307
|
-
const k =
|
|
97351
|
+
const k = clone5(keyType);
|
|
97308
97352
|
k._zod.values = undefined;
|
|
97309
97353
|
return new ZodRecord4({
|
|
97310
97354
|
type: "record",
|
|
@@ -97736,7 +97780,7 @@ var stringbool4 = (...args2) => _stringbool4({
|
|
|
97736
97780
|
}, ...args2);
|
|
97737
97781
|
function json4(params) {
|
|
97738
97782
|
const jsonSchema = lazy4(() => {
|
|
97739
|
-
return
|
|
97783
|
+
return union5([string23(params), number23(), boolean23(), _null33(), array5(jsonSchema), record4(string23(), jsonSchema)]);
|
|
97740
97784
|
});
|
|
97741
97785
|
return jsonSchema;
|
|
97742
97786
|
}
|
|
@@ -98101,9 +98145,9 @@ function convertBaseSchema4(schema, ctx) {
|
|
|
98101
98145
|
const items = schema.items;
|
|
98102
98146
|
if (prefixItems && Array.isArray(prefixItems)) {
|
|
98103
98147
|
const tupleItems = prefixItems.map((item) => convertSchema4(item, ctx));
|
|
98104
|
-
const
|
|
98105
|
-
if (
|
|
98106
|
-
zodSchema = z4.tuple(tupleItems).rest(
|
|
98148
|
+
const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema4(items, ctx) : undefined;
|
|
98149
|
+
if (rest2) {
|
|
98150
|
+
zodSchema = z4.tuple(tupleItems).rest(rest2);
|
|
98107
98151
|
} else {
|
|
98108
98152
|
zodSchema = z4.tuple(tupleItems);
|
|
98109
98153
|
}
|
|
@@ -98115,9 +98159,9 @@ function convertBaseSchema4(schema, ctx) {
|
|
|
98115
98159
|
}
|
|
98116
98160
|
} else if (Array.isArray(items)) {
|
|
98117
98161
|
const tupleItems = items.map((item) => convertSchema4(item, ctx));
|
|
98118
|
-
const
|
|
98119
|
-
if (
|
|
98120
|
-
zodSchema = z4.tuple(tupleItems).rest(
|
|
98162
|
+
const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema4(schema.additionalItems, ctx) : undefined;
|
|
98163
|
+
if (rest2) {
|
|
98164
|
+
zodSchema = z4.tuple(tupleItems).rest(rest2);
|
|
98121
98165
|
} else {
|
|
98122
98166
|
zodSchema = z4.tuple(tupleItems);
|
|
98123
98167
|
}
|
|
@@ -98264,7 +98308,7 @@ function fillPool2(bytes) {
|
|
|
98264
98308
|
}
|
|
98265
98309
|
poolOffset2 += bytes;
|
|
98266
98310
|
}
|
|
98267
|
-
function
|
|
98311
|
+
function random4(bytes) {
|
|
98268
98312
|
fillPool2(bytes |= 0);
|
|
98269
98313
|
return pool2.subarray(poolOffset2 - bytes, poolOffset2);
|
|
98270
98314
|
}
|
|
@@ -98287,7 +98331,7 @@ function customRandom3(alphabet, defaultSize, getRandom) {
|
|
|
98287
98331
|
};
|
|
98288
98332
|
}
|
|
98289
98333
|
function customAlphabet3(alphabet, size = 21) {
|
|
98290
|
-
return customRandom3(alphabet, size,
|
|
98334
|
+
return customRandom3(alphabet, size, random4);
|
|
98291
98335
|
}
|
|
98292
98336
|
var nanoid33 = customAlphabet3("abcdefghijklmnopqrstuvwxyz", 16);
|
|
98293
98337
|
var tool2 = {
|
|
@@ -98892,11 +98936,10 @@ import os4 from "node:os";
|
|
|
98892
98936
|
// src/services/app/index.ts
|
|
98893
98937
|
import path13 from "path";
|
|
98894
98938
|
import fs16 from "fs";
|
|
98895
|
-
|
|
98896
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.3.5/node_modules/@inquirer/core/dist/lib/key.js
|
|
98939
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
98897
98940
|
var isTabKey = (key) => key.name === "tab";
|
|
98898
98941
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
98899
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
98942
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
98900
98943
|
class AbortPromptError extends Error {
|
|
98901
98944
|
name = "AbortPromptError";
|
|
98902
98945
|
message = "Prompt was aborted";
|
|
@@ -98922,10 +98965,10 @@ class HookError extends Error {
|
|
|
98922
98965
|
class ValidationError extends Error {
|
|
98923
98966
|
name = "ValidationError";
|
|
98924
98967
|
}
|
|
98925
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
98968
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
98926
98969
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
98927
98970
|
|
|
98928
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
98971
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
98929
98972
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
98930
98973
|
var hookStorage = new AsyncLocalStorage;
|
|
98931
98974
|
function createStore(rl) {
|
|
@@ -99030,7 +99073,7 @@ var effectScheduler = {
|
|
|
99030
99073
|
}
|
|
99031
99074
|
};
|
|
99032
99075
|
|
|
99033
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99076
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
99034
99077
|
function useState(defaultValue) {
|
|
99035
99078
|
return withPointer((pointer) => {
|
|
99036
99079
|
const setState = AsyncResource2.bind(function setState2(newValue) {
|
|
@@ -99048,7 +99091,7 @@ function useState(defaultValue) {
|
|
|
99048
99091
|
});
|
|
99049
99092
|
}
|
|
99050
99093
|
|
|
99051
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99094
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
99052
99095
|
function useEffect(cb, depArray) {
|
|
99053
99096
|
withPointer((pointer) => {
|
|
99054
99097
|
const oldDeps = pointer.get();
|
|
@@ -99060,7 +99103,7 @@ function useEffect(cb, depArray) {
|
|
|
99060
99103
|
});
|
|
99061
99104
|
}
|
|
99062
99105
|
|
|
99063
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99106
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
99064
99107
|
import { styleText } from "node:util";
|
|
99065
99108
|
|
|
99066
99109
|
// ../node_modules/.pnpm/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
@@ -99352,7 +99395,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
99352
99395
|
var dist_default = figures;
|
|
99353
99396
|
var replacements = Object.entries(specialMainSymbols);
|
|
99354
99397
|
|
|
99355
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99398
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
99356
99399
|
var defaultTheme = {
|
|
99357
99400
|
prefix: {
|
|
99358
99401
|
idle: styleText("blue", "?"),
|
|
@@ -99373,8 +99416,8 @@ var defaultTheme = {
|
|
|
99373
99416
|
}
|
|
99374
99417
|
};
|
|
99375
99418
|
|
|
99376
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99377
|
-
function
|
|
99419
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
99420
|
+
function isPlainObject9(value) {
|
|
99378
99421
|
if (typeof value !== "object" || value === null)
|
|
99379
99422
|
return false;
|
|
99380
99423
|
let proto2 = value;
|
|
@@ -99388,7 +99431,7 @@ function deepMerge(...objects) {
|
|
|
99388
99431
|
for (const obj of objects) {
|
|
99389
99432
|
for (const [key, value] of Object.entries(obj)) {
|
|
99390
99433
|
const prevValue = output[key];
|
|
99391
|
-
output[key] =
|
|
99434
|
+
output[key] = isPlainObject9(prevValue) && isPlainObject9(value) ? deepMerge(prevValue, value) : value;
|
|
99392
99435
|
}
|
|
99393
99436
|
}
|
|
99394
99437
|
return output;
|
|
@@ -99401,7 +99444,7 @@ function makeTheme(...themes) {
|
|
|
99401
99444
|
return deepMerge(...themesToMerge);
|
|
99402
99445
|
}
|
|
99403
99446
|
|
|
99404
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99447
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
99405
99448
|
function usePrefix({ status = "idle", theme }) {
|
|
99406
99449
|
const [showLoader, setShowLoader] = useState(false);
|
|
99407
99450
|
const [tick, setTick] = useState(0);
|
|
@@ -99431,12 +99474,12 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
99431
99474
|
const iconName = status === "loading" ? "idle" : status;
|
|
99432
99475
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
99433
99476
|
}
|
|
99434
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99477
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
99435
99478
|
function useRef(val) {
|
|
99436
99479
|
return useState({ current: val })[0];
|
|
99437
99480
|
}
|
|
99438
99481
|
|
|
99439
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99482
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
99440
99483
|
function useKeypress(userHandler) {
|
|
99441
99484
|
const signal = useRef(userHandler);
|
|
99442
99485
|
signal.current = userHandler;
|
|
@@ -99454,7 +99497,223 @@ function useKeypress(userHandler) {
|
|
|
99454
99497
|
};
|
|
99455
99498
|
}, []);
|
|
99456
99499
|
}
|
|
99457
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
99500
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
99501
|
+
var import_mute_stream = __toESM(require_lib(), 1);
|
|
99502
|
+
import * as readline2 from "node:readline";
|
|
99503
|
+
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
99504
|
+
|
|
99505
|
+
// ../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
99506
|
+
var signals = [];
|
|
99507
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
99508
|
+
if (process.platform !== "win32") {
|
|
99509
|
+
signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
99510
|
+
}
|
|
99511
|
+
if (process.platform === "linux") {
|
|
99512
|
+
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
99513
|
+
}
|
|
99514
|
+
|
|
99515
|
+
// ../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
99516
|
+
var processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
|
|
99517
|
+
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
99518
|
+
var global2 = globalThis;
|
|
99519
|
+
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
99520
|
+
|
|
99521
|
+
class Emitter {
|
|
99522
|
+
emitted = {
|
|
99523
|
+
afterExit: false,
|
|
99524
|
+
exit: false
|
|
99525
|
+
};
|
|
99526
|
+
listeners = {
|
|
99527
|
+
afterExit: [],
|
|
99528
|
+
exit: []
|
|
99529
|
+
};
|
|
99530
|
+
count = 0;
|
|
99531
|
+
id = Math.random();
|
|
99532
|
+
constructor() {
|
|
99533
|
+
if (global2[kExitEmitter]) {
|
|
99534
|
+
return global2[kExitEmitter];
|
|
99535
|
+
}
|
|
99536
|
+
ObjectDefineProperty(global2, kExitEmitter, {
|
|
99537
|
+
value: this,
|
|
99538
|
+
writable: false,
|
|
99539
|
+
enumerable: false,
|
|
99540
|
+
configurable: false
|
|
99541
|
+
});
|
|
99542
|
+
}
|
|
99543
|
+
on(ev, fn) {
|
|
99544
|
+
this.listeners[ev].push(fn);
|
|
99545
|
+
}
|
|
99546
|
+
removeListener(ev, fn) {
|
|
99547
|
+
const list4 = this.listeners[ev];
|
|
99548
|
+
const i = list4.indexOf(fn);
|
|
99549
|
+
if (i === -1) {
|
|
99550
|
+
return;
|
|
99551
|
+
}
|
|
99552
|
+
if (i === 0 && list4.length === 1) {
|
|
99553
|
+
list4.length = 0;
|
|
99554
|
+
} else {
|
|
99555
|
+
list4.splice(i, 1);
|
|
99556
|
+
}
|
|
99557
|
+
}
|
|
99558
|
+
emit(ev, code, signal) {
|
|
99559
|
+
if (this.emitted[ev]) {
|
|
99560
|
+
return false;
|
|
99561
|
+
}
|
|
99562
|
+
this.emitted[ev] = true;
|
|
99563
|
+
let ret = false;
|
|
99564
|
+
for (const fn of this.listeners[ev]) {
|
|
99565
|
+
ret = fn(code, signal) === true || ret;
|
|
99566
|
+
}
|
|
99567
|
+
if (ev === "exit") {
|
|
99568
|
+
ret = this.emit("afterExit", code, signal) || ret;
|
|
99569
|
+
}
|
|
99570
|
+
return ret;
|
|
99571
|
+
}
|
|
99572
|
+
}
|
|
99573
|
+
|
|
99574
|
+
class SignalExitBase {
|
|
99575
|
+
}
|
|
99576
|
+
var signalExitWrap = (handler) => {
|
|
99577
|
+
return {
|
|
99578
|
+
onExit(cb, opts) {
|
|
99579
|
+
return handler.onExit(cb, opts);
|
|
99580
|
+
},
|
|
99581
|
+
load() {
|
|
99582
|
+
return handler.load();
|
|
99583
|
+
},
|
|
99584
|
+
unload() {
|
|
99585
|
+
return handler.unload();
|
|
99586
|
+
}
|
|
99587
|
+
};
|
|
99588
|
+
};
|
|
99589
|
+
|
|
99590
|
+
class SignalExitFallback extends SignalExitBase {
|
|
99591
|
+
onExit() {
|
|
99592
|
+
return () => {};
|
|
99593
|
+
}
|
|
99594
|
+
load() {}
|
|
99595
|
+
unload() {}
|
|
99596
|
+
}
|
|
99597
|
+
|
|
99598
|
+
class SignalExit extends SignalExitBase {
|
|
99599
|
+
#hupSig = process11.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
99600
|
+
#emitter = new Emitter;
|
|
99601
|
+
#process;
|
|
99602
|
+
#originalProcessEmit;
|
|
99603
|
+
#originalProcessReallyExit;
|
|
99604
|
+
#sigListeners = {};
|
|
99605
|
+
#loaded = false;
|
|
99606
|
+
constructor(process4) {
|
|
99607
|
+
super();
|
|
99608
|
+
this.#process = process4;
|
|
99609
|
+
this.#sigListeners = {};
|
|
99610
|
+
for (const sig of signals) {
|
|
99611
|
+
this.#sigListeners[sig] = () => {
|
|
99612
|
+
const listeners = this.#process.listeners(sig);
|
|
99613
|
+
let { count } = this.#emitter;
|
|
99614
|
+
const p = process4;
|
|
99615
|
+
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
99616
|
+
count += p.__signal_exit_emitter__.count;
|
|
99617
|
+
}
|
|
99618
|
+
if (listeners.length === count) {
|
|
99619
|
+
this.unload();
|
|
99620
|
+
const ret = this.#emitter.emit("exit", null, sig);
|
|
99621
|
+
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
99622
|
+
if (!ret)
|
|
99623
|
+
process4.kill(process4.pid, s);
|
|
99624
|
+
}
|
|
99625
|
+
};
|
|
99626
|
+
}
|
|
99627
|
+
this.#originalProcessReallyExit = process4.reallyExit;
|
|
99628
|
+
this.#originalProcessEmit = process4.emit;
|
|
99629
|
+
}
|
|
99630
|
+
onExit(cb, opts) {
|
|
99631
|
+
if (!processOk(this.#process)) {
|
|
99632
|
+
return () => {};
|
|
99633
|
+
}
|
|
99634
|
+
if (this.#loaded === false) {
|
|
99635
|
+
this.load();
|
|
99636
|
+
}
|
|
99637
|
+
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
99638
|
+
this.#emitter.on(ev, cb);
|
|
99639
|
+
return () => {
|
|
99640
|
+
this.#emitter.removeListener(ev, cb);
|
|
99641
|
+
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
99642
|
+
this.unload();
|
|
99643
|
+
}
|
|
99644
|
+
};
|
|
99645
|
+
}
|
|
99646
|
+
load() {
|
|
99647
|
+
if (this.#loaded) {
|
|
99648
|
+
return;
|
|
99649
|
+
}
|
|
99650
|
+
this.#loaded = true;
|
|
99651
|
+
this.#emitter.count += 1;
|
|
99652
|
+
for (const sig of signals) {
|
|
99653
|
+
try {
|
|
99654
|
+
const fn = this.#sigListeners[sig];
|
|
99655
|
+
if (fn)
|
|
99656
|
+
this.#process.on(sig, fn);
|
|
99657
|
+
} catch (_) {}
|
|
99658
|
+
}
|
|
99659
|
+
this.#process.emit = (ev, ...a) => {
|
|
99660
|
+
return this.#processEmit(ev, ...a);
|
|
99661
|
+
};
|
|
99662
|
+
this.#process.reallyExit = (code) => {
|
|
99663
|
+
return this.#processReallyExit(code);
|
|
99664
|
+
};
|
|
99665
|
+
}
|
|
99666
|
+
unload() {
|
|
99667
|
+
if (!this.#loaded) {
|
|
99668
|
+
return;
|
|
99669
|
+
}
|
|
99670
|
+
this.#loaded = false;
|
|
99671
|
+
signals.forEach((sig) => {
|
|
99672
|
+
const listener = this.#sigListeners[sig];
|
|
99673
|
+
if (!listener) {
|
|
99674
|
+
throw new Error("Listener not defined for signal: " + sig);
|
|
99675
|
+
}
|
|
99676
|
+
try {
|
|
99677
|
+
this.#process.removeListener(sig, listener);
|
|
99678
|
+
} catch (_) {}
|
|
99679
|
+
});
|
|
99680
|
+
this.#process.emit = this.#originalProcessEmit;
|
|
99681
|
+
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
99682
|
+
this.#emitter.count -= 1;
|
|
99683
|
+
}
|
|
99684
|
+
#processReallyExit(code) {
|
|
99685
|
+
if (!processOk(this.#process)) {
|
|
99686
|
+
return 0;
|
|
99687
|
+
}
|
|
99688
|
+
this.#process.exitCode = code || 0;
|
|
99689
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
99690
|
+
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
99691
|
+
}
|
|
99692
|
+
#processEmit(ev, ...args2) {
|
|
99693
|
+
const og = this.#originalProcessEmit;
|
|
99694
|
+
if (ev === "exit" && processOk(this.#process)) {
|
|
99695
|
+
if (typeof args2[0] === "number") {
|
|
99696
|
+
this.#process.exitCode = args2[0];
|
|
99697
|
+
}
|
|
99698
|
+
const ret = og.call(this.#process, ev, ...args2);
|
|
99699
|
+
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
99700
|
+
return ret;
|
|
99701
|
+
} else {
|
|
99702
|
+
return og.call(this.#process, ev, ...args2);
|
|
99703
|
+
}
|
|
99704
|
+
}
|
|
99705
|
+
}
|
|
99706
|
+
var process11 = globalThis.process;
|
|
99707
|
+
var {
|
|
99708
|
+
onExit,
|
|
99709
|
+
load,
|
|
99710
|
+
unload
|
|
99711
|
+
} = signalExitWrap(processOk(process11) ? new SignalExit(process11) : new SignalExitFallback);
|
|
99712
|
+
|
|
99713
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
99714
|
+
import { stripVTControlCharacters } from "node:util";
|
|
99715
|
+
|
|
99716
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
99458
99717
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
99459
99718
|
|
|
99460
99719
|
// ../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
@@ -99671,18 +99930,18 @@ var wrapWord = (rows, word, columns) => {
|
|
|
99671
99930
|
}
|
|
99672
99931
|
};
|
|
99673
99932
|
var stringVisibleTrimSpacesRight = (string5) => {
|
|
99674
|
-
const
|
|
99675
|
-
let
|
|
99676
|
-
while (
|
|
99677
|
-
if (dist_default3(
|
|
99933
|
+
const words2 = string5.split(" ");
|
|
99934
|
+
let last2 = words2.length;
|
|
99935
|
+
while (last2) {
|
|
99936
|
+
if (dist_default3(words2[last2 - 1])) {
|
|
99678
99937
|
break;
|
|
99679
99938
|
}
|
|
99680
|
-
|
|
99939
|
+
last2--;
|
|
99681
99940
|
}
|
|
99682
|
-
if (
|
|
99941
|
+
if (last2 === words2.length) {
|
|
99683
99942
|
return string5;
|
|
99684
99943
|
}
|
|
99685
|
-
return
|
|
99944
|
+
return words2.slice(0, last2).join(" ") + words2.slice(last2).join("");
|
|
99686
99945
|
};
|
|
99687
99946
|
var exec = (string5, columns, options = {}) => {
|
|
99688
99947
|
if (options.trim !== false && string5.trim() === "") {
|
|
@@ -99691,11 +99950,11 @@ var exec = (string5, columns, options = {}) => {
|
|
|
99691
99950
|
let returnValue = "";
|
|
99692
99951
|
let escapeCode;
|
|
99693
99952
|
let escapeUrl;
|
|
99694
|
-
const
|
|
99953
|
+
const words2 = string5.split(" ");
|
|
99695
99954
|
let rows = [""];
|
|
99696
99955
|
let rowLength = 0;
|
|
99697
|
-
for (let index = 0;index <
|
|
99698
|
-
const word =
|
|
99956
|
+
for (let index = 0;index < words2.length; index++) {
|
|
99957
|
+
const word = words2[index];
|
|
99699
99958
|
if (options.trim !== false) {
|
|
99700
99959
|
const row = rows.at(-1) ?? "";
|
|
99701
99960
|
const trimmed = row.trimStart();
|
|
@@ -99798,7 +100057,7 @@ function wrapAnsi(string5, columns, options) {
|
|
|
99798
100057
|
`);
|
|
99799
100058
|
}
|
|
99800
100059
|
|
|
99801
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
100060
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
99802
100061
|
function breakLines(content, width) {
|
|
99803
100062
|
return content.split(`
|
|
99804
100063
|
`).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
|
|
@@ -99809,222 +100068,6 @@ function readlineWidth() {
|
|
|
99809
100068
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
99810
100069
|
}
|
|
99811
100070
|
|
|
99812
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.3.5/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
99813
|
-
var import_mute_stream = __toESM(require_lib(), 1);
|
|
99814
|
-
import * as readline2 from "node:readline";
|
|
99815
|
-
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
99816
|
-
|
|
99817
|
-
// ../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
99818
|
-
var signals = [];
|
|
99819
|
-
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
99820
|
-
if (process.platform !== "win32") {
|
|
99821
|
-
signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
99822
|
-
}
|
|
99823
|
-
if (process.platform === "linux") {
|
|
99824
|
-
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
99825
|
-
}
|
|
99826
|
-
|
|
99827
|
-
// ../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
99828
|
-
var processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
|
|
99829
|
-
var kExitEmitter = Symbol.for("signal-exit emitter");
|
|
99830
|
-
var global2 = globalThis;
|
|
99831
|
-
var ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
99832
|
-
|
|
99833
|
-
class Emitter {
|
|
99834
|
-
emitted = {
|
|
99835
|
-
afterExit: false,
|
|
99836
|
-
exit: false
|
|
99837
|
-
};
|
|
99838
|
-
listeners = {
|
|
99839
|
-
afterExit: [],
|
|
99840
|
-
exit: []
|
|
99841
|
-
};
|
|
99842
|
-
count = 0;
|
|
99843
|
-
id = Math.random();
|
|
99844
|
-
constructor() {
|
|
99845
|
-
if (global2[kExitEmitter]) {
|
|
99846
|
-
return global2[kExitEmitter];
|
|
99847
|
-
}
|
|
99848
|
-
ObjectDefineProperty(global2, kExitEmitter, {
|
|
99849
|
-
value: this,
|
|
99850
|
-
writable: false,
|
|
99851
|
-
enumerable: false,
|
|
99852
|
-
configurable: false
|
|
99853
|
-
});
|
|
99854
|
-
}
|
|
99855
|
-
on(ev, fn) {
|
|
99856
|
-
this.listeners[ev].push(fn);
|
|
99857
|
-
}
|
|
99858
|
-
removeListener(ev, fn) {
|
|
99859
|
-
const list4 = this.listeners[ev];
|
|
99860
|
-
const i = list4.indexOf(fn);
|
|
99861
|
-
if (i === -1) {
|
|
99862
|
-
return;
|
|
99863
|
-
}
|
|
99864
|
-
if (i === 0 && list4.length === 1) {
|
|
99865
|
-
list4.length = 0;
|
|
99866
|
-
} else {
|
|
99867
|
-
list4.splice(i, 1);
|
|
99868
|
-
}
|
|
99869
|
-
}
|
|
99870
|
-
emit(ev, code, signal) {
|
|
99871
|
-
if (this.emitted[ev]) {
|
|
99872
|
-
return false;
|
|
99873
|
-
}
|
|
99874
|
-
this.emitted[ev] = true;
|
|
99875
|
-
let ret = false;
|
|
99876
|
-
for (const fn of this.listeners[ev]) {
|
|
99877
|
-
ret = fn(code, signal) === true || ret;
|
|
99878
|
-
}
|
|
99879
|
-
if (ev === "exit") {
|
|
99880
|
-
ret = this.emit("afterExit", code, signal) || ret;
|
|
99881
|
-
}
|
|
99882
|
-
return ret;
|
|
99883
|
-
}
|
|
99884
|
-
}
|
|
99885
|
-
|
|
99886
|
-
class SignalExitBase {
|
|
99887
|
-
}
|
|
99888
|
-
var signalExitWrap = (handler) => {
|
|
99889
|
-
return {
|
|
99890
|
-
onExit(cb, opts) {
|
|
99891
|
-
return handler.onExit(cb, opts);
|
|
99892
|
-
},
|
|
99893
|
-
load() {
|
|
99894
|
-
return handler.load();
|
|
99895
|
-
},
|
|
99896
|
-
unload() {
|
|
99897
|
-
return handler.unload();
|
|
99898
|
-
}
|
|
99899
|
-
};
|
|
99900
|
-
};
|
|
99901
|
-
|
|
99902
|
-
class SignalExitFallback extends SignalExitBase {
|
|
99903
|
-
onExit() {
|
|
99904
|
-
return () => {};
|
|
99905
|
-
}
|
|
99906
|
-
load() {}
|
|
99907
|
-
unload() {}
|
|
99908
|
-
}
|
|
99909
|
-
|
|
99910
|
-
class SignalExit extends SignalExitBase {
|
|
99911
|
-
#hupSig = process11.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
99912
|
-
#emitter = new Emitter;
|
|
99913
|
-
#process;
|
|
99914
|
-
#originalProcessEmit;
|
|
99915
|
-
#originalProcessReallyExit;
|
|
99916
|
-
#sigListeners = {};
|
|
99917
|
-
#loaded = false;
|
|
99918
|
-
constructor(process4) {
|
|
99919
|
-
super();
|
|
99920
|
-
this.#process = process4;
|
|
99921
|
-
this.#sigListeners = {};
|
|
99922
|
-
for (const sig of signals) {
|
|
99923
|
-
this.#sigListeners[sig] = () => {
|
|
99924
|
-
const listeners = this.#process.listeners(sig);
|
|
99925
|
-
let { count } = this.#emitter;
|
|
99926
|
-
const p = process4;
|
|
99927
|
-
if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
|
|
99928
|
-
count += p.__signal_exit_emitter__.count;
|
|
99929
|
-
}
|
|
99930
|
-
if (listeners.length === count) {
|
|
99931
|
-
this.unload();
|
|
99932
|
-
const ret = this.#emitter.emit("exit", null, sig);
|
|
99933
|
-
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
99934
|
-
if (!ret)
|
|
99935
|
-
process4.kill(process4.pid, s);
|
|
99936
|
-
}
|
|
99937
|
-
};
|
|
99938
|
-
}
|
|
99939
|
-
this.#originalProcessReallyExit = process4.reallyExit;
|
|
99940
|
-
this.#originalProcessEmit = process4.emit;
|
|
99941
|
-
}
|
|
99942
|
-
onExit(cb, opts) {
|
|
99943
|
-
if (!processOk(this.#process)) {
|
|
99944
|
-
return () => {};
|
|
99945
|
-
}
|
|
99946
|
-
if (this.#loaded === false) {
|
|
99947
|
-
this.load();
|
|
99948
|
-
}
|
|
99949
|
-
const ev = opts?.alwaysLast ? "afterExit" : "exit";
|
|
99950
|
-
this.#emitter.on(ev, cb);
|
|
99951
|
-
return () => {
|
|
99952
|
-
this.#emitter.removeListener(ev, cb);
|
|
99953
|
-
if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
|
|
99954
|
-
this.unload();
|
|
99955
|
-
}
|
|
99956
|
-
};
|
|
99957
|
-
}
|
|
99958
|
-
load() {
|
|
99959
|
-
if (this.#loaded) {
|
|
99960
|
-
return;
|
|
99961
|
-
}
|
|
99962
|
-
this.#loaded = true;
|
|
99963
|
-
this.#emitter.count += 1;
|
|
99964
|
-
for (const sig of signals) {
|
|
99965
|
-
try {
|
|
99966
|
-
const fn = this.#sigListeners[sig];
|
|
99967
|
-
if (fn)
|
|
99968
|
-
this.#process.on(sig, fn);
|
|
99969
|
-
} catch (_) {}
|
|
99970
|
-
}
|
|
99971
|
-
this.#process.emit = (ev, ...a) => {
|
|
99972
|
-
return this.#processEmit(ev, ...a);
|
|
99973
|
-
};
|
|
99974
|
-
this.#process.reallyExit = (code) => {
|
|
99975
|
-
return this.#processReallyExit(code);
|
|
99976
|
-
};
|
|
99977
|
-
}
|
|
99978
|
-
unload() {
|
|
99979
|
-
if (!this.#loaded) {
|
|
99980
|
-
return;
|
|
99981
|
-
}
|
|
99982
|
-
this.#loaded = false;
|
|
99983
|
-
signals.forEach((sig) => {
|
|
99984
|
-
const listener = this.#sigListeners[sig];
|
|
99985
|
-
if (!listener) {
|
|
99986
|
-
throw new Error("Listener not defined for signal: " + sig);
|
|
99987
|
-
}
|
|
99988
|
-
try {
|
|
99989
|
-
this.#process.removeListener(sig, listener);
|
|
99990
|
-
} catch (_) {}
|
|
99991
|
-
});
|
|
99992
|
-
this.#process.emit = this.#originalProcessEmit;
|
|
99993
|
-
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
99994
|
-
this.#emitter.count -= 1;
|
|
99995
|
-
}
|
|
99996
|
-
#processReallyExit(code) {
|
|
99997
|
-
if (!processOk(this.#process)) {
|
|
99998
|
-
return 0;
|
|
99999
|
-
}
|
|
100000
|
-
this.#process.exitCode = code || 0;
|
|
100001
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
100002
|
-
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
100003
|
-
}
|
|
100004
|
-
#processEmit(ev, ...args2) {
|
|
100005
|
-
const og = this.#originalProcessEmit;
|
|
100006
|
-
if (ev === "exit" && processOk(this.#process)) {
|
|
100007
|
-
if (typeof args2[0] === "number") {
|
|
100008
|
-
this.#process.exitCode = args2[0];
|
|
100009
|
-
}
|
|
100010
|
-
const ret = og.call(this.#process, ev, ...args2);
|
|
100011
|
-
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
100012
|
-
return ret;
|
|
100013
|
-
} else {
|
|
100014
|
-
return og.call(this.#process, ev, ...args2);
|
|
100015
|
-
}
|
|
100016
|
-
}
|
|
100017
|
-
}
|
|
100018
|
-
var process11 = globalThis.process;
|
|
100019
|
-
var {
|
|
100020
|
-
onExit,
|
|
100021
|
-
load,
|
|
100022
|
-
unload
|
|
100023
|
-
} = signalExitWrap(processOk(process11) ? new SignalExit(process11) : new SignalExitFallback);
|
|
100024
|
-
|
|
100025
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.3.5/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
100026
|
-
import { stripVTControlCharacters } from "node:util";
|
|
100027
|
-
|
|
100028
100071
|
// ../node_modules/.pnpm/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
100029
100072
|
var ESC2 = "\x1B[";
|
|
100030
100073
|
var cursorLeft = ESC2 + "G";
|
|
@@ -100041,7 +100084,7 @@ var cursorTo = (x, y) => {
|
|
|
100041
100084
|
var eraseLine = ESC2 + "2K";
|
|
100042
100085
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
100043
100086
|
|
|
100044
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
100087
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
100045
100088
|
var height = (content) => content.split(`
|
|
100046
100089
|
`).length;
|
|
100047
100090
|
var lastLine = (content) => content.split(`
|
|
@@ -100106,7 +100149,7 @@ class ScreenManager {
|
|
|
100106
100149
|
}
|
|
100107
100150
|
}
|
|
100108
100151
|
|
|
100109
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
100152
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
100110
100153
|
class PromisePolyfill extends Promise {
|
|
100111
100154
|
static withResolver() {
|
|
100112
100155
|
let resolve;
|
|
@@ -100119,7 +100162,7 @@ class PromisePolyfill extends Promise {
|
|
|
100119
100162
|
}
|
|
100120
100163
|
}
|
|
100121
100164
|
|
|
100122
|
-
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
100165
|
+
// ../node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
100123
100166
|
var nativeSetImmediate = globalThis.setImmediate;
|
|
100124
100167
|
function getCallSites() {
|
|
100125
100168
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
@@ -100214,7 +100257,7 @@ function createPrompt(view) {
|
|
|
100214
100257
|
};
|
|
100215
100258
|
return prompt;
|
|
100216
100259
|
}
|
|
100217
|
-
// ../node_modules/.pnpm/@inquirer+confirm@6.0.8_@types+node@25.
|
|
100260
|
+
// ../node_modules/.pnpm/@inquirer+confirm@6.0.8_@types+node@25.5.0/node_modules/@inquirer/confirm/dist/index.js
|
|
100218
100261
|
function getBooleanValue(value, defaultValue) {
|
|
100219
100262
|
let answer = defaultValue !== false;
|
|
100220
100263
|
if (/^(y|yes)/i.test(value))
|
|
@@ -100597,18 +100640,18 @@ app.route({
|
|
|
100597
100640
|
}).addTo(app, {
|
|
100598
100641
|
overwrite: false
|
|
100599
100642
|
});
|
|
100600
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100643
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
|
|
100601
100644
|
var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url4, ...options }) => {
|
|
100602
100645
|
let lastEventId;
|
|
100603
100646
|
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
100604
100647
|
const createStream = async function* () {
|
|
100605
100648
|
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
100606
|
-
let
|
|
100649
|
+
let attempt2 = 0;
|
|
100607
100650
|
const signal = options.signal ?? new AbortController().signal;
|
|
100608
100651
|
while (true) {
|
|
100609
100652
|
if (signal.aborted)
|
|
100610
100653
|
break;
|
|
100611
|
-
|
|
100654
|
+
attempt2++;
|
|
100612
100655
|
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
100613
100656
|
if (lastEventId !== undefined) {
|
|
100614
100657
|
headers.set("Last-Event-ID", lastEventId);
|
|
@@ -100637,8 +100680,8 @@ var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseVa
|
|
|
100637
100680
|
|
|
100638
100681
|
`);
|
|
100639
100682
|
buffer = chunks.pop() ?? "";
|
|
100640
|
-
for (const
|
|
100641
|
-
const lines =
|
|
100683
|
+
for (const chunk2 of chunks) {
|
|
100684
|
+
const lines = chunk2.split(`
|
|
100642
100685
|
`);
|
|
100643
100686
|
const dataLines = [];
|
|
100644
100687
|
let eventName;
|
|
@@ -100694,10 +100737,10 @@ var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseVa
|
|
|
100694
100737
|
break;
|
|
100695
100738
|
} catch (error111) {
|
|
100696
100739
|
onSseError?.(error111);
|
|
100697
|
-
if (sseMaxRetryAttempts !== undefined &&
|
|
100740
|
+
if (sseMaxRetryAttempts !== undefined && attempt2 >= sseMaxRetryAttempts) {
|
|
100698
100741
|
break;
|
|
100699
100742
|
}
|
|
100700
|
-
const backoff = Math.min(retryDelay * 2 ** (
|
|
100743
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt2 - 1), sseMaxRetryDelay ?? 30000);
|
|
100701
100744
|
await sleep(backoff);
|
|
100702
100745
|
}
|
|
100703
100746
|
}
|
|
@@ -100706,7 +100749,7 @@ var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseVa
|
|
|
100706
100749
|
return { stream: stream2 };
|
|
100707
100750
|
};
|
|
100708
100751
|
|
|
100709
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100752
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/auth.gen.js
|
|
100710
100753
|
var getAuthToken = async (auth, callback) => {
|
|
100711
100754
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
100712
100755
|
if (!token) {
|
|
@@ -100721,12 +100764,12 @@ var getAuthToken = async (auth, callback) => {
|
|
|
100721
100764
|
return token;
|
|
100722
100765
|
};
|
|
100723
100766
|
|
|
100724
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100767
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/bodySerializer.gen.js
|
|
100725
100768
|
var jsonBodySerializer = {
|
|
100726
100769
|
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
100727
100770
|
};
|
|
100728
100771
|
|
|
100729
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100772
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/pathSerializer.gen.js
|
|
100730
100773
|
var separatorArrayExplode = (style) => {
|
|
100731
100774
|
switch (style) {
|
|
100732
100775
|
case "label":
|
|
@@ -100829,7 +100872,7 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value, valueO
|
|
|
100829
100872
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
100830
100873
|
};
|
|
100831
100874
|
|
|
100832
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100875
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/utils.gen.js
|
|
100833
100876
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
100834
100877
|
var defaultPathSerializer = ({ path: path14, url: _url5 }) => {
|
|
100835
100878
|
let url4 = _url5;
|
|
@@ -100897,7 +100940,7 @@ var getUrl = ({ baseUrl, path: path14, query: query2, querySerializer, url: _url
|
|
|
100897
100940
|
return url4;
|
|
100898
100941
|
};
|
|
100899
100942
|
|
|
100900
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
100943
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
|
|
100901
100944
|
var createQuerySerializer = ({ allowReserved, array: array6, object: object5 } = {}) => {
|
|
100902
100945
|
const querySerializer = (queryParams) => {
|
|
100903
100946
|
const search = [];
|
|
@@ -101105,7 +101148,7 @@ var createConfig = (override = {}) => ({
|
|
|
101105
101148
|
...override
|
|
101106
101149
|
});
|
|
101107
101150
|
|
|
101108
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
101151
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client/client.gen.js
|
|
101109
101152
|
var createClient = (config7 = {}) => {
|
|
101110
101153
|
let _config = mergeConfigs(createConfig(), config7);
|
|
101111
101154
|
const getConfig2 = () => ({ ..._config });
|
|
@@ -101252,7 +101295,7 @@ var createClient = (config7 = {}) => {
|
|
|
101252
101295
|
trace: makeMethod("TRACE")
|
|
101253
101296
|
};
|
|
101254
101297
|
};
|
|
101255
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
101298
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/core/params.gen.js
|
|
101256
101299
|
var extraPrefixesMap = {
|
|
101257
101300
|
$body_: "body",
|
|
101258
101301
|
$headers_: "headers",
|
|
@@ -101260,12 +101303,12 @@ var extraPrefixesMap = {
|
|
|
101260
101303
|
$query_: "query"
|
|
101261
101304
|
};
|
|
101262
101305
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
101263
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
101306
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/client.gen.js
|
|
101264
101307
|
var client = createClient(createConfig({
|
|
101265
101308
|
baseUrl: "http://localhost:4096"
|
|
101266
101309
|
}));
|
|
101267
101310
|
|
|
101268
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
101311
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/gen/sdk.gen.js
|
|
101269
101312
|
class _HeyApiClient {
|
|
101270
101313
|
_client = client;
|
|
101271
101314
|
constructor(args2) {
|
|
@@ -101935,7 +101978,7 @@ class OpencodeClient extends _HeyApiClient {
|
|
|
101935
101978
|
event = new Event({ client: this._client });
|
|
101936
101979
|
}
|
|
101937
101980
|
|
|
101938
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
101981
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/client.js
|
|
101939
101982
|
function createOpencodeClient(config7) {
|
|
101940
101983
|
if (!config7?.fetch) {
|
|
101941
101984
|
const customFetch = (req) => {
|
|
@@ -101956,7 +101999,7 @@ function createOpencodeClient(config7) {
|
|
|
101956
101999
|
const client2 = createClient(config7);
|
|
101957
102000
|
return new OpencodeClient({ client: client2 });
|
|
101958
102001
|
}
|
|
101959
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
102002
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/server.js
|
|
101960
102003
|
import { spawn as spawn3 } from "node:child_process";
|
|
101961
102004
|
async function createOpencodeServer(options) {
|
|
101962
102005
|
options = Object.assign({
|
|
@@ -101979,8 +102022,8 @@ async function createOpencodeServer(options) {
|
|
|
101979
102022
|
reject(new Error(`Timeout waiting for server to start after ${options.timeout}ms`));
|
|
101980
102023
|
}, options.timeout);
|
|
101981
102024
|
let output = "";
|
|
101982
|
-
proc.stdout?.on("data", (
|
|
101983
|
-
output +=
|
|
102025
|
+
proc.stdout?.on("data", (chunk2) => {
|
|
102026
|
+
output += chunk2.toString();
|
|
101984
102027
|
const lines = output.split(`
|
|
101985
102028
|
`);
|
|
101986
102029
|
for (const line of lines) {
|
|
@@ -101995,8 +102038,8 @@ async function createOpencodeServer(options) {
|
|
|
101995
102038
|
}
|
|
101996
102039
|
}
|
|
101997
102040
|
});
|
|
101998
|
-
proc.stderr?.on("data", (
|
|
101999
|
-
output +=
|
|
102041
|
+
proc.stderr?.on("data", (chunk2) => {
|
|
102042
|
+
output += chunk2.toString();
|
|
102000
102043
|
});
|
|
102001
102044
|
proc.on("exit", (code) => {
|
|
102002
102045
|
clearTimeout(id);
|
|
@@ -102025,7 +102068,7 @@ Server output: ${output}`;
|
|
|
102025
102068
|
}
|
|
102026
102069
|
};
|
|
102027
102070
|
}
|
|
102028
|
-
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.
|
|
102071
|
+
// ../node_modules/.pnpm/@opencode-ai+sdk@1.2.24/node_modules/@opencode-ai/sdk/dist/index.js
|
|
102029
102072
|
async function createOpencode(options) {
|
|
102030
102073
|
const server2 = await createOpencodeServer({
|
|
102031
102074
|
...options
|
|
@@ -102053,7 +102096,7 @@ var lockedPorts = {
|
|
|
102053
102096
|
young: new Set
|
|
102054
102097
|
};
|
|
102055
102098
|
var releaseOldLockedPortsIntervalMs = 1000 * 15;
|
|
102056
|
-
var
|
|
102099
|
+
var timeout2;
|
|
102057
102100
|
var getLocalHosts = () => {
|
|
102058
102101
|
const interfaces = os5.networkInterfaces();
|
|
102059
102102
|
const results = new Set([undefined, "0.0.0.0"]);
|
|
@@ -102119,14 +102162,14 @@ async function getPorts(options) {
|
|
|
102119
102162
|
exclude = new Set(excludeIterable);
|
|
102120
102163
|
}
|
|
102121
102164
|
}
|
|
102122
|
-
if (
|
|
102123
|
-
|
|
102124
|
-
|
|
102165
|
+
if (timeout2 === undefined) {
|
|
102166
|
+
timeout2 = setTimeout(() => {
|
|
102167
|
+
timeout2 = undefined;
|
|
102125
102168
|
lockedPorts.old = lockedPorts.young;
|
|
102126
102169
|
lockedPorts.young = new Set;
|
|
102127
102170
|
}, releaseOldLockedPortsIntervalMs);
|
|
102128
|
-
if (
|
|
102129
|
-
|
|
102171
|
+
if (timeout2.unref) {
|
|
102172
|
+
timeout2.unref();
|
|
102130
102173
|
}
|
|
102131
102174
|
}
|
|
102132
102175
|
const hosts = getLocalHosts();
|
|
@@ -102156,7 +102199,7 @@ async function getPorts(options) {
|
|
|
102156
102199
|
// src/routes/opencode/module/open.ts
|
|
102157
102200
|
import os6 from "node:os";
|
|
102158
102201
|
import { execSync as execSync2 } from "node:child_process";
|
|
102159
|
-
var DEFAULT_PORT =
|
|
102202
|
+
var DEFAULT_PORT = 4096;
|
|
102160
102203
|
|
|
102161
102204
|
class OpencodeManager {
|
|
102162
102205
|
static instance = null;
|
|
@@ -102203,7 +102246,7 @@ class OpencodeManager {
|
|
|
102203
102246
|
}
|
|
102204
102247
|
async createOpencodeProject({
|
|
102205
102248
|
directory,
|
|
102206
|
-
port =
|
|
102249
|
+
port = DEFAULT_PORT
|
|
102207
102250
|
}) {
|
|
102208
102251
|
const client3 = createOpencodeClient({
|
|
102209
102252
|
baseUrl: `http://localhost:${port}`,
|
|
@@ -102275,7 +102318,7 @@ var opencodeManager = OpencodeManager.getInstance();
|
|
|
102275
102318
|
app.route({
|
|
102276
102319
|
path: "opencode",
|
|
102277
102320
|
key: "create",
|
|
102278
|
-
middleware: ["auth"],
|
|
102321
|
+
middleware: ["auth-admin"],
|
|
102279
102322
|
description: "创建 OpenCode 客户端",
|
|
102280
102323
|
metadata: {
|
|
102281
102324
|
tags: ["opencode"],
|
|
@@ -102284,7 +102327,7 @@ app.route({
|
|
|
102284
102327
|
title: "创建 OpenCode 客户端",
|
|
102285
102328
|
summary: "创建 OpenCode 客户端,如果存在则复用",
|
|
102286
102329
|
args: {
|
|
102287
|
-
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为
|
|
102330
|
+
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为 4096")
|
|
102288
102331
|
}
|
|
102289
102332
|
})
|
|
102290
102333
|
}
|
|
@@ -102295,7 +102338,7 @@ app.route({
|
|
|
102295
102338
|
app.route({
|
|
102296
102339
|
path: "opencode",
|
|
102297
102340
|
key: "close",
|
|
102298
|
-
middleware: ["auth"],
|
|
102341
|
+
middleware: ["auth-admin"],
|
|
102299
102342
|
description: "关闭 OpenCode 客户端",
|
|
102300
102343
|
metadata: {
|
|
102301
102344
|
tags: ["opencode"],
|
|
@@ -102304,7 +102347,7 @@ app.route({
|
|
|
102304
102347
|
title: "关闭 OpenCode 客户端",
|
|
102305
102348
|
summary: "关闭 OpenCode 客户端, 未提供端口则关闭默认端口",
|
|
102306
102349
|
args: {
|
|
102307
|
-
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为
|
|
102350
|
+
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为 4096")
|
|
102308
102351
|
}
|
|
102309
102352
|
})
|
|
102310
102353
|
}
|
|
@@ -102316,7 +102359,7 @@ app.route({
|
|
|
102316
102359
|
app.route({
|
|
102317
102360
|
path: "opencode",
|
|
102318
102361
|
key: "restart",
|
|
102319
|
-
middleware: ["auth"],
|
|
102362
|
+
middleware: ["auth-admin"],
|
|
102320
102363
|
description: "重启 OpenCode 客户端",
|
|
102321
102364
|
metadata: {
|
|
102322
102365
|
tags: ["opencode"],
|
|
@@ -102325,7 +102368,7 @@ app.route({
|
|
|
102325
102368
|
title: "重启 OpenCode 客户端",
|
|
102326
102369
|
summary: "重启 OpenCode 客户端",
|
|
102327
102370
|
args: {
|
|
102328
|
-
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为
|
|
102371
|
+
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为 4096")
|
|
102329
102372
|
}
|
|
102330
102373
|
})
|
|
102331
102374
|
}
|
|
@@ -102337,7 +102380,7 @@ app.route({
|
|
|
102337
102380
|
app.route({
|
|
102338
102381
|
path: "opencode",
|
|
102339
102382
|
key: "getUrl",
|
|
102340
|
-
middleware: ["auth"],
|
|
102383
|
+
middleware: ["auth-admin"],
|
|
102341
102384
|
description: "获取 OpenCode 服务 URL",
|
|
102342
102385
|
metadata: {
|
|
102343
102386
|
tags: ["opencode"],
|
|
@@ -102346,7 +102389,7 @@ app.route({
|
|
|
102346
102389
|
title: "获取 OpenCode 服务 URL",
|
|
102347
102390
|
summary: "获取当前 OpenCode 服务的 URL 地址",
|
|
102348
102391
|
args: {
|
|
102349
|
-
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为
|
|
102392
|
+
port: tool.schema.number().optional().describe("OpenCode 服务端口,默认为 4096")
|
|
102350
102393
|
}
|
|
102351
102394
|
})
|
|
102352
102395
|
}
|
|
@@ -102356,7 +102399,7 @@ app.route({
|
|
|
102356
102399
|
let content = `本地访问地址: ${url4}`;
|
|
102357
102400
|
if (cnbURL) {
|
|
102358
102401
|
content += `
|
|
102359
|
-
云端访问地址: ${cnbURL.replace("{{port}}", "
|
|
102402
|
+
云端访问地址: ${cnbURL.replace("{{port}}", "4096")}`;
|
|
102360
102403
|
}
|
|
102361
102404
|
ctx.body = { content };
|
|
102362
102405
|
}).addTo(app);
|
|
@@ -102375,7 +102418,7 @@ app.route({
|
|
|
102375
102418
|
app.route({
|
|
102376
102419
|
path: "opencode",
|
|
102377
102420
|
key: "runProject",
|
|
102378
|
-
middleware: ["auth"],
|
|
102421
|
+
middleware: ["auth-admin"],
|
|
102379
102422
|
metadata: {
|
|
102380
102423
|
tags: ["opencode"],
|
|
102381
102424
|
...createSkill({
|
|
@@ -103802,7 +103845,7 @@ var authCache = new L({
|
|
|
103802
103845
|
ttl: 1000 * 60 * 60 * 24 * 7
|
|
103803
103846
|
});
|
|
103804
103847
|
|
|
103805
|
-
// src/routes/
|
|
103848
|
+
// src/routes/auth.ts
|
|
103806
103849
|
var getTokenUser = async (token) => {
|
|
103807
103850
|
const query2 = assistantConfig2.query;
|
|
103808
103851
|
const res = await query2.post({
|
|
@@ -103901,7 +103944,7 @@ var import_busboy = __toESM(require_lib2(), 1);
|
|
|
103901
103944
|
import path16 from "path";
|
|
103902
103945
|
import fs19 from "fs";
|
|
103903
103946
|
|
|
103904
|
-
// ../node_modules/.pnpm/@kevisual+router@0.
|
|
103947
|
+
// ../node_modules/.pnpm/@kevisual+router@0.1.1/node_modules/@kevisual/router/src/server/cookie.ts
|
|
103905
103948
|
var NullObject2 = /* @__PURE__ */ (() => {
|
|
103906
103949
|
const C2 = function() {};
|
|
103907
103950
|
C2.prototype = Object.create(null);
|
|
@@ -104132,8 +104175,8 @@ var uploadResources = async (req, res) => {
|
|
|
104132
104175
|
const tempPath = path16.join(cacheFilePath, `${Date.now()}-${Math.random().toString(36).substring(7)}`);
|
|
104133
104176
|
const writeStream = fs19.createWriteStream(tempPath);
|
|
104134
104177
|
const filePromise = new Promise((resolve, reject) => {
|
|
104135
|
-
fileStream.on("data", (
|
|
104136
|
-
bytesReceived +=
|
|
104178
|
+
fileStream.on("data", (chunk2) => {
|
|
104179
|
+
bytesReceived += chunk2.length;
|
|
104137
104180
|
if (bytesExpected > 0) {
|
|
104138
104181
|
const progress = bytesReceived / bytesExpected * 100;
|
|
104139
104182
|
const data = {
|