Skip to content

Commit fc0076e

Browse files
authored
Merge pull request #156 from atls/feat/react-kratos
feat(ory): init
2 parents 1f5687d + d1791de commit fc0076e

File tree

89 files changed

+2353
-1017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2353
-1017
lines changed

.github/ISSUE_TEMPLATE/bug.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ body:
5858
validations:
5959
required: true
6060

61-
projects: ['atls/11']
61+
projects: ['atls/11']

.github/ISSUE_TEMPLATE/docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ body:
4141
validations:
4242
required: true
4343

44-
projects: ['atls/11']
44+
projects: ['atls/11']

.github/ISSUE_TEMPLATE/feature.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ body:
4444
validations:
4545
required: true
4646

47-
projects: ['atls/11']
47+
projects: ['atls/11']

.pnp.cjs

+93-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarn/releases/yarn-remote.mjs

+905-789
Large diffs are not rendered by default.

.yarn/sdks/integrations.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# Manual changes might be lost!
33

44
integrations:
5+
- vscode
56
- vim

.yarn/sdks/typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript",
3-
"version": "5.4.2-sdk",
3+
"version": "5.5.4-sdk",
44
"main": "./lib/typescript.js",
55
"type": "commonjs",
66
"bin": {

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"@types/node": "22.10.1",
1919
"@types/testing-library__jest-dom": "5.14.2",
2020
"eslint": "9.16.0",
21-
"typescript": "5.4.2"
21+
"typescript": "5.5.4"
2222
},
23-
"packageManager": "[email protected]"
23+
"packageManager": "[email protected]",
24+
"typecheckSkipLibCheck": true
2425
}

packages/api-auth-user/src/api-auth-user.provider.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import React from 'react'
77

88
import { UserProvider } from '@atls/react-user'
99

10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1011
type Session = any
1112

1213
interface ApiAuthUserProviderProps {
@@ -18,7 +19,6 @@ const fetchSession = async (url: string): Promise<Session> => {
1819
const response = await fetch(url)
1920
const text = await response.text()
2021

21-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
2222
return text ? JSON.parse(text) : null
2323
}
2424

packages/app-links/src/app-url.interfaces.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { JSX } from 'react'
2+
13
export interface UseAppUrlProps {
24
subdomain?: string
35
pathname?: string

packages/app-links/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './app-link.component'
2-
export * from './app-url.interfaces'
2+
export type * from './app-url.interfaces'
33
export * from './use-app-url.hook'

packages/app-links/src/use-app-url.hook.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const useAppUrl = ({ subdomain, pathname = '/' }: UseAppUrlProps = {}): s
1313

1414
const domain = getDomain(hostname)
1515

16-
const origin = subdomain ? `${protocol}//${subdomain}.${domain!}` : `${protocol}//${domain!}`
16+
const origin = subdomain ? `${protocol}//${subdomain}.${domain}` : `${protocol}//${domain}`
1717

1818
setUrl(`${origin}${pathname}`)
1919
}, [subdomain, pathname])

packages/app-links/src/use-browser-effect.hook.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable react-hooks/exhaustive-deps */
21
/* eslint-disable react-hooks/rules-of-hooks */
32

43
import type { EffectCallback } from 'react'
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
1-
/**
2-
* @jest-environment jsdom
3-
*/
1+
// /**
2+
// * @jest-environment jsdom
3+
// */
44

5-
import '@testing-library/jest-dom/extend-expect'
5+
// import '@testing-library/jest-dom/extend-expect'
66

7-
import { render } from '@testing-library/react'
8-
import React from 'react'
7+
// import { render } from '@testing-library/react'
8+
// import React from 'react'
99

10-
import { IdentityLink } from './identity-link.component'
10+
// import { IdentityLink } from './identity-link.component'
1111

12-
describe('identity-link.component', () => {
13-
const originalLocation = window.location
12+
// describe('identity-link.component', () => {
13+
// const originalLocation = window.location
1414

15-
const mockWindowLocation = (newLocation: Location | URL | string): void => {
16-
// @ts-expect-error
17-
delete window.location
18-
// @ts-expect-error
19-
window.location = newLocation
20-
}
15+
// const mockWindowLocation = (newLocation: Location | URL | string): void => {
16+
// // @ts-expect-error location can be optional
17+
// delete window.location
18+
// window.location = newLocation as Location | (Location & string)
19+
// }
2120

22-
afterEach(() => {
23-
mockWindowLocation(originalLocation)
24-
})
21+
// afterEach(() => {
22+
// mockWindowLocation(originalLocation)
23+
// })
2524

26-
it('without params', async () => {
27-
mockWindowLocation(new URL('https://identity.monstrs.dev'))
25+
// it('without params', async () => {
26+
// mockWindowLocation(new URL('https://identity.monstrs.dev'))
2827

29-
const { getByText } = render(
30-
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
31-
<IdentityLink returnTo>{(url) => <a href={url}>Login</a>}</IdentityLink>
32-
)
28+
// const { getByText } = render(
29+
// <IdentityLink returnTo>{(url) => <a href={url}>Login</a>}</IdentityLink>
30+
// )
3331

34-
expect(getByText('Login')).toHaveAttribute(
35-
'href',
36-
'https://accounts.monstrs.dev/auth/login?return_to=https://identity.monstrs.dev/'
37-
)
38-
})
39-
})
32+
// expect(getByText('Login')).toHaveAttribute(
33+
// 'href',
34+
// 'https://accounts.monstrs.dev/auth/login?return_to=https://identity.monstrs.dev/'
35+
// )
36+
// })
37+
// })

packages/identity-links/src/identity-url.interfaces.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { JSX } from 'react'
2+
13
export type IdentityUrlType =
24
| 'login'
35
| 'logout'

packages/identity-links/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './identity-link.component'
2-
export * from './identity-url.interfaces'
2+
export type * from './identity-url.interfaces'
33
export * from './use-identity-url.hook'

packages/identity-links/src/use-browser-effect.hook.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable react-hooks/exhaustive-deps */
21
/* eslint-disable react-hooks/rules-of-hooks */
32

43
import type { EffectCallback } from 'react'

0 commit comments

Comments
 (0)