everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 4.33 kB
Source Map (JSON)
{"version":3,"file":"deploy-train.mjs","names":[],"sources":["../../../src/cli/render/deploy-train.ts"],"sourcesContent":["import type {\n DeployTrainRender,\n PublishSectionRender,\n UploadOutcomeRender,\n} from \"../../services/deploy/render\";\n\n/** The Build section's attributed warnings block: one sub-block per workspace\n * that has them, name-padded like every other row (#431). */\nexport function renderBuildWarnings(\n deployResults: ReadonlyArray<{ key: string; warnings?: string[] }>,\n): void {\n const withWarnings = deployResults.filter((r) => (r.warnings ?? []).length > 0);\n if (withWarnings.length === 0) return;\n console.log();\n console.log(` ${colors.yellow(\"⚠\")} Build warnings:`);\n for (const result of withWarnings) {\n for (const warning of result.warnings ?? []) {\n const lines = warning.split(\"\\n\");\n console.log(` ${padRight(result.key, NAME_COLUMN)} ${colors.dim(lines[0] ?? \"\")}`);\n for (const continuation of lines.slice(1)) {\n console.log(` ${padRight(\"\", NAME_COLUMN)} ${colors.dim(continuation)}`);\n }\n }\n }\n}\n\nimport { padRight } from \"../../utils/string\";\nimport { colors, icons } from \"../../utils/theme\";\nimport { formatDuration } from \"../../utils/timing\";\n\nconst NAME_COLUMN = 28;\n\n/**\n * The deploy train's sectioned renderer (#431): Build / Upload / Publish /\n * Image+Railway, one consistent name-padded column, deterministic order (the\n * train reports outcomes in target order — parallel units never interleave).\n * Default view: one line per workspace upload; detail lines only under\n * --verbose.\n */\nexport const cliDeployTrainRender: DeployTrainRender = {\n cdnBanner: (storageOrigin) => {\n console.log();\n console.log(` CDN deploy — uploading workspace dists to ${storageOrigin}...`);\n },\n\n uploadOutcome: (outcome: UploadOutcomeRender) => {\n const name = padRight(outcome.key, NAME_COLUMN);\n if (!outcome.ok) {\n console.log(` ${colors.error(icons.err)} ${name} upload failed`);\n return;\n }\n console.log(\n ` ${colors.green(icons.ok)} ${name} → ${outcome.base} (${outcome.uploaded} uploaded, ${outcome.skipped} skipped, ${formatDuration(outcome.durationMs ?? 0)})`,\n );\n if (outcome.detailNotes) {\n for (const note of outcome.detailNotes) {\n console.log(` ${colors.dim(`${padRight(\"\", NAME_COLUMN)} ${note}`)}`);\n }\n }\n },\n\n publish: (info: PublishSectionRender) => {\n console.log();\n console.log(\" Publishing to:\");\n console.log(` ${colors.cyan(info.registryUrl)}`);\n console.log(` ${colors.dim(\"Fingerprint:\")} ${info.fingerprint}`);\n for (const [slot, pin] of info.slotPins) {\n console.log(` ${colors.dim(`${slot}:`)}`);\n console.log(` ${pin}`);\n }\n console.log(\n ` ${colors.dim(`+ per-deploy manifest ${info.auditManifestFile} (audit trail)`)}`,\n );\n },\n};\n"],"mappings":";;;;;;;AAQA,SAAgB,oBACd,eACM;CACN,MAAM,eAAe,cAAc,QAAQ,OAAO,EAAE,YAAY,CAAC,EAAC,CAAE,SAAS,CAAC;CAC9E,IAAI,aAAa,WAAW,GAAG;CAC/B,QAAQ,IAAI;CACZ,QAAQ,IAAI,KAAK,OAAO,OAAO,GAAG,EAAE,iBAAiB;CACrD,KAAK,MAAM,UAAU,cACnB,KAAK,MAAM,WAAW,OAAO,YAAY,CAAC,GAAG;EAC3C,MAAM,QAAQ,QAAQ,MAAM,IAAI;EAChC,QAAQ,IAAI,OAAO,SAAS,OAAO,KAAK,WAAW,EAAE,GAAG,OAAO,IAAI,MAAM,MAAM,EAAE,GAAG;EACpF,KAAK,MAAM,gBAAgB,MAAM,MAAM,CAAC,GACtC,QAAQ,IAAI,OAAO,SAAS,IAAI,WAAW,EAAE,GAAG,OAAO,IAAI,YAAY,GAAG;CAE9E;AAEJ;AAMA,MAAM,cAAc;;;;;;;;AASpB,MAAa,uBAA0C;CACrD,YAAY,kBAAkB;EAC5B,QAAQ,IAAI;EACZ,QAAQ,IAAI,+CAA+C,cAAc,IAAI;CAC/E;CAEA,gBAAgB,YAAiC;EAC/C,MAAM,OAAO,SAAS,QAAQ,KAAK,WAAW;EAC9C,IAAI,CAAC,QAAQ,IAAI;GACf,QAAQ,IAAI,K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