release: @johanleroy/git-arboretum 1.0.0 — publication sur le registre Gitea
Some checks failed
Release / Publish to Gitea npm registry (push) Has been cancelled

- renomme le paquet en @johanleroy/git-arboretum (scope routé vers le registre npm Gitea privé)
- embarque @arboretum/shared via bundleDependencies (scripts/vendor-shared.mjs au prepack)
- joint README/LICENSE au tarball (scripts/copy-meta.mjs) + metadata, keywords, publishConfig
- CI pack-smoke en mono-tarball avec assertion bundleDep ; nouveau workflow release.yml (publish sur tag v*)
- version 1.0.0 ; README mis à jour (install scopé + service systemd)
This commit is contained in:
2026-06-17 13:53:30 +02:00
parent 3acf27d48f
commit 08166c108b
10 changed files with 228 additions and 21 deletions

View File

@@ -1,26 +1,55 @@
{
"name": "git-arboretum",
"version": "0.1.0",
"name": "@johanleroy/git-arboretum",
"version": "1.0.0",
"description": "Self-hosted web dashboard for git worktrees and the Claude Code sessions running on them",
"license": "MIT",
"type": "module",
"author": "Johan LEROY <contact@johanleroy.fr>",
"homepage": "https://git.lidge.fr/johanleroy/arboretum#readme",
"repository": {
"type": "git",
"url": "git+https://git.lidge.fr/johanleroy/arboretum.git",
"directory": "packages/server"
},
"bugs": {
"url": "https://git.lidge.fr/johanleroy/arboretum/issues"
},
"keywords": [
"git",
"worktree",
"claude",
"claude-code",
"dashboard",
"self-hosted",
"pty",
"terminal",
"cli",
"daemon",
"pwa"
],
"bin": {
"arboretum": "./dist/index.js"
},
"main": "./dist/app.js",
"files": [
"dist",
"dist/**/*.js",
"public"
],
"engines": {
"node": ">=22.16"
},
"publishConfig": {
"registry": "https://git.lidge.fr/api/packages/johanleroy/npm/"
},
"scripts": {
"build": "tsc -b",
"dev": "tsc -b --watch & node --watch dist/index.js",
"prepack": "node scripts/copy-web.mjs",
"prepack": "node scripts/copy-web.mjs && node scripts/vendor-shared.mjs && node scripts/copy-meta.mjs",
"test": "vitest run"
},
"bundleDependencies": [
"@arboretum/shared"
],
"dependencies": {
"@arboretum/shared": "0.1.0",
"@fastify/cookie": "^11.0.0",

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env node
// Copie le README et la LICENSE racine dans packages/server/ avant le pack, pour que
// la page du paquet (registre Gitea) ne soit pas nue et que la licence soit jointe.
// npm inclut automatiquement README* et LICENSE* dans le tarball s'ils sont présents.
// Branché sur le hook "prepack". Ces copies sont gitignorées (générées, non versionnées).
import { copyFileSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const serverDir = join(dirname(fileURLToPath(import.meta.url)), '..');
const rootDir = join(serverDir, '..', '..');
// README : réécrit les chemins d'images relatifs (brand/…) en URL absolue Gitea raw,
// sinon le logo est cassé hors du repo (sur la page du paquet).
const readmeSrc = join(rootDir, 'README.md');
if (existsSync(readmeSrc)) {
const rawBase = 'https://git.lidge.fr/johanleroy/arboretum/raw/branch/main/';
const readme = readFileSync(readmeSrc, 'utf8').replaceAll('src="brand/', `src="${rawBase}brand/`);
writeFileSync(join(serverDir, 'README.md'), readme);
console.log('copy-meta: README.md copié (chemins images réécrits en absolu)');
} else {
console.error(`copy-meta: ${readmeSrc} introuvable`);
process.exit(1);
}
const licenseSrc = join(rootDir, 'LICENSE');
if (existsSync(licenseSrc)) {
copyFileSync(licenseSrc, join(serverDir, 'LICENSE'));
console.log('copy-meta: LICENSE copié');
} else {
console.error(`copy-meta: ${licenseSrc} introuvable`);
process.exit(1);
}

View File

@@ -0,0 +1,43 @@
#!/usr/bin/env node
// Embarque @arboretum/shared (dépendance runtime non publiée) DANS le tarball npm.
// Branché sur le hook "prepack", aux côtés de bundleDependencies dans package.json.
//
// Pourquoi un vrai dossier et pas le symlink workspace : sous npm workspaces, shared
// est seulement symlinké dans le node_modules racine ; `npm pack` n'embarque une
// bundleDependency que si elle existe comme VRAI dossier dans le node_modules du
// paquet packé (packages/server/node_modules/@arboretum/shared). On le matérialise ici.
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
const serverDir = join(dirname(fileURLToPath(import.meta.url)), '..');
const sharedDir = join(serverDir, '..', 'shared');
const sharedDist = join(sharedDir, 'dist');
const target = join(serverDir, 'node_modules', '@arboretum', 'shared');
if (!existsSync(sharedDist)) {
console.error(
`vendor-shared: ${sharedDist} introuvable — lance "npm run build" (shared doit être compilé) avant le pack.`,
);
process.exit(1);
}
// package.json minimal et déterministe : on reprend les champs de résolution réels de
// shared (version incluse, pour rester synchro), sans scripts ni files inutiles au runtime.
const shared = JSON.parse(readFileSync(join(sharedDir, 'package.json'), 'utf8'));
const minimal = {
name: shared.name,
version: shared.version,
type: shared.type,
main: shared.main,
types: shared.types,
exports: shared.exports,
};
// Idempotent : on repart d'un dossier propre à chaque pack.
rmSync(target, { recursive: true, force: true });
mkdirSync(target, { recursive: true });
writeFileSync(join(target, 'package.json'), JSON.stringify(minimal, null, 2) + '\n');
cpSync(sharedDist, join(target, 'dist'), { recursive: true });
console.log(`vendor-shared: embarqué ${shared.name}@${shared.version} -> ${target}`);