@moonbase.sh/vue 0.3.3 → 0.3.4
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 +2 -4
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -41,8 +41,6 @@ var import_vue13 = require("vue");
|
|
|
41
41
|
|
|
42
42
|
// src/context.ts
|
|
43
43
|
var import_storefront_api2 = require("@moonbase.sh/storefront-api");
|
|
44
|
-
var import_schemas = require("@moonbase.sh/storefront-api/src/identity/schemas");
|
|
45
|
-
var import_tokenStore = require("@moonbase.sh/storefront-api/src/utils/tokenStore");
|
|
46
44
|
var import_uuid = require("uuid");
|
|
47
45
|
var import_vue = require("vue");
|
|
48
46
|
|
|
@@ -210,7 +208,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
210
208
|
this.loadedStorefront = stateFactory(`${_StorefrontContextImpl.storefrontKey}_loaded`, false);
|
|
211
209
|
}
|
|
212
210
|
if (this.client.tokenStore.hasAccessToken) {
|
|
213
|
-
this.currentUser.value =
|
|
211
|
+
this.currentUser.value = import_storefront_api2.schemas.identity.userSchema.parse(this.client.tokenStore.user);
|
|
214
212
|
}
|
|
215
213
|
this.updateStorefront();
|
|
216
214
|
this.updateUser();
|
|
@@ -320,7 +318,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
320
318
|
case _StorefrontContextImpl.utmKey:
|
|
321
319
|
this.utm.value = JSON.parse(event.newValue);
|
|
322
320
|
break;
|
|
323
|
-
case
|
|
321
|
+
case import_storefront_api2.TokenStore.storageKey:
|
|
324
322
|
if (!event.newValue) {
|
|
325
323
|
this.currentUser.value = null;
|
|
326
324
|
console.warn("User was removed");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
|
|
2
|
-
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, CompletedOrder, ActivationRequest, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
2
|
+
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
3
3
|
export * from '@moonbase.sh/storefront-api';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
5
|
import { Plugin, Ref, App, UnwrapRef, InjectionKey } from 'vue';
|
|
6
|
-
import { Address } from '@moonbase.sh/storefront-api/src';
|
|
7
6
|
|
|
8
7
|
interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
9
8
|
configuration: MoonbaseConfiguration;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
|
|
2
|
-
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, CompletedOrder, ActivationRequest, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
2
|
+
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
3
3
|
export * from '@moonbase.sh/storefront-api';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
5
|
import { Plugin, Ref, App, UnwrapRef, InjectionKey } from 'vue';
|
|
6
|
-
import { Address } from '@moonbase.sh/storefront-api/src';
|
|
7
6
|
|
|
8
7
|
interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
9
8
|
configuration: MoonbaseConfiguration;
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
NotAuthenticatedError,
|
|
8
8
|
NotAuthorizedError,
|
|
9
9
|
NotFoundError,
|
|
10
|
-
OrderStatus
|
|
10
|
+
OrderStatus,
|
|
11
|
+
schemas as schemas2,
|
|
12
|
+
TokenStore
|
|
11
13
|
} from "@moonbase.sh/storefront-api";
|
|
12
|
-
import { userSchema } from "@moonbase.sh/storefront-api/src/identity/schemas";
|
|
13
|
-
import { TokenStore } from "@moonbase.sh/storefront-api/src/utils/tokenStore";
|
|
14
14
|
import { v4 as uuidv4 } from "uuid";
|
|
15
15
|
import { ref, watch } from "vue";
|
|
16
16
|
|
|
@@ -178,7 +178,7 @@ var _StorefrontContextImpl = class _StorefrontContextImpl {
|
|
|
178
178
|
this.loadedStorefront = stateFactory(`${_StorefrontContextImpl.storefrontKey}_loaded`, false);
|
|
179
179
|
}
|
|
180
180
|
if (this.client.tokenStore.hasAccessToken) {
|
|
181
|
-
this.currentUser.value = userSchema.parse(this.client.tokenStore.user);
|
|
181
|
+
this.currentUser.value = schemas2.identity.userSchema.parse(this.client.tokenStore.user);
|
|
182
182
|
}
|
|
183
183
|
this.updateStorefront();
|
|
184
184
|
this.updateUser();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
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.
|
|
22
|
+
"@moonbase.sh/storefront-api": "0.3.4"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/uuid": "^9.0.8",
|