@alextheman/utility 5.15.1 → 5.16.1
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 +71 -46
- package/dist/index.d.cts +43 -28
- package/dist/index.d.ts +43 -28
- package/dist/index.js +71 -46
- package/dist/internal/index.cjs +26 -3
- package/dist/internal/index.d.cts +15 -2
- package/dist/internal/index.d.ts +15 -2
- package/dist/internal/index.js +26 -3
- package/dist/node/index.cjs +26 -3
- package/dist/node/index.js +26 -3
- package/dist/v6/index.cjs +146 -3
- package/dist/v6/index.d.cts +123 -6
- package/dist/v6/index.d.ts +123 -6
- package/dist/v6/index.js +145 -4
- package/package.json +14 -11
package/dist/v6/index.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
//#region src/root/types/CreateEnumType.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Get the value types from a const object so the object can behave similarly to an enum.
|
|
4
|
+
*
|
|
5
|
+
* @category Types
|
|
6
|
+
*
|
|
7
|
+
* @template ObjectType - The type of the object to get the value types for.
|
|
8
|
+
*/
|
|
9
|
+
type CreateEnumType<ObjectType extends Record<PropertyKey, unknown>> = ObjectType[keyof ObjectType];
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/root/types/IsTypeArgumentString.d.ts
|
|
12
|
+
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
13
|
+
//#endregion
|
|
1
14
|
//#region src/v6/CodeError.d.ts
|
|
2
15
|
interface ExpectErrorOptions<ErrorCode extends string = string> {
|
|
3
16
|
expectedCode?: ErrorCode;
|
|
@@ -63,6 +76,106 @@ declare class CodeError<ErrorCode extends string = string> extends Error {
|
|
|
63
76
|
* @returns The `CodeError` that was thrown by the `errorFunction`
|
|
64
77
|
*/
|
|
65
78
|
static expectErrorAsync<ErrorCode extends string = string>(this: typeof CodeError, errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<CodeError>;
|
|
79
|
+
/**
|
|
80
|
+
* Converts the `CodeError` instance to a serialised JSON payload.
|
|
81
|
+
*
|
|
82
|
+
* @returns A JSON serialised version of the current `CodeError` instance.
|
|
83
|
+
*/
|
|
84
|
+
toJSON(): Omit<CodeError<ErrorCode>, "toJSON" | "name">;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/v6/APIError.d.ts
|
|
88
|
+
declare const httpErrorCodeLookup: {
|
|
89
|
+
readonly 400: "BAD_REQUEST";
|
|
90
|
+
readonly 401: "UNAUTHORISED";
|
|
91
|
+
readonly 403: "FORBIDDEN";
|
|
92
|
+
readonly 404: "NOT_FOUND";
|
|
93
|
+
readonly 418: "I_AM_A_TEAPOT";
|
|
94
|
+
readonly 500: "INTERNAL_SERVER_ERROR";
|
|
95
|
+
};
|
|
96
|
+
type HTTPErrorCode = keyof typeof httpErrorCodeLookup;
|
|
97
|
+
type APIErrorCode = CreateEnumType<typeof httpErrorCodeLookup>;
|
|
98
|
+
/**
|
|
99
|
+
* Represents common errors you may get from a HTTP API request.
|
|
100
|
+
*
|
|
101
|
+
* @category Types
|
|
102
|
+
*
|
|
103
|
+
* @template DataType The type of the data that caused the error.
|
|
104
|
+
* @template ErrorCode The type of the standardised error code.
|
|
105
|
+
*/
|
|
106
|
+
declare class APIError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string> extends CodeError<ErrorCode> {
|
|
107
|
+
data?: DataType;
|
|
108
|
+
status: number;
|
|
109
|
+
/**
|
|
110
|
+
* @param status - A HTTP status code. Can be any number, but numbers between 400 and 600 are encouraged to fit with HTTP status code conventions.
|
|
111
|
+
* @param code - A standardised code (e.g. UNEXPECTED_DATA).
|
|
112
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
113
|
+
* @param data - The data that caused the error.
|
|
114
|
+
* @param options - Extra options to be passed to super Error constructor.
|
|
115
|
+
*/
|
|
116
|
+
constructor(status: number, code: ErrorCode, message?: string, data?: DataType, options?: ErrorOptions);
|
|
117
|
+
/**
|
|
118
|
+
* Checks whether the given input may have been caused by an APIError.
|
|
119
|
+
*
|
|
120
|
+
* @param input - The input to check.
|
|
121
|
+
*
|
|
122
|
+
* @returns `true` if the input is an APIError, and `false` otherwise. The type of the input will also be narrowed down to APIError if `true`.
|
|
123
|
+
*/
|
|
124
|
+
static check<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(input: unknown): input is APIError<DataType, ErrorCode>;
|
|
125
|
+
/**
|
|
126
|
+
* Check an `APIError` against its error code
|
|
127
|
+
*
|
|
128
|
+
* This will also automatically narrow down the type of the input to be `APIError`, with its error code properly typed if this function returns true.
|
|
129
|
+
*
|
|
130
|
+
* @template ErrorCode The type of the error code
|
|
131
|
+
*
|
|
132
|
+
* @param input - The input to check.
|
|
133
|
+
* @param code - The expected code of the resulting error.
|
|
134
|
+
*
|
|
135
|
+
* @returns `true` if the error code matches the expected code, and `false` otherwise. The type of the input will also be narrowed down to `APIError`, and its code will be narrowed to the expected code's type if the function returns `true`.
|
|
136
|
+
*/
|
|
137
|
+
static checkWithCode<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string>(input: unknown, code: ErrorCode): input is APIError<DataType, ErrorCode>;
|
|
138
|
+
/**
|
|
139
|
+
* Gets the thrown `APIError` from a given function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
140
|
+
*
|
|
141
|
+
* @param errorFunction - The function expected to throw the error.
|
|
142
|
+
* @param options - Extra options to apply.
|
|
143
|
+
*
|
|
144
|
+
* @throws {Error} Any other errors thrown by the `errorFunction` that are not a `APIError`.
|
|
145
|
+
* @throws {Error} If no `APIError` was thrown by the `errorFunction`
|
|
146
|
+
*
|
|
147
|
+
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
148
|
+
*/
|
|
149
|
+
static expectError<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => unknown, options?: ExpectErrorOptions<ErrorCode>): APIError<DataType, ErrorCode>;
|
|
150
|
+
/**
|
|
151
|
+
* Gets the thrown `APIError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
152
|
+
*
|
|
153
|
+
* @param errorFunction - The function expected to throw the error.
|
|
154
|
+
* @param options - Extra options to apply.
|
|
155
|
+
*
|
|
156
|
+
* @throws {Error} Any other errors thrown by the `errorFunction` that are not a `APIError`.
|
|
157
|
+
* @throws {Error} If no `APIError` was thrown by the `errorFunction`
|
|
158
|
+
*
|
|
159
|
+
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
160
|
+
*/
|
|
161
|
+
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<APIError<DataType, ErrorCode>>;
|
|
162
|
+
/**
|
|
163
|
+
* Create a new `APIError` with the error code derived from the status directly.
|
|
164
|
+
*
|
|
165
|
+
* @param status - A HTTP status code. Must be one of the supported error codes from our custom `httpErrorCodeLookup`.
|
|
166
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
167
|
+
* @param data - The data that caused the error.
|
|
168
|
+
* @param options - Extra options to be passed to super Error constructor.
|
|
169
|
+
*
|
|
170
|
+
* @returns A new `APIError` with the error code derived from the status code.
|
|
171
|
+
*/
|
|
172
|
+
static fromStatus<DataType extends object = Record<PropertyKey, unknown>>(status: HTTPErrorCode, message?: string, data?: DataType, options?: ErrorOptions): APIError<DataType, APIErrorCode>;
|
|
173
|
+
/**
|
|
174
|
+
* Converts the `APIError` instance to a serialised JSON payload.
|
|
175
|
+
*
|
|
176
|
+
* @returns A JSON serialised version of the current `APIError` instance.
|
|
177
|
+
*/
|
|
178
|
+
toJSON(): Omit<APIError<DataType, ErrorCode>, "toJSON" | "name">;
|
|
66
179
|
}
|
|
67
180
|
//#endregion
|
|
68
181
|
//#region src/v6/DataError.d.ts
|
|
@@ -71,14 +184,15 @@ declare class CodeError<ErrorCode extends string = string> extends Error {
|
|
|
71
184
|
*
|
|
72
185
|
* @category Types
|
|
73
186
|
*
|
|
74
|
-
* @template DataType
|
|
187
|
+
* @template DataType The type of the data that caused the error.
|
|
188
|
+
* @template ErrorCode The type of the standardised error code.
|
|
75
189
|
*/
|
|
76
190
|
declare class DataError<DataType extends object = Record<PropertyKey, unknown>, ErrorCode extends string = string> extends CodeError<ErrorCode> {
|
|
77
191
|
data: DataType;
|
|
78
192
|
/**
|
|
79
193
|
* @param data - The data that caused the error.
|
|
80
194
|
* @param code - A standardised code (e.g. UNEXPECTED_DATA).
|
|
81
|
-
* @param message
|
|
195
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
82
196
|
* @param options - Extra options to pass to super Error constructor.
|
|
83
197
|
*/
|
|
84
198
|
constructor(data: DataType, code: ErrorCode, message?: string, options?: ErrorOptions);
|
|
@@ -127,6 +241,12 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
127
241
|
* @returns The `DataError` that was thrown by the `errorFunction`
|
|
128
242
|
*/
|
|
129
243
|
static expectErrorAsync<DataType extends Record<PropertyKey, unknown>, ErrorCode extends string = string>(errorFunction: () => Promise<unknown>, options?: ExpectErrorOptions<ErrorCode>): Promise<DataError<DataType, ErrorCode>>;
|
|
244
|
+
/**
|
|
245
|
+
* Converts the `DataError` instance to a serialised JSON payload.
|
|
246
|
+
*
|
|
247
|
+
* @returns A JSON serialised version of the current `DataError` instance.
|
|
248
|
+
*/
|
|
249
|
+
toJSON(): Omit<DataError<DataType, ErrorCode>, "toJSON" | "name">;
|
|
130
250
|
}
|
|
131
251
|
//#endregion
|
|
132
252
|
//#region src/v6/sayHello.d.ts
|
|
@@ -139,7 +259,4 @@ declare class DataError<DataType extends object = Record<PropertyKey, unknown>,
|
|
|
139
259
|
*/
|
|
140
260
|
declare function sayHello(): string;
|
|
141
261
|
//#endregion
|
|
142
|
-
|
|
143
|
-
type IsTypeArgumentString<Argument extends string> = Argument;
|
|
144
|
-
//#endregion
|
|
145
|
-
export { CodeError, DataError, type ExpectErrorOptions, type IsTypeArgumentString, sayHello };
|
|
262
|
+
export { APIError, type APIErrorCode, CodeError, DataError, type ExpectErrorOptions, type HTTPErrorCode, type IsTypeArgumentString, httpErrorCodeLookup, sayHello };
|
package/dist/v6/index.js
CHANGED
|
@@ -235,6 +235,135 @@ var CodeError = class CodeError extends Error {
|
|
|
235
235
|
}
|
|
236
236
|
throw new Error(`Expected a ${this.name} to be thrown but none was thrown`);
|
|
237
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Converts the `CodeError` instance to a serialised JSON payload.
|
|
240
|
+
*
|
|
241
|
+
* @returns A JSON serialised version of the current `CodeError` instance.
|
|
242
|
+
*/
|
|
243
|
+
toJSON() {
|
|
244
|
+
return {
|
|
245
|
+
code: this.code,
|
|
246
|
+
message: this.message
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/v6/APIError.ts
|
|
252
|
+
const httpErrorCodeLookup = {
|
|
253
|
+
400: "BAD_REQUEST",
|
|
254
|
+
401: "UNAUTHORISED",
|
|
255
|
+
403: "FORBIDDEN",
|
|
256
|
+
404: "NOT_FOUND",
|
|
257
|
+
418: "I_AM_A_TEAPOT",
|
|
258
|
+
500: "INTERNAL_SERVER_ERROR"
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Represents common errors you may get from a HTTP API request.
|
|
262
|
+
*
|
|
263
|
+
* @category Types
|
|
264
|
+
*
|
|
265
|
+
* @template DataType The type of the data that caused the error.
|
|
266
|
+
* @template ErrorCode The type of the standardised error code.
|
|
267
|
+
*/
|
|
268
|
+
var APIError = class APIError extends CodeError {
|
|
269
|
+
data;
|
|
270
|
+
status;
|
|
271
|
+
/**
|
|
272
|
+
* @param status - A HTTP status code. Can be any number, but numbers between 400 and 600 are encouraged to fit with HTTP status code conventions.
|
|
273
|
+
* @param code - A standardised code (e.g. UNEXPECTED_DATA).
|
|
274
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
275
|
+
* @param data - The data that caused the error.
|
|
276
|
+
* @param options - Extra options to be passed to super Error constructor.
|
|
277
|
+
*/
|
|
278
|
+
constructor(status, code, message = "There was an error with your API request.", data, options) {
|
|
279
|
+
super(code, message, options);
|
|
280
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, new.target);
|
|
281
|
+
this.data = data;
|
|
282
|
+
this.name = new.target.name;
|
|
283
|
+
this.status = status;
|
|
284
|
+
Object.defineProperty(this, "message", { enumerable: true });
|
|
285
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Checks whether the given input may have been caused by an APIError.
|
|
289
|
+
*
|
|
290
|
+
* @param input - The input to check.
|
|
291
|
+
*
|
|
292
|
+
* @returns `true` if the input is an APIError, and `false` otherwise. The type of the input will also be narrowed down to APIError if `true`.
|
|
293
|
+
*/
|
|
294
|
+
static check(input) {
|
|
295
|
+
if (input instanceof APIError) return true;
|
|
296
|
+
return typeof input === "object" && input !== null && "status" in input && typeof input.status === "number" && "code" in input && typeof input.code === "string" && "message" in input && typeof input.message === "string" && (!("data" in input) || input.data === void 0 || typeof input.data === "object" && input.data !== null);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Check an `APIError` against its error code
|
|
300
|
+
*
|
|
301
|
+
* This will also automatically narrow down the type of the input to be `APIError`, with its error code properly typed if this function returns true.
|
|
302
|
+
*
|
|
303
|
+
* @template ErrorCode The type of the error code
|
|
304
|
+
*
|
|
305
|
+
* @param input - The input to check.
|
|
306
|
+
* @param code - The expected code of the resulting error.
|
|
307
|
+
*
|
|
308
|
+
* @returns `true` if the error code matches the expected code, and `false` otherwise. The type of the input will also be narrowed down to `APIError`, and its code will be narrowed to the expected code's type if the function returns `true`.
|
|
309
|
+
*/
|
|
310
|
+
static checkWithCode(input, code) {
|
|
311
|
+
return this.check(input) && input.code === code;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Gets the thrown `APIError` from a given function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
315
|
+
*
|
|
316
|
+
* @param errorFunction - The function expected to throw the error.
|
|
317
|
+
* @param options - Extra options to apply.
|
|
318
|
+
*
|
|
319
|
+
* @throws {Error} Any other errors thrown by the `errorFunction` that are not a `APIError`.
|
|
320
|
+
* @throws {Error} If no `APIError` was thrown by the `errorFunction`
|
|
321
|
+
*
|
|
322
|
+
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
323
|
+
*/
|
|
324
|
+
static expectError(errorFunction, options) {
|
|
325
|
+
return super.expectError(errorFunction, options);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Gets the thrown `APIError` from a given asynchronous function if one was thrown, and re-throws any other errors, or throws a default `APIError` if no error thrown.
|
|
329
|
+
*
|
|
330
|
+
* @param errorFunction - The function expected to throw the error.
|
|
331
|
+
* @param options - Extra options to apply.
|
|
332
|
+
*
|
|
333
|
+
* @throws {Error} Any other errors thrown by the `errorFunction` that are not a `APIError`.
|
|
334
|
+
* @throws {Error} If no `APIError` was thrown by the `errorFunction`
|
|
335
|
+
*
|
|
336
|
+
* @returns The `APIError` that was thrown by the `errorFunction`
|
|
337
|
+
*/
|
|
338
|
+
static async expectErrorAsync(errorFunction, options) {
|
|
339
|
+
return await super.expectErrorAsync(errorFunction, options);
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Create a new `APIError` with the error code derived from the status directly.
|
|
343
|
+
*
|
|
344
|
+
* @param status - A HTTP status code. Must be one of the supported error codes from our custom `httpErrorCodeLookup`.
|
|
345
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
346
|
+
* @param data - The data that caused the error.
|
|
347
|
+
* @param options - Extra options to be passed to super Error constructor.
|
|
348
|
+
*
|
|
349
|
+
* @returns A new `APIError` with the error code derived from the status code.
|
|
350
|
+
*/
|
|
351
|
+
static fromStatus(status, message, data, options) {
|
|
352
|
+
const code = httpErrorCodeLookup[status];
|
|
353
|
+
return new APIError(status, code, message, data, options);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Converts the `APIError` instance to a serialised JSON payload.
|
|
357
|
+
*
|
|
358
|
+
* @returns A JSON serialised version of the current `APIError` instance.
|
|
359
|
+
*/
|
|
360
|
+
toJSON() {
|
|
361
|
+
return {
|
|
362
|
+
...super.toJSON(),
|
|
363
|
+
status: this.status,
|
|
364
|
+
data: this.data
|
|
365
|
+
};
|
|
366
|
+
}
|
|
238
367
|
};
|
|
239
368
|
//#endregion
|
|
240
369
|
//#region src/v6/DataError.ts
|
|
@@ -243,14 +372,15 @@ var CodeError = class CodeError extends Error {
|
|
|
243
372
|
*
|
|
244
373
|
* @category Types
|
|
245
374
|
*
|
|
246
|
-
* @template DataType
|
|
375
|
+
* @template DataType The type of the data that caused the error.
|
|
376
|
+
* @template ErrorCode The type of the standardised error code.
|
|
247
377
|
*/
|
|
248
378
|
var DataError = class DataError extends CodeError {
|
|
249
379
|
data;
|
|
250
380
|
/**
|
|
251
381
|
* @param data - The data that caused the error.
|
|
252
382
|
* @param code - A standardised code (e.g. UNEXPECTED_DATA).
|
|
253
|
-
* @param message
|
|
383
|
+
* @param message - A human-readable error message (e.g. The data provided is invalid).
|
|
254
384
|
* @param options - Extra options to pass to super Error constructor.
|
|
255
385
|
*/
|
|
256
386
|
constructor(data, code, message = "The data provided is invalid", options) {
|
|
@@ -270,7 +400,7 @@ var DataError = class DataError extends CodeError {
|
|
|
270
400
|
*/
|
|
271
401
|
static check(input) {
|
|
272
402
|
if (input instanceof DataError) return true;
|
|
273
|
-
return typeof input === "object" && input !== null && "message" in input && typeof input.message === "string" && "code" in input && typeof input.code === "string" && "data" in input;
|
|
403
|
+
return typeof input === "object" && input !== null && "message" in input && typeof input.message === "string" && "code" in input && typeof input.code === "string" && "data" in input && typeof input.data === "object" && input.data !== null;
|
|
274
404
|
}
|
|
275
405
|
/**
|
|
276
406
|
* Check a `DataError` against its error code
|
|
@@ -315,6 +445,17 @@ var DataError = class DataError extends CodeError {
|
|
|
315
445
|
static async expectErrorAsync(errorFunction, options) {
|
|
316
446
|
return await super.expectErrorAsync(errorFunction, options);
|
|
317
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* Converts the `DataError` instance to a serialised JSON payload.
|
|
450
|
+
*
|
|
451
|
+
* @returns A JSON serialised version of the current `DataError` instance.
|
|
452
|
+
*/
|
|
453
|
+
toJSON() {
|
|
454
|
+
return {
|
|
455
|
+
...super.toJSON(),
|
|
456
|
+
data: this.data
|
|
457
|
+
};
|
|
458
|
+
}
|
|
318
459
|
};
|
|
319
460
|
//#endregion
|
|
320
461
|
//#region src/v6/sayHello.ts
|
|
@@ -430,4 +571,4 @@ I'll commit to you!
|
|
|
430
571
|
`;
|
|
431
572
|
}
|
|
432
573
|
//#endregion
|
|
433
|
-
export { CodeError, DataError, sayHello };
|
|
574
|
+
export { APIError, CodeError, DataError, httpErrorCodeLookup, sayHello };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/utility",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.1",
|
|
4
4
|
"description": "Helpful utility functions.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,34 +37,37 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"dotenv": "17.4.2",
|
|
40
|
-
"execa": "9.6.1"
|
|
41
|
-
"zod": "4.3.6"
|
|
40
|
+
"execa": "9.6.1"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@alextheman/eslint-plugin": "5.
|
|
43
|
+
"@alextheman/eslint-plugin": "5.14.0",
|
|
45
44
|
"@types/node": "25.6.0",
|
|
46
|
-
"alex-c-line": "2.7.
|
|
45
|
+
"alex-c-line": "2.7.2",
|
|
47
46
|
"cross-env": "10.1.0",
|
|
48
47
|
"dotenv-cli": "11.0.0",
|
|
49
|
-
"eslint": "10.
|
|
50
|
-
"globals": "17.
|
|
48
|
+
"eslint": "10.3.0",
|
|
49
|
+
"globals": "17.6.0",
|
|
51
50
|
"husky": "9.1.7",
|
|
52
|
-
"jsdom": "29.
|
|
51
|
+
"jsdom": "29.1.1",
|
|
53
52
|
"prettier": "3.8.3",
|
|
54
53
|
"tempy": "3.2.0",
|
|
55
|
-
"tsdown": "0.21.
|
|
54
|
+
"tsdown": "0.21.10",
|
|
56
55
|
"tsx": "4.21.0",
|
|
57
56
|
"typedoc": "0.28.19",
|
|
58
57
|
"typedoc-plugin-markdown": "4.11.0",
|
|
59
58
|
"typedoc-rhineai-theme": "1.2.0",
|
|
60
59
|
"typescript": "6.0.3",
|
|
61
|
-
"typescript-eslint": "8.59.
|
|
60
|
+
"typescript-eslint": "8.59.1",
|
|
62
61
|
"vite": "8.0.10",
|
|
63
|
-
"vitest": "4.1.5"
|
|
62
|
+
"vitest": "4.1.5",
|
|
63
|
+
"zod": "4.4.2"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=22.3.0"
|
|
67
67
|
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"zod": ">=4.0.0"
|
|
70
|
+
},
|
|
68
71
|
"scripts": {
|
|
69
72
|
"build": "tsdown",
|
|
70
73
|
"build-configs": "tsdown --config tsdown.configs.config.ts",
|