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
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ coverage:
flags:
- provider-proxy

ignore:
- "**/*.spec.ts"
- "**/*.spec.tsx"
- "**/next-env.d.ts"
- "**/pages/_app.tsx"
- "**/pages/_document.tsx"
- "**/pages/_error.tsx"
- "**/Editor/monaco-*.ts"
- "**/Editor/*.worker.ts"

flags:
api:
carryforward: true
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"@vitest/coverage-v8": "^4.1.5",
"drizzle-kit": "^0.22.7",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.3",
"eslint-config-next": "^15.5.18",
"eslint-plugin-simple-import-sort": "^12.1.0",
"nock": "^14.0.11",
"openapi3-ts": "^4.5.0",
Expand Down
11 changes: 10 additions & 1 deletion apps/deploy-web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@ module.exports = {
]
}
]
}
},
overrides: [
{
files: ["tests/ui/**/*.ts", "tests/ui/**/*.tsx"],
rules: {
// Playwright fixtures destructure a `use` callback that the react-hooks rule misreads as the React `use` hook.
"react-hooks/rules-of-hooks": "off"
}
}
]
};
3 changes: 2 additions & 1 deletion apps/deploy-web/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
8 changes: 4 additions & 4 deletions apps/deploy-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ const nextConfig = {
styledComponents: true
},
images: {
domains: ["raw.githubusercontent.com", "avatars.githubusercontent.com"]
remotePatterns: [
{ protocol: "https", hostname: "raw.githubusercontent.com" },
{ protocol: "https", hostname: "avatars.githubusercontent.com" }
]
},
output: "standalone",
typescript: {
Expand All @@ -50,9 +53,6 @@ const nextConfig = {
ignoreDuringBuilds: true
},
transpilePackages,
experimental: {
instrumentationHook: true
},
i18n: {
locales: ["en-US"],
defaultLocale: "en-US"
Expand Down
15 changes: 8 additions & 7 deletions apps/deploy-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@
"monaco-editor": "^0.55.1",
"monaco-yaml": "^5.4.0",
"nanoid": "^3.3.4",
"next": "^14.2.35",
"next": "^15.5.18",
"next-navigation-guard": "^0.2.0",
"next-pwa": "^5.6.0",
"next-seo": "^6.1.0",
"next-themes": "^0.2.1",
"notistack": "^3.0.1",
"nprogress": "^0.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.50.0",
"react-icons": "^5.0.1",
Expand All @@ -129,7 +129,7 @@
"@cosmjs/crypto": "~0.38.0",
"@faker-js/faker": "^9.4.0",
"@keplr-wallet/types": "^0.12.111",
"@next/bundle-analyzer": "^14.0.1",
"@next/bundle-analyzer": "^15.5.18",
"@octokit/openapi-types": "^22.2.0",
"@playwright/test": "~1.57.0",
"@testing-library/dom": "^10.4.0",
Expand All @@ -141,8 +141,8 @@
"@types/lodash": "^4.14.197",
"@types/node": "^22.13.11",
"@types/nprogress": "^0.2.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@types/react-simple-maps": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@vitejs/plugin-react": "^6.0.1",
Expand All @@ -151,7 +151,7 @@
"autoprefixer": "^10.4.16",
"copy-webpack-plugin": "^13.0.1",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.3",
"eslint-config-next": "^15.5.18",
"eslint-plugin-simple-import-sort": "^12.1.0",
"jsdom": "^28.1.0",
"nock": "^13.5.0",
Expand All @@ -161,6 +161,7 @@
"prettier-plugin-tailwindcss": "^0.6.1",
"tailwindcss": "^3.4.3",
"typescript": "~5.8.2",
"vite": "^8.0.0",
"vitest": "^4.1.5",
"vitest-mock-extended": "^4.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ import "monaco-editor/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplac
// 15) Standalone strings + icons + platform helpers (standalone UX polish)
// ============================================================================
import "monaco-editor/esm/vs/editor/common/standaloneStrings.js"; // Localized strings for standalone editor UI
import "monaco-editor/esm/vs//base/browser/ui/codicons/codicon/codicon.css"; // Codicon base icon font CSS (as requested with vs/editor prefix)
import "monaco-editor/esm/vs//base/browser/ui/codicons/codicon/codicon-modifiers.css"; // Codicon modifiers CSS
import "monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon.css"; // Codicon base icon font CSS
import "monaco-editor/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css"; // Codicon modifiers CSS
import "monaco-editor/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js"; // iPad/iOS Safari keyboard focus workaround
// import 'monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.js'; // “Inspect Tokens” dev tool (token inspection UI)
// import 'monaco-editor/esm/vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess.js'; // Quick access: help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { mock } from "vitest-mock-extended";

import type { NextApiRequestWithServices } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import { REQ_SERVICES_KEY } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import handler from "@src/pages/api/auth/email-code-start";
import type { AppServices } from "@src/services/app-di-container/server-di-container.service";
import type { SessionService } from "@src/services/session/session.service";
import handler from "./email-code-start";

describe("POST /api/auth/email-code-start", () => {
it("returns 204 on successful start", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { mock } from "vitest-mock-extended";
import { Session } from "@src/lib/auth0";
import type { NextApiRequestWithServices } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import { REQ_SERVICES_KEY } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import handler from "@src/pages/api/auth/email-code-verify";
import type { AppServices } from "@src/services/app-di-container/server-di-container.service";
import type { SessionService } from "@src/services/session/session.service";
import handler from "./email-code-verify";

describe("POST /api/auth/email-code-verify", () => {
it("returns 204 after register-user + setSession on success", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { mock } from "vitest-mock-extended";
import type { Session } from "@src/lib/auth0";
import type { NextApiRequestWithServices } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import { REQ_SERVICES_KEY } from "@src/lib/nextjs/defineApiHandler/defineApiHandler";
import handler from "@src/pages/api/proxy/[...path]";
import type { ApiUrlService } from "@src/services/api-url/api-url.service";
import { services } from "@src/services/app-di-container/server-di-container.service";
import handler from "./[...path]";

describe("proxy [...path] handler", () => {
it("forwards Bearer token when session has accessToken", async () => {
Expand Down Expand Up @@ -60,7 +60,6 @@ describe("proxy [...path] handler", () => {
cookies: {},
socket: mock<Socket>({ remoteAddress: "127.0.0.1" })
});
// assigned post-construction so unknown header lookups return undefined; vitest-mock-extended deep-mocks override values
req.headers = {};
const res = mock<NextApiResponse>();

Expand Down
3 changes: 2 additions & 1 deletion apps/deploy-web/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function MyDocument(props: DocumentHeadTagsProps) {
}

MyDocument.getInitialProps = async (ctx: DocumentContext) => {
const finalProps = await documentGetInitialProps(ctx);
// @mui/material-nextjs@5.x bundles Next 14 types; cast to its DocumentContext to bridge to Next 15's structurally-equivalent type.
const finalProps = await documentGetInitialProps(ctx as Parameters<typeof documentGetInitialProps>[0]);
return finalProps;
};
2 changes: 1 addition & 1 deletion apps/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"drizzle-kit": "^0.31.0",
"drizzle-orm": "^0.42.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.3",
"eslint-config-next": "^15.5.18",
"eslint-plugin-simple-import-sort": "^12.1.0",
"prettier": "^3.3.0",
"tsup": "^8.5.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/provider-console/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const nextConfig = {
styledComponents: true
},
images: {
domains: ["raw.githubusercontent.com"]
remotePatterns: [{ protocol: "https", hostname: "raw.githubusercontent.com" }]
},
output: "standalone",
typescript: {
Expand Down
12 changes: 6 additions & 6 deletions apps/provider-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
"jsencrypt": "^3.3.2",
"jwt-decode": "^4.0.0",
"lucide-react": "^0.395.0",
"next": "^14.2.35",
"next": "^15.5.18",
"next-themes": "^0.2.1",
"nextjs-google-analytics": "^2.3.7",
"notistack": "^3.0.1",
"postcss-nesting": "^12.0.2",
"react": "^18",
"react-dom": "^18",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.52.2",
"react-icons": "^5.0.1",
Expand All @@ -76,12 +76,12 @@
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^22.13.11",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.57.1",
"eslint-config-next": "14.2.4",
"eslint-config-next": "^15.5.18",
"eslint-plugin-simple-import-sort": "^12.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Expand Down
3 changes: 0 additions & 3 deletions apps/stats-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ const nextConfig = {
ignoreDuringBuilds: true
},
transpilePackages: ["geist", "@akashnetwork/ui"],
experimental: {
instrumentationHook: true
},
/**
*
* @param {import('webpack').Configuration} config
Expand Down
12 changes: 6 additions & 6 deletions apps/stats-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"jotai": "^2.5.1",
"lightweight-charts": "^4.2.0",
"lucide-react": "^0.292.0",
"next": "^14.2.35",
"next": "^15.5.18",
"next-nprogress-bar": "^2.1.2",
"next-qrcode": "^2.5.1",
"next-themes": "^0.2.1",
"nextjs-google-analytics": "^2.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.0.1",
"react-intl": "^6.5.5",
"react-modern-drawer": "^1.2.2",
Expand All @@ -55,12 +55,12 @@
"@akashnetwork/docker": "*",
"@akashnetwork/releaser": "*",
"@types/node": "^22.13.11",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.3",
"eslint-config-next": "^15.5.18",
"eslint-plugin-simple-import-sort": "^12.1.0",
"postcss": "^8.4.31",
"postcss-nesting": "^12.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ const DeploymentDetailPageSchema = z.object({
network: networkId
})
});
type DeploymentDetailPageProps = z.infer<typeof DeploymentDetailPageSchema>;
type ParsedDeploymentDetailProps = z.infer<typeof DeploymentDetailPageSchema>;
type DeploymentDetailPageProps = {
params: Promise<ParsedDeploymentDetailProps["params"]>;
searchParams: Promise<ParsedDeploymentDetailProps["searchParams"]>;
};

export async function generateMetadata({ params: { address, dseq } }: DeploymentDetailPageProps): Promise<Metadata> {
export async function generateMetadata({ params }: DeploymentDetailPageProps): Promise<Metadata> {
const { address, dseq } = await params;
const url = `https://stats.akash.network${UrlService.deployment(address, dseq)}`;

return {
Expand Down Expand Up @@ -55,10 +60,11 @@ async function fetchDeploymentData(address: string, dseq: string, network: Netwo
}

export default async function DeploymentDetailPage(props: DeploymentDetailPageProps) {
const [params, searchParams] = await Promise.all([props.params, props.searchParams]);
const {
params: { address, dseq },
searchParams: { network }
} = DeploymentDetailPageSchema.parse(props);
} = DeploymentDetailPageSchema.parse({ params, searchParams });
const deployment = await fetchDeploymentData(address, dseq, network);

if (!deployment) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { AddressDeployments } from "./AddressDeployments";

import { UrlService } from "@/lib/urlUtils";

export async function generateMetadata({ params: { address } }: IProps): Promise<Metadata> {
export async function generateMetadata({ params }: IProps): Promise<Metadata> {
const { address } = await params;
const url = `https://stats.akash.network${UrlService.addressDeployments(address)}`;

return {
Expand All @@ -20,11 +21,12 @@ export async function generateMetadata({ params: { address } }: IProps): Promise
}

interface IProps {
params: { address: string };
searchParams: { [key: string]: string | string[] | undefined };
params: Promise<{ address: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}

export default async function AddressDeploymentsPage({ params: { address } }: IProps) {
export default async function AddressDeploymentsPage({ params }: IProps) {
const { address } = await params;
return (
<AddressLayout page="deployments" address={address}>
<div className="mt-4">
Expand Down
14 changes: 10 additions & 4 deletions apps/stats-web/src/app/addresses/[address]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ const AddressDetailPageSchema = z.object({
network: networkId
})
});
type AddressDetailPageProps = z.infer<typeof AddressDetailPageSchema>;

export async function generateMetadata({ params: { address } }: AddressDetailPageProps): Promise<Metadata> {
type ParsedAddressDetailProps = z.infer<typeof AddressDetailPageSchema>;
type AddressDetailPageProps = {
params: Promise<ParsedAddressDetailProps["params"]>;
searchParams: Promise<ParsedAddressDetailProps["searchParams"]>;
};

export async function generateMetadata({ params }: AddressDetailPageProps): Promise<Metadata> {
const { address } = await params;
const url = `https://stats.akash.network${UrlService.address(address)}`;

return {
Expand Down Expand Up @@ -59,10 +64,11 @@ async function fetchAddressData(address: string, network: Network["id"]): Promis
}

export default async function AddressDetailPage(props: AddressDetailPageProps) {
const [params, searchParams] = await Promise.all([props.params, props.searchParams]);
const {
params: { address },
searchParams: { network }
} = AddressDetailPageSchema.parse(props);
} = AddressDetailPageSchema.parse({ params, searchParams });
const addressDetail = await fetchAddressData(address, network);

if (!addressDetail) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { AddressTransactions } from "./AddressTransactions";

import { UrlService } from "@/lib/urlUtils";

export async function generateMetadata({ params: { address } }: IProps): Promise<Metadata> {
export async function generateMetadata({ params }: IProps): Promise<Metadata> {
const { address } = await params;
const url = `https://stats.akash.network${UrlService.addressTransactions(address)}`;

return {
Expand All @@ -20,11 +21,12 @@ export async function generateMetadata({ params: { address } }: IProps): Promise
}

interface IProps {
params: { address: string };
searchParams: { [key: string]: string | string[] | undefined };
params: Promise<{ address: string }>;
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}

export default async function AddressTransactionsPage({ params: { address } }: IProps) {
export default async function AddressTransactionsPage({ params }: IProps) {
const { address } = await params;
return (
<AddressLayout page="transactions" address={address}>
<div className="mt-4">
Expand Down
Loading
Loading