@mouseless/baked 1.8.6 → 1.8.7

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
3
  "configKey": "baked",
4
- "version": "1.8.6",
4
+ "version": "1.8.7",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "3.6.1"
@@ -1,6 +1,7 @@
1
1
  import { useRuntimeConfig } from "#app";
2
2
  import { createError, useMutex } from "#imports";
3
3
  import { bfetch } from "../utils/bfetch.js";
4
+ import { Buffer } from "buffer";
4
5
 
5
6
  export default function() {
6
7
  const mutex = useMutex();
@@ -69,7 +70,7 @@ export default function() {
69
70
  function decode(value) {
70
71
  const { access } = JSON.parse(value);
71
72
 
72
- return JSON.parse(atob(access.split(".")[1]));
73
+ return JSON.parse(decodeBase64(access.split(".")[1]));
73
74
  }
74
75
 
75
76
  return {
@@ -94,7 +95,8 @@ function Token(tokenString) {
94
95
 
95
96
  function isExpired(token) {
96
97
  try {
97
- const claims = JSON.parse(atob(token.split(".")[1]));
98
+ const decoded = decodeBase64(token.split(".")[1]);
99
+ const claims = JSON.parse(decoded);
98
100
 
99
101
  return parseInt(claims.exp) * 1000 < Date.now();
100
102
  } catch {
@@ -110,3 +112,7 @@ function Token(tokenString) {
110
112
  refreshIsExpired
111
113
  };
112
114
  }
115
+
116
+ function decodeBase64(value) {
117
+ return Buffer.from(value, "base64").toString("utf8");
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mouseless/baked",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "Baked is an opinionated framework for .NET and Vue. This is the UI package of Baked project.",
5
5
  "keywords": [
6
6
  "baked",
@@ -48,6 +48,7 @@
48
48
  "@primeuix/themes": "2.0.3",
49
49
  "@tailwindcss/vite": "4.3.3",
50
50
  "async-mutex": "0.5.0",
51
+ "buffer": "6.0.3",
51
52
  "playwright": "1.61.1",
52
53
  "primeicons": "7.0.0",
53
54
  "primevue": "4.5.5",
@@ -61,7 +62,7 @@
61
62
  "@types/node": "26.1.1",
62
63
  "changelogen": "0.6.2",
63
64
  "nuxt": "4.5.2",
64
- "vitest": "4.1.10",
65
+ "vitest": "4.1.11",
65
66
  "vue-tsc": "3.3.7"
66
67
  },
67
68
  "optionalDependencies": {
@@ -80,4 +81,4 @@
80
81
  "overrides": {
81
82
  "vue-sfc-transformer": "0.2.5"
82
83
  }
83
- }
84
+ }