{"version":3,"file":"publish.cjs","names":["p","colors","icons","frames","gradients","exitCodeFor","failedDeployLegs"],"sources":["../../../src/cli/commands/publish.ts"],"sourcesContent":["import * as p from \"@clack/prompts\";\nimport { colors, frames, gradients, icons } from \"../../utils/theme\";\nimport { exitCodeFor } from \"../exit-codes\";\nimport { failedDeployLegs, renderDeployLegs } from \"../render/deploy\";\nimport { renderBuildWarnings } from \"../render/deploy-train\";\nimport type { CommandContext, ResultRenderer } from \"./context\";\n\nexport const rollbackPreCall = async (ctx: CommandContext): Promise<void> => {\n  const input = ctx.input;\n  const client = ctx.client;\n  const descriptor = ctx.descriptor;\n  const rollbackInput = input as {\n    listOnly?: boolean;\n    version?: string;\n    previous?: boolean;\n    [key: string]: unknown;\n  };\n  if (\n    descriptor.key === \"rollback\" &&\n    !rollbackInput.listOnly &&\n    !rollbackInput.version &&\n    !rollbackInput.previous\n  ) {\n    const listing = await (client as any).rollback({ ...rollbackInput, listOnly: true });\n    if (listing.status !== \"list\" || !listing.history?.length) {\n      console.error(listing.error ?? \"No publish history found\");\n      process.exit(1);\n    }\n    console.log();\n    const selection = await p.select({\n      message: \"Roll back to which publish?\",\n      options: listing.history.map(\n        (entry: {\n          blockHeight: number;\n          blockTimestamp: string;\n          txHash?: string;\n          summary: string;\n        }) => ({\n          value: String(entry.blockHeight),\n          label: `${entry.blockTimestamp}  (block ${entry.blockHeight})`,\n          hint: entry.summary,\n        }),\n      ),\n    });\n    if (p.isCancel(selection)) {\n      return;\n    }\n    rollbackInput.version = selection as string;\n  }\n};\n\nexport const publishRenderers: Record<string, ResultRenderer> = {\n  pluginAdd: async (result, _ctx) => {\n    console.log();\n    console.log(colors.green(`${icons.ok} Added plugin ${result.key}`));\n    if (result.development) console.log(`  ${colors.dim(\"Development:\")} ${result.development}`);\n    if (result.production) console.log(`  ${colors.dim(\"Production:\")} ${result.production}`);\n    console.log();\n    return;\n  },\n\n  pluginRemove: async (result, _ctx) => {\n    console.log();\n    console.log(colors.green(`${icons.ok} Removed plugin ${result.key}`));\n    console.log();\n    return;\n  },\n\n  pluginList: async (result, _ctx) => {\n    console.log();\n    console.log(colors.cyan(frames.top(52)));\n    console.log(`  ${icons.config} ${gradients.cyber(\"PLUGINS\")}`);\n    console.log(colors.cyan(frames.bottom(52)));\n    console.log();\n    if (result.plugins.length === 0) {\n      console.log(colors.dim(\"  No plugins configured\"));\n    } else {\n      for (const pluginItem of result.plugins) {\n        console.log(`  ${colors.cyan(pluginItem.key)}`);\n        if (pluginItem.development)\n          console.log(`    ${colors.dim(\"Development:\")} ${pluginItem.development}`);\n        if (pluginItem.production)\n          console.log(`    ${colors.dim(\"Production:\")} ${pluginItem.production}`);\n      }\n    }\n    console.log();\n    return;\n  },\n\n  pluginPublish: async (result, _ctx) => {\n    console.log();\n    console.log(colors.green(`${icons.ok} Published plugin ${result.key}`));\n    if (result.path) console.log(`  ${colors.dim(\"Path:\")} ${result.path}`);\n    if (result.production) console.log(`  ${colors.dim(\"Production:\")} ${result.production}`);\n    if (result.version) console.log(`  ${colors.dim(\"Version:\")} ${result.version}`);\n    if (result.fingerprint) console.log(`  ${colors.dim(\"Fingerprint:\")} ${result.fingerprint}`);\n    console.log();\n    return;\n  },\n\n  registryUse: async (result, _ctx) => {\n    console.log();\n    if (exitCodeFor(result) === 1) {\n      console.error(colors.error(`${icons.err} ${result.error || \"Unknown error\"}`));\n      process.exit(1);\n    }\n    console.log(\n      colors.green(\n        `${icons.ok} ${result.status === \"dry-run\" ? \"Dry run\" : \"Composed\"} from ${result.from}`,\n      ),\n    );\n    for (const section of result.applied) {\n      console.log(`  ${colors.green(\"+\")} ${section}`);\n    }\n    if (result.configPath) {\n      console.log(`  ${colors.dim(\"Config:\")} ${result.configPath}`);\n    }\n    if (result.status === \"updated\") {\n      console.log(colors.dim(\"  Run bos types gen to refresh generated types.\"));\n    }\n    console.log();\n    return;\n  },\n\n  publish: async (result, _ctx) => {\n    if (result.status === \"dry-run\") {\n      console.log();\n      console.log(colors.cyan(`${icons.ok} Dry run complete`));\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n      console.log();\n      return;\n    }\n\n    if (exitCodeFor(result) === 1) {\n      console.log();\n      console.log(colors.error(`${icons.err} Publish failed`));\n      if (result.error) {\n        console.log(`  ${colors.dim(\"Error:\")} ${result.error}`);\n      }\n      if (result.deployResults && result.deployResults.length > 0) {\n        const failures = result.deployResults.filter((r: any) => !r.success);\n        if (failures.length > 0) {\n          console.log();\n          for (const f of failures) {\n            const errorLine = (f.error ?? \"Failed\").split(\"\\n\")[0];\n            console.log(`  ${colors.error(icons.err)} ${f.key}: ${errorLine}`);\n          }\n        }\n      }\n      console.log();\n      process.exit(1);\n    }\n\n    if (result.status === \"published\") {\n      console.log();\n      console.log(colors.green(`${icons.ok} Published successfully`));\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${result.registryUrl}`);\n      if (result.txHash) {\n        console.log(`  ${colors.dim(\"Transaction:\")} ${result.txHash}`);\n      }\n      if (result.built && result.built.length > 0) {\n        console.log(`  ${colors.dim(\"Built:\")} ${result.built.join(\", \")}`);\n      }\n      if (result.skipped && result.skipped.length > 0) {\n        console.log(`  ${colors.dim(\"Skipped:\")} ${result.skipped.join(\", \")}`);\n      }\n      if (result.deployResults) {\n        const warnings = result.deployResults.flatMap((r: any) => r.warnings ?? []);\n        if (warnings.length > 0) {\n          console.log();\n          console.log(`  ${colors.yellow(\"⚠\")} Build warnings:`);\n          for (const w of warnings) {\n            console.log(`    ${colors.dim(w)}`);\n          }\n        }\n      }\n      console.log();\n      return;\n    }\n  },\n\n  rollback: async (result, _ctx) => {\n    const rollbackResult = result as any;\n    if (rollbackResult.status === \"error\") {\n      console.log();\n      console.log(colors.error(`${icons.err} Roll back failed`));\n      if (rollbackResult.error) {\n        console.log(`  ${colors.dim(\"Error:\")} ${rollbackResult.error}`);\n      }\n      if (rollbackResult.verification) {\n        console.log();\n        for (const check of rollbackResult.verification) {\n          const mark = check.ok ? colors.green(icons.ok) : colors.error(icons.err);\n          const reason = check.reason ? colors.dim(` — ${check.reason}`) : \"\";\n          console.log(`  ${mark} ${check.slot}${reason}`);\n        }\n      }\n      console.log();\n      process.exit(1);\n    }\n\n    if (rollbackResult.status === \"dry-run\") {\n      console.log();\n      console.log(colors.cyan(`${icons.ok} Rollback dry run complete`));\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${rollbackResult.registryUrl}`);\n      console.log();\n      return;\n    }\n\n    console.log();\n    console.log(colors.green(`${icons.ok} Rolled back`));\n    console.log(`  ${colors.dim(\"Registry URL:\")} ${rollbackResult.registryUrl}`);\n    if (rollbackResult.txHash) {\n      console.log(`  ${colors.dim(\"Transaction:\")} ${rollbackResult.txHash}`);\n    }\n    console.log();\n    return;\n  },\n\n  deploy: async (result, _ctx) => {\n    const deployResult = result as any;\n    if (deployResult.status === \"list\") {\n      console.log();\n      console.log(colors.cyan(\"Recent publishes (audit trail)\"));\n      for (const entry of deployResult.history ?? []) {\n        console.log(\n          `  ${entry.blockTimestamp}  ${colors.dim(`block ${entry.blockHeight}`)}${entry.publishedAt ? colors.dim(`  ${entry.publishedAt}`) : \"\"}`,\n        );\n      }\n      console.log();\n      return;\n    }\n    if (deployResult.fingerprint) {\n      console.log(`  ${colors.dim(\"Fingerprint:\")} ${deployResult.fingerprint}`);\n    }\n    if (deployResult.status === \"dry-run\") {\n      console.log();\n      console.log(colors.cyan(`${icons.ok} Dry run complete`));\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${deployResult.registryUrl}`);\n      console.log();\n      return;\n    }\n\n    if (deployResult.status === \"error\") {\n      console.log();\n      console.log(colors.error(`${icons.err} Deploy failed`));\n      if (deployResult.error) {\n        console.log(`  ${colors.dim(\"Error:\")} ${deployResult.error}`);\n      }\n      if (deployResult.deployResults && deployResult.deployResults.length > 0) {\n        const failures = deployResult.deployResults.filter((r: any) => !r.success);\n        if (failures.length > 0) {\n          console.log();\n          for (const f of failures) {\n            const errorLine = (f.error ?? \"Failed\").split(\"\\n\")[0];\n            console.log(`  ${colors.error(icons.err)} ${f.key}: ${errorLine}`);\n          }\n        }\n      }\n      console.log();\n      process.exit(1);\n    }\n\n    if (deployResult.status === \"deployed\") {\n      console.log();\n      console.log(colors.green(`${icons.ok} Deployed successfully`));\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${deployResult.registryUrl}`);\n      if (deployResult.txHash) {\n        console.log(`  ${colors.dim(\"Transaction:\")} ${deployResult.txHash}`);\n      }\n      if (deployResult.built && deployResult.built.length > 0) {\n        console.log(`  ${colors.dim(\"Built:\")} ${deployResult.built.join(\", \")}`);\n      }\n      if (deployResult.skipped && deployResult.skipped.length > 0) {\n        console.log(`  ${colors.dim(\"Skipped:\")} ${deployResult.skipped.join(\", \")}`);\n      }\n      if (deployResult.deployResults) {\n        renderBuildWarnings(\n          deployResult.deployResults as Array<{ key: string; warnings?: string[] }>,\n        );\n      }\n      if (deployResult.image) {\n        console.log(`  ${colors.dim(\"Image:\")} ${deployResult.image}`);\n      }\n      if (deployResult.service) {\n        console.log(`  ${colors.dim(\"Railway:\")} deployed ${deployResult.service}`);\n      }\n      renderDeployLegs(deployResult.legs);\n      console.log();\n      return;\n    }\n\n    if (deployResult.status === \"published\") {\n      const failedLegs = failedDeployLegs(deployResult.legs);\n      console.log();\n      console.log(\n        colors.yellow(\n          failedLegs.length > 0\n            ? `${icons.err} Config published, but the ${failedLegs.join(\" and \")} leg(s) failed`\n            : `${icons.err} Config published, but a deploy leg failed`,\n        ),\n      );\n      console.log(`  ${colors.dim(\"Registry URL:\")} ${deployResult.registryUrl}`);\n      if (deployResult.txHash) {\n        console.log(`  ${colors.dim(\"Transaction:\")} ${deployResult.txHash}`);\n      }\n      if (deployResult.error) {\n        console.log(`  ${colors.dim(\"Error:\")} ${deployResult.error}`);\n      }\n      renderDeployLegs(deployResult.legs);\n      console.log();\n      process.exit(1);\n    }\n  },\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,kBAAkB,OAAO,QAAuC;CAC3E,MAAM,QA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