@wallarm-org/mcp 3.1.0 → 3.2.0-rc-fix-dark-theme-tokens.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +35 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -330,6 +330,19 @@ function prefixIssues(path, issues) {
|
|
|
330
330
|
function unwrapMessage(message) {
|
|
331
331
|
return "string" == typeof message ? message : message?.message;
|
|
332
332
|
}
|
|
333
|
+
function sizeCaps(defChecks) {
|
|
334
|
+
const caps = [];
|
|
335
|
+
for (const ch of defChecks ?? []){
|
|
336
|
+
const d = ch._zod.def;
|
|
337
|
+
if (!/_(length|size)$|_equals$/.test(d.check)) break;
|
|
338
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
339
|
+
if (max >= 0) caps.push([
|
|
340
|
+
max,
|
|
341
|
+
ch
|
|
342
|
+
]);
|
|
343
|
+
}
|
|
344
|
+
return caps;
|
|
345
|
+
}
|
|
333
346
|
function attachSchema(issues, start, inst) {
|
|
334
347
|
var _a;
|
|
335
348
|
for(let i = start; i < issues.length; i++)(_a = issues[i]).schema ?? (_a.schema = inst);
|
|
@@ -1176,7 +1189,7 @@ class Doc {
|
|
|
1176
1189
|
const versions_version = {
|
|
1177
1190
|
major: 4,
|
|
1178
1191
|
minor: 6,
|
|
1179
|
-
patch:
|
|
1192
|
+
patch: 7
|
|
1180
1193
|
};
|
|
1181
1194
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def)=>{
|
|
1182
1195
|
var _a;
|
|
@@ -1651,6 +1664,26 @@ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def)=>{
|
|
|
1651
1664
|
return payload;
|
|
1652
1665
|
};
|
|
1653
1666
|
});
|
|
1667
|
+
function capSize(inst, size) {
|
|
1668
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1669
|
+
if (!caps.length) return;
|
|
1670
|
+
const cap = Math.min(...caps.map((c)=>c[0]));
|
|
1671
|
+
const parse = inst._zod.parse;
|
|
1672
|
+
inst._zod.parse = (payload, ctx)=>{
|
|
1673
|
+
const n = size(payload.value);
|
|
1674
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1675
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks))if (n > max && ch._zod.def.when(payload)) {
|
|
1676
|
+
const start = payload.issues.length;
|
|
1677
|
+
ch._zod.check(payload);
|
|
1678
|
+
payload.issues[start].continue = false;
|
|
1679
|
+
attachSchema(payload.issues, start, inst);
|
|
1680
|
+
return payload;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
return parse(payload, ctx);
|
|
1684
|
+
};
|
|
1685
|
+
}
|
|
1686
|
+
const arraySize = (input)=>Array.isArray(input) ? input.length : -1;
|
|
1654
1687
|
function handleArrayResult(result, final, index) {
|
|
1655
1688
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1656
1689
|
final.value[index] = result.value;
|
|
@@ -1688,6 +1721,7 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def)=>{
|
|
|
1688
1721
|
if (proms.length) return Promise.all(proms).then(()=>payload);
|
|
1689
1722
|
return payload;
|
|
1690
1723
|
};
|
|
1724
|
+
capSize(inst, arraySize);
|
|
1691
1725
|
});
|
|
1692
1726
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1693
1727
|
const isPresent = key in input;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wallarm-org/mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-rc-fix-dark-theme-tokens.1",
|
|
4
4
|
"description": "MCP server for Wallarm Design System — provides component metadata, props, variants, and design tokens to AI assistants",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|