@zauru-sdk/services 2.0.132 → 2.0.134

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.
@@ -31,9 +31,9 @@ export function createUpstashSessionStorage({ cookie }) {
31
31
  async createData(data, expires) {
32
32
  try {
33
33
  const id = crypto.randomUUID();
34
- await fetchWithRetriesAxios(`/set/${id}?EX=${MAX_AGE_SESSION_COOKIE}`, {
34
+ await fetchWithRetriesAxios(`${config.redisBaseURL}/set/${id}?EX=${MAX_AGE_SESSION_COOKIE}`, {
35
35
  method: "post",
36
- body: JSON.stringify({ data }),
36
+ body: data,
37
37
  headers,
38
38
  });
39
39
  return id;
@@ -45,7 +45,7 @@ export function createUpstashSessionStorage({ cookie }) {
45
45
  },
46
46
  async readData(id) {
47
47
  try {
48
- const response = await fetchWithRetriesAxios(`/get/${id}`, {
48
+ const response = await fetchWithRetriesAxios(`${config.redisBaseURL}/get/${id}`, {
49
49
  headers,
50
50
  });
51
51
  return response;
@@ -57,9 +57,9 @@ export function createUpstashSessionStorage({ cookie }) {
57
57
  },
58
58
  async updateData(id, data, expires) {
59
59
  try {
60
- await fetchWithRetriesAxios(`/set/${id}?EX=${MAX_AGE_SESSION_COOKIE}`, {
60
+ await fetchWithRetriesAxios(`${config.redisBaseURL}/set/${id}?EX=${MAX_AGE_SESSION_COOKIE}`, {
61
61
  method: "post",
62
- body: JSON.stringify({ data }),
62
+ body: data,
63
63
  headers,
64
64
  });
65
65
  }
@@ -69,7 +69,7 @@ export function createUpstashSessionStorage({ cookie }) {
69
69
  },
70
70
  async deleteData(id) {
71
71
  try {
72
- await fetchWithRetriesAxios(`/del/${id}`, {
72
+ await fetchWithRetriesAxios(`${config.redisBaseURL}/del/${id}`, {
73
73
  method: "post",
74
74
  headers,
75
75
  });
@@ -1,11 +1,9 @@
1
- import { config } from "@zauru-sdk/config";
2
1
  import axios from "axios";
3
2
  import http from "node:http";
4
3
  import https from "node:https";
5
4
  const httpAgent = new http.Agent({ keepAlive: true });
6
5
  const httpsAgent = new https.Agent({ keepAlive: true });
7
6
  export const httpUpstash = axios.create({
8
- baseURL: `${config.redisBaseURL}`,
9
7
  httpAgent,
10
8
  httpsAgent,
11
9
  timeout: 5000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.132",
3
+ "version": "2.0.134",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -31,5 +31,5 @@
31
31
  "axios": "^1.6.7",
32
32
  "chalk": "5.3.0"
33
33
  },
34
- "gitHead": "412237a4d0e5c0efee99bef52aa7fdcf0d0dbd11"
34
+ "gitHead": "8d30182cadd61ff479563736a31536380d58ef51"
35
35
  }