Skip to content

Commit 5f5ef0e

Browse files
authored
fix: checks (#49)
* feat(mobile): add test expo app * refactor(mobile): remove unnecessary files * chore(mobile): update dependencies * feat(mobile): add test sign-in screen * chore(mobile): install dependencies * feat(mobile): add app screens * feat(common): update dependencies * feat(mobile): add ui layout * chore(mobile): update dependencies * chore(mobile): update project structure * feat(mobile): update project structure * feat(mobile): update screens * chore(mobile): add mobile to workspaces * chore(mobile): run formatting * feat(common): add mobile to workspaces * refactor(mobile): structure * feat(mobile): update metro config * feat(mobile): update package.json * feat(mobile): update metro.config.js * chore(common): change packages name * chore(mobile): add exports * chore(mobile): update tsconfig * chore(mobile): update metro config * chore(common): remove cache * chore(mobile): update tsconfig * chore(common): get updates * refactor(common): move ui-mobile to project root * fix(ui): theme types * fix(ui): image component types * fix(ui): divider component types * fix(stores): select-input * fix(ui): input component * fix(ui): layout * fix(ui): modal * chore(common): run format * chore(common): update dependencies * fix(ui): sidebar component * fix(globals): client-cookie helper * fix(ui): toast-notification hook * chore(common): run format * fix(common): run lint errors * fix(stores): toast-notification types * fix(app): app-base-layout fragment types * fix(app): app-invite-member-modal fragment types * fix(app): app-member-card fragment types * fix(app): app-member-cards-grid fragment types * fix(app): app-organizations-modal fragment types * fix(app): app-root-layout fragment types * fix(app): app-add-member-to-organization-modal fragment types * chore(common): run format * fix(ui): avatar lint errors * fix(ui): checkbox lint errors * fix(ui): dropdown lint errors * fix(ui): image lint errors * fix(ui): button lint errors * fix(ui): icons lint errors * fix(ui): input lint errors * fix(ui): layout lint errors * fix(ui): modal lint errors * fix(ui): preloader lint errors * fix(ui): sidebar lint errors * fix(ui): switch lint errors * fix(ui): theme lint errors * fix(ui): toast-notification lint errors * fix(ui): utils lint errors * fix(stores): stores lint errors * fix(common): ui-mobile and globals lint errors * fix(globals): mail lint errors * fix(globals): helpers lint errors * fix(ui): switch component * fix(common): types and lint errors * fix(globals): github-hooks * fix(app): index-page * fix(app): entrypoints * fix(globals): mail lint errors * fix(globals): globals lint errors * fix(mobile): mobile lint errors * fix(app): app-base-layout lint errors * fix(app): app-invite-button lint errors * fix(app): app-invite-member-modal lint errors * fix(app): app-member-card lint errors * fix(app): app-member-cards-grid lint errors * fix(app): app-onboarding-condition-element lint errors * fix(app): app-organization-card lint errors * fix(app): app-organization-cards-grid lint errors * fix(app): app-organizations-modal lint errors * fix(app): app-registration lint errors * fix(app): app-root-layout lint errors * fix(app): app-theme-selector lint errors * fix(app): app-users-modal lint errors * fix(app): app-users-title lint errors * fix(common): lint errors * fix(app): app-add-member-to-organization-modal lint errors * fix(ui-mobile): lint errors * fix(mobile): lint errors * fix(mobile): tsconfig.json * chore(common): update .yarnrc.yml * chore(common): update tsconfig.json * chore(common): update .yarnrc.yml * chore(common): install dependencies * chore(common): run check * chore(common): update metro.config.js * chore(common): update .yarnrc.yml and package.json
1 parent 59363ba commit 5f5ef0e

File tree

415 files changed

+6856
-9929
lines changed

Some content is hidden

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

415 files changed

+6856
-9929
lines changed

.pnp.cjs

Lines changed: 3198 additions & 6701 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,3 @@ globalFolder: ../.yarn/berry
2929
preferReuse: true
3030

3131
yarnPath: .yarn/releases/yarn-remote.mjs
32-
33-
pnpIgnorePatterns:
34-
- ./mobile/app/**

app/api/github-auth-cookie/src/github-auth-cookie-handle.api.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// @ts-ignore:next-line
1+
/* eslint-disable */
2+
3+
// @ts-expect-error:next-line
24
import { cookies } from 'next/headers'
3-
// @ts-ignore:next-line
5+
// @ts-expect-error:next-line
46
import { redirect } from 'next/navigation'
57

68
import { getGithubAuthToken } from '@globals/github-hooks'
@@ -21,11 +23,10 @@ export async function githubAuthCookieHandle(request: Request) {
2123
const TOKEN = await getGithubAuthToken(CODE)
2224

2325
const TOKEN_COOKIE_NAME = process.env.NEXT_PUBLIC_TOKEN_COOKIE_NAME
24-
cookies().set(TOKEN_COOKIE_NAME as string, TOKEN, {
26+
cookies().set(TOKEN_COOKIE_NAME!, TOKEN, {
2527
expires: Date.now() + COOKIE_EXPIRES_WEEK,
2628
})
2729
} catch (e: any) {
28-
// eslint-disable-next-line no-console
2930
console.error(e)
3031
REGISTRATION_URL.searchParams.set('errorMessage', RU_MESSAGES.tokenError)
3132
return redirect(REGISTRATION_URL.href)

app/api/logout/src/logout.api.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// @ts-ignore:next-line
1+
/* eslint-disable */
2+
3+
// @ts-expect-error:next-line
24
import { cookies } from 'next/headers'
3-
// @ts-ignore:next-line
5+
// @ts-expect-error:next-line
46
import { redirect } from 'next/navigation'
57

68
export const logoutHandle = (request: Request) => {

app/api/send-invite-mail/src/send-invite-mail.api.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { sendInviteMail } from '@globals/mail'
1+
import type { InviteMailData } from './send-invite-mail.interfaces.js'
22

3-
export const sendInviteMailHandle = async (request: Request) => {
4-
const json = await request.json()
3+
import { sendInviteMail } from '@globals/mail'
4+
5+
export const sendInviteMailHandle = async (request: Request): Promise<Response> => {
6+
const json: InviteMailData = await request.json()
57
try {
68
const mailInfo = await sendInviteMail(json)
79
const data = JSON.stringify(mailInfo)
810
return Response.json(data)
11+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
912
} catch (e: any) {
1013
return new Response(`Send mail error: ${e.message}`, {
1114
status: e.status || e.responseCode || 400,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export interface InviteMailData {
2+
emails: Array<string>
3+
selectedInvites: Array<string>
4+
}

app/entrypoints/renderer/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"start": "node dist/src/index.cjs"
1111
},
1212
"dependencies": {
13-
"graphql": "16.8.2",
14-
"react-intl": "6.6.8"
13+
"graphql": "16.10.0",
14+
"react-intl": "6.8.9"
1515
},
1616
"devDependencies": {
1717
"@app/base-layout": "workspace:*",
@@ -24,14 +24,14 @@
2424
"@app/registration-page": "workspace:*",
2525
"@app/root-layout": "workspace:*",
2626
"@app/send-invite-mail-api": "workspace:*",
27-
"@emotion/react": "11.11.4",
27+
"@emotion/react": "11.14.0",
2828
"@stores/toast-notification": "workspace:*",
29-
"@types/node": "20.12.12",
30-
"@types/react": "18.3.3",
31-
"@types/react-dom": "18.3.0",
29+
"@types/node": "20.17.19",
30+
"@types/react": "18.3.18",
31+
"@types/react-dom": "18.3.5",
3232
"@ui/theme": "workspace:*",
33-
"next": "14.2.5",
34-
"node-loader": "2.0.0",
33+
"next": "14.2.24",
34+
"node-loader": "2.1.0",
3535
"react": "18.3.1",
3636
"react-dom": "18.3.1",
3737
"typescript": "5.2.2"

app/entrypoints/renderer/src/app/(dashboard)/layout.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
/* eslint-disable */
22

3-
import React from 'react'
4-
import { Suspense } from 'react'
3+
import { FC } from 'react'
4+
import { PropsWithChildren } from 'react'
5+
import { Suspense } from 'react'
6+
import React from 'react'
57

6-
import { BaseLayout } from '@app/base-layout'
7-
import { Loading } from '@app/loading'
8+
import { BaseLayout } from '@app/base-layout'
9+
import { Loading } from '@app/loading'
810

9-
const Layout = ({ children }) => (
11+
const Layout: FC<PropsWithChildren> = ({ children }) => (
1012
<Suspense fallback={<Loading />}>
1113
{/* @ts-expect-error Async Server Component */}
1214
<BaseLayout children={children} />
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import React from 'react'
1+
import type { JSX } from 'react'
2+
import type { PropsWithChildren } from 'react'
23

3-
import BaseRootLayout from '@app/root-layout'
4+
import React from 'react'
45

5-
import messages from '../../locales/ru.json'
6+
import BaseRootLayout from '@app/root-layout'
67

7-
// @ts-expect-error Async Server Component
8-
const RootLayout = ({ children }) => <BaseRootLayout messages={messages}>{children}</BaseRootLayout>
8+
import messages from '../../locales/ru.json'
9+
10+
const RootLayout = ({ children }: PropsWithChildren): JSX.Element => (
11+
// @ts-expect-error Async Server Component
12+
<BaseRootLayout messages={messages}>{children}</BaseRootLayout>
13+
)
914

1015
export default RootLayout

app/entrypoints/renderer/src/middleware.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// @ts-ignore:next-line
1+
// @ts-expect-error:next-line
22
import type { NextRequest } from 'next/server'
33

4-
// @ts-ignore:next-line
4+
// @ts-expect-error:next-line
55
import { NextResponse } from 'next/server'
66

7-
export const middleware = (request: NextRequest) => {
8-
const TOKEN_COOKIE_NAME = process.env.NEXT_PUBLIC_TOKEN_COOKIE_NAME as string
7+
export const middleware = (request: NextRequest): NextResponse => {
8+
const TOKEN_COOKIE_NAME = process.env.NEXT_PUBLIC_TOKEN_COOKIE_NAME ?? ''
99
if (!request.cookies.has(TOKEN_COOKIE_NAME)) {
1010
return NextResponse.redirect(new URL('/registration', request.url))
1111
}

0 commit comments

Comments
 (0)