kollab 0.1.20 → 0.1.21
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 +2 -0
- package/dist/index.js +8 -7
- package/dist/kollab-sidecar.cjs +58 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -252,3 +252,5 @@ kollab project update --id <project-id> --clear-memory
|
|
|
252
252
|
```
|
|
253
253
|
|
|
254
254
|
Project Memory is a dedicated field used by new Project Tasks. Direct text, UTF-8 file, and clear modes are mutually exclusive; updates use conflict protection and are limited to 8,000 characters.
|
|
255
|
+
|
|
256
|
+
OpenRouter text/image routes have been retired. `kollab model list --source openrouter` returns no text models. Use `kollab model list` and `kollab model run --model <managed-id>` for text, `kollab tool list` for images; `--modality speech|transcription` retains the existing audio catalog. Legacy Luna selections resolve to paid GPT-6.1 Sol and use Sol pricing.
|
package/dist/index.js
CHANGED
|
@@ -364,6 +364,7 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
364
364
|
enum: [
|
|
365
365
|
"gpt-image-2",
|
|
366
366
|
"gemini-3.1-flash-image",
|
|
367
|
+
"gemini-nano-banana-2.1",
|
|
367
368
|
"gemini-3-pro-image",
|
|
368
369
|
"gemini-2.5-flash-image",
|
|
369
370
|
"x-ai/grok-imagine-image-quality"
|
|
@@ -1143,6 +1144,7 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
1143
1144
|
enum: [
|
|
1144
1145
|
"gpt-image-2",
|
|
1145
1146
|
"gemini-3.1-flash-image",
|
|
1147
|
+
"gemini-nano-banana-2.1",
|
|
1146
1148
|
"gemini-3-pro-image",
|
|
1147
1149
|
"gemini-2.5-flash-image"
|
|
1148
1150
|
]
|
|
@@ -4614,7 +4616,6 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
4614
4616
|
type: "string",
|
|
4615
4617
|
enum: [
|
|
4616
4618
|
"qwen3.6-plus",
|
|
4617
|
-
"glm-5v-turbo",
|
|
4618
4619
|
"gemini-3.1-flash-lite-preview",
|
|
4619
4620
|
"deepseek-v4.1-flash",
|
|
4620
4621
|
"claude-opus-4-6",
|
|
@@ -20311,7 +20312,7 @@ function registerInviteCommands(program2) {
|
|
|
20311
20312
|
var import_promises3 = require("fs/promises");
|
|
20312
20313
|
function registerModelCommands(program2) {
|
|
20313
20314
|
const model = program2.command("model").description("\u6A21\u578B\u76EE\u5F55\u547D\u4EE4");
|
|
20314
|
-
model.command("list").description("\u67E5\u770B\u804A\u5929\u6A21\u578B\u6216 OpenRouter \
|
|
20315
|
+
model.command("list").description("\u67E5\u770B\u53D7\u7BA1\u804A\u5929\u6A21\u578B\u6216 OpenRouter \u97F3\u9891\u76EE\u5F55\uFF1B\u56FE\u7247\u8BF7\u7528 tool list").option("--source <source>", "\u76EE\u5F55\u6765\u6E90\uFF1Achat \u6216 openrouter", "chat").option("--modality <type>", "OpenRouter \u80FD\u529B\uFF1Atext\u3001speech \u6216 transcription", "text").option("--search <text>", "\u6309\u6A21\u578B ID \u6216\u540D\u79F0\u7B5B\u9009").action(async (options) => {
|
|
20315
20316
|
const source = validateCatalogSource(options.source);
|
|
20316
20317
|
if (source === "openrouter") {
|
|
20317
20318
|
const modality = validateCatalogModality(options.modality);
|
|
@@ -20322,15 +20323,15 @@ function registerModelCommands(program2) {
|
|
|
20322
20323
|
const result = await publicApi(resolveApiUrl(), "GET", "/qa/models");
|
|
20323
20324
|
printResult(filterModelCatalog(unwrapSuccessEnvelope(result), options.search));
|
|
20324
20325
|
});
|
|
20325
|
-
model.command("info").description("\u67E5\u770B\
|
|
20326
|
+
model.command("info").description("\u67E5\u770B\u53D7\u7BA1\u6A21\u578B\u6216 OpenRouter \u97F3\u9891\u80FD\u529B").argument("<model-id>", "\u53D7\u7BA1\u6A21\u578B ID\uFF1B\u97F3\u9891\u53EF\u6307\u5B9A --modality\uFF0C\u4F8B\u5982 google/gemini-2.5-flash").option("--modality <type>", "\u6A21\u578B\u80FD\u529B\uFF1Atext\u3001speech \u6216 transcription", "text").action(async (modelId, options) => {
|
|
20326
20327
|
const modality = validateCatalogModality(options.modality);
|
|
20327
20328
|
printResult(
|
|
20328
20329
|
await publicApi(resolveApiUrl(), "GET", `/standalone/v1/model-info?model=${encodeURIComponent(modelId)}&modality=${encodeURIComponent(modality)}`)
|
|
20329
20330
|
);
|
|
20330
20331
|
});
|
|
20331
|
-
model.command("run").description("\u76F4\u63A5\u8C03\u7528\
|
|
20332
|
+
model.command("run").description("\u76F4\u63A5\u8C03\u7528\u53D7\u7BA1\u6A21\u578B\u751F\u6210\u6587\u5B57\uFF08\u4E0D\u7ECF\u8FC7\u5BF9\u8BDD\u3001\u4E0D\u542F\u52A8 AgentCore\uFF09").requiredOption(
|
|
20332
20333
|
"-m, --model <model-id>",
|
|
20333
|
-
"\u6A21\u578B ID\uFF1A`kollab model list
|
|
20334
|
+
"\u53D7\u7BA1\u6A21\u578B ID\uFF1A\u6765\u81EA `kollab model list`\uFF08\u5982 claude-sonnet-5-5\u3001gpt-6.1-sol\uFF09\uFF1B\u56FE\u7247\u8BF7\u7528 `kollab tool list`"
|
|
20334
20335
|
).option("-p, --prompt <text>", "\u63D0\u793A\u8BCD\uFF1B\u4E0D\u586B\u5199\u65F6\u4ECE\u6807\u51C6\u8F93\u5165\u8BFB\u53D6").option("--input-file <path>", "\u4ECE\u672C\u5730 UTF-8 \u6587\u4EF6\u8BFB\u53D6\u63D0\u793A\u8BCD").option("--system <text>", "\u53EF\u9009\u7684\u7CFB\u7EDF\u6307\u4EE4").option("--reasoning <effort>", "\u6A21\u578B\u652F\u6301\u7684\u63A8\u7406\u5F3A\u5EA6").option("--max-tokens <n>", "\u6700\u5927\u8F93\u51FA token \u6570\uFF1B\u5E26\u9690\u85CF\u601D\u8003\u7684\u6A21\u578B\uFF08Gemini/DeepSeek/GLM/Kimi K3 \u7B49\uFF09\u8BBE\u592A\u5C0F\u4F1A\u628A\u9884\u7B97\u5168\u82B1\u5728\u601D\u8003\u4E0A\u3001\u8FD4\u56DE\u7A7A\u6587\u5B57", "4096").option("--temperature <n>", "\u91C7\u6837\u6E29\u5EA6").option("--request-id <id>", "\u5931\u8D25\u540E\u91CD\u8BD5\u65F6\u590D\u7528\u7684\u8BF7\u6C42\u7F16\u53F7").option("--session-id <uuid>", "\u663E\u5F0F\u8FDE\u7EED\u5BF9\u8BDD\u7F16\u53F7\uFF1B\u4E0D\u586B\u5199\u5C31\u662F\u4E00\u6B21\u4E00\u95EE").option("-o, --output-file <path>", "\u628A\u751F\u6210\u7684\u6587\u5B57\u5199\u5165\u672C\u5730\u6587\u4EF6").option("--output-dir <path>", "\u628A\u6A21\u578B\u8FD4\u56DE\u7684\u56FE\u7247 artifact \u4E0B\u8F7D\u5230\u76EE\u5F55\uFF0C\u9ED8\u8BA4\u5F53\u524D\u76EE\u5F55").option("--json", "\u8F93\u51FA\u5B8C\u6574\u7ED3\u679C\uFF0C\u800C\u4E0D\u662F\u53EA\u8F93\u51FA\u6587\u5B57").action(async (options) => {
|
|
20335
20336
|
const prompt = await readPrompt(options);
|
|
20336
20337
|
const maxTokens = parseBoundedInteger(options.maxTokens, "--max-tokens", 1, 16384);
|
|
@@ -20458,8 +20459,8 @@ var fs6 = __toESM(require("fs"));
|
|
|
20458
20459
|
var path6 = __toESM(require("path"));
|
|
20459
20460
|
var UNKNOWN_VERSION = "0.0.0";
|
|
20460
20461
|
function injectedVersion() {
|
|
20461
|
-
if ("0.1.
|
|
20462
|
-
return "0.1.
|
|
20462
|
+
if ("0.1.21".length > 0) {
|
|
20463
|
+
return "0.1.21";
|
|
20463
20464
|
}
|
|
20464
20465
|
return null;
|
|
20465
20466
|
}
|
package/dist/kollab-sidecar.cjs
CHANGED
|
@@ -6452,6 +6452,7 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
6452
6452
|
enum: [
|
|
6453
6453
|
"gpt-image-2",
|
|
6454
6454
|
"gemini-3.1-flash-image",
|
|
6455
|
+
"gemini-nano-banana-2.1",
|
|
6455
6456
|
"gemini-3-pro-image",
|
|
6456
6457
|
"gemini-2.5-flash-image",
|
|
6457
6458
|
"x-ai/grok-imagine-image-quality"
|
|
@@ -7231,6 +7232,7 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
7231
7232
|
enum: [
|
|
7232
7233
|
"gpt-image-2",
|
|
7233
7234
|
"gemini-3.1-flash-image",
|
|
7235
|
+
"gemini-nano-banana-2.1",
|
|
7234
7236
|
"gemini-3-pro-image",
|
|
7235
7237
|
"gemini-2.5-flash-image"
|
|
7236
7238
|
]
|
|
@@ -10702,7 +10704,6 @@ var require_standalone_tool_manifest = __commonJS({
|
|
|
10702
10704
|
type: "string",
|
|
10703
10705
|
enum: [
|
|
10704
10706
|
"qwen3.6-plus",
|
|
10705
|
-
"glm-5v-turbo",
|
|
10706
10707
|
"gemini-3.1-flash-lite-preview",
|
|
10707
10708
|
"deepseek-v4.1-flash",
|
|
10708
10709
|
"claude-opus-4-6",
|
|
@@ -33295,7 +33296,7 @@ init_cjs_shims();
|
|
|
33295
33296
|
var import_promises3 = require("fs/promises");
|
|
33296
33297
|
function registerModelCommands(program3) {
|
|
33297
33298
|
const model = program3.command("model").description("\u6A21\u578B\u76EE\u5F55\u547D\u4EE4");
|
|
33298
|
-
model.command("list").description("\u67E5\u770B\u804A\u5929\u6A21\u578B\u6216 OpenRouter \
|
|
33299
|
+
model.command("list").description("\u67E5\u770B\u53D7\u7BA1\u804A\u5929\u6A21\u578B\u6216 OpenRouter \u97F3\u9891\u76EE\u5F55\uFF1B\u56FE\u7247\u8BF7\u7528 tool list").option("--source <source>", "\u76EE\u5F55\u6765\u6E90\uFF1Achat \u6216 openrouter", "chat").option("--modality <type>", "OpenRouter \u80FD\u529B\uFF1Atext\u3001speech \u6216 transcription", "text").option("--search <text>", "\u6309\u6A21\u578B ID \u6216\u540D\u79F0\u7B5B\u9009").action(async (options) => {
|
|
33299
33300
|
const source = validateCatalogSource(options.source);
|
|
33300
33301
|
if (source === "openrouter") {
|
|
33301
33302
|
const modality = validateCatalogModality(options.modality);
|
|
@@ -33306,15 +33307,15 @@ function registerModelCommands(program3) {
|
|
|
33306
33307
|
const result = await publicApi(resolveApiUrl(), "GET", "/qa/models");
|
|
33307
33308
|
printResult(filterModelCatalog(unwrapSuccessEnvelope(result), options.search));
|
|
33308
33309
|
});
|
|
33309
|
-
model.command("info").description("\u67E5\u770B\
|
|
33310
|
+
model.command("info").description("\u67E5\u770B\u53D7\u7BA1\u6A21\u578B\u6216 OpenRouter \u97F3\u9891\u80FD\u529B").argument("<model-id>", "\u53D7\u7BA1\u6A21\u578B ID\uFF1B\u97F3\u9891\u53EF\u6307\u5B9A --modality\uFF0C\u4F8B\u5982 google/gemini-2.5-flash").option("--modality <type>", "\u6A21\u578B\u80FD\u529B\uFF1Atext\u3001speech \u6216 transcription", "text").action(async (modelId, options) => {
|
|
33310
33311
|
const modality = validateCatalogModality(options.modality);
|
|
33311
33312
|
printResult(
|
|
33312
33313
|
await publicApi(resolveApiUrl(), "GET", `/standalone/v1/model-info?model=${encodeURIComponent(modelId)}&modality=${encodeURIComponent(modality)}`)
|
|
33313
33314
|
);
|
|
33314
33315
|
});
|
|
33315
|
-
model.command("run").description("\u76F4\u63A5\u8C03\u7528\
|
|
33316
|
+
model.command("run").description("\u76F4\u63A5\u8C03\u7528\u53D7\u7BA1\u6A21\u578B\u751F\u6210\u6587\u5B57\uFF08\u4E0D\u7ECF\u8FC7\u5BF9\u8BDD\u3001\u4E0D\u542F\u52A8 AgentCore\uFF09").requiredOption(
|
|
33316
33317
|
"-m, --model <model-id>",
|
|
33317
|
-
"\u6A21\u578B ID\uFF1A`kollab model list
|
|
33318
|
+
"\u53D7\u7BA1\u6A21\u578B ID\uFF1A\u6765\u81EA `kollab model list`\uFF08\u5982 claude-sonnet-5-5\u3001gpt-6.1-sol\uFF09\uFF1B\u56FE\u7247\u8BF7\u7528 `kollab tool list`"
|
|
33318
33319
|
).option("-p, --prompt <text>", "\u63D0\u793A\u8BCD\uFF1B\u4E0D\u586B\u5199\u65F6\u4ECE\u6807\u51C6\u8F93\u5165\u8BFB\u53D6").option("--input-file <path>", "\u4ECE\u672C\u5730 UTF-8 \u6587\u4EF6\u8BFB\u53D6\u63D0\u793A\u8BCD").option("--system <text>", "\u53EF\u9009\u7684\u7CFB\u7EDF\u6307\u4EE4").option("--reasoning <effort>", "\u6A21\u578B\u652F\u6301\u7684\u63A8\u7406\u5F3A\u5EA6").option("--max-tokens <n>", "\u6700\u5927\u8F93\u51FA token \u6570\uFF1B\u5E26\u9690\u85CF\u601D\u8003\u7684\u6A21\u578B\uFF08Gemini/DeepSeek/GLM/Kimi K3 \u7B49\uFF09\u8BBE\u592A\u5C0F\u4F1A\u628A\u9884\u7B97\u5168\u82B1\u5728\u601D\u8003\u4E0A\u3001\u8FD4\u56DE\u7A7A\u6587\u5B57", "4096").option("--temperature <n>", "\u91C7\u6837\u6E29\u5EA6").option("--request-id <id>", "\u5931\u8D25\u540E\u91CD\u8BD5\u65F6\u590D\u7528\u7684\u8BF7\u6C42\u7F16\u53F7").option("--session-id <uuid>", "\u663E\u5F0F\u8FDE\u7EED\u5BF9\u8BDD\u7F16\u53F7\uFF1B\u4E0D\u586B\u5199\u5C31\u662F\u4E00\u6B21\u4E00\u95EE").option("-o, --output-file <path>", "\u628A\u751F\u6210\u7684\u6587\u5B57\u5199\u5165\u672C\u5730\u6587\u4EF6").option("--output-dir <path>", "\u628A\u6A21\u578B\u8FD4\u56DE\u7684\u56FE\u7247 artifact \u4E0B\u8F7D\u5230\u76EE\u5F55\uFF0C\u9ED8\u8BA4\u5F53\u524D\u76EE\u5F55").option("--json", "\u8F93\u51FA\u5B8C\u6574\u7ED3\u679C\uFF0C\u800C\u4E0D\u662F\u53EA\u8F93\u51FA\u6587\u5B57").action(async (options) => {
|
|
33319
33320
|
const prompt = await readPrompt(options);
|
|
33320
33321
|
const maxTokens = parseBoundedInteger(options.maxTokens, "--max-tokens", 1, 16384);
|
|
@@ -33447,8 +33448,8 @@ var fs6 = __toESM(require("fs"));
|
|
|
33447
33448
|
var path6 = __toESM(require("path"));
|
|
33448
33449
|
var UNKNOWN_VERSION = "0.0.0";
|
|
33449
33450
|
function injectedVersion() {
|
|
33450
|
-
if ("0.1.
|
|
33451
|
-
return "0.1.
|
|
33451
|
+
if ("0.1.21".length > 0) {
|
|
33452
|
+
return "0.1.21";
|
|
33452
33453
|
}
|
|
33453
33454
|
return null;
|
|
33454
33455
|
}
|
|
@@ -38517,6 +38518,7 @@ __export(util_exports, {
|
|
|
38517
38518
|
required: () => required,
|
|
38518
38519
|
safeExtend: () => safeExtend,
|
|
38519
38520
|
shallowClone: () => shallowClone,
|
|
38521
|
+
sizeCaps: () => sizeCaps,
|
|
38520
38522
|
slugify: () => slugify,
|
|
38521
38523
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
38522
38524
|
toZod: () => toZod,
|
|
@@ -39037,6 +39039,18 @@ function prefixIssues(path13, issues) {
|
|
|
39037
39039
|
function unwrapMessage(message) {
|
|
39038
39040
|
return typeof message === "string" ? message : message?.message;
|
|
39039
39041
|
}
|
|
39042
|
+
function sizeCaps(defChecks) {
|
|
39043
|
+
const caps = [];
|
|
39044
|
+
for (const ch of defChecks ?? []) {
|
|
39045
|
+
const d = ch._zod.def;
|
|
39046
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
39047
|
+
break;
|
|
39048
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
39049
|
+
if (max >= 0)
|
|
39050
|
+
caps.push([max, ch]);
|
|
39051
|
+
}
|
|
39052
|
+
return caps;
|
|
39053
|
+
}
|
|
39040
39054
|
function attachSchema(issues, start, inst) {
|
|
39041
39055
|
var _a3;
|
|
39042
39056
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -40470,7 +40484,7 @@ init_cjs_shims();
|
|
|
40470
40484
|
var version = {
|
|
40471
40485
|
major: 4,
|
|
40472
40486
|
minor: 6,
|
|
40473
|
-
patch:
|
|
40487
|
+
patch: 7
|
|
40474
40488
|
};
|
|
40475
40489
|
|
|
40476
40490
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -41226,6 +41240,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
41226
41240
|
return payload;
|
|
41227
41241
|
};
|
|
41228
41242
|
});
|
|
41243
|
+
function capSize(inst, size) {
|
|
41244
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
41245
|
+
if (!caps.length)
|
|
41246
|
+
return;
|
|
41247
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
41248
|
+
const parse6 = inst._zod.parse;
|
|
41249
|
+
inst._zod.parse = (payload, ctx) => {
|
|
41250
|
+
const n = size(payload.value);
|
|
41251
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
41252
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
41253
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
41254
|
+
const start = payload.issues.length;
|
|
41255
|
+
ch._zod.check(payload);
|
|
41256
|
+
payload.issues[start].continue = false;
|
|
41257
|
+
attachSchema(payload.issues, start, inst);
|
|
41258
|
+
return payload;
|
|
41259
|
+
}
|
|
41260
|
+
}
|
|
41261
|
+
}
|
|
41262
|
+
return parse6(payload, ctx);
|
|
41263
|
+
};
|
|
41264
|
+
}
|
|
41265
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
41266
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
41267
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
41229
41268
|
function handleArrayResult(result, final, index) {
|
|
41230
41269
|
if (result.issues.length) {
|
|
41231
41270
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -41269,6 +41308,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
41269
41308
|
}
|
|
41270
41309
|
return payload;
|
|
41271
41310
|
};
|
|
41311
|
+
capSize(inst, arraySize);
|
|
41272
41312
|
});
|
|
41273
41313
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
41274
41314
|
const isPresent = key in input2;
|
|
@@ -42225,6 +42265,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
42225
42265
|
return Promise.all(proms).then(() => payload);
|
|
42226
42266
|
return payload;
|
|
42227
42267
|
};
|
|
42268
|
+
capSize(inst, mapSize);
|
|
42228
42269
|
});
|
|
42229
42270
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
42230
42271
|
if (keyResult.issues.length) {
|
|
@@ -42291,6 +42332,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
42291
42332
|
return Promise.all(proms).then(() => payload);
|
|
42292
42333
|
return payload;
|
|
42293
42334
|
};
|
|
42335
|
+
capSize(inst, setSize);
|
|
42294
42336
|
});
|
|
42295
42337
|
function handleSetResult(result, final) {
|
|
42296
42338
|
if (result.issues.length) {
|
|
@@ -51892,9 +51934,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
51892
51934
|
doc.write(`}`);
|
|
51893
51935
|
return outputVar;
|
|
51894
51936
|
}
|
|
51937
|
+
function generateSizeGate(doc, schema, size) {
|
|
51938
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
51939
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
51940
|
+
}
|
|
51941
|
+
}
|
|
51895
51942
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
51896
51943
|
const def = schema._zod.def;
|
|
51897
51944
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
51945
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
51898
51946
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
51899
51947
|
const iVar = newVar(ctx);
|
|
51900
51948
|
const elemVar = newVar(ctx);
|
|
@@ -52294,6 +52342,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
52294
52342
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
52295
52343
|
const def = schema._zod.def;
|
|
52296
52344
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
52345
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
52297
52346
|
const outputVar = newVar(ctx);
|
|
52298
52347
|
const kVar = newVar(ctx);
|
|
52299
52348
|
const valVar = newVar(ctx);
|
|
@@ -52310,6 +52359,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
52310
52359
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
52311
52360
|
const def = schema._zod.def;
|
|
52312
52361
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
52362
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
52313
52363
|
const outputVar = newVar(ctx);
|
|
52314
52364
|
const valVar = newVar(ctx);
|
|
52315
52365
|
doc.write(`const ${outputVar} = new Set();`);
|