@akinon/next 1.82.0-rc.14 → 1.82.0-rc.16

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,54 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.82.0-rc.16
4
+
5
+ ### Minor Changes
6
+
7
+ - 757ee539: ZERO-3207: Add SMS send & verify endpoints with state management
8
+ - 6f506af: ZERO-3229: Implement mini basket query for basket total quantity
9
+ - 5dfeea04: ZERO-2801: Revert ZERO-2801
10
+ - 2d9b2b2c: ZERO-2816: Add segment to headers
11
+ - 5e1feca: Revert "ZERO-3286: Add notFound handling for chunk URLs starting with \_next"
12
+ - c0c1962: ZERO-3258: Add new API endpoints for fetching Bukalemun image URL and bundle product data
13
+ - 40a46853: ZERO-3182: Optimize basket update mutation with optimistic update
14
+ - f49bb74f: ZERO-3097: Add setCookie to logging in payment redirection middlewares
15
+ - 0e05135: ZERO-3244: Encode URL search parameters
16
+ - e9541a13: ZERO-2816: Add headers to url
17
+ - 4d3deb4f: ZERO-2935: sentry 8 upgrade
18
+ - 72fd4d67: ZERO-3084: Fix URL search parameters encoding in default middleware
19
+ - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
20
+ - 64699d3f: ZERO-2761: Fix invalid import for plugin module
21
+ - 9abd011: ZERO-3267: Refactor error handling in ErrorPage component to set error details in Sentry scope
22
+ - 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
23
+ - d552629: ZERO-3182: Refactor basketApi to use invalidatesTags and comment out onQueryStarted logic
24
+ - c3b2f3f: ZERO-3267: Enable sentry client errors and filter them by log type
25
+ - 17f87524: ZERO-2816: Make the incoming currency lowercase
26
+ - 65d3b862: ZERO-3054: Update headers in appFetch
27
+ - bbe18b9f: ZERO-2575: Fix build error
28
+ - 17bfadc: ZERO-3275: Disable OpenTelemetry monitoring in production environment
29
+ - 4920742c: Disable getCachedTranslations
30
+ - b6e5b62: ZERO-3257: Enhance locale middleware to redirect using existing or default locale and support 303 status for POST requests
31
+ - ac65ca9: ZERO-3269: Enhance locale handling by adding Subdomain strategy and updating related functions
32
+ - 7e56d6b6: ZERO-2841: Update api tagTypes
33
+ - 43c182ee: ZERO-3054: Update Redis variable checks to conditionally include CACHE_SECRET
34
+ - 2d305aaf: ZERO-2935: Update Sentry configuration: remove hideSourceMaps option and add it to withPzConfig
35
+ - eeb20bea: Revert "ZERO-3054: Refactor cache handler to use custom Redis handler and implement key hashing"
36
+ - 3bf63c8: ZERO-3286: Add notFound handling for chunk URLs starting with \_next
37
+ - 9be2c08: ZERO-3243: Improve basket update query handling with optimistic updates
38
+ - f2c92d5c: ZERO-2816: Update cookie name
39
+ - 2f3588f: ZERO-3287: Add user session handling in authentication flow
40
+ - 7bd3d992: ZERO-2801: Refactor locale middleware to handle single locale configuration
41
+ - fdd255ee: ZERO-3054: Refactor cache handler to use custom Redis handler and implement key hashing
42
+ - 0b1bd07: ZERO-3240: Remove unused preOrderMiddleware
43
+ - 49eeebfa: ZERO-2909: Add deleteCollectionItem query to wishlistApi
44
+ - 3f9b8d7e: ZERO-2761: Update plugins.js for akinon-next
45
+
46
+ ## 1.82.0-rc.15
47
+
48
+ ### Minor Changes
49
+
50
+ - 2f3588fb: ZERO-3287: Add user session handling in authentication flow
51
+
3
52
  ## 1.82.0-rc.14
4
53
 
5
54
  ### Minor Changes
package/api/auth.ts CHANGED
@@ -99,6 +99,21 @@ const nextAuthOptions = (req: NextApiRequest, res: NextApiResponse) => {
99
99
  userIp
100
100
  });
101
101
 
102
+ const checkCurrentUser = await getCurrentUser(
103
+ req.cookies['osessionid'] ?? '',
104
+ req.cookies['pz-currency'] ?? ''
105
+ );
106
+
107
+ if (checkCurrentUser?.pk) {
108
+ const sessionCookie = headers
109
+ .get('cookie')
110
+ ?.match(/osessionid=\w+/)?.[0]
111
+ .replace(/osessionid=/, '');
112
+ if (sessionCookie) {
113
+ headers.set('cookie', sessionCookie);
114
+ }
115
+ }
116
+
102
117
  const apiRequest = await fetch(
103
118
  `${Settings.commerceUrl}${user[credentials.formType]}`,
104
119
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.82.0-rc.14",
4
+ "version": "1.82.0-rc.16",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "set-cookie-parser": "2.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@akinon/eslint-plugin-projectzero": "1.82.0-rc.14",
33
+ "@akinon/eslint-plugin-projectzero": "1.82.0-rc.16",
34
34
  "@types/react-redux": "7.1.30",
35
35
  "@types/set-cookie-parser": "2.4.7",
36
36
  "@typescript-eslint/eslint-plugin": "6.7.4",