From 7206a17a6a9b515fe10d7df149b9ab30558b041d Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Thu, 18 Dec 2025 20:30:15 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20mettre=20=C3=A0=20jour=20la=20configurat?= =?UTF-8?q?ion=20de=20wrangler=20et=20ajuster=20les=20scripts=20de=20build?= =?UTF-8?q?=20et=20de=20d=C3=A9ploiement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuxt.config.ts | 8 +------- package.json | 6 +++--- worker-configuration.d.ts | 10 +++------- wrangler.jsonc | 25 +++---------------------- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index fe7ba1b..a3e027d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -104,13 +104,7 @@ export default defineNuxtConfig({ }, nitro: { - preset: 'cloudflare_module', - - prerender: { - routes: ['/'], - crawlLinks: true, - ignore: ['/__nuxt_content', '/api/_content', '/studio'] - } + preset: 'cloudflare_pages', }, runtimeConfig: { diff --git a/package.json b/package.json index d09c696..f33784b 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "name": "artsite", "private": true, "scripts": { - "build": "nuxi build --preset cloudflare_module", + "build": "nuxi build", "dev": "nuxi dev", "preview": "bun run build && wrangler dev", "postinstall": "nuxt prepare", "lint": "eslint .", - "deploy": "bun run build && wrangler deploy", + "deploy": "bun run cf-typegen && bun run build && wrangler pages deploy .output/public", "cf-typegen": "wrangler types" }, "dependencies": { @@ -34,6 +34,6 @@ "@vueuse/nuxt": "14.1.0", "eslint": "9.39.2", "typescript": "^5.9.3", - "wrangler": "4.55.0" + "wrangler": "4.56.0" } } diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index 68cff7a..e2a7e78 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -1,10 +1,7 @@ /* eslint-disable */ -// Generated by Wrangler by running `wrangler types` (hash: 62d6edfcbe10d837218cb1a518a9ad0a) +// Generated by Wrangler by running `wrangler types` (hash: 889e96b9a6e7cd90ad202f69774b6cc7) // Runtime types generated with workerd@1.20251213.0 2025-12-13 nodejs_compat declare namespace Cloudflare { - interface GlobalProps { - mainModule: typeof import("./.output/server/index"); - } interface Env { CACHE: KVNamespace; NUXT_PUBLIC_I18N_BASE_URL: string; @@ -12,7 +9,6 @@ declare namespace Cloudflare { STUDIO_GITHUB_CLIENT_ID: string; STUDIO_GITHUB_CLIENT_SECRET: string; DB: D1Database; - ASSETS: Fetcher; } } interface Env extends Cloudflare.Env {} @@ -8603,7 +8599,7 @@ type AIGatewayHeaders = { [key: string]: string | number | boolean | object; }; type AIGatewayUniversalRequest = { - provider: AIGatewayProviders | string; + provider: AIGatewayProviders | string; // eslint-disable-line endpoint: string; headers: Partial; query: unknown; @@ -8619,7 +8615,7 @@ declare abstract class AiGateway { gateway?: UniversalGatewayOptions; extraHeaders?: object; }): Promise; - getUrl(provider?: AIGatewayProviders | string): Promise; + getUrl(provider?: AIGatewayProviders | string): Promise; // eslint-disable-line } interface AutoRAGInternalError extends Error { } diff --git a/wrangler.jsonc b/wrangler.jsonc index e951be2..85361af 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -5,14 +5,9 @@ "compatibility_flags": [ "nodejs_compat" ], - "pages_build_output_dir": ".output/public", - "routes": [ - { - "pattern": "v2.arthurdanjou.fr", - "zone_name": "arthurdanjou.fr", - "custom_domain": true - } - ], + "placement": { + "mode": "smart" + }, "d1_databases": [ { "binding": "DB", @@ -25,18 +20,4 @@ "id": "f0766ace1d24423ba6e5cac4fb8f2054" } ], - "observability": { - "enabled": true, - "logs": { - "enabled": true, - "head_sampling_rate": 1, - "persist": true, - "invocation_logs": true - }, - "traces": { - "enabled": true, - "head_sampling_rate": 1, - "persist": true - } - } } \ No newline at end of file