@ivotoby/openapi-mcp-server 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +13 -1
- package/dist/cli.js +13 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -14858,6 +14858,18 @@ var OpenAPISpecLoader = class {
|
|
|
14858
14858
|
});
|
|
14859
14859
|
return combinedParts.map((p) => p.trim()).filter((p) => p.length > 0);
|
|
14860
14860
|
}
|
|
14861
|
+
// Helper to split only by underscore and camelCase, but not by numbers
|
|
14862
|
+
// Used when abbreviation is disabled to preserve number-letter combinations like "web3"
|
|
14863
|
+
splitCombinedWithoutNumbers(input) {
|
|
14864
|
+
const underscoreParts = input.split("_");
|
|
14865
|
+
let combinedParts = [];
|
|
14866
|
+
underscoreParts.forEach((part) => {
|
|
14867
|
+
const spacedPart = part.replace(/([A-Z]+)/g, " $1").replace(/([A-Z][a-z])/g, " $1");
|
|
14868
|
+
const splitParts = spacedPart.split(" ").filter((p) => p.length > 0);
|
|
14869
|
+
combinedParts = combinedParts.concat(splitParts);
|
|
14870
|
+
});
|
|
14871
|
+
return combinedParts.map((p) => p.trim()).filter((p) => p.length > 0);
|
|
14872
|
+
}
|
|
14861
14873
|
_initialSanitizeAndValidate(originalId, maxLength) {
|
|
14862
14874
|
if (!originalId || originalId.trim().length === 0)
|
|
14863
14875
|
return { currentName: "", originalWasLong: false, errorName: "unnamed-tool" };
|
|
@@ -14950,7 +14962,7 @@ var OpenAPISpecLoader = class {
|
|
|
14950
14962
|
if (errorName) return errorName;
|
|
14951
14963
|
let processedName;
|
|
14952
14964
|
if (this.disableAbbreviation) {
|
|
14953
|
-
processedName = this.
|
|
14965
|
+
processedName = this.splitCombinedWithoutNumbers(sanitizedName).join("-");
|
|
14954
14966
|
} else {
|
|
14955
14967
|
processedName = this._performSemanticAbbreviation(sanitizedName);
|
|
14956
14968
|
processedName = this._applyVowelRemovalIfOverLength(processedName, maxLength);
|
package/dist/cli.js
CHANGED
|
@@ -14858,6 +14858,18 @@ var OpenAPISpecLoader = class {
|
|
|
14858
14858
|
});
|
|
14859
14859
|
return combinedParts.map((p) => p.trim()).filter((p) => p.length > 0);
|
|
14860
14860
|
}
|
|
14861
|
+
// Helper to split only by underscore and camelCase, but not by numbers
|
|
14862
|
+
// Used when abbreviation is disabled to preserve number-letter combinations like "web3"
|
|
14863
|
+
splitCombinedWithoutNumbers(input) {
|
|
14864
|
+
const underscoreParts = input.split("_");
|
|
14865
|
+
let combinedParts = [];
|
|
14866
|
+
underscoreParts.forEach((part) => {
|
|
14867
|
+
const spacedPart = part.replace(/([A-Z]+)/g, " $1").replace(/([A-Z][a-z])/g, " $1");
|
|
14868
|
+
const splitParts = spacedPart.split(" ").filter((p) => p.length > 0);
|
|
14869
|
+
combinedParts = combinedParts.concat(splitParts);
|
|
14870
|
+
});
|
|
14871
|
+
return combinedParts.map((p) => p.trim()).filter((p) => p.length > 0);
|
|
14872
|
+
}
|
|
14861
14873
|
_initialSanitizeAndValidate(originalId, maxLength) {
|
|
14862
14874
|
if (!originalId || originalId.trim().length === 0)
|
|
14863
14875
|
return { currentName: "", originalWasLong: false, errorName: "unnamed-tool" };
|
|
@@ -14950,7 +14962,7 @@ var OpenAPISpecLoader = class {
|
|
|
14950
14962
|
if (errorName) return errorName;
|
|
14951
14963
|
let processedName;
|
|
14952
14964
|
if (this.disableAbbreviation) {
|
|
14953
|
-
processedName = this.
|
|
14965
|
+
processedName = this.splitCombinedWithoutNumbers(sanitizedName).join("-");
|
|
14954
14966
|
} else {
|
|
14955
14967
|
processedName = this._performSemanticAbbreviation(sanitizedName);
|
|
14956
14968
|
processedName = this._applyVowelRemovalIfOverLength(processedName, maxLength);
|