@shipfox/client-integrations 7.0.0 → 8.0.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-integrations",
3
3
  "license": "MIT",
4
- "version": "7.0.0",
4
+ "version": "8.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -28,15 +28,15 @@
28
28
  "@swc/helpers": "^0.5.17",
29
29
  "@tanstack/react-form": "^1.32.0",
30
30
  "@shipfox/api-integration-core-dto": "9.0.2",
31
- "@shipfox/api-integration-github-dto": "9.0.2",
32
31
  "@shipfox/api-integration-gitea-dto": "9.0.2",
33
- "@shipfox/api-integration-slack-dto": "9.0.2",
32
+ "@shipfox/api-integration-github-dto": "9.0.2",
34
33
  "@shipfox/api-integration-linear-dto": "9.0.2",
35
- "@shipfox/api-integration-webhook-dto": "9.0.2",
34
+ "@shipfox/api-integration-slack-dto": "9.0.2",
36
35
  "@shipfox/api-integration-sentry-dto": "9.0.2",
36
+ "@shipfox/api-integration-webhook-dto": "9.0.2",
37
37
  "@shipfox/client-api": "6.0.1",
38
- "@shipfox/client-shell": "6.0.2",
39
- "@shipfox/client-auth": "7.0.0",
38
+ "@shipfox/client-auth": "8.0.0",
39
+ "@shipfox/client-shell": "8.0.0",
40
40
  "@shipfox/client-ui": "6.0.2",
41
41
  "@shipfox/integration-icons": "0.2.2",
42
42
  "@shipfox/react-ui": "0.3.7"
@@ -48,11 +48,8 @@ export function CallbackStatusShell({
48
48
  {switchAccount ? (
49
49
  <ButtonLink asChild className="min-h-44 w-full sm:w-fit">
50
50
  <Link
51
- to={
52
- workspaceId
53
- ? `/auth/logout?redirect=${encodeURIComponent(logoutRedirect ?? '/')}`
54
- : '/auth/logout'
55
- }
51
+ to="/auth/logout"
52
+ search={workspaceId ? {redirect: logoutRedirect ?? '/'} : undefined}
56
53
  >
57
54
  Switch account
58
55
  </Link>
@@ -128,12 +128,22 @@ describe('LinearCallbackPage', () => {
128
128
  renderCallback('?code=grant-code-account&state=signed-state-account');
129
129
 
130
130
  expect(await screen.findByRole('heading', {name: 'Different Shipfox account'})).toBeVisible();
131
- expect(screen.getByRole('link', {name: 'Switch account'})).toHaveAttribute(
131
+ const switchAccountLink = screen.getByRole('link', {name: 'Switch account'});
132
+ const switchAccountUrl = new URL(
133
+ switchAccountLink.getAttribute('href') ?? '/',
134
+ window.location.origin,
135
+ );
136
+
137
+ expect(switchAccountLink).toHaveAttribute(
132
138
  'href',
133
139
  `/auth/logout?redirect=${encodeURIComponent(
134
140
  `/workspaces/${INTEGRATIONS_TEST_WID}/integrations/linear`,
135
141
  )}`,
136
142
  );
143
+ expect(switchAccountUrl.pathname).toBe('/auth/logout');
144
+ expect(switchAccountUrl.searchParams.get('redirect')).toBe(
145
+ `/workspaces/${INTEGRATIONS_TEST_WID}/integrations/linear`,
146
+ );
137
147
  expect(screen.getByRole('link', {name: 'Start over'})).toBeVisible();
138
148
  });
139
149