@alextheman/utility 5.26.0 → 5.27.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 CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
@@ -28,7 +28,7 @@ const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]
28
28
  const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
29
29
  //#endregion
30
30
  //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
31
- const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
31
+ const ONE_DAY_IN_MILLISECONDS = 864e5;
32
32
  //#endregion
33
33
  //#region src/root/constants/UUID_REGEX.ts
34
34
  const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
package/dist/index.d.cts CHANGED
@@ -1494,14 +1494,15 @@ declare function parseZodSchemaAsync<SchemaType extends ZodType, ErrorType exten
1494
1494
  declare function zodFieldWrapper<SchemaType extends ZodType<unknown, string | null>>(schema: SchemaType): ZodType<z.infer<SchemaType>, string>;
1495
1495
  //#endregion
1496
1496
  //#region src/root/zod/az.d.ts
1497
+ type AzParsingErrorHandler<ErrorType extends Error = DataError$1> = ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType);
1497
1498
  declare const az: {
1498
1499
  field: typeof zodFieldWrapper;
1499
1500
  fieldNumber: () => ZodCoercedNumber<string | null>;
1500
1501
  versionNumber: () => ZodType<VersionNumber, unknown>;
1501
1502
  fieldDate: () => ZodCoercedDate<string | null>;
1502
1503
  with: <SchemaType extends ZodType>(schema: SchemaType) => {
1503
- parse: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType)) => ReturnType<typeof parseZodSchema<SchemaType, ErrorType>>;
1504
- parseAsync: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType)) => ReturnType<typeof parseZodSchemaAsync<SchemaType, ErrorType>>;
1504
+ parse: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: AzParsingErrorHandler<ErrorType>) => ReturnType<typeof parseZodSchema<SchemaType, ErrorType>>;
1505
+ parseAsync: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: AzParsingErrorHandler<ErrorType>) => ReturnType<typeof parseZodSchemaAsync<SchemaType, ErrorType>>;
1505
1506
  };
1506
1507
  };
1507
1508
  //#endregion
@@ -1511,4 +1512,4 @@ interface ZodParsingErrorData {
1511
1512
  issues: Array<z.core.$ZodIssue>;
1512
1513
  }
1513
1514
  //#endregion
1514
- export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
1515
+ export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
package/dist/index.d.ts CHANGED
@@ -1494,14 +1494,15 @@ declare function parseZodSchemaAsync<SchemaType extends ZodType, ErrorType exten
1494
1494
  declare function zodFieldWrapper<SchemaType extends ZodType<unknown, string | null>>(schema: SchemaType): ZodType<z.infer<SchemaType>, string>;
1495
1495
  //#endregion
1496
1496
  //#region src/root/zod/az.d.ts
1497
+ type AzParsingErrorHandler<ErrorType extends Error = DataError$1> = ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType);
1497
1498
  declare const az: {
1498
1499
  field: typeof zodFieldWrapper;
1499
1500
  fieldNumber: () => ZodCoercedNumber<string | null>;
1500
1501
  versionNumber: () => ZodType<VersionNumber, unknown>;
1501
1502
  fieldDate: () => ZodCoercedDate<string | null>;
1502
1503
  with: <SchemaType extends ZodType>(schema: SchemaType) => {
1503
- parse: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType)) => ReturnType<typeof parseZodSchema<SchemaType, ErrorType>>;
1504
- parseAsync: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: ErrorType | ((zodError: z.ZodError<unknown>) => void | ErrorType)) => ReturnType<typeof parseZodSchemaAsync<SchemaType, ErrorType>>;
1504
+ parse: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: AzParsingErrorHandler<ErrorType>) => ReturnType<typeof parseZodSchema<SchemaType, ErrorType>>;
1505
+ parseAsync: <ErrorType extends Error = DataError$1<Record<PropertyKey, unknown>, string>>(input: unknown, error?: AzParsingErrorHandler<ErrorType>) => ReturnType<typeof parseZodSchemaAsync<SchemaType, ErrorType>>;
1505
1506
  };
1506
1507
  };
1507
1508
  //#endregion
@@ -1511,4 +1512,4 @@ interface ZodParsingErrorData {
1511
1512
  issues: Array<z.core.$ZodIssue>;
1512
1513
  }
1513
1514
  //#endregion
1514
- export { APIError, type ArrayElement, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
1515
+ export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, Env, FILE_PATH_PATTERN, FILE_PATH_REGEX, FILE_PATH_REGEX_PATTERN, type FormDataArrayResolutionStrategy, type FormDataNullableResolutionStrategy, type HTTPErrorCode, type IgnoreCase, type IsTypeArgumentString, type KebabToCamelOptions, type NonNull, type NonUndefined, type NormaliseIndentsFunction, type NormaliseIndentsOptions, type NormalizeIndentsFunction, type NormalizeIndentsOptions, type NullableOnCondition, ONE_DAY_IN_MILLISECONDS, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, SortDirection, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, UUID_REGEX_PATTERN, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VERSION_NUMBER_REGEX_PATTERN, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, VersionType, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, httpErrorCodeLookup, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, normaliseIndents, normalizeIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait, zodVersionNumber };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ const FILE_PATH_REGEX_PATTERN = String.raw`(?<directory>.+)[\/\\](?<base>[^\/\\]
4
4
  const FILE_PATH_REGEX = RegExp(`^${FILE_PATH_REGEX_PATTERN}$`);
5
5
  //#endregion
6
6
  //#region src/root/constants/ONE_DAY_IN_MILLISECONDS.ts
7
- const ONE_DAY_IN_MILLISECONDS = 1440 * 60 * 1e3;
7
+ const ONE_DAY_IN_MILLISECONDS = 864e5;
8
8
  //#endregion
9
9
  //#region src/root/constants/UUID_REGEX.ts
10
10
  const UUID_REGEX_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "5.26.0",
3
+ "version": "5.27.0",
4
4
  "description": "Helpful utility functions.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,29 +42,29 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "dotenv": "17.4.2",
45
- "execa": "9.6.1"
45
+ "execa": "10.0.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@alextheman/eslint-plugin": "5.18.0",
49
- "@types/node": "26.1.1",
50
- "alex-c-line": "2.12.4",
49
+ "@types/node": "26.1.2",
50
+ "alex-c-line": "2.13.0",
51
51
  "cross-env": "10.1.0",
52
52
  "dotenv-cli": "11.0.0",
53
- "eslint": "10.6.0",
54
- "globals": "17.7.0",
53
+ "eslint": "10.8.0",
54
+ "globals": "17.8.0",
55
55
  "husky": "9.1.7",
56
- "jsdom": "29.1.1",
57
- "markdownlint-cli2": "0.23.0",
58
- "prettier": "3.9.5",
56
+ "jsdom": "30.0.1",
57
+ "markdownlint-cli2": "0.23.2",
58
+ "prettier": "3.9.6",
59
59
  "tempy": "3.2.0",
60
- "tsdown": "0.22.4",
61
- "tsx": "4.23.0",
60
+ "tsdown": "0.22.14",
61
+ "tsx": "4.23.1",
62
62
  "typedoc": "0.28.20",
63
63
  "typedoc-plugin-markdown": "4.12.0",
64
64
  "typedoc-rhineai-theme": "1.2.0",
65
65
  "typescript": "6.0.3",
66
- "typescript-eslint": "8.63.0",
67
- "vite": "8.1.4",
66
+ "typescript-eslint": "8.65.0",
67
+ "vite": "8.2.0",
68
68
  "vitest": "4.1.10",
69
69
  "zod": "4.4.3"
70
70
  },
@@ -79,6 +79,7 @@
79
79
  "build-configs": "tsdown --config tsdown.configs.config.ts",
80
80
  "create-feature-docs": "typedoc",
81
81
  "create-local-package": "pnpm run build && rm -f alextheman-utility-*.tgz && pnpm pack",
82
+ "create-release": "bash -c 'git pull origin main && alex-c-line template release-note create $@ --status \"Released\" --update-version' --",
82
83
  "create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
83
84
  "format": "pnpm run format-prettier && pnpm run format-eslint && pnpm run format-markdownlint",
84
85
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"{src,tests,configs}/**/*.ts\" && rm -f eslint-suppressions.json",