diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94fad9c..90d033d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ['18.x', '20.x'] + node-version: ['18.18.x', '20.x'] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index d057f70..003737b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # deAPI Tester [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Node.js 18+](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/) +[![Node.js 18.18.0+](https://img.shields.io/badge/Node.js-18.18.0%2B-green.svg)](https://nodejs.org/) [![Next.js 15](https://img.shields.io/badge/Next.js-15-black.svg)](https://nextjs.org/) [![Docker](https://img.shields.io/badge/Docker-ready-blue.svg)](https://www.docker.com/) diff --git a/package.json b/package.json index 0adc4b2..ffc85f5 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "url": "https://deapi.ai" }, "license": "MIT", + "engines": { + "node": ">=18.18.0" + }, "repository": { "type": "git", "url": "https://github.com/deapi-ai/deapi-tester.git" diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a836226..422927f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,10 +2,23 @@ import type { Metadata } from 'next'; import './globals.css'; import { Providers } from '@/components/Providers'; +function getMetadataBaseUrl(): string { + const siteUrl = process.env.NEXT_PUBLIC_SITE_URL; + if (!siteUrl) { + return 'http://localhost:3000'; + } + // Ensure URL has a protocol + if (!/^https?:\/\//i.test(siteUrl)) { + console.warn( + `NEXT_PUBLIC_SITE_URL ('${siteUrl}') missing protocol. Using default: http://localhost:3000` + ); + return 'http://localhost:3000'; + } + return siteUrl; +} + export const metadata: Metadata = { - metadataBase: new URL( - process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000' - ), + metadataBase: new URL(getMetadataBaseUrl()), title: 'deAPI Tester — Test AI Inference Endpoints', description: 'Local developer tool for testing deAPI.ai endpoints. Generate images, videos, audio and more with dynamic forms, async job tracking, and result preview.', @@ -24,7 +37,6 @@ export const metadata: Metadata = { description: 'Test deAPI.ai endpoints locally with dynamic forms, async job tracking, price calculator and result preview.', type: 'website', - url: 'https://github.com/deapi-ai/deapi-tester', siteName: 'deAPI Tester', images: ['/og-image.png'], },