Emdash source with visual editor image upload fix

Fixes:
1. media.ts: wrap placeholder generation in try-catch
2. toolbar.ts: check r.ok, display error message in popover
This commit is contained in:
2026-05-03 10:44:54 +07:00
parent 78f81bebb6
commit 2d1be52177
2352 changed files with 662964 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "emdash-demo",
"main": "./src/worker.ts",
"compatibility_date": "2026-01-14",
// disable_nodejs_process_v2 needed until unenv fix lands in Pages
// See: https://github.com/withastro/astro/issues/14511
"compatibility_flags": ["nodejs_compat", "disable_nodejs_process_v2"],
// Static assets served from dist/
"routes": [
{
"pattern": "demo.emdashcms.com",
"zone_name": "demo.emdashcms.com",
"custom_domain": true,
},
],
// D1 Database binding
"d1_databases": [
{
"binding": "DB",
"database_name": "emdash_db",
},
],
// R2 bucket for media storage
"r2_buckets": [
{
"binding": "MEDIA",
"bucket_name": "emdash-media",
},
],
// Observability
"observability": {
"enabled": true,
},
// Worker Loader for plugin sandboxing
"worker_loaders": [
{
"binding": "LOADER",
},
],
}