safe-wrapper 1.0.6 → 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
@@ -1,6 +1,12 @@
1
1
  ## safe-wrapper
2
2
 
3
- safe-wrapper is a lightweight utility for javascript that simplifies error handling for both synchronous and asynchronous functions. inspired by the [safe assignment operator proposal](https://github.com/arthurfiorette/proposal-safe-assignment-operator), this utility allows for graceful error management by returning a tuple of the result and error, making it easy to handle various error types.
3
+ safe-wrapper is a lightweight utility for javascript that simplifies error handling for both synchronous and asynchronous functions. inspired by the [safe assignment operator proposal](https://github.com/arthurfiorette/proposal-safe-assignment-operator), this utility allows for graceful error management by wrapping functions in a way that enables error handling without the need for explicit `try-catch` blocks.
4
+
5
+ #### Features
6
+
7
+ - handles synchronous and asynchronous functions.
8
+ - supports specifying error types to control which errors are caught and handled.
9
+ - returns consistent responses in `[error, result]` format where error is null if no error occurred.
4
10
 
5
11
  #### Installation
6
12
 
@@ -10,98 +16,97 @@ npm install safe-wrapper
10
16
 
11
17
  #### Usage
12
18
 
13
- import `safe` from `safe-wrapper` to use it with any function. it takes the result of a function as its first argument and an optional array of `error types` to catch as the second argument. the function returns an array `[error, result]`, where `error` is an instance of the specified error type or `null` if successful, and `result` is the result of the function when there is no error.
19
+ import `safe` from `safe-wrapper` to use it with any function.
14
20
 
15
- #### synchronous example
21
+ the `safe` function takes a target function (synchronous or asynchronous) and returns a function which handles errors and returns a response in a consistent way. the function returns an array `[error, result]`, where `error` is an instance of the specified error type or `null` if successful, and `result` is the result of the function when there is no error.
16
22
 
17
- in this example, we handle a synchronous function that may return an error.
23
+ #### directly wrapping functions
24
+
25
+ we can directly wrap any function definition with safe.
18
26
 
19
27
  ```javascript
20
28
  import { safe } from 'safe-wrapper';
21
29
 
22
- const sync = () => {
23
- return new Error('sync error occurred');
24
- }
30
+ const safeSync = safe((args) => {
31
+ throw new Error('sync error occurred');
32
+ });
25
33
 
26
- const [error, result] = safe(sync());
27
-
28
- if (error) {
29
- return handle(error);
30
- }
34
+ const safeAsync = safe(async (args) => {
35
+ throw new Error('async error occurred');
36
+ });
31
37
 
32
- return handle(result);
38
+ const [error, result] = await safeAsync(args);
33
39
  ```
34
40
 
35
- #### synchronous example with error type check
41
+ #### wrapping existing functions
36
42
 
37
- we can specify error types to catch specific errors. if an unknown error type occurs, it will be thrown instead.
43
+ safe can be applied to pre-existing functions, including ones from third-party libraries.
38
44
 
39
45
  ```javascript
40
46
  import { safe } from 'safe-wrapper';
41
47
 
42
- const sync = () => {
43
- return new TypeError('sync type error occurred');
48
+ const sync = (args) => {
49
+ throw new Error('sync error occurred');
44
50
  }
45
51
 
46
- const [error, result] = safe(sync(), [TypeError]);
47
-
48
- if (error) {
49
- return handle(error);
50
- }
51
-
52
- return handle(result);
52
+ const safeSync = safe(sync);
53
+ const [error, result] = safeSync(args);
53
54
  ```
54
55
 
55
- #### asynchronous example
56
+ #### handling specific error types
56
57
 
57
- in this example, we handle a synchronous function that may throw an error.
58
+ we can specify error types to catch, allowing other errors to throw.
58
59
 
59
60
  ```javascript
60
61
  import { safe } from 'safe-wrapper';
61
62
 
62
- const async = () => {
63
- throw new Error('async error occurred');
64
- }
65
-
66
- const [error, result] = await safe(async());
67
-
68
- if (error) {
69
- return handle(error);
70
- }
63
+ const safeAsync = safe(async (args) => {
64
+ throw new TypeError('async type error occurred');
65
+ }, [TypeError]);
71
66
 
72
- return handle(result);
67
+ const [error, result] = await safeAsync(args);
73
68
  ```
74
69
 
75
- #### asynchronous example with error type check
70
+ #### handling multiple error types
76
71
 
77
- we can specify error types with asynchronous functions as well.
72
+ we can specify multiple error types when wrapping a function, enabling safe to catch any of the specified errors.
78
73
 
79
74
  ```javascript
80
75
  import { safe } from 'safe-wrapper';
81
76
 
82
- const async = () => {
83
- throw new TypeError('async type error occurred');
77
+ const sync = (args) => {
78
+ if (args) {
79
+ throw new TypeError('sync type error occurred');
80
+ } else {
81
+ throw new RangeError('sync range error occurred');
82
+ }
84
83
  }
85
84
 
86
- const [error, result] = await safe(async(), [TypeError]);
85
+ const safeSync = safe(sync, [TypeError, RangeError]);
86
+ const [error, result] = safeSync(args);
87
+ ```
87
88
 
88
- if (error) {
89
- return handle(error);
90
- }
89
+ #### wrapping built-in functions
91
90
 
92
- return handle(result);
93
- ```
91
+ we can also wrap built-in functions, like `JSON.parse`, `Object.keys`, and more.
94
92
 
95
- #### Important Notes
96
- - async operations: should throw errors when they fail.
97
- - sync operations: should return errors instead of throwing them.
93
+ ```javascript
94
+ import { safe } from 'safe-wrapper';
95
+
96
+ const safeJsonParse = safe(JSON.parse);
97
+ const [error, result] = safeJsonParse('invalid_json');
98
98
 
99
- #### API
99
+ const [error, result] = safe(Object.keys, [TypeError])(null);
100
+ ```
101
+
102
+ #### API Reference
100
103
 
101
- ```safe(response, types)```
104
+ `safe(action, types)`
102
105
  - parameters
103
- - response (any): result of the function call, either synchronous or asynchronous.
104
- - types (array, optional): an array of error types to catch specifically. if an error does not match any of these types, it will be thrown.
106
+ - action (function): function to be wrapped. it can either be synchronous or asynchronous.
107
+ - types (array, optional): an array of error types to catch. if no types are specified, all errors are caught.
105
108
  - returns `[error, result]`
106
- - error (error | null): the error caught from the function, if any.
107
- - result (any): the result of the function, if no error occurs.
109
+ - error (error | null): the error object if error occurred, otherwise null.
110
+ - result (any): the result of the action function if no error occurred, otherwise null.
111
+
112
+ this structure keeps it concise, approachable, and clear for all levels of users.
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var r=(n,t)=>{for(var u in t)c(n,u,{get:t[u],enumerable:!0})},g=(n,t,u,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of h(t))!o.call(n,l)&&l!==u&&c(n,l,{get:()=>t[l],enumerable:!(f=a(t,l))||f.enumerable});return n};var m=n=>g(c({},"__esModule",{value:!0}),n);var w={};r(w,{safe:()=>e});module.exports=m(w);var i=(n,t=[])=>{if(!t.length)return[n,null];if(t.some(u=>n instanceof u))return[n,null];throw n},e=(n,t=[])=>n instanceof Promise?n.then(u=>[null,u]).catch(u=>i(u,t)):n instanceof Error?i(n,t):[null,n];
1
+ "use strict";var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var f=(t,n)=>{for(var r in n)o(t,r,{get:n[r],enumerable:!0})},i=(t,n,r,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of a(n))!h.call(t,c)&&c!==r&&o(t,c,{get:()=>n[c],enumerable:!(e=l(n,c))||e.enumerable});return t};var b=t=>i(o({},"__esModule",{value:!0}),t);var m={};f(m,{safe:()=>g});module.exports=b(m);var s=({error:t=null,data:n=null,result:r=null})=>[t,r||n],u=(t,n=[])=>{if(!n.length||n.some(e=>t instanceof e))return s({error:t});throw t},g=(t,n=[])=>(...r)=>{try{let e=t(...r);return e instanceof Promise?e.then(c=>s({data:c})).catch(c=>u(c,n)):s({result:e})}catch(e){return u(e,n)}};
package/lib/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  /**
2
- * safely executes the result of a function or a promise and handles any errors that occur.
3
- *
4
- * @param {any} response - the result of a synchronous or asynchronous function, or a promise to execute.
5
- * @param {Array<ErrorConstructor>} [types=[]] - an optional array of error classes to check against.
6
- * @returns {Promise<[null, any]|[Error, null]>|[null, any]|[Error, null]} - returns an array where the first element is null if successful, or an error if it fails. if the input is a promise, it resolves to that array; otherwise, it returns the array directly.
2
+ * safely executes a synchronous or asynchronous action, handles any errors that occur and returns the result in a consistent response structure.
3
+ * @param {Function} action - the function to be wrapped, which can either be synchronous or asynchronous.
4
+ * @param {Array<ErrorConstructor>} [types = []] - an optional array of error types to check against.
5
+ * @returns {Promise<[Error, null] | [null, any]> | [Error, null] | [null, any]} - a tuple where the first element is null, if the execution was successful, or an error object if an error occurred. the second element is the result of the action, if available.
7
6
  */
8
- export function safe(response: any, types?: ErrorConstructor[] | undefined): Promise<[null, any] | [Error, null]> | [null, any] | [Error, null];
7
+ export function safe(action: Function, types?: ErrorConstructor[] | undefined): Promise<[Error, null] | [null, any]> | [Error, null] | [null, any];
package/lib/index.mjs CHANGED
@@ -1 +1 @@
1
- var l=(n,t=[])=>{if(!t.length)return[n,null];if(t.some(u=>n instanceof u))return[n,null];throw n},c=(n,t=[])=>n instanceof Promise?n.then(u=>[null,u]).catch(u=>l(u,t)):n instanceof Error?l(n,t):[null,n];export{c as safe};
1
+ var o=({error:n=null,data:t=null,result:r=null})=>[n,r||t],s=(n,t=[])=>{if(!t.length||t.some(e=>n instanceof e))return o({error:n});throw n},u=(n,t=[])=>(...r)=>{try{let e=n(...r);return e instanceof Promise?e.then(c=>o({data:c})).catch(c=>s(c,t)):o({result:e})}catch(e){return s(e,t)}};export{u as safe};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safe-wrapper",
3
- "version": "1.0.6",
3
+ "version": "2.0.0",
4
4
  "description": "a js-util for safely wrapping synchronous and asynchronous functions to handle errors based on specified types.",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
@@ -10,8 +10,7 @@
10
10
  "build": "rm -rf lib && node esbuild.config.js",
11
11
  "ci": "npm install --clean-install && npm test && npm run build",
12
12
  "start": "node src/index.js",
13
- "test": "node --test",
14
- "publish": "npm publish --access public"
13
+ "test": "node --test"
15
14
  },
16
15
  "exports": {
17
16
  ".": {
@@ -41,4 +40,4 @@
41
40
  "esbuild": "^0.24.0",
42
41
  "typescript": "^5.6.3"
43
42
  }
44
- }
43
+ }
@@ -1,453 +0,0 @@
1
- {
2
- "name": "safe-wrapper",
3
- "version": "1.0.0",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "safe-wrapper",
9
- "version": "1.0.0",
10
- "license": "MIT",
11
- "devDependencies": {
12
- "esbuild": "^0.24.0",
13
- "typescript": "^5.6.3"
14
- }
15
- },
16
- "node_modules/@esbuild/aix-ppc64": {
17
- "version": "0.24.0",
18
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz",
19
- "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==",
20
- "cpu": [
21
- "ppc64"
22
- ],
23
- "dev": true,
24
- "optional": true,
25
- "os": [
26
- "aix"
27
- ],
28
- "engines": {
29
- "node": ">=18"
30
- }
31
- },
32
- "node_modules/@esbuild/android-arm": {
33
- "version": "0.24.0",
34
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz",
35
- "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==",
36
- "cpu": [
37
- "arm"
38
- ],
39
- "dev": true,
40
- "optional": true,
41
- "os": [
42
- "android"
43
- ],
44
- "engines": {
45
- "node": ">=18"
46
- }
47
- },
48
- "node_modules/@esbuild/android-arm64": {
49
- "version": "0.24.0",
50
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz",
51
- "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==",
52
- "cpu": [
53
- "arm64"
54
- ],
55
- "dev": true,
56
- "optional": true,
57
- "os": [
58
- "android"
59
- ],
60
- "engines": {
61
- "node": ">=18"
62
- }
63
- },
64
- "node_modules/@esbuild/android-x64": {
65
- "version": "0.24.0",
66
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz",
67
- "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==",
68
- "cpu": [
69
- "x64"
70
- ],
71
- "dev": true,
72
- "optional": true,
73
- "os": [
74
- "android"
75
- ],
76
- "engines": {
77
- "node": ">=18"
78
- }
79
- },
80
- "node_modules/@esbuild/darwin-arm64": {
81
- "version": "0.24.0",
82
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz",
83
- "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==",
84
- "cpu": [
85
- "arm64"
86
- ],
87
- "dev": true,
88
- "optional": true,
89
- "os": [
90
- "darwin"
91
- ],
92
- "engines": {
93
- "node": ">=18"
94
- }
95
- },
96
- "node_modules/@esbuild/darwin-x64": {
97
- "version": "0.24.0",
98
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz",
99
- "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==",
100
- "cpu": [
101
- "x64"
102
- ],
103
- "dev": true,
104
- "optional": true,
105
- "os": [
106
- "darwin"
107
- ],
108
- "engines": {
109
- "node": ">=18"
110
- }
111
- },
112
- "node_modules/@esbuild/freebsd-arm64": {
113
- "version": "0.24.0",
114
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz",
115
- "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==",
116
- "cpu": [
117
- "arm64"
118
- ],
119
- "dev": true,
120
- "optional": true,
121
- "os": [
122
- "freebsd"
123
- ],
124
- "engines": {
125
- "node": ">=18"
126
- }
127
- },
128
- "node_modules/@esbuild/freebsd-x64": {
129
- "version": "0.24.0",
130
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz",
131
- "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==",
132
- "cpu": [
133
- "x64"
134
- ],
135
- "dev": true,
136
- "optional": true,
137
- "os": [
138
- "freebsd"
139
- ],
140
- "engines": {
141
- "node": ">=18"
142
- }
143
- },
144
- "node_modules/@esbuild/linux-arm": {
145
- "version": "0.24.0",
146
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz",
147
- "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==",
148
- "cpu": [
149
- "arm"
150
- ],
151
- "dev": true,
152
- "optional": true,
153
- "os": [
154
- "linux"
155
- ],
156
- "engines": {
157
- "node": ">=18"
158
- }
159
- },
160
- "node_modules/@esbuild/linux-arm64": {
161
- "version": "0.24.0",
162
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz",
163
- "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==",
164
- "cpu": [
165
- "arm64"
166
- ],
167
- "dev": true,
168
- "optional": true,
169
- "os": [
170
- "linux"
171
- ],
172
- "engines": {
173
- "node": ">=18"
174
- }
175
- },
176
- "node_modules/@esbuild/linux-ia32": {
177
- "version": "0.24.0",
178
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz",
179
- "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==",
180
- "cpu": [
181
- "ia32"
182
- ],
183
- "dev": true,
184
- "optional": true,
185
- "os": [
186
- "linux"
187
- ],
188
- "engines": {
189
- "node": ">=18"
190
- }
191
- },
192
- "node_modules/@esbuild/linux-loong64": {
193
- "version": "0.24.0",
194
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz",
195
- "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==",
196
- "cpu": [
197
- "loong64"
198
- ],
199
- "dev": true,
200
- "optional": true,
201
- "os": [
202
- "linux"
203
- ],
204
- "engines": {
205
- "node": ">=18"
206
- }
207
- },
208
- "node_modules/@esbuild/linux-mips64el": {
209
- "version": "0.24.0",
210
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz",
211
- "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==",
212
- "cpu": [
213
- "mips64el"
214
- ],
215
- "dev": true,
216
- "optional": true,
217
- "os": [
218
- "linux"
219
- ],
220
- "engines": {
221
- "node": ">=18"
222
- }
223
- },
224
- "node_modules/@esbuild/linux-ppc64": {
225
- "version": "0.24.0",
226
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz",
227
- "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==",
228
- "cpu": [
229
- "ppc64"
230
- ],
231
- "dev": true,
232
- "optional": true,
233
- "os": [
234
- "linux"
235
- ],
236
- "engines": {
237
- "node": ">=18"
238
- }
239
- },
240
- "node_modules/@esbuild/linux-riscv64": {
241
- "version": "0.24.0",
242
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz",
243
- "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==",
244
- "cpu": [
245
- "riscv64"
246
- ],
247
- "dev": true,
248
- "optional": true,
249
- "os": [
250
- "linux"
251
- ],
252
- "engines": {
253
- "node": ">=18"
254
- }
255
- },
256
- "node_modules/@esbuild/linux-s390x": {
257
- "version": "0.24.0",
258
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz",
259
- "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==",
260
- "cpu": [
261
- "s390x"
262
- ],
263
- "dev": true,
264
- "optional": true,
265
- "os": [
266
- "linux"
267
- ],
268
- "engines": {
269
- "node": ">=18"
270
- }
271
- },
272
- "node_modules/@esbuild/linux-x64": {
273
- "version": "0.24.0",
274
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz",
275
- "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==",
276
- "cpu": [
277
- "x64"
278
- ],
279
- "dev": true,
280
- "optional": true,
281
- "os": [
282
- "linux"
283
- ],
284
- "engines": {
285
- "node": ">=18"
286
- }
287
- },
288
- "node_modules/@esbuild/netbsd-x64": {
289
- "version": "0.24.0",
290
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz",
291
- "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==",
292
- "cpu": [
293
- "x64"
294
- ],
295
- "dev": true,
296
- "optional": true,
297
- "os": [
298
- "netbsd"
299
- ],
300
- "engines": {
301
- "node": ">=18"
302
- }
303
- },
304
- "node_modules/@esbuild/openbsd-arm64": {
305
- "version": "0.24.0",
306
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz",
307
- "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==",
308
- "cpu": [
309
- "arm64"
310
- ],
311
- "dev": true,
312
- "optional": true,
313
- "os": [
314
- "openbsd"
315
- ],
316
- "engines": {
317
- "node": ">=18"
318
- }
319
- },
320
- "node_modules/@esbuild/openbsd-x64": {
321
- "version": "0.24.0",
322
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz",
323
- "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==",
324
- "cpu": [
325
- "x64"
326
- ],
327
- "dev": true,
328
- "optional": true,
329
- "os": [
330
- "openbsd"
331
- ],
332
- "engines": {
333
- "node": ">=18"
334
- }
335
- },
336
- "node_modules/@esbuild/sunos-x64": {
337
- "version": "0.24.0",
338
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz",
339
- "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==",
340
- "cpu": [
341
- "x64"
342
- ],
343
- "dev": true,
344
- "optional": true,
345
- "os": [
346
- "sunos"
347
- ],
348
- "engines": {
349
- "node": ">=18"
350
- }
351
- },
352
- "node_modules/@esbuild/win32-arm64": {
353
- "version": "0.24.0",
354
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz",
355
- "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==",
356
- "cpu": [
357
- "arm64"
358
- ],
359
- "dev": true,
360
- "optional": true,
361
- "os": [
362
- "win32"
363
- ],
364
- "engines": {
365
- "node": ">=18"
366
- }
367
- },
368
- "node_modules/@esbuild/win32-ia32": {
369
- "version": "0.24.0",
370
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz",
371
- "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==",
372
- "cpu": [
373
- "ia32"
374
- ],
375
- "dev": true,
376
- "optional": true,
377
- "os": [
378
- "win32"
379
- ],
380
- "engines": {
381
- "node": ">=18"
382
- }
383
- },
384
- "node_modules/@esbuild/win32-x64": {
385
- "version": "0.24.0",
386
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz",
387
- "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==",
388
- "cpu": [
389
- "x64"
390
- ],
391
- "dev": true,
392
- "optional": true,
393
- "os": [
394
- "win32"
395
- ],
396
- "engines": {
397
- "node": ">=18"
398
- }
399
- },
400
- "node_modules/esbuild": {
401
- "version": "0.24.0",
402
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz",
403
- "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==",
404
- "dev": true,
405
- "hasInstallScript": true,
406
- "bin": {
407
- "esbuild": "bin/esbuild"
408
- },
409
- "engines": {
410
- "node": ">=18"
411
- },
412
- "optionalDependencies": {
413
- "@esbuild/aix-ppc64": "0.24.0",
414
- "@esbuild/android-arm": "0.24.0",
415
- "@esbuild/android-arm64": "0.24.0",
416
- "@esbuild/android-x64": "0.24.0",
417
- "@esbuild/darwin-arm64": "0.24.0",
418
- "@esbuild/darwin-x64": "0.24.0",
419
- "@esbuild/freebsd-arm64": "0.24.0",
420
- "@esbuild/freebsd-x64": "0.24.0",
421
- "@esbuild/linux-arm": "0.24.0",
422
- "@esbuild/linux-arm64": "0.24.0",
423
- "@esbuild/linux-ia32": "0.24.0",
424
- "@esbuild/linux-loong64": "0.24.0",
425
- "@esbuild/linux-mips64el": "0.24.0",
426
- "@esbuild/linux-ppc64": "0.24.0",
427
- "@esbuild/linux-riscv64": "0.24.0",
428
- "@esbuild/linux-s390x": "0.24.0",
429
- "@esbuild/linux-x64": "0.24.0",
430
- "@esbuild/netbsd-x64": "0.24.0",
431
- "@esbuild/openbsd-arm64": "0.24.0",
432
- "@esbuild/openbsd-x64": "0.24.0",
433
- "@esbuild/sunos-x64": "0.24.0",
434
- "@esbuild/win32-arm64": "0.24.0",
435
- "@esbuild/win32-ia32": "0.24.0",
436
- "@esbuild/win32-x64": "0.24.0"
437
- }
438
- },
439
- "node_modules/typescript": {
440
- "version": "5.6.3",
441
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
442
- "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
443
- "dev": true,
444
- "bin": {
445
- "tsc": "bin/tsc",
446
- "tsserver": "bin/tsserver"
447
- },
448
- "engines": {
449
- "node": ">=14.17"
450
- }
451
- }
452
- }
453
- }