@zauru-sdk/services 2.6.0 → 2.8.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/dist/esm/common.js
CHANGED
|
@@ -215,7 +215,9 @@ export async function getVariablesByName(headers, session, names) {
|
|
|
215
215
|
if (response.error) {
|
|
216
216
|
throw new Error(`${response.userMsg} - ${response.msg}`);
|
|
217
217
|
}
|
|
218
|
-
session.set("variables", response.data)
|
|
218
|
+
session.set("variables", response.data?.map((x) => {
|
|
219
|
+
return { id: x.id, name: x.name, value: x.value };
|
|
220
|
+
}));
|
|
219
221
|
await commitSession(session);
|
|
220
222
|
variables = response.data ?? [];
|
|
221
223
|
}
|
|
@@ -35,7 +35,8 @@ export function createUpstashSessionStorage({ cookie }) {
|
|
|
35
35
|
return createSessionStorage({
|
|
36
36
|
cookie,
|
|
37
37
|
async createData(data, expires) {
|
|
38
|
-
const id = `${data?.selectedEntity}-${data?.
|
|
38
|
+
const id = `${data?.selectedEntity ?? "api"}-${data?.username}-${crypto.randomUUID()}`;
|
|
39
|
+
console.log("Creando sesión --->: ", id);
|
|
39
40
|
await fetchWithRetries(`${redisBaseURL}/set/${id}?EX=${expires ? expiresToSeconds(expires) : 60 * 60 * 8}`, {
|
|
40
41
|
method: "post",
|
|
41
42
|
data: { data },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
27
|
"@upstash/redis": "^1.34.5",
|
|
28
|
-
"@zauru-sdk/common": "^2.
|
|
28
|
+
"@zauru-sdk/common": "^2.7.0",
|
|
29
29
|
"@zauru-sdk/config": "^2.0.220",
|
|
30
30
|
"@zauru-sdk/graphql": "^2.4.0",
|
|
31
|
-
"@zauru-sdk/types": "^2.
|
|
31
|
+
"@zauru-sdk/types": "^2.7.0",
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "35b18e9cc461d742a9bf00d898f9398b862c8c7e"
|
|
36
36
|
}
|