@akinon/next 1.92.0-rc.17 → 1.92.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.92.0-rc.19
4
+
5
+ ### Minor Changes
6
+
7
+ - d8be48f: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
8
+
9
+ ## 1.92.0-rc.18
10
+
11
+ ### Minor Changes
12
+
13
+ - 0abde6b: ZERO-3422: Update fetch method to use dynamic request method in wallet complete redirection middleware
14
+ - b00a90b: ZERO-3436: Preserve query params on redirect
15
+
3
16
  ## 1.92.0-rc.17
4
17
 
5
18
  ### Minor Changes
@@ -70,7 +70,7 @@ const withWalletCompleteRedirection =
70
70
  }
71
71
 
72
72
  const request = await fetch(requestUrl, {
73
- method: 'POST',
73
+ method: req.method,
74
74
  headers: requestHeaders,
75
75
  body
76
76
  });
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.92.0-rc.17",
4
+ "version": "1.92.0-rc.19",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "set-cookie-parser": "2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@akinon/eslint-plugin-projectzero": "1.92.0-rc.17",
37
+ "@akinon/eslint-plugin-projectzero": "1.92.0-rc.19",
38
38
  "@babel/core": "7.26.10",
39
39
  "@babel/preset-env": "7.26.9",
40
40
  "@babel/preset-typescript": "7.27.0",
package/utils/redirect.ts CHANGED
@@ -34,9 +34,16 @@ export const redirect = (path: string, type?: RedirectType) => {
34
34
  currentLocaleValue = Settings.localization.defaultLocaleValue;
35
35
  }
36
36
 
37
- const callbackUrl = pageUrl.pathname.replace(urlLocaleMatcherRegex, '');
37
+ const searchParams = new URLSearchParams(pageUrl.search);
38
38
 
39
- const redirectUrlWithLocale = getUrlPathWithLocale(path, currentLocaleValue);
39
+ const callbackUrl =
40
+ pageUrl.pathname.replace(urlLocaleMatcherRegex, '') +
41
+ (searchParams.toString() ? `?${searchParams.toString()}` : '');
42
+
43
+ const redirectUrlWithLocale = getUrlPathWithLocale(
44
+ path,
45
+ currentLocale?.value
46
+ );
40
47
 
41
48
  const redirectUrl = `${redirectUrlWithLocale}?callbackUrl=${callbackUrl}`;
42
49