everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 22.2 kB
Source Map (JSON)
{"version":3,"file":"inspect.mjs","names":[],"sources":["../../../src/cli/commands/inspect.ts"],"sourcesContent":["import { existsSync, watch } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { dirname, resolve } from \"node:path\";\nimport { findConfigPath, MISSING_CONFIG_MESSAGE } from \"../../config\";\nimport type {\n KillOptions,\n KillResult,\n LogsOptions,\n LogsResult,\n PsResult,\n TypecheckWorkspaceResult,\n} from \"../../contract\";\nimport { colors, frames, gradients, icons } from \"../../utils/theme\";\nimport { exitCodeFor } from \"../exit-codes\";\nimport { printConfigView } from \"../render/config\";\nimport { formatTimeAgo } from \"../render/logs\";\nimport { renderPs } from \"../render/processes\";\nimport { compareSemver } from \"../status\";\nimport type { ResultRenderer } from \"./context\";\n\nexport const inspectRenderers: Record<string, ResultRenderer> = {\n config: async (result, _ctx) => {\n if (!result.config) {\n console.error(MISSING_CONFIG_MESSAGE);\n process.exit(1);\n }\n\n printConfigView(result.config);\n process.stdout.write(`${JSON.stringify(result.config, null, 2)}\\n`);\n return;\n },\n\n status: async (result, _ctx) => {\n console.log();\n if (exitCodeFor(result) === 1) {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"STATUS\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n if (result.extends) console.log(` ${colors.dim(\"Extends:\")} ${result.extends}`);\n if (result.account) console.log(` ${colors.dim(\"Account:\")} ${result.account}`);\n if (result.domain) console.log(` ${colors.dim(\"Domain:\")} ${result.domain}`);\n console.log();\n console.log(` ${colors.dim(\"Packages:\")}`);\n for (const pkg of result.packages) {\n const hasUpdate = pkg.installed && pkg.latest && compareSemver(pkg.installed, pkg.latest) < 0;\n const versionStr = hasUpdate\n ? `${pkg.installed} → ${pkg.latest}`\n : pkg.installed || \"not installed\";\n const label = hasUpdate ? colors.yellow(versionStr) : colors.dim(versionStr);\n console.log(` ${colors.dim(`${pkg.name}`)} ${label}`);\n }\n console.log();\n if (result.lastSync) {\n const ago = formatTimeAgo(result.lastSync);\n console.log(` ${colors.dim(\"Last sync:\")} ${ago}`);\n } else {\n console.log(` ${colors.dim(\"Last sync:\")} never`);\n }\n const envLabel =\n result.envFile === \"found\"\n ? colors.green(\"found\")\n : result.envFile === \"example-only\"\n ? colors.yellow(\"missing (only .env.example found)\")\n : colors.error(\"missing\");\n console.log(` ${colors.dim(\".env:\")} ${envLabel}`);\n if (result.parentReachable !== undefined) {\n const parentLabel = result.parentReachable\n ? colors.green(\"reachable\")\n : colors.error(\"unreachable\");\n console.log(` ${colors.dim(\"Parent:\")} ${parentLabel}`);\n }\n const hasUpdates = result.packages.some(\n (p: { installed?: string; latest?: string }) =>\n p.installed && p.latest && compareSemver(p.installed, p.latest) < 0,\n );\n if (hasUpdates) {\n console.log();\n console.log(\n colors.dim(\n ` Run ${colors.cyan(\"bos upgrade\")} to update packages and sync template files.`,\n ),\n );\n }\n console.log();\n return;\n },\n\n ps: async (result, _ctx) => {\n renderPs(result as PsResult);\n return;\n },\n\n logs: async (result, ctx) => {\n const input = ctx.input;\n const logsResult = result as LogsResult;\n const opts = input as LogsOptions;\n for (const line of logsResult.lines) {\n console.log(line);\n }\n if (logsResult.lines.length === 0) {\n console.log(colors.dim(` No matching log lines in ${logsResult.logFile}.`));\n }\n if (opts.follow) {\n if (logsResult.logFile === \"unknown\" || !existsSync(logsResult.logFile)) {\n console.log(colors.dim(\" No log file to follow — nothing was found on disk.\"));\n } else {\n const filter = opts.service;\n let byteOffset = 0;\n for (const line of logsResult.lines) byteOffset += Buffer.byteLength(line, \"utf8\") + 1;\n const followMatch = (line: string): boolean => {\n if (!filter) return true;\n const source = /\\] \\[([^\\]]+)\\] \\[(?:OUT|ERR)\\] /.exec(line)?.[1];\n return source === filter || source === `plugin:${filter}`;\n };\n const watcher = watch(logsResult.logFile, (event) => {\n if (event !== \"change\") return;\n void readFile(logsResult.logFile, \"utf8\")\n .then((text) => {\n const newLines = text\n .slice(byteOffset)\n .split(\"\\n\")\n .filter((line) => line.length > 0 && followMatch(line));\n byteOffset = Buffer.byteLength(text, \"utf8\");\n for (const line of newLines) {\n console.log(line);\n }\n })\n .catch(() => {\n // the followed file was rotated or deleted — stop following\n watcher.close();\n });\n });\n console.log(colors.dim(\" Following — Ctrl+C to stop.\"));\n process.on(\"SIGINT\", () => {\n watcher.close();\n process.exit(0);\n });\n }\n }\n return;\n },\n\n kill: async (result, ctx) => {\n const input = ctx.input;\n const killResult = result as KillResult;\n console.log();\n if (killResult.status === \"error\") {\n console.error(`[CLI] ${killResult.error || \"Unknown error\"}`);\n process.exit(1);\n }\n if (killResult.killed.length > 0) {\n console.log(colors.green(`${icons.ok} Sent ${killResult.killed.length} kill signal(s)`));\n for (const k of killResult.killed) {\n console.log(` ${colors.dim(\"pid\")} ${k.pid} ${colors.dim(k.configDir)}`);\n }\n }\n if (killResult.skipped.length > 0) {\n console.log(colors.yellow(`${icons.err} ${killResult.skipped.length} skipped`));\n for (const s of killResult.skipped) {\n console.log(` ${colors.dim(\"pid\")} ${s.pid} ${colors.dim(s.reason)}`);\n }\n }\n if (killResult.killed.length === 0 && killResult.skipped.length === 0) {\n const opts = input as KillOptions;\n if (opts.all) {\n console.log(colors.dim(\" No tracked processes to kill.\"));\n } else {\n const configPath = findConfigPath();\n const dir = opts.configDir ?? (configPath ? resolve(dirname(configPath)) : process.cwd());\n console.log(colors.dim(` No tracked processes for ${dir}`));\n console.log(colors.dim(` Use ${colors.cyan(\"--all\")} to kill across all directories.`));\n }\n }\n console.log();\n return;\n },\n\n typesGen: async (result, _ctx) => {\n console.log();\n if (exitCodeFor(result) === 1) {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n console.log(colors.green(`${icons.ok} Types generated`));\n if (result.generated.length > 0) {\n console.log(` ${colors.dim(\"Written:\")}`);\n for (const f of result.generated) console.log(` ${colors.dim(f)}`);\n }\n if (result.fetched.length > 0 || result.skipped.length > 0 || result.failed.length > 0) {\n console.log(` ${colors.dim(\"Contract sources:\")}`);\n for (const entry of result.fetched) {\n const space = entry.indexOf(\" \");\n const key = space !== -1 ? entry.slice(0, space) : entry;\n const rest = space !== -1 ? entry.slice(space + 1) : \"\";\n const restSpace = rest.indexOf(\" \");\n const detail = restSpace !== -1 ? rest.slice(restSpace + 1) : \"\";\n console.log(` ${key} ${colors.cyan(\"remote\")}${detail ? ` ${colors.dim(detail)}` : \"\"}`);\n }\n for (const entry of result.skipped) {\n const space = entry.indexOf(\" \");\n const key = space !== -1 ? entry.slice(0, space) : entry;\n const rest = space !== -1 ? entry.slice(space + 1) : \"\";\n if (rest === \"no URL resolved\") {\n console.log(` ${key} ${colors.dim(\"no URL resolved\")}`);\n continue;\n }\n const restSpace = rest.indexOf(\" \");\n const detail = restSpace !== -1 ? rest.slice(restSpace + 1) : \"\";\n console.log(` ${key} ${colors.dim(\"local\")}${detail ? ` ${colors.dim(detail)}` : \"\"}`);\n }\n }\n if (result.failed.length > 0) {\n console.log(` ${colors.yellow(\"Failed:\")}`);\n for (const f of result.failed) {\n const colon = f.indexOf(\": \");\n if (colon !== -1) {\n console.log(` ${colors.error(f.slice(0, colon))}${colors.dim(f.slice(colon))}`);\n } else {\n console.log(` ${colors.error(f)}`);\n }\n }\n }\n console.log();\n return;\n },\n\n typecheck: async (result, _ctx) => {\n console.log();\n if (exitCodeFor(result) === 1) {\n console.error(`[CLI] ${result.error || \"Unknown error\"}`);\n process.exit(1);\n }\n const failed = result.results.filter((r: TypecheckWorkspaceResult) => !r.passed);\n const passed = result.results.filter((r: TypecheckWorkspaceResult) => r.passed);\n console.log(colors.cyan(frames.top(52)));\n console.log(` ${icons.app} ${gradients.cyber(\"TYPECHECK\")}`);\n console.log(colors.cyan(frames.bottom(52)));\n console.log();\n for (const r of result.results) {\n const icon = r.passed ? colors.green(\"✓\") : colors.error(\"✗\");\n console.log(` ${icon} ${r.workspace}`);\n }\n if (result.skipped.length > 0) {\n console.log(` ${colors.dim(`Skipped: ${result.skipped.join(\", \")}`)}`);\n }\n console.log();\n if (failed.length > 0) {\n console.log(` ${colors.error(`${failed.length} failed`)}`);\n for (const f of failed) {\n if (f.error) console.log(` ${colors.dim(f.error)}`);\n }\n console.log();\n process.exit(1);\n }\n console.log(` ${colors.green(`${passed.length} passed`)}`);\n console.log();\n return;\n },\n\n mfCheck: async (result, _ctx) => {\n console.log();\n console.log(\n ` ${colors.dim(\"Host\")} ${result.hostReachable ? colors.green(\"OK \") : colors.error(\"FAIL\")} ${\n result.hostVersion ?? \"unreachable\"\n }${result.hostReason ? ` (${result.hostReason})` : \"\"}`,\n );\n for (const r of result.remotes) {\n const tag = r.ok ? colors.green(\"OK \") : colors.error(\"FAIL\");\n console.log(\n ` ${colors.dim(r.role.padEnd(10))} ${tag} ${r.url} pluginVersion=${r.pluginVersion ?? \"?\"}${\n r.reason ? ` ↳ ${r.reason}` : \"\"\n }`,\n );\n }\n if (result.ui) {\n for (const slot of result.ui.slots) {\n const tag = slot.ok ? colors.green(\"OK \") : colors.error(\"FAIL\");\n console.log(\n ` ${colors.dim(`ui:${slot.slot}`.padEnd(10))} ${tag} ${slot.url}${\n slot.reason ? ` ↳ ${slot.reason}` : \"\"\n }`,\n );\n }\n }\n if (result.platform) {\n for (const v of result.platform.violations) {\n console.log(` ${colors.dim(\"platform\".padEnd(10))} ${colors.error(\"FAIL\")} ${v.message}`);\n }\n if (result.platform.ok) {\n console.log(\n ` ${colors.dim(\"platform\".padEnd(10))} ${colors.green(\"OK \")} release contract satisfied`,\n );\n }\n }\n console.log();\n if (result.status !== \"ok\") {\n console.log(\n colors.error(\n \" mf-compat: ✗ federation manifests NOT compatible — redeploy affected plugin(s) so pluginVersion and shared versions match host\",\n ),\n );\n console.log();\n process.exit(1);\n }\n console.log(colors.green(\" mf-compat: ✓ all federation manifests compatible\"));\n console.log();\n return;\n },\n\n platformManifest: async (result, _ctx) => {\n console.log();\n if (result.status === \"fail\") {\n console.error(`[CLI] ${result.error || \"platform manifest resolution failed\"}`);\n if (result.drift) {\n console.log();\n console.log(\n colors.error(\n ` parent platform is ${result.drift.published} (published), you pinned ${result.drift.pinned} — run \\`bos upgrade\\` to realign`,\n ),\n );\n }\n console.log();\n process.exit(1);\n }\n if (result.status === \"absent\") {\n console.log(\n colors.yellow(\n ` ${icons.err} No platform release manifest resolves${result.error ? ` — ${result.error}` : \"\"}.`,\n ),\n );\n console.log(\n colors.dim(\" Children fall back to the parent-repo tarball walk (ADR 0034 pt 7).\"),\n );\n console.log();\n return;\n }\n console.log(\n ` ${colors.dim(\"Platform\")} ${colors.green(result.version ?? \"?\")} ${colors.dim(`(${result.source}${result.fromCache ? \", cached\" : \"\"})`)}`,\n );\n if (result.compat) {\n for (const v of result.compat.violations) {\n console.log(` ${colors.error(\"FAIL\")} ${v.message}`);\n }\n console.log();\n if (!result.compat.ok) {\n console.log(\n colors.error(\n \" platform-compat: ✗ the workspace does not satisfy this release's compat contract — bump the framework or clear the pin\",\n ),\n );\n console.log();\n process.exit(1);\n }\n console.log(colors.green(\" platform-compat: ✓ workspace satisfies the release contract\"));\n }\n console.log();\n return;\n },\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAa,mBAAmD;CAC9D,QAAQ,OAAO,QAAQ,SAAS;EAC9B,IAAI,CAAC,OAAO,QAAQ;GAClB,QAAQ,MAAM,sBAAsB;GACpC,QAAQ,KAAK,CAAC;EAChB;EAEA,gBAAgB,OAAO,MAAM;EAC7B,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,OAAO,QAAQ,MAAM,CAAC,EAAE,GAAG;CAEpE;CAEA,QAAQ,OAAO,QAAQ,SAAS;EAC9B,QAAQ,IAAI;EACZ,IAAI,YAAY,MAAM,MAAM,GAAG;GAC7B,QAAQ,MAAM,SAAS,OAAO,SAAS,iBAAiB;GACxD,QAAQ,KAAK,CAAC;EAChB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