feat(03-04): Worker [assets] binding + one-command deploy + D-14 build-artifact gate
- wrangler.jsonc assets block serves ../web/dist; run_worker_first keeps /api/* + /telegram/* on the Worker (D-13) - root npm run deploy = build theme → web → bot wrangler deploy + set-webhook (D-15); dev = build + wrangler dev --port 8787 --local (D-12) - vite.config.ts dual-build: __ARAHARAH_HARNESS__ define keyed on --mode harness, separate dist/dist-harness outDirs - main.ts guard unchanged; ambient constant declared once in web/src/vite-env.d.ts - build-artifact.test.mjs BA1..BA6: zero CDN refs, self-hosted fonts, MapLibre worker, inlined style, no mock installer in ANY emitted file (HTML included)
This commit is contained in:
+4
-6
@@ -17,12 +17,10 @@
|
||||
* storage API anywhere on the path.
|
||||
*/
|
||||
|
||||
/* Ambient harness constant. Its canonical declaration home is
|
||||
web/src/vite-env.d.ts (plan 03-04 task 2); until that file exists it is
|
||||
declared here — single `declare const`, never re-typed later. Vite's
|
||||
`define` (vite.config.ts) supplies true ONLY in --mode harness builds
|
||||
and false everywhere else, so a plain dev run cannot hit a ReferenceError. */
|
||||
declare const __ARAHARAH_HARNESS__: boolean;
|
||||
/* Ambient harness constant `__ARAHARAH_HARNESS__` is declared in
|
||||
web/src/vite-env.d.ts (its canonical home, plan 03-04) and supplied by
|
||||
Vite's `define` (vite.config.ts): true ONLY in --mode harness builds,
|
||||
false everywhere else, so plain dev runs cannot hit a ReferenceError. */
|
||||
|
||||
import "./shell.css";
|
||||
import { bootMap } from "./map/map.ts";
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* vite-env.d.ts — ambient declarations for the build pipeline.
|
||||
*
|
||||
* __ARAHARAH_HARNESS__ is injected by vite.config.ts's `define` (03-04
|
||||
* dual-build): true only in `vite build --mode harness` / --mode harness
|
||||
* dev, statically false in every production build. Declared here ONCE so
|
||||
* typecheck passes in both modes; main.ts references it without a local
|
||||
* re-declaration.
|
||||
*/
|
||||
declare const __ARAHARAH_HARNESS__: boolean;
|
||||
Reference in New Issue
Block a user