ingeniuscliq-core 0.5.68 → 0.5.69

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 +1 @@
1
- {"version":3,"file":"axiosGlobal.d.ts","sourceRoot":"","sources":["../../src/helpers/axiosGlobal.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAA8B,MAAM,OAAO,CAAC;AAGzE,eAAO,IAAI,GAAG,EAAE,aAMd,CAAC;AAIH;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,IAqClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAWtE,CAAC;AAoBF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"axiosGlobal.d.ts","sourceRoot":"","sources":["../../src/helpers/axiosGlobal.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAA8B,MAAM,OAAO,CAAC;AAGzE,eAAO,IAAI,GAAG,EAAE,aAMd,CAAC;AAIH;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,IAqClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAYtE,CAAC;AAuBF,eAAe,GAAG,CAAC"}
@@ -39,6 +39,7 @@ const initAxiosConfigs = (baseURL) => {
39
39
  );
40
40
  };
41
41
  const ensureCsrfToken = async (baseURL) => {
42
+ console.log("Ensuring csrf token");
42
43
  if (!csrfTokenFetched) {
43
44
  try {
44
45
  await api.get(`${baseURL}/sanctum/csrf-cookie`);
@@ -51,10 +52,13 @@ const ensureCsrfToken = async (baseURL) => {
51
52
  return true;
52
53
  };
53
54
  const attachCsrfToken = (config) => {
55
+ console.log("Attaching");
56
+ console.log(document.cookie, "document cookie");
54
57
  const xsrfCookie = document.cookie.split("; ").find((cookie) => cookie.startsWith("XSRF-TOKEN="));
55
58
  if (xsrfCookie) {
56
59
  const token = xsrfCookie.split("=")[1];
57
60
  const decodedToken = decodeURIComponent(token);
61
+ console.log(config.headers, "config-headers");
58
62
  if (config.headers) {
59
63
  config.headers["X-XSRF-TOKEN"] = decodedToken;
60
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.5.68",
3
+ "version": "0.5.69",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",