@ireceipt.pro/js 1.1.48 → 2.0.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/README.md CHANGED
@@ -22,8 +22,25 @@ More information and examples are available on <https://dashboard.ireceipt.pro>
22
22
 
23
23
  ## Get Started
24
24
 
25
+ This library supports both CommonJS and ES modules (dual package).
26
+
25
27
  For the library to work, you will need an API key, which you can get at <https://dashboard.ireceipt.pro>. You can also find public template IDs there or create your own.
26
28
 
29
+ ### ESM (ES Modules)
30
+ ```ts
31
+ import { IReceiptPRO } from '@ireceipt.pro/js';
32
+
33
+ const irp = new IReceiptPRO(process.env.IRETAILPRO_API_KEY);
34
+ ```
35
+
36
+ ### CommonJS
37
+ ```js
38
+ const { IReceiptPRO } = require('@ireceipt.pro/js');
39
+
40
+ const irp = new IReceiptPRO(process.env.IRETAILPRO_API_KEY);
41
+ ```
42
+
43
+ ### Example usage
27
44
  ```ts
28
45
  import { IReceiptPRO } from '@ireceipt.pro/js';
29
46
 
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IReceiptPRO = void 0;
4
- const methods_1 = require("./methods");
4
+ const index_1 = require("./methods/index");
5
5
  class IReceiptPRO {
6
6
  /**
7
7
  *
@@ -29,7 +29,7 @@ class IReceiptPRO {
29
29
  createJpgFromPublicTemplate(templateId, args, size) {
30
30
  if (!this.apiKey)
31
31
  throw new Error("Initialization is required before use");
32
- return (0, methods_1.createFile)(this.apiKey, "jpg", "public", templateId, args, size);
32
+ return (0, index_1.createFile)(this.apiKey, "jpg", "public", templateId, args, size);
33
33
  }
34
34
  /**
35
35
  * Create PDF File from public template
@@ -42,7 +42,7 @@ class IReceiptPRO {
42
42
  createPdfFromPublicTemplate(templateId, args, size) {
43
43
  if (!this.apiKey)
44
44
  throw new Error("Initialization is required before use");
45
- return (0, methods_1.createFile)(this.apiKey, "pdf", "public", templateId, args, size);
45
+ return (0, index_1.createFile)(this.apiKey, "pdf", "public", templateId, args, size);
46
46
  }
47
47
  /**
48
48
  * Create PNG Image from public template
@@ -55,7 +55,7 @@ class IReceiptPRO {
55
55
  createPngFromPublicTemplate(templateId, args, size) {
56
56
  if (!this.apiKey)
57
57
  throw new Error("Initialization is required before use");
58
- return (0, methods_1.createFile)(this.apiKey, "png", "public", templateId, args, size);
58
+ return (0, index_1.createFile)(this.apiKey, "png", "public", templateId, args, size);
59
59
  }
60
60
  /**
61
61
  * Create WEBP Image from public template
@@ -68,7 +68,7 @@ class IReceiptPRO {
68
68
  createWebpFromPublicTemplate(templateId, args, size) {
69
69
  if (!this.apiKey)
70
70
  throw new Error("Initialization is required before use");
71
- return (0, methods_1.createFile)(this.apiKey, "webp", "public", templateId, args, size);
71
+ return (0, index_1.createFile)(this.apiKey, "webp", "public", templateId, args, size);
72
72
  }
73
73
  /**
74
74
  * Create JPG Image from private template,
@@ -82,7 +82,7 @@ class IReceiptPRO {
82
82
  createJpgFromPrivateTemplate(templateId, args, size) {
83
83
  if (!this.apiKey)
84
84
  throw new Error("Initialization is required before use");
85
- return (0, methods_1.createFile)(this.apiKey, "jpg", "private", templateId, args, size);
85
+ return (0, index_1.createFile)(this.apiKey, "jpg", "private", templateId, args, size);
86
86
  }
87
87
  /**
88
88
  * Create PDF File from private template,
@@ -96,7 +96,7 @@ class IReceiptPRO {
96
96
  createPdfFromPrivateTemplate(templateId, args, size) {
97
97
  if (!this.apiKey)
98
98
  throw new Error("Initialization is required before use");
99
- return (0, methods_1.createFile)(this.apiKey, "pdf", "private", templateId, args, size);
99
+ return (0, index_1.createFile)(this.apiKey, "pdf", "private", templateId, args, size);
100
100
  }
101
101
  /**
102
102
  * Create PNG Image from private template,
@@ -110,7 +110,7 @@ class IReceiptPRO {
110
110
  createPngFromPrivateTemplate(templateId, args, size) {
111
111
  if (!this.apiKey)
112
112
  throw new Error("Initialization is required before use");
113
- return (0, methods_1.createFile)(this.apiKey, "png", "private", templateId, args, size);
113
+ return (0, index_1.createFile)(this.apiKey, "png", "private", templateId, args, size);
114
114
  }
115
115
  /**
116
116
  * Create WEBP Image from private template,
@@ -124,7 +124,7 @@ class IReceiptPRO {
124
124
  createWebpFromPrivateTemplate(templateId, args, size) {
125
125
  if (!this.apiKey)
126
126
  throw new Error("Initialization is required before use");
127
- return (0, methods_1.createFile)(this.apiKey, "webp", "private", templateId, args, size);
127
+ return (0, index_1.createFile)(this.apiKey, "webp", "private", templateId, args, size);
128
128
  }
129
129
  }
130
130
  exports.IReceiptPRO = IReceiptPRO;
@@ -0,0 +1,127 @@
1
+ import { createFile } from './methods/index.js';
2
+ export class IReceiptPRO {
3
+ /**
4
+ *
5
+ * @param apiKey - IReceipt PRO API KEY, you can get it on <https://dashboard.ireceipt.pro>
6
+ */
7
+ constructor(apiKey) {
8
+ this.apiKey = apiKey;
9
+ }
10
+ /**
11
+ *
12
+ * @param apiKey - IReceipt PRO API KEY, you can get it on <https://dashboard.ireceipt.pro>
13
+ * @returns
14
+ */
15
+ static useApiKey(apiKey) {
16
+ return new IReceiptPRO(apiKey);
17
+ }
18
+ /**
19
+ * Create JPG Image from public template
20
+ *
21
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
22
+ * @param args - arguments for substitution in the template
23
+ * @param size - the size of the file being created
24
+ * @returns
25
+ */
26
+ createJpgFromPublicTemplate(templateId, args, size) {
27
+ if (!this.apiKey)
28
+ throw new Error("Initialization is required before use");
29
+ return createFile(this.apiKey, "jpg", "public", templateId, args, size);
30
+ }
31
+ /**
32
+ * Create PDF File from public template
33
+ *
34
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
35
+ * @param args - arguments for substitution in the template
36
+ * @param size - the size of the file being created
37
+ * @returns
38
+ */
39
+ createPdfFromPublicTemplate(templateId, args, size) {
40
+ if (!this.apiKey)
41
+ throw new Error("Initialization is required before use");
42
+ return createFile(this.apiKey, "pdf", "public", templateId, args, size);
43
+ }
44
+ /**
45
+ * Create PNG Image from public template
46
+ *
47
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
48
+ * @param args - arguments for substitution in the template
49
+ * @param size - the size of the file being created
50
+ * @returns
51
+ */
52
+ createPngFromPublicTemplate(templateId, args, size) {
53
+ if (!this.apiKey)
54
+ throw new Error("Initialization is required before use");
55
+ return createFile(this.apiKey, "png", "public", templateId, args, size);
56
+ }
57
+ /**
58
+ * Create WEBP Image from public template
59
+ *
60
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
61
+ * @param args - arguments for substitution in the template
62
+ * @param size - the size of the file being created
63
+ * @returns
64
+ */
65
+ createWebpFromPublicTemplate(templateId, args, size) {
66
+ if (!this.apiKey)
67
+ throw new Error("Initialization is required before use");
68
+ return createFile(this.apiKey, "webp", "public", templateId, args, size);
69
+ }
70
+ /**
71
+ * Create JPG Image from private template,
72
+ * you can manage it on <https://dashboard.ireceipt.pro>
73
+ *
74
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
75
+ * @param args - arguments for substitution in the template
76
+ * @param size - the size of the file being created
77
+ * @returns
78
+ */
79
+ createJpgFromPrivateTemplate(templateId, args, size) {
80
+ if (!this.apiKey)
81
+ throw new Error("Initialization is required before use");
82
+ return createFile(this.apiKey, "jpg", "private", templateId, args, size);
83
+ }
84
+ /**
85
+ * Create PDF File from private template,
86
+ * you can manage it on <https://dashboard.ireceipt.pro>
87
+ *
88
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
89
+ * @param args - arguments for substitution in the template
90
+ * @param size - the size of the file being created
91
+ * @returns
92
+ */
93
+ createPdfFromPrivateTemplate(templateId, args, size) {
94
+ if (!this.apiKey)
95
+ throw new Error("Initialization is required before use");
96
+ return createFile(this.apiKey, "pdf", "private", templateId, args, size);
97
+ }
98
+ /**
99
+ * Create PNG Image from private template,
100
+ * you can manage it on <https://dashboard.ireceipt.pro>
101
+ *
102
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
103
+ * @param args - arguments for substitution in the template
104
+ * @param size - the size of the file being created
105
+ * @returns
106
+ */
107
+ createPngFromPrivateTemplate(templateId, args, size) {
108
+ if (!this.apiKey)
109
+ throw new Error("Initialization is required before use");
110
+ return createFile(this.apiKey, "png", "private", templateId, args, size);
111
+ }
112
+ /**
113
+ * Create WEBP Image from private template,
114
+ * you can manage it on <https://dashboard.ireceipt.pro>
115
+ *
116
+ * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro>
117
+ * @param args - arguments for substitution in the template
118
+ * @param size - the size of the file being created
119
+ * @returns
120
+ */
121
+ createWebpFromPrivateTemplate(templateId, args, size) {
122
+ if (!this.apiKey)
123
+ throw new Error("Initialization is required before use");
124
+ return createFile(this.apiKey, "webp", "private", templateId, args, size);
125
+ }
126
+ }
127
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,40 @@
1
+ import axios from "axios";
2
+ import { apiUrl } from '../utils/constants.js';
3
+ import { handleError } from '../utils/handleError.js';
4
+ export const createFile = async (apiKey, type, templateType, templateId, args, size) => {
5
+ let attempt = 1;
6
+ let buffer;
7
+ let error;
8
+ while (attempt <= 5 && !buffer) {
9
+ try {
10
+ const res = await axios.post(`${apiUrl}${type}/${templateType}/${templateId}`, {
11
+ variables: args || {},
12
+ size,
13
+ }, {
14
+ headers: {
15
+ Authorization: `Bearer ${apiKey}`,
16
+ "User-Agent": "IReceipt PRO JS Library",
17
+ },
18
+ responseType: "arraybuffer",
19
+ });
20
+ if (res.status === 201) {
21
+ buffer = res.data;
22
+ }
23
+ else {
24
+ error = new Error(res.data);
25
+ }
26
+ }
27
+ catch (err) {
28
+ error = handleError(err);
29
+ }
30
+ attempt += 1;
31
+ if (!buffer)
32
+ await new Promise((res) => {
33
+ setTimeout(res, attempt * 1000);
34
+ });
35
+ }
36
+ if (!buffer)
37
+ throw error;
38
+ return buffer;
39
+ };
40
+ //# sourceMappingURL=createFile.js.map
@@ -0,0 +1,3 @@
1
+ import { createFile } from './createFile.js';
2
+ export { createFile };
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export const apiUrl = "https://api.ireceipt.pro/v1/";
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,19 @@
1
+ import { AxiosError } from "axios";
2
+ export const handleError = (err) => {
3
+ if (err instanceof AxiosError) {
4
+ try {
5
+ const respText = err.response?.data?.toString();
6
+ const respJSON = respText
7
+ ? JSON.parse(respText)
8
+ : { message: `Unknown error with status code ${err.code}` };
9
+ return new Error(respJSON.message);
10
+ }
11
+ catch {
12
+ return new Error(`Unknown error with status code ${err.code}`);
13
+ }
14
+ }
15
+ if (err instanceof Error)
16
+ return err;
17
+ return new Error(err?.message || `Unknown error with status code ${err?.code}`);
18
+ };
19
+ //# sourceMappingURL=handleError.js.map
@@ -24,7 +24,7 @@ export declare class IReceiptPRO {
24
24
  }, size?: {
25
25
  width: number;
26
26
  height: number;
27
- }): Promise<ArrayBuffer>;
27
+ }): Promise<Buffer<ArrayBufferLike>>;
28
28
  /**
29
29
  * Create PDF File from public template
30
30
  *
@@ -38,7 +38,7 @@ export declare class IReceiptPRO {
38
38
  }, size?: {
39
39
  width: number;
40
40
  height: number;
41
- }): Promise<ArrayBuffer>;
41
+ }): Promise<Buffer<ArrayBufferLike>>;
42
42
  /**
43
43
  * Create PNG Image from public template
44
44
  *
@@ -52,7 +52,7 @@ export declare class IReceiptPRO {
52
52
  }, size?: {
53
53
  width: number;
54
54
  height: number;
55
- }): Promise<ArrayBuffer>;
55
+ }): Promise<Buffer<ArrayBufferLike>>;
56
56
  /**
57
57
  * Create WEBP Image from public template
58
58
  *
@@ -66,7 +66,7 @@ export declare class IReceiptPRO {
66
66
  }, size?: {
67
67
  width: number;
68
68
  height: number;
69
- }): Promise<ArrayBuffer>;
69
+ }): Promise<Buffer<ArrayBufferLike>>;
70
70
  /**
71
71
  * Create JPG Image from private template,
72
72
  * you can manage it on <https://dashboard.ireceipt.pro>
@@ -81,7 +81,7 @@ export declare class IReceiptPRO {
81
81
  }, size?: {
82
82
  width: number;
83
83
  height: number;
84
- }): Promise<ArrayBuffer>;
84
+ }): Promise<Buffer<ArrayBufferLike>>;
85
85
  /**
86
86
  * Create PDF File from private template,
87
87
  * you can manage it on <https://dashboard.ireceipt.pro>
@@ -96,7 +96,7 @@ export declare class IReceiptPRO {
96
96
  }, size?: {
97
97
  width: number;
98
98
  height: number;
99
- }): Promise<ArrayBuffer>;
99
+ }): Promise<Buffer<ArrayBufferLike>>;
100
100
  /**
101
101
  * Create PNG Image from private template,
102
102
  * you can manage it on <https://dashboard.ireceipt.pro>
@@ -111,7 +111,7 @@ export declare class IReceiptPRO {
111
111
  }, size?: {
112
112
  width: number;
113
113
  height: number;
114
- }): Promise<ArrayBuffer>;
114
+ }): Promise<Buffer<ArrayBufferLike>>;
115
115
  /**
116
116
  * Create WEBP Image from private template,
117
117
  * you can manage it on <https://dashboard.ireceipt.pro>
@@ -126,5 +126,5 @@ export declare class IReceiptPRO {
126
126
  }, size?: {
127
127
  width: number;
128
128
  height: number;
129
- }): Promise<ArrayBuffer>;
129
+ }): Promise<Buffer<ArrayBufferLike>>;
130
130
  }
@@ -3,4 +3,4 @@ export declare const createFile: (apiKey: string, type: "jpg" | "png" | "webp" |
3
3
  }, size?: {
4
4
  width: number;
5
5
  height: number;
6
- }) => Promise<ArrayBuffer>;
6
+ }) => Promise<Buffer>;
package/package.json CHANGED
@@ -1,18 +1,53 @@
1
1
  {
2
2
  "name": "@ireceipt.pro/js",
3
- "version": "1.1.48",
3
+ "version": "2.0.0",
4
4
  "description": "Create PDF files or images (JPG, PNG, WEBP) from your HTML template.",
5
- "main": "./lib/index.js",
6
- "types": "./lib/index.d.ts",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/types/index.d.ts",
13
+ "default": "./dist/esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "default": "./dist/cjs/index.js"
18
+ }
19
+ }
20
+ },
21
+ "files": [
22
+ "dist/esm/**/*.js",
23
+ "dist/cjs/**/*.js",
24
+ "dist/types/**/*",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
7
28
  "scripts": {
8
- "test": "node --test test/*.test.js",
29
+ "test": "tsx --test test/library.test.ts",
9
30
  "cov": "node_modules/.bin/nyc npm run test",
10
31
  "prebuild": "node_modules/.bin/eslint src/**/*.ts",
11
- "build": "rm -rf lib && node_modules/.bin/tsc --declaration",
32
+ "build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm && npm run build:package && npm run fix:esm",
33
+ "clean": "rm -rf dist lib",
34
+ "build:types": "tsc --project tsconfig.types.json",
35
+ "build:cjs": "tsc --project tsconfig.cjs.json",
36
+ "build:esm": "tsc --project tsconfig.esm.json",
37
+ "build:package": "echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
38
+ "fix:esm": "node scripts/fix-esm-imports.mjs",
12
39
  "update": "eval \"$(node -e 'const t = require(`./package.json`);const ignore = require(`./ignoreUpdatesModules.json`);console.log(`npm i ${(Object.keys(t.dependencies || {}).filter((e)=>ignore.base.indexOf(e) === -1).map((e)=>(`${e}@latest`)).join(` `))} --save&&npm i ${(Object.keys(t.devDependencies || {}).filter((e)=>ignore.dev.indexOf(e) === -1).map((e)=>(`${e}@latest`)).join(` `))} --save-dev`);')\""
13
40
  },
14
- "author": "Siarhei Dudko",
41
+ "author": {
42
+ "name": "Siarhei Dudko",
43
+ "email": "siarhei@dudko.dev",
44
+ "url": "https://dudko.dev"
45
+ },
15
46
  "funding": [
47
+ {
48
+ "type": "individual",
49
+ "url": "http://dudko.dev/donate"
50
+ },
16
51
  {
17
52
  "type": "buymeacoffee",
18
53
  "url": "https://www.buymeacoffee.com/dudko.dev"
@@ -46,20 +81,22 @@
46
81
  ],
47
82
  "homepage": "https://www.npmjs.com/package/@ireceipt-pro/js",
48
83
  "devDependencies": {
49
- "@eslint/js": "^9.21.0",
50
- "eslint": "^9.21.0",
84
+ "@eslint/js": "^9.36.0",
85
+ "@types/node": "^24.5.2",
86
+ "eslint": "^9.36.0",
51
87
  "nyc": "^17.1.0",
52
- "prettier": "^3.5.2",
53
- "typescript": "^5.7.3",
54
- "typescript-eslint": "^8.25.0"
88
+ "prettier": "^3.6.2",
89
+ "tsx": "^4.20.6",
90
+ "typescript": "^5.9.2",
91
+ "typescript-eslint": "^8.44.1"
55
92
  },
56
93
  "engines": {
57
94
  "node": ">=14"
58
95
  },
59
- "directorie": {
96
+ "directories": {
60
97
  "test": "./test/"
61
98
  },
62
99
  "dependencies": {
63
- "axios": "^1.7.9"
100
+ "axios": "^1.12.2"
64
101
  }
65
102
  }
package/CHANGELOG.md DELETED
@@ -1,486 +0,0 @@
1
- # 1.1.48 / 2025-02-25
2
-
3
- ### :tada: Enhancements
4
- - Updated dependencies: typescript-eslint
5
-
6
- # 1.1.47 / 2025-02-23
7
-
8
- ### :tada: Enhancements
9
- - Updated dependencies: prettier
10
-
11
- # 1.1.46 / 2025-02-22
12
-
13
- ### :tada: Enhancements
14
- - Updated dependencies: @eslint/js, eslint
15
-
16
- # 1.1.45 / 2025-02-21
17
-
18
- ### :tada: Enhancements
19
- - Updated dependencies: @eslint/js, eslint, prettier, typescript-eslint
20
-
21
- # 1.1.44 / 2025-01-28
22
-
23
- ### :tada: Enhancements
24
- - Updated dependencies: typescript-eslint
25
-
26
- # 1.1.43 / 2025-01-25
27
-
28
- ### :tada: Enhancements
29
- - Updated dependencies: @eslint/js, eslint
30
-
31
- # 1.1.42 / 2025-01-21
32
-
33
- ### :tada: Enhancements
34
- - Updated dependencies: typescript-eslint
35
-
36
- # 1.1.41 / 2025-01-14
37
-
38
- ### :tada: Enhancements
39
- - Updated dependencies: typescript-eslint
40
-
41
- # 1.1.40 / 2025-01-11
42
-
43
- ### :tada: Enhancements
44
- - Updated dependencies: @eslint/js, eslint
45
-
46
- # 1.1.39 / 2025-01-09
47
-
48
- ### :tada: Enhancements
49
- - Updated dependencies: typescript
50
-
51
- # 1.1.38 / 2025-01-07
52
-
53
- ### :tada: Enhancements
54
- - Updated dependencies: typescript-eslint
55
-
56
- # 1.1.37 / 2024-12-31
57
-
58
- ### :tada: Enhancements
59
- - Updated dependencies: typescript-eslint
60
-
61
- # 1.1.36 / 2024-12-24
62
-
63
- ### :tada: Enhancements
64
- - Updated dependencies: typescript-eslint
65
-
66
- # 1.1.35 / 2024-12-17
67
-
68
- ### :tada: Enhancements
69
- - Updated dependencies: typescript-eslint
70
-
71
- # 1.1.34 / 2024-12-14
72
-
73
- ### :tada: Enhancements
74
- - Updated dependencies: @eslint/js, eslint
75
-
76
- # 1.1.33 / 2024-12-10
77
-
78
- ### :tada: Enhancements
79
- - Updated dependencies: typescript-eslint
80
-
81
- # 1.1.32 / 2024-12-05
82
-
83
- ### :tada: Enhancements
84
- - Updated dependencies: axios, prettier
85
-
86
- # 1.1.31 / 2024-12-03
87
-
88
- ### :tada: Enhancements
89
- - Updated dependencies: typescript-eslint
90
-
91
- # 1.1.30 / 2024-11-30
92
-
93
- ### :tada: Enhancements
94
- - Updated dependencies: @eslint/js, eslint
95
-
96
- # 1.1.29 / 2024-11-27
97
-
98
- ### :tada: Enhancements
99
- - Updated dependencies: prettier
100
-
101
- # 1.1.28 / 2024-11-26
102
-
103
- ### :tada: Enhancements
104
- - Updated dependencies: axios, typescript-eslint
105
-
106
- # 1.1.27 / 2024-11-23
107
-
108
- ### :tada: Enhancements
109
- - Updated dependencies: typescript
110
-
111
- # 1.1.26 / 2024-11-19
112
-
113
- ### :tada: Enhancements
114
- - Updated dependencies: @eslint/js, eslint, typescript-eslint
115
-
116
- # 1.1.25 / 2024-11-12
117
-
118
- ### :tada: Enhancements
119
- - Updated dependencies: typescript-eslint
120
-
121
- # 1.1.24 / 2024-11-05
122
-
123
- ### :tada: Enhancements
124
- - Updated dependencies: typescript-eslint
125
-
126
- # 1.1.23 / 2024-11-02
127
-
128
- ### :tada: Enhancements
129
- - Updated dependencies: @eslint/js, eslint
130
-
131
- # 1.1.22 / 2024-10-30
132
-
133
- ### :tada: Enhancements
134
- - Updated dependencies: typescript-eslint
135
-
136
- # 1.1.21 / 2024-10-29
137
-
138
- ### :tada: Enhancements
139
- - Updated dependencies: typescript-eslint
140
-
141
- # 1.1.20 / 2024-10-22
142
-
143
- ### :tada: Enhancements
144
- - Updated dependencies: typescript-eslint
145
-
146
- # 1.1.19 / 2024-10-19
147
-
148
- ### :tada: Enhancements
149
- - Updated dependencies: @eslint/js, eslint
150
-
151
- # 1.1.18 / 2024-10-18
152
-
153
- ### :tada: Enhancements
154
- - Updated dependencies: typescript-eslint
155
-
156
- # 1.1.16 / 2024-10-15
157
-
158
- ### :tada: Enhancements
159
- - Updated dependencies: typescript-eslint
160
-
161
- # 1.1.15 / 2024-10-09
162
-
163
- ### :tada: Enhancements
164
- - Updated dependencies: typescript
165
-
166
- # 1.1.14 / 2024-10-08
167
-
168
- ### :tada: Enhancements
169
- - Updated dependencies: typescript-eslint
170
-
171
- # 1.1.13 / 2024-10-05
172
-
173
- ### :tada: Enhancements
174
- - Updated dependencies: @eslint/js, eslint
175
-
176
- # 1.1.12 / 2024-10-01
177
-
178
- ### :tada: Enhancements
179
- - Updated dependencies: typescript-eslint
180
-
181
- # 1.1.11 / 2024-09-24
182
-
183
- ### :tada: Enhancements
184
- - Updated dependencies: @eslint/js, eslint, typescript-eslint
185
-
186
- # 1.1.10 / 2024-09-21
187
-
188
- ### :tada: Enhancements
189
- - Updated dependencies: @eslint/js, eslint
190
-
191
- # 1.1.9 / 2024-09-20
192
-
193
- ### :tada: Enhancements
194
- - Updated dependencies: nyc
195
-
196
- # 1.1.8 / 2024-09-17
197
-
198
- ### :tada: Enhancements
199
- - Updated dependencies: typescript-eslint
200
-
201
- # 1.1.7 / 2024-09-10
202
-
203
- ### :tada: Enhancements
204
- - Updated dependencies: typescript, typescript-eslint
205
-
206
- # 1.1.6 / 2024-09-07
207
-
208
- ### :tada: Enhancements
209
- - Updated dependencies: @eslint/js, eslint
210
-
211
- # 1.1.5 / 2024-09-03
212
-
213
- ### :tada: Enhancements
214
- - Updated dependencies: typescript-eslint
215
-
216
- # 1.1.4 / 2024-09-01
217
-
218
- ### :tada: Enhancements
219
- - Updated dependencies: axios
220
-
221
- # 1.1.3 / 2024-08-31
222
-
223
- ### :tada: Enhancements
224
- - Updated dependencies: axios
225
-
226
- # 1.1.2 / 2024-08-27
227
-
228
- ### :tada: Enhancements
229
- - Updated dependencies: typescript-eslint
230
-
231
- # 1.1.1 / 2024-08-24
232
-
233
- ### :tada: Enhancements
234
- - Updated dependencies: @eslint/js, axios, eslint
235
-
236
- # 1.1.0 / 2024-08-20
237
-
238
- ### :tada: Enhancements
239
-
240
- - Removed test libs
241
-
242
- # 1.0.43 / 2024-08-20
243
-
244
- ### :tada: Enhancements
245
-
246
- - Updated dependencies
247
-
248
- # 1.0.41 / 2024-08-20
249
-
250
- ### :tada: Enhancements
251
-
252
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
253
-
254
- # 1.0.40 / 2024-08-14
255
-
256
- ### :tada: Enhancements
257
-
258
- - Updated dependencies: axios
259
-
260
- # 1.0.39 / 2024-08-13
261
-
262
- ### :tada: Enhancements
263
-
264
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
265
-
266
- # 1.0.38 / 2024-08-10
267
-
268
- ### :tada: Enhancements
269
-
270
- - Updated dependencies: mocha
271
-
272
- # 1.0.37 / 2024-08-06
273
-
274
- ### :tada: Enhancements
275
-
276
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
277
-
278
- # 1.0.36 / 2024-08-02
279
-
280
- ### :tada: Enhancements
281
-
282
- - Updated dependencies: axios
283
-
284
- # 1.0.35 / 2024-08-01
285
-
286
- ### :tada: Enhancements
287
-
288
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
289
-
290
- # 1.0.34 / 2024-07-30
291
-
292
- ### :tada: Enhancements
293
-
294
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
295
-
296
- # 1.0.33 / 2024-07-27
297
-
298
- ### :tada: Enhancements
299
-
300
- - Updated dependencies: chai
301
-
302
- # 1.0.32 / 2024-07-26
303
-
304
- ### :tada: Enhancements
305
-
306
- - Updated dependencies: chai
307
-
308
- # 1.0.31 / 2024-07-23
309
-
310
- ### :tada: Enhancements
311
-
312
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, typescript
313
-
314
- # 1.0.30 / 2024-07-21
315
-
316
- ### :tada: Enhancements
317
-
318
- - Updated dependencies: mocha
319
-
320
- # 1.0.29 / 2024-07-16
321
-
322
- ### :tada: Enhancements
323
-
324
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
325
-
326
- # 1.0.28 / 2024-07-09
327
-
328
- ### :tada: Enhancements
329
-
330
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
331
-
332
- # 1.0.27 / 2024-07-03
333
-
334
- ### :tada: Enhancements
335
-
336
- - Updated dependencies: mocha
337
-
338
- # 1.0.26 / 2024-07-02
339
-
340
- ### :tada: Enhancements
341
-
342
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, typescript
343
-
344
- # 1.0.25 / 2024-06-27
345
-
346
- ### :tada: Enhancements
347
-
348
- - Updated dependencies: mocha
349
-
350
- # 1.0.24 / 2024-06-26
351
-
352
- ### :tada: Enhancements
353
-
354
- - Updated dependencies: mocha
355
-
356
- # 1.0.23 / 2024-06-25
357
-
358
- ### :tada: Enhancements
359
-
360
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, mocha
361
-
362
- # 1.0.22 / 2024-06-21
363
-
364
- ### :tada: Enhancements
365
-
366
- - Updated dependencies: typescript
367
-
368
- # 1.0.21 / 2024-06-18
369
-
370
- ### :tada: Enhancements
371
-
372
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
373
-
374
- # 1.0.20 / 2024-06-12
375
-
376
- ### :tada: Enhancements
377
-
378
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
379
-
380
- # 1.0.19 / 2024-06-10
381
-
382
- ### :tada: Enhancements
383
-
384
- - Updated dependencies
385
-
386
- # 1.0.18 / 2024-05-14
387
-
388
- ### :tada: Enhancements
389
-
390
- - Changed example
391
-
392
- # 1.0.17 / 2024-04-05
393
-
394
- ### :tada: Enhancements
395
-
396
- - Updated dependencies: typescript
397
-
398
- # 1.0.16 / 2024-04-02
399
-
400
- ### :tada: Enhancements
401
-
402
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
403
-
404
- # 1.0.15 / 2024-03-27
405
-
406
- ### :tada: Enhancements
407
-
408
- - Updated dependencies: mocha
409
-
410
- # 1.0.14 / 2024-03-26
411
-
412
- ### :tada: Enhancements
413
-
414
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
415
-
416
- # 1.0.13 / 2024-03-21
417
-
418
- ### :tada: Enhancements
419
-
420
- - Updated dependencies: typescript
421
-
422
- # 1.0.12 / 2024-03-19
423
-
424
- ### :tada: Enhancements
425
-
426
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
427
-
428
- # 1.0.11 / 2024-03-16
429
-
430
- ### :tada: Enhancements
431
-
432
- - Updated dependencies: axios
433
-
434
- # 1.0.10 / 2024-03-12
435
-
436
- ### :tada: Enhancements
437
-
438
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
439
-
440
- # 1.0.9 / 2024-03-07
441
-
442
- ### :tada: Enhancements
443
-
444
- - Updated dependencies: typescript
445
-
446
- # 1.0.8 / 2024-03-05
447
-
448
- ### :tada: Enhancements
449
-
450
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
451
-
452
- # 1.0.7 / 2024-02-27
453
-
454
- ### :tada: Enhancements
455
-
456
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
457
-
458
- # 1.0.6 / 2024-02-24
459
-
460
- ### :tada: Enhancements
461
-
462
- - Updated dependencies: eslint
463
-
464
- # 1.0.5 / 2024-02-20
465
-
466
- ### :tada: Enhancements
467
-
468
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
469
-
470
- # 1.0.4 / 2024-02-13
471
-
472
- ### :tada: Enhancements
473
-
474
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser, chai
475
-
476
- # 1.0.3 / 2024-02-09
477
-
478
- ### :tada: Enhancements
479
-
480
- - Updated dependencies: mocha
481
-
482
- # 1.0.2 / 2024-02-08
483
-
484
- ### :tada: Enhancements
485
-
486
- - Updated dependencies: @typescript-eslint/eslint-plugin, @typescript-eslint/parser
@@ -1,4 +0,0 @@
1
- {
2
- "base": [],
3
- "dev": []
4
- }
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,MAAa,WAAW;IACtB;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAID;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,MAAc;QACpC,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACI,2BAA2B,CAChC,UAAkB,EAClB,IAAgC,EAChC,IAAwC;QAExC,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3E,OAAO,IAAA,oBAAU,EAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACI,2BA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QAC/B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,IAAI,CAC1B,GAAG,kBAAM,GAAG,IAAI,IAAI,YAAY,IAAI,UAAU,EAAE,EAChD;gBACE,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,IAAI;aACL,EACD;gBACE,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,MAAM,EAAE;oBACjC,YAAY,EAAE,yBAAyB;iBACxC;gBACD,YAAY,EAAE,aAAa;aAC5B,CACF,CAAC;YACF,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACvB,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACN,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,KAAK,GAAG,IAAA,yBAAW,EAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,MAAM;YACT,MAAM,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;IACP,CAAC;IACD,IAAI,CAAC,MAAM;QAAE,MAAM,KAAK,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA3CW,QAAA,UAAU,cA2CrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/methods/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAEjC,2FAFA,uBAAU,OAEA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG,8BAA8B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"handleError.js","sourceRoot":"","sources":["../../src/utils/handleError.ts"],"names":[],"mappings":";;;AAAA,iCAAmC;AAE5B,MAAM,WAAW,GAAG,CAAC,GAA6B,EAAE,EAAE;IAC3D,IAAI,GAAG,YAAY,kBAAU,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,QAAQ;gBACvB,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAyB;gBAC/C,CAAC,CAAC,EAAE,OAAO,EAAE,kCAAkC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;YAC9D,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,KAAK,CAAC,kCAAkC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IACD,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC;IACrC,OAAO,IAAI,KAAK,CACd,GAAG,EAAE,OAAO,IAAI,kCAAkC,GAAG,EAAE,IAAI,EAAE,CAC9D,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,WAAW,eAgBtB"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes