@akinon/next 2.0.0-beta.2 → 2.0.0-beta.21

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