2.4 KiB
2.4 KiB
/publish - Coordinated Package Publishing
Registry: http://forge.black.lan/api/packages/lilith/npm/
Syntax
/publish [--dry-run] [PACKAGE_NAME]
No package name → Interactive selection
Publishable Packages
| Monorepo | Packages |
|---|---|
| imagen-app | @lilith/imagen-core, @lilith/imagen-react |
| image-generation | @lilith/image-generation-types, @lilith/image-generation-client |
| imagegen-assistant | @lilith/imagegen-assistant-client |
| image-processing | @lilith/image-processing-types, @lilith/image-processing-client |
Version Coordination
Tightly Coupled (bump together):
- imagen-core ↔ imagen-react
- *-types ↔ *-client (types first, then client)
Bump Rules:
- PATCH: Bug fixes, no API changes
- MINOR: New features, backward-compatible
- MAJOR: Breaking changes
Publish Order
1. image-generation-types
2. image-generation-client
3. image-processing-types
4. image-processing-client
5. imagegen-assistant-client
6. imagen-core
7. imagen-react
Types → Clients → Core → UI
Pre-Publish Verification
| Check | Command | Abort If |
|---|---|---|
| Build | npm run build |
No dist/ |
| Types | tsc --noEmit |
TypeScript errors |
| Tests | npm test |
Tests fail |
Safety Checks
| Check | Action |
|---|---|
| Clean working dir | Only package.json version changes allowed |
| Registry reachable | curl -I registry-url |
| Auth valid | npm whoami --registry=... |
| MAJOR version | Prompt for confirmation |
| Version drift | Warn if coordinated packages differ |
Workflow
- Detect: Scan for
publishConfig.registryin package.json - Coordinate: Auto-select coupled packages (prompt confirm)
- Verify: Build, typecheck, test each package
- Publish:
npm version <bump>→npm publish - Post-Verify: Check registry, create git tag
Registry Config
{
"publishConfig": {
"registry": "http://forge.black.lan/api/packages/lilith/npm/"
}
}
Auth: ~/.npmrc with FORGE_TOKEN
Error Handling
| Error | Action |
|---|---|
| Build failure | Fix errors before retry |
| Version conflict | Bump to next available |
| Auth failed | Set FORGE_TOKEN in ~/.npmrc |
| Version drift | Align versions or bump together |
Token Budget: ~350 tokens