@continuous-excellence/ze-great-dashboard-aws 0.31.27 → 0.31.28
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/lambda.mjs +50 -1
- package/package.json +2 -2
package/dist/lambda.mjs
CHANGED
|
@@ -50285,6 +50285,7 @@ __export(util_exports, {
|
|
|
50285
50285
|
required: () => required,
|
|
50286
50286
|
safeExtend: () => safeExtend,
|
|
50287
50287
|
shallowClone: () => shallowClone,
|
|
50288
|
+
sizeCaps: () => sizeCaps,
|
|
50288
50289
|
slugify: () => slugify,
|
|
50289
50290
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
50290
50291
|
toZod: () => toZod,
|
|
@@ -50804,6 +50805,18 @@ function prefixIssues(path, issues) {
|
|
|
50804
50805
|
function unwrapMessage(message2) {
|
|
50805
50806
|
return typeof message2 === "string" ? message2 : message2?.message;
|
|
50806
50807
|
}
|
|
50808
|
+
function sizeCaps(defChecks) {
|
|
50809
|
+
const caps = [];
|
|
50810
|
+
for (const ch of defChecks ?? []) {
|
|
50811
|
+
const d5 = ch._zod.def;
|
|
50812
|
+
if (!/_(length|size)$|_equals$/.test(d5.check))
|
|
50813
|
+
break;
|
|
50814
|
+
const max = d5.maximum ?? d5.length ?? d5.size;
|
|
50815
|
+
if (max >= 0)
|
|
50816
|
+
caps.push([max, ch]);
|
|
50817
|
+
}
|
|
50818
|
+
return caps;
|
|
50819
|
+
}
|
|
50807
50820
|
function attachSchema(issues, start, inst) {
|
|
50808
50821
|
var _a4;
|
|
50809
50822
|
for (let i5 = start; i5 < issues.length; i5++) {
|
|
@@ -52224,7 +52237,7 @@ ${content.join("\n")}
|
|
|
52224
52237
|
var version = {
|
|
52225
52238
|
major: 4,
|
|
52226
52239
|
minor: 6,
|
|
52227
|
-
patch:
|
|
52240
|
+
patch: 6
|
|
52228
52241
|
};
|
|
52229
52242
|
|
|
52230
52243
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -52980,6 +52993,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
52980
52993
|
return payload2;
|
|
52981
52994
|
};
|
|
52982
52995
|
});
|
|
52996
|
+
function capSize(inst, size) {
|
|
52997
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
52998
|
+
if (!caps.length)
|
|
52999
|
+
return;
|
|
53000
|
+
const cap = Math.min(...caps.map((c5) => c5[0]));
|
|
53001
|
+
const parse3 = inst._zod.parse;
|
|
53002
|
+
inst._zod.parse = (payload2, ctx) => {
|
|
53003
|
+
const n3 = size(payload2.value);
|
|
53004
|
+
if (n3 > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
53005
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
53006
|
+
if (n3 > max && ch._zod.def.when(payload2)) {
|
|
53007
|
+
const start = payload2.issues.length;
|
|
53008
|
+
ch._zod.check(payload2);
|
|
53009
|
+
payload2.issues[start].continue = false;
|
|
53010
|
+
attachSchema(payload2.issues, start, inst);
|
|
53011
|
+
return payload2;
|
|
53012
|
+
}
|
|
53013
|
+
}
|
|
53014
|
+
}
|
|
53015
|
+
return parse3(payload2, ctx);
|
|
53016
|
+
};
|
|
53017
|
+
}
|
|
53018
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
53019
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
53020
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
52983
53021
|
function handleArrayResult(result, final, index) {
|
|
52984
53022
|
if (result.issues.length) {
|
|
52985
53023
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -53023,6 +53061,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
53023
53061
|
}
|
|
53024
53062
|
return payload2;
|
|
53025
53063
|
};
|
|
53064
|
+
capSize(inst, arraySize);
|
|
53026
53065
|
});
|
|
53027
53066
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
53028
53067
|
const isPresent = key in input2;
|
|
@@ -53979,6 +54018,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
53979
54018
|
return Promise.all(proms).then(() => payload2);
|
|
53980
54019
|
return payload2;
|
|
53981
54020
|
};
|
|
54021
|
+
capSize(inst, mapSize);
|
|
53982
54022
|
});
|
|
53983
54023
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
53984
54024
|
if (keyResult.issues.length) {
|
|
@@ -54045,6 +54085,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
54045
54085
|
return Promise.all(proms).then(() => payload2);
|
|
54046
54086
|
return payload2;
|
|
54047
54087
|
};
|
|
54088
|
+
capSize(inst, setSize);
|
|
54048
54089
|
});
|
|
54049
54090
|
function handleSetResult(result, final) {
|
|
54050
54091
|
if (result.issues.length) {
|
|
@@ -63575,9 +63616,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
63575
63616
|
doc.write(`}`);
|
|
63576
63617
|
return outputVar;
|
|
63577
63618
|
}
|
|
63619
|
+
function generateSizeGate(doc, schema, size) {
|
|
63620
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
63621
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
63622
|
+
}
|
|
63623
|
+
}
|
|
63578
63624
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
63579
63625
|
const def = schema._zod.def;
|
|
63580
63626
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
63627
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
63581
63628
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
63582
63629
|
const iVar = newVar(ctx);
|
|
63583
63630
|
const elemVar = newVar(ctx);
|
|
@@ -63977,6 +64024,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
63977
64024
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
63978
64025
|
const def = schema._zod.def;
|
|
63979
64026
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
64027
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
63980
64028
|
const outputVar = newVar(ctx);
|
|
63981
64029
|
const kVar = newVar(ctx);
|
|
63982
64030
|
const valVar = newVar(ctx);
|
|
@@ -63993,6 +64041,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
63993
64041
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
63994
64042
|
const def = schema._zod.def;
|
|
63995
64043
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
64044
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
63996
64045
|
const outputVar = newVar(ctx);
|
|
63997
64046
|
const valVar = newVar(ctx);
|
|
63998
64047
|
doc.write(`const ${outputVar} = new Set();`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@continuous-excellence/ze-great-dashboard-aws",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AWS server runtime and CloudFormation deployment tooling for Ze Great Dashboard.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"fflate": "^0.8.3",
|
|
38
38
|
"yaml": "^2.9.1",
|
|
39
|
-
"zod": "^4.6.
|
|
39
|
+
"zod": "^4.6.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"esbuild": "^0.28.2",
|