lenix 1.2.1 → 1.2.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/fetch/index.d.ts +2 -2
- package/dist/fetch/index.js +2 -2
- package/package.json +3 -2
package/dist/fetch/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param domain - domain of the URL (e.g. api.github.com)
|
|
3
|
-
* @param endpoint - endpoint of the URL (e.g.
|
|
3
|
+
* @param endpoint - endpoint of the URL (e.g. users/lenixdev)
|
|
4
4
|
* @param request - request options (e.g. { method: 'GET' })
|
|
5
5
|
*/
|
|
6
|
-
export declare const safeRequest: (domain: string, endpoint: string, request
|
|
6
|
+
export declare const safeRequest: (domain: string, endpoint: string, request?: RequestInit) => Promise<Response>;
|
package/dist/fetch/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param domain - domain of the URL (e.g. api.github.com)
|
|
3
|
-
* @param endpoint - endpoint of the URL (e.g.
|
|
3
|
+
* @param endpoint - endpoint of the URL (e.g. users/lenixdev)
|
|
4
4
|
* @param request - request options (e.g. { method: 'GET' })
|
|
5
5
|
*/
|
|
6
6
|
export const safeRequest = async (domain, endpoint, request) => {
|
|
@@ -11,6 +11,6 @@ export const safeRequest = async (domain, endpoint, request) => {
|
|
|
11
11
|
throw new Error('An error occurred while making the request.', { cause: error });
|
|
12
12
|
}
|
|
13
13
|
finally {
|
|
14
|
-
console.log(`End of ${domain}
|
|
14
|
+
console.log(`End of ${domain}/${endpoint} request`);
|
|
15
15
|
}
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lenix",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Helpful modules for the software engineers",
|
|
5
5
|
"author": "Lenix",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"lua",
|
|
12
12
|
"luarocks",
|
|
13
13
|
"fivem",
|
|
14
|
-
"fxmanifest"
|
|
14
|
+
"fxmanifest",
|
|
15
|
+
"api"
|
|
15
16
|
],
|
|
16
17
|
"repository": {
|
|
17
18
|
"type": "git",
|