Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
59 lines (59 loc) · 2.55 KB
/
Copy pathwrangler.jsonc
File metadata and controls
59 lines (59 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
// Three static-asset Workers, one per deploy target, sharing this file
// through Wrangler environments. `--env <name>` targets the Worker named
// `grid-editor-<name>`; `--env ""` targets `grid-editor` itself.
//
// env Worker serves shipped by
// --env "" grid-editor grid-editor.app tag push
// stable grid-editor-stable stable.grid-editor.app push to stable
// reports grid-editor-reports preview alias only PR test reports
//
// Pull requests upload the editor as a *version* of `grid-editor` with a
// preview alias, which never activates and so cannot affect the live site.
// See .github/workflows/cloudflare-workers.yml and playwright.yml.
//
// No `main` anywhere: nothing runs server side, so every request is a free
// static asset request.
"name": "grid-editor",
"compatibility_date": "2026-09-01",
"assets": {
"directory": "dist-web",
// The editor is a single-page app, so unknown paths must serve index.html
// rather than 404.
"not_found_handling": "single-page-application",
},
"routes": [{ "pattern": "grid-editor.app", "custom_domain": true }],
// Served only at grid-editor.app, but pull request preview aliases live on
// workers.dev and need preview URLs kept on. Both are set explicitly because
// preview_urls otherwise follows workers_dev, and a deploy would turn the
// PR previews off.
"workers_dev": false,
"preview_urls": true,
"env": {
// Always tracks the head of the stable branch. A Worker of its own rather
// than a preview alias of the one above, because a custom domain requires
// a deployed Worker and version preview URLs cannot carry one.
"stable": {
// Inherits the `assets` block above; only the domain differs.
"routes": [
{ "pattern": "stable.grid-editor.app", "custom_domain": true },
],
// Reachable only at stable.grid-editor.app: always deployed, never
// uploaded as a preview, so it needs neither of these.
"workers_dev": false,
"preview_urls": false,
},
// Playwright HTML reports for a pull request. Only ever uploaded as a
// version with a preview alias -- a test report has no production
// counterpart, so this Worker is never deployed and must not inherit the
// grid-editor.app route.
"reports": {
// Do not inherit custom domain, using empty routes.
"routes": [],
"assets": {
"directory": "playwright-report",
"not_found_handling": "none",
},
},
},
}