oasis_test 0.1.0 → 0.1.2
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/index.js +1076 -720
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
const __esm_import_meta_url = require('url').pathToFileURL(__filename).href;
|
|
3
|
+
"use strict";
|
|
2
4
|
var __create = Object.create;
|
|
3
5
|
var __defProp = Object.defineProperty;
|
|
4
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
10
|
var __esm = (fn, res) => function __init() {
|
|
15
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
12
|
};
|
|
17
|
-
var __commonJS = (cb, mod) => function
|
|
13
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
18
14
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
15
|
};
|
|
20
16
|
var __export = (target, all) => {
|
|
@@ -6147,18 +6143,18 @@ var init_protocol = __esm({
|
|
|
6147
6143
|
|
|
6148
6144
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
6149
6145
|
var require_code = __commonJS({
|
|
6150
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(
|
|
6146
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
|
|
6151
6147
|
"use strict";
|
|
6152
|
-
Object.defineProperty(
|
|
6153
|
-
|
|
6148
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6149
|
+
exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0;
|
|
6154
6150
|
var _CodeOrName = class {
|
|
6155
6151
|
};
|
|
6156
|
-
|
|
6157
|
-
|
|
6152
|
+
exports2._CodeOrName = _CodeOrName;
|
|
6153
|
+
exports2.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
6158
6154
|
var Name = class extends _CodeOrName {
|
|
6159
6155
|
constructor(s) {
|
|
6160
6156
|
super();
|
|
6161
|
-
if (!
|
|
6157
|
+
if (!exports2.IDENTIFIER.test(s))
|
|
6162
6158
|
throw new Error("CodeGen: name must be a valid identifier");
|
|
6163
6159
|
this.str = s;
|
|
6164
6160
|
}
|
|
@@ -6172,7 +6168,7 @@ var require_code = __commonJS({
|
|
|
6172
6168
|
return { [this.str]: 1 };
|
|
6173
6169
|
}
|
|
6174
6170
|
};
|
|
6175
|
-
|
|
6171
|
+
exports2.Name = Name;
|
|
6176
6172
|
var _Code = class extends _CodeOrName {
|
|
6177
6173
|
constructor(code) {
|
|
6178
6174
|
super();
|
|
@@ -6200,8 +6196,8 @@ var require_code = __commonJS({
|
|
|
6200
6196
|
}, {});
|
|
6201
6197
|
}
|
|
6202
6198
|
};
|
|
6203
|
-
|
|
6204
|
-
|
|
6199
|
+
exports2._Code = _Code;
|
|
6200
|
+
exports2.nil = new _Code("");
|
|
6205
6201
|
function _(strs, ...args) {
|
|
6206
6202
|
const code = [strs[0]];
|
|
6207
6203
|
let i = 0;
|
|
@@ -6211,7 +6207,7 @@ var require_code = __commonJS({
|
|
|
6211
6207
|
}
|
|
6212
6208
|
return new _Code(code);
|
|
6213
6209
|
}
|
|
6214
|
-
|
|
6210
|
+
exports2._ = _;
|
|
6215
6211
|
var plus = new _Code("+");
|
|
6216
6212
|
function str(strs, ...args) {
|
|
6217
6213
|
const expr = [safeStringify(strs[0])];
|
|
@@ -6224,7 +6220,7 @@ var require_code = __commonJS({
|
|
|
6224
6220
|
optimize(expr);
|
|
6225
6221
|
return new _Code(expr);
|
|
6226
6222
|
}
|
|
6227
|
-
|
|
6223
|
+
exports2.str = str;
|
|
6228
6224
|
function addCodeArg(code, arg) {
|
|
6229
6225
|
if (arg instanceof _Code)
|
|
6230
6226
|
code.push(...arg._items);
|
|
@@ -6233,7 +6229,7 @@ var require_code = __commonJS({
|
|
|
6233
6229
|
else
|
|
6234
6230
|
code.push(interpolate(arg));
|
|
6235
6231
|
}
|
|
6236
|
-
|
|
6232
|
+
exports2.addCodeArg = addCodeArg;
|
|
6237
6233
|
function optimize(expr) {
|
|
6238
6234
|
let i = 1;
|
|
6239
6235
|
while (i < expr.length - 1) {
|
|
@@ -6269,42 +6265,42 @@ var require_code = __commonJS({
|
|
|
6269
6265
|
function strConcat(c1, c2) {
|
|
6270
6266
|
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
|
|
6271
6267
|
}
|
|
6272
|
-
|
|
6268
|
+
exports2.strConcat = strConcat;
|
|
6273
6269
|
function interpolate(x) {
|
|
6274
6270
|
return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x);
|
|
6275
6271
|
}
|
|
6276
6272
|
function stringify(x) {
|
|
6277
6273
|
return new _Code(safeStringify(x));
|
|
6278
6274
|
}
|
|
6279
|
-
|
|
6275
|
+
exports2.stringify = stringify;
|
|
6280
6276
|
function safeStringify(x) {
|
|
6281
6277
|
return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
6282
6278
|
}
|
|
6283
|
-
|
|
6279
|
+
exports2.safeStringify = safeStringify;
|
|
6284
6280
|
function getProperty(key) {
|
|
6285
|
-
return typeof key == "string" &&
|
|
6281
|
+
return typeof key == "string" && exports2.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
|
|
6286
6282
|
}
|
|
6287
|
-
|
|
6283
|
+
exports2.getProperty = getProperty;
|
|
6288
6284
|
function getEsmExportName(key) {
|
|
6289
|
-
if (typeof key == "string" &&
|
|
6285
|
+
if (typeof key == "string" && exports2.IDENTIFIER.test(key)) {
|
|
6290
6286
|
return new _Code(`${key}`);
|
|
6291
6287
|
}
|
|
6292
6288
|
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
|
|
6293
6289
|
}
|
|
6294
|
-
|
|
6290
|
+
exports2.getEsmExportName = getEsmExportName;
|
|
6295
6291
|
function regexpCode(rx) {
|
|
6296
6292
|
return new _Code(rx.toString());
|
|
6297
6293
|
}
|
|
6298
|
-
|
|
6294
|
+
exports2.regexpCode = regexpCode;
|
|
6299
6295
|
}
|
|
6300
6296
|
});
|
|
6301
6297
|
|
|
6302
6298
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
|
|
6303
6299
|
var require_scope = __commonJS({
|
|
6304
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(
|
|
6300
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
|
|
6305
6301
|
"use strict";
|
|
6306
|
-
Object.defineProperty(
|
|
6307
|
-
|
|
6302
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6303
|
+
exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.UsedValueState = void 0;
|
|
6308
6304
|
var code_1 = require_code();
|
|
6309
6305
|
var ValueError = class extends Error {
|
|
6310
6306
|
constructor(name) {
|
|
@@ -6316,8 +6312,8 @@ var require_scope = __commonJS({
|
|
|
6316
6312
|
(function(UsedValueState2) {
|
|
6317
6313
|
UsedValueState2[UsedValueState2["Started"] = 0] = "Started";
|
|
6318
6314
|
UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed";
|
|
6319
|
-
})(UsedValueState || (
|
|
6320
|
-
|
|
6315
|
+
})(UsedValueState || (exports2.UsedValueState = UsedValueState = {}));
|
|
6316
|
+
exports2.varKinds = {
|
|
6321
6317
|
const: new code_1.Name("const"),
|
|
6322
6318
|
let: new code_1.Name("let"),
|
|
6323
6319
|
var: new code_1.Name("var")
|
|
@@ -6346,7 +6342,7 @@ var require_scope = __commonJS({
|
|
|
6346
6342
|
return this._names[prefix] = { prefix, index: 0 };
|
|
6347
6343
|
}
|
|
6348
6344
|
};
|
|
6349
|
-
|
|
6345
|
+
exports2.Scope = Scope;
|
|
6350
6346
|
var ValueScopeName = class extends code_1.Name {
|
|
6351
6347
|
constructor(prefix, nameStr) {
|
|
6352
6348
|
super(nameStr);
|
|
@@ -6357,7 +6353,7 @@ var require_scope = __commonJS({
|
|
|
6357
6353
|
this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;
|
|
6358
6354
|
}
|
|
6359
6355
|
};
|
|
6360
|
-
|
|
6356
|
+
exports2.ValueScopeName = ValueScopeName;
|
|
6361
6357
|
var line = (0, code_1._)`\n`;
|
|
6362
6358
|
var ValueScope = class extends Scope {
|
|
6363
6359
|
constructor(opts) {
|
|
@@ -6427,7 +6423,7 @@ var require_scope = __commonJS({
|
|
|
6427
6423
|
nameSet.set(name, UsedValueState.Started);
|
|
6428
6424
|
let c = valueCode(name);
|
|
6429
6425
|
if (c) {
|
|
6430
|
-
const def = this.opts.es5 ?
|
|
6426
|
+
const def = this.opts.es5 ? exports2.varKinds.var : exports2.varKinds.const;
|
|
6431
6427
|
code = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;
|
|
6432
6428
|
} else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) {
|
|
6433
6429
|
code = (0, code_1._)`${code}${c}${this.opts._n}`;
|
|
@@ -6440,57 +6436,57 @@ var require_scope = __commonJS({
|
|
|
6440
6436
|
return code;
|
|
6441
6437
|
}
|
|
6442
6438
|
};
|
|
6443
|
-
|
|
6439
|
+
exports2.ValueScope = ValueScope;
|
|
6444
6440
|
}
|
|
6445
6441
|
});
|
|
6446
6442
|
|
|
6447
6443
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
|
|
6448
6444
|
var require_codegen = __commonJS({
|
|
6449
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(
|
|
6445
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
|
|
6450
6446
|
"use strict";
|
|
6451
|
-
Object.defineProperty(
|
|
6452
|
-
|
|
6447
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6448
|
+
exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0;
|
|
6453
6449
|
var code_1 = require_code();
|
|
6454
6450
|
var scope_1 = require_scope();
|
|
6455
6451
|
var code_2 = require_code();
|
|
6456
|
-
Object.defineProperty(
|
|
6452
|
+
Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
|
|
6457
6453
|
return code_2._;
|
|
6458
6454
|
} });
|
|
6459
|
-
Object.defineProperty(
|
|
6455
|
+
Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
|
|
6460
6456
|
return code_2.str;
|
|
6461
6457
|
} });
|
|
6462
|
-
Object.defineProperty(
|
|
6458
|
+
Object.defineProperty(exports2, "strConcat", { enumerable: true, get: function() {
|
|
6463
6459
|
return code_2.strConcat;
|
|
6464
6460
|
} });
|
|
6465
|
-
Object.defineProperty(
|
|
6461
|
+
Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
|
|
6466
6462
|
return code_2.nil;
|
|
6467
6463
|
} });
|
|
6468
|
-
Object.defineProperty(
|
|
6464
|
+
Object.defineProperty(exports2, "getProperty", { enumerable: true, get: function() {
|
|
6469
6465
|
return code_2.getProperty;
|
|
6470
6466
|
} });
|
|
6471
|
-
Object.defineProperty(
|
|
6467
|
+
Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
|
|
6472
6468
|
return code_2.stringify;
|
|
6473
6469
|
} });
|
|
6474
|
-
Object.defineProperty(
|
|
6470
|
+
Object.defineProperty(exports2, "regexpCode", { enumerable: true, get: function() {
|
|
6475
6471
|
return code_2.regexpCode;
|
|
6476
6472
|
} });
|
|
6477
|
-
Object.defineProperty(
|
|
6473
|
+
Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
|
|
6478
6474
|
return code_2.Name;
|
|
6479
6475
|
} });
|
|
6480
6476
|
var scope_2 = require_scope();
|
|
6481
|
-
Object.defineProperty(
|
|
6477
|
+
Object.defineProperty(exports2, "Scope", { enumerable: true, get: function() {
|
|
6482
6478
|
return scope_2.Scope;
|
|
6483
6479
|
} });
|
|
6484
|
-
Object.defineProperty(
|
|
6480
|
+
Object.defineProperty(exports2, "ValueScope", { enumerable: true, get: function() {
|
|
6485
6481
|
return scope_2.ValueScope;
|
|
6486
6482
|
} });
|
|
6487
|
-
Object.defineProperty(
|
|
6483
|
+
Object.defineProperty(exports2, "ValueScopeName", { enumerable: true, get: function() {
|
|
6488
6484
|
return scope_2.ValueScopeName;
|
|
6489
6485
|
} });
|
|
6490
|
-
Object.defineProperty(
|
|
6486
|
+
Object.defineProperty(exports2, "varKinds", { enumerable: true, get: function() {
|
|
6491
6487
|
return scope_2.varKinds;
|
|
6492
6488
|
} });
|
|
6493
|
-
|
|
6489
|
+
exports2.operators = {
|
|
6494
6490
|
GT: new code_1._Code(">"),
|
|
6495
6491
|
GTE: new code_1._Code(">="),
|
|
6496
6492
|
LT: new code_1._Code("<"),
|
|
@@ -6903,7 +6899,7 @@ var require_codegen = __commonJS({
|
|
|
6903
6899
|
}
|
|
6904
6900
|
// `+=` code
|
|
6905
6901
|
add(lhs, rhs) {
|
|
6906
|
-
return this._leafNode(new AssignOp(lhs,
|
|
6902
|
+
return this._leafNode(new AssignOp(lhs, exports2.operators.ADD, rhs));
|
|
6907
6903
|
}
|
|
6908
6904
|
// appends passed SafeExpr to code or executes Block
|
|
6909
6905
|
code(c) {
|
|
@@ -7103,7 +7099,7 @@ var require_codegen = __commonJS({
|
|
|
7103
7099
|
ns[ns.length - 1] = node;
|
|
7104
7100
|
}
|
|
7105
7101
|
};
|
|
7106
|
-
|
|
7102
|
+
exports2.CodeGen = CodeGen;
|
|
7107
7103
|
function addNames(names, from) {
|
|
7108
7104
|
for (const n in from)
|
|
7109
7105
|
names[n] = (names[n] || 0) + (from[n] || 0);
|
|
@@ -7144,17 +7140,17 @@ var require_codegen = __commonJS({
|
|
|
7144
7140
|
function not(x) {
|
|
7145
7141
|
return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
|
|
7146
7142
|
}
|
|
7147
|
-
|
|
7148
|
-
var andCode = mappend(
|
|
7143
|
+
exports2.not = not;
|
|
7144
|
+
var andCode = mappend(exports2.operators.AND);
|
|
7149
7145
|
function and(...args) {
|
|
7150
7146
|
return args.reduce(andCode);
|
|
7151
7147
|
}
|
|
7152
|
-
|
|
7153
|
-
var orCode = mappend(
|
|
7148
|
+
exports2.and = and;
|
|
7149
|
+
var orCode = mappend(exports2.operators.OR);
|
|
7154
7150
|
function or(...args) {
|
|
7155
7151
|
return args.reduce(orCode);
|
|
7156
7152
|
}
|
|
7157
|
-
|
|
7153
|
+
exports2.or = or;
|
|
7158
7154
|
function mappend(op) {
|
|
7159
7155
|
return (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;
|
|
7160
7156
|
}
|
|
@@ -7166,10 +7162,10 @@ var require_codegen = __commonJS({
|
|
|
7166
7162
|
|
|
7167
7163
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
|
|
7168
7164
|
var require_util = __commonJS({
|
|
7169
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(
|
|
7165
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(exports2) {
|
|
7170
7166
|
"use strict";
|
|
7171
|
-
Object.defineProperty(
|
|
7172
|
-
|
|
7167
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7168
|
+
exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.toHash = void 0;
|
|
7173
7169
|
var codegen_1 = require_codegen();
|
|
7174
7170
|
var code_1 = require_code();
|
|
7175
7171
|
function toHash(arr) {
|
|
@@ -7178,7 +7174,7 @@ var require_util = __commonJS({
|
|
|
7178
7174
|
hash[item] = true;
|
|
7179
7175
|
return hash;
|
|
7180
7176
|
}
|
|
7181
|
-
|
|
7177
|
+
exports2.toHash = toHash;
|
|
7182
7178
|
function alwaysValidSchema(it, schema) {
|
|
7183
7179
|
if (typeof schema == "boolean")
|
|
7184
7180
|
return schema;
|
|
@@ -7187,7 +7183,7 @@ var require_util = __commonJS({
|
|
|
7187
7183
|
checkUnknownRules(it, schema);
|
|
7188
7184
|
return !schemaHasRules(schema, it.self.RULES.all);
|
|
7189
7185
|
}
|
|
7190
|
-
|
|
7186
|
+
exports2.alwaysValidSchema = alwaysValidSchema;
|
|
7191
7187
|
function checkUnknownRules(it, schema = it.schema) {
|
|
7192
7188
|
const { opts, self } = it;
|
|
7193
7189
|
if (!opts.strictSchema)
|
|
@@ -7200,7 +7196,7 @@ var require_util = __commonJS({
|
|
|
7200
7196
|
checkStrictMode(it, `unknown keyword: "${key}"`);
|
|
7201
7197
|
}
|
|
7202
7198
|
}
|
|
7203
|
-
|
|
7199
|
+
exports2.checkUnknownRules = checkUnknownRules;
|
|
7204
7200
|
function schemaHasRules(schema, rules) {
|
|
7205
7201
|
if (typeof schema == "boolean")
|
|
7206
7202
|
return !schema;
|
|
@@ -7209,7 +7205,7 @@ var require_util = __commonJS({
|
|
|
7209
7205
|
return true;
|
|
7210
7206
|
return false;
|
|
7211
7207
|
}
|
|
7212
|
-
|
|
7208
|
+
exports2.schemaHasRules = schemaHasRules;
|
|
7213
7209
|
function schemaHasRulesButRef(schema, RULES) {
|
|
7214
7210
|
if (typeof schema == "boolean")
|
|
7215
7211
|
return !schema;
|
|
@@ -7218,7 +7214,7 @@ var require_util = __commonJS({
|
|
|
7218
7214
|
return true;
|
|
7219
7215
|
return false;
|
|
7220
7216
|
}
|
|
7221
|
-
|
|
7217
|
+
exports2.schemaHasRulesButRef = schemaHasRulesButRef;
|
|
7222
7218
|
function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
|
|
7223
7219
|
if (!$data) {
|
|
7224
7220
|
if (typeof schema == "number" || typeof schema == "boolean")
|
|
@@ -7228,25 +7224,25 @@ var require_util = __commonJS({
|
|
|
7228
7224
|
}
|
|
7229
7225
|
return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
|
|
7230
7226
|
}
|
|
7231
|
-
|
|
7227
|
+
exports2.schemaRefOrVal = schemaRefOrVal;
|
|
7232
7228
|
function unescapeFragment(str) {
|
|
7233
7229
|
return unescapeJsonPointer(decodeURIComponent(str));
|
|
7234
7230
|
}
|
|
7235
|
-
|
|
7231
|
+
exports2.unescapeFragment = unescapeFragment;
|
|
7236
7232
|
function escapeFragment(str) {
|
|
7237
7233
|
return encodeURIComponent(escapeJsonPointer(str));
|
|
7238
7234
|
}
|
|
7239
|
-
|
|
7235
|
+
exports2.escapeFragment = escapeFragment;
|
|
7240
7236
|
function escapeJsonPointer(str) {
|
|
7241
7237
|
if (typeof str == "number")
|
|
7242
7238
|
return `${str}`;
|
|
7243
7239
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
7244
7240
|
}
|
|
7245
|
-
|
|
7241
|
+
exports2.escapeJsonPointer = escapeJsonPointer;
|
|
7246
7242
|
function unescapeJsonPointer(str) {
|
|
7247
7243
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
7248
7244
|
}
|
|
7249
|
-
|
|
7245
|
+
exports2.unescapeJsonPointer = unescapeJsonPointer;
|
|
7250
7246
|
function eachItem(xs, f) {
|
|
7251
7247
|
if (Array.isArray(xs)) {
|
|
7252
7248
|
for (const x of xs)
|
|
@@ -7255,14 +7251,14 @@ var require_util = __commonJS({
|
|
|
7255
7251
|
f(xs);
|
|
7256
7252
|
}
|
|
7257
7253
|
}
|
|
7258
|
-
|
|
7254
|
+
exports2.eachItem = eachItem;
|
|
7259
7255
|
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues: mergeValues2, resultToName }) {
|
|
7260
7256
|
return (gen, from, to, toName) => {
|
|
7261
7257
|
const res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues2(from, to);
|
|
7262
7258
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
7263
7259
|
};
|
|
7264
7260
|
}
|
|
7265
|
-
|
|
7261
|
+
exports2.mergeEvaluated = {
|
|
7266
7262
|
props: makeMergeEvaluated({
|
|
7267
7263
|
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
7268
7264
|
gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
|
|
@@ -7293,11 +7289,11 @@ var require_util = __commonJS({
|
|
|
7293
7289
|
setEvaluated(gen, props, ps);
|
|
7294
7290
|
return props;
|
|
7295
7291
|
}
|
|
7296
|
-
|
|
7292
|
+
exports2.evaluatedPropsToName = evaluatedPropsToName;
|
|
7297
7293
|
function setEvaluated(gen, props, ps) {
|
|
7298
7294
|
Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
|
|
7299
7295
|
}
|
|
7300
|
-
|
|
7296
|
+
exports2.setEvaluated = setEvaluated;
|
|
7301
7297
|
var snippets = {};
|
|
7302
7298
|
function useFunc(gen, f) {
|
|
7303
7299
|
return gen.scopeValue("func", {
|
|
@@ -7305,12 +7301,12 @@ var require_util = __commonJS({
|
|
|
7305
7301
|
code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))
|
|
7306
7302
|
});
|
|
7307
7303
|
}
|
|
7308
|
-
|
|
7304
|
+
exports2.useFunc = useFunc;
|
|
7309
7305
|
var Type;
|
|
7310
7306
|
(function(Type2) {
|
|
7311
7307
|
Type2[Type2["Num"] = 0] = "Num";
|
|
7312
7308
|
Type2[Type2["Str"] = 1] = "Str";
|
|
7313
|
-
})(Type || (
|
|
7309
|
+
})(Type || (exports2.Type = Type = {}));
|
|
7314
7310
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
7315
7311
|
if (dataProp instanceof codegen_1.Name) {
|
|
7316
7312
|
const isNumber = dataPropType === Type.Num;
|
|
@@ -7318,7 +7314,7 @@ var require_util = __commonJS({
|
|
|
7318
7314
|
}
|
|
7319
7315
|
return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
|
|
7320
7316
|
}
|
|
7321
|
-
|
|
7317
|
+
exports2.getErrorPath = getErrorPath;
|
|
7322
7318
|
function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
|
|
7323
7319
|
if (!mode)
|
|
7324
7320
|
return;
|
|
@@ -7327,15 +7323,15 @@ var require_util = __commonJS({
|
|
|
7327
7323
|
throw new Error(msg);
|
|
7328
7324
|
it.self.logger.warn(msg);
|
|
7329
7325
|
}
|
|
7330
|
-
|
|
7326
|
+
exports2.checkStrictMode = checkStrictMode;
|
|
7331
7327
|
}
|
|
7332
7328
|
});
|
|
7333
7329
|
|
|
7334
7330
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
|
|
7335
7331
|
var require_names = __commonJS({
|
|
7336
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(
|
|
7332
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(exports2) {
|
|
7337
7333
|
"use strict";
|
|
7338
|
-
Object.defineProperty(
|
|
7334
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7339
7335
|
var codegen_1 = require_codegen();
|
|
7340
7336
|
var names = {
|
|
7341
7337
|
// validation function arguments
|
|
@@ -7366,26 +7362,26 @@ var require_names = __commonJS({
|
|
|
7366
7362
|
jsonLen: new codegen_1.Name("jsonLen"),
|
|
7367
7363
|
jsonPart: new codegen_1.Name("jsonPart")
|
|
7368
7364
|
};
|
|
7369
|
-
|
|
7365
|
+
exports2.default = names;
|
|
7370
7366
|
}
|
|
7371
7367
|
});
|
|
7372
7368
|
|
|
7373
7369
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
|
|
7374
7370
|
var require_errors = __commonJS({
|
|
7375
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(
|
|
7371
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(exports2) {
|
|
7376
7372
|
"use strict";
|
|
7377
|
-
Object.defineProperty(
|
|
7378
|
-
|
|
7373
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7374
|
+
exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0;
|
|
7379
7375
|
var codegen_1 = require_codegen();
|
|
7380
7376
|
var util_1 = require_util();
|
|
7381
7377
|
var names_1 = require_names();
|
|
7382
|
-
|
|
7378
|
+
exports2.keywordError = {
|
|
7383
7379
|
message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`
|
|
7384
7380
|
};
|
|
7385
|
-
|
|
7381
|
+
exports2.keyword$DataError = {
|
|
7386
7382
|
message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
|
|
7387
7383
|
};
|
|
7388
|
-
function reportError(cxt, error2 =
|
|
7384
|
+
function reportError(cxt, error2 = exports2.keywordError, errorPaths, overrideAllErrors) {
|
|
7389
7385
|
const { it } = cxt;
|
|
7390
7386
|
const { gen, compositeRule, allErrors } = it;
|
|
7391
7387
|
const errObj = errorObjectCode(cxt, error2, errorPaths);
|
|
@@ -7395,8 +7391,8 @@ var require_errors = __commonJS({
|
|
|
7395
7391
|
returnErrors(it, (0, codegen_1._)`[${errObj}]`);
|
|
7396
7392
|
}
|
|
7397
7393
|
}
|
|
7398
|
-
|
|
7399
|
-
function reportExtraError(cxt, error2 =
|
|
7394
|
+
exports2.reportError = reportError;
|
|
7395
|
+
function reportExtraError(cxt, error2 = exports2.keywordError, errorPaths) {
|
|
7400
7396
|
const { it } = cxt;
|
|
7401
7397
|
const { gen, compositeRule, allErrors } = it;
|
|
7402
7398
|
const errObj = errorObjectCode(cxt, error2, errorPaths);
|
|
@@ -7405,12 +7401,12 @@ var require_errors = __commonJS({
|
|
|
7405
7401
|
returnErrors(it, names_1.default.vErrors);
|
|
7406
7402
|
}
|
|
7407
7403
|
}
|
|
7408
|
-
|
|
7404
|
+
exports2.reportExtraError = reportExtraError;
|
|
7409
7405
|
function resetErrorsCount(gen, errsCount) {
|
|
7410
7406
|
gen.assign(names_1.default.errors, errsCount);
|
|
7411
7407
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
|
|
7412
7408
|
}
|
|
7413
|
-
|
|
7409
|
+
exports2.resetErrorsCount = resetErrorsCount;
|
|
7414
7410
|
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {
|
|
7415
7411
|
if (errsCount === void 0)
|
|
7416
7412
|
throw new Error("ajv implementation error");
|
|
@@ -7425,7 +7421,7 @@ var require_errors = __commonJS({
|
|
|
7425
7421
|
}
|
|
7426
7422
|
});
|
|
7427
7423
|
}
|
|
7428
|
-
|
|
7424
|
+
exports2.extendErrors = extendErrors;
|
|
7429
7425
|
function addError(gen, errObj) {
|
|
7430
7426
|
const err = gen.const("err", errObj);
|
|
7431
7427
|
gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);
|
|
@@ -7494,10 +7490,10 @@ var require_errors = __commonJS({
|
|
|
7494
7490
|
|
|
7495
7491
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
7496
7492
|
var require_boolSchema = __commonJS({
|
|
7497
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(
|
|
7493
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
|
|
7498
7494
|
"use strict";
|
|
7499
|
-
Object.defineProperty(
|
|
7500
|
-
|
|
7495
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7496
|
+
exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0;
|
|
7501
7497
|
var errors_1 = require_errors();
|
|
7502
7498
|
var codegen_1 = require_codegen();
|
|
7503
7499
|
var names_1 = require_names();
|
|
@@ -7515,7 +7511,7 @@ var require_boolSchema = __commonJS({
|
|
|
7515
7511
|
gen.return(true);
|
|
7516
7512
|
}
|
|
7517
7513
|
}
|
|
7518
|
-
|
|
7514
|
+
exports2.topBoolOrEmptySchema = topBoolOrEmptySchema;
|
|
7519
7515
|
function boolOrEmptySchema(it, valid) {
|
|
7520
7516
|
const { gen, schema } = it;
|
|
7521
7517
|
if (schema === false) {
|
|
@@ -7525,7 +7521,7 @@ var require_boolSchema = __commonJS({
|
|
|
7525
7521
|
gen.var(valid, true);
|
|
7526
7522
|
}
|
|
7527
7523
|
}
|
|
7528
|
-
|
|
7524
|
+
exports2.boolOrEmptySchema = boolOrEmptySchema;
|
|
7529
7525
|
function falseSchemaError(it, overrideAllErrors) {
|
|
7530
7526
|
const { gen, data } = it;
|
|
7531
7527
|
const cxt = {
|
|
@@ -7545,16 +7541,16 @@ var require_boolSchema = __commonJS({
|
|
|
7545
7541
|
|
|
7546
7542
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
|
|
7547
7543
|
var require_rules = __commonJS({
|
|
7548
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(
|
|
7544
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(exports2) {
|
|
7549
7545
|
"use strict";
|
|
7550
|
-
Object.defineProperty(
|
|
7551
|
-
|
|
7546
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7547
|
+
exports2.getRules = exports2.isJSONType = void 0;
|
|
7552
7548
|
var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
|
|
7553
7549
|
var jsonTypes = new Set(_jsonTypes);
|
|
7554
7550
|
function isJSONType(x) {
|
|
7555
7551
|
return typeof x == "string" && jsonTypes.has(x);
|
|
7556
7552
|
}
|
|
7557
|
-
|
|
7553
|
+
exports2.isJSONType = isJSONType;
|
|
7558
7554
|
function getRules() {
|
|
7559
7555
|
const groups = {
|
|
7560
7556
|
number: { type: "number", rules: [] },
|
|
@@ -7570,39 +7566,39 @@ var require_rules = __commonJS({
|
|
|
7570
7566
|
keywords: {}
|
|
7571
7567
|
};
|
|
7572
7568
|
}
|
|
7573
|
-
|
|
7569
|
+
exports2.getRules = getRules;
|
|
7574
7570
|
}
|
|
7575
7571
|
});
|
|
7576
7572
|
|
|
7577
7573
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
|
|
7578
7574
|
var require_applicability = __commonJS({
|
|
7579
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(
|
|
7575
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
|
|
7580
7576
|
"use strict";
|
|
7581
|
-
Object.defineProperty(
|
|
7582
|
-
|
|
7577
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7578
|
+
exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0;
|
|
7583
7579
|
function schemaHasRulesForType({ schema, self }, type) {
|
|
7584
7580
|
const group = self.RULES.types[type];
|
|
7585
7581
|
return group && group !== true && shouldUseGroup(schema, group);
|
|
7586
7582
|
}
|
|
7587
|
-
|
|
7583
|
+
exports2.schemaHasRulesForType = schemaHasRulesForType;
|
|
7588
7584
|
function shouldUseGroup(schema, group) {
|
|
7589
7585
|
return group.rules.some((rule) => shouldUseRule(schema, rule));
|
|
7590
7586
|
}
|
|
7591
|
-
|
|
7587
|
+
exports2.shouldUseGroup = shouldUseGroup;
|
|
7592
7588
|
function shouldUseRule(schema, rule) {
|
|
7593
7589
|
var _a;
|
|
7594
7590
|
return schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));
|
|
7595
7591
|
}
|
|
7596
|
-
|
|
7592
|
+
exports2.shouldUseRule = shouldUseRule;
|
|
7597
7593
|
}
|
|
7598
7594
|
});
|
|
7599
7595
|
|
|
7600
7596
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
|
|
7601
7597
|
var require_dataType = __commonJS({
|
|
7602
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(
|
|
7598
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
|
|
7603
7599
|
"use strict";
|
|
7604
|
-
Object.defineProperty(
|
|
7605
|
-
|
|
7600
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7601
|
+
exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0;
|
|
7606
7602
|
var rules_1 = require_rules();
|
|
7607
7603
|
var applicability_1 = require_applicability();
|
|
7608
7604
|
var errors_1 = require_errors();
|
|
@@ -7612,7 +7608,7 @@ var require_dataType = __commonJS({
|
|
|
7612
7608
|
(function(DataType2) {
|
|
7613
7609
|
DataType2[DataType2["Correct"] = 0] = "Correct";
|
|
7614
7610
|
DataType2[DataType2["Wrong"] = 1] = "Wrong";
|
|
7615
|
-
})(DataType || (
|
|
7611
|
+
})(DataType || (exports2.DataType = DataType = {}));
|
|
7616
7612
|
function getSchemaTypes(schema) {
|
|
7617
7613
|
const types2 = getJSONTypes(schema.type);
|
|
7618
7614
|
const hasNull = types2.includes("null");
|
|
@@ -7628,14 +7624,14 @@ var require_dataType = __commonJS({
|
|
|
7628
7624
|
}
|
|
7629
7625
|
return types2;
|
|
7630
7626
|
}
|
|
7631
|
-
|
|
7627
|
+
exports2.getSchemaTypes = getSchemaTypes;
|
|
7632
7628
|
function getJSONTypes(ts2) {
|
|
7633
7629
|
const types2 = Array.isArray(ts2) ? ts2 : ts2 ? [ts2] : [];
|
|
7634
7630
|
if (types2.every(rules_1.isJSONType))
|
|
7635
7631
|
return types2;
|
|
7636
7632
|
throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
|
|
7637
7633
|
}
|
|
7638
|
-
|
|
7634
|
+
exports2.getJSONTypes = getJSONTypes;
|
|
7639
7635
|
function coerceAndCheckDataType(it, types2) {
|
|
7640
7636
|
const { gen, data, opts } = it;
|
|
7641
7637
|
const coerceTo = coerceToTypes(types2, opts.coerceTypes);
|
|
@@ -7651,7 +7647,7 @@ var require_dataType = __commonJS({
|
|
|
7651
7647
|
}
|
|
7652
7648
|
return checkTypes;
|
|
7653
7649
|
}
|
|
7654
|
-
|
|
7650
|
+
exports2.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
7655
7651
|
var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
7656
7652
|
function coerceToTypes(types2, coerceTypes) {
|
|
7657
7653
|
return coerceTypes ? types2.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
@@ -7731,7 +7727,7 @@ var require_dataType = __commonJS({
|
|
|
7731
7727
|
return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
|
|
7732
7728
|
}
|
|
7733
7729
|
}
|
|
7734
|
-
|
|
7730
|
+
exports2.checkDataType = checkDataType;
|
|
7735
7731
|
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
7736
7732
|
if (dataTypes.length === 1) {
|
|
7737
7733
|
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
@@ -7753,7 +7749,7 @@ var require_dataType = __commonJS({
|
|
|
7753
7749
|
cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
|
|
7754
7750
|
return cond;
|
|
7755
7751
|
}
|
|
7756
|
-
|
|
7752
|
+
exports2.checkDataTypes = checkDataTypes;
|
|
7757
7753
|
var typeError = {
|
|
7758
7754
|
message: ({ schema }) => `must be ${schema}`,
|
|
7759
7755
|
params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
|
|
@@ -7762,7 +7758,7 @@ var require_dataType = __commonJS({
|
|
|
7762
7758
|
const cxt = getTypeErrorContext(it);
|
|
7763
7759
|
(0, errors_1.reportError)(cxt, typeError);
|
|
7764
7760
|
}
|
|
7765
|
-
|
|
7761
|
+
exports2.reportTypeError = reportTypeError;
|
|
7766
7762
|
function getTypeErrorContext(it) {
|
|
7767
7763
|
const { gen, data, schema } = it;
|
|
7768
7764
|
const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
|
|
@@ -7783,10 +7779,10 @@ var require_dataType = __commonJS({
|
|
|
7783
7779
|
|
|
7784
7780
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
|
|
7785
7781
|
var require_defaults = __commonJS({
|
|
7786
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(
|
|
7782
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
|
|
7787
7783
|
"use strict";
|
|
7788
|
-
Object.defineProperty(
|
|
7789
|
-
|
|
7784
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7785
|
+
exports2.assignDefaults = void 0;
|
|
7790
7786
|
var codegen_1 = require_codegen();
|
|
7791
7787
|
var util_1 = require_util();
|
|
7792
7788
|
function assignDefaults(it, ty) {
|
|
@@ -7799,7 +7795,7 @@ var require_defaults = __commonJS({
|
|
|
7799
7795
|
items.forEach((sch, i) => assignDefault(it, i, sch.default));
|
|
7800
7796
|
}
|
|
7801
7797
|
}
|
|
7802
|
-
|
|
7798
|
+
exports2.assignDefaults = assignDefaults;
|
|
7803
7799
|
function assignDefault(it, prop, defaultValue) {
|
|
7804
7800
|
const { gen, compositeRule, data, opts } = it;
|
|
7805
7801
|
if (defaultValue === void 0)
|
|
@@ -7820,10 +7816,10 @@ var require_defaults = __commonJS({
|
|
|
7820
7816
|
|
|
7821
7817
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
|
|
7822
7818
|
var require_code2 = __commonJS({
|
|
7823
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(
|
|
7819
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(exports2) {
|
|
7824
7820
|
"use strict";
|
|
7825
|
-
Object.defineProperty(
|
|
7826
|
-
|
|
7821
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7822
|
+
exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0;
|
|
7827
7823
|
var codegen_1 = require_codegen();
|
|
7828
7824
|
var util_1 = require_util();
|
|
7829
7825
|
var names_1 = require_names();
|
|
@@ -7835,16 +7831,16 @@ var require_code2 = __commonJS({
|
|
|
7835
7831
|
cxt.error();
|
|
7836
7832
|
});
|
|
7837
7833
|
}
|
|
7838
|
-
|
|
7834
|
+
exports2.checkReportMissingProp = checkReportMissingProp;
|
|
7839
7835
|
function checkMissingProp({ gen, data, it: { opts } }, properties, missing) {
|
|
7840
7836
|
return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));
|
|
7841
7837
|
}
|
|
7842
|
-
|
|
7838
|
+
exports2.checkMissingProp = checkMissingProp;
|
|
7843
7839
|
function reportMissingProp(cxt, missing) {
|
|
7844
7840
|
cxt.setParams({ missingProperty: missing }, true);
|
|
7845
7841
|
cxt.error();
|
|
7846
7842
|
}
|
|
7847
|
-
|
|
7843
|
+
exports2.reportMissingProp = reportMissingProp;
|
|
7848
7844
|
function hasPropFunc(gen) {
|
|
7849
7845
|
return gen.scopeValue("func", {
|
|
7850
7846
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -7852,29 +7848,29 @@ var require_code2 = __commonJS({
|
|
|
7852
7848
|
code: (0, codegen_1._)`Object.prototype.hasOwnProperty`
|
|
7853
7849
|
});
|
|
7854
7850
|
}
|
|
7855
|
-
|
|
7851
|
+
exports2.hasPropFunc = hasPropFunc;
|
|
7856
7852
|
function isOwnProperty(gen, data, property) {
|
|
7857
7853
|
return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;
|
|
7858
7854
|
}
|
|
7859
|
-
|
|
7855
|
+
exports2.isOwnProperty = isOwnProperty;
|
|
7860
7856
|
function propertyInData(gen, data, property, ownProperties) {
|
|
7861
7857
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;
|
|
7862
7858
|
return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;
|
|
7863
7859
|
}
|
|
7864
|
-
|
|
7860
|
+
exports2.propertyInData = propertyInData;
|
|
7865
7861
|
function noPropertyInData(gen, data, property, ownProperties) {
|
|
7866
7862
|
const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;
|
|
7867
7863
|
return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;
|
|
7868
7864
|
}
|
|
7869
|
-
|
|
7865
|
+
exports2.noPropertyInData = noPropertyInData;
|
|
7870
7866
|
function allSchemaProperties(schemaMap) {
|
|
7871
7867
|
return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
|
|
7872
7868
|
}
|
|
7873
|
-
|
|
7869
|
+
exports2.allSchemaProperties = allSchemaProperties;
|
|
7874
7870
|
function schemaProperties(it, schemaMap) {
|
|
7875
7871
|
return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
|
|
7876
7872
|
}
|
|
7877
|
-
|
|
7873
|
+
exports2.schemaProperties = schemaProperties;
|
|
7878
7874
|
function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
|
|
7879
7875
|
const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
|
|
7880
7876
|
const valCxt = [
|
|
@@ -7888,7 +7884,7 @@ var require_code2 = __commonJS({
|
|
|
7888
7884
|
const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
|
|
7889
7885
|
return context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;
|
|
7890
7886
|
}
|
|
7891
|
-
|
|
7887
|
+
exports2.callValidateCode = callValidateCode;
|
|
7892
7888
|
var newRegExp = (0, codegen_1._)`new RegExp`;
|
|
7893
7889
|
function usePattern({ gen, it: { opts } }, pattern) {
|
|
7894
7890
|
const u = opts.unicodeRegExp ? "u" : "";
|
|
@@ -7900,7 +7896,7 @@ var require_code2 = __commonJS({
|
|
|
7900
7896
|
code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
|
|
7901
7897
|
});
|
|
7902
7898
|
}
|
|
7903
|
-
|
|
7899
|
+
exports2.usePattern = usePattern;
|
|
7904
7900
|
function validateArray(cxt) {
|
|
7905
7901
|
const { gen, data, keyword, it } = cxt;
|
|
7906
7902
|
const valid = gen.name("valid");
|
|
@@ -7924,7 +7920,7 @@ var require_code2 = __commonJS({
|
|
|
7924
7920
|
});
|
|
7925
7921
|
}
|
|
7926
7922
|
}
|
|
7927
|
-
|
|
7923
|
+
exports2.validateArray = validateArray;
|
|
7928
7924
|
function validateUnion(cxt) {
|
|
7929
7925
|
const { gen, schema, keyword, it } = cxt;
|
|
7930
7926
|
if (!Array.isArray(schema))
|
|
@@ -7947,16 +7943,16 @@ var require_code2 = __commonJS({
|
|
|
7947
7943
|
}));
|
|
7948
7944
|
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
|
|
7949
7945
|
}
|
|
7950
|
-
|
|
7946
|
+
exports2.validateUnion = validateUnion;
|
|
7951
7947
|
}
|
|
7952
7948
|
});
|
|
7953
7949
|
|
|
7954
7950
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
|
|
7955
7951
|
var require_keyword = __commonJS({
|
|
7956
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(
|
|
7952
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
|
|
7957
7953
|
"use strict";
|
|
7958
|
-
Object.defineProperty(
|
|
7959
|
-
|
|
7954
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7955
|
+
exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0;
|
|
7960
7956
|
var codegen_1 = require_codegen();
|
|
7961
7957
|
var names_1 = require_names();
|
|
7962
7958
|
var code_1 = require_code2();
|
|
@@ -7977,7 +7973,7 @@ var require_keyword = __commonJS({
|
|
|
7977
7973
|
}, valid);
|
|
7978
7974
|
cxt.pass(valid, () => cxt.error(true));
|
|
7979
7975
|
}
|
|
7980
|
-
|
|
7976
|
+
exports2.macroKeywordCode = macroKeywordCode;
|
|
7981
7977
|
function funcKeywordCode(cxt, def) {
|
|
7982
7978
|
var _a;
|
|
7983
7979
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
@@ -8021,7 +8017,7 @@ var require_keyword = __commonJS({
|
|
|
8021
8017
|
gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors);
|
|
8022
8018
|
}
|
|
8023
8019
|
}
|
|
8024
|
-
|
|
8020
|
+
exports2.funcKeywordCode = funcKeywordCode;
|
|
8025
8021
|
function modifyData(cxt) {
|
|
8026
8022
|
const { gen, data, it } = cxt;
|
|
8027
8023
|
gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));
|
|
@@ -8045,7 +8041,7 @@ var require_keyword = __commonJS({
|
|
|
8045
8041
|
function validSchemaType(schema, schemaType, allowUndefined = false) {
|
|
8046
8042
|
return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema) : st === "object" ? schema && typeof schema == "object" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == "undefined");
|
|
8047
8043
|
}
|
|
8048
|
-
|
|
8044
|
+
exports2.validSchemaType = validSchemaType;
|
|
8049
8045
|
function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {
|
|
8050
8046
|
if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {
|
|
8051
8047
|
throw new Error("ajv implementation error");
|
|
@@ -8065,16 +8061,16 @@ var require_keyword = __commonJS({
|
|
|
8065
8061
|
}
|
|
8066
8062
|
}
|
|
8067
8063
|
}
|
|
8068
|
-
|
|
8064
|
+
exports2.validateKeywordUsage = validateKeywordUsage;
|
|
8069
8065
|
}
|
|
8070
8066
|
});
|
|
8071
8067
|
|
|
8072
8068
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
|
|
8073
8069
|
var require_subschema = __commonJS({
|
|
8074
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(
|
|
8070
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
|
|
8075
8071
|
"use strict";
|
|
8076
|
-
Object.defineProperty(
|
|
8077
|
-
|
|
8072
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8073
|
+
exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0;
|
|
8078
8074
|
var codegen_1 = require_codegen();
|
|
8079
8075
|
var util_1 = require_util();
|
|
8080
8076
|
function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {
|
|
@@ -8106,7 +8102,7 @@ var require_subschema = __commonJS({
|
|
|
8106
8102
|
}
|
|
8107
8103
|
throw new Error('either "keyword" or "schema" must be passed');
|
|
8108
8104
|
}
|
|
8109
|
-
|
|
8105
|
+
exports2.getSubschema = getSubschema;
|
|
8110
8106
|
function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
|
|
8111
8107
|
if (data !== void 0 && dataProp !== void 0) {
|
|
8112
8108
|
throw new Error('both "data" and "dataProp" passed, only one allowed');
|
|
@@ -8137,7 +8133,7 @@ var require_subschema = __commonJS({
|
|
|
8137
8133
|
subschema.dataNames = [...it.dataNames, _nextData];
|
|
8138
8134
|
}
|
|
8139
8135
|
}
|
|
8140
|
-
|
|
8136
|
+
exports2.extendSubschemaData = extendSubschemaData;
|
|
8141
8137
|
function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {
|
|
8142
8138
|
if (compositeRule !== void 0)
|
|
8143
8139
|
subschema.compositeRule = compositeRule;
|
|
@@ -8148,15 +8144,15 @@ var require_subschema = __commonJS({
|
|
|
8148
8144
|
subschema.jtdDiscriminator = jtdDiscriminator;
|
|
8149
8145
|
subschema.jtdMetadata = jtdMetadata;
|
|
8150
8146
|
}
|
|
8151
|
-
|
|
8147
|
+
exports2.extendSubschemaMode = extendSubschemaMode;
|
|
8152
8148
|
}
|
|
8153
8149
|
});
|
|
8154
8150
|
|
|
8155
8151
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
8156
8152
|
var require_fast_deep_equal = __commonJS({
|
|
8157
|
-
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(
|
|
8153
|
+
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) {
|
|
8158
8154
|
"use strict";
|
|
8159
|
-
|
|
8155
|
+
module2.exports = function equal(a, b) {
|
|
8160
8156
|
if (a === b) return true;
|
|
8161
8157
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
8162
8158
|
if (a.constructor !== b.constructor) return false;
|
|
@@ -8189,9 +8185,9 @@ var require_fast_deep_equal = __commonJS({
|
|
|
8189
8185
|
|
|
8190
8186
|
// ../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js
|
|
8191
8187
|
var require_json_schema_traverse = __commonJS({
|
|
8192
|
-
"../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(
|
|
8188
|
+
"../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports2, module2) {
|
|
8193
8189
|
"use strict";
|
|
8194
|
-
var traverse =
|
|
8190
|
+
var traverse = module2.exports = function(schema, opts, cb) {
|
|
8195
8191
|
if (typeof opts == "function") {
|
|
8196
8192
|
cb = opts;
|
|
8197
8193
|
opts = {};
|
|
@@ -8277,10 +8273,10 @@ var require_json_schema_traverse = __commonJS({
|
|
|
8277
8273
|
|
|
8278
8274
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
|
|
8279
8275
|
var require_resolve = __commonJS({
|
|
8280
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(
|
|
8276
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(exports2) {
|
|
8281
8277
|
"use strict";
|
|
8282
|
-
Object.defineProperty(
|
|
8283
|
-
|
|
8278
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8279
|
+
exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0;
|
|
8284
8280
|
var util_1 = require_util();
|
|
8285
8281
|
var equal = require_fast_deep_equal();
|
|
8286
8282
|
var traverse = require_json_schema_traverse();
|
|
@@ -8311,7 +8307,7 @@ var require_resolve = __commonJS({
|
|
|
8311
8307
|
return false;
|
|
8312
8308
|
return countKeys(schema) <= limit;
|
|
8313
8309
|
}
|
|
8314
|
-
|
|
8310
|
+
exports2.inlineRef = inlineRef;
|
|
8315
8311
|
var REF_KEYWORDS = /* @__PURE__ */ new Set([
|
|
8316
8312
|
"$ref",
|
|
8317
8313
|
"$recursiveRef",
|
|
@@ -8353,22 +8349,22 @@ var require_resolve = __commonJS({
|
|
|
8353
8349
|
const p = resolver.parse(id);
|
|
8354
8350
|
return _getFullPath(resolver, p);
|
|
8355
8351
|
}
|
|
8356
|
-
|
|
8352
|
+
exports2.getFullPath = getFullPath;
|
|
8357
8353
|
function _getFullPath(resolver, p) {
|
|
8358
8354
|
const serialized = resolver.serialize(p);
|
|
8359
8355
|
return serialized.split("#")[0] + "#";
|
|
8360
8356
|
}
|
|
8361
|
-
|
|
8357
|
+
exports2._getFullPath = _getFullPath;
|
|
8362
8358
|
var TRAILING_SLASH_HASH = /#\/?$/;
|
|
8363
8359
|
function normalizeId(id) {
|
|
8364
8360
|
return id ? id.replace(TRAILING_SLASH_HASH, "") : "";
|
|
8365
8361
|
}
|
|
8366
|
-
|
|
8362
|
+
exports2.normalizeId = normalizeId;
|
|
8367
8363
|
function resolveUrl(resolver, baseId, id) {
|
|
8368
8364
|
id = normalizeId(id);
|
|
8369
8365
|
return resolver.resolve(baseId, id);
|
|
8370
8366
|
}
|
|
8371
|
-
|
|
8367
|
+
exports2.resolveUrl = resolveUrl;
|
|
8372
8368
|
var ANCHOR = /^[a-z_][-a-z0-9._]*$/i;
|
|
8373
8369
|
function getSchemaRefs(schema, baseId) {
|
|
8374
8370
|
if (typeof schema == "boolean")
|
|
@@ -8427,16 +8423,16 @@ var require_resolve = __commonJS({
|
|
|
8427
8423
|
return new Error(`reference "${ref}" resolves to more than one schema`);
|
|
8428
8424
|
}
|
|
8429
8425
|
}
|
|
8430
|
-
|
|
8426
|
+
exports2.getSchemaRefs = getSchemaRefs;
|
|
8431
8427
|
}
|
|
8432
8428
|
});
|
|
8433
8429
|
|
|
8434
8430
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
|
|
8435
8431
|
var require_validate = __commonJS({
|
|
8436
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(
|
|
8432
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(exports2) {
|
|
8437
8433
|
"use strict";
|
|
8438
|
-
Object.defineProperty(
|
|
8439
|
-
|
|
8434
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8435
|
+
exports2.getData = exports2.KeywordCxt = exports2.validateFunctionCode = void 0;
|
|
8440
8436
|
var boolSchema_1 = require_boolSchema();
|
|
8441
8437
|
var dataType_1 = require_dataType();
|
|
8442
8438
|
var applicability_1 = require_applicability();
|
|
@@ -8459,7 +8455,7 @@ var require_validate = __commonJS({
|
|
|
8459
8455
|
}
|
|
8460
8456
|
validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
|
|
8461
8457
|
}
|
|
8462
|
-
|
|
8458
|
+
exports2.validateFunctionCode = validateFunctionCode;
|
|
8463
8459
|
function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
|
|
8464
8460
|
if (opts.code.es5) {
|
|
8465
8461
|
gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {
|
|
@@ -8880,7 +8876,7 @@ var require_validate = __commonJS({
|
|
|
8880
8876
|
}
|
|
8881
8877
|
}
|
|
8882
8878
|
};
|
|
8883
|
-
|
|
8879
|
+
exports2.KeywordCxt = KeywordCxt;
|
|
8884
8880
|
function keywordCode(it, keyword, def, ruleType) {
|
|
8885
8881
|
const cxt = new KeywordCxt(it, def, keyword);
|
|
8886
8882
|
if ("code" in def) {
|
|
@@ -8935,15 +8931,15 @@ var require_validate = __commonJS({
|
|
|
8935
8931
|
return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;
|
|
8936
8932
|
}
|
|
8937
8933
|
}
|
|
8938
|
-
|
|
8934
|
+
exports2.getData = getData;
|
|
8939
8935
|
}
|
|
8940
8936
|
});
|
|
8941
8937
|
|
|
8942
8938
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
|
|
8943
8939
|
var require_validation_error = __commonJS({
|
|
8944
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(
|
|
8940
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
|
|
8945
8941
|
"use strict";
|
|
8946
|
-
Object.defineProperty(
|
|
8942
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8947
8943
|
var ValidationError = class extends Error {
|
|
8948
8944
|
constructor(errors) {
|
|
8949
8945
|
super("validation failed");
|
|
@@ -8951,15 +8947,15 @@ var require_validation_error = __commonJS({
|
|
|
8951
8947
|
this.ajv = this.validation = true;
|
|
8952
8948
|
}
|
|
8953
8949
|
};
|
|
8954
|
-
|
|
8950
|
+
exports2.default = ValidationError;
|
|
8955
8951
|
}
|
|
8956
8952
|
});
|
|
8957
8953
|
|
|
8958
8954
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
|
|
8959
8955
|
var require_ref_error = __commonJS({
|
|
8960
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(
|
|
8956
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(exports2) {
|
|
8961
8957
|
"use strict";
|
|
8962
|
-
Object.defineProperty(
|
|
8958
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8963
8959
|
var resolve_1 = require_resolve();
|
|
8964
8960
|
var MissingRefError = class extends Error {
|
|
8965
8961
|
constructor(resolver, baseId, ref, msg) {
|
|
@@ -8968,16 +8964,16 @@ var require_ref_error = __commonJS({
|
|
|
8968
8964
|
this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));
|
|
8969
8965
|
}
|
|
8970
8966
|
};
|
|
8971
|
-
|
|
8967
|
+
exports2.default = MissingRefError;
|
|
8972
8968
|
}
|
|
8973
8969
|
});
|
|
8974
8970
|
|
|
8975
8971
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
|
|
8976
8972
|
var require_compile = __commonJS({
|
|
8977
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(
|
|
8973
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(exports2) {
|
|
8978
8974
|
"use strict";
|
|
8979
|
-
Object.defineProperty(
|
|
8980
|
-
|
|
8975
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8976
|
+
exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.SchemaEnv = void 0;
|
|
8981
8977
|
var codegen_1 = require_codegen();
|
|
8982
8978
|
var validation_error_1 = require_validation_error();
|
|
8983
8979
|
var names_1 = require_names();
|
|
@@ -9003,7 +8999,7 @@ var require_compile = __commonJS({
|
|
|
9003
8999
|
this.refs = {};
|
|
9004
9000
|
}
|
|
9005
9001
|
};
|
|
9006
|
-
|
|
9002
|
+
exports2.SchemaEnv = SchemaEnv;
|
|
9007
9003
|
function compileSchema(sch) {
|
|
9008
9004
|
const _sch = getCompilingSchema.call(this, sch);
|
|
9009
9005
|
if (_sch)
|
|
@@ -9089,14 +9085,14 @@ var require_compile = __commonJS({
|
|
|
9089
9085
|
this._compilations.delete(sch);
|
|
9090
9086
|
}
|
|
9091
9087
|
}
|
|
9092
|
-
|
|
9088
|
+
exports2.compileSchema = compileSchema;
|
|
9093
9089
|
function resolveRef(root, baseId, ref) {
|
|
9094
9090
|
var _a;
|
|
9095
9091
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
9096
9092
|
const schOrFunc = root.refs[ref];
|
|
9097
9093
|
if (schOrFunc)
|
|
9098
9094
|
return schOrFunc;
|
|
9099
|
-
let _sch =
|
|
9095
|
+
let _sch = resolve.call(this, root, ref);
|
|
9100
9096
|
if (_sch === void 0) {
|
|
9101
9097
|
const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
|
|
9102
9098
|
const { schemaId } = this.opts;
|
|
@@ -9107,7 +9103,7 @@ var require_compile = __commonJS({
|
|
|
9107
9103
|
return;
|
|
9108
9104
|
return root.refs[ref] = inlineOrCompile.call(this, _sch);
|
|
9109
9105
|
}
|
|
9110
|
-
|
|
9106
|
+
exports2.resolveRef = resolveRef;
|
|
9111
9107
|
function inlineOrCompile(sch) {
|
|
9112
9108
|
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
|
|
9113
9109
|
return sch.schema;
|
|
@@ -9119,11 +9115,11 @@ var require_compile = __commonJS({
|
|
|
9119
9115
|
return sch;
|
|
9120
9116
|
}
|
|
9121
9117
|
}
|
|
9122
|
-
|
|
9118
|
+
exports2.getCompilingSchema = getCompilingSchema;
|
|
9123
9119
|
function sameSchemaEnv(s1, s2) {
|
|
9124
9120
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
9125
9121
|
}
|
|
9126
|
-
function
|
|
9122
|
+
function resolve(root, ref) {
|
|
9127
9123
|
let sch;
|
|
9128
9124
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
9129
9125
|
ref = sch;
|
|
@@ -9158,7 +9154,7 @@ var require_compile = __commonJS({
|
|
|
9158
9154
|
}
|
|
9159
9155
|
return getJsonPointer.call(this, p, schOrRef);
|
|
9160
9156
|
}
|
|
9161
|
-
|
|
9157
|
+
exports2.resolveSchema = resolveSchema;
|
|
9162
9158
|
var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([
|
|
9163
9159
|
"properties",
|
|
9164
9160
|
"patternProperties",
|
|
@@ -9198,8 +9194,8 @@ var require_compile = __commonJS({
|
|
|
9198
9194
|
|
|
9199
9195
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
|
|
9200
9196
|
var require_data = __commonJS({
|
|
9201
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(
|
|
9202
|
-
|
|
9197
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(exports2, module2) {
|
|
9198
|
+
module2.exports = {
|
|
9203
9199
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
9204
9200
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
9205
9201
|
type: "object",
|
|
@@ -9217,7 +9213,7 @@ var require_data = __commonJS({
|
|
|
9217
9213
|
|
|
9218
9214
|
// ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
|
|
9219
9215
|
var require_utils = __commonJS({
|
|
9220
|
-
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(
|
|
9216
|
+
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(exports2, module2) {
|
|
9221
9217
|
"use strict";
|
|
9222
9218
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
9223
9219
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
@@ -9512,7 +9508,7 @@ var require_utils = __commonJS({
|
|
|
9512
9508
|
}
|
|
9513
9509
|
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
9514
9510
|
}
|
|
9515
|
-
|
|
9511
|
+
module2.exports = {
|
|
9516
9512
|
nonSimpleDomain,
|
|
9517
9513
|
recomposeAuthority,
|
|
9518
9514
|
reescapeHostDelimiters,
|
|
@@ -9530,7 +9526,7 @@ var require_utils = __commonJS({
|
|
|
9530
9526
|
|
|
9531
9527
|
// ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
|
|
9532
9528
|
var require_schemes = __commonJS({
|
|
9533
|
-
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(
|
|
9529
|
+
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(exports2, module2) {
|
|
9534
9530
|
"use strict";
|
|
9535
9531
|
var { isUUID } = require_utils();
|
|
9536
9532
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
@@ -9729,7 +9725,7 @@ var require_schemes = __commonJS({
|
|
|
9729
9725
|
scheme.toLowerCase()
|
|
9730
9726
|
]) || void 0;
|
|
9731
9727
|
}
|
|
9732
|
-
|
|
9728
|
+
module2.exports = {
|
|
9733
9729
|
wsIsSecure,
|
|
9734
9730
|
SCHEMES,
|
|
9735
9731
|
isValidSchemeName,
|
|
@@ -9740,7 +9736,7 @@ var require_schemes = __commonJS({
|
|
|
9740
9736
|
|
|
9741
9737
|
// ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
|
|
9742
9738
|
var require_fast_uri = __commonJS({
|
|
9743
|
-
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(
|
|
9739
|
+
"../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(exports2, module2) {
|
|
9744
9740
|
"use strict";
|
|
9745
9741
|
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
9746
9742
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
@@ -9754,7 +9750,7 @@ var require_fast_uri = __commonJS({
|
|
|
9754
9750
|
}
|
|
9755
9751
|
return uri;
|
|
9756
9752
|
}
|
|
9757
|
-
function
|
|
9753
|
+
function resolve(baseURI, relativeURI, options) {
|
|
9758
9754
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
9759
9755
|
const resolved = resolveComponent(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
9760
9756
|
schemelessOptions.skipEscape = true;
|
|
@@ -10012,56 +10008,56 @@ var require_fast_uri = __commonJS({
|
|
|
10012
10008
|
var fastUri = {
|
|
10013
10009
|
SCHEMES,
|
|
10014
10010
|
normalize,
|
|
10015
|
-
resolve
|
|
10011
|
+
resolve,
|
|
10016
10012
|
resolveComponent,
|
|
10017
10013
|
equal,
|
|
10018
10014
|
serialize,
|
|
10019
10015
|
parse: parse2
|
|
10020
10016
|
};
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10017
|
+
module2.exports = fastUri;
|
|
10018
|
+
module2.exports.default = fastUri;
|
|
10019
|
+
module2.exports.fastUri = fastUri;
|
|
10024
10020
|
}
|
|
10025
10021
|
});
|
|
10026
10022
|
|
|
10027
10023
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
|
|
10028
10024
|
var require_uri = __commonJS({
|
|
10029
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(
|
|
10025
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(exports2) {
|
|
10030
10026
|
"use strict";
|
|
10031
|
-
Object.defineProperty(
|
|
10027
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10032
10028
|
var uri = require_fast_uri();
|
|
10033
10029
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
10034
|
-
|
|
10030
|
+
exports2.default = uri;
|
|
10035
10031
|
}
|
|
10036
10032
|
});
|
|
10037
10033
|
|
|
10038
10034
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
|
|
10039
10035
|
var require_core = __commonJS({
|
|
10040
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(
|
|
10036
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(exports2) {
|
|
10041
10037
|
"use strict";
|
|
10042
|
-
Object.defineProperty(
|
|
10043
|
-
|
|
10038
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10039
|
+
exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0;
|
|
10044
10040
|
var validate_1 = require_validate();
|
|
10045
|
-
Object.defineProperty(
|
|
10041
|
+
Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() {
|
|
10046
10042
|
return validate_1.KeywordCxt;
|
|
10047
10043
|
} });
|
|
10048
10044
|
var codegen_1 = require_codegen();
|
|
10049
|
-
Object.defineProperty(
|
|
10045
|
+
Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
|
|
10050
10046
|
return codegen_1._;
|
|
10051
10047
|
} });
|
|
10052
|
-
Object.defineProperty(
|
|
10048
|
+
Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
|
|
10053
10049
|
return codegen_1.str;
|
|
10054
10050
|
} });
|
|
10055
|
-
Object.defineProperty(
|
|
10051
|
+
Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
|
|
10056
10052
|
return codegen_1.stringify;
|
|
10057
10053
|
} });
|
|
10058
|
-
Object.defineProperty(
|
|
10054
|
+
Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
|
|
10059
10055
|
return codegen_1.nil;
|
|
10060
10056
|
} });
|
|
10061
|
-
Object.defineProperty(
|
|
10057
|
+
Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
|
|
10062
10058
|
return codegen_1.Name;
|
|
10063
10059
|
} });
|
|
10064
|
-
Object.defineProperty(
|
|
10060
|
+
Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() {
|
|
10065
10061
|
return codegen_1.CodeGen;
|
|
10066
10062
|
} });
|
|
10067
10063
|
var validation_error_1 = require_validation_error();
|
|
@@ -10515,7 +10511,7 @@ var require_core = __commonJS({
|
|
|
10515
10511
|
};
|
|
10516
10512
|
Ajv.ValidationError = validation_error_1.default;
|
|
10517
10513
|
Ajv.MissingRefError = ref_error_1.default;
|
|
10518
|
-
|
|
10514
|
+
exports2.default = Ajv;
|
|
10519
10515
|
function checkOptions(checkOpts, options, msg, log3 = "error") {
|
|
10520
10516
|
for (const key in checkOpts) {
|
|
10521
10517
|
const opt = key;
|
|
@@ -10648,25 +10644,25 @@ var require_core = __commonJS({
|
|
|
10648
10644
|
|
|
10649
10645
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
|
|
10650
10646
|
var require_id = __commonJS({
|
|
10651
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(
|
|
10647
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
|
|
10652
10648
|
"use strict";
|
|
10653
|
-
Object.defineProperty(
|
|
10649
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10654
10650
|
var def = {
|
|
10655
10651
|
keyword: "id",
|
|
10656
10652
|
code() {
|
|
10657
10653
|
throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
|
|
10658
10654
|
}
|
|
10659
10655
|
};
|
|
10660
|
-
|
|
10656
|
+
exports2.default = def;
|
|
10661
10657
|
}
|
|
10662
10658
|
});
|
|
10663
10659
|
|
|
10664
10660
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
|
|
10665
10661
|
var require_ref = __commonJS({
|
|
10666
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(
|
|
10662
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
|
|
10667
10663
|
"use strict";
|
|
10668
|
-
Object.defineProperty(
|
|
10669
|
-
|
|
10664
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10665
|
+
exports2.callRef = exports2.getValidate = void 0;
|
|
10670
10666
|
var ref_error_1 = require_ref_error();
|
|
10671
10667
|
var code_1 = require_code2();
|
|
10672
10668
|
var codegen_1 = require_codegen();
|
|
@@ -10717,7 +10713,7 @@ var require_ref = __commonJS({
|
|
|
10717
10713
|
const { gen } = cxt;
|
|
10718
10714
|
return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
|
|
10719
10715
|
}
|
|
10720
|
-
|
|
10716
|
+
exports2.getValidate = getValidate;
|
|
10721
10717
|
function callRef(cxt, v, sch, $async) {
|
|
10722
10718
|
const { gen, it } = cxt;
|
|
10723
10719
|
const { allErrors, schemaEnv: env, opts } = it;
|
|
@@ -10778,16 +10774,16 @@ var require_ref = __commonJS({
|
|
|
10778
10774
|
}
|
|
10779
10775
|
}
|
|
10780
10776
|
}
|
|
10781
|
-
|
|
10782
|
-
|
|
10777
|
+
exports2.callRef = callRef;
|
|
10778
|
+
exports2.default = def;
|
|
10783
10779
|
}
|
|
10784
10780
|
});
|
|
10785
10781
|
|
|
10786
10782
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
|
|
10787
10783
|
var require_core2 = __commonJS({
|
|
10788
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(
|
|
10784
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
|
|
10789
10785
|
"use strict";
|
|
10790
|
-
Object.defineProperty(
|
|
10786
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10791
10787
|
var id_1 = require_id();
|
|
10792
10788
|
var ref_1 = require_ref();
|
|
10793
10789
|
var core = [
|
|
@@ -10800,15 +10796,15 @@ var require_core2 = __commonJS({
|
|
|
10800
10796
|
id_1.default,
|
|
10801
10797
|
ref_1.default
|
|
10802
10798
|
];
|
|
10803
|
-
|
|
10799
|
+
exports2.default = core;
|
|
10804
10800
|
}
|
|
10805
10801
|
});
|
|
10806
10802
|
|
|
10807
10803
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
10808
10804
|
var require_limitNumber = __commonJS({
|
|
10809
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(
|
|
10805
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
|
|
10810
10806
|
"use strict";
|
|
10811
|
-
Object.defineProperty(
|
|
10807
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10812
10808
|
var codegen_1 = require_codegen();
|
|
10813
10809
|
var ops = codegen_1.operators;
|
|
10814
10810
|
var KWDs = {
|
|
@@ -10832,15 +10828,15 @@ var require_limitNumber = __commonJS({
|
|
|
10832
10828
|
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
10833
10829
|
}
|
|
10834
10830
|
};
|
|
10835
|
-
|
|
10831
|
+
exports2.default = def;
|
|
10836
10832
|
}
|
|
10837
10833
|
});
|
|
10838
10834
|
|
|
10839
10835
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
10840
10836
|
var require_multipleOf = __commonJS({
|
|
10841
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(
|
|
10837
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
|
|
10842
10838
|
"use strict";
|
|
10843
|
-
Object.defineProperty(
|
|
10839
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10844
10840
|
var codegen_1 = require_codegen();
|
|
10845
10841
|
var error2 = {
|
|
10846
10842
|
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
@@ -10860,15 +10856,15 @@ var require_multipleOf = __commonJS({
|
|
|
10860
10856
|
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
|
|
10861
10857
|
}
|
|
10862
10858
|
};
|
|
10863
|
-
|
|
10859
|
+
exports2.default = def;
|
|
10864
10860
|
}
|
|
10865
10861
|
});
|
|
10866
10862
|
|
|
10867
10863
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
|
|
10868
10864
|
var require_ucs2length = __commonJS({
|
|
10869
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(
|
|
10865
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
|
|
10870
10866
|
"use strict";
|
|
10871
|
-
Object.defineProperty(
|
|
10867
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10872
10868
|
function ucs2length(str) {
|
|
10873
10869
|
const len = str.length;
|
|
10874
10870
|
let length = 0;
|
|
@@ -10885,16 +10881,16 @@ var require_ucs2length = __commonJS({
|
|
|
10885
10881
|
}
|
|
10886
10882
|
return length;
|
|
10887
10883
|
}
|
|
10888
|
-
|
|
10884
|
+
exports2.default = ucs2length;
|
|
10889
10885
|
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
10890
10886
|
}
|
|
10891
10887
|
});
|
|
10892
10888
|
|
|
10893
10889
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
10894
10890
|
var require_limitLength = __commonJS({
|
|
10895
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(
|
|
10891
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
|
|
10896
10892
|
"use strict";
|
|
10897
|
-
Object.defineProperty(
|
|
10893
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10898
10894
|
var codegen_1 = require_codegen();
|
|
10899
10895
|
var util_1 = require_util();
|
|
10900
10896
|
var ucs2length_1 = require_ucs2length();
|
|
@@ -10918,15 +10914,15 @@ var require_limitLength = __commonJS({
|
|
|
10918
10914
|
cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
|
|
10919
10915
|
}
|
|
10920
10916
|
};
|
|
10921
|
-
|
|
10917
|
+
exports2.default = def;
|
|
10922
10918
|
}
|
|
10923
10919
|
});
|
|
10924
10920
|
|
|
10925
10921
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
10926
10922
|
var require_pattern = __commonJS({
|
|
10927
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(
|
|
10923
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
|
|
10928
10924
|
"use strict";
|
|
10929
|
-
Object.defineProperty(
|
|
10925
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10930
10926
|
var code_1 = require_code2();
|
|
10931
10927
|
var util_1 = require_util();
|
|
10932
10928
|
var codegen_1 = require_codegen();
|
|
@@ -10955,15 +10951,15 @@ var require_pattern = __commonJS({
|
|
|
10955
10951
|
}
|
|
10956
10952
|
}
|
|
10957
10953
|
};
|
|
10958
|
-
|
|
10954
|
+
exports2.default = def;
|
|
10959
10955
|
}
|
|
10960
10956
|
});
|
|
10961
10957
|
|
|
10962
10958
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
10963
10959
|
var require_limitProperties = __commonJS({
|
|
10964
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(
|
|
10960
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
|
|
10965
10961
|
"use strict";
|
|
10966
|
-
Object.defineProperty(
|
|
10962
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10967
10963
|
var codegen_1 = require_codegen();
|
|
10968
10964
|
var error2 = {
|
|
10969
10965
|
message({ keyword, schemaCode }) {
|
|
@@ -10984,15 +10980,15 @@ var require_limitProperties = __commonJS({
|
|
|
10984
10980
|
cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
|
|
10985
10981
|
}
|
|
10986
10982
|
};
|
|
10987
|
-
|
|
10983
|
+
exports2.default = def;
|
|
10988
10984
|
}
|
|
10989
10985
|
});
|
|
10990
10986
|
|
|
10991
10987
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
|
|
10992
10988
|
var require_required = __commonJS({
|
|
10993
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(
|
|
10989
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
|
|
10994
10990
|
"use strict";
|
|
10995
|
-
Object.defineProperty(
|
|
10991
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
10996
10992
|
var code_1 = require_code2();
|
|
10997
10993
|
var codegen_1 = require_codegen();
|
|
10998
10994
|
var util_1 = require_util();
|
|
@@ -11066,15 +11062,15 @@ var require_required = __commonJS({
|
|
|
11066
11062
|
}
|
|
11067
11063
|
}
|
|
11068
11064
|
};
|
|
11069
|
-
|
|
11065
|
+
exports2.default = def;
|
|
11070
11066
|
}
|
|
11071
11067
|
});
|
|
11072
11068
|
|
|
11073
11069
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
11074
11070
|
var require_limitItems = __commonJS({
|
|
11075
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(
|
|
11071
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
|
|
11076
11072
|
"use strict";
|
|
11077
|
-
Object.defineProperty(
|
|
11073
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11078
11074
|
var codegen_1 = require_codegen();
|
|
11079
11075
|
var error2 = {
|
|
11080
11076
|
message({ keyword, schemaCode }) {
|
|
@@ -11095,26 +11091,26 @@ var require_limitItems = __commonJS({
|
|
|
11095
11091
|
cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
|
|
11096
11092
|
}
|
|
11097
11093
|
};
|
|
11098
|
-
|
|
11094
|
+
exports2.default = def;
|
|
11099
11095
|
}
|
|
11100
11096
|
});
|
|
11101
11097
|
|
|
11102
11098
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
|
|
11103
11099
|
var require_equal = __commonJS({
|
|
11104
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(
|
|
11100
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports2) {
|
|
11105
11101
|
"use strict";
|
|
11106
|
-
Object.defineProperty(
|
|
11102
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11107
11103
|
var equal = require_fast_deep_equal();
|
|
11108
11104
|
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
11109
|
-
|
|
11105
|
+
exports2.default = equal;
|
|
11110
11106
|
}
|
|
11111
11107
|
});
|
|
11112
11108
|
|
|
11113
11109
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
11114
11110
|
var require_uniqueItems = __commonJS({
|
|
11115
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(
|
|
11111
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
|
|
11116
11112
|
"use strict";
|
|
11117
|
-
Object.defineProperty(
|
|
11113
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11118
11114
|
var dataType_1 = require_dataType();
|
|
11119
11115
|
var codegen_1 = require_codegen();
|
|
11120
11116
|
var util_1 = require_util();
|
|
@@ -11173,15 +11169,15 @@ var require_uniqueItems = __commonJS({
|
|
|
11173
11169
|
}
|
|
11174
11170
|
}
|
|
11175
11171
|
};
|
|
11176
|
-
|
|
11172
|
+
exports2.default = def;
|
|
11177
11173
|
}
|
|
11178
11174
|
});
|
|
11179
11175
|
|
|
11180
11176
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
|
|
11181
11177
|
var require_const = __commonJS({
|
|
11182
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(
|
|
11178
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
|
|
11183
11179
|
"use strict";
|
|
11184
|
-
Object.defineProperty(
|
|
11180
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11185
11181
|
var codegen_1 = require_codegen();
|
|
11186
11182
|
var util_1 = require_util();
|
|
11187
11183
|
var equal_1 = require_equal();
|
|
@@ -11202,15 +11198,15 @@ var require_const = __commonJS({
|
|
|
11202
11198
|
}
|
|
11203
11199
|
}
|
|
11204
11200
|
};
|
|
11205
|
-
|
|
11201
|
+
exports2.default = def;
|
|
11206
11202
|
}
|
|
11207
11203
|
});
|
|
11208
11204
|
|
|
11209
11205
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
11210
11206
|
var require_enum = __commonJS({
|
|
11211
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(
|
|
11207
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
|
|
11212
11208
|
"use strict";
|
|
11213
|
-
Object.defineProperty(
|
|
11209
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11214
11210
|
var codegen_1 = require_codegen();
|
|
11215
11211
|
var util_1 = require_util();
|
|
11216
11212
|
var equal_1 = require_equal();
|
|
@@ -11251,15 +11247,15 @@ var require_enum = __commonJS({
|
|
|
11251
11247
|
}
|
|
11252
11248
|
}
|
|
11253
11249
|
};
|
|
11254
|
-
|
|
11250
|
+
exports2.default = def;
|
|
11255
11251
|
}
|
|
11256
11252
|
});
|
|
11257
11253
|
|
|
11258
11254
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
11259
11255
|
var require_validation = __commonJS({
|
|
11260
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(
|
|
11256
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
|
|
11261
11257
|
"use strict";
|
|
11262
|
-
Object.defineProperty(
|
|
11258
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11263
11259
|
var limitNumber_1 = require_limitNumber();
|
|
11264
11260
|
var multipleOf_1 = require_multipleOf();
|
|
11265
11261
|
var limitLength_1 = require_limitLength();
|
|
@@ -11289,16 +11285,16 @@ var require_validation = __commonJS({
|
|
|
11289
11285
|
const_1.default,
|
|
11290
11286
|
enum_1.default
|
|
11291
11287
|
];
|
|
11292
|
-
|
|
11288
|
+
exports2.default = validation;
|
|
11293
11289
|
}
|
|
11294
11290
|
});
|
|
11295
11291
|
|
|
11296
11292
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
11297
11293
|
var require_additionalItems = __commonJS({
|
|
11298
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(
|
|
11294
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
|
|
11299
11295
|
"use strict";
|
|
11300
|
-
Object.defineProperty(
|
|
11301
|
-
|
|
11296
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11297
|
+
exports2.validateAdditionalItems = void 0;
|
|
11302
11298
|
var codegen_1 = require_codegen();
|
|
11303
11299
|
var util_1 = require_util();
|
|
11304
11300
|
var error2 = {
|
|
@@ -11341,17 +11337,17 @@ var require_additionalItems = __commonJS({
|
|
|
11341
11337
|
});
|
|
11342
11338
|
}
|
|
11343
11339
|
}
|
|
11344
|
-
|
|
11345
|
-
|
|
11340
|
+
exports2.validateAdditionalItems = validateAdditionalItems;
|
|
11341
|
+
exports2.default = def;
|
|
11346
11342
|
}
|
|
11347
11343
|
});
|
|
11348
11344
|
|
|
11349
11345
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
11350
11346
|
var require_items = __commonJS({
|
|
11351
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(
|
|
11347
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
|
|
11352
11348
|
"use strict";
|
|
11353
|
-
Object.defineProperty(
|
|
11354
|
-
|
|
11349
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11350
|
+
exports2.validateTuple = void 0;
|
|
11355
11351
|
var codegen_1 = require_codegen();
|
|
11356
11352
|
var util_1 = require_util();
|
|
11357
11353
|
var code_1 = require_code2();
|
|
@@ -11398,16 +11394,16 @@ var require_items = __commonJS({
|
|
|
11398
11394
|
}
|
|
11399
11395
|
}
|
|
11400
11396
|
}
|
|
11401
|
-
|
|
11402
|
-
|
|
11397
|
+
exports2.validateTuple = validateTuple;
|
|
11398
|
+
exports2.default = def;
|
|
11403
11399
|
}
|
|
11404
11400
|
});
|
|
11405
11401
|
|
|
11406
11402
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
11407
11403
|
var require_prefixItems = __commonJS({
|
|
11408
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(
|
|
11404
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
|
|
11409
11405
|
"use strict";
|
|
11410
|
-
Object.defineProperty(
|
|
11406
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11411
11407
|
var items_1 = require_items();
|
|
11412
11408
|
var def = {
|
|
11413
11409
|
keyword: "prefixItems",
|
|
@@ -11416,15 +11412,15 @@ var require_prefixItems = __commonJS({
|
|
|
11416
11412
|
before: "uniqueItems",
|
|
11417
11413
|
code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
|
|
11418
11414
|
};
|
|
11419
|
-
|
|
11415
|
+
exports2.default = def;
|
|
11420
11416
|
}
|
|
11421
11417
|
});
|
|
11422
11418
|
|
|
11423
11419
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
11424
11420
|
var require_items2020 = __commonJS({
|
|
11425
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(
|
|
11421
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
|
|
11426
11422
|
"use strict";
|
|
11427
|
-
Object.defineProperty(
|
|
11423
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11428
11424
|
var codegen_1 = require_codegen();
|
|
11429
11425
|
var util_1 = require_util();
|
|
11430
11426
|
var code_1 = require_code2();
|
|
@@ -11451,15 +11447,15 @@ var require_items2020 = __commonJS({
|
|
|
11451
11447
|
cxt.ok((0, code_1.validateArray)(cxt));
|
|
11452
11448
|
}
|
|
11453
11449
|
};
|
|
11454
|
-
|
|
11450
|
+
exports2.default = def;
|
|
11455
11451
|
}
|
|
11456
11452
|
});
|
|
11457
11453
|
|
|
11458
11454
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
11459
11455
|
var require_contains = __commonJS({
|
|
11460
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(
|
|
11456
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
|
|
11461
11457
|
"use strict";
|
|
11462
|
-
Object.defineProperty(
|
|
11458
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11463
11459
|
var codegen_1 = require_codegen();
|
|
11464
11460
|
var util_1 = require_util();
|
|
11465
11461
|
var error2 = {
|
|
@@ -11545,20 +11541,20 @@ var require_contains = __commonJS({
|
|
|
11545
11541
|
}
|
|
11546
11542
|
}
|
|
11547
11543
|
};
|
|
11548
|
-
|
|
11544
|
+
exports2.default = def;
|
|
11549
11545
|
}
|
|
11550
11546
|
});
|
|
11551
11547
|
|
|
11552
11548
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
11553
11549
|
var require_dependencies = __commonJS({
|
|
11554
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(
|
|
11550
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
|
|
11555
11551
|
"use strict";
|
|
11556
|
-
Object.defineProperty(
|
|
11557
|
-
|
|
11552
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11553
|
+
exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0;
|
|
11558
11554
|
var codegen_1 = require_codegen();
|
|
11559
11555
|
var util_1 = require_util();
|
|
11560
11556
|
var code_1 = require_code2();
|
|
11561
|
-
|
|
11557
|
+
exports2.error = {
|
|
11562
11558
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
11563
11559
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
11564
11560
|
return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -11573,7 +11569,7 @@ var require_dependencies = __commonJS({
|
|
|
11573
11569
|
keyword: "dependencies",
|
|
11574
11570
|
type: "object",
|
|
11575
11571
|
schemaType: "object",
|
|
11576
|
-
error:
|
|
11572
|
+
error: exports2.error,
|
|
11577
11573
|
code(cxt) {
|
|
11578
11574
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
11579
11575
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -11619,7 +11615,7 @@ var require_dependencies = __commonJS({
|
|
|
11619
11615
|
}
|
|
11620
11616
|
}
|
|
11621
11617
|
}
|
|
11622
|
-
|
|
11618
|
+
exports2.validatePropertyDeps = validatePropertyDeps;
|
|
11623
11619
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
11624
11620
|
const { gen, data, keyword, it } = cxt;
|
|
11625
11621
|
const valid = gen.name("valid");
|
|
@@ -11638,16 +11634,16 @@ var require_dependencies = __commonJS({
|
|
|
11638
11634
|
cxt.ok(valid);
|
|
11639
11635
|
}
|
|
11640
11636
|
}
|
|
11641
|
-
|
|
11642
|
-
|
|
11637
|
+
exports2.validateSchemaDeps = validateSchemaDeps;
|
|
11638
|
+
exports2.default = def;
|
|
11643
11639
|
}
|
|
11644
11640
|
});
|
|
11645
11641
|
|
|
11646
11642
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
11647
11643
|
var require_propertyNames = __commonJS({
|
|
11648
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(
|
|
11644
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
|
|
11649
11645
|
"use strict";
|
|
11650
|
-
Object.defineProperty(
|
|
11646
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11651
11647
|
var codegen_1 = require_codegen();
|
|
11652
11648
|
var util_1 = require_util();
|
|
11653
11649
|
var error2 = {
|
|
@@ -11682,15 +11678,15 @@ var require_propertyNames = __commonJS({
|
|
|
11682
11678
|
cxt.ok(valid);
|
|
11683
11679
|
}
|
|
11684
11680
|
};
|
|
11685
|
-
|
|
11681
|
+
exports2.default = def;
|
|
11686
11682
|
}
|
|
11687
11683
|
});
|
|
11688
11684
|
|
|
11689
11685
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
11690
11686
|
var require_additionalProperties = __commonJS({
|
|
11691
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(
|
|
11687
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
|
|
11692
11688
|
"use strict";
|
|
11693
|
-
Object.defineProperty(
|
|
11689
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11694
11690
|
var code_1 = require_code2();
|
|
11695
11691
|
var codegen_1 = require_codegen();
|
|
11696
11692
|
var names_1 = require_names();
|
|
@@ -11788,15 +11784,15 @@ var require_additionalProperties = __commonJS({
|
|
|
11788
11784
|
}
|
|
11789
11785
|
}
|
|
11790
11786
|
};
|
|
11791
|
-
|
|
11787
|
+
exports2.default = def;
|
|
11792
11788
|
}
|
|
11793
11789
|
});
|
|
11794
11790
|
|
|
11795
11791
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
11796
11792
|
var require_properties = __commonJS({
|
|
11797
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(
|
|
11793
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
|
|
11798
11794
|
"use strict";
|
|
11799
|
-
Object.defineProperty(
|
|
11795
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11800
11796
|
var validate_1 = require_validate();
|
|
11801
11797
|
var code_1 = require_code2();
|
|
11802
11798
|
var util_1 = require_util();
|
|
@@ -11846,15 +11842,15 @@ var require_properties = __commonJS({
|
|
|
11846
11842
|
}
|
|
11847
11843
|
}
|
|
11848
11844
|
};
|
|
11849
|
-
|
|
11845
|
+
exports2.default = def;
|
|
11850
11846
|
}
|
|
11851
11847
|
});
|
|
11852
11848
|
|
|
11853
11849
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
11854
11850
|
var require_patternProperties = __commonJS({
|
|
11855
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(
|
|
11851
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
|
|
11856
11852
|
"use strict";
|
|
11857
|
-
Object.defineProperty(
|
|
11853
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11858
11854
|
var code_1 = require_code2();
|
|
11859
11855
|
var codegen_1 = require_codegen();
|
|
11860
11856
|
var util_1 = require_util();
|
|
@@ -11920,15 +11916,15 @@ var require_patternProperties = __commonJS({
|
|
|
11920
11916
|
}
|
|
11921
11917
|
}
|
|
11922
11918
|
};
|
|
11923
|
-
|
|
11919
|
+
exports2.default = def;
|
|
11924
11920
|
}
|
|
11925
11921
|
});
|
|
11926
11922
|
|
|
11927
11923
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
11928
11924
|
var require_not = __commonJS({
|
|
11929
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(
|
|
11925
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
|
|
11930
11926
|
"use strict";
|
|
11931
|
-
Object.defineProperty(
|
|
11927
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11932
11928
|
var util_1 = require_util();
|
|
11933
11929
|
var def = {
|
|
11934
11930
|
keyword: "not",
|
|
@@ -11951,15 +11947,15 @@ var require_not = __commonJS({
|
|
|
11951
11947
|
},
|
|
11952
11948
|
error: { message: "must NOT be valid" }
|
|
11953
11949
|
};
|
|
11954
|
-
|
|
11950
|
+
exports2.default = def;
|
|
11955
11951
|
}
|
|
11956
11952
|
});
|
|
11957
11953
|
|
|
11958
11954
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
11959
11955
|
var require_anyOf = __commonJS({
|
|
11960
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(
|
|
11956
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
|
|
11961
11957
|
"use strict";
|
|
11962
|
-
Object.defineProperty(
|
|
11958
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11963
11959
|
var code_1 = require_code2();
|
|
11964
11960
|
var def = {
|
|
11965
11961
|
keyword: "anyOf",
|
|
@@ -11968,15 +11964,15 @@ var require_anyOf = __commonJS({
|
|
|
11968
11964
|
code: code_1.validateUnion,
|
|
11969
11965
|
error: { message: "must match a schema in anyOf" }
|
|
11970
11966
|
};
|
|
11971
|
-
|
|
11967
|
+
exports2.default = def;
|
|
11972
11968
|
}
|
|
11973
11969
|
});
|
|
11974
11970
|
|
|
11975
11971
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
11976
11972
|
var require_oneOf = __commonJS({
|
|
11977
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(
|
|
11973
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
|
|
11978
11974
|
"use strict";
|
|
11979
|
-
Object.defineProperty(
|
|
11975
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11980
11976
|
var codegen_1 = require_codegen();
|
|
11981
11977
|
var util_1 = require_util();
|
|
11982
11978
|
var error2 = {
|
|
@@ -12026,15 +12022,15 @@ var require_oneOf = __commonJS({
|
|
|
12026
12022
|
}
|
|
12027
12023
|
}
|
|
12028
12024
|
};
|
|
12029
|
-
|
|
12025
|
+
exports2.default = def;
|
|
12030
12026
|
}
|
|
12031
12027
|
});
|
|
12032
12028
|
|
|
12033
12029
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
12034
12030
|
var require_allOf = __commonJS({
|
|
12035
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(
|
|
12031
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
|
|
12036
12032
|
"use strict";
|
|
12037
|
-
Object.defineProperty(
|
|
12033
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12038
12034
|
var util_1 = require_util();
|
|
12039
12035
|
var def = {
|
|
12040
12036
|
keyword: "allOf",
|
|
@@ -12053,15 +12049,15 @@ var require_allOf = __commonJS({
|
|
|
12053
12049
|
});
|
|
12054
12050
|
}
|
|
12055
12051
|
};
|
|
12056
|
-
|
|
12052
|
+
exports2.default = def;
|
|
12057
12053
|
}
|
|
12058
12054
|
});
|
|
12059
12055
|
|
|
12060
12056
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
12061
12057
|
var require_if = __commonJS({
|
|
12062
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(
|
|
12058
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
|
|
12063
12059
|
"use strict";
|
|
12064
|
-
Object.defineProperty(
|
|
12060
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12065
12061
|
var codegen_1 = require_codegen();
|
|
12066
12062
|
var util_1 = require_util();
|
|
12067
12063
|
var error2 = {
|
|
@@ -12122,15 +12118,15 @@ var require_if = __commonJS({
|
|
|
12122
12118
|
const schema = it.schema[keyword];
|
|
12123
12119
|
return schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);
|
|
12124
12120
|
}
|
|
12125
|
-
|
|
12121
|
+
exports2.default = def;
|
|
12126
12122
|
}
|
|
12127
12123
|
});
|
|
12128
12124
|
|
|
12129
12125
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
12130
12126
|
var require_thenElse = __commonJS({
|
|
12131
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(
|
|
12127
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
|
|
12132
12128
|
"use strict";
|
|
12133
|
-
Object.defineProperty(
|
|
12129
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12134
12130
|
var util_1 = require_util();
|
|
12135
12131
|
var def = {
|
|
12136
12132
|
keyword: ["then", "else"],
|
|
@@ -12140,15 +12136,15 @@ var require_thenElse = __commonJS({
|
|
|
12140
12136
|
(0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`);
|
|
12141
12137
|
}
|
|
12142
12138
|
};
|
|
12143
|
-
|
|
12139
|
+
exports2.default = def;
|
|
12144
12140
|
}
|
|
12145
12141
|
});
|
|
12146
12142
|
|
|
12147
12143
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
12148
12144
|
var require_applicator = __commonJS({
|
|
12149
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(
|
|
12145
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
|
|
12150
12146
|
"use strict";
|
|
12151
|
-
Object.defineProperty(
|
|
12147
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12152
12148
|
var additionalItems_1 = require_additionalItems();
|
|
12153
12149
|
var prefixItems_1 = require_prefixItems();
|
|
12154
12150
|
var items_1 = require_items();
|
|
@@ -12188,15 +12184,15 @@ var require_applicator = __commonJS({
|
|
|
12188
12184
|
applicator.push(contains_1.default);
|
|
12189
12185
|
return applicator;
|
|
12190
12186
|
}
|
|
12191
|
-
|
|
12187
|
+
exports2.default = getApplicator;
|
|
12192
12188
|
}
|
|
12193
12189
|
});
|
|
12194
12190
|
|
|
12195
12191
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
12196
12192
|
var require_format = __commonJS({
|
|
12197
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(
|
|
12193
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
|
|
12198
12194
|
"use strict";
|
|
12199
|
-
Object.defineProperty(
|
|
12195
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12200
12196
|
var codegen_1 = require_codegen();
|
|
12201
12197
|
var error2 = {
|
|
12202
12198
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
@@ -12278,28 +12274,28 @@ var require_format = __commonJS({
|
|
|
12278
12274
|
}
|
|
12279
12275
|
}
|
|
12280
12276
|
};
|
|
12281
|
-
|
|
12277
|
+
exports2.default = def;
|
|
12282
12278
|
}
|
|
12283
12279
|
});
|
|
12284
12280
|
|
|
12285
12281
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
|
|
12286
12282
|
var require_format2 = __commonJS({
|
|
12287
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(
|
|
12283
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
|
|
12288
12284
|
"use strict";
|
|
12289
|
-
Object.defineProperty(
|
|
12285
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12290
12286
|
var format_1 = require_format();
|
|
12291
12287
|
var format = [format_1.default];
|
|
12292
|
-
|
|
12288
|
+
exports2.default = format;
|
|
12293
12289
|
}
|
|
12294
12290
|
});
|
|
12295
12291
|
|
|
12296
12292
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
|
|
12297
12293
|
var require_metadata = __commonJS({
|
|
12298
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(
|
|
12294
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
|
|
12299
12295
|
"use strict";
|
|
12300
|
-
Object.defineProperty(
|
|
12301
|
-
|
|
12302
|
-
|
|
12296
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12297
|
+
exports2.contentVocabulary = exports2.metadataVocabulary = void 0;
|
|
12298
|
+
exports2.metadataVocabulary = [
|
|
12303
12299
|
"title",
|
|
12304
12300
|
"description",
|
|
12305
12301
|
"default",
|
|
@@ -12308,7 +12304,7 @@ var require_metadata = __commonJS({
|
|
|
12308
12304
|
"writeOnly",
|
|
12309
12305
|
"examples"
|
|
12310
12306
|
];
|
|
12311
|
-
|
|
12307
|
+
exports2.contentVocabulary = [
|
|
12312
12308
|
"contentMediaType",
|
|
12313
12309
|
"contentEncoding",
|
|
12314
12310
|
"contentSchema"
|
|
@@ -12318,9 +12314,9 @@ var require_metadata = __commonJS({
|
|
|
12318
12314
|
|
|
12319
12315
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
|
|
12320
12316
|
var require_draft7 = __commonJS({
|
|
12321
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(
|
|
12317
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports2) {
|
|
12322
12318
|
"use strict";
|
|
12323
|
-
Object.defineProperty(
|
|
12319
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12324
12320
|
var core_1 = require_core2();
|
|
12325
12321
|
var validation_1 = require_validation();
|
|
12326
12322
|
var applicator_1 = require_applicator();
|
|
@@ -12334,29 +12330,29 @@ var require_draft7 = __commonJS({
|
|
|
12334
12330
|
metadata_1.metadataVocabulary,
|
|
12335
12331
|
metadata_1.contentVocabulary
|
|
12336
12332
|
];
|
|
12337
|
-
|
|
12333
|
+
exports2.default = draft7Vocabularies;
|
|
12338
12334
|
}
|
|
12339
12335
|
});
|
|
12340
12336
|
|
|
12341
12337
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
12342
12338
|
var require_types = __commonJS({
|
|
12343
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(
|
|
12339
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
|
|
12344
12340
|
"use strict";
|
|
12345
|
-
Object.defineProperty(
|
|
12346
|
-
|
|
12341
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12342
|
+
exports2.DiscrError = void 0;
|
|
12347
12343
|
var DiscrError;
|
|
12348
12344
|
(function(DiscrError2) {
|
|
12349
12345
|
DiscrError2["Tag"] = "tag";
|
|
12350
12346
|
DiscrError2["Mapping"] = "mapping";
|
|
12351
|
-
})(DiscrError || (
|
|
12347
|
+
})(DiscrError || (exports2.DiscrError = DiscrError = {}));
|
|
12352
12348
|
}
|
|
12353
12349
|
});
|
|
12354
12350
|
|
|
12355
12351
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
12356
12352
|
var require_discriminator = __commonJS({
|
|
12357
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(
|
|
12353
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
|
|
12358
12354
|
"use strict";
|
|
12359
|
-
Object.defineProperty(
|
|
12355
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12360
12356
|
var codegen_1 = require_codegen();
|
|
12361
12357
|
var types_1 = require_types();
|
|
12362
12358
|
var compile_1 = require_compile();
|
|
@@ -12453,14 +12449,14 @@ var require_discriminator = __commonJS({
|
|
|
12453
12449
|
}
|
|
12454
12450
|
}
|
|
12455
12451
|
};
|
|
12456
|
-
|
|
12452
|
+
exports2.default = def;
|
|
12457
12453
|
}
|
|
12458
12454
|
});
|
|
12459
12455
|
|
|
12460
12456
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
12461
12457
|
var require_json_schema_draft_07 = __commonJS({
|
|
12462
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(
|
|
12463
|
-
|
|
12458
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) {
|
|
12459
|
+
module2.exports = {
|
|
12464
12460
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
12465
12461
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
12466
12462
|
title: "Core schema meta-schema",
|
|
@@ -12616,10 +12612,10 @@ var require_json_schema_draft_07 = __commonJS({
|
|
|
12616
12612
|
|
|
12617
12613
|
// ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
|
|
12618
12614
|
var require_ajv = __commonJS({
|
|
12619
|
-
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(
|
|
12615
|
+
"../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports2, module2) {
|
|
12620
12616
|
"use strict";
|
|
12621
|
-
Object.defineProperty(
|
|
12622
|
-
|
|
12617
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12618
|
+
exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0;
|
|
12623
12619
|
var core_1 = require_core();
|
|
12624
12620
|
var draft7_1 = require_draft7();
|
|
12625
12621
|
var discriminator_1 = require_discriminator();
|
|
@@ -12645,40 +12641,40 @@ var require_ajv = __commonJS({
|
|
|
12645
12641
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
12646
12642
|
}
|
|
12647
12643
|
};
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
Object.defineProperty(
|
|
12652
|
-
|
|
12644
|
+
exports2.Ajv = Ajv;
|
|
12645
|
+
module2.exports = exports2 = Ajv;
|
|
12646
|
+
module2.exports.Ajv = Ajv;
|
|
12647
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12648
|
+
exports2.default = Ajv;
|
|
12653
12649
|
var validate_1 = require_validate();
|
|
12654
|
-
Object.defineProperty(
|
|
12650
|
+
Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() {
|
|
12655
12651
|
return validate_1.KeywordCxt;
|
|
12656
12652
|
} });
|
|
12657
12653
|
var codegen_1 = require_codegen();
|
|
12658
|
-
Object.defineProperty(
|
|
12654
|
+
Object.defineProperty(exports2, "_", { enumerable: true, get: function() {
|
|
12659
12655
|
return codegen_1._;
|
|
12660
12656
|
} });
|
|
12661
|
-
Object.defineProperty(
|
|
12657
|
+
Object.defineProperty(exports2, "str", { enumerable: true, get: function() {
|
|
12662
12658
|
return codegen_1.str;
|
|
12663
12659
|
} });
|
|
12664
|
-
Object.defineProperty(
|
|
12660
|
+
Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() {
|
|
12665
12661
|
return codegen_1.stringify;
|
|
12666
12662
|
} });
|
|
12667
|
-
Object.defineProperty(
|
|
12663
|
+
Object.defineProperty(exports2, "nil", { enumerable: true, get: function() {
|
|
12668
12664
|
return codegen_1.nil;
|
|
12669
12665
|
} });
|
|
12670
|
-
Object.defineProperty(
|
|
12666
|
+
Object.defineProperty(exports2, "Name", { enumerable: true, get: function() {
|
|
12671
12667
|
return codegen_1.Name;
|
|
12672
12668
|
} });
|
|
12673
|
-
Object.defineProperty(
|
|
12669
|
+
Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() {
|
|
12674
12670
|
return codegen_1.CodeGen;
|
|
12675
12671
|
} });
|
|
12676
12672
|
var validation_error_1 = require_validation_error();
|
|
12677
|
-
Object.defineProperty(
|
|
12673
|
+
Object.defineProperty(exports2, "ValidationError", { enumerable: true, get: function() {
|
|
12678
12674
|
return validation_error_1.default;
|
|
12679
12675
|
} });
|
|
12680
12676
|
var ref_error_1 = require_ref_error();
|
|
12681
|
-
Object.defineProperty(
|
|
12677
|
+
Object.defineProperty(exports2, "MissingRefError", { enumerable: true, get: function() {
|
|
12682
12678
|
return ref_error_1.default;
|
|
12683
12679
|
} });
|
|
12684
12680
|
}
|
|
@@ -12686,14 +12682,14 @@ var require_ajv = __commonJS({
|
|
|
12686
12682
|
|
|
12687
12683
|
// ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js
|
|
12688
12684
|
var require_formats = __commonJS({
|
|
12689
|
-
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js"(
|
|
12685
|
+
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js"(exports2) {
|
|
12690
12686
|
"use strict";
|
|
12691
|
-
Object.defineProperty(
|
|
12692
|
-
|
|
12687
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12688
|
+
exports2.formatNames = exports2.fastFormats = exports2.fullFormats = void 0;
|
|
12693
12689
|
function fmtDef(validate, compare) {
|
|
12694
12690
|
return { validate, compare };
|
|
12695
12691
|
}
|
|
12696
|
-
|
|
12692
|
+
exports2.fullFormats = {
|
|
12697
12693
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
12698
12694
|
date: fmtDef(date3, compareDate),
|
|
12699
12695
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -12740,8 +12736,8 @@ var require_formats = __commonJS({
|
|
|
12740
12736
|
// unchecked string payload
|
|
12741
12737
|
binary: true
|
|
12742
12738
|
};
|
|
12743
|
-
|
|
12744
|
-
...
|
|
12739
|
+
exports2.fastFormats = {
|
|
12740
|
+
...exports2.fullFormats,
|
|
12745
12741
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
12746
12742
|
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
12747
12743
|
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
@@ -12755,7 +12751,7 @@ var require_formats = __commonJS({
|
|
|
12755
12751
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
12756
12752
|
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
12757
12753
|
};
|
|
12758
|
-
|
|
12754
|
+
exports2.formatNames = Object.keys(exports2.fullFormats);
|
|
12759
12755
|
function isLeapYear(year) {
|
|
12760
12756
|
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
12761
12757
|
}
|
|
@@ -12889,10 +12885,10 @@ var require_formats = __commonJS({
|
|
|
12889
12885
|
|
|
12890
12886
|
// ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js
|
|
12891
12887
|
var require_limit = __commonJS({
|
|
12892
|
-
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js"(
|
|
12888
|
+
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js"(exports2) {
|
|
12893
12889
|
"use strict";
|
|
12894
|
-
Object.defineProperty(
|
|
12895
|
-
|
|
12890
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12891
|
+
exports2.formatLimitDefinition = void 0;
|
|
12896
12892
|
var ajv_1 = require_ajv();
|
|
12897
12893
|
var codegen_1 = require_codegen();
|
|
12898
12894
|
var ops = codegen_1.operators;
|
|
@@ -12906,7 +12902,7 @@ var require_limit = __commonJS({
|
|
|
12906
12902
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
12907
12903
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
12908
12904
|
};
|
|
12909
|
-
|
|
12905
|
+
exports2.formatLimitDefinition = {
|
|
12910
12906
|
keyword: Object.keys(KWDs),
|
|
12911
12907
|
type: "string",
|
|
12912
12908
|
schemaType: "string",
|
|
@@ -12952,18 +12948,18 @@ var require_limit = __commonJS({
|
|
|
12952
12948
|
dependencies: ["format"]
|
|
12953
12949
|
};
|
|
12954
12950
|
var formatLimitPlugin = (ajv) => {
|
|
12955
|
-
ajv.addKeyword(
|
|
12951
|
+
ajv.addKeyword(exports2.formatLimitDefinition);
|
|
12956
12952
|
return ajv;
|
|
12957
12953
|
};
|
|
12958
|
-
|
|
12954
|
+
exports2.default = formatLimitPlugin;
|
|
12959
12955
|
}
|
|
12960
12956
|
});
|
|
12961
12957
|
|
|
12962
12958
|
// ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js
|
|
12963
12959
|
var require_dist = __commonJS({
|
|
12964
|
-
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js"(
|
|
12960
|
+
"../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js"(exports2, module2) {
|
|
12965
12961
|
"use strict";
|
|
12966
|
-
Object.defineProperty(
|
|
12962
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12967
12963
|
var formats_1 = require_formats();
|
|
12968
12964
|
var limit_1 = require_limit();
|
|
12969
12965
|
var codegen_1 = require_codegen();
|
|
@@ -12995,9 +12991,9 @@ var require_dist = __commonJS({
|
|
|
12995
12991
|
for (const f of list)
|
|
12996
12992
|
ajv.addFormat(f, fs6[f]);
|
|
12997
12993
|
}
|
|
12998
|
-
|
|
12999
|
-
Object.defineProperty(
|
|
13000
|
-
|
|
12994
|
+
module2.exports = exports2 = formatsPlugin;
|
|
12995
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12996
|
+
exports2.default = formatsPlugin;
|
|
13001
12997
|
}
|
|
13002
12998
|
});
|
|
13003
12999
|
|
|
@@ -13259,12 +13255,12 @@ var init_file_engine = __esm({
|
|
|
13259
13255
|
|
|
13260
13256
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js
|
|
13261
13257
|
var require_constants = __commonJS({
|
|
13262
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(
|
|
13258
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(exports2, module2) {
|
|
13263
13259
|
"use strict";
|
|
13264
13260
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
13265
13261
|
var hasBlob = typeof Blob !== "undefined";
|
|
13266
13262
|
if (hasBlob) BINARY_TYPES.push("blob");
|
|
13267
|
-
|
|
13263
|
+
module2.exports = {
|
|
13268
13264
|
BINARY_TYPES,
|
|
13269
13265
|
CLOSE_TIMEOUT: 3e4,
|
|
13270
13266
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
@@ -13282,7 +13278,7 @@ var require_constants = __commonJS({
|
|
|
13282
13278
|
|
|
13283
13279
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js
|
|
13284
13280
|
var require_buffer_util = __commonJS({
|
|
13285
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(
|
|
13281
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(exports2, module2) {
|
|
13286
13282
|
"use strict";
|
|
13287
13283
|
var { EMPTY_BUFFER } = require_constants();
|
|
13288
13284
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -13331,7 +13327,7 @@ var require_buffer_util = __commonJS({
|
|
|
13331
13327
|
}
|
|
13332
13328
|
return buf;
|
|
13333
13329
|
}
|
|
13334
|
-
|
|
13330
|
+
module2.exports = {
|
|
13335
13331
|
concat,
|
|
13336
13332
|
mask: _mask,
|
|
13337
13333
|
toArrayBuffer,
|
|
@@ -13340,12 +13336,12 @@ var require_buffer_util = __commonJS({
|
|
|
13340
13336
|
};
|
|
13341
13337
|
if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
13342
13338
|
try {
|
|
13343
|
-
const bufferUtil =
|
|
13344
|
-
|
|
13339
|
+
const bufferUtil = require("bufferutil");
|
|
13340
|
+
module2.exports.mask = function(source, mask, output, offset, length) {
|
|
13345
13341
|
if (length < 48) _mask(source, mask, output, offset, length);
|
|
13346
13342
|
else bufferUtil.mask(source, mask, output, offset, length);
|
|
13347
13343
|
};
|
|
13348
|
-
|
|
13344
|
+
module2.exports.unmask = function(buffer, mask) {
|
|
13349
13345
|
if (buffer.length < 32) _unmask(buffer, mask);
|
|
13350
13346
|
else bufferUtil.unmask(buffer, mask);
|
|
13351
13347
|
};
|
|
@@ -13357,7 +13353,7 @@ var require_buffer_util = __commonJS({
|
|
|
13357
13353
|
|
|
13358
13354
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js
|
|
13359
13355
|
var require_limiter = __commonJS({
|
|
13360
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(
|
|
13356
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(exports2, module2) {
|
|
13361
13357
|
"use strict";
|
|
13362
13358
|
var kDone = Symbol("kDone");
|
|
13363
13359
|
var kRun = Symbol("kRun");
|
|
@@ -13401,15 +13397,15 @@ var require_limiter = __commonJS({
|
|
|
13401
13397
|
}
|
|
13402
13398
|
}
|
|
13403
13399
|
};
|
|
13404
|
-
|
|
13400
|
+
module2.exports = Limiter;
|
|
13405
13401
|
}
|
|
13406
13402
|
});
|
|
13407
13403
|
|
|
13408
13404
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js
|
|
13409
13405
|
var require_permessage_deflate = __commonJS({
|
|
13410
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(
|
|
13406
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
|
|
13411
13407
|
"use strict";
|
|
13412
|
-
var zlib =
|
|
13408
|
+
var zlib = require("zlib");
|
|
13413
13409
|
var bufferUtil = require_buffer_util();
|
|
13414
13410
|
var Limiter = require_limiter();
|
|
13415
13411
|
var { kStatusCode } = require_constants();
|
|
@@ -13759,7 +13755,7 @@ var require_permessage_deflate = __commonJS({
|
|
|
13759
13755
|
});
|
|
13760
13756
|
}
|
|
13761
13757
|
};
|
|
13762
|
-
|
|
13758
|
+
module2.exports = PerMessageDeflate2;
|
|
13763
13759
|
function deflateOnData(chunk) {
|
|
13764
13760
|
this[kBuffers].push(chunk);
|
|
13765
13761
|
this[kTotalLength] += chunk.length;
|
|
@@ -13790,9 +13786,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
13790
13786
|
|
|
13791
13787
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js
|
|
13792
13788
|
var require_validation2 = __commonJS({
|
|
13793
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(
|
|
13789
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(exports2, module2) {
|
|
13794
13790
|
"use strict";
|
|
13795
|
-
var { isUtf8 } =
|
|
13791
|
+
var { isUtf8 } = require("buffer");
|
|
13796
13792
|
var { hasBlob } = require_constants();
|
|
13797
13793
|
var tokenChars = [
|
|
13798
13794
|
0,
|
|
@@ -13967,20 +13963,20 @@ var require_validation2 = __commonJS({
|
|
|
13967
13963
|
function isBlob(value) {
|
|
13968
13964
|
return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
|
|
13969
13965
|
}
|
|
13970
|
-
|
|
13966
|
+
module2.exports = {
|
|
13971
13967
|
isBlob,
|
|
13972
13968
|
isValidStatusCode,
|
|
13973
13969
|
isValidUTF8: _isValidUTF8,
|
|
13974
13970
|
tokenChars
|
|
13975
13971
|
};
|
|
13976
13972
|
if (isUtf8) {
|
|
13977
|
-
|
|
13973
|
+
module2.exports.isValidUTF8 = function(buf) {
|
|
13978
13974
|
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
13979
13975
|
};
|
|
13980
13976
|
} else if (!process.env.WS_NO_UTF_8_VALIDATE) {
|
|
13981
13977
|
try {
|
|
13982
|
-
const isValidUTF8 =
|
|
13983
|
-
|
|
13978
|
+
const isValidUTF8 = require("utf-8-validate");
|
|
13979
|
+
module2.exports.isValidUTF8 = function(buf) {
|
|
13984
13980
|
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
13985
13981
|
};
|
|
13986
13982
|
} catch (e) {
|
|
@@ -13991,9 +13987,9 @@ var require_validation2 = __commonJS({
|
|
|
13991
13987
|
|
|
13992
13988
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js
|
|
13993
13989
|
var require_receiver = __commonJS({
|
|
13994
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(
|
|
13990
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(exports2, module2) {
|
|
13995
13991
|
"use strict";
|
|
13996
|
-
var { Writable } =
|
|
13992
|
+
var { Writable } = require("stream");
|
|
13997
13993
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
13998
13994
|
var {
|
|
13999
13995
|
BINARY_TYPES,
|
|
@@ -14617,19 +14613,19 @@ var require_receiver = __commonJS({
|
|
|
14617
14613
|
return err;
|
|
14618
14614
|
}
|
|
14619
14615
|
};
|
|
14620
|
-
|
|
14616
|
+
module2.exports = Receiver2;
|
|
14621
14617
|
}
|
|
14622
14618
|
});
|
|
14623
14619
|
|
|
14624
14620
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js
|
|
14625
14621
|
var require_sender = __commonJS({
|
|
14626
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(
|
|
14622
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(exports2, module2) {
|
|
14627
14623
|
"use strict";
|
|
14628
|
-
var { Duplex } =
|
|
14629
|
-
var { randomFillSync } =
|
|
14624
|
+
var { Duplex } = require("stream");
|
|
14625
|
+
var { randomFillSync } = require("crypto");
|
|
14630
14626
|
var {
|
|
14631
14627
|
types: { isUint8Array }
|
|
14632
|
-
} =
|
|
14628
|
+
} = require("util");
|
|
14633
14629
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
14634
14630
|
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();
|
|
14635
14631
|
var { isBlob, isValidStatusCode } = require_validation2();
|
|
@@ -15098,7 +15094,7 @@ var require_sender = __commonJS({
|
|
|
15098
15094
|
}
|
|
15099
15095
|
}
|
|
15100
15096
|
};
|
|
15101
|
-
|
|
15097
|
+
module2.exports = Sender2;
|
|
15102
15098
|
function callCallbacks(sender, err, cb) {
|
|
15103
15099
|
if (typeof cb === "function") cb(err);
|
|
15104
15100
|
for (let i = 0; i < sender._queue.length; i++) {
|
|
@@ -15116,7 +15112,7 @@ var require_sender = __commonJS({
|
|
|
15116
15112
|
|
|
15117
15113
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js
|
|
15118
15114
|
var require_event_target = __commonJS({
|
|
15119
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(
|
|
15115
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(exports2, module2) {
|
|
15120
15116
|
"use strict";
|
|
15121
15117
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
15122
15118
|
var kCode = Symbol("kCode");
|
|
@@ -15326,7 +15322,7 @@ var require_event_target = __commonJS({
|
|
|
15326
15322
|
}
|
|
15327
15323
|
}
|
|
15328
15324
|
};
|
|
15329
|
-
|
|
15325
|
+
module2.exports = {
|
|
15330
15326
|
CloseEvent,
|
|
15331
15327
|
ErrorEvent,
|
|
15332
15328
|
Event,
|
|
@@ -15345,7 +15341,7 @@ var require_event_target = __commonJS({
|
|
|
15345
15341
|
|
|
15346
15342
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js
|
|
15347
15343
|
var require_extension = __commonJS({
|
|
15348
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(
|
|
15344
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(exports2, module2) {
|
|
15349
15345
|
"use strict";
|
|
15350
15346
|
var { tokenChars } = require_validation2();
|
|
15351
15347
|
function push(dest, name, elem) {
|
|
@@ -15492,22 +15488,22 @@ var require_extension = __commonJS({
|
|
|
15492
15488
|
}).join(", ");
|
|
15493
15489
|
}).join(", ");
|
|
15494
15490
|
}
|
|
15495
|
-
|
|
15491
|
+
module2.exports = { format, parse: parse2 };
|
|
15496
15492
|
}
|
|
15497
15493
|
});
|
|
15498
15494
|
|
|
15499
15495
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js
|
|
15500
15496
|
var require_websocket = __commonJS({
|
|
15501
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(
|
|
15497
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(exports2, module2) {
|
|
15502
15498
|
"use strict";
|
|
15503
|
-
var EventEmitter =
|
|
15504
|
-
var https =
|
|
15505
|
-
var http =
|
|
15506
|
-
var net =
|
|
15507
|
-
var tls =
|
|
15508
|
-
var { randomBytes: randomBytes2, createHash } =
|
|
15509
|
-
var { Duplex, Readable } =
|
|
15510
|
-
var { URL: URL2 } =
|
|
15499
|
+
var EventEmitter = require("events");
|
|
15500
|
+
var https = require("https");
|
|
15501
|
+
var http = require("http");
|
|
15502
|
+
var net = require("net");
|
|
15503
|
+
var tls = require("tls");
|
|
15504
|
+
var { randomBytes: randomBytes2, createHash } = require("crypto");
|
|
15505
|
+
var { Duplex, Readable } = require("stream");
|
|
15506
|
+
var { URL: URL2 } = require("url");
|
|
15511
15507
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
15512
15508
|
var Receiver2 = require_receiver();
|
|
15513
15509
|
var Sender2 = require_sender();
|
|
@@ -15976,7 +15972,7 @@ var require_websocket = __commonJS({
|
|
|
15976
15972
|
});
|
|
15977
15973
|
WebSocket2.prototype.addEventListener = addEventListener;
|
|
15978
15974
|
WebSocket2.prototype.removeEventListener = removeEventListener;
|
|
15979
|
-
|
|
15975
|
+
module2.exports = WebSocket2;
|
|
15980
15976
|
function initAsClient(websocket, address, protocols, options) {
|
|
15981
15977
|
const opts = {
|
|
15982
15978
|
allowSynchronousEvents: true,
|
|
@@ -16394,10 +16390,10 @@ var require_websocket = __commonJS({
|
|
|
16394
16390
|
|
|
16395
16391
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js
|
|
16396
16392
|
var require_stream = __commonJS({
|
|
16397
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"(
|
|
16393
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"(exports2, module2) {
|
|
16398
16394
|
"use strict";
|
|
16399
16395
|
var WebSocket2 = require_websocket();
|
|
16400
|
-
var { Duplex } =
|
|
16396
|
+
var { Duplex } = require("stream");
|
|
16401
16397
|
function emitClose(stream) {
|
|
16402
16398
|
stream.emit("close");
|
|
16403
16399
|
}
|
|
@@ -16486,13 +16482,13 @@ var require_stream = __commonJS({
|
|
|
16486
16482
|
duplex.on("error", duplexOnError);
|
|
16487
16483
|
return duplex;
|
|
16488
16484
|
}
|
|
16489
|
-
|
|
16485
|
+
module2.exports = createWebSocketStream2;
|
|
16490
16486
|
}
|
|
16491
16487
|
});
|
|
16492
16488
|
|
|
16493
16489
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js
|
|
16494
16490
|
var require_subprotocol = __commonJS({
|
|
16495
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(
|
|
16491
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
|
|
16496
16492
|
"use strict";
|
|
16497
16493
|
var { tokenChars } = require_validation2();
|
|
16498
16494
|
function parse2(header) {
|
|
@@ -16531,18 +16527,18 @@ var require_subprotocol = __commonJS({
|
|
|
16531
16527
|
protocols.add(protocol);
|
|
16532
16528
|
return protocols;
|
|
16533
16529
|
}
|
|
16534
|
-
|
|
16530
|
+
module2.exports = { parse: parse2 };
|
|
16535
16531
|
}
|
|
16536
16532
|
});
|
|
16537
16533
|
|
|
16538
16534
|
// ../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js
|
|
16539
16535
|
var require_websocket_server = __commonJS({
|
|
16540
|
-
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js"(
|
|
16536
|
+
"../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js"(exports2, module2) {
|
|
16541
16537
|
"use strict";
|
|
16542
|
-
var EventEmitter =
|
|
16543
|
-
var http =
|
|
16544
|
-
var { Duplex } =
|
|
16545
|
-
var { createHash } =
|
|
16538
|
+
var EventEmitter = require("events");
|
|
16539
|
+
var http = require("http");
|
|
16540
|
+
var { Duplex } = require("stream");
|
|
16541
|
+
var { createHash } = require("crypto");
|
|
16546
16542
|
var extension2 = require_extension();
|
|
16547
16543
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
16548
16544
|
var subprotocol2 = require_subprotocol();
|
|
@@ -16894,7 +16890,7 @@ var require_websocket_server = __commonJS({
|
|
|
16894
16890
|
cb(ws, req);
|
|
16895
16891
|
}
|
|
16896
16892
|
};
|
|
16897
|
-
|
|
16893
|
+
module2.exports = WebSocketServer2;
|
|
16898
16894
|
function addListeners(server, map) {
|
|
16899
16895
|
for (const event of Object.keys(map)) server.on(event, map[event]);
|
|
16900
16896
|
return function removeListeners() {
|
|
@@ -16952,10 +16948,117 @@ var init_wrapper = __esm({
|
|
|
16952
16948
|
});
|
|
16953
16949
|
|
|
16954
16950
|
// ../server/src/daemon-hub.ts
|
|
16951
|
+
var DaemonHub;
|
|
16955
16952
|
var init_daemon_hub = __esm({
|
|
16956
16953
|
"../server/src/daemon-hub.ts"() {
|
|
16957
16954
|
"use strict";
|
|
16958
16955
|
init_wrapper();
|
|
16956
|
+
DaemonHub = class _DaemonHub {
|
|
16957
|
+
daemons = /* @__PURE__ */ new Map();
|
|
16958
|
+
wss;
|
|
16959
|
+
ghosts = /* @__PURE__ */ new Map();
|
|
16960
|
+
static GHOST_TTL_MS = 5 * 60 * 1e3;
|
|
16961
|
+
/** 外部可订阅的事件回调 */
|
|
16962
|
+
onDaemonConnected;
|
|
16963
|
+
onDaemonDisconnected;
|
|
16964
|
+
onMessage;
|
|
16965
|
+
messageListeners = /* @__PURE__ */ new Set();
|
|
16966
|
+
/** 多路消息订阅(onMessage 单槽之外的加法;DaemonHubAdapter 等用) */
|
|
16967
|
+
addMessageListener(cb) {
|
|
16968
|
+
this.messageListeners.add(cb);
|
|
16969
|
+
return () => this.messageListeners.delete(cb);
|
|
16970
|
+
}
|
|
16971
|
+
constructor(server, path6 = "/daemon/ws", resolveNode) {
|
|
16972
|
+
this.wss = new import_websocket_server.default({
|
|
16973
|
+
server,
|
|
16974
|
+
path: path6,
|
|
16975
|
+
...resolveNode ? {
|
|
16976
|
+
verifyClient: (info, cb) => {
|
|
16977
|
+
const authHeader = info.req.headers.authorization ?? "";
|
|
16978
|
+
const token2 = authHeader.startsWith("Bearer ") ? authHeader.slice("Bearer ".length) : "";
|
|
16979
|
+
const nodeId2 = token2 ? resolveNode(token2) : null;
|
|
16980
|
+
if (!nodeId2) {
|
|
16981
|
+
cb(false, 401, "invalid node token");
|
|
16982
|
+
return;
|
|
16983
|
+
}
|
|
16984
|
+
info.req.oasisNodeId = nodeId2;
|
|
16985
|
+
cb(true);
|
|
16986
|
+
}
|
|
16987
|
+
} : {}
|
|
16988
|
+
});
|
|
16989
|
+
this.wss.on("connection", (ws, req) => this.handleConnection(ws, req));
|
|
16990
|
+
}
|
|
16991
|
+
dispatch(daemonId, msg) {
|
|
16992
|
+
const daemon = this.daemons.get(daemonId);
|
|
16993
|
+
if (!daemon) return false;
|
|
16994
|
+
daemon.send(msg);
|
|
16995
|
+
return true;
|
|
16996
|
+
}
|
|
16997
|
+
broadcast(msg) {
|
|
16998
|
+
for (const daemon of this.daemons.values()) daemon.send(msg);
|
|
16999
|
+
}
|
|
17000
|
+
connectedDaemons() {
|
|
17001
|
+
return [...this.daemons.values()];
|
|
17002
|
+
}
|
|
17003
|
+
/** Nodes that disconnected within the last GHOST_TTL_MS ms. */
|
|
17004
|
+
recentlyDisconnected() {
|
|
17005
|
+
const cutoff = Date.now() - _DaemonHub.GHOST_TTL_MS;
|
|
17006
|
+
const result = [];
|
|
17007
|
+
for (const [id, g] of this.ghosts) {
|
|
17008
|
+
if (g.disconnectedAt < cutoff) {
|
|
17009
|
+
this.ghosts.delete(id);
|
|
17010
|
+
continue;
|
|
17011
|
+
}
|
|
17012
|
+
result.push({ daemonId: id, meta: g.meta, disconnectedAt: g.disconnectedAt });
|
|
17013
|
+
}
|
|
17014
|
+
return result;
|
|
17015
|
+
}
|
|
17016
|
+
evictGhost(daemonId) {
|
|
17017
|
+
this.ghosts.delete(daemonId);
|
|
17018
|
+
}
|
|
17019
|
+
handleConnection(ws, req) {
|
|
17020
|
+
const verifiedId = req.oasisNodeId;
|
|
17021
|
+
const daemonId = verifiedId ?? req.headers["x-daemon-id"] ?? `anon-${Date.now()}`;
|
|
17022
|
+
let registered = false;
|
|
17023
|
+
const daemon = {
|
|
17024
|
+
daemonId,
|
|
17025
|
+
meta: { hostname: "unknown", adapters: [], nodeVersion: "unknown" },
|
|
17026
|
+
send: (msg) => {
|
|
17027
|
+
if (ws.readyState === import_websocket.default.OPEN) ws.send(JSON.stringify(msg));
|
|
17028
|
+
},
|
|
17029
|
+
close: () => ws.close()
|
|
17030
|
+
};
|
|
17031
|
+
ws.on("message", (raw) => {
|
|
17032
|
+
let msg;
|
|
17033
|
+
try {
|
|
17034
|
+
msg = JSON.parse(raw.toString());
|
|
17035
|
+
} catch {
|
|
17036
|
+
return;
|
|
17037
|
+
}
|
|
17038
|
+
if (msg.type === "hello") {
|
|
17039
|
+
this.ghosts.delete(daemonId);
|
|
17040
|
+
Object.assign(daemon.meta, msg.meta);
|
|
17041
|
+
if (!registered) {
|
|
17042
|
+
registered = true;
|
|
17043
|
+
this.daemons.set(daemonId, daemon);
|
|
17044
|
+
this.onDaemonConnected?.(daemon);
|
|
17045
|
+
}
|
|
17046
|
+
}
|
|
17047
|
+
this.onMessage?.(daemonId, msg);
|
|
17048
|
+
for (const listener of this.messageListeners) listener(daemonId, msg);
|
|
17049
|
+
});
|
|
17050
|
+
ws.on("close", () => {
|
|
17051
|
+
const d = this.daemons.get(daemonId);
|
|
17052
|
+
if (d) this.ghosts.set(daemonId, { meta: { ...d.meta }, disconnectedAt: Date.now() });
|
|
17053
|
+
this.daemons.delete(daemonId);
|
|
17054
|
+
this.onDaemonDisconnected?.(daemonId);
|
|
17055
|
+
});
|
|
17056
|
+
ws.on("error", (err) => {
|
|
17057
|
+
console.error(`[hub] daemon ${daemonId} error:`, err.message);
|
|
17058
|
+
});
|
|
17059
|
+
daemon.send({ type: "ping" });
|
|
17060
|
+
}
|
|
17061
|
+
};
|
|
16959
17062
|
}
|
|
16960
17063
|
});
|
|
16961
17064
|
|
|
@@ -17077,16 +17180,16 @@ var init_companies = __esm({
|
|
|
17077
17180
|
});
|
|
17078
17181
|
|
|
17079
17182
|
// ../server/src/auth/crypto.ts
|
|
17080
|
-
import { createHmac, randomBytes, randomInt, scryptSync, timingSafeEqual } from "node:crypto";
|
|
17081
17183
|
function hashPassword(password) {
|
|
17082
|
-
const salt = randomBytes(16);
|
|
17083
|
-
const dk = scryptSync(password, salt, SCRYPT_KEYLEN, { N: SCRYPT_N, maxmem: 64 * 1024 * 1024 });
|
|
17184
|
+
const salt = (0, import_node_crypto.randomBytes)(16);
|
|
17185
|
+
const dk = (0, import_node_crypto.scryptSync)(password, salt, SCRYPT_KEYLEN, { N: SCRYPT_N, maxmem: 64 * 1024 * 1024 });
|
|
17084
17186
|
return `scrypt$${SCRYPT_N}$${salt.toString("base64url")}$${dk.toString("base64url")}`;
|
|
17085
17187
|
}
|
|
17086
|
-
var SCRYPT_N, SCRYPT_KEYLEN;
|
|
17188
|
+
var import_node_crypto, SCRYPT_N, SCRYPT_KEYLEN;
|
|
17087
17189
|
var init_crypto = __esm({
|
|
17088
17190
|
"../server/src/auth/crypto.ts"() {
|
|
17089
17191
|
"use strict";
|
|
17192
|
+
import_node_crypto = require("node:crypto");
|
|
17090
17193
|
SCRYPT_N = 16384;
|
|
17091
17194
|
SCRYPT_KEYLEN = 32;
|
|
17092
17195
|
}
|
|
@@ -17182,6 +17285,35 @@ var init_collab = __esm({
|
|
|
17182
17285
|
var init_service4 = __esm({
|
|
17183
17286
|
"../server/src/domains/trace/service.ts"() {
|
|
17184
17287
|
"use strict";
|
|
17288
|
+
init_src();
|
|
17289
|
+
}
|
|
17290
|
+
});
|
|
17291
|
+
|
|
17292
|
+
// ../server/src/domains/trace/otlp/redact.ts
|
|
17293
|
+
var MASK, TEXT_PATTERNS;
|
|
17294
|
+
var init_redact = __esm({
|
|
17295
|
+
"../server/src/domains/trace/otlp/redact.ts"() {
|
|
17296
|
+
"use strict";
|
|
17297
|
+
MASK = "***";
|
|
17298
|
+
TEXT_PATTERNS = [
|
|
17299
|
+
[/\bBearer\s+[A-Za-z0-9._\-]+/gi, "Bearer " + MASK],
|
|
17300
|
+
[/\b(sk|pk)-[A-Za-z0-9]{8,}\b/g, MASK],
|
|
17301
|
+
// OpenAI 风格
|
|
17302
|
+
[/\bgh[pousr]_[A-Za-z0-9]{20,}\b/g, MASK],
|
|
17303
|
+
// GitHub token
|
|
17304
|
+
[/\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g, MASK],
|
|
17305
|
+
// Slack token
|
|
17306
|
+
// key=value / key: "value"(键名敏感时遮值)
|
|
17307
|
+
[/\b(api[_-]?key|secret|password|passwd|token|authorization|access[_-]?token|refresh[_-]?token)(["']?\s*[:=]\s*["']?)([^\s"',}]{6,})/gi, `$1$2${MASK}`]
|
|
17308
|
+
];
|
|
17309
|
+
}
|
|
17310
|
+
});
|
|
17311
|
+
|
|
17312
|
+
// ../server/src/domains/trace/otlp/map.ts
|
|
17313
|
+
var init_map2 = __esm({
|
|
17314
|
+
"../server/src/domains/trace/otlp/map.ts"() {
|
|
17315
|
+
"use strict";
|
|
17316
|
+
init_redact();
|
|
17185
17317
|
}
|
|
17186
17318
|
});
|
|
17187
17319
|
|
|
@@ -17191,6 +17323,7 @@ var init_routes5 = __esm({
|
|
|
17191
17323
|
"use strict";
|
|
17192
17324
|
init_src();
|
|
17193
17325
|
init_router();
|
|
17326
|
+
init_map2();
|
|
17194
17327
|
}
|
|
17195
17328
|
});
|
|
17196
17329
|
|
|
@@ -17300,9 +17433,9 @@ var init_src4 = __esm({
|
|
|
17300
17433
|
|
|
17301
17434
|
// ../../node_modules/.pnpm/postgres-array@2.0.0/node_modules/postgres-array/index.js
|
|
17302
17435
|
var require_postgres_array = __commonJS({
|
|
17303
|
-
"../../node_modules/.pnpm/postgres-array@2.0.0/node_modules/postgres-array/index.js"(
|
|
17436
|
+
"../../node_modules/.pnpm/postgres-array@2.0.0/node_modules/postgres-array/index.js"(exports2) {
|
|
17304
17437
|
"use strict";
|
|
17305
|
-
|
|
17438
|
+
exports2.parse = function(source, transform2) {
|
|
17306
17439
|
return new ArrayParser(source, transform2).parse();
|
|
17307
17440
|
};
|
|
17308
17441
|
var ArrayParser = class _ArrayParser {
|
|
@@ -17394,9 +17527,9 @@ var require_postgres_array = __commonJS({
|
|
|
17394
17527
|
|
|
17395
17528
|
// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/arrayParser.js
|
|
17396
17529
|
var require_arrayParser = __commonJS({
|
|
17397
|
-
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/arrayParser.js"(
|
|
17530
|
+
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/arrayParser.js"(exports2, module2) {
|
|
17398
17531
|
var array2 = require_postgres_array();
|
|
17399
|
-
|
|
17532
|
+
module2.exports = {
|
|
17400
17533
|
create: function(source, transform2) {
|
|
17401
17534
|
return {
|
|
17402
17535
|
parse: function() {
|
|
@@ -17410,13 +17543,13 @@ var require_arrayParser = __commonJS({
|
|
|
17410
17543
|
|
|
17411
17544
|
// ../../node_modules/.pnpm/postgres-date@1.0.7/node_modules/postgres-date/index.js
|
|
17412
17545
|
var require_postgres_date = __commonJS({
|
|
17413
|
-
"../../node_modules/.pnpm/postgres-date@1.0.7/node_modules/postgres-date/index.js"(
|
|
17546
|
+
"../../node_modules/.pnpm/postgres-date@1.0.7/node_modules/postgres-date/index.js"(exports2, module2) {
|
|
17414
17547
|
"use strict";
|
|
17415
17548
|
var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/;
|
|
17416
17549
|
var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/;
|
|
17417
17550
|
var TIME_ZONE = /([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/;
|
|
17418
17551
|
var INFINITY = /^-?infinity$/;
|
|
17419
|
-
|
|
17552
|
+
module2.exports = function parseDate(isoDate) {
|
|
17420
17553
|
if (INFINITY.test(isoDate)) {
|
|
17421
17554
|
return Number(isoDate.replace("i", "I"));
|
|
17422
17555
|
}
|
|
@@ -17497,8 +17630,8 @@ var require_postgres_date = __commonJS({
|
|
|
17497
17630
|
|
|
17498
17631
|
// ../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/mutable.js
|
|
17499
17632
|
var require_mutable = __commonJS({
|
|
17500
|
-
"../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/mutable.js"(
|
|
17501
|
-
|
|
17633
|
+
"../../node_modules/.pnpm/xtend@4.0.2/node_modules/xtend/mutable.js"(exports2, module2) {
|
|
17634
|
+
module2.exports = extend2;
|
|
17502
17635
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
17503
17636
|
function extend2(target) {
|
|
17504
17637
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -17516,10 +17649,10 @@ var require_mutable = __commonJS({
|
|
|
17516
17649
|
|
|
17517
17650
|
// ../../node_modules/.pnpm/postgres-interval@1.2.0/node_modules/postgres-interval/index.js
|
|
17518
17651
|
var require_postgres_interval = __commonJS({
|
|
17519
|
-
"../../node_modules/.pnpm/postgres-interval@1.2.0/node_modules/postgres-interval/index.js"(
|
|
17652
|
+
"../../node_modules/.pnpm/postgres-interval@1.2.0/node_modules/postgres-interval/index.js"(exports2, module2) {
|
|
17520
17653
|
"use strict";
|
|
17521
17654
|
var extend2 = require_mutable();
|
|
17522
|
-
|
|
17655
|
+
module2.exports = PostgresInterval;
|
|
17523
17656
|
function PostgresInterval(raw) {
|
|
17524
17657
|
if (!(this instanceof PostgresInterval)) {
|
|
17525
17658
|
return new PostgresInterval(raw);
|
|
@@ -17607,10 +17740,10 @@ var require_postgres_interval = __commonJS({
|
|
|
17607
17740
|
|
|
17608
17741
|
// ../../node_modules/.pnpm/postgres-bytea@1.0.1/node_modules/postgres-bytea/index.js
|
|
17609
17742
|
var require_postgres_bytea = __commonJS({
|
|
17610
|
-
"../../node_modules/.pnpm/postgres-bytea@1.0.1/node_modules/postgres-bytea/index.js"(
|
|
17743
|
+
"../../node_modules/.pnpm/postgres-bytea@1.0.1/node_modules/postgres-bytea/index.js"(exports2, module2) {
|
|
17611
17744
|
"use strict";
|
|
17612
17745
|
var bufferFrom = Buffer.from || Buffer;
|
|
17613
|
-
|
|
17746
|
+
module2.exports = function parseBytea(input) {
|
|
17614
17747
|
if (/^\\x/.test(input)) {
|
|
17615
17748
|
return bufferFrom(input.substr(2), "hex");
|
|
17616
17749
|
}
|
|
@@ -17643,7 +17776,7 @@ var require_postgres_bytea = __commonJS({
|
|
|
17643
17776
|
|
|
17644
17777
|
// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/textParsers.js
|
|
17645
17778
|
var require_textParsers = __commonJS({
|
|
17646
|
-
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/textParsers.js"(
|
|
17779
|
+
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/textParsers.js"(exports2, module2) {
|
|
17647
17780
|
var array2 = require_postgres_array();
|
|
17648
17781
|
var arrayParser = require_arrayParser();
|
|
17649
17782
|
var parseDate = require_postgres_date();
|
|
@@ -17835,7 +17968,7 @@ var require_textParsers = __commonJS({
|
|
|
17835
17968
|
register(1183, parseStringArray);
|
|
17836
17969
|
register(1270, parseStringArray);
|
|
17837
17970
|
};
|
|
17838
|
-
|
|
17971
|
+
module2.exports = {
|
|
17839
17972
|
init
|
|
17840
17973
|
};
|
|
17841
17974
|
}
|
|
@@ -17843,7 +17976,7 @@ var require_textParsers = __commonJS({
|
|
|
17843
17976
|
|
|
17844
17977
|
// ../../node_modules/.pnpm/pg-int8@1.0.1/node_modules/pg-int8/index.js
|
|
17845
17978
|
var require_pg_int8 = __commonJS({
|
|
17846
|
-
"../../node_modules/.pnpm/pg-int8@1.0.1/node_modules/pg-int8/index.js"(
|
|
17979
|
+
"../../node_modules/.pnpm/pg-int8@1.0.1/node_modules/pg-int8/index.js"(exports2, module2) {
|
|
17847
17980
|
"use strict";
|
|
17848
17981
|
var BASE = 1e6;
|
|
17849
17982
|
function readInt8(buffer) {
|
|
@@ -17917,13 +18050,13 @@ var require_pg_int8 = __commonJS({
|
|
|
17917
18050
|
return sign + digits + result;
|
|
17918
18051
|
}
|
|
17919
18052
|
}
|
|
17920
|
-
|
|
18053
|
+
module2.exports = readInt8;
|
|
17921
18054
|
}
|
|
17922
18055
|
});
|
|
17923
18056
|
|
|
17924
18057
|
// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/binaryParsers.js
|
|
17925
18058
|
var require_binaryParsers = __commonJS({
|
|
17926
|
-
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/binaryParsers.js"(
|
|
18059
|
+
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/binaryParsers.js"(exports2, module2) {
|
|
17927
18060
|
var parseInt64 = require_pg_int8();
|
|
17928
18061
|
var parseBits = function(data, bits, offset, invert, callback) {
|
|
17929
18062
|
offset = offset || 0;
|
|
@@ -18115,7 +18248,7 @@ var require_binaryParsers = __commonJS({
|
|
|
18115
18248
|
register(1009, parseArray);
|
|
18116
18249
|
register(25, parseText);
|
|
18117
18250
|
};
|
|
18118
|
-
|
|
18251
|
+
module2.exports = {
|
|
18119
18252
|
init
|
|
18120
18253
|
};
|
|
18121
18254
|
}
|
|
@@ -18123,8 +18256,8 @@ var require_binaryParsers = __commonJS({
|
|
|
18123
18256
|
|
|
18124
18257
|
// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/builtins.js
|
|
18125
18258
|
var require_builtins = __commonJS({
|
|
18126
|
-
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/builtins.js"(
|
|
18127
|
-
|
|
18259
|
+
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/lib/builtins.js"(exports2, module2) {
|
|
18260
|
+
module2.exports = {
|
|
18128
18261
|
BOOL: 16,
|
|
18129
18262
|
BYTEA: 17,
|
|
18130
18263
|
CHAR: 18,
|
|
@@ -18191,15 +18324,15 @@ var require_builtins = __commonJS({
|
|
|
18191
18324
|
|
|
18192
18325
|
// ../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/index.js
|
|
18193
18326
|
var require_pg_types = __commonJS({
|
|
18194
|
-
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/index.js"(
|
|
18327
|
+
"../../node_modules/.pnpm/pg-types@2.2.0/node_modules/pg-types/index.js"(exports2) {
|
|
18195
18328
|
var textParsers = require_textParsers();
|
|
18196
18329
|
var binaryParsers = require_binaryParsers();
|
|
18197
18330
|
var arrayParser = require_arrayParser();
|
|
18198
18331
|
var builtinTypes = require_builtins();
|
|
18199
|
-
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
|
|
18332
|
+
exports2.getTypeParser = getTypeParser;
|
|
18333
|
+
exports2.setTypeParser = setTypeParser;
|
|
18334
|
+
exports2.arrayParser = arrayParser;
|
|
18335
|
+
exports2.builtins = builtinTypes;
|
|
18203
18336
|
var typeParsers = {
|
|
18204
18337
|
text: {},
|
|
18205
18338
|
binary: {}
|
|
@@ -18232,14 +18365,14 @@ var require_pg_types = __commonJS({
|
|
|
18232
18365
|
|
|
18233
18366
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/defaults.js
|
|
18234
18367
|
var require_defaults2 = __commonJS({
|
|
18235
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/defaults.js"(
|
|
18368
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/defaults.js"(exports2, module2) {
|
|
18236
18369
|
"use strict";
|
|
18237
18370
|
var user;
|
|
18238
18371
|
try {
|
|
18239
18372
|
user = process.platform === "win32" ? process.env.USERNAME : process.env.USER;
|
|
18240
18373
|
} catch {
|
|
18241
18374
|
}
|
|
18242
|
-
|
|
18375
|
+
module2.exports = {
|
|
18243
18376
|
// database host. defaults to localhost
|
|
18244
18377
|
host: "localhost",
|
|
18245
18378
|
// database user's name
|
|
@@ -18290,7 +18423,7 @@ var require_defaults2 = __commonJS({
|
|
|
18290
18423
|
var pgTypes = require_pg_types();
|
|
18291
18424
|
var parseBigInteger = pgTypes.getTypeParser(20, "text");
|
|
18292
18425
|
var parseBigIntegerArray = pgTypes.getTypeParser(1016, "text");
|
|
18293
|
-
|
|
18426
|
+
module2.exports.__defineSetter__("parseInt8", function(val) {
|
|
18294
18427
|
pgTypes.setTypeParser(20, "text", val ? pgTypes.getTypeParser(23, "text") : parseBigInteger);
|
|
18295
18428
|
pgTypes.setTypeParser(1016, "text", val ? pgTypes.getTypeParser(1007, "text") : parseBigIntegerArray);
|
|
18296
18429
|
});
|
|
@@ -18299,10 +18432,10 @@ var require_defaults2 = __commonJS({
|
|
|
18299
18432
|
|
|
18300
18433
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/utils.js
|
|
18301
18434
|
var require_utils2 = __commonJS({
|
|
18302
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/utils.js"(
|
|
18435
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/utils.js"(exports2, module2) {
|
|
18303
18436
|
"use strict";
|
|
18304
18437
|
var defaults2 = require_defaults2();
|
|
18305
|
-
var { isDate } =
|
|
18438
|
+
var { isDate } = require("util/types");
|
|
18306
18439
|
function escapeElement(elementRepresentation) {
|
|
18307
18440
|
const escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
18308
18441
|
return '"' + escaped + '"';
|
|
@@ -18434,7 +18567,7 @@ var require_utils2 = __commonJS({
|
|
|
18434
18567
|
}
|
|
18435
18568
|
return escaped;
|
|
18436
18569
|
};
|
|
18437
|
-
|
|
18570
|
+
module2.exports = {
|
|
18438
18571
|
prepareValue: function prepareValueWrapper(value) {
|
|
18439
18572
|
return prepareValue(value);
|
|
18440
18573
|
},
|
|
@@ -18447,9 +18580,9 @@ var require_utils2 = __commonJS({
|
|
|
18447
18580
|
|
|
18448
18581
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/utils.js
|
|
18449
18582
|
var require_utils3 = __commonJS({
|
|
18450
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/utils.js"(
|
|
18451
|
-
var nodeCrypto =
|
|
18452
|
-
|
|
18583
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/utils.js"(exports2, module2) {
|
|
18584
|
+
var nodeCrypto = require("crypto");
|
|
18585
|
+
module2.exports = {
|
|
18453
18586
|
postgresMd5PasswordHash,
|
|
18454
18587
|
randomBytes: randomBytes2,
|
|
18455
18588
|
deriveKey,
|
|
@@ -18498,7 +18631,7 @@ var require_utils3 = __commonJS({
|
|
|
18498
18631
|
|
|
18499
18632
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/cert-signatures.js
|
|
18500
18633
|
var require_cert_signatures = __commonJS({
|
|
18501
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/cert-signatures.js"(
|
|
18634
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/cert-signatures.js"(exports2, module2) {
|
|
18502
18635
|
function x509Error(msg, cert) {
|
|
18503
18636
|
return new Error("SASL channel binding: " + msg + " when parsing public certificate " + cert.toString("base64"));
|
|
18504
18637
|
}
|
|
@@ -18605,13 +18738,13 @@ var require_cert_signatures = __commonJS({
|
|
|
18605
18738
|
}
|
|
18606
18739
|
throw x509Error("unknown OID " + oid, data);
|
|
18607
18740
|
}
|
|
18608
|
-
|
|
18741
|
+
module2.exports = { signatureAlgorithmHashFromCertificate };
|
|
18609
18742
|
}
|
|
18610
18743
|
});
|
|
18611
18744
|
|
|
18612
18745
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/sasl.js
|
|
18613
18746
|
var require_sasl = __commonJS({
|
|
18614
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/sasl.js"(
|
|
18747
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/crypto/sasl.js"(exports2, module2) {
|
|
18615
18748
|
"use strict";
|
|
18616
18749
|
var crypto = require_utils3();
|
|
18617
18750
|
var { signatureAlgorithmHashFromCertificate } = require_cert_signatures();
|
|
@@ -18785,7 +18918,7 @@ var require_sasl = __commonJS({
|
|
|
18785
18918
|
}
|
|
18786
18919
|
return Buffer.from(a.map((_, i) => a[i] ^ b[i]));
|
|
18787
18920
|
}
|
|
18788
|
-
|
|
18921
|
+
module2.exports = {
|
|
18789
18922
|
startSession,
|
|
18790
18923
|
continueSession,
|
|
18791
18924
|
finalizeSession,
|
|
@@ -18796,7 +18929,7 @@ var require_sasl = __commonJS({
|
|
|
18796
18929
|
|
|
18797
18930
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/type-overrides.js
|
|
18798
18931
|
var require_type_overrides = __commonJS({
|
|
18799
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/type-overrides.js"(
|
|
18932
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/type-overrides.js"(exports2, module2) {
|
|
18800
18933
|
"use strict";
|
|
18801
18934
|
var types2 = require_pg_types();
|
|
18802
18935
|
function TypeOverrides2(userTypes) {
|
|
@@ -18825,13 +18958,13 @@ var require_type_overrides = __commonJS({
|
|
|
18825
18958
|
format = format || "text";
|
|
18826
18959
|
return this.getOverrides(format)[oid] || this._types.getTypeParser(oid, format);
|
|
18827
18960
|
};
|
|
18828
|
-
|
|
18961
|
+
module2.exports = TypeOverrides2;
|
|
18829
18962
|
}
|
|
18830
18963
|
});
|
|
18831
18964
|
|
|
18832
18965
|
// ../../node_modules/.pnpm/pg-connection-string@2.13.0/node_modules/pg-connection-string/index.js
|
|
18833
18966
|
var require_pg_connection_string = __commonJS({
|
|
18834
|
-
"../../node_modules/.pnpm/pg-connection-string@2.13.0/node_modules/pg-connection-string/index.js"(
|
|
18967
|
+
"../../node_modules/.pnpm/pg-connection-string@2.13.0/node_modules/pg-connection-string/index.js"(exports2, module2) {
|
|
18835
18968
|
"use strict";
|
|
18836
18969
|
function parse2(str, options = {}) {
|
|
18837
18970
|
if (str.charAt(0) === "/") {
|
|
@@ -18886,7 +19019,7 @@ var require_pg_connection_string = __commonJS({
|
|
|
18886
19019
|
if (config2.sslcert || config2.sslkey || config2.sslrootcert || config2.sslmode) {
|
|
18887
19020
|
config2.ssl = {};
|
|
18888
19021
|
}
|
|
18889
|
-
const fs6 = config2.sslcert || config2.sslkey || config2.sslrootcert ?
|
|
19022
|
+
const fs6 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
|
|
18890
19023
|
if (config2.sslcert) {
|
|
18891
19024
|
config2.ssl.cert = fs6.readFileSync(config2.sslcert).toString();
|
|
18892
19025
|
}
|
|
@@ -19007,7 +19140,7 @@ To prepare for this change:
|
|
|
19007
19140
|
See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`);
|
|
19008
19141
|
}
|
|
19009
19142
|
}
|
|
19010
|
-
|
|
19143
|
+
module2.exports = parse2;
|
|
19011
19144
|
parse2.parse = parse2;
|
|
19012
19145
|
parse2.toClientConfig = toClientConfig;
|
|
19013
19146
|
parse2.parseIntoClientConfig = parseIntoClientConfig;
|
|
@@ -19016,9 +19149,9 @@ See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode de
|
|
|
19016
19149
|
|
|
19017
19150
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection-parameters.js
|
|
19018
19151
|
var require_connection_parameters = __commonJS({
|
|
19019
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection-parameters.js"(
|
|
19152
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection-parameters.js"(exports2, module2) {
|
|
19020
19153
|
"use strict";
|
|
19021
|
-
var dns =
|
|
19154
|
+
var dns = require("dns");
|
|
19022
19155
|
var defaults2 = require_defaults2();
|
|
19023
19156
|
var parse2 = require_pg_connection_string().parse;
|
|
19024
19157
|
var val = function(key, config2, envVar) {
|
|
@@ -19151,13 +19284,13 @@ var require_connection_parameters = __commonJS({
|
|
|
19151
19284
|
});
|
|
19152
19285
|
}
|
|
19153
19286
|
};
|
|
19154
|
-
|
|
19287
|
+
module2.exports = ConnectionParameters;
|
|
19155
19288
|
}
|
|
19156
19289
|
});
|
|
19157
19290
|
|
|
19158
19291
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/result.js
|
|
19159
19292
|
var require_result = __commonJS({
|
|
19160
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/result.js"(
|
|
19293
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/result.js"(exports2, module2) {
|
|
19161
19294
|
"use strict";
|
|
19162
19295
|
var types2 = require_pg_types();
|
|
19163
19296
|
var matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/;
|
|
@@ -19242,15 +19375,15 @@ var require_result = __commonJS({
|
|
|
19242
19375
|
this._prebuiltEmptyResultObject = { ...row };
|
|
19243
19376
|
}
|
|
19244
19377
|
};
|
|
19245
|
-
|
|
19378
|
+
module2.exports = Result2;
|
|
19246
19379
|
}
|
|
19247
19380
|
});
|
|
19248
19381
|
|
|
19249
19382
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/query.js
|
|
19250
19383
|
var require_query = __commonJS({
|
|
19251
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/query.js"(
|
|
19384
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/query.js"(exports2, module2) {
|
|
19252
19385
|
"use strict";
|
|
19253
|
-
var { EventEmitter } =
|
|
19386
|
+
var { EventEmitter } = require("events");
|
|
19254
19387
|
var Result2 = require_result();
|
|
19255
19388
|
var utils = require_utils2();
|
|
19256
19389
|
var Query2 = class extends EventEmitter {
|
|
@@ -19439,45 +19572,45 @@ var require_query = __commonJS({
|
|
|
19439
19572
|
handleCopyData(msg, connection) {
|
|
19440
19573
|
}
|
|
19441
19574
|
};
|
|
19442
|
-
|
|
19575
|
+
module2.exports = Query2;
|
|
19443
19576
|
}
|
|
19444
19577
|
});
|
|
19445
19578
|
|
|
19446
19579
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/messages.js
|
|
19447
19580
|
var require_messages = __commonJS({
|
|
19448
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/messages.js"(
|
|
19581
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/messages.js"(exports2) {
|
|
19449
19582
|
"use strict";
|
|
19450
|
-
Object.defineProperty(
|
|
19451
|
-
|
|
19452
|
-
|
|
19583
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19584
|
+
exports2.NoticeMessage = exports2.DataRowMessage = exports2.CommandCompleteMessage = exports2.ReadyForQueryMessage = exports2.NotificationResponseMessage = exports2.BackendKeyDataMessage = exports2.AuthenticationMD5Password = exports2.ParameterStatusMessage = exports2.ParameterDescriptionMessage = exports2.RowDescriptionMessage = exports2.Field = exports2.CopyResponse = exports2.CopyDataMessage = exports2.DatabaseError = exports2.copyDone = exports2.emptyQuery = exports2.replicationStart = exports2.portalSuspended = exports2.noData = exports2.closeComplete = exports2.bindComplete = exports2.parseComplete = void 0;
|
|
19585
|
+
exports2.parseComplete = {
|
|
19453
19586
|
name: "parseComplete",
|
|
19454
19587
|
length: 5
|
|
19455
19588
|
};
|
|
19456
|
-
|
|
19589
|
+
exports2.bindComplete = {
|
|
19457
19590
|
name: "bindComplete",
|
|
19458
19591
|
length: 5
|
|
19459
19592
|
};
|
|
19460
|
-
|
|
19593
|
+
exports2.closeComplete = {
|
|
19461
19594
|
name: "closeComplete",
|
|
19462
19595
|
length: 5
|
|
19463
19596
|
};
|
|
19464
|
-
|
|
19597
|
+
exports2.noData = {
|
|
19465
19598
|
name: "noData",
|
|
19466
19599
|
length: 5
|
|
19467
19600
|
};
|
|
19468
|
-
|
|
19601
|
+
exports2.portalSuspended = {
|
|
19469
19602
|
name: "portalSuspended",
|
|
19470
19603
|
length: 5
|
|
19471
19604
|
};
|
|
19472
|
-
|
|
19605
|
+
exports2.replicationStart = {
|
|
19473
19606
|
name: "replicationStart",
|
|
19474
19607
|
length: 4
|
|
19475
19608
|
};
|
|
19476
|
-
|
|
19609
|
+
exports2.emptyQuery = {
|
|
19477
19610
|
name: "emptyQuery",
|
|
19478
19611
|
length: 4
|
|
19479
19612
|
};
|
|
19480
|
-
|
|
19613
|
+
exports2.copyDone = {
|
|
19481
19614
|
name: "copyDone",
|
|
19482
19615
|
length: 4
|
|
19483
19616
|
};
|
|
@@ -19488,7 +19621,7 @@ var require_messages = __commonJS({
|
|
|
19488
19621
|
this.name = name;
|
|
19489
19622
|
}
|
|
19490
19623
|
};
|
|
19491
|
-
|
|
19624
|
+
exports2.DatabaseError = DatabaseError2;
|
|
19492
19625
|
var CopyDataMessage = class {
|
|
19493
19626
|
constructor(length, chunk) {
|
|
19494
19627
|
this.length = length;
|
|
@@ -19496,7 +19629,7 @@ var require_messages = __commonJS({
|
|
|
19496
19629
|
this.name = "copyData";
|
|
19497
19630
|
}
|
|
19498
19631
|
};
|
|
19499
|
-
|
|
19632
|
+
exports2.CopyDataMessage = CopyDataMessage;
|
|
19500
19633
|
var CopyResponse = class {
|
|
19501
19634
|
constructor(length, name, binary, columnCount) {
|
|
19502
19635
|
this.length = length;
|
|
@@ -19505,7 +19638,7 @@ var require_messages = __commonJS({
|
|
|
19505
19638
|
this.columnTypes = new Array(columnCount);
|
|
19506
19639
|
}
|
|
19507
19640
|
};
|
|
19508
|
-
|
|
19641
|
+
exports2.CopyResponse = CopyResponse;
|
|
19509
19642
|
var Field = class {
|
|
19510
19643
|
constructor(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, format) {
|
|
19511
19644
|
this.name = name;
|
|
@@ -19517,7 +19650,7 @@ var require_messages = __commonJS({
|
|
|
19517
19650
|
this.format = format;
|
|
19518
19651
|
}
|
|
19519
19652
|
};
|
|
19520
|
-
|
|
19653
|
+
exports2.Field = Field;
|
|
19521
19654
|
var RowDescriptionMessage = class {
|
|
19522
19655
|
constructor(length, fieldCount) {
|
|
19523
19656
|
this.length = length;
|
|
@@ -19526,7 +19659,7 @@ var require_messages = __commonJS({
|
|
|
19526
19659
|
this.fields = new Array(this.fieldCount);
|
|
19527
19660
|
}
|
|
19528
19661
|
};
|
|
19529
|
-
|
|
19662
|
+
exports2.RowDescriptionMessage = RowDescriptionMessage;
|
|
19530
19663
|
var ParameterDescriptionMessage = class {
|
|
19531
19664
|
constructor(length, parameterCount) {
|
|
19532
19665
|
this.length = length;
|
|
@@ -19535,7 +19668,7 @@ var require_messages = __commonJS({
|
|
|
19535
19668
|
this.dataTypeIDs = new Array(this.parameterCount);
|
|
19536
19669
|
}
|
|
19537
19670
|
};
|
|
19538
|
-
|
|
19671
|
+
exports2.ParameterDescriptionMessage = ParameterDescriptionMessage;
|
|
19539
19672
|
var ParameterStatusMessage = class {
|
|
19540
19673
|
constructor(length, parameterName, parameterValue) {
|
|
19541
19674
|
this.length = length;
|
|
@@ -19544,7 +19677,7 @@ var require_messages = __commonJS({
|
|
|
19544
19677
|
this.name = "parameterStatus";
|
|
19545
19678
|
}
|
|
19546
19679
|
};
|
|
19547
|
-
|
|
19680
|
+
exports2.ParameterStatusMessage = ParameterStatusMessage;
|
|
19548
19681
|
var AuthenticationMD5Password = class {
|
|
19549
19682
|
constructor(length, salt) {
|
|
19550
19683
|
this.length = length;
|
|
@@ -19552,7 +19685,7 @@ var require_messages = __commonJS({
|
|
|
19552
19685
|
this.name = "authenticationMD5Password";
|
|
19553
19686
|
}
|
|
19554
19687
|
};
|
|
19555
|
-
|
|
19688
|
+
exports2.AuthenticationMD5Password = AuthenticationMD5Password;
|
|
19556
19689
|
var BackendKeyDataMessage = class {
|
|
19557
19690
|
constructor(length, processID, secretKey) {
|
|
19558
19691
|
this.length = length;
|
|
@@ -19561,7 +19694,7 @@ var require_messages = __commonJS({
|
|
|
19561
19694
|
this.name = "backendKeyData";
|
|
19562
19695
|
}
|
|
19563
19696
|
};
|
|
19564
|
-
|
|
19697
|
+
exports2.BackendKeyDataMessage = BackendKeyDataMessage;
|
|
19565
19698
|
var NotificationResponseMessage = class {
|
|
19566
19699
|
constructor(length, processId, channel, payload) {
|
|
19567
19700
|
this.length = length;
|
|
@@ -19571,7 +19704,7 @@ var require_messages = __commonJS({
|
|
|
19571
19704
|
this.name = "notification";
|
|
19572
19705
|
}
|
|
19573
19706
|
};
|
|
19574
|
-
|
|
19707
|
+
exports2.NotificationResponseMessage = NotificationResponseMessage;
|
|
19575
19708
|
var ReadyForQueryMessage = class {
|
|
19576
19709
|
constructor(length, status) {
|
|
19577
19710
|
this.length = length;
|
|
@@ -19579,7 +19712,7 @@ var require_messages = __commonJS({
|
|
|
19579
19712
|
this.name = "readyForQuery";
|
|
19580
19713
|
}
|
|
19581
19714
|
};
|
|
19582
|
-
|
|
19715
|
+
exports2.ReadyForQueryMessage = ReadyForQueryMessage;
|
|
19583
19716
|
var CommandCompleteMessage = class {
|
|
19584
19717
|
constructor(length, text) {
|
|
19585
19718
|
this.length = length;
|
|
@@ -19587,7 +19720,7 @@ var require_messages = __commonJS({
|
|
|
19587
19720
|
this.name = "commandComplete";
|
|
19588
19721
|
}
|
|
19589
19722
|
};
|
|
19590
|
-
|
|
19723
|
+
exports2.CommandCompleteMessage = CommandCompleteMessage;
|
|
19591
19724
|
var DataRowMessage = class {
|
|
19592
19725
|
constructor(length, fields) {
|
|
19593
19726
|
this.length = length;
|
|
@@ -19596,7 +19729,7 @@ var require_messages = __commonJS({
|
|
|
19596
19729
|
this.fieldCount = fields.length;
|
|
19597
19730
|
}
|
|
19598
19731
|
};
|
|
19599
|
-
|
|
19732
|
+
exports2.DataRowMessage = DataRowMessage;
|
|
19600
19733
|
var NoticeMessage = class {
|
|
19601
19734
|
constructor(length, message) {
|
|
19602
19735
|
this.length = length;
|
|
@@ -19604,16 +19737,16 @@ var require_messages = __commonJS({
|
|
|
19604
19737
|
this.name = "notice";
|
|
19605
19738
|
}
|
|
19606
19739
|
};
|
|
19607
|
-
|
|
19740
|
+
exports2.NoticeMessage = NoticeMessage;
|
|
19608
19741
|
}
|
|
19609
19742
|
});
|
|
19610
19743
|
|
|
19611
19744
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-writer.js
|
|
19612
19745
|
var require_buffer_writer = __commonJS({
|
|
19613
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-writer.js"(
|
|
19746
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-writer.js"(exports2) {
|
|
19614
19747
|
"use strict";
|
|
19615
|
-
Object.defineProperty(
|
|
19616
|
-
|
|
19748
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19749
|
+
exports2.Writer = void 0;
|
|
19617
19750
|
var Writer = class {
|
|
19618
19751
|
constructor(size = 256) {
|
|
19619
19752
|
this.size = size;
|
|
@@ -19685,16 +19818,16 @@ var require_buffer_writer = __commonJS({
|
|
|
19685
19818
|
return result;
|
|
19686
19819
|
}
|
|
19687
19820
|
};
|
|
19688
|
-
|
|
19821
|
+
exports2.Writer = Writer;
|
|
19689
19822
|
}
|
|
19690
19823
|
});
|
|
19691
19824
|
|
|
19692
19825
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/serializer.js
|
|
19693
19826
|
var require_serializer = __commonJS({
|
|
19694
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/serializer.js"(
|
|
19827
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/serializer.js"(exports2) {
|
|
19695
19828
|
"use strict";
|
|
19696
|
-
Object.defineProperty(
|
|
19697
|
-
|
|
19829
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19830
|
+
exports2.serialize = void 0;
|
|
19698
19831
|
var buffer_writer_1 = require_buffer_writer();
|
|
19699
19832
|
var writer = new buffer_writer_1.Writer();
|
|
19700
19833
|
var startup = (opts) => {
|
|
@@ -19902,16 +20035,16 @@ var require_serializer = __commonJS({
|
|
|
19902
20035
|
copyFail,
|
|
19903
20036
|
cancel
|
|
19904
20037
|
};
|
|
19905
|
-
|
|
20038
|
+
exports2.serialize = serialize;
|
|
19906
20039
|
}
|
|
19907
20040
|
});
|
|
19908
20041
|
|
|
19909
20042
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-reader.js
|
|
19910
20043
|
var require_buffer_reader = __commonJS({
|
|
19911
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-reader.js"(
|
|
20044
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/buffer-reader.js"(exports2) {
|
|
19912
20045
|
"use strict";
|
|
19913
|
-
Object.defineProperty(
|
|
19914
|
-
|
|
20046
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20047
|
+
exports2.BufferReader = void 0;
|
|
19915
20048
|
var BufferReader = class {
|
|
19916
20049
|
constructor(offset = 0) {
|
|
19917
20050
|
this.offset = offset;
|
|
@@ -19961,16 +20094,16 @@ var require_buffer_reader = __commonJS({
|
|
|
19961
20094
|
return result;
|
|
19962
20095
|
}
|
|
19963
20096
|
};
|
|
19964
|
-
|
|
20097
|
+
exports2.BufferReader = BufferReader;
|
|
19965
20098
|
}
|
|
19966
20099
|
});
|
|
19967
20100
|
|
|
19968
20101
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/parser.js
|
|
19969
20102
|
var require_parser = __commonJS({
|
|
19970
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/parser.js"(
|
|
20103
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/parser.js"(exports2) {
|
|
19971
20104
|
"use strict";
|
|
19972
|
-
Object.defineProperty(
|
|
19973
|
-
|
|
20105
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20106
|
+
exports2.Parser = void 0;
|
|
19974
20107
|
var messages_1 = require_messages();
|
|
19975
20108
|
var buffer_reader_1 = require_buffer_reader();
|
|
19976
20109
|
var CODE_LENGTH = 1;
|
|
@@ -20120,7 +20253,7 @@ var require_parser = __commonJS({
|
|
|
20120
20253
|
return message;
|
|
20121
20254
|
}
|
|
20122
20255
|
};
|
|
20123
|
-
|
|
20256
|
+
exports2.Parser = Parser;
|
|
20124
20257
|
var parseReadyForQueryMessage = (reader) => {
|
|
20125
20258
|
const status = reader.string(1);
|
|
20126
20259
|
return new messages_1.ReadyForQueryMessage(LATEINIT_LENGTH, status);
|
|
@@ -20274,42 +20407,42 @@ var require_parser = __commonJS({
|
|
|
20274
20407
|
|
|
20275
20408
|
// ../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/index.js
|
|
20276
20409
|
var require_dist2 = __commonJS({
|
|
20277
|
-
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/index.js"(
|
|
20410
|
+
"../../node_modules/.pnpm/pg-protocol@1.14.0/node_modules/pg-protocol/dist/index.js"(exports2) {
|
|
20278
20411
|
"use strict";
|
|
20279
|
-
Object.defineProperty(
|
|
20280
|
-
|
|
20412
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20413
|
+
exports2.DatabaseError = exports2.serialize = exports2.parse = void 0;
|
|
20281
20414
|
var messages_1 = require_messages();
|
|
20282
|
-
Object.defineProperty(
|
|
20415
|
+
Object.defineProperty(exports2, "DatabaseError", { enumerable: true, get: function() {
|
|
20283
20416
|
return messages_1.DatabaseError;
|
|
20284
20417
|
} });
|
|
20285
20418
|
var serializer_1 = require_serializer();
|
|
20286
|
-
Object.defineProperty(
|
|
20419
|
+
Object.defineProperty(exports2, "serialize", { enumerable: true, get: function() {
|
|
20287
20420
|
return serializer_1.serialize;
|
|
20288
20421
|
} });
|
|
20289
20422
|
var parser_1 = require_parser();
|
|
20290
20423
|
function parse2(stream, callback) {
|
|
20291
20424
|
const parser = new parser_1.Parser();
|
|
20292
20425
|
stream.on("data", (buffer) => parser.parse(buffer, callback));
|
|
20293
|
-
return new Promise((
|
|
20426
|
+
return new Promise((resolve) => stream.on("end", () => resolve()));
|
|
20294
20427
|
}
|
|
20295
|
-
|
|
20428
|
+
exports2.parse = parse2;
|
|
20296
20429
|
}
|
|
20297
20430
|
});
|
|
20298
20431
|
|
|
20299
20432
|
// ../../node_modules/.pnpm/pg-cloudflare@1.4.0/node_modules/pg-cloudflare/dist/empty.js
|
|
20300
20433
|
var require_empty = __commonJS({
|
|
20301
|
-
"../../node_modules/.pnpm/pg-cloudflare@1.4.0/node_modules/pg-cloudflare/dist/empty.js"(
|
|
20434
|
+
"../../node_modules/.pnpm/pg-cloudflare@1.4.0/node_modules/pg-cloudflare/dist/empty.js"(exports2) {
|
|
20302
20435
|
"use strict";
|
|
20303
|
-
Object.defineProperty(
|
|
20304
|
-
|
|
20436
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
20437
|
+
exports2.default = {};
|
|
20305
20438
|
}
|
|
20306
20439
|
});
|
|
20307
20440
|
|
|
20308
20441
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/stream.js
|
|
20309
20442
|
var require_stream2 = __commonJS({
|
|
20310
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/stream.js"(
|
|
20443
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/stream.js"(exports2, module2) {
|
|
20311
20444
|
var { getStream, getSecureStream } = getStreamFuncs();
|
|
20312
|
-
|
|
20445
|
+
module2.exports = {
|
|
20313
20446
|
/**
|
|
20314
20447
|
* Get a socket stream compatible with the current runtime environment.
|
|
20315
20448
|
* @returns {Duplex}
|
|
@@ -20324,11 +20457,11 @@ var require_stream2 = __commonJS({
|
|
|
20324
20457
|
};
|
|
20325
20458
|
function getNodejsStreamFuncs() {
|
|
20326
20459
|
function getStream2(ssl) {
|
|
20327
|
-
const net =
|
|
20460
|
+
const net = require("net");
|
|
20328
20461
|
return new net.Socket();
|
|
20329
20462
|
}
|
|
20330
20463
|
function getSecureStream2(options) {
|
|
20331
|
-
const tls =
|
|
20464
|
+
const tls = require("tls");
|
|
20332
20465
|
return tls.connect(options);
|
|
20333
20466
|
}
|
|
20334
20467
|
return {
|
|
@@ -20373,9 +20506,9 @@ var require_stream2 = __commonJS({
|
|
|
20373
20506
|
|
|
20374
20507
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection.js
|
|
20375
20508
|
var require_connection = __commonJS({
|
|
20376
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection.js"(
|
|
20509
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/connection.js"(exports2, module2) {
|
|
20377
20510
|
"use strict";
|
|
20378
|
-
var EventEmitter =
|
|
20511
|
+
var EventEmitter = require("events").EventEmitter;
|
|
20379
20512
|
var { parse: parse2, serialize } = require_dist2();
|
|
20380
20513
|
var { getStream, getSecureStream } = require_stream2();
|
|
20381
20514
|
var flushBuffer = serialize.flush();
|
|
@@ -20447,7 +20580,7 @@ var require_connection = __commonJS({
|
|
|
20447
20580
|
options.key = self.ssl.key;
|
|
20448
20581
|
}
|
|
20449
20582
|
}
|
|
20450
|
-
const net =
|
|
20583
|
+
const net = require("net");
|
|
20451
20584
|
if (net.isIP && net.isIP(host) === 0) {
|
|
20452
20585
|
options.servername = host;
|
|
20453
20586
|
}
|
|
@@ -20550,16 +20683,16 @@ var require_connection = __commonJS({
|
|
|
20550
20683
|
this._send(serialize.copyFail(msg));
|
|
20551
20684
|
}
|
|
20552
20685
|
};
|
|
20553
|
-
|
|
20686
|
+
module2.exports = Connection2;
|
|
20554
20687
|
}
|
|
20555
20688
|
});
|
|
20556
20689
|
|
|
20557
20690
|
// ../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js
|
|
20558
20691
|
var require_split2 = __commonJS({
|
|
20559
|
-
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(
|
|
20692
|
+
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(exports2, module2) {
|
|
20560
20693
|
"use strict";
|
|
20561
|
-
var { Transform } =
|
|
20562
|
-
var { StringDecoder } =
|
|
20694
|
+
var { Transform } = require("stream");
|
|
20695
|
+
var { StringDecoder } = require("string_decoder");
|
|
20563
20696
|
var kLast = Symbol("last");
|
|
20564
20697
|
var kDecoder = Symbol("decoder");
|
|
20565
20698
|
function transform2(chunk, enc, cb) {
|
|
@@ -20651,18 +20784,18 @@ var require_split2 = __commonJS({
|
|
|
20651
20784
|
};
|
|
20652
20785
|
return stream;
|
|
20653
20786
|
}
|
|
20654
|
-
|
|
20787
|
+
module2.exports = split;
|
|
20655
20788
|
}
|
|
20656
20789
|
});
|
|
20657
20790
|
|
|
20658
20791
|
// ../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js
|
|
20659
20792
|
var require_helper = __commonJS({
|
|
20660
|
-
"../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js"(
|
|
20793
|
+
"../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/helper.js"(exports2, module2) {
|
|
20661
20794
|
"use strict";
|
|
20662
|
-
var path6 =
|
|
20663
|
-
var Stream =
|
|
20795
|
+
var path6 = require("path");
|
|
20796
|
+
var Stream = require("stream").Stream;
|
|
20664
20797
|
var split = require_split2();
|
|
20665
|
-
var util =
|
|
20798
|
+
var util = require("util");
|
|
20666
20799
|
var defaultPort = 5432;
|
|
20667
20800
|
var isWin = process.platform === "win32";
|
|
20668
20801
|
var warnStream = process.stderr;
|
|
@@ -20683,7 +20816,7 @@ var require_helper = __commonJS({
|
|
|
20683
20816
|
warnStream.write(util.format.apply(util, args));
|
|
20684
20817
|
}
|
|
20685
20818
|
}
|
|
20686
|
-
Object.defineProperty(
|
|
20819
|
+
Object.defineProperty(module2.exports, "isWin", {
|
|
20687
20820
|
get: function() {
|
|
20688
20821
|
return isWin;
|
|
20689
20822
|
},
|
|
@@ -20691,17 +20824,17 @@ var require_helper = __commonJS({
|
|
|
20691
20824
|
isWin = val;
|
|
20692
20825
|
}
|
|
20693
20826
|
});
|
|
20694
|
-
|
|
20827
|
+
module2.exports.warnTo = function(stream) {
|
|
20695
20828
|
var old = warnStream;
|
|
20696
20829
|
warnStream = stream;
|
|
20697
20830
|
return old;
|
|
20698
20831
|
};
|
|
20699
|
-
|
|
20832
|
+
module2.exports.getFileName = function(rawEnv) {
|
|
20700
20833
|
var env = rawEnv || process.env;
|
|
20701
20834
|
var file = env.PGPASSFILE || (isWin ? path6.join(env.APPDATA || "./", "postgresql", "pgpass.conf") : path6.join(env.HOME || "./", ".pgpass"));
|
|
20702
20835
|
return file;
|
|
20703
20836
|
};
|
|
20704
|
-
|
|
20837
|
+
module2.exports.usePgPass = function(stats, fname) {
|
|
20705
20838
|
if (Object.prototype.hasOwnProperty.call(process.env, "PGPASSWORD")) {
|
|
20706
20839
|
return false;
|
|
20707
20840
|
}
|
|
@@ -20719,7 +20852,7 @@ var require_helper = __commonJS({
|
|
|
20719
20852
|
}
|
|
20720
20853
|
return true;
|
|
20721
20854
|
};
|
|
20722
|
-
var matcher =
|
|
20855
|
+
var matcher = module2.exports.match = function(connInfo, entry) {
|
|
20723
20856
|
return fieldNames.slice(0, -1).reduce(function(prev, field, idx) {
|
|
20724
20857
|
if (idx == 1) {
|
|
20725
20858
|
if (Number(connInfo[field] || defaultPort) === Number(entry[field])) {
|
|
@@ -20729,7 +20862,7 @@ var require_helper = __commonJS({
|
|
|
20729
20862
|
return prev && (entry[field] === "*" || entry[field] === connInfo[field]);
|
|
20730
20863
|
}, true);
|
|
20731
20864
|
};
|
|
20732
|
-
|
|
20865
|
+
module2.exports.getPassword = function(connInfo, stream, cb) {
|
|
20733
20866
|
var pass;
|
|
20734
20867
|
var lineStream = stream.pipe(split());
|
|
20735
20868
|
function onLine(line) {
|
|
@@ -20751,7 +20884,7 @@ var require_helper = __commonJS({
|
|
|
20751
20884
|
stream.on("error", onErr);
|
|
20752
20885
|
lineStream.on("data", onLine).on("end", onEnd).on("error", onErr);
|
|
20753
20886
|
};
|
|
20754
|
-
var parseLine =
|
|
20887
|
+
var parseLine = module2.exports.parseLine = function(line) {
|
|
20755
20888
|
if (line.length < 11 || line.match(/^\s+#/)) {
|
|
20756
20889
|
return null;
|
|
20757
20890
|
}
|
|
@@ -20786,7 +20919,7 @@ var require_helper = __commonJS({
|
|
|
20786
20919
|
obj = Object.keys(obj).length === nrOfFields ? obj : null;
|
|
20787
20920
|
return obj;
|
|
20788
20921
|
};
|
|
20789
|
-
var isValidEntry =
|
|
20922
|
+
var isValidEntry = module2.exports.isValidEntry = function(entry) {
|
|
20790
20923
|
var rules = {
|
|
20791
20924
|
// host
|
|
20792
20925
|
0: function(x) {
|
|
@@ -20828,12 +20961,12 @@ var require_helper = __commonJS({
|
|
|
20828
20961
|
|
|
20829
20962
|
// ../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js
|
|
20830
20963
|
var require_lib = __commonJS({
|
|
20831
|
-
"../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(
|
|
20964
|
+
"../../node_modules/.pnpm/pgpass@1.0.5/node_modules/pgpass/lib/index.js"(exports2, module2) {
|
|
20832
20965
|
"use strict";
|
|
20833
|
-
var path6 =
|
|
20834
|
-
var fs6 =
|
|
20966
|
+
var path6 = require("path");
|
|
20967
|
+
var fs6 = require("fs");
|
|
20835
20968
|
var helper = require_helper();
|
|
20836
|
-
|
|
20969
|
+
module2.exports = function(connInfo, cb) {
|
|
20837
20970
|
var file = helper.getFileName();
|
|
20838
20971
|
fs6.stat(file, function(err, stat) {
|
|
20839
20972
|
if (err || !helper.usePgPass(stat, file)) {
|
|
@@ -20843,16 +20976,16 @@ var require_lib = __commonJS({
|
|
|
20843
20976
|
helper.getPassword(connInfo, st, cb);
|
|
20844
20977
|
});
|
|
20845
20978
|
};
|
|
20846
|
-
|
|
20979
|
+
module2.exports.warnTo = helper.warnTo;
|
|
20847
20980
|
}
|
|
20848
20981
|
});
|
|
20849
20982
|
|
|
20850
20983
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/client.js
|
|
20851
20984
|
var require_client = __commonJS({
|
|
20852
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/client.js"(
|
|
20853
|
-
var EventEmitter =
|
|
20985
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/client.js"(exports2, module2) {
|
|
20986
|
+
var EventEmitter = require("events").EventEmitter;
|
|
20854
20987
|
var utils = require_utils2();
|
|
20855
|
-
var nodeUtils =
|
|
20988
|
+
var nodeUtils = require("util");
|
|
20856
20989
|
var sasl = require_sasl();
|
|
20857
20990
|
var TypeOverrides2 = require_type_overrides();
|
|
20858
20991
|
var ConnectionParameters = require_connection_parameters();
|
|
@@ -21033,12 +21166,12 @@ var require_client = __commonJS({
|
|
|
21033
21166
|
this._connect(callback);
|
|
21034
21167
|
return;
|
|
21035
21168
|
}
|
|
21036
|
-
return new this._Promise((
|
|
21169
|
+
return new this._Promise((resolve, reject) => {
|
|
21037
21170
|
this._connect((error2) => {
|
|
21038
21171
|
if (error2) {
|
|
21039
21172
|
reject(error2);
|
|
21040
21173
|
} else {
|
|
21041
|
-
|
|
21174
|
+
resolve(this);
|
|
21042
21175
|
}
|
|
21043
21176
|
});
|
|
21044
21177
|
});
|
|
@@ -21385,8 +21518,8 @@ var require_client = __commonJS({
|
|
|
21385
21518
|
} else {
|
|
21386
21519
|
query = new Query2(config2, values, callback);
|
|
21387
21520
|
if (!query.callback) {
|
|
21388
|
-
result = new this._Promise((
|
|
21389
|
-
query.callback = (err, res) => err ? reject(err) :
|
|
21521
|
+
result = new this._Promise((resolve, reject) => {
|
|
21522
|
+
query.callback = (err, res) => err ? reject(err) : resolve(res);
|
|
21390
21523
|
}).catch((err) => {
|
|
21391
21524
|
Error.captureStackTrace(err);
|
|
21392
21525
|
throw err;
|
|
@@ -21470,8 +21603,8 @@ var require_client = __commonJS({
|
|
|
21470
21603
|
if (cb) {
|
|
21471
21604
|
this.connection.once("end", cb);
|
|
21472
21605
|
} else {
|
|
21473
|
-
return new this._Promise((
|
|
21474
|
-
this.connection.once("end",
|
|
21606
|
+
return new this._Promise((resolve) => {
|
|
21607
|
+
this.connection.once("end", resolve);
|
|
21475
21608
|
});
|
|
21476
21609
|
}
|
|
21477
21610
|
}
|
|
@@ -21481,15 +21614,15 @@ var require_client = __commonJS({
|
|
|
21481
21614
|
}
|
|
21482
21615
|
};
|
|
21483
21616
|
Client2.Query = Query2;
|
|
21484
|
-
|
|
21617
|
+
module2.exports = Client2;
|
|
21485
21618
|
}
|
|
21486
21619
|
});
|
|
21487
21620
|
|
|
21488
21621
|
// ../../node_modules/.pnpm/pg-pool@3.14.0_pg@8.21.0/node_modules/pg-pool/index.js
|
|
21489
21622
|
var require_pg_pool = __commonJS({
|
|
21490
|
-
"../../node_modules/.pnpm/pg-pool@3.14.0_pg@8.21.0/node_modules/pg-pool/index.js"(
|
|
21623
|
+
"../../node_modules/.pnpm/pg-pool@3.14.0_pg@8.21.0/node_modules/pg-pool/index.js"(exports2, module2) {
|
|
21491
21624
|
"use strict";
|
|
21492
|
-
var EventEmitter =
|
|
21625
|
+
var EventEmitter = require("events").EventEmitter;
|
|
21493
21626
|
var NOOP = function() {
|
|
21494
21627
|
};
|
|
21495
21628
|
var removeWhere = (list, predicate) => {
|
|
@@ -21520,8 +21653,8 @@ var require_pg_pool = __commonJS({
|
|
|
21520
21653
|
const cb = function(err, client) {
|
|
21521
21654
|
err ? rej(err) : res(client);
|
|
21522
21655
|
};
|
|
21523
|
-
const result = new Promise2(function(
|
|
21524
|
-
res =
|
|
21656
|
+
const result = new Promise2(function(resolve, reject) {
|
|
21657
|
+
res = resolve;
|
|
21525
21658
|
rej = reject;
|
|
21526
21659
|
}).catch((err) => {
|
|
21527
21660
|
Error.captureStackTrace(err);
|
|
@@ -21582,7 +21715,7 @@ var require_pg_pool = __commonJS({
|
|
|
21582
21715
|
if (typeof Promise2.try === "function") {
|
|
21583
21716
|
return Promise2.try(f);
|
|
21584
21717
|
}
|
|
21585
|
-
return new Promise2((
|
|
21718
|
+
return new Promise2((resolve) => resolve(f()));
|
|
21586
21719
|
}
|
|
21587
21720
|
_isFull() {
|
|
21588
21721
|
return this._clients.length >= this.options.max;
|
|
@@ -21907,18 +22040,18 @@ var require_pg_pool = __commonJS({
|
|
|
21907
22040
|
return this._clients.length;
|
|
21908
22041
|
}
|
|
21909
22042
|
};
|
|
21910
|
-
|
|
22043
|
+
module2.exports = Pool2;
|
|
21911
22044
|
}
|
|
21912
22045
|
});
|
|
21913
22046
|
|
|
21914
22047
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/query.js
|
|
21915
22048
|
var require_query2 = __commonJS({
|
|
21916
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/query.js"(
|
|
22049
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/query.js"(exports2, module2) {
|
|
21917
22050
|
"use strict";
|
|
21918
|
-
var EventEmitter =
|
|
21919
|
-
var util =
|
|
22051
|
+
var EventEmitter = require("events").EventEmitter;
|
|
22052
|
+
var util = require("util");
|
|
21920
22053
|
var utils = require_utils2();
|
|
21921
|
-
var NativeQuery =
|
|
22054
|
+
var NativeQuery = module2.exports = function(config2, values, callback) {
|
|
21922
22055
|
EventEmitter.call(this);
|
|
21923
22056
|
config2 = utils.normalizeQueryConfig(config2, values, callback);
|
|
21924
22057
|
this.text = config2.text;
|
|
@@ -21975,8 +22108,8 @@ var require_query2 = __commonJS({
|
|
|
21975
22108
|
NativeQuery.prototype._getPromise = function() {
|
|
21976
22109
|
if (this._promise) return this._promise;
|
|
21977
22110
|
this._promise = new Promise(
|
|
21978
|
-
function(
|
|
21979
|
-
this._once("end",
|
|
22111
|
+
function(resolve, reject) {
|
|
22112
|
+
this._once("end", resolve);
|
|
21980
22113
|
this._once("error", reject);
|
|
21981
22114
|
}.bind(this)
|
|
21982
22115
|
);
|
|
@@ -22054,17 +22187,17 @@ var require_query2 = __commonJS({
|
|
|
22054
22187
|
|
|
22055
22188
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/client.js
|
|
22056
22189
|
var require_client2 = __commonJS({
|
|
22057
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/client.js"(
|
|
22058
|
-
var nodeUtils =
|
|
22190
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/client.js"(exports2, module2) {
|
|
22191
|
+
var nodeUtils = require("util");
|
|
22059
22192
|
var Native;
|
|
22060
22193
|
try {
|
|
22061
|
-
Native =
|
|
22194
|
+
Native = require("pg-native");
|
|
22062
22195
|
} catch (e) {
|
|
22063
22196
|
throw e;
|
|
22064
22197
|
}
|
|
22065
22198
|
var TypeOverrides2 = require_type_overrides();
|
|
22066
|
-
var EventEmitter =
|
|
22067
|
-
var util =
|
|
22199
|
+
var EventEmitter = require("events").EventEmitter;
|
|
22200
|
+
var util = require("util");
|
|
22068
22201
|
var ConnectionParameters = require_connection_parameters();
|
|
22069
22202
|
var NativeQuery = require_query2();
|
|
22070
22203
|
var queryQueueLengthDeprecationNotice = nodeUtils.deprecate(
|
|
@@ -22072,7 +22205,7 @@ var require_client2 = __commonJS({
|
|
|
22072
22205
|
},
|
|
22073
22206
|
"Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead."
|
|
22074
22207
|
);
|
|
22075
|
-
var Client2 =
|
|
22208
|
+
var Client2 = module2.exports = function(config2) {
|
|
22076
22209
|
EventEmitter.call(this);
|
|
22077
22210
|
config2 = config2 || {};
|
|
22078
22211
|
this._Promise = config2.Promise || global.Promise;
|
|
@@ -22153,12 +22286,12 @@ var require_client2 = __commonJS({
|
|
|
22153
22286
|
this._connect(callback);
|
|
22154
22287
|
return;
|
|
22155
22288
|
}
|
|
22156
|
-
return new this._Promise((
|
|
22289
|
+
return new this._Promise((resolve, reject) => {
|
|
22157
22290
|
this._connect((error2) => {
|
|
22158
22291
|
if (error2) {
|
|
22159
22292
|
reject(error2);
|
|
22160
22293
|
} else {
|
|
22161
|
-
|
|
22294
|
+
resolve(this);
|
|
22162
22295
|
}
|
|
22163
22296
|
});
|
|
22164
22297
|
});
|
|
@@ -22182,8 +22315,8 @@ var require_client2 = __commonJS({
|
|
|
22182
22315
|
query = new NativeQuery(config2, values, callback);
|
|
22183
22316
|
if (!query.callback) {
|
|
22184
22317
|
let resolveOut, rejectOut;
|
|
22185
|
-
result = new this._Promise((
|
|
22186
|
-
resolveOut =
|
|
22318
|
+
result = new this._Promise((resolve, reject) => {
|
|
22319
|
+
resolveOut = resolve;
|
|
22187
22320
|
rejectOut = reject;
|
|
22188
22321
|
}).catch((err) => {
|
|
22189
22322
|
Error.captureStackTrace(err);
|
|
@@ -22246,8 +22379,8 @@ var require_client2 = __commonJS({
|
|
|
22246
22379
|
}
|
|
22247
22380
|
let result;
|
|
22248
22381
|
if (!cb) {
|
|
22249
|
-
result = new this._Promise(function(
|
|
22250
|
-
cb = (err) => err ? reject(err) :
|
|
22382
|
+
result = new this._Promise(function(resolve, reject) {
|
|
22383
|
+
cb = (err) => err ? reject(err) : resolve();
|
|
22251
22384
|
});
|
|
22252
22385
|
}
|
|
22253
22386
|
this.native.end(function() {
|
|
@@ -22313,15 +22446,15 @@ var require_client2 = __commonJS({
|
|
|
22313
22446
|
|
|
22314
22447
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/index.js
|
|
22315
22448
|
var require_native = __commonJS({
|
|
22316
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/index.js"(
|
|
22449
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/native/index.js"(exports2, module2) {
|
|
22317
22450
|
"use strict";
|
|
22318
|
-
|
|
22451
|
+
module2.exports = require_client2();
|
|
22319
22452
|
}
|
|
22320
22453
|
});
|
|
22321
22454
|
|
|
22322
22455
|
// ../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/index.js
|
|
22323
22456
|
var require_lib2 = __commonJS({
|
|
22324
|
-
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/index.js"(
|
|
22457
|
+
"../../node_modules/.pnpm/pg@8.21.0/node_modules/pg/lib/index.js"(exports2, module2) {
|
|
22325
22458
|
"use strict";
|
|
22326
22459
|
var Client2 = require_client();
|
|
22327
22460
|
var defaults2 = require_defaults2();
|
|
@@ -22363,8 +22496,8 @@ var require_lib2 = __commonJS({
|
|
|
22363
22496
|
if (forceNative) {
|
|
22364
22497
|
clientConstructor = require_native();
|
|
22365
22498
|
}
|
|
22366
|
-
|
|
22367
|
-
Object.defineProperty(
|
|
22499
|
+
module2.exports = new PG(clientConstructor);
|
|
22500
|
+
Object.defineProperty(module2.exports, "native", {
|
|
22368
22501
|
configurable: true,
|
|
22369
22502
|
enumerable: false,
|
|
22370
22503
|
get() {
|
|
@@ -22376,7 +22509,7 @@ var require_lib2 = __commonJS({
|
|
|
22376
22509
|
throw err;
|
|
22377
22510
|
}
|
|
22378
22511
|
}
|
|
22379
|
-
Object.defineProperty(
|
|
22512
|
+
Object.defineProperty(module2.exports, "native", {
|
|
22380
22513
|
value: native
|
|
22381
22514
|
});
|
|
22382
22515
|
return native;
|
|
@@ -22395,37 +22528,38 @@ var init_trajectory = __esm({
|
|
|
22395
22528
|
});
|
|
22396
22529
|
|
|
22397
22530
|
// src/index.ts
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22531
|
+
var import_node_crypto7 = require("node:crypto");
|
|
22532
|
+
var fs5 = __toESM(require("node:fs"));
|
|
22533
|
+
var os5 = __toESM(require("node:os"));
|
|
22534
|
+
var path5 = __toESM(require("node:path"));
|
|
22401
22535
|
|
|
22402
22536
|
// ../cli/src/serve.ts
|
|
22403
22537
|
init_src2();
|
|
22404
22538
|
init_src4();
|
|
22405
22539
|
|
|
22406
22540
|
// ../connectors/src/feishu/index.ts
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
var execFileAsync = promisify(execFile);
|
|
22412
|
-
var __dirname = dirname(
|
|
22541
|
+
var import_node_child_process = require("node:child_process");
|
|
22542
|
+
var import_node_util = require("node:util");
|
|
22543
|
+
var import_node_path = require("node:path");
|
|
22544
|
+
var import_node_url = require("node:url");
|
|
22545
|
+
var execFileAsync = (0, import_node_util.promisify)(import_node_child_process.execFile);
|
|
22546
|
+
var __dirname = (0, import_node_path.dirname)((0, import_node_url.fileURLToPath)(__esm_import_meta_url));
|
|
22413
22547
|
|
|
22414
22548
|
// ../connectors/src/github/index.ts
|
|
22415
|
-
|
|
22416
|
-
|
|
22417
|
-
|
|
22418
|
-
|
|
22419
|
-
var execFile2 =
|
|
22420
|
-
var __dirname2 =
|
|
22549
|
+
var import_node_child_process2 = require("node:child_process");
|
|
22550
|
+
var import_node_util2 = require("node:util");
|
|
22551
|
+
var import_node_path2 = require("node:path");
|
|
22552
|
+
var import_node_url2 = require("node:url");
|
|
22553
|
+
var execFile2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
|
|
22554
|
+
var __dirname2 = (0, import_node_path2.dirname)((0, import_node_url2.fileURLToPath)(__esm_import_meta_url));
|
|
22421
22555
|
|
|
22422
22556
|
// ../adapters/src/claude-code/index.ts
|
|
22423
|
-
|
|
22424
|
-
|
|
22425
|
-
|
|
22426
|
-
|
|
22427
|
-
|
|
22428
|
-
|
|
22557
|
+
var import_node_child_process3 = require("node:child_process");
|
|
22558
|
+
var import_node_crypto2 = require("node:crypto");
|
|
22559
|
+
var fs = __toESM(require("node:fs"), 1);
|
|
22560
|
+
var os = __toESM(require("node:os"), 1);
|
|
22561
|
+
var path = __toESM(require("node:path"), 1);
|
|
22562
|
+
var readline = __toESM(require("node:readline"), 1);
|
|
22429
22563
|
function normalizeClaudeStreamLine(line) {
|
|
22430
22564
|
let parsed;
|
|
22431
22565
|
try {
|
|
@@ -22463,6 +22597,43 @@ function normalizeClaudeStreamLine(line) {
|
|
|
22463
22597
|
}
|
|
22464
22598
|
return [];
|
|
22465
22599
|
}
|
|
22600
|
+
function asNum(v) {
|
|
22601
|
+
return typeof v === "number" && Number.isFinite(v) ? v : 0;
|
|
22602
|
+
}
|
|
22603
|
+
function newClaudeUsageAcc() {
|
|
22604
|
+
return { input: 0, output: 0, cacheRead: 0, cacheCreation: 0, costUsd: null, saw: false };
|
|
22605
|
+
}
|
|
22606
|
+
function accumulateClaudeUsage(acc, p) {
|
|
22607
|
+
const type = p["type"];
|
|
22608
|
+
if (type === "assistant") {
|
|
22609
|
+
const msg = p["message"];
|
|
22610
|
+
const u = msg?.usage;
|
|
22611
|
+
if (u && typeof u === "object") {
|
|
22612
|
+
acc.input += asNum(u["input_tokens"]);
|
|
22613
|
+
acc.output += asNum(u["output_tokens"]);
|
|
22614
|
+
acc.cacheRead += asNum(u["cache_read_input_tokens"]);
|
|
22615
|
+
acc.cacheCreation += asNum(u["cache_creation_input_tokens"]);
|
|
22616
|
+
acc.saw = true;
|
|
22617
|
+
}
|
|
22618
|
+
} else if (type === "result") {
|
|
22619
|
+
const c = p["total_cost_usd"];
|
|
22620
|
+
if (typeof c === "number" && Number.isFinite(c)) {
|
|
22621
|
+
acc.costUsd = c;
|
|
22622
|
+
acc.saw = true;
|
|
22623
|
+
}
|
|
22624
|
+
}
|
|
22625
|
+
}
|
|
22626
|
+
function buildClaudeUsage(acc) {
|
|
22627
|
+
if (!acc.saw) return void 0;
|
|
22628
|
+
return {
|
|
22629
|
+
inputTokens: acc.input,
|
|
22630
|
+
outputTokens: acc.output,
|
|
22631
|
+
totalTokens: acc.input + acc.output,
|
|
22632
|
+
cacheReadTokens: acc.cacheRead,
|
|
22633
|
+
cacheCreationTokens: acc.cacheCreation,
|
|
22634
|
+
costUsdMicros: acc.costUsd != null ? Math.round(acc.costUsd * 1e6) : null
|
|
22635
|
+
};
|
|
22636
|
+
}
|
|
22466
22637
|
function scrubLeakyEnv(env) {
|
|
22467
22638
|
const LEAKY = /^npm_|^PNPM_|^INIT_CWD$|^OLDPWD$/;
|
|
22468
22639
|
return Object.fromEntries(Object.entries(env).filter(([k]) => !LEAKY.test(k)));
|
|
@@ -22480,14 +22651,35 @@ var ClaudeCodeAdapter = class {
|
|
|
22480
22651
|
constructor(opts = {}) {
|
|
22481
22652
|
this.opts = opts;
|
|
22482
22653
|
}
|
|
22654
|
+
/**
|
|
22655
|
+
* OTel 接线开关:opts.otel 优先,否则回落环境变量(OASIS_OTEL_ENDPOINT 设了即开)。
|
|
22656
|
+
* 关时返回 {}(无任何 OTEL_* 注入,行为与未接入前一致)。
|
|
22657
|
+
* runId 等进 OTEL_RESOURCE_ATTRIBUTES,让 Claude Code 自带 OTel 的上报归位到本次 run。
|
|
22658
|
+
*/
|
|
22659
|
+
resolveOtelEnv(job, runId) {
|
|
22660
|
+
const endpoint = this.opts.otel?.endpoint ?? process.env["OASIS_OTEL_ENDPOINT"];
|
|
22661
|
+
if (!endpoint) return {};
|
|
22662
|
+
const protocol = this.opts.otel?.protocol ?? process.env["OASIS_OTEL_PROTOCOL"] ?? "http/protobuf";
|
|
22663
|
+
const logs = this.opts.otel?.logs ?? process.env["OASIS_OTEL_LOGS"] === "1";
|
|
22664
|
+
return {
|
|
22665
|
+
CLAUDE_CODE_ENABLE_TELEMETRY: "1",
|
|
22666
|
+
OTEL_METRICS_EXPORTER: "otlp",
|
|
22667
|
+
...logs ? { OTEL_LOGS_EXPORTER: "otlp" } : {},
|
|
22668
|
+
OTEL_EXPORTER_OTLP_PROTOCOL: protocol,
|
|
22669
|
+
OTEL_EXPORTER_OTLP_ENDPOINT: endpoint,
|
|
22670
|
+
// 复用 agent 自己的 bearer 作上报鉴权(与 /api/traces/otlp 的 Bearer 门一致)。
|
|
22671
|
+
OTEL_EXPORTER_OTLP_HEADERS: `Authorization=Bearer ${job.actorToken}`,
|
|
22672
|
+
OTEL_RESOURCE_ATTRIBUTES: `oasis.run_id=${runId},oasis.actor_id=${job.actor},oasis.artifact_id=${job.artifactId}`
|
|
22673
|
+
};
|
|
22674
|
+
}
|
|
22483
22675
|
async spawn(job) {
|
|
22484
22676
|
const slug = job.artifactId.replace(/[^a-zA-Z0-9_-]+/g, "_").slice(0, 32);
|
|
22485
|
-
const id = `claude-${slug}-${randomUUID().slice(0, 8)}`;
|
|
22486
|
-
const
|
|
22677
|
+
const id = `claude-${slug}-${(0, import_node_crypto2.randomUUID)().slice(0, 8)}`;
|
|
22678
|
+
const dir = fs.mkdtempSync(
|
|
22487
22679
|
path.join(this.opts.workRoot ?? os.tmpdir(), "oasis-session-")
|
|
22488
22680
|
);
|
|
22489
22681
|
for (const [rel, content] of Object.entries(job.bundle.files)) {
|
|
22490
|
-
const file = path.join(
|
|
22682
|
+
const file = path.join(dir, rel);
|
|
22491
22683
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
22492
22684
|
fs.writeFileSync(file, content);
|
|
22493
22685
|
}
|
|
@@ -22505,8 +22697,9 @@ var ClaudeCodeAdapter = class {
|
|
|
22505
22697
|
...this.opts.model ? ["--model", this.opts.model] : [],
|
|
22506
22698
|
...this.opts.extraArgs ?? []
|
|
22507
22699
|
];
|
|
22508
|
-
const
|
|
22509
|
-
|
|
22700
|
+
const otelEnv = this.resolveOtelEnv(job, id);
|
|
22701
|
+
const child = (0, import_node_child_process3.spawn)(this.opts.claudeBin ?? "claude", args, {
|
|
22702
|
+
cwd: dir,
|
|
22510
22703
|
env: {
|
|
22511
22704
|
// 凭证泄漏防护:剔除 pnpm/npm 脚本注入的变量——npm_lifecycle_script 等会把 serve 的启动命令
|
|
22512
22705
|
// (含 `--dir <数据目录>`,即 operator-token 所在)泄给 agent,它据此用 operator 凭证冒充人。
|
|
@@ -22518,15 +22711,18 @@ var ClaudeCodeAdapter = class {
|
|
|
22518
22711
|
...this.opts.maxOutputTokens ? { CLAUDE_CODE_MAX_OUTPUT_TOKENS: String(this.opts.maxOutputTokens) } : {},
|
|
22519
22712
|
...job.wrapperPaths?.length ? { PATH: `${job.wrapperPaths.map((p) => path.dirname(p)).join(path.delimiter)}${path.delimiter}${job.env?.["PATH"] ?? process.env["PATH"] ?? ""}` } : {},
|
|
22520
22713
|
OASIS_SERVER: job.server.url,
|
|
22521
|
-
OASIS_TOKEN: job.actorToken
|
|
22714
|
+
OASIS_TOKEN: job.actorToken,
|
|
22715
|
+
// OTel 遥测(默认关;resolveOtelEnv 决定开不开,runId 进 resource 属性自然归位到本次 run)。
|
|
22716
|
+
...otelEnv
|
|
22522
22717
|
},
|
|
22523
22718
|
stdio: ["ignore", "pipe", "pipe"]
|
|
22524
22719
|
});
|
|
22525
|
-
let transcriptRef = path.join(
|
|
22720
|
+
let transcriptRef = path.join(dir, "transcript.txt");
|
|
22526
22721
|
const out = fs.createWriteStream(transcriptRef);
|
|
22527
22722
|
const telemetryCbs = [];
|
|
22528
22723
|
let eventSeq = 0;
|
|
22529
22724
|
let lastResult;
|
|
22725
|
+
const usageAcc = newClaudeUsageAcc();
|
|
22530
22726
|
const outputCbs = [];
|
|
22531
22727
|
if (this.opts.streamJson) {
|
|
22532
22728
|
const rl = readline.createInterface({ input: child.stdout });
|
|
@@ -22535,6 +22731,7 @@ var ClaudeCodeAdapter = class {
|
|
|
22535
22731
|
try {
|
|
22536
22732
|
const p = JSON.parse(line);
|
|
22537
22733
|
if (p["type"] === "result") lastResult = p;
|
|
22734
|
+
accumulateClaudeUsage(usageAcc, p);
|
|
22538
22735
|
if (p["type"] === "stream_event") {
|
|
22539
22736
|
const evt = p["event"];
|
|
22540
22737
|
if (evt?.type === "content_block_delta" && evt.delta?.type === "text_delta" && typeof evt.delta.text === "string") {
|
|
@@ -22590,7 +22787,7 @@ var ClaudeCodeAdapter = class {
|
|
|
22590
22787
|
out.end(() => {
|
|
22591
22788
|
try {
|
|
22592
22789
|
fs.renameSync(src, kept);
|
|
22593
|
-
fs.rmSync(
|
|
22790
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
22594
22791
|
} catch {
|
|
22595
22792
|
}
|
|
22596
22793
|
});
|
|
@@ -22598,7 +22795,8 @@ var ClaudeCodeAdapter = class {
|
|
|
22598
22795
|
} catch {
|
|
22599
22796
|
}
|
|
22600
22797
|
}
|
|
22601
|
-
|
|
22798
|
+
const usage = buildClaudeUsage(usageAcc);
|
|
22799
|
+
exited = { code: killedByUs ? null : code, ...reason ? { reason } : {}, transcriptRef, ...usage ? { usage } : {} };
|
|
22602
22800
|
for (const cb of callbacks.splice(0)) cb(exited);
|
|
22603
22801
|
});
|
|
22604
22802
|
return {
|
|
@@ -22622,12 +22820,108 @@ var ClaudeCodeAdapter = class {
|
|
|
22622
22820
|
};
|
|
22623
22821
|
|
|
22624
22822
|
// ../adapters/src/codex/index.ts
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
|
|
22628
|
-
|
|
22629
|
-
|
|
22630
|
-
|
|
22823
|
+
var import_node_child_process4 = require("node:child_process");
|
|
22824
|
+
var import_node_crypto3 = require("node:crypto");
|
|
22825
|
+
var fs2 = __toESM(require("node:fs"), 1);
|
|
22826
|
+
var os2 = __toESM(require("node:os"), 1);
|
|
22827
|
+
var path2 = __toESM(require("node:path"), 1);
|
|
22828
|
+
var readline2 = __toESM(require("node:readline"), 1);
|
|
22829
|
+
function codexNum(v) {
|
|
22830
|
+
return typeof v === "number" && Number.isFinite(v) ? v : 0;
|
|
22831
|
+
}
|
|
22832
|
+
function parseCodexTokenUsage(lines) {
|
|
22833
|
+
let last;
|
|
22834
|
+
for (const line of lines) {
|
|
22835
|
+
if (!line || line.indexOf("token_count") === -1) continue;
|
|
22836
|
+
let o;
|
|
22837
|
+
try {
|
|
22838
|
+
o = JSON.parse(line);
|
|
22839
|
+
} catch {
|
|
22840
|
+
continue;
|
|
22841
|
+
}
|
|
22842
|
+
if (o?.type === "event_msg" && o.payload?.type === "token_count" && o.payload.info?.total_token_usage) {
|
|
22843
|
+
last = o.payload.info.total_token_usage;
|
|
22844
|
+
}
|
|
22845
|
+
}
|
|
22846
|
+
if (!last) return void 0;
|
|
22847
|
+
const cacheRead = codexNum(last["cached_input_tokens"]) || codexNum(last["cache_read_input_tokens"]);
|
|
22848
|
+
const inputFresh = Math.max(codexNum(last["input_tokens"]) - cacheRead, 0);
|
|
22849
|
+
const output = codexNum(last["output_tokens"]) + codexNum(last["reasoning_output_tokens"]);
|
|
22850
|
+
return {
|
|
22851
|
+
inputTokens: inputFresh,
|
|
22852
|
+
outputTokens: output,
|
|
22853
|
+
totalTokens: inputFresh + output,
|
|
22854
|
+
// = input+output(不含 cache,与 claude/OTLP 口径一致)
|
|
22855
|
+
cacheReadTokens: cacheRead,
|
|
22856
|
+
cacheCreationTokens: null,
|
|
22857
|
+
// codex 不报 cache 写入
|
|
22858
|
+
costUsdMicros: null
|
|
22859
|
+
// codex rollout 无成本
|
|
22860
|
+
};
|
|
22861
|
+
}
|
|
22862
|
+
function codexSessionsRoot() {
|
|
22863
|
+
const candidates = [];
|
|
22864
|
+
const ch = process.env["CODEX_HOME"];
|
|
22865
|
+
if (ch) candidates.push(path2.join(ch, "sessions"));
|
|
22866
|
+
const home = process.env["HOME"] || os2.homedir();
|
|
22867
|
+
if (home) candidates.push(path2.join(home, ".codex", "sessions"));
|
|
22868
|
+
for (const c of candidates) {
|
|
22869
|
+
try {
|
|
22870
|
+
if (fs2.statSync(c).isDirectory()) return c;
|
|
22871
|
+
} catch {
|
|
22872
|
+
}
|
|
22873
|
+
}
|
|
22874
|
+
return "";
|
|
22875
|
+
}
|
|
22876
|
+
function listRecentRollouts(root, sinceMs) {
|
|
22877
|
+
const margin = sinceMs - 6e4;
|
|
22878
|
+
const found = [];
|
|
22879
|
+
const walk = (d) => {
|
|
22880
|
+
let ents;
|
|
22881
|
+
try {
|
|
22882
|
+
ents = fs2.readdirSync(d, { withFileTypes: true });
|
|
22883
|
+
} catch {
|
|
22884
|
+
return;
|
|
22885
|
+
}
|
|
22886
|
+
for (const ent of ents) {
|
|
22887
|
+
const p = path2.join(d, ent.name);
|
|
22888
|
+
if (ent.isDirectory()) walk(p);
|
|
22889
|
+
else if (ent.isFile() && ent.name.startsWith("rollout-") && ent.name.endsWith(".jsonl")) {
|
|
22890
|
+
let m = 0;
|
|
22891
|
+
try {
|
|
22892
|
+
m = fs2.statSync(p).mtimeMs;
|
|
22893
|
+
} catch {
|
|
22894
|
+
}
|
|
22895
|
+
if (m >= margin) found.push({ f: p, m });
|
|
22896
|
+
}
|
|
22897
|
+
}
|
|
22898
|
+
};
|
|
22899
|
+
walk(root);
|
|
22900
|
+
return found.sort((a, b) => b.m - a.m).map((x) => x.f);
|
|
22901
|
+
}
|
|
22902
|
+
function scanCodexUsage(workdir, sinceMs, sessionsRoot = codexSessionsRoot()) {
|
|
22903
|
+
try {
|
|
22904
|
+
for (const f of listRecentRollouts(sessionsRoot, sinceMs)) {
|
|
22905
|
+
let lines;
|
|
22906
|
+
try {
|
|
22907
|
+
lines = fs2.readFileSync(f, "utf8").split("\n");
|
|
22908
|
+
} catch {
|
|
22909
|
+
continue;
|
|
22910
|
+
}
|
|
22911
|
+
let meta;
|
|
22912
|
+
try {
|
|
22913
|
+
meta = JSON.parse(lines[0] ?? "");
|
|
22914
|
+
} catch {
|
|
22915
|
+
continue;
|
|
22916
|
+
}
|
|
22917
|
+
if (meta?.type === "session_meta" && meta.payload?.cwd === workdir) {
|
|
22918
|
+
return parseCodexTokenUsage(lines);
|
|
22919
|
+
}
|
|
22920
|
+
}
|
|
22921
|
+
} catch {
|
|
22922
|
+
}
|
|
22923
|
+
return void 0;
|
|
22924
|
+
}
|
|
22631
22925
|
function createCodexNormalizeState() {
|
|
22632
22926
|
return { toolUseIds: /* @__PURE__ */ new Set(), previousAgentMessage: false, lastAgentMessageEndedWithNewline: false };
|
|
22633
22927
|
}
|
|
@@ -22800,10 +23094,11 @@ var CodexAdapter = class {
|
|
|
22800
23094
|
}
|
|
22801
23095
|
async spawn(job) {
|
|
22802
23096
|
const slug = job.artifactId.replace(/[^a-zA-Z0-9_-]+/g, "_").slice(0, 32);
|
|
22803
|
-
const id = `codex-${slug}-${
|
|
22804
|
-
const
|
|
23097
|
+
const id = `codex-${slug}-${(0, import_node_crypto3.randomUUID)().slice(0, 8)}`;
|
|
23098
|
+
const startedAtMs = Date.now();
|
|
23099
|
+
const dir = fs2.mkdtempSync(path2.join(this.opts.workRoot ?? os2.tmpdir(), "oasis-session-"));
|
|
22805
23100
|
for (const [rel, content] of Object.entries(job.bundle.files)) {
|
|
22806
|
-
const file = path2.join(
|
|
23101
|
+
const file = path2.join(dir, rel);
|
|
22807
23102
|
fs2.mkdirSync(path2.dirname(file), { recursive: true });
|
|
22808
23103
|
fs2.writeFileSync(file, content);
|
|
22809
23104
|
}
|
|
@@ -22816,13 +23111,13 @@ var CodexAdapter = class {
|
|
|
22816
23111
|
"--dangerously-bypass-approvals-and-sandbox",
|
|
22817
23112
|
"--skip-git-repo-check",
|
|
22818
23113
|
"-C",
|
|
22819
|
-
|
|
23114
|
+
dir,
|
|
22820
23115
|
...this.opts.model ? ["--model", this.opts.model] : [],
|
|
22821
23116
|
...this.opts.extraArgs ?? [],
|
|
22822
23117
|
prompt
|
|
22823
23118
|
];
|
|
22824
|
-
const child =
|
|
22825
|
-
cwd:
|
|
23119
|
+
const child = (0, import_node_child_process4.spawn)(this.opts.codexBin ?? "codex", args, {
|
|
23120
|
+
cwd: dir,
|
|
22826
23121
|
env: {
|
|
22827
23122
|
...scrubLeakyEnv(process.env),
|
|
22828
23123
|
...this.opts.env,
|
|
@@ -22833,7 +23128,7 @@ var CodexAdapter = class {
|
|
|
22833
23128
|
},
|
|
22834
23129
|
stdio: ["ignore", "pipe", "pipe"]
|
|
22835
23130
|
});
|
|
22836
|
-
let transcriptRef = path2.join(
|
|
23131
|
+
let transcriptRef = path2.join(dir, "transcript.txt");
|
|
22837
23132
|
const out = fs2.createWriteStream(transcriptRef);
|
|
22838
23133
|
const outputCbs = [];
|
|
22839
23134
|
const telemetryCbs = [];
|
|
@@ -22871,7 +23166,7 @@ var CodexAdapter = class {
|
|
|
22871
23166
|
out.end(() => {
|
|
22872
23167
|
try {
|
|
22873
23168
|
fs2.renameSync(src, kept);
|
|
22874
|
-
fs2.rmSync(
|
|
23169
|
+
fs2.rmSync(dir, { recursive: true, force: true });
|
|
22875
23170
|
} catch {
|
|
22876
23171
|
}
|
|
22877
23172
|
});
|
|
@@ -22893,10 +23188,12 @@ var CodexAdapter = class {
|
|
|
22893
23188
|
});
|
|
22894
23189
|
child.on("exit", (code) => {
|
|
22895
23190
|
clearTimeout(timer);
|
|
23191
|
+
const usage = scanCodexUsage(dir, startedAtMs);
|
|
22896
23192
|
finish({
|
|
22897
23193
|
code: killedByUs ? null : code,
|
|
22898
23194
|
reason: killedByUs ? "timeout" : code === 0 ? "clean" : "error",
|
|
22899
|
-
transcriptRef
|
|
23195
|
+
transcriptRef,
|
|
23196
|
+
...usage ? { usage } : {}
|
|
22900
23197
|
});
|
|
22901
23198
|
});
|
|
22902
23199
|
return {
|
|
@@ -22920,12 +23217,12 @@ var CodexAdapter = class {
|
|
|
22920
23217
|
};
|
|
22921
23218
|
|
|
22922
23219
|
// ../adapters/src/_core/acp.ts
|
|
22923
|
-
|
|
22924
|
-
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
23220
|
+
var import_node_child_process5 = require("node:child_process");
|
|
23221
|
+
var import_node_crypto4 = require("node:crypto");
|
|
23222
|
+
var fs3 = __toESM(require("node:fs"), 1);
|
|
23223
|
+
var os3 = __toESM(require("node:os"), 1);
|
|
23224
|
+
var path3 = __toESM(require("node:path"), 1);
|
|
23225
|
+
var readline3 = __toESM(require("node:readline"), 1);
|
|
22929
23226
|
var ACPClient = class {
|
|
22930
23227
|
constructor(write, onOutput, onTelemetry, onStop, acceptNotification = () => true) {
|
|
22931
23228
|
this.write = write;
|
|
@@ -22940,8 +23237,8 @@ var ACPClient = class {
|
|
|
22940
23237
|
seq = 0;
|
|
22941
23238
|
request(method, params) {
|
|
22942
23239
|
const id = this.nextId++;
|
|
22943
|
-
return new Promise((
|
|
22944
|
-
this.pending.set(id, { resolve
|
|
23240
|
+
return new Promise((resolve, reject) => {
|
|
23241
|
+
this.pending.set(id, { resolve, reject, method });
|
|
22945
23242
|
this.write(JSON.stringify({ jsonrpc: "2.0", id, method, params }) + "\n");
|
|
22946
23243
|
});
|
|
22947
23244
|
}
|
|
@@ -23127,17 +23424,17 @@ function extractSessionID(result) {
|
|
|
23127
23424
|
async function runACPSession(job, cfg) {
|
|
23128
23425
|
const slug = job.artifactId.replace(/[^a-zA-Z0-9_-]+/g, "_").slice(0, 32);
|
|
23129
23426
|
const binTag = path3.basename(cfg.bin).replace(/[^a-zA-Z0-9]/g, "").slice(0, 12) || "acp";
|
|
23130
|
-
const id = `${binTag}-${slug}-${
|
|
23131
|
-
const
|
|
23427
|
+
const id = `${binTag}-${slug}-${(0, import_node_crypto4.randomUUID)().slice(0, 8)}`;
|
|
23428
|
+
const dir = fs3.mkdtempSync(path3.join(cfg.workRoot ?? os3.tmpdir(), "oasis-session-"));
|
|
23132
23429
|
for (const [rel, content] of Object.entries(job.bundle.files)) {
|
|
23133
|
-
const file = path3.join(
|
|
23430
|
+
const file = path3.join(dir, rel);
|
|
23134
23431
|
fs3.mkdirSync(path3.dirname(file), { recursive: true });
|
|
23135
23432
|
fs3.writeFileSync(file, content);
|
|
23136
23433
|
}
|
|
23137
23434
|
const task = job.bundle.files["TASK.md"];
|
|
23138
23435
|
if (!task) throw new Error("bundle \u7F3A TASK.md\uFF08\u88C5\u914D\u5668\u5951\u7EA6\uFF09");
|
|
23139
|
-
const child =
|
|
23140
|
-
cwd:
|
|
23436
|
+
const child = (0, import_node_child_process5.spawn)(cfg.bin, [...cfg.args ?? [], ...cfg.extraArgs ?? []], {
|
|
23437
|
+
cwd: dir,
|
|
23141
23438
|
env: {
|
|
23142
23439
|
...scrubLeakyEnv(process.env),
|
|
23143
23440
|
...cfg.env,
|
|
@@ -23149,7 +23446,7 @@ async function runACPSession(job, cfg) {
|
|
|
23149
23446
|
},
|
|
23150
23447
|
stdio: ["pipe", "pipe", "pipe"]
|
|
23151
23448
|
});
|
|
23152
|
-
let transcriptRef = path3.join(
|
|
23449
|
+
let transcriptRef = path3.join(dir, "transcript.txt");
|
|
23153
23450
|
const transcriptOut = fs3.createWriteStream(transcriptRef);
|
|
23154
23451
|
const outputCbs = [];
|
|
23155
23452
|
const telemetryCbs = [];
|
|
@@ -23167,7 +23464,7 @@ async function runACPSession(job, cfg) {
|
|
|
23167
23464
|
transcriptOut.end(() => {
|
|
23168
23465
|
try {
|
|
23169
23466
|
fs3.renameSync(src, kept);
|
|
23170
|
-
fs3.rmSync(
|
|
23467
|
+
fs3.rmSync(dir, { recursive: true, force: true });
|
|
23171
23468
|
} catch {
|
|
23172
23469
|
}
|
|
23173
23470
|
});
|
|
@@ -23204,14 +23501,14 @@ async function runACPSession(job, cfg) {
|
|
|
23204
23501
|
() => streamingCurrentTurn
|
|
23205
23502
|
);
|
|
23206
23503
|
const rl = readline3.createInterface({ input: child.stdout });
|
|
23207
|
-
const readerDone = new Promise((
|
|
23504
|
+
const readerDone = new Promise((resolve) => {
|
|
23208
23505
|
rl.on("line", (line) => {
|
|
23209
23506
|
transcriptOut.write(line + "\n");
|
|
23210
23507
|
client.handleLine(line);
|
|
23211
23508
|
});
|
|
23212
23509
|
rl.on("close", () => {
|
|
23213
23510
|
client.closeAllPending(new Error("process exited"));
|
|
23214
|
-
|
|
23511
|
+
resolve();
|
|
23215
23512
|
});
|
|
23216
23513
|
});
|
|
23217
23514
|
child.on("error", () => {
|
|
@@ -23230,7 +23527,7 @@ async function runACPSession(job, cfg) {
|
|
|
23230
23527
|
clientCapabilities: {}
|
|
23231
23528
|
});
|
|
23232
23529
|
const sessionRes = await client.request("session/new", {
|
|
23233
|
-
cwd:
|
|
23530
|
+
cwd: dir,
|
|
23234
23531
|
mcpServers: [],
|
|
23235
23532
|
...cfg.model ? { model: cfg.model } : {}
|
|
23236
23533
|
});
|
|
@@ -23342,24 +23639,24 @@ var KiroAdapter = class {
|
|
|
23342
23639
|
};
|
|
23343
23640
|
|
|
23344
23641
|
// ../adapters/src/_core/subprocess.ts
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23642
|
+
var import_node_child_process6 = require("node:child_process");
|
|
23643
|
+
var import_node_crypto5 = require("node:crypto");
|
|
23644
|
+
var fs4 = __toESM(require("node:fs"), 1);
|
|
23645
|
+
var os4 = __toESM(require("node:os"), 1);
|
|
23646
|
+
var path4 = __toESM(require("node:path"), 1);
|
|
23647
|
+
var readline4 = __toESM(require("node:readline"), 1);
|
|
23351
23648
|
function materialize(job, workRoot) {
|
|
23352
23649
|
const slug = job.artifactId.replace(/[^a-zA-Z0-9_-]+/g, "_").slice(0, 32);
|
|
23353
|
-
const id = `${slug}-${
|
|
23354
|
-
const
|
|
23650
|
+
const id = `${slug}-${(0, import_node_crypto5.randomUUID)().slice(0, 8)}`;
|
|
23651
|
+
const dir = fs4.mkdtempSync(path4.join(workRoot ?? os4.tmpdir(), "oasis-session-"));
|
|
23355
23652
|
for (const [rel, content] of Object.entries(job.bundle.files)) {
|
|
23356
|
-
const file = path4.join(
|
|
23653
|
+
const file = path4.join(dir, rel);
|
|
23357
23654
|
fs4.mkdirSync(path4.dirname(file), { recursive: true });
|
|
23358
23655
|
fs4.writeFileSync(file, content);
|
|
23359
23656
|
}
|
|
23360
23657
|
const task = job.bundle.files["TASK.md"];
|
|
23361
23658
|
if (!task) throw new Error("bundle \u7F3A TASK.md\uFF08\u88C5\u914D\u5668\u5951\u7EA6\uFF09");
|
|
23362
|
-
return { id, dir
|
|
23659
|
+
return { id, dir, task };
|
|
23363
23660
|
}
|
|
23364
23661
|
function buildEnv(job, extra) {
|
|
23365
23662
|
return {
|
|
@@ -23371,7 +23668,7 @@ function buildEnv(job, extra) {
|
|
|
23371
23668
|
OASIS_TOKEN: job.actorToken
|
|
23372
23669
|
};
|
|
23373
23670
|
}
|
|
23374
|
-
function makeFinish(id, cfg, transcriptRefPtr, transcriptOut,
|
|
23671
|
+
function makeFinish(id, cfg, transcriptRefPtr, transcriptOut, dir, exitCbs) {
|
|
23375
23672
|
let exited;
|
|
23376
23673
|
const finish = (info) => {
|
|
23377
23674
|
if (exited) return;
|
|
@@ -23384,7 +23681,7 @@ function makeFinish(id, cfg, transcriptRefPtr, transcriptOut, dir2, exitCbs) {
|
|
|
23384
23681
|
transcriptOut.end(() => {
|
|
23385
23682
|
try {
|
|
23386
23683
|
fs4.renameSync(src, kept);
|
|
23387
|
-
fs4.rmSync(
|
|
23684
|
+
fs4.rmSync(dir, { recursive: true, force: true });
|
|
23388
23685
|
} catch {
|
|
23389
23686
|
}
|
|
23390
23687
|
});
|
|
@@ -23399,19 +23696,19 @@ function makeFinish(id, cfg, transcriptRefPtr, transcriptOut, dir2, exitCbs) {
|
|
|
23399
23696
|
return { finish, exited: () => exited };
|
|
23400
23697
|
}
|
|
23401
23698
|
function runStreamJson(job, cfg) {
|
|
23402
|
-
const { id, dir
|
|
23403
|
-
const args = [...cfg.buildArgs(job,
|
|
23404
|
-
const child =
|
|
23405
|
-
cwd:
|
|
23699
|
+
const { id, dir, task: _task } = materialize(job, cfg.workRoot);
|
|
23700
|
+
const args = [...cfg.buildArgs(job, dir), ...cfg.extraArgs ?? []];
|
|
23701
|
+
const child = (0, import_node_child_process6.spawn)(cfg.bin, args, {
|
|
23702
|
+
cwd: dir,
|
|
23406
23703
|
env: buildEnv(job, cfg.env),
|
|
23407
23704
|
stdio: ["ignore", "pipe", "pipe"]
|
|
23408
23705
|
});
|
|
23409
|
-
const transcriptRefPtr = { value: path4.join(
|
|
23706
|
+
const transcriptRefPtr = { value: path4.join(dir, "transcript.txt") };
|
|
23410
23707
|
const transcriptOut = fs4.createWriteStream(transcriptRefPtr.value);
|
|
23411
23708
|
const outputCbs = [];
|
|
23412
23709
|
const telemetryCbs = [];
|
|
23413
23710
|
const exitCbs = [];
|
|
23414
|
-
const { finish, exited } = makeFinish(id, cfg, transcriptRefPtr, transcriptOut,
|
|
23711
|
+
const { finish, exited } = makeFinish(id, cfg, transcriptRefPtr, transcriptOut, dir, exitCbs);
|
|
23415
23712
|
let killedByUs = false;
|
|
23416
23713
|
let seq = 0;
|
|
23417
23714
|
child.stderr.pipe(transcriptOut);
|
|
@@ -23457,18 +23754,18 @@ function runStreamJson(job, cfg) {
|
|
|
23457
23754
|
});
|
|
23458
23755
|
}
|
|
23459
23756
|
function runOneShotText(job, cfg) {
|
|
23460
|
-
const { id, dir
|
|
23461
|
-
const args = [...cfg.buildArgs(job,
|
|
23462
|
-
const child =
|
|
23463
|
-
cwd:
|
|
23757
|
+
const { id, dir } = materialize(job, cfg.workRoot);
|
|
23758
|
+
const args = [...cfg.buildArgs(job, dir), ...cfg.extraArgs ?? []];
|
|
23759
|
+
const child = (0, import_node_child_process6.spawn)(cfg.bin, args, {
|
|
23760
|
+
cwd: dir,
|
|
23464
23761
|
env: buildEnv(job, cfg.env),
|
|
23465
23762
|
stdio: ["ignore", "pipe", "pipe"]
|
|
23466
23763
|
});
|
|
23467
|
-
const transcriptRefPtr = { value: path4.join(
|
|
23764
|
+
const transcriptRefPtr = { value: path4.join(dir, "transcript.txt") };
|
|
23468
23765
|
const transcriptOut = fs4.createWriteStream(transcriptRefPtr.value);
|
|
23469
23766
|
const outputCbs = [];
|
|
23470
23767
|
const exitCbs = [];
|
|
23471
|
-
const { finish, exited } = makeFinish(id, cfg, transcriptRefPtr, transcriptOut,
|
|
23768
|
+
const { finish, exited } = makeFinish(id, cfg, transcriptRefPtr, transcriptOut, dir, exitCbs);
|
|
23472
23769
|
let killedByUs = false;
|
|
23473
23770
|
child.stdout.on("data", (chunk) => {
|
|
23474
23771
|
transcriptOut.write(chunk);
|
|
@@ -23555,14 +23852,14 @@ var CursorAdapter = class {
|
|
|
23555
23852
|
const opts = this.opts;
|
|
23556
23853
|
return runStreamJson(job, {
|
|
23557
23854
|
bin: opts.cursorBin ?? "cursor-agent",
|
|
23558
|
-
buildArgs(job2,
|
|
23855
|
+
buildArgs(job2, dir) {
|
|
23559
23856
|
const task = job2.bundle.files["TASK.md"] ?? "";
|
|
23560
23857
|
const prompt = job2.systemPrompt ? `${job2.systemPrompt}
|
|
23561
23858
|
|
|
23562
23859
|
---
|
|
23563
23860
|
|
|
23564
23861
|
${task}` : task;
|
|
23565
|
-
return ["-p", prompt, "--output-format", "stream-json", "--yolo", "--workspace",
|
|
23862
|
+
return ["-p", prompt, "--output-format", "stream-json", "--yolo", "--workspace", dir, ...opts.model ? ["--model", opts.model] : []];
|
|
23566
23863
|
},
|
|
23567
23864
|
createState: () => ({}),
|
|
23568
23865
|
normalizeStdout: (line) => normalizeCursor(line),
|
|
@@ -23697,14 +23994,14 @@ var OpenCodeAdapter = class {
|
|
|
23697
23994
|
const opts = this.opts;
|
|
23698
23995
|
return runStreamJson(job, {
|
|
23699
23996
|
bin: opts.openCodeBin ?? "opencode",
|
|
23700
|
-
buildArgs(_job,
|
|
23997
|
+
buildArgs(_job, dir) {
|
|
23701
23998
|
return [
|
|
23702
23999
|
"run",
|
|
23703
24000
|
"--format",
|
|
23704
24001
|
"json",
|
|
23705
24002
|
"--dangerously-skip-permissions",
|
|
23706
24003
|
"--dir",
|
|
23707
|
-
|
|
24004
|
+
dir,
|
|
23708
24005
|
...opts.model ? ["--model", opts.model] : []
|
|
23709
24006
|
];
|
|
23710
24007
|
},
|
|
@@ -23862,7 +24159,7 @@ ${task}` : task;
|
|
|
23862
24159
|
};
|
|
23863
24160
|
|
|
23864
24161
|
// ../adapters/src/openclaw/index.ts
|
|
23865
|
-
|
|
24162
|
+
var import_node_crypto6 = require("node:crypto");
|
|
23866
24163
|
function normalizeOpenClaw(line) {
|
|
23867
24164
|
let e;
|
|
23868
24165
|
try {
|
|
@@ -23903,7 +24200,7 @@ var OpenClawAdapter = class {
|
|
|
23903
24200
|
---
|
|
23904
24201
|
|
|
23905
24202
|
${task}` : task;
|
|
23906
|
-
const sessionId = `oasis-${
|
|
24203
|
+
const sessionId = `oasis-${(0, import_node_crypto6.randomUUID)().slice(0, 8)}`;
|
|
23907
24204
|
return [
|
|
23908
24205
|
"agent",
|
|
23909
24206
|
...opts.mode !== "gateway" ? ["--local"] : [],
|
|
@@ -24003,7 +24300,7 @@ var SessionManager = class {
|
|
|
24003
24300
|
|
|
24004
24301
|
// ../cli/src/daemon/ws-client.ts
|
|
24005
24302
|
init_wrapper();
|
|
24006
|
-
|
|
24303
|
+
var import_node_os = require("node:os");
|
|
24007
24304
|
|
|
24008
24305
|
// ../cli/src/daemon/logger.ts
|
|
24009
24306
|
function ts() {
|
|
@@ -24018,13 +24315,14 @@ function log2(tag, msg, extra) {
|
|
|
24018
24315
|
var RECONNECT_DELAY_MS = 3e3;
|
|
24019
24316
|
var PING_INTERVAL_MS = 2e4;
|
|
24020
24317
|
var DaemonWsClient = class {
|
|
24021
|
-
constructor(
|
|
24022
|
-
this.serverUrl =
|
|
24318
|
+
constructor(serverUrl2, daemonId, sessions, adapters = ["claude-code"], token2, runtimes = adapters.map((kind) => ({ kind })), nodeName2) {
|
|
24319
|
+
this.serverUrl = serverUrl2;
|
|
24023
24320
|
this.daemonId = daemonId;
|
|
24024
24321
|
this.sessions = sessions;
|
|
24025
24322
|
this.adapters = adapters;
|
|
24026
24323
|
this.token = token2;
|
|
24027
24324
|
this.runtimes = runtimes;
|
|
24325
|
+
this.nodeName = nodeName2;
|
|
24028
24326
|
}
|
|
24029
24327
|
ws = null;
|
|
24030
24328
|
pingTimer = null;
|
|
@@ -24093,7 +24391,7 @@ var DaemonWsClient = class {
|
|
|
24093
24391
|
});
|
|
24094
24392
|
} catch (err) {
|
|
24095
24393
|
log2("[node-cli]", ` spawn failed: ${err}`);
|
|
24096
|
-
this.send({ type: "session_exited", dispatchId, sessionId: "spawn-failed", info: { code: null } });
|
|
24394
|
+
this.send({ type: "session_exited", dispatchId, sessionId: "spawn-failed", info: { code: null, reason: "error" } });
|
|
24097
24395
|
}
|
|
24098
24396
|
break;
|
|
24099
24397
|
}
|
|
@@ -24111,12 +24409,12 @@ var DaemonWsClient = class {
|
|
|
24111
24409
|
if (this.ws?.readyState === import_websocket.default.OPEN) this.ws.send(JSON.stringify(msg));
|
|
24112
24410
|
}
|
|
24113
24411
|
buildMeta() {
|
|
24114
|
-
return { hostname:
|
|
24412
|
+
return { hostname: (0, import_node_os.hostname)(), adapters: this.adapters, runtimes: this.runtimes, nodeVersion: process.version, ...this.nodeName ? { nodeName: this.nodeName } : {} };
|
|
24115
24413
|
}
|
|
24116
24414
|
};
|
|
24117
24415
|
|
|
24118
24416
|
// ../cli/src/daemon/detect-adapters.ts
|
|
24119
|
-
|
|
24417
|
+
var import_node_child_process7 = require("node:child_process");
|
|
24120
24418
|
var KNOWN = [
|
|
24121
24419
|
{ adapter: "claude-code", binary: "claude" },
|
|
24122
24420
|
{ adapter: "codex", binary: "codex" },
|
|
@@ -24135,7 +24433,7 @@ var KNOWN = [
|
|
|
24135
24433
|
function onPath(binary) {
|
|
24136
24434
|
try {
|
|
24137
24435
|
const cmd = process.platform === "win32" ? "where" : "which";
|
|
24138
|
-
execFileSync(cmd, [binary], { stdio: "ignore" });
|
|
24436
|
+
(0, import_node_child_process7.execFileSync)(cmd, [binary], { stdio: "ignore" });
|
|
24139
24437
|
return true;
|
|
24140
24438
|
} catch {
|
|
24141
24439
|
return false;
|
|
@@ -24143,7 +24441,7 @@ function onPath(binary) {
|
|
|
24143
24441
|
}
|
|
24144
24442
|
function versionOf(binary) {
|
|
24145
24443
|
try {
|
|
24146
|
-
return execFileSync(binary, ["--version"], {
|
|
24444
|
+
return (0, import_node_child_process7.execFileSync)(binary, ["--version"], {
|
|
24147
24445
|
encoding: "utf8",
|
|
24148
24446
|
stdio: ["ignore", "pipe", "ignore"],
|
|
24149
24447
|
timeout: 1500
|
|
@@ -24213,17 +24511,17 @@ async function startNode(opts) {
|
|
|
24213
24511
|
claude
|
|
24214
24512
|
)
|
|
24215
24513
|
);
|
|
24216
|
-
const client = new DaemonWsClient(opts.serverUrl, opts.nodeId, sessions, adapters, opts.token, runtimes);
|
|
24514
|
+
const client = new DaemonWsClient(opts.serverUrl, opts.nodeId, sessions, adapters, opts.token, runtimes, opts.nodeName);
|
|
24217
24515
|
console.log(`[oasis node] ${opts.nodeId} \u2192 ${opts.serverUrl}`);
|
|
24218
24516
|
client.start();
|
|
24219
|
-
await new Promise((
|
|
24517
|
+
await new Promise((resolve) => {
|
|
24220
24518
|
process.on("SIGTERM", () => {
|
|
24221
24519
|
client.stop();
|
|
24222
|
-
|
|
24520
|
+
resolve();
|
|
24223
24521
|
});
|
|
24224
24522
|
process.on("SIGINT", () => {
|
|
24225
24523
|
client.stop();
|
|
24226
|
-
|
|
24524
|
+
resolve();
|
|
24227
24525
|
});
|
|
24228
24526
|
});
|
|
24229
24527
|
}
|
|
@@ -24238,14 +24536,72 @@ for (let i = 0; i < argv.length; i++) {
|
|
|
24238
24536
|
const a = argv[i];
|
|
24239
24537
|
if (a.startsWith("--")) flags.set(a.slice(2), argv[++i] ?? "");
|
|
24240
24538
|
}
|
|
24241
|
-
var
|
|
24242
|
-
var
|
|
24243
|
-
var
|
|
24539
|
+
var stateDir = path5.join(os5.homedir(), ".oasis");
|
|
24540
|
+
var stateFile = path5.join(stateDir, "node-state.json");
|
|
24541
|
+
var pidFile = path5.join(stateDir, "node.pid");
|
|
24542
|
+
function readState() {
|
|
24543
|
+
try {
|
|
24544
|
+
return JSON.parse(fs5.readFileSync(stateFile, "utf8"));
|
|
24545
|
+
} catch {
|
|
24546
|
+
return null;
|
|
24547
|
+
}
|
|
24548
|
+
}
|
|
24549
|
+
function saveState(s) {
|
|
24550
|
+
fs5.mkdirSync(stateDir, { recursive: true });
|
|
24551
|
+
fs5.writeFileSync(stateFile, JSON.stringify(s), { mode: 384 });
|
|
24552
|
+
}
|
|
24553
|
+
function checkPid() {
|
|
24554
|
+
try {
|
|
24555
|
+
const pid = parseInt(fs5.readFileSync(pidFile, "utf8").trim(), 10);
|
|
24556
|
+
if (!isNaN(pid)) {
|
|
24557
|
+
try {
|
|
24558
|
+
process.kill(pid, 0);
|
|
24559
|
+
console.error(`[oasis node] already running (PID ${pid})`);
|
|
24560
|
+
process.exit(0);
|
|
24561
|
+
} catch {
|
|
24562
|
+
}
|
|
24563
|
+
}
|
|
24564
|
+
} catch {
|
|
24565
|
+
}
|
|
24566
|
+
fs5.mkdirSync(stateDir, { recursive: true });
|
|
24567
|
+
fs5.writeFileSync(pidFile, String(process.pid));
|
|
24568
|
+
}
|
|
24569
|
+
function cleanup() {
|
|
24570
|
+
try {
|
|
24571
|
+
fs5.unlinkSync(pidFile);
|
|
24572
|
+
} catch {
|
|
24573
|
+
}
|
|
24574
|
+
}
|
|
24575
|
+
var serverUrl = flags.get("server-ws") ?? process.env["OASIS_SERVER_WS"] ?? "ws://127.0.0.1:7320/node-gateway";
|
|
24576
|
+
var token = flags.get("token") ?? process.env["OASIS_NODE_TOKEN"];
|
|
24577
|
+
if (!token) {
|
|
24578
|
+
const saved = readState();
|
|
24579
|
+
if (saved?.serverUrl === serverUrl) token = saved.token;
|
|
24580
|
+
}
|
|
24581
|
+
if (!token) {
|
|
24582
|
+
console.error("[oasis node] no token \u2014 generate one from the web UI and run with --token <token>");
|
|
24583
|
+
process.exit(1);
|
|
24584
|
+
}
|
|
24585
|
+
if (flags.has("token")) saveState({ serverUrl, token });
|
|
24586
|
+
checkPid();
|
|
24587
|
+
var nodeName = flags.get("name") ?? process.env["OASIS_NODE_NAME"];
|
|
24588
|
+
var nodeId = flags.get("id") ?? process.env["OASIS_NODE_ID"] ?? `node-${(0, import_node_crypto7.randomUUID)()}`;
|
|
24589
|
+
process.on("exit", cleanup);
|
|
24590
|
+
process.on("SIGTERM", () => {
|
|
24591
|
+
cleanup();
|
|
24592
|
+
process.exit(0);
|
|
24593
|
+
});
|
|
24594
|
+
process.on("SIGINT", () => {
|
|
24595
|
+
cleanup();
|
|
24596
|
+
process.exit(0);
|
|
24597
|
+
});
|
|
24244
24598
|
startNode({
|
|
24245
|
-
serverUrl
|
|
24246
|
-
nodeId
|
|
24247
|
-
|
|
24599
|
+
serverUrl,
|
|
24600
|
+
nodeId,
|
|
24601
|
+
token,
|
|
24602
|
+
...nodeName ? { nodeName } : {}
|
|
24248
24603
|
}).catch((err) => {
|
|
24249
24604
|
console.error(String(err instanceof Error ? err.message : err));
|
|
24605
|
+
cleanup();
|
|
24250
24606
|
process.exitCode = 1;
|
|
24251
24607
|
});
|