@mulmoclaude/google-plugin 3.0.1 → 4.0.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/index.js +41 -26
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -435,7 +435,6 @@ function members(proto, table) {
|
|
|
435
435
|
});
|
|
436
436
|
else defineBound(proto, key, desc.value);
|
|
437
437
|
}
|
|
438
|
-
for (const sym of Object.getOwnPropertySymbols(table)) defineBound(proto, sym, table[sym]);
|
|
439
438
|
}
|
|
440
439
|
/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */
|
|
441
440
|
function own(inst, key, value, enumerable = true) {
|
|
@@ -621,8 +620,7 @@ function $constructor(name, initializer, proto, params) {
|
|
|
621
620
|
} finally {
|
|
622
621
|
_zodDesc.value = void 0;
|
|
623
622
|
}
|
|
624
|
-
}
|
|
625
|
-
if (inst._zod.traits.has(name)) return;
|
|
623
|
+
} else if (inst._zod.traits.has(name)) return;
|
|
626
624
|
inst._zod.traits.add(name);
|
|
627
625
|
initializer(inst, def);
|
|
628
626
|
if (initialized) {
|
|
@@ -1407,7 +1405,7 @@ var Doc = class {
|
|
|
1407
1405
|
var version = {
|
|
1408
1406
|
major: 4,
|
|
1409
1407
|
minor: 6,
|
|
1410
|
-
patch:
|
|
1408
|
+
patch: 5
|
|
1411
1409
|
};
|
|
1412
1410
|
//#endregion
|
|
1413
1411
|
//#region ../../../node_modules/zod/v4/core/schemas.js
|
|
@@ -1570,10 +1568,27 @@ var $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
|
|
|
1570
1568
|
def.pattern ?? (def.pattern = email);
|
|
1571
1569
|
$ZodStringFormat.init(inst, def);
|
|
1572
1570
|
});
|
|
1573
|
-
|
|
1571
|
+
function canParseURL(input) {
|
|
1572
|
+
try {
|
|
1573
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
|
|
1574
|
+
new URL(input);
|
|
1575
|
+
return true;
|
|
1576
|
+
} catch {
|
|
1577
|
+
return false;
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
function validateURL(trimmed, def) {
|
|
1581
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
|
|
1582
|
+
return parseURLObject(trimmed, def);
|
|
1583
|
+
}
|
|
1584
|
+
/** Parses a URL while preserving the non-normalizing HTTP guard. */
|
|
1574
1585
|
function parseURLObject(trimmed, def) {
|
|
1575
1586
|
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
|
|
1576
1587
|
try {
|
|
1588
|
+
if (typeof URL !== "undefined") {
|
|
1589
|
+
const URLStatic = URL;
|
|
1590
|
+
if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
|
|
1591
|
+
}
|
|
1577
1592
|
return new URL(trimmed);
|
|
1578
1593
|
} catch {
|
|
1579
1594
|
return 2;
|
|
@@ -1597,7 +1612,7 @@ var $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
|
|
|
1597
1612
|
inst._zod.check = (payload) => {
|
|
1598
1613
|
try {
|
|
1599
1614
|
const trimmed = payload.value.trim();
|
|
1600
|
-
const url =
|
|
1615
|
+
const url = validateURL(trimmed, def);
|
|
1601
1616
|
if (url === 1) {
|
|
1602
1617
|
payload.issues.push({
|
|
1603
1618
|
code: "invalid_format",
|
|
@@ -1619,6 +1634,10 @@ var $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
|
|
|
1619
1634
|
});
|
|
1620
1635
|
return;
|
|
1621
1636
|
}
|
|
1637
|
+
if (url === true) {
|
|
1638
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1622
1641
|
if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
|
|
1623
1642
|
code: "invalid_format",
|
|
1624
1643
|
format: "url",
|
|
@@ -1708,12 +1727,7 @@ var $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
|
|
|
1708
1727
|
var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
1709
1728
|
function isValidIPv6(value) {
|
|
1710
1729
|
if (!ipv6Alphabet.test(value)) return false;
|
|
1711
|
-
|
|
1712
|
-
new URL(`http://[${value}]`);
|
|
1713
|
-
return true;
|
|
1714
|
-
} catch {
|
|
1715
|
-
return false;
|
|
1716
|
-
}
|
|
1730
|
+
return canParseURL(`http://[${value}]`);
|
|
1717
1731
|
}
|
|
1718
1732
|
var $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
|
|
1719
1733
|
def.pattern ?? (def.pattern = ipv6);
|
|
@@ -2707,7 +2721,7 @@ var $ZodCyclicError = class extends Error {
|
|
|
2707
2721
|
var STATE = "~memo";
|
|
2708
2722
|
var NO_ISSUES = [];
|
|
2709
2723
|
function isRef(value) {
|
|
2710
|
-
return value !== null &&
|
|
2724
|
+
return value !== null && typeof value === "object";
|
|
2711
2725
|
}
|
|
2712
2726
|
function cloneIssues(issues) {
|
|
2713
2727
|
return issues.map((iss) => iss.path ? {
|
|
@@ -2754,9 +2768,6 @@ function isRecursive(inst, stack, resolve) {
|
|
|
2754
2768
|
check(def.catchall);
|
|
2755
2769
|
break;
|
|
2756
2770
|
}
|
|
2757
|
-
case "properties":
|
|
2758
|
-
merge(shape(def.shape, false));
|
|
2759
|
-
break;
|
|
2760
2771
|
case "array":
|
|
2761
2772
|
check(def.element);
|
|
2762
2773
|
break;
|
|
@@ -3007,6 +3018,7 @@ var error = () => {
|
|
|
3007
3018
|
base64url: "base64url-encoded string",
|
|
3008
3019
|
json_string: "JSON string",
|
|
3009
3020
|
e164: "E.164 number",
|
|
3021
|
+
currency_code: "currency code",
|
|
3010
3022
|
credit_card: "credit card number",
|
|
3011
3023
|
iban: "IBAN",
|
|
3012
3024
|
jwt: "JWT",
|
|
@@ -3107,12 +3119,16 @@ function registry() {
|
|
|
3107
3119
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
3108
3120
|
//#endregion
|
|
3109
3121
|
//#region ../../../node_modules/zod/v4/core/api.js
|
|
3122
|
+
function snapshotChecks(def) {
|
|
3123
|
+
if (def.checks) def.checks = [...def.checks];
|
|
3124
|
+
return def;
|
|
3125
|
+
}
|
|
3110
3126
|
// @__NO_SIDE_EFFECTS__
|
|
3111
3127
|
function _string(Class, params) {
|
|
3112
|
-
return new Class({
|
|
3128
|
+
return new Class(snapshotChecks({
|
|
3113
3129
|
type: "string",
|
|
3114
3130
|
...normalizeParams(params)
|
|
3115
|
-
});
|
|
3131
|
+
}));
|
|
3116
3132
|
}
|
|
3117
3133
|
// @__NO_SIDE_EFFECTS__
|
|
3118
3134
|
function _email(Class, params) {
|
|
@@ -3384,11 +3400,11 @@ function _isoDuration(Class, params) {
|
|
|
3384
3400
|
}
|
|
3385
3401
|
// @__NO_SIDE_EFFECTS__
|
|
3386
3402
|
function _number(Class, params) {
|
|
3387
|
-
return new Class({
|
|
3403
|
+
return new Class(snapshotChecks({
|
|
3388
3404
|
type: "number",
|
|
3389
3405
|
checks: [],
|
|
3390
3406
|
...normalizeParams(params)
|
|
3391
|
-
});
|
|
3407
|
+
}));
|
|
3392
3408
|
}
|
|
3393
3409
|
// @__NO_SIDE_EFFECTS__
|
|
3394
3410
|
function _int(Class, params) {
|
|
@@ -4268,13 +4284,12 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
4268
4284
|
key
|
|
4269
4285
|
]
|
|
4270
4286
|
}));
|
|
4271
|
-
const
|
|
4272
|
-
const
|
|
4287
|
+
const requiredKeys = [];
|
|
4288
|
+
for (const key of Object.keys(shape)) {
|
|
4273
4289
|
const field = def.shape[key];
|
|
4274
|
-
if (ctx.io === "input"
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
|
|
4290
|
+
if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) requiredKeys.push(key);
|
|
4291
|
+
}
|
|
4292
|
+
if (requiredKeys.length > 0) json.required = requiredKeys;
|
|
4278
4293
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
4279
4294
|
else if (!def.catchall) {
|
|
4280
4295
|
if (ctx.io === "output") json.additionalProperties = false;
|