@akinon/next 1.60.0-rc.17 → 1.60.0-rc.19
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 +12 -0
- package/bin/pz-install-plugins.js +0 -0
- package/bin/pz-install-theme.js +0 -0
- package/bin/pz-postbuild.js +0 -0
- package/bin/pz-postdev.js +0 -0
- package/bin/pz-postinstall.js +0 -0
- package/bin/pz-poststart.js +0 -0
- package/bin/pz-prebuild.js +0 -0
- package/bin/pz-predev.js +0 -0
- package/bin/pz-prestart.js +0 -0
- package/middlewares/complete-gpay.ts +1 -1
- package/middlewares/complete-masterpass.ts +1 -1
- package/middlewares/currency.ts +2 -1
- package/middlewares/three-d-redirection.ts +1 -1
- package/package.json +2 -2
- package/types/index.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 1.60.0-rc.19
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 48d508fd: ZERO-2989: refine cookie header in payment middlewares
|
|
8
|
+
|
|
9
|
+
## 1.60.0-rc.18
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- e6f3653e: ZERO-2985: Add resetBasketOnCurrencyChange option to Settings
|
|
14
|
+
|
|
3
15
|
## 1.60.0-rc.17
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
File without changes
|
package/bin/pz-install-theme.js
CHANGED
|
File without changes
|
package/bin/pz-postbuild.js
CHANGED
|
File without changes
|
package/bin/pz-postdev.js
CHANGED
|
File without changes
|
package/bin/pz-postinstall.js
CHANGED
|
File without changes
|
package/bin/pz-poststart.js
CHANGED
|
File without changes
|
package/bin/pz-prebuild.js
CHANGED
|
File without changes
|
package/bin/pz-predev.js
CHANGED
|
File without changes
|
package/bin/pz-prestart.js
CHANGED
|
File without changes
|
|
@@ -43,7 +43,7 @@ const withCompleteGpay =
|
|
|
43
43
|
const requestHeaders = {
|
|
44
44
|
'X-Requested-With': 'XMLHttpRequest',
|
|
45
45
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
46
|
-
Cookie:
|
|
46
|
+
Cookie: req.headers.get('cookie') ?? '',
|
|
47
47
|
'x-currency': req.cookies.get('pz-currency')?.value ?? '',
|
|
48
48
|
'x-forwarded-for': ip
|
|
49
49
|
};
|
|
@@ -43,7 +43,7 @@ const withCompleteMasterpass =
|
|
|
43
43
|
const requestHeaders = {
|
|
44
44
|
'X-Requested-With': 'XMLHttpRequest',
|
|
45
45
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
46
|
-
Cookie:
|
|
46
|
+
Cookie: req.headers.get('cookie') ?? '',
|
|
47
47
|
'x-currency': req.cookies.get('pz-currency')?.value ?? '',
|
|
48
48
|
'x-forwarded-for': ip
|
|
49
49
|
};
|
package/middlewares/currency.ts
CHANGED
|
@@ -75,7 +75,8 @@ const withCurrency =
|
|
|
75
75
|
url.pathname.match(urlLocaleMatcherRegex) &&
|
|
76
76
|
!url.search.includes('mobile_app=true') &&
|
|
77
77
|
!url.search.includes('page=CreditCardThreeDSecurePage') &&
|
|
78
|
-
!url.search.includes('page=RedirectionPageCompletePage')
|
|
78
|
+
!url.search.includes('page=RedirectionPageCompletePage') &&
|
|
79
|
+
settings.resetBasketOnCurrencyChange !== false
|
|
79
80
|
) {
|
|
80
81
|
logger.info('Currency changed. Resetting basket...', {
|
|
81
82
|
sessionid: req.cookies.get('osessionid')?.value ?? '',
|
|
@@ -43,7 +43,7 @@ const withThreeDRedirection =
|
|
|
43
43
|
const requestHeaders = {
|
|
44
44
|
'X-Requested-With': 'XMLHttpRequest',
|
|
45
45
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
46
|
-
Cookie:
|
|
46
|
+
Cookie: req.headers.get('cookie') ?? '',
|
|
47
47
|
'x-currency': req.cookies.get('pz-currency')?.value ?? '',
|
|
48
48
|
'x-forwarded-for': ip
|
|
49
49
|
};
|
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.60.0-rc.
|
|
4
|
+
"version": "1.60.0-rc.19",
|
|
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.60.0-rc.
|
|
33
|
+
"@akinon/eslint-plugin-projectzero": "1.60.0-rc.19",
|
|
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",
|
package/types/index.ts
CHANGED
|
@@ -194,6 +194,11 @@ export interface Settings {
|
|
|
194
194
|
useOptimizedTranslations?: boolean;
|
|
195
195
|
plugins?: Record<string, Record<string, any>>;
|
|
196
196
|
includedProxyHeaders?: string[];
|
|
197
|
+
/**
|
|
198
|
+
* By default, the currency will be reset when the currency is changed.
|
|
199
|
+
* If you want to keep the basket when the currency is changed, you can set this option to `false`.
|
|
200
|
+
*/
|
|
201
|
+
resetBasketOnCurrencyChange?: boolean;
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
export interface CacheOptions {
|