@alextheman/utility 5.28.4 → 5.29.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.d.cts +19 -7
- package/dist/index.d.ts +19 -7
- package/dist/internal/index.d.cts +6 -6
- package/dist/internal/index.d.ts +6 -6
- package/dist/v6/index.d.cts +4 -4
- package/dist/v6/index.d.ts +4 -4
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
|
@@ -113,6 +113,18 @@ declare const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a
|
|
|
113
113
|
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
114
114
|
declare const VERSION_NUMBER_PATTERN: string;
|
|
115
115
|
//#endregion
|
|
116
|
+
//#region src/root/deprecated/CreateEnumType.d.ts
|
|
117
|
+
/**
|
|
118
|
+
* Get the value types from a const object so the object can behave similarly to an enum.
|
|
119
|
+
*
|
|
120
|
+
* @category Types
|
|
121
|
+
*
|
|
122
|
+
* @deprecated This type has been renamed to `ObjectValue`.
|
|
123
|
+
*
|
|
124
|
+
* @template ObjectType - The type of the object to get the value types for.
|
|
125
|
+
*/
|
|
126
|
+
type CreateEnumType<ObjectType extends Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
127
|
+
//#endregion
|
|
116
128
|
//#region src/root/deprecated/RecordKey.d.ts
|
|
117
129
|
/**
|
|
118
130
|
* Represents the native Record's possible key type.
|
|
@@ -483,22 +495,22 @@ declare function memoizeAsync<ArgsType extends ReadonlyArray<unknown>, ResolvedT
|
|
|
483
495
|
*/
|
|
484
496
|
declare function sayHello(): string;
|
|
485
497
|
//#endregion
|
|
486
|
-
//#region src/root/types/
|
|
498
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
487
499
|
/**
|
|
488
|
-
* Get the value types from
|
|
500
|
+
* Get the value types from an object.
|
|
489
501
|
*
|
|
490
502
|
* @category Types
|
|
491
503
|
*
|
|
492
504
|
* @template ObjectType - The type of the object to get the value types for.
|
|
493
505
|
*/
|
|
494
|
-
type
|
|
506
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
495
507
|
//#endregion
|
|
496
508
|
//#region src/root/types/SortDirection.d.ts
|
|
497
509
|
export declare const SortDirection: {
|
|
498
510
|
readonly DESC: "desc";
|
|
499
511
|
readonly ASC: "asc";
|
|
500
512
|
};
|
|
501
|
-
export type SortDirection =
|
|
513
|
+
export type SortDirection = ObjectValue<typeof SortDirection>;
|
|
502
514
|
//#endregion
|
|
503
515
|
//#region src/root/types/VersionNumber.d.ts
|
|
504
516
|
/**
|
|
@@ -828,7 +840,7 @@ export declare const Env: {
|
|
|
828
840
|
readonly DEVELOPMENT: "development";
|
|
829
841
|
readonly PRODUCTION: "production";
|
|
830
842
|
};
|
|
831
|
-
export type Env =
|
|
843
|
+
export type Env = ObjectValue<typeof Env>;
|
|
832
844
|
/**
|
|
833
845
|
* Parses the input and verifies it matches one of the environments allowed by the Env types ("test" | "development" | "production").
|
|
834
846
|
*
|
|
@@ -903,7 +915,7 @@ export declare const VersionType: {
|
|
|
903
915
|
readonly MINOR: "minor";
|
|
904
916
|
readonly PATCH: "patch";
|
|
905
917
|
};
|
|
906
|
-
export type VersionType =
|
|
918
|
+
export type VersionType = ObjectValue<typeof VersionType>;
|
|
907
919
|
/**
|
|
908
920
|
* Parses the input and verifies it is a valid software version type (i.e. `"major" | "minor" | "patch"`)
|
|
909
921
|
*
|
|
@@ -1532,4 +1544,4 @@ interface ZodParsingErrorData {
|
|
|
1532
1544
|
issues: Array<z.core.$ZodIssue>;
|
|
1533
1545
|
}
|
|
1534
1546
|
//#endregion
|
|
1535
|
-
export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, FILE_PATH_PATTERN, FILE_PATH_REGEX, 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, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, minutesToMs, normaliseIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, secondsToMs, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait };
|
|
1547
|
+
export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, FILE_PATH_PATTERN, FILE_PATH_REGEX, 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 ObjectValue, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, minutesToMs, normaliseIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, secondsToMs, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait };
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,18 @@ declare const UUID_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a
|
|
|
113
113
|
/** @deprecated This has been renamed to `VERSION_NUMBER_REGEX_PATTERN`. */
|
|
114
114
|
declare const VERSION_NUMBER_PATTERN: string;
|
|
115
115
|
//#endregion
|
|
116
|
+
//#region src/root/deprecated/CreateEnumType.d.ts
|
|
117
|
+
/**
|
|
118
|
+
* Get the value types from a const object so the object can behave similarly to an enum.
|
|
119
|
+
*
|
|
120
|
+
* @category Types
|
|
121
|
+
*
|
|
122
|
+
* @deprecated This type has been renamed to `ObjectValue`.
|
|
123
|
+
*
|
|
124
|
+
* @template ObjectType - The type of the object to get the value types for.
|
|
125
|
+
*/
|
|
126
|
+
type CreateEnumType<ObjectType extends Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
127
|
+
//#endregion
|
|
116
128
|
//#region src/root/deprecated/RecordKey.d.ts
|
|
117
129
|
/**
|
|
118
130
|
* Represents the native Record's possible key type.
|
|
@@ -483,22 +495,22 @@ declare function memoizeAsync<ArgsType extends ReadonlyArray<unknown>, ResolvedT
|
|
|
483
495
|
*/
|
|
484
496
|
declare function sayHello(): string;
|
|
485
497
|
//#endregion
|
|
486
|
-
//#region src/root/types/
|
|
498
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
487
499
|
/**
|
|
488
|
-
* Get the value types from
|
|
500
|
+
* Get the value types from an object.
|
|
489
501
|
*
|
|
490
502
|
* @category Types
|
|
491
503
|
*
|
|
492
504
|
* @template ObjectType - The type of the object to get the value types for.
|
|
493
505
|
*/
|
|
494
|
-
type
|
|
506
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
495
507
|
//#endregion
|
|
496
508
|
//#region src/root/types/SortDirection.d.ts
|
|
497
509
|
export declare const SortDirection: {
|
|
498
510
|
readonly DESC: "desc";
|
|
499
511
|
readonly ASC: "asc";
|
|
500
512
|
};
|
|
501
|
-
export type SortDirection =
|
|
513
|
+
export type SortDirection = ObjectValue<typeof SortDirection>;
|
|
502
514
|
//#endregion
|
|
503
515
|
//#region src/root/types/VersionNumber.d.ts
|
|
504
516
|
/**
|
|
@@ -828,7 +840,7 @@ export declare const Env: {
|
|
|
828
840
|
readonly DEVELOPMENT: "development";
|
|
829
841
|
readonly PRODUCTION: "production";
|
|
830
842
|
};
|
|
831
|
-
export type Env =
|
|
843
|
+
export type Env = ObjectValue<typeof Env>;
|
|
832
844
|
/**
|
|
833
845
|
* Parses the input and verifies it matches one of the environments allowed by the Env types ("test" | "development" | "production").
|
|
834
846
|
*
|
|
@@ -903,7 +915,7 @@ export declare const VersionType: {
|
|
|
903
915
|
readonly MINOR: "minor";
|
|
904
916
|
readonly PATCH: "patch";
|
|
905
917
|
};
|
|
906
|
-
export type VersionType =
|
|
918
|
+
export type VersionType = ObjectValue<typeof VersionType>;
|
|
907
919
|
/**
|
|
908
920
|
* Parses the input and verifies it is a valid software version type (i.e. `"major" | "minor" | "patch"`)
|
|
909
921
|
*
|
|
@@ -1532,4 +1544,4 @@ interface ZodParsingErrorData {
|
|
|
1532
1544
|
issues: Array<z.core.$ZodIssue>;
|
|
1533
1545
|
}
|
|
1534
1546
|
//#endregion
|
|
1535
|
-
export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, FILE_PATH_PATTERN, FILE_PATH_REGEX, 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, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, minutesToMs, normaliseIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, secondsToMs, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait };
|
|
1547
|
+
export { APIError, type ArrayElement, type AzParsingErrorHandler, type CallReturnType, type CamelToKebabOptions, type CreateEnumType, type CreateFormDataOptions, type CreateFormDataOptionsNullableResolution, type CreateFormDataOptionsUndefinedOrNullResolution, DataError, type DisallowUndefined, FILE_PATH_PATTERN, FILE_PATH_REGEX, 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 ObjectValue, type OptionalOnCondition, type ParallelTuple, type RecordKey, type RemoveUndefined, type StringListToArrayOptions, type ToTitleCaseOptions, UUID_PATTERN, UUID_REGEX, VERSION_NUMBER_PATTERN, VERSION_NUMBER_REGEX, VersionNumber, type FormatOptionsBase as VersionNumberToStringOptions, type ZodParsingErrorData, addDaysToDate, appendSemicolon, assertNotNull, assertNotNullable, assertNotUndefined, az, calculateMonthlyDifference, camelToKebab, containsKeys, convertFileToBase64, createFormData, createTemplateStringsArray, deepCopy, deepFreeze, escapeHTML, escapeRegexPattern, fillArray, formatDateAndTime, getRandomNumber, getRecordKeys, getStringsAndInterpolations, identity, interpolate, interpolateObjects, isAnniversary, isLeapYear, isMonthlyMultiple, isNonNullableObject, isOrdered, isSameDate, isTemplateStringsArray, kebabToCamel, memoizeAsync, minutesToMs, normaliseIndents, objectContainsKeys, omitProperties, paralleliseArrays, parseBoolean, parseEnv, parseFormData, parseIntStrict, parseUUID, parseVersionType, parseZodSchema, parseZodSchemaAsync, pickProperties, randomiseArray, range, removeDuplicates, removeUndefinedFromObject, sayHello, secondsToMs, sortBy, stringListToArray, stringifyDotenv, toTitleCase, truncate, wait };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "zod";
|
|
2
2
|
import "dotenv";
|
|
3
3
|
import { ExecaMethod } from "execa";
|
|
4
|
-
//#region src/root/types/
|
|
4
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Get the value types from
|
|
6
|
+
* Get the value types from an object.
|
|
7
7
|
*
|
|
8
8
|
* @category Types
|
|
9
9
|
*
|
|
10
10
|
* @template ObjectType - The type of the object to get the value types for.
|
|
11
11
|
*/
|
|
12
|
-
type
|
|
12
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/root/types/IsTypeArgumentString.d.ts
|
|
15
15
|
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
@@ -174,7 +174,7 @@ export declare const DependencyGroup: {
|
|
|
174
174
|
readonly DEPENDENCIES: "dependencies";
|
|
175
175
|
readonly DEV_DEPENDENCIES: "devDependencies";
|
|
176
176
|
};
|
|
177
|
-
export type DependencyGroup =
|
|
177
|
+
export type DependencyGroup = ObjectValue<typeof DependencyGroup>;
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region src/internal/getDependenciesFromGroup.d.ts
|
|
180
180
|
/**
|
|
@@ -207,7 +207,7 @@ export declare const ModuleType: {
|
|
|
207
207
|
readonly ES_MODULES: "module";
|
|
208
208
|
readonly TYPESCRIPT: "typescript";
|
|
209
209
|
};
|
|
210
|
-
export type ModuleType =
|
|
210
|
+
export type ModuleType = ObjectValue<typeof ModuleType>;
|
|
211
211
|
//#endregion
|
|
212
212
|
//#region src/internal/packageJsonNotFoundError.d.ts
|
|
213
213
|
interface PackageJsonNotFoundErrorPayload {
|
|
@@ -220,7 +220,7 @@ export declare const PackageManager: {
|
|
|
220
220
|
readonly NPM: "npm";
|
|
221
221
|
readonly PNPM: "pnpm";
|
|
222
222
|
};
|
|
223
|
-
export type PackageManager =
|
|
223
|
+
export type PackageManager = ObjectValue<typeof PackageManager>;
|
|
224
224
|
//#endregion
|
|
225
225
|
//#region src/internal/parseJsonFromStdout.d.ts
|
|
226
226
|
declare function parseJsonFromStdout(stdout: string): Record<string, unknown>;
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
2
|
import { ExecaMethod } from "execa";
|
|
3
3
|
import "dotenv";
|
|
4
|
-
//#region src/root/types/
|
|
4
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* Get the value types from
|
|
6
|
+
* Get the value types from an object.
|
|
7
7
|
*
|
|
8
8
|
* @category Types
|
|
9
9
|
*
|
|
10
10
|
* @template ObjectType - The type of the object to get the value types for.
|
|
11
11
|
*/
|
|
12
|
-
type
|
|
12
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/root/types/IsTypeArgumentString.d.ts
|
|
15
15
|
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
@@ -174,7 +174,7 @@ export declare const DependencyGroup: {
|
|
|
174
174
|
readonly DEPENDENCIES: "dependencies";
|
|
175
175
|
readonly DEV_DEPENDENCIES: "devDependencies";
|
|
176
176
|
};
|
|
177
|
-
export type DependencyGroup =
|
|
177
|
+
export type DependencyGroup = ObjectValue<typeof DependencyGroup>;
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region src/internal/getDependenciesFromGroup.d.ts
|
|
180
180
|
/**
|
|
@@ -207,7 +207,7 @@ export declare const ModuleType: {
|
|
|
207
207
|
readonly ES_MODULES: "module";
|
|
208
208
|
readonly TYPESCRIPT: "typescript";
|
|
209
209
|
};
|
|
210
|
-
export type ModuleType =
|
|
210
|
+
export type ModuleType = ObjectValue<typeof ModuleType>;
|
|
211
211
|
//#endregion
|
|
212
212
|
//#region src/internal/packageJsonNotFoundError.d.ts
|
|
213
213
|
interface PackageJsonNotFoundErrorPayload {
|
|
@@ -220,7 +220,7 @@ export declare const PackageManager: {
|
|
|
220
220
|
readonly NPM: "npm";
|
|
221
221
|
readonly PNPM: "pnpm";
|
|
222
222
|
};
|
|
223
|
-
export type PackageManager =
|
|
223
|
+
export type PackageManager = ObjectValue<typeof PackageManager>;
|
|
224
224
|
//#endregion
|
|
225
225
|
//#region src/internal/parseJsonFromStdout.d.ts
|
|
226
226
|
declare function parseJsonFromStdout(stdout: string): Record<string, unknown>;
|
package/dist/v6/index.d.cts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "zod";
|
|
2
2
|
import "dotenv";
|
|
3
|
-
//#region src/root/types/
|
|
3
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Get the value types from
|
|
5
|
+
* Get the value types from an object.
|
|
6
6
|
*
|
|
7
7
|
* @category Types
|
|
8
8
|
*
|
|
9
9
|
* @template ObjectType - The type of the object to get the value types for.
|
|
10
10
|
*/
|
|
11
|
-
type
|
|
11
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/root/types/IsTypeArgumentString.d.ts
|
|
14
14
|
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
@@ -96,7 +96,7 @@ export declare const httpErrorCodeLookup: {
|
|
|
96
96
|
readonly 500: "INTERNAL_SERVER_ERROR";
|
|
97
97
|
};
|
|
98
98
|
type HTTPErrorCode = keyof typeof httpErrorCodeLookup;
|
|
99
|
-
type APIErrorCode =
|
|
99
|
+
type APIErrorCode = ObjectValue<typeof httpErrorCodeLookup>;
|
|
100
100
|
/**
|
|
101
101
|
* Represents common errors you may get from a HTTP API request.
|
|
102
102
|
*
|
package/dist/v6/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "zod";
|
|
2
2
|
import "dotenv";
|
|
3
|
-
//#region src/root/types/
|
|
3
|
+
//#region src/root/types/ObjectValue.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Get the value types from
|
|
5
|
+
* Get the value types from an object.
|
|
6
6
|
*
|
|
7
7
|
* @category Types
|
|
8
8
|
*
|
|
9
9
|
* @template ObjectType - The type of the object to get the value types for.
|
|
10
10
|
*/
|
|
11
|
-
type
|
|
11
|
+
type ObjectValue<ObjectType extends object = Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/root/types/IsTypeArgumentString.d.ts
|
|
14
14
|
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
@@ -96,7 +96,7 @@ export declare const httpErrorCodeLookup: {
|
|
|
96
96
|
readonly 500: "INTERNAL_SERVER_ERROR";
|
|
97
97
|
};
|
|
98
98
|
type HTTPErrorCode = keyof typeof httpErrorCodeLookup;
|
|
99
|
-
type APIErrorCode =
|
|
99
|
+
type APIErrorCode = ObjectValue<typeof httpErrorCodeLookup>;
|
|
100
100
|
/**
|
|
101
101
|
* Represents common errors you may get from a HTTP API request.
|
|
102
102
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/utility",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.29.0",
|
|
4
4
|
"description": "Helpful utility functions.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"dotenv": "18.0.
|
|
44
|
+
"dotenv": "18.0.5",
|
|
45
45
|
"execa": "10.0.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@alextheman/eslint-plugin": "5.18.
|
|
49
|
-
"@types/node": "26.6.
|
|
50
|
-
"alex-c-line": "2.13.
|
|
48
|
+
"@alextheman/eslint-plugin": "5.18.4",
|
|
49
|
+
"@types/node": "26.6.4",
|
|
50
|
+
"alex-c-line": "2.13.3",
|
|
51
51
|
"cross-env": "10.1.0",
|
|
52
52
|
"dotenv-cli": "11.0.0",
|
|
53
53
|
"eslint": "10.11.0",
|
|
54
|
-
"globals": "17.
|
|
54
|
+
"globals": "17.13.0",
|
|
55
55
|
"husky": "9.1.7",
|
|
56
56
|
"jsdom": "30.1.1",
|
|
57
57
|
"markdownlint-cli2": "0.23.3",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"typedoc-plugin-markdown": "4.13.1",
|
|
64
64
|
"typedoc-rhineai-theme": "1.2.0",
|
|
65
65
|
"typescript": "7.0.2",
|
|
66
|
-
"typescript-eslint": "8.
|
|
67
|
-
"vite": "8.3.
|
|
68
|
-
"vitest": "5.0.
|
|
66
|
+
"typescript-eslint": "8.71.0",
|
|
67
|
+
"vite": "8.3.2",
|
|
68
|
+
"vitest": "5.0.3",
|
|
69
69
|
"zod": "4.6.5"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|