@@ -501,9 +501,8 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
501501 const version = deployment . version ;
502502
503503 const rawDeploymentLink = `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project } /deployments/${ deployment . shortCode } ` ;
504- const rawTestLink = `${ authorization . dashboardUrl } /projects/v3/${
505- resolvedConfig . project
506- } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `;
504+ const rawTestLink = `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project
505+ } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `;
507506
508507 const deploymentLink = cliLink ( "View deployment" , rawDeploymentLink ) ;
509508 const testLink = cliLink ( "Test tasks" , rawTestLink ) ;
@@ -720,8 +719,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
720719 }
721720 } else {
722721 outro (
723- `Version ${ version } deployed with ${ taskCount } detected task${ taskCount === 1 ? "" : "s" } ${
724- isLinksSupported ? `| ${ deploymentLink } | ${ testLink } ` : ""
722+ `Version ${ version } deployed with ${ taskCount } detected task${ taskCount === 1 ? "" : "s" } ${ isLinksSupported ? `| ${ deploymentLink } | ${ testLink } ` : ""
725723 } `
726724 ) ;
727725
@@ -745,18 +743,16 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
745743 TRIGGER_VERSION : version ,
746744 TRIGGER_DEPLOYMENT_SHORT_CODE : deployment . shortCode ,
747745 TRIGGER_DEPLOYMENT_URL : `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project } /deployments/${ deployment . shortCode } ` ,
748- TRIGGER_TEST_URL : `${ authorization . dashboardUrl } /projects/v3/${
749- resolvedConfig . project
750- } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `,
746+ TRIGGER_TEST_URL : `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project
747+ } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `,
751748 } ,
752749 outputs : {
753750 deploymentVersion : version ,
754751 workerVersion : version ,
755752 deploymentShortCode : deployment . shortCode ,
756753 deploymentUrl : `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project } /deployments/${ deployment . shortCode } ` ,
757- testUrl : `${ authorization . dashboardUrl } /projects/v3/${
758- resolvedConfig . project
759- } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `,
754+ testUrl : `${ authorization . dashboardUrl } /projects/v3/${ resolvedConfig . project
755+ } /test?environment=${ options . env === "prod" ? "prod" : "stg" } `,
760756 needsPromotion : options . skipPromotion ? "true" : "false" ,
761757 } ,
762758 } ) ;
@@ -799,8 +795,7 @@ async function failDeploy(
799795 checkLogsForErrors ( logs ) ;
800796
801797 outro (
802- `${ chalkError ( `${ prefix } :` ) } ${
803- error . message
798+ `${ chalkError ( `${ prefix } :` ) } ${ error . message
804799 } . Full build logs have been saved to ${ logPath } `
805800 ) ;
806801
@@ -1100,9 +1095,8 @@ async function handleNativeBuildServerDeploy({
11001095 const deployment = initializeDeploymentResult . data ;
11011096
11021097 const rawDeploymentLink = `${ dashboardUrl } /projects/v3/${ config . project } /deployments/${ deployment . shortCode } ` ;
1103- const rawTestLink = `${ dashboardUrl } /projects/v3/${ config . project } /test?environment=${
1104- options . env === "prod" ? "prod" : "stg"
1105- } `;
1098+ const rawTestLink = `${ dashboardUrl } /projects/v3/${ config . project } /test?environment=${ options . env === "prod" ? "prod" : "stg"
1099+ } `;
11061100
11071101 const exposedDeploymentLink = isLinksSupported
11081102 ? cliLink ( chalk . bold ( rawDeploymentLink ) , rawDeploymentLink )
@@ -1155,8 +1149,9 @@ async function handleNativeBuildServerDeploy({
11551149 const [ readSessionError , readSession ] = await tryCatch (
11561150 stream . readSession (
11571151 {
1158- start : { from : { seqNum : 0 } , clamp : true } ,
1159- stop : { waitSecs : 60 * 20 } , // 20 minutes
1152+ seq_num : 0 ,
1153+ clamp : true ,
1154+ wait : 60 * 20 , // 20 minutes
11601155 } ,
11611156 { signal : abortController . signal }
11621157 )
@@ -1167,8 +1162,7 @@ async function handleNativeBuildServerDeploy({
11671162 log . warn ( `Failed streaming build logs, open the deployment in the dashboard to view the logs` ) ;
11681163
11691164 outro (
1170- `Version ${ deployment . version } is being deployed ${
1171- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1165+ `Version ${ deployment . version } is being deployed ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
11721166 } `
11731167 ) ;
11741168
@@ -1193,7 +1187,7 @@ async function handleNativeBuildServerDeploy({
11931187
11941188 switch ( event . type ) {
11951189 case "log" : {
1196- if ( record . seqNum === 0 ) {
1190+ if ( record . seq_num === 0 ) {
11971191 $queuedSpinner . stop ( "Build started" ) ;
11981192 console . log ( "│" ) ;
11991193 queuedSpinnerStopped = true ;
@@ -1214,10 +1208,10 @@ async function handleNativeBuildServerDeploy({
12141208 level === "error"
12151209 ? chalk . bold ( chalkError ( message ) )
12161210 : level === "warn"
1217- ? chalkWarning ( message )
1218- : level === "debug"
1219- ? chalkGrey ( message )
1220- : message ;
1211+ ? chalkWarning ( message )
1212+ : level === "debug"
1213+ ? chalkGrey ( message )
1214+ : message ;
12211215
12221216 // We use console.log here instead of clack's logger as the current version does not support changing the line spacing.
12231217 // And the logs look verbose with the default spacing.
@@ -1250,8 +1244,7 @@ async function handleNativeBuildServerDeploy({
12501244 log . error ( "Failed dequeueing build, please try again shortly" ) ;
12511245
12521246 throw new OutroCommandError (
1253- `Version ${ deployment . version } ${
1254- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1247+ `Version ${ deployment . version } ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
12551248 } `
12561249 ) ;
12571250 }
@@ -1266,8 +1259,7 @@ async function handleNativeBuildServerDeploy({
12661259 }
12671260
12681261 throw new OutroCommandError (
1269- `Version ${ deployment . version } ${
1270- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1262+ `Version ${ deployment . version } ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
12711263 } `
12721264 ) ;
12731265 }
@@ -1293,13 +1285,12 @@ async function handleNativeBuildServerDeploy({
12931285 }
12941286
12951287 outro (
1296- `Version ${ deployment . version } was deployed ${
1297- isLinksSupported
1298- ? `| ${ cliLink ( "Test tasks" , rawTestLink ) } | ${ cliLink (
1299- "View deployment" ,
1300- rawDeploymentLink
1301- ) } `
1302- : ""
1288+ `Version ${ deployment . version } was deployed ${ isLinksSupported
1289+ ? `| ${ cliLink ( "Test tasks" , rawTestLink ) } | ${ cliLink (
1290+ "View deployment" ,
1291+ rawDeploymentLink
1292+ ) } `
1293+ : ""
13031294 } `
13041295 ) ;
13051296 return process . exit ( 0 ) ;
@@ -1313,14 +1304,13 @@ async function handleNativeBuildServerDeploy({
13131304 chalk . bold (
13141305 chalkError (
13151306 "Deployment failed" +
1316- ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
1307+ ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
13171308 )
13181309 )
13191310 ) ;
13201311
13211312 throw new OutroCommandError (
1322- `Version ${ deployment . version } deployment failed ${
1323- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1313+ `Version ${ deployment . version } deployment failed ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
13241314 } `
13251315 ) ;
13261316 }
@@ -1333,14 +1323,13 @@ async function handleNativeBuildServerDeploy({
13331323 chalk . bold (
13341324 chalkError (
13351325 "Deployment timed out" +
1336- ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
1326+ ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
13371327 )
13381328 )
13391329 ) ;
13401330
13411331 throw new OutroCommandError (
1342- `Version ${ deployment . version } deployment timed out ${
1343- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1332+ `Version ${ deployment . version } deployment timed out ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
13441333 } `
13451334 ) ;
13461335 }
@@ -1353,14 +1342,13 @@ async function handleNativeBuildServerDeploy({
13531342 chalk . bold (
13541343 chalkError (
13551344 "Deployment was canceled" +
1356- ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
1345+ ( finalDeploymentEvent . message ? `: ${ finalDeploymentEvent . message } ` : "" )
13571346 )
13581347 )
13591348 ) ;
13601349
13611350 throw new OutroCommandError (
1362- `Version ${ deployment . version } deployment canceled ${
1363- isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
1351+ `Version ${ deployment . version } deployment canceled ${ isLinksSupported ? `| ${ cliLink ( "View deployment" , rawDeploymentLink ) } ` : ""
13641352 } `
13651353 ) ;
13661354 }
@@ -1379,13 +1367,12 @@ async function handleNativeBuildServerDeploy({
13791367 }
13801368
13811369 outro (
1382- `Version ${ deployment . version } ${
1383- isLinksSupported
1384- ? `| ${ cliLink ( "Test tasks" , rawTestLink ) } | ${ cliLink (
1385- "View deployment" ,
1386- rawDeploymentLink
1387- ) } `
1388- : ""
1370+ `Version ${ deployment . version } ${ isLinksSupported
1371+ ? `| ${ cliLink ( "Test tasks" , rawTestLink ) } | ${ cliLink (
1372+ "View deployment" ,
1373+ rawDeploymentLink
1374+ ) } `
1375+ : ""
13891376 } `
13901377 ) ;
13911378 return process . exit ( 0 ) ;
0 commit comments