@scayle/storefront-nuxt 7.66.0 → 7.66.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.66.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix RpcContext containing outdated data for the remainder of the request after mutating the session data
8
+
3
9
  ## 7.66.0
4
10
 
5
11
  ### Minor Changes
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "7.65.1",
3
+ "version": "7.66.0",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -40,7 +40,7 @@ export default {
40
40
  }`;
41
41
  }
42
42
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
43
- const PACKAGE_VERSION = "7.65.1";
43
+ const PACKAGE_VERSION = "7.66.0";
44
44
  const module = defineNuxtModule({
45
45
  meta: {
46
46
  name: PACKAGE_NAME,
@@ -78,7 +78,7 @@ export const buildContext = async (context) => {
78
78
  const bapiConfig = $shopConfig.bapi ?? $storefront.bapi;
79
79
  const appKeys = $shopConfig.appKeys ?? $storefront.appKeys;
80
80
  const idpConfig = $shopConfig.idp ?? $storefront.idp;
81
- return {
81
+ const baseContext = {
82
82
  cached: new Cached($cache, $log, "", $storefront.cache?.enabled ?? true).execute,
83
83
  bapiClient: initBapi({
84
84
  host: bapiConfig.host,
@@ -86,7 +86,6 @@ export const buildContext = async (context) => {
86
86
  authentication: "token",
87
87
  token: bapiConfig.token
88
88
  }),
89
- ...await sessionProperties(context),
90
89
  auth: {
91
90
  resetPasswordUrl: $shopConfig.auth?.resetPasswordUrl
92
91
  },
@@ -130,4 +129,8 @@ export const buildContext = async (context) => {
130
129
  ip: getRequestIP(event, { xForwardedFor: true }),
131
130
  headers: createAndPurifyHeaders(getRequestHeaders(event))
132
131
  };
132
+ return Object.defineProperties({}, {
133
+ ...Object.getOwnPropertyDescriptors(baseContext),
134
+ ...Object.getOwnPropertyDescriptors(await sessionProperties(context))
135
+ });
133
136
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.66.0",
4
+ "version": "7.66.1",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",