@scayle/storefront-nuxt 7.77.3 → 7.78.1
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 +14 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/module.d.mts +2 -2
- package/dist/module.d.ts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -3
- package/dist/rpc.d.mts +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/runtime/context.mjs +1 -1
- package/dist/runtime/plugin/log.server.d.ts +4 -4
- package/dist/runtime/server/middleware/bootstrap.utils.d.ts +1 -0
- package/dist/runtime/server/middleware/bootstrap.utils.mjs +7 -5
- package/dist/runtime/utils/zodSchema.d.ts +10 -10
- package/dist/runtime/utils/zodSchema.mjs +1 -1
- package/dist/shared/{storefront-nuxt.134d6654.d.mts → storefront-nuxt.b2288199.d.mts} +5 -4
- package/dist/shared/{storefront-nuxt.134d6654.d.ts → storefront-nuxt.b2288199.d.ts} +5 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.78.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Import `useNitroApp` from `#imports`
|
|
8
|
+
|
|
9
|
+
## 7.78.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Support shops with multiple paths
|
|
14
|
+
|
|
15
|
+
The `path` property in the shop config can now be defined as an array of strings. If this is the case, multiple path prefixes will point to the same shop. For example, with the config `{ path: ['en', 'en-US'], shopId: 1001 }` both `example.com/en` and `example.com/en-US` will use shop 1001. Because it is the same shop, `/en` and `/en-US` will have the same locale and share user sessions, baskets and wishlists. The first path in the array will be considered the default path and used for API calls.
|
|
16
|
+
|
|
3
17
|
## 7.77.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.
|
|
1
|
+
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.b2288199.mjs';
|
|
2
2
|
export { rpcCall } from './rpc.mjs';
|
|
3
3
|
export * from '@scayle/storefront-core';
|
|
4
4
|
export { LogLevel } from '@scayle/storefront-core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.
|
|
1
|
+
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, M as ModuleBaseOptions, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.b2288199.js';
|
|
2
2
|
export { rpcCall } from './rpc.js';
|
|
3
3
|
export * from '@scayle/storefront-core';
|
|
4
4
|
export { LogLevel } from '@scayle/storefront-core';
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { M as ModuleBaseOptions } from './shared/storefront-nuxt.
|
|
3
|
-
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.
|
|
2
|
+
import { M as ModuleBaseOptions } from './shared/storefront-nuxt.b2288199.mjs';
|
|
3
|
+
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.b2288199.mjs';
|
|
4
4
|
export { LogLevel } from '@scayle/storefront-core';
|
|
5
5
|
import '@scayle/unstorage-compression-driver';
|
|
6
6
|
import 'unstorage';
|
package/dist/module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { M as ModuleBaseOptions } from './shared/storefront-nuxt.
|
|
3
|
-
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.
|
|
2
|
+
import { M as ModuleBaseOptions } from './shared/storefront-nuxt.b2288199.js';
|
|
3
|
+
export { d as AdditionalShopConfig, A as AppKeys, B as BapiConfig, h as CheckoutEvent, C as CheckoutShopConfig, i as ModulePublicRuntimeConfig, P as PublicShopConfig, R as RedisConfig, a as SessionConfig, e as ShopConfig, f as ShopConfigIndexed, c as StorageConfig, b as StorageEntity, S as StorageProvider, g as StorefrontConfig } from './shared/storefront-nuxt.b2288199.js';
|
|
4
4
|
export { LogLevel } from '@scayle/storefront-core';
|
|
5
5
|
import '@scayle/unstorage-compression-driver';
|
|
6
6
|
import 'unstorage';
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -15,15 +15,16 @@ const convertShopsToList = (stores) => {
|
|
|
15
15
|
return Object.values(stores);
|
|
16
16
|
};
|
|
17
17
|
function getApiBasePath(storefrontConfig, shop, baseUrl) {
|
|
18
|
+
const path = Array.isArray(shop.path) ? shop.path[0] : shop.path;
|
|
18
19
|
const apiPath = shop.apiBasePath || storefrontConfig.apiBasePath || "/api";
|
|
19
20
|
if (storefrontConfig.shopSelector === "path") {
|
|
20
|
-
const pathElements = [
|
|
21
|
+
const pathElements = [path, apiPath].filter(Boolean);
|
|
21
22
|
return joinURL(baseUrl, ...pathElements);
|
|
22
23
|
} else if (storefrontConfig.shopSelector === "path_or_default") {
|
|
23
24
|
if (shop.isDefault) {
|
|
24
25
|
return joinURL(baseUrl, apiPath);
|
|
25
26
|
}
|
|
26
|
-
const pathElements = [
|
|
27
|
+
const pathElements = [path, apiPath].filter(Boolean);
|
|
27
28
|
return joinURL(baseUrl, ...pathElements);
|
|
28
29
|
}
|
|
29
30
|
return joinURL(baseUrl, apiPath);
|
|
@@ -64,7 +65,7 @@ export default {
|
|
|
64
65
|
}`;
|
|
65
66
|
}
|
|
66
67
|
const PACKAGE_NAME = "@scayle/storefront-nuxt";
|
|
67
|
-
const PACKAGE_VERSION = "7.
|
|
68
|
+
const PACKAGE_VERSION = "7.78.0";
|
|
68
69
|
const logger = createConsola({
|
|
69
70
|
fancy: true,
|
|
70
71
|
formatOptions: {
|
package/dist/rpc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RpcMethodName, RpcMethodParameters, RpcMethodReturnType, RpcContext } from '@scayle/storefront-core';
|
|
2
2
|
import { NuxtApp } from 'nuxt/app';
|
|
3
|
-
import { P as PublicShopConfig } from './shared/storefront-nuxt.
|
|
3
|
+
import { P as PublicShopConfig } from './shared/storefront-nuxt.b2288199.mjs';
|
|
4
4
|
import '@nuxt/schema';
|
|
5
5
|
import '@scayle/unstorage-compression-driver';
|
|
6
6
|
import 'unstorage';
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RpcMethodName, RpcMethodParameters, RpcMethodReturnType, RpcContext } from '@scayle/storefront-core';
|
|
2
2
|
import { NuxtApp } from 'nuxt/app';
|
|
3
|
-
import { P as PublicShopConfig } from './shared/storefront-nuxt.
|
|
3
|
+
import { P as PublicShopConfig } from './shared/storefront-nuxt.b2288199.js';
|
|
4
4
|
import '@nuxt/schema';
|
|
5
5
|
import '@scayle/unstorage-compression-driver';
|
|
6
6
|
import 'unstorage';
|
package/dist/runtime/context.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
generateBasketKey,
|
|
9
9
|
generateWishlistKey
|
|
10
10
|
} from "@scayle/storefront-core/dist/utils/keys";
|
|
11
|
-
import { useNitroApp } from "
|
|
11
|
+
import { useNitroApp } from "#imports";
|
|
12
12
|
import { fetchCampaignKey } from "./campaignKey.mjs";
|
|
13
13
|
async function getWishlistKey(appKeys, session, $log, $shopConfig) {
|
|
14
14
|
return session.data.user ? await generateWishlistKey({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare const _default: import("nuxt/app").Plugin<{
|
|
2
|
-
log:
|
|
3
|
-
coreLog:
|
|
2
|
+
log: import("@scayle/storefront-core").Log;
|
|
3
|
+
coreLog: import("@scayle/storefront-core").Log;
|
|
4
4
|
}> & import("nuxt/app").ObjectPlugin<{
|
|
5
|
-
log:
|
|
6
|
-
coreLog:
|
|
5
|
+
log: import("@scayle/storefront-core").Log;
|
|
6
|
+
coreLog: import("@scayle/storefront-core").Log;
|
|
7
7
|
}>;
|
|
8
8
|
export default _default;
|
|
@@ -6,6 +6,7 @@ type BootstrapPath = {
|
|
|
6
6
|
originalPath: string;
|
|
7
7
|
};
|
|
8
8
|
export declare function getBootstrapPath(event: H3Event): BootstrapPath;
|
|
9
|
+
export declare const getShopByPath: (event: H3Event, shops: ShopConfig[], appBasePath: string) => ShopConfig | undefined;
|
|
9
10
|
export declare const convertShopsToList: (stores: ShopConfig[] | ShopConfigIndexed) => ShopConfig[];
|
|
10
11
|
export declare function getApiBasePath(storefrontConfig: ModuleBaseOptions, shop: ShopConfig, baseUrl: string): string;
|
|
11
12
|
export declare function getCurrentShopConfigForRequest(event: H3Event, config: Pick<ModuleBaseOptions, 'stores' | 'shopSelector'>, runtimeConfig: NitroRuntimeConfig): ShopConfig | undefined;
|
|
@@ -13,11 +13,12 @@ const getShopByDomain = (event, shops) => {
|
|
|
13
13
|
const host = getRequestHost(event, { xForwardedHost: true });
|
|
14
14
|
return shops.find((s) => s.domain === host);
|
|
15
15
|
};
|
|
16
|
-
const getShopByPath = (event, shops, appBasePath) => {
|
|
16
|
+
export const getShopByPath = (event, shops, appBasePath) => {
|
|
17
17
|
const { path } = getBootstrapPath(event);
|
|
18
18
|
const localeIndex = appBasePath !== "/" ? 2 : 1;
|
|
19
19
|
const prefix = path.split("/")?.[localeIndex];
|
|
20
|
-
|
|
20
|
+
const matchesShopPrefix = (shop) => Array.isArray(shop.path) ? shop.path.includes(prefix) : shop.path === prefix;
|
|
21
|
+
return shops.find(matchesShopPrefix);
|
|
21
22
|
};
|
|
22
23
|
const getShopByPathOrDefault = (event, shops, appBasePath) => {
|
|
23
24
|
const defaultShop = shops.find((shop) => shop.isDefault);
|
|
@@ -31,15 +32,16 @@ export const convertShopsToList = (stores) => {
|
|
|
31
32
|
return Object.values(stores);
|
|
32
33
|
};
|
|
33
34
|
export function getApiBasePath(storefrontConfig, shop, baseUrl) {
|
|
35
|
+
const path = Array.isArray(shop.path) ? shop.path[0] : shop.path;
|
|
34
36
|
const apiPath = shop.apiBasePath || storefrontConfig.apiBasePath || "/api";
|
|
35
37
|
if (storefrontConfig.shopSelector === "path") {
|
|
36
|
-
const pathElements = [
|
|
38
|
+
const pathElements = [path, apiPath].filter(Boolean);
|
|
37
39
|
return joinURL(baseUrl, ...pathElements);
|
|
38
40
|
} else if (storefrontConfig.shopSelector === "path_or_default") {
|
|
39
41
|
if (shop.isDefault) {
|
|
40
42
|
return joinURL(baseUrl, apiPath);
|
|
41
43
|
}
|
|
42
|
-
const pathElements = [
|
|
44
|
+
const pathElements = [path, apiPath].filter(Boolean);
|
|
43
45
|
return joinURL(baseUrl, ...pathElements);
|
|
44
46
|
}
|
|
45
47
|
return joinURL(baseUrl, apiPath);
|
|
@@ -70,7 +72,7 @@ export function getPublicShopData(data, currentShopId, apiBasePath, publicShopDa
|
|
|
70
72
|
publicShopData.forEach((key) => additionalShopData[key] = data[key]);
|
|
71
73
|
return {
|
|
72
74
|
domain: data.domain,
|
|
73
|
-
path: data.path,
|
|
75
|
+
path: Array.isArray(data.path) ? data.path[0] : data.path,
|
|
74
76
|
locale: data.locale,
|
|
75
77
|
shopId: data.shopId,
|
|
76
78
|
currency: data.currency,
|
|
@@ -176,7 +176,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
176
176
|
idpRedirectURL: string;
|
|
177
177
|
}>>;
|
|
178
178
|
shopId: z.ZodNumber;
|
|
179
|
-
path: z.ZodOptional<z.ZodString
|
|
179
|
+
path: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
180
180
|
apiBasePath: z.ZodOptional<z.ZodString>;
|
|
181
181
|
domain: z.ZodOptional<z.ZodString>;
|
|
182
182
|
locale: z.ZodString;
|
|
@@ -448,7 +448,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
448
448
|
idpKeys: string[];
|
|
449
449
|
idpRedirectURL: string;
|
|
450
450
|
} | undefined;
|
|
451
|
-
path?: string | undefined;
|
|
451
|
+
path?: string | string[] | undefined;
|
|
452
452
|
redis?: {
|
|
453
453
|
port?: number | undefined;
|
|
454
454
|
host?: string | undefined;
|
|
@@ -529,7 +529,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
529
529
|
idpKeys: string[];
|
|
530
530
|
idpRedirectURL: string;
|
|
531
531
|
} | undefined;
|
|
532
|
-
path?: string | undefined;
|
|
532
|
+
path?: string | string[] | undefined;
|
|
533
533
|
redis?: {
|
|
534
534
|
port?: number | undefined;
|
|
535
535
|
host?: string | undefined;
|
|
@@ -1472,7 +1472,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
1472
1472
|
idpRedirectURL: string;
|
|
1473
1473
|
}>>;
|
|
1474
1474
|
shopId: z.ZodNumber;
|
|
1475
|
-
path: z.ZodOptional<z.ZodString
|
|
1475
|
+
path: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
1476
1476
|
apiBasePath: z.ZodOptional<z.ZodString>;
|
|
1477
1477
|
domain: z.ZodOptional<z.ZodString>;
|
|
1478
1478
|
locale: z.ZodString;
|
|
@@ -1744,7 +1744,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
1744
1744
|
idpKeys: string[];
|
|
1745
1745
|
idpRedirectURL: string;
|
|
1746
1746
|
} | undefined;
|
|
1747
|
-
path?: string | undefined;
|
|
1747
|
+
path?: string | string[] | undefined;
|
|
1748
1748
|
redis?: {
|
|
1749
1749
|
port?: number | undefined;
|
|
1750
1750
|
host?: string | undefined;
|
|
@@ -1825,7 +1825,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
1825
1825
|
idpKeys: string[];
|
|
1826
1826
|
idpRedirectURL: string;
|
|
1827
1827
|
} | undefined;
|
|
1828
|
-
path?: string | undefined;
|
|
1828
|
+
path?: string | string[] | undefined;
|
|
1829
1829
|
redis?: {
|
|
1830
1830
|
port?: number | undefined;
|
|
1831
1831
|
host?: string | undefined;
|
|
@@ -1919,7 +1919,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
1919
1919
|
idpKeys: string[];
|
|
1920
1920
|
idpRedirectURL: string;
|
|
1921
1921
|
} | undefined;
|
|
1922
|
-
path?: string | undefined;
|
|
1922
|
+
path?: string | string[] | undefined;
|
|
1923
1923
|
redis?: {
|
|
1924
1924
|
port?: number | undefined;
|
|
1925
1925
|
host?: string | undefined;
|
|
@@ -2007,7 +2007,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
2007
2007
|
idpKeys: string[];
|
|
2008
2008
|
idpRedirectURL: string;
|
|
2009
2009
|
} | undefined;
|
|
2010
|
-
path?: string | undefined;
|
|
2010
|
+
path?: string | string[] | undefined;
|
|
2011
2011
|
redis?: {
|
|
2012
2012
|
port?: number | undefined;
|
|
2013
2013
|
host?: string | undefined;
|
|
@@ -2210,7 +2210,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
2210
2210
|
idpKeys: string[];
|
|
2211
2211
|
idpRedirectURL: string;
|
|
2212
2212
|
} | undefined;
|
|
2213
|
-
path?: string | undefined;
|
|
2213
|
+
path?: string | string[] | undefined;
|
|
2214
2214
|
redis?: {
|
|
2215
2215
|
port?: number | undefined;
|
|
2216
2216
|
host?: string | undefined;
|
|
@@ -2383,7 +2383,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
2383
2383
|
idpKeys: string[];
|
|
2384
2384
|
idpRedirectURL: string;
|
|
2385
2385
|
} | undefined;
|
|
2386
|
-
path?: string | undefined;
|
|
2386
|
+
path?: string | string[] | undefined;
|
|
2387
2387
|
redis?: {
|
|
2388
2388
|
port?: number | undefined;
|
|
2389
2389
|
host?: string | undefined;
|
|
@@ -89,7 +89,7 @@ const emptyString = z.string().refine((val) => val === "", {
|
|
|
89
89
|
const ShopConfigSchema = z.object({
|
|
90
90
|
idp: IdpSchema.optional(),
|
|
91
91
|
shopId: z.number(),
|
|
92
|
-
path: z.string().optional(),
|
|
92
|
+
path: z.string().or(z.array(z.string())).optional(),
|
|
93
93
|
apiBasePath: z.string().optional(),
|
|
94
94
|
domain: z.string().optional(),
|
|
95
95
|
locale: z.string(),
|
|
@@ -180,7 +180,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
180
180
|
idpRedirectURL: string;
|
|
181
181
|
}>>;
|
|
182
182
|
shopId: z.ZodNumber;
|
|
183
|
-
path: z.ZodOptional<z.ZodString
|
|
183
|
+
path: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
184
184
|
apiBasePath: z.ZodOptional<z.ZodString>;
|
|
185
185
|
domain: z.ZodOptional<z.ZodString>;
|
|
186
186
|
locale: z.ZodString;
|
|
@@ -445,7 +445,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
445
445
|
token: string;
|
|
446
446
|
cbdExpiration?: number | undefined;
|
|
447
447
|
};
|
|
448
|
-
path?: string | undefined;
|
|
448
|
+
path?: string | string[] | undefined;
|
|
449
449
|
domain?: string | undefined;
|
|
450
450
|
redis?: {
|
|
451
451
|
port?: number | undefined;
|
|
@@ -526,7 +526,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
526
526
|
token: string;
|
|
527
527
|
cbdExpiration?: number | undefined;
|
|
528
528
|
};
|
|
529
|
-
path?: string | undefined;
|
|
529
|
+
path?: string | string[] | undefined;
|
|
530
530
|
domain?: string | undefined;
|
|
531
531
|
redis?: {
|
|
532
532
|
port?: number | undefined;
|
|
@@ -1088,10 +1088,11 @@ interface AdditionalShopConfig {
|
|
|
1088
1088
|
interface ShopConfig extends ShopConfigType, AdditionalShopConfig {
|
|
1089
1089
|
}
|
|
1090
1090
|
type ShopConfigIndexed = Record<string, ShopConfig>;
|
|
1091
|
-
interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | '
|
|
1091
|
+
interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'locale' | 'currency' | 'currencyFractionDigits'> {
|
|
1092
1092
|
checkout: Pick<CheckoutShopConfig, 'host'>;
|
|
1093
1093
|
apiBasePath: string;
|
|
1094
1094
|
idp?: IdpType;
|
|
1095
|
+
path?: string;
|
|
1095
1096
|
}
|
|
1096
1097
|
interface StorefrontConfig extends StorefrontConfigType {
|
|
1097
1098
|
withParams?: WithParams;
|
|
@@ -180,7 +180,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
180
180
|
idpRedirectURL: string;
|
|
181
181
|
}>>;
|
|
182
182
|
shopId: z.ZodNumber;
|
|
183
|
-
path: z.ZodOptional<z.ZodString
|
|
183
|
+
path: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
184
184
|
apiBasePath: z.ZodOptional<z.ZodString>;
|
|
185
185
|
domain: z.ZodOptional<z.ZodString>;
|
|
186
186
|
locale: z.ZodString;
|
|
@@ -445,7 +445,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
445
445
|
token: string;
|
|
446
446
|
cbdExpiration?: number | undefined;
|
|
447
447
|
};
|
|
448
|
-
path?: string | undefined;
|
|
448
|
+
path?: string | string[] | undefined;
|
|
449
449
|
domain?: string | undefined;
|
|
450
450
|
redis?: {
|
|
451
451
|
port?: number | undefined;
|
|
@@ -526,7 +526,7 @@ declare const ShopConfigSchema: z.ZodObject<{
|
|
|
526
526
|
token: string;
|
|
527
527
|
cbdExpiration?: number | undefined;
|
|
528
528
|
};
|
|
529
|
-
path?: string | undefined;
|
|
529
|
+
path?: string | string[] | undefined;
|
|
530
530
|
domain?: string | undefined;
|
|
531
531
|
redis?: {
|
|
532
532
|
port?: number | undefined;
|
|
@@ -1088,10 +1088,11 @@ interface AdditionalShopConfig {
|
|
|
1088
1088
|
interface ShopConfig extends ShopConfigType, AdditionalShopConfig {
|
|
1089
1089
|
}
|
|
1090
1090
|
type ShopConfigIndexed = Record<string, ShopConfig>;
|
|
1091
|
-
interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | '
|
|
1091
|
+
interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'locale' | 'currency' | 'currencyFractionDigits'> {
|
|
1092
1092
|
checkout: Pick<CheckoutShopConfig, 'host'>;
|
|
1093
1093
|
apiBasePath: string;
|
|
1094
1094
|
idp?: IdpType;
|
|
1095
|
+
path?: string;
|
|
1095
1096
|
}
|
|
1096
1097
|
interface StorefrontConfig extends StorefrontConfigType {
|
|
1097
1098
|
withParams?: WithParams;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.78.1",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"defu": "6.1.4",
|
|
69
69
|
"jose": "^5.2.0",
|
|
70
70
|
"knitwork": "1.1.0",
|
|
71
|
-
"nitropack": "2.9.
|
|
71
|
+
"nitropack": "2.9.7",
|
|
72
72
|
"ofetch": "1.3.4",
|
|
73
73
|
"radash": "12.1.0",
|
|
74
74
|
"ufo": "1.5.3",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@scayle/eslint-plugin-vue-composable": "0.2.0",
|
|
88
88
|
"@types/node": "20.14.9",
|
|
89
89
|
"dprint": "0.46.3",
|
|
90
|
-
"eslint": "9.
|
|
90
|
+
"eslint": "9.6.0",
|
|
91
91
|
"eslint-formatter-gitlab": "5.1.0",
|
|
92
92
|
"fishery": "2.2.2",
|
|
93
93
|
"h3": "1.12.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"nuxt": "3.11.2",
|
|
97
97
|
"publint": "0.2.8",
|
|
98
98
|
"vitest": "1.6.0",
|
|
99
|
-
"vue-tsc": "2.0.
|
|
99
|
+
"vue-tsc": "2.0.24"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"h3": "^1.10.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"resolutions": {
|
|
108
108
|
"h3": "1.12.0",
|
|
109
|
-
"vue": "3.4.
|
|
109
|
+
"vue": "3.4.31",
|
|
110
110
|
"@nuxt/kit": "3.11.2",
|
|
111
111
|
"@nuxt/schema": "3.11.2"
|
|
112
112
|
},
|