@scayle/storefront-nuxt 7.94.6 → 7.95.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.95.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Move test factories to separate entry point. They are now available via `@scayle/storefront-nuxt/dist/test/factories` (or `@scayle/storefront-nuxt/test/factories` when `moduleResolution` is set to `Bundler`.
8
+
9
+ The location of the test factories within the `@scayle/storefront-nuxt` entry point unintentionally caused them to be included in the client build. This resulted in an error because the client build attempted to import the default export of `lodash.mergewith`, which is not available.
10
+
11
+ ### Patch Changes
12
+
13
+ **Dependencies**
14
+
15
+ - Updated dependency to @scayle/storefront-core@7.69.0
16
+
17
+ ## 7.94.7
18
+
19
+ ### Patch Changes
20
+
21
+ **Dependencies**
22
+
23
+ - Updated dependency to @scayle/storefront-core@7.68.0
24
+
3
25
  ## 7.94.6
4
26
 
5
27
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,33 +1,15 @@
1
- import { M as ModuleBaseOptions, f as ShopConfig } from './shared/storefront-nuxt.80aa5060.mjs';
2
- export { e as AdditionalShopConfig, A as AppKeys, B as BapiConfig, i as CheckoutEvent, C as CheckoutShopConfig, j as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, d as SapiConfig, a as SessionConfig, g as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, h as StorefrontConfig } from './shared/storefront-nuxt.80aa5060.mjs';
1
+ export { e as AdditionalShopConfig, A as AppKeys, B as BapiConfig, i as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, j as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, d as SapiConfig, a as SessionConfig, f as ShopConfig, g as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, h as StorefrontConfig } from './shared/storefront-nuxt.80aa5060.mjs';
3
2
  export { rpcCall } from '../dist/runtime/rpc/rpcCall.js';
4
3
  export { extendPromise } from '../dist/runtime/utils/promise.js';
5
4
  export * from '../dist/runtime/utils/seo.js';
6
- import { Factory } from 'fishery';
7
- import { RpcContext } from '@scayle/storefront-core';
8
5
  export * from '@scayle/storefront-core';
9
6
  export { LogLevel } from '@scayle/storefront-core';
10
- import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
11
7
  export { unwrap } from '@scayle/storefront-core/dist/utils/response';
12
8
  import '@scayle/unstorage-compression-driver';
13
9
  import 'unstorage';
14
10
  import '../dist/runtime/utils/zodSchema.js';
15
11
  import '@nuxt/schema';
16
12
 
17
- interface ModuleOptionsFactoryParams {
18
- shops: ShopConfig[];
19
- }
20
- declare const moduleOptionsFactory: Factory<ModuleBaseOptions, ModuleOptionsFactoryParams, ModuleBaseOptions>;
21
-
22
- declare const shopConfigFactory: Factory<ShopConfig, any, ShopConfig>;
23
-
24
- interface RpcContextFactoryParams {
25
- isLoggedIn: boolean;
26
- }
27
- declare const rpcContextFactory: Factory<RpcContext, RpcContextFactoryParams, RpcContext>;
28
-
29
- declare const routeFactory: Factory<RouteLocationNormalizedLoadedGeneric, any, RouteLocationNormalizedLoadedGeneric>;
30
-
31
13
  interface RpcMethodsStorefront {
32
14
  }
33
15
  declare module '@scayle/storefront-core' {
@@ -35,4 +17,4 @@ declare module '@scayle/storefront-core' {
35
17
  }
36
18
  }
37
19
 
38
- export { ModuleBaseOptions, type RpcMethodsStorefront, ShopConfig, moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
20
+ export type { RpcMethodsStorefront };
package/dist/index.d.ts CHANGED
@@ -1,33 +1,15 @@
1
- import { M as ModuleBaseOptions, f as ShopConfig } from './shared/storefront-nuxt.80aa5060.js';
2
- export { e as AdditionalShopConfig, A as AppKeys, B as BapiConfig, i as CheckoutEvent, C as CheckoutShopConfig, j as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, d as SapiConfig, a as SessionConfig, g as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, h as StorefrontConfig } from './shared/storefront-nuxt.80aa5060.js';
1
+ export { e as AdditionalShopConfig, A as AppKeys, B as BapiConfig, i as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, j as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, d as SapiConfig, a as SessionConfig, f as ShopConfig, g as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, h as StorefrontConfig } from './shared/storefront-nuxt.80aa5060.js';
3
2
  export { rpcCall } from '../dist/runtime/rpc/rpcCall.js';
4
3
  export { extendPromise } from '../dist/runtime/utils/promise.js';
5
4
  export * from '../dist/runtime/utils/seo.js';
6
- import { Factory } from 'fishery';
7
- import { RpcContext } from '@scayle/storefront-core';
8
5
  export * from '@scayle/storefront-core';
9
6
  export { LogLevel } from '@scayle/storefront-core';
10
- import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
11
7
  export { unwrap } from '@scayle/storefront-core/dist/utils/response';
12
8
  import '@scayle/unstorage-compression-driver';
13
9
  import 'unstorage';
14
10
  import '../dist/runtime/utils/zodSchema.js';
15
11
  import '@nuxt/schema';
16
12
 
17
- interface ModuleOptionsFactoryParams {
18
- shops: ShopConfig[];
19
- }
20
- declare const moduleOptionsFactory: Factory<ModuleBaseOptions, ModuleOptionsFactoryParams, ModuleBaseOptions>;
21
-
22
- declare const shopConfigFactory: Factory<ShopConfig, any, ShopConfig>;
23
-
24
- interface RpcContextFactoryParams {
25
- isLoggedIn: boolean;
26
- }
27
- declare const rpcContextFactory: Factory<RpcContext, RpcContextFactoryParams, RpcContext>;
28
-
29
- declare const routeFactory: Factory<RouteLocationNormalizedLoadedGeneric, any, RouteLocationNormalizedLoadedGeneric>;
30
-
31
13
  interface RpcMethodsStorefront {
32
14
  }
33
15
  declare module '@scayle/storefront-core' {
@@ -35,4 +17,4 @@ declare module '@scayle/storefront-core' {
35
17
  }
36
18
  }
37
19
 
38
- export { ModuleBaseOptions, type RpcMethodsStorefront, ShopConfig, moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
20
+ export type { RpcMethodsStorefront };
package/dist/index.mjs CHANGED
@@ -1,120 +1,5 @@
1
1
  export { rpcCall } from '../dist/runtime/rpc/rpcCall.js';
2
2
  export { extendPromise } from '../dist/runtime/utils/promise.js';
3
3
  export * from '../dist/runtime/utils/seo.js';
4
- import { HashAlgorithm, StorefrontAPIClient, Log } from '@scayle/storefront-core';
5
4
  export * from '@scayle/storefront-core';
6
5
  export { unwrap } from '@scayle/storefront-core/dist/utils/response';
7
- import { Factory } from 'fishery';
8
-
9
- const moduleOptionsFactory = Factory.define(({ transientParams }) => {
10
- return {
11
- sapi: {
12
- host: "sapiHost",
13
- token: "sapiToken"
14
- },
15
- oauth: {
16
- apiHost: "oauthHost",
17
- clientId: "clientId",
18
- clientSecret: "clientSecret"
19
- },
20
- appKeys: {
21
- basketKey: "basketKey",
22
- wishlistKey: "wishlistKey",
23
- hashAlgorithm: HashAlgorithm.MD5
24
- },
25
- shopSelector: "path",
26
- shops: (transientParams?.shops || []).reduce((acc, curr) => {
27
- return {
28
- [curr.shopId]: curr,
29
- ...acc
30
- };
31
- }, {})
32
- };
33
- });
34
-
35
- const shopConfigFactory = Factory.define(() => {
36
- return {
37
- shopId: 1,
38
- domain: "localhost",
39
- locale: "en-US",
40
- currency: "USD",
41
- checkout: {
42
- host: "checkoutHost",
43
- secret: "checkoutSecret",
44
- token: "checkoutToken",
45
- user: "checkoutUser"
46
- },
47
- auth: {
48
- resetPasswordUrl: "resetPasswordUrl"
49
- },
50
- paymentProviders: []
51
- };
52
- });
53
-
54
- const rpcContextFactory = Factory.define(({ transientParams }) => {
55
- return {
56
- locale: "de",
57
- checkout: {
58
- url: "",
59
- token: "",
60
- secret: "",
61
- user: ""
62
- },
63
- bapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
64
- sapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
65
- cached: (fn, _options) => {
66
- return async (...args) => {
67
- return await fn(...args);
68
- };
69
- },
70
- isCmsPreview: false,
71
- shopId: 1001,
72
- domain: "localhost",
73
- destroySessionsForUserId: () => Promise.resolve(),
74
- generateBasketKeyForUserId: (userId) => Promise.resolve(`basket-${userId}`),
75
- generateWishlistKeyForUserId: (userId) => Promise.resolve(`wishlist-${userId}`),
76
- log: new Log(),
77
- auth: {},
78
- runtimeConfiguration: {},
79
- headers: new Headers(),
80
- ...transientParams.isLoggedIn ? {
81
- wishlistKey: "wishlistKey",
82
- basketKey: "basketKey",
83
- sessionId: "sessionId",
84
- user: void 0,
85
- accessToken: void 0,
86
- refreshToken: void 0,
87
- destroySession: () => Promise.resolve(),
88
- createUserBoundSession: () => Promise.resolve(),
89
- updateUser: () => Promise.resolve(),
90
- updateTokens: () => Promise.resolve()
91
- } : {
92
- wishlistKey: void 0,
93
- basketKey: void 0,
94
- sessionId: void 0,
95
- user: void 0,
96
- accessToken: void 0,
97
- refreshToken: void 0,
98
- destroySession: void 0,
99
- createUserBoundSession: void 0,
100
- updateUser: void 0,
101
- updateTokens: void 0
102
- }
103
- };
104
- });
105
-
106
- const routeFactory = Factory.define(
107
- () => ({
108
- name: "test",
109
- params: {},
110
- matched: [],
111
- path: "/test",
112
- fullPath: "/test",
113
- redirectedFrom: void 0,
114
- hash: "",
115
- meta: { test: "" },
116
- query: {}
117
- })
118
- );
119
-
120
- export { moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "7.94.6",
3
+ "version": "7.95.0",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -48,7 +48,7 @@ export default {
48
48
  }`;
49
49
  }
50
50
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
51
- const PACKAGE_VERSION = "7.94.6";
51
+ const PACKAGE_VERSION = "7.95.0";
52
52
  const logger = createConsola({
53
53
  fancy: true,
54
54
  formatOptions: {
@@ -0,0 +1,25 @@
1
+ import { Factory } from 'fishery';
2
+ import { M as ModuleBaseOptions, f as ShopConfig } from '../shared/storefront-nuxt.80aa5060.mjs';
3
+ import { RpcContext } from '@scayle/storefront-core';
4
+ import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
5
+ export * from '@scayle/storefront-core/dist/test/factories';
6
+ import '@scayle/unstorage-compression-driver';
7
+ import 'unstorage';
8
+ import '../../dist/runtime/utils/zodSchema.js';
9
+ import '@nuxt/schema';
10
+
11
+ interface ModuleOptionsFactoryParams {
12
+ shops: ShopConfig[];
13
+ }
14
+ declare const moduleOptionsFactory: Factory<ModuleBaseOptions, ModuleOptionsFactoryParams, ModuleBaseOptions>;
15
+
16
+ declare const shopConfigFactory: Factory<ShopConfig, any, ShopConfig>;
17
+
18
+ interface RpcContextFactoryParams {
19
+ isLoggedIn: boolean;
20
+ }
21
+ declare const rpcContextFactory: Factory<RpcContext, RpcContextFactoryParams, RpcContext>;
22
+
23
+ declare const routeFactory: Factory<RouteLocationNormalizedLoadedGeneric, any, RouteLocationNormalizedLoadedGeneric>;
24
+
25
+ export { moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
@@ -0,0 +1,25 @@
1
+ import { Factory } from 'fishery';
2
+ import { M as ModuleBaseOptions, f as ShopConfig } from '../shared/storefront-nuxt.80aa5060.js';
3
+ import { RpcContext } from '@scayle/storefront-core';
4
+ import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
5
+ export * from '@scayle/storefront-core/dist/test/factories';
6
+ import '@scayle/unstorage-compression-driver';
7
+ import 'unstorage';
8
+ import '../../dist/runtime/utils/zodSchema.js';
9
+ import '@nuxt/schema';
10
+
11
+ interface ModuleOptionsFactoryParams {
12
+ shops: ShopConfig[];
13
+ }
14
+ declare const moduleOptionsFactory: Factory<ModuleBaseOptions, ModuleOptionsFactoryParams, ModuleBaseOptions>;
15
+
16
+ declare const shopConfigFactory: Factory<ShopConfig, any, ShopConfig>;
17
+
18
+ interface RpcContextFactoryParams {
19
+ isLoggedIn: boolean;
20
+ }
21
+ declare const rpcContextFactory: Factory<RpcContext, RpcContextFactoryParams, RpcContext>;
22
+
23
+ declare const routeFactory: Factory<RouteLocationNormalizedLoadedGeneric, any, RouteLocationNormalizedLoadedGeneric>;
24
+
25
+ export { moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
@@ -0,0 +1,116 @@
1
+ import { Factory } from 'fishery';
2
+ import { HashAlgorithm, StorefrontAPIClient, Log } from '@scayle/storefront-core';
3
+ export * from '@scayle/storefront-core/dist/test/factories';
4
+
5
+ const moduleOptionsFactory = Factory.define(({ transientParams }) => {
6
+ return {
7
+ sapi: {
8
+ host: "sapiHost",
9
+ token: "sapiToken"
10
+ },
11
+ oauth: {
12
+ apiHost: "oauthHost",
13
+ clientId: "clientId",
14
+ clientSecret: "clientSecret"
15
+ },
16
+ appKeys: {
17
+ basketKey: "basketKey",
18
+ wishlistKey: "wishlistKey",
19
+ hashAlgorithm: HashAlgorithm.MD5
20
+ },
21
+ shopSelector: "path",
22
+ shops: (transientParams?.shops || []).reduce((acc, curr) => {
23
+ return {
24
+ [curr.shopId]: curr,
25
+ ...acc
26
+ };
27
+ }, {})
28
+ };
29
+ });
30
+
31
+ const shopConfigFactory = Factory.define(() => {
32
+ return {
33
+ shopId: 1,
34
+ domain: "localhost",
35
+ locale: "en-US",
36
+ currency: "USD",
37
+ checkout: {
38
+ host: "checkoutHost",
39
+ secret: "checkoutSecret",
40
+ token: "checkoutToken",
41
+ user: "checkoutUser"
42
+ },
43
+ auth: {
44
+ resetPasswordUrl: "resetPasswordUrl"
45
+ },
46
+ paymentProviders: []
47
+ };
48
+ });
49
+
50
+ const rpcContextFactory = Factory.define(({ transientParams }) => {
51
+ return {
52
+ locale: "de",
53
+ checkout: {
54
+ url: "",
55
+ token: "",
56
+ secret: "",
57
+ user: ""
58
+ },
59
+ bapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
60
+ sapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
61
+ cached: (fn, _options) => {
62
+ return async (...args) => {
63
+ return await fn(...args);
64
+ };
65
+ },
66
+ isCmsPreview: false,
67
+ shopId: 1001,
68
+ domain: "localhost",
69
+ destroySessionsForUserId: () => Promise.resolve(),
70
+ generateBasketKeyForUserId: (userId) => Promise.resolve(`basket-${userId}`),
71
+ generateWishlistKeyForUserId: (userId) => Promise.resolve(`wishlist-${userId}`),
72
+ log: new Log(),
73
+ auth: {},
74
+ runtimeConfiguration: {},
75
+ headers: new Headers(),
76
+ ...transientParams.isLoggedIn ? {
77
+ wishlistKey: "wishlistKey",
78
+ basketKey: "basketKey",
79
+ sessionId: "sessionId",
80
+ user: void 0,
81
+ accessToken: void 0,
82
+ refreshToken: void 0,
83
+ destroySession: () => Promise.resolve(),
84
+ createUserBoundSession: () => Promise.resolve(),
85
+ updateUser: () => Promise.resolve(),
86
+ updateTokens: () => Promise.resolve()
87
+ } : {
88
+ wishlistKey: void 0,
89
+ basketKey: void 0,
90
+ sessionId: void 0,
91
+ user: void 0,
92
+ accessToken: void 0,
93
+ refreshToken: void 0,
94
+ destroySession: void 0,
95
+ createUserBoundSession: void 0,
96
+ updateUser: void 0,
97
+ updateTokens: void 0
98
+ }
99
+ };
100
+ });
101
+
102
+ const routeFactory = Factory.define(
103
+ () => ({
104
+ name: "test",
105
+ params: {},
106
+ matched: [],
107
+ path: "/test",
108
+ fullPath: "/test",
109
+ redirectedFrom: void 0,
110
+ hash: "",
111
+ meta: { test: "" },
112
+ query: {}
113
+ })
114
+ );
115
+
116
+ export { moduleOptionsFactory, routeFactory, rpcContextFactory, shopConfigFactory };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.94.6",
4
+ "version": "7.95.0",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -29,6 +29,14 @@
29
29
  "types": "./dist/runtime/composables/index.d.ts",
30
30
  "import": "./dist/runtime/composables/index.js"
31
31
  },
32
+ "./dist/test/factories": {
33
+ "types": "./dist/test/factories.d.ts",
34
+ "import": "./dist/test/factories.mjs"
35
+ },
36
+ "./test/factories": {
37
+ "types": "./dist/test/factories.d.ts",
38
+ "import": "./dist/test/factories.mjs"
39
+ },
32
40
  ".": {
33
41
  "types": "./dist/index.d.ts",
34
42
  "default": "./dist/index.mjs"
@@ -65,7 +73,7 @@
65
73
  "@nuxt/kit": "^3.12.2",
66
74
  "@opentelemetry/api": "^1.9.0",
67
75
  "@scayle/h3-session": "^0.4.1",
68
- "@scayle/storefront-core": "7.67.1",
76
+ "@scayle/storefront-core": "7.69.0",
69
77
  "@scayle/unstorage-compression-driver": "^0.1.5",
70
78
  "@vueuse/core": "11.2.0",
71
79
  "consola": "^3.2.3",