Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["**/dist/*"],
"ignorePatterns": ["**/dist/*", "**/next-env.d.ts"],
"plugins": [
"@typescript-eslint"
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/admin-panel-cloudflare-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '22'

Expand All @@ -35,7 +35,7 @@ jobs:
run: cd admin-panel && npm run cf:build

- name: Deploy
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 22
cache: 'npm'

- name: Install all dependencies
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 22
cache: 'npm'
cache-dependency-path: ./server/package-lock.json

Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 22
cache: 'npm'
cache-dependency-path: ./server/package-lock.json

Expand All @@ -254,7 +254,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 22
cache: 'npm'
cache-dependency-path: ./server/package-lock.json

Expand All @@ -280,7 +280,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.17.0
node-version: 22
cache: 'npm'

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/server-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'

- name: Install dependencies
run: cd server && npm ci
Expand All @@ -25,7 +25,7 @@ jobs:
run: cd server && npm run build

- name: Run Migration
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
12 changes: 11 additions & 1 deletion admin-panel/app/Setup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ import {
configSignal,
errorSignal,
} from 'signals'
import { typeTool } from 'tools'
import {
proxyTool, typeTool,
} from 'tools'

const mockSendNextRequest = vi.spyOn(
proxyTool,
'sendNextRequest',
)

// Mock all required hooks and modules
vi.mock(
Expand Down Expand Up @@ -54,6 +61,8 @@ vi.mock(
() => ({
useRouter: vi.fn(() => ({ push: vi.fn() })),
usePathname: vi.fn(),
redirect: vi.fn(),
permanentRedirect: vi.fn(),
}),
)

Expand Down Expand Up @@ -82,6 +91,7 @@ describe(

beforeEach(() => {
vi.clearAllMocks()
mockSendNextRequest.mockResolvedValue({ configs: {} })
errorSignal.value = ''
configSignal.value = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ImpersonationModal = ({
<AlertDialogHeader>
<AlertDialogTitle>{t(
'impersonateTitle',
{ user: user.email },
{ user: user.email || user.authId },
)}</AlertDialogTitle>
</AlertDialogHeader>
<section>
Expand Down
2 changes: 1 addition & 1 deletion admin-panel/app/[lang]/users/[authId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ const Page = () => {
disabled={isUpdating}
confirmDeleteTitle={t(
'common.deleteConfirm',
{ item: user.email },
{ item: user.email || user.authId },
)}
onConfirmDelete={handleDelete}
/>
Expand Down
3 changes: 2 additions & 1 deletion admin-panel/i18n/routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineRouting } from 'next-intl/routing'

export const routing = defineRouting({
locales: ['en', 'fr'],

defaultLocale: 'en',
localeDetection: false,
localeCookie: false,
})
11 changes: 6 additions & 5 deletions admin-panel/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Next.js 16 deprecates the `middleware` file convention in favour of `proxy`,
// but a `proxy` file always runs on the Node.js runtime, which
// @opennextjs/cloudflare cannot bundle. Keep this as `middleware.ts` so it
// still compiles to edge and `cf:build` keeps working.
import createMiddleware from 'next-intl/middleware'
import { routing } from './i18n/routing'

export default createMiddleware({
locales: ['en', 'fr'],
defaultLocale: 'en',
localeDetection: false,
})
export default createMiddleware(routing)

export const config = { matcher: ['/', '/(en|fr)/:path*'] }
3 changes: 2 additions & 1 deletion admin-panel/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
import "./.next/dev/types/routes.d.ts";
import "./.next/dev/types/root-params.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading