Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "permaweb-deploy",
"version": "3.4.1",
"version": "3.4.2",
"description": "Permaweb App Deployment Package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
77 changes: 46 additions & 31 deletions src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,40 +200,55 @@ export default class Deploy extends Command {

spinner.succeed('ANT record updated')

const table = new Table({
head: [chalk.cyan.bold('Property'), chalk.cyan.bold('Value')],
style: {
head: [],
},
})
const isCI = Boolean(process.env.CI)

table.push(
['Tx ID', chalk.green(txOrManifestId)],
...(deployConfig.uploader
? ([['Bundler service', chalk.cyan(deployConfig.uploader)]] as [string, string][])
: []),
['ArNS Name', chalk.yellow(deployConfig['arns-name'])],
['Undername', chalk.yellow(deployConfig.undername)],
['ANT', chalk.cyan(arnsNameRecord.processId)],
['ARIO Process', chalk.gray(arioProcess)],
['TTL Seconds', chalk.blue(deployConfig['ttl-seconds'])],
['Arweave URL', chalk.yellow(`https://arweave.net/${txOrManifestId}`)],
)
if (isCI) {
this.log('Deployment Successful!')
this.log('Tx ID: ' + txOrManifestId)
if (deployConfig.uploader) {
this.log('Bundler service: ' + deployConfig.uploader)
}

const isCI = Boolean(process.env.CI)
const successMessage = boxen(
`${chalk.green.bold('Deployment Successful!')}\n\n${table.toString()}`,
{
borderColor: 'green',
borderStyle: isCI ? 'single' : 'round',
fullscreen: isCI ? (width: number) => [width, 0] : undefined,
padding: 1,
title: chalk.bold('Permaweb Deploy'),
titleAlignment: 'center',
},
)
this.log('ArNS Name: ' + deployConfig['arns-name'])
this.log('Undername: ' + deployConfig.undername)
this.log('ANT: ' + arnsNameRecord.processId)
this.log('ARIO Process: ' + arioProcess)
this.log('TTL Seconds: ' + deployConfig['ttl-seconds'])
this.log(`Arweave URL: https://arweave.net/${txOrManifestId}`)
} else {
const table = new Table({
head: [chalk.cyan.bold('Property'), chalk.cyan.bold('Value')],
style: {
head: [],
},
})

table.push(
['Tx ID', chalk.green(txOrManifestId)],
...(deployConfig.uploader
? ([['Bundler service', chalk.cyan(deployConfig.uploader)]] as [string, string][])
: []),
['ArNS Name', chalk.yellow(deployConfig['arns-name'])],
['Undername', chalk.yellow(deployConfig.undername)],
['ANT', chalk.cyan(arnsNameRecord.processId)],
['ARIO Process', chalk.gray(arioProcess)],
['TTL Seconds', chalk.blue(deployConfig['ttl-seconds'])],
['Arweave URL', chalk.yellow(`https://arweave.net/${txOrManifestId}`)],
)

this.log(`\n${successMessage}`)
const successMessage = boxen(
`${chalk.green.bold('Deployment Successful!')}\n\n${table.toString()}`,
{
borderColor: 'green',
borderStyle: 'round',
padding: 1,
title: chalk.bold('Permaweb Deploy'),
titleAlignment: 'center',
},
)

this.log(`\n${successMessage}`)
}
} catch (error) {
this.error(
chalk.red(`Deployment failed: ${error instanceof Error ? error.message : String(error)}`),
Expand Down
58 changes: 34 additions & 24 deletions src/commands/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,33 +108,43 @@ export default class Upload extends Command {

this.log('')

const table = new Table({
head: [chalk.cyan.bold('Property'), chalk.cyan.bold('Value')],
style: { head: [] },
})
const isCI = Boolean(process.env.CI)

table.push(['Tx ID', chalk.green(txOrManifestId)])
if (isCI) {
this.log('Upload successful!')
this.log('Tx ID: ' + txOrManifestId)
if (uploadCfg.uploader) {
this.log('Bundler service: ' + uploadCfg.uploader)
}

this.log(`Arweave URL: https://arweave.net/${txOrManifestId}`)
} else {
const table = new Table({
head: [chalk.cyan.bold('Property'), chalk.cyan.bold('Value')],
style: { head: [] },
})

table.push(['Tx ID', chalk.green(txOrManifestId)])

if (uploadCfg.uploader) {
table.push(['Bundler service', chalk.cyan(uploadCfg.uploader)])
}

table.push(['Arweave URL', chalk.yellow(`https://arweave.net/${txOrManifestId}`)])

const successMessage = boxen(
`${chalk.green.bold('Upload successful!')}\n\n${table.toString()}`,
{
borderColor: 'green',
borderStyle: 'round',
padding: 1,
title: chalk.bold('Permaweb Deploy'),
titleAlignment: 'center',
},
)

if (uploadCfg.uploader) {
table.push(['Bundler service', chalk.cyan(uploadCfg.uploader)])
this.log(`\n${successMessage}`)
}

table.push(['Arweave URL', chalk.yellow(`https://arweave.net/${txOrManifestId}`)])

const isCI = Boolean(process.env.CI)
const successMessage = boxen(
`${chalk.green.bold('Upload successful!')}\n\n${table.toString()}`,
{
borderColor: 'green',
borderStyle: isCI ? 'single' : 'round',
fullscreen: isCI ? (width: number) => [width, 0] : undefined,
padding: 1,
title: chalk.bold('Permaweb Deploy'),
titleAlignment: 'center',
},
)

this.log(`\n${successMessage}`)
} catch (error) {
this.error(
chalk.red(`Upload failed: ${error instanceof Error ? error.message : String(error)}`),
Expand Down
Loading