pnpr now serves its web UI at /-/ui/ from the same origin, so the UI needs no CORS setup and no server URL. The UI ships as the separate `@pnpm/pnpr-ui` package, an optional peer dependency of `@pnpm/pnpr`. pnpr finds it next to its own package (npm and pnpm both link a resolved peer beside the package that declares it), or reads it from `ui.dir`, and `ui.enabled: false` turns it off. - Serving: files from the UI directory, `index.html` for every other path outside `assets/`, a 404 for a missing hashed asset. The page gets a relative `<base>` so deep routes and path prefixes work without an absolute Vite base. Responses carry a CSP that keeps scripts and requests on this origin. - The UI source stays on bit.cloud. `pnpr/ui` is a workspace of its own that pins `@pnpm/pnpr.apps.pnpr-web` from bit.cloud's registry and builds it into `pnpr/npm/pnpr-ui/dist`. - Release: a `build-pnpr-ui` job builds the bundle. The verify and publish jobs download it. The smoke test installs the UI beside the wrapper and checks that pnpr serves it. `@pnpm/pnpr-ui` releases in a fixed group with `@pnpm/pnpr`.
14 lines
356 B
HTML
14 lines
356 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="theme-color" content="#F69220" />
|
|
<title>pnpr</title>
|
|
<script type="module" src="/src/main.js"></script>
|
|
</head>
|
|
<body style="margin: 0">
|
|
<div id="root"></div>
|
|
</body>
|
|
</html>
|