@scayle/storefront-nuxt 7.58.1 → 7.58.2
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
package/dist/module.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Session } from '@scayle/h3-session';
|
|
2
2
|
import type { RuntimeConfig } from '@nuxt/schema';
|
|
3
|
+
import { type H3Event } from 'h3';
|
|
3
4
|
import type { Log, RpcContext, Cache as CacheInterface } from '@scayle/storefront-core';
|
|
4
5
|
import type { ShopConfig, StorefrontConfig } from '../module';
|
|
5
6
|
export interface ContextBuilderOptions {
|
|
@@ -10,5 +11,6 @@ export interface ContextBuilderOptions {
|
|
|
10
11
|
sessionId?: string;
|
|
11
12
|
session?: Session;
|
|
12
13
|
config: RuntimeConfig;
|
|
14
|
+
event: H3Event;
|
|
13
15
|
}
|
|
14
16
|
export declare const buildContext: (context: ContextBuilderOptions) => Promise<RpcContext>;
|
package/dist/runtime/context.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getRequestIP } from "h3";
|
|
1
2
|
import { Cached } from "@scayle/storefront-core";
|
|
2
3
|
import { init as initBapi } from "@scayle/storefront-core/dist/bapi/init";
|
|
3
4
|
import {
|
|
@@ -69,7 +70,7 @@ async function sessionProperties(context) {
|
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
export const buildContext = async (context) => {
|
|
72
|
-
const { $cache, $shopConfig, $storefront, $log, config } = context;
|
|
73
|
+
const { $cache, $shopConfig, $storefront, $log, config, event } = context;
|
|
73
74
|
const bapiConfig = $shopConfig.bapi ?? $storefront.bapi;
|
|
74
75
|
const appKeys = $shopConfig.appKeys ?? $storefront.appKeys;
|
|
75
76
|
const idpConfig = $shopConfig.idp ?? $storefront.idp;
|
|
@@ -121,6 +122,7 @@ export const buildContext = async (context) => {
|
|
|
121
122
|
domain: $shopConfig.domain,
|
|
122
123
|
withParams: $storefront.withParams,
|
|
123
124
|
campaignKey: $shopConfig.storeCampaignKeyword,
|
|
124
|
-
runtimeConfiguration: config
|
|
125
|
+
runtimeConfiguration: config,
|
|
126
|
+
ip: getRequestIP(event, { xForwardedFor: true })
|
|
125
127
|
};
|
|
126
128
|
};
|
|
@@ -96,7 +96,8 @@ async function bootstrap(event, url, $shopConfig, $storefrontConfig, apiBasePath
|
|
|
96
96
|
$log: log,
|
|
97
97
|
sessionId: cacheableRoute ? void 0 : event.context.sessionId,
|
|
98
98
|
session: cacheableRoute ? void 0 : event.context.session,
|
|
99
|
-
config
|
|
99
|
+
config,
|
|
100
|
+
event
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
export default defineEventHandler(async (event) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.58.
|
|
4
|
+
"version": "7.58.2",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@scayle/h3-session": "0.3.5",
|
|
65
65
|
"@scayle/storefront-core": "7.42.1",
|
|
66
66
|
"@scayle/unstorage-compression-driver": "0.1.2",
|
|
67
|
-
"@vueuse/core": "10.
|
|
67
|
+
"@vueuse/core": "10.8.0",
|
|
68
68
|
"consola": "3.2.3",
|
|
69
69
|
"core-js": "3.36.0",
|
|
70
70
|
"defu": "6.1.4",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"knitwork": "1.0.0",
|
|
73
73
|
"nitropack": "2.8.1",
|
|
74
74
|
"ofetch": "1.3.3",
|
|
75
|
-
"radash": "
|
|
75
|
+
"radash": "12.0.0",
|
|
76
76
|
"uncrypto": "0.1.3",
|
|
77
77
|
"unstorage": "1.10.1",
|
|
78
78
|
"vue-router": "4.2.5",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"nuxt": "3.10.2",
|
|
93
93
|
"prettier": "3.0.0",
|
|
94
94
|
"publint": "0.2.7",
|
|
95
|
-
"vitest": "1.3.
|
|
95
|
+
"vitest": "1.3.1",
|
|
96
96
|
"vue-tsc": "1.8.27"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|