@alextheman/utility 1.13.1 → 1.13.2

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
@@ -211,14 +211,6 @@ function wait(seconds) {
211
211
  }
212
212
  var wait_default = wait;
213
213
 
214
- // src/types/Env.ts
215
- var import_zod = require("zod");
216
- var envSchema = import_zod.z.enum(["test", "development", "production"]);
217
- function newEnv(data = "development") {
218
- return envSchema.parse(data);
219
- }
220
- var Env_default = newEnv;
221
-
222
214
  // src/types/APIError.ts
223
215
  var httpErrorCodeLookup = {
224
216
  400: "BAD_REQUEST",
@@ -246,6 +238,14 @@ var APIError = class extends Error {
246
238
  }
247
239
  };
248
240
  var APIError_default = APIError;
241
+
242
+ // src/types/Env.ts
243
+ var import_zod = require("zod");
244
+ var envSchema = import_zod.z.enum(["test", "development", "production"]);
245
+ function newEnv(data = "development") {
246
+ return envSchema.parse(data);
247
+ }
248
+ var Env_default = newEnv;
249
249
  // Annotate the CommonJS export names for ESM import in node:
250
250
  0 && (module.exports = {
251
251
  APIError,
package/dist/index.d.cts CHANGED
@@ -24,6 +24,13 @@ declare function truncate(stringToTruncate: string, maxLength?: number): string;
24
24
 
25
25
  declare function wait(seconds: number): Promise<void>;
26
26
 
27
+ type HTTPErrorCodes = 400 | 401 | 403 | 404 | 418 | 500;
28
+ declare const httpErrorCodeLookup: Record<HTTPErrorCodes, string>;
29
+ declare class APIError extends Error {
30
+ status: number;
31
+ constructor(status?: number, message?: string, options?: ErrorOptions);
32
+ }
33
+
27
34
  declare const envSchema: z.ZodEnum<{
28
35
  test: "test";
29
36
  development: "development";
@@ -32,11 +39,4 @@ declare const envSchema: z.ZodEnum<{
32
39
  type Env = z.infer<typeof envSchema>;
33
40
  declare function newEnv(data?: unknown): Env;
34
41
 
35
- type HTTPErrorCodes = 400 | 401 | 403 | 404 | 418 | 500;
36
- declare const httpErrorCodeLookup: Record<HTTPErrorCodes, string>;
37
- declare class APIError extends Error {
38
- status: number;
39
- constructor(status?: number, message?: string, options?: ErrorOptions);
40
- }
41
-
42
42
  export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, newEnv, randomiseArray, range, truncate, wait };
package/dist/index.d.ts CHANGED
@@ -24,6 +24,13 @@ declare function truncate(stringToTruncate: string, maxLength?: number): string;
24
24
 
25
25
  declare function wait(seconds: number): Promise<void>;
26
26
 
27
+ type HTTPErrorCodes = 400 | 401 | 403 | 404 | 418 | 500;
28
+ declare const httpErrorCodeLookup: Record<HTTPErrorCodes, string>;
29
+ declare class APIError extends Error {
30
+ status: number;
31
+ constructor(status?: number, message?: string, options?: ErrorOptions);
32
+ }
33
+
27
34
  declare const envSchema: z.ZodEnum<{
28
35
  test: "test";
29
36
  development: "development";
@@ -32,11 +39,4 @@ declare const envSchema: z.ZodEnum<{
32
39
  type Env = z.infer<typeof envSchema>;
33
40
  declare function newEnv(data?: unknown): Env;
34
41
 
35
- type HTTPErrorCodes = 400 | 401 | 403 | 404 | 418 | 500;
36
- declare const httpErrorCodeLookup: Record<HTTPErrorCodes, string>;
37
- declare class APIError extends Error {
38
- status: number;
39
- constructor(status?: number, message?: string, options?: ErrorOptions);
40
- }
41
-
42
42
  export { APIError, type Env, type HTTPErrorCodes, addDaysToDate, appendSemicolon, convertFileToBase64, formatDateAndTime, getRandomNumber, httpErrorCodeLookup, isLeapYear, isMonthlyMultiple, isSameDate, newEnv, randomiseArray, range, truncate, wait };
package/dist/index.js CHANGED
@@ -173,14 +173,6 @@ function wait(seconds) {
173
173
  }
174
174
  var wait_default = wait;
175
175
 
176
- // src/types/Env.ts
177
- import { z } from "zod";
178
- var envSchema = z.enum(["test", "development", "production"]);
179
- function newEnv(data = "development") {
180
- return envSchema.parse(data);
181
- }
182
- var Env_default = newEnv;
183
-
184
176
  // src/types/APIError.ts
185
177
  var httpErrorCodeLookup = {
186
178
  400: "BAD_REQUEST",
@@ -208,6 +200,14 @@ var APIError = class extends Error {
208
200
  }
209
201
  };
210
202
  var APIError_default = APIError;
203
+
204
+ // src/types/Env.ts
205
+ import { z } from "zod";
206
+ var envSchema = z.enum(["test", "development", "production"]);
207
+ function newEnv(data = "development") {
208
+ return envSchema.parse(data);
209
+ }
210
+ var Env_default = newEnv;
211
211
  export {
212
212
  APIError_default as APIError,
213
213
  addDaysToDate_default as addDaysToDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alextheman/utility",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",