- 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
20 lines
686 B
TypeScript
20 lines
686 B
TypeScript
import type { ParsedCommand } from '@mosaicstack/types';
|
|
import { commandRegistry } from '../registry.js';
|
|
|
|
export function executeHelp(_parsed: ParsedCommand): string {
|
|
const commands = commandRegistry.getAll();
|
|
const lines = ['Available commands:', ''];
|
|
|
|
for (const cmd of commands) {
|
|
const aliases =
|
|
cmd.aliases.length > 0 ? ` (${cmd.aliases.map((a) => `/${a}`).join(', ')})` : '';
|
|
const argsStr =
|
|
cmd.args && cmd.args.length > 0
|
|
? ' ' + cmd.args.map((a) => (a.optional ? `[${a.name}]` : `<${a.name}>`)).join(' ')
|
|
: '';
|
|
lines.push(` /${cmd.name}${argsStr}${aliases} — ${cmd.description}`);
|
|
}
|
|
|
|
return lines.join('\n').trimEnd();
|
|
}
|