@akinon/projectzero 1.117.0-rc.2 → 1.117.0-rc.4

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,9 @@
1
1
  # @akinon/projectzero
2
2
 
3
+ ## 1.117.0-rc.4
4
+
5
+ ## 1.117.0-rc.3
6
+
3
7
  ## 1.117.0-rc.2
4
8
 
5
9
  ## 1.117.0-rc.1
@@ -1,5 +1,77 @@
1
1
  # projectzeronext
2
2
 
3
+ ## 1.117.0-rc.4
4
+
5
+ ### Minor Changes
6
+
7
+ - c3244a31: ZERO-4013: Update runtime version to node:25-alpine in project configuration
8
+
9
+ ### Patch Changes
10
+
11
+ - @akinon/next@1.117.0-rc.4
12
+ - @akinon/pz-akifast@1.117.0-rc.4
13
+ - @akinon/pz-apple-pay@1.117.0-rc.4
14
+ - @akinon/pz-b2b@1.117.0-rc.4
15
+ - @akinon/pz-basket-gift-pack@1.117.0-rc.4
16
+ - @akinon/pz-bkm@1.117.0-rc.4
17
+ - @akinon/pz-checkout-gift-pack@1.117.0-rc.4
18
+ - @akinon/pz-click-collect@1.117.0-rc.4
19
+ - @akinon/pz-credit-payment@1.117.0-rc.4
20
+ - @akinon/pz-cybersource-uc@1.117.0-rc.4
21
+ - @akinon/pz-flow-payment@1.117.0-rc.4
22
+ - @akinon/pz-google-pay@1.117.0-rc.4
23
+ - @akinon/pz-gpay@1.117.0-rc.4
24
+ - @akinon/pz-haso@1.117.0-rc.4
25
+ - @akinon/pz-hepsipay@1.117.0-rc.4
26
+ - @akinon/pz-masterpass@1.117.0-rc.4
27
+ - @akinon/pz-masterpass-rest@1.117.0-rc.4
28
+ - @akinon/pz-multi-basket@1.117.0-rc.4
29
+ - @akinon/pz-one-click-checkout@1.117.0-rc.4
30
+ - @akinon/pz-otp@1.117.0-rc.4
31
+ - @akinon/pz-pay-on-delivery@1.117.0-rc.4
32
+ - @akinon/pz-saved-card@1.117.0-rc.4
33
+ - @akinon/pz-similar-products@1.117.0-rc.4
34
+ - @akinon/pz-tabby-extension@1.117.0-rc.4
35
+ - @akinon/pz-tamara-extension@1.117.0-rc.4
36
+ - @akinon/pz-virtual-try-on@1.117.0-rc.4
37
+
38
+ ## 1.117.0-rc.3
39
+
40
+ ### Minor Changes
41
+
42
+ - b59fdd1c: ZERO-4009: Add password reset token validation
43
+ - d76d3255: ZERO-4011: Refactor sitemap content generation to append locale suffix based on matched locale
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [b59fdd1c]
48
+ - @akinon/next@1.117.0-rc.3
49
+ - @akinon/pz-virtual-try-on@1.117.0-rc.3
50
+ - @akinon/pz-akifast@1.117.0-rc.3
51
+ - @akinon/pz-apple-pay@1.117.0-rc.3
52
+ - @akinon/pz-b2b@1.117.0-rc.3
53
+ - @akinon/pz-basket-gift-pack@1.117.0-rc.3
54
+ - @akinon/pz-bkm@1.117.0-rc.3
55
+ - @akinon/pz-checkout-gift-pack@1.117.0-rc.3
56
+ - @akinon/pz-click-collect@1.117.0-rc.3
57
+ - @akinon/pz-credit-payment@1.117.0-rc.3
58
+ - @akinon/pz-cybersource-uc@1.117.0-rc.3
59
+ - @akinon/pz-flow-payment@1.117.0-rc.3
60
+ - @akinon/pz-google-pay@1.117.0-rc.3
61
+ - @akinon/pz-gpay@1.117.0-rc.3
62
+ - @akinon/pz-haso@1.117.0-rc.3
63
+ - @akinon/pz-hepsipay@1.117.0-rc.3
64
+ - @akinon/pz-masterpass@1.117.0-rc.3
65
+ - @akinon/pz-masterpass-rest@1.117.0-rc.3
66
+ - @akinon/pz-multi-basket@1.117.0-rc.3
67
+ - @akinon/pz-one-click-checkout@1.117.0-rc.3
68
+ - @akinon/pz-otp@1.117.0-rc.3
69
+ - @akinon/pz-pay-on-delivery@1.117.0-rc.3
70
+ - @akinon/pz-saved-card@1.117.0-rc.3
71
+ - @akinon/pz-similar-products@1.117.0-rc.3
72
+ - @akinon/pz-tabby-extension@1.117.0-rc.3
73
+ - @akinon/pz-tamara-extension@1.117.0-rc.3
74
+
3
75
  ## 1.117.0-rc.2
4
76
 
5
77
  ### Patch Changes
@@ -13,7 +13,7 @@
13
13
  "healthcheck": "/healthz"
14
14
  }
15
15
  },
16
- "runtime": "node:22-alpine",
16
+ "runtime": "node:25-alpine",
17
17
  "addons": [
18
18
  {
19
19
  "plan": "redis"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectzeronext",
3
- "version": "1.117.0-rc.2",
3
+ "version": "1.117.0-rc.4",
4
4
  "private": true,
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -24,32 +24,32 @@
24
24
  "test:middleware": "jest middleware-matcher.test.ts --bail"
25
25
  },
26
26
  "dependencies": {
27
- "@akinon/next": "1.117.0-rc.2",
28
- "@akinon/pz-akifast": "1.117.0-rc.2",
29
- "@akinon/pz-apple-pay": "1.117.0-rc.2",
30
- "@akinon/pz-b2b": "1.117.0-rc.2",
31
- "@akinon/pz-basket-gift-pack": "1.117.0-rc.2",
32
- "@akinon/pz-bkm": "1.117.0-rc.2",
33
- "@akinon/pz-checkout-gift-pack": "1.117.0-rc.2",
34
- "@akinon/pz-click-collect": "1.117.0-rc.2",
35
- "@akinon/pz-credit-payment": "1.117.0-rc.2",
36
- "@akinon/pz-cybersource-uc": "1.117.0-rc.2",
37
- "@akinon/pz-flow-payment": "1.117.0-rc.2",
38
- "@akinon/pz-google-pay": "1.117.0-rc.2",
39
- "@akinon/pz-gpay": "1.117.0-rc.2",
40
- "@akinon/pz-haso": "1.117.0-rc.2",
41
- "@akinon/pz-hepsipay": "1.117.0-rc.2",
42
- "@akinon/pz-masterpass": "1.117.0-rc.2",
43
- "@akinon/pz-masterpass-rest": "1.117.0-rc.2",
44
- "@akinon/pz-multi-basket": "1.117.0-rc.2",
45
- "@akinon/pz-one-click-checkout": "1.117.0-rc.2",
46
- "@akinon/pz-otp": "1.117.0-rc.2",
47
- "@akinon/pz-pay-on-delivery": "1.117.0-rc.2",
48
- "@akinon/pz-saved-card": "1.117.0-rc.2",
49
- "@akinon/pz-similar-products": "1.117.0-rc.2",
50
- "@akinon/pz-tabby-extension": "1.117.0-rc.2",
51
- "@akinon/pz-tamara-extension": "1.117.0-rc.2",
52
- "@akinon/pz-virtual-try-on": "1.117.0-rc.2",
27
+ "@akinon/next": "1.117.0-rc.4",
28
+ "@akinon/pz-akifast": "1.117.0-rc.4",
29
+ "@akinon/pz-apple-pay": "1.117.0-rc.4",
30
+ "@akinon/pz-b2b": "1.117.0-rc.4",
31
+ "@akinon/pz-basket-gift-pack": "1.117.0-rc.4",
32
+ "@akinon/pz-bkm": "1.117.0-rc.4",
33
+ "@akinon/pz-checkout-gift-pack": "1.117.0-rc.4",
34
+ "@akinon/pz-click-collect": "1.117.0-rc.4",
35
+ "@akinon/pz-credit-payment": "1.117.0-rc.4",
36
+ "@akinon/pz-cybersource-uc": "1.117.0-rc.4",
37
+ "@akinon/pz-flow-payment": "1.117.0-rc.4",
38
+ "@akinon/pz-google-pay": "1.117.0-rc.4",
39
+ "@akinon/pz-gpay": "1.117.0-rc.4",
40
+ "@akinon/pz-haso": "1.117.0-rc.4",
41
+ "@akinon/pz-hepsipay": "1.117.0-rc.4",
42
+ "@akinon/pz-masterpass": "1.117.0-rc.4",
43
+ "@akinon/pz-masterpass-rest": "1.117.0-rc.4",
44
+ "@akinon/pz-multi-basket": "1.117.0-rc.4",
45
+ "@akinon/pz-one-click-checkout": "1.117.0-rc.4",
46
+ "@akinon/pz-otp": "1.117.0-rc.4",
47
+ "@akinon/pz-pay-on-delivery": "1.117.0-rc.4",
48
+ "@akinon/pz-saved-card": "1.117.0-rc.4",
49
+ "@akinon/pz-similar-products": "1.117.0-rc.4",
50
+ "@akinon/pz-tabby-extension": "1.117.0-rc.4",
51
+ "@akinon/pz-tamara-extension": "1.117.0-rc.4",
52
+ "@akinon/pz-virtual-try-on": "1.117.0-rc.4",
53
53
  "@hookform/resolvers": "2.9.0",
54
54
  "@next/third-parties": "14.1.0",
55
55
  "@react-google-maps/api": "2.17.1",
@@ -72,7 +72,7 @@
72
72
  "yup": "0.32.11"
73
73
  },
74
74
  "devDependencies": {
75
- "@akinon/eslint-plugin-projectzero": "1.117.0-rc.2",
75
+ "@akinon/eslint-plugin-projectzero": "1.117.0-rc.4",
76
76
  "@semantic-release/changelog": "6.0.2",
77
77
  "@semantic-release/exec": "6.0.3",
78
78
  "@semantic-release/git": "10.0.1",
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import { Button, Input, Link } from '@theme/components';
3
+ import { Button, Input, Link, LoaderSpinner } from '@theme/components';
4
4
  import { useForm, SubmitHandler } from 'react-hook-form';
5
5
  import { yupResolver } from '@hookform/resolvers/yup';
6
6
  import * as yup from 'yup';
7
7
  import {
8
8
  usePasswordResetMutation,
9
+ useGetValidatePasswordResetTokenQuery,
9
10
  PasswordResetType
10
11
  } from '@akinon/next/data/client/account';
11
12
  import { useLocalization } from '@akinon/next/hooks';
@@ -15,6 +16,16 @@ export default function NewPassword({ params: { id } }) {
15
16
  const { t } = useLocalization();
16
17
  const [newPassword, { isSuccess: formSuccess }] = usePasswordResetMutation();
17
18
 
19
+ const token = id?.join('/');
20
+
21
+ const {
22
+ data: validationData,
23
+ isLoading: isValidating,
24
+ error: validationError
25
+ } = useGetValidatePasswordResetTokenQuery(token, {
26
+ skip: !token
27
+ });
28
+
18
29
  const newPasswordFormSchema = (t) =>
19
30
  yup.object().shape({
20
31
  password: yup
@@ -24,7 +35,10 @@ export default function NewPassword({ params: { id } }) {
24
35
  /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{6,}$/,
25
36
  t('forgot_password.create_new_password.form.error.password_rule')
26
37
  )
27
- .max(50, t('forgot_password.create_new_password.form.error.password_max')),
38
+ .max(
39
+ 50,
40
+ t('forgot_password.create_new_password.form.error.password_max')
41
+ ),
28
42
  repeatPassword: yup
29
43
  .string()
30
44
  .required(t('forgot_password.create_new_password.form.error.required'))
@@ -45,6 +59,31 @@ export default function NewPassword({ params: { id } }) {
45
59
  newPassword(data);
46
60
  };
47
61
 
62
+ if (isValidating) {
63
+ return (
64
+ <div className="container my-12 flex flex-col items-center px-4">
65
+ <div className="w-full xl:w-5/12 text-center">
66
+ <LoaderSpinner />
67
+ </div>
68
+ </div>
69
+ );
70
+ }
71
+
72
+ if (validationError || !validationData?.validlink) {
73
+ return (
74
+ <div className="container my-12 flex flex-col items-center px-4">
75
+ <div className="w-full xl:w-5/12 text-center">
76
+ <div className="text-2xl mb-4 text-error">
77
+ {t('account.password_reset.expired_link_message')}
78
+ </div>
79
+ <Link href="/users/password/reset" className="underline text-primary">
80
+ {t('account.password_reset.continue_password_reset')}
81
+ </Link>
82
+ </div>
83
+ </div>
84
+ );
85
+ }
86
+
48
87
  return (
49
88
  <div className="container my-12 flex flex-col items-center px-4">
50
89
  <div className="w-full xl:w-5/12 text-center">
@@ -79,7 +118,10 @@ export default function NewPassword({ params: { id } }) {
79
118
  required
80
119
  />
81
120
 
82
- <PasswordRulesFeedback password={passwordValue} isVisible={errors?.password ? true : false}/>
121
+ <PasswordRulesFeedback
122
+ password={passwordValue}
123
+ isVisible={errors?.password ? true : false}
124
+ />
83
125
  </div>
84
126
 
85
127
  <div className="mb-2 text-left">
@@ -58,10 +58,12 @@ export async function GET(request: Request, context: { params }) {
58
58
 
59
59
  let sitemapContent = await sitemap.text();
60
60
 
61
- sitemapContent = sitemapContent.replace(
62
- /\.com/g,
63
- `.com${matchedLocale?.[0] ?? ''}`
64
- );
61
+ if (matchedLocale?.[0]) {
62
+ const localeSuffix = matchedLocale[0];
63
+ const domainRegex = /(?<=<loc>\s*)https?:\/\/[^/<\s]+/g;
64
+
65
+ sitemapContent = sitemapContent.replace(domainRegex, `$&${localeSuffix}`);
66
+ }
65
67
 
66
68
  return new Response(sitemapContent, {
67
69
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/projectzero",
3
- "version": "1.117.0-rc.2",
3
+ "version": "1.117.0-rc.4",
4
4
  "private": false,
5
5
  "description": "CLI tool to manage your Project Zero Next project",
6
6
  "bin": {