@akinon/next 2.0.0-beta.2 → 2.0.0-beta.20
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/.eslintrc.js +12 -0
- package/CHANGELOG.md +377 -7
- package/__tests__/next-config.test.ts +83 -0
- package/__tests__/tsconfig.json +23 -0
- package/api/auth.ts +133 -44
- package/api/barcode-search.ts +59 -0
- package/api/cache.ts +41 -5
- package/api/client.ts +21 -4
- package/api/form.ts +85 -0
- package/api/image-proxy.ts +75 -0
- package/api/product-categories.ts +53 -0
- package/api/similar-product-list.ts +63 -0
- package/api/similar-products.ts +111 -0
- package/api/virtual-try-on.ts +382 -0
- package/assets/styles/index.scss +84 -0
- package/babel.config.js +6 -0
- package/bin/pz-generate-routes.js +115 -0
- package/bin/pz-prebuild.js +1 -0
- package/bin/pz-predev.js +1 -0
- package/bin/pz-run-tests.js +99 -0
- package/bin/run-prebuild-tests.js +46 -0
- package/components/accordion.tsx +20 -5
- package/components/button.tsx +51 -36
- package/components/client-root.tsx +138 -2
- package/components/file-input.tsx +65 -3
- package/components/index.ts +1 -0
- package/components/input.tsx +1 -1
- package/components/link.tsx +46 -16
- package/components/logger-popup.tsx +213 -0
- package/components/modal.tsx +32 -16
- package/components/plugin-module.tsx +62 -3
- package/components/price.tsx +2 -2
- package/components/select.tsx +1 -1
- package/components/selected-payment-option-view.tsx +21 -0
- package/components/theme-editor/blocks/accordion-block.tsx +136 -0
- package/components/theme-editor/blocks/block-renderer-registry.tsx +77 -0
- package/components/theme-editor/blocks/button-block.tsx +593 -0
- package/components/theme-editor/blocks/counter-block.tsx +348 -0
- package/components/theme-editor/blocks/divider-block.tsx +20 -0
- package/components/theme-editor/blocks/embed-block.tsx +208 -0
- package/components/theme-editor/blocks/group-block.tsx +116 -0
- package/components/theme-editor/blocks/hotspot-block.tsx +147 -0
- package/components/theme-editor/blocks/icon-block.tsx +230 -0
- package/components/theme-editor/blocks/image-block.tsx +137 -0
- package/components/theme-editor/blocks/image-gallery-block.tsx +269 -0
- package/components/theme-editor/blocks/input-block.tsx +123 -0
- package/components/theme-editor/blocks/link-block.tsx +216 -0
- package/components/theme-editor/blocks/lottie-block.tsx +325 -0
- package/components/theme-editor/blocks/map-block.tsx +89 -0
- package/components/theme-editor/blocks/slider-block.tsx +595 -0
- package/components/theme-editor/blocks/tab-block.tsx +10 -0
- package/components/theme-editor/blocks/text-block.tsx +52 -0
- package/components/theme-editor/blocks/video-block.tsx +122 -0
- package/components/theme-editor/components/action-toolbar.tsx +305 -0
- package/components/theme-editor/components/designer-overlay.tsx +74 -0
- package/components/theme-editor/components/with-designer-features.tsx +142 -0
- package/components/theme-editor/dynamic-font-loader.tsx +79 -0
- package/components/theme-editor/hooks/use-designer-features.tsx +100 -0
- package/components/theme-editor/hooks/use-external-designer.tsx +95 -0
- package/components/theme-editor/hooks/use-native-widget-data.ts +188 -0
- package/components/theme-editor/hooks/use-visibility-context.ts +27 -0
- package/components/theme-editor/placeholder-registry.ts +31 -0
- package/components/theme-editor/sections/before-after-section.tsx +245 -0
- package/components/theme-editor/sections/contact-form-section.tsx +563 -0
- package/components/theme-editor/sections/countdown-campaign-banner-section.tsx +433 -0
- package/components/theme-editor/sections/coupon-banner-section.tsx +710 -0
- package/components/theme-editor/sections/divider-section.tsx +62 -0
- package/components/theme-editor/sections/featured-product-spotlight-section.tsx +507 -0
- package/components/theme-editor/sections/find-in-store-section.tsx +1995 -0
- package/components/theme-editor/sections/hover-showcase-section.tsx +326 -0
- package/components/theme-editor/sections/image-hotspot-section.tsx +142 -0
- package/components/theme-editor/sections/installment-options-section.tsx +1065 -0
- package/components/theme-editor/sections/notification-banner-section.tsx +173 -0
- package/components/theme-editor/sections/order-tracking-lookup-section.tsx +1379 -0
- package/components/theme-editor/sections/posts-slider-section.tsx +472 -0
- package/components/theme-editor/sections/pre-order-launch-banner-section.tsx +663 -0
- package/components/theme-editor/sections/section-renderer-registry.tsx +89 -0
- package/components/theme-editor/sections/section-wrapper.tsx +135 -0
- package/components/theme-editor/sections/shipping-threshold-progress-section.tsx +586 -0
- package/components/theme-editor/sections/stats-counter-section.tsx +486 -0
- package/components/theme-editor/sections/tabs-section.tsx +578 -0
- package/components/theme-editor/theme-block.tsx +102 -0
- package/components/theme-editor/theme-placeholder-client.tsx +218 -0
- package/components/theme-editor/theme-placeholder-wrapper.tsx +732 -0
- package/components/theme-editor/theme-placeholder.tsx +288 -0
- package/components/theme-editor/theme-section.tsx +1224 -0
- package/components/theme-editor/theme-settings-context.tsx +13 -0
- package/components/theme-editor/utils/index.ts +792 -0
- package/components/theme-editor/utils/iterator-utils.ts +234 -0
- package/components/theme-editor/utils/publish-window.ts +86 -0
- package/components/theme-editor/utils/visibility-rules.ts +188 -0
- package/data/client/account.ts +17 -2
- package/data/client/api.ts +2 -0
- package/data/client/basket.ts +66 -5
- package/data/client/checkout.ts +391 -99
- package/data/client/misc.ts +38 -2
- package/data/client/product.ts +19 -2
- package/data/client/user.ts +16 -8
- package/data/server/category.ts +11 -9
- package/data/server/flatpage.ts +11 -4
- package/data/server/form.ts +15 -4
- package/data/server/landingpage.ts +11 -4
- package/data/server/list.ts +5 -4
- package/data/server/menu.ts +11 -3
- package/data/server/product.ts +111 -55
- package/data/server/seo.ts +14 -4
- package/data/server/special-page.ts +5 -4
- package/data/server/widget.ts +90 -5
- package/data/urls.ts +16 -5
- package/hocs/client/with-segment-defaults.tsx +2 -2
- package/hocs/server/with-segment-defaults.tsx +65 -20
- package/hooks/index.ts +4 -0
- package/hooks/use-localization.ts +24 -10
- package/hooks/use-logger-context.tsx +114 -0
- package/hooks/use-logger.ts +92 -0
- package/hooks/use-loyalty-availability.ts +21 -0
- package/hooks/use-payment-options.ts +2 -1
- package/hooks/use-pz-params.ts +37 -0
- package/hooks/use-router.ts +51 -14
- package/hooks/use-sentry-uncaught-errors.ts +24 -0
- package/instrumentation/index.ts +10 -1
- package/instrumentation/node.ts +2 -20
- package/jest.config.js +25 -0
- package/lib/cache-handler.mjs +534 -16
- package/lib/cache.ts +272 -37
- package/localization/index.ts +2 -1
- package/localization/provider.tsx +2 -5
- package/middlewares/bfcache-headers.ts +18 -0
- package/middlewares/checkout-provider.ts +1 -1
- package/middlewares/complete-gpay.ts +32 -26
- package/middlewares/complete-masterpass.ts +33 -26
- package/middlewares/complete-wallet.ts +182 -0
- package/middlewares/default.ts +360 -215
- package/middlewares/index.ts +10 -2
- package/middlewares/locale.ts +34 -11
- package/middlewares/masterpass-rest-callback.ts +230 -0
- package/middlewares/oauth-login.ts +200 -57
- package/middlewares/pretty-url.ts +21 -8
- package/middlewares/redirection-payment.ts +32 -26
- package/middlewares/saved-card-redirection.ts +33 -26
- package/middlewares/three-d-redirection.ts +32 -26
- package/middlewares/url-redirection.ts +11 -1
- package/middlewares/wallet-complete-redirection.ts +206 -0
- package/package.json +25 -10
- package/plugins.d.ts +19 -4
- package/plugins.js +10 -1
- package/redux/actions.ts +47 -0
- package/redux/middlewares/checkout.ts +63 -138
- package/redux/middlewares/index.ts +14 -10
- package/redux/middlewares/pre-order/address.ts +7 -2
- package/redux/middlewares/pre-order/attribute-based-shipping-option.ts +7 -1
- package/redux/middlewares/pre-order/data-source-shipping-option.ts +7 -1
- package/redux/middlewares/pre-order/delivery-option.ts +7 -1
- package/redux/middlewares/pre-order/index.ts +16 -10
- package/redux/middlewares/pre-order/installment-option.ts +8 -1
- package/redux/middlewares/pre-order/payment-option-reset.ts +37 -0
- package/redux/middlewares/pre-order/payment-option.ts +7 -1
- package/redux/middlewares/pre-order/pre-order-validation.ts +8 -3
- package/redux/middlewares/pre-order/redirection.ts +8 -2
- package/redux/middlewares/pre-order/set-pre-order.ts +6 -2
- package/redux/middlewares/pre-order/shipping-option.ts +7 -1
- package/redux/middlewares/pre-order/shipping-step.ts +5 -1
- package/redux/reducers/checkout.ts +23 -3
- package/redux/reducers/index.ts +11 -3
- package/redux/reducers/root.ts +7 -2
- package/redux/reducers/widget.ts +80 -0
- package/sentry/index.ts +69 -13
- package/tailwind/content.js +16 -0
- package/types/commerce/account.ts +5 -1
- package/types/commerce/checkout.ts +35 -1
- package/types/commerce/widget.ts +33 -0
- package/types/index.ts +101 -6
- package/types/next-auth.d.ts +2 -2
- package/types/widget.ts +80 -0
- package/utils/app-fetch.ts +7 -2
- package/utils/generate-commerce-search-params.ts +3 -2
- package/utils/get-checkout-path.ts +3 -0
- package/utils/get-root-hostname.ts +28 -0
- package/utils/index.ts +64 -10
- package/utils/localization.ts +4 -0
- package/utils/mobile-3d-iframe.ts +8 -2
- package/utils/override-middleware.ts +7 -12
- package/utils/pz-segments.ts +92 -0
- package/utils/redirect-ignore.ts +35 -0
- package/utils/redirect.ts +9 -3
- package/utils/redirection-iframe.ts +8 -2
- package/utils/widget-styles.ts +107 -0
- package/views/error-page.tsx +93 -0
- package/with-pz-config.js +13 -6
package/.eslintrc.js
CHANGED
|
@@ -24,6 +24,18 @@ module.exports = {
|
|
|
24
24
|
parserOptions: {
|
|
25
25
|
sourceType: 'script'
|
|
26
26
|
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
env: {
|
|
30
|
+
node: true
|
|
31
|
+
},
|
|
32
|
+
files: ['redux/middlewares/pre-order/index.ts'],
|
|
33
|
+
rules: {
|
|
34
|
+
'@akinon/projectzero/check-pre-order-middleware-order': 'error'
|
|
35
|
+
},
|
|
36
|
+
parserOptions: {
|
|
37
|
+
sourceType: 'script'
|
|
38
|
+
}
|
|
27
39
|
}
|
|
28
40
|
],
|
|
29
41
|
parser: '@typescript-eslint/parser',
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,392 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
-
## 2.0.0-beta.
|
|
3
|
+
## 2.0.0-beta.20
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- cf3a9901: ZERO-3585: Fix cookie handling for widget builder in ClientRoot component
|
|
8
|
+
- 9076e50e: ZERO-3136: Refactor DynamicWidgetContainer and WidgetContent for improved styling and component tagging
|
|
9
|
+
- d0e1ef78: ZERO-3232: Integrate widget styles generation directly in WidgetPlaceholder
|
|
10
|
+
- 1d10dde2: ZERO-3553: Add alignment style for image components
|
|
11
|
+
- 74c6a237: ZERO-3060: Drag and drop functionality on the site implemented
|
|
12
|
+
|
|
13
|
+
## 1.125.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- cd68a97a: ZERO-4126: Enhance error handling in appFetch and related data handlers to throw notFound on 404 and 422 errors
|
|
18
|
+
|
|
19
|
+
## 1.124.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 929374c5: ZERO-3278: refactor variable names for better readability and consistency
|
|
24
|
+
- 71f8011d: ZERO-3271: remove code repetition in logger functions using closures
|
|
25
|
+
- 9be2c081: ZERO-3243: Improve basket update query handling with optimistic updates
|
|
26
|
+
- bd431e36: ZERO-3278: improve checkout validation error messages for better user guidance
|
|
27
|
+
- 54eac86b: ZERO-3271: add development logger system
|
|
28
|
+
|
|
29
|
+
## 1.123.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- 8218dafa: ZERO-4160: Refactor oauth-login middleware to use fetch for login and callback responses
|
|
34
|
+
- 2a8ddcf6: ZERO-4111: Add total balance field to store credit localization and update related components
|
|
35
|
+
- 8a7fd0f4: ZERO-4065: Add '[segment]' to skipSegments in route generation
|
|
36
|
+
- 36143125: ZERO-3987: Add barcode scanner functionality with modal and button
|
|
37
|
+
- f7e0f646: ZERO-4032: Add bfcache-headers middleware, integrate it into the default chain, and introduce a new environment variable for control.
|
|
38
|
+
- 94a86fcc: ZERO-4065: Expand skipSegments array to include additional segments for route generation
|
|
39
|
+
- bcaad120: ZERO-4158: Add logging for OAuth login and callback redirects
|
|
40
|
+
|
|
41
|
+
## 1.122.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- 823d82f9: ZERO-3393: Enhance error handling in checkout middleware to ensure errors are checked for existence before processing
|
|
46
|
+
- d2c0e759: ZERO-3684: Handle cross-origin iframe access in iframeURLChange function
|
|
47
|
+
- 68bbcb27: ZERO-3393: Fix error handling in checkout middleware to check for errors array length
|
|
48
|
+
- 9b7d0de6: ZERO-3393: Improve error handling in checkout middleware to support both object and array error formats
|
|
49
|
+
- 5ec0faf8: ZERO-3355: Refactor Redis client creation to include optional password in configuration
|
|
50
|
+
|
|
51
|
+
## 1.121.0
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- 49c82e1a: ZERO-4047: Remove Sentry configuration from default Next.js config
|
|
56
|
+
- d7e5178b: ZERO-3985: Add query string handling for orders redirection in middleware
|
|
57
|
+
- b59fdd1c: ZERO-4009: Add password reset token validation
|
|
58
|
+
|
|
59
|
+
## 1.120.0
|
|
60
|
+
|
|
61
|
+
### Minor Changes
|
|
62
|
+
|
|
63
|
+
- b12527ec: ZERO-4102: Add support for post-checkout redirect in middleware
|
|
64
|
+
- aef81c5d: ZERO-4034: Refactor checkout API to use dynamic store imports for improved performance
|
|
65
|
+
- 0754c835: ZERO-4063: Add support for optional Redis password in cache handlers
|
|
66
|
+
- a9f5cdb1: ZERO-4102: Fix post-checkout condition to additionally check for empty search parameters.
|
|
67
|
+
- 01ee41f1: ZERO-4102: Implement a post-checkout flow by dynamically determining checkout paths and managing a pz-post-checkout-flow cookie.
|
|
68
|
+
- c6c5c1cd: ZERO-4128: Use cookies API for pz-pos-error to ensure delivery on 303 redirects
|
|
69
|
+
|
|
70
|
+
## 1.119.0
|
|
71
|
+
|
|
72
|
+
## 1.118.0
|
|
73
|
+
|
|
74
|
+
### Minor Changes
|
|
75
|
+
|
|
76
|
+
- 729fe756: ZERO-3895: improve non-3D payment handling and error display
|
|
77
|
+
|
|
78
|
+
## 1.117.0
|
|
79
|
+
|
|
80
|
+
## 1.116.0
|
|
81
|
+
|
|
82
|
+
### Minor Changes
|
|
83
|
+
|
|
84
|
+
- d7ec6b08: ZERO-3988: Add Google Pay option to plugin selection
|
|
85
|
+
- 726491df: ZERO-3988: Add google pay integration
|
|
86
|
+
|
|
87
|
+
## 1.115.0
|
|
88
|
+
|
|
89
|
+
### Minor Changes
|
|
90
|
+
|
|
91
|
+
- b59bed4d: ZERO-3878: Reintegrated similar products and removed localStorage checks and implemented props based showing of buttons
|
|
92
|
+
- b5f9d75c: ZERO-3873: Refactor payment redirection middlewares to properly forward all set-cookie headers from upstream responses
|
|
93
|
+
- cbcfdf4d: ZERO-3859: Haso payment gateway implmeneted
|
|
94
|
+
- 71882722: ZERO-3897: Add compress option to default Next.js configuration
|
|
95
|
+
- 7056203a: ZERO-3875: removed shared_tags through stripTags function for unused keys
|
|
96
|
+
|
|
97
|
+
## 1.114.0
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- 65d3b862: ZERO-3054: Update headers in appFetch
|
|
102
|
+
- 43c182ee: ZERO-3054: Update Redis variable checks to conditionally include CACHE_SECRET
|
|
103
|
+
- eeb20bea: Revert "ZERO-3054: Refactor cache handler to use custom Redis handler and implement key hashing"
|
|
104
|
+
- fdd255ee: ZERO-3054: Refactor cache handler to use custom Redis handler and implement key hashing
|
|
8
105
|
|
|
9
|
-
##
|
|
106
|
+
## 1.113.0
|
|
107
|
+
|
|
108
|
+
## 1.112.0
|
|
109
|
+
|
|
110
|
+
### Minor Changes
|
|
111
|
+
|
|
112
|
+
- 888fdec: ZERO-3792: Virtual Try On new features are implemented and also basket support implemented.
|
|
113
|
+
|
|
114
|
+
## 1.111.0
|
|
115
|
+
|
|
116
|
+
### Minor Changes
|
|
117
|
+
|
|
118
|
+
- c026300: ZERO-3833: fix masterpass rest conflicts
|
|
119
|
+
- b47b9d8: ZERO-3414: create masterpass-rest package
|
|
120
|
+
|
|
121
|
+
## 1.110.0
|
|
122
|
+
|
|
123
|
+
### Minor Changes
|
|
124
|
+
|
|
125
|
+
- fc752c9: ZERO-3795: Remove unnecessary redirection logic from payment middleware
|
|
126
|
+
- 757af4a: ZERO-3783: Update image remote patterns for security compliance
|
|
127
|
+
|
|
128
|
+
## 1.109.0
|
|
129
|
+
|
|
130
|
+
### Minor Changes
|
|
131
|
+
|
|
132
|
+
- fcbbea79: ZERO-3648: Add virtual try-on feature with localization support
|
|
133
|
+
|
|
134
|
+
## 1.108.0
|
|
10
135
|
|
|
11
136
|
### Minor Changes
|
|
12
137
|
|
|
13
|
-
- ZERO-
|
|
138
|
+
- d8883ce6: ZERO-3640: Refactor wallet completion handling to accept additional parameters; update related API calls
|
|
139
|
+
- 59ed7a7e: ZERO-3640: Add order number state and update FlowPayment component for wallet payment response handling
|
|
140
|
+
- 31a2d35a: ZERO-3640: Refactor checkout API call to include useFormData option; update FlowPayment component for improved error handling and code readability
|
|
14
141
|
|
|
15
|
-
##
|
|
142
|
+
## 1.107.0
|
|
16
143
|
|
|
17
|
-
###
|
|
144
|
+
### Minor Changes
|
|
145
|
+
|
|
146
|
+
- 4ca44c78: ZERO-3634: add register_consumer_card
|
|
147
|
+
- 28c7ea79: ZERO-3427: Refactor redirect utility to handle undefined URL and improve locale handling
|
|
148
|
+
- b6e5b624: ZERO-3257: Enhance locale middleware to redirect using existing or default locale and support 303 status for POST requests
|
|
149
|
+
- 5b500797: ZERO-3634: iyzico saved card
|
|
150
|
+
|
|
151
|
+
## 1.106.0
|
|
152
|
+
|
|
153
|
+
### Minor Changes
|
|
154
|
+
|
|
155
|
+
- 9dc7298: ZERO-3416: Refactor Accordion component to enhance props and improve styling flexibility
|
|
156
|
+
- 2d3f178: ZERO-3417: Enhance FileInput component with additional props for customization
|
|
157
|
+
|
|
158
|
+
## 1.105.0
|
|
159
|
+
|
|
160
|
+
### Minor Changes
|
|
161
|
+
|
|
162
|
+
- c39c700: ZERO-3420: Refactor Modal component
|
|
163
|
+
- d512ea2: ZERO-3656: update setLoyaltyData mutation to accept string type
|
|
164
|
+
- 3b255fe: ZERO-3629 :edit warnings in build
|
|
165
|
+
|
|
166
|
+
## 1.104.0
|
|
167
|
+
|
|
168
|
+
### Minor Changes
|
|
169
|
+
|
|
170
|
+
- 63774a6: ZERO-3351: Add commerce redirection ignore list functionality and related utility
|
|
171
|
+
- a2fbee6: ZERO-3651: Fix correct is Iframe property in contextListMiddleware
|
|
172
|
+
- 0de5573: ZERO-3418: Update remotePatterns hostname to allow all subdomains
|
|
173
|
+
- 5ad87ff: ZERO-3646: Refactor form submission API to handle form data and improve error responses
|
|
174
|
+
|
|
175
|
+
## 1.103.0
|
|
176
|
+
|
|
177
|
+
## 1.102.0
|
|
178
|
+
|
|
179
|
+
### Minor Changes
|
|
180
|
+
|
|
181
|
+
- 6b949cb: ZERO-3615: Refactor product data handling and improve 404 error handling
|
|
182
|
+
- 9a3885b: ZERO-3660: skip catch-all not_found route in generate route script
|
|
183
|
+
|
|
184
|
+
## 1.101.0
|
|
185
|
+
|
|
186
|
+
### Minor Changes
|
|
187
|
+
|
|
188
|
+
- 4e863f7: ZERO-3654: add null check for resetMasterpassState in PaymentOptionResetMiddleware
|
|
189
|
+
|
|
190
|
+
## 1.100.0
|
|
191
|
+
|
|
192
|
+
### Minor Changes
|
|
18
193
|
|
|
19
|
-
-
|
|
194
|
+
- e57cd93: ZERO-3460: prevent installment loop on payment method switch
|
|
195
|
+
- 5f7edd6: ZERO-3571: Enhance Jest configuration by adding base directory resolution and module name mapping
|
|
196
|
+
- b00a90b: ZERO-3436: Preserve query params on redirect
|
|
197
|
+
- 26b2d0b: ZERO-3571: Remove test script execution from prebuild and simplify Jest module name mapping
|
|
198
|
+
- c51de38: ZERO-3637: Add action creators and RTK Query API endpoints to Redux store
|
|
199
|
+
- d1bb93a: ZERO-3460: fix installment request loop"
|
|
200
|
+
|
|
201
|
+
## 1.99.0
|
|
202
|
+
|
|
203
|
+
### Minor Changes
|
|
204
|
+
|
|
205
|
+
- cf90355: ZERO-3586_2: Enhance caching functionality by adding support for compressed data storage and retrieval, along with a new method for setting multiple key-value pairs.
|
|
206
|
+
- d58538b: ZERO-3638: Enhance RC pipeline: add fetch, merge, and pre-release setup with conditional commit
|
|
207
|
+
- 95a4cd1: ZERO-3631: add automatic route generation
|
|
208
|
+
|
|
209
|
+
## 1.98.0
|
|
210
|
+
|
|
211
|
+
### Minor Changes
|
|
212
|
+
|
|
213
|
+
- 67308f0: ZERO-3633: Revert IndexPage parameter from fetchCheckout request
|
|
214
|
+
|
|
215
|
+
## 1.97.0
|
|
216
|
+
|
|
217
|
+
### Minor Changes
|
|
218
|
+
|
|
219
|
+
- 0014305: ZERO-3629 :edit warnings in build
|
|
220
|
+
|
|
221
|
+
## 1.96.0
|
|
222
|
+
|
|
223
|
+
### Minor Changes
|
|
224
|
+
|
|
225
|
+
- af5c93a: ZERO-3617: Add pre-order middleware instruction file
|
|
226
|
+
- a420947: ZERO-3517: Fix optional chaining for rawData in error logging for category data handlers
|
|
227
|
+
|
|
228
|
+
## 1.95.0
|
|
229
|
+
|
|
230
|
+
### Minor Changes
|
|
231
|
+
|
|
232
|
+
- 35dfb8f: ZERO-3363: Refactor URL handling in checkout and redirection middlewares to use url.origin instead of process.env.NEXT_PUBLIC_URL
|
|
233
|
+
- 99b6e7b: ZERO-3421: Enhance Sentry error handling by adding network error detection logic and refining initialization options
|
|
234
|
+
- cbdb5c1: ZERO-3448: fix set cookie domain handling for subdomain locale strategy
|
|
235
|
+
|
|
236
|
+
## 1.94.0
|
|
237
|
+
|
|
238
|
+
### Minor Changes
|
|
239
|
+
|
|
240
|
+
- 6e6b0a9: ZERO-3422: Add pz-flow-payment package
|
|
241
|
+
- adf0eeb: ZERO-3597: Add copilot instruction files
|
|
242
|
+
- c806fad: ZERO-3422: Add Flow Payment plugin to the defined plugins list
|
|
243
|
+
- 0abde6b: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
|
|
244
|
+
- 72ad7bb: ZERO-3422: Add Flow Payment to the list of available plugins
|
|
245
|
+
- e7cd3a5: ZERO-3435: Add Accept-Language to requestHeaders
|
|
246
|
+
- 17bfadc: ZERO-3275: Disable OpenTelemetry monitoring in production environment
|
|
247
|
+
- dfaceff: ZERO-3356: Add useLoyaltyAvailability hook and update checkout state management
|
|
248
|
+
- 86642cf: ZERO-3531: Add saveSampleProducts endpoint and update URLs in checkout
|
|
249
|
+
- 485e8ef: ZERO-3422: Refactor parameter handling in wallet complete redirection middleware to use forEach
|
|
250
|
+
- b434ac8: ZERO-3545: Update fetchCheckout API URL to include page parameter
|
|
251
|
+
- fee608d: ZERO-3422: Refactor body handling in wallet complete redirection middleware
|
|
252
|
+
|
|
253
|
+
## 1.93.0
|
|
254
|
+
|
|
255
|
+
### Minor Changes
|
|
256
|
+
|
|
257
|
+
- 185396f: ZERO-3569: Refactor logging in cache handler to use console_log instead of logger
|
|
258
|
+
- 0bdab12: ZERO-3569: Refactor cache handler to improve Redis connection management and logging
|
|
259
|
+
- 3e4aadc: ZERO-3569: Fix import statement for logger in cache handler
|
|
260
|
+
|
|
261
|
+
## 1.92.0
|
|
262
|
+
|
|
263
|
+
## 1.91.0
|
|
264
|
+
|
|
265
|
+
### Minor Changes
|
|
266
|
+
|
|
267
|
+
- d8fad39: ZERO-3370: include plugins test to build stage
|
|
268
|
+
- 2552486: ZERO-3391: Add subdomain support to setLocale function
|
|
269
|
+
- f8e4cac: ZERO-3343: restrict root hostname to only locale subdomains
|
|
270
|
+
- 832bee3: ZERO-3343: add domain to cookie for subdomain locale strategy
|
|
271
|
+
- 28a59d4: ZERO-3400: refactor cookie domain logic using fallback host
|
|
272
|
+
- 8feabe9: ZERO-3343: add custom NextAuth options support
|
|
273
|
+
- bf354de: ZERO-3321: add babel compiler for akinon/next test
|
|
274
|
+
- 448adef: ZERO-3321: move csp test to akinon-next
|
|
275
|
+
- 6c3629c: ZERO-3321: fix jest tests in akinon-next for standalone projects
|
|
276
|
+
- 6bc260b: ZERO-3295: update default tailwind content list
|
|
277
|
+
- 943a239: ZERO-3370: add allowJs in akinon-next test tsconfig
|
|
278
|
+
- 068dc39: ZERO-3343: update get-root-hostname logic
|
|
279
|
+
- 942490f: ZERO-3295: move third party tailwind content list to akinon-next
|
|
280
|
+
- b6d5bda: ZERO-3343: update changeset config
|
|
281
|
+
- acf0320: ZERO-3321: remove babel config
|
|
282
|
+
- 387356b: ZERO-3323: Refactor locale filtering logic in URL matcher regex
|
|
283
|
+
- b2ee69b: ZERO-3321: delete unnecessary files
|
|
284
|
+
- 0cabbda: ZERO-3370: replace inline monorepo check with reusable utility
|
|
285
|
+
|
|
286
|
+
## 1.90.0
|
|
287
|
+
|
|
288
|
+
### Minor Changes
|
|
289
|
+
|
|
290
|
+
- e68e120: ZERO-3398: Add redirectUrlMiddleware to handle redirection based on checkout results
|
|
291
|
+
|
|
292
|
+
## 1.89.0
|
|
293
|
+
|
|
294
|
+
## 1.88.0
|
|
295
|
+
|
|
296
|
+
### Minor Changes
|
|
297
|
+
|
|
298
|
+
- c4f0568: ZERO-3293: Remove unnecessary pretty URL route check in Cache class method
|
|
299
|
+
- f3dcb1e: ZERO-3337 :Add support for cash register hook in middleware routing
|
|
300
|
+
- 8154859: ZERO-3337 :Add support for cash register pre-order hook in middleware
|
|
301
|
+
|
|
302
|
+
## 1.87.0
|
|
303
|
+
|
|
304
|
+
## 1.86.0
|
|
305
|
+
|
|
306
|
+
### Minor Changes
|
|
307
|
+
|
|
308
|
+
- 6fc8ac5: ZERO-3229: Implement mini basket query for basket total quantity
|
|
309
|
+
- ef75c03: ZERO-3267: Update error-page component to use ROUTES for link navigation
|
|
310
|
+
- e4761d2: Refactor import statement for ROUTES in error-page component
|
|
311
|
+
- e2c6d42: ZERO-2935: Add @sentry/nextjs dependency to akinon-next and remove from projectzeronext
|
|
312
|
+
- 4d3deb4: ZERO-2935: sentry 8 upgrade
|
|
313
|
+
- c3f8d4a: ZERO-3274: Adjust button styles
|
|
314
|
+
- 9abd011: ZERO-3267: Refactor error handling in ErrorPage component to set error details in Sentry scope
|
|
315
|
+
- c3b2f3f: ZERO-3267: Enable sentry client errors and filter them by log type
|
|
316
|
+
- 70bc0ae: ZERO-3284: Set tracesSampleRate in Sentry configuration
|
|
317
|
+
- ac65ca9: ZERO-3269: Enhance locale handling by adding Subdomain strategy and updating related functions
|
|
318
|
+
- 0cb3ec0: ZERO-3281: Remove prebuild tests script from pz-prebuild
|
|
319
|
+
- 2d305aa: ZERO-2935: Update Sentry configuration: remove hideSourceMaps option and add it to withPzConfig
|
|
320
|
+
- 2f3588f: ZERO-3287: Add user session handling in authentication flow
|
|
321
|
+
- e5529cd: ZERO-3267: Update error-page component to use root path for links instead of ROUTES
|
|
322
|
+
|
|
323
|
+
## 1.85.0
|
|
324
|
+
|
|
325
|
+
### Minor Changes
|
|
326
|
+
|
|
327
|
+
- 4167dcd: ZERO-3253: Update Content-Security-Policy to include akinoncloud.com
|
|
328
|
+
- 0b1bd07: ZERO-3240: Remove unused preOrderMiddleware
|
|
329
|
+
|
|
330
|
+
## 1.84.0
|
|
331
|
+
|
|
332
|
+
### Minor Changes
|
|
333
|
+
|
|
334
|
+
- 757ee53: ZERO-3207: Add SMS send & verify endpoints with state management
|
|
335
|
+
- c0c1962: ZERO-3258: Add new API endpoints for fetching Bukalemun image URL and bundle product data
|
|
336
|
+
- 0e05135: ZERO-3244: Encode URL search parameters
|
|
337
|
+
|
|
338
|
+
## 1.83.0
|
|
339
|
+
|
|
340
|
+
## 1.82.0
|
|
341
|
+
|
|
342
|
+
### Minor Changes
|
|
343
|
+
|
|
344
|
+
- 2e0b7ff: ZERO-3226: Refactor checkoutApi to simplify request body structure by removing device_info parameter
|
|
345
|
+
- 778aabf: ZERO-3163: Add frontend ID header to authentication requests and forgot password mutation
|
|
346
|
+
- c0fef07: ZERO-3197: Refetch payment options after loyalty usage
|
|
347
|
+
- 2d2ab44: ZERO-3226: Add device_info param to WalletPaymentPage request
|
|
348
|
+
- 0200d56: ZERO-3163: Add frontendIds property to Settings interface
|
|
349
|
+
- 7d1b5af: ZERO-3206: Encode search parameters in product data URL
|
|
350
|
+
- aa05ed7: ZERO-3170: Add commerceRedirectionIgnoreList to settings and update URL redirection middleware
|
|
351
|
+
|
|
352
|
+
## 1.81.0
|
|
353
|
+
|
|
354
|
+
### Minor Changes
|
|
355
|
+
|
|
356
|
+
- fd4b74e: ZERO-3126: add reset checkout state query
|
|
357
|
+
- 4cc22c7: ZERO-3125: replace X-Frame-Options with CSP frame-ancestors
|
|
358
|
+
- 6a0a080: ZERO-3112: Update button
|
|
359
|
+
|
|
360
|
+
## 1.80.0
|
|
361
|
+
|
|
362
|
+
### Minor Changes
|
|
363
|
+
|
|
364
|
+
- 7ab9e2f: ZERO-3166: add tamara payment package
|
|
365
|
+
|
|
366
|
+
## 1.79.0
|
|
367
|
+
|
|
368
|
+
### Minor Changes
|
|
369
|
+
|
|
370
|
+
- 59fa21c: ZERO-3149: Add name-based mechanism for Redux middleware override
|
|
371
|
+
|
|
372
|
+
## 1.78.0
|
|
373
|
+
|
|
374
|
+
### Minor Changes
|
|
375
|
+
|
|
376
|
+
- e791eab: ZERO-3133: Add fallbackReducer for handling missing plugin reducers
|
|
377
|
+
|
|
378
|
+
## 1.77.0
|
|
379
|
+
|
|
380
|
+
### Minor Changes
|
|
381
|
+
|
|
382
|
+
- 999168d: ZERO-3104: Remove local cache handler from CacheHandler initialization
|
|
383
|
+
- 86a5a62: ZERO-3104: Add optional headers parameter to data fetching functions
|
|
384
|
+
|
|
385
|
+
## 1.76.0
|
|
386
|
+
|
|
387
|
+
### Minor Changes
|
|
388
|
+
|
|
389
|
+
- dd69cc6: ZERO-3079: Modularize pre-order middleware
|
|
20
390
|
|
|
21
391
|
## 1.75.0
|
|
22
392
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import type { NextConfig } from 'next';
|
|
3
|
+
|
|
4
|
+
function findBaseDir() {
|
|
5
|
+
const insideNodeModules = __dirname.includes('node_modules');
|
|
6
|
+
|
|
7
|
+
if (insideNodeModules) {
|
|
8
|
+
return resolve(__dirname, '../../../../');
|
|
9
|
+
} else {
|
|
10
|
+
return resolve(__dirname, '../../../apps/projectzeronext');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const baseDir = findBaseDir();
|
|
15
|
+
|
|
16
|
+
jest.mock('next-pwa', () => {
|
|
17
|
+
return () => (config: NextConfig) => config;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
jest.mock('@sentry/nextjs', () => ({
|
|
21
|
+
withSentryConfig: (config: NextConfig) => config
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
jest.mock('../with-pz-config.js', () => {
|
|
25
|
+
return (config: NextConfig) => {
|
|
26
|
+
const originalHeaders = config.headers;
|
|
27
|
+
|
|
28
|
+
config.headers = async () => {
|
|
29
|
+
const originalHeadersResult = (await originalHeaders?.()) ?? [];
|
|
30
|
+
|
|
31
|
+
return [
|
|
32
|
+
{
|
|
33
|
+
source: '/(.*)',
|
|
34
|
+
headers: [
|
|
35
|
+
{
|
|
36
|
+
key: 'Content-Security-Policy',
|
|
37
|
+
value: 'https://*.akifast.com akifast.com'
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
...originalHeadersResult
|
|
42
|
+
];
|
|
43
|
+
};
|
|
44
|
+
return config;
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
interface Header {
|
|
49
|
+
key: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface HeaderGroup {
|
|
54
|
+
source: string;
|
|
55
|
+
headers: Header[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const nextConfigPath = resolve(baseDir, 'next.config.mjs');
|
|
59
|
+
let nextConfig: any;
|
|
60
|
+
|
|
61
|
+
beforeAll(async () => {
|
|
62
|
+
nextConfig = await import(nextConfigPath);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe('Next.js Configuration', () => {
|
|
66
|
+
it('should contain Content-Security-Policy header with akifast domain values', async () => {
|
|
67
|
+
const headers = nextConfig.default.headers;
|
|
68
|
+
expect(headers).toBeDefined();
|
|
69
|
+
|
|
70
|
+
const headersResult = await headers();
|
|
71
|
+
|
|
72
|
+
const cspHeaders = headersResult
|
|
73
|
+
.flatMap((headerGroup: HeaderGroup) => headerGroup.headers)
|
|
74
|
+
.filter((header: Header) => header.key === 'Content-Security-Policy');
|
|
75
|
+
|
|
76
|
+
expect(cspHeaders.length).toBeGreaterThan(0);
|
|
77
|
+
|
|
78
|
+
const lastCspHeader = cspHeaders[cspHeaders.length - 1];
|
|
79
|
+
|
|
80
|
+
expect(lastCspHeader.value).toContain('akifast.com');
|
|
81
|
+
expect(lastCspHeader.value).toContain('https://*.akifast.com');
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"display": "Default",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"composite": false,
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"inlineSources": false,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"noUnusedLocals": false,
|
|
14
|
+
"noUnusedParameters": false,
|
|
15
|
+
"preserveWatchOutput": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"jsx": "react-jsx",
|
|
19
|
+
"allowJs": true
|
|
20
|
+
},
|
|
21
|
+
"exclude": ["node_modules"],
|
|
22
|
+
"include": [".", "../."]
|
|
23
|
+
}
|