feat(install): add interactive install command and module to detect and install missing @git.zone packages
This commit is contained in:
@@ -5,7 +5,7 @@ import { commitinfo } from '../00_commitinfo_data.js';
|
||||
// Curated list of known @git.zone CLI tools to track for updates.
|
||||
// This list is intentionally hardcoded to only track official tools.
|
||||
// Add new entries here when new @git.zone packages are published.
|
||||
const GITZONE_PACKAGES = [
|
||||
export const GITZONE_PACKAGES = [
|
||||
'@git.zone/cli',
|
||||
'@git.zone/tsdoc',
|
||||
'@git.zone/tsbuild',
|
||||
@@ -171,6 +171,24 @@ export const run = async (options: IUpdateOptions = {}): Promise<void> => {
|
||||
|
||||
console.log('');
|
||||
|
||||
// Show managed packages that are not installed anywhere
|
||||
const installedNames = new Set(allPackages.map(p => p.name));
|
||||
const notInstalled = GITZONE_PACKAGES.filter(name => !installedNames.has(name));
|
||||
|
||||
if (notInstalled.length > 0) {
|
||||
console.log('Not installed (managed @git.zone packages):\n');
|
||||
console.log(' Package Latest');
|
||||
console.log(' ─────────────────────────────────────────');
|
||||
for (const pkgName of notInstalled) {
|
||||
const latest = await pmUtil.getLatestVersion(pkgName);
|
||||
const name = pkgName.padEnd(28);
|
||||
const version = latest || 'unknown';
|
||||
console.log(` ${name} ${version}`);
|
||||
}
|
||||
console.log('');
|
||||
console.log(' Run "gtools install" to install missing packages.\n');
|
||||
}
|
||||
|
||||
// Filter packages that need updates
|
||||
const packagesToUpdate = allPackages.filter(p => p.needsUpdate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user