@moonbase.sh/vue 0.3.0 → 0.3.3

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/index.cjs CHANGED
@@ -273,8 +273,10 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
273
273
  try {
274
274
  this.currentUser.value = await this.client.identity.get();
275
275
  } catch (err) {
276
- if (!(err instanceof import_storefront_api2.NotAuthenticatedError))
276
+ if (!(err instanceof import_storefront_api2.NotAuthenticatedError)) {
277
277
  console.error("Could not load user", err);
278
+ }
279
+ this.currentUser.value = null;
278
280
  } finally {
279
281
  this.loadedUser.value = true;
280
282
  }
@@ -321,6 +323,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
321
323
  case import_tokenStore.TokenStore.storageKey:
322
324
  if (!event.newValue) {
323
325
  this.currentUser.value = null;
326
+ console.warn("User was removed");
327
+ } else {
328
+ console.warn("User was updated", event.newValue);
324
329
  }
325
330
  }
326
331
  }
package/dist/index.js CHANGED
@@ -241,8 +241,10 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
241
241
  try {
242
242
  this.currentUser.value = await this.client.identity.get();
243
243
  } catch (err) {
244
- if (!(err instanceof NotAuthenticatedError))
244
+ if (!(err instanceof NotAuthenticatedError)) {
245
245
  console.error("Could not load user", err);
246
+ }
247
+ this.currentUser.value = null;
246
248
  } finally {
247
249
  this.loadedUser.value = true;
248
250
  }
@@ -289,6 +291,9 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
289
291
  case TokenStore.storageKey:
290
292
  if (!event.newValue) {
291
293
  this.currentUser.value = null;
294
+ console.warn("User was removed");
295
+ } else {
296
+ console.warn("User was updated", event.newValue);
292
297
  }
293
298
  }
294
299
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/vue",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.3.3",
5
5
  "description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "@vue/devtools-api": "^6.6.3",
20
20
  "uuid": "^9.0.1",
21
21
  "zod": "^3.23.8",
22
- "@moonbase.sh/storefront-api": "0.3.0"
22
+ "@moonbase.sh/storefront-api": "0.3.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/uuid": "^9.0.8",