@ivotoby/openapi-mcp-server 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +887 -46
- package/package.json +29 -8
package/dist/bundle.js
CHANGED
|
@@ -296,9 +296,9 @@ var require_combined_stream = __commonJS({
|
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
|
|
299
|
-
// node_modules/mime-db/db.json
|
|
299
|
+
// node_modules/form-data/node_modules/mime-db/db.json
|
|
300
300
|
var require_db = __commonJS({
|
|
301
|
-
"node_modules/mime-db/db.json"(exports, module) {
|
|
301
|
+
"node_modules/form-data/node_modules/mime-db/db.json"(exports, module) {
|
|
302
302
|
module.exports = {
|
|
303
303
|
"application/1d-interleaved-parityfec": {
|
|
304
304
|
source: "iana"
|
|
@@ -8821,16 +8821,16 @@ var require_db = __commonJS({
|
|
|
8821
8821
|
}
|
|
8822
8822
|
});
|
|
8823
8823
|
|
|
8824
|
-
// node_modules/mime-db/index.js
|
|
8824
|
+
// node_modules/form-data/node_modules/mime-db/index.js
|
|
8825
8825
|
var require_mime_db = __commonJS({
|
|
8826
|
-
"node_modules/mime-db/index.js"(exports, module) {
|
|
8826
|
+
"node_modules/form-data/node_modules/mime-db/index.js"(exports, module) {
|
|
8827
8827
|
module.exports = require_db();
|
|
8828
8828
|
}
|
|
8829
8829
|
});
|
|
8830
8830
|
|
|
8831
|
-
// node_modules/mime-types/index.js
|
|
8831
|
+
// node_modules/form-data/node_modules/mime-types/index.js
|
|
8832
8832
|
var require_mime_types = __commonJS({
|
|
8833
|
-
"node_modules/mime-types/index.js"(exports) {
|
|
8833
|
+
"node_modules/form-data/node_modules/mime-types/index.js"(exports) {
|
|
8834
8834
|
"use strict";
|
|
8835
8835
|
var db = require_mime_db();
|
|
8836
8836
|
var extname2 = __require("path").extname;
|
|
@@ -9127,6 +9127,852 @@ var require_asynckit = __commonJS({
|
|
|
9127
9127
|
}
|
|
9128
9128
|
});
|
|
9129
9129
|
|
|
9130
|
+
// node_modules/es-object-atoms/index.js
|
|
9131
|
+
var require_es_object_atoms = __commonJS({
|
|
9132
|
+
"node_modules/es-object-atoms/index.js"(exports, module) {
|
|
9133
|
+
"use strict";
|
|
9134
|
+
module.exports = Object;
|
|
9135
|
+
}
|
|
9136
|
+
});
|
|
9137
|
+
|
|
9138
|
+
// node_modules/es-errors/index.js
|
|
9139
|
+
var require_es_errors = __commonJS({
|
|
9140
|
+
"node_modules/es-errors/index.js"(exports, module) {
|
|
9141
|
+
"use strict";
|
|
9142
|
+
module.exports = Error;
|
|
9143
|
+
}
|
|
9144
|
+
});
|
|
9145
|
+
|
|
9146
|
+
// node_modules/es-errors/eval.js
|
|
9147
|
+
var require_eval = __commonJS({
|
|
9148
|
+
"node_modules/es-errors/eval.js"(exports, module) {
|
|
9149
|
+
"use strict";
|
|
9150
|
+
module.exports = EvalError;
|
|
9151
|
+
}
|
|
9152
|
+
});
|
|
9153
|
+
|
|
9154
|
+
// node_modules/es-errors/range.js
|
|
9155
|
+
var require_range = __commonJS({
|
|
9156
|
+
"node_modules/es-errors/range.js"(exports, module) {
|
|
9157
|
+
"use strict";
|
|
9158
|
+
module.exports = RangeError;
|
|
9159
|
+
}
|
|
9160
|
+
});
|
|
9161
|
+
|
|
9162
|
+
// node_modules/es-errors/ref.js
|
|
9163
|
+
var require_ref = __commonJS({
|
|
9164
|
+
"node_modules/es-errors/ref.js"(exports, module) {
|
|
9165
|
+
"use strict";
|
|
9166
|
+
module.exports = ReferenceError;
|
|
9167
|
+
}
|
|
9168
|
+
});
|
|
9169
|
+
|
|
9170
|
+
// node_modules/es-errors/syntax.js
|
|
9171
|
+
var require_syntax = __commonJS({
|
|
9172
|
+
"node_modules/es-errors/syntax.js"(exports, module) {
|
|
9173
|
+
"use strict";
|
|
9174
|
+
module.exports = SyntaxError;
|
|
9175
|
+
}
|
|
9176
|
+
});
|
|
9177
|
+
|
|
9178
|
+
// node_modules/es-errors/type.js
|
|
9179
|
+
var require_type = __commonJS({
|
|
9180
|
+
"node_modules/es-errors/type.js"(exports, module) {
|
|
9181
|
+
"use strict";
|
|
9182
|
+
module.exports = TypeError;
|
|
9183
|
+
}
|
|
9184
|
+
});
|
|
9185
|
+
|
|
9186
|
+
// node_modules/es-errors/uri.js
|
|
9187
|
+
var require_uri = __commonJS({
|
|
9188
|
+
"node_modules/es-errors/uri.js"(exports, module) {
|
|
9189
|
+
"use strict";
|
|
9190
|
+
module.exports = URIError;
|
|
9191
|
+
}
|
|
9192
|
+
});
|
|
9193
|
+
|
|
9194
|
+
// node_modules/math-intrinsics/abs.js
|
|
9195
|
+
var require_abs = __commonJS({
|
|
9196
|
+
"node_modules/math-intrinsics/abs.js"(exports, module) {
|
|
9197
|
+
"use strict";
|
|
9198
|
+
module.exports = Math.abs;
|
|
9199
|
+
}
|
|
9200
|
+
});
|
|
9201
|
+
|
|
9202
|
+
// node_modules/math-intrinsics/floor.js
|
|
9203
|
+
var require_floor = __commonJS({
|
|
9204
|
+
"node_modules/math-intrinsics/floor.js"(exports, module) {
|
|
9205
|
+
"use strict";
|
|
9206
|
+
module.exports = Math.floor;
|
|
9207
|
+
}
|
|
9208
|
+
});
|
|
9209
|
+
|
|
9210
|
+
// node_modules/math-intrinsics/max.js
|
|
9211
|
+
var require_max = __commonJS({
|
|
9212
|
+
"node_modules/math-intrinsics/max.js"(exports, module) {
|
|
9213
|
+
"use strict";
|
|
9214
|
+
module.exports = Math.max;
|
|
9215
|
+
}
|
|
9216
|
+
});
|
|
9217
|
+
|
|
9218
|
+
// node_modules/math-intrinsics/min.js
|
|
9219
|
+
var require_min = __commonJS({
|
|
9220
|
+
"node_modules/math-intrinsics/min.js"(exports, module) {
|
|
9221
|
+
"use strict";
|
|
9222
|
+
module.exports = Math.min;
|
|
9223
|
+
}
|
|
9224
|
+
});
|
|
9225
|
+
|
|
9226
|
+
// node_modules/math-intrinsics/pow.js
|
|
9227
|
+
var require_pow = __commonJS({
|
|
9228
|
+
"node_modules/math-intrinsics/pow.js"(exports, module) {
|
|
9229
|
+
"use strict";
|
|
9230
|
+
module.exports = Math.pow;
|
|
9231
|
+
}
|
|
9232
|
+
});
|
|
9233
|
+
|
|
9234
|
+
// node_modules/math-intrinsics/round.js
|
|
9235
|
+
var require_round = __commonJS({
|
|
9236
|
+
"node_modules/math-intrinsics/round.js"(exports, module) {
|
|
9237
|
+
"use strict";
|
|
9238
|
+
module.exports = Math.round;
|
|
9239
|
+
}
|
|
9240
|
+
});
|
|
9241
|
+
|
|
9242
|
+
// node_modules/math-intrinsics/isNaN.js
|
|
9243
|
+
var require_isNaN = __commonJS({
|
|
9244
|
+
"node_modules/math-intrinsics/isNaN.js"(exports, module) {
|
|
9245
|
+
"use strict";
|
|
9246
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
9247
|
+
return a !== a;
|
|
9248
|
+
};
|
|
9249
|
+
}
|
|
9250
|
+
});
|
|
9251
|
+
|
|
9252
|
+
// node_modules/math-intrinsics/sign.js
|
|
9253
|
+
var require_sign = __commonJS({
|
|
9254
|
+
"node_modules/math-intrinsics/sign.js"(exports, module) {
|
|
9255
|
+
"use strict";
|
|
9256
|
+
var $isNaN = require_isNaN();
|
|
9257
|
+
module.exports = function sign(number) {
|
|
9258
|
+
if ($isNaN(number) || number === 0) {
|
|
9259
|
+
return number;
|
|
9260
|
+
}
|
|
9261
|
+
return number < 0 ? -1 : 1;
|
|
9262
|
+
};
|
|
9263
|
+
}
|
|
9264
|
+
});
|
|
9265
|
+
|
|
9266
|
+
// node_modules/gopd/gOPD.js
|
|
9267
|
+
var require_gOPD = __commonJS({
|
|
9268
|
+
"node_modules/gopd/gOPD.js"(exports, module) {
|
|
9269
|
+
"use strict";
|
|
9270
|
+
module.exports = Object.getOwnPropertyDescriptor;
|
|
9271
|
+
}
|
|
9272
|
+
});
|
|
9273
|
+
|
|
9274
|
+
// node_modules/gopd/index.js
|
|
9275
|
+
var require_gopd = __commonJS({
|
|
9276
|
+
"node_modules/gopd/index.js"(exports, module) {
|
|
9277
|
+
"use strict";
|
|
9278
|
+
var $gOPD = require_gOPD();
|
|
9279
|
+
if ($gOPD) {
|
|
9280
|
+
try {
|
|
9281
|
+
$gOPD([], "length");
|
|
9282
|
+
} catch (e) {
|
|
9283
|
+
$gOPD = null;
|
|
9284
|
+
}
|
|
9285
|
+
}
|
|
9286
|
+
module.exports = $gOPD;
|
|
9287
|
+
}
|
|
9288
|
+
});
|
|
9289
|
+
|
|
9290
|
+
// node_modules/es-define-property/index.js
|
|
9291
|
+
var require_es_define_property = __commonJS({
|
|
9292
|
+
"node_modules/es-define-property/index.js"(exports, module) {
|
|
9293
|
+
"use strict";
|
|
9294
|
+
var $defineProperty = Object.defineProperty || false;
|
|
9295
|
+
if ($defineProperty) {
|
|
9296
|
+
try {
|
|
9297
|
+
$defineProperty({}, "a", { value: 1 });
|
|
9298
|
+
} catch (e) {
|
|
9299
|
+
$defineProperty = false;
|
|
9300
|
+
}
|
|
9301
|
+
}
|
|
9302
|
+
module.exports = $defineProperty;
|
|
9303
|
+
}
|
|
9304
|
+
});
|
|
9305
|
+
|
|
9306
|
+
// node_modules/has-symbols/shams.js
|
|
9307
|
+
var require_shams = __commonJS({
|
|
9308
|
+
"node_modules/has-symbols/shams.js"(exports, module) {
|
|
9309
|
+
"use strict";
|
|
9310
|
+
module.exports = function hasSymbols() {
|
|
9311
|
+
if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
|
|
9312
|
+
return false;
|
|
9313
|
+
}
|
|
9314
|
+
if (typeof Symbol.iterator === "symbol") {
|
|
9315
|
+
return true;
|
|
9316
|
+
}
|
|
9317
|
+
var obj = {};
|
|
9318
|
+
var sym = Symbol("test");
|
|
9319
|
+
var symObj = Object(sym);
|
|
9320
|
+
if (typeof sym === "string") {
|
|
9321
|
+
return false;
|
|
9322
|
+
}
|
|
9323
|
+
if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
|
|
9324
|
+
return false;
|
|
9325
|
+
}
|
|
9326
|
+
if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
|
|
9327
|
+
return false;
|
|
9328
|
+
}
|
|
9329
|
+
var symVal = 42;
|
|
9330
|
+
obj[sym] = symVal;
|
|
9331
|
+
for (var _ in obj) {
|
|
9332
|
+
return false;
|
|
9333
|
+
}
|
|
9334
|
+
if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
|
|
9335
|
+
return false;
|
|
9336
|
+
}
|
|
9337
|
+
if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
9338
|
+
return false;
|
|
9339
|
+
}
|
|
9340
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
9341
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
9342
|
+
return false;
|
|
9343
|
+
}
|
|
9344
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
9345
|
+
return false;
|
|
9346
|
+
}
|
|
9347
|
+
if (typeof Object.getOwnPropertyDescriptor === "function") {
|
|
9348
|
+
var descriptor = (
|
|
9349
|
+
/** @type {PropertyDescriptor} */
|
|
9350
|
+
Object.getOwnPropertyDescriptor(obj, sym)
|
|
9351
|
+
);
|
|
9352
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
9353
|
+
return false;
|
|
9354
|
+
}
|
|
9355
|
+
}
|
|
9356
|
+
return true;
|
|
9357
|
+
};
|
|
9358
|
+
}
|
|
9359
|
+
});
|
|
9360
|
+
|
|
9361
|
+
// node_modules/has-symbols/index.js
|
|
9362
|
+
var require_has_symbols = __commonJS({
|
|
9363
|
+
"node_modules/has-symbols/index.js"(exports, module) {
|
|
9364
|
+
"use strict";
|
|
9365
|
+
var origSymbol = typeof Symbol !== "undefined" && Symbol;
|
|
9366
|
+
var hasSymbolSham = require_shams();
|
|
9367
|
+
module.exports = function hasNativeSymbols() {
|
|
9368
|
+
if (typeof origSymbol !== "function") {
|
|
9369
|
+
return false;
|
|
9370
|
+
}
|
|
9371
|
+
if (typeof Symbol !== "function") {
|
|
9372
|
+
return false;
|
|
9373
|
+
}
|
|
9374
|
+
if (typeof origSymbol("foo") !== "symbol") {
|
|
9375
|
+
return false;
|
|
9376
|
+
}
|
|
9377
|
+
if (typeof Symbol("bar") !== "symbol") {
|
|
9378
|
+
return false;
|
|
9379
|
+
}
|
|
9380
|
+
return hasSymbolSham();
|
|
9381
|
+
};
|
|
9382
|
+
}
|
|
9383
|
+
});
|
|
9384
|
+
|
|
9385
|
+
// node_modules/get-proto/Reflect.getPrototypeOf.js
|
|
9386
|
+
var require_Reflect_getPrototypeOf = __commonJS({
|
|
9387
|
+
"node_modules/get-proto/Reflect.getPrototypeOf.js"(exports, module) {
|
|
9388
|
+
"use strict";
|
|
9389
|
+
module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
|
|
9390
|
+
}
|
|
9391
|
+
});
|
|
9392
|
+
|
|
9393
|
+
// node_modules/get-proto/Object.getPrototypeOf.js
|
|
9394
|
+
var require_Object_getPrototypeOf = __commonJS({
|
|
9395
|
+
"node_modules/get-proto/Object.getPrototypeOf.js"(exports, module) {
|
|
9396
|
+
"use strict";
|
|
9397
|
+
var $Object = require_es_object_atoms();
|
|
9398
|
+
module.exports = $Object.getPrototypeOf || null;
|
|
9399
|
+
}
|
|
9400
|
+
});
|
|
9401
|
+
|
|
9402
|
+
// node_modules/function-bind/implementation.js
|
|
9403
|
+
var require_implementation = __commonJS({
|
|
9404
|
+
"node_modules/function-bind/implementation.js"(exports, module) {
|
|
9405
|
+
"use strict";
|
|
9406
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
9407
|
+
var toStr = Object.prototype.toString;
|
|
9408
|
+
var max = Math.max;
|
|
9409
|
+
var funcType = "[object Function]";
|
|
9410
|
+
var concatty = function concatty2(a, b) {
|
|
9411
|
+
var arr = [];
|
|
9412
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
9413
|
+
arr[i] = a[i];
|
|
9414
|
+
}
|
|
9415
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
9416
|
+
arr[j + a.length] = b[j];
|
|
9417
|
+
}
|
|
9418
|
+
return arr;
|
|
9419
|
+
};
|
|
9420
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
9421
|
+
var arr = [];
|
|
9422
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
9423
|
+
arr[j] = arrLike[i];
|
|
9424
|
+
}
|
|
9425
|
+
return arr;
|
|
9426
|
+
};
|
|
9427
|
+
var joiny = function(arr, joiner) {
|
|
9428
|
+
var str = "";
|
|
9429
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
9430
|
+
str += arr[i];
|
|
9431
|
+
if (i + 1 < arr.length) {
|
|
9432
|
+
str += joiner;
|
|
9433
|
+
}
|
|
9434
|
+
}
|
|
9435
|
+
return str;
|
|
9436
|
+
};
|
|
9437
|
+
module.exports = function bind2(that) {
|
|
9438
|
+
var target = this;
|
|
9439
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
9440
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
9441
|
+
}
|
|
9442
|
+
var args = slicy(arguments, 1);
|
|
9443
|
+
var bound;
|
|
9444
|
+
var binder = function() {
|
|
9445
|
+
if (this instanceof bound) {
|
|
9446
|
+
var result = target.apply(
|
|
9447
|
+
this,
|
|
9448
|
+
concatty(args, arguments)
|
|
9449
|
+
);
|
|
9450
|
+
if (Object(result) === result) {
|
|
9451
|
+
return result;
|
|
9452
|
+
}
|
|
9453
|
+
return this;
|
|
9454
|
+
}
|
|
9455
|
+
return target.apply(
|
|
9456
|
+
that,
|
|
9457
|
+
concatty(args, arguments)
|
|
9458
|
+
);
|
|
9459
|
+
};
|
|
9460
|
+
var boundLength = max(0, target.length - args.length);
|
|
9461
|
+
var boundArgs = [];
|
|
9462
|
+
for (var i = 0; i < boundLength; i++) {
|
|
9463
|
+
boundArgs[i] = "$" + i;
|
|
9464
|
+
}
|
|
9465
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
9466
|
+
if (target.prototype) {
|
|
9467
|
+
var Empty = function Empty2() {
|
|
9468
|
+
};
|
|
9469
|
+
Empty.prototype = target.prototype;
|
|
9470
|
+
bound.prototype = new Empty();
|
|
9471
|
+
Empty.prototype = null;
|
|
9472
|
+
}
|
|
9473
|
+
return bound;
|
|
9474
|
+
};
|
|
9475
|
+
}
|
|
9476
|
+
});
|
|
9477
|
+
|
|
9478
|
+
// node_modules/function-bind/index.js
|
|
9479
|
+
var require_function_bind = __commonJS({
|
|
9480
|
+
"node_modules/function-bind/index.js"(exports, module) {
|
|
9481
|
+
"use strict";
|
|
9482
|
+
var implementation = require_implementation();
|
|
9483
|
+
module.exports = Function.prototype.bind || implementation;
|
|
9484
|
+
}
|
|
9485
|
+
});
|
|
9486
|
+
|
|
9487
|
+
// node_modules/call-bind-apply-helpers/functionCall.js
|
|
9488
|
+
var require_functionCall = __commonJS({
|
|
9489
|
+
"node_modules/call-bind-apply-helpers/functionCall.js"(exports, module) {
|
|
9490
|
+
"use strict";
|
|
9491
|
+
module.exports = Function.prototype.call;
|
|
9492
|
+
}
|
|
9493
|
+
});
|
|
9494
|
+
|
|
9495
|
+
// node_modules/call-bind-apply-helpers/functionApply.js
|
|
9496
|
+
var require_functionApply = __commonJS({
|
|
9497
|
+
"node_modules/call-bind-apply-helpers/functionApply.js"(exports, module) {
|
|
9498
|
+
"use strict";
|
|
9499
|
+
module.exports = Function.prototype.apply;
|
|
9500
|
+
}
|
|
9501
|
+
});
|
|
9502
|
+
|
|
9503
|
+
// node_modules/call-bind-apply-helpers/reflectApply.js
|
|
9504
|
+
var require_reflectApply = __commonJS({
|
|
9505
|
+
"node_modules/call-bind-apply-helpers/reflectApply.js"(exports, module) {
|
|
9506
|
+
"use strict";
|
|
9507
|
+
module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
9508
|
+
}
|
|
9509
|
+
});
|
|
9510
|
+
|
|
9511
|
+
// node_modules/call-bind-apply-helpers/actualApply.js
|
|
9512
|
+
var require_actualApply = __commonJS({
|
|
9513
|
+
"node_modules/call-bind-apply-helpers/actualApply.js"(exports, module) {
|
|
9514
|
+
"use strict";
|
|
9515
|
+
var bind2 = require_function_bind();
|
|
9516
|
+
var $apply = require_functionApply();
|
|
9517
|
+
var $call = require_functionCall();
|
|
9518
|
+
var $reflectApply = require_reflectApply();
|
|
9519
|
+
module.exports = $reflectApply || bind2.call($call, $apply);
|
|
9520
|
+
}
|
|
9521
|
+
});
|
|
9522
|
+
|
|
9523
|
+
// node_modules/call-bind-apply-helpers/index.js
|
|
9524
|
+
var require_call_bind_apply_helpers = __commonJS({
|
|
9525
|
+
"node_modules/call-bind-apply-helpers/index.js"(exports, module) {
|
|
9526
|
+
"use strict";
|
|
9527
|
+
var bind2 = require_function_bind();
|
|
9528
|
+
var $TypeError = require_type();
|
|
9529
|
+
var $call = require_functionCall();
|
|
9530
|
+
var $actualApply = require_actualApply();
|
|
9531
|
+
module.exports = function callBindBasic(args) {
|
|
9532
|
+
if (args.length < 1 || typeof args[0] !== "function") {
|
|
9533
|
+
throw new $TypeError("a function is required");
|
|
9534
|
+
}
|
|
9535
|
+
return $actualApply(bind2, $call, args);
|
|
9536
|
+
};
|
|
9537
|
+
}
|
|
9538
|
+
});
|
|
9539
|
+
|
|
9540
|
+
// node_modules/dunder-proto/get.js
|
|
9541
|
+
var require_get = __commonJS({
|
|
9542
|
+
"node_modules/dunder-proto/get.js"(exports, module) {
|
|
9543
|
+
"use strict";
|
|
9544
|
+
var callBind = require_call_bind_apply_helpers();
|
|
9545
|
+
var gOPD = require_gopd();
|
|
9546
|
+
var hasProtoAccessor;
|
|
9547
|
+
try {
|
|
9548
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
9549
|
+
[].__proto__ === Array.prototype;
|
|
9550
|
+
} catch (e) {
|
|
9551
|
+
if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
|
|
9552
|
+
throw e;
|
|
9553
|
+
}
|
|
9554
|
+
}
|
|
9555
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(
|
|
9556
|
+
Object.prototype,
|
|
9557
|
+
/** @type {keyof typeof Object.prototype} */
|
|
9558
|
+
"__proto__"
|
|
9559
|
+
);
|
|
9560
|
+
var $Object = Object;
|
|
9561
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
9562
|
+
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
9563
|
+
/** @type {import('./get')} */
|
|
9564
|
+
function getDunder(value) {
|
|
9565
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
9566
|
+
}
|
|
9567
|
+
) : false;
|
|
9568
|
+
}
|
|
9569
|
+
});
|
|
9570
|
+
|
|
9571
|
+
// node_modules/get-proto/index.js
|
|
9572
|
+
var require_get_proto = __commonJS({
|
|
9573
|
+
"node_modules/get-proto/index.js"(exports, module) {
|
|
9574
|
+
"use strict";
|
|
9575
|
+
var reflectGetProto = require_Reflect_getPrototypeOf();
|
|
9576
|
+
var originalGetProto = require_Object_getPrototypeOf();
|
|
9577
|
+
var getDunderProto = require_get();
|
|
9578
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
9579
|
+
return reflectGetProto(O);
|
|
9580
|
+
} : originalGetProto ? function getProto(O) {
|
|
9581
|
+
if (!O || typeof O !== "object" && typeof O !== "function") {
|
|
9582
|
+
throw new TypeError("getProto: not an object");
|
|
9583
|
+
}
|
|
9584
|
+
return originalGetProto(O);
|
|
9585
|
+
} : getDunderProto ? function getProto(O) {
|
|
9586
|
+
return getDunderProto(O);
|
|
9587
|
+
} : null;
|
|
9588
|
+
}
|
|
9589
|
+
});
|
|
9590
|
+
|
|
9591
|
+
// node_modules/hasown/index.js
|
|
9592
|
+
var require_hasown = __commonJS({
|
|
9593
|
+
"node_modules/hasown/index.js"(exports, module) {
|
|
9594
|
+
"use strict";
|
|
9595
|
+
var call = Function.prototype.call;
|
|
9596
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
9597
|
+
var bind2 = require_function_bind();
|
|
9598
|
+
module.exports = bind2.call(call, $hasOwn);
|
|
9599
|
+
}
|
|
9600
|
+
});
|
|
9601
|
+
|
|
9602
|
+
// node_modules/get-intrinsic/index.js
|
|
9603
|
+
var require_get_intrinsic = __commonJS({
|
|
9604
|
+
"node_modules/get-intrinsic/index.js"(exports, module) {
|
|
9605
|
+
"use strict";
|
|
9606
|
+
var undefined2;
|
|
9607
|
+
var $Object = require_es_object_atoms();
|
|
9608
|
+
var $Error = require_es_errors();
|
|
9609
|
+
var $EvalError = require_eval();
|
|
9610
|
+
var $RangeError = require_range();
|
|
9611
|
+
var $ReferenceError = require_ref();
|
|
9612
|
+
var $SyntaxError = require_syntax();
|
|
9613
|
+
var $TypeError = require_type();
|
|
9614
|
+
var $URIError = require_uri();
|
|
9615
|
+
var abs = require_abs();
|
|
9616
|
+
var floor = require_floor();
|
|
9617
|
+
var max = require_max();
|
|
9618
|
+
var min = require_min();
|
|
9619
|
+
var pow = require_pow();
|
|
9620
|
+
var round = require_round();
|
|
9621
|
+
var sign = require_sign();
|
|
9622
|
+
var $Function = Function;
|
|
9623
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
9624
|
+
try {
|
|
9625
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
9626
|
+
} catch (e) {
|
|
9627
|
+
}
|
|
9628
|
+
};
|
|
9629
|
+
var $gOPD = require_gopd();
|
|
9630
|
+
var $defineProperty = require_es_define_property();
|
|
9631
|
+
var throwTypeError = function() {
|
|
9632
|
+
throw new $TypeError();
|
|
9633
|
+
};
|
|
9634
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
9635
|
+
try {
|
|
9636
|
+
arguments.callee;
|
|
9637
|
+
return throwTypeError;
|
|
9638
|
+
} catch (calleeThrows) {
|
|
9639
|
+
try {
|
|
9640
|
+
return $gOPD(arguments, "callee").get;
|
|
9641
|
+
} catch (gOPDthrows) {
|
|
9642
|
+
return throwTypeError;
|
|
9643
|
+
}
|
|
9644
|
+
}
|
|
9645
|
+
}() : throwTypeError;
|
|
9646
|
+
var hasSymbols = require_has_symbols()();
|
|
9647
|
+
var getProto = require_get_proto();
|
|
9648
|
+
var $ObjectGPO = require_Object_getPrototypeOf();
|
|
9649
|
+
var $ReflectGPO = require_Reflect_getPrototypeOf();
|
|
9650
|
+
var $apply = require_functionApply();
|
|
9651
|
+
var $call = require_functionCall();
|
|
9652
|
+
var needsEval = {};
|
|
9653
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
9654
|
+
var INTRINSICS = {
|
|
9655
|
+
__proto__: null,
|
|
9656
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
9657
|
+
"%Array%": Array,
|
|
9658
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
9659
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
9660
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
9661
|
+
"%AsyncFunction%": needsEval,
|
|
9662
|
+
"%AsyncGenerator%": needsEval,
|
|
9663
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
9664
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
9665
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
9666
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
9667
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
9668
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
9669
|
+
"%Boolean%": Boolean,
|
|
9670
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
9671
|
+
"%Date%": Date,
|
|
9672
|
+
"%decodeURI%": decodeURI,
|
|
9673
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
9674
|
+
"%encodeURI%": encodeURI,
|
|
9675
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
9676
|
+
"%Error%": $Error,
|
|
9677
|
+
"%eval%": eval,
|
|
9678
|
+
// eslint-disable-line no-eval
|
|
9679
|
+
"%EvalError%": $EvalError,
|
|
9680
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
|
|
9681
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
9682
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
9683
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
9684
|
+
"%Function%": $Function,
|
|
9685
|
+
"%GeneratorFunction%": needsEval,
|
|
9686
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
9687
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
9688
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
9689
|
+
"%isFinite%": isFinite,
|
|
9690
|
+
"%isNaN%": isNaN,
|
|
9691
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
9692
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
9693
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
9694
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
9695
|
+
"%Math%": Math,
|
|
9696
|
+
"%Number%": Number,
|
|
9697
|
+
"%Object%": $Object,
|
|
9698
|
+
"%Object.getOwnPropertyDescriptor%": $gOPD,
|
|
9699
|
+
"%parseFloat%": parseFloat,
|
|
9700
|
+
"%parseInt%": parseInt,
|
|
9701
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
9702
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
9703
|
+
"%RangeError%": $RangeError,
|
|
9704
|
+
"%ReferenceError%": $ReferenceError,
|
|
9705
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
9706
|
+
"%RegExp%": RegExp,
|
|
9707
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
9708
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
9709
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
9710
|
+
"%String%": String,
|
|
9711
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
9712
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
9713
|
+
"%SyntaxError%": $SyntaxError,
|
|
9714
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
9715
|
+
"%TypedArray%": TypedArray,
|
|
9716
|
+
"%TypeError%": $TypeError,
|
|
9717
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
9718
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
9719
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
9720
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
9721
|
+
"%URIError%": $URIError,
|
|
9722
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
9723
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
9724
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
|
|
9725
|
+
"%Function.prototype.call%": $call,
|
|
9726
|
+
"%Function.prototype.apply%": $apply,
|
|
9727
|
+
"%Object.defineProperty%": $defineProperty,
|
|
9728
|
+
"%Object.getPrototypeOf%": $ObjectGPO,
|
|
9729
|
+
"%Math.abs%": abs,
|
|
9730
|
+
"%Math.floor%": floor,
|
|
9731
|
+
"%Math.max%": max,
|
|
9732
|
+
"%Math.min%": min,
|
|
9733
|
+
"%Math.pow%": pow,
|
|
9734
|
+
"%Math.round%": round,
|
|
9735
|
+
"%Math.sign%": sign,
|
|
9736
|
+
"%Reflect.getPrototypeOf%": $ReflectGPO
|
|
9737
|
+
};
|
|
9738
|
+
if (getProto) {
|
|
9739
|
+
try {
|
|
9740
|
+
null.error;
|
|
9741
|
+
} catch (e) {
|
|
9742
|
+
errorProto = getProto(getProto(e));
|
|
9743
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
9744
|
+
}
|
|
9745
|
+
}
|
|
9746
|
+
var errorProto;
|
|
9747
|
+
var doEval = function doEval2(name) {
|
|
9748
|
+
var value;
|
|
9749
|
+
if (name === "%AsyncFunction%") {
|
|
9750
|
+
value = getEvalledConstructor("async function () {}");
|
|
9751
|
+
} else if (name === "%GeneratorFunction%") {
|
|
9752
|
+
value = getEvalledConstructor("function* () {}");
|
|
9753
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
9754
|
+
value = getEvalledConstructor("async function* () {}");
|
|
9755
|
+
} else if (name === "%AsyncGenerator%") {
|
|
9756
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
9757
|
+
if (fn) {
|
|
9758
|
+
value = fn.prototype;
|
|
9759
|
+
}
|
|
9760
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
9761
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
9762
|
+
if (gen && getProto) {
|
|
9763
|
+
value = getProto(gen.prototype);
|
|
9764
|
+
}
|
|
9765
|
+
}
|
|
9766
|
+
INTRINSICS[name] = value;
|
|
9767
|
+
return value;
|
|
9768
|
+
};
|
|
9769
|
+
var LEGACY_ALIASES = {
|
|
9770
|
+
__proto__: null,
|
|
9771
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
9772
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
9773
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
9774
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
9775
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
9776
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
9777
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
9778
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
9779
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
9780
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
9781
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
9782
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
9783
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
9784
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
9785
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
9786
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
9787
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
9788
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
9789
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
9790
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
9791
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
9792
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
9793
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
9794
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
9795
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
9796
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
9797
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
9798
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
9799
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
9800
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
9801
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
9802
|
+
"%Promise_all%": ["Promise", "all"],
|
|
9803
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
9804
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
9805
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
9806
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
9807
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
9808
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
9809
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
9810
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
9811
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
9812
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
9813
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
9814
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
9815
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
9816
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
9817
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
9818
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
9819
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
9820
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
9821
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
9822
|
+
};
|
|
9823
|
+
var bind2 = require_function_bind();
|
|
9824
|
+
var hasOwn = require_hasown();
|
|
9825
|
+
var $concat = bind2.call($call, Array.prototype.concat);
|
|
9826
|
+
var $spliceApply = bind2.call($apply, Array.prototype.splice);
|
|
9827
|
+
var $replace = bind2.call($call, String.prototype.replace);
|
|
9828
|
+
var $strSlice = bind2.call($call, String.prototype.slice);
|
|
9829
|
+
var $exec = bind2.call($call, RegExp.prototype.exec);
|
|
9830
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
9831
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
9832
|
+
var stringToPath = function stringToPath2(string) {
|
|
9833
|
+
var first = $strSlice(string, 0, 1);
|
|
9834
|
+
var last = $strSlice(string, -1);
|
|
9835
|
+
if (first === "%" && last !== "%") {
|
|
9836
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
9837
|
+
} else if (last === "%" && first !== "%") {
|
|
9838
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
9839
|
+
}
|
|
9840
|
+
var result = [];
|
|
9841
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
9842
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
9843
|
+
});
|
|
9844
|
+
return result;
|
|
9845
|
+
};
|
|
9846
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
9847
|
+
var intrinsicName = name;
|
|
9848
|
+
var alias;
|
|
9849
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
9850
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
9851
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
9852
|
+
}
|
|
9853
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
9854
|
+
var value = INTRINSICS[intrinsicName];
|
|
9855
|
+
if (value === needsEval) {
|
|
9856
|
+
value = doEval(intrinsicName);
|
|
9857
|
+
}
|
|
9858
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
9859
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
9860
|
+
}
|
|
9861
|
+
return {
|
|
9862
|
+
alias,
|
|
9863
|
+
name: intrinsicName,
|
|
9864
|
+
value
|
|
9865
|
+
};
|
|
9866
|
+
}
|
|
9867
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
9868
|
+
};
|
|
9869
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
9870
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
9871
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
9872
|
+
}
|
|
9873
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
9874
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
9875
|
+
}
|
|
9876
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
9877
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
9878
|
+
}
|
|
9879
|
+
var parts = stringToPath(name);
|
|
9880
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
9881
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
9882
|
+
var intrinsicRealName = intrinsic.name;
|
|
9883
|
+
var value = intrinsic.value;
|
|
9884
|
+
var skipFurtherCaching = false;
|
|
9885
|
+
var alias = intrinsic.alias;
|
|
9886
|
+
if (alias) {
|
|
9887
|
+
intrinsicBaseName = alias[0];
|
|
9888
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
9889
|
+
}
|
|
9890
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
9891
|
+
var part = parts[i];
|
|
9892
|
+
var first = $strSlice(part, 0, 1);
|
|
9893
|
+
var last = $strSlice(part, -1);
|
|
9894
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
9895
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
9896
|
+
}
|
|
9897
|
+
if (part === "constructor" || !isOwn) {
|
|
9898
|
+
skipFurtherCaching = true;
|
|
9899
|
+
}
|
|
9900
|
+
intrinsicBaseName += "." + part;
|
|
9901
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
9902
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
9903
|
+
value = INTRINSICS[intrinsicRealName];
|
|
9904
|
+
} else if (value != null) {
|
|
9905
|
+
if (!(part in value)) {
|
|
9906
|
+
if (!allowMissing) {
|
|
9907
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
9908
|
+
}
|
|
9909
|
+
return void undefined2;
|
|
9910
|
+
}
|
|
9911
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
9912
|
+
var desc = $gOPD(value, part);
|
|
9913
|
+
isOwn = !!desc;
|
|
9914
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
9915
|
+
value = desc.get;
|
|
9916
|
+
} else {
|
|
9917
|
+
value = value[part];
|
|
9918
|
+
}
|
|
9919
|
+
} else {
|
|
9920
|
+
isOwn = hasOwn(value, part);
|
|
9921
|
+
value = value[part];
|
|
9922
|
+
}
|
|
9923
|
+
if (isOwn && !skipFurtherCaching) {
|
|
9924
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
9925
|
+
}
|
|
9926
|
+
}
|
|
9927
|
+
}
|
|
9928
|
+
return value;
|
|
9929
|
+
};
|
|
9930
|
+
}
|
|
9931
|
+
});
|
|
9932
|
+
|
|
9933
|
+
// node_modules/has-tostringtag/shams.js
|
|
9934
|
+
var require_shams2 = __commonJS({
|
|
9935
|
+
"node_modules/has-tostringtag/shams.js"(exports, module) {
|
|
9936
|
+
"use strict";
|
|
9937
|
+
var hasSymbols = require_shams();
|
|
9938
|
+
module.exports = function hasToStringTagShams() {
|
|
9939
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
9940
|
+
};
|
|
9941
|
+
}
|
|
9942
|
+
});
|
|
9943
|
+
|
|
9944
|
+
// node_modules/es-set-tostringtag/index.js
|
|
9945
|
+
var require_es_set_tostringtag = __commonJS({
|
|
9946
|
+
"node_modules/es-set-tostringtag/index.js"(exports, module) {
|
|
9947
|
+
"use strict";
|
|
9948
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
9949
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
|
|
9950
|
+
var hasToStringTag = require_shams2()();
|
|
9951
|
+
var hasOwn = require_hasown();
|
|
9952
|
+
var $TypeError = require_type();
|
|
9953
|
+
var toStringTag2 = hasToStringTag ? Symbol.toStringTag : null;
|
|
9954
|
+
module.exports = function setToStringTag(object, value) {
|
|
9955
|
+
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
|
|
9956
|
+
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
9957
|
+
if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") {
|
|
9958
|
+
throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
|
|
9959
|
+
}
|
|
9960
|
+
if (toStringTag2 && (overrideIfSet || !hasOwn(object, toStringTag2))) {
|
|
9961
|
+
if ($defineProperty) {
|
|
9962
|
+
$defineProperty(object, toStringTag2, {
|
|
9963
|
+
configurable: !nonConfigurable,
|
|
9964
|
+
enumerable: false,
|
|
9965
|
+
value,
|
|
9966
|
+
writable: false
|
|
9967
|
+
});
|
|
9968
|
+
} else {
|
|
9969
|
+
object[toStringTag2] = value;
|
|
9970
|
+
}
|
|
9971
|
+
}
|
|
9972
|
+
};
|
|
9973
|
+
}
|
|
9974
|
+
});
|
|
9975
|
+
|
|
9130
9976
|
// node_modules/form-data/lib/populate.js
|
|
9131
9977
|
var require_populate = __commonJS({
|
|
9132
9978
|
"node_modules/form-data/lib/populate.js"(exports, module) {
|
|
@@ -9152,6 +9998,7 @@ var require_form_data = __commonJS({
|
|
|
9152
9998
|
var Stream = __require("stream").Stream;
|
|
9153
9999
|
var mime = require_mime_types();
|
|
9154
10000
|
var asynckit = require_asynckit();
|
|
10001
|
+
var setToStringTag = require_es_set_tostringtag();
|
|
9155
10002
|
var populate = require_populate();
|
|
9156
10003
|
module.exports = FormData3;
|
|
9157
10004
|
util3.inherits(FormData3, CombinedStream);
|
|
@@ -9201,7 +10048,7 @@ var require_form_data = __commonJS({
|
|
|
9201
10048
|
}
|
|
9202
10049
|
this._valueLength += valueLength;
|
|
9203
10050
|
this._overheadLength += Buffer.byteLength(header) + FormData3.LINE_BREAK.length;
|
|
9204
|
-
if (!value || !value.path && !(value.readable &&
|
|
10051
|
+
if (!value || !value.path && !(value.readable && Object.prototype.hasOwnProperty.call(value, "httpVersion")) && !(value instanceof Stream)) {
|
|
9205
10052
|
return;
|
|
9206
10053
|
}
|
|
9207
10054
|
if (!options.knownLength) {
|
|
@@ -9209,7 +10056,7 @@ var require_form_data = __commonJS({
|
|
|
9209
10056
|
}
|
|
9210
10057
|
};
|
|
9211
10058
|
FormData3.prototype._lengthRetriever = function(value, callback) {
|
|
9212
|
-
if (
|
|
10059
|
+
if (Object.prototype.hasOwnProperty.call(value, "fd")) {
|
|
9213
10060
|
if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
|
|
9214
10061
|
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
9215
10062
|
} else {
|
|
@@ -9223,9 +10070,9 @@ var require_form_data = __commonJS({
|
|
|
9223
10070
|
callback(null, fileSize);
|
|
9224
10071
|
});
|
|
9225
10072
|
}
|
|
9226
|
-
} else if (
|
|
10073
|
+
} else if (Object.prototype.hasOwnProperty.call(value, "httpVersion")) {
|
|
9227
10074
|
callback(null, +value.headers["content-length"]);
|
|
9228
|
-
} else if (
|
|
10075
|
+
} else if (Object.prototype.hasOwnProperty.call(value, "httpModule")) {
|
|
9229
10076
|
value.on("response", function(response) {
|
|
9230
10077
|
value.pause();
|
|
9231
10078
|
callback(null, +response.headers["content-length"]);
|
|
@@ -9253,16 +10100,17 @@ var require_form_data = __commonJS({
|
|
|
9253
10100
|
}
|
|
9254
10101
|
var header;
|
|
9255
10102
|
for (var prop in headers) {
|
|
9256
|
-
if (
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
10103
|
+
if (Object.prototype.hasOwnProperty.call(headers, prop)) {
|
|
10104
|
+
header = headers[prop];
|
|
10105
|
+
if (header == null) {
|
|
10106
|
+
continue;
|
|
10107
|
+
}
|
|
10108
|
+
if (!Array.isArray(header)) {
|
|
10109
|
+
header = [header];
|
|
10110
|
+
}
|
|
10111
|
+
if (header.length) {
|
|
10112
|
+
contents += prop + ": " + header.join("; ") + FormData3.LINE_BREAK;
|
|
10113
|
+
}
|
|
9266
10114
|
}
|
|
9267
10115
|
}
|
|
9268
10116
|
return "--" + this.getBoundary() + FormData3.LINE_BREAK + contents + FormData3.LINE_BREAK;
|
|
@@ -9273,7 +10121,7 @@ var require_form_data = __commonJS({
|
|
|
9273
10121
|
filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
9274
10122
|
} else if (options.filename || value.name || value.path) {
|
|
9275
10123
|
filename = path.basename(options.filename || value.name || value.path);
|
|
9276
|
-
} else if (value.readable &&
|
|
10124
|
+
} else if (value.readable && Object.prototype.hasOwnProperty.call(value, "httpVersion")) {
|
|
9277
10125
|
filename = path.basename(value.client._httpMessage.path || "");
|
|
9278
10126
|
}
|
|
9279
10127
|
if (filename) {
|
|
@@ -9289,7 +10137,7 @@ var require_form_data = __commonJS({
|
|
|
9289
10137
|
if (!contentType && value.path) {
|
|
9290
10138
|
contentType = mime.lookup(value.path);
|
|
9291
10139
|
}
|
|
9292
|
-
if (!contentType && value.readable &&
|
|
10140
|
+
if (!contentType && value.readable && Object.prototype.hasOwnProperty.call(value, "httpVersion")) {
|
|
9293
10141
|
contentType = value.headers["content-type"];
|
|
9294
10142
|
}
|
|
9295
10143
|
if (!contentType && (options.filepath || options.filename)) {
|
|
@@ -9319,7 +10167,7 @@ var require_form_data = __commonJS({
|
|
|
9319
10167
|
"content-type": "multipart/form-data; boundary=" + this.getBoundary()
|
|
9320
10168
|
};
|
|
9321
10169
|
for (header in userHeaders) {
|
|
9322
|
-
if (
|
|
10170
|
+
if (Object.prototype.hasOwnProperty.call(userHeaders, header)) {
|
|
9323
10171
|
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
9324
10172
|
}
|
|
9325
10173
|
}
|
|
@@ -9450,6 +10298,7 @@ var require_form_data = __commonJS({
|
|
|
9450
10298
|
FormData3.prototype.toString = function() {
|
|
9451
10299
|
return "[object FormData]";
|
|
9452
10300
|
};
|
|
10301
|
+
setToStringTag(FormData3, "FormData");
|
|
9453
10302
|
}
|
|
9454
10303
|
});
|
|
9455
10304
|
|
|
@@ -10807,10 +11656,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
10807
11656
|
|
|
10808
11657
|
// src/server.ts
|
|
10809
11658
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
10810
|
-
import {
|
|
10811
|
-
ListToolsRequestSchema,
|
|
10812
|
-
CallToolRequestSchema
|
|
10813
|
-
} from "@modelcontextprotocol/sdk/types.js";
|
|
11659
|
+
import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
10814
11660
|
|
|
10815
11661
|
// node_modules/axios/lib/helpers/bind.js
|
|
10816
11662
|
function bind(fn, thisArg) {
|
|
@@ -14146,12 +14992,12 @@ var OpenAPISpecLoader = class {
|
|
|
14146
14992
|
for (const [method, operation] of Object.entries(pathItem)) {
|
|
14147
14993
|
if (method === "parameters" || !operation) continue;
|
|
14148
14994
|
const op = operation;
|
|
14149
|
-
const cleanPath = path.replace(/^\//, "");
|
|
14150
|
-
const toolId = `${method.toUpperCase()}-${cleanPath}`.replace(
|
|
14995
|
+
const cleanPath = path.replace(/^\//, "").replace(/\{([^}]+)\}/g, "$1");
|
|
14996
|
+
const toolId = `${method.toUpperCase()}-${cleanPath}`.replace(/[^a-zA-Z0-9-]/g, "-");
|
|
14997
|
+
const name = (op.operationId || op.summary || `${method.toUpperCase()} ${path}`).replace(
|
|
14151
14998
|
/[^a-zA-Z0-9-]/g,
|
|
14152
14999
|
"-"
|
|
14153
15000
|
);
|
|
14154
|
-
const name = (op.operationId || op.summary || `${method.toUpperCase()} ${path}`).replace(/[^a-zA-Z0-9-]/g, "-");
|
|
14155
15001
|
const tool = {
|
|
14156
15002
|
name,
|
|
14157
15003
|
description: op.description || `Make a ${method.toUpperCase()} request to ${path}`,
|
|
@@ -14168,8 +15014,10 @@ var OpenAPISpecLoader = class {
|
|
|
14168
15014
|
type: paramSchema.type || "string",
|
|
14169
15015
|
description: param.description || `${param.name} parameter`
|
|
14170
15016
|
};
|
|
14171
|
-
if (param.required) {
|
|
14172
|
-
|
|
15017
|
+
if (param.required === true) {
|
|
15018
|
+
if (!tool.inputSchema.required) {
|
|
15019
|
+
tool.inputSchema.required = [];
|
|
15020
|
+
}
|
|
14173
15021
|
tool.inputSchema.required.push(param.name);
|
|
14174
15022
|
}
|
|
14175
15023
|
}
|
|
@@ -14234,7 +15082,7 @@ var ToolsManager = class {
|
|
|
14234
15082
|
var ApiClient = class {
|
|
14235
15083
|
/**
|
|
14236
15084
|
* Create a new API client
|
|
14237
|
-
*
|
|
15085
|
+
*
|
|
14238
15086
|
* @param baseUrl - Base URL for the API
|
|
14239
15087
|
* @param headers - Optional headers to include with every request
|
|
14240
15088
|
*/
|
|
@@ -14248,7 +15096,7 @@ var ApiClient = class {
|
|
|
14248
15096
|
axiosInstance;
|
|
14249
15097
|
/**
|
|
14250
15098
|
* Execute an API call based on the tool ID and parameters
|
|
14251
|
-
*
|
|
15099
|
+
*
|
|
14252
15100
|
* @param toolId - The tool ID in format METHOD-path-parts
|
|
14253
15101
|
* @param params - Parameters for the API call
|
|
14254
15102
|
* @returns The API response data
|
|
@@ -14280,7 +15128,7 @@ var ApiClient = class {
|
|
|
14280
15128
|
}
|
|
14281
15129
|
/**
|
|
14282
15130
|
* Parse a tool ID into HTTP method and path
|
|
14283
|
-
*
|
|
15131
|
+
*
|
|
14284
15132
|
* @param toolId - Tool ID in format METHOD-path-parts
|
|
14285
15133
|
* @returns Object containing method and path
|
|
14286
15134
|
*/
|
|
@@ -14292,7 +15140,7 @@ var ApiClient = class {
|
|
|
14292
15140
|
/**
|
|
14293
15141
|
* Process query parameters for GET requests
|
|
14294
15142
|
* Converts arrays to comma-separated strings
|
|
14295
|
-
*
|
|
15143
|
+
*
|
|
14296
15144
|
* @param params - The original parameters
|
|
14297
15145
|
* @returns Processed parameters
|
|
14298
15146
|
*/
|
|
@@ -14355,10 +15203,7 @@ var OpenAPIServer = class {
|
|
|
14355
15203
|
const { toolId, tool } = toolInfo;
|
|
14356
15204
|
console.error(`Executing tool: ${toolId} (${tool.name})`);
|
|
14357
15205
|
try {
|
|
14358
|
-
const result = await this.apiClient.executeApiCall(
|
|
14359
|
-
toolId,
|
|
14360
|
-
params || {}
|
|
14361
|
-
);
|
|
15206
|
+
const result = await this.apiClient.executeApiCall(toolId, params || {});
|
|
14362
15207
|
return {
|
|
14363
15208
|
content: [
|
|
14364
15209
|
{
|
|
@@ -19277,14 +20122,10 @@ function loadConfig() {
|
|
|
19277
20122
|
const apiBaseUrl = argv["api-base-url"] || process.env.API_BASE_URL;
|
|
19278
20123
|
const openApiSpec = argv["openapi-spec"] || process.env.OPENAPI_SPEC_PATH;
|
|
19279
20124
|
if (!apiBaseUrl) {
|
|
19280
|
-
throw new Error(
|
|
19281
|
-
"API base URL is required (--api-base-url or API_BASE_URL)"
|
|
19282
|
-
);
|
|
20125
|
+
throw new Error("API base URL is required (--api-base-url or API_BASE_URL)");
|
|
19283
20126
|
}
|
|
19284
20127
|
if (!openApiSpec) {
|
|
19285
|
-
throw new Error(
|
|
19286
|
-
"OpenAPI spec is required (--openapi-spec or OPENAPI_SPEC_PATH)"
|
|
19287
|
-
);
|
|
20128
|
+
throw new Error("OpenAPI spec is required (--openapi-spec or OPENAPI_SPEC_PATH)");
|
|
19288
20129
|
}
|
|
19289
20130
|
const headers = parseHeaders(argv.headers || process.env.API_HEADERS);
|
|
19290
20131
|
return {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivotoby/openapi-mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "An MCP server that exposes OpenAPI endpoints as resources",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/bundle.js",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "
|
|
10
|
+
"url": "https://github.com/ivo-toby/mcp-openapi-server"
|
|
11
11
|
},
|
|
12
12
|
"bin": {
|
|
13
13
|
"mcp-server-openapi": "./bin/mcp-server.js"
|
|
@@ -18,32 +18,53 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "node build.js && chmod +x bin/mcp-server.js",
|
|
20
20
|
"clean": "rm -rf dist",
|
|
21
|
-
"lint": "eslint src/**/*.ts",
|
|
21
|
+
"lint": "eslint --config eslint.config.js src/**/*.ts",
|
|
22
|
+
"lint:fix": "eslint --fix --config eslint.config.js src/**/*.ts",
|
|
23
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
24
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
22
25
|
"watch": "tsc --watch",
|
|
23
26
|
"typecheck": "tsc --noEmit",
|
|
24
27
|
"prepare": "npm run build",
|
|
25
28
|
"dev": "nodemon --watch src -e ts --exec 'npm run build'",
|
|
26
29
|
"inspect": "node -r dotenv/config ./scripts/inspect.js",
|
|
27
30
|
"inspect-watch": "node ./scripts/inspect-watch.js",
|
|
28
|
-
"start": "node bin/mcp-server.js"
|
|
31
|
+
"start": "node bin/mcp-server.js",
|
|
32
|
+
"test": "vitest run --config vitest.config.ts",
|
|
33
|
+
"test:watch": "vitest watch --config vitest.config.ts"
|
|
29
34
|
},
|
|
30
35
|
"dependencies": {
|
|
31
|
-
"@modelcontextprotocol/sdk": "
|
|
36
|
+
"@modelcontextprotocol/sdk": "1.11.1",
|
|
32
37
|
"axios": "^1.8.4",
|
|
33
38
|
"openapi-types": "^12.1.3",
|
|
34
39
|
"yargs": "^17.7.2"
|
|
35
40
|
},
|
|
36
41
|
"devDependencies": {
|
|
37
|
-
"@
|
|
42
|
+
"@eslint/js": "^9.19.0",
|
|
43
|
+
"@semantic-release/commit-analyzer": "^11.1.0",
|
|
44
|
+
"@semantic-release/github": "^9.2.6",
|
|
45
|
+
"@semantic-release/npm": "^11.0.3",
|
|
46
|
+
"@semantic-release/release-notes-generator": "^12.1.0",
|
|
47
|
+
"@types/chai": "^4.3.11",
|
|
48
|
+
"@types/mocha": "^10.0.6",
|
|
38
49
|
"@types/node": "^22.13.11",
|
|
50
|
+
"@types/sinon": "^17.0.3",
|
|
39
51
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
40
52
|
"@typescript-eslint/parser": "^6.12.0",
|
|
41
53
|
"dotenv": "^16.4.7",
|
|
42
54
|
"esbuild": "^0.25.1",
|
|
43
|
-
"eslint": "^8.
|
|
55
|
+
"eslint": "^8.57.1",
|
|
56
|
+
"eslint-config-prettier": "^10.1.5",
|
|
57
|
+
"eslint-plugin-perfectionist": "^4.7.0",
|
|
58
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
44
59
|
"jest": "^29.7.0",
|
|
60
|
+
"msw": "^2.7.0",
|
|
45
61
|
"nodemon": "^3.1.7",
|
|
62
|
+
"prettier": "^3.4.2",
|
|
63
|
+
"semantic-release": "^22.0.12",
|
|
64
|
+
"sinon": "^17.0.1",
|
|
46
65
|
"ts-jest": "^29.1.1",
|
|
47
|
-
"typescript": "^5.3.2"
|
|
66
|
+
"typescript": "^5.3.2",
|
|
67
|
+
"typescript-eslint": "^8.22.0",
|
|
68
|
+
"vitest": "^3.1.3"
|
|
48
69
|
}
|
|
49
70
|
}
|