@scayle/storefront-nuxt 7.72.4 → 7.73.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/dist/types.d.mts CHANGED
@@ -1,18 +1,14 @@
1
1
 
2
- import type { ModuleOptions, ModulePublicRuntimeConfig } from './module.js'
2
+ import type { ModulePublicRuntimeConfig } from './module.js'
3
3
 
4
4
 
5
5
  declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['storefront']?: ModuleOptions }
8
6
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
9
7
  }
10
8
 
11
9
  declare module 'nuxt/schema' {
12
- interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
13
- interface NuxtOptions { ['storefront']?: ModuleOptions }
14
10
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
15
11
  }
16
12
 
17
13
 
18
- export type { AdditionalShopConfig, AppKeys, BapiConfig, CacheConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, OauthConfig, PublicShopConfig, RedirectsConfig, RedisConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module.js'
14
+ export type { AdditionalShopConfig, AppKeys, BapiConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, PublicShopConfig, RedisConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,18 +1,14 @@
1
1
 
2
- import type { ModuleOptions, ModulePublicRuntimeConfig } from './module'
2
+ import type { ModulePublicRuntimeConfig } from './module'
3
3
 
4
4
 
5
5
  declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['storefront']?: ModuleOptions }
8
6
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
9
7
  }
10
8
 
11
9
  declare module 'nuxt/schema' {
12
- interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
13
- interface NuxtOptions { ['storefront']?: ModuleOptions }
14
10
  interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
15
11
  }
16
12
 
17
13
 
18
- export type { AdditionalShopConfig, AppKeys, BapiConfig, CacheConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, OauthConfig, PublicShopConfig, RedirectsConfig, RedisConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module'
14
+ export type { AdditionalShopConfig, AppKeys, BapiConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, PublicShopConfig, RedisConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.72.4",
4
+ "version": "7.73.0",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -60,7 +60,7 @@
60
60
  "@nuxt/kit": "3.11.1",
61
61
  "@opentelemetry/api": "1.8.0",
62
62
  "@scayle/h3-session": "0.4.0",
63
- "@scayle/storefront-core": "7.52.1",
63
+ "@scayle/storefront-core": "7.54.0",
64
64
  "@scayle/unstorage-compression-driver": "0.1.3",
65
65
  "@vueuse/core": "10.10.0",
66
66
  "consola": "3.2.3",
@@ -71,6 +71,7 @@
71
71
  "nitropack": "2.9.6",
72
72
  "ofetch": "1.3.4",
73
73
  "radash": "12.1.0",
74
+ "ufo": "1.5.3",
74
75
  "uncrypto": "0.1.3",
75
76
  "unstorage": "1.10.2",
76
77
  "vue-router": "4.3.2",
@@ -84,7 +85,7 @@
84
85
  "@nuxt/test-utils": "3.13.1",
85
86
  "@scayle/eslint-config-storefront": "4.2.0",
86
87
  "@scayle/eslint-plugin-vue-composable": "0.2.0",
87
- "@types/node": "20.14.0",
88
+ "@types/node": "20.14.1",
88
89
  "dprint": "0.46.1",
89
90
  "eslint": "9.4.0",
90
91
  "eslint-formatter-gitlab": "5.1.0",
@@ -1,185 +0,0 @@
1
- import { HookResult } from '@nuxt/schema';
2
- import { RpcContext, HashAlgorithm, IDPConfig, WithParams, rpcMethods, ShopUser, LogLevel } from '@scayle/storefront-core';
3
- import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
4
- import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
5
-
6
- type StorageProvider = 'memory' | 'redis';
7
- type CheckoutShopConfig = {
8
- host: string;
9
- token: string;
10
- secret: string;
11
- user: string;
12
- /**
13
- * The number of seconds that a CBD token should be considered valid since issued
14
- */
15
- cbdExpiration?: number;
16
- };
17
- /**
18
- * Options to configure how the storefront core manages sessions
19
- */
20
- type SessionConfig = Partial<{
21
- /**
22
- * The name used for the session cookie
23
- */
24
- cookieName: string;
25
- /**
26
- * The sameSite policy to use for the session cookie
27
- */
28
- sameSite: 'none' | 'lax' | 'strict';
29
- /**
30
- * The default maxAge (in seconds) set on the session cookie and default TTL for session store
31
- */
32
- maxAge: number;
33
- /**
34
- * The secret used for signing session cookies. If an array is passed, the last
35
- * value is used for signing new cookies, but all values are used to verify cookies.
36
- */
37
- secret: string | string[];
38
- /**
39
- * Controls the domain option on the session cookie
40
- */
41
- domain: string;
42
- /**
43
- * The provider to use for the persistent storage.
44
- * @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
45
- */
46
- provider?: StorageProvider;
47
- }>;
48
- interface CacheConfig {
49
- /** @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead. */
50
- provider?: StorageProvider;
51
- auth?: {
52
- username: string;
53
- password: string;
54
- };
55
- enabled?: boolean;
56
- }
57
- /**
58
- * @deprecated
59
- */
60
- type RedisConfig = {
61
- port?: number;
62
- host?: string;
63
- prefix?: string;
64
- sslTransit?: boolean;
65
- } | {
66
- port?: number;
67
- host?: string;
68
- prefix?: string;
69
- sslTransit?: boolean;
70
- user: string;
71
- password: string;
72
- };
73
- type CustomDriverName = string & {
74
- _custom?: any;
75
- };
76
- type StorageEntity<Driver extends BuiltinDriverName | CustomDriverName = any, DriverOptions = Driver extends keyof BuiltinDriverOptions ? BuiltinDriverOptions[Driver] : any> = {
77
- driver: Driver;
78
- compression?: CompressionEncodings;
79
- } & DriverOptions;
80
- interface StorageConfig {
81
- cache?: StorageEntity;
82
- session?: StorageEntity;
83
- }
84
- interface BapiConfig {
85
- host: string;
86
- token: string;
87
- }
88
- interface AppKeys {
89
- wishlistKey: string;
90
- basketKey: string;
91
- hashAlgorithm: HashAlgorithm;
92
- }
93
- interface RedirectsConfig {
94
- enabled: boolean;
95
- queryParamWhitelist?: string[];
96
- }
97
- interface OauthConfig {
98
- apiHost: string;
99
- clientId: string;
100
- clientSecret: string;
101
- }
102
- interface AdditionalShopConfig {
103
- }
104
- interface ShopConfig extends AdditionalShopConfig {
105
- shopId: number;
106
- domain: string;
107
- path?: string;
108
- locale: string;
109
- apiBasePath?: string;
110
- currency: string;
111
- currencyFractionDigits?: number;
112
- storeCampaignKeyword?: string;
113
- isEnabled?: boolean;
114
- isDefault?: boolean;
115
- checkout: CheckoutShopConfig;
116
- sessionConfig?: SessionConfig;
117
- auth: {
118
- resetPasswordUrl: string;
119
- };
120
- /** @deprecated shop-specific storefront.redis config is being removed in favor of global nitro.storage config */
121
- redis?: RedisConfig;
122
- bapi?: BapiConfig;
123
- appKeys?: AppKeys;
124
- storage?: StorageConfig;
125
- idp?: IDPConfig;
126
- }
127
- type ShopConfigIndexed = Record<string, ShopConfig>;
128
- interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'path' | 'locale' | 'currency' | 'currencyFractionDigits'> {
129
- checkout: Pick<CheckoutShopConfig, 'host'>;
130
- apiBasePath: string;
131
- idp?: IDPConfig;
132
- }
133
- interface StorefrontConfig {
134
- session?: SessionConfig;
135
- bapi: BapiConfig;
136
- /** @deprecated Global storefront.redis config is being removed in favor of `storefront.storage` config */
137
- redis?: RedisConfig;
138
- storage?: StorageConfig;
139
- oauth: OauthConfig;
140
- appKeys: AppKeys;
141
- apiBasePath?: string;
142
- cache?: CacheConfig;
143
- publicShopData?: (keyof AdditionalShopConfig)[];
144
- withParams?: WithParams;
145
- idp?: IDPConfig;
146
- }
147
- type ModuleOptions = StorefrontConfig & {
148
- shopSelector: 'domain' | 'path' | 'path_or_default';
149
- stores: ShopConfigIndexed;
150
- rpcDir?: string;
151
- rpcMethodNames?: string[];
152
- rpcMethodOverrides?: Array<keyof typeof rpcMethods>;
153
- redirects?: RedirectsConfig;
154
- };
155
- interface CheckoutEvent {
156
- action?: 'authenticated';
157
- type?: 'tracking';
158
- user: ShopUser;
159
- accessToken: string;
160
- event?: {
161
- event: 'login' | 'add_to_cart' | 'remove_from_cart';
162
- status: 'successful' | 'error';
163
- };
164
- }
165
- interface ModulePublicRuntimeConfig {
166
- log: {
167
- name: string;
168
- level: LogLevel;
169
- };
170
- }
171
- declare module '@nuxt/schema' {
172
- interface RuntimeConfig {
173
- storefront: ModuleOptions;
174
- }
175
- interface PublicRuntimeConfig {
176
- storefront: ModulePublicRuntimeConfig;
177
- }
178
- }
179
- declare module 'nitropack' {
180
- interface NitroRuntimeHooks {
181
- 'storefront:context:created': (context: RpcContext) => HookResult;
182
- }
183
- }
184
-
185
- export type { AppKeys as A, BapiConfig as B, CheckoutShopConfig as C, ModuleOptions as M, OauthConfig as O, PublicShopConfig as P, RedisConfig as R, StorageProvider as S, SessionConfig as a, CacheConfig as b, StorageEntity as c, StorageConfig as d, RedirectsConfig as e, AdditionalShopConfig as f, ShopConfig as g, ShopConfigIndexed as h, StorefrontConfig as i, CheckoutEvent as j, ModulePublicRuntimeConfig as k };
@@ -1,185 +0,0 @@
1
- import { HookResult } from '@nuxt/schema';
2
- import { RpcContext, HashAlgorithm, IDPConfig, WithParams, rpcMethods, ShopUser, LogLevel } from '@scayle/storefront-core';
3
- import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
4
- import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
5
-
6
- type StorageProvider = 'memory' | 'redis';
7
- type CheckoutShopConfig = {
8
- host: string;
9
- token: string;
10
- secret: string;
11
- user: string;
12
- /**
13
- * The number of seconds that a CBD token should be considered valid since issued
14
- */
15
- cbdExpiration?: number;
16
- };
17
- /**
18
- * Options to configure how the storefront core manages sessions
19
- */
20
- type SessionConfig = Partial<{
21
- /**
22
- * The name used for the session cookie
23
- */
24
- cookieName: string;
25
- /**
26
- * The sameSite policy to use for the session cookie
27
- */
28
- sameSite: 'none' | 'lax' | 'strict';
29
- /**
30
- * The default maxAge (in seconds) set on the session cookie and default TTL for session store
31
- */
32
- maxAge: number;
33
- /**
34
- * The secret used for signing session cookies. If an array is passed, the last
35
- * value is used for signing new cookies, but all values are used to verify cookies.
36
- */
37
- secret: string | string[];
38
- /**
39
- * Controls the domain option on the session cookie
40
- */
41
- domain: string;
42
- /**
43
- * The provider to use for the persistent storage.
44
- * @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
45
- */
46
- provider?: StorageProvider;
47
- }>;
48
- interface CacheConfig {
49
- /** @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead. */
50
- provider?: StorageProvider;
51
- auth?: {
52
- username: string;
53
- password: string;
54
- };
55
- enabled?: boolean;
56
- }
57
- /**
58
- * @deprecated
59
- */
60
- type RedisConfig = {
61
- port?: number;
62
- host?: string;
63
- prefix?: string;
64
- sslTransit?: boolean;
65
- } | {
66
- port?: number;
67
- host?: string;
68
- prefix?: string;
69
- sslTransit?: boolean;
70
- user: string;
71
- password: string;
72
- };
73
- type CustomDriverName = string & {
74
- _custom?: any;
75
- };
76
- type StorageEntity<Driver extends BuiltinDriverName | CustomDriverName = any, DriverOptions = Driver extends keyof BuiltinDriverOptions ? BuiltinDriverOptions[Driver] : any> = {
77
- driver: Driver;
78
- compression?: CompressionEncodings;
79
- } & DriverOptions;
80
- interface StorageConfig {
81
- cache?: StorageEntity;
82
- session?: StorageEntity;
83
- }
84
- interface BapiConfig {
85
- host: string;
86
- token: string;
87
- }
88
- interface AppKeys {
89
- wishlistKey: string;
90
- basketKey: string;
91
- hashAlgorithm: HashAlgorithm;
92
- }
93
- interface RedirectsConfig {
94
- enabled: boolean;
95
- queryParamWhitelist?: string[];
96
- }
97
- interface OauthConfig {
98
- apiHost: string;
99
- clientId: string;
100
- clientSecret: string;
101
- }
102
- interface AdditionalShopConfig {
103
- }
104
- interface ShopConfig extends AdditionalShopConfig {
105
- shopId: number;
106
- domain: string;
107
- path?: string;
108
- locale: string;
109
- apiBasePath?: string;
110
- currency: string;
111
- currencyFractionDigits?: number;
112
- storeCampaignKeyword?: string;
113
- isEnabled?: boolean;
114
- isDefault?: boolean;
115
- checkout: CheckoutShopConfig;
116
- sessionConfig?: SessionConfig;
117
- auth: {
118
- resetPasswordUrl: string;
119
- };
120
- /** @deprecated shop-specific storefront.redis config is being removed in favor of global nitro.storage config */
121
- redis?: RedisConfig;
122
- bapi?: BapiConfig;
123
- appKeys?: AppKeys;
124
- storage?: StorageConfig;
125
- idp?: IDPConfig;
126
- }
127
- type ShopConfigIndexed = Record<string, ShopConfig>;
128
- interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'path' | 'locale' | 'currency' | 'currencyFractionDigits'> {
129
- checkout: Pick<CheckoutShopConfig, 'host'>;
130
- apiBasePath: string;
131
- idp?: IDPConfig;
132
- }
133
- interface StorefrontConfig {
134
- session?: SessionConfig;
135
- bapi: BapiConfig;
136
- /** @deprecated Global storefront.redis config is being removed in favor of `storefront.storage` config */
137
- redis?: RedisConfig;
138
- storage?: StorageConfig;
139
- oauth: OauthConfig;
140
- appKeys: AppKeys;
141
- apiBasePath?: string;
142
- cache?: CacheConfig;
143
- publicShopData?: (keyof AdditionalShopConfig)[];
144
- withParams?: WithParams;
145
- idp?: IDPConfig;
146
- }
147
- type ModuleOptions = StorefrontConfig & {
148
- shopSelector: 'domain' | 'path' | 'path_or_default';
149
- stores: ShopConfigIndexed;
150
- rpcDir?: string;
151
- rpcMethodNames?: string[];
152
- rpcMethodOverrides?: Array<keyof typeof rpcMethods>;
153
- redirects?: RedirectsConfig;
154
- };
155
- interface CheckoutEvent {
156
- action?: 'authenticated';
157
- type?: 'tracking';
158
- user: ShopUser;
159
- accessToken: string;
160
- event?: {
161
- event: 'login' | 'add_to_cart' | 'remove_from_cart';
162
- status: 'successful' | 'error';
163
- };
164
- }
165
- interface ModulePublicRuntimeConfig {
166
- log: {
167
- name: string;
168
- level: LogLevel;
169
- };
170
- }
171
- declare module '@nuxt/schema' {
172
- interface RuntimeConfig {
173
- storefront: ModuleOptions;
174
- }
175
- interface PublicRuntimeConfig {
176
- storefront: ModulePublicRuntimeConfig;
177
- }
178
- }
179
- declare module 'nitropack' {
180
- interface NitroRuntimeHooks {
181
- 'storefront:context:created': (context: RpcContext) => HookResult;
182
- }
183
- }
184
-
185
- export type { AppKeys as A, BapiConfig as B, CheckoutShopConfig as C, ModuleOptions as M, OauthConfig as O, PublicShopConfig as P, RedisConfig as R, StorageProvider as S, SessionConfig as a, CacheConfig as b, StorageEntity as c, StorageConfig as d, RedirectsConfig as e, AdditionalShopConfig as f, ShopConfig as g, ShopConfigIndexed as h, StorefrontConfig as i, CheckoutEvent as j, ModulePublicRuntimeConfig as k };