fix: rename all packages from @mosaic/* to @mosaicstack/*
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
ci/woodpecker/push/ci Pipeline failed

- Updated all package.json name fields and dependency references
- Updated all TypeScript/JavaScript imports
- Updated .woodpecker/publish.yml filters and registry paths
- Updated tools/install.sh scope default
- Updated .npmrc registry paths (worktree + host)
- Enhanced update-checker.ts with checkForAllUpdates() multi-package support
- Updated CLI update command to show table of all packages
- Added KNOWN_PACKAGES, formatAllPackagesTable, getInstallAllCommand
- Marked checkForUpdate() with @deprecated JSDoc

Closes #391
This commit is contained in:
Jarvis
2026-04-04 21:43:23 -05:00
parent 80994bdc8e
commit 774b76447d
200 changed files with 828 additions and 641 deletions

View File

@@ -2,7 +2,7 @@
import { createRequire } from 'module';
import { Command } from 'commander';
import { registerQualityRails } from '@mosaic/quality-rails';
import { registerQualityRails } from '@mosaicstack/quality-rails';
import { registerAgentCommand } from './commands/agent.js';
import { registerMissionCommand } from './commands/mission.js';
// prdy is registered via launch.ts
@@ -14,7 +14,7 @@ const CLI_VERSION: string = (_require('../package.json') as { version: string })
// Fire-and-forget update check at startup (non-blocking, cached 1h)
try {
const { backgroundUpdateCheck } = await import('@mosaic/mosaic');
const { backgroundUpdateCheck } = await import('@mosaicstack/mosaic');
backgroundUpdateCheck();
} catch {
// Silently ignore — update check is best-effort
@@ -314,38 +314,36 @@ program
.description('Check for and install Mosaic CLI updates')
.option('--check', 'Check only, do not install')
.action(async (opts: { check?: boolean }) => {
const { checkForUpdate, formatUpdateNotice, getInstallCommand } =
await import('@mosaic/mosaic');
const { checkForAllUpdates, formatAllPackagesTable, getInstallAllCommand } =
await import('@mosaicstack/mosaic');
const { execSync } = await import('node:child_process');
console.log('Checking for updates…');
const result = checkForUpdate({ skipCache: true });
const results = checkForAllUpdates({ skipCache: true });
if (!result.latest) {
console.error('Could not reach the Mosaic registry.');
process.exit(1);
}
console.log('');
console.log(formatAllPackagesTable(results));
console.log(` Installed: ${result.current || '(none)'}`);
console.log(` Latest: ${result.latest}`);
if (!result.updateAvailable) {
console.log('\n✔ Up to date.');
const outdated = results.filter((r: { updateAvailable: boolean }) => r.updateAvailable);
if (outdated.length === 0) {
const anyInstalled = results.some((r: { current: string }) => r.current);
if (!anyInstalled) {
console.error('No @mosaicstack/* packages are installed.');
process.exit(1);
}
console.log('\n✔ All packages up to date.');
return;
}
const notice = formatUpdateNotice(result);
if (notice) console.log(notice);
if (opts.check) {
process.exit(2); // Signal to callers that an update exists
}
console.log('Installing update…');
console.log(`\nInstalling ${outdated.length} update(s)…`);
try {
// Relies on @mosaic:registry in ~/.npmrc — do NOT pass --registry
// globally or non-@mosaic deps will 404 against the Gitea registry.
execSync(getInstallCommand(result), {
// Relies on @mosaicstack:registry in ~/.npmrc
const cmd = getInstallAllCommand(outdated);
execSync(cmd, {
stdio: 'inherit',
timeout: 60_000,
});
@@ -380,7 +378,7 @@ program
createConfigService,
WizardCancelledError,
DEFAULT_MOSAIC_HOME,
} = await import('@mosaic/mosaic');
} = await import('@mosaicstack/mosaic');
try {
const mosaicHome = (opts['mosaicHome'] as string | undefined) ?? DEFAULT_MOSAIC_HOME;