@cyanheads/git-mcp-server 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +525 -513
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14356,7 +14356,7 @@ var package_default;
|
|
|
14356
14356
|
var init_package = __esm(() => {
|
|
14357
14357
|
package_default = {
|
|
14358
14358
|
name: "@cyanheads/git-mcp-server",
|
|
14359
|
-
version: "2.6.
|
|
14359
|
+
version: "2.6.2",
|
|
14360
14360
|
mcpName: "io.github.cyanheads/git-mcp-server",
|
|
14361
14361
|
description: "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
|
|
14362
14362
|
main: "dist/index.js",
|
|
@@ -14606,16 +14606,17 @@ __export(exports_config, {
|
|
|
14606
14606
|
ConfigSchema: () => ConfigSchema
|
|
14607
14607
|
});
|
|
14608
14608
|
import { homedir } from "os";
|
|
14609
|
+
import path from "node:path";
|
|
14609
14610
|
var import_dotenv, packageManifest, hasFileSystemAccess, emptyStringAsUndefined = (val) => {
|
|
14610
14611
|
if (typeof val === "string" && val.trim() === "") {
|
|
14611
14612
|
return;
|
|
14612
14613
|
}
|
|
14613
14614
|
return val;
|
|
14614
|
-
}, expandTildePath = (
|
|
14615
|
-
if (typeof
|
|
14615
|
+
}, expandTildePath = (path2) => {
|
|
14616
|
+
if (typeof path2 !== "string" || path2.trim() === "") {
|
|
14616
14617
|
return;
|
|
14617
14618
|
}
|
|
14618
|
-
const trimmed =
|
|
14619
|
+
const trimmed = path2.trim();
|
|
14619
14620
|
if (trimmed.startsWith("~/")) {
|
|
14620
14621
|
return `${homedir()}${trimmed.slice(1)}`;
|
|
14621
14622
|
}
|
|
@@ -14623,6 +14624,10 @@ var import_dotenv, packageManifest, hasFileSystemAccess, emptyStringAsUndefined
|
|
|
14623
14624
|
return homedir();
|
|
14624
14625
|
}
|
|
14625
14626
|
return trimmed;
|
|
14627
|
+
}, isAbsolutePath = (p) => {
|
|
14628
|
+
if (!p)
|
|
14629
|
+
return false;
|
|
14630
|
+
return path.isAbsolute(p);
|
|
14626
14631
|
}, ConfigSchema, parseConfig = () => {
|
|
14627
14632
|
const env = process.env;
|
|
14628
14633
|
const rawConfig = {
|
|
@@ -14872,8 +14877,8 @@ var init_config = __esm(() => {
|
|
|
14872
14877
|
committerName: exports_external.string().optional(),
|
|
14873
14878
|
committerEmail: exports_external.string().email().optional(),
|
|
14874
14879
|
wrapupInstructionsPath: exports_external.preprocess(expandTildePath, exports_external.string().optional()),
|
|
14875
|
-
baseDir: exports_external.preprocess((val) => expandTildePath(emptyStringAsUndefined(val)), exports_external.string().refine((
|
|
14876
|
-
message:
|
|
14880
|
+
baseDir: exports_external.preprocess((val) => expandTildePath(emptyStringAsUndefined(val)), exports_external.string().refine((p) => !p || isAbsolutePath(p), {
|
|
14881
|
+
message: "GIT_BASE_DIR must be an absolute path (tilde expansion is supported)"
|
|
14877
14882
|
}).optional()),
|
|
14878
14883
|
maxCommandTimeoutMs: exports_external.coerce.number().default(30000),
|
|
14879
14884
|
maxBufferSizeMb: exports_external.coerce.number().default(10)
|
|
@@ -20754,19 +20759,19 @@ var require_module_details_from_path = __commonJS((exports, module) => {
|
|
|
20754
20759
|
basedir += segments[i] + sep;
|
|
20755
20760
|
}
|
|
20756
20761
|
}
|
|
20757
|
-
var
|
|
20762
|
+
var path2 = "";
|
|
20758
20763
|
var lastSegmentIndex = segments.length - 1;
|
|
20759
20764
|
for (var i2 = index + offset;i2 <= lastSegmentIndex; i2++) {
|
|
20760
20765
|
if (i2 === lastSegmentIndex) {
|
|
20761
|
-
|
|
20766
|
+
path2 += segments[i2];
|
|
20762
20767
|
} else {
|
|
20763
|
-
|
|
20768
|
+
path2 += segments[i2] + sep;
|
|
20764
20769
|
}
|
|
20765
20770
|
}
|
|
20766
20771
|
return {
|
|
20767
20772
|
name,
|
|
20768
20773
|
basedir,
|
|
20769
|
-
path
|
|
20774
|
+
path: path2
|
|
20770
20775
|
};
|
|
20771
20776
|
};
|
|
20772
20777
|
});
|
|
@@ -20834,7 +20839,7 @@ var require_package2 = __commonJS((exports, module) => {
|
|
|
20834
20839
|
|
|
20835
20840
|
// node_modules/require-in-the-middle/index.js
|
|
20836
20841
|
var require_require_in_the_middle = __commonJS((exports, module) => {
|
|
20837
|
-
var
|
|
20842
|
+
var path2 = __require("path");
|
|
20838
20843
|
var Module = __require("module");
|
|
20839
20844
|
var debug = require_src5()("require-in-the-middle");
|
|
20840
20845
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
@@ -20981,7 +20986,7 @@ var require_require_in_the_middle = __commonJS((exports, module) => {
|
|
|
20981
20986
|
}
|
|
20982
20987
|
moduleName2 = filename;
|
|
20983
20988
|
} else if (hasWhitelist === true && modules.includes(filename)) {
|
|
20984
|
-
const parsedPath =
|
|
20989
|
+
const parsedPath = path2.parse(filename);
|
|
20985
20990
|
moduleName2 = parsedPath.name;
|
|
20986
20991
|
basedir = parsedPath.dir;
|
|
20987
20992
|
} else {
|
|
@@ -21019,7 +21024,7 @@ var require_require_in_the_middle = __commonJS((exports, module) => {
|
|
|
21019
21024
|
}
|
|
21020
21025
|
if (res !== filename) {
|
|
21021
21026
|
if (internals === true) {
|
|
21022
|
-
moduleName2 = moduleName2 +
|
|
21027
|
+
moduleName2 = moduleName2 + path2.sep + path2.relative(basedir, filename);
|
|
21023
21028
|
debug("preparing to process require of internal file: %s", moduleName2);
|
|
21024
21029
|
} else {
|
|
21025
21030
|
debug("ignoring require of non-main module file: %s", res);
|
|
@@ -21055,8 +21060,8 @@ var require_require_in_the_middle = __commonJS((exports, module) => {
|
|
|
21055
21060
|
}
|
|
21056
21061
|
};
|
|
21057
21062
|
function resolveModuleName(stat) {
|
|
21058
|
-
const normalizedPath =
|
|
21059
|
-
return
|
|
21063
|
+
const normalizedPath = path2.sep !== "/" ? stat.path.split(path2.sep).join("/") : stat.path;
|
|
21064
|
+
return path2.posix.join(stat.name, normalizedPath).replace(normalize, "");
|
|
21060
21065
|
}
|
|
21061
21066
|
});
|
|
21062
21067
|
|
|
@@ -21124,7 +21129,7 @@ var require_RequireInTheMiddleSingleton = __commonJS((exports) => {
|
|
|
21124
21129
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21125
21130
|
exports.RequireInTheMiddleSingleton = undefined;
|
|
21126
21131
|
var require_in_the_middle_1 = require_require_in_the_middle();
|
|
21127
|
-
var
|
|
21132
|
+
var path2 = __require("path");
|
|
21128
21133
|
var ModuleNameTrie_1 = require_ModuleNameTrie();
|
|
21129
21134
|
var isMocha = [
|
|
21130
21135
|
"afterEach",
|
|
@@ -21169,7 +21174,7 @@ var require_RequireInTheMiddleSingleton = __commonJS((exports) => {
|
|
|
21169
21174
|
}
|
|
21170
21175
|
exports.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
|
|
21171
21176
|
function normalizePathSeparators(moduleNameOrPath) {
|
|
21172
|
-
return
|
|
21177
|
+
return path2.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path2.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
|
|
21173
21178
|
}
|
|
21174
21179
|
});
|
|
21175
21180
|
|
|
@@ -21225,7 +21230,7 @@ var require_register = __commonJS((exports) => {
|
|
|
21225
21230
|
|
|
21226
21231
|
// node_modules/import-in-the-middle/index.js
|
|
21227
21232
|
var require_import_in_the_middle = __commonJS((exports, module) => {
|
|
21228
|
-
var
|
|
21233
|
+
var path2 = __require("path");
|
|
21229
21234
|
var parse5 = require_module_details_from_path();
|
|
21230
21235
|
var { fileURLToPath } = __require("url");
|
|
21231
21236
|
var { MessageChannel } = __require("worker_threads");
|
|
@@ -21320,7 +21325,7 @@ var require_import_in_the_middle = __commonJS((exports, module) => {
|
|
|
21320
21325
|
if (moduleName2 === name) {
|
|
21321
21326
|
if (baseDir) {
|
|
21322
21327
|
if (internals) {
|
|
21323
|
-
name = name +
|
|
21328
|
+
name = name + path2.sep + path2.relative(baseDir, fileURLToPath(filename));
|
|
21324
21329
|
} else {
|
|
21325
21330
|
if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename)))
|
|
21326
21331
|
continue;
|
|
@@ -21391,7 +21396,7 @@ var require_utils5 = __commonJS((exports) => {
|
|
|
21391
21396
|
var require_instrumentation2 = __commonJS((exports) => {
|
|
21392
21397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21393
21398
|
exports.InstrumentationBase = undefined;
|
|
21394
|
-
var
|
|
21399
|
+
var path2 = __require("path");
|
|
21395
21400
|
var util_1 = __require("util");
|
|
21396
21401
|
var semver_1 = require_semver2();
|
|
21397
21402
|
var shimmer_1 = require_shimmer();
|
|
@@ -21489,7 +21494,7 @@ var require_instrumentation2 = __commonJS((exports) => {
|
|
|
21489
21494
|
}
|
|
21490
21495
|
_extractPackageVersion(baseDir) {
|
|
21491
21496
|
try {
|
|
21492
|
-
const json2 = (0, fs_1.readFileSync)(
|
|
21497
|
+
const json2 = (0, fs_1.readFileSync)(path2.join(baseDir, "package.json"), {
|
|
21493
21498
|
encoding: "utf8"
|
|
21494
21499
|
});
|
|
21495
21500
|
const version2 = JSON.parse(json2).version;
|
|
@@ -21531,7 +21536,7 @@ var require_instrumentation2 = __commonJS((exports) => {
|
|
|
21531
21536
|
return exports2;
|
|
21532
21537
|
}
|
|
21533
21538
|
const files = module2.files ?? [];
|
|
21534
|
-
const normalizedName =
|
|
21539
|
+
const normalizedName = path2.normalize(name);
|
|
21535
21540
|
const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName).filter((f) => isSupported(f.supportedVersions, version2, module2.includePrerelease));
|
|
21536
21541
|
return supportedFileInstrumentations.reduce((patchedExports, file2) => {
|
|
21537
21542
|
file2.moduleExports = patchedExports;
|
|
@@ -21577,8 +21582,8 @@ var require_instrumentation2 = __commonJS((exports) => {
|
|
|
21577
21582
|
this._warnOnPreloadedModules();
|
|
21578
21583
|
for (const module2 of this._modules) {
|
|
21579
21584
|
const hookFn = (exports2, name, baseDir) => {
|
|
21580
|
-
if (!baseDir &&
|
|
21581
|
-
const parsedPath =
|
|
21585
|
+
if (!baseDir && path2.isAbsolute(name)) {
|
|
21586
|
+
const parsedPath = path2.parse(name);
|
|
21582
21587
|
name = parsedPath.name;
|
|
21583
21588
|
baseDir = parsedPath.dir;
|
|
21584
21589
|
}
|
|
@@ -21587,7 +21592,7 @@ var require_instrumentation2 = __commonJS((exports) => {
|
|
|
21587
21592
|
const onRequire = (exports2, name, baseDir) => {
|
|
21588
21593
|
return this._onRequire(module2, exports2, name, baseDir);
|
|
21589
21594
|
};
|
|
21590
|
-
const hook =
|
|
21595
|
+
const hook = path2.isAbsolute(module2.name) ? new require_in_the_middle_1.Hook([module2.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module2.name, onRequire);
|
|
21591
21596
|
this._hooks.push(hook);
|
|
21592
21597
|
const esmHook = new import_in_the_middle_1.Hook([module2.name], { internals: false }, hookFn);
|
|
21593
21598
|
this._hooks.push(esmHook);
|
|
@@ -23925,7 +23930,7 @@ var require_version4 = __commonJS((exports) => {
|
|
|
23925
23930
|
var require_instrumentation3 = __commonJS((exports) => {
|
|
23926
23931
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23927
23932
|
exports.AwsLambdaInstrumentation = exports.AWS_HANDLER_STREAMING_RESPONSE = exports.AWS_HANDLER_STREAMING_SYMBOL = exports.lambdaMaxInitInMilliseconds = undefined;
|
|
23928
|
-
var
|
|
23933
|
+
var path2 = __require("path");
|
|
23929
23934
|
var fs = __require("fs");
|
|
23930
23935
|
var instrumentation_1 = require_src6();
|
|
23931
23936
|
var api_1 = require_src();
|
|
@@ -23967,10 +23972,10 @@ var require_instrumentation3 = __commonJS((exports) => {
|
|
|
23967
23972
|
this._diag.debug("Skipping lambda instrumentation: no _HANDLER/lambdaHandler or LAMBDA_TASK_ROOT.", { taskRoot, handlerDef });
|
|
23968
23973
|
return [];
|
|
23969
23974
|
}
|
|
23970
|
-
const handler =
|
|
23975
|
+
const handler = path2.basename(handlerDef);
|
|
23971
23976
|
const moduleRoot = handlerDef.substring(0, handlerDef.length - handler.length);
|
|
23972
23977
|
const [module2, functionName] = handler.split(".", 2);
|
|
23973
|
-
let filename =
|
|
23978
|
+
let filename = path2.resolve(taskRoot, moduleRoot, module2);
|
|
23974
23979
|
if (!filename.endsWith(".js")) {
|
|
23975
23980
|
try {
|
|
23976
23981
|
fs.statSync(`${filename}.js`);
|
|
@@ -27505,15 +27510,15 @@ var require_utils11 = __commonJS((exports) => {
|
|
|
27505
27510
|
return { isLayerPathStored: true };
|
|
27506
27511
|
};
|
|
27507
27512
|
exports.storeLayerPath = storeLayerPath;
|
|
27508
|
-
var getRouterPath = (
|
|
27513
|
+
var getRouterPath = (path2, layer) => {
|
|
27509
27514
|
const stackLayer = layer.handle?.stack?.[0];
|
|
27510
27515
|
if (stackLayer?.route?.path) {
|
|
27511
|
-
return `${
|
|
27516
|
+
return `${path2}${stackLayer.route.path}`;
|
|
27512
27517
|
}
|
|
27513
27518
|
if (stackLayer?.handle?.stack) {
|
|
27514
|
-
return (0, exports.getRouterPath)(
|
|
27519
|
+
return (0, exports.getRouterPath)(path2, stackLayer);
|
|
27515
27520
|
}
|
|
27516
|
-
return
|
|
27521
|
+
return path2;
|
|
27517
27522
|
};
|
|
27518
27523
|
exports.getRouterPath = getRouterPath;
|
|
27519
27524
|
var getLayerMetadata = (route, layer, layerPath) => {
|
|
@@ -27594,7 +27599,7 @@ var require_utils11 = __commonJS((exports) => {
|
|
|
27594
27599
|
};
|
|
27595
27600
|
function getConstructedRoute(req) {
|
|
27596
27601
|
const layersStore = Array.isArray(req[internal_types_1._LAYERS_STORE_PROPERTY]) ? req[internal_types_1._LAYERS_STORE_PROPERTY] : [];
|
|
27597
|
-
const meaningfulPaths = layersStore.filter((
|
|
27602
|
+
const meaningfulPaths = layersStore.filter((path2) => path2 !== "/" && path2 !== "/*");
|
|
27598
27603
|
if (meaningfulPaths.length === 1 && meaningfulPaths[0] === "*") {
|
|
27599
27604
|
return "*";
|
|
27600
27605
|
}
|
|
@@ -27606,7 +27611,7 @@ var require_utils11 = __commonJS((exports) => {
|
|
|
27606
27611
|
if (layersStore.length === 0) {
|
|
27607
27612
|
return;
|
|
27608
27613
|
}
|
|
27609
|
-
if (layersStore.every((
|
|
27614
|
+
if (layersStore.every((path2) => path2 === "/")) {
|
|
27610
27615
|
return req.originalUrl === "/" ? "/" : undefined;
|
|
27611
27616
|
}
|
|
27612
27617
|
const constructedRoute = getConstructedRoute(req);
|
|
@@ -28531,8 +28536,8 @@ var require_instrumentation12 = __commonJS((exports) => {
|
|
|
28531
28536
|
}
|
|
28532
28537
|
};
|
|
28533
28538
|
const functionWithOriginalProperties = patchedFunctionWithOriginalProperties(patchedFunction, original);
|
|
28534
|
-
const promisified = function(
|
|
28535
|
-
return new Promise((resolve) => functionWithOriginalProperties(
|
|
28539
|
+
const promisified = function(path2) {
|
|
28540
|
+
return new Promise((resolve) => functionWithOriginalProperties(path2, resolve));
|
|
28536
28541
|
};
|
|
28537
28542
|
Object.defineProperty(promisified, "name", { value: functionName });
|
|
28538
28543
|
Object.defineProperty(functionWithOriginalProperties, util_1.promisify.custom, {
|
|
@@ -28856,23 +28861,23 @@ var require_utils14 = __commonJS((exports) => {
|
|
|
28856
28861
|
span.setAttribute(AttributeNames_1.AttributeNames.SOURCE, source);
|
|
28857
28862
|
}
|
|
28858
28863
|
exports.addSpanSource = addSpanSource;
|
|
28859
|
-
function createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
28860
|
-
let field = getField(contextValue,
|
|
28864
|
+
function createFieldIfNotExists(tracer, getConfig, contextValue, info, path2) {
|
|
28865
|
+
let field = getField(contextValue, path2);
|
|
28861
28866
|
if (field) {
|
|
28862
28867
|
return { field, spanAdded: false };
|
|
28863
28868
|
}
|
|
28864
28869
|
const config3 = getConfig();
|
|
28865
|
-
const parentSpan = config3.flatResolveSpans ? getRootSpan(contextValue) : getParentFieldSpan(contextValue,
|
|
28870
|
+
const parentSpan = config3.flatResolveSpans ? getRootSpan(contextValue) : getParentFieldSpan(contextValue, path2);
|
|
28866
28871
|
field = {
|
|
28867
|
-
span: createResolverSpan(tracer, getConfig, contextValue, info,
|
|
28872
|
+
span: createResolverSpan(tracer, getConfig, contextValue, info, path2, parentSpan)
|
|
28868
28873
|
};
|
|
28869
|
-
addField(contextValue,
|
|
28874
|
+
addField(contextValue, path2, field);
|
|
28870
28875
|
return { field, spanAdded: true };
|
|
28871
28876
|
}
|
|
28872
|
-
function createResolverSpan(tracer, getConfig, contextValue, info,
|
|
28877
|
+
function createResolverSpan(tracer, getConfig, contextValue, info, path2, parentSpan) {
|
|
28873
28878
|
const attributes = {
|
|
28874
28879
|
[AttributeNames_1.AttributeNames.FIELD_NAME]: info.fieldName,
|
|
28875
|
-
[AttributeNames_1.AttributeNames.FIELD_PATH]:
|
|
28880
|
+
[AttributeNames_1.AttributeNames.FIELD_PATH]: path2.join("."),
|
|
28876
28881
|
[AttributeNames_1.AttributeNames.FIELD_TYPE]: info.returnType.toString()
|
|
28877
28882
|
};
|
|
28878
28883
|
const span = tracer.startSpan(`${enum_1.SpanNames.RESOLVE} ${attributes[AttributeNames_1.AttributeNames.FIELD_PATH]}`, {
|
|
@@ -28903,15 +28908,15 @@ var require_utils14 = __commonJS((exports) => {
|
|
|
28903
28908
|
}
|
|
28904
28909
|
}
|
|
28905
28910
|
exports.getOperation = getOperation;
|
|
28906
|
-
function addField(contextValue,
|
|
28907
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
28911
|
+
function addField(contextValue, path2, field) {
|
|
28912
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path2.join(".")] = field;
|
|
28908
28913
|
}
|
|
28909
|
-
function getField(contextValue,
|
|
28910
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
28914
|
+
function getField(contextValue, path2) {
|
|
28915
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path2.join(".")];
|
|
28911
28916
|
}
|
|
28912
|
-
function getParentFieldSpan(contextValue,
|
|
28913
|
-
for (let i =
|
|
28914
|
-
const field = getField(contextValue,
|
|
28917
|
+
function getParentFieldSpan(contextValue, path2) {
|
|
28918
|
+
for (let i = path2.length - 1;i > 0; i--) {
|
|
28919
|
+
const field = getField(contextValue, path2.slice(0, i));
|
|
28915
28920
|
if (field) {
|
|
28916
28921
|
return field.span;
|
|
28917
28922
|
}
|
|
@@ -28921,9 +28926,9 @@ var require_utils14 = __commonJS((exports) => {
|
|
|
28921
28926
|
function getRootSpan(contextValue) {
|
|
28922
28927
|
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].span;
|
|
28923
28928
|
}
|
|
28924
|
-
function pathToArray(mergeItems,
|
|
28929
|
+
function pathToArray(mergeItems, path2) {
|
|
28925
28930
|
const flattened = [];
|
|
28926
|
-
let curr =
|
|
28931
|
+
let curr = path2;
|
|
28927
28932
|
while (curr) {
|
|
28928
28933
|
let key = curr.key;
|
|
28929
28934
|
if (mergeItems && typeof key === "number") {
|
|
@@ -29077,14 +29082,14 @@ var require_utils14 = __commonJS((exports) => {
|
|
|
29077
29082
|
if (!contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL]) {
|
|
29078
29083
|
return fieldResolver.call(this, source, args, contextValue, info);
|
|
29079
29084
|
}
|
|
29080
|
-
const
|
|
29081
|
-
const depth =
|
|
29085
|
+
const path2 = pathToArray(config3.mergeItems, info && info.path);
|
|
29086
|
+
const depth = path2.filter((item) => typeof item === "string").length;
|
|
29082
29087
|
let span;
|
|
29083
29088
|
let shouldEndSpan = false;
|
|
29084
29089
|
if (config3.depth >= 0 && config3.depth < depth) {
|
|
29085
|
-
span = getParentFieldSpan(contextValue,
|
|
29090
|
+
span = getParentFieldSpan(contextValue, path2);
|
|
29086
29091
|
} else {
|
|
29087
|
-
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
29092
|
+
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info, path2);
|
|
29088
29093
|
span = field.span;
|
|
29089
29094
|
shouldEndSpan = spanAdded;
|
|
29090
29095
|
}
|
|
@@ -30593,13 +30598,13 @@ var require_utils17 = __commonJS((exports) => {
|
|
|
30593
30598
|
const reqUrlObject = requestUrl || {};
|
|
30594
30599
|
const protocol = reqUrlObject.protocol || fallbackProtocol;
|
|
30595
30600
|
const port = (reqUrlObject.port || "").toString();
|
|
30596
|
-
let
|
|
30601
|
+
let path2 = reqUrlObject.path || "/";
|
|
30597
30602
|
let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
|
|
30598
30603
|
if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
|
|
30599
30604
|
host += `:${port}`;
|
|
30600
30605
|
}
|
|
30601
|
-
if (
|
|
30602
|
-
const parsedUrl = url2.parse(
|
|
30606
|
+
if (path2.includes("?")) {
|
|
30607
|
+
const parsedUrl = url2.parse(path2);
|
|
30603
30608
|
const pathname = parsedUrl.pathname || "";
|
|
30604
30609
|
const query = parsedUrl.query || "";
|
|
30605
30610
|
const searchParams = new URLSearchParams(query);
|
|
@@ -30610,10 +30615,10 @@ var require_utils17 = __commonJS((exports) => {
|
|
|
30610
30615
|
}
|
|
30611
30616
|
}
|
|
30612
30617
|
const redactedQuery = searchParams.toString();
|
|
30613
|
-
|
|
30618
|
+
path2 = `${pathname}?${redactedQuery}`;
|
|
30614
30619
|
}
|
|
30615
30620
|
const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
|
|
30616
|
-
return `${protocol}//${authPart}${host}${
|
|
30621
|
+
return `${protocol}//${authPart}${host}${path2}`;
|
|
30617
30622
|
};
|
|
30618
30623
|
exports.getAbsoluteUrl = getAbsoluteUrl;
|
|
30619
30624
|
var parseResponseStatus = (kind, statusCode) => {
|
|
@@ -32842,11 +32847,11 @@ var require_instrumentation20 = __commonJS((exports) => {
|
|
|
32842
32847
|
const router = dispatchLayer.router;
|
|
32843
32848
|
const routesStack = router?.stack ?? [];
|
|
32844
32849
|
for (const pathLayer of routesStack) {
|
|
32845
|
-
const
|
|
32850
|
+
const path2 = pathLayer.path;
|
|
32846
32851
|
const pathStack = pathLayer.stack;
|
|
32847
32852
|
for (let j = 0;j < pathStack.length; j++) {
|
|
32848
32853
|
const routedMiddleware = pathStack[j];
|
|
32849
|
-
pathStack[j] = this._patchLayer(routedMiddleware, true,
|
|
32854
|
+
pathStack[j] = this._patchLayer(routedMiddleware, true, path2);
|
|
32850
32855
|
}
|
|
32851
32856
|
}
|
|
32852
32857
|
return dispatchLayer;
|
|
@@ -40938,8 +40943,8 @@ var require_instrumentation34 = __commonJS((exports) => {
|
|
|
40938
40943
|
}
|
|
40939
40944
|
_methodPatcher(original, methodName) {
|
|
40940
40945
|
const instrumentation = this;
|
|
40941
|
-
return function(
|
|
40942
|
-
return original.call(this,
|
|
40946
|
+
return function(path2, ...handler) {
|
|
40947
|
+
return original.call(this, path2, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path2, methodName }, handler));
|
|
40943
40948
|
};
|
|
40944
40949
|
}
|
|
40945
40950
|
_handlerPatcher(metadata, handler) {
|
|
@@ -45710,9 +45715,9 @@ var require_getMachineId_linux = __commonJS((exports) => {
|
|
|
45710
45715
|
var api_1 = require_src();
|
|
45711
45716
|
async function getMachineId() {
|
|
45712
45717
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
45713
|
-
for (const
|
|
45718
|
+
for (const path2 of paths) {
|
|
45714
45719
|
try {
|
|
45715
|
-
const result = await fs_1.promises.readFile(
|
|
45720
|
+
const result = await fs_1.promises.readFile(path2, { encoding: "utf8" });
|
|
45716
45721
|
return result.trim();
|
|
45717
45722
|
} catch (e) {
|
|
45718
45723
|
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
@@ -46882,14 +46887,14 @@ var require_url_state_machine = __commonJS((exports, module) => {
|
|
|
46882
46887
|
return url2.replace(/\u0009|\u000A|\u000D/g, "");
|
|
46883
46888
|
}
|
|
46884
46889
|
function shortenPath(url2) {
|
|
46885
|
-
const
|
|
46886
|
-
if (
|
|
46890
|
+
const path2 = url2.path;
|
|
46891
|
+
if (path2.length === 0) {
|
|
46887
46892
|
return;
|
|
46888
46893
|
}
|
|
46889
|
-
if (url2.scheme === "file" &&
|
|
46894
|
+
if (url2.scheme === "file" && path2.length === 1 && isNormalizedWindowsDriveLetter(path2[0])) {
|
|
46890
46895
|
return;
|
|
46891
46896
|
}
|
|
46892
|
-
|
|
46897
|
+
path2.pop();
|
|
46893
46898
|
}
|
|
46894
46899
|
function includesCredentials(url2) {
|
|
46895
46900
|
return url2.username !== "" || url2.password !== "";
|
|
@@ -67614,7 +67619,7 @@ var require_otlp_node_http_env_configuration = __commonJS((exports) => {
|
|
|
67614
67619
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67615
67620
|
exports.getNodeHttpConfigurationFromEnvironment = undefined;
|
|
67616
67621
|
var fs = __require("fs");
|
|
67617
|
-
var
|
|
67622
|
+
var path2 = __require("path");
|
|
67618
67623
|
var core_1 = require_src3();
|
|
67619
67624
|
var api_1 = require_src();
|
|
67620
67625
|
var shared_env_configuration_1 = require_shared_env_configuration();
|
|
@@ -67639,7 +67644,7 @@ var require_otlp_node_http_env_configuration = __commonJS((exports) => {
|
|
|
67639
67644
|
return;
|
|
67640
67645
|
}
|
|
67641
67646
|
}
|
|
67642
|
-
function appendResourcePathToUrl(url2,
|
|
67647
|
+
function appendResourcePathToUrl(url2, path3) {
|
|
67643
67648
|
try {
|
|
67644
67649
|
new URL(url2);
|
|
67645
67650
|
} catch {
|
|
@@ -67649,11 +67654,11 @@ var require_otlp_node_http_env_configuration = __commonJS((exports) => {
|
|
|
67649
67654
|
if (!url2.endsWith("/")) {
|
|
67650
67655
|
url2 = url2 + "/";
|
|
67651
67656
|
}
|
|
67652
|
-
url2 +=
|
|
67657
|
+
url2 += path3;
|
|
67653
67658
|
try {
|
|
67654
67659
|
new URL(url2);
|
|
67655
67660
|
} catch {
|
|
67656
|
-
api_1.diag.warn(`Configuration: Provided URL appended with '${
|
|
67661
|
+
api_1.diag.warn(`Configuration: Provided URL appended with '${path3}' is not a valid URL, using 'undefined' instead of '${url2}'`);
|
|
67657
67662
|
return;
|
|
67658
67663
|
}
|
|
67659
67664
|
return url2;
|
|
@@ -67678,7 +67683,7 @@ var require_otlp_node_http_env_configuration = __commonJS((exports) => {
|
|
|
67678
67683
|
const filePath = signalSpecificPath ?? nonSignalSpecificPath;
|
|
67679
67684
|
if (filePath != null) {
|
|
67680
67685
|
try {
|
|
67681
|
-
return fs.readFileSync(
|
|
67686
|
+
return fs.readFileSync(path2.resolve(process.cwd(), filePath));
|
|
67682
67687
|
} catch {
|
|
67683
67688
|
api_1.diag.warn(warningMessage);
|
|
67684
67689
|
return;
|
|
@@ -72284,19 +72289,19 @@ var require_uri_parser = __commonJS((exports) => {
|
|
|
72284
72289
|
};
|
|
72285
72290
|
}
|
|
72286
72291
|
var NUMBER_REGEX = /^\d+$/;
|
|
72287
|
-
function splitHostPort(
|
|
72288
|
-
if (
|
|
72289
|
-
const hostEnd =
|
|
72292
|
+
function splitHostPort(path2) {
|
|
72293
|
+
if (path2.startsWith("[")) {
|
|
72294
|
+
const hostEnd = path2.indexOf("]");
|
|
72290
72295
|
if (hostEnd === -1) {
|
|
72291
72296
|
return null;
|
|
72292
72297
|
}
|
|
72293
|
-
const host =
|
|
72298
|
+
const host = path2.substring(1, hostEnd);
|
|
72294
72299
|
if (host.indexOf(":") === -1) {
|
|
72295
72300
|
return null;
|
|
72296
72301
|
}
|
|
72297
|
-
if (
|
|
72298
|
-
if (
|
|
72299
|
-
const portString =
|
|
72302
|
+
if (path2.length > hostEnd + 1) {
|
|
72303
|
+
if (path2[hostEnd + 1] === ":") {
|
|
72304
|
+
const portString = path2.substring(hostEnd + 2);
|
|
72300
72305
|
if (NUMBER_REGEX.test(portString)) {
|
|
72301
72306
|
return {
|
|
72302
72307
|
host,
|
|
@@ -72314,7 +72319,7 @@ var require_uri_parser = __commonJS((exports) => {
|
|
|
72314
72319
|
};
|
|
72315
72320
|
}
|
|
72316
72321
|
} else {
|
|
72317
|
-
const splitPath =
|
|
72322
|
+
const splitPath = path2.split(":");
|
|
72318
72323
|
if (splitPath.length === 2) {
|
|
72319
72324
|
if (NUMBER_REGEX.test(splitPath[1])) {
|
|
72320
72325
|
return {
|
|
@@ -72326,7 +72331,7 @@ var require_uri_parser = __commonJS((exports) => {
|
|
|
72326
72331
|
}
|
|
72327
72332
|
} else {
|
|
72328
72333
|
return {
|
|
72329
|
-
host:
|
|
72334
|
+
host: path2
|
|
72330
72335
|
};
|
|
72331
72336
|
}
|
|
72332
72337
|
}
|
|
@@ -75261,14 +75266,14 @@ var require_client_interceptors = __commonJS((exports) => {
|
|
|
75261
75266
|
}
|
|
75262
75267
|
}
|
|
75263
75268
|
exports.InterceptingCall = InterceptingCall;
|
|
75264
|
-
function getCall(channel,
|
|
75269
|
+
function getCall(channel, path2, options) {
|
|
75265
75270
|
var _a2, _b;
|
|
75266
75271
|
const deadline = (_a2 = options.deadline) !== null && _a2 !== undefined ? _a2 : Infinity;
|
|
75267
75272
|
const host = options.host;
|
|
75268
75273
|
const parent = (_b = options.parent) !== null && _b !== undefined ? _b : null;
|
|
75269
75274
|
const propagateFlags = options.propagate_flags;
|
|
75270
75275
|
const credentials = options.credentials;
|
|
75271
|
-
const call = channel.createCall(
|
|
75276
|
+
const call = channel.createCall(path2, deadline, host, parent, propagateFlags);
|
|
75272
75277
|
if (credentials) {
|
|
75273
75278
|
call.setCredentials(credentials);
|
|
75274
75279
|
}
|
|
@@ -75831,9 +75836,9 @@ var require_make_client = __commonJS((exports) => {
|
|
|
75831
75836
|
ServiceClientImpl.serviceName = serviceName;
|
|
75832
75837
|
return ServiceClientImpl;
|
|
75833
75838
|
}
|
|
75834
|
-
function partial2(fn,
|
|
75839
|
+
function partial2(fn, path2, serialize, deserialize) {
|
|
75835
75840
|
return function(...args) {
|
|
75836
|
-
return fn.call(this,
|
|
75841
|
+
return fn.call(this, path2, serialize, deserialize, ...args);
|
|
75837
75842
|
};
|
|
75838
75843
|
}
|
|
75839
75844
|
function isProtobufTypeDefinition(obj) {
|
|
@@ -76350,13 +76355,13 @@ var require_fetch = __commonJS((exports, module) => {
|
|
|
76350
76355
|
|
|
76351
76356
|
// node_modules/@protobufjs/path/index.js
|
|
76352
76357
|
var require_path = __commonJS((exports) => {
|
|
76353
|
-
var
|
|
76354
|
-
var isAbsolute =
|
|
76355
|
-
return /^(?:\/|\w+:)/.test(
|
|
76358
|
+
var path2 = exports;
|
|
76359
|
+
var isAbsolute = path2.isAbsolute = function isAbsolute(path3) {
|
|
76360
|
+
return /^(?:\/|\w+:)/.test(path3);
|
|
76356
76361
|
};
|
|
76357
|
-
var normalize =
|
|
76358
|
-
|
|
76359
|
-
var parts =
|
|
76362
|
+
var normalize = path2.normalize = function normalize(path3) {
|
|
76363
|
+
path3 = path3.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
76364
|
+
var parts = path3.split("/"), absolute = isAbsolute(path3), prefix = "";
|
|
76360
76365
|
if (absolute)
|
|
76361
76366
|
prefix = parts.shift() + "/";
|
|
76362
76367
|
for (var i = 0;i < parts.length; ) {
|
|
@@ -76374,7 +76379,7 @@ var require_path = __commonJS((exports) => {
|
|
|
76374
76379
|
}
|
|
76375
76380
|
return prefix + parts.join("/");
|
|
76376
76381
|
};
|
|
76377
|
-
|
|
76382
|
+
path2.resolve = function resolve(originPath, includePath, alreadyNormalized) {
|
|
76378
76383
|
if (!alreadyNormalized)
|
|
76379
76384
|
includePath = normalize(includePath);
|
|
76380
76385
|
if (isAbsolute(includePath))
|
|
@@ -76519,16 +76524,16 @@ var require_namespace = __commonJS((exports, module) => {
|
|
|
76519
76524
|
object2.onRemove(this);
|
|
76520
76525
|
return clearCache(this);
|
|
76521
76526
|
};
|
|
76522
|
-
Namespace.prototype.define = function define(
|
|
76523
|
-
if (util.isString(
|
|
76524
|
-
|
|
76525
|
-
else if (!Array.isArray(
|
|
76527
|
+
Namespace.prototype.define = function define(path2, json2) {
|
|
76528
|
+
if (util.isString(path2))
|
|
76529
|
+
path2 = path2.split(".");
|
|
76530
|
+
else if (!Array.isArray(path2))
|
|
76526
76531
|
throw TypeError("illegal path");
|
|
76527
|
-
if (
|
|
76532
|
+
if (path2 && path2.length && path2[0] === "")
|
|
76528
76533
|
throw Error("path must be relative");
|
|
76529
76534
|
var ptr = this;
|
|
76530
|
-
while (
|
|
76531
|
-
var part =
|
|
76535
|
+
while (path2.length > 0) {
|
|
76536
|
+
var part = path2.shift();
|
|
76532
76537
|
if (ptr.nested && ptr.nested[part]) {
|
|
76533
76538
|
ptr = ptr.nested[part];
|
|
76534
76539
|
if (!(ptr instanceof Namespace))
|
|
@@ -76565,26 +76570,26 @@ var require_namespace = __commonJS((exports, module) => {
|
|
|
76565
76570
|
});
|
|
76566
76571
|
return this;
|
|
76567
76572
|
};
|
|
76568
|
-
Namespace.prototype.lookup = function lookup(
|
|
76573
|
+
Namespace.prototype.lookup = function lookup(path2, filterTypes, parentAlreadyChecked) {
|
|
76569
76574
|
if (typeof filterTypes === "boolean") {
|
|
76570
76575
|
parentAlreadyChecked = filterTypes;
|
|
76571
76576
|
filterTypes = undefined;
|
|
76572
76577
|
} else if (filterTypes && !Array.isArray(filterTypes))
|
|
76573
76578
|
filterTypes = [filterTypes];
|
|
76574
|
-
if (util.isString(
|
|
76575
|
-
if (
|
|
76579
|
+
if (util.isString(path2) && path2.length) {
|
|
76580
|
+
if (path2 === ".")
|
|
76576
76581
|
return this.root;
|
|
76577
|
-
|
|
76578
|
-
} else if (!
|
|
76582
|
+
path2 = path2.split(".");
|
|
76583
|
+
} else if (!path2.length)
|
|
76579
76584
|
return this;
|
|
76580
|
-
var flatPath =
|
|
76581
|
-
if (
|
|
76582
|
-
return this.root.lookup(
|
|
76585
|
+
var flatPath = path2.join(".");
|
|
76586
|
+
if (path2[0] === "")
|
|
76587
|
+
return this.root.lookup(path2.slice(1), filterTypes);
|
|
76583
76588
|
var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
|
|
76584
76589
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
76585
76590
|
return found;
|
|
76586
76591
|
}
|
|
76587
|
-
found = this._lookupImpl(
|
|
76592
|
+
found = this._lookupImpl(path2, flatPath);
|
|
76588
76593
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
76589
76594
|
return found;
|
|
76590
76595
|
}
|
|
@@ -76592,7 +76597,7 @@ var require_namespace = __commonJS((exports, module) => {
|
|
|
76592
76597
|
return null;
|
|
76593
76598
|
var current = this;
|
|
76594
76599
|
while (current.parent) {
|
|
76595
|
-
found = current.parent._lookupImpl(
|
|
76600
|
+
found = current.parent._lookupImpl(path2, flatPath);
|
|
76596
76601
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
76597
76602
|
return found;
|
|
76598
76603
|
}
|
|
@@ -76600,49 +76605,49 @@ var require_namespace = __commonJS((exports, module) => {
|
|
|
76600
76605
|
}
|
|
76601
76606
|
return null;
|
|
76602
76607
|
};
|
|
76603
|
-
Namespace.prototype._lookupImpl = function lookup(
|
|
76608
|
+
Namespace.prototype._lookupImpl = function lookup(path2, flatPath) {
|
|
76604
76609
|
if (Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
76605
76610
|
return this._lookupCache[flatPath];
|
|
76606
76611
|
}
|
|
76607
|
-
var found = this.get(
|
|
76612
|
+
var found = this.get(path2[0]);
|
|
76608
76613
|
var exact = null;
|
|
76609
76614
|
if (found) {
|
|
76610
|
-
if (
|
|
76615
|
+
if (path2.length === 1) {
|
|
76611
76616
|
exact = found;
|
|
76612
76617
|
} else if (found instanceof Namespace) {
|
|
76613
|
-
|
|
76614
|
-
exact = found._lookupImpl(
|
|
76618
|
+
path2 = path2.slice(1);
|
|
76619
|
+
exact = found._lookupImpl(path2, path2.join("."));
|
|
76615
76620
|
}
|
|
76616
76621
|
} else {
|
|
76617
76622
|
for (var i = 0;i < this.nestedArray.length; ++i)
|
|
76618
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(
|
|
76623
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path2, flatPath)))
|
|
76619
76624
|
exact = found;
|
|
76620
76625
|
}
|
|
76621
76626
|
this._lookupCache[flatPath] = exact;
|
|
76622
76627
|
return exact;
|
|
76623
76628
|
};
|
|
76624
|
-
Namespace.prototype.lookupType = function lookupType(
|
|
76625
|
-
var found = this.lookup(
|
|
76629
|
+
Namespace.prototype.lookupType = function lookupType(path2) {
|
|
76630
|
+
var found = this.lookup(path2, [Type]);
|
|
76626
76631
|
if (!found)
|
|
76627
|
-
throw Error("no such type: " +
|
|
76632
|
+
throw Error("no such type: " + path2);
|
|
76628
76633
|
return found;
|
|
76629
76634
|
};
|
|
76630
|
-
Namespace.prototype.lookupEnum = function lookupEnum(
|
|
76631
|
-
var found = this.lookup(
|
|
76635
|
+
Namespace.prototype.lookupEnum = function lookupEnum(path2) {
|
|
76636
|
+
var found = this.lookup(path2, [Enum]);
|
|
76632
76637
|
if (!found)
|
|
76633
|
-
throw Error("no such Enum '" +
|
|
76638
|
+
throw Error("no such Enum '" + path2 + "' in " + this);
|
|
76634
76639
|
return found;
|
|
76635
76640
|
};
|
|
76636
|
-
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(
|
|
76637
|
-
var found = this.lookup(
|
|
76641
|
+
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path2) {
|
|
76642
|
+
var found = this.lookup(path2, [Type, Enum]);
|
|
76638
76643
|
if (!found)
|
|
76639
|
-
throw Error("no such Type or Enum '" +
|
|
76644
|
+
throw Error("no such Type or Enum '" + path2 + "' in " + this);
|
|
76640
76645
|
return found;
|
|
76641
76646
|
};
|
|
76642
|
-
Namespace.prototype.lookupService = function lookupService(
|
|
76643
|
-
var found = this.lookup(
|
|
76647
|
+
Namespace.prototype.lookupService = function lookupService(path2) {
|
|
76648
|
+
var found = this.lookup(path2, [Service]);
|
|
76644
76649
|
if (!found)
|
|
76645
|
-
throw Error("no such Service '" +
|
|
76650
|
+
throw Error("no such Service '" + path2 + "' in " + this);
|
|
76646
76651
|
return found;
|
|
76647
76652
|
};
|
|
76648
76653
|
Namespace._configure = function(Type_, Service_, Enum_) {
|
|
@@ -77921,14 +77926,14 @@ var require_util4 = __commonJS((exports, module) => {
|
|
|
77921
77926
|
Object.defineProperty(object2, "$type", { value: enm, enumerable: false });
|
|
77922
77927
|
return enm;
|
|
77923
77928
|
};
|
|
77924
|
-
util.setProperty = function setProperty(dst,
|
|
77925
|
-
function setProp(dst2,
|
|
77926
|
-
var part =
|
|
77929
|
+
util.setProperty = function setProperty(dst, path2, value, ifNotSet) {
|
|
77930
|
+
function setProp(dst2, path3, value2) {
|
|
77931
|
+
var part = path3.shift();
|
|
77927
77932
|
if (part === "__proto__" || part === "prototype") {
|
|
77928
77933
|
return dst2;
|
|
77929
77934
|
}
|
|
77930
|
-
if (
|
|
77931
|
-
dst2[part] = setProp(dst2[part] || {},
|
|
77935
|
+
if (path3.length > 0) {
|
|
77936
|
+
dst2[part] = setProp(dst2[part] || {}, path3, value2);
|
|
77932
77937
|
} else {
|
|
77933
77938
|
var prevValue = dst2[part];
|
|
77934
77939
|
if (prevValue && ifNotSet)
|
|
@@ -77941,10 +77946,10 @@ var require_util4 = __commonJS((exports, module) => {
|
|
|
77941
77946
|
}
|
|
77942
77947
|
if (typeof dst !== "object")
|
|
77943
77948
|
throw TypeError("dst must be an object");
|
|
77944
|
-
if (!
|
|
77949
|
+
if (!path2)
|
|
77945
77950
|
throw TypeError("path must be specified");
|
|
77946
|
-
|
|
77947
|
-
return setProp(dst,
|
|
77951
|
+
path2 = path2.split(".");
|
|
77952
|
+
return setProp(dst, path2, value);
|
|
77948
77953
|
};
|
|
77949
77954
|
Object.defineProperty(util, "decorateRoot", {
|
|
77950
77955
|
get: function() {
|
|
@@ -78386,12 +78391,12 @@ var require_object = __commonJS((exports, module) => {
|
|
|
78386
78391
|
},
|
|
78387
78392
|
fullName: {
|
|
78388
78393
|
get: function() {
|
|
78389
|
-
var
|
|
78394
|
+
var path2 = [this.name], ptr = this.parent;
|
|
78390
78395
|
while (ptr) {
|
|
78391
|
-
|
|
78396
|
+
path2.unshift(ptr.name);
|
|
78392
78397
|
ptr = ptr.parent;
|
|
78393
78398
|
}
|
|
78394
|
-
return
|
|
78399
|
+
return path2.join(".");
|
|
78395
78400
|
}
|
|
78396
78401
|
}
|
|
78397
78402
|
});
|
|
@@ -82168,16 +82173,16 @@ var require_util5 = __commonJS((exports) => {
|
|
|
82168
82173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
82169
82174
|
exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = undefined;
|
|
82170
82175
|
var fs = __require("fs");
|
|
82171
|
-
var
|
|
82176
|
+
var path2 = __require("path");
|
|
82172
82177
|
var Protobuf = require_src75();
|
|
82173
82178
|
function addIncludePathResolver(root, includePaths) {
|
|
82174
82179
|
const originalResolvePath = root.resolvePath;
|
|
82175
82180
|
root.resolvePath = (origin, target) => {
|
|
82176
|
-
if (
|
|
82181
|
+
if (path2.isAbsolute(target)) {
|
|
82177
82182
|
return target;
|
|
82178
82183
|
}
|
|
82179
82184
|
for (const directory of includePaths) {
|
|
82180
|
-
const fullPath =
|
|
82185
|
+
const fullPath = path2.join(directory, target);
|
|
82181
82186
|
try {
|
|
82182
82187
|
fs.accessSync(fullPath, fs.constants.R_OK);
|
|
82183
82188
|
return fullPath;
|
|
@@ -88197,9 +88202,9 @@ var require_server_call = __commonJS((exports) => {
|
|
|
88197
88202
|
}
|
|
88198
88203
|
|
|
88199
88204
|
class ServerUnaryCallImpl extends events_1.EventEmitter {
|
|
88200
|
-
constructor(
|
|
88205
|
+
constructor(path2, call, metadata, request) {
|
|
88201
88206
|
super();
|
|
88202
|
-
this.path =
|
|
88207
|
+
this.path = path2;
|
|
88203
88208
|
this.call = call;
|
|
88204
88209
|
this.metadata = metadata;
|
|
88205
88210
|
this.request = request;
|
|
@@ -88230,9 +88235,9 @@ var require_server_call = __commonJS((exports) => {
|
|
|
88230
88235
|
exports.ServerUnaryCallImpl = ServerUnaryCallImpl;
|
|
88231
88236
|
|
|
88232
88237
|
class ServerReadableStreamImpl extends stream_1.Readable {
|
|
88233
|
-
constructor(
|
|
88238
|
+
constructor(path2, call, metadata) {
|
|
88234
88239
|
super({ objectMode: true });
|
|
88235
|
-
this.path =
|
|
88240
|
+
this.path = path2;
|
|
88236
88241
|
this.call = call;
|
|
88237
88242
|
this.metadata = metadata;
|
|
88238
88243
|
this.cancelled = false;
|
|
@@ -88265,9 +88270,9 @@ var require_server_call = __commonJS((exports) => {
|
|
|
88265
88270
|
exports.ServerReadableStreamImpl = ServerReadableStreamImpl;
|
|
88266
88271
|
|
|
88267
88272
|
class ServerWritableStreamImpl extends stream_1.Writable {
|
|
88268
|
-
constructor(
|
|
88273
|
+
constructor(path2, call, metadata, request) {
|
|
88269
88274
|
super({ objectMode: true });
|
|
88270
|
-
this.path =
|
|
88275
|
+
this.path = path2;
|
|
88271
88276
|
this.call = call;
|
|
88272
88277
|
this.metadata = metadata;
|
|
88273
88278
|
this.request = request;
|
|
@@ -88321,9 +88326,9 @@ var require_server_call = __commonJS((exports) => {
|
|
|
88321
88326
|
exports.ServerWritableStreamImpl = ServerWritableStreamImpl;
|
|
88322
88327
|
|
|
88323
88328
|
class ServerDuplexStreamImpl extends stream_1.Duplex {
|
|
88324
|
-
constructor(
|
|
88329
|
+
constructor(path2, call, metadata) {
|
|
88325
88330
|
super({ objectMode: true });
|
|
88326
|
-
this.path =
|
|
88331
|
+
this.path = path2;
|
|
88327
88332
|
this.call = call;
|
|
88328
88333
|
this.metadata = metadata;
|
|
88329
88334
|
this.pendingStatus = {
|
|
@@ -90518,11 +90523,11 @@ var require_server = __commonJS((exports) => {
|
|
|
90518
90523
|
}
|
|
90519
90524
|
return true;
|
|
90520
90525
|
}
|
|
90521
|
-
_retrieveHandler(
|
|
90522
|
-
serverCallTrace("Received call to method " +
|
|
90523
|
-
const handler = this.handlers.get(
|
|
90526
|
+
_retrieveHandler(path2) {
|
|
90527
|
+
serverCallTrace("Received call to method " + path2 + " at address " + this.serverAddressString);
|
|
90528
|
+
const handler = this.handlers.get(path2);
|
|
90524
90529
|
if (handler === undefined) {
|
|
90525
|
-
serverCallTrace("No handler registered for method " +
|
|
90530
|
+
serverCallTrace("No handler registered for method " + path2 + ". Sending UNIMPLEMENTED status.");
|
|
90526
90531
|
return null;
|
|
90527
90532
|
}
|
|
90528
90533
|
return handler;
|
|
@@ -90544,10 +90549,10 @@ var require_server = __commonJS((exports) => {
|
|
|
90544
90549
|
channelzSessionInfo === null || channelzSessionInfo === undefined || channelzSessionInfo.streamTracker.addCallFailed();
|
|
90545
90550
|
return;
|
|
90546
90551
|
}
|
|
90547
|
-
const
|
|
90548
|
-
const handler = this._retrieveHandler(
|
|
90552
|
+
const path2 = headers[HTTP2_HEADER_PATH];
|
|
90553
|
+
const handler = this._retrieveHandler(path2);
|
|
90549
90554
|
if (!handler) {
|
|
90550
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
90555
|
+
this._respondWithError(getUnimplementedStatusResponse(path2), stream, channelzSessionInfo);
|
|
90551
90556
|
return;
|
|
90552
90557
|
}
|
|
90553
90558
|
const callEventTracker = {
|
|
@@ -90595,10 +90600,10 @@ var require_server = __commonJS((exports) => {
|
|
|
90595
90600
|
if (this._verifyContentType(stream, headers) !== true) {
|
|
90596
90601
|
return;
|
|
90597
90602
|
}
|
|
90598
|
-
const
|
|
90599
|
-
const handler = this._retrieveHandler(
|
|
90603
|
+
const path2 = headers[HTTP2_HEADER_PATH];
|
|
90604
|
+
const handler = this._retrieveHandler(path2);
|
|
90600
90605
|
if (!handler) {
|
|
90601
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
90606
|
+
this._respondWithError(getUnimplementedStatusResponse(path2), stream, null);
|
|
90602
90607
|
return;
|
|
90603
90608
|
}
|
|
90604
90609
|
const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options);
|
|
@@ -91836,13 +91841,13 @@ var require_resolver_uds = __commonJS((exports) => {
|
|
|
91836
91841
|
this.listener = listener;
|
|
91837
91842
|
this.hasReturnedResult = false;
|
|
91838
91843
|
this.endpoints = [];
|
|
91839
|
-
let
|
|
91844
|
+
let path2;
|
|
91840
91845
|
if (target.authority === "") {
|
|
91841
|
-
|
|
91846
|
+
path2 = "/" + target.path;
|
|
91842
91847
|
} else {
|
|
91843
|
-
|
|
91848
|
+
path2 = target.path;
|
|
91844
91849
|
}
|
|
91845
|
-
this.endpoints = [{ addresses: [{ path }] }];
|
|
91850
|
+
this.endpoints = [{ addresses: [{ path: path2 }] }];
|
|
91846
91851
|
}
|
|
91847
91852
|
updateResolution() {
|
|
91848
91853
|
if (!this.hasReturnedResult) {
|
|
@@ -91900,12 +91905,12 @@ var require_resolver_ip = __commonJS((exports) => {
|
|
|
91900
91905
|
return;
|
|
91901
91906
|
}
|
|
91902
91907
|
const pathList = target.path.split(",");
|
|
91903
|
-
for (const
|
|
91904
|
-
const hostPort = (0, uri_parser_1.splitHostPort)(
|
|
91908
|
+
for (const path2 of pathList) {
|
|
91909
|
+
const hostPort = (0, uri_parser_1.splitHostPort)(path2);
|
|
91905
91910
|
if (hostPort === null) {
|
|
91906
91911
|
this.error = {
|
|
91907
91912
|
code: constants_1.Status.UNAVAILABLE,
|
|
91908
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
91913
|
+
details: `Failed to parse ${target.scheme} address ${path2}`,
|
|
91909
91914
|
metadata: new metadata_1.Metadata
|
|
91910
91915
|
};
|
|
91911
91916
|
return;
|
|
@@ -91913,7 +91918,7 @@ var require_resolver_ip = __commonJS((exports) => {
|
|
|
91913
91918
|
if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
|
|
91914
91919
|
this.error = {
|
|
91915
91920
|
code: constants_1.Status.UNAVAILABLE,
|
|
91916
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
91921
|
+
details: `Failed to parse ${target.scheme} address ${path2}`,
|
|
91917
91922
|
metadata: new metadata_1.Metadata
|
|
91918
91923
|
};
|
|
91919
91924
|
return;
|
|
@@ -93204,10 +93209,10 @@ var require_create_service_client_constructor = __commonJS((exports) => {
|
|
|
93204
93209
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
93205
93210
|
exports.createServiceClientConstructor = undefined;
|
|
93206
93211
|
var grpc = require_src77();
|
|
93207
|
-
function createServiceClientConstructor(
|
|
93212
|
+
function createServiceClientConstructor(path2, name) {
|
|
93208
93213
|
const serviceDefinition = {
|
|
93209
93214
|
export: {
|
|
93210
|
-
path,
|
|
93215
|
+
path: path2,
|
|
93211
93216
|
requestStream: false,
|
|
93212
93217
|
responseStream: false,
|
|
93213
93218
|
requestSerialize: (arg) => {
|
|
@@ -93411,7 +93416,7 @@ var require_otlp_grpc_env_configuration = __commonJS((exports) => {
|
|
|
93411
93416
|
var grpc_exporter_transport_1 = require_grpc_exporter_transport();
|
|
93412
93417
|
var node_http_1 = require_index_node_http();
|
|
93413
93418
|
var fs = __require("fs");
|
|
93414
|
-
var
|
|
93419
|
+
var path2 = __require("path");
|
|
93415
93420
|
var api_1 = require_src();
|
|
93416
93421
|
function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
|
|
93417
93422
|
if (signalSpecific != null && signalSpecific !== "") {
|
|
@@ -93460,7 +93465,7 @@ var require_otlp_grpc_env_configuration = __commonJS((exports) => {
|
|
|
93460
93465
|
const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
|
|
93461
93466
|
if (filePath != null) {
|
|
93462
93467
|
try {
|
|
93463
|
-
return fs.readFileSync(
|
|
93468
|
+
return fs.readFileSync(path2.resolve(process.cwd(), filePath));
|
|
93464
93469
|
} catch {
|
|
93465
93470
|
api_1.diag.warn(warningMessage);
|
|
93466
93471
|
return;
|
|
@@ -104702,27 +104707,27 @@ var require_util7 = __commonJS((exports) => {
|
|
|
104702
104707
|
};
|
|
104703
104708
|
}
|
|
104704
104709
|
var normalize = lruMemoize(function normalize(aPath) {
|
|
104705
|
-
var
|
|
104710
|
+
var path2 = aPath;
|
|
104706
104711
|
var url2 = urlParse(aPath);
|
|
104707
104712
|
if (url2) {
|
|
104708
104713
|
if (!url2.path) {
|
|
104709
104714
|
return aPath;
|
|
104710
104715
|
}
|
|
104711
|
-
|
|
104716
|
+
path2 = url2.path;
|
|
104712
104717
|
}
|
|
104713
|
-
var isAbsolute = exports.isAbsolute(
|
|
104718
|
+
var isAbsolute = exports.isAbsolute(path2);
|
|
104714
104719
|
var parts = [];
|
|
104715
104720
|
var start = 0;
|
|
104716
104721
|
var i = 0;
|
|
104717
104722
|
while (true) {
|
|
104718
104723
|
start = i;
|
|
104719
|
-
i =
|
|
104724
|
+
i = path2.indexOf("/", start);
|
|
104720
104725
|
if (i === -1) {
|
|
104721
|
-
parts.push(
|
|
104726
|
+
parts.push(path2.slice(start));
|
|
104722
104727
|
break;
|
|
104723
104728
|
} else {
|
|
104724
|
-
parts.push(
|
|
104725
|
-
while (i <
|
|
104729
|
+
parts.push(path2.slice(start, i));
|
|
104730
|
+
while (i < path2.length && path2[i] === "/") {
|
|
104726
104731
|
i++;
|
|
104727
104732
|
}
|
|
104728
104733
|
}
|
|
@@ -104743,15 +104748,15 @@ var require_util7 = __commonJS((exports) => {
|
|
|
104743
104748
|
}
|
|
104744
104749
|
}
|
|
104745
104750
|
}
|
|
104746
|
-
|
|
104747
|
-
if (
|
|
104748
|
-
|
|
104751
|
+
path2 = parts.join("/");
|
|
104752
|
+
if (path2 === "") {
|
|
104753
|
+
path2 = isAbsolute ? "/" : ".";
|
|
104749
104754
|
}
|
|
104750
104755
|
if (url2) {
|
|
104751
|
-
url2.path =
|
|
104756
|
+
url2.path = path2;
|
|
104752
104757
|
return urlGenerate(url2);
|
|
104753
104758
|
}
|
|
104754
|
-
return
|
|
104759
|
+
return path2;
|
|
104755
104760
|
});
|
|
104756
104761
|
exports.normalize = normalize;
|
|
104757
104762
|
function join(aRoot, aPath) {
|
|
@@ -106440,11 +106445,11 @@ var require_previous_map = __commonJS((exports, module) => {
|
|
|
106440
106445
|
this.annotation = this.getAnnotationURL(css.substring(start, end));
|
|
106441
106446
|
}
|
|
106442
106447
|
}
|
|
106443
|
-
loadFile(
|
|
106444
|
-
this.root = dirname(
|
|
106445
|
-
if (existsSync(
|
|
106446
|
-
this.mapFile =
|
|
106447
|
-
return readFileSync(
|
|
106448
|
+
loadFile(path2) {
|
|
106449
|
+
this.root = dirname(path2);
|
|
106450
|
+
if (existsSync(path2)) {
|
|
106451
|
+
this.mapFile = path2;
|
|
106452
|
+
return readFileSync(path2, "utf-8").toString().trim();
|
|
106448
106453
|
}
|
|
106449
106454
|
}
|
|
106450
106455
|
loadMap(file2, prev) {
|
|
@@ -107140,9 +107145,9 @@ var require_map_generator = __commonJS((exports, module) => {
|
|
|
107140
107145
|
if (typeof this.mapOpts.annotation === "string") {
|
|
107141
107146
|
from = dirname(resolve(from, this.mapOpts.annotation));
|
|
107142
107147
|
}
|
|
107143
|
-
let
|
|
107144
|
-
this.memoizedPaths.set(file2,
|
|
107145
|
-
return
|
|
107148
|
+
let path2 = relative(from, file2);
|
|
107149
|
+
this.memoizedPaths.set(file2, path2);
|
|
107150
|
+
return path2;
|
|
107146
107151
|
}
|
|
107147
107152
|
previous() {
|
|
107148
107153
|
if (!this.previousMaps) {
|
|
@@ -107198,27 +107203,27 @@ var require_map_generator = __commonJS((exports, module) => {
|
|
|
107198
107203
|
return window.btoa(unescape(encodeURIComponent(str)));
|
|
107199
107204
|
}
|
|
107200
107205
|
}
|
|
107201
|
-
toFileUrl(
|
|
107202
|
-
let cached2 = this.memoizedFileURLs.get(
|
|
107206
|
+
toFileUrl(path2) {
|
|
107207
|
+
let cached2 = this.memoizedFileURLs.get(path2);
|
|
107203
107208
|
if (cached2)
|
|
107204
107209
|
return cached2;
|
|
107205
107210
|
if (pathToFileURL) {
|
|
107206
|
-
let fileURL = pathToFileURL(
|
|
107207
|
-
this.memoizedFileURLs.set(
|
|
107211
|
+
let fileURL = pathToFileURL(path2).toString();
|
|
107212
|
+
this.memoizedFileURLs.set(path2, fileURL);
|
|
107208
107213
|
return fileURL;
|
|
107209
107214
|
} else {
|
|
107210
107215
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
107211
107216
|
}
|
|
107212
107217
|
}
|
|
107213
|
-
toUrl(
|
|
107214
|
-
let cached2 = this.memoizedURLs.get(
|
|
107218
|
+
toUrl(path2) {
|
|
107219
|
+
let cached2 = this.memoizedURLs.get(path2);
|
|
107215
107220
|
if (cached2)
|
|
107216
107221
|
return cached2;
|
|
107217
107222
|
if (sep === "\\") {
|
|
107218
|
-
|
|
107223
|
+
path2 = path2.replace(/\\/g, "/");
|
|
107219
107224
|
}
|
|
107220
|
-
let url2 = encodeURI(
|
|
107221
|
-
this.memoizedURLs.set(
|
|
107225
|
+
let url2 = encodeURI(path2).replace(/[#?]/g, encodeURIComponent);
|
|
107226
|
+
this.memoizedURLs.set(path2, url2);
|
|
107222
107227
|
return url2;
|
|
107223
107228
|
}
|
|
107224
107229
|
}
|
|
@@ -116100,9 +116105,9 @@ class Sanitization {
|
|
|
116100
116105
|
if (isServerless || !pathModule) {
|
|
116101
116106
|
throw new McpError(-32603 /* InternalError */, "File-based path sanitization is not supported in this environment.");
|
|
116102
116107
|
}
|
|
116103
|
-
const
|
|
116108
|
+
const path2 = pathModule;
|
|
116104
116109
|
const originalInput = input;
|
|
116105
|
-
const resolvedRootDir = options.rootDir ?
|
|
116110
|
+
const resolvedRootDir = options.rootDir ? path2.resolve(options.rootDir) : undefined;
|
|
116106
116111
|
const effectiveOptions = {
|
|
116107
116112
|
toPosix: options.toPosix ?? false,
|
|
116108
116113
|
allowAbsolute: options.allowAbsolute ?? false,
|
|
@@ -116114,33 +116119,40 @@ class Sanitization {
|
|
|
116114
116119
|
throw new Error("Invalid path input: must be a non-empty string.");
|
|
116115
116120
|
if (input.includes("\x00"))
|
|
116116
116121
|
throw new Error("Path contains null byte, which is disallowed.");
|
|
116117
|
-
let normalized =
|
|
116118
|
-
wasAbsoluteInitially =
|
|
116122
|
+
let normalized = path2.normalize(input);
|
|
116123
|
+
wasAbsoluteInitially = path2.isAbsolute(normalized);
|
|
116119
116124
|
if (effectiveOptions.toPosix) {
|
|
116120
116125
|
normalized = normalized.replace(/\\/g, "/");
|
|
116121
116126
|
}
|
|
116122
116127
|
let finalSanitizedPath;
|
|
116123
116128
|
if (resolvedRootDir) {
|
|
116124
|
-
|
|
116125
|
-
if (
|
|
116129
|
+
let fullPath;
|
|
116130
|
+
if (path2.isAbsolute(normalized)) {
|
|
116131
|
+
fullPath = path2.normalize(normalized);
|
|
116132
|
+
} else {
|
|
116133
|
+
fullPath = path2.resolve(resolvedRootDir, normalized);
|
|
116134
|
+
}
|
|
116135
|
+
const normalizedRoot = path2.normalize(resolvedRootDir);
|
|
116136
|
+
const normalizedFull = path2.normalize(fullPath);
|
|
116137
|
+
if (!normalizedFull.startsWith(normalizedRoot + path2.sep) && normalizedFull !== normalizedRoot) {
|
|
116126
116138
|
throw new Error("Path traversal detected: attempts to escape the defined root directory.");
|
|
116127
116139
|
}
|
|
116128
|
-
finalSanitizedPath =
|
|
116140
|
+
finalSanitizedPath = path2.relative(normalizedRoot, normalizedFull);
|
|
116129
116141
|
finalSanitizedPath = finalSanitizedPath === "" ? "." : finalSanitizedPath;
|
|
116130
|
-
if (
|
|
116142
|
+
if (path2.isAbsolute(finalSanitizedPath) && !effectiveOptions.allowAbsolute) {
|
|
116131
116143
|
throw new Error("Path resolved to absolute outside root when absolute paths are disallowed.");
|
|
116132
116144
|
}
|
|
116133
116145
|
} else {
|
|
116134
|
-
if (
|
|
116146
|
+
if (path2.isAbsolute(normalized)) {
|
|
116135
116147
|
if (!effectiveOptions.allowAbsolute) {
|
|
116136
116148
|
throw new Error("Absolute paths are disallowed by current options.");
|
|
116137
116149
|
} else {
|
|
116138
116150
|
finalSanitizedPath = normalized;
|
|
116139
116151
|
}
|
|
116140
116152
|
} else {
|
|
116141
|
-
const resolvedAgainstCwd =
|
|
116142
|
-
const currentWorkingDir =
|
|
116143
|
-
if (!resolvedAgainstCwd.startsWith(currentWorkingDir +
|
|
116153
|
+
const resolvedAgainstCwd = path2.resolve(normalized);
|
|
116154
|
+
const currentWorkingDir = path2.resolve(".");
|
|
116155
|
+
if (!resolvedAgainstCwd.startsWith(currentWorkingDir + path2.sep) && resolvedAgainstCwd !== currentWorkingDir) {
|
|
116144
116156
|
throw new Error("Relative path traversal detected (escapes current working directory context).");
|
|
116145
116157
|
}
|
|
116146
116158
|
finalSanitizedPath = normalized;
|
|
@@ -116150,7 +116162,7 @@ class Sanitization {
|
|
|
116150
116162
|
sanitizedPath: finalSanitizedPath,
|
|
116151
116163
|
originalInput,
|
|
116152
116164
|
wasAbsolute: wasAbsoluteInitially,
|
|
116153
|
-
convertedToRelative: wasAbsoluteInitially && !
|
|
116165
|
+
convertedToRelative: wasAbsoluteInitially && !path2.isAbsolute(finalSanitizedPath) && !effectiveOptions.allowAbsolute,
|
|
116154
116166
|
optionsUsed: effectiveOptions
|
|
116155
116167
|
};
|
|
116156
116168
|
} catch (error46) {
|
|
@@ -116348,7 +116360,7 @@ var init_logger = __esm(() => {
|
|
|
116348
116360
|
return pino(pinoOptions);
|
|
116349
116361
|
}
|
|
116350
116362
|
const { default: fs } = await import("fs");
|
|
116351
|
-
const { default:
|
|
116363
|
+
const { default: path2 } = await import("path");
|
|
116352
116364
|
const transports = [];
|
|
116353
116365
|
const isDevelopment = config2.environment === "development";
|
|
116354
116366
|
const isTest = config2.environment === "testing";
|
|
@@ -116381,7 +116393,7 @@ var init_logger = __esm(() => {
|
|
|
116381
116393
|
level: pinoLevel,
|
|
116382
116394
|
target: "pino/file",
|
|
116383
116395
|
options: {
|
|
116384
|
-
destination:
|
|
116396
|
+
destination: path2.join(config2.logsPath, "combined.log"),
|
|
116385
116397
|
mkdir: true
|
|
116386
116398
|
}
|
|
116387
116399
|
});
|
|
@@ -116389,7 +116401,7 @@ var init_logger = __esm(() => {
|
|
|
116389
116401
|
level: "error",
|
|
116390
116402
|
target: "pino/file",
|
|
116391
116403
|
options: {
|
|
116392
|
-
destination:
|
|
116404
|
+
destination: path2.join(config2.logsPath, "error.log"),
|
|
116393
116405
|
mkdir: true
|
|
116394
116406
|
}
|
|
116395
116407
|
});
|
|
@@ -116404,12 +116416,12 @@ var init_logger = __esm(() => {
|
|
|
116404
116416
|
async createInteractionLogger() {
|
|
116405
116417
|
if (isServerless2 || !config2.logsPath)
|
|
116406
116418
|
return;
|
|
116407
|
-
const { default:
|
|
116419
|
+
const { default: path2 } = await import("path");
|
|
116408
116420
|
return pino({
|
|
116409
116421
|
transport: {
|
|
116410
116422
|
target: "pino/file",
|
|
116411
116423
|
options: {
|
|
116412
|
-
destination:
|
|
116424
|
+
destination: path2.join(config2.logsPath, "interactions.log"),
|
|
116413
116425
|
mkdir: true
|
|
116414
116426
|
}
|
|
116415
116427
|
}
|
|
@@ -142303,14 +142315,14 @@ var require_svgPath = __commonJS((exports) => {
|
|
|
142303
142315
|
["Z", 0],
|
|
142304
142316
|
["z", 0]
|
|
142305
142317
|
]);
|
|
142306
|
-
var parse6 = function(
|
|
142318
|
+
var parse6 = function(path2) {
|
|
142307
142319
|
var cmd;
|
|
142308
142320
|
var ret = [];
|
|
142309
142321
|
var args = [];
|
|
142310
142322
|
var curArg = "";
|
|
142311
142323
|
var foundDecimal = false;
|
|
142312
142324
|
var params = 0;
|
|
142313
|
-
for (var _i = 0, path_1 =
|
|
142325
|
+
for (var _i = 0, path_1 = path2;_i < path_1.length; _i++) {
|
|
142314
142326
|
var c = path_1[_i];
|
|
142315
142327
|
if (parameters.has(c)) {
|
|
142316
142328
|
params = parameters.get(c);
|
|
@@ -142624,8 +142636,8 @@ var require_svgPath = __commonJS((exports) => {
|
|
|
142624
142636
|
];
|
|
142625
142637
|
return result;
|
|
142626
142638
|
};
|
|
142627
|
-
exports.svgPathToOperators = function(
|
|
142628
|
-
return apply(parse6(
|
|
142639
|
+
exports.svgPathToOperators = function(path2) {
|
|
142640
|
+
return apply(parse6(path2));
|
|
142629
142641
|
};
|
|
142630
142642
|
});
|
|
142631
142643
|
|
|
@@ -142803,7 +142815,7 @@ var require_operations = __commonJS((exports) => {
|
|
|
142803
142815
|
operators_1.popGraphicsState()
|
|
142804
142816
|
]).filter(Boolean);
|
|
142805
142817
|
};
|
|
142806
|
-
exports.drawSvgPath = function(
|
|
142818
|
+
exports.drawSvgPath = function(path2, options) {
|
|
142807
142819
|
var _a2, _b, _c;
|
|
142808
142820
|
return tslib_1.__spreadArrays([
|
|
142809
142821
|
operators_1.pushGraphicsState(),
|
|
@@ -142816,7 +142828,7 @@ var require_operations = __commonJS((exports) => {
|
|
|
142816
142828
|
options.borderWidth && operators_1.setLineWidth(options.borderWidth),
|
|
142817
142829
|
options.borderLineCap && operators_1.setLineCap(options.borderLineCap),
|
|
142818
142830
|
operators_1.setDashPattern((_b = options.borderDashArray) !== null && _b !== undefined ? _b : [], (_c = options.borderDashPhase) !== null && _c !== undefined ? _c : 0)
|
|
142819
|
-
], svgPath_1.svgPathToOperators(
|
|
142831
|
+
], svgPath_1.svgPathToOperators(path2), [
|
|
142820
142832
|
options.color && options.borderWidth ? operators_1.fillAndStroke() : options.color ? operators_1.fill() : options.borderColor ? operators_1.stroke() : operators_1.closePath(),
|
|
142821
142833
|
operators_1.popGraphicsState()
|
|
142822
142834
|
]).filter(Boolean);
|
|
@@ -146928,12 +146940,12 @@ var require_PDFPage = __commonJS((exports) => {
|
|
|
146928
146940
|
graphicsState: graphicsStateKey
|
|
146929
146941
|
}));
|
|
146930
146942
|
};
|
|
146931
|
-
PDFPage2.prototype.drawSvgPath = function(
|
|
146943
|
+
PDFPage2.prototype.drawSvgPath = function(path2, options) {
|
|
146932
146944
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146933
146945
|
if (options === undefined) {
|
|
146934
146946
|
options = {};
|
|
146935
146947
|
}
|
|
146936
|
-
utils_1.assertIs(
|
|
146948
|
+
utils_1.assertIs(path2, "path", ["string"]);
|
|
146937
146949
|
utils_1.assertOrUndefined(options.x, "options.x", ["number"]);
|
|
146938
146950
|
utils_1.assertOrUndefined(options.y, "options.y", ["number"]);
|
|
146939
146951
|
utils_1.assertOrUndefined(options.scale, "options.scale", ["number"]);
|
|
@@ -146962,7 +146974,7 @@ var require_PDFPage = __commonJS((exports) => {
|
|
|
146962
146974
|
options.borderColor = colors_1.rgb(0, 0, 0);
|
|
146963
146975
|
}
|
|
146964
146976
|
var contentStream = this.getContentStream();
|
|
146965
|
-
contentStream.push.apply(contentStream, operations_1.drawSvgPath(
|
|
146977
|
+
contentStream.push.apply(contentStream, operations_1.drawSvgPath(path2, {
|
|
146966
146978
|
x: (_a2 = options.x) !== null && _a2 !== undefined ? _a2 : this.x,
|
|
146967
146979
|
y: (_b = options.y) !== null && _b !== undefined ? _b : this.y,
|
|
146968
146980
|
scale: options.scale,
|
|
@@ -148766,14 +148778,14 @@ var require_dependency_container = __commonJS((exports) => {
|
|
|
148766
148778
|
provider = providerOrConstructor;
|
|
148767
148779
|
}
|
|
148768
148780
|
if (providers_1.isTokenProvider(provider)) {
|
|
148769
|
-
const
|
|
148781
|
+
const path2 = [token];
|
|
148770
148782
|
let tokenProvider = provider;
|
|
148771
148783
|
while (tokenProvider != null) {
|
|
148772
148784
|
const currentToken = tokenProvider.useToken;
|
|
148773
|
-
if (
|
|
148774
|
-
throw new Error(`Token registration cycle detected! ${[...
|
|
148785
|
+
if (path2.includes(currentToken)) {
|
|
148786
|
+
throw new Error(`Token registration cycle detected! ${[...path2, currentToken].join(" -> ")}`);
|
|
148775
148787
|
}
|
|
148776
|
-
|
|
148788
|
+
path2.push(currentToken);
|
|
148777
148789
|
const registration = this._registry.get(currentToken);
|
|
148778
148790
|
if (registration && providers_1.isTokenProvider(registration.provider)) {
|
|
148779
148791
|
tokenProvider = registration.provider;
|
|
@@ -151639,13 +151651,13 @@ var require_tslib3 = __commonJS((exports, module) => {
|
|
|
151639
151651
|
}
|
|
151640
151652
|
return next();
|
|
151641
151653
|
};
|
|
151642
|
-
__rewriteRelativeImportExtension = function(
|
|
151643
|
-
if (typeof
|
|
151644
|
-
return
|
|
151654
|
+
__rewriteRelativeImportExtension = function(path2, preserveJsx) {
|
|
151655
|
+
if (typeof path2 === "string" && /^\.\.?\//.test(path2)) {
|
|
151656
|
+
return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
151645
151657
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
151646
151658
|
});
|
|
151647
151659
|
}
|
|
151648
|
-
return
|
|
151660
|
+
return path2;
|
|
151649
151661
|
};
|
|
151650
151662
|
exporter("__extends", __extends);
|
|
151651
151663
|
exporter("__assign", __assign);
|
|
@@ -154709,7 +154721,7 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154709
154721
|
this.shouldThrowOnError = true;
|
|
154710
154722
|
return this;
|
|
154711
154723
|
}
|
|
154712
|
-
uploadOrUpdate(method,
|
|
154724
|
+
uploadOrUpdate(method, path2, fileBody, fileOptions) {
|
|
154713
154725
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154714
154726
|
try {
|
|
154715
154727
|
let body;
|
|
@@ -154746,7 +154758,7 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154746
154758
|
if (fileOptions === null || fileOptions === undefined ? undefined : fileOptions.headers) {
|
|
154747
154759
|
headers = Object.assign(Object.assign({}, headers), fileOptions.headers);
|
|
154748
154760
|
}
|
|
154749
|
-
const cleanPath = this._removeEmptyFolders(
|
|
154761
|
+
const cleanPath = this._removeEmptyFolders(path2);
|
|
154750
154762
|
const _path = this._getFinalPath(cleanPath);
|
|
154751
154763
|
const data = yield (method == "PUT" ? fetch_1.put : fetch_1.post)(this.fetch, `${this.url}/object/${_path}`, body, Object.assign({ headers }, (options === null || options === undefined ? undefined : options.duplex) ? { duplex: options.duplex } : {}));
|
|
154752
154764
|
return {
|
|
@@ -154764,14 +154776,14 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154764
154776
|
}
|
|
154765
154777
|
});
|
|
154766
154778
|
}
|
|
154767
|
-
upload(
|
|
154779
|
+
upload(path2, fileBody, fileOptions) {
|
|
154768
154780
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154769
|
-
return this.uploadOrUpdate("POST",
|
|
154781
|
+
return this.uploadOrUpdate("POST", path2, fileBody, fileOptions);
|
|
154770
154782
|
});
|
|
154771
154783
|
}
|
|
154772
|
-
uploadToSignedUrl(
|
|
154784
|
+
uploadToSignedUrl(path2, token, fileBody, fileOptions) {
|
|
154773
154785
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154774
|
-
const cleanPath = this._removeEmptyFolders(
|
|
154786
|
+
const cleanPath = this._removeEmptyFolders(path2);
|
|
154775
154787
|
const _path = this._getFinalPath(cleanPath);
|
|
154776
154788
|
const url2 = new URL(this.url + `/object/upload/sign/${_path}`);
|
|
154777
154789
|
url2.searchParams.set("token", token);
|
|
@@ -154807,10 +154819,10 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154807
154819
|
}
|
|
154808
154820
|
});
|
|
154809
154821
|
}
|
|
154810
|
-
createSignedUploadUrl(
|
|
154822
|
+
createSignedUploadUrl(path2, options) {
|
|
154811
154823
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154812
154824
|
try {
|
|
154813
|
-
let _path = this._getFinalPath(
|
|
154825
|
+
let _path = this._getFinalPath(path2);
|
|
154814
154826
|
const headers = Object.assign({}, this.headers);
|
|
154815
154827
|
if (options === null || options === undefined ? undefined : options.upsert) {
|
|
154816
154828
|
headers["x-upsert"] = "true";
|
|
@@ -154821,7 +154833,7 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154821
154833
|
if (!token) {
|
|
154822
154834
|
throw new errors_1.StorageError("No token returned by API");
|
|
154823
154835
|
}
|
|
154824
|
-
return { data: { signedUrl: url2.toString(), path, token }, error: null };
|
|
154836
|
+
return { data: { signedUrl: url2.toString(), path: path2, token }, error: null };
|
|
154825
154837
|
} catch (error46) {
|
|
154826
154838
|
if (this.shouldThrowOnError) {
|
|
154827
154839
|
throw error46;
|
|
@@ -154833,9 +154845,9 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154833
154845
|
}
|
|
154834
154846
|
});
|
|
154835
154847
|
}
|
|
154836
|
-
update(
|
|
154848
|
+
update(path2, fileBody, fileOptions) {
|
|
154837
154849
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154838
|
-
return this.uploadOrUpdate("PUT",
|
|
154850
|
+
return this.uploadOrUpdate("PUT", path2, fileBody, fileOptions);
|
|
154839
154851
|
});
|
|
154840
154852
|
}
|
|
154841
154853
|
move(fromPath, toPath, options) {
|
|
@@ -154880,10 +154892,10 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154880
154892
|
}
|
|
154881
154893
|
});
|
|
154882
154894
|
}
|
|
154883
|
-
createSignedUrl(
|
|
154895
|
+
createSignedUrl(path2, expiresIn, options) {
|
|
154884
154896
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154885
154897
|
try {
|
|
154886
|
-
let _path = this._getFinalPath(
|
|
154898
|
+
let _path = this._getFinalPath(path2);
|
|
154887
154899
|
let data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/sign/${_path}`, Object.assign({ expiresIn }, (options === null || options === undefined ? undefined : options.transform) ? { transform: options.transform } : {}), { headers: this.headers });
|
|
154888
154900
|
const downloadQueryParam = (options === null || options === undefined ? undefined : options.download) ? `&download=${options.download === true ? "" : options.download}` : "";
|
|
154889
154901
|
const signedUrl = encodeURI(`${this.url}${data.signedURL}${downloadQueryParam}`);
|
|
@@ -154920,21 +154932,21 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154920
154932
|
}
|
|
154921
154933
|
});
|
|
154922
154934
|
}
|
|
154923
|
-
download(
|
|
154935
|
+
download(path2, options) {
|
|
154924
154936
|
const wantsTransformation = typeof (options === null || options === undefined ? undefined : options.transform) !== "undefined";
|
|
154925
154937
|
const renderPath = wantsTransformation ? "render/image/authenticated" : "object";
|
|
154926
154938
|
const transformationQuery = this.transformOptsToQueryString((options === null || options === undefined ? undefined : options.transform) || {});
|
|
154927
154939
|
const queryString = transformationQuery ? `?${transformationQuery}` : "";
|
|
154928
|
-
const _path = this._getFinalPath(
|
|
154940
|
+
const _path = this._getFinalPath(path2);
|
|
154929
154941
|
const downloadFn = () => (0, fetch_1.get)(this.fetch, `${this.url}/${renderPath}/${_path}${queryString}`, {
|
|
154930
154942
|
headers: this.headers,
|
|
154931
154943
|
noResolveJson: true
|
|
154932
154944
|
});
|
|
154933
154945
|
return new BlobDownloadBuilder_1.default(downloadFn, this.shouldThrowOnError);
|
|
154934
154946
|
}
|
|
154935
|
-
info(
|
|
154947
|
+
info(path2) {
|
|
154936
154948
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154937
|
-
const _path = this._getFinalPath(
|
|
154949
|
+
const _path = this._getFinalPath(path2);
|
|
154938
154950
|
try {
|
|
154939
154951
|
const data = yield (0, fetch_1.get)(this.fetch, `${this.url}/object/info/${_path}`, {
|
|
154940
154952
|
headers: this.headers
|
|
@@ -154951,9 +154963,9 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154951
154963
|
}
|
|
154952
154964
|
});
|
|
154953
154965
|
}
|
|
154954
|
-
exists(
|
|
154966
|
+
exists(path2) {
|
|
154955
154967
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
154956
|
-
const _path = this._getFinalPath(
|
|
154968
|
+
const _path = this._getFinalPath(path2);
|
|
154957
154969
|
try {
|
|
154958
154970
|
yield (0, fetch_1.head)(this.fetch, `${this.url}/object/${_path}`, {
|
|
154959
154971
|
headers: this.headers
|
|
@@ -154973,8 +154985,8 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
154973
154985
|
}
|
|
154974
154986
|
});
|
|
154975
154987
|
}
|
|
154976
|
-
getPublicUrl(
|
|
154977
|
-
const _path = this._getFinalPath(
|
|
154988
|
+
getPublicUrl(path2, options) {
|
|
154989
|
+
const _path = this._getFinalPath(path2);
|
|
154978
154990
|
const _queryString = [];
|
|
154979
154991
|
const downloadQueryParam = (options === null || options === undefined ? undefined : options.download) ? `download=${options.download === true ? "" : options.download}` : "";
|
|
154980
154992
|
if (downloadQueryParam !== "") {
|
|
@@ -155010,10 +155022,10 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
155010
155022
|
}
|
|
155011
155023
|
});
|
|
155012
155024
|
}
|
|
155013
|
-
list(
|
|
155025
|
+
list(path2, options, parameters) {
|
|
155014
155026
|
return tslib_1.__awaiter(this, undefined, undefined, function* () {
|
|
155015
155027
|
try {
|
|
155016
|
-
const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix:
|
|
155028
|
+
const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix: path2 || "" });
|
|
155017
155029
|
const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/list/${this.bucketId}`, body, { headers: this.headers }, parameters);
|
|
155018
155030
|
return { data, error: null };
|
|
155019
155031
|
} catch (error46) {
|
|
@@ -155053,11 +155065,11 @@ var require_StorageFileApi = __commonJS((exports) => {
|
|
|
155053
155065
|
}
|
|
155054
155066
|
return btoa(data);
|
|
155055
155067
|
}
|
|
155056
|
-
_getFinalPath(
|
|
155057
|
-
return `${this.bucketId}/${
|
|
155068
|
+
_getFinalPath(path2) {
|
|
155069
|
+
return `${this.bucketId}/${path2.replace(/^\/+/, "")}`;
|
|
155058
155070
|
}
|
|
155059
|
-
_removeEmptyFolders(
|
|
155060
|
-
return
|
|
155071
|
+
_removeEmptyFolders(path2) {
|
|
155072
|
+
return path2.replace(/^\/|\/$/g, "").replace(/\/+/g, "/");
|
|
155061
155073
|
}
|
|
155062
155074
|
transformOptsToQueryString(transform2) {
|
|
155063
155075
|
const params = [];
|
|
@@ -155287,8 +155299,8 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
155287
155299
|
return this.status === 419;
|
|
155288
155300
|
}
|
|
155289
155301
|
};
|
|
155290
|
-
function buildUrl(baseUrl,
|
|
155291
|
-
const url2 = new URL(
|
|
155302
|
+
function buildUrl(baseUrl, path2, query) {
|
|
155303
|
+
const url2 = new URL(path2, baseUrl);
|
|
155292
155304
|
if (query) {
|
|
155293
155305
|
for (const [key, value] of Object.entries(query)) {
|
|
155294
155306
|
if (value !== undefined) {
|
|
@@ -155318,12 +155330,12 @@ var require_dist5 = __commonJS((exports) => {
|
|
|
155318
155330
|
return {
|
|
155319
155331
|
async request({
|
|
155320
155332
|
method,
|
|
155321
|
-
path,
|
|
155333
|
+
path: path2,
|
|
155322
155334
|
query,
|
|
155323
155335
|
body,
|
|
155324
155336
|
headers
|
|
155325
155337
|
}) {
|
|
155326
|
-
const url2 = buildUrl(options.baseUrl,
|
|
155338
|
+
const url2 = buildUrl(options.baseUrl, path2, query);
|
|
155327
155339
|
const authHeaders = await buildAuthHeaders(options.auth);
|
|
155328
155340
|
const res = await fetchFn(url2, {
|
|
155329
155341
|
method,
|
|
@@ -164228,8 +164240,8 @@ var require_utils52 = __commonJS((exports, module) => {
|
|
|
164228
164240
|
}
|
|
164229
164241
|
return ind;
|
|
164230
164242
|
}
|
|
164231
|
-
function removeDotSegments(
|
|
164232
|
-
let input =
|
|
164243
|
+
function removeDotSegments(path4) {
|
|
164244
|
+
let input = path4;
|
|
164233
164245
|
const output = [];
|
|
164234
164246
|
let nextSlash = -1;
|
|
164235
164247
|
let len = 0;
|
|
@@ -164419,8 +164431,8 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
164419
164431
|
wsComponent.secure = undefined;
|
|
164420
164432
|
}
|
|
164421
164433
|
if (wsComponent.resourceName) {
|
|
164422
|
-
const [
|
|
164423
|
-
wsComponent.path =
|
|
164434
|
+
const [path4, query] = wsComponent.resourceName.split("?");
|
|
164435
|
+
wsComponent.path = path4 && path4 !== "/" ? path4 : undefined;
|
|
164424
164436
|
wsComponent.query = query;
|
|
164425
164437
|
wsComponent.resourceName = undefined;
|
|
164426
164438
|
}
|
|
@@ -168151,18 +168163,18 @@ async function executeGitCommand(args, cwd) {
|
|
|
168151
168163
|
|
|
168152
168164
|
// src/services/git/providers/cli/utils/git-validators.ts
|
|
168153
168165
|
init_errors3();
|
|
168154
|
-
async function validateGitRepository(
|
|
168166
|
+
async function validateGitRepository(path2, _context) {
|
|
168155
168167
|
try {
|
|
168156
|
-
const result = await executeGitCommand(["rev-parse", "--is-inside-work-tree"],
|
|
168168
|
+
const result = await executeGitCommand(["rev-parse", "--is-inside-work-tree"], path2);
|
|
168157
168169
|
if (result.stdout.trim() !== "true") {
|
|
168158
|
-
throw new McpError(-32007 /* ValidationError */, `Not a git repository: ${
|
|
168170
|
+
throw new McpError(-32007 /* ValidationError */, `Not a git repository: ${path2}`);
|
|
168159
168171
|
}
|
|
168160
168172
|
return true;
|
|
168161
168173
|
} catch (error46) {
|
|
168162
168174
|
if (error46 instanceof McpError) {
|
|
168163
168175
|
throw error46;
|
|
168164
168176
|
}
|
|
168165
|
-
throw new McpError(-32007 /* ValidationError */, `Not a git repository: ${
|
|
168177
|
+
throw new McpError(-32007 /* ValidationError */, `Not a git repository: ${path2}`);
|
|
168166
168178
|
}
|
|
168167
168179
|
}
|
|
168168
168180
|
|
|
@@ -168204,30 +168216,30 @@ function parseGitStatus(output) {
|
|
|
168204
168216
|
const statusType = parts[0];
|
|
168205
168217
|
if (statusType === "1") {
|
|
168206
168218
|
const xy = parts[1];
|
|
168207
|
-
const
|
|
168219
|
+
const path2 = parts.slice(8).join(" ").trim();
|
|
168208
168220
|
const stagedStatus = xy?.[0];
|
|
168209
168221
|
const unstagedStatus = xy?.[1];
|
|
168210
168222
|
if (stagedStatus && stagedStatus !== ".") {
|
|
168211
168223
|
if (!result.stagedChanges)
|
|
168212
168224
|
result.stagedChanges = {};
|
|
168213
168225
|
if (stagedStatus === "A")
|
|
168214
|
-
(result.stagedChanges.added ??= []).push(
|
|
168226
|
+
(result.stagedChanges.added ??= []).push(path2);
|
|
168215
168227
|
if (stagedStatus === "M")
|
|
168216
|
-
(result.stagedChanges.modified ??= []).push(
|
|
168228
|
+
(result.stagedChanges.modified ??= []).push(path2);
|
|
168217
168229
|
if (stagedStatus === "D")
|
|
168218
|
-
(result.stagedChanges.deleted ??= []).push(
|
|
168230
|
+
(result.stagedChanges.deleted ??= []).push(path2);
|
|
168219
168231
|
if (stagedStatus === "R")
|
|
168220
|
-
(result.stagedChanges.renamed ??= []).push(
|
|
168232
|
+
(result.stagedChanges.renamed ??= []).push(path2);
|
|
168221
168233
|
if (stagedStatus === "C")
|
|
168222
|
-
(result.stagedChanges.copied ??= []).push(
|
|
168234
|
+
(result.stagedChanges.copied ??= []).push(path2);
|
|
168223
168235
|
}
|
|
168224
168236
|
if (unstagedStatus && unstagedStatus !== ".") {
|
|
168225
168237
|
if (!result.unstagedChanges)
|
|
168226
168238
|
result.unstagedChanges = {};
|
|
168227
168239
|
if (unstagedStatus === "M")
|
|
168228
|
-
(result.unstagedChanges.modified ??= []).push(
|
|
168240
|
+
(result.unstagedChanges.modified ??= []).push(path2);
|
|
168229
168241
|
if (unstagedStatus === "D")
|
|
168230
|
-
(result.unstagedChanges.deleted ??= []).push(
|
|
168242
|
+
(result.unstagedChanges.deleted ??= []).push(path2);
|
|
168231
168243
|
}
|
|
168232
168244
|
} else if (statusType === "2") {
|
|
168233
168245
|
const pathInfo = line.substring(line.indexOf("\t") + 1);
|
|
@@ -168236,11 +168248,11 @@ function parseGitStatus(output) {
|
|
|
168236
168248
|
result.stagedChanges.renamed = [];
|
|
168237
168249
|
result.stagedChanges.renamed.push(`${oldPath} -> ${newPath}`);
|
|
168238
168250
|
} else if (statusType === "u") {
|
|
168239
|
-
const
|
|
168240
|
-
result.conflictedFiles.push(
|
|
168251
|
+
const path2 = parts.slice(8).join(" ").trim();
|
|
168252
|
+
result.conflictedFiles.push(path2);
|
|
168241
168253
|
} else if (statusType === "?") {
|
|
168242
|
-
const
|
|
168243
|
-
result.untrackedFiles.push(
|
|
168254
|
+
const path2 = line.substring(2);
|
|
168255
|
+
result.untrackedFiles.push(path2);
|
|
168244
168256
|
}
|
|
168245
168257
|
}
|
|
168246
168258
|
if (result.isClean && lines.length > 0) {
|
|
@@ -168258,11 +168270,11 @@ function parseGitDiffStat(output) {
|
|
|
168258
168270
|
for (const line of lines) {
|
|
168259
168271
|
const match = line.match(/^\s*(.+?)\s*\|\s*(\d+)\s*([\+\-]*)/);
|
|
168260
168272
|
if (match) {
|
|
168261
|
-
const
|
|
168273
|
+
const path2 = match[1].trim();
|
|
168262
168274
|
const symbols = match[3] || "";
|
|
168263
168275
|
const additions = (symbols.match(/\+/g) || []).length;
|
|
168264
168276
|
const deletions = (symbols.match(/-/g) || []).length;
|
|
168265
|
-
files.push({ path, additions, deletions });
|
|
168277
|
+
files.push({ path: path2, additions, deletions });
|
|
168266
168278
|
totalAdditions += additions;
|
|
168267
168279
|
totalDeletions += deletions;
|
|
168268
168280
|
}
|
|
@@ -169818,10 +169830,10 @@ class CliGitProvider extends BaseGitProvider {
|
|
|
169818
169830
|
this.logOperationSuccess("worktree", context, { mode: result.mode });
|
|
169819
169831
|
return result;
|
|
169820
169832
|
}
|
|
169821
|
-
async validateRepository(
|
|
169822
|
-
this.logOperationStart("validateRepository", context, { path });
|
|
169823
|
-
await validateGitRepository(
|
|
169824
|
-
this.logOperationSuccess("validateRepository", context, { path });
|
|
169833
|
+
async validateRepository(path2, context) {
|
|
169834
|
+
this.logOperationStart("validateRepository", context, { path: path2 });
|
|
169835
|
+
await validateGitRepository(path2, context.requestContext);
|
|
169836
|
+
this.logOperationSuccess("validateRepository", context, { path: path2 });
|
|
169825
169837
|
}
|
|
169826
169838
|
async reset(options, context) {
|
|
169827
169839
|
this.logOperationStart("reset", context, options);
|
|
@@ -171486,7 +171498,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path(stati
|
|
|
171486
171498
|
return statics[0];
|
|
171487
171499
|
let postPath = false;
|
|
171488
171500
|
const invalidSegments = [];
|
|
171489
|
-
const
|
|
171501
|
+
const path2 = statics.reduce((previousValue, currentValue, index2) => {
|
|
171490
171502
|
if (/[?#]/.test(currentValue)) {
|
|
171491
171503
|
postPath = true;
|
|
171492
171504
|
}
|
|
@@ -171502,7 +171514,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path(stati
|
|
|
171502
171514
|
}
|
|
171503
171515
|
return previousValue + currentValue + (index2 === params.length ? "" : encoded);
|
|
171504
171516
|
}, "");
|
|
171505
|
-
const pathOnly =
|
|
171517
|
+
const pathOnly = path2.split(/[?#]/, 1)[0];
|
|
171506
171518
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
171507
171519
|
let match;
|
|
171508
171520
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -171524,17 +171536,17 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path(stati
|
|
|
171524
171536
|
throw new OpenAIError(`Path parameters result in path with invalid segments:
|
|
171525
171537
|
${invalidSegments.map((e) => e.error).join(`
|
|
171526
171538
|
`)}
|
|
171527
|
-
${
|
|
171539
|
+
${path2}
|
|
171528
171540
|
${underline}`);
|
|
171529
171541
|
}
|
|
171530
|
-
return
|
|
171542
|
+
return path2;
|
|
171531
171543
|
};
|
|
171532
|
-
var
|
|
171544
|
+
var path2 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
171533
171545
|
|
|
171534
171546
|
// node_modules/openai/resources/chat/completions/messages.mjs
|
|
171535
171547
|
class Messages extends APIResource {
|
|
171536
171548
|
list(completionID, query = {}, options) {
|
|
171537
|
-
return this._client.getAPIList(
|
|
171549
|
+
return this._client.getAPIList(path2`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
|
|
171538
171550
|
}
|
|
171539
171551
|
}
|
|
171540
171552
|
// node_modules/openai/lib/parser.mjs
|
|
@@ -172798,16 +172810,16 @@ class Completions extends APIResource {
|
|
|
172798
172810
|
return this._client.post("/chat/completions", { body, ...options, stream: body.stream ?? false });
|
|
172799
172811
|
}
|
|
172800
172812
|
retrieve(completionID, options) {
|
|
172801
|
-
return this._client.get(
|
|
172813
|
+
return this._client.get(path2`/chat/completions/${completionID}`, options);
|
|
172802
172814
|
}
|
|
172803
172815
|
update(completionID, body, options) {
|
|
172804
|
-
return this._client.post(
|
|
172816
|
+
return this._client.post(path2`/chat/completions/${completionID}`, { body, ...options });
|
|
172805
172817
|
}
|
|
172806
172818
|
list(query = {}, options) {
|
|
172807
172819
|
return this._client.getAPIList("/chat/completions", CursorPage, { query, ...options });
|
|
172808
172820
|
}
|
|
172809
172821
|
delete(completionID, options) {
|
|
172810
|
-
return this._client.delete(
|
|
172822
|
+
return this._client.delete(path2`/chat/completions/${completionID}`, options);
|
|
172811
172823
|
}
|
|
172812
172824
|
parse(body, options) {
|
|
172813
172825
|
validateInputTools(body.tools);
|
|
@@ -172951,13 +172963,13 @@ class Batches extends APIResource {
|
|
|
172951
172963
|
return this._client.post("/batches", { body, ...options });
|
|
172952
172964
|
}
|
|
172953
172965
|
retrieve(batchID, options) {
|
|
172954
|
-
return this._client.get(
|
|
172966
|
+
return this._client.get(path2`/batches/${batchID}`, options);
|
|
172955
172967
|
}
|
|
172956
172968
|
list(query = {}, options) {
|
|
172957
172969
|
return this._client.getAPIList("/batches", CursorPage, { query, ...options });
|
|
172958
172970
|
}
|
|
172959
172971
|
cancel(batchID, options) {
|
|
172960
|
-
return this._client.post(
|
|
172972
|
+
return this._client.post(path2`/batches/${batchID}/cancel`, options);
|
|
172961
172973
|
}
|
|
172962
172974
|
}
|
|
172963
172975
|
// node_modules/openai/resources/beta/assistants.mjs
|
|
@@ -172970,13 +172982,13 @@ class Assistants extends APIResource {
|
|
|
172970
172982
|
});
|
|
172971
172983
|
}
|
|
172972
172984
|
retrieve(assistantID, options) {
|
|
172973
|
-
return this._client.get(
|
|
172985
|
+
return this._client.get(path2`/assistants/${assistantID}`, {
|
|
172974
172986
|
...options,
|
|
172975
172987
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
172976
172988
|
});
|
|
172977
172989
|
}
|
|
172978
172990
|
update(assistantID, body, options) {
|
|
172979
|
-
return this._client.post(
|
|
172991
|
+
return this._client.post(path2`/assistants/${assistantID}`, {
|
|
172980
172992
|
body,
|
|
172981
172993
|
...options,
|
|
172982
172994
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -172990,7 +173002,7 @@ class Assistants extends APIResource {
|
|
|
172990
173002
|
});
|
|
172991
173003
|
}
|
|
172992
173004
|
delete(assistantID, options) {
|
|
172993
|
-
return this._client.delete(
|
|
173005
|
+
return this._client.delete(path2`/assistants/${assistantID}`, {
|
|
172994
173006
|
...options,
|
|
172995
173007
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
172996
173008
|
});
|
|
@@ -173040,7 +173052,7 @@ class Sessions2 extends APIResource {
|
|
|
173040
173052
|
});
|
|
173041
173053
|
}
|
|
173042
173054
|
cancel(sessionID, options) {
|
|
173043
|
-
return this._client.post(
|
|
173055
|
+
return this._client.post(path2`/chatkit/sessions/${sessionID}/cancel`, {
|
|
173044
173056
|
...options,
|
|
173045
173057
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
|
|
173046
173058
|
});
|
|
@@ -173050,7 +173062,7 @@ class Sessions2 extends APIResource {
|
|
|
173050
173062
|
// node_modules/openai/resources/beta/chatkit/threads.mjs
|
|
173051
173063
|
class Threads extends APIResource {
|
|
173052
173064
|
retrieve(threadID, options) {
|
|
173053
|
-
return this._client.get(
|
|
173065
|
+
return this._client.get(path2`/chatkit/threads/${threadID}`, {
|
|
173054
173066
|
...options,
|
|
173055
173067
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
|
|
173056
173068
|
});
|
|
@@ -173063,13 +173075,13 @@ class Threads extends APIResource {
|
|
|
173063
173075
|
});
|
|
173064
173076
|
}
|
|
173065
173077
|
delete(threadID, options) {
|
|
173066
|
-
return this._client.delete(
|
|
173078
|
+
return this._client.delete(path2`/chatkit/threads/${threadID}`, {
|
|
173067
173079
|
...options,
|
|
173068
173080
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
|
|
173069
173081
|
});
|
|
173070
173082
|
}
|
|
173071
173083
|
listItems(threadID, query = {}, options) {
|
|
173072
|
-
return this._client.getAPIList(
|
|
173084
|
+
return this._client.getAPIList(path2`/chatkit/threads/${threadID}/items`, ConversationCursorPage, { query, ...options, headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]) });
|
|
173073
173085
|
}
|
|
173074
173086
|
}
|
|
173075
173087
|
|
|
@@ -173087,7 +173099,7 @@ ChatKit.Threads = Threads;
|
|
|
173087
173099
|
// node_modules/openai/resources/beta/threads/messages.mjs
|
|
173088
173100
|
class Messages2 extends APIResource {
|
|
173089
173101
|
create(threadID, body, options) {
|
|
173090
|
-
return this._client.post(
|
|
173102
|
+
return this._client.post(path2`/threads/${threadID}/messages`, {
|
|
173091
173103
|
body,
|
|
173092
173104
|
...options,
|
|
173093
173105
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -173095,21 +173107,21 @@ class Messages2 extends APIResource {
|
|
|
173095
173107
|
}
|
|
173096
173108
|
retrieve(messageID, params, options) {
|
|
173097
173109
|
const { thread_id } = params;
|
|
173098
|
-
return this._client.get(
|
|
173110
|
+
return this._client.get(path2`/threads/${thread_id}/messages/${messageID}`, {
|
|
173099
173111
|
...options,
|
|
173100
173112
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173101
173113
|
});
|
|
173102
173114
|
}
|
|
173103
173115
|
update(messageID, params, options) {
|
|
173104
173116
|
const { thread_id, ...body } = params;
|
|
173105
|
-
return this._client.post(
|
|
173117
|
+
return this._client.post(path2`/threads/${thread_id}/messages/${messageID}`, {
|
|
173106
173118
|
body,
|
|
173107
173119
|
...options,
|
|
173108
173120
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173109
173121
|
});
|
|
173110
173122
|
}
|
|
173111
173123
|
list(threadID, query = {}, options) {
|
|
173112
|
-
return this._client.getAPIList(
|
|
173124
|
+
return this._client.getAPIList(path2`/threads/${threadID}/messages`, CursorPage, {
|
|
173113
173125
|
query,
|
|
173114
173126
|
...options,
|
|
173115
173127
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -173117,7 +173129,7 @@ class Messages2 extends APIResource {
|
|
|
173117
173129
|
}
|
|
173118
173130
|
delete(messageID, params, options) {
|
|
173119
173131
|
const { thread_id } = params;
|
|
173120
|
-
return this._client.delete(
|
|
173132
|
+
return this._client.delete(path2`/threads/${thread_id}/messages/${messageID}`, {
|
|
173121
173133
|
...options,
|
|
173122
173134
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173123
173135
|
});
|
|
@@ -173128,7 +173140,7 @@ class Messages2 extends APIResource {
|
|
|
173128
173140
|
class Steps extends APIResource {
|
|
173129
173141
|
retrieve(stepID, params, options) {
|
|
173130
173142
|
const { thread_id, run_id, ...query } = params;
|
|
173131
|
-
return this._client.get(
|
|
173143
|
+
return this._client.get(path2`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
|
|
173132
173144
|
query,
|
|
173133
173145
|
...options,
|
|
173134
173146
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -173136,7 +173148,7 @@ class Steps extends APIResource {
|
|
|
173136
173148
|
}
|
|
173137
173149
|
list(runID, params, options) {
|
|
173138
173150
|
const { thread_id, ...query } = params;
|
|
173139
|
-
return this._client.getAPIList(
|
|
173151
|
+
return this._client.getAPIList(path2`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
|
|
173140
173152
|
query,
|
|
173141
173153
|
...options,
|
|
173142
173154
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -173715,7 +173727,7 @@ class Runs extends APIResource {
|
|
|
173715
173727
|
}
|
|
173716
173728
|
create(threadID, params, options) {
|
|
173717
173729
|
const { include, ...body } = params;
|
|
173718
|
-
return this._client.post(
|
|
173730
|
+
return this._client.post(path2`/threads/${threadID}/runs`, {
|
|
173719
173731
|
query: { include },
|
|
173720
173732
|
body,
|
|
173721
173733
|
...options,
|
|
@@ -173725,21 +173737,21 @@ class Runs extends APIResource {
|
|
|
173725
173737
|
}
|
|
173726
173738
|
retrieve(runID, params, options) {
|
|
173727
173739
|
const { thread_id } = params;
|
|
173728
|
-
return this._client.get(
|
|
173740
|
+
return this._client.get(path2`/threads/${thread_id}/runs/${runID}`, {
|
|
173729
173741
|
...options,
|
|
173730
173742
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173731
173743
|
});
|
|
173732
173744
|
}
|
|
173733
173745
|
update(runID, params, options) {
|
|
173734
173746
|
const { thread_id, ...body } = params;
|
|
173735
|
-
return this._client.post(
|
|
173747
|
+
return this._client.post(path2`/threads/${thread_id}/runs/${runID}`, {
|
|
173736
173748
|
body,
|
|
173737
173749
|
...options,
|
|
173738
173750
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173739
173751
|
});
|
|
173740
173752
|
}
|
|
173741
173753
|
list(threadID, query = {}, options) {
|
|
173742
|
-
return this._client.getAPIList(
|
|
173754
|
+
return this._client.getAPIList(path2`/threads/${threadID}/runs`, CursorPage, {
|
|
173743
173755
|
query,
|
|
173744
173756
|
...options,
|
|
173745
173757
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -173747,7 +173759,7 @@ class Runs extends APIResource {
|
|
|
173747
173759
|
}
|
|
173748
173760
|
cancel(runID, params, options) {
|
|
173749
173761
|
const { thread_id } = params;
|
|
173750
|
-
return this._client.post(
|
|
173762
|
+
return this._client.post(path2`/threads/${thread_id}/runs/${runID}/cancel`, {
|
|
173751
173763
|
...options,
|
|
173752
173764
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173753
173765
|
});
|
|
@@ -173805,7 +173817,7 @@ class Runs extends APIResource {
|
|
|
173805
173817
|
}
|
|
173806
173818
|
submitToolOutputs(runID, params, options) {
|
|
173807
173819
|
const { thread_id, ...body } = params;
|
|
173808
|
-
return this._client.post(
|
|
173820
|
+
return this._client.post(path2`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
|
|
173809
173821
|
body,
|
|
173810
173822
|
...options,
|
|
173811
173823
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -173837,20 +173849,20 @@ class Threads2 extends APIResource {
|
|
|
173837
173849
|
});
|
|
173838
173850
|
}
|
|
173839
173851
|
retrieve(threadID, options) {
|
|
173840
|
-
return this._client.get(
|
|
173852
|
+
return this._client.get(path2`/threads/${threadID}`, {
|
|
173841
173853
|
...options,
|
|
173842
173854
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173843
173855
|
});
|
|
173844
173856
|
}
|
|
173845
173857
|
update(threadID, body, options) {
|
|
173846
|
-
return this._client.post(
|
|
173858
|
+
return this._client.post(path2`/threads/${threadID}`, {
|
|
173847
173859
|
body,
|
|
173848
173860
|
...options,
|
|
173849
173861
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173850
173862
|
});
|
|
173851
173863
|
}
|
|
173852
173864
|
delete(threadID, options) {
|
|
173853
|
-
return this._client.delete(
|
|
173865
|
+
return this._client.delete(path2`/threads/${threadID}`, {
|
|
173854
173866
|
...options,
|
|
173855
173867
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
173856
173868
|
});
|
|
@@ -173898,7 +173910,7 @@ class Completions2 extends APIResource {
|
|
|
173898
173910
|
class Content extends APIResource {
|
|
173899
173911
|
retrieve(fileID, params, options) {
|
|
173900
173912
|
const { container_id } = params;
|
|
173901
|
-
return this._client.get(
|
|
173913
|
+
return this._client.get(path2`/containers/${container_id}/files/${fileID}/content`, {
|
|
173902
173914
|
...options,
|
|
173903
173915
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
173904
173916
|
__binaryResponse: true
|
|
@@ -173913,21 +173925,21 @@ class Files extends APIResource {
|
|
|
173913
173925
|
this.content = new Content(this._client);
|
|
173914
173926
|
}
|
|
173915
173927
|
create(containerID, body, options) {
|
|
173916
|
-
return this._client.post(
|
|
173928
|
+
return this._client.post(path2`/containers/${containerID}/files`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
173917
173929
|
}
|
|
173918
173930
|
retrieve(fileID, params, options) {
|
|
173919
173931
|
const { container_id } = params;
|
|
173920
|
-
return this._client.get(
|
|
173932
|
+
return this._client.get(path2`/containers/${container_id}/files/${fileID}`, options);
|
|
173921
173933
|
}
|
|
173922
173934
|
list(containerID, query = {}, options) {
|
|
173923
|
-
return this._client.getAPIList(
|
|
173935
|
+
return this._client.getAPIList(path2`/containers/${containerID}/files`, CursorPage, {
|
|
173924
173936
|
query,
|
|
173925
173937
|
...options
|
|
173926
173938
|
});
|
|
173927
173939
|
}
|
|
173928
173940
|
delete(fileID, params, options) {
|
|
173929
173941
|
const { container_id } = params;
|
|
173930
|
-
return this._client.delete(
|
|
173942
|
+
return this._client.delete(path2`/containers/${container_id}/files/${fileID}`, {
|
|
173931
173943
|
...options,
|
|
173932
173944
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
173933
173945
|
});
|
|
@@ -173945,13 +173957,13 @@ class Containers extends APIResource {
|
|
|
173945
173957
|
return this._client.post("/containers", { body, ...options });
|
|
173946
173958
|
}
|
|
173947
173959
|
retrieve(containerID, options) {
|
|
173948
|
-
return this._client.get(
|
|
173960
|
+
return this._client.get(path2`/containers/${containerID}`, options);
|
|
173949
173961
|
}
|
|
173950
173962
|
list(query = {}, options) {
|
|
173951
173963
|
return this._client.getAPIList("/containers", CursorPage, { query, ...options });
|
|
173952
173964
|
}
|
|
173953
173965
|
delete(containerID, options) {
|
|
173954
|
-
return this._client.delete(
|
|
173966
|
+
return this._client.delete(path2`/containers/${containerID}`, {
|
|
173955
173967
|
...options,
|
|
173956
173968
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
173957
173969
|
});
|
|
@@ -173962,7 +173974,7 @@ Containers.Files = Files;
|
|
|
173962
173974
|
class Items extends APIResource {
|
|
173963
173975
|
create(conversationID, params, options) {
|
|
173964
173976
|
const { include, ...body } = params;
|
|
173965
|
-
return this._client.post(
|
|
173977
|
+
return this._client.post(path2`/conversations/${conversationID}/items`, {
|
|
173966
173978
|
query: { include },
|
|
173967
173979
|
body,
|
|
173968
173980
|
...options
|
|
@@ -173970,14 +173982,14 @@ class Items extends APIResource {
|
|
|
173970
173982
|
}
|
|
173971
173983
|
retrieve(itemID, params, options) {
|
|
173972
173984
|
const { conversation_id, ...query } = params;
|
|
173973
|
-
return this._client.get(
|
|
173985
|
+
return this._client.get(path2`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
|
|
173974
173986
|
}
|
|
173975
173987
|
list(conversationID, query = {}, options) {
|
|
173976
|
-
return this._client.getAPIList(
|
|
173988
|
+
return this._client.getAPIList(path2`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
|
|
173977
173989
|
}
|
|
173978
173990
|
delete(itemID, params, options) {
|
|
173979
173991
|
const { conversation_id } = params;
|
|
173980
|
-
return this._client.delete(
|
|
173992
|
+
return this._client.delete(path2`/conversations/${conversation_id}/items/${itemID}`, options);
|
|
173981
173993
|
}
|
|
173982
173994
|
}
|
|
173983
173995
|
|
|
@@ -173991,13 +174003,13 @@ class Conversations extends APIResource {
|
|
|
173991
174003
|
return this._client.post("/conversations", { body, ...options });
|
|
173992
174004
|
}
|
|
173993
174005
|
retrieve(conversationID, options) {
|
|
173994
|
-
return this._client.get(
|
|
174006
|
+
return this._client.get(path2`/conversations/${conversationID}`, options);
|
|
173995
174007
|
}
|
|
173996
174008
|
update(conversationID, body, options) {
|
|
173997
|
-
return this._client.post(
|
|
174009
|
+
return this._client.post(path2`/conversations/${conversationID}`, { body, ...options });
|
|
173998
174010
|
}
|
|
173999
174011
|
delete(conversationID, options) {
|
|
174000
|
-
return this._client.delete(
|
|
174012
|
+
return this._client.delete(path2`/conversations/${conversationID}`, options);
|
|
174001
174013
|
}
|
|
174002
174014
|
}
|
|
174003
174015
|
Conversations.Items = Items;
|
|
@@ -174035,11 +174047,11 @@ class Embeddings extends APIResource {
|
|
|
174035
174047
|
class OutputItems extends APIResource {
|
|
174036
174048
|
retrieve(outputItemID, params, options) {
|
|
174037
174049
|
const { eval_id, run_id } = params;
|
|
174038
|
-
return this._client.get(
|
|
174050
|
+
return this._client.get(path2`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
|
|
174039
174051
|
}
|
|
174040
174052
|
list(runID, params, options) {
|
|
174041
174053
|
const { eval_id, ...query } = params;
|
|
174042
|
-
return this._client.getAPIList(
|
|
174054
|
+
return this._client.getAPIList(path2`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
|
|
174043
174055
|
}
|
|
174044
174056
|
}
|
|
174045
174057
|
|
|
@@ -174050,25 +174062,25 @@ class Runs2 extends APIResource {
|
|
|
174050
174062
|
this.outputItems = new OutputItems(this._client);
|
|
174051
174063
|
}
|
|
174052
174064
|
create(evalID, body, options) {
|
|
174053
|
-
return this._client.post(
|
|
174065
|
+
return this._client.post(path2`/evals/${evalID}/runs`, { body, ...options });
|
|
174054
174066
|
}
|
|
174055
174067
|
retrieve(runID, params, options) {
|
|
174056
174068
|
const { eval_id } = params;
|
|
174057
|
-
return this._client.get(
|
|
174069
|
+
return this._client.get(path2`/evals/${eval_id}/runs/${runID}`, options);
|
|
174058
174070
|
}
|
|
174059
174071
|
list(evalID, query = {}, options) {
|
|
174060
|
-
return this._client.getAPIList(
|
|
174072
|
+
return this._client.getAPIList(path2`/evals/${evalID}/runs`, CursorPage, {
|
|
174061
174073
|
query,
|
|
174062
174074
|
...options
|
|
174063
174075
|
});
|
|
174064
174076
|
}
|
|
174065
174077
|
delete(runID, params, options) {
|
|
174066
174078
|
const { eval_id } = params;
|
|
174067
|
-
return this._client.delete(
|
|
174079
|
+
return this._client.delete(path2`/evals/${eval_id}/runs/${runID}`, options);
|
|
174068
174080
|
}
|
|
174069
174081
|
cancel(runID, params, options) {
|
|
174070
174082
|
const { eval_id } = params;
|
|
174071
|
-
return this._client.post(
|
|
174083
|
+
return this._client.post(path2`/evals/${eval_id}/runs/${runID}`, options);
|
|
174072
174084
|
}
|
|
174073
174085
|
}
|
|
174074
174086
|
Runs2.OutputItems = OutputItems;
|
|
@@ -174083,16 +174095,16 @@ class Evals extends APIResource {
|
|
|
174083
174095
|
return this._client.post("/evals", { body, ...options });
|
|
174084
174096
|
}
|
|
174085
174097
|
retrieve(evalID, options) {
|
|
174086
|
-
return this._client.get(
|
|
174098
|
+
return this._client.get(path2`/evals/${evalID}`, options);
|
|
174087
174099
|
}
|
|
174088
174100
|
update(evalID, body, options) {
|
|
174089
|
-
return this._client.post(
|
|
174101
|
+
return this._client.post(path2`/evals/${evalID}`, { body, ...options });
|
|
174090
174102
|
}
|
|
174091
174103
|
list(query = {}, options) {
|
|
174092
174104
|
return this._client.getAPIList("/evals", CursorPage, { query, ...options });
|
|
174093
174105
|
}
|
|
174094
174106
|
delete(evalID, options) {
|
|
174095
|
-
return this._client.delete(
|
|
174107
|
+
return this._client.delete(path2`/evals/${evalID}`, options);
|
|
174096
174108
|
}
|
|
174097
174109
|
}
|
|
174098
174110
|
Evals.Runs = Runs2;
|
|
@@ -174102,16 +174114,16 @@ class Files2 extends APIResource {
|
|
|
174102
174114
|
return this._client.post("/files", multipartFormRequestOptions({ body, ...options }, this._client));
|
|
174103
174115
|
}
|
|
174104
174116
|
retrieve(fileID, options) {
|
|
174105
|
-
return this._client.get(
|
|
174117
|
+
return this._client.get(path2`/files/${fileID}`, options);
|
|
174106
174118
|
}
|
|
174107
174119
|
list(query = {}, options) {
|
|
174108
174120
|
return this._client.getAPIList("/files", CursorPage, { query, ...options });
|
|
174109
174121
|
}
|
|
174110
174122
|
delete(fileID, options) {
|
|
174111
|
-
return this._client.delete(
|
|
174123
|
+
return this._client.delete(path2`/files/${fileID}`, options);
|
|
174112
174124
|
}
|
|
174113
174125
|
content(fileID, options) {
|
|
174114
|
-
return this._client.get(
|
|
174126
|
+
return this._client.get(path2`/files/${fileID}/content`, {
|
|
174115
174127
|
...options,
|
|
174116
174128
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
174117
174129
|
__binaryResponse: true
|
|
@@ -174159,17 +174171,17 @@ Alpha.Graders = Graders;
|
|
|
174159
174171
|
// node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
|
|
174160
174172
|
class Permissions extends APIResource {
|
|
174161
174173
|
create(fineTunedModelCheckpoint, body, options) {
|
|
174162
|
-
return this._client.getAPIList(
|
|
174174
|
+
return this._client.getAPIList(path2`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, { body, method: "post", ...options });
|
|
174163
174175
|
}
|
|
174164
174176
|
retrieve(fineTunedModelCheckpoint, query = {}, options) {
|
|
174165
|
-
return this._client.get(
|
|
174177
|
+
return this._client.get(path2`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
|
|
174166
174178
|
query,
|
|
174167
174179
|
...options
|
|
174168
174180
|
});
|
|
174169
174181
|
}
|
|
174170
174182
|
delete(permissionID, params, options) {
|
|
174171
174183
|
const { fine_tuned_model_checkpoint } = params;
|
|
174172
|
-
return this._client.delete(
|
|
174184
|
+
return this._client.delete(path2`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
|
|
174173
174185
|
}
|
|
174174
174186
|
}
|
|
174175
174187
|
|
|
@@ -174185,7 +174197,7 @@ Checkpoints.Permissions = Permissions;
|
|
|
174185
174197
|
// node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
|
|
174186
174198
|
class Checkpoints2 extends APIResource {
|
|
174187
174199
|
list(fineTuningJobID, query = {}, options) {
|
|
174188
|
-
return this._client.getAPIList(
|
|
174200
|
+
return this._client.getAPIList(path2`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
|
|
174189
174201
|
}
|
|
174190
174202
|
}
|
|
174191
174203
|
|
|
@@ -174199,22 +174211,22 @@ class Jobs extends APIResource {
|
|
|
174199
174211
|
return this._client.post("/fine_tuning/jobs", { body, ...options });
|
|
174200
174212
|
}
|
|
174201
174213
|
retrieve(fineTuningJobID, options) {
|
|
174202
|
-
return this._client.get(
|
|
174214
|
+
return this._client.get(path2`/fine_tuning/jobs/${fineTuningJobID}`, options);
|
|
174203
174215
|
}
|
|
174204
174216
|
list(query = {}, options) {
|
|
174205
174217
|
return this._client.getAPIList("/fine_tuning/jobs", CursorPage, { query, ...options });
|
|
174206
174218
|
}
|
|
174207
174219
|
cancel(fineTuningJobID, options) {
|
|
174208
|
-
return this._client.post(
|
|
174220
|
+
return this._client.post(path2`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
|
|
174209
174221
|
}
|
|
174210
174222
|
listEvents(fineTuningJobID, query = {}, options) {
|
|
174211
|
-
return this._client.getAPIList(
|
|
174223
|
+
return this._client.getAPIList(path2`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
|
|
174212
174224
|
}
|
|
174213
174225
|
pause(fineTuningJobID, options) {
|
|
174214
|
-
return this._client.post(
|
|
174226
|
+
return this._client.post(path2`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
|
|
174215
174227
|
}
|
|
174216
174228
|
resume(fineTuningJobID, options) {
|
|
174217
|
-
return this._client.post(
|
|
174229
|
+
return this._client.post(path2`/fine_tuning/jobs/${fineTuningJobID}/resume`, options);
|
|
174218
174230
|
}
|
|
174219
174231
|
}
|
|
174220
174232
|
Jobs.Checkpoints = Checkpoints2;
|
|
@@ -174260,13 +174272,13 @@ class Images extends APIResource {
|
|
|
174260
174272
|
// node_modules/openai/resources/models.mjs
|
|
174261
174273
|
class Models extends APIResource {
|
|
174262
174274
|
retrieve(model, options) {
|
|
174263
|
-
return this._client.get(
|
|
174275
|
+
return this._client.get(path2`/models/${model}`, options);
|
|
174264
174276
|
}
|
|
174265
174277
|
list(options) {
|
|
174266
174278
|
return this._client.getAPIList("/models", Page, options);
|
|
174267
174279
|
}
|
|
174268
174280
|
delete(model, options) {
|
|
174269
|
-
return this._client.delete(
|
|
174281
|
+
return this._client.delete(path2`/models/${model}`, options);
|
|
174270
174282
|
}
|
|
174271
174283
|
}
|
|
174272
174284
|
// node_modules/openai/resources/moderations.mjs
|
|
@@ -174278,27 +174290,27 @@ class Moderations extends APIResource {
|
|
|
174278
174290
|
// node_modules/openai/resources/realtime/calls.mjs
|
|
174279
174291
|
class Calls extends APIResource {
|
|
174280
174292
|
accept(callID, body, options) {
|
|
174281
|
-
return this._client.post(
|
|
174293
|
+
return this._client.post(path2`/realtime/calls/${callID}/accept`, {
|
|
174282
174294
|
body,
|
|
174283
174295
|
...options,
|
|
174284
174296
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
174285
174297
|
});
|
|
174286
174298
|
}
|
|
174287
174299
|
hangup(callID, options) {
|
|
174288
|
-
return this._client.post(
|
|
174300
|
+
return this._client.post(path2`/realtime/calls/${callID}/hangup`, {
|
|
174289
174301
|
...options,
|
|
174290
174302
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
174291
174303
|
});
|
|
174292
174304
|
}
|
|
174293
174305
|
refer(callID, body, options) {
|
|
174294
|
-
return this._client.post(
|
|
174306
|
+
return this._client.post(path2`/realtime/calls/${callID}/refer`, {
|
|
174295
174307
|
body,
|
|
174296
174308
|
...options,
|
|
174297
174309
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
174298
174310
|
});
|
|
174299
174311
|
}
|
|
174300
174312
|
reject(callID, body = {}, options) {
|
|
174301
|
-
return this._client.post(
|
|
174313
|
+
return this._client.post(path2`/realtime/calls/${callID}/reject`, {
|
|
174302
174314
|
body,
|
|
174303
174315
|
...options,
|
|
174304
174316
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
@@ -174706,7 +174718,7 @@ function finalizeResponse(snapshot, params) {
|
|
|
174706
174718
|
// node_modules/openai/resources/responses/input-items.mjs
|
|
174707
174719
|
class InputItems extends APIResource {
|
|
174708
174720
|
list(responseID, query = {}, options) {
|
|
174709
|
-
return this._client.getAPIList(
|
|
174721
|
+
return this._client.getAPIList(path2`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
|
|
174710
174722
|
}
|
|
174711
174723
|
}
|
|
174712
174724
|
|
|
@@ -174733,7 +174745,7 @@ class Responses extends APIResource {
|
|
|
174733
174745
|
});
|
|
174734
174746
|
}
|
|
174735
174747
|
retrieve(responseID, query = {}, options) {
|
|
174736
|
-
return this._client.get(
|
|
174748
|
+
return this._client.get(path2`/responses/${responseID}`, {
|
|
174737
174749
|
query,
|
|
174738
174750
|
...options,
|
|
174739
174751
|
stream: query?.stream ?? false
|
|
@@ -174745,7 +174757,7 @@ class Responses extends APIResource {
|
|
|
174745
174757
|
});
|
|
174746
174758
|
}
|
|
174747
174759
|
delete(responseID, options) {
|
|
174748
|
-
return this._client.delete(
|
|
174760
|
+
return this._client.delete(path2`/responses/${responseID}`, {
|
|
174749
174761
|
...options,
|
|
174750
174762
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
174751
174763
|
});
|
|
@@ -174757,7 +174769,7 @@ class Responses extends APIResource {
|
|
|
174757
174769
|
return ResponseStream.createResponse(this._client, body, options);
|
|
174758
174770
|
}
|
|
174759
174771
|
cancel(responseID, options) {
|
|
174760
|
-
return this._client.post(
|
|
174772
|
+
return this._client.post(path2`/responses/${responseID}/cancel`, options);
|
|
174761
174773
|
}
|
|
174762
174774
|
compact(body = {}, options) {
|
|
174763
174775
|
return this._client.post("/responses/compact", { body, ...options });
|
|
@@ -174768,7 +174780,7 @@ Responses.InputTokens = InputTokens;
|
|
|
174768
174780
|
// node_modules/openai/resources/uploads/parts.mjs
|
|
174769
174781
|
class Parts extends APIResource {
|
|
174770
174782
|
create(uploadID, body, options) {
|
|
174771
|
-
return this._client.post(
|
|
174783
|
+
return this._client.post(path2`/uploads/${uploadID}/parts`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
174772
174784
|
}
|
|
174773
174785
|
}
|
|
174774
174786
|
|
|
@@ -174782,10 +174794,10 @@ class Uploads extends APIResource {
|
|
|
174782
174794
|
return this._client.post("/uploads", { body, ...options });
|
|
174783
174795
|
}
|
|
174784
174796
|
cancel(uploadID, options) {
|
|
174785
|
-
return this._client.post(
|
|
174797
|
+
return this._client.post(path2`/uploads/${uploadID}/cancel`, options);
|
|
174786
174798
|
}
|
|
174787
174799
|
complete(uploadID, body, options) {
|
|
174788
|
-
return this._client.post(
|
|
174800
|
+
return this._client.post(path2`/uploads/${uploadID}/complete`, { body, ...options });
|
|
174789
174801
|
}
|
|
174790
174802
|
}
|
|
174791
174803
|
Uploads.Parts = Parts;
|
|
@@ -174811,7 +174823,7 @@ var allSettledWithThrow = async (promises) => {
|
|
|
174811
174823
|
// node_modules/openai/resources/vector-stores/file-batches.mjs
|
|
174812
174824
|
class FileBatches extends APIResource {
|
|
174813
174825
|
create(vectorStoreID, body, options) {
|
|
174814
|
-
return this._client.post(
|
|
174826
|
+
return this._client.post(path2`/vector_stores/${vectorStoreID}/file_batches`, {
|
|
174815
174827
|
body,
|
|
174816
174828
|
...options,
|
|
174817
174829
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -174819,14 +174831,14 @@ class FileBatches extends APIResource {
|
|
|
174819
174831
|
}
|
|
174820
174832
|
retrieve(batchID, params, options) {
|
|
174821
174833
|
const { vector_store_id } = params;
|
|
174822
|
-
return this._client.get(
|
|
174834
|
+
return this._client.get(path2`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
|
|
174823
174835
|
...options,
|
|
174824
174836
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
174825
174837
|
});
|
|
174826
174838
|
}
|
|
174827
174839
|
cancel(batchID, params, options) {
|
|
174828
174840
|
const { vector_store_id } = params;
|
|
174829
|
-
return this._client.post(
|
|
174841
|
+
return this._client.post(path2`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
|
|
174830
174842
|
...options,
|
|
174831
174843
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
174832
174844
|
});
|
|
@@ -174837,7 +174849,7 @@ class FileBatches extends APIResource {
|
|
|
174837
174849
|
}
|
|
174838
174850
|
listFiles(batchID, params, options) {
|
|
174839
174851
|
const { vector_store_id, ...query } = params;
|
|
174840
|
-
return this._client.getAPIList(
|
|
174852
|
+
return this._client.getAPIList(path2`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
|
|
174841
174853
|
}
|
|
174842
174854
|
async poll(vectorStoreID, batchID, options) {
|
|
174843
174855
|
const headers = buildHeaders([
|
|
@@ -174901,7 +174913,7 @@ class FileBatches extends APIResource {
|
|
|
174901
174913
|
// node_modules/openai/resources/vector-stores/files.mjs
|
|
174902
174914
|
class Files3 extends APIResource {
|
|
174903
174915
|
create(vectorStoreID, body, options) {
|
|
174904
|
-
return this._client.post(
|
|
174916
|
+
return this._client.post(path2`/vector_stores/${vectorStoreID}/files`, {
|
|
174905
174917
|
body,
|
|
174906
174918
|
...options,
|
|
174907
174919
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -174909,21 +174921,21 @@ class Files3 extends APIResource {
|
|
|
174909
174921
|
}
|
|
174910
174922
|
retrieve(fileID, params, options) {
|
|
174911
174923
|
const { vector_store_id } = params;
|
|
174912
|
-
return this._client.get(
|
|
174924
|
+
return this._client.get(path2`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
174913
174925
|
...options,
|
|
174914
174926
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
174915
174927
|
});
|
|
174916
174928
|
}
|
|
174917
174929
|
update(fileID, params, options) {
|
|
174918
174930
|
const { vector_store_id, ...body } = params;
|
|
174919
|
-
return this._client.post(
|
|
174931
|
+
return this._client.post(path2`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
174920
174932
|
body,
|
|
174921
174933
|
...options,
|
|
174922
174934
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
174923
174935
|
});
|
|
174924
174936
|
}
|
|
174925
174937
|
list(vectorStoreID, query = {}, options) {
|
|
174926
|
-
return this._client.getAPIList(
|
|
174938
|
+
return this._client.getAPIList(path2`/vector_stores/${vectorStoreID}/files`, CursorPage, {
|
|
174927
174939
|
query,
|
|
174928
174940
|
...options,
|
|
174929
174941
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -174931,7 +174943,7 @@ class Files3 extends APIResource {
|
|
|
174931
174943
|
}
|
|
174932
174944
|
delete(fileID, params, options) {
|
|
174933
174945
|
const { vector_store_id } = params;
|
|
174934
|
-
return this._client.delete(
|
|
174946
|
+
return this._client.delete(path2`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
174935
174947
|
...options,
|
|
174936
174948
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
174937
174949
|
});
|
|
@@ -174985,7 +174997,7 @@ class Files3 extends APIResource {
|
|
|
174985
174997
|
}
|
|
174986
174998
|
content(fileID, params, options) {
|
|
174987
174999
|
const { vector_store_id } = params;
|
|
174988
|
-
return this._client.getAPIList(
|
|
175000
|
+
return this._client.getAPIList(path2`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page, { ...options, headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
|
|
174989
175001
|
}
|
|
174990
175002
|
}
|
|
174991
175003
|
|
|
@@ -175004,13 +175016,13 @@ class VectorStores extends APIResource {
|
|
|
175004
175016
|
});
|
|
175005
175017
|
}
|
|
175006
175018
|
retrieve(vectorStoreID, options) {
|
|
175007
|
-
return this._client.get(
|
|
175019
|
+
return this._client.get(path2`/vector_stores/${vectorStoreID}`, {
|
|
175008
175020
|
...options,
|
|
175009
175021
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
175010
175022
|
});
|
|
175011
175023
|
}
|
|
175012
175024
|
update(vectorStoreID, body, options) {
|
|
175013
|
-
return this._client.post(
|
|
175025
|
+
return this._client.post(path2`/vector_stores/${vectorStoreID}`, {
|
|
175014
175026
|
body,
|
|
175015
175027
|
...options,
|
|
175016
175028
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
@@ -175024,13 +175036,13 @@ class VectorStores extends APIResource {
|
|
|
175024
175036
|
});
|
|
175025
175037
|
}
|
|
175026
175038
|
delete(vectorStoreID, options) {
|
|
175027
|
-
return this._client.delete(
|
|
175039
|
+
return this._client.delete(path2`/vector_stores/${vectorStoreID}`, {
|
|
175028
175040
|
...options,
|
|
175029
175041
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
175030
175042
|
});
|
|
175031
175043
|
}
|
|
175032
175044
|
search(vectorStoreID, body, options) {
|
|
175033
|
-
return this._client.getAPIList(
|
|
175045
|
+
return this._client.getAPIList(path2`/vector_stores/${vectorStoreID}/search`, Page, {
|
|
175034
175046
|
body,
|
|
175035
175047
|
method: "post",
|
|
175036
175048
|
...options,
|
|
@@ -175046,16 +175058,16 @@ class Videos extends APIResource {
|
|
|
175046
175058
|
return this._client.post("/videos", maybeMultipartFormRequestOptions({ body, ...options }, this._client));
|
|
175047
175059
|
}
|
|
175048
175060
|
retrieve(videoID, options) {
|
|
175049
|
-
return this._client.get(
|
|
175061
|
+
return this._client.get(path2`/videos/${videoID}`, options);
|
|
175050
175062
|
}
|
|
175051
175063
|
list(query = {}, options) {
|
|
175052
175064
|
return this._client.getAPIList("/videos", ConversationCursorPage, { query, ...options });
|
|
175053
175065
|
}
|
|
175054
175066
|
delete(videoID, options) {
|
|
175055
|
-
return this._client.delete(
|
|
175067
|
+
return this._client.delete(path2`/videos/${videoID}`, options);
|
|
175056
175068
|
}
|
|
175057
175069
|
downloadContent(videoID, query = {}, options) {
|
|
175058
|
-
return this._client.get(
|
|
175070
|
+
return this._client.get(path2`/videos/${videoID}/content`, {
|
|
175059
175071
|
query,
|
|
175060
175072
|
...options,
|
|
175061
175073
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
@@ -175063,7 +175075,7 @@ class Videos extends APIResource {
|
|
|
175063
175075
|
});
|
|
175064
175076
|
}
|
|
175065
175077
|
remix(videoID, body, options) {
|
|
175066
|
-
return this._client.post(
|
|
175078
|
+
return this._client.post(path2`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
|
|
175067
175079
|
}
|
|
175068
175080
|
}
|
|
175069
175081
|
// node_modules/openai/resources/webhooks.mjs
|
|
@@ -175259,9 +175271,9 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
175259
175271
|
this.apiKey = token;
|
|
175260
175272
|
return true;
|
|
175261
175273
|
}
|
|
175262
|
-
buildURL(
|
|
175274
|
+
buildURL(path3, query, defaultBaseURL) {
|
|
175263
175275
|
const baseURL = !__classPrivateFieldGet(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
175264
|
-
const url2 = isAbsoluteURL(
|
|
175276
|
+
const url2 = isAbsoluteURL(path3) ? new URL(path3) : new URL(baseURL + (baseURL.endsWith("/") && path3.startsWith("/") ? path3.slice(1) : path3));
|
|
175265
175277
|
const defaultQuery = this.defaultQuery();
|
|
175266
175278
|
if (!isEmptyObj(defaultQuery)) {
|
|
175267
175279
|
query = { ...defaultQuery, ...query };
|
|
@@ -175275,24 +175287,24 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
175275
175287
|
await this._callApiKey();
|
|
175276
175288
|
}
|
|
175277
175289
|
async prepareRequest(request, { url: url2, options }) {}
|
|
175278
|
-
get(
|
|
175279
|
-
return this.methodRequest("get",
|
|
175290
|
+
get(path3, opts) {
|
|
175291
|
+
return this.methodRequest("get", path3, opts);
|
|
175280
175292
|
}
|
|
175281
|
-
post(
|
|
175282
|
-
return this.methodRequest("post",
|
|
175293
|
+
post(path3, opts) {
|
|
175294
|
+
return this.methodRequest("post", path3, opts);
|
|
175283
175295
|
}
|
|
175284
|
-
patch(
|
|
175285
|
-
return this.methodRequest("patch",
|
|
175296
|
+
patch(path3, opts) {
|
|
175297
|
+
return this.methodRequest("patch", path3, opts);
|
|
175286
175298
|
}
|
|
175287
|
-
put(
|
|
175288
|
-
return this.methodRequest("put",
|
|
175299
|
+
put(path3, opts) {
|
|
175300
|
+
return this.methodRequest("put", path3, opts);
|
|
175289
175301
|
}
|
|
175290
|
-
delete(
|
|
175291
|
-
return this.methodRequest("delete",
|
|
175302
|
+
delete(path3, opts) {
|
|
175303
|
+
return this.methodRequest("delete", path3, opts);
|
|
175292
175304
|
}
|
|
175293
|
-
methodRequest(method,
|
|
175305
|
+
methodRequest(method, path3, opts) {
|
|
175294
175306
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
175295
|
-
return { method, path:
|
|
175307
|
+
return { method, path: path3, ...opts2 };
|
|
175296
175308
|
}));
|
|
175297
175309
|
}
|
|
175298
175310
|
request(options, remainingRetries = null) {
|
|
@@ -175396,8 +175408,8 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
175396
175408
|
}));
|
|
175397
175409
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
175398
175410
|
}
|
|
175399
|
-
getAPIList(
|
|
175400
|
-
return this.requestAPIList(Page2, { method: "get", path:
|
|
175411
|
+
getAPIList(path3, Page2, opts) {
|
|
175412
|
+
return this.requestAPIList(Page2, { method: "get", path: path3, ...opts });
|
|
175401
175413
|
}
|
|
175402
175414
|
requestAPIList(Page2, options) {
|
|
175403
175415
|
const request = this.makeRequest(options, null, undefined);
|
|
@@ -175475,8 +175487,8 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
175475
175487
|
}
|
|
175476
175488
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
175477
175489
|
const options = { ...inputOptions };
|
|
175478
|
-
const { method, path:
|
|
175479
|
-
const url2 = this.buildURL(
|
|
175490
|
+
const { method, path: path3, query, defaultBaseURL } = options;
|
|
175491
|
+
const url2 = this.buildURL(path3, query, defaultBaseURL);
|
|
175480
175492
|
if ("timeout" in options)
|
|
175481
175493
|
validatePositiveInteger("timeout", options.timeout);
|
|
175482
175494
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -176159,7 +176171,7 @@ init_errors3();
|
|
|
176159
176171
|
init_utils();
|
|
176160
176172
|
import { existsSync, mkdirSync } from "fs";
|
|
176161
176173
|
import { readFile, readdir, rm, writeFile } from "fs/promises";
|
|
176162
|
-
import
|
|
176174
|
+
import path3 from "path";
|
|
176163
176175
|
var DEFAULT_LIST_LIMIT = 1000;
|
|
176164
176176
|
var FILE_ENVELOPE_VERSION = 1;
|
|
176165
176177
|
|
|
@@ -176169,7 +176181,7 @@ class FileSystemProvider {
|
|
|
176169
176181
|
if (!storagePath) {
|
|
176170
176182
|
throw new McpError(-32008 /* ConfigurationError */, "FileSystemProvider requires a valid storagePath.");
|
|
176171
176183
|
}
|
|
176172
|
-
this.storagePath =
|
|
176184
|
+
this.storagePath = path3.resolve(storagePath);
|
|
176173
176185
|
if (!existsSync(this.storagePath)) {
|
|
176174
176186
|
mkdirSync(this.storagePath, { recursive: true });
|
|
176175
176187
|
}
|
|
@@ -176181,7 +176193,7 @@ class FileSystemProvider {
|
|
|
176181
176193
|
if (sanitizedTenantId.includes("/") || sanitizedTenantId.includes("..")) {
|
|
176182
176194
|
throw new McpError(-32007 /* ValidationError */, "Invalid tenantId contains path characters.");
|
|
176183
176195
|
}
|
|
176184
|
-
const tenantPath =
|
|
176196
|
+
const tenantPath = path3.join(this.storagePath, sanitizedTenantId);
|
|
176185
176197
|
if (!existsSync(tenantPath)) {
|
|
176186
176198
|
mkdirSync(tenantPath, { recursive: true });
|
|
176187
176199
|
}
|
|
@@ -176193,8 +176205,8 @@ class FileSystemProvider {
|
|
|
176193
176205
|
rootDir: tenantPath,
|
|
176194
176206
|
toPosix: true
|
|
176195
176207
|
}).sanitizedPath;
|
|
176196
|
-
const filePath =
|
|
176197
|
-
if (!
|
|
176208
|
+
const filePath = path3.join(tenantPath, sanitizedKey);
|
|
176209
|
+
if (!path3.resolve(filePath).startsWith(path3.resolve(tenantPath))) {
|
|
176198
176210
|
throw new McpError(-32007 /* ValidationError */, "Invalid key results in path traversal attempt.");
|
|
176199
176211
|
}
|
|
176200
176212
|
return filePath;
|
|
@@ -176248,7 +176260,7 @@ class FileSystemProvider {
|
|
|
176248
176260
|
return ErrorHandler.tryCatch(async () => {
|
|
176249
176261
|
const envelope = this.buildEnvelope(value, options);
|
|
176250
176262
|
const content = JSON.stringify(envelope, null, 2);
|
|
176251
|
-
mkdirSync(
|
|
176263
|
+
mkdirSync(path3.dirname(filePath), { recursive: true });
|
|
176252
176264
|
await writeFile(filePath, content, "utf-8");
|
|
176253
176265
|
}, {
|
|
176254
176266
|
operation: "FileSystemProvider.set",
|
|
@@ -176278,12 +176290,12 @@ class FileSystemProvider {
|
|
|
176278
176290
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
176279
176291
|
const results = [];
|
|
176280
176292
|
for (const entry of entries) {
|
|
176281
|
-
const fullPath =
|
|
176293
|
+
const fullPath = path3.join(dir, entry.name);
|
|
176282
176294
|
if (entry.isDirectory()) {
|
|
176283
176295
|
results.push(...await this.listFilesRecursively(fullPath, baseDir));
|
|
176284
176296
|
} else if (entry.isFile()) {
|
|
176285
|
-
const rel =
|
|
176286
|
-
results.push(rel.split(
|
|
176297
|
+
const rel = path3.relative(baseDir, fullPath);
|
|
176298
|
+
results.push(rel.split(path3.sep).join("/"));
|
|
176287
176299
|
}
|
|
176288
176300
|
}
|
|
176289
176301
|
return results;
|
|
@@ -177633,8 +177645,8 @@ function getErrorMap2() {
|
|
|
177633
177645
|
|
|
177634
177646
|
// node_modules/zod/v3/helpers/parseUtil.js
|
|
177635
177647
|
var makeIssue = (params) => {
|
|
177636
|
-
const { data, path:
|
|
177637
|
-
const fullPath = [...
|
|
177648
|
+
const { data, path: path4, errorMaps, issueData } = params;
|
|
177649
|
+
const fullPath = [...path4, ...issueData.path || []];
|
|
177638
177650
|
const fullIssue = {
|
|
177639
177651
|
...issueData,
|
|
177640
177652
|
path: fullPath
|
|
@@ -177746,11 +177758,11 @@ var errorUtil;
|
|
|
177746
177758
|
|
|
177747
177759
|
// node_modules/zod/v3/types.js
|
|
177748
177760
|
class ParseInputLazyPath {
|
|
177749
|
-
constructor(parent, value,
|
|
177761
|
+
constructor(parent, value, path4, key) {
|
|
177750
177762
|
this._cachedPath = [];
|
|
177751
177763
|
this.parent = parent;
|
|
177752
177764
|
this.data = value;
|
|
177753
|
-
this._path =
|
|
177765
|
+
this._path = path4;
|
|
177754
177766
|
this._key = key;
|
|
177755
177767
|
}
|
|
177756
177768
|
get path() {
|
|
@@ -186002,7 +186014,7 @@ var SuccessResponseSchema = exports_external.object({
|
|
|
186002
186014
|
var FilePathSchema = exports_external.string().min(1).regex(/^[^/].*$/, "File path must be relative to repository root").regex(/^(?!.*\.\.).*$/, "File path cannot contain directory traversal").describe("File path relative to repository root.");
|
|
186003
186015
|
var TagNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid tag name format").describe("Tag name (must follow git naming conventions).");
|
|
186004
186016
|
var CommitMessageSchema = exports_external.string().min(1, "Commit message cannot be empty").max(1e4, "Commit message too long").describe("Commit message.");
|
|
186005
|
-
var LimitSchema = exports_external.number().int().
|
|
186017
|
+
var LimitSchema = exports_external.number().int().min(1).max(1000).optional().describe("Maximum number of items to return (1-1000).");
|
|
186006
186018
|
var SkipSchema = exports_external.number().int().nonnegative().optional().describe("Number of items to skip for pagination.");
|
|
186007
186019
|
var VerboseSchema = exports_external.boolean().default(false).describe("Include verbose/detailed information in output.");
|
|
186008
186020
|
var QuietSchema = exports_external.boolean().default(false).describe("Suppress informational output (errors only).");
|
|
@@ -186010,7 +186022,7 @@ var RecursiveSchema = exports_external.boolean().default(false).describe("Operat
|
|
|
186010
186022
|
var AllSchema = exports_external.boolean().default(false).describe("Include all items (varies by operation).");
|
|
186011
186023
|
var MergeStrategySchema = exports_external.enum(["ort", "recursive", "octopus", "ours", "subtree"]).optional().describe("Merge strategy to use (ort, recursive, octopus, ours, subtree).");
|
|
186012
186024
|
var PruneSchema = exports_external.boolean().default(false).describe("Prune remote-tracking references that no longer exist on remote.");
|
|
186013
|
-
var DepthSchema = exports_external.number().int().
|
|
186025
|
+
var DepthSchema = exports_external.number().int().min(1).optional().describe("Create a shallow clone with history truncated to N commits.");
|
|
186014
186026
|
var SignSchema = exports_external.boolean().optional().describe("Sign the commit/tag with GPG.");
|
|
186015
186027
|
var NoVerifySchema = exports_external.boolean().default(false).describe("Bypass pre-commit and commit-msg hooks.");
|
|
186016
186028
|
|
|
@@ -186228,21 +186240,21 @@ class JsonFormatterError extends Error {
|
|
|
186228
186240
|
this.name = "JsonFormatterError";
|
|
186229
186241
|
}
|
|
186230
186242
|
}
|
|
186231
|
-
function detectCircularReference(obj, seen = new WeakSet,
|
|
186243
|
+
function detectCircularReference(obj, seen = new WeakSet, path4 = "root") {
|
|
186232
186244
|
if (obj === null || typeof obj !== "object")
|
|
186233
186245
|
return null;
|
|
186234
186246
|
if (seen.has(obj))
|
|
186235
|
-
return
|
|
186247
|
+
return path4;
|
|
186236
186248
|
seen.add(obj);
|
|
186237
186249
|
if (Array.isArray(obj)) {
|
|
186238
186250
|
for (let i2 = 0;i2 < obj.length; i2++) {
|
|
186239
|
-
const result = detectCircularReference(obj[i2], seen, `${
|
|
186251
|
+
const result = detectCircularReference(obj[i2], seen, `${path4}[${i2}]`);
|
|
186240
186252
|
if (result)
|
|
186241
186253
|
return result;
|
|
186242
186254
|
}
|
|
186243
186255
|
} else {
|
|
186244
186256
|
for (const [key, value] of Object.entries(obj)) {
|
|
186245
|
-
const result = detectCircularReference(value, seen, `${
|
|
186257
|
+
const result = detectCircularReference(value, seen, `${path4}.${key}`);
|
|
186246
186258
|
if (result)
|
|
186247
186259
|
return result;
|
|
186248
186260
|
}
|
|
@@ -186966,7 +186978,7 @@ var gitStatusTool = {
|
|
|
186966
186978
|
init_zod();
|
|
186967
186979
|
init_utils();
|
|
186968
186980
|
import { readFileSync } from "fs";
|
|
186969
|
-
import
|
|
186981
|
+
import path4 from "path";
|
|
186970
186982
|
init_config();
|
|
186971
186983
|
var TOOL_NAME9 = "git_wrapup_instructions";
|
|
186972
186984
|
var TOOL_TITLE9 = "Git Wrap-up Instructions";
|
|
@@ -187030,7 +187042,7 @@ function loadInstructions(filePath) {
|
|
|
187030
187042
|
return DEFAULT_WRAPUP_INSTRUCTIONS;
|
|
187031
187043
|
}
|
|
187032
187044
|
try {
|
|
187033
|
-
const resolvedPath =
|
|
187045
|
+
const resolvedPath = path4.resolve(filePath);
|
|
187034
187046
|
logger.debug(`Loading custom instructions from ${resolvedPath} at module initialization`);
|
|
187035
187047
|
return readFileSync(resolvedPath, "utf-8");
|
|
187036
187048
|
} catch (error47) {
|
|
@@ -187855,7 +187867,7 @@ var InputSchema17 = exports_external.object({
|
|
|
187855
187867
|
noCommit: exports_external.boolean().default(false).describe("Don't create commit (stage changes only)."),
|
|
187856
187868
|
continueOperation: exports_external.boolean().default(false).describe("Continue cherry-pick after resolving conflicts."),
|
|
187857
187869
|
abort: exports_external.boolean().default(false).describe("Abort cherry-pick operation."),
|
|
187858
|
-
mainline: exports_external.number().int().
|
|
187870
|
+
mainline: exports_external.number().int().min(1).optional().describe("For merge commits, specify which parent to follow (1 for first parent, 2 for second, etc.)."),
|
|
187859
187871
|
strategy: MergeStrategySchema.describe("Merge strategy to use for cherry-pick."),
|
|
187860
187872
|
signoff: exports_external.boolean().default(false).describe("Add Signed-off-by line to the commit message.")
|
|
187861
187873
|
});
|
|
@@ -189120,26 +189132,26 @@ var handleParsingNestedValues = (form, key, value) => {
|
|
|
189120
189132
|
};
|
|
189121
189133
|
|
|
189122
189134
|
// node_modules/hono/dist/utils/url.js
|
|
189123
|
-
var splitPath = (
|
|
189124
|
-
const paths =
|
|
189135
|
+
var splitPath = (path5) => {
|
|
189136
|
+
const paths = path5.split("/");
|
|
189125
189137
|
if (paths[0] === "") {
|
|
189126
189138
|
paths.shift();
|
|
189127
189139
|
}
|
|
189128
189140
|
return paths;
|
|
189129
189141
|
};
|
|
189130
189142
|
var splitRoutingPath = (routePath) => {
|
|
189131
|
-
const { groups, path:
|
|
189132
|
-
const paths = splitPath(
|
|
189143
|
+
const { groups, path: path5 } = extractGroupsFromPath(routePath);
|
|
189144
|
+
const paths = splitPath(path5);
|
|
189133
189145
|
return replaceGroupMarks(paths, groups);
|
|
189134
189146
|
};
|
|
189135
|
-
var extractGroupsFromPath = (
|
|
189147
|
+
var extractGroupsFromPath = (path5) => {
|
|
189136
189148
|
const groups = [];
|
|
189137
|
-
|
|
189149
|
+
path5 = path5.replace(/\{[^}]+\}/g, (match, index2) => {
|
|
189138
189150
|
const mark = `@${index2}`;
|
|
189139
189151
|
groups.push([mark, match]);
|
|
189140
189152
|
return mark;
|
|
189141
189153
|
});
|
|
189142
|
-
return { groups, path:
|
|
189154
|
+
return { groups, path: path5 };
|
|
189143
189155
|
};
|
|
189144
189156
|
var replaceGroupMarks = (paths, groups) => {
|
|
189145
189157
|
for (let i2 = groups.length - 1;i2 >= 0; i2--) {
|
|
@@ -189194,8 +189206,8 @@ var getPath = (request) => {
|
|
|
189194
189206
|
const charCode = url2.charCodeAt(i2);
|
|
189195
189207
|
if (charCode === 37) {
|
|
189196
189208
|
const queryIndex = url2.indexOf("?", i2);
|
|
189197
|
-
const
|
|
189198
|
-
return tryDecodeURI(
|
|
189209
|
+
const path5 = url2.slice(start, queryIndex === -1 ? undefined : queryIndex);
|
|
189210
|
+
return tryDecodeURI(path5.includes("%25") ? path5.replace(/%25/g, "%2525") : path5);
|
|
189199
189211
|
} else if (charCode === 63) {
|
|
189200
189212
|
break;
|
|
189201
189213
|
}
|
|
@@ -189212,11 +189224,11 @@ var mergePath = (base, sub, ...rest) => {
|
|
|
189212
189224
|
}
|
|
189213
189225
|
return `${base?.[0] === "/" ? "" : "/"}${base}${sub === "/" ? "" : `${base?.at(-1) === "/" ? "" : "/"}${sub?.[0] === "/" ? sub.slice(1) : sub}`}`;
|
|
189214
189226
|
};
|
|
189215
|
-
var checkOptionalParameter = (
|
|
189216
|
-
if (
|
|
189227
|
+
var checkOptionalParameter = (path5) => {
|
|
189228
|
+
if (path5.charCodeAt(path5.length - 1) !== 63 || !path5.includes(":")) {
|
|
189217
189229
|
return null;
|
|
189218
189230
|
}
|
|
189219
|
-
const segments =
|
|
189231
|
+
const segments = path5.split("/");
|
|
189220
189232
|
const results = [];
|
|
189221
189233
|
let basePath = "";
|
|
189222
189234
|
segments.forEach((segment) => {
|
|
@@ -189326,9 +189338,9 @@ var HonoRequest = class {
|
|
|
189326
189338
|
routeIndex = 0;
|
|
189327
189339
|
path;
|
|
189328
189340
|
bodyCache = {};
|
|
189329
|
-
constructor(request,
|
|
189341
|
+
constructor(request, path5 = "/", matchResult = [[]]) {
|
|
189330
189342
|
this.raw = request;
|
|
189331
|
-
this.path =
|
|
189343
|
+
this.path = path5;
|
|
189332
189344
|
this.#matchResult = matchResult;
|
|
189333
189345
|
this.#validatedData = {};
|
|
189334
189346
|
}
|
|
@@ -189685,8 +189697,8 @@ var Hono = class {
|
|
|
189685
189697
|
return this;
|
|
189686
189698
|
};
|
|
189687
189699
|
});
|
|
189688
|
-
this.on = (method,
|
|
189689
|
-
for (const p of [
|
|
189700
|
+
this.on = (method, path5, ...handlers) => {
|
|
189701
|
+
for (const p of [path5].flat()) {
|
|
189690
189702
|
this.#path = p;
|
|
189691
189703
|
for (const m of [method].flat()) {
|
|
189692
189704
|
handlers.map((handler) => {
|
|
@@ -189724,8 +189736,8 @@ var Hono = class {
|
|
|
189724
189736
|
}
|
|
189725
189737
|
#notFoundHandler = notFoundHandler;
|
|
189726
189738
|
errorHandler = errorHandler;
|
|
189727
|
-
route(
|
|
189728
|
-
const subApp = this.basePath(
|
|
189739
|
+
route(path5, app) {
|
|
189740
|
+
const subApp = this.basePath(path5);
|
|
189729
189741
|
app.routes.map((r) => {
|
|
189730
189742
|
let handler;
|
|
189731
189743
|
if (app.errorHandler === errorHandler) {
|
|
@@ -189738,9 +189750,9 @@ var Hono = class {
|
|
|
189738
189750
|
});
|
|
189739
189751
|
return this;
|
|
189740
189752
|
}
|
|
189741
|
-
basePath(
|
|
189753
|
+
basePath(path5) {
|
|
189742
189754
|
const subApp = this.#clone();
|
|
189743
|
-
subApp._basePath = mergePath(this._basePath,
|
|
189755
|
+
subApp._basePath = mergePath(this._basePath, path5);
|
|
189744
189756
|
return subApp;
|
|
189745
189757
|
}
|
|
189746
189758
|
onError = (handler) => {
|
|
@@ -189751,7 +189763,7 @@ var Hono = class {
|
|
|
189751
189763
|
this.#notFoundHandler = handler;
|
|
189752
189764
|
return this;
|
|
189753
189765
|
};
|
|
189754
|
-
mount(
|
|
189766
|
+
mount(path5, applicationHandler, options) {
|
|
189755
189767
|
let replaceRequest;
|
|
189756
189768
|
let optionHandler;
|
|
189757
189769
|
if (options) {
|
|
@@ -189777,7 +189789,7 @@ var Hono = class {
|
|
|
189777
189789
|
return [c.env, executionContext];
|
|
189778
189790
|
};
|
|
189779
189791
|
replaceRequest ||= (() => {
|
|
189780
|
-
const mergedPath = mergePath(this._basePath,
|
|
189792
|
+
const mergedPath = mergePath(this._basePath, path5);
|
|
189781
189793
|
const pathPrefixLength = mergedPath === "/" ? 0 : mergedPath.length;
|
|
189782
189794
|
return (request) => {
|
|
189783
189795
|
const url2 = new URL(request.url);
|
|
@@ -189792,14 +189804,14 @@ var Hono = class {
|
|
|
189792
189804
|
}
|
|
189793
189805
|
await next();
|
|
189794
189806
|
};
|
|
189795
|
-
this.#addRoute(METHOD_NAME_ALL, mergePath(
|
|
189807
|
+
this.#addRoute(METHOD_NAME_ALL, mergePath(path5, "*"), handler);
|
|
189796
189808
|
return this;
|
|
189797
189809
|
}
|
|
189798
|
-
#addRoute(method,
|
|
189810
|
+
#addRoute(method, path5, handler) {
|
|
189799
189811
|
method = method.toUpperCase();
|
|
189800
|
-
|
|
189801
|
-
const r = { basePath: this._basePath, path:
|
|
189802
|
-
this.router.add(method,
|
|
189812
|
+
path5 = mergePath(this._basePath, path5);
|
|
189813
|
+
const r = { basePath: this._basePath, path: path5, method, handler };
|
|
189814
|
+
this.router.add(method, path5, [handler, r]);
|
|
189803
189815
|
this.routes.push(r);
|
|
189804
189816
|
}
|
|
189805
189817
|
#handleError(err, c) {
|
|
@@ -189812,10 +189824,10 @@ var Hono = class {
|
|
|
189812
189824
|
if (method === "HEAD") {
|
|
189813
189825
|
return (async () => new Response(null, await this.#dispatch(request, executionCtx, env2, "GET")))();
|
|
189814
189826
|
}
|
|
189815
|
-
const
|
|
189816
|
-
const matchResult = this.router.match(method,
|
|
189827
|
+
const path5 = this.getPath(request, { env: env2 });
|
|
189828
|
+
const matchResult = this.router.match(method, path5);
|
|
189817
189829
|
const c = new Context(request, {
|
|
189818
|
-
path:
|
|
189830
|
+
path: path5,
|
|
189819
189831
|
matchResult,
|
|
189820
189832
|
env: env2,
|
|
189821
189833
|
executionCtx,
|
|
@@ -189864,7 +189876,7 @@ var Hono = class {
|
|
|
189864
189876
|
|
|
189865
189877
|
// node_modules/hono/dist/router/reg-exp-router/matcher.js
|
|
189866
189878
|
var emptyParam = [];
|
|
189867
|
-
function match(method,
|
|
189879
|
+
function match(method, path5) {
|
|
189868
189880
|
const matchers = this.buildAllMatchers();
|
|
189869
189881
|
const match2 = (method2, path22) => {
|
|
189870
189882
|
const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
|
|
@@ -189880,7 +189892,7 @@ function match(method, path4) {
|
|
|
189880
189892
|
return [matcher[1][index2], match3];
|
|
189881
189893
|
};
|
|
189882
189894
|
this.match = match2;
|
|
189883
|
-
return match2(method,
|
|
189895
|
+
return match2(method, path5);
|
|
189884
189896
|
}
|
|
189885
189897
|
|
|
189886
189898
|
// node_modules/hono/dist/router/reg-exp-router/node.js
|
|
@@ -189991,12 +190003,12 @@ var Node = class {
|
|
|
189991
190003
|
var Trie = class {
|
|
189992
190004
|
#context = { varIndex: 0 };
|
|
189993
190005
|
#root = new Node;
|
|
189994
|
-
insert(
|
|
190006
|
+
insert(path5, index2, pathErrorCheckOnly) {
|
|
189995
190007
|
const paramAssoc = [];
|
|
189996
190008
|
const groups = [];
|
|
189997
190009
|
for (let i2 = 0;; ) {
|
|
189998
190010
|
let replaced = false;
|
|
189999
|
-
|
|
190011
|
+
path5 = path5.replace(/\{[^}]+\}/g, (m) => {
|
|
190000
190012
|
const mark = `@\\${i2}`;
|
|
190001
190013
|
groups[i2] = [mark, m];
|
|
190002
190014
|
i2++;
|
|
@@ -190007,7 +190019,7 @@ var Trie = class {
|
|
|
190007
190019
|
break;
|
|
190008
190020
|
}
|
|
190009
190021
|
}
|
|
190010
|
-
const tokens =
|
|
190022
|
+
const tokens = path5.match(/(?::[^\/]+)|(?:\/\*$)|./g) || [];
|
|
190011
190023
|
for (let i2 = groups.length - 1;i2 >= 0; i2--) {
|
|
190012
190024
|
const [mark] = groups[i2];
|
|
190013
190025
|
for (let j = tokens.length - 1;j >= 0; j--) {
|
|
@@ -190046,8 +190058,8 @@ var Trie = class {
|
|
|
190046
190058
|
// node_modules/hono/dist/router/reg-exp-router/router.js
|
|
190047
190059
|
var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
|
|
190048
190060
|
var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
|
|
190049
|
-
function buildWildcardRegExp(
|
|
190050
|
-
return wildcardRegExpCache[
|
|
190061
|
+
function buildWildcardRegExp(path5) {
|
|
190062
|
+
return wildcardRegExpCache[path5] ??= new RegExp(path5 === "*" ? "" : `^${path5.replace(/\/\*$|([.\\+*[^\]$()])/g, (_, metaChar) => metaChar ? `\\${metaChar}` : "(?:|/.*)")}$`);
|
|
190051
190063
|
}
|
|
190052
190064
|
function clearWildcardRegExpCache() {
|
|
190053
190065
|
wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
|
|
@@ -190061,17 +190073,17 @@ function buildMatcherFromPreprocessedRoutes(routes) {
|
|
|
190061
190073
|
const routesWithStaticPathFlag = routes.map((route) => [!/\*|\/:/.test(route[0]), ...route]).sort(([isStaticA, pathA], [isStaticB, pathB]) => isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length);
|
|
190062
190074
|
const staticMap = /* @__PURE__ */ Object.create(null);
|
|
190063
190075
|
for (let i2 = 0, j = -1, len = routesWithStaticPathFlag.length;i2 < len; i2++) {
|
|
190064
|
-
const [pathErrorCheckOnly,
|
|
190076
|
+
const [pathErrorCheckOnly, path5, handlers] = routesWithStaticPathFlag[i2];
|
|
190065
190077
|
if (pathErrorCheckOnly) {
|
|
190066
|
-
staticMap[
|
|
190078
|
+
staticMap[path5] = [handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]), emptyParam];
|
|
190067
190079
|
} else {
|
|
190068
190080
|
j++;
|
|
190069
190081
|
}
|
|
190070
190082
|
let paramAssoc;
|
|
190071
190083
|
try {
|
|
190072
|
-
paramAssoc = trie.insert(
|
|
190084
|
+
paramAssoc = trie.insert(path5, j, pathErrorCheckOnly);
|
|
190073
190085
|
} catch (e) {
|
|
190074
|
-
throw e === PATH_ERROR ? new UnsupportedPathError(
|
|
190086
|
+
throw e === PATH_ERROR ? new UnsupportedPathError(path5) : e;
|
|
190075
190087
|
}
|
|
190076
190088
|
if (pathErrorCheckOnly) {
|
|
190077
190089
|
continue;
|
|
@@ -190105,12 +190117,12 @@ function buildMatcherFromPreprocessedRoutes(routes) {
|
|
|
190105
190117
|
}
|
|
190106
190118
|
return [regexp, handlerMap, staticMap];
|
|
190107
190119
|
}
|
|
190108
|
-
function findMiddleware(middleware,
|
|
190120
|
+
function findMiddleware(middleware, path5) {
|
|
190109
190121
|
if (!middleware) {
|
|
190110
190122
|
return;
|
|
190111
190123
|
}
|
|
190112
190124
|
for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {
|
|
190113
|
-
if (buildWildcardRegExp(k).test(
|
|
190125
|
+
if (buildWildcardRegExp(k).test(path5)) {
|
|
190114
190126
|
return [...middleware[k]];
|
|
190115
190127
|
}
|
|
190116
190128
|
}
|
|
@@ -190124,7 +190136,7 @@ var RegExpRouter = class {
|
|
|
190124
190136
|
this.#middleware = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
|
|
190125
190137
|
this.#routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };
|
|
190126
190138
|
}
|
|
190127
|
-
add(method,
|
|
190139
|
+
add(method, path5, handler) {
|
|
190128
190140
|
const middleware = this.#middleware;
|
|
190129
190141
|
const routes = this.#routes;
|
|
190130
190142
|
if (!middleware || !routes) {
|
|
@@ -190138,18 +190150,18 @@ var RegExpRouter = class {
|
|
|
190138
190150
|
});
|
|
190139
190151
|
});
|
|
190140
190152
|
}
|
|
190141
|
-
if (
|
|
190142
|
-
|
|
190153
|
+
if (path5 === "/*") {
|
|
190154
|
+
path5 = "*";
|
|
190143
190155
|
}
|
|
190144
|
-
const paramCount = (
|
|
190145
|
-
if (/\*$/.test(
|
|
190146
|
-
const re = buildWildcardRegExp(
|
|
190156
|
+
const paramCount = (path5.match(/\/:/g) || []).length;
|
|
190157
|
+
if (/\*$/.test(path5)) {
|
|
190158
|
+
const re = buildWildcardRegExp(path5);
|
|
190147
190159
|
if (method === METHOD_NAME_ALL) {
|
|
190148
190160
|
Object.keys(middleware).forEach((m) => {
|
|
190149
|
-
middleware[m][
|
|
190161
|
+
middleware[m][path5] ||= findMiddleware(middleware[m], path5) || findMiddleware(middleware[METHOD_NAME_ALL], path5) || [];
|
|
190150
190162
|
});
|
|
190151
190163
|
} else {
|
|
190152
|
-
middleware[method][
|
|
190164
|
+
middleware[method][path5] ||= findMiddleware(middleware[method], path5) || findMiddleware(middleware[METHOD_NAME_ALL], path5) || [];
|
|
190153
190165
|
}
|
|
190154
190166
|
Object.keys(middleware).forEach((m) => {
|
|
190155
190167
|
if (method === METHOD_NAME_ALL || method === m) {
|
|
@@ -190165,7 +190177,7 @@ var RegExpRouter = class {
|
|
|
190165
190177
|
});
|
|
190166
190178
|
return;
|
|
190167
190179
|
}
|
|
190168
|
-
const paths = checkOptionalParameter(
|
|
190180
|
+
const paths = checkOptionalParameter(path5) || [path5];
|
|
190169
190181
|
for (let i2 = 0, len = paths.length;i2 < len; i2++) {
|
|
190170
190182
|
const path22 = paths[i2];
|
|
190171
190183
|
Object.keys(routes).forEach((m) => {
|
|
@@ -190192,12 +190204,12 @@ var RegExpRouter = class {
|
|
|
190192
190204
|
const routes = [];
|
|
190193
190205
|
let hasOwnRoute = method === METHOD_NAME_ALL;
|
|
190194
190206
|
[this.#middleware, this.#routes].forEach((r) => {
|
|
190195
|
-
const ownRoute = r[method] ? Object.keys(r[method]).map((
|
|
190207
|
+
const ownRoute = r[method] ? Object.keys(r[method]).map((path5) => [path5, r[method][path5]]) : [];
|
|
190196
190208
|
if (ownRoute.length !== 0) {
|
|
190197
190209
|
hasOwnRoute ||= true;
|
|
190198
190210
|
routes.push(...ownRoute);
|
|
190199
190211
|
} else if (method !== METHOD_NAME_ALL) {
|
|
190200
|
-
routes.push(...Object.keys(r[METHOD_NAME_ALL]).map((
|
|
190212
|
+
routes.push(...Object.keys(r[METHOD_NAME_ALL]).map((path5) => [path5, r[METHOD_NAME_ALL][path5]]));
|
|
190201
190213
|
}
|
|
190202
190214
|
});
|
|
190203
190215
|
if (!hasOwnRoute) {
|
|
@@ -190222,21 +190234,21 @@ var PreparedRegExpRouter = class {
|
|
|
190222
190234
|
matcher[1].forEach((list) => list && list.push(handlerData));
|
|
190223
190235
|
Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));
|
|
190224
190236
|
}
|
|
190225
|
-
#addPath(method,
|
|
190237
|
+
#addPath(method, path5, handler, indexes, map4) {
|
|
190226
190238
|
const matcher = this.#matchers[method];
|
|
190227
190239
|
if (!map4) {
|
|
190228
|
-
matcher[2][
|
|
190240
|
+
matcher[2][path5][0].push([handler, {}]);
|
|
190229
190241
|
} else {
|
|
190230
190242
|
indexes.forEach((index2) => {
|
|
190231
190243
|
if (typeof index2 === "number") {
|
|
190232
190244
|
matcher[1][index2].push([handler, map4]);
|
|
190233
190245
|
} else {
|
|
190234
|
-
matcher[2][index2 ||
|
|
190246
|
+
matcher[2][index2 || path5][0].push([handler, map4]);
|
|
190235
190247
|
}
|
|
190236
190248
|
});
|
|
190237
190249
|
}
|
|
190238
190250
|
}
|
|
190239
|
-
add(method,
|
|
190251
|
+
add(method, path5, handler) {
|
|
190240
190252
|
if (!this.#matchers[method]) {
|
|
190241
190253
|
const all = this.#matchers[METHOD_NAME_ALL];
|
|
190242
190254
|
const staticMap = {};
|
|
@@ -190249,7 +190261,7 @@ var PreparedRegExpRouter = class {
|
|
|
190249
190261
|
staticMap
|
|
190250
190262
|
];
|
|
190251
190263
|
}
|
|
190252
|
-
if (
|
|
190264
|
+
if (path5 === "/*" || path5 === "*") {
|
|
190253
190265
|
const handlerData = [handler, {}];
|
|
190254
190266
|
if (method === METHOD_NAME_ALL) {
|
|
190255
190267
|
for (const m in this.#matchers) {
|
|
@@ -190260,17 +190272,17 @@ var PreparedRegExpRouter = class {
|
|
|
190260
190272
|
}
|
|
190261
190273
|
return;
|
|
190262
190274
|
}
|
|
190263
|
-
const data = this.#relocateMap[
|
|
190275
|
+
const data = this.#relocateMap[path5];
|
|
190264
190276
|
if (!data) {
|
|
190265
|
-
throw new Error(`Path ${
|
|
190277
|
+
throw new Error(`Path ${path5} is not registered`);
|
|
190266
190278
|
}
|
|
190267
190279
|
for (const [indexes, map4] of data) {
|
|
190268
190280
|
if (method === METHOD_NAME_ALL) {
|
|
190269
190281
|
for (const m in this.#matchers) {
|
|
190270
|
-
this.#addPath(m,
|
|
190282
|
+
this.#addPath(m, path5, handler, indexes, map4);
|
|
190271
190283
|
}
|
|
190272
190284
|
} else {
|
|
190273
|
-
this.#addPath(method,
|
|
190285
|
+
this.#addPath(method, path5, handler, indexes, map4);
|
|
190274
190286
|
}
|
|
190275
190287
|
}
|
|
190276
190288
|
}
|
|
@@ -190288,13 +190300,13 @@ var SmartRouter = class {
|
|
|
190288
190300
|
constructor(init) {
|
|
190289
190301
|
this.#routers = init.routers;
|
|
190290
190302
|
}
|
|
190291
|
-
add(method,
|
|
190303
|
+
add(method, path5, handler) {
|
|
190292
190304
|
if (!this.#routes) {
|
|
190293
190305
|
throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);
|
|
190294
190306
|
}
|
|
190295
|
-
this.#routes.push([method,
|
|
190307
|
+
this.#routes.push([method, path5, handler]);
|
|
190296
190308
|
}
|
|
190297
|
-
match(method,
|
|
190309
|
+
match(method, path5) {
|
|
190298
190310
|
if (!this.#routes) {
|
|
190299
190311
|
throw new Error("Fatal error");
|
|
190300
190312
|
}
|
|
@@ -190309,7 +190321,7 @@ var SmartRouter = class {
|
|
|
190309
190321
|
for (let i22 = 0, len2 = routes.length;i22 < len2; i22++) {
|
|
190310
190322
|
router.add(...routes[i22]);
|
|
190311
190323
|
}
|
|
190312
|
-
res = router.match(method,
|
|
190324
|
+
res = router.match(method, path5);
|
|
190313
190325
|
} catch (e) {
|
|
190314
190326
|
if (e instanceof UnsupportedPathError) {
|
|
190315
190327
|
continue;
|
|
@@ -190353,10 +190365,10 @@ var Node2 = class {
|
|
|
190353
190365
|
}
|
|
190354
190366
|
this.#patterns = [];
|
|
190355
190367
|
}
|
|
190356
|
-
insert(method,
|
|
190368
|
+
insert(method, path5, handler) {
|
|
190357
190369
|
this.#order = ++this.#order;
|
|
190358
190370
|
let curNode = this;
|
|
190359
|
-
const parts = splitRoutingPath(
|
|
190371
|
+
const parts = splitRoutingPath(path5);
|
|
190360
190372
|
const possibleKeys = [];
|
|
190361
190373
|
for (let i2 = 0, len = parts.length;i2 < len; i2++) {
|
|
190362
190374
|
const p = parts[i2];
|
|
@@ -190407,12 +190419,12 @@ var Node2 = class {
|
|
|
190407
190419
|
}
|
|
190408
190420
|
return handlerSets;
|
|
190409
190421
|
}
|
|
190410
|
-
search(method,
|
|
190422
|
+
search(method, path5) {
|
|
190411
190423
|
const handlerSets = [];
|
|
190412
190424
|
this.#params = emptyParams;
|
|
190413
190425
|
const curNode = this;
|
|
190414
190426
|
let curNodes = [curNode];
|
|
190415
|
-
const parts = splitPath(
|
|
190427
|
+
const parts = splitPath(path5);
|
|
190416
190428
|
const curNodesQueue = [];
|
|
190417
190429
|
for (let i2 = 0, len = parts.length;i2 < len; i2++) {
|
|
190418
190430
|
const part = parts[i2];
|
|
@@ -190496,18 +190508,18 @@ var TrieRouter = class {
|
|
|
190496
190508
|
constructor() {
|
|
190497
190509
|
this.#node = new Node2;
|
|
190498
190510
|
}
|
|
190499
|
-
add(method,
|
|
190500
|
-
const results = checkOptionalParameter(
|
|
190511
|
+
add(method, path5, handler) {
|
|
190512
|
+
const results = checkOptionalParameter(path5);
|
|
190501
190513
|
if (results) {
|
|
190502
190514
|
for (let i2 = 0, len = results.length;i2 < len; i2++) {
|
|
190503
190515
|
this.#node.insert(method, results[i2], handler);
|
|
190504
190516
|
}
|
|
190505
190517
|
return;
|
|
190506
190518
|
}
|
|
190507
|
-
this.#node.insert(method,
|
|
190519
|
+
this.#node.insert(method, path5, handler);
|
|
190508
190520
|
}
|
|
190509
|
-
match(method,
|
|
190510
|
-
return this.#node.search(method,
|
|
190521
|
+
match(method, path5) {
|
|
190522
|
+
return this.#node.search(method, path5);
|
|
190511
190523
|
}
|
|
190512
190524
|
};
|
|
190513
190525
|
|