feat: Event context type for Cloudflare environment
This commit is contained in:
1
wp-content/themes/moonshine/.gitignore
vendored
1
wp-content/themes/moonshine/.gitignore
vendored
@@ -25,3 +25,4 @@ logs
|
|||||||
|
|
||||||
# Wrangler files
|
# Wrangler files
|
||||||
.wrangler
|
.wrangler
|
||||||
|
server/types/cloudflare.d.ts
|
||||||
|
|||||||
@@ -1,2 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
return ['project-id-version'=>'Moonshine','report-msgid-bugs-to'=>'','pot-creation-date'=>'2026-01-13 15:52+0000','po-revision-date'=>'2026-01-29 02:55+0000','last-translator'=>'','language-team'=>'Français du Canada','language'=>'fr_CA','plural-forms'=>'nplurals=2; plural=n > 1;','mime-version'=>'1.0','content-type'=>'text/plain; charset=UTF-8','content-transfer-encoding'=>'8bit','x-generator'=>'Loco https://localise.biz/','x-loco-version'=>'2.8.1; wp-6.9; php-8.3.27','x-domain'=>'moonshine','messages'=>['Heading styles'=>'Styles de titres','Headless WordPress theme based on Nuxt.'=>'Thème Wordpress headless basé sur Nuxt.','https://websimple.com/'=>'https://websimple.com/','Inline styles'=>'Styles de caractères','Link styles'=>'Styles de liens','Main menu'=>'Menu principal','Moonshine'=>'Moonshine','Paragraph styles'=>'Styles de paragraphes','Pascal Martineau '=>'Pascal Martineau ','Semi-bold'=>'Semi-gras']];
|
return array(
|
||||||
|
'project-id-version' => 'Moonshine',
|
||||||
|
'report-msgid-bugs-to' => '',
|
||||||
|
'pot-creation-date' => '2026-01-13 15:52+0000',
|
||||||
|
'po-revision-date' => '2026-01-29 02:55+0000',
|
||||||
|
'last-translator' => '',
|
||||||
|
'language-team' => 'Français du Canada',
|
||||||
|
'language' => 'fr_CA',
|
||||||
|
'plural-forms' => 'nplurals=2; plural=n > 1;',
|
||||||
|
'mime-version' => '1.0',
|
||||||
|
'content-type' => 'text/plain; charset=UTF-8',
|
||||||
|
'content-transfer-encoding' => '8bit',
|
||||||
|
'x-generator' => 'Loco https://localise.biz/',
|
||||||
|
'x-loco-version' => '2.8.1; wp-6.9; php-8.3.27',
|
||||||
|
'x-domain' => 'moonshine',
|
||||||
|
'messages' => array(
|
||||||
|
'Heading styles' => 'Styles de titres',
|
||||||
|
'Headless WordPress theme based on Nuxt.' => 'Thème Wordpress headless basé sur Nuxt.',
|
||||||
|
'https://websimple.com/' => 'https://websimple.com/',
|
||||||
|
'Inline styles' => 'Styles de caractères',
|
||||||
|
'Link styles' => 'Styles de liens',
|
||||||
|
'Main menu' => 'Menu principal',
|
||||||
|
'Moonshine' => 'Moonshine',
|
||||||
|
'Paragraph styles' => 'Styles de paragraphes',
|
||||||
|
'Pascal Martineau ' => 'Pascal Martineau ',
|
||||||
|
'Semi-bold' => 'Semi-gras',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|||||||
@@ -5,14 +5,22 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "pnpm --sequential /build:.*/",
|
||||||
"editor-style": "pnpx @tailwindcss/cli -i ./app/assets/css/_main.css -o ./editor-style.css --minify",
|
"build:nuxt": "nuxt build",
|
||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
"lint": "eslint --fix .",
|
"editor-style": "pnpx @tailwindcss/cli -i ./app/assets/css/_main.css -o ./editor-style.css --minify",
|
||||||
"postinstall": "nuxt prepare",
|
"lint": "eslint . --fix",
|
||||||
"preview": "WRANGLER_ENV=dev pnpm run build && wrangler dev --port 3000",
|
"postinstall": "pnpm --sequential /postinstall:.*/",
|
||||||
"release": "pnpm lint && changelogen --noAuthors --release --push",
|
"postinstall:wrangler-types": "pnpm wrangler types ./server/types/cloudflare.d.ts",
|
||||||
"typecheck": "nuxt typecheck"
|
"postinstall:nuxt": "nuxt prepare",
|
||||||
|
"preview": "pnpm --sequential /preview:.*/",
|
||||||
|
"preview:build": "pnpm run build",
|
||||||
|
"preview:wrangler-dev": "wrangler dev --port 3000",
|
||||||
|
"release": "pnpm --sequential /release:.*/",
|
||||||
|
"release:lint": "eslint .",
|
||||||
|
"release:typecheck": "nuxt typecheck",
|
||||||
|
"release:changelogen": "changelogen --noAuthors --release --push",
|
||||||
|
"wrangler": "wrangler --config .output/server/wrangler.json"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify-json/cib": "^1.2.3",
|
"@iconify-json/cib": "^1.2.3",
|
||||||
|
|||||||
9
wp-content/themes/moonshine/server/types/h3.d.ts
vendored
Normal file
9
wp-content/themes/moonshine/server/types/h3.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import "h3";
|
||||||
|
|
||||||
|
declare module "h3" {
|
||||||
|
interface H3EventContext {
|
||||||
|
cloudflare: {
|
||||||
|
env: Cloudflare.Env;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user