@settlemint/sdk-mcp 2.5.7 → 2.5.9
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/mcp.js +2118 -951
- package/dist/mcp.js.map +95 -75
- package/package.json +6 -5
package/dist/mcp.js
CHANGED
|
@@ -7262,581 +7262,6 @@ var require_logger = __commonJS((exports, module) => {
|
|
|
7262
7262
|
};
|
|
7263
7263
|
});
|
|
7264
7264
|
|
|
7265
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/utils.js
|
|
7266
|
-
var require_utils = __commonJS((exports) => {
|
|
7267
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7268
|
-
exports.normalizePath = exports.isRootDirectory = exports.convertSlashes = exports.cleanPath = undefined;
|
|
7269
|
-
var path_1 = __require("path");
|
|
7270
|
-
function cleanPath(path) {
|
|
7271
|
-
let normalized = (0, path_1.normalize)(path);
|
|
7272
|
-
if (normalized.length > 1 && normalized[normalized.length - 1] === path_1.sep)
|
|
7273
|
-
normalized = normalized.substring(0, normalized.length - 1);
|
|
7274
|
-
return normalized;
|
|
7275
|
-
}
|
|
7276
|
-
exports.cleanPath = cleanPath;
|
|
7277
|
-
var SLASHES_REGEX = /[\\/]/g;
|
|
7278
|
-
function convertSlashes(path, separator) {
|
|
7279
|
-
return path.replace(SLASHES_REGEX, separator);
|
|
7280
|
-
}
|
|
7281
|
-
exports.convertSlashes = convertSlashes;
|
|
7282
|
-
var WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
7283
|
-
function isRootDirectory(path) {
|
|
7284
|
-
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
|
|
7285
|
-
}
|
|
7286
|
-
exports.isRootDirectory = isRootDirectory;
|
|
7287
|
-
function normalizePath(path, options) {
|
|
7288
|
-
const { resolvePaths, normalizePath: normalizePath2, pathSeparator } = options;
|
|
7289
|
-
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
|
|
7290
|
-
if (resolvePaths)
|
|
7291
|
-
path = (0, path_1.resolve)(path);
|
|
7292
|
-
if (normalizePath2 || pathNeedsCleaning)
|
|
7293
|
-
path = cleanPath(path);
|
|
7294
|
-
if (path === ".")
|
|
7295
|
-
return "";
|
|
7296
|
-
const needsSeperator = path[path.length - 1] !== pathSeparator;
|
|
7297
|
-
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
|
|
7298
|
-
}
|
|
7299
|
-
exports.normalizePath = normalizePath;
|
|
7300
|
-
});
|
|
7301
|
-
|
|
7302
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/join-path.js
|
|
7303
|
-
var require_join_path = __commonJS((exports) => {
|
|
7304
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7305
|
-
exports.build = exports.joinDirectoryPath = exports.joinPathWithBasePath = undefined;
|
|
7306
|
-
var path_1 = __require("path");
|
|
7307
|
-
var utils_1 = require_utils();
|
|
7308
|
-
function joinPathWithBasePath(filename, directoryPath) {
|
|
7309
|
-
return directoryPath + filename;
|
|
7310
|
-
}
|
|
7311
|
-
exports.joinPathWithBasePath = joinPathWithBasePath;
|
|
7312
|
-
function joinPathWithRelativePath(root, options) {
|
|
7313
|
-
return function(filename, directoryPath) {
|
|
7314
|
-
const sameRoot = directoryPath.startsWith(root);
|
|
7315
|
-
if (sameRoot)
|
|
7316
|
-
return directoryPath.replace(root, "") + filename;
|
|
7317
|
-
else
|
|
7318
|
-
return (0, utils_1.convertSlashes)((0, path_1.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
|
7319
|
-
};
|
|
7320
|
-
}
|
|
7321
|
-
function joinPath(filename) {
|
|
7322
|
-
return filename;
|
|
7323
|
-
}
|
|
7324
|
-
function joinDirectoryPath(filename, directoryPath, separator) {
|
|
7325
|
-
return directoryPath + filename + separator;
|
|
7326
|
-
}
|
|
7327
|
-
exports.joinDirectoryPath = joinDirectoryPath;
|
|
7328
|
-
function build(root, options) {
|
|
7329
|
-
const { relativePaths, includeBasePath } = options;
|
|
7330
|
-
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
|
7331
|
-
}
|
|
7332
|
-
exports.build = build;
|
|
7333
|
-
});
|
|
7334
|
-
|
|
7335
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/push-directory.js
|
|
7336
|
-
var require_push_directory = __commonJS((exports) => {
|
|
7337
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7338
|
-
exports.build = undefined;
|
|
7339
|
-
function pushDirectoryWithRelativePath(root) {
|
|
7340
|
-
return function(directoryPath, paths) {
|
|
7341
|
-
paths.push(directoryPath.substring(root.length) || ".");
|
|
7342
|
-
};
|
|
7343
|
-
}
|
|
7344
|
-
function pushDirectoryFilterWithRelativePath(root) {
|
|
7345
|
-
return function(directoryPath, paths, filters) {
|
|
7346
|
-
const relativePath = directoryPath.substring(root.length) || ".";
|
|
7347
|
-
if (filters.every((filter) => filter(relativePath, true))) {
|
|
7348
|
-
paths.push(relativePath);
|
|
7349
|
-
}
|
|
7350
|
-
};
|
|
7351
|
-
}
|
|
7352
|
-
var pushDirectory = (directoryPath, paths) => {
|
|
7353
|
-
paths.push(directoryPath || ".");
|
|
7354
|
-
};
|
|
7355
|
-
var pushDirectoryFilter = (directoryPath, paths, filters) => {
|
|
7356
|
-
const path = directoryPath || ".";
|
|
7357
|
-
if (filters.every((filter) => filter(path, true))) {
|
|
7358
|
-
paths.push(path);
|
|
7359
|
-
}
|
|
7360
|
-
};
|
|
7361
|
-
var empty = () => {};
|
|
7362
|
-
function build(root, options) {
|
|
7363
|
-
const { includeDirs, filters, relativePaths } = options;
|
|
7364
|
-
if (!includeDirs)
|
|
7365
|
-
return empty;
|
|
7366
|
-
if (relativePaths)
|
|
7367
|
-
return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
|
7368
|
-
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
|
7369
|
-
}
|
|
7370
|
-
exports.build = build;
|
|
7371
|
-
});
|
|
7372
|
-
|
|
7373
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/push-file.js
|
|
7374
|
-
var require_push_file = __commonJS((exports) => {
|
|
7375
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7376
|
-
exports.build = undefined;
|
|
7377
|
-
var pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
|
7378
|
-
if (filters.every((filter) => filter(filename, false)))
|
|
7379
|
-
counts.files++;
|
|
7380
|
-
};
|
|
7381
|
-
var pushFileFilter = (filename, paths, _counts, filters) => {
|
|
7382
|
-
if (filters.every((filter) => filter(filename, false)))
|
|
7383
|
-
paths.push(filename);
|
|
7384
|
-
};
|
|
7385
|
-
var pushFileCount = (_filename, _paths, counts, _filters) => {
|
|
7386
|
-
counts.files++;
|
|
7387
|
-
};
|
|
7388
|
-
var pushFile = (filename, paths) => {
|
|
7389
|
-
paths.push(filename);
|
|
7390
|
-
};
|
|
7391
|
-
var empty = () => {};
|
|
7392
|
-
function build(options) {
|
|
7393
|
-
const { excludeFiles, filters, onlyCounts } = options;
|
|
7394
|
-
if (excludeFiles)
|
|
7395
|
-
return empty;
|
|
7396
|
-
if (filters && filters.length) {
|
|
7397
|
-
return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
|
7398
|
-
} else if (onlyCounts) {
|
|
7399
|
-
return pushFileCount;
|
|
7400
|
-
} else {
|
|
7401
|
-
return pushFile;
|
|
7402
|
-
}
|
|
7403
|
-
}
|
|
7404
|
-
exports.build = build;
|
|
7405
|
-
});
|
|
7406
|
-
|
|
7407
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/get-array.js
|
|
7408
|
-
var require_get_array = __commonJS((exports) => {
|
|
7409
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7410
|
-
exports.build = undefined;
|
|
7411
|
-
var getArray = (paths) => {
|
|
7412
|
-
return paths;
|
|
7413
|
-
};
|
|
7414
|
-
var getArrayGroup = () => {
|
|
7415
|
-
return [""].slice(0, 0);
|
|
7416
|
-
};
|
|
7417
|
-
function build(options) {
|
|
7418
|
-
return options.group ? getArrayGroup : getArray;
|
|
7419
|
-
}
|
|
7420
|
-
exports.build = build;
|
|
7421
|
-
});
|
|
7422
|
-
|
|
7423
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/group-files.js
|
|
7424
|
-
var require_group_files = __commonJS((exports) => {
|
|
7425
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7426
|
-
exports.build = undefined;
|
|
7427
|
-
var groupFiles = (groups, directory, files) => {
|
|
7428
|
-
groups.push({ directory, files, dir: directory });
|
|
7429
|
-
};
|
|
7430
|
-
var empty = () => {};
|
|
7431
|
-
function build(options) {
|
|
7432
|
-
return options.group ? groupFiles : empty;
|
|
7433
|
-
}
|
|
7434
|
-
exports.build = build;
|
|
7435
|
-
});
|
|
7436
|
-
|
|
7437
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/resolve-symlink.js
|
|
7438
|
-
var require_resolve_symlink = __commonJS((exports) => {
|
|
7439
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
7440
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
7441
|
-
};
|
|
7442
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7443
|
-
exports.build = undefined;
|
|
7444
|
-
var fs_1 = __importDefault(__require("fs"));
|
|
7445
|
-
var path_1 = __require("path");
|
|
7446
|
-
var resolveSymlinksAsync = function(path, state, callback) {
|
|
7447
|
-
const { queue, options: { suppressErrors } } = state;
|
|
7448
|
-
queue.enqueue();
|
|
7449
|
-
fs_1.default.realpath(path, (error43, resolvedPath) => {
|
|
7450
|
-
if (error43)
|
|
7451
|
-
return queue.dequeue(suppressErrors ? null : error43, state);
|
|
7452
|
-
fs_1.default.stat(resolvedPath, (error44, stat) => {
|
|
7453
|
-
if (error44)
|
|
7454
|
-
return queue.dequeue(suppressErrors ? null : error44, state);
|
|
7455
|
-
if (stat.isDirectory() && isRecursive(path, resolvedPath, state))
|
|
7456
|
-
return queue.dequeue(null, state);
|
|
7457
|
-
callback(stat, resolvedPath);
|
|
7458
|
-
queue.dequeue(null, state);
|
|
7459
|
-
});
|
|
7460
|
-
});
|
|
7461
|
-
};
|
|
7462
|
-
var resolveSymlinks = function(path, state, callback) {
|
|
7463
|
-
const { queue, options: { suppressErrors } } = state;
|
|
7464
|
-
queue.enqueue();
|
|
7465
|
-
try {
|
|
7466
|
-
const resolvedPath = fs_1.default.realpathSync(path);
|
|
7467
|
-
const stat = fs_1.default.statSync(resolvedPath);
|
|
7468
|
-
if (stat.isDirectory() && isRecursive(path, resolvedPath, state))
|
|
7469
|
-
return;
|
|
7470
|
-
callback(stat, resolvedPath);
|
|
7471
|
-
} catch (e) {
|
|
7472
|
-
if (!suppressErrors)
|
|
7473
|
-
throw e;
|
|
7474
|
-
}
|
|
7475
|
-
};
|
|
7476
|
-
function build(options, isSynchronous) {
|
|
7477
|
-
if (!options.resolveSymlinks || options.excludeSymlinks)
|
|
7478
|
-
return null;
|
|
7479
|
-
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
7480
|
-
}
|
|
7481
|
-
exports.build = build;
|
|
7482
|
-
function isRecursive(path, resolved, state) {
|
|
7483
|
-
if (state.options.useRealPaths)
|
|
7484
|
-
return isRecursiveUsingRealPaths(resolved, state);
|
|
7485
|
-
let parent = (0, path_1.dirname)(path);
|
|
7486
|
-
let depth = 1;
|
|
7487
|
-
while (parent !== state.root && depth < 2) {
|
|
7488
|
-
const resolvedPath = state.symlinks.get(parent);
|
|
7489
|
-
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
|
7490
|
-
if (isSameRoot)
|
|
7491
|
-
depth++;
|
|
7492
|
-
else
|
|
7493
|
-
parent = (0, path_1.dirname)(parent);
|
|
7494
|
-
}
|
|
7495
|
-
state.symlinks.set(path, resolved);
|
|
7496
|
-
return depth > 1;
|
|
7497
|
-
}
|
|
7498
|
-
function isRecursiveUsingRealPaths(resolved, state) {
|
|
7499
|
-
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
7500
|
-
}
|
|
7501
|
-
});
|
|
7502
|
-
|
|
7503
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/invoke-callback.js
|
|
7504
|
-
var require_invoke_callback = __commonJS((exports) => {
|
|
7505
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7506
|
-
exports.build = undefined;
|
|
7507
|
-
var onlyCountsSync = (state) => {
|
|
7508
|
-
return state.counts;
|
|
7509
|
-
};
|
|
7510
|
-
var groupsSync = (state) => {
|
|
7511
|
-
return state.groups;
|
|
7512
|
-
};
|
|
7513
|
-
var defaultSync = (state) => {
|
|
7514
|
-
return state.paths;
|
|
7515
|
-
};
|
|
7516
|
-
var limitFilesSync = (state) => {
|
|
7517
|
-
return state.paths.slice(0, state.options.maxFiles);
|
|
7518
|
-
};
|
|
7519
|
-
var onlyCountsAsync = (state, error43, callback) => {
|
|
7520
|
-
report(error43, callback, state.counts, state.options.suppressErrors);
|
|
7521
|
-
return null;
|
|
7522
|
-
};
|
|
7523
|
-
var defaultAsync = (state, error43, callback) => {
|
|
7524
|
-
report(error43, callback, state.paths, state.options.suppressErrors);
|
|
7525
|
-
return null;
|
|
7526
|
-
};
|
|
7527
|
-
var limitFilesAsync = (state, error43, callback) => {
|
|
7528
|
-
report(error43, callback, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
7529
|
-
return null;
|
|
7530
|
-
};
|
|
7531
|
-
var groupsAsync = (state, error43, callback) => {
|
|
7532
|
-
report(error43, callback, state.groups, state.options.suppressErrors);
|
|
7533
|
-
return null;
|
|
7534
|
-
};
|
|
7535
|
-
function report(error43, callback, output, suppressErrors) {
|
|
7536
|
-
if (error43 && !suppressErrors)
|
|
7537
|
-
callback(error43, output);
|
|
7538
|
-
else
|
|
7539
|
-
callback(null, output);
|
|
7540
|
-
}
|
|
7541
|
-
function build(options, isSynchronous) {
|
|
7542
|
-
const { onlyCounts, group, maxFiles } = options;
|
|
7543
|
-
if (onlyCounts)
|
|
7544
|
-
return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
|
7545
|
-
else if (group)
|
|
7546
|
-
return isSynchronous ? groupsSync : groupsAsync;
|
|
7547
|
-
else if (maxFiles)
|
|
7548
|
-
return isSynchronous ? limitFilesSync : limitFilesAsync;
|
|
7549
|
-
else
|
|
7550
|
-
return isSynchronous ? defaultSync : defaultAsync;
|
|
7551
|
-
}
|
|
7552
|
-
exports.build = build;
|
|
7553
|
-
});
|
|
7554
|
-
|
|
7555
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/functions/walk-directory.js
|
|
7556
|
-
var require_walk_directory = __commonJS((exports) => {
|
|
7557
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
7558
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
7559
|
-
};
|
|
7560
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7561
|
-
exports.build = undefined;
|
|
7562
|
-
var fs_1 = __importDefault(__require("fs"));
|
|
7563
|
-
var readdirOpts = { withFileTypes: true };
|
|
7564
|
-
var walkAsync = (state, crawlPath, directoryPath, currentDepth, callback) => {
|
|
7565
|
-
state.queue.enqueue();
|
|
7566
|
-
if (currentDepth < 0)
|
|
7567
|
-
return state.queue.dequeue(null, state);
|
|
7568
|
-
state.visited.push(crawlPath);
|
|
7569
|
-
state.counts.directories++;
|
|
7570
|
-
fs_1.default.readdir(crawlPath || ".", readdirOpts, (error43, entries = []) => {
|
|
7571
|
-
callback(entries, directoryPath, currentDepth);
|
|
7572
|
-
state.queue.dequeue(state.options.suppressErrors ? null : error43, state);
|
|
7573
|
-
});
|
|
7574
|
-
};
|
|
7575
|
-
var walkSync = (state, crawlPath, directoryPath, currentDepth, callback) => {
|
|
7576
|
-
if (currentDepth < 0)
|
|
7577
|
-
return;
|
|
7578
|
-
state.visited.push(crawlPath);
|
|
7579
|
-
state.counts.directories++;
|
|
7580
|
-
let entries = [];
|
|
7581
|
-
try {
|
|
7582
|
-
entries = fs_1.default.readdirSync(crawlPath || ".", readdirOpts);
|
|
7583
|
-
} catch (e) {
|
|
7584
|
-
if (!state.options.suppressErrors)
|
|
7585
|
-
throw e;
|
|
7586
|
-
}
|
|
7587
|
-
callback(entries, directoryPath, currentDepth);
|
|
7588
|
-
};
|
|
7589
|
-
function build(isSynchronous) {
|
|
7590
|
-
return isSynchronous ? walkSync : walkAsync;
|
|
7591
|
-
}
|
|
7592
|
-
exports.build = build;
|
|
7593
|
-
});
|
|
7594
|
-
|
|
7595
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/queue.js
|
|
7596
|
-
var require_queue = __commonJS((exports) => {
|
|
7597
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7598
|
-
exports.Queue = undefined;
|
|
7599
|
-
|
|
7600
|
-
class Queue {
|
|
7601
|
-
onQueueEmpty;
|
|
7602
|
-
count = 0;
|
|
7603
|
-
constructor(onQueueEmpty) {
|
|
7604
|
-
this.onQueueEmpty = onQueueEmpty;
|
|
7605
|
-
}
|
|
7606
|
-
enqueue() {
|
|
7607
|
-
this.count++;
|
|
7608
|
-
return this.count;
|
|
7609
|
-
}
|
|
7610
|
-
dequeue(error43, output) {
|
|
7611
|
-
if (this.onQueueEmpty && (--this.count <= 0 || error43)) {
|
|
7612
|
-
this.onQueueEmpty(error43, output);
|
|
7613
|
-
if (error43) {
|
|
7614
|
-
output.controller.abort();
|
|
7615
|
-
this.onQueueEmpty = undefined;
|
|
7616
|
-
}
|
|
7617
|
-
}
|
|
7618
|
-
}
|
|
7619
|
-
}
|
|
7620
|
-
exports.Queue = Queue;
|
|
7621
|
-
});
|
|
7622
|
-
|
|
7623
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/counter.js
|
|
7624
|
-
var require_counter = __commonJS((exports) => {
|
|
7625
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7626
|
-
exports.Counter = undefined;
|
|
7627
|
-
|
|
7628
|
-
class Counter {
|
|
7629
|
-
_files = 0;
|
|
7630
|
-
_directories = 0;
|
|
7631
|
-
set files(num) {
|
|
7632
|
-
this._files = num;
|
|
7633
|
-
}
|
|
7634
|
-
get files() {
|
|
7635
|
-
return this._files;
|
|
7636
|
-
}
|
|
7637
|
-
set directories(num) {
|
|
7638
|
-
this._directories = num;
|
|
7639
|
-
}
|
|
7640
|
-
get directories() {
|
|
7641
|
-
return this._directories;
|
|
7642
|
-
}
|
|
7643
|
-
get dirs() {
|
|
7644
|
-
return this._directories;
|
|
7645
|
-
}
|
|
7646
|
-
}
|
|
7647
|
-
exports.Counter = Counter;
|
|
7648
|
-
});
|
|
7649
|
-
|
|
7650
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/walker.js
|
|
7651
|
-
var require_walker = __commonJS((exports) => {
|
|
7652
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
7653
|
-
if (k2 === undefined)
|
|
7654
|
-
k2 = k;
|
|
7655
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7656
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7657
|
-
desc = { enumerable: true, get: function() {
|
|
7658
|
-
return m[k];
|
|
7659
|
-
} };
|
|
7660
|
-
}
|
|
7661
|
-
Object.defineProperty(o, k2, desc);
|
|
7662
|
-
} : function(o, m, k, k2) {
|
|
7663
|
-
if (k2 === undefined)
|
|
7664
|
-
k2 = k;
|
|
7665
|
-
o[k2] = m[k];
|
|
7666
|
-
});
|
|
7667
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
7668
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
7669
|
-
} : function(o, v) {
|
|
7670
|
-
o["default"] = v;
|
|
7671
|
-
});
|
|
7672
|
-
var __importStar = exports && exports.__importStar || function(mod) {
|
|
7673
|
-
if (mod && mod.__esModule)
|
|
7674
|
-
return mod;
|
|
7675
|
-
var result = {};
|
|
7676
|
-
if (mod != null) {
|
|
7677
|
-
for (var k in mod)
|
|
7678
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
7679
|
-
__createBinding(result, mod, k);
|
|
7680
|
-
}
|
|
7681
|
-
__setModuleDefault(result, mod);
|
|
7682
|
-
return result;
|
|
7683
|
-
};
|
|
7684
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7685
|
-
exports.Walker = undefined;
|
|
7686
|
-
var path_1 = __require("path");
|
|
7687
|
-
var utils_1 = require_utils();
|
|
7688
|
-
var joinPath = __importStar(require_join_path());
|
|
7689
|
-
var pushDirectory = __importStar(require_push_directory());
|
|
7690
|
-
var pushFile = __importStar(require_push_file());
|
|
7691
|
-
var getArray = __importStar(require_get_array());
|
|
7692
|
-
var groupFiles = __importStar(require_group_files());
|
|
7693
|
-
var resolveSymlink = __importStar(require_resolve_symlink());
|
|
7694
|
-
var invokeCallback = __importStar(require_invoke_callback());
|
|
7695
|
-
var walkDirectory = __importStar(require_walk_directory());
|
|
7696
|
-
var queue_1 = require_queue();
|
|
7697
|
-
var counter_1 = require_counter();
|
|
7698
|
-
|
|
7699
|
-
class Walker {
|
|
7700
|
-
root;
|
|
7701
|
-
isSynchronous;
|
|
7702
|
-
state;
|
|
7703
|
-
joinPath;
|
|
7704
|
-
pushDirectory;
|
|
7705
|
-
pushFile;
|
|
7706
|
-
getArray;
|
|
7707
|
-
groupFiles;
|
|
7708
|
-
resolveSymlink;
|
|
7709
|
-
walkDirectory;
|
|
7710
|
-
callbackInvoker;
|
|
7711
|
-
constructor(root, options, callback) {
|
|
7712
|
-
this.isSynchronous = !callback;
|
|
7713
|
-
this.callbackInvoker = invokeCallback.build(options, this.isSynchronous);
|
|
7714
|
-
this.root = (0, utils_1.normalizePath)(root, options);
|
|
7715
|
-
this.state = {
|
|
7716
|
-
root: (0, utils_1.isRootDirectory)(this.root) ? this.root : this.root.slice(0, -1),
|
|
7717
|
-
paths: [""].slice(0, 0),
|
|
7718
|
-
groups: [],
|
|
7719
|
-
counts: new counter_1.Counter,
|
|
7720
|
-
options,
|
|
7721
|
-
queue: new queue_1.Queue((error43, state) => this.callbackInvoker(state, error43, callback)),
|
|
7722
|
-
symlinks: new Map,
|
|
7723
|
-
visited: [""].slice(0, 0),
|
|
7724
|
-
controller: new AbortController
|
|
7725
|
-
};
|
|
7726
|
-
this.joinPath = joinPath.build(this.root, options);
|
|
7727
|
-
this.pushDirectory = pushDirectory.build(this.root, options);
|
|
7728
|
-
this.pushFile = pushFile.build(options);
|
|
7729
|
-
this.getArray = getArray.build(options);
|
|
7730
|
-
this.groupFiles = groupFiles.build(options);
|
|
7731
|
-
this.resolveSymlink = resolveSymlink.build(options, this.isSynchronous);
|
|
7732
|
-
this.walkDirectory = walkDirectory.build(this.isSynchronous);
|
|
7733
|
-
}
|
|
7734
|
-
start() {
|
|
7735
|
-
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
|
7736
|
-
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
|
7737
|
-
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
|
7738
|
-
}
|
|
7739
|
-
walk = (entries, directoryPath, depth) => {
|
|
7740
|
-
const { paths, options: { filters, resolveSymlinks, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
|
7741
|
-
if (controller.signal.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles)
|
|
7742
|
-
return;
|
|
7743
|
-
const files = this.getArray(this.state.paths);
|
|
7744
|
-
for (let i = 0;i < entries.length; ++i) {
|
|
7745
|
-
const entry = entries[i];
|
|
7746
|
-
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks && !excludeSymlinks) {
|
|
7747
|
-
const filename = this.joinPath(entry.name, directoryPath);
|
|
7748
|
-
this.pushFile(filename, files, this.state.counts, filters);
|
|
7749
|
-
} else if (entry.isDirectory()) {
|
|
7750
|
-
let path = joinPath.joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
7751
|
-
if (exclude && exclude(entry.name, path))
|
|
7752
|
-
continue;
|
|
7753
|
-
this.pushDirectory(path, paths, filters);
|
|
7754
|
-
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
|
|
7755
|
-
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
7756
|
-
let path = joinPath.joinPathWithBasePath(entry.name, directoryPath);
|
|
7757
|
-
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
|
|
7758
|
-
if (stat.isDirectory()) {
|
|
7759
|
-
resolvedPath = (0, utils_1.normalizePath)(resolvedPath, this.state.options);
|
|
7760
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator))
|
|
7761
|
-
return;
|
|
7762
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
|
|
7763
|
-
} else {
|
|
7764
|
-
resolvedPath = useRealPaths ? resolvedPath : path;
|
|
7765
|
-
const filename = (0, path_1.basename)(resolvedPath);
|
|
7766
|
-
const directoryPath2 = (0, utils_1.normalizePath)((0, path_1.dirname)(resolvedPath), this.state.options);
|
|
7767
|
-
resolvedPath = this.joinPath(filename, directoryPath2);
|
|
7768
|
-
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
|
7769
|
-
}
|
|
7770
|
-
});
|
|
7771
|
-
}
|
|
7772
|
-
}
|
|
7773
|
-
this.groupFiles(this.state.groups, directoryPath, files);
|
|
7774
|
-
};
|
|
7775
|
-
}
|
|
7776
|
-
exports.Walker = Walker;
|
|
7777
|
-
});
|
|
7778
|
-
|
|
7779
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/async.js
|
|
7780
|
-
var require_async2 = __commonJS((exports) => {
|
|
7781
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7782
|
-
exports.callback = exports.promise = undefined;
|
|
7783
|
-
var walker_1 = require_walker();
|
|
7784
|
-
function promise3(root, options) {
|
|
7785
|
-
return new Promise((resolve, reject) => {
|
|
7786
|
-
callback(root, options, (err, output) => {
|
|
7787
|
-
if (err)
|
|
7788
|
-
return reject(err);
|
|
7789
|
-
resolve(output);
|
|
7790
|
-
});
|
|
7791
|
-
});
|
|
7792
|
-
}
|
|
7793
|
-
exports.promise = promise3;
|
|
7794
|
-
function callback(root, options, callback2) {
|
|
7795
|
-
let walker = new walker_1.Walker(root, options, callback2);
|
|
7796
|
-
walker.start();
|
|
7797
|
-
}
|
|
7798
|
-
exports.callback = callback;
|
|
7799
|
-
});
|
|
7800
|
-
|
|
7801
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/api/sync.js
|
|
7802
|
-
var require_sync = __commonJS((exports) => {
|
|
7803
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7804
|
-
exports.sync = undefined;
|
|
7805
|
-
var walker_1 = require_walker();
|
|
7806
|
-
function sync(root, options) {
|
|
7807
|
-
const walker = new walker_1.Walker(root, options);
|
|
7808
|
-
return walker.start();
|
|
7809
|
-
}
|
|
7810
|
-
exports.sync = sync;
|
|
7811
|
-
});
|
|
7812
|
-
|
|
7813
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/builder/api-builder.js
|
|
7814
|
-
var require_api_builder = __commonJS((exports) => {
|
|
7815
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7816
|
-
exports.APIBuilder = undefined;
|
|
7817
|
-
var async_1 = require_async2();
|
|
7818
|
-
var sync_1 = require_sync();
|
|
7819
|
-
|
|
7820
|
-
class APIBuilder {
|
|
7821
|
-
root;
|
|
7822
|
-
options;
|
|
7823
|
-
constructor(root, options) {
|
|
7824
|
-
this.root = root;
|
|
7825
|
-
this.options = options;
|
|
7826
|
-
}
|
|
7827
|
-
withPromise() {
|
|
7828
|
-
return (0, async_1.promise)(this.root, this.options);
|
|
7829
|
-
}
|
|
7830
|
-
withCallback(cb) {
|
|
7831
|
-
(0, async_1.callback)(this.root, this.options, cb);
|
|
7832
|
-
}
|
|
7833
|
-
sync() {
|
|
7834
|
-
return (0, sync_1.sync)(this.root, this.options);
|
|
7835
|
-
}
|
|
7836
|
-
}
|
|
7837
|
-
exports.APIBuilder = APIBuilder;
|
|
7838
|
-
});
|
|
7839
|
-
|
|
7840
7265
|
// ../../node_modules/.bun/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
|
|
7841
7266
|
var require_constants = __commonJS((exports, module) => {
|
|
7842
7267
|
var WIN_SLASH = "\\\\/";
|
|
@@ -7980,7 +7405,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
7980
7405
|
});
|
|
7981
7406
|
|
|
7982
7407
|
// ../../node_modules/.bun/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
|
|
7983
|
-
var
|
|
7408
|
+
var require_utils = __commonJS((exports) => {
|
|
7984
7409
|
var {
|
|
7985
7410
|
REGEX_BACKSLASH,
|
|
7986
7411
|
REGEX_REMOVE_BACKSLASH,
|
|
@@ -8044,7 +7469,7 @@ var require_utils2 = __commonJS((exports) => {
|
|
|
8044
7469
|
|
|
8045
7470
|
// ../../node_modules/.bun/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
|
|
8046
7471
|
var require_scan = __commonJS((exports, module) => {
|
|
8047
|
-
var utils =
|
|
7472
|
+
var utils = require_utils();
|
|
8048
7473
|
var {
|
|
8049
7474
|
CHAR_ASTERISK,
|
|
8050
7475
|
CHAR_AT,
|
|
@@ -8360,7 +7785,7 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
8360
7785
|
// ../../node_modules/.bun/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
|
|
8361
7786
|
var require_parse = __commonJS((exports, module) => {
|
|
8362
7787
|
var constants = require_constants();
|
|
8363
|
-
var utils =
|
|
7788
|
+
var utils = require_utils();
|
|
8364
7789
|
var {
|
|
8365
7790
|
MAX_LENGTH,
|
|
8366
7791
|
POSIX_REGEX_SOURCE,
|
|
@@ -9134,7 +8559,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
9134
8559
|
var require_picomatch = __commonJS((exports, module) => {
|
|
9135
8560
|
var scan = require_scan();
|
|
9136
8561
|
var parse5 = require_parse();
|
|
9137
|
-
var utils =
|
|
8562
|
+
var utils = require_utils();
|
|
9138
8563
|
var constants = require_constants();
|
|
9139
8564
|
var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
9140
8565
|
var picomatch = (glob, options, returnState = false) => {
|
|
@@ -9273,7 +8698,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
9273
8698
|
// ../../node_modules/.bun/picomatch@4.0.3/node_modules/picomatch/index.js
|
|
9274
8699
|
var require_picomatch2 = __commonJS((exports, module) => {
|
|
9275
8700
|
var pico = require_picomatch();
|
|
9276
|
-
var utils =
|
|
8701
|
+
var utils = require_utils();
|
|
9277
8702
|
function picomatch(glob, options, returnState = false) {
|
|
9278
8703
|
if (options && (options.windows === null || options.windows === undefined)) {
|
|
9279
8704
|
options = { ...options, windows: utils.isWindows() };
|
|
@@ -9284,29 +8709,458 @@ var require_picomatch2 = __commonJS((exports, module) => {
|
|
|
9284
8709
|
module.exports = picomatch;
|
|
9285
8710
|
});
|
|
9286
8711
|
|
|
9287
|
-
// ../../node_modules/.bun/fdir@6.
|
|
9288
|
-
var
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
var
|
|
9292
|
-
var
|
|
8712
|
+
// ../../node_modules/.bun/fdir@6.5.0+a185e370e160e74e/node_modules/fdir/dist/index.cjs
|
|
8713
|
+
var require_dist3 = __commonJS((exports) => {
|
|
8714
|
+
var __create2 = Object.create;
|
|
8715
|
+
var __defProp2 = Object.defineProperty;
|
|
8716
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8717
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
8718
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
|
8719
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
8720
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8721
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
8722
|
+
for (var keys = __getOwnPropNames2(from), i = 0, n = keys.length, key;i < n; i++) {
|
|
8723
|
+
key = keys[i];
|
|
8724
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
8725
|
+
__defProp2(to, key, {
|
|
8726
|
+
get: ((k) => from[k]).bind(null, key),
|
|
8727
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
8728
|
+
});
|
|
8729
|
+
}
|
|
8730
|
+
return to;
|
|
8731
|
+
};
|
|
8732
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
8733
|
+
value: mod,
|
|
8734
|
+
enumerable: true
|
|
8735
|
+
}) : target, mod));
|
|
8736
|
+
var path = __toESM2(__require("path"));
|
|
8737
|
+
var fs = __toESM2(__require("fs"));
|
|
8738
|
+
function cleanPath(path$1) {
|
|
8739
|
+
let normalized = (0, path.normalize)(path$1);
|
|
8740
|
+
if (normalized.length > 1 && normalized[normalized.length - 1] === path.sep)
|
|
8741
|
+
normalized = normalized.substring(0, normalized.length - 1);
|
|
8742
|
+
return normalized;
|
|
8743
|
+
}
|
|
8744
|
+
var SLASHES_REGEX = /[\\/]/g;
|
|
8745
|
+
function convertSlashes(path$1, separator) {
|
|
8746
|
+
return path$1.replace(SLASHES_REGEX, separator);
|
|
8747
|
+
}
|
|
8748
|
+
var WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
8749
|
+
function isRootDirectory(path$1) {
|
|
8750
|
+
return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
|
|
8751
|
+
}
|
|
8752
|
+
function normalizePath(path$1, options) {
|
|
8753
|
+
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
|
8754
|
+
const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
|
|
8755
|
+
if (resolvePaths)
|
|
8756
|
+
path$1 = (0, path.resolve)(path$1);
|
|
8757
|
+
if (normalizePath$1 || pathNeedsCleaning)
|
|
8758
|
+
path$1 = cleanPath(path$1);
|
|
8759
|
+
if (path$1 === ".")
|
|
8760
|
+
return "";
|
|
8761
|
+
const needsSeperator = path$1[path$1.length - 1] !== pathSeparator;
|
|
8762
|
+
return convertSlashes(needsSeperator ? path$1 + pathSeparator : path$1, pathSeparator);
|
|
8763
|
+
}
|
|
8764
|
+
function joinPathWithBasePath(filename, directoryPath) {
|
|
8765
|
+
return directoryPath + filename;
|
|
8766
|
+
}
|
|
8767
|
+
function joinPathWithRelativePath(root, options) {
|
|
8768
|
+
return function(filename, directoryPath) {
|
|
8769
|
+
const sameRoot = directoryPath.startsWith(root);
|
|
8770
|
+
if (sameRoot)
|
|
8771
|
+
return directoryPath.slice(root.length) + filename;
|
|
8772
|
+
else
|
|
8773
|
+
return convertSlashes((0, path.relative)(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
|
|
8774
|
+
};
|
|
8775
|
+
}
|
|
8776
|
+
function joinPath(filename) {
|
|
8777
|
+
return filename;
|
|
8778
|
+
}
|
|
8779
|
+
function joinDirectoryPath(filename, directoryPath, separator) {
|
|
8780
|
+
return directoryPath + filename + separator;
|
|
8781
|
+
}
|
|
8782
|
+
function build$7(root, options) {
|
|
8783
|
+
const { relativePaths, includeBasePath } = options;
|
|
8784
|
+
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
|
|
8785
|
+
}
|
|
8786
|
+
function pushDirectoryWithRelativePath(root) {
|
|
8787
|
+
return function(directoryPath, paths) {
|
|
8788
|
+
paths.push(directoryPath.substring(root.length) || ".");
|
|
8789
|
+
};
|
|
8790
|
+
}
|
|
8791
|
+
function pushDirectoryFilterWithRelativePath(root) {
|
|
8792
|
+
return function(directoryPath, paths, filters) {
|
|
8793
|
+
const relativePath = directoryPath.substring(root.length) || ".";
|
|
8794
|
+
if (filters.every((filter) => filter(relativePath, true)))
|
|
8795
|
+
paths.push(relativePath);
|
|
8796
|
+
};
|
|
8797
|
+
}
|
|
8798
|
+
var pushDirectory = (directoryPath, paths) => {
|
|
8799
|
+
paths.push(directoryPath || ".");
|
|
8800
|
+
};
|
|
8801
|
+
var pushDirectoryFilter = (directoryPath, paths, filters) => {
|
|
8802
|
+
const path$1 = directoryPath || ".";
|
|
8803
|
+
if (filters.every((filter) => filter(path$1, true)))
|
|
8804
|
+
paths.push(path$1);
|
|
8805
|
+
};
|
|
8806
|
+
var empty$2 = () => {};
|
|
8807
|
+
function build$6(root, options) {
|
|
8808
|
+
const { includeDirs, filters, relativePaths } = options;
|
|
8809
|
+
if (!includeDirs)
|
|
8810
|
+
return empty$2;
|
|
8811
|
+
if (relativePaths)
|
|
8812
|
+
return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
|
|
8813
|
+
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
|
|
8814
|
+
}
|
|
8815
|
+
var pushFileFilterAndCount = (filename, _paths, counts, filters) => {
|
|
8816
|
+
if (filters.every((filter) => filter(filename, false)))
|
|
8817
|
+
counts.files++;
|
|
8818
|
+
};
|
|
8819
|
+
var pushFileFilter = (filename, paths, _counts, filters) => {
|
|
8820
|
+
if (filters.every((filter) => filter(filename, false)))
|
|
8821
|
+
paths.push(filename);
|
|
8822
|
+
};
|
|
8823
|
+
var pushFileCount = (_filename, _paths, counts, _filters) => {
|
|
8824
|
+
counts.files++;
|
|
8825
|
+
};
|
|
8826
|
+
var pushFile = (filename, paths) => {
|
|
8827
|
+
paths.push(filename);
|
|
8828
|
+
};
|
|
8829
|
+
var empty$1 = () => {};
|
|
8830
|
+
function build$5(options) {
|
|
8831
|
+
const { excludeFiles, filters, onlyCounts } = options;
|
|
8832
|
+
if (excludeFiles)
|
|
8833
|
+
return empty$1;
|
|
8834
|
+
if (filters && filters.length)
|
|
8835
|
+
return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
|
|
8836
|
+
else if (onlyCounts)
|
|
8837
|
+
return pushFileCount;
|
|
8838
|
+
else
|
|
8839
|
+
return pushFile;
|
|
8840
|
+
}
|
|
8841
|
+
var getArray = (paths) => {
|
|
8842
|
+
return paths;
|
|
8843
|
+
};
|
|
8844
|
+
var getArrayGroup = () => {
|
|
8845
|
+
return [""].slice(0, 0);
|
|
8846
|
+
};
|
|
8847
|
+
function build$4(options) {
|
|
8848
|
+
return options.group ? getArrayGroup : getArray;
|
|
8849
|
+
}
|
|
8850
|
+
var groupFiles = (groups, directory, files) => {
|
|
8851
|
+
groups.push({
|
|
8852
|
+
directory,
|
|
8853
|
+
files,
|
|
8854
|
+
dir: directory
|
|
8855
|
+
});
|
|
8856
|
+
};
|
|
8857
|
+
var empty = () => {};
|
|
8858
|
+
function build$3(options) {
|
|
8859
|
+
return options.group ? groupFiles : empty;
|
|
8860
|
+
}
|
|
8861
|
+
var resolveSymlinksAsync = function(path$1, state, callback$1) {
|
|
8862
|
+
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
|
8863
|
+
queue.enqueue();
|
|
8864
|
+
fs$1.realpath(path$1, (error43, resolvedPath) => {
|
|
8865
|
+
if (error43)
|
|
8866
|
+
return queue.dequeue(suppressErrors ? null : error43, state);
|
|
8867
|
+
fs$1.stat(resolvedPath, (error$1, stat) => {
|
|
8868
|
+
if (error$1)
|
|
8869
|
+
return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
8870
|
+
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state))
|
|
8871
|
+
return queue.dequeue(null, state);
|
|
8872
|
+
callback$1(stat, resolvedPath);
|
|
8873
|
+
queue.dequeue(null, state);
|
|
8874
|
+
});
|
|
8875
|
+
});
|
|
8876
|
+
};
|
|
8877
|
+
var resolveSymlinks = function(path$1, state, callback$1) {
|
|
8878
|
+
const { queue, fs: fs$1, options: { suppressErrors } } = state;
|
|
8879
|
+
queue.enqueue();
|
|
8880
|
+
try {
|
|
8881
|
+
const resolvedPath = fs$1.realpathSync(path$1);
|
|
8882
|
+
const stat = fs$1.statSync(resolvedPath);
|
|
8883
|
+
if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state))
|
|
8884
|
+
return;
|
|
8885
|
+
callback$1(stat, resolvedPath);
|
|
8886
|
+
} catch (e) {
|
|
8887
|
+
if (!suppressErrors)
|
|
8888
|
+
throw e;
|
|
8889
|
+
}
|
|
8890
|
+
};
|
|
8891
|
+
function build$2(options, isSynchronous) {
|
|
8892
|
+
if (!options.resolveSymlinks || options.excludeSymlinks)
|
|
8893
|
+
return null;
|
|
8894
|
+
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
8895
|
+
}
|
|
8896
|
+
function isRecursive(path$1, resolved, state) {
|
|
8897
|
+
if (state.options.useRealPaths)
|
|
8898
|
+
return isRecursiveUsingRealPaths(resolved, state);
|
|
8899
|
+
let parent = (0, path.dirname)(path$1);
|
|
8900
|
+
let depth = 1;
|
|
8901
|
+
while (parent !== state.root && depth < 2) {
|
|
8902
|
+
const resolvedPath = state.symlinks.get(parent);
|
|
8903
|
+
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
|
|
8904
|
+
if (isSameRoot)
|
|
8905
|
+
depth++;
|
|
8906
|
+
else
|
|
8907
|
+
parent = (0, path.dirname)(parent);
|
|
8908
|
+
}
|
|
8909
|
+
state.symlinks.set(path$1, resolved);
|
|
8910
|
+
return depth > 1;
|
|
8911
|
+
}
|
|
8912
|
+
function isRecursiveUsingRealPaths(resolved, state) {
|
|
8913
|
+
return state.visited.includes(resolved + state.options.pathSeparator);
|
|
8914
|
+
}
|
|
8915
|
+
var onlyCountsSync = (state) => {
|
|
8916
|
+
return state.counts;
|
|
8917
|
+
};
|
|
8918
|
+
var groupsSync = (state) => {
|
|
8919
|
+
return state.groups;
|
|
8920
|
+
};
|
|
8921
|
+
var defaultSync = (state) => {
|
|
8922
|
+
return state.paths;
|
|
8923
|
+
};
|
|
8924
|
+
var limitFilesSync = (state) => {
|
|
8925
|
+
return state.paths.slice(0, state.options.maxFiles);
|
|
8926
|
+
};
|
|
8927
|
+
var onlyCountsAsync = (state, error43, callback$1) => {
|
|
8928
|
+
report(error43, callback$1, state.counts, state.options.suppressErrors);
|
|
8929
|
+
return null;
|
|
8930
|
+
};
|
|
8931
|
+
var defaultAsync = (state, error43, callback$1) => {
|
|
8932
|
+
report(error43, callback$1, state.paths, state.options.suppressErrors);
|
|
8933
|
+
return null;
|
|
8934
|
+
};
|
|
8935
|
+
var limitFilesAsync = (state, error43, callback$1) => {
|
|
8936
|
+
report(error43, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
|
|
8937
|
+
return null;
|
|
8938
|
+
};
|
|
8939
|
+
var groupsAsync = (state, error43, callback$1) => {
|
|
8940
|
+
report(error43, callback$1, state.groups, state.options.suppressErrors);
|
|
8941
|
+
return null;
|
|
8942
|
+
};
|
|
8943
|
+
function report(error43, callback$1, output, suppressErrors) {
|
|
8944
|
+
if (error43 && !suppressErrors)
|
|
8945
|
+
callback$1(error43, output);
|
|
8946
|
+
else
|
|
8947
|
+
callback$1(null, output);
|
|
8948
|
+
}
|
|
8949
|
+
function build$1(options, isSynchronous) {
|
|
8950
|
+
const { onlyCounts, group, maxFiles } = options;
|
|
8951
|
+
if (onlyCounts)
|
|
8952
|
+
return isSynchronous ? onlyCountsSync : onlyCountsAsync;
|
|
8953
|
+
else if (group)
|
|
8954
|
+
return isSynchronous ? groupsSync : groupsAsync;
|
|
8955
|
+
else if (maxFiles)
|
|
8956
|
+
return isSynchronous ? limitFilesSync : limitFilesAsync;
|
|
8957
|
+
else
|
|
8958
|
+
return isSynchronous ? defaultSync : defaultAsync;
|
|
8959
|
+
}
|
|
8960
|
+
var readdirOpts = { withFileTypes: true };
|
|
8961
|
+
var walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
8962
|
+
state.queue.enqueue();
|
|
8963
|
+
if (currentDepth < 0)
|
|
8964
|
+
return state.queue.dequeue(null, state);
|
|
8965
|
+
const { fs: fs$1 } = state;
|
|
8966
|
+
state.visited.push(crawlPath);
|
|
8967
|
+
state.counts.directories++;
|
|
8968
|
+
fs$1.readdir(crawlPath || ".", readdirOpts, (error43, entries = []) => {
|
|
8969
|
+
callback$1(entries, directoryPath, currentDepth);
|
|
8970
|
+
state.queue.dequeue(state.options.suppressErrors ? null : error43, state);
|
|
8971
|
+
});
|
|
8972
|
+
};
|
|
8973
|
+
var walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
8974
|
+
const { fs: fs$1 } = state;
|
|
8975
|
+
if (currentDepth < 0)
|
|
8976
|
+
return;
|
|
8977
|
+
state.visited.push(crawlPath);
|
|
8978
|
+
state.counts.directories++;
|
|
8979
|
+
let entries = [];
|
|
8980
|
+
try {
|
|
8981
|
+
entries = fs$1.readdirSync(crawlPath || ".", readdirOpts);
|
|
8982
|
+
} catch (e) {
|
|
8983
|
+
if (!state.options.suppressErrors)
|
|
8984
|
+
throw e;
|
|
8985
|
+
}
|
|
8986
|
+
callback$1(entries, directoryPath, currentDepth);
|
|
8987
|
+
};
|
|
8988
|
+
function build(isSynchronous) {
|
|
8989
|
+
return isSynchronous ? walkSync : walkAsync;
|
|
8990
|
+
}
|
|
8991
|
+
var Queue = class {
|
|
8992
|
+
count = 0;
|
|
8993
|
+
constructor(onQueueEmpty) {
|
|
8994
|
+
this.onQueueEmpty = onQueueEmpty;
|
|
8995
|
+
}
|
|
8996
|
+
enqueue() {
|
|
8997
|
+
this.count++;
|
|
8998
|
+
return this.count;
|
|
8999
|
+
}
|
|
9000
|
+
dequeue(error43, output) {
|
|
9001
|
+
if (this.onQueueEmpty && (--this.count <= 0 || error43)) {
|
|
9002
|
+
this.onQueueEmpty(error43, output);
|
|
9003
|
+
if (error43) {
|
|
9004
|
+
output.controller.abort();
|
|
9005
|
+
this.onQueueEmpty = undefined;
|
|
9006
|
+
}
|
|
9007
|
+
}
|
|
9008
|
+
}
|
|
9009
|
+
};
|
|
9010
|
+
var Counter = class {
|
|
9011
|
+
_files = 0;
|
|
9012
|
+
_directories = 0;
|
|
9013
|
+
set files(num) {
|
|
9014
|
+
this._files = num;
|
|
9015
|
+
}
|
|
9016
|
+
get files() {
|
|
9017
|
+
return this._files;
|
|
9018
|
+
}
|
|
9019
|
+
set directories(num) {
|
|
9020
|
+
this._directories = num;
|
|
9021
|
+
}
|
|
9022
|
+
get directories() {
|
|
9023
|
+
return this._directories;
|
|
9024
|
+
}
|
|
9025
|
+
get dirs() {
|
|
9026
|
+
return this._directories;
|
|
9027
|
+
}
|
|
9028
|
+
};
|
|
9029
|
+
var Aborter = class {
|
|
9030
|
+
aborted = false;
|
|
9031
|
+
abort() {
|
|
9032
|
+
this.aborted = true;
|
|
9033
|
+
}
|
|
9034
|
+
};
|
|
9035
|
+
var Walker = class {
|
|
9036
|
+
root;
|
|
9037
|
+
isSynchronous;
|
|
9038
|
+
state;
|
|
9039
|
+
joinPath;
|
|
9040
|
+
pushDirectory;
|
|
9041
|
+
pushFile;
|
|
9042
|
+
getArray;
|
|
9043
|
+
groupFiles;
|
|
9044
|
+
resolveSymlink;
|
|
9045
|
+
walkDirectory;
|
|
9046
|
+
callbackInvoker;
|
|
9047
|
+
constructor(root, options, callback$1) {
|
|
9048
|
+
this.isSynchronous = !callback$1;
|
|
9049
|
+
this.callbackInvoker = build$1(options, this.isSynchronous);
|
|
9050
|
+
this.root = normalizePath(root, options);
|
|
9051
|
+
this.state = {
|
|
9052
|
+
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
|
|
9053
|
+
paths: [""].slice(0, 0),
|
|
9054
|
+
groups: [],
|
|
9055
|
+
counts: new Counter,
|
|
9056
|
+
options,
|
|
9057
|
+
queue: new Queue((error43, state) => this.callbackInvoker(state, error43, callback$1)),
|
|
9058
|
+
symlinks: /* @__PURE__ */ new Map,
|
|
9059
|
+
visited: [""].slice(0, 0),
|
|
9060
|
+
controller: new Aborter,
|
|
9061
|
+
fs: options.fs || fs
|
|
9062
|
+
};
|
|
9063
|
+
this.joinPath = build$7(this.root, options);
|
|
9064
|
+
this.pushDirectory = build$6(this.root, options);
|
|
9065
|
+
this.pushFile = build$5(options);
|
|
9066
|
+
this.getArray = build$4(options);
|
|
9067
|
+
this.groupFiles = build$3(options);
|
|
9068
|
+
this.resolveSymlink = build$2(options, this.isSynchronous);
|
|
9069
|
+
this.walkDirectory = build(this.isSynchronous);
|
|
9070
|
+
}
|
|
9071
|
+
start() {
|
|
9072
|
+
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
|
|
9073
|
+
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
|
|
9074
|
+
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
|
|
9075
|
+
}
|
|
9076
|
+
walk = (entries, directoryPath, depth) => {
|
|
9077
|
+
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
|
|
9078
|
+
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles)
|
|
9079
|
+
return;
|
|
9080
|
+
const files = this.getArray(this.state.paths);
|
|
9081
|
+
for (let i = 0;i < entries.length; ++i) {
|
|
9082
|
+
const entry = entries[i];
|
|
9083
|
+
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
|
|
9084
|
+
const filename = this.joinPath(entry.name, directoryPath);
|
|
9085
|
+
this.pushFile(filename, files, this.state.counts, filters);
|
|
9086
|
+
} else if (entry.isDirectory()) {
|
|
9087
|
+
let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
9088
|
+
if (exclude && exclude(entry.name, path$1))
|
|
9089
|
+
continue;
|
|
9090
|
+
this.pushDirectory(path$1, paths, filters);
|
|
9091
|
+
this.walkDirectory(this.state, path$1, path$1, depth - 1, this.walk);
|
|
9092
|
+
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
9093
|
+
let path$1 = joinPathWithBasePath(entry.name, directoryPath);
|
|
9094
|
+
this.resolveSymlink(path$1, this.state, (stat, resolvedPath) => {
|
|
9095
|
+
if (stat.isDirectory()) {
|
|
9096
|
+
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
|
9097
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator))
|
|
9098
|
+
return;
|
|
9099
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth - 1, this.walk);
|
|
9100
|
+
} else {
|
|
9101
|
+
resolvedPath = useRealPaths ? resolvedPath : path$1;
|
|
9102
|
+
const filename = (0, path.basename)(resolvedPath);
|
|
9103
|
+
const directoryPath$1 = normalizePath((0, path.dirname)(resolvedPath), this.state.options);
|
|
9104
|
+
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
9105
|
+
this.pushFile(resolvedPath, files, this.state.counts, filters);
|
|
9106
|
+
}
|
|
9107
|
+
});
|
|
9108
|
+
}
|
|
9109
|
+
}
|
|
9110
|
+
this.groupFiles(this.state.groups, directoryPath, files);
|
|
9111
|
+
};
|
|
9112
|
+
};
|
|
9113
|
+
function promise3(root, options) {
|
|
9114
|
+
return new Promise((resolve$1, reject) => {
|
|
9115
|
+
callback(root, options, (err, output) => {
|
|
9116
|
+
if (err)
|
|
9117
|
+
return reject(err);
|
|
9118
|
+
resolve$1(output);
|
|
9119
|
+
});
|
|
9120
|
+
});
|
|
9121
|
+
}
|
|
9122
|
+
function callback(root, options, callback$1) {
|
|
9123
|
+
let walker = new Walker(root, options, callback$1);
|
|
9124
|
+
walker.start();
|
|
9125
|
+
}
|
|
9126
|
+
function sync(root, options) {
|
|
9127
|
+
const walker = new Walker(root, options);
|
|
9128
|
+
return walker.start();
|
|
9129
|
+
}
|
|
9130
|
+
var APIBuilder = class {
|
|
9131
|
+
constructor(root, options) {
|
|
9132
|
+
this.root = root;
|
|
9133
|
+
this.options = options;
|
|
9134
|
+
}
|
|
9135
|
+
withPromise() {
|
|
9136
|
+
return promise3(this.root, this.options);
|
|
9137
|
+
}
|
|
9138
|
+
withCallback(cb) {
|
|
9139
|
+
callback(this.root, this.options, cb);
|
|
9140
|
+
}
|
|
9141
|
+
sync() {
|
|
9142
|
+
return sync(this.root, this.options);
|
|
9143
|
+
}
|
|
9144
|
+
};
|
|
9293
9145
|
var pm = null;
|
|
9294
9146
|
try {
|
|
9295
9147
|
__require.resolve("picomatch");
|
|
9296
9148
|
pm = require_picomatch2();
|
|
9297
|
-
} catch
|
|
9298
|
-
|
|
9299
|
-
class Builder {
|
|
9149
|
+
} catch {}
|
|
9150
|
+
var Builder = class {
|
|
9300
9151
|
globCache = {};
|
|
9301
9152
|
options = {
|
|
9302
9153
|
maxDepth: Infinity,
|
|
9303
9154
|
suppressErrors: true,
|
|
9304
|
-
pathSeparator:
|
|
9155
|
+
pathSeparator: path.sep,
|
|
9305
9156
|
filters: []
|
|
9306
9157
|
};
|
|
9307
9158
|
globFunction;
|
|
9308
9159
|
constructor(options) {
|
|
9309
|
-
this.options = {
|
|
9160
|
+
this.options = {
|
|
9161
|
+
...this.options,
|
|
9162
|
+
...options
|
|
9163
|
+
};
|
|
9310
9164
|
this.globFunction = this.options.globFunction;
|
|
9311
9165
|
}
|
|
9312
9166
|
group() {
|
|
@@ -9377,73 +9231,38 @@ var require_builder = __commonJS((exports) => {
|
|
|
9377
9231
|
return this;
|
|
9378
9232
|
}
|
|
9379
9233
|
crawl(root) {
|
|
9380
|
-
return new
|
|
9234
|
+
return new APIBuilder(root || ".", this.options);
|
|
9381
9235
|
}
|
|
9382
9236
|
withGlobFunction(fn) {
|
|
9383
9237
|
this.globFunction = fn;
|
|
9384
9238
|
return this;
|
|
9385
9239
|
}
|
|
9386
9240
|
crawlWithOptions(root, options) {
|
|
9387
|
-
this.options = {
|
|
9388
|
-
|
|
9241
|
+
this.options = {
|
|
9242
|
+
...this.options,
|
|
9243
|
+
...options
|
|
9244
|
+
};
|
|
9245
|
+
return new APIBuilder(root || ".", this.options);
|
|
9389
9246
|
}
|
|
9390
9247
|
glob(...patterns) {
|
|
9391
|
-
if (this.globFunction)
|
|
9248
|
+
if (this.globFunction)
|
|
9392
9249
|
return this.globWithOptions(patterns);
|
|
9393
|
-
}
|
|
9394
9250
|
return this.globWithOptions(patterns, ...[{ dot: true }]);
|
|
9395
9251
|
}
|
|
9396
9252
|
globWithOptions(patterns, ...options) {
|
|
9397
9253
|
const globFn = this.globFunction || pm;
|
|
9398
|
-
if (!globFn)
|
|
9254
|
+
if (!globFn)
|
|
9399
9255
|
throw new Error("Please specify a glob function to use glob matching.");
|
|
9400
|
-
}
|
|
9401
9256
|
var isMatch = this.globCache[patterns.join("\x00")];
|
|
9402
9257
|
if (!isMatch) {
|
|
9403
9258
|
isMatch = globFn(patterns, ...options);
|
|
9404
9259
|
this.globCache[patterns.join("\x00")] = isMatch;
|
|
9405
9260
|
}
|
|
9406
|
-
this.options.filters.push((path) => isMatch(path));
|
|
9261
|
+
this.options.filters.push((path$1) => isMatch(path$1));
|
|
9407
9262
|
return this;
|
|
9408
9263
|
}
|
|
9409
|
-
}
|
|
9410
|
-
exports.Builder = Builder;
|
|
9411
|
-
});
|
|
9412
|
-
|
|
9413
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/types.js
|
|
9414
|
-
var require_types = __commonJS((exports) => {
|
|
9415
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9416
|
-
});
|
|
9417
|
-
|
|
9418
|
-
// ../../node_modules/.bun/fdir@6.4.6+a185e370e160e74e/node_modules/fdir/dist/index.js
|
|
9419
|
-
var require_dist3 = __commonJS((exports) => {
|
|
9420
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
9421
|
-
if (k2 === undefined)
|
|
9422
|
-
k2 = k;
|
|
9423
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9424
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9425
|
-
desc = { enumerable: true, get: function() {
|
|
9426
|
-
return m[k];
|
|
9427
|
-
} };
|
|
9428
|
-
}
|
|
9429
|
-
Object.defineProperty(o, k2, desc);
|
|
9430
|
-
} : function(o, m, k, k2) {
|
|
9431
|
-
if (k2 === undefined)
|
|
9432
|
-
k2 = k;
|
|
9433
|
-
o[k2] = m[k];
|
|
9434
|
-
});
|
|
9435
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
9436
|
-
for (var p in m)
|
|
9437
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
|
|
9438
|
-
__createBinding(exports2, m, p);
|
|
9439
9264
|
};
|
|
9440
|
-
|
|
9441
|
-
exports.fdir = undefined;
|
|
9442
|
-
var builder_1 = require_builder();
|
|
9443
|
-
Object.defineProperty(exports, "fdir", { enumerable: true, get: function() {
|
|
9444
|
-
return builder_1.Builder;
|
|
9445
|
-
} });
|
|
9446
|
-
__exportStar(require_types(), exports);
|
|
9265
|
+
exports.fdir = Builder;
|
|
9447
9266
|
});
|
|
9448
9267
|
|
|
9449
9268
|
// ../../node_modules/.bun/@dotenvx+dotenvx@1.48.4/node_modules/@dotenvx/dotenvx/src/lib/services/ls.js
|
|
@@ -9958,7 +9777,7 @@ var require_decrypt = __commonJS((exports, module) => {
|
|
|
9958
9777
|
});
|
|
9959
9778
|
|
|
9960
9779
|
// ../../node_modules/.bun/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/utils.js
|
|
9961
|
-
var
|
|
9780
|
+
var require_utils2 = __commonJS((exports) => {
|
|
9962
9781
|
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
9963
9782
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9964
9783
|
exports.wrapCipher = exports.Hash = exports.nextTick = exports.isLE = undefined;
|
|
@@ -10322,7 +10141,7 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
10322
10141
|
exports.getWebcryptoSubtle = getWebcryptoSubtle;
|
|
10323
10142
|
exports.managedNonce = managedNonce;
|
|
10324
10143
|
var crypto_1 = require_cryptoNode();
|
|
10325
|
-
var utils_ts_1 =
|
|
10144
|
+
var utils_ts_1 = require_utils2();
|
|
10326
10145
|
function randomBytes(bytesLength = 32) {
|
|
10327
10146
|
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
|
|
10328
10147
|
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
@@ -10423,7 +10242,7 @@ var require_cryptoNode2 = __commonJS((exports) => {
|
|
|
10423
10242
|
});
|
|
10424
10243
|
|
|
10425
10244
|
// ../../node_modules/.bun/@noble+hashes@1.8.0/node_modules/@noble/hashes/utils.js
|
|
10426
|
-
var
|
|
10245
|
+
var require_utils3 = __commonJS((exports) => {
|
|
10427
10246
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
10428
10247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10429
10248
|
exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = undefined;
|
|
@@ -10666,7 +10485,7 @@ var require__md = __commonJS((exports) => {
|
|
|
10666
10485
|
exports.setBigUint64 = setBigUint64;
|
|
10667
10486
|
exports.Chi = Chi;
|
|
10668
10487
|
exports.Maj = Maj;
|
|
10669
|
-
var utils_ts_1 =
|
|
10488
|
+
var utils_ts_1 = require_utils3();
|
|
10670
10489
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
10671
10490
|
if (typeof view.setBigUint64 === "function")
|
|
10672
10491
|
return view.setBigUint64(byteOffset, value, isLE);
|
|
@@ -10934,7 +10753,7 @@ var require_sha2 = __commonJS((exports) => {
|
|
|
10934
10753
|
exports.sha512_224 = exports.sha512_256 = exports.sha384 = exports.sha512 = exports.sha224 = exports.sha256 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA384 = exports.SHA512 = exports.SHA224 = exports.SHA256 = undefined;
|
|
10935
10754
|
var _md_ts_1 = require__md();
|
|
10936
10755
|
var u64 = require__u64();
|
|
10937
|
-
var utils_ts_1 =
|
|
10756
|
+
var utils_ts_1 = require_utils3();
|
|
10938
10757
|
var SHA256_K = /* @__PURE__ */ Uint32Array.from([
|
|
10939
10758
|
1116352408,
|
|
10940
10759
|
1899447441,
|
|
@@ -11399,7 +11218,7 @@ var require_sha2 = __commonJS((exports) => {
|
|
|
11399
11218
|
});
|
|
11400
11219
|
|
|
11401
11220
|
// ../../node_modules/.bun/@noble+curves@1.9.2/node_modules/@noble/curves/utils.js
|
|
11402
|
-
var
|
|
11221
|
+
var require_utils4 = __commonJS((exports) => {
|
|
11403
11222
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11404
11223
|
exports.notImplemented = exports.bitMask = exports.utf8ToBytes = exports.randomBytes = exports.isBytes = exports.hexToBytes = exports.concatBytes = exports.bytesToUtf8 = exports.bytesToHex = exports.anumber = exports.abytes = undefined;
|
|
11405
11224
|
exports.abool = abool;
|
|
@@ -11423,8 +11242,8 @@ var require_utils5 = __commonJS((exports) => {
|
|
|
11423
11242
|
exports._validateObject = _validateObject;
|
|
11424
11243
|
exports.memoized = memoized;
|
|
11425
11244
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
11426
|
-
var utils_js_1 =
|
|
11427
|
-
var utils_js_2 =
|
|
11245
|
+
var utils_js_1 = require_utils3();
|
|
11246
|
+
var utils_js_2 = require_utils3();
|
|
11428
11247
|
Object.defineProperty(exports, "abytes", { enumerable: true, get: function() {
|
|
11429
11248
|
return utils_js_2.abytes;
|
|
11430
11249
|
} });
|
|
@@ -11669,7 +11488,7 @@ var require_modular = __commonJS((exports) => {
|
|
|
11669
11488
|
exports.getMinHashLength = getMinHashLength;
|
|
11670
11489
|
exports.mapHashToField = mapHashToField;
|
|
11671
11490
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
11672
|
-
var utils_ts_1 =
|
|
11491
|
+
var utils_ts_1 = require_utils4();
|
|
11673
11492
|
var _0n = BigInt(0);
|
|
11674
11493
|
var _1n = BigInt(1);
|
|
11675
11494
|
var _2n = /* @__PURE__ */ BigInt(2);
|
|
@@ -12005,7 +11824,7 @@ var require_curve = __commonJS((exports) => {
|
|
|
12005
11824
|
exports.validateBasic = validateBasic;
|
|
12006
11825
|
exports._createCurveFields = _createCurveFields;
|
|
12007
11826
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
12008
|
-
var utils_ts_1 =
|
|
11827
|
+
var utils_ts_1 = require_utils4();
|
|
12009
11828
|
var modular_ts_1 = require_modular();
|
|
12010
11829
|
var _0n = BigInt(0);
|
|
12011
11830
|
var _1n = BigInt(1);
|
|
@@ -12311,7 +12130,7 @@ var require_edwards = __commonJS((exports) => {
|
|
|
12311
12130
|
exports.eddsa = eddsa;
|
|
12312
12131
|
exports.twistedEdwards = twistedEdwards;
|
|
12313
12132
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
12314
|
-
var utils_ts_1 =
|
|
12133
|
+
var utils_ts_1 = require_utils4();
|
|
12315
12134
|
var curve_ts_1 = require_curve();
|
|
12316
12135
|
var modular_ts_1 = require_modular();
|
|
12317
12136
|
var _0n = BigInt(0);
|
|
@@ -12707,7 +12526,7 @@ var require_hash_to_curve = __commonJS((exports) => {
|
|
|
12707
12526
|
exports.hash_to_field = hash_to_field;
|
|
12708
12527
|
exports.isogenyMap = isogenyMap;
|
|
12709
12528
|
exports.createHasher = createHasher;
|
|
12710
|
-
var utils_ts_1 =
|
|
12529
|
+
var utils_ts_1 = require_utils4();
|
|
12711
12530
|
var modular_ts_1 = require_modular();
|
|
12712
12531
|
var os2ip = utils_ts_1.bytesToNumberBE;
|
|
12713
12532
|
function i2osp(value, length) {
|
|
@@ -12864,7 +12683,7 @@ var require_montgomery = __commonJS((exports) => {
|
|
|
12864
12683
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12865
12684
|
exports.montgomery = montgomery;
|
|
12866
12685
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
12867
|
-
var utils_ts_1 =
|
|
12686
|
+
var utils_ts_1 = require_utils4();
|
|
12868
12687
|
var modular_ts_1 = require_modular();
|
|
12869
12688
|
var _0n = BigInt(0);
|
|
12870
12689
|
var _1n = BigInt(1);
|
|
@@ -12975,13 +12794,13 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
12975
12794
|
exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
|
|
12976
12795
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
12977
12796
|
var sha2_js_1 = require_sha2();
|
|
12978
|
-
var utils_js_1 =
|
|
12797
|
+
var utils_js_1 = require_utils3();
|
|
12979
12798
|
var curve_ts_1 = require_curve();
|
|
12980
12799
|
var edwards_ts_1 = require_edwards();
|
|
12981
12800
|
var hash_to_curve_ts_1 = require_hash_to_curve();
|
|
12982
12801
|
var modular_ts_1 = require_modular();
|
|
12983
12802
|
var montgomery_ts_1 = require_montgomery();
|
|
12984
|
-
var utils_ts_1 =
|
|
12803
|
+
var utils_ts_1 = require_utils4();
|
|
12985
12804
|
var _0n = BigInt(0);
|
|
12986
12805
|
var _1n = BigInt(1);
|
|
12987
12806
|
var _2n = BigInt(2);
|
|
@@ -13346,7 +13165,7 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
13346
13165
|
var require_hmac = __commonJS((exports) => {
|
|
13347
13166
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13348
13167
|
exports.hmac = exports.HMAC = undefined;
|
|
13349
|
-
var utils_ts_1 =
|
|
13168
|
+
var utils_ts_1 = require_utils3();
|
|
13350
13169
|
|
|
13351
13170
|
class HMAC extends utils_ts_1.Hash {
|
|
13352
13171
|
constructor(hash, _key) {
|
|
@@ -13432,7 +13251,7 @@ var require_weierstrass = __commonJS((exports) => {
|
|
|
13432
13251
|
exports.mapToCurveSimpleSWU = mapToCurveSimpleSWU;
|
|
13433
13252
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
13434
13253
|
var hmac_js_1 = require_hmac();
|
|
13435
|
-
var utils_ts_1 =
|
|
13254
|
+
var utils_ts_1 = require_utils4();
|
|
13436
13255
|
var curve_ts_1 = require_curve();
|
|
13437
13256
|
var modular_ts_1 = require_modular();
|
|
13438
13257
|
function validateSigVerOpts(opts) {
|
|
@@ -14434,12 +14253,12 @@ var require_secp256k1 = __commonJS((exports) => {
|
|
|
14434
14253
|
exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
|
|
14435
14254
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
14436
14255
|
var sha2_js_1 = require_sha2();
|
|
14437
|
-
var utils_js_1 =
|
|
14256
|
+
var utils_js_1 = require_utils3();
|
|
14438
14257
|
var _shortw_utils_ts_1 = require__shortw_utils();
|
|
14439
14258
|
var hash_to_curve_ts_1 = require_hash_to_curve();
|
|
14440
14259
|
var modular_ts_1 = require_modular();
|
|
14441
14260
|
var weierstrass_ts_1 = require_weierstrass();
|
|
14442
|
-
var utils_ts_1 =
|
|
14261
|
+
var utils_ts_1 = require_utils4();
|
|
14443
14262
|
var secp256k1_CURVE = {
|
|
14444
14263
|
p: BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),
|
|
14445
14264
|
n: BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),
|
|
@@ -14650,7 +14469,7 @@ var require_secp256k1 = __commonJS((exports) => {
|
|
|
14650
14469
|
var require_hex = __commonJS((exports) => {
|
|
14651
14470
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14652
14471
|
exports.decodeHex = exports.remove0x = undefined;
|
|
14653
|
-
var utils_1 =
|
|
14472
|
+
var utils_1 = require_utils2();
|
|
14654
14473
|
var remove0x = function(hex) {
|
|
14655
14474
|
return hex.startsWith("0x") || hex.startsWith("0X") ? hex.slice(2) : hex;
|
|
14656
14475
|
};
|
|
@@ -14764,7 +14583,7 @@ var require_hkdf = __commonJS((exports) => {
|
|
|
14764
14583
|
exports.extract = extract;
|
|
14765
14584
|
exports.expand = expand;
|
|
14766
14585
|
var hmac_ts_1 = require_hmac();
|
|
14767
|
-
var utils_ts_1 =
|
|
14586
|
+
var utils_ts_1 = require_utils3();
|
|
14768
14587
|
function extract(hash, ikm, salt) {
|
|
14769
14588
|
(0, utils_ts_1.ahash)(hash);
|
|
14770
14589
|
if (salt === undefined)
|
|
@@ -14805,7 +14624,7 @@ var require_hkdf = __commonJS((exports) => {
|
|
|
14805
14624
|
var require_hash = __commonJS((exports) => {
|
|
14806
14625
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14807
14626
|
exports.getSharedKey = exports.deriveKey = undefined;
|
|
14808
|
-
var utils_1 =
|
|
14627
|
+
var utils_1 = require_utils2();
|
|
14809
14628
|
var hkdf_1 = require_hkdf();
|
|
14810
14629
|
var sha2_1 = require_sha2();
|
|
14811
14630
|
var deriveKey = function(master, salt, info) {
|
|
@@ -14826,7 +14645,7 @@ var require_hash = __commonJS((exports) => {
|
|
|
14826
14645
|
var require_compat = __commonJS((exports) => {
|
|
14827
14646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14828
14647
|
exports._compat = undefined;
|
|
14829
|
-
var utils_1 =
|
|
14648
|
+
var utils_1 = require_utils2();
|
|
14830
14649
|
var node_crypto_1 = __require("node:crypto");
|
|
14831
14650
|
var AEAD_TAG_LENGTH = 16;
|
|
14832
14651
|
var IS_DENO = globalThis.Deno !== undefined;
|
|
@@ -14976,7 +14795,7 @@ var require_hchacha = __commonJS((exports) => {
|
|
|
14976
14795
|
var require_node2 = __commonJS((exports) => {
|
|
14977
14796
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14978
14797
|
exports.chacha20 = exports.xchacha20 = undefined;
|
|
14979
|
-
var utils_1 =
|
|
14798
|
+
var utils_1 = require_utils2();
|
|
14980
14799
|
var compat_1 = require_compat();
|
|
14981
14800
|
var hchacha_1 = require_hchacha();
|
|
14982
14801
|
var xchacha20 = function(key, nonce, AAD) {
|
|
@@ -15005,7 +14824,7 @@ var require_node2 = __commonJS((exports) => {
|
|
|
15005
14824
|
var require_symmetric = __commonJS((exports) => {
|
|
15006
14825
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15007
14826
|
exports.aesDecrypt = exports.aesEncrypt = exports.symDecrypt = exports.symEncrypt = undefined;
|
|
15008
|
-
var utils_1 =
|
|
14827
|
+
var utils_1 = require_utils2();
|
|
15009
14828
|
var webcrypto_1 = require_webcrypto();
|
|
15010
14829
|
var aes_1 = require_node();
|
|
15011
14830
|
var chacha_1 = require_node2();
|
|
@@ -15059,7 +14878,7 @@ var require_symmetric = __commonJS((exports) => {
|
|
|
15059
14878
|
});
|
|
15060
14879
|
|
|
15061
14880
|
// ../../node_modules/.bun/eciesjs@0.4.15/node_modules/eciesjs/dist/utils/index.js
|
|
15062
|
-
var
|
|
14881
|
+
var require_utils5 = __commonJS((exports) => {
|
|
15063
14882
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
15064
14883
|
if (k2 === undefined)
|
|
15065
14884
|
k2 = k;
|
|
@@ -15091,8 +14910,8 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
15091
14910
|
var require_PublicKey = __commonJS((exports) => {
|
|
15092
14911
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15093
14912
|
exports.PublicKey = undefined;
|
|
15094
|
-
var utils_1 =
|
|
15095
|
-
var utils_2 =
|
|
14913
|
+
var utils_1 = require_utils2();
|
|
14914
|
+
var utils_2 = require_utils5();
|
|
15096
14915
|
var PublicKey = function() {
|
|
15097
14916
|
function PublicKey2(data, curve) {
|
|
15098
14917
|
var compressed = (0, utils_2.convertPublicKeyFormat)(data, true, curve);
|
|
@@ -15156,8 +14975,8 @@ var require_PublicKey = __commonJS((exports) => {
|
|
|
15156
14975
|
var require_PrivateKey = __commonJS((exports) => {
|
|
15157
14976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15158
14977
|
exports.PrivateKey = undefined;
|
|
15159
|
-
var utils_1 =
|
|
15160
|
-
var utils_2 =
|
|
14978
|
+
var utils_1 = require_utils2();
|
|
14979
|
+
var utils_2 = require_utils5();
|
|
15161
14980
|
var PublicKey_1 = require_PublicKey();
|
|
15162
14981
|
var PrivateKey = function() {
|
|
15163
14982
|
function PrivateKey2(secret, curve) {
|
|
@@ -15226,10 +15045,10 @@ var require_dist4 = __commonJS((exports) => {
|
|
|
15226
15045
|
exports.utils = exports.PublicKey = exports.PrivateKey = exports.ECIES_CONFIG = undefined;
|
|
15227
15046
|
exports.encrypt = encrypt;
|
|
15228
15047
|
exports.decrypt = decrypt;
|
|
15229
|
-
var utils_1 =
|
|
15048
|
+
var utils_1 = require_utils2();
|
|
15230
15049
|
var config_1 = require_config();
|
|
15231
15050
|
var keys_1 = require_keys();
|
|
15232
|
-
var utils_2 =
|
|
15051
|
+
var utils_2 = require_utils5();
|
|
15233
15052
|
function encrypt(receiverRawPK, data) {
|
|
15234
15053
|
return Buffer.from(_encrypt(receiverRawPK, data));
|
|
15235
15054
|
}
|
|
@@ -37472,7 +37291,7 @@ var require_cjs = __commonJS((exports) => {
|
|
|
37472
37291
|
}
|
|
37473
37292
|
});
|
|
37474
37293
|
|
|
37475
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37294
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js
|
|
37476
37295
|
var require_sbmh = __commonJS((exports, module) => {
|
|
37477
37296
|
var { EventEmitter: EventEmitter2 } = __require("node:events");
|
|
37478
37297
|
var { inherits } = __require("node:util");
|
|
@@ -37599,7 +37418,7 @@ var require_sbmh = __commonJS((exports, module) => {
|
|
|
37599
37418
|
module.exports = SBMH;
|
|
37600
37419
|
});
|
|
37601
37420
|
|
|
37602
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37421
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js
|
|
37603
37422
|
var require_PartStream = __commonJS((exports, module) => {
|
|
37604
37423
|
var inherits = __require("node:util").inherits;
|
|
37605
37424
|
var ReadableStream2 = __require("node:stream").Readable;
|
|
@@ -37611,7 +37430,7 @@ var require_PartStream = __commonJS((exports, module) => {
|
|
|
37611
37430
|
module.exports = PartStream;
|
|
37612
37431
|
});
|
|
37613
37432
|
|
|
37614
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37433
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/utils/getLimit.js
|
|
37615
37434
|
var require_getLimit = __commonJS((exports, module) => {
|
|
37616
37435
|
module.exports = function getLimit(limits, name, defaultLimit) {
|
|
37617
37436
|
if (!limits || limits[name] === undefined || limits[name] === null) {
|
|
@@ -37624,7 +37443,7 @@ var require_getLimit = __commonJS((exports, module) => {
|
|
|
37624
37443
|
};
|
|
37625
37444
|
});
|
|
37626
37445
|
|
|
37627
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37446
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js
|
|
37628
37447
|
var require_HeaderParser = __commonJS((exports, module) => {
|
|
37629
37448
|
var EventEmitter2 = __require("node:events").EventEmitter;
|
|
37630
37449
|
var inherits = __require("node:util").inherits;
|
|
@@ -37723,7 +37542,7 @@ var require_HeaderParser = __commonJS((exports, module) => {
|
|
|
37723
37542
|
module.exports = HeaderParser;
|
|
37724
37543
|
});
|
|
37725
37544
|
|
|
37726
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37545
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js
|
|
37727
37546
|
var require_Dicer = __commonJS((exports, module) => {
|
|
37728
37547
|
var WritableStream = __require("node:stream").Writable;
|
|
37729
37548
|
var inherits = __require("node:util").inherits;
|
|
@@ -37961,7 +37780,7 @@ var require_Dicer = __commonJS((exports, module) => {
|
|
|
37961
37780
|
module.exports = Dicer;
|
|
37962
37781
|
});
|
|
37963
37782
|
|
|
37964
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37783
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/utils/decodeText.js
|
|
37965
37784
|
var require_decodeText = __commonJS((exports, module) => {
|
|
37966
37785
|
var utf8Decoder = new TextDecoder("utf-8");
|
|
37967
37786
|
var textDecoders = new Map([
|
|
@@ -38065,7 +37884,7 @@ var require_decodeText = __commonJS((exports, module) => {
|
|
|
38065
37884
|
module.exports = decodeText;
|
|
38066
37885
|
});
|
|
38067
37886
|
|
|
38068
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
37887
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/utils/parseParams.js
|
|
38069
37888
|
var require_parseParams = __commonJS((exports, module) => {
|
|
38070
37889
|
var decodeText = require_decodeText();
|
|
38071
37890
|
var RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g;
|
|
@@ -38587,6 +38406,9 @@ var require_parseParams = __commonJS((exports, module) => {
|
|
|
38587
38406
|
if (inquote) {
|
|
38588
38407
|
inquote = false;
|
|
38589
38408
|
state = STATE_KEY;
|
|
38409
|
+
while (i + 1 < len && str[i + 1] !== ";") {
|
|
38410
|
+
++i;
|
|
38411
|
+
}
|
|
38590
38412
|
} else {
|
|
38591
38413
|
inquote = true;
|
|
38592
38414
|
}
|
|
@@ -38654,7 +38476,7 @@ var require_parseParams = __commonJS((exports, module) => {
|
|
|
38654
38476
|
module.exports = parseParams;
|
|
38655
38477
|
});
|
|
38656
38478
|
|
|
38657
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
38479
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/utils/basename.js
|
|
38658
38480
|
var require_basename = __commonJS((exports, module) => {
|
|
38659
38481
|
module.exports = function basename(path2) {
|
|
38660
38482
|
if (typeof path2 !== "string") {
|
|
@@ -38672,7 +38494,7 @@ var require_basename = __commonJS((exports, module) => {
|
|
|
38672
38494
|
};
|
|
38673
38495
|
});
|
|
38674
38496
|
|
|
38675
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
38497
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/types/multipart.js
|
|
38676
38498
|
var require_multipart = __commonJS((exports, module) => {
|
|
38677
38499
|
var { Readable } = __require("node:stream");
|
|
38678
38500
|
var { inherits } = __require("node:util");
|
|
@@ -38948,7 +38770,7 @@ var require_multipart = __commonJS((exports, module) => {
|
|
|
38948
38770
|
module.exports = Multipart;
|
|
38949
38771
|
});
|
|
38950
38772
|
|
|
38951
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
38773
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/utils/Decoder.js
|
|
38952
38774
|
var require_Decoder = __commonJS((exports, module) => {
|
|
38953
38775
|
var RE_PLUS = /\+/g;
|
|
38954
38776
|
var HEX = [
|
|
@@ -39124,7 +38946,7 @@ var require_Decoder = __commonJS((exports, module) => {
|
|
|
39124
38946
|
module.exports = Decoder;
|
|
39125
38947
|
});
|
|
39126
38948
|
|
|
39127
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
38949
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/types/urlencoded.js
|
|
39128
38950
|
var require_urlencoded = __commonJS((exports, module) => {
|
|
39129
38951
|
var Decoder = require_Decoder();
|
|
39130
38952
|
var decodeText = require_decodeText();
|
|
@@ -39312,7 +39134,7 @@ var require_urlencoded = __commonJS((exports, module) => {
|
|
|
39312
39134
|
module.exports = UrlEncoded;
|
|
39313
39135
|
});
|
|
39314
39136
|
|
|
39315
|
-
// ../../node_modules/.bun/@fastify+busboy@3.
|
|
39137
|
+
// ../../node_modules/.bun/@fastify+busboy@3.2.0/node_modules/@fastify/busboy/lib/main.js
|
|
39316
39138
|
var require_main3 = __commonJS((exports, module) => {
|
|
39317
39139
|
var WritableStream = __require("node:stream").Writable;
|
|
39318
39140
|
var { inherits } = __require("node:util");
|
|
@@ -39389,7 +39211,7 @@ var require_main3 = __commonJS((exports, module) => {
|
|
|
39389
39211
|
});
|
|
39390
39212
|
|
|
39391
39213
|
// ../../node_modules/.bun/@whatwg-node+node-fetch@0.7.25/node_modules/@whatwg-node/node-fetch/cjs/utils.js
|
|
39392
|
-
var
|
|
39214
|
+
var require_utils6 = __commonJS((exports) => {
|
|
39393
39215
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39394
39216
|
exports.fakePromise = undefined;
|
|
39395
39217
|
exports.getHeadersObj = getHeadersObj;
|
|
@@ -39498,7 +39320,7 @@ var require_ReadableStream = __commonJS((exports) => {
|
|
|
39498
39320
|
var node_stream_1 = __require("node:stream");
|
|
39499
39321
|
var promises_1 = __require("node:stream/promises");
|
|
39500
39322
|
var promise_helpers_1 = require_cjs();
|
|
39501
|
-
var utils_js_1 =
|
|
39323
|
+
var utils_js_1 = require_utils6();
|
|
39502
39324
|
function createController(desiredSize, readable) {
|
|
39503
39325
|
let chunks = [];
|
|
39504
39326
|
let _closed = false;
|
|
@@ -39744,7 +39566,7 @@ var require_Blob = __commonJS((exports) => {
|
|
|
39744
39566
|
exports.isArrayBuffer = isArrayBuffer;
|
|
39745
39567
|
var node_buffer_1 = __require("node:buffer");
|
|
39746
39568
|
var ReadableStream_js_1 = require_ReadableStream();
|
|
39747
|
-
var utils_js_1 =
|
|
39569
|
+
var utils_js_1 = require_utils6();
|
|
39748
39570
|
function getBlobPartAsBuffer(blobPart) {
|
|
39749
39571
|
if (typeof blobPart === "string") {
|
|
39750
39572
|
return node_buffer_1.Buffer.from(blobPart);
|
|
@@ -40674,7 +40496,7 @@ var require_symbols = __commonJS((exports) => {
|
|
|
40674
40496
|
});
|
|
40675
40497
|
|
|
40676
40498
|
// ../../node_modules/.bun/@whatwg-node+disposablestack@0.0.6/node_modules/@whatwg-node/disposablestack/cjs/utils.js
|
|
40677
|
-
var
|
|
40499
|
+
var require_utils7 = __commonJS((exports) => {
|
|
40678
40500
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40679
40501
|
exports.isSyncDisposable = isSyncDisposable;
|
|
40680
40502
|
exports.isAsyncDisposable = isAsyncDisposable;
|
|
@@ -40694,7 +40516,7 @@ var require_AsyncDisposableStack = __commonJS((exports) => {
|
|
|
40694
40516
|
var promise_helpers_1 = require_cjs();
|
|
40695
40517
|
var SupressedError_js_1 = require_SupressedError();
|
|
40696
40518
|
var symbols_js_1 = require_symbols();
|
|
40697
|
-
var utils_js_1 =
|
|
40519
|
+
var utils_js_1 = require_utils7();
|
|
40698
40520
|
var SuppressedError2 = globalThis.SuppressedError || SupressedError_js_1.PonyfillSuppressedError;
|
|
40699
40521
|
|
|
40700
40522
|
class PonyfillAsyncDisposableStack {
|
|
@@ -40769,7 +40591,7 @@ var require_DisposableStack = __commonJS((exports) => {
|
|
|
40769
40591
|
exports.PonyfillDisposableStack = undefined;
|
|
40770
40592
|
var SupressedError_js_1 = require_SupressedError();
|
|
40771
40593
|
var symbols_js_1 = require_symbols();
|
|
40772
|
-
var utils_js_1 =
|
|
40594
|
+
var utils_js_1 = require_utils7();
|
|
40773
40595
|
var SuppressedError2 = globalThis.SuppressedError || SupressedError_js_1.PonyfillSuppressedError;
|
|
40774
40596
|
|
|
40775
40597
|
class PonyfillDisposableStack {
|
|
@@ -40848,7 +40670,7 @@ var require_IteratorObject = __commonJS((exports) => {
|
|
|
40848
40670
|
exports.PonyfillIteratorObject = undefined;
|
|
40849
40671
|
var node_util_1 = __require("node:util");
|
|
40850
40672
|
var disposablestack_1 = require_cjs2();
|
|
40851
|
-
var utils_js_1 =
|
|
40673
|
+
var utils_js_1 = require_utils6();
|
|
40852
40674
|
|
|
40853
40675
|
class PonyfillIteratorObject {
|
|
40854
40676
|
iterableIterator;
|
|
@@ -41146,7 +40968,7 @@ var require_Body = __commonJS((exports) => {
|
|
|
41146
40968
|
var File_js_1 = require_File();
|
|
41147
40969
|
var FormData_js_1 = require_FormData();
|
|
41148
40970
|
var ReadableStream_js_1 = require_ReadableStream();
|
|
41149
|
-
var utils_js_1 =
|
|
40971
|
+
var utils_js_1 = require_utils6();
|
|
41150
40972
|
var BodyInitType;
|
|
41151
40973
|
(function(BodyInitType2) {
|
|
41152
40974
|
BodyInitType2["ReadableStream"] = "ReadableStream";
|
|
@@ -42050,7 +41872,7 @@ var require_fetchCurl = __commonJS((exports) => {
|
|
|
42050
41872
|
var node_tls_1 = __require("node:tls");
|
|
42051
41873
|
var promise_helpers_1 = require_cjs();
|
|
42052
41874
|
var Response_js_1 = require_Response();
|
|
42053
|
-
var utils_js_1 =
|
|
41875
|
+
var utils_js_1 = require_utils6();
|
|
42054
41876
|
function fetchCurl(fetchRequest) {
|
|
42055
41877
|
const { Curl, CurlFeature, CurlPause, CurlProgressFunc } = globalThis["libcurl"];
|
|
42056
41878
|
const curlHandle = new Curl;
|
|
@@ -42335,7 +42157,7 @@ var require_fetchNodeHttp = __commonJS((exports) => {
|
|
|
42335
42157
|
var Request_js_1 = require_Request();
|
|
42336
42158
|
var Response_js_1 = require_Response();
|
|
42337
42159
|
var URL_js_1 = require_URL();
|
|
42338
|
-
var utils_js_1 =
|
|
42160
|
+
var utils_js_1 = require_utils6();
|
|
42339
42161
|
function getRequestFnForProtocol(url2) {
|
|
42340
42162
|
if (url2.startsWith("http:")) {
|
|
42341
42163
|
return node_http_1.request;
|
|
@@ -42472,7 +42294,7 @@ var require_fetch = __commonJS((exports) => {
|
|
|
42472
42294
|
var Request_js_1 = require_Request();
|
|
42473
42295
|
var Response_js_1 = require_Response();
|
|
42474
42296
|
var URL_js_1 = require_URL();
|
|
42475
|
-
var utils_js_1 =
|
|
42297
|
+
var utils_js_1 = require_utils6();
|
|
42476
42298
|
var BASE64_SUFFIX = ";base64";
|
|
42477
42299
|
async function getResponseForFile(url2) {
|
|
42478
42300
|
const path2 = (0, node_url_1.fileURLToPath)(url2);
|
|
@@ -42574,7 +42396,7 @@ var require_TextEncoderDecoder = __commonJS((exports) => {
|
|
|
42574
42396
|
exports.PonyfillTextDecoder = exports.PonyfillTextEncoder = undefined;
|
|
42575
42397
|
exports.PonyfillBtoa = PonyfillBtoa;
|
|
42576
42398
|
var node_buffer_1 = __require("node:buffer");
|
|
42577
|
-
var utils_js_1 =
|
|
42399
|
+
var utils_js_1 = require_utils6();
|
|
42578
42400
|
|
|
42579
42401
|
class PonyfillTextEncoder {
|
|
42580
42402
|
encoding;
|
|
@@ -42636,7 +42458,7 @@ var require_WritableStream = __commonJS((exports) => {
|
|
|
42636
42458
|
var node_events_1 = __require("node:events");
|
|
42637
42459
|
var node_stream_1 = __require("node:stream");
|
|
42638
42460
|
var promise_helpers_1 = require_cjs();
|
|
42639
|
-
var utils_js_1 =
|
|
42461
|
+
var utils_js_1 = require_utils6();
|
|
42640
42462
|
|
|
42641
42463
|
class PonyfillWritableStream {
|
|
42642
42464
|
writable;
|
|
@@ -42747,7 +42569,7 @@ var require_TransformStream = __commonJS((exports) => {
|
|
|
42747
42569
|
exports.PonyfillTransformStream = undefined;
|
|
42748
42570
|
var node_stream_1 = __require("node:stream");
|
|
42749
42571
|
var ReadableStream_js_1 = require_ReadableStream();
|
|
42750
|
-
var utils_js_1 =
|
|
42572
|
+
var utils_js_1 = require_utils6();
|
|
42751
42573
|
var WritableStream_js_1 = require_WritableStream();
|
|
42752
42574
|
|
|
42753
42575
|
class PonyfillTransformStream {
|
|
@@ -43514,7 +43336,7 @@ var require_error3 = __commonJS((exports, module) => {
|
|
|
43514
43336
|
});
|
|
43515
43337
|
|
|
43516
43338
|
// ../../node_modules/.bun/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/utils.js
|
|
43517
|
-
var
|
|
43339
|
+
var require_utils8 = __commonJS((exports) => {
|
|
43518
43340
|
exports.removeLeadingAndTrailingHTTPWhitespace = (string5) => {
|
|
43519
43341
|
return string5.replace(/^[ \t\n\r]+/u, "").replace(/[ \t\n\r]+$/u, "");
|
|
43520
43342
|
};
|
|
@@ -43568,7 +43390,7 @@ var require_mime_type_parameters = __commonJS((exports, module) => {
|
|
|
43568
43390
|
asciiLowercase,
|
|
43569
43391
|
solelyContainsHTTPTokenCodePoints,
|
|
43570
43392
|
soleyContainsHTTPQuotedStringTokenCodePoints
|
|
43571
|
-
} =
|
|
43393
|
+
} = require_utils8();
|
|
43572
43394
|
module.exports = class MIMETypeParameters {
|
|
43573
43395
|
constructor(map3) {
|
|
43574
43396
|
this._map = map3;
|
|
@@ -43630,7 +43452,7 @@ var require_parser2 = __commonJS((exports, module) => {
|
|
|
43630
43452
|
soleyContainsHTTPQuotedStringTokenCodePoints,
|
|
43631
43453
|
asciiLowercase,
|
|
43632
43454
|
collectAnHTTPQuotedString
|
|
43633
|
-
} =
|
|
43455
|
+
} = require_utils8();
|
|
43634
43456
|
module.exports = (input) => {
|
|
43635
43457
|
input = removeLeadingAndTrailingHTTPWhitespace(input);
|
|
43636
43458
|
let position = 0;
|
|
@@ -43704,7 +43526,7 @@ var require_parser2 = __commonJS((exports, module) => {
|
|
|
43704
43526
|
|
|
43705
43527
|
// ../../node_modules/.bun/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/serializer.js
|
|
43706
43528
|
var require_serializer = __commonJS((exports, module) => {
|
|
43707
|
-
var { solelyContainsHTTPTokenCodePoints } =
|
|
43529
|
+
var { solelyContainsHTTPTokenCodePoints } = require_utils8();
|
|
43708
43530
|
module.exports = (mimeType) => {
|
|
43709
43531
|
let serialization = `${mimeType.type}/${mimeType.subtype}`;
|
|
43710
43532
|
if (mimeType.parameters.size === 0) {
|
|
@@ -43732,7 +43554,7 @@ var require_mime_type = __commonJS((exports, module) => {
|
|
|
43732
43554
|
var {
|
|
43733
43555
|
asciiLowercase,
|
|
43734
43556
|
solelyContainsHTTPTokenCodePoints
|
|
43735
|
-
} =
|
|
43557
|
+
} = require_utils8();
|
|
43736
43558
|
module.exports = class MIMEType {
|
|
43737
43559
|
constructor(string5) {
|
|
43738
43560
|
string5 = String(string5);
|
|
@@ -48267,7 +48089,7 @@ var coerce = {
|
|
|
48267
48089
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
48268
48090
|
};
|
|
48269
48091
|
var NEVER = INVALID;
|
|
48270
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
48092
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
48271
48093
|
var LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
48272
48094
|
var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
48273
48095
|
LATEST_PROTOCOL_VERSION,
|
|
@@ -48817,7 +48639,7 @@ class McpError extends Error {
|
|
|
48817
48639
|
}
|
|
48818
48640
|
}
|
|
48819
48641
|
|
|
48820
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
48642
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
48821
48643
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
48822
48644
|
|
|
48823
48645
|
class Protocol {
|
|
@@ -49157,7 +48979,7 @@ function mergeCapabilities(base, additional) {
|
|
|
49157
48979
|
}, { ...base });
|
|
49158
48980
|
}
|
|
49159
48981
|
|
|
49160
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
48982
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
49161
48983
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
49162
48984
|
|
|
49163
48985
|
class Server extends Protocol {
|
|
@@ -50573,7 +50395,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
50573
50395
|
}
|
|
50574
50396
|
return combined;
|
|
50575
50397
|
};
|
|
50576
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
50398
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
50577
50399
|
var McpZodTypeKind;
|
|
50578
50400
|
(function(McpZodTypeKind2) {
|
|
50579
50401
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
@@ -50626,7 +50448,7 @@ function processCreateParams2(params) {
|
|
|
50626
50448
|
return { errorMap: customMap, description };
|
|
50627
50449
|
}
|
|
50628
50450
|
|
|
50629
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
50451
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
50630
50452
|
class McpServer {
|
|
50631
50453
|
constructor(serverInfo, options) {
|
|
50632
50454
|
this._registeredResources = {};
|
|
@@ -51183,10 +51005,10 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
51183
51005
|
}
|
|
51184
51006
|
};
|
|
51185
51007
|
|
|
51186
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
51008
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
51187
51009
|
import process2 from "node:process";
|
|
51188
51010
|
|
|
51189
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
51011
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
51190
51012
|
class ReadBuffer {
|
|
51191
51013
|
append(chunk) {
|
|
51192
51014
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
@@ -51216,7 +51038,7 @@ function serializeMessage(message) {
|
|
|
51216
51038
|
`;
|
|
51217
51039
|
}
|
|
51218
51040
|
|
|
51219
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.
|
|
51041
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.17.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
51220
51042
|
class StdioServerTransport {
|
|
51221
51043
|
constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
|
|
51222
51044
|
this._stdin = _stdin;
|
|
@@ -80244,6 +80066,1242 @@ var processSchema = (schema) => {
|
|
|
80244
80066
|
};
|
|
80245
80067
|
};
|
|
80246
80068
|
|
|
80069
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
80070
|
+
var ignoreOverride2 = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
80071
|
+
var defaultOptions2 = {
|
|
80072
|
+
name: undefined,
|
|
80073
|
+
$refStrategy: "root",
|
|
80074
|
+
basePath: ["#"],
|
|
80075
|
+
effectStrategy: "input",
|
|
80076
|
+
pipeStrategy: "all",
|
|
80077
|
+
dateStrategy: "format:date-time",
|
|
80078
|
+
mapStrategy: "entries",
|
|
80079
|
+
removeAdditionalStrategy: "passthrough",
|
|
80080
|
+
allowedAdditionalProperties: true,
|
|
80081
|
+
rejectedAdditionalProperties: false,
|
|
80082
|
+
definitionPath: "definitions",
|
|
80083
|
+
target: "jsonSchema7",
|
|
80084
|
+
strictUnions: false,
|
|
80085
|
+
definitions: {},
|
|
80086
|
+
errorMessages: false,
|
|
80087
|
+
markdownDescription: false,
|
|
80088
|
+
patternStrategy: "escape",
|
|
80089
|
+
applyRegexFlags: false,
|
|
80090
|
+
emailStrategy: "format:email",
|
|
80091
|
+
base64Strategy: "contentEncoding:base64",
|
|
80092
|
+
nameStrategy: "ref",
|
|
80093
|
+
openAiAnyTypeName: "OpenAiAnyType"
|
|
80094
|
+
};
|
|
80095
|
+
var getDefaultOptions2 = (options) => typeof options === "string" ? {
|
|
80096
|
+
...defaultOptions2,
|
|
80097
|
+
name: options
|
|
80098
|
+
} : {
|
|
80099
|
+
...defaultOptions2,
|
|
80100
|
+
...options
|
|
80101
|
+
};
|
|
80102
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
80103
|
+
var getRefs2 = (options) => {
|
|
80104
|
+
const _options = getDefaultOptions2(options);
|
|
80105
|
+
const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
80106
|
+
return {
|
|
80107
|
+
..._options,
|
|
80108
|
+
flags: { hasReferencedOpenAiAnyType: false },
|
|
80109
|
+
currentPath,
|
|
80110
|
+
propertyPath: undefined,
|
|
80111
|
+
seen: new Map(Object.entries(_options.definitions).map(([name, def]) => [
|
|
80112
|
+
def._def,
|
|
80113
|
+
{
|
|
80114
|
+
def: def._def,
|
|
80115
|
+
path: [..._options.basePath, _options.definitionPath, name],
|
|
80116
|
+
jsonSchema: undefined
|
|
80117
|
+
}
|
|
80118
|
+
]))
|
|
80119
|
+
};
|
|
80120
|
+
};
|
|
80121
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
80122
|
+
function addErrorMessage2(res, key, errorMessage, refs) {
|
|
80123
|
+
if (!refs?.errorMessages)
|
|
80124
|
+
return;
|
|
80125
|
+
if (errorMessage) {
|
|
80126
|
+
res.errorMessage = {
|
|
80127
|
+
...res.errorMessage,
|
|
80128
|
+
[key]: errorMessage
|
|
80129
|
+
};
|
|
80130
|
+
}
|
|
80131
|
+
}
|
|
80132
|
+
function setResponseValueAndErrors2(res, key, value, errorMessage, refs) {
|
|
80133
|
+
res[key] = value;
|
|
80134
|
+
addErrorMessage2(res, key, errorMessage, refs);
|
|
80135
|
+
}
|
|
80136
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
80137
|
+
var getRelativePath3 = (pathA, pathB) => {
|
|
80138
|
+
let i = 0;
|
|
80139
|
+
for (;i < pathA.length && i < pathB.length; i++) {
|
|
80140
|
+
if (pathA[i] !== pathB[i])
|
|
80141
|
+
break;
|
|
80142
|
+
}
|
|
80143
|
+
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
80144
|
+
};
|
|
80145
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
80146
|
+
function parseAnyDef2(refs) {
|
|
80147
|
+
if (refs.target !== "openAi") {
|
|
80148
|
+
return {};
|
|
80149
|
+
}
|
|
80150
|
+
const anyDefinitionPath = [
|
|
80151
|
+
...refs.basePath,
|
|
80152
|
+
refs.definitionPath,
|
|
80153
|
+
refs.openAiAnyTypeName
|
|
80154
|
+
];
|
|
80155
|
+
refs.flags.hasReferencedOpenAiAnyType = true;
|
|
80156
|
+
return {
|
|
80157
|
+
$ref: refs.$refStrategy === "relative" ? getRelativePath3(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join("/")
|
|
80158
|
+
};
|
|
80159
|
+
}
|
|
80160
|
+
|
|
80161
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
80162
|
+
function parseArrayDef2(def, refs) {
|
|
80163
|
+
const res = {
|
|
80164
|
+
type: "array"
|
|
80165
|
+
};
|
|
80166
|
+
if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind2.ZodAny) {
|
|
80167
|
+
res.items = parseDef3(def.type._def, {
|
|
80168
|
+
...refs,
|
|
80169
|
+
currentPath: [...refs.currentPath, "items"]
|
|
80170
|
+
});
|
|
80171
|
+
}
|
|
80172
|
+
if (def.minLength) {
|
|
80173
|
+
setResponseValueAndErrors2(res, "minItems", def.minLength.value, def.minLength.message, refs);
|
|
80174
|
+
}
|
|
80175
|
+
if (def.maxLength) {
|
|
80176
|
+
setResponseValueAndErrors2(res, "maxItems", def.maxLength.value, def.maxLength.message, refs);
|
|
80177
|
+
}
|
|
80178
|
+
if (def.exactLength) {
|
|
80179
|
+
setResponseValueAndErrors2(res, "minItems", def.exactLength.value, def.exactLength.message, refs);
|
|
80180
|
+
setResponseValueAndErrors2(res, "maxItems", def.exactLength.value, def.exactLength.message, refs);
|
|
80181
|
+
}
|
|
80182
|
+
return res;
|
|
80183
|
+
}
|
|
80184
|
+
|
|
80185
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
80186
|
+
function parseBigintDef2(def, refs) {
|
|
80187
|
+
const res = {
|
|
80188
|
+
type: "integer",
|
|
80189
|
+
format: "int64"
|
|
80190
|
+
};
|
|
80191
|
+
if (!def.checks)
|
|
80192
|
+
return res;
|
|
80193
|
+
for (const check2 of def.checks) {
|
|
80194
|
+
switch (check2.kind) {
|
|
80195
|
+
case "min":
|
|
80196
|
+
if (refs.target === "jsonSchema7") {
|
|
80197
|
+
if (check2.inclusive) {
|
|
80198
|
+
setResponseValueAndErrors2(res, "minimum", check2.value, check2.message, refs);
|
|
80199
|
+
} else {
|
|
80200
|
+
setResponseValueAndErrors2(res, "exclusiveMinimum", check2.value, check2.message, refs);
|
|
80201
|
+
}
|
|
80202
|
+
} else {
|
|
80203
|
+
if (!check2.inclusive) {
|
|
80204
|
+
res.exclusiveMinimum = true;
|
|
80205
|
+
}
|
|
80206
|
+
setResponseValueAndErrors2(res, "minimum", check2.value, check2.message, refs);
|
|
80207
|
+
}
|
|
80208
|
+
break;
|
|
80209
|
+
case "max":
|
|
80210
|
+
if (refs.target === "jsonSchema7") {
|
|
80211
|
+
if (check2.inclusive) {
|
|
80212
|
+
setResponseValueAndErrors2(res, "maximum", check2.value, check2.message, refs);
|
|
80213
|
+
} else {
|
|
80214
|
+
setResponseValueAndErrors2(res, "exclusiveMaximum", check2.value, check2.message, refs);
|
|
80215
|
+
}
|
|
80216
|
+
} else {
|
|
80217
|
+
if (!check2.inclusive) {
|
|
80218
|
+
res.exclusiveMaximum = true;
|
|
80219
|
+
}
|
|
80220
|
+
setResponseValueAndErrors2(res, "maximum", check2.value, check2.message, refs);
|
|
80221
|
+
}
|
|
80222
|
+
break;
|
|
80223
|
+
case "multipleOf":
|
|
80224
|
+
setResponseValueAndErrors2(res, "multipleOf", check2.value, check2.message, refs);
|
|
80225
|
+
break;
|
|
80226
|
+
}
|
|
80227
|
+
}
|
|
80228
|
+
return res;
|
|
80229
|
+
}
|
|
80230
|
+
|
|
80231
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
80232
|
+
function parseBooleanDef2() {
|
|
80233
|
+
return {
|
|
80234
|
+
type: "boolean"
|
|
80235
|
+
};
|
|
80236
|
+
}
|
|
80237
|
+
|
|
80238
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
80239
|
+
function parseBrandedDef2(_def, refs) {
|
|
80240
|
+
return parseDef3(_def.type._def, refs);
|
|
80241
|
+
}
|
|
80242
|
+
|
|
80243
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
80244
|
+
var parseCatchDef2 = (def, refs) => {
|
|
80245
|
+
return parseDef3(def.innerType._def, refs);
|
|
80246
|
+
};
|
|
80247
|
+
|
|
80248
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
80249
|
+
function parseDateDef2(def, refs, overrideDateStrategy) {
|
|
80250
|
+
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
80251
|
+
if (Array.isArray(strategy)) {
|
|
80252
|
+
return {
|
|
80253
|
+
anyOf: strategy.map((item, i) => parseDateDef2(def, refs, item))
|
|
80254
|
+
};
|
|
80255
|
+
}
|
|
80256
|
+
switch (strategy) {
|
|
80257
|
+
case "string":
|
|
80258
|
+
case "format:date-time":
|
|
80259
|
+
return {
|
|
80260
|
+
type: "string",
|
|
80261
|
+
format: "date-time"
|
|
80262
|
+
};
|
|
80263
|
+
case "format:date":
|
|
80264
|
+
return {
|
|
80265
|
+
type: "string",
|
|
80266
|
+
format: "date"
|
|
80267
|
+
};
|
|
80268
|
+
case "integer":
|
|
80269
|
+
return integerDateParser2(def, refs);
|
|
80270
|
+
}
|
|
80271
|
+
}
|
|
80272
|
+
var integerDateParser2 = (def, refs) => {
|
|
80273
|
+
const res = {
|
|
80274
|
+
type: "integer",
|
|
80275
|
+
format: "unix-time"
|
|
80276
|
+
};
|
|
80277
|
+
if (refs.target === "openApi3") {
|
|
80278
|
+
return res;
|
|
80279
|
+
}
|
|
80280
|
+
for (const check2 of def.checks) {
|
|
80281
|
+
switch (check2.kind) {
|
|
80282
|
+
case "min":
|
|
80283
|
+
setResponseValueAndErrors2(res, "minimum", check2.value, check2.message, refs);
|
|
80284
|
+
break;
|
|
80285
|
+
case "max":
|
|
80286
|
+
setResponseValueAndErrors2(res, "maximum", check2.value, check2.message, refs);
|
|
80287
|
+
break;
|
|
80288
|
+
}
|
|
80289
|
+
}
|
|
80290
|
+
return res;
|
|
80291
|
+
};
|
|
80292
|
+
|
|
80293
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
80294
|
+
function parseDefaultDef2(_def, refs) {
|
|
80295
|
+
return {
|
|
80296
|
+
...parseDef3(_def.innerType._def, refs),
|
|
80297
|
+
default: _def.defaultValue()
|
|
80298
|
+
};
|
|
80299
|
+
}
|
|
80300
|
+
|
|
80301
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
80302
|
+
function parseEffectsDef2(_def, refs) {
|
|
80303
|
+
return refs.effectStrategy === "input" ? parseDef3(_def.schema._def, refs) : parseAnyDef2(refs);
|
|
80304
|
+
}
|
|
80305
|
+
|
|
80306
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
80307
|
+
function parseEnumDef2(def) {
|
|
80308
|
+
return {
|
|
80309
|
+
type: "string",
|
|
80310
|
+
enum: Array.from(def.values)
|
|
80311
|
+
};
|
|
80312
|
+
}
|
|
80313
|
+
|
|
80314
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
80315
|
+
var isJsonSchema7AllOfType2 = (type) => {
|
|
80316
|
+
if ("type" in type && type.type === "string")
|
|
80317
|
+
return false;
|
|
80318
|
+
return "allOf" in type;
|
|
80319
|
+
};
|
|
80320
|
+
function parseIntersectionDef2(def, refs) {
|
|
80321
|
+
const allOf = [
|
|
80322
|
+
parseDef3(def.left._def, {
|
|
80323
|
+
...refs,
|
|
80324
|
+
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
80325
|
+
}),
|
|
80326
|
+
parseDef3(def.right._def, {
|
|
80327
|
+
...refs,
|
|
80328
|
+
currentPath: [...refs.currentPath, "allOf", "1"]
|
|
80329
|
+
})
|
|
80330
|
+
].filter((x) => !!x);
|
|
80331
|
+
let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : undefined;
|
|
80332
|
+
const mergedAllOf = [];
|
|
80333
|
+
allOf.forEach((schema) => {
|
|
80334
|
+
if (isJsonSchema7AllOfType2(schema)) {
|
|
80335
|
+
mergedAllOf.push(...schema.allOf);
|
|
80336
|
+
if (schema.unevaluatedProperties === undefined) {
|
|
80337
|
+
unevaluatedProperties = undefined;
|
|
80338
|
+
}
|
|
80339
|
+
} else {
|
|
80340
|
+
let nestedSchema = schema;
|
|
80341
|
+
if ("additionalProperties" in schema && schema.additionalProperties === false) {
|
|
80342
|
+
const { additionalProperties, ...rest } = schema;
|
|
80343
|
+
nestedSchema = rest;
|
|
80344
|
+
} else {
|
|
80345
|
+
unevaluatedProperties = undefined;
|
|
80346
|
+
}
|
|
80347
|
+
mergedAllOf.push(nestedSchema);
|
|
80348
|
+
}
|
|
80349
|
+
});
|
|
80350
|
+
return mergedAllOf.length ? {
|
|
80351
|
+
allOf: mergedAllOf,
|
|
80352
|
+
...unevaluatedProperties
|
|
80353
|
+
} : undefined;
|
|
80354
|
+
}
|
|
80355
|
+
|
|
80356
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
80357
|
+
function parseLiteralDef2(def, refs) {
|
|
80358
|
+
const parsedType5 = typeof def.value;
|
|
80359
|
+
if (parsedType5 !== "bigint" && parsedType5 !== "number" && parsedType5 !== "boolean" && parsedType5 !== "string") {
|
|
80360
|
+
return {
|
|
80361
|
+
type: Array.isArray(def.value) ? "array" : "object"
|
|
80362
|
+
};
|
|
80363
|
+
}
|
|
80364
|
+
if (refs.target === "openApi3") {
|
|
80365
|
+
return {
|
|
80366
|
+
type: parsedType5 === "bigint" ? "integer" : parsedType5,
|
|
80367
|
+
enum: [def.value]
|
|
80368
|
+
};
|
|
80369
|
+
}
|
|
80370
|
+
return {
|
|
80371
|
+
type: parsedType5 === "bigint" ? "integer" : parsedType5,
|
|
80372
|
+
const: def.value
|
|
80373
|
+
};
|
|
80374
|
+
}
|
|
80375
|
+
|
|
80376
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
80377
|
+
var emojiRegex3 = undefined;
|
|
80378
|
+
var zodPatterns2 = {
|
|
80379
|
+
cuid: /^[cC][^\s-]{8,}$/,
|
|
80380
|
+
cuid2: /^[0-9a-z]+$/,
|
|
80381
|
+
ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
|
|
80382
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
|
|
80383
|
+
emoji: () => {
|
|
80384
|
+
if (emojiRegex3 === undefined) {
|
|
80385
|
+
emojiRegex3 = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u");
|
|
80386
|
+
}
|
|
80387
|
+
return emojiRegex3;
|
|
80388
|
+
},
|
|
80389
|
+
uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
|
|
80390
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
|
|
80391
|
+
ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
|
|
80392
|
+
ipv6: /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,
|
|
80393
|
+
ipv6Cidr: /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
80394
|
+
base64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,
|
|
80395
|
+
base64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,
|
|
80396
|
+
nanoid: /^[a-zA-Z0-9_-]{21}$/,
|
|
80397
|
+
jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
|
|
80398
|
+
};
|
|
80399
|
+
function parseStringDef2(def, refs) {
|
|
80400
|
+
const res = {
|
|
80401
|
+
type: "string"
|
|
80402
|
+
};
|
|
80403
|
+
if (def.checks) {
|
|
80404
|
+
for (const check2 of def.checks) {
|
|
80405
|
+
switch (check2.kind) {
|
|
80406
|
+
case "min":
|
|
80407
|
+
setResponseValueAndErrors2(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
|
|
80408
|
+
break;
|
|
80409
|
+
case "max":
|
|
80410
|
+
setResponseValueAndErrors2(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
|
|
80411
|
+
break;
|
|
80412
|
+
case "email":
|
|
80413
|
+
switch (refs.emailStrategy) {
|
|
80414
|
+
case "format:email":
|
|
80415
|
+
addFormat2(res, "email", check2.message, refs);
|
|
80416
|
+
break;
|
|
80417
|
+
case "format:idn-email":
|
|
80418
|
+
addFormat2(res, "idn-email", check2.message, refs);
|
|
80419
|
+
break;
|
|
80420
|
+
case "pattern:zod":
|
|
80421
|
+
addPattern2(res, zodPatterns2.email, check2.message, refs);
|
|
80422
|
+
break;
|
|
80423
|
+
}
|
|
80424
|
+
break;
|
|
80425
|
+
case "url":
|
|
80426
|
+
addFormat2(res, "uri", check2.message, refs);
|
|
80427
|
+
break;
|
|
80428
|
+
case "uuid":
|
|
80429
|
+
addFormat2(res, "uuid", check2.message, refs);
|
|
80430
|
+
break;
|
|
80431
|
+
case "regex":
|
|
80432
|
+
addPattern2(res, check2.regex, check2.message, refs);
|
|
80433
|
+
break;
|
|
80434
|
+
case "cuid":
|
|
80435
|
+
addPattern2(res, zodPatterns2.cuid, check2.message, refs);
|
|
80436
|
+
break;
|
|
80437
|
+
case "cuid2":
|
|
80438
|
+
addPattern2(res, zodPatterns2.cuid2, check2.message, refs);
|
|
80439
|
+
break;
|
|
80440
|
+
case "startsWith":
|
|
80441
|
+
addPattern2(res, RegExp(`^${escapeLiteralCheckValue2(check2.value, refs)}`), check2.message, refs);
|
|
80442
|
+
break;
|
|
80443
|
+
case "endsWith":
|
|
80444
|
+
addPattern2(res, RegExp(`${escapeLiteralCheckValue2(check2.value, refs)}$`), check2.message, refs);
|
|
80445
|
+
break;
|
|
80446
|
+
case "datetime":
|
|
80447
|
+
addFormat2(res, "date-time", check2.message, refs);
|
|
80448
|
+
break;
|
|
80449
|
+
case "date":
|
|
80450
|
+
addFormat2(res, "date", check2.message, refs);
|
|
80451
|
+
break;
|
|
80452
|
+
case "time":
|
|
80453
|
+
addFormat2(res, "time", check2.message, refs);
|
|
80454
|
+
break;
|
|
80455
|
+
case "duration":
|
|
80456
|
+
addFormat2(res, "duration", check2.message, refs);
|
|
80457
|
+
break;
|
|
80458
|
+
case "length":
|
|
80459
|
+
setResponseValueAndErrors2(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check2.value) : check2.value, check2.message, refs);
|
|
80460
|
+
setResponseValueAndErrors2(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check2.value) : check2.value, check2.message, refs);
|
|
80461
|
+
break;
|
|
80462
|
+
case "includes": {
|
|
80463
|
+
addPattern2(res, RegExp(escapeLiteralCheckValue2(check2.value, refs)), check2.message, refs);
|
|
80464
|
+
break;
|
|
80465
|
+
}
|
|
80466
|
+
case "ip": {
|
|
80467
|
+
if (check2.version !== "v6") {
|
|
80468
|
+
addFormat2(res, "ipv4", check2.message, refs);
|
|
80469
|
+
}
|
|
80470
|
+
if (check2.version !== "v4") {
|
|
80471
|
+
addFormat2(res, "ipv6", check2.message, refs);
|
|
80472
|
+
}
|
|
80473
|
+
break;
|
|
80474
|
+
}
|
|
80475
|
+
case "base64url":
|
|
80476
|
+
addPattern2(res, zodPatterns2.base64url, check2.message, refs);
|
|
80477
|
+
break;
|
|
80478
|
+
case "jwt":
|
|
80479
|
+
addPattern2(res, zodPatterns2.jwt, check2.message, refs);
|
|
80480
|
+
break;
|
|
80481
|
+
case "cidr": {
|
|
80482
|
+
if (check2.version !== "v6") {
|
|
80483
|
+
addPattern2(res, zodPatterns2.ipv4Cidr, check2.message, refs);
|
|
80484
|
+
}
|
|
80485
|
+
if (check2.version !== "v4") {
|
|
80486
|
+
addPattern2(res, zodPatterns2.ipv6Cidr, check2.message, refs);
|
|
80487
|
+
}
|
|
80488
|
+
break;
|
|
80489
|
+
}
|
|
80490
|
+
case "emoji":
|
|
80491
|
+
addPattern2(res, zodPatterns2.emoji(), check2.message, refs);
|
|
80492
|
+
break;
|
|
80493
|
+
case "ulid": {
|
|
80494
|
+
addPattern2(res, zodPatterns2.ulid, check2.message, refs);
|
|
80495
|
+
break;
|
|
80496
|
+
}
|
|
80497
|
+
case "base64": {
|
|
80498
|
+
switch (refs.base64Strategy) {
|
|
80499
|
+
case "format:binary": {
|
|
80500
|
+
addFormat2(res, "binary", check2.message, refs);
|
|
80501
|
+
break;
|
|
80502
|
+
}
|
|
80503
|
+
case "contentEncoding:base64": {
|
|
80504
|
+
setResponseValueAndErrors2(res, "contentEncoding", "base64", check2.message, refs);
|
|
80505
|
+
break;
|
|
80506
|
+
}
|
|
80507
|
+
case "pattern:zod": {
|
|
80508
|
+
addPattern2(res, zodPatterns2.base64, check2.message, refs);
|
|
80509
|
+
break;
|
|
80510
|
+
}
|
|
80511
|
+
}
|
|
80512
|
+
break;
|
|
80513
|
+
}
|
|
80514
|
+
case "nanoid": {
|
|
80515
|
+
addPattern2(res, zodPatterns2.nanoid, check2.message, refs);
|
|
80516
|
+
}
|
|
80517
|
+
case "toLowerCase":
|
|
80518
|
+
case "toUpperCase":
|
|
80519
|
+
case "trim":
|
|
80520
|
+
break;
|
|
80521
|
+
default:
|
|
80522
|
+
((_) => {})(check2);
|
|
80523
|
+
}
|
|
80524
|
+
}
|
|
80525
|
+
}
|
|
80526
|
+
return res;
|
|
80527
|
+
}
|
|
80528
|
+
function escapeLiteralCheckValue2(literal3, refs) {
|
|
80529
|
+
return refs.patternStrategy === "escape" ? escapeNonAlphaNumeric2(literal3) : literal3;
|
|
80530
|
+
}
|
|
80531
|
+
var ALPHA_NUMERIC2 = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
80532
|
+
function escapeNonAlphaNumeric2(source) {
|
|
80533
|
+
let result = "";
|
|
80534
|
+
for (let i = 0;i < source.length; i++) {
|
|
80535
|
+
if (!ALPHA_NUMERIC2.has(source[i])) {
|
|
80536
|
+
result += "\\";
|
|
80537
|
+
}
|
|
80538
|
+
result += source[i];
|
|
80539
|
+
}
|
|
80540
|
+
return result;
|
|
80541
|
+
}
|
|
80542
|
+
function addFormat2(schema, value, message, refs) {
|
|
80543
|
+
if (schema.format || schema.anyOf?.some((x) => x.format)) {
|
|
80544
|
+
if (!schema.anyOf) {
|
|
80545
|
+
schema.anyOf = [];
|
|
80546
|
+
}
|
|
80547
|
+
if (schema.format) {
|
|
80548
|
+
schema.anyOf.push({
|
|
80549
|
+
format: schema.format,
|
|
80550
|
+
...schema.errorMessage && refs.errorMessages && {
|
|
80551
|
+
errorMessage: { format: schema.errorMessage.format }
|
|
80552
|
+
}
|
|
80553
|
+
});
|
|
80554
|
+
delete schema.format;
|
|
80555
|
+
if (schema.errorMessage) {
|
|
80556
|
+
delete schema.errorMessage.format;
|
|
80557
|
+
if (Object.keys(schema.errorMessage).length === 0) {
|
|
80558
|
+
delete schema.errorMessage;
|
|
80559
|
+
}
|
|
80560
|
+
}
|
|
80561
|
+
}
|
|
80562
|
+
schema.anyOf.push({
|
|
80563
|
+
format: value,
|
|
80564
|
+
...message && refs.errorMessages && { errorMessage: { format: message } }
|
|
80565
|
+
});
|
|
80566
|
+
} else {
|
|
80567
|
+
setResponseValueAndErrors2(schema, "format", value, message, refs);
|
|
80568
|
+
}
|
|
80569
|
+
}
|
|
80570
|
+
function addPattern2(schema, regex, message, refs) {
|
|
80571
|
+
if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
|
|
80572
|
+
if (!schema.allOf) {
|
|
80573
|
+
schema.allOf = [];
|
|
80574
|
+
}
|
|
80575
|
+
if (schema.pattern) {
|
|
80576
|
+
schema.allOf.push({
|
|
80577
|
+
pattern: schema.pattern,
|
|
80578
|
+
...schema.errorMessage && refs.errorMessages && {
|
|
80579
|
+
errorMessage: { pattern: schema.errorMessage.pattern }
|
|
80580
|
+
}
|
|
80581
|
+
});
|
|
80582
|
+
delete schema.pattern;
|
|
80583
|
+
if (schema.errorMessage) {
|
|
80584
|
+
delete schema.errorMessage.pattern;
|
|
80585
|
+
if (Object.keys(schema.errorMessage).length === 0) {
|
|
80586
|
+
delete schema.errorMessage;
|
|
80587
|
+
}
|
|
80588
|
+
}
|
|
80589
|
+
}
|
|
80590
|
+
schema.allOf.push({
|
|
80591
|
+
pattern: stringifyRegExpWithFlags2(regex, refs),
|
|
80592
|
+
...message && refs.errorMessages && { errorMessage: { pattern: message } }
|
|
80593
|
+
});
|
|
80594
|
+
} else {
|
|
80595
|
+
setResponseValueAndErrors2(schema, "pattern", stringifyRegExpWithFlags2(regex, refs), message, refs);
|
|
80596
|
+
}
|
|
80597
|
+
}
|
|
80598
|
+
function stringifyRegExpWithFlags2(regex, refs) {
|
|
80599
|
+
if (!refs.applyRegexFlags || !regex.flags) {
|
|
80600
|
+
return regex.source;
|
|
80601
|
+
}
|
|
80602
|
+
const flags = {
|
|
80603
|
+
i: regex.flags.includes("i"),
|
|
80604
|
+
m: regex.flags.includes("m"),
|
|
80605
|
+
s: regex.flags.includes("s")
|
|
80606
|
+
};
|
|
80607
|
+
const source = flags.i ? regex.source.toLowerCase() : regex.source;
|
|
80608
|
+
let pattern = "";
|
|
80609
|
+
let isEscaped = false;
|
|
80610
|
+
let inCharGroup = false;
|
|
80611
|
+
let inCharRange = false;
|
|
80612
|
+
for (let i = 0;i < source.length; i++) {
|
|
80613
|
+
if (isEscaped) {
|
|
80614
|
+
pattern += source[i];
|
|
80615
|
+
isEscaped = false;
|
|
80616
|
+
continue;
|
|
80617
|
+
}
|
|
80618
|
+
if (flags.i) {
|
|
80619
|
+
if (inCharGroup) {
|
|
80620
|
+
if (source[i].match(/[a-z]/)) {
|
|
80621
|
+
if (inCharRange) {
|
|
80622
|
+
pattern += source[i];
|
|
80623
|
+
pattern += `${source[i - 2]}-${source[i]}`.toUpperCase();
|
|
80624
|
+
inCharRange = false;
|
|
80625
|
+
} else if (source[i + 1] === "-" && source[i + 2]?.match(/[a-z]/)) {
|
|
80626
|
+
pattern += source[i];
|
|
80627
|
+
inCharRange = true;
|
|
80628
|
+
} else {
|
|
80629
|
+
pattern += `${source[i]}${source[i].toUpperCase()}`;
|
|
80630
|
+
}
|
|
80631
|
+
continue;
|
|
80632
|
+
}
|
|
80633
|
+
} else if (source[i].match(/[a-z]/)) {
|
|
80634
|
+
pattern += `[${source[i]}${source[i].toUpperCase()}]`;
|
|
80635
|
+
continue;
|
|
80636
|
+
}
|
|
80637
|
+
}
|
|
80638
|
+
if (flags.m) {
|
|
80639
|
+
if (source[i] === "^") {
|
|
80640
|
+
pattern += `(^|(?<=[\r
|
|
80641
|
+
]))`;
|
|
80642
|
+
continue;
|
|
80643
|
+
} else if (source[i] === "$") {
|
|
80644
|
+
pattern += `($|(?=[\r
|
|
80645
|
+
]))`;
|
|
80646
|
+
continue;
|
|
80647
|
+
}
|
|
80648
|
+
}
|
|
80649
|
+
if (flags.s && source[i] === ".") {
|
|
80650
|
+
pattern += inCharGroup ? `${source[i]}\r
|
|
80651
|
+
` : `[${source[i]}\r
|
|
80652
|
+
]`;
|
|
80653
|
+
continue;
|
|
80654
|
+
}
|
|
80655
|
+
pattern += source[i];
|
|
80656
|
+
if (source[i] === "\\") {
|
|
80657
|
+
isEscaped = true;
|
|
80658
|
+
} else if (inCharGroup && source[i] === "]") {
|
|
80659
|
+
inCharGroup = false;
|
|
80660
|
+
} else if (!inCharGroup && source[i] === "[") {
|
|
80661
|
+
inCharGroup = true;
|
|
80662
|
+
}
|
|
80663
|
+
}
|
|
80664
|
+
try {
|
|
80665
|
+
new RegExp(pattern);
|
|
80666
|
+
} catch {
|
|
80667
|
+
console.warn(`Could not convert regex pattern at ${refs.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`);
|
|
80668
|
+
return regex.source;
|
|
80669
|
+
}
|
|
80670
|
+
return pattern;
|
|
80671
|
+
}
|
|
80672
|
+
|
|
80673
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
80674
|
+
function parseRecordDef2(def, refs) {
|
|
80675
|
+
if (refs.target === "openAi") {
|
|
80676
|
+
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
80677
|
+
}
|
|
80678
|
+
if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) {
|
|
80679
|
+
return {
|
|
80680
|
+
type: "object",
|
|
80681
|
+
required: def.keyType._def.values,
|
|
80682
|
+
properties: def.keyType._def.values.reduce((acc, key) => ({
|
|
80683
|
+
...acc,
|
|
80684
|
+
[key]: parseDef3(def.valueType._def, {
|
|
80685
|
+
...refs,
|
|
80686
|
+
currentPath: [...refs.currentPath, "properties", key]
|
|
80687
|
+
}) ?? parseAnyDef2(refs)
|
|
80688
|
+
}), {}),
|
|
80689
|
+
additionalProperties: refs.rejectedAdditionalProperties
|
|
80690
|
+
};
|
|
80691
|
+
}
|
|
80692
|
+
const schema = {
|
|
80693
|
+
type: "object",
|
|
80694
|
+
additionalProperties: parseDef3(def.valueType._def, {
|
|
80695
|
+
...refs,
|
|
80696
|
+
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
80697
|
+
}) ?? refs.allowedAdditionalProperties
|
|
80698
|
+
};
|
|
80699
|
+
if (refs.target === "openApi3") {
|
|
80700
|
+
return schema;
|
|
80701
|
+
}
|
|
80702
|
+
if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.checks?.length) {
|
|
80703
|
+
const { type, ...keyType } = parseStringDef2(def.keyType._def, refs);
|
|
80704
|
+
return {
|
|
80705
|
+
...schema,
|
|
80706
|
+
propertyNames: keyType
|
|
80707
|
+
};
|
|
80708
|
+
} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) {
|
|
80709
|
+
return {
|
|
80710
|
+
...schema,
|
|
80711
|
+
propertyNames: {
|
|
80712
|
+
enum: def.keyType._def.values
|
|
80713
|
+
}
|
|
80714
|
+
};
|
|
80715
|
+
} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.type._def.checks?.length) {
|
|
80716
|
+
const { type, ...keyType } = parseBrandedDef2(def.keyType._def, refs);
|
|
80717
|
+
return {
|
|
80718
|
+
...schema,
|
|
80719
|
+
propertyNames: keyType
|
|
80720
|
+
};
|
|
80721
|
+
}
|
|
80722
|
+
return schema;
|
|
80723
|
+
}
|
|
80724
|
+
|
|
80725
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
80726
|
+
function parseMapDef2(def, refs) {
|
|
80727
|
+
if (refs.mapStrategy === "record") {
|
|
80728
|
+
return parseRecordDef2(def, refs);
|
|
80729
|
+
}
|
|
80730
|
+
const keys = parseDef3(def.keyType._def, {
|
|
80731
|
+
...refs,
|
|
80732
|
+
currentPath: [...refs.currentPath, "items", "items", "0"]
|
|
80733
|
+
}) || parseAnyDef2(refs);
|
|
80734
|
+
const values = parseDef3(def.valueType._def, {
|
|
80735
|
+
...refs,
|
|
80736
|
+
currentPath: [...refs.currentPath, "items", "items", "1"]
|
|
80737
|
+
}) || parseAnyDef2(refs);
|
|
80738
|
+
return {
|
|
80739
|
+
type: "array",
|
|
80740
|
+
maxItems: 125,
|
|
80741
|
+
items: {
|
|
80742
|
+
type: "array",
|
|
80743
|
+
items: [keys, values],
|
|
80744
|
+
minItems: 2,
|
|
80745
|
+
maxItems: 2
|
|
80746
|
+
}
|
|
80747
|
+
};
|
|
80748
|
+
}
|
|
80749
|
+
|
|
80750
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
80751
|
+
function parseNativeEnumDef2(def) {
|
|
80752
|
+
const object3 = def.values;
|
|
80753
|
+
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
80754
|
+
return typeof object3[object3[key]] !== "number";
|
|
80755
|
+
});
|
|
80756
|
+
const actualValues = actualKeys.map((key) => object3[key]);
|
|
80757
|
+
const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
|
|
80758
|
+
return {
|
|
80759
|
+
type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
80760
|
+
enum: actualValues
|
|
80761
|
+
};
|
|
80762
|
+
}
|
|
80763
|
+
|
|
80764
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
80765
|
+
function parseNeverDef2(refs) {
|
|
80766
|
+
return refs.target === "openAi" ? undefined : {
|
|
80767
|
+
not: parseAnyDef2({
|
|
80768
|
+
...refs,
|
|
80769
|
+
currentPath: [...refs.currentPath, "not"]
|
|
80770
|
+
})
|
|
80771
|
+
};
|
|
80772
|
+
}
|
|
80773
|
+
|
|
80774
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
80775
|
+
function parseNullDef2(refs) {
|
|
80776
|
+
return refs.target === "openApi3" ? {
|
|
80777
|
+
enum: ["null"],
|
|
80778
|
+
nullable: true
|
|
80779
|
+
} : {
|
|
80780
|
+
type: "null"
|
|
80781
|
+
};
|
|
80782
|
+
}
|
|
80783
|
+
|
|
80784
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
80785
|
+
var primitiveMappings2 = {
|
|
80786
|
+
ZodString: "string",
|
|
80787
|
+
ZodNumber: "number",
|
|
80788
|
+
ZodBigInt: "integer",
|
|
80789
|
+
ZodBoolean: "boolean",
|
|
80790
|
+
ZodNull: "null"
|
|
80791
|
+
};
|
|
80792
|
+
function parseUnionDef2(def, refs) {
|
|
80793
|
+
if (refs.target === "openApi3")
|
|
80794
|
+
return asAnyOf2(def, refs);
|
|
80795
|
+
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
|
|
80796
|
+
if (options.every((x) => (x._def.typeName in primitiveMappings2) && (!x._def.checks || !x._def.checks.length))) {
|
|
80797
|
+
const types6 = options.reduce((types7, x) => {
|
|
80798
|
+
const type = primitiveMappings2[x._def.typeName];
|
|
80799
|
+
return type && !types7.includes(type) ? [...types7, type] : types7;
|
|
80800
|
+
}, []);
|
|
80801
|
+
return {
|
|
80802
|
+
type: types6.length > 1 ? types6 : types6[0]
|
|
80803
|
+
};
|
|
80804
|
+
} else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
|
|
80805
|
+
const types6 = options.reduce((acc, x) => {
|
|
80806
|
+
const type = typeof x._def.value;
|
|
80807
|
+
switch (type) {
|
|
80808
|
+
case "string":
|
|
80809
|
+
case "number":
|
|
80810
|
+
case "boolean":
|
|
80811
|
+
return [...acc, type];
|
|
80812
|
+
case "bigint":
|
|
80813
|
+
return [...acc, "integer"];
|
|
80814
|
+
case "object":
|
|
80815
|
+
if (x._def.value === null)
|
|
80816
|
+
return [...acc, "null"];
|
|
80817
|
+
case "symbol":
|
|
80818
|
+
case "undefined":
|
|
80819
|
+
case "function":
|
|
80820
|
+
default:
|
|
80821
|
+
return acc;
|
|
80822
|
+
}
|
|
80823
|
+
}, []);
|
|
80824
|
+
if (types6.length === options.length) {
|
|
80825
|
+
const uniqueTypes = types6.filter((x, i, a) => a.indexOf(x) === i);
|
|
80826
|
+
return {
|
|
80827
|
+
type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
|
|
80828
|
+
enum: options.reduce((acc, x) => {
|
|
80829
|
+
return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
|
|
80830
|
+
}, [])
|
|
80831
|
+
};
|
|
80832
|
+
}
|
|
80833
|
+
} else if (options.every((x) => x._def.typeName === "ZodEnum")) {
|
|
80834
|
+
return {
|
|
80835
|
+
type: "string",
|
|
80836
|
+
enum: options.reduce((acc, x) => [
|
|
80837
|
+
...acc,
|
|
80838
|
+
...x._def.values.filter((x2) => !acc.includes(x2))
|
|
80839
|
+
], [])
|
|
80840
|
+
};
|
|
80841
|
+
}
|
|
80842
|
+
return asAnyOf2(def, refs);
|
|
80843
|
+
}
|
|
80844
|
+
var asAnyOf2 = (def, refs) => {
|
|
80845
|
+
const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef3(x._def, {
|
|
80846
|
+
...refs,
|
|
80847
|
+
currentPath: [...refs.currentPath, "anyOf", `${i}`]
|
|
80848
|
+
})).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
|
|
80849
|
+
return anyOf.length ? { anyOf } : undefined;
|
|
80850
|
+
};
|
|
80851
|
+
|
|
80852
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
80853
|
+
function parseNullableDef2(def, refs) {
|
|
80854
|
+
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
80855
|
+
if (refs.target === "openApi3") {
|
|
80856
|
+
return {
|
|
80857
|
+
type: primitiveMappings2[def.innerType._def.typeName],
|
|
80858
|
+
nullable: true
|
|
80859
|
+
};
|
|
80860
|
+
}
|
|
80861
|
+
return {
|
|
80862
|
+
type: [
|
|
80863
|
+
primitiveMappings2[def.innerType._def.typeName],
|
|
80864
|
+
"null"
|
|
80865
|
+
]
|
|
80866
|
+
};
|
|
80867
|
+
}
|
|
80868
|
+
if (refs.target === "openApi3") {
|
|
80869
|
+
const base2 = parseDef3(def.innerType._def, {
|
|
80870
|
+
...refs,
|
|
80871
|
+
currentPath: [...refs.currentPath]
|
|
80872
|
+
});
|
|
80873
|
+
if (base2 && "$ref" in base2)
|
|
80874
|
+
return { allOf: [base2], nullable: true };
|
|
80875
|
+
return base2 && { ...base2, nullable: true };
|
|
80876
|
+
}
|
|
80877
|
+
const base = parseDef3(def.innerType._def, {
|
|
80878
|
+
...refs,
|
|
80879
|
+
currentPath: [...refs.currentPath, "anyOf", "0"]
|
|
80880
|
+
});
|
|
80881
|
+
return base && { anyOf: [base, { type: "null" }] };
|
|
80882
|
+
}
|
|
80883
|
+
|
|
80884
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
80885
|
+
function parseNumberDef2(def, refs) {
|
|
80886
|
+
const res = {
|
|
80887
|
+
type: "number"
|
|
80888
|
+
};
|
|
80889
|
+
if (!def.checks)
|
|
80890
|
+
return res;
|
|
80891
|
+
for (const check2 of def.checks) {
|
|
80892
|
+
switch (check2.kind) {
|
|
80893
|
+
case "int":
|
|
80894
|
+
res.type = "integer";
|
|
80895
|
+
addErrorMessage2(res, "type", check2.message, refs);
|
|
80896
|
+
break;
|
|
80897
|
+
case "min":
|
|
80898
|
+
if (refs.target === "jsonSchema7") {
|
|
80899
|
+
if (check2.inclusive) {
|
|
80900
|
+
setResponseValueAndErrors2(res, "minimum", check2.value, check2.message, refs);
|
|
80901
|
+
} else {
|
|
80902
|
+
setResponseValueAndErrors2(res, "exclusiveMinimum", check2.value, check2.message, refs);
|
|
80903
|
+
}
|
|
80904
|
+
} else {
|
|
80905
|
+
if (!check2.inclusive) {
|
|
80906
|
+
res.exclusiveMinimum = true;
|
|
80907
|
+
}
|
|
80908
|
+
setResponseValueAndErrors2(res, "minimum", check2.value, check2.message, refs);
|
|
80909
|
+
}
|
|
80910
|
+
break;
|
|
80911
|
+
case "max":
|
|
80912
|
+
if (refs.target === "jsonSchema7") {
|
|
80913
|
+
if (check2.inclusive) {
|
|
80914
|
+
setResponseValueAndErrors2(res, "maximum", check2.value, check2.message, refs);
|
|
80915
|
+
} else {
|
|
80916
|
+
setResponseValueAndErrors2(res, "exclusiveMaximum", check2.value, check2.message, refs);
|
|
80917
|
+
}
|
|
80918
|
+
} else {
|
|
80919
|
+
if (!check2.inclusive) {
|
|
80920
|
+
res.exclusiveMaximum = true;
|
|
80921
|
+
}
|
|
80922
|
+
setResponseValueAndErrors2(res, "maximum", check2.value, check2.message, refs);
|
|
80923
|
+
}
|
|
80924
|
+
break;
|
|
80925
|
+
case "multipleOf":
|
|
80926
|
+
setResponseValueAndErrors2(res, "multipleOf", check2.value, check2.message, refs);
|
|
80927
|
+
break;
|
|
80928
|
+
}
|
|
80929
|
+
}
|
|
80930
|
+
return res;
|
|
80931
|
+
}
|
|
80932
|
+
|
|
80933
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
80934
|
+
function parseObjectDef2(def, refs) {
|
|
80935
|
+
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
80936
|
+
const result = {
|
|
80937
|
+
type: "object",
|
|
80938
|
+
properties: {}
|
|
80939
|
+
};
|
|
80940
|
+
const required2 = [];
|
|
80941
|
+
const shape = def.shape();
|
|
80942
|
+
for (const propName in shape) {
|
|
80943
|
+
let propDef = shape[propName];
|
|
80944
|
+
if (propDef === undefined || propDef._def === undefined) {
|
|
80945
|
+
continue;
|
|
80946
|
+
}
|
|
80947
|
+
let propOptional = safeIsOptional2(propDef);
|
|
80948
|
+
if (propOptional && forceOptionalIntoNullable) {
|
|
80949
|
+
if (propDef._def.typeName === "ZodOptional") {
|
|
80950
|
+
propDef = propDef._def.innerType;
|
|
80951
|
+
}
|
|
80952
|
+
if (!propDef.isNullable()) {
|
|
80953
|
+
propDef = propDef.nullable();
|
|
80954
|
+
}
|
|
80955
|
+
propOptional = false;
|
|
80956
|
+
}
|
|
80957
|
+
const parsedDef = parseDef3(propDef._def, {
|
|
80958
|
+
...refs,
|
|
80959
|
+
currentPath: [...refs.currentPath, "properties", propName],
|
|
80960
|
+
propertyPath: [...refs.currentPath, "properties", propName]
|
|
80961
|
+
});
|
|
80962
|
+
if (parsedDef === undefined) {
|
|
80963
|
+
continue;
|
|
80964
|
+
}
|
|
80965
|
+
result.properties[propName] = parsedDef;
|
|
80966
|
+
if (!propOptional) {
|
|
80967
|
+
required2.push(propName);
|
|
80968
|
+
}
|
|
80969
|
+
}
|
|
80970
|
+
if (required2.length) {
|
|
80971
|
+
result.required = required2;
|
|
80972
|
+
}
|
|
80973
|
+
const additionalProperties = decideAdditionalProperties2(def, refs);
|
|
80974
|
+
if (additionalProperties !== undefined) {
|
|
80975
|
+
result.additionalProperties = additionalProperties;
|
|
80976
|
+
}
|
|
80977
|
+
return result;
|
|
80978
|
+
}
|
|
80979
|
+
function decideAdditionalProperties2(def, refs) {
|
|
80980
|
+
if (def.catchall._def.typeName !== "ZodNever") {
|
|
80981
|
+
return parseDef3(def.catchall._def, {
|
|
80982
|
+
...refs,
|
|
80983
|
+
currentPath: [...refs.currentPath, "additionalProperties"]
|
|
80984
|
+
});
|
|
80985
|
+
}
|
|
80986
|
+
switch (def.unknownKeys) {
|
|
80987
|
+
case "passthrough":
|
|
80988
|
+
return refs.allowedAdditionalProperties;
|
|
80989
|
+
case "strict":
|
|
80990
|
+
return refs.rejectedAdditionalProperties;
|
|
80991
|
+
case "strip":
|
|
80992
|
+
return refs.removeAdditionalStrategy === "strict" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;
|
|
80993
|
+
}
|
|
80994
|
+
}
|
|
80995
|
+
function safeIsOptional2(schema) {
|
|
80996
|
+
try {
|
|
80997
|
+
return schema.isOptional();
|
|
80998
|
+
} catch {
|
|
80999
|
+
return true;
|
|
81000
|
+
}
|
|
81001
|
+
}
|
|
81002
|
+
|
|
81003
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
81004
|
+
var parseOptionalDef2 = (def, refs) => {
|
|
81005
|
+
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
81006
|
+
return parseDef3(def.innerType._def, refs);
|
|
81007
|
+
}
|
|
81008
|
+
const innerSchema = parseDef3(def.innerType._def, {
|
|
81009
|
+
...refs,
|
|
81010
|
+
currentPath: [...refs.currentPath, "anyOf", "1"]
|
|
81011
|
+
});
|
|
81012
|
+
return innerSchema ? {
|
|
81013
|
+
anyOf: [
|
|
81014
|
+
{
|
|
81015
|
+
not: parseAnyDef2(refs)
|
|
81016
|
+
},
|
|
81017
|
+
innerSchema
|
|
81018
|
+
]
|
|
81019
|
+
} : parseAnyDef2(refs);
|
|
81020
|
+
};
|
|
81021
|
+
|
|
81022
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
81023
|
+
var parsePipelineDef2 = (def, refs) => {
|
|
81024
|
+
if (refs.pipeStrategy === "input") {
|
|
81025
|
+
return parseDef3(def.in._def, refs);
|
|
81026
|
+
} else if (refs.pipeStrategy === "output") {
|
|
81027
|
+
return parseDef3(def.out._def, refs);
|
|
81028
|
+
}
|
|
81029
|
+
const a = parseDef3(def.in._def, {
|
|
81030
|
+
...refs,
|
|
81031
|
+
currentPath: [...refs.currentPath, "allOf", "0"]
|
|
81032
|
+
});
|
|
81033
|
+
const b = parseDef3(def.out._def, {
|
|
81034
|
+
...refs,
|
|
81035
|
+
currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
|
|
81036
|
+
});
|
|
81037
|
+
return {
|
|
81038
|
+
allOf: [a, b].filter((x) => x !== undefined)
|
|
81039
|
+
};
|
|
81040
|
+
};
|
|
81041
|
+
|
|
81042
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
81043
|
+
function parsePromiseDef2(def, refs) {
|
|
81044
|
+
return parseDef3(def.type._def, refs);
|
|
81045
|
+
}
|
|
81046
|
+
|
|
81047
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
81048
|
+
function parseSetDef2(def, refs) {
|
|
81049
|
+
const items = parseDef3(def.valueType._def, {
|
|
81050
|
+
...refs,
|
|
81051
|
+
currentPath: [...refs.currentPath, "items"]
|
|
81052
|
+
});
|
|
81053
|
+
const schema = {
|
|
81054
|
+
type: "array",
|
|
81055
|
+
uniqueItems: true,
|
|
81056
|
+
items
|
|
81057
|
+
};
|
|
81058
|
+
if (def.minSize) {
|
|
81059
|
+
setResponseValueAndErrors2(schema, "minItems", def.minSize.value, def.minSize.message, refs);
|
|
81060
|
+
}
|
|
81061
|
+
if (def.maxSize) {
|
|
81062
|
+
setResponseValueAndErrors2(schema, "maxItems", def.maxSize.value, def.maxSize.message, refs);
|
|
81063
|
+
}
|
|
81064
|
+
return schema;
|
|
81065
|
+
}
|
|
81066
|
+
|
|
81067
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
81068
|
+
function parseTupleDef2(def, refs) {
|
|
81069
|
+
if (def.rest) {
|
|
81070
|
+
return {
|
|
81071
|
+
type: "array",
|
|
81072
|
+
minItems: def.items.length,
|
|
81073
|
+
items: def.items.map((x, i) => parseDef3(x._def, {
|
|
81074
|
+
...refs,
|
|
81075
|
+
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
81076
|
+
})).reduce((acc, x) => x === undefined ? acc : [...acc, x], []),
|
|
81077
|
+
additionalItems: parseDef3(def.rest._def, {
|
|
81078
|
+
...refs,
|
|
81079
|
+
currentPath: [...refs.currentPath, "additionalItems"]
|
|
81080
|
+
})
|
|
81081
|
+
};
|
|
81082
|
+
} else {
|
|
81083
|
+
return {
|
|
81084
|
+
type: "array",
|
|
81085
|
+
minItems: def.items.length,
|
|
81086
|
+
maxItems: def.items.length,
|
|
81087
|
+
items: def.items.map((x, i) => parseDef3(x._def, {
|
|
81088
|
+
...refs,
|
|
81089
|
+
currentPath: [...refs.currentPath, "items", `${i}`]
|
|
81090
|
+
})).reduce((acc, x) => x === undefined ? acc : [...acc, x], [])
|
|
81091
|
+
};
|
|
81092
|
+
}
|
|
81093
|
+
}
|
|
81094
|
+
|
|
81095
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
81096
|
+
function parseUndefinedDef2(refs) {
|
|
81097
|
+
return {
|
|
81098
|
+
not: parseAnyDef2(refs)
|
|
81099
|
+
};
|
|
81100
|
+
}
|
|
81101
|
+
|
|
81102
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
81103
|
+
function parseUnknownDef2(refs) {
|
|
81104
|
+
return parseAnyDef2(refs);
|
|
81105
|
+
}
|
|
81106
|
+
|
|
81107
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
81108
|
+
var parseReadonlyDef2 = (def, refs) => {
|
|
81109
|
+
return parseDef3(def.innerType._def, refs);
|
|
81110
|
+
};
|
|
81111
|
+
|
|
81112
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
81113
|
+
var selectParser3 = (def, typeName, refs) => {
|
|
81114
|
+
switch (typeName) {
|
|
81115
|
+
case ZodFirstPartyTypeKind2.ZodString:
|
|
81116
|
+
return parseStringDef2(def, refs);
|
|
81117
|
+
case ZodFirstPartyTypeKind2.ZodNumber:
|
|
81118
|
+
return parseNumberDef2(def, refs);
|
|
81119
|
+
case ZodFirstPartyTypeKind2.ZodObject:
|
|
81120
|
+
return parseObjectDef2(def, refs);
|
|
81121
|
+
case ZodFirstPartyTypeKind2.ZodBigInt:
|
|
81122
|
+
return parseBigintDef2(def, refs);
|
|
81123
|
+
case ZodFirstPartyTypeKind2.ZodBoolean:
|
|
81124
|
+
return parseBooleanDef2();
|
|
81125
|
+
case ZodFirstPartyTypeKind2.ZodDate:
|
|
81126
|
+
return parseDateDef2(def, refs);
|
|
81127
|
+
case ZodFirstPartyTypeKind2.ZodUndefined:
|
|
81128
|
+
return parseUndefinedDef2(refs);
|
|
81129
|
+
case ZodFirstPartyTypeKind2.ZodNull:
|
|
81130
|
+
return parseNullDef2(refs);
|
|
81131
|
+
case ZodFirstPartyTypeKind2.ZodArray:
|
|
81132
|
+
return parseArrayDef2(def, refs);
|
|
81133
|
+
case ZodFirstPartyTypeKind2.ZodUnion:
|
|
81134
|
+
case ZodFirstPartyTypeKind2.ZodDiscriminatedUnion:
|
|
81135
|
+
return parseUnionDef2(def, refs);
|
|
81136
|
+
case ZodFirstPartyTypeKind2.ZodIntersection:
|
|
81137
|
+
return parseIntersectionDef2(def, refs);
|
|
81138
|
+
case ZodFirstPartyTypeKind2.ZodTuple:
|
|
81139
|
+
return parseTupleDef2(def, refs);
|
|
81140
|
+
case ZodFirstPartyTypeKind2.ZodRecord:
|
|
81141
|
+
return parseRecordDef2(def, refs);
|
|
81142
|
+
case ZodFirstPartyTypeKind2.ZodLiteral:
|
|
81143
|
+
return parseLiteralDef2(def, refs);
|
|
81144
|
+
case ZodFirstPartyTypeKind2.ZodEnum:
|
|
81145
|
+
return parseEnumDef2(def);
|
|
81146
|
+
case ZodFirstPartyTypeKind2.ZodNativeEnum:
|
|
81147
|
+
return parseNativeEnumDef2(def);
|
|
81148
|
+
case ZodFirstPartyTypeKind2.ZodNullable:
|
|
81149
|
+
return parseNullableDef2(def, refs);
|
|
81150
|
+
case ZodFirstPartyTypeKind2.ZodOptional:
|
|
81151
|
+
return parseOptionalDef2(def, refs);
|
|
81152
|
+
case ZodFirstPartyTypeKind2.ZodMap:
|
|
81153
|
+
return parseMapDef2(def, refs);
|
|
81154
|
+
case ZodFirstPartyTypeKind2.ZodSet:
|
|
81155
|
+
return parseSetDef2(def, refs);
|
|
81156
|
+
case ZodFirstPartyTypeKind2.ZodLazy:
|
|
81157
|
+
return () => def.getter()._def;
|
|
81158
|
+
case ZodFirstPartyTypeKind2.ZodPromise:
|
|
81159
|
+
return parsePromiseDef2(def, refs);
|
|
81160
|
+
case ZodFirstPartyTypeKind2.ZodNaN:
|
|
81161
|
+
case ZodFirstPartyTypeKind2.ZodNever:
|
|
81162
|
+
return parseNeverDef2(refs);
|
|
81163
|
+
case ZodFirstPartyTypeKind2.ZodEffects:
|
|
81164
|
+
return parseEffectsDef2(def, refs);
|
|
81165
|
+
case ZodFirstPartyTypeKind2.ZodAny:
|
|
81166
|
+
return parseAnyDef2(refs);
|
|
81167
|
+
case ZodFirstPartyTypeKind2.ZodUnknown:
|
|
81168
|
+
return parseUnknownDef2(refs);
|
|
81169
|
+
case ZodFirstPartyTypeKind2.ZodDefault:
|
|
81170
|
+
return parseDefaultDef2(def, refs);
|
|
81171
|
+
case ZodFirstPartyTypeKind2.ZodBranded:
|
|
81172
|
+
return parseBrandedDef2(def, refs);
|
|
81173
|
+
case ZodFirstPartyTypeKind2.ZodReadonly:
|
|
81174
|
+
return parseReadonlyDef2(def, refs);
|
|
81175
|
+
case ZodFirstPartyTypeKind2.ZodCatch:
|
|
81176
|
+
return parseCatchDef2(def, refs);
|
|
81177
|
+
case ZodFirstPartyTypeKind2.ZodPipeline:
|
|
81178
|
+
return parsePipelineDef2(def, refs);
|
|
81179
|
+
case ZodFirstPartyTypeKind2.ZodFunction:
|
|
81180
|
+
case ZodFirstPartyTypeKind2.ZodVoid:
|
|
81181
|
+
case ZodFirstPartyTypeKind2.ZodSymbol:
|
|
81182
|
+
return;
|
|
81183
|
+
default:
|
|
81184
|
+
return ((_) => {
|
|
81185
|
+
return;
|
|
81186
|
+
})(typeName);
|
|
81187
|
+
}
|
|
81188
|
+
};
|
|
81189
|
+
|
|
81190
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
81191
|
+
function parseDef3(def, refs, forceResolution = false) {
|
|
81192
|
+
const seenItem = refs.seen.get(def);
|
|
81193
|
+
if (refs.override) {
|
|
81194
|
+
const overrideResult = refs.override?.(def, refs, seenItem, forceResolution);
|
|
81195
|
+
if (overrideResult !== ignoreOverride2) {
|
|
81196
|
+
return overrideResult;
|
|
81197
|
+
}
|
|
81198
|
+
}
|
|
81199
|
+
if (seenItem && !forceResolution) {
|
|
81200
|
+
const seenSchema = get$ref2(seenItem, refs);
|
|
81201
|
+
if (seenSchema !== undefined) {
|
|
81202
|
+
return seenSchema;
|
|
81203
|
+
}
|
|
81204
|
+
}
|
|
81205
|
+
const newItem = { def, path: refs.currentPath, jsonSchema: undefined };
|
|
81206
|
+
refs.seen.set(def, newItem);
|
|
81207
|
+
const jsonSchemaOrGetter = selectParser3(def, def.typeName, refs);
|
|
81208
|
+
const jsonSchema = typeof jsonSchemaOrGetter === "function" ? parseDef3(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;
|
|
81209
|
+
if (jsonSchema) {
|
|
81210
|
+
addMeta2(def, refs, jsonSchema);
|
|
81211
|
+
}
|
|
81212
|
+
if (refs.postProcess) {
|
|
81213
|
+
const postProcessResult = refs.postProcess(jsonSchema, def, refs);
|
|
81214
|
+
newItem.jsonSchema = jsonSchema;
|
|
81215
|
+
return postProcessResult;
|
|
81216
|
+
}
|
|
81217
|
+
newItem.jsonSchema = jsonSchema;
|
|
81218
|
+
return jsonSchema;
|
|
81219
|
+
}
|
|
81220
|
+
var get$ref2 = (item, refs) => {
|
|
81221
|
+
switch (refs.$refStrategy) {
|
|
81222
|
+
case "root":
|
|
81223
|
+
return { $ref: item.path.join("/") };
|
|
81224
|
+
case "relative":
|
|
81225
|
+
return { $ref: getRelativePath3(refs.currentPath, item.path) };
|
|
81226
|
+
case "none":
|
|
81227
|
+
case "seen": {
|
|
81228
|
+
if (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {
|
|
81229
|
+
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
|
|
81230
|
+
return parseAnyDef2(refs);
|
|
81231
|
+
}
|
|
81232
|
+
return refs.$refStrategy === "seen" ? parseAnyDef2(refs) : undefined;
|
|
81233
|
+
}
|
|
81234
|
+
}
|
|
81235
|
+
};
|
|
81236
|
+
var addMeta2 = (def, refs, jsonSchema) => {
|
|
81237
|
+
if (def.description) {
|
|
81238
|
+
jsonSchema.description = def.description;
|
|
81239
|
+
if (refs.markdownDescription) {
|
|
81240
|
+
jsonSchema.markdownDescription = def.description;
|
|
81241
|
+
}
|
|
81242
|
+
}
|
|
81243
|
+
return jsonSchema;
|
|
81244
|
+
};
|
|
81245
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.24.6+7c17c985f1580bb6/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
81246
|
+
var zodToJsonSchema3 = (schema, options) => {
|
|
81247
|
+
const refs = getRefs2(options);
|
|
81248
|
+
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
81249
|
+
...acc,
|
|
81250
|
+
[name2]: parseDef3(schema2._def, {
|
|
81251
|
+
...refs,
|
|
81252
|
+
currentPath: [...refs.basePath, refs.definitionPath, name2]
|
|
81253
|
+
}, true) ?? parseAnyDef2(refs)
|
|
81254
|
+
}), {}) : undefined;
|
|
81255
|
+
const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? undefined : options?.name;
|
|
81256
|
+
const main = parseDef3(schema._def, name === undefined ? refs : {
|
|
81257
|
+
...refs,
|
|
81258
|
+
currentPath: [...refs.basePath, refs.definitionPath, name]
|
|
81259
|
+
}, false) ?? parseAnyDef2(refs);
|
|
81260
|
+
const title = typeof options === "object" && options.name !== undefined && options.nameStrategy === "title" ? options.name : undefined;
|
|
81261
|
+
if (title !== undefined) {
|
|
81262
|
+
main.title = title;
|
|
81263
|
+
}
|
|
81264
|
+
if (refs.flags.hasReferencedOpenAiAnyType) {
|
|
81265
|
+
if (!definitions) {
|
|
81266
|
+
definitions = {};
|
|
81267
|
+
}
|
|
81268
|
+
if (!definitions[refs.openAiAnyTypeName]) {
|
|
81269
|
+
definitions[refs.openAiAnyTypeName] = {
|
|
81270
|
+
type: ["string", "number", "integer", "boolean", "array", "null"],
|
|
81271
|
+
items: {
|
|
81272
|
+
$ref: refs.$refStrategy === "relative" ? "1" : [
|
|
81273
|
+
...refs.basePath,
|
|
81274
|
+
refs.definitionPath,
|
|
81275
|
+
refs.openAiAnyTypeName
|
|
81276
|
+
].join("/")
|
|
81277
|
+
}
|
|
81278
|
+
};
|
|
81279
|
+
}
|
|
81280
|
+
}
|
|
81281
|
+
const combined = name === undefined ? definitions ? {
|
|
81282
|
+
...main,
|
|
81283
|
+
[refs.definitionPath]: definitions
|
|
81284
|
+
} : main : {
|
|
81285
|
+
$ref: [
|
|
81286
|
+
...refs.$refStrategy === "relative" ? [] : refs.basePath,
|
|
81287
|
+
refs.definitionPath,
|
|
81288
|
+
name
|
|
81289
|
+
].join("/"),
|
|
81290
|
+
[refs.definitionPath]: {
|
|
81291
|
+
...definitions,
|
|
81292
|
+
[name]: main
|
|
81293
|
+
}
|
|
81294
|
+
};
|
|
81295
|
+
if (refs.target === "jsonSchema7") {
|
|
81296
|
+
combined.$schema = "http://json-schema.org/draft-07/schema#";
|
|
81297
|
+
} else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") {
|
|
81298
|
+
combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
|
|
81299
|
+
}
|
|
81300
|
+
if (refs.target === "openAi" && (("anyOf" in combined) || ("oneOf" in combined) || ("allOf" in combined) || ("type" in combined) && Array.isArray(combined.type))) {
|
|
81301
|
+
console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
|
|
81302
|
+
}
|
|
81303
|
+
return combined;
|
|
81304
|
+
};
|
|
80247
81305
|
// src/tools/portal/queries.ts
|
|
80248
81306
|
var portalQueries = (server, env3) => {
|
|
80249
81307
|
const portalGraphqlEndpoint = env3.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT;
|
|
@@ -80254,7 +81312,9 @@ var portalQueries = (server, env3) => {
|
|
|
80254
81312
|
if (!accessToken) {
|
|
80255
81313
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
80256
81314
|
}
|
|
80257
|
-
|
|
81315
|
+
const schema = exports_external2.object({});
|
|
81316
|
+
server.tool("portal-queries", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
81317
|
+
schema.parse(params);
|
|
80258
81318
|
try {
|
|
80259
81319
|
const { queryNames } = await fetchProcessedSchema(portalGraphqlEndpoint, accessToken);
|
|
80260
81320
|
return {
|
|
@@ -80286,7 +81346,7 @@ var portalQueries = (server, env3) => {
|
|
|
80286
81346
|
var package_default = {
|
|
80287
81347
|
name: "@settlemint/sdk-mcp",
|
|
80288
81348
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
80289
|
-
version: "2.5.
|
|
81349
|
+
version: "2.5.9",
|
|
80290
81350
|
type: "module",
|
|
80291
81351
|
private: false,
|
|
80292
81352
|
license: "FSL-1.1-MIT",
|
|
@@ -80328,12 +81388,13 @@ var package_default = {
|
|
|
80328
81388
|
"@commander-js/extra-typings": "14.0.0",
|
|
80329
81389
|
"@graphql-tools/load": "8.1.2",
|
|
80330
81390
|
"@graphql-tools/url-loader": "8.0.33",
|
|
80331
|
-
"@modelcontextprotocol/sdk": "1.17.
|
|
80332
|
-
"@settlemint/sdk-js": "2.5.
|
|
80333
|
-
"@settlemint/sdk-utils": "2.5.
|
|
81391
|
+
"@modelcontextprotocol/sdk": "1.17.3",
|
|
81392
|
+
"@settlemint/sdk-js": "2.5.9",
|
|
81393
|
+
"@settlemint/sdk-utils": "2.5.9",
|
|
80334
81394
|
commander: "14.0.0",
|
|
80335
81395
|
graphql: "16.11.0",
|
|
80336
|
-
zod: "^4"
|
|
81396
|
+
zod: "^4",
|
|
81397
|
+
"zod-to-json-schema": "^3.23.0"
|
|
80337
81398
|
},
|
|
80338
81399
|
devDependencies: {},
|
|
80339
81400
|
peerDependencies: {},
|
|
@@ -81237,7 +82298,11 @@ var hasuraMutation = (server, env3) => {
|
|
|
81237
82298
|
if (!accessToken) {
|
|
81238
82299
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
81239
82300
|
}
|
|
81240
|
-
|
|
82301
|
+
const schema = exports_external2.object({
|
|
82302
|
+
mutationName: exports_external2.string()
|
|
82303
|
+
});
|
|
82304
|
+
server.tool("hasura-mutation", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
82305
|
+
const { mutationName } = schema.parse(params);
|
|
81241
82306
|
try {
|
|
81242
82307
|
if (!mutationName) {
|
|
81243
82308
|
return {
|
|
@@ -81312,7 +82377,9 @@ var hasuraMutations = (server, env3) => {
|
|
|
81312
82377
|
if (!accessToken) {
|
|
81313
82378
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
81314
82379
|
}
|
|
81315
|
-
|
|
82380
|
+
const schema = exports_external2.object({});
|
|
82381
|
+
server.tool("hasura-mutations", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
82382
|
+
schema.parse(params);
|
|
81316
82383
|
try {
|
|
81317
82384
|
const { mutationNames } = await fetchProcessedSchema(hasuraEndpoint, accessToken, hasuraAdminSecret);
|
|
81318
82385
|
return {
|
|
@@ -81355,7 +82422,9 @@ var hasuraQueries = (server, env3) => {
|
|
|
81355
82422
|
if (!accessToken) {
|
|
81356
82423
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
81357
82424
|
}
|
|
81358
|
-
|
|
82425
|
+
const schema = exports_external2.object({});
|
|
82426
|
+
server.tool("hasura-queries", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
82427
|
+
schema.parse(params);
|
|
81359
82428
|
try {
|
|
81360
82429
|
const { queryNames } = await fetchProcessedSchema(hasuraEndpoint, accessToken, hasuraAdminSecret);
|
|
81361
82430
|
return {
|
|
@@ -81398,7 +82467,9 @@ var hasuraQuery = (server, env3) => {
|
|
|
81398
82467
|
if (!accessToken) {
|
|
81399
82468
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
81400
82469
|
}
|
|
81401
|
-
|
|
82470
|
+
const schema = exports_external2.object({ queryName: exports_external2.string() });
|
|
82471
|
+
server.tool("hasura-query", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
82472
|
+
const { queryName } = schema.parse(params);
|
|
81402
82473
|
try {
|
|
81403
82474
|
if (!queryName) {
|
|
81404
82475
|
return {
|
|
@@ -84426,8 +85497,8 @@ function createSettleMintClient(options) {
|
|
|
84426
85497
|
if (contentType?.includes("application/json") || contentType?.includes("application/graphql-response+json")) {
|
|
84427
85498
|
const data = await response.clone().json();
|
|
84428
85499
|
if (data.errors?.length > 0) {
|
|
84429
|
-
const
|
|
84430
|
-
throw new Error(
|
|
85500
|
+
const errorMessages3 = data.errors.map((e5) => e5.message).join(", ");
|
|
85501
|
+
throw new Error(errorMessages3);
|
|
84431
85502
|
}
|
|
84432
85503
|
}
|
|
84433
85504
|
return response;
|
|
@@ -84546,16 +85617,18 @@ var platformApplicationList = (server, env3, pat) => {
|
|
|
84546
85617
|
accessToken: pat,
|
|
84547
85618
|
instance
|
|
84548
85619
|
});
|
|
84549
|
-
|
|
85620
|
+
const schema = exports_external2.object({
|
|
84550
85621
|
workspaceUniqueName: exports_external2.string().describe("Unique name of the workspace to list applications from")
|
|
84551
|
-
}
|
|
84552
|
-
|
|
85622
|
+
});
|
|
85623
|
+
server.tool("platform-application-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85624
|
+
const { workspaceUniqueName } = schema.parse(params);
|
|
85625
|
+
const applications = await client.application.list(workspaceUniqueName);
|
|
84553
85626
|
return {
|
|
84554
85627
|
content: [
|
|
84555
85628
|
{
|
|
84556
85629
|
type: "text",
|
|
84557
85630
|
name: "Application List",
|
|
84558
|
-
description: `List of applications in workspace: ${
|
|
85631
|
+
description: `List of applications in workspace: ${workspaceUniqueName}`,
|
|
84559
85632
|
mimeType: "application/json",
|
|
84560
85633
|
text: JSON.stringify(applications, null, 2)
|
|
84561
85634
|
}
|
|
@@ -84574,16 +85647,18 @@ var platformApplicationRead = (server, env3, pat) => {
|
|
|
84574
85647
|
accessToken: pat,
|
|
84575
85648
|
instance
|
|
84576
85649
|
});
|
|
84577
|
-
|
|
85650
|
+
const schema = exports_external2.object({
|
|
84578
85651
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to read")
|
|
84579
|
-
}
|
|
84580
|
-
|
|
85652
|
+
});
|
|
85653
|
+
server.tool("platform-application-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85654
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
85655
|
+
const application = await client.application.read(applicationUniqueName);
|
|
84581
85656
|
return {
|
|
84582
85657
|
content: [
|
|
84583
85658
|
{
|
|
84584
85659
|
type: "text",
|
|
84585
85660
|
name: "Application Details",
|
|
84586
|
-
description: `Details for application: ${
|
|
85661
|
+
description: `Details for application: ${applicationUniqueName}`,
|
|
84587
85662
|
mimeType: "application/json",
|
|
84588
85663
|
text: JSON.stringify(application, null, 2)
|
|
84589
85664
|
}
|
|
@@ -84602,7 +85677,7 @@ var platformBlockchainNetworkCreate = (server, env3, pat) => {
|
|
|
84602
85677
|
accessToken: pat,
|
|
84603
85678
|
instance
|
|
84604
85679
|
});
|
|
84605
|
-
|
|
85680
|
+
const schema = exports_external2.object({
|
|
84606
85681
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the network in").optional(),
|
|
84607
85682
|
name: exports_external2.string().describe("Name of the blockchain network"),
|
|
84608
85683
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the blockchain network (DEDICATED or SHARED)"),
|
|
@@ -84623,27 +85698,29 @@ var platformBlockchainNetworkCreate = (server, env3, pat) => {
|
|
|
84623
85698
|
"CORDA",
|
|
84624
85699
|
"FABRIC_RAFT"
|
|
84625
85700
|
]).describe("Consensus algorithm for the blockchain network")
|
|
84626
|
-
}
|
|
84627
|
-
|
|
85701
|
+
});
|
|
85702
|
+
server.tool("platform-blockchain-network-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85703
|
+
const parsed = schema.parse(params);
|
|
85704
|
+
const applicationUniqueName = env3.SETTLEMINT_APPLICATION || parsed.applicationUniqueName;
|
|
84628
85705
|
if (!applicationUniqueName) {
|
|
84629
85706
|
throw new Error("Application unique name is required. Set SETTLEMINT_APPLICATION environment variable or provide applicationUniqueName parameter.");
|
|
84630
85707
|
}
|
|
84631
85708
|
const network = await client.blockchainNetwork.create({
|
|
84632
85709
|
applicationUniqueName,
|
|
84633
|
-
name:
|
|
84634
|
-
type:
|
|
84635
|
-
size:
|
|
84636
|
-
provider:
|
|
84637
|
-
region:
|
|
84638
|
-
nodeName:
|
|
84639
|
-
consensusAlgorithm:
|
|
85710
|
+
name: parsed.name,
|
|
85711
|
+
type: parsed.type,
|
|
85712
|
+
size: parsed.size,
|
|
85713
|
+
provider: parsed.provider,
|
|
85714
|
+
region: parsed.region,
|
|
85715
|
+
nodeName: parsed.nodeName,
|
|
85716
|
+
consensusAlgorithm: parsed.consensusAlgorithm
|
|
84640
85717
|
});
|
|
84641
85718
|
return {
|
|
84642
85719
|
content: [
|
|
84643
85720
|
{
|
|
84644
85721
|
type: "text",
|
|
84645
85722
|
name: "Blockchain Network Created",
|
|
84646
|
-
description: `Created blockchain network: ${
|
|
85723
|
+
description: `Created blockchain network: ${parsed.name} in application: ${applicationUniqueName}`,
|
|
84647
85724
|
mimeType: "application/json",
|
|
84648
85725
|
text: JSON.stringify(network, null, 2)
|
|
84649
85726
|
}
|
|
@@ -84662,10 +85739,12 @@ var platformBlockchainNetworkList = (server, env3, pat) => {
|
|
|
84662
85739
|
accessToken: pat,
|
|
84663
85740
|
instance
|
|
84664
85741
|
});
|
|
84665
|
-
|
|
85742
|
+
const schema = exports_external2.object({
|
|
84666
85743
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list blockchain networks from").optional()
|
|
84667
|
-
}
|
|
84668
|
-
|
|
85744
|
+
});
|
|
85745
|
+
server.tool("platform-blockchain-network-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85746
|
+
const { applicationUniqueName: provided } = schema.parse(params);
|
|
85747
|
+
const applicationUniqueName = env3.SETTLEMINT_APPLICATION || provided;
|
|
84669
85748
|
if (!applicationUniqueName) {
|
|
84670
85749
|
throw new Error("Application unique name is required. Set SETTLEMINT_APPLICATION environment variable or provide applicationUniqueName parameter.");
|
|
84671
85750
|
}
|
|
@@ -84694,10 +85773,12 @@ var platformBlockchainNetworkRead = (server, env3, pat) => {
|
|
|
84694
85773
|
accessToken: pat,
|
|
84695
85774
|
instance
|
|
84696
85775
|
});
|
|
84697
|
-
|
|
85776
|
+
const schema = exports_external2.object({
|
|
84698
85777
|
blockchainNetworkUniqueName: exports_external2.string().describe("Unique name of the blockchain network to read").optional()
|
|
84699
|
-
}
|
|
84700
|
-
|
|
85778
|
+
});
|
|
85779
|
+
server.tool("platform-blockchain-network-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85780
|
+
const { blockchainNetworkUniqueName: provided } = schema.parse(params);
|
|
85781
|
+
const blockchainNetworkUniqueName = env3.SETTLEMINT_BLOCKCHAIN_NETWORK || provided;
|
|
84701
85782
|
if (!blockchainNetworkUniqueName) {
|
|
84702
85783
|
throw new Error("Blockchain network unique name is required. Set SETTLEMINT_BLOCKCHAIN_NETWORK environment variable or provide blockchainNetworkUniqueName parameter.");
|
|
84703
85784
|
}
|
|
@@ -84726,10 +85807,12 @@ var platformBlockchainNetworkRestart = (server, env3, pat) => {
|
|
|
84726
85807
|
accessToken: pat,
|
|
84727
85808
|
instance
|
|
84728
85809
|
});
|
|
84729
|
-
|
|
85810
|
+
const schema = exports_external2.object({
|
|
84730
85811
|
networkUniqueName: exports_external2.string().describe("Unique name of the blockchain network to restart").optional()
|
|
84731
|
-
}
|
|
84732
|
-
|
|
85812
|
+
});
|
|
85813
|
+
server.tool("platform-blockchain-network-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85814
|
+
const { networkUniqueName: provided } = schema.parse(params);
|
|
85815
|
+
const networkUniqueName = env3.SETTLEMINT_BLOCKCHAIN_NETWORK || provided;
|
|
84733
85816
|
if (!networkUniqueName) {
|
|
84734
85817
|
throw new Error("Blockchain network unique name is required. Set SETTLEMINT_BLOCKCHAIN_NETWORK environment variable or provide networkUniqueName parameter.");
|
|
84735
85818
|
}
|
|
@@ -84758,7 +85841,7 @@ var platformBlockchainNodeCreate = (server, env3, pat) => {
|
|
|
84758
85841
|
accessToken: pat,
|
|
84759
85842
|
instance
|
|
84760
85843
|
});
|
|
84761
|
-
|
|
85844
|
+
const schema = exports_external2.object({
|
|
84762
85845
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the node in"),
|
|
84763
85846
|
blockchainNetworkUniqueName: exports_external2.string().describe("Unique name of the blockchain network for the node"),
|
|
84764
85847
|
name: exports_external2.string().describe("Name of the blockchain node"),
|
|
@@ -84767,23 +85850,25 @@ var platformBlockchainNodeCreate = (server, env3, pat) => {
|
|
|
84767
85850
|
nodeType: exports_external2.enum(["NON_VALIDATOR", "NOTARY", "ORDERER", "PEER", "UNSPECIFIED", "VALIDATOR"]).describe("The type of the blockchain node (NON_VALIDATOR, NOTARY, ORDERER, PEER, UNSPECIFIED, or VALIDATOR)").optional(),
|
|
84768
85851
|
provider: exports_external2.string().describe("Provider for the blockchain node"),
|
|
84769
85852
|
region: exports_external2.string().describe("Region for the blockchain node")
|
|
84770
|
-
}
|
|
85853
|
+
});
|
|
85854
|
+
server.tool("platform-blockchain-node-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85855
|
+
const parsed = schema.parse(params);
|
|
84771
85856
|
const node = await client.blockchainNode.create({
|
|
84772
|
-
applicationUniqueName:
|
|
84773
|
-
blockchainNetworkUniqueName:
|
|
84774
|
-
name:
|
|
84775
|
-
type:
|
|
84776
|
-
size:
|
|
84777
|
-
nodeType:
|
|
84778
|
-
provider:
|
|
84779
|
-
region:
|
|
85857
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
85858
|
+
blockchainNetworkUniqueName: parsed.blockchainNetworkUniqueName,
|
|
85859
|
+
name: parsed.name,
|
|
85860
|
+
type: parsed.type,
|
|
85861
|
+
size: parsed.size,
|
|
85862
|
+
nodeType: parsed.nodeType,
|
|
85863
|
+
provider: parsed.provider,
|
|
85864
|
+
region: parsed.region
|
|
84780
85865
|
});
|
|
84781
85866
|
return {
|
|
84782
85867
|
content: [
|
|
84783
85868
|
{
|
|
84784
85869
|
type: "text",
|
|
84785
85870
|
name: "Blockchain Node Created",
|
|
84786
|
-
description: `Created blockchain node: ${
|
|
85871
|
+
description: `Created blockchain node: ${parsed.name} in network: ${parsed.blockchainNetworkUniqueName}`,
|
|
84787
85872
|
mimeType: "application/json",
|
|
84788
85873
|
text: JSON.stringify(node, null, 2)
|
|
84789
85874
|
}
|
|
@@ -84802,16 +85887,18 @@ var platformBlockchainNodeList = (server, env3, pat) => {
|
|
|
84802
85887
|
accessToken: pat,
|
|
84803
85888
|
instance
|
|
84804
85889
|
});
|
|
84805
|
-
|
|
85890
|
+
const schema = exports_external2.object({
|
|
84806
85891
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list blockchain nodes from")
|
|
84807
|
-
}
|
|
84808
|
-
|
|
85892
|
+
});
|
|
85893
|
+
server.tool("platform-blockchain-node-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85894
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
85895
|
+
const nodes = await client.blockchainNode.list(applicationUniqueName);
|
|
84809
85896
|
return {
|
|
84810
85897
|
content: [
|
|
84811
85898
|
{
|
|
84812
85899
|
type: "text",
|
|
84813
85900
|
name: "Blockchain Node List",
|
|
84814
|
-
description: `List of blockchain nodes in application: ${
|
|
85901
|
+
description: `List of blockchain nodes in application: ${applicationUniqueName}`,
|
|
84815
85902
|
mimeType: "application/json",
|
|
84816
85903
|
text: JSON.stringify(nodes, null, 2)
|
|
84817
85904
|
}
|
|
@@ -84830,16 +85917,18 @@ var platformBlockchainNodeRead = (server, env3, pat) => {
|
|
|
84830
85917
|
accessToken: pat,
|
|
84831
85918
|
instance
|
|
84832
85919
|
});
|
|
84833
|
-
|
|
85920
|
+
const schema = exports_external2.object({
|
|
84834
85921
|
blockchainNodeUniqueName: exports_external2.string().describe("Unique name of the blockchain node to read")
|
|
84835
|
-
}
|
|
84836
|
-
|
|
85922
|
+
});
|
|
85923
|
+
server.tool("platform-blockchain-node-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85924
|
+
const { blockchainNodeUniqueName } = schema.parse(params);
|
|
85925
|
+
const node = await client.blockchainNode.read(blockchainNodeUniqueName);
|
|
84837
85926
|
return {
|
|
84838
85927
|
content: [
|
|
84839
85928
|
{
|
|
84840
85929
|
type: "text",
|
|
84841
85930
|
name: "Blockchain Node Details",
|
|
84842
|
-
description: `Details for blockchain node: ${
|
|
85931
|
+
description: `Details for blockchain node: ${blockchainNodeUniqueName}`,
|
|
84843
85932
|
mimeType: "application/json",
|
|
84844
85933
|
text: JSON.stringify(node, null, 2)
|
|
84845
85934
|
}
|
|
@@ -84858,16 +85947,18 @@ var platformBlockchainNodeRestart = (server, env3, pat) => {
|
|
|
84858
85947
|
accessToken: pat,
|
|
84859
85948
|
instance
|
|
84860
85949
|
});
|
|
84861
|
-
|
|
85950
|
+
const schema = exports_external2.object({
|
|
84862
85951
|
nodeUniqueName: exports_external2.string().describe("Unique name of the blockchain node to restart")
|
|
84863
|
-
}
|
|
84864
|
-
|
|
85952
|
+
});
|
|
85953
|
+
server.tool("platform-blockchain-node-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85954
|
+
const { nodeUniqueName } = schema.parse(params);
|
|
85955
|
+
const node = await client.blockchainNode.restart(nodeUniqueName);
|
|
84865
85956
|
return {
|
|
84866
85957
|
content: [
|
|
84867
85958
|
{
|
|
84868
85959
|
type: "text",
|
|
84869
85960
|
name: "Blockchain Node Restarted",
|
|
84870
|
-
description: `Restarted blockchain node: ${
|
|
85961
|
+
description: `Restarted blockchain node: ${nodeUniqueName}`,
|
|
84871
85962
|
mimeType: "application/json",
|
|
84872
85963
|
text: JSON.stringify(node, null, 2)
|
|
84873
85964
|
}
|
|
@@ -84886,7 +85977,7 @@ var platformCustomDeploymentCreate = (server, env3, pat) => {
|
|
|
84886
85977
|
accessToken: pat,
|
|
84887
85978
|
instance
|
|
84888
85979
|
});
|
|
84889
|
-
|
|
85980
|
+
const schema = exports_external2.object({
|
|
84890
85981
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the custom deployment in"),
|
|
84891
85982
|
name: exports_external2.string().describe("Name of the custom deployment"),
|
|
84892
85983
|
imageTag: exports_external2.string().describe("The tag of the Docker image"),
|
|
@@ -84898,26 +85989,28 @@ var platformCustomDeploymentCreate = (server, env3, pat) => {
|
|
|
84898
85989
|
region: exports_external2.string().describe("Region for the custom deployment"),
|
|
84899
85990
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the custom deployment (DEDICATED or SHARED)"),
|
|
84900
85991
|
size: exports_external2.enum(["SMALL", "MEDIUM", "LARGE"]).describe("Size of the custom deployment")
|
|
84901
|
-
}
|
|
85992
|
+
});
|
|
85993
|
+
server.tool("platform-custom-deployment-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
85994
|
+
const parsed = schema.parse(params);
|
|
84902
85995
|
const customDeployment = await client.customDeployment.create({
|
|
84903
|
-
applicationUniqueName:
|
|
84904
|
-
name:
|
|
84905
|
-
imageTag:
|
|
84906
|
-
imageName:
|
|
84907
|
-
imageRepository:
|
|
84908
|
-
port:
|
|
84909
|
-
environmentVariables:
|
|
84910
|
-
provider:
|
|
84911
|
-
region:
|
|
84912
|
-
type:
|
|
84913
|
-
size:
|
|
85996
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
85997
|
+
name: parsed.name,
|
|
85998
|
+
imageTag: parsed.imageTag,
|
|
85999
|
+
imageName: parsed.imageName,
|
|
86000
|
+
imageRepository: parsed.imageRepository,
|
|
86001
|
+
port: parsed.port,
|
|
86002
|
+
environmentVariables: parsed.environmentVariables,
|
|
86003
|
+
provider: parsed.provider,
|
|
86004
|
+
region: parsed.region,
|
|
86005
|
+
type: parsed.type,
|
|
86006
|
+
size: parsed.size
|
|
84914
86007
|
});
|
|
84915
86008
|
return {
|
|
84916
86009
|
content: [
|
|
84917
86010
|
{
|
|
84918
86011
|
type: "text",
|
|
84919
86012
|
name: "Custom Deployment Created",
|
|
84920
|
-
description: `Created custom deployment: ${
|
|
86013
|
+
description: `Created custom deployment: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
84921
86014
|
mimeType: "application/json",
|
|
84922
86015
|
text: JSON.stringify(customDeployment, null, 2)
|
|
84923
86016
|
}
|
|
@@ -84936,17 +86029,19 @@ var platformCustomDeploymentEdit = (server, env3, pat) => {
|
|
|
84936
86029
|
accessToken: pat,
|
|
84937
86030
|
instance
|
|
84938
86031
|
});
|
|
84939
|
-
|
|
86032
|
+
const schema = exports_external2.object({
|
|
84940
86033
|
customDeploymentUniqueName: exports_external2.string().describe("Unique name of the custom deployment to edit"),
|
|
84941
86034
|
imageTag: exports_external2.string().describe("The new tag of the Docker image")
|
|
84942
|
-
}
|
|
84943
|
-
|
|
86035
|
+
});
|
|
86036
|
+
server.tool("platform-custom-deployment-edit", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86037
|
+
const { customDeploymentUniqueName, imageTag } = schema.parse(params);
|
|
86038
|
+
const customDeployment = await client.customDeployment.update(customDeploymentUniqueName, imageTag);
|
|
84944
86039
|
return {
|
|
84945
86040
|
content: [
|
|
84946
86041
|
{
|
|
84947
86042
|
type: "text",
|
|
84948
86043
|
name: "Custom Deployment Updated",
|
|
84949
|
-
description: `Updated custom deployment: ${
|
|
86044
|
+
description: `Updated custom deployment: ${customDeploymentUniqueName} to tag: ${imageTag}`,
|
|
84950
86045
|
mimeType: "application/json",
|
|
84951
86046
|
text: JSON.stringify(customDeployment, null, 2)
|
|
84952
86047
|
}
|
|
@@ -84965,16 +86060,18 @@ var platformCustomDeploymentList = (server, env3, pat) => {
|
|
|
84965
86060
|
accessToken: pat,
|
|
84966
86061
|
instance
|
|
84967
86062
|
});
|
|
84968
|
-
|
|
86063
|
+
const schema = exports_external2.object({
|
|
84969
86064
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list custom deployments from")
|
|
84970
|
-
}
|
|
84971
|
-
|
|
86065
|
+
});
|
|
86066
|
+
server.tool("platform-custom-deployment-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86067
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86068
|
+
const customDeployments = await client.customDeployment.list(applicationUniqueName);
|
|
84972
86069
|
return {
|
|
84973
86070
|
content: [
|
|
84974
86071
|
{
|
|
84975
86072
|
type: "text",
|
|
84976
86073
|
name: "Custom Deployment List",
|
|
84977
|
-
description: `List of custom deployments in application: ${
|
|
86074
|
+
description: `List of custom deployments in application: ${applicationUniqueName}`,
|
|
84978
86075
|
mimeType: "application/json",
|
|
84979
86076
|
text: JSON.stringify(customDeployments, null, 2)
|
|
84980
86077
|
}
|
|
@@ -84993,16 +86090,18 @@ var platformCustomDeploymentRead = (server, env3, pat) => {
|
|
|
84993
86090
|
accessToken: pat,
|
|
84994
86091
|
instance
|
|
84995
86092
|
});
|
|
84996
|
-
|
|
86093
|
+
const schema = exports_external2.object({
|
|
84997
86094
|
customDeploymentUniqueName: exports_external2.string().describe("Unique name of the custom deployment to read")
|
|
84998
|
-
}
|
|
84999
|
-
|
|
86095
|
+
});
|
|
86096
|
+
server.tool("platform-custom-deployment-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86097
|
+
const { customDeploymentUniqueName } = schema.parse(params);
|
|
86098
|
+
const customDeployment = await client.customDeployment.read(customDeploymentUniqueName);
|
|
85000
86099
|
return {
|
|
85001
86100
|
content: [
|
|
85002
86101
|
{
|
|
85003
86102
|
type: "text",
|
|
85004
86103
|
name: "Custom Deployment Details",
|
|
85005
|
-
description: `Details for custom deployment: ${
|
|
86104
|
+
description: `Details for custom deployment: ${customDeploymentUniqueName}`,
|
|
85006
86105
|
mimeType: "application/json",
|
|
85007
86106
|
text: JSON.stringify(customDeployment, null, 2)
|
|
85008
86107
|
}
|
|
@@ -85021,16 +86120,18 @@ var platformCustomDeploymentRestart = (server, env3, pat) => {
|
|
|
85021
86120
|
accessToken: pat,
|
|
85022
86121
|
instance
|
|
85023
86122
|
});
|
|
85024
|
-
|
|
86123
|
+
const schema = exports_external2.object({
|
|
85025
86124
|
customDeploymentUniqueName: exports_external2.string().describe("Unique name of the custom deployment to restart")
|
|
85026
|
-
}
|
|
85027
|
-
|
|
86125
|
+
});
|
|
86126
|
+
server.tool("platform-custom-deployment-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86127
|
+
const { customDeploymentUniqueName } = schema.parse(params);
|
|
86128
|
+
const customDeployment = await client.customDeployment.restart(customDeploymentUniqueName);
|
|
85028
86129
|
return {
|
|
85029
86130
|
content: [
|
|
85030
86131
|
{
|
|
85031
86132
|
type: "text",
|
|
85032
86133
|
name: "Custom Deployment Restarted",
|
|
85033
|
-
description: `Restarted custom deployment: ${
|
|
86134
|
+
description: `Restarted custom deployment: ${customDeploymentUniqueName}`,
|
|
85034
86135
|
mimeType: "application/json",
|
|
85035
86136
|
text: JSON.stringify(customDeployment, null, 2)
|
|
85036
86137
|
}
|
|
@@ -85049,7 +86150,7 @@ var platformInsightsCreate = (server, env3, pat) => {
|
|
|
85049
86150
|
accessToken: pat,
|
|
85050
86151
|
instance
|
|
85051
86152
|
});
|
|
85052
|
-
|
|
86153
|
+
const schema = exports_external2.object({
|
|
85053
86154
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the insights in"),
|
|
85054
86155
|
name: exports_external2.string().describe("Name of the insights"),
|
|
85055
86156
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the insights (DEDICATED or SHARED)"),
|
|
@@ -85059,27 +86160,29 @@ var platformInsightsCreate = (server, env3, pat) => {
|
|
|
85059
86160
|
insightsCategory: exports_external2.enum(["BLOCKCHAIN_EXPLORER", "HYPERLEDGER_EXPLORER", "OTTERSCAN_BLOCKCHAIN_EXPLORER"]).describe("Category of insights"),
|
|
85060
86161
|
blockchainNodeUniqueName: exports_external2.string().optional().describe("Unique name of the blockchain node to connect to (mutually exclusive with loadBalancerUniqueName)"),
|
|
85061
86162
|
loadBalancerUniqueName: exports_external2.string().optional().describe("Unique name of the load balancer to connect to (mutually exclusive with blockchainNodeUniqueName), prefer using a load balancer if available")
|
|
85062
|
-
}
|
|
85063
|
-
|
|
86163
|
+
});
|
|
86164
|
+
server.tool("platform-insights-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86165
|
+
const parsed = schema.parse(params);
|
|
86166
|
+
if (parsed.blockchainNodeUniqueName && parsed.loadBalancerUniqueName) {
|
|
85064
86167
|
throw new Error("Only one of 'blockchainNodeUniqueName' and 'loadBalancerUniqueName' may be provided");
|
|
85065
86168
|
}
|
|
85066
86169
|
const insights = await client.insights.create({
|
|
85067
|
-
applicationUniqueName:
|
|
85068
|
-
name:
|
|
85069
|
-
type:
|
|
85070
|
-
size:
|
|
85071
|
-
provider:
|
|
85072
|
-
region:
|
|
85073
|
-
insightsCategory:
|
|
85074
|
-
blockchainNodeUniqueName:
|
|
85075
|
-
loadBalancerUniqueName:
|
|
86170
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86171
|
+
name: parsed.name,
|
|
86172
|
+
type: parsed.type,
|
|
86173
|
+
size: parsed.size,
|
|
86174
|
+
provider: parsed.provider,
|
|
86175
|
+
region: parsed.region,
|
|
86176
|
+
insightsCategory: parsed.insightsCategory,
|
|
86177
|
+
blockchainNodeUniqueName: parsed.blockchainNodeUniqueName,
|
|
86178
|
+
loadBalancerUniqueName: parsed.loadBalancerUniqueName
|
|
85076
86179
|
});
|
|
85077
86180
|
return {
|
|
85078
86181
|
content: [
|
|
85079
86182
|
{
|
|
85080
86183
|
type: "text",
|
|
85081
86184
|
name: "Insights Created",
|
|
85082
|
-
description: `Created insights: ${
|
|
86185
|
+
description: `Created insights: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85083
86186
|
mimeType: "application/json",
|
|
85084
86187
|
text: JSON.stringify(insights, null, 2)
|
|
85085
86188
|
}
|
|
@@ -85098,16 +86201,18 @@ var platformInsightsList = (server, env3, pat) => {
|
|
|
85098
86201
|
accessToken: pat,
|
|
85099
86202
|
instance
|
|
85100
86203
|
});
|
|
85101
|
-
|
|
86204
|
+
const schema = exports_external2.object({
|
|
85102
86205
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list insights from")
|
|
85103
|
-
}
|
|
85104
|
-
|
|
86206
|
+
});
|
|
86207
|
+
server.tool("platform-insights-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86208
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86209
|
+
const insightsList2 = await client.insights.list(applicationUniqueName);
|
|
85105
86210
|
return {
|
|
85106
86211
|
content: [
|
|
85107
86212
|
{
|
|
85108
86213
|
type: "text",
|
|
85109
86214
|
name: "Insights List",
|
|
85110
|
-
description: `List of insights in application: ${
|
|
86215
|
+
description: `List of insights in application: ${applicationUniqueName}`,
|
|
85111
86216
|
mimeType: "application/json",
|
|
85112
86217
|
text: JSON.stringify(insightsList2, null, 2)
|
|
85113
86218
|
}
|
|
@@ -85126,16 +86231,18 @@ var platformInsightsRead = (server, env3, pat) => {
|
|
|
85126
86231
|
accessToken: pat,
|
|
85127
86232
|
instance
|
|
85128
86233
|
});
|
|
85129
|
-
|
|
86234
|
+
const schema = exports_external2.object({
|
|
85130
86235
|
insightsUniqueName: exports_external2.string().describe("Unique name of the insights to read")
|
|
85131
|
-
}
|
|
85132
|
-
|
|
86236
|
+
});
|
|
86237
|
+
server.tool("platform-insights-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86238
|
+
const { insightsUniqueName } = schema.parse(params);
|
|
86239
|
+
const insights = await client.insights.read(insightsUniqueName);
|
|
85133
86240
|
return {
|
|
85134
86241
|
content: [
|
|
85135
86242
|
{
|
|
85136
86243
|
type: "text",
|
|
85137
86244
|
name: "Insights Details",
|
|
85138
|
-
description: `Details for insights: ${
|
|
86245
|
+
description: `Details for insights: ${insightsUniqueName}`,
|
|
85139
86246
|
mimeType: "application/json",
|
|
85140
86247
|
text: JSON.stringify(insights, null, 2)
|
|
85141
86248
|
}
|
|
@@ -85154,16 +86261,18 @@ var platformInsightsRestart = (server, env3, pat) => {
|
|
|
85154
86261
|
accessToken: pat,
|
|
85155
86262
|
instance
|
|
85156
86263
|
});
|
|
85157
|
-
|
|
86264
|
+
const schema = exports_external2.object({
|
|
85158
86265
|
insightsUniqueName: exports_external2.string().describe("Unique name of the insights to restart")
|
|
85159
|
-
}
|
|
85160
|
-
|
|
86266
|
+
});
|
|
86267
|
+
server.tool("platform-insights-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86268
|
+
const { insightsUniqueName } = schema.parse(params);
|
|
86269
|
+
const insights = await client.insights.restart(insightsUniqueName);
|
|
85161
86270
|
return {
|
|
85162
86271
|
content: [
|
|
85163
86272
|
{
|
|
85164
86273
|
type: "text",
|
|
85165
86274
|
name: "Insights Restarted",
|
|
85166
|
-
description: `Restarted insights: ${
|
|
86275
|
+
description: `Restarted insights: ${insightsUniqueName}`,
|
|
85167
86276
|
mimeType: "application/json",
|
|
85168
86277
|
text: JSON.stringify(insights, null, 2)
|
|
85169
86278
|
}
|
|
@@ -85182,7 +86291,7 @@ var platformIntegrationToolCreate = (server, env3, pat) => {
|
|
|
85182
86291
|
accessToken: pat,
|
|
85183
86292
|
instance
|
|
85184
86293
|
});
|
|
85185
|
-
|
|
86294
|
+
const schema = exports_external2.object({
|
|
85186
86295
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the integration tool in"),
|
|
85187
86296
|
name: exports_external2.string().describe("Name of the integration tool"),
|
|
85188
86297
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the integration tool (DEDICATED or SHARED)"),
|
|
@@ -85190,22 +86299,24 @@ var platformIntegrationToolCreate = (server, env3, pat) => {
|
|
|
85190
86299
|
provider: exports_external2.string().describe("Provider for the integration tool"),
|
|
85191
86300
|
region: exports_external2.string().describe("Region for the integration tool"),
|
|
85192
86301
|
integrationType: exports_external2.enum(["CHAINLINK", "HASURA", "INTEGRATION_STUDIO"]).describe("Type of integration")
|
|
85193
|
-
}
|
|
86302
|
+
});
|
|
86303
|
+
server.tool("platform-integration-tool-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86304
|
+
const parsed = schema.parse(params);
|
|
85194
86305
|
const integrationTool = await client.integrationTool.create({
|
|
85195
|
-
applicationUniqueName:
|
|
85196
|
-
name:
|
|
85197
|
-
type:
|
|
85198
|
-
size:
|
|
85199
|
-
provider:
|
|
85200
|
-
region:
|
|
85201
|
-
integrationType:
|
|
86306
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86307
|
+
name: parsed.name,
|
|
86308
|
+
type: parsed.type,
|
|
86309
|
+
size: parsed.size,
|
|
86310
|
+
provider: parsed.provider,
|
|
86311
|
+
region: parsed.region,
|
|
86312
|
+
integrationType: parsed.integrationType
|
|
85202
86313
|
});
|
|
85203
86314
|
return {
|
|
85204
86315
|
content: [
|
|
85205
86316
|
{
|
|
85206
86317
|
type: "text",
|
|
85207
86318
|
name: "Integration Tool Created",
|
|
85208
|
-
description: `Created integration tool: ${
|
|
86319
|
+
description: `Created integration tool: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85209
86320
|
mimeType: "application/json",
|
|
85210
86321
|
text: JSON.stringify(integrationTool, null, 2)
|
|
85211
86322
|
}
|
|
@@ -85224,16 +86335,18 @@ var platformIntegrationToolList = (server, env3, pat) => {
|
|
|
85224
86335
|
accessToken: pat,
|
|
85225
86336
|
instance
|
|
85226
86337
|
});
|
|
85227
|
-
|
|
86338
|
+
const schema = exports_external2.object({
|
|
85228
86339
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list integration tools from")
|
|
85229
|
-
}
|
|
85230
|
-
|
|
86340
|
+
});
|
|
86341
|
+
server.tool("platform-integration-tool-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86342
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86343
|
+
const integrationTools = await client.integrationTool.list(applicationUniqueName);
|
|
85231
86344
|
return {
|
|
85232
86345
|
content: [
|
|
85233
86346
|
{
|
|
85234
86347
|
type: "text",
|
|
85235
86348
|
name: "Integration Tool List",
|
|
85236
|
-
description: `List of integration tools in application: ${
|
|
86349
|
+
description: `List of integration tools in application: ${applicationUniqueName}`,
|
|
85237
86350
|
mimeType: "application/json",
|
|
85238
86351
|
text: JSON.stringify(integrationTools, null, 2)
|
|
85239
86352
|
}
|
|
@@ -85252,16 +86365,18 @@ var platformIntegrationToolRead = (server, env3, pat) => {
|
|
|
85252
86365
|
accessToken: pat,
|
|
85253
86366
|
instance
|
|
85254
86367
|
});
|
|
85255
|
-
|
|
86368
|
+
const schema = exports_external2.object({
|
|
85256
86369
|
integrationToolUniqueName: exports_external2.string().describe("Unique name of the integration tool to read")
|
|
85257
|
-
}
|
|
85258
|
-
|
|
86370
|
+
});
|
|
86371
|
+
server.tool("platform-integration-tool-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86372
|
+
const { integrationToolUniqueName } = schema.parse(params);
|
|
86373
|
+
const integrationTool = await client.integrationTool.read(integrationToolUniqueName);
|
|
85259
86374
|
return {
|
|
85260
86375
|
content: [
|
|
85261
86376
|
{
|
|
85262
86377
|
type: "text",
|
|
85263
86378
|
name: "Integration Tool Details",
|
|
85264
|
-
description: `Details for integration tool: ${
|
|
86379
|
+
description: `Details for integration tool: ${integrationToolUniqueName}`,
|
|
85265
86380
|
mimeType: "application/json",
|
|
85266
86381
|
text: JSON.stringify(integrationTool, null, 2)
|
|
85267
86382
|
}
|
|
@@ -85280,16 +86395,18 @@ var platformIntegrationToolRestart = (server, env3, pat) => {
|
|
|
85280
86395
|
accessToken: pat,
|
|
85281
86396
|
instance
|
|
85282
86397
|
});
|
|
85283
|
-
|
|
86398
|
+
const schema = exports_external2.object({
|
|
85284
86399
|
integrationToolUniqueName: exports_external2.string().describe("Unique name of the integration tool to restart")
|
|
85285
|
-
}
|
|
85286
|
-
|
|
86400
|
+
});
|
|
86401
|
+
server.tool("platform-integration-tool-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86402
|
+
const { integrationToolUniqueName } = schema.parse(params);
|
|
86403
|
+
const integrationTool = await client.integrationTool.restart(integrationToolUniqueName);
|
|
85287
86404
|
return {
|
|
85288
86405
|
content: [
|
|
85289
86406
|
{
|
|
85290
86407
|
type: "text",
|
|
85291
86408
|
name: "Integration Tool Restarted",
|
|
85292
|
-
description: `Restarted integration tool: ${
|
|
86409
|
+
description: `Restarted integration tool: ${integrationToolUniqueName}`,
|
|
85293
86410
|
mimeType: "application/json",
|
|
85294
86411
|
text: JSON.stringify(integrationTool, null, 2)
|
|
85295
86412
|
}
|
|
@@ -85308,7 +86425,7 @@ var platformLoadBalancerCreate = (server, env3, pat) => {
|
|
|
85308
86425
|
accessToken: pat,
|
|
85309
86426
|
instance
|
|
85310
86427
|
});
|
|
85311
|
-
|
|
86428
|
+
const schema = exports_external2.object({
|
|
85312
86429
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the load balancer in"),
|
|
85313
86430
|
name: exports_external2.string().describe("Name of the load balancer"),
|
|
85314
86431
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the load balancer (DEDICATED or SHARED)"),
|
|
@@ -85317,23 +86434,25 @@ var platformLoadBalancerCreate = (server, env3, pat) => {
|
|
|
85317
86434
|
region: exports_external2.string().describe("Region for the load balancer"),
|
|
85318
86435
|
blockchainNetworkUniqueName: exports_external2.string().describe("Unique name of the blockchain network for the load balancer"),
|
|
85319
86436
|
connectedNodesUniqueNames: exports_external2.array(exports_external2.string()).describe("Unique names of the nodes to connect to the load balancer")
|
|
85320
|
-
}
|
|
86437
|
+
});
|
|
86438
|
+
server.tool("platform-load-balancer-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86439
|
+
const parsed = schema.parse(params);
|
|
85321
86440
|
const loadBalancer = await client.loadBalancer.create({
|
|
85322
|
-
applicationUniqueName:
|
|
85323
|
-
name:
|
|
85324
|
-
type:
|
|
85325
|
-
size:
|
|
85326
|
-
provider:
|
|
85327
|
-
region:
|
|
85328
|
-
blockchainNetworkUniqueName:
|
|
85329
|
-
connectedNodesUniqueNames:
|
|
86441
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86442
|
+
name: parsed.name,
|
|
86443
|
+
type: parsed.type,
|
|
86444
|
+
size: parsed.size,
|
|
86445
|
+
provider: parsed.provider,
|
|
86446
|
+
region: parsed.region,
|
|
86447
|
+
blockchainNetworkUniqueName: parsed.blockchainNetworkUniqueName,
|
|
86448
|
+
connectedNodesUniqueNames: parsed.connectedNodesUniqueNames
|
|
85330
86449
|
});
|
|
85331
86450
|
return {
|
|
85332
86451
|
content: [
|
|
85333
86452
|
{
|
|
85334
86453
|
type: "text",
|
|
85335
86454
|
name: "Load Balancer Created",
|
|
85336
|
-
description: `Created load balancer: ${
|
|
86455
|
+
description: `Created load balancer: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85337
86456
|
mimeType: "application/json",
|
|
85338
86457
|
text: JSON.stringify(loadBalancer, null, 2)
|
|
85339
86458
|
}
|
|
@@ -85352,16 +86471,18 @@ var platformLoadBalancerList = (server, env3, pat) => {
|
|
|
85352
86471
|
accessToken: pat,
|
|
85353
86472
|
instance
|
|
85354
86473
|
});
|
|
85355
|
-
|
|
86474
|
+
const schema = exports_external2.object({
|
|
85356
86475
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list load balancers from")
|
|
85357
|
-
}
|
|
85358
|
-
|
|
86476
|
+
});
|
|
86477
|
+
server.tool("platform-load-balancer-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86478
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86479
|
+
const loadBalancers = await client.loadBalancer.list(applicationUniqueName);
|
|
85359
86480
|
return {
|
|
85360
86481
|
content: [
|
|
85361
86482
|
{
|
|
85362
86483
|
type: "text",
|
|
85363
86484
|
name: "Load Balancer List",
|
|
85364
|
-
description: `List of load balancers in application: ${
|
|
86485
|
+
description: `List of load balancers in application: ${applicationUniqueName}`,
|
|
85365
86486
|
mimeType: "application/json",
|
|
85366
86487
|
text: JSON.stringify(loadBalancers, null, 2)
|
|
85367
86488
|
}
|
|
@@ -85380,16 +86501,18 @@ var platformLoadBalancerRead = (server, env3, pat) => {
|
|
|
85380
86501
|
accessToken: pat,
|
|
85381
86502
|
instance
|
|
85382
86503
|
});
|
|
85383
|
-
|
|
86504
|
+
const schema = exports_external2.object({
|
|
85384
86505
|
loadBalancerUniqueName: exports_external2.string().describe("Unique name of the load balancer to read")
|
|
85385
|
-
}
|
|
85386
|
-
|
|
86506
|
+
});
|
|
86507
|
+
server.tool("platform-load-balancer-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86508
|
+
const { loadBalancerUniqueName } = schema.parse(params);
|
|
86509
|
+
const loadBalancer = await client.loadBalancer.read(loadBalancerUniqueName);
|
|
85387
86510
|
return {
|
|
85388
86511
|
content: [
|
|
85389
86512
|
{
|
|
85390
86513
|
type: "text",
|
|
85391
86514
|
name: "Load Balancer Details",
|
|
85392
|
-
description: `Details for load balancer: ${
|
|
86515
|
+
description: `Details for load balancer: ${loadBalancerUniqueName}`,
|
|
85393
86516
|
mimeType: "application/json",
|
|
85394
86517
|
text: JSON.stringify(loadBalancer, null, 2)
|
|
85395
86518
|
}
|
|
@@ -85408,16 +86531,18 @@ var platformLoadBalancerRestart = (server, env3, pat) => {
|
|
|
85408
86531
|
accessToken: pat,
|
|
85409
86532
|
instance
|
|
85410
86533
|
});
|
|
85411
|
-
|
|
86534
|
+
const schema = exports_external2.object({
|
|
85412
86535
|
loadBalancerUniqueName: exports_external2.string().describe("Unique name of the load balancer to restart")
|
|
85413
|
-
}
|
|
85414
|
-
|
|
86536
|
+
});
|
|
86537
|
+
server.tool("platform-load-balancer-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86538
|
+
const { loadBalancerUniqueName } = schema.parse(params);
|
|
86539
|
+
const loadBalancer = await client.loadBalancer.restart(loadBalancerUniqueName);
|
|
85415
86540
|
return {
|
|
85416
86541
|
content: [
|
|
85417
86542
|
{
|
|
85418
86543
|
type: "text",
|
|
85419
86544
|
name: "Load Balancer Restarted",
|
|
85420
|
-
description: `Restarted load balancer: ${
|
|
86545
|
+
description: `Restarted load balancer: ${loadBalancerUniqueName}`,
|
|
85421
86546
|
mimeType: "application/json",
|
|
85422
86547
|
text: JSON.stringify(loadBalancer, null, 2)
|
|
85423
86548
|
}
|
|
@@ -85436,7 +86561,7 @@ var platformMiddlewareCreate = (server, env3, pat) => {
|
|
|
85436
86561
|
accessToken: pat,
|
|
85437
86562
|
instance
|
|
85438
86563
|
});
|
|
85439
|
-
|
|
86564
|
+
const schema = exports_external2.object({
|
|
85440
86565
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the middleware in"),
|
|
85441
86566
|
name: exports_external2.string().describe("Name of the middleware"),
|
|
85442
86567
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the middleware (DEDICATED or SHARED)"),
|
|
@@ -85446,27 +86571,29 @@ var platformMiddlewareCreate = (server, env3, pat) => {
|
|
|
85446
86571
|
interface: exports_external2.enum(["ATTESTATION_INDEXER", "BESU", "FIREFLY_FABCONNECT", "GRAPH", "HA_GRAPH", "SMART_CONTRACT_PORTAL"]).describe("Interface type for the middleware"),
|
|
85447
86572
|
blockchainNodeUniqueName: exports_external2.string().optional().describe("Unique name of the blockchain node to connect to (mutually exclusive with loadBalancerUniqueName), preferred option for interface SMART_CONTRACT_PORTAL"),
|
|
85448
86573
|
loadBalancerUniqueName: exports_external2.string().optional().describe("Unique name of the load balancer to connect to (mutually exclusive with blockchainNodeUniqueName), preferred option for all other interfaces")
|
|
85449
|
-
}
|
|
85450
|
-
|
|
86574
|
+
});
|
|
86575
|
+
server.tool("platform-middleware-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86576
|
+
const parsed = schema.parse(params);
|
|
86577
|
+
if (parsed.blockchainNodeUniqueName && parsed.loadBalancerUniqueName) {
|
|
85451
86578
|
throw new Error("Only one of 'blockchainNodeUniqueName' and 'loadBalancerUniqueName' may be provided");
|
|
85452
86579
|
}
|
|
85453
86580
|
const middleware = await client.middleware.create({
|
|
85454
|
-
applicationUniqueName:
|
|
85455
|
-
name:
|
|
85456
|
-
type:
|
|
85457
|
-
size:
|
|
85458
|
-
provider:
|
|
85459
|
-
region:
|
|
85460
|
-
interface:
|
|
85461
|
-
blockchainNodeUniqueName:
|
|
85462
|
-
loadBalancerUniqueName:
|
|
86581
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86582
|
+
name: parsed.name,
|
|
86583
|
+
type: parsed.type,
|
|
86584
|
+
size: parsed.size,
|
|
86585
|
+
provider: parsed.provider,
|
|
86586
|
+
region: parsed.region,
|
|
86587
|
+
interface: parsed.interface,
|
|
86588
|
+
blockchainNodeUniqueName: parsed.blockchainNodeUniqueName,
|
|
86589
|
+
loadBalancerUniqueName: parsed.loadBalancerUniqueName
|
|
85463
86590
|
});
|
|
85464
86591
|
return {
|
|
85465
86592
|
content: [
|
|
85466
86593
|
{
|
|
85467
86594
|
type: "text",
|
|
85468
86595
|
name: "Middleware Created",
|
|
85469
|
-
description: `Created middleware: ${
|
|
86596
|
+
description: `Created middleware: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85470
86597
|
mimeType: "application/json",
|
|
85471
86598
|
text: JSON.stringify(middleware, null, 2)
|
|
85472
86599
|
}
|
|
@@ -85485,16 +86612,18 @@ var platformMiddlewareList = (server, env3, pat) => {
|
|
|
85485
86612
|
accessToken: pat,
|
|
85486
86613
|
instance
|
|
85487
86614
|
});
|
|
85488
|
-
|
|
86615
|
+
const schema = exports_external2.object({
|
|
85489
86616
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list middleware from")
|
|
85490
|
-
}
|
|
85491
|
-
|
|
86617
|
+
});
|
|
86618
|
+
server.tool("platform-middleware-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86619
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86620
|
+
const middlewareList2 = await client.middleware.list(applicationUniqueName);
|
|
85492
86621
|
return {
|
|
85493
86622
|
content: [
|
|
85494
86623
|
{
|
|
85495
86624
|
type: "text",
|
|
85496
86625
|
name: "Middleware List",
|
|
85497
|
-
description: `List of middleware in application: ${
|
|
86626
|
+
description: `List of middleware in application: ${applicationUniqueName}`,
|
|
85498
86627
|
mimeType: "application/json",
|
|
85499
86628
|
text: JSON.stringify(middlewareList2, null, 2)
|
|
85500
86629
|
}
|
|
@@ -85513,16 +86642,18 @@ var platformMiddlewareRead = (server, env3, pat) => {
|
|
|
85513
86642
|
accessToken: pat,
|
|
85514
86643
|
instance
|
|
85515
86644
|
});
|
|
85516
|
-
|
|
86645
|
+
const schema = exports_external2.object({
|
|
85517
86646
|
middlewareUniqueName: exports_external2.string().describe("Unique name of the middleware to read")
|
|
85518
|
-
}
|
|
85519
|
-
|
|
86647
|
+
});
|
|
86648
|
+
server.tool("platform-middleware-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86649
|
+
const { middlewareUniqueName } = schema.parse(params);
|
|
86650
|
+
const middleware = await client.middleware.read(middlewareUniqueName);
|
|
85520
86651
|
return {
|
|
85521
86652
|
content: [
|
|
85522
86653
|
{
|
|
85523
86654
|
type: "text",
|
|
85524
86655
|
name: "Middleware Details",
|
|
85525
|
-
description: `Details for middleware: ${
|
|
86656
|
+
description: `Details for middleware: ${middlewareUniqueName}`,
|
|
85526
86657
|
mimeType: "application/json",
|
|
85527
86658
|
text: JSON.stringify(middleware, null, 2)
|
|
85528
86659
|
}
|
|
@@ -85541,16 +86672,18 @@ var platformMiddlewareRestart = (server, env3, pat) => {
|
|
|
85541
86672
|
accessToken: pat,
|
|
85542
86673
|
instance
|
|
85543
86674
|
});
|
|
85544
|
-
|
|
86675
|
+
const schema = exports_external2.object({
|
|
85545
86676
|
middlewareUniqueName: exports_external2.string().describe("Unique name of the middleware to restart")
|
|
85546
|
-
}
|
|
85547
|
-
|
|
86677
|
+
});
|
|
86678
|
+
server.tool("platform-middleware-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86679
|
+
const { middlewareUniqueName } = schema.parse(params);
|
|
86680
|
+
const middleware = await client.middleware.restart(middlewareUniqueName);
|
|
85548
86681
|
return {
|
|
85549
86682
|
content: [
|
|
85550
86683
|
{
|
|
85551
86684
|
type: "text",
|
|
85552
86685
|
name: "Middleware Restarted",
|
|
85553
|
-
description: `Restarted middleware: ${
|
|
86686
|
+
description: `Restarted middleware: ${middlewareUniqueName}`,
|
|
85554
86687
|
mimeType: "application/json",
|
|
85555
86688
|
text: JSON.stringify(middleware, null, 2)
|
|
85556
86689
|
}
|
|
@@ -85569,24 +86702,26 @@ var platformPrivateKeyCreate = (server, env3, pat) => {
|
|
|
85569
86702
|
accessToken: pat,
|
|
85570
86703
|
instance
|
|
85571
86704
|
});
|
|
85572
|
-
|
|
86705
|
+
const schema = exports_external2.object({
|
|
85573
86706
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the private key in"),
|
|
85574
86707
|
name: exports_external2.string().describe("Name of the private key"),
|
|
85575
86708
|
privateKeyType: exports_external2.enum(["ACCESSIBLE_ECDSA_P256", "HD_ECDSA_P256", "HSM_ECDSA_P256"]).describe("Type of private key"),
|
|
85576
86709
|
blockchainNodeUniqueNames: exports_external2.array(exports_external2.string()).optional().describe("Unique names of blockchain nodes to associate with the private key")
|
|
85577
|
-
}
|
|
86710
|
+
});
|
|
86711
|
+
server.tool("platform-private-key-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86712
|
+
const parsed = schema.parse(params);
|
|
85578
86713
|
const privateKey = await client.privateKey.create({
|
|
85579
|
-
applicationUniqueName:
|
|
85580
|
-
name:
|
|
85581
|
-
privateKeyType:
|
|
85582
|
-
blockchainNodeUniqueNames:
|
|
86714
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86715
|
+
name: parsed.name,
|
|
86716
|
+
privateKeyType: parsed.privateKeyType,
|
|
86717
|
+
blockchainNodeUniqueNames: parsed.blockchainNodeUniqueNames
|
|
85583
86718
|
});
|
|
85584
86719
|
return {
|
|
85585
86720
|
content: [
|
|
85586
86721
|
{
|
|
85587
86722
|
type: "text",
|
|
85588
86723
|
name: "Private Key Created",
|
|
85589
|
-
description: `Created private key: ${
|
|
86724
|
+
description: `Created private key: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85590
86725
|
mimeType: "application/json",
|
|
85591
86726
|
text: JSON.stringify(privateKey, null, 2)
|
|
85592
86727
|
}
|
|
@@ -85605,16 +86740,18 @@ var platformPrivateKeyList = (server, env3, pat) => {
|
|
|
85605
86740
|
accessToken: pat,
|
|
85606
86741
|
instance
|
|
85607
86742
|
});
|
|
85608
|
-
|
|
86743
|
+
const schema = exports_external2.object({
|
|
85609
86744
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list private keys from")
|
|
85610
|
-
}
|
|
85611
|
-
|
|
86745
|
+
});
|
|
86746
|
+
server.tool("platform-private-key-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86747
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86748
|
+
const privateKeys = await client.privateKey.list(applicationUniqueName);
|
|
85612
86749
|
return {
|
|
85613
86750
|
content: [
|
|
85614
86751
|
{
|
|
85615
86752
|
type: "text",
|
|
85616
86753
|
name: "Private Key List",
|
|
85617
|
-
description: `List of private keys in application: ${
|
|
86754
|
+
description: `List of private keys in application: ${applicationUniqueName}`,
|
|
85618
86755
|
mimeType: "application/json",
|
|
85619
86756
|
text: JSON.stringify(privateKeys, null, 2)
|
|
85620
86757
|
}
|
|
@@ -85633,16 +86770,18 @@ var platformPrivateKeyRead = (server, env3, pat) => {
|
|
|
85633
86770
|
accessToken: pat,
|
|
85634
86771
|
instance
|
|
85635
86772
|
});
|
|
85636
|
-
|
|
86773
|
+
const schema = exports_external2.object({
|
|
85637
86774
|
privateKeyUniqueName: exports_external2.string().describe("Unique name of the private key to read")
|
|
85638
|
-
}
|
|
85639
|
-
|
|
86775
|
+
});
|
|
86776
|
+
server.tool("platform-private-key-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86777
|
+
const { privateKeyUniqueName } = schema.parse(params);
|
|
86778
|
+
const privateKey = await client.privateKey.read(privateKeyUniqueName);
|
|
85640
86779
|
return {
|
|
85641
86780
|
content: [
|
|
85642
86781
|
{
|
|
85643
86782
|
type: "text",
|
|
85644
86783
|
name: "Private Key Details",
|
|
85645
|
-
description: `Details for private key: ${
|
|
86784
|
+
description: `Details for private key: ${privateKeyUniqueName}`,
|
|
85646
86785
|
mimeType: "application/json",
|
|
85647
86786
|
text: JSON.stringify(privateKey, null, 2)
|
|
85648
86787
|
}
|
|
@@ -85661,16 +86800,18 @@ var platformPrivateKeyRestart = (server, env3, pat) => {
|
|
|
85661
86800
|
accessToken: pat,
|
|
85662
86801
|
instance
|
|
85663
86802
|
});
|
|
85664
|
-
|
|
86803
|
+
const schema = exports_external2.object({
|
|
85665
86804
|
privateKeyUniqueName: exports_external2.string().describe("Unique name of the private key to restart")
|
|
85666
|
-
}
|
|
85667
|
-
|
|
86805
|
+
});
|
|
86806
|
+
server.tool("platform-private-key-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86807
|
+
const { privateKeyUniqueName } = schema.parse(params);
|
|
86808
|
+
const privateKey = await client.privateKey.restart(privateKeyUniqueName);
|
|
85668
86809
|
return {
|
|
85669
86810
|
content: [
|
|
85670
86811
|
{
|
|
85671
86812
|
type: "text",
|
|
85672
86813
|
name: "Private Key Restarted",
|
|
85673
|
-
description: `Restarted private key: ${
|
|
86814
|
+
description: `Restarted private key: ${privateKeyUniqueName}`,
|
|
85674
86815
|
mimeType: "application/json",
|
|
85675
86816
|
text: JSON.stringify(privateKey, null, 2)
|
|
85676
86817
|
}
|
|
@@ -85689,7 +86830,7 @@ var platformStorageCreate = (server, env3, pat) => {
|
|
|
85689
86830
|
accessToken: pat,
|
|
85690
86831
|
instance
|
|
85691
86832
|
});
|
|
85692
|
-
|
|
86833
|
+
const schema = exports_external2.object({
|
|
85693
86834
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to create the storage in"),
|
|
85694
86835
|
name: exports_external2.string().describe("Name of the storage"),
|
|
85695
86836
|
type: exports_external2.enum(["DEDICATED", "SHARED"]).describe("Type of the storage (DEDICATED or SHARED)"),
|
|
@@ -85697,22 +86838,24 @@ var platformStorageCreate = (server, env3, pat) => {
|
|
|
85697
86838
|
provider: exports_external2.string().describe("Provider for the storage"),
|
|
85698
86839
|
region: exports_external2.string().describe("Region for the storage"),
|
|
85699
86840
|
storageProtocol: exports_external2.enum(["IPFS", "MINIO"]).describe("Storage protocol (IPFS or MINIO)")
|
|
85700
|
-
}
|
|
86841
|
+
});
|
|
86842
|
+
server.tool("platform-storage-create", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86843
|
+
const parsed = schema.parse(params);
|
|
85701
86844
|
const storage = await client.storage.create({
|
|
85702
|
-
applicationUniqueName:
|
|
85703
|
-
name:
|
|
85704
|
-
type:
|
|
85705
|
-
size:
|
|
85706
|
-
provider:
|
|
85707
|
-
region:
|
|
85708
|
-
storageProtocol:
|
|
86845
|
+
applicationUniqueName: parsed.applicationUniqueName,
|
|
86846
|
+
name: parsed.name,
|
|
86847
|
+
type: parsed.type,
|
|
86848
|
+
size: parsed.size,
|
|
86849
|
+
provider: parsed.provider,
|
|
86850
|
+
region: parsed.region,
|
|
86851
|
+
storageProtocol: parsed.storageProtocol
|
|
85709
86852
|
});
|
|
85710
86853
|
return {
|
|
85711
86854
|
content: [
|
|
85712
86855
|
{
|
|
85713
86856
|
type: "text",
|
|
85714
86857
|
name: "Storage Created",
|
|
85715
|
-
description: `Created storage: ${
|
|
86858
|
+
description: `Created storage: ${parsed.name} in application: ${parsed.applicationUniqueName}`,
|
|
85716
86859
|
mimeType: "application/json",
|
|
85717
86860
|
text: JSON.stringify(storage, null, 2)
|
|
85718
86861
|
}
|
|
@@ -85731,16 +86874,18 @@ var platformStorageList = (server, env3, pat) => {
|
|
|
85731
86874
|
accessToken: pat,
|
|
85732
86875
|
instance
|
|
85733
86876
|
});
|
|
85734
|
-
|
|
86877
|
+
const schema = exports_external2.object({
|
|
85735
86878
|
applicationUniqueName: exports_external2.string().describe("Unique name of the application to list storage from")
|
|
85736
|
-
}
|
|
85737
|
-
|
|
86879
|
+
});
|
|
86880
|
+
server.tool("platform-storage-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86881
|
+
const { applicationUniqueName } = schema.parse(params);
|
|
86882
|
+
const storageList2 = await client.storage.list(applicationUniqueName);
|
|
85738
86883
|
return {
|
|
85739
86884
|
content: [
|
|
85740
86885
|
{
|
|
85741
86886
|
type: "text",
|
|
85742
86887
|
name: "Storage List",
|
|
85743
|
-
description: `List of storage in application: ${
|
|
86888
|
+
description: `List of storage in application: ${applicationUniqueName}`,
|
|
85744
86889
|
mimeType: "application/json",
|
|
85745
86890
|
text: JSON.stringify(storageList2, null, 2)
|
|
85746
86891
|
}
|
|
@@ -85759,16 +86904,18 @@ var platformStorageRead = (server, env3, pat) => {
|
|
|
85759
86904
|
accessToken: pat,
|
|
85760
86905
|
instance
|
|
85761
86906
|
});
|
|
85762
|
-
|
|
86907
|
+
const schema = exports_external2.object({
|
|
85763
86908
|
storageUniqueName: exports_external2.string().describe("Unique name of the storage to read")
|
|
85764
|
-
}
|
|
85765
|
-
|
|
86909
|
+
});
|
|
86910
|
+
server.tool("platform-storage-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86911
|
+
const { storageUniqueName } = schema.parse(params);
|
|
86912
|
+
const storage = await client.storage.read(storageUniqueName);
|
|
85766
86913
|
return {
|
|
85767
86914
|
content: [
|
|
85768
86915
|
{
|
|
85769
86916
|
type: "text",
|
|
85770
86917
|
name: "Storage Details",
|
|
85771
|
-
description: `Details for storage: ${
|
|
86918
|
+
description: `Details for storage: ${storageUniqueName}`,
|
|
85772
86919
|
mimeType: "application/json",
|
|
85773
86920
|
text: JSON.stringify(storage, null, 2)
|
|
85774
86921
|
}
|
|
@@ -85787,16 +86934,18 @@ var platformStorageRestart = (server, env3, pat) => {
|
|
|
85787
86934
|
accessToken: pat,
|
|
85788
86935
|
instance
|
|
85789
86936
|
});
|
|
85790
|
-
|
|
86937
|
+
const schema = exports_external2.object({
|
|
85791
86938
|
storageUniqueName: exports_external2.string().describe("Unique name of the storage to restart")
|
|
85792
|
-
}
|
|
85793
|
-
|
|
86939
|
+
});
|
|
86940
|
+
server.tool("platform-storage-restart", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86941
|
+
const { storageUniqueName } = schema.parse(params);
|
|
86942
|
+
const storage = await client.storage.restart(storageUniqueName);
|
|
85794
86943
|
return {
|
|
85795
86944
|
content: [
|
|
85796
86945
|
{
|
|
85797
86946
|
type: "text",
|
|
85798
86947
|
name: "Storage Restarted",
|
|
85799
|
-
description: `Restarted storage: ${
|
|
86948
|
+
description: `Restarted storage: ${storageUniqueName}`,
|
|
85800
86949
|
mimeType: "application/json",
|
|
85801
86950
|
text: JSON.stringify(storage, null, 2)
|
|
85802
86951
|
}
|
|
@@ -85815,7 +86964,9 @@ var platformWorkspaceList = (server, env3, pat) => {
|
|
|
85815
86964
|
accessToken: pat,
|
|
85816
86965
|
instance
|
|
85817
86966
|
});
|
|
85818
|
-
|
|
86967
|
+
const schema = exports_external2.object({});
|
|
86968
|
+
server.tool("platform-workspace-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86969
|
+
schema.parse(params);
|
|
85819
86970
|
const workspaces = await client.workspace.list();
|
|
85820
86971
|
return {
|
|
85821
86972
|
content: [
|
|
@@ -85841,16 +86992,18 @@ var platformWorkspaceRead = (server, env3, pat) => {
|
|
|
85841
86992
|
accessToken: pat,
|
|
85842
86993
|
instance
|
|
85843
86994
|
});
|
|
85844
|
-
|
|
86995
|
+
const schema = exports_external2.object({
|
|
85845
86996
|
workspaceUniqueName: exports_external2.string().describe("Unique name of the workspace to read")
|
|
85846
|
-
}
|
|
85847
|
-
|
|
86997
|
+
});
|
|
86998
|
+
server.tool("platform-workspace-read", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
86999
|
+
const { workspaceUniqueName } = schema.parse(params);
|
|
87000
|
+
const workspace = await client.workspace.read(workspaceUniqueName);
|
|
85848
87001
|
return {
|
|
85849
87002
|
content: [
|
|
85850
87003
|
{
|
|
85851
87004
|
type: "text",
|
|
85852
87005
|
name: "Workspace Details",
|
|
85853
|
-
description: `Details for workspace: ${
|
|
87006
|
+
description: `Details for workspace: ${workspaceUniqueName}`,
|
|
85854
87007
|
mimeType: "application/json",
|
|
85855
87008
|
text: JSON.stringify(workspace, null, 2)
|
|
85856
87009
|
}
|
|
@@ -85869,7 +87022,9 @@ var portalMutation = (server, env3) => {
|
|
|
85869
87022
|
if (!accessToken) {
|
|
85870
87023
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
85871
87024
|
}
|
|
85872
|
-
|
|
87025
|
+
const schema = exports_external2.object({ mutationName: exports_external2.string() });
|
|
87026
|
+
server.tool("portal-mutation", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87027
|
+
const { mutationName } = schema.parse(params);
|
|
85873
87028
|
try {
|
|
85874
87029
|
if (!mutationName) {
|
|
85875
87030
|
return {
|
|
@@ -85940,7 +87095,9 @@ var portalMutations = (server, env3) => {
|
|
|
85940
87095
|
if (!accessToken) {
|
|
85941
87096
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
85942
87097
|
}
|
|
85943
|
-
|
|
87098
|
+
const schema = exports_external2.object({});
|
|
87099
|
+
server.tool("portal-mutations", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87100
|
+
schema.parse(params);
|
|
85944
87101
|
try {
|
|
85945
87102
|
const { mutationNames } = await fetchProcessedSchema(portalGraphqlEndpoint, accessToken);
|
|
85946
87103
|
return {
|
|
@@ -85979,7 +87136,9 @@ var portalQuery = (server, env3) => {
|
|
|
85979
87136
|
if (!accessToken) {
|
|
85980
87137
|
throw new Error("Access token not found in environment variables. Please set SETTLEMINT_ACCESS_TOKEN.");
|
|
85981
87138
|
}
|
|
85982
|
-
|
|
87139
|
+
const schema = exports_external2.object({ queryName: exports_external2.string() });
|
|
87140
|
+
server.tool("portal-query", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87141
|
+
const { queryName } = schema.parse(params);
|
|
85983
87142
|
try {
|
|
85984
87143
|
if (!queryName) {
|
|
85985
87144
|
return {
|
|
@@ -86045,10 +87204,12 @@ import fs from "node:fs/promises";
|
|
|
86045
87204
|
import path2 from "node:path";
|
|
86046
87205
|
var __dirname = "/home/runner/work/sdk/sdk/sdk/mcp/src/tools/prompts";
|
|
86047
87206
|
var promptsGet = (server, _env) => {
|
|
86048
|
-
|
|
87207
|
+
const schema = exports_external2.object({
|
|
86049
87208
|
category: exports_external2.string().describe("The prompt category (e.g., hasura, portal, thegraph, tool-usage)"),
|
|
86050
87209
|
name: exports_external2.string().describe("The name of the prompt file without extension")
|
|
86051
|
-
}
|
|
87210
|
+
});
|
|
87211
|
+
server.tool("prompts-get", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87212
|
+
const { category, name: name2 } = schema.parse(params);
|
|
86052
87213
|
try {
|
|
86053
87214
|
const promptsDir = path2.resolve(__dirname, "../../prompts");
|
|
86054
87215
|
const promptPath = path2.join(promptsDir, category, `${name2}.ts`);
|
|
@@ -86098,7 +87259,9 @@ import fs2 from "node:fs/promises";
|
|
|
86098
87259
|
import path3 from "node:path";
|
|
86099
87260
|
var __dirname = "/home/runner/work/sdk/sdk/sdk/mcp/src/tools/prompts";
|
|
86100
87261
|
var promptsList = (server, _env) => {
|
|
86101
|
-
|
|
87262
|
+
const schema = exports_external2.object({});
|
|
87263
|
+
server.tool("prompts-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87264
|
+
schema.parse(params);
|
|
86102
87265
|
try {
|
|
86103
87266
|
const promptsDir = path3.resolve(__dirname, "../../prompts");
|
|
86104
87267
|
const promptCategories = await fs2.readdir(promptsDir, { withFileTypes: true });
|
|
@@ -86162,9 +87325,11 @@ import fs3 from "node:fs/promises";
|
|
|
86162
87325
|
import path4 from "node:path";
|
|
86163
87326
|
var __dirname = "/home/runner/work/sdk/sdk/sdk/mcp/src/tools/resources";
|
|
86164
87327
|
var resourcesGet = (server, _env) => {
|
|
86165
|
-
|
|
87328
|
+
const schema = exports_external2.object({
|
|
86166
87329
|
name: exports_external2.string().describe("The name of the resource file without extension")
|
|
86167
|
-
}
|
|
87330
|
+
});
|
|
87331
|
+
server.tool("resources-get", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87332
|
+
const { name: name2 } = schema.parse(params);
|
|
86168
87333
|
try {
|
|
86169
87334
|
const resourcesDir = path4.resolve(__dirname, "../../resources");
|
|
86170
87335
|
const resourcePath = path4.join(resourcesDir, `${name2}.ts`);
|
|
@@ -86214,7 +87379,9 @@ import fs4 from "node:fs/promises";
|
|
|
86214
87379
|
import path5 from "node:path";
|
|
86215
87380
|
var __dirname = "/home/runner/work/sdk/sdk/sdk/mcp/src/tools/resources";
|
|
86216
87381
|
var resourcesList = (server, _env) => {
|
|
86217
|
-
|
|
87382
|
+
const schema = exports_external2.object({});
|
|
87383
|
+
server.tool("resources-list", { inputSchema: zodToJsonSchema3(schema) }, async (params) => {
|
|
87384
|
+
schema.parse(params);
|
|
86218
87385
|
try {
|
|
86219
87386
|
const resourcesDir = path5.resolve(__dirname, "../../resources");
|
|
86220
87387
|
const resourceFiles = await fs4.readdir(resourcesDir, { withFileTypes: true });
|
|
@@ -86344,4 +87511,4 @@ await main().catch((error44) => {
|
|
|
86344
87511
|
process.exit(1);
|
|
86345
87512
|
});
|
|
86346
87513
|
|
|
86347
|
-
//# debugId=
|
|
87514
|
+
//# debugId=5DEF854D6F5BE37064756E2164756E21
|