Merge branch 'main' into external-config
This commit is contained in:
+198
-150
@@ -11643,8 +11643,7 @@ function wrappy (fn, cb) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
|
||||
const parseUtil_1 = __nccwpck_require__(888);
|
||||
exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
|
||||
const util_1 = __nccwpck_require__(3985);
|
||||
exports.ZodIssueCode = util_1.util.arrayToEnum([
|
||||
"invalid_type",
|
||||
@@ -11745,7 +11744,7 @@ class ZodError extends Error {
|
||||
return this.message;
|
||||
}
|
||||
get message() {
|
||||
return JSON.stringify(this.issues, parseUtil_1.jsonStringifyReplacer, 2);
|
||||
return JSON.stringify(this.issues, util_1.util.jsonStringifyReplacer, 2);
|
||||
}
|
||||
get isEmpty() {
|
||||
return this.issues.length === 0;
|
||||
@@ -11773,101 +11772,23 @@ ZodError.create = (issues) => {
|
||||
const error = new ZodError(issues);
|
||||
return error;
|
||||
};
|
||||
const defaultErrorMap = (issue, _ctx) => {
|
||||
let message;
|
||||
switch (issue.code) {
|
||||
case exports.ZodIssueCode.invalid_type:
|
||||
if (issue.received === util_1.ZodParsedType.undefined) {
|
||||
message = "Required";
|
||||
}
|
||||
else {
|
||||
message = `Expected ${issue.expected}, received ${issue.received}`;
|
||||
}
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_literal:
|
||||
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, parseUtil_1.jsonStringifyReplacer)}`;
|
||||
break;
|
||||
case exports.ZodIssueCode.unrecognized_keys:
|
||||
message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_union:
|
||||
message = `Invalid input`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_union_discriminator:
|
||||
message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_enum_value:
|
||||
message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_arguments:
|
||||
message = `Invalid function arguments`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_return_type:
|
||||
message = `Invalid function return type`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_date:
|
||||
message = `Invalid date`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_string:
|
||||
if (typeof issue.validation === "object") {
|
||||
if ("startsWith" in issue.validation) {
|
||||
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
||||
}
|
||||
else if ("endsWith" in issue.validation) {
|
||||
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
||||
}
|
||||
else {
|
||||
util_1.util.assertNever(issue.validation);
|
||||
}
|
||||
}
|
||||
else if (issue.validation !== "regex") {
|
||||
message = `Invalid ${issue.validation}`;
|
||||
}
|
||||
else {
|
||||
message = "Invalid";
|
||||
}
|
||||
break;
|
||||
case exports.ZodIssueCode.too_small:
|
||||
if (issue.type === "array")
|
||||
message = `Array must contain ${issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
||||
else if (issue.type === "string")
|
||||
message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
||||
else if (issue.type === "number")
|
||||
message = `Number must be greater than ${issue.inclusive ? `or equal to ` : ``}${issue.minimum}`;
|
||||
else if (issue.type === "date")
|
||||
message = `Date must be greater than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.minimum)}`;
|
||||
else
|
||||
message = "Invalid input";
|
||||
break;
|
||||
case exports.ZodIssueCode.too_big:
|
||||
if (issue.type === "array")
|
||||
message = `Array must contain ${issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
||||
else if (issue.type === "string")
|
||||
message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
||||
else if (issue.type === "number")
|
||||
message = `Number must be less than ${issue.inclusive ? `or equal to ` : ``}${issue.maximum}`;
|
||||
else if (issue.type === "date")
|
||||
message = `Date must be smaller than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.maximum)}`;
|
||||
else
|
||||
message = "Invalid input";
|
||||
break;
|
||||
case exports.ZodIssueCode.custom:
|
||||
message = `Invalid input`;
|
||||
break;
|
||||
case exports.ZodIssueCode.invalid_intersection_types:
|
||||
message = `Intersection results could not be merged`;
|
||||
break;
|
||||
case exports.ZodIssueCode.not_multiple_of:
|
||||
message = `Number must be a multiple of ${issue.multipleOf}`;
|
||||
break;
|
||||
default:
|
||||
message = _ctx.defaultError;
|
||||
util_1.util.assertNever(issue);
|
||||
}
|
||||
return { message };
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9566:
|
||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
exports.defaultErrorMap = defaultErrorMap;
|
||||
let overrideErrorMap = exports.defaultErrorMap;
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = void 0;
|
||||
const en_1 = __importDefault(__nccwpck_require__(468));
|
||||
exports.defaultErrorMap = en_1.default;
|
||||
let overrideErrorMap = en_1.default;
|
||||
function setErrorMap(map) {
|
||||
overrideErrorMap = map;
|
||||
}
|
||||
@@ -11897,6 +11818,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ZodParsedType = exports.getParsedType = void 0;
|
||||
__exportStar(__nccwpck_require__(9566), exports);
|
||||
__exportStar(__nccwpck_require__(888), exports);
|
||||
__exportStar(__nccwpck_require__(9449), exports);
|
||||
var util_1 = __nccwpck_require__(3985);
|
||||
@@ -11925,13 +11847,17 @@ var errorUtil;
|
||||
/***/ }),
|
||||
|
||||
/***/ 888:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.jsonStringifyReplacer = exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;
|
||||
const ZodError_1 = __nccwpck_require__(9892);
|
||||
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;
|
||||
const errors_1 = __nccwpck_require__(9566);
|
||||
const en_1 = __importDefault(__nccwpck_require__(468));
|
||||
const makeIssue = (params) => {
|
||||
const { data, path, errorMaps, issueData } = params;
|
||||
const fullPath = [...path, ...(issueData.path || [])];
|
||||
@@ -11963,8 +11889,8 @@ function addIssueToContext(ctx, issueData) {
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
ZodError_1.getErrorMap(),
|
||||
ZodError_1.defaultErrorMap,
|
||||
errors_1.getErrorMap(),
|
||||
en_1.default,
|
||||
].filter((x) => !!x),
|
||||
});
|
||||
ctx.common.issues.push(issue);
|
||||
@@ -12038,13 +11964,6 @@ const isValid = (x) => x.status === "valid";
|
||||
exports.isValid = isValid;
|
||||
const isAsync = (x) => typeof Promise !== undefined && x instanceof Promise;
|
||||
exports.isAsync = isAsync;
|
||||
const jsonStringifyReplacer = (_, value) => {
|
||||
if (typeof value === "bigint") {
|
||||
return value.toString();
|
||||
}
|
||||
return value;
|
||||
};
|
||||
exports.jsonStringifyReplacer = jsonStringifyReplacer;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -12122,6 +12041,12 @@ var util;
|
||||
.join(separator);
|
||||
}
|
||||
util.joinValues = joinValues;
|
||||
util.jsonStringifyReplacer = (_, value) => {
|
||||
if (typeof value === "bigint") {
|
||||
return value.toString();
|
||||
}
|
||||
return value;
|
||||
};
|
||||
})(util = exports.util || (exports.util = {}));
|
||||
exports.ZodParsedType = util.arrayToEnum([
|
||||
"string",
|
||||
@@ -12227,6 +12152,112 @@ __exportStar(__nccwpck_require__(9906), exports);
|
||||
exports["default"] = mod;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 468:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const util_1 = __nccwpck_require__(3985);
|
||||
const ZodError_1 = __nccwpck_require__(9892);
|
||||
const errorMap = (issue, _ctx) => {
|
||||
let message;
|
||||
switch (issue.code) {
|
||||
case ZodError_1.ZodIssueCode.invalid_type:
|
||||
if (issue.received === util_1.ZodParsedType.undefined) {
|
||||
message = "Required";
|
||||
}
|
||||
else {
|
||||
message = `Expected ${issue.expected}, received ${issue.received}`;
|
||||
}
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_literal:
|
||||
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_1.util.jsonStringifyReplacer)}`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.unrecognized_keys:
|
||||
message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_union:
|
||||
message = `Invalid input`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_union_discriminator:
|
||||
message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_enum_value:
|
||||
message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_arguments:
|
||||
message = `Invalid function arguments`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_return_type:
|
||||
message = `Invalid function return type`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_date:
|
||||
message = `Invalid date`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_string:
|
||||
if (typeof issue.validation === "object") {
|
||||
if ("startsWith" in issue.validation) {
|
||||
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
||||
}
|
||||
else if ("endsWith" in issue.validation) {
|
||||
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
||||
}
|
||||
else {
|
||||
util_1.util.assertNever(issue.validation);
|
||||
}
|
||||
}
|
||||
else if (issue.validation !== "regex") {
|
||||
message = `Invalid ${issue.validation}`;
|
||||
}
|
||||
else {
|
||||
message = "Invalid";
|
||||
}
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.too_small:
|
||||
if (issue.type === "array")
|
||||
message = `Array must contain ${issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
||||
else if (issue.type === "string")
|
||||
message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
||||
else if (issue.type === "number")
|
||||
message = `Number must be greater than ${issue.inclusive ? `or equal to ` : ``}${issue.minimum}`;
|
||||
else if (issue.type === "date")
|
||||
message = `Date must be greater than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.minimum)}`;
|
||||
else
|
||||
message = "Invalid input";
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.too_big:
|
||||
if (issue.type === "array")
|
||||
message = `Array must contain ${issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
||||
else if (issue.type === "string")
|
||||
message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
||||
else if (issue.type === "number")
|
||||
message = `Number must be less than ${issue.inclusive ? `or equal to ` : ``}${issue.maximum}`;
|
||||
else if (issue.type === "date")
|
||||
message = `Date must be smaller than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.maximum)}`;
|
||||
else
|
||||
message = "Invalid input";
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.custom:
|
||||
message = `Invalid input`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.invalid_intersection_types:
|
||||
message = `Intersection results could not be merged`;
|
||||
break;
|
||||
case ZodError_1.ZodIssueCode.not_multiple_of:
|
||||
message = `Number must be a multiple of ${issue.multipleOf}`;
|
||||
break;
|
||||
default:
|
||||
message = _ctx.defaultError;
|
||||
util_1.util.assertNever(issue);
|
||||
}
|
||||
return { message };
|
||||
};
|
||||
exports["default"] = errorMap;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9335:
|
||||
@@ -12236,7 +12267,8 @@ exports["default"] = mod;
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports["function"] = exports["enum"] = exports.effect = exports.discriminatedUnion = exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.objectUtil = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
|
||||
exports["void"] = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports["null"] = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports["instanceof"] = void 0;
|
||||
exports.NEVER = exports["void"] = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports["null"] = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports["instanceof"] = void 0;
|
||||
const errors_1 = __nccwpck_require__(9566);
|
||||
const errorUtil_1 = __nccwpck_require__(2513);
|
||||
const parseUtil_1 = __nccwpck_require__(888);
|
||||
const util_1 = __nccwpck_require__(3985);
|
||||
@@ -12269,7 +12301,7 @@ function processCreateParams(params) {
|
||||
return {};
|
||||
const { errorMap, invalid_type_error, required_error, description } = params;
|
||||
if (errorMap && (invalid_type_error || required_error)) {
|
||||
throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);
|
||||
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
||||
}
|
||||
if (errorMap)
|
||||
return { errorMap: errorMap, description };
|
||||
@@ -13405,9 +13437,12 @@ class ZodObject extends ZodType {
|
||||
const { status, ctx } = this._processInputParams(input);
|
||||
const { shape, keys: shapeKeys } = this._getCached();
|
||||
const extraKeys = [];
|
||||
for (const key in ctx.data) {
|
||||
if (!shapeKeys.includes(key)) {
|
||||
extraKeys.push(key);
|
||||
if (!(this._def.catchall instanceof ZodNever &&
|
||||
this._def.unknownKeys === "strip")) {
|
||||
for (const key in ctx.data) {
|
||||
if (!shapeKeys.includes(key)) {
|
||||
extraKeys.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
const pairs = [];
|
||||
@@ -13981,6 +14016,9 @@ class ZodTuple extends ZodType {
|
||||
}
|
||||
exports.ZodTuple = ZodTuple;
|
||||
ZodTuple.create = (schemas, params) => {
|
||||
if (!Array.isArray(schemas)) {
|
||||
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
||||
}
|
||||
return new ZodTuple({
|
||||
items: schemas,
|
||||
typeName: ZodFirstPartyTypeKind.ZodTuple,
|
||||
@@ -14211,8 +14249,8 @@ class ZodFunction extends ZodType {
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
ZodError_1.getErrorMap(),
|
||||
ZodError_1.defaultErrorMap,
|
||||
errors_1.getErrorMap(),
|
||||
errors_1.defaultErrorMap,
|
||||
].filter((x) => !!x),
|
||||
issueData: {
|
||||
code: ZodError_1.ZodIssueCode.invalid_arguments,
|
||||
@@ -14227,8 +14265,8 @@ class ZodFunction extends ZodType {
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
ZodError_1.getErrorMap(),
|
||||
ZodError_1.defaultErrorMap,
|
||||
errors_1.getErrorMap(),
|
||||
errors_1.defaultErrorMap,
|
||||
].filter((x) => !!x),
|
||||
issueData: {
|
||||
code: ZodError_1.ZodIssueCode.invalid_return_type,
|
||||
@@ -14298,18 +14336,18 @@ class ZodFunction extends ZodType {
|
||||
const validatedFunc = this.parse(func);
|
||||
return validatedFunc;
|
||||
}
|
||||
static create(args, returns, params) {
|
||||
return new ZodFunction({
|
||||
args: (args
|
||||
? args
|
||||
: ZodTuple.create([]).rest(ZodUnknown.create())),
|
||||
returns: returns || ZodUnknown.create(),
|
||||
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
||||
...processCreateParams(params),
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.ZodFunction = ZodFunction;
|
||||
ZodFunction.create = (args, returns, params) => {
|
||||
return new ZodFunction({
|
||||
args: (args
|
||||
? args.rest(ZodUnknown.create())
|
||||
: ZodTuple.create([]).rest(ZodUnknown.create())),
|
||||
returns: returns || ZodUnknown.create(),
|
||||
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
||||
...processCreateParams(params),
|
||||
});
|
||||
};
|
||||
class ZodLazy extends ZodType {
|
||||
get schema() {
|
||||
return this._def.getter();
|
||||
@@ -14767,6 +14805,12 @@ var ZodFirstPartyTypeKind;
|
||||
ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
|
||||
ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
|
||||
})(ZodFirstPartyTypeKind = exports.ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = {}));
|
||||
// new approach that works for abstract classes
|
||||
// but required TS 4.4+
|
||||
// abstract class Class {
|
||||
// constructor(..._: any[]) {}
|
||||
// }
|
||||
// const instanceOfType = <T extends typeof Class>(
|
||||
const instanceOfType = (cls, params = {
|
||||
message: `Input not instance of ${cls.name}`,
|
||||
}) => exports.custom((data) => data instanceof cls, params, true);
|
||||
@@ -14842,6 +14886,7 @@ const onumber = () => numberType().optional();
|
||||
exports.onumber = onumber;
|
||||
const oboolean = () => booleanType().optional();
|
||||
exports.oboolean = oboolean;
|
||||
exports.NEVER = parseUtil_1.INVALID;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -15170,7 +15215,7 @@ function assembleStyles() {
|
||||
overline: [53, 55],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
strikethrough: [9, 29],
|
||||
},
|
||||
color: {
|
||||
black: [30, 39],
|
||||
@@ -15190,7 +15235,7 @@ function assembleStyles() {
|
||||
blueBright: [94, 39],
|
||||
magentaBright: [95, 39],
|
||||
cyanBright: [96, 39],
|
||||
whiteBright: [97, 39]
|
||||
whiteBright: [97, 39],
|
||||
},
|
||||
bgColor: {
|
||||
bgBlack: [40, 49],
|
||||
@@ -15210,8 +15255,8 @@ function assembleStyles() {
|
||||
bgBlueBright: [104, 49],
|
||||
bgMagentaBright: [105, 49],
|
||||
bgCyanBright: [106, 49],
|
||||
bgWhiteBright: [107, 49]
|
||||
}
|
||||
bgWhiteBright: [107, 49],
|
||||
},
|
||||
};
|
||||
|
||||
// Alias bright black as gray (and grey)
|
||||
@@ -15224,7 +15269,7 @@ function assembleStyles() {
|
||||
for (const [styleName, style] of Object.entries(group)) {
|
||||
styles[styleName] = {
|
||||
open: `\u001B[${style[0]}m`,
|
||||
close: `\u001B[${style[1]}m`
|
||||
close: `\u001B[${style[1]}m`,
|
||||
};
|
||||
|
||||
group[styleName] = styles[styleName];
|
||||
@@ -15234,13 +15279,13 @@ function assembleStyles() {
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(styles, 'codes', {
|
||||
value: codes,
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
});
|
||||
|
||||
styles.color.close = '\u001B[39m';
|
||||
@@ -15271,39 +15316,41 @@ function assembleStyles() {
|
||||
return Math.round(((red - 8) / 247) * 24) + 232;
|
||||
}
|
||||
|
||||
return 16 +
|
||||
(36 * Math.round(red / 255 * 5)) +
|
||||
(6 * Math.round(green / 255 * 5)) +
|
||||
Math.round(blue / 255 * 5);
|
||||
return 16
|
||||
+ (36 * Math.round(red / 255 * 5))
|
||||
+ (6 * Math.round(green / 255 * 5))
|
||||
+ Math.round(blue / 255 * 5);
|
||||
},
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
},
|
||||
hexToRgb: {
|
||||
value: hex => {
|
||||
const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
|
||||
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
||||
if (!matches) {
|
||||
return [0, 0, 0];
|
||||
}
|
||||
|
||||
let {colorString} = matches.groups;
|
||||
let [colorString] = matches;
|
||||
|
||||
if (colorString.length === 3) {
|
||||
colorString = colorString.split('').map(character => character + character).join('');
|
||||
colorString = [...colorString].map(character => character + character).join('');
|
||||
}
|
||||
|
||||
const integer = Number.parseInt(colorString, 16);
|
||||
|
||||
return [
|
||||
/* eslint-disable no-bitwise */
|
||||
(integer >> 16) & 0xFF,
|
||||
(integer >> 8) & 0xFF,
|
||||
integer & 0xFF
|
||||
integer & 0xFF,
|
||||
/* eslint-enable no-bitwise */
|
||||
];
|
||||
},
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
},
|
||||
hexToAnsi256: {
|
||||
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
},
|
||||
ansi256ToAnsi: {
|
||||
value: code => {
|
||||
@@ -15339,6 +15386,7 @@ function assembleStyles() {
|
||||
return 30;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-bitwise
|
||||
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
||||
|
||||
if (value === 2) {
|
||||
@@ -15347,16 +15395,16 @@ function assembleStyles() {
|
||||
|
||||
return result;
|
||||
},
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
},
|
||||
rgbToAnsi: {
|
||||
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
||||
enumerable: false
|
||||
enumerable: false,
|
||||
},
|
||||
hexToAnsi: {
|
||||
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
||||
enumerable: false
|
||||
}
|
||||
enumerable: false,
|
||||
},
|
||||
});
|
||||
|
||||
return styles;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Generated
+146
-134
@@ -13,27 +13,27 @@
|
||||
"@actions/github": "^5.0.3",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/request-error": "^3.0.1",
|
||||
"ansi-styles": "^6.1.0",
|
||||
"ansi-styles": "^6.1.1",
|
||||
"got": "^12.4.1",
|
||||
"nodemon": "^2.0.19",
|
||||
"yaml": "^2.1.1",
|
||||
"zod": "^3.18.0"
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.57",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"@types/node": "^16.11.59",
|
||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
||||
"@typescript-eslint/parser": "^5.37.0",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"esbuild-register": "^3.3.3",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-plugin-github": "^4.3.7",
|
||||
"eslint-plugin-jest": "^27.0.1",
|
||||
"eslint-plugin-jest": "^27.0.4",
|
||||
"jest": "^27.5.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nodemon": "^2.0.19",
|
||||
"prettier": "2.7.1",
|
||||
"ts-jest": "^27.1.4",
|
||||
"typescript": "^4.8.2"
|
||||
"typescript": "^4.8.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
@@ -667,9 +667,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
||||
"integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==",
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz",
|
||||
"integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
@@ -1454,9 +1454,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.11.57",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.57.tgz",
|
||||
"integrity": "sha512-diBb5AE2V8h9Fs9zEDtBwSeLvIACng/aAkdZ3ujMV+cGuIQ9Nc/V+wQqurk9HJp8ni5roBxQHW21z/ZYbGDivg=="
|
||||
"version": "16.11.59",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.59.tgz",
|
||||
"integrity": "sha512-6u+36Dj3aDzhfBVUf/mfmc92OEdzQ2kx2jcXGdigfl70E/neV21ZHE6UCz4MDzTRcVqGAM27fk+DLXvyDsn3Jw=="
|
||||
},
|
||||
"node_modules/@types/prettier": {
|
||||
"version": "2.4.4",
|
||||
@@ -1494,14 +1494,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.2.tgz",
|
||||
"integrity": "sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz",
|
||||
"integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/type-utils": "5.36.2",
|
||||
"@typescript-eslint/utils": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/type-utils": "5.37.0",
|
||||
"@typescript-eslint/utils": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"ignore": "^5.2.0",
|
||||
@@ -1542,14 +1542,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.36.2.tgz",
|
||||
"integrity": "sha512-qS/Kb0yzy8sR0idFspI9Z6+t7mqk/oRjnAYfewG+VN73opAUvmYL3oPIMmgOX6CnQS6gmVIXGshlb5RY/R22pA==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz",
|
||||
"integrity": "sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1569,13 +1569,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz",
|
||||
"integrity": "sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/visitor-keys": "5.37.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1586,13 +1586,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.36.2.tgz",
|
||||
"integrity": "sha512-rPQtS5rfijUWLouhy6UmyNquKDPhQjKsaKH0WnY6hl/07lasj8gPaH2UD8xWkePn6SC+jW2i9c2DZVDnL+Dokw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz",
|
||||
"integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/utils": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"@typescript-eslint/utils": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
@@ -1613,9 +1613,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz",
|
||||
"integrity": "sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1626,13 +1626,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz",
|
||||
"integrity": "sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/visitor-keys": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -1668,15 +1668,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz",
|
||||
"integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
},
|
||||
@@ -1692,12 +1692,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz",
|
||||
"integrity": "sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1846,9 +1846,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz",
|
||||
"integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz",
|
||||
"integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -2847,12 +2847,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.23.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz",
|
||||
"integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==",
|
||||
"version": "8.23.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz",
|
||||
"integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint/eslintrc": "^1.3.1",
|
||||
"@eslint/eslintrc": "^1.3.2",
|
||||
"@humanwhocodes/config-array": "^0.10.4",
|
||||
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
@@ -2871,7 +2871,6 @@
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"file-entry-cache": "^6.0.1",
|
||||
"find-up": "^5.0.0",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"glob-parent": "^6.0.1",
|
||||
"globals": "^13.15.0",
|
||||
"globby": "^11.1.0",
|
||||
@@ -2880,6 +2879,7 @@
|
||||
"import-fresh": "^3.0.0",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"js-sdsl": "^4.1.4",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"levn": "^0.4.1",
|
||||
@@ -3095,9 +3095,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/eslint-plugin-jest": {
|
||||
"version": "27.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.0.1.tgz",
|
||||
"integrity": "sha512-LosUsrkwVSs/8Z/I8Hqn5vWgTEsHrfIquDEKOsV8/cl+gbFR4tiRCE1AimEotsHjSC0Rx1tYm6vPhw8C3ktmmg==",
|
||||
"version": "27.0.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz",
|
||||
"integrity": "sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^5.10.0"
|
||||
@@ -5238,6 +5238,12 @@
|
||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/js-sdsl": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
|
||||
"integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@@ -6937,9 +6943,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"version": "4.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
|
||||
"integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -7277,9 +7283,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.18.0",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.18.0.tgz",
|
||||
"integrity": "sha512-gwTm8RfUCe8l9rDwN5r2A17DkAa8Ez4Yl4yXqc5VqeGaXaJahzYYXbTwvhroZi0SNBqTwh/bKm2N0mpCzuw4bA==",
|
||||
"version": "3.19.1",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.19.1.tgz",
|
||||
"integrity": "sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
@@ -7772,9 +7778,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@eslint/eslintrc": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz",
|
||||
"integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==",
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz",
|
||||
"integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^6.12.4",
|
||||
@@ -8431,9 +8437,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "16.11.57",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.57.tgz",
|
||||
"integrity": "sha512-diBb5AE2V8h9Fs9zEDtBwSeLvIACng/aAkdZ3ujMV+cGuIQ9Nc/V+wQqurk9HJp8ni5roBxQHW21z/ZYbGDivg=="
|
||||
"version": "16.11.59",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.59.tgz",
|
||||
"integrity": "sha512-6u+36Dj3aDzhfBVUf/mfmc92OEdzQ2kx2jcXGdigfl70E/neV21ZHE6UCz4MDzTRcVqGAM27fk+DLXvyDsn3Jw=="
|
||||
},
|
||||
"@types/prettier": {
|
||||
"version": "2.4.4",
|
||||
@@ -8471,14 +8477,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.2.tgz",
|
||||
"integrity": "sha512-OwwR8LRwSnI98tdc2z7mJYgY60gf7I9ZfGjN5EjCwwns9bdTuQfAXcsjSB2wSQ/TVNYSGKf4kzVXbNGaZvwiXw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz",
|
||||
"integrity": "sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/type-utils": "5.36.2",
|
||||
"@typescript-eslint/utils": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/type-utils": "5.37.0",
|
||||
"@typescript-eslint/utils": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"ignore": "^5.2.0",
|
||||
@@ -8499,53 +8505,53 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.36.2.tgz",
|
||||
"integrity": "sha512-qS/Kb0yzy8sR0idFspI9Z6+t7mqk/oRjnAYfewG+VN73opAUvmYL3oPIMmgOX6CnQS6gmVIXGshlb5RY/R22pA==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.37.0.tgz",
|
||||
"integrity": "sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"debug": "^4.3.4"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.36.2.tgz",
|
||||
"integrity": "sha512-cNNP51L8SkIFSfce8B1NSUBTJTu2Ts4nWeWbFrdaqjmn9yKrAaJUBHkyTZc0cL06OFHpb+JZq5AUHROS398Orw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz",
|
||||
"integrity": "sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2"
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/visitor-keys": "5.37.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/type-utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.36.2.tgz",
|
||||
"integrity": "sha512-rPQtS5rfijUWLouhy6UmyNquKDPhQjKsaKH0WnY6hl/07lasj8gPaH2UD8xWkePn6SC+jW2i9c2DZVDnL+Dokw==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz",
|
||||
"integrity": "sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/utils": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"@typescript-eslint/utils": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.2.tgz",
|
||||
"integrity": "sha512-9OJSvvwuF1L5eS2EQgFUbECb99F0mwq501w0H0EkYULkhFa19Qq7WFbycdw1PexAc929asupbZcgjVIe6OK/XQ==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.37.0.tgz",
|
||||
"integrity": "sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.2.tgz",
|
||||
"integrity": "sha512-8fyH+RfbKc0mTspfuEjlfqA4YywcwQK2Amcf6TDOwaRLg7Vwdu4bZzyvBZp4bjt1RRjQ5MDnOZahxMrt2l5v9w==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz",
|
||||
"integrity": "sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/visitor-keys": "5.36.2",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/visitor-keys": "5.37.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -8565,26 +8571,26 @@
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.2.tgz",
|
||||
"integrity": "sha512-uNcopWonEITX96v9pefk9DC1bWMdkweeSsewJ6GeC7L6j2t0SJywisgkr9wUTtXk90fi2Eljj90HSHm3OGdGRg==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.37.0.tgz",
|
||||
"integrity": "sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@typescript-eslint/scope-manager": "5.36.2",
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/typescript-estree": "5.36.2",
|
||||
"@typescript-eslint/scope-manager": "5.37.0",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"@typescript-eslint/typescript-estree": "5.37.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.36.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.2.tgz",
|
||||
"integrity": "sha512-BtRvSR6dEdrNt7Net2/XDjbYKU5Ml6GqJgVfXT0CxTCJlnIqK7rAGreuWKMT2t8cFUT2Msv5oxw0GMRD7T5J7A==",
|
||||
"version": "5.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz",
|
||||
"integrity": "sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.36.2",
|
||||
"@typescript-eslint/types": "5.37.0",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
@@ -8688,9 +8694,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz",
|
||||
"integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ=="
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.1.tgz",
|
||||
"integrity": "sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg=="
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "3.1.2",
|
||||
@@ -9446,12 +9452,12 @@
|
||||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "8.23.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz",
|
||||
"integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==",
|
||||
"version": "8.23.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz",
|
||||
"integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint/eslintrc": "^1.3.1",
|
||||
"@eslint/eslintrc": "^1.3.2",
|
||||
"@humanwhocodes/config-array": "^0.10.4",
|
||||
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
@@ -9470,7 +9476,6 @@
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"file-entry-cache": "^6.0.1",
|
||||
"find-up": "^5.0.0",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"glob-parent": "^6.0.1",
|
||||
"globals": "^13.15.0",
|
||||
"globby": "^11.1.0",
|
||||
@@ -9479,6 +9484,7 @@
|
||||
"import-fresh": "^3.0.0",
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"js-sdsl": "^4.1.4",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"levn": "^0.4.1",
|
||||
@@ -9775,9 +9781,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jest": {
|
||||
"version": "27.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.0.1.tgz",
|
||||
"integrity": "sha512-LosUsrkwVSs/8Z/I8Hqn5vWgTEsHrfIquDEKOsV8/cl+gbFR4tiRCE1AimEotsHjSC0Rx1tYm6vPhw8C3ktmmg==",
|
||||
"version": "27.0.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz",
|
||||
"integrity": "sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/utils": "^5.10.0"
|
||||
@@ -11222,6 +11228,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"js-sdsl": {
|
||||
"version": "4.1.4",
|
||||
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
|
||||
"integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@@ -12476,9 +12488,9 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.8.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz",
|
||||
"integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==",
|
||||
"version": "4.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
|
||||
"integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==",
|
||||
"dev": true
|
||||
},
|
||||
"unbox-primitive": {
|
||||
@@ -12733,9 +12745,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"zod": {
|
||||
"version": "3.18.0",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.18.0.tgz",
|
||||
"integrity": "sha512-gwTm8RfUCe8l9rDwN5r2A17DkAa8Ez4Yl4yXqc5VqeGaXaJahzYYXbTwvhroZi0SNBqTwh/bKm2N0mpCzuw4bA=="
|
||||
"version": "3.19.1",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.19.1.tgz",
|
||||
"integrity": "sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -29,26 +29,26 @@
|
||||
"@actions/github": "^5.0.3",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/request-error": "^3.0.1",
|
||||
"ansi-styles": "^6.1.0",
|
||||
"ansi-styles": "^6.1.1",
|
||||
"got": "^12.4.1",
|
||||
"nodemon": "^2.0.19",
|
||||
"yaml": "^2.1.1",
|
||||
"zod": "^3.18.0"
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.57",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"@types/node": "^16.11.59",
|
||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
||||
"@typescript-eslint/parser": "^5.37.0",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"esbuild-register": "^3.3.3",
|
||||
"eslint": "^8.23.0",
|
||||
"eslint": "^8.23.1",
|
||||
"eslint-plugin-github": "^4.3.7",
|
||||
"eslint-plugin-jest": "^27.0.1",
|
||||
"eslint-plugin-jest": "^27.0.4",
|
||||
"jest": "^27.5.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nodemon": "^2.0.19",
|
||||
"prettier": "2.7.1",
|
||||
"ts-jest": "^27.1.4",
|
||||
"typescript": "^4.8.2"
|
||||
"typescript": "^4.8.3"
|
||||
}
|
||||
}
|
||||
|
||||
+15
-7
@@ -32,17 +32,25 @@ event_file = Tempfile.new
|
||||
event_file.write("{ \"pull_request\": #{pr.to_h.to_json}}")
|
||||
event_file.close
|
||||
|
||||
dev_cmd_env = {
|
||||
"INPUT_REPO-TOKEN" => github_token,
|
||||
"GITHUB_REPOSITORY" => repo_nwo,
|
||||
"GITHUB_EVENT_NAME" => "pull_request",
|
||||
"GITHUB_EVENT_PATH" => event_file.path
|
||||
action_inputs = {
|
||||
"repo-token" => github_token
|
||||
}
|
||||
|
||||
dev_cmd = "./node_modules/.bin/nodemon --exec \"node -r esbuild-register\" src/main.ts"
|
||||
dev_cmd_env = {
|
||||
"GITHUB_REPOSITORY" => repo_nwo,
|
||||
"GITHUB_EVENT_NAME" => "pull_request",
|
||||
"GITHUB_EVENT_PATH" => event_file.path,
|
||||
"GITHUB_STEP_SUMMARY" => "/dev/null"
|
||||
}
|
||||
|
||||
# bash does not like variable names with dashes like the ones Actions
|
||||
# uses (e.g. INPUT_REPO-TOKEN). Passing them through `env` instead of
|
||||
# manually setting them does the job.
|
||||
action_inputs_env_str = action_inputs.map { |name, value| "\"INPUT_#{name.upcase}=#{value}\"" }.join(" ")
|
||||
dev_cmd = "./node_modules/.bin/nodemon --exec \"env #{action_inputs_env_str} node -r esbuild-register\" src/main.ts"
|
||||
|
||||
Open3.popen2e(dev_cmd_env, dev_cmd) do |stdin, out|
|
||||
while line = out.gets
|
||||
puts line
|
||||
puts line.gsub(github_token, "<REDACTED>")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user