@zauru-sdk/services 2.0.142 → 2.0.143
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createSessionStorage } from "@remix-run/node";
|
|
2
2
|
import crypto from "crypto";
|
|
3
3
|
import { config } from "@zauru-sdk/config";
|
|
4
|
-
import fetch from "node-fetch";
|
|
5
4
|
const redisBaseURL = config.redisBaseURL;
|
|
6
5
|
const headers = {
|
|
7
6
|
Authorization: `Bearer ${config.redisToken}`,
|
|
@@ -46,10 +45,11 @@ export function createUpstashSessionStorage({ cookie }) {
|
|
|
46
45
|
});
|
|
47
46
|
try {
|
|
48
47
|
const { result } = (await response.json());
|
|
49
|
-
return JSON.parse(result)
|
|
48
|
+
return JSON.parse(result)?.data;
|
|
50
49
|
}
|
|
51
50
|
catch (error) {
|
|
52
|
-
|
|
51
|
+
console.error("Error al leer la sesión: ", error);
|
|
52
|
+
return {};
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
async updateData(id, data, expires) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function fetchWithRetries(url: string, config?: {}, retries?: number, backoff?: number): Promise<
|
|
1
|
+
export declare function fetchWithRetries(url: string, config?: {}, retries?: number, backoff?: number): Promise<Response | null>;
|
|
2
2
|
export declare function createUpstashSessionStorage({ cookie }: any): import("@remix-run/node").SessionStorage<import("@remix-run/node").SessionData, import("@remix-run/node").SessionData>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.143",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"chalk": "5.3.0",
|
|
33
33
|
"node-fetch": "^3.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "de97bb773cbc14801c39cec4640a860261a9c5e0"
|
|
36
36
|
}
|