@scayle/storefront-nuxt 7.59.0 → 7.60.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 +16 -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 +7 -15
- package/dist/rpc.d.mts +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/runtime/nitro/plugins/nitroLogger.mjs +3 -6
- package/dist/runtime/nitro/plugins/nitroRuntimeStorageConfig.mjs +2 -5
- package/dist/shared/{storefront-nuxt.32ffc293.d.mts → storefront-nuxt.747e8a0a.d.mts} +9 -20
- package/dist/shared/{storefront-nuxt.32ffc293.d.ts → storefront-nuxt.747e8a0a.d.ts} +9 -20
- package/dist/types.d.mts +4 -2
- package/dist/types.d.ts +4 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.60.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ### Log Configuration changes
|
|
8
|
+
|
|
9
|
+
Consolidate the logging configuration for `@scayle/storefront-nuxt`.
|
|
10
|
+
|
|
11
|
+
Going forward, the logging needs to be configured on the public runtime that you can control through the `NUXT_PUBLIC_STOREFRONT_LOG_NAME` and `NUXT_PUBLIC_STOREFRONT_LOG_LEVEL` override parameters.
|
|
12
|
+
|
|
13
|
+
We have also removed this setting from the module options and the private runtime to prevent misconfigurations.
|
|
14
|
+
|
|
15
|
+
### Authentication Config
|
|
16
|
+
|
|
17
|
+
We removed the authentication config as it's not required for the Storefront Nuxt application.
|
|
18
|
+
|
|
3
19
|
## 7.59.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { f as AdditionalShopConfig, A as AppKeys, B as BapiConfig, b as CacheConfig, j as CheckoutEvent, C as CheckoutShopConfig, M as ModuleOptions, k as ModulePublicRuntimeConfig, O as OauthConfig, P as PublicShopConfig, e as RedirectsConfig, R as RedisConfig, a as SessionConfig, g as ShopConfig, h as ShopConfigIndexed, d as StorageConfig, c as StorageEntity, S as StorageProvider, i as StorefrontConfig } from './shared/storefront-nuxt.747e8a0a.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 {
|
|
1
|
+
export { f as AdditionalShopConfig, A as AppKeys, B as BapiConfig, b as CacheConfig, j as CheckoutEvent, C as CheckoutShopConfig, M as ModuleOptions, k as ModulePublicRuntimeConfig, O as OauthConfig, P as PublicShopConfig, e as RedirectsConfig, R as RedisConfig, a as SessionConfig, g as ShopConfig, h as ShopConfigIndexed, d as StorageConfig, c as StorageEntity, S as StorageProvider, i as StorefrontConfig } from './shared/storefront-nuxt.747e8a0a.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 ModuleOptions } from './shared/storefront-nuxt.
|
|
3
|
-
export {
|
|
2
|
+
import { M as ModuleOptions } from './shared/storefront-nuxt.747e8a0a.mjs';
|
|
3
|
+
export { f as AdditionalShopConfig, A as AppKeys, B as BapiConfig, b as CacheConfig, j as CheckoutEvent, C as CheckoutShopConfig, k as ModulePublicRuntimeConfig, O as OauthConfig, P as PublicShopConfig, e as RedirectsConfig, R as RedisConfig, a as SessionConfig, g as ShopConfig, h as ShopConfigIndexed, d as StorageConfig, c as StorageEntity, S as StorageProvider, i as StorefrontConfig } from './shared/storefront-nuxt.747e8a0a.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 ModuleOptions } from './shared/storefront-nuxt.
|
|
3
|
-
export {
|
|
2
|
+
import { M as ModuleOptions } from './shared/storefront-nuxt.747e8a0a.js';
|
|
3
|
+
export { f as AdditionalShopConfig, A as AppKeys, B as BapiConfig, b as CacheConfig, j as CheckoutEvent, C as CheckoutShopConfig, k as ModulePublicRuntimeConfig, O as OauthConfig, P as PublicShopConfig, e as RedirectsConfig, R as RedisConfig, a as SessionConfig, g as ShopConfig, h as ShopConfigIndexed, d as StorageConfig, c as StorageEntity, S as StorageProvider, i as StorefrontConfig } from './shared/storefront-nuxt.747e8a0a.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
|
@@ -62,21 +62,11 @@ const module = defineNuxtModule({
|
|
|
62
62
|
// maxAge: undefined,
|
|
63
63
|
},
|
|
64
64
|
bapi: {
|
|
65
|
-
host: "
|
|
65
|
+
host: "",
|
|
66
66
|
token: ""
|
|
67
67
|
},
|
|
68
68
|
shopSelector: "domain",
|
|
69
69
|
stores: {},
|
|
70
|
-
log: {
|
|
71
|
-
name: "",
|
|
72
|
-
level: "debug"
|
|
73
|
-
},
|
|
74
|
-
auth: {
|
|
75
|
-
redirect: {
|
|
76
|
-
home: "/",
|
|
77
|
-
logout: "/"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
70
|
oauth: {
|
|
81
71
|
apiHost: "",
|
|
82
72
|
clientId: "",
|
|
@@ -100,10 +90,12 @@ const module = defineNuxtModule({
|
|
|
100
90
|
nuxt.options.runtimeConfig.storefront,
|
|
101
91
|
options
|
|
102
92
|
);
|
|
103
|
-
nuxt.options.runtimeConfig.public.storefront = {
|
|
104
|
-
log:
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
nuxt.options.runtimeConfig.public.storefront = defu(nuxt.options.runtimeConfig.public.storefront, {
|
|
94
|
+
log: {
|
|
95
|
+
name: "storefront-nuxt",
|
|
96
|
+
level: "info"
|
|
97
|
+
}
|
|
98
|
+
});
|
|
107
99
|
extendViteConfig((config) => {
|
|
108
100
|
config.optimizeDeps = config.optimizeDeps || {};
|
|
109
101
|
config.optimizeDeps.include = config.optimizeDeps.include || [];
|
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.747e8a0a.mjs';
|
|
4
4
|
import '@scayle/unstorage-compression-driver';
|
|
5
5
|
import 'unstorage';
|
|
6
6
|
|
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.747e8a0a.js';
|
|
4
4
|
import '@scayle/unstorage-compression-driver';
|
|
5
5
|
import 'unstorage';
|
|
6
6
|
|
|
@@ -3,12 +3,9 @@ import createLog from "../../createLog.mjs";
|
|
|
3
3
|
import { defineNitroPlugin, useRuntimeConfig } from "#imports";
|
|
4
4
|
export default defineNitroPlugin((nitroApp) => {
|
|
5
5
|
const config = useRuntimeConfig();
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
config.storefront.log.level
|
|
10
|
-
);
|
|
11
|
-
log.info(`Logger instance created. Level: ${config.storefront.log.level}`);
|
|
6
|
+
const logConfig = config.public.storefront.log;
|
|
7
|
+
const log = createLog(createConsola, logConfig.name, logConfig.level);
|
|
8
|
+
log.info(`Logger instance created. Level: ${logConfig.level}`);
|
|
12
9
|
nitroApp.hooks.hook("request", (event) => {
|
|
13
10
|
event.context.$log = log;
|
|
14
11
|
});
|
|
@@ -121,11 +121,8 @@ function getShopSessionConfig(config, shop, log) {
|
|
|
121
121
|
export default defineNitroPlugin(() => {
|
|
122
122
|
const storage = useStorage();
|
|
123
123
|
const config = useRuntimeConfig();
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
config.storefront.log.name,
|
|
127
|
-
config.storefront.log.level
|
|
128
|
-
);
|
|
124
|
+
const logConfig = config.public.storefront.log;
|
|
125
|
+
const log = createLog(createConsola, logConfig.name, logConfig.level);
|
|
129
126
|
const shops = config.storefront.stores;
|
|
130
127
|
try {
|
|
131
128
|
const globalCacheConfig = getCacheConfig(config, log);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HashAlgorithm, IDPConfig, WithParams, ShopUser, LogLevel } from '@scayle/storefront-core';
|
|
2
2
|
import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
3
|
import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
4
|
|
|
@@ -98,12 +98,6 @@ interface OauthConfig {
|
|
|
98
98
|
clientId: string;
|
|
99
99
|
clientSecret: string;
|
|
100
100
|
}
|
|
101
|
-
type AuthenticationConfig = {
|
|
102
|
-
redirect: {
|
|
103
|
-
home: string;
|
|
104
|
-
logout: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
101
|
interface AdditionalShopConfig {
|
|
108
102
|
}
|
|
109
103
|
interface ShopConfig extends AdditionalShopConfig {
|
|
@@ -140,7 +134,6 @@ interface StorefrontConfig {
|
|
|
140
134
|
/** @deprecated Global storefront.redis config is being removed in favor of `storefront.storage` config */
|
|
141
135
|
redis?: RedisConfig;
|
|
142
136
|
storage?: StorageConfig;
|
|
143
|
-
auth: AuthenticationConfig;
|
|
144
137
|
oauth: OauthConfig;
|
|
145
138
|
appKeys: AppKeys;
|
|
146
139
|
apiBasePath?: string;
|
|
@@ -154,10 +147,6 @@ type ModuleOptions = StorefrontConfig & {
|
|
|
154
147
|
stores: ShopConfigIndexed;
|
|
155
148
|
rpcDir?: string;
|
|
156
149
|
rpcMethodNames?: string[];
|
|
157
|
-
log: {
|
|
158
|
-
name: string;
|
|
159
|
-
level: LogLevel;
|
|
160
|
-
};
|
|
161
150
|
redirects?: RedirectsConfig;
|
|
162
151
|
};
|
|
163
152
|
interface CheckoutEvent {
|
|
@@ -170,19 +159,19 @@ interface CheckoutEvent {
|
|
|
170
159
|
status: 'successful' | 'error';
|
|
171
160
|
};
|
|
172
161
|
}
|
|
162
|
+
interface ModulePublicRuntimeConfig {
|
|
163
|
+
log: {
|
|
164
|
+
name: string;
|
|
165
|
+
level: LogLevel;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
173
168
|
declare module '@nuxt/schema' {
|
|
174
169
|
interface RuntimeConfig {
|
|
175
170
|
storefront: ModuleOptions;
|
|
176
171
|
}
|
|
177
172
|
interface PublicRuntimeConfig {
|
|
178
|
-
storefront:
|
|
179
|
-
log: {
|
|
180
|
-
name: string;
|
|
181
|
-
level: LogLevel;
|
|
182
|
-
};
|
|
183
|
-
auth: AuthenticationConfig;
|
|
184
|
-
};
|
|
173
|
+
storefront: ModulePublicRuntimeConfig;
|
|
185
174
|
}
|
|
186
175
|
}
|
|
187
176
|
|
|
188
|
-
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,
|
|
177
|
+
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HashAlgorithm, IDPConfig, WithParams, ShopUser, LogLevel } from '@scayle/storefront-core';
|
|
2
2
|
import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
3
|
import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
4
|
|
|
@@ -98,12 +98,6 @@ interface OauthConfig {
|
|
|
98
98
|
clientId: string;
|
|
99
99
|
clientSecret: string;
|
|
100
100
|
}
|
|
101
|
-
type AuthenticationConfig = {
|
|
102
|
-
redirect: {
|
|
103
|
-
home: string;
|
|
104
|
-
logout: string;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
101
|
interface AdditionalShopConfig {
|
|
108
102
|
}
|
|
109
103
|
interface ShopConfig extends AdditionalShopConfig {
|
|
@@ -140,7 +134,6 @@ interface StorefrontConfig {
|
|
|
140
134
|
/** @deprecated Global storefront.redis config is being removed in favor of `storefront.storage` config */
|
|
141
135
|
redis?: RedisConfig;
|
|
142
136
|
storage?: StorageConfig;
|
|
143
|
-
auth: AuthenticationConfig;
|
|
144
137
|
oauth: OauthConfig;
|
|
145
138
|
appKeys: AppKeys;
|
|
146
139
|
apiBasePath?: string;
|
|
@@ -154,10 +147,6 @@ type ModuleOptions = StorefrontConfig & {
|
|
|
154
147
|
stores: ShopConfigIndexed;
|
|
155
148
|
rpcDir?: string;
|
|
156
149
|
rpcMethodNames?: string[];
|
|
157
|
-
log: {
|
|
158
|
-
name: string;
|
|
159
|
-
level: LogLevel;
|
|
160
|
-
};
|
|
161
150
|
redirects?: RedirectsConfig;
|
|
162
151
|
};
|
|
163
152
|
interface CheckoutEvent {
|
|
@@ -170,19 +159,19 @@ interface CheckoutEvent {
|
|
|
170
159
|
status: 'successful' | 'error';
|
|
171
160
|
};
|
|
172
161
|
}
|
|
162
|
+
interface ModulePublicRuntimeConfig {
|
|
163
|
+
log: {
|
|
164
|
+
name: string;
|
|
165
|
+
level: LogLevel;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
173
168
|
declare module '@nuxt/schema' {
|
|
174
169
|
interface RuntimeConfig {
|
|
175
170
|
storefront: ModuleOptions;
|
|
176
171
|
}
|
|
177
172
|
interface PublicRuntimeConfig {
|
|
178
|
-
storefront:
|
|
179
|
-
log: {
|
|
180
|
-
name: string;
|
|
181
|
-
level: LogLevel;
|
|
182
|
-
};
|
|
183
|
-
auth: AuthenticationConfig;
|
|
184
|
-
};
|
|
173
|
+
storefront: ModulePublicRuntimeConfig;
|
|
185
174
|
}
|
|
186
175
|
}
|
|
187
176
|
|
|
188
|
-
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,
|
|
177
|
+
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 };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
import type { ModuleOptions } from './module.js'
|
|
2
|
+
import type { ModuleOptions, ModulePublicRuntimeConfig } from './module.js'
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
declare module '@nuxt/schema' {
|
|
6
6
|
interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
|
|
7
7
|
interface NuxtOptions { ['storefront']?: ModuleOptions }
|
|
8
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
declare module 'nuxt/schema' {
|
|
11
12
|
interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
|
|
12
13
|
interface NuxtOptions { ['storefront']?: ModuleOptions }
|
|
14
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
export type { AdditionalShopConfig, AppKeys,
|
|
18
|
+
export type { AdditionalShopConfig, AppKeys, BapiConfig, CacheConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, OauthConfig, PublicShopConfig, RedirectsConfig, RedisConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
import type { ModuleOptions } from './module'
|
|
2
|
+
import type { ModuleOptions, ModulePublicRuntimeConfig } from './module'
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
declare module '@nuxt/schema' {
|
|
6
6
|
interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
|
|
7
7
|
interface NuxtOptions { ['storefront']?: ModuleOptions }
|
|
8
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
declare module 'nuxt/schema' {
|
|
11
12
|
interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
|
|
12
13
|
interface NuxtOptions { ['storefront']?: ModuleOptions }
|
|
14
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
export type { AdditionalShopConfig, AppKeys,
|
|
18
|
+
export type { AdditionalShopConfig, AppKeys, BapiConfig, CacheConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, OauthConfig, PublicShopConfig, RedirectsConfig, 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.
|
|
4
|
+
"version": "7.60.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@types/node": "20.11.20",
|
|
88
88
|
"eslint": "8.57.0",
|
|
89
89
|
"eslint-formatter-gitlab": "5.1.0",
|
|
90
|
-
"h3": "1.11.
|
|
90
|
+
"h3": "1.11.1",
|
|
91
91
|
"node-mocks-http": "1.14.1",
|
|
92
92
|
"nuxt": "3.10.2",
|
|
93
93
|
"prettier": "3.0.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"vue": ">=3.4.0"
|
|
103
103
|
},
|
|
104
104
|
"resolutions": {
|
|
105
|
-
"h3": "1.11.
|
|
105
|
+
"h3": "1.11.1",
|
|
106
106
|
"@vue/compiler-core": "3.4.19",
|
|
107
107
|
"@vue/shared": "3.4.19",
|
|
108
108
|
"@vue/compiler-dom": "3.4.19",
|