Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f24a51147 | ||
|
|
ef281d4e24 |
+1
-1
@@ -39,7 +39,7 @@ The action then evaluates the differences between the pushes based on the the ru
|
||||
|
||||
### Local Development
|
||||
|
||||
Before you begin, you need to have [Node.js](https://nodejs.org/en/) installed, minimum version 18.
|
||||
Before you begin, you need to have [Node.js](https://nodejs.org/en/) installed, minimum version 20.
|
||||
|
||||
#### Bootstrapping the project
|
||||
|
||||
|
||||
+210
-56
@@ -11713,7 +11713,7 @@ async function wrapRequest(state, octokit, request, options) {
|
||||
}
|
||||
async function requestWithGraphqlErrorHandling(state, octokit, request, options) {
|
||||
const response = await request(request, options);
|
||||
if (response.data && response.data.errors && /Something went wrong while executing your query/.test(
|
||||
if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test(
|
||||
response.data.errors[0].message
|
||||
)) {
|
||||
const error = new import_request_error.RequestError(response.data.errors[0].message, 500, {
|
||||
@@ -11726,7 +11726,7 @@ async function requestWithGraphqlErrorHandling(state, octokit, request, options)
|
||||
}
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var VERSION = "6.0.1";
|
||||
var VERSION = "6.1.0";
|
||||
function retry(octokit, octokitOptions) {
|
||||
const state = Object.assign(
|
||||
{
|
||||
@@ -45170,6 +45170,9 @@ const quotelessJson = (obj) => {
|
||||
};
|
||||
exports.quotelessJson = quotelessJson;
|
||||
class ZodError extends Error {
|
||||
get errors() {
|
||||
return this.issues;
|
||||
}
|
||||
constructor(issues) {
|
||||
super();
|
||||
this.issues = [];
|
||||
@@ -45190,9 +45193,6 @@ class ZodError extends Error {
|
||||
this.name = "ZodError";
|
||||
this.issues = issues;
|
||||
}
|
||||
get errors() {
|
||||
return this.issues;
|
||||
}
|
||||
format(_mapper) {
|
||||
const mapper = _mapper ||
|
||||
function (issue) {
|
||||
@@ -45315,7 +45315,11 @@ exports.getErrorMap = getErrorMap;
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
@@ -45345,7 +45349,7 @@ var errorUtil;
|
||||
(function (errorUtil) {
|
||||
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
||||
errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
|
||||
})(errorUtil = exports.errorUtil || (exports.errorUtil = {}));
|
||||
})(errorUtil || (exports.errorUtil = errorUtil = {}));
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -45399,9 +45403,9 @@ function addIssueToContext(ctx, issueData) {
|
||||
data: ctx.data,
|
||||
path: ctx.path,
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
overrideMap,
|
||||
ctx.common.contextualErrorMap, // contextual error map is first priority
|
||||
ctx.schemaErrorMap, // then schema-bound map if available
|
||||
overrideMap, // then global override map
|
||||
overrideMap === en_1.default ? undefined : en_1.default, // then global default map
|
||||
].filter((x) => !!x),
|
||||
});
|
||||
@@ -45562,7 +45566,7 @@ var util;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
})(util = exports.util || (exports.util = {}));
|
||||
})(util || (exports.util = util = {}));
|
||||
var objectUtil;
|
||||
(function (objectUtil) {
|
||||
objectUtil.mergeShapes = (first, second) => {
|
||||
@@ -45571,7 +45575,7 @@ var objectUtil;
|
||||
...second, // second overwrites first
|
||||
};
|
||||
};
|
||||
})(objectUtil = exports.objectUtil || (exports.objectUtil = {}));
|
||||
})(objectUtil || (exports.objectUtil = objectUtil = {}));
|
||||
exports.ZodParsedType = util.arrayToEnum([
|
||||
"string",
|
||||
"nan",
|
||||
@@ -45650,7 +45654,11 @@ exports.getParsedType = getParsedType;
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
@@ -45907,35 +45915,6 @@ function processCreateParams(params) {
|
||||
return { errorMap: customMap, description };
|
||||
}
|
||||
class ZodType {
|
||||
constructor(def) {
|
||||
/** Alias of safeParseAsync */
|
||||
this.spa = this.safeParseAsync;
|
||||
this._def = def;
|
||||
this.parse = this.parse.bind(this);
|
||||
this.safeParse = this.safeParse.bind(this);
|
||||
this.parseAsync = this.parseAsync.bind(this);
|
||||
this.safeParseAsync = this.safeParseAsync.bind(this);
|
||||
this.spa = this.spa.bind(this);
|
||||
this.refine = this.refine.bind(this);
|
||||
this.refinement = this.refinement.bind(this);
|
||||
this.superRefine = this.superRefine.bind(this);
|
||||
this.optional = this.optional.bind(this);
|
||||
this.nullable = this.nullable.bind(this);
|
||||
this.nullish = this.nullish.bind(this);
|
||||
this.array = this.array.bind(this);
|
||||
this.promise = this.promise.bind(this);
|
||||
this.or = this.or.bind(this);
|
||||
this.and = this.and.bind(this);
|
||||
this.transform = this.transform.bind(this);
|
||||
this.brand = this.brand.bind(this);
|
||||
this.default = this.default.bind(this);
|
||||
this.catch = this.catch.bind(this);
|
||||
this.describe = this.describe.bind(this);
|
||||
this.pipe = this.pipe.bind(this);
|
||||
this.readonly = this.readonly.bind(this);
|
||||
this.isNullable = this.isNullable.bind(this);
|
||||
this.isOptional = this.isOptional.bind(this);
|
||||
}
|
||||
get description() {
|
||||
return this._def.description;
|
||||
}
|
||||
@@ -45999,6 +45978,48 @@ class ZodType {
|
||||
const result = this._parseSync({ data, path: ctx.path, parent: ctx });
|
||||
return handleResult(ctx, result);
|
||||
}
|
||||
"~validate"(data) {
|
||||
var _a, _b;
|
||||
const ctx = {
|
||||
common: {
|
||||
issues: [],
|
||||
async: !!this["~standard"].async,
|
||||
},
|
||||
path: [],
|
||||
schemaErrorMap: this._def.errorMap,
|
||||
parent: null,
|
||||
data,
|
||||
parsedType: (0, util_1.getParsedType)(data),
|
||||
};
|
||||
if (!this["~standard"].async) {
|
||||
try {
|
||||
const result = this._parseSync({ data, path: [], parent: ctx });
|
||||
return (0, parseUtil_1.isValid)(result)
|
||||
? {
|
||||
value: result.value,
|
||||
}
|
||||
: {
|
||||
issues: ctx.common.issues,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
|
||||
this["~standard"].async = true;
|
||||
}
|
||||
ctx.common = {
|
||||
issues: [],
|
||||
async: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_1.isValid)(result)
|
||||
? {
|
||||
value: result.value,
|
||||
}
|
||||
: {
|
||||
issues: ctx.common.issues,
|
||||
});
|
||||
}
|
||||
async parseAsync(data, params) {
|
||||
const result = await this.safeParseAsync(data, params);
|
||||
if (result.success)
|
||||
@@ -46085,6 +46106,40 @@ class ZodType {
|
||||
superRefine(refinement) {
|
||||
return this._refinement(refinement);
|
||||
}
|
||||
constructor(def) {
|
||||
/** Alias of safeParseAsync */
|
||||
this.spa = this.safeParseAsync;
|
||||
this._def = def;
|
||||
this.parse = this.parse.bind(this);
|
||||
this.safeParse = this.safeParse.bind(this);
|
||||
this.parseAsync = this.parseAsync.bind(this);
|
||||
this.safeParseAsync = this.safeParseAsync.bind(this);
|
||||
this.spa = this.spa.bind(this);
|
||||
this.refine = this.refine.bind(this);
|
||||
this.refinement = this.refinement.bind(this);
|
||||
this.superRefine = this.superRefine.bind(this);
|
||||
this.optional = this.optional.bind(this);
|
||||
this.nullable = this.nullable.bind(this);
|
||||
this.nullish = this.nullish.bind(this);
|
||||
this.array = this.array.bind(this);
|
||||
this.promise = this.promise.bind(this);
|
||||
this.or = this.or.bind(this);
|
||||
this.and = this.and.bind(this);
|
||||
this.transform = this.transform.bind(this);
|
||||
this.brand = this.brand.bind(this);
|
||||
this.default = this.default.bind(this);
|
||||
this.catch = this.catch.bind(this);
|
||||
this.describe = this.describe.bind(this);
|
||||
this.pipe = this.pipe.bind(this);
|
||||
this.readonly = this.readonly.bind(this);
|
||||
this.isNullable = this.isNullable.bind(this);
|
||||
this.isOptional = this.isOptional.bind(this);
|
||||
this["~standard"] = {
|
||||
version: 1,
|
||||
vendor: "zod",
|
||||
validate: (data) => this["~validate"](data),
|
||||
};
|
||||
}
|
||||
optional() {
|
||||
return ZodOptional.create(this, this._def);
|
||||
}
|
||||
@@ -46095,7 +46150,7 @@ class ZodType {
|
||||
return this.nullable().optional();
|
||||
}
|
||||
array() {
|
||||
return ZodArray.create(this, this._def);
|
||||
return ZodArray.create(this);
|
||||
}
|
||||
promise() {
|
||||
return ZodPromise.create(this, this._def);
|
||||
@@ -46164,11 +46219,12 @@ exports.Schema = ZodType;
|
||||
exports.ZodSchema = ZodType;
|
||||
const cuidRegex = /^c[^\s-]{8,}$/i;
|
||||
const cuid2Regex = /^[0-9a-z]+$/;
|
||||
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
||||
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
|
||||
// const uuidRegex =
|
||||
// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
||||
const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
||||
const nanoidRegex = /^[a-z0-9_-]{21}$/i;
|
||||
const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
|
||||
const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
||||
// from https://stackoverflow.com/a/46181/1550155
|
||||
// old version: too slow, didn't support unicode
|
||||
@@ -46190,9 +46246,15 @@ const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
||||
let emojiRegex;
|
||||
// faster, simpler, safer
|
||||
const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
||||
const ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
||||
const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
|
||||
// const ipv6Regex =
|
||||
// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
||||
const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
||||
const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
||||
// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
|
||||
const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
||||
// https://base64.guru/standards/base64url
|
||||
const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
|
||||
// simple
|
||||
// const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
|
||||
// no leap year validation
|
||||
@@ -46234,6 +46296,38 @@ function isValidIP(ip, version) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isValidJWT(jwt, alg) {
|
||||
if (!jwtRegex.test(jwt))
|
||||
return false;
|
||||
try {
|
||||
const [header] = jwt.split(".");
|
||||
// Convert base64url to base64
|
||||
const base64 = header
|
||||
.replace(/-/g, "+")
|
||||
.replace(/_/g, "/")
|
||||
.padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
|
||||
const decoded = JSON.parse(atob(base64));
|
||||
if (typeof decoded !== "object" || decoded === null)
|
||||
return false;
|
||||
if (!decoded.typ || !decoded.alg)
|
||||
return false;
|
||||
if (alg && decoded.alg !== alg)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
catch (_a) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function isValidCidr(ip, version) {
|
||||
if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
|
||||
return true;
|
||||
}
|
||||
if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
class ZodString extends ZodType {
|
||||
_parse(input) {
|
||||
if (this._def.coerce) {
|
||||
@@ -46515,6 +46609,28 @@ class ZodString extends ZodType {
|
||||
status.dirty();
|
||||
}
|
||||
}
|
||||
else if (check.kind === "jwt") {
|
||||
if (!isValidJWT(input.data, check.alg)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
(0, parseUtil_1.addIssueToContext)(ctx, {
|
||||
validation: "jwt",
|
||||
code: ZodError_1.ZodIssueCode.invalid_string,
|
||||
message: check.message,
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
}
|
||||
else if (check.kind === "cidr") {
|
||||
if (!isValidCidr(input.data, check.version)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
(0, parseUtil_1.addIssueToContext)(ctx, {
|
||||
validation: "cidr",
|
||||
code: ZodError_1.ZodIssueCode.invalid_string,
|
||||
message: check.message,
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
}
|
||||
else if (check.kind === "base64") {
|
||||
if (!base64Regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
@@ -46526,6 +46642,17 @@ class ZodString extends ZodType {
|
||||
status.dirty();
|
||||
}
|
||||
}
|
||||
else if (check.kind === "base64url") {
|
||||
if (!base64urlRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
(0, parseUtil_1.addIssueToContext)(ctx, {
|
||||
validation: "base64url",
|
||||
code: ZodError_1.ZodIssueCode.invalid_string,
|
||||
message: check.message,
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
}
|
||||
else {
|
||||
util_1.util.assertNever(check);
|
||||
}
|
||||
@@ -46572,9 +46699,22 @@ class ZodString extends ZodType {
|
||||
base64(message) {
|
||||
return this._addCheck({ kind: "base64", ...errorUtil_1.errorUtil.errToObj(message) });
|
||||
}
|
||||
base64url(message) {
|
||||
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
||||
return this._addCheck({
|
||||
kind: "base64url",
|
||||
...errorUtil_1.errorUtil.errToObj(message),
|
||||
});
|
||||
}
|
||||
jwt(options) {
|
||||
return this._addCheck({ kind: "jwt", ...errorUtil_1.errorUtil.errToObj(options) });
|
||||
}
|
||||
ip(options) {
|
||||
return this._addCheck({ kind: "ip", ...errorUtil_1.errorUtil.errToObj(options) });
|
||||
}
|
||||
cidr(options) {
|
||||
return this._addCheck({ kind: "cidr", ...errorUtil_1.errorUtil.errToObj(options) });
|
||||
}
|
||||
datetime(options) {
|
||||
var _a, _b;
|
||||
if (typeof options === "string") {
|
||||
@@ -46665,8 +46805,7 @@ class ZodString extends ZodType {
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @deprecated Use z.string().min(1) instead.
|
||||
* @see {@link ZodString.min}
|
||||
* Equivalent to `.min(1)`
|
||||
*/
|
||||
nonempty(message) {
|
||||
return this.min(1, errorUtil_1.errorUtil.errToObj(message));
|
||||
@@ -46728,9 +46867,16 @@ class ZodString extends ZodType {
|
||||
get isIP() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
||||
}
|
||||
get isCIDR() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "cidr");
|
||||
}
|
||||
get isBase64() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
||||
}
|
||||
get isBase64url() {
|
||||
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
||||
return !!this._def.checks.find((ch) => ch.kind === "base64url");
|
||||
}
|
||||
get minLength() {
|
||||
let min = null;
|
||||
for (const ch of this._def.checks) {
|
||||
@@ -47025,17 +47171,16 @@ class ZodBigInt extends ZodType {
|
||||
}
|
||||
_parse(input) {
|
||||
if (this._def.coerce) {
|
||||
input.data = BigInt(input.data);
|
||||
try {
|
||||
input.data = BigInt(input.data);
|
||||
}
|
||||
catch (_a) {
|
||||
return this._getInvalidInput(input);
|
||||
}
|
||||
}
|
||||
const parsedType = this._getType(input);
|
||||
if (parsedType !== util_1.ZodParsedType.bigint) {
|
||||
const ctx = this._getOrReturnCtx(input);
|
||||
(0, parseUtil_1.addIssueToContext)(ctx, {
|
||||
code: ZodError_1.ZodIssueCode.invalid_type,
|
||||
expected: util_1.ZodParsedType.bigint,
|
||||
received: ctx.parsedType,
|
||||
});
|
||||
return parseUtil_1.INVALID;
|
||||
return this._getInvalidInput(input);
|
||||
}
|
||||
let ctx = undefined;
|
||||
const status = new parseUtil_1.ParseStatus();
|
||||
@@ -47089,6 +47234,15 @@ class ZodBigInt extends ZodType {
|
||||
}
|
||||
return { status: status.value, value: input.data };
|
||||
}
|
||||
_getInvalidInput(input) {
|
||||
const ctx = this._getOrReturnCtx(input);
|
||||
(0, parseUtil_1.addIssueToContext)(ctx, {
|
||||
code: ZodError_1.ZodIssueCode.invalid_type,
|
||||
expected: util_1.ZodParsedType.bigint,
|
||||
received: ctx.parsedType,
|
||||
});
|
||||
return parseUtil_1.INVALID;
|
||||
}
|
||||
gte(value, message) {
|
||||
return this.setLimit("min", value, true, errorUtil_1.errorUtil.toString(message));
|
||||
}
|
||||
@@ -49401,7 +49555,7 @@ var ZodFirstPartyTypeKind;
|
||||
ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
|
||||
ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
|
||||
ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
|
||||
})(ZodFirstPartyTypeKind = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));
|
||||
})(ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind = {}));
|
||||
// requires TS 4.4+
|
||||
class Class {
|
||||
constructor(..._) { }
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
+42
-22
@@ -11,18 +11,18 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/github": "^6.0.0",
|
||||
"@octokit/plugin-retry": "^6.0.1",
|
||||
"@octokit/plugin-retry": "^6.1.0",
|
||||
"@octokit/request-error": "^5.0.1",
|
||||
"@onebeyond/spdx-license-satisfies": "^1.0.1",
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^14.4.3",
|
||||
"got": "^14.4.5",
|
||||
"jest": "^29.7.0",
|
||||
"octokit": "^3.1.2",
|
||||
"spdx-expression-parse": "^3.0.1",
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
"ts-jest": "^29.2.5",
|
||||
"yaml": "^2.3.4",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
@@ -32,13 +32,13 @@
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"esbuild-register": "^3.5.0",
|
||||
"esbuild-register": "^3.6.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
"eslint-plugin-jest": "^28.8.3",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"nodemon": "^3.1.9",
|
||||
"prettier": "3.2.5",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
@@ -1786,6 +1786,12 @@
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/openapi-types": {
|
||||
"version": "23.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
|
||||
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@octokit/plugin-paginate-graphql": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-4.0.0.tgz",
|
||||
@@ -1826,19 +1832,29 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-retry": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz",
|
||||
"integrity": "sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.1.0.tgz",
|
||||
"integrity": "sha512-WrO3bvq4E1Xh1r2mT9w6SDFg01gFmP81nIG77+p/MqW1JeXXgL++6umim3t6x0Zj5pZm3rXAN+0HEjmmdhIRig==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/request-error": "^5.0.0",
|
||||
"@octokit/types": "^12.0.0",
|
||||
"@octokit/types": "^13.0.0",
|
||||
"bottleneck": "^2.15.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=5"
|
||||
"@octokit/core": "5"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
|
||||
"version": "13.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz",
|
||||
"integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^23.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-throttling": {
|
||||
@@ -3573,10 +3589,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-register": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.5.0.tgz",
|
||||
"integrity": "sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==",
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.6.0.tgz",
|
||||
"integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
@@ -4722,9 +4739,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/got": {
|
||||
"version": "14.4.3",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-14.4.3.tgz",
|
||||
"integrity": "sha512-iTC0Z87yxSijWTh/IpvGpwOhIQK7+GgWkYrMRoN/hB9qeRj9RPuLGODwevs0p5idUf7nrxCVa5IlOmK3b8z+KA==",
|
||||
"version": "14.4.5",
|
||||
"resolved": "https://registry.npmjs.org/got/-/got-14.4.5.tgz",
|
||||
"integrity": "sha512-sq+uET8TnNKRNnjEOPJzMcxeI0irT8BBNmf+GtZcJpmhYsQM1DSKmCROUjPWKsXZ5HzwD5Cf5/RV+QD9BSTxJg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@sindresorhus/is": "^7.0.1",
|
||||
"@szmarczak/http-timer": "^5.0.1",
|
||||
@@ -6349,10 +6367,11 @@
|
||||
"integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ=="
|
||||
},
|
||||
"node_modules/nodemon": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz",
|
||||
"integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==",
|
||||
"version": "3.1.9",
|
||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz",
|
||||
"integrity": "sha512-hdr1oIb2p6ZSxu3PB2JWWYS7ZQ0qvaZsc3hK8DR8f02kRzc8rjYmxAIvdz+aYC+8F2IjNaB7HMcSDg8nQpJxyg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.2",
|
||||
"debug": "^4",
|
||||
@@ -8113,9 +8132,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.23.8",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
|
||||
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
|
||||
"version": "3.24.1",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz",
|
||||
"integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
||||
+5
-5
@@ -27,18 +27,18 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/github": "^6.0.0",
|
||||
"@octokit/plugin-retry": "^6.0.1",
|
||||
"@octokit/plugin-retry": "^6.1.0",
|
||||
"@octokit/request-error": "^5.0.1",
|
||||
"@onebeyond/spdx-license-satisfies": "^1.0.1",
|
||||
"ansi-styles": "^6.2.1",
|
||||
"got": "^14.4.3",
|
||||
"got": "^14.4.5",
|
||||
"jest": "^29.7.0",
|
||||
"octokit": "^3.1.2",
|
||||
"spdx-expression-parse": "^3.0.1",
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
"ts-jest": "^29.2.5",
|
||||
"yaml": "^2.3.4",
|
||||
"zod": "^3.23.8"
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
@@ -48,13 +48,13 @@
|
||||
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"esbuild-register": "^3.5.0",
|
||||
"esbuild-register": "^3.6.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
"eslint-plugin-jest": "^28.8.3",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"nodemon": "^3.1.9",
|
||||
"prettier": "3.2.5",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user