Each service its own version: ipx, ipx-directory, the page (#207)
The workspace stops holding one version. ipx keeps 0.12.1-dev and its vX.Y.Z tags; the directory starts at 0.1.0-dev, tagged directory-vX.Y.Z, and the page at 0.1.0-dev in package.json, tagged web-vX.Y.Z, which web/build.mjs gives the script for the logo's tooltip beside ipx's. crates/feed is a library, not released. CLAUDE.md's release steps are for one service at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ The page, and the container that serves it (Caddy). ipx's changelog is
|
||||
[crates/ipx/CHANGELOG.md](../crates/ipx/CHANGELOG.md), which was the page's too until 0.12.0, and the
|
||||
directory's [crates/directory/CHANGELOG.md](../crates/directory/CHANGELOG.md).
|
||||
|
||||
Its version is in `package.json`, and a release is tagged `web-vX.Y.Z`.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
@@ -11,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Added
|
||||
|
||||
- The page has a version of its own, which the logo's tooltip shows beside ipx's (#207).
|
||||
- The page is served by its own container, ipx-web (Caddy), which passes the API to ipx on the same address, so a change to the page deploys without rebuilding ipx (#203).
|
||||
- Admin, Directory sets the directory's address and this server's token, and whether to share, and says how the last share went (#205).
|
||||
- A feed's settings have a Private switch, which keeps it out of the directory; on and locked for a feed whose address or login shows it is private (#205).
|
||||
|
||||
@@ -17,6 +17,8 @@ import swc from '@swc/core';
|
||||
import html from '@swc/html';
|
||||
|
||||
const here = path.dirname(fileURLToPath(import.meta.url));
|
||||
// The page's own version (package.json), given to its script in place of __WEB_VERSION__.
|
||||
const WEB_VERSION = JSON.parse(fs.readFileSync(path.join(here, '..', 'package.json'), 'utf8')).version;
|
||||
|
||||
// The files are one script, concatenated in this order, not modules: they share one top-level
|
||||
// scope, as the single inline script did, and code that runs at load needs what came before it.
|
||||
@@ -57,7 +59,8 @@ export function buildStyle({ minify = true } = {}) {
|
||||
export function buildPage(name, { minify = true } = {}) {
|
||||
const { script, src: files } = PAGES[name];
|
||||
const src = files.map(f => fs.readFileSync(path.join(here, 'src', f + '.ts'), 'utf8')).join('\n')
|
||||
.replaceAll('__HLS_JS__', HLS_URL);
|
||||
.replaceAll('__HLS_JS__', HLS_URL)
|
||||
.replaceAll('__WEB_VERSION__', WEB_VERSION);
|
||||
const js = swc.transformSync(src, {
|
||||
filename: name + '.ts',
|
||||
jsc: {
|
||||
|
||||
@@ -719,7 +719,8 @@ $('#signout').onclick=async()=>{ await api('/api/logout',{method:'POST'}); locat
|
||||
api('/api/me').then(u=>{
|
||||
S.me=u;
|
||||
$('#who').textContent=u.name+(u.admin?' · admin':'');
|
||||
$('#applogo').title=`iPX ${u.version}`;
|
||||
// ipx's version and the page's, each released on its own.
|
||||
$('#applogo').title=`iPX ${u.version}, page __WEB_VERSION__`;
|
||||
// Whether the link to Admin shows, now and before the first frame of the next visit.
|
||||
document.documentElement.toggleAttribute('data-admin',!!u.admin);
|
||||
try{ localStorage.setItem('ipx.admin',u.admin?'1':'0'); }catch{}
|
||||
|
||||
Reference in New Issue
Block a user