@alextheman/utility 5.18.2 → 5.19.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.cjs +4 -10
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +4 -10
- package/dist/internal/index.cjs +4 -10
- package/dist/internal/index.js +4 -10
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1173,16 +1173,10 @@ function _parseZodSchema(parsedResult, input, onError) {
|
|
|
1173
1173
|
if (evaluatedError instanceof Error) throw evaluatedError;
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
}
|
|
1181
|
-
throw new DataError$1({ input }, Object.entries(allErrorCodes).toSorted(([_, firstCount], [__, secondCount]) => {
|
|
1182
|
-
return secondCount - firstCount;
|
|
1183
|
-
}).map(([code, count], _, allErrorCodes) => {
|
|
1184
|
-
return allErrorCodes.length === 1 && count === 1 ? code : `${code}×${count}`;
|
|
1185
|
-
}).join(","), `\n\n${zod.default.prettifyError(parsedResult.error)}\n`);
|
|
1176
|
+
throw new DataError$1({
|
|
1177
|
+
input,
|
|
1178
|
+
issues: parsedResult.error.issues
|
|
1179
|
+
}, "ZOD_ERROR", `\n\n${zod.default.prettifyError(parsedResult.error)}\n`);
|
|
1186
1180
|
}
|
|
1187
1181
|
return parsedResult.data;
|
|
1188
1182
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1373,4 +1373,10 @@ declare const az: {
|
|
|
1373
1373
|
};
|
|
1374
1374
|
};
|
|
1375
1375
|
//#endregion
|
|
1376
|
-
|
|
1376
|
+
//#region src/root/zod/_parseZodSchema.d.ts
|
|
1377
|
+
interface ZodParsingErrorData {
|
|
1378
|
+
input: unknown;
|
|
1379
|
+
issues: Array<z.core.$ZodIssue>;
|
|
1380
|
+
}
|
|
1381
|
+
//#endregion
|
|
1382
|
+
export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, type NonNull, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, type StringListToArrayOptions, ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
package/dist/index.d.ts
CHANGED
|
@@ -1373,4 +1373,10 @@ declare const az: {
|
|
|
1373
1373
|
};
|
|
1374
1374
|
};
|
|
1375
1375
|
//#endregion
|
|
1376
|
-
|
|
1376
|
+
//#region src/root/zod/_parseZodSchema.d.ts
|
|
1377
|
+
interface ZodParsingErrorData {
|
|
1378
|
+
input: unknown;
|
|
1379
|
+
issues: Array<z$1.core.$ZodIssue>;
|
|
1380
|
+
}
|
|
1381
|
+
//#endregion
|
|
1382
|
+
export { APIError, type ArrayElement, type CallReturnType, CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, KebabToCamelOptions, type NonNull, type NonUndefined, NormaliseIndentsFunction, NormaliseIndentsOptions, NormalizeIndentsFunction, NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, ParallelTuple, RecordKey, RemoveUndefined, type StringListToArrayOptions, ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, normaliseIndents, normalizeIndents, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
|
package/dist/index.js
CHANGED
|
@@ -1149,16 +1149,10 @@ function _parseZodSchema(parsedResult, input, onError) {
|
|
|
1149
1149
|
if (evaluatedError instanceof Error) throw evaluatedError;
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
}
|
|
1157
|
-
throw new DataError$1({ input }, Object.entries(allErrorCodes).toSorted(([_, firstCount], [__, secondCount]) => {
|
|
1158
|
-
return secondCount - firstCount;
|
|
1159
|
-
}).map(([code, count], _, allErrorCodes) => {
|
|
1160
|
-
return allErrorCodes.length === 1 && count === 1 ? code : `${code}×${count}`;
|
|
1161
|
-
}).join(","), `\n\n${z$1.prettifyError(parsedResult.error)}\n`);
|
|
1152
|
+
throw new DataError$1({
|
|
1153
|
+
input,
|
|
1154
|
+
issues: parsedResult.error.issues
|
|
1155
|
+
}, "ZOD_ERROR", `\n\n${z$1.prettifyError(parsedResult.error)}\n`);
|
|
1162
1156
|
}
|
|
1163
1157
|
return parsedResult.data;
|
|
1164
1158
|
}
|
package/dist/internal/index.cjs
CHANGED
|
@@ -644,16 +644,10 @@ function _parseZodSchema(parsedResult, input, onError) {
|
|
|
644
644
|
if (evaluatedError instanceof Error) throw evaluatedError;
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
}
|
|
652
|
-
throw new DataError({ input }, Object.entries(allErrorCodes).toSorted(([_, firstCount], [__, secondCount]) => {
|
|
653
|
-
return secondCount - firstCount;
|
|
654
|
-
}).map(([code, count], _, allErrorCodes) => {
|
|
655
|
-
return allErrorCodes.length === 1 && count === 1 ? code : `${code}×${count}`;
|
|
656
|
-
}).join(","), `\n\n${zod.default.prettifyError(parsedResult.error)}\n`);
|
|
647
|
+
throw new DataError({
|
|
648
|
+
input,
|
|
649
|
+
issues: parsedResult.error.issues
|
|
650
|
+
}, "ZOD_ERROR", `\n\n${zod.default.prettifyError(parsedResult.error)}\n`);
|
|
657
651
|
}
|
|
658
652
|
return parsedResult.data;
|
|
659
653
|
}
|
package/dist/internal/index.js
CHANGED
|
@@ -619,16 +619,10 @@ function _parseZodSchema(parsedResult, input, onError) {
|
|
|
619
619
|
if (evaluatedError instanceof Error) throw evaluatedError;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
627
|
-
throw new DataError({ input }, Object.entries(allErrorCodes).toSorted(([_, firstCount], [__, secondCount]) => {
|
|
628
|
-
return secondCount - firstCount;
|
|
629
|
-
}).map(([code, count], _, allErrorCodes) => {
|
|
630
|
-
return allErrorCodes.length === 1 && count === 1 ? code : `${code}×${count}`;
|
|
631
|
-
}).join(","), `\n\n${z.prettifyError(parsedResult.error)}\n`);
|
|
622
|
+
throw new DataError({
|
|
623
|
+
input,
|
|
624
|
+
issues: parsedResult.error.issues
|
|
625
|
+
}, "ZOD_ERROR", `\n\n${z.prettifyError(parsedResult.error)}\n`);
|
|
632
626
|
}
|
|
633
627
|
return parsedResult.data;
|
|
634
628
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/utility",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.0",
|
|
4
4
|
"description": "Helpful utility functions.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@alextheman/eslint-plugin": "5.14.0",
|
|
44
|
-
"@types/node": "25.
|
|
44
|
+
"@types/node": "25.8.0",
|
|
45
45
|
"alex-c-line": "2.7.2",
|
|
46
46
|
"cross-env": "10.1.0",
|
|
47
47
|
"dotenv-cli": "11.0.0",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"prettier": "3.8.3",
|
|
53
53
|
"tempy": "3.2.0",
|
|
54
54
|
"tsdown": "0.22.0",
|
|
55
|
-
"tsx": "4.
|
|
55
|
+
"tsx": "4.22.0",
|
|
56
56
|
"typedoc": "0.28.19",
|
|
57
57
|
"typedoc-plugin-markdown": "4.11.0",
|
|
58
58
|
"typedoc-rhineai-theme": "1.2.0",
|
|
59
59
|
"typescript": "6.0.3",
|
|
60
|
-
"typescript-eslint": "8.59.
|
|
61
|
-
"vite": "8.0.
|
|
62
|
-
"vitest": "4.1.
|
|
60
|
+
"typescript-eslint": "8.59.3",
|
|
61
|
+
"vite": "8.0.13",
|
|
62
|
+
"vitest": "4.1.6",
|
|
63
63
|
"zod": "4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|