@@ -4,7 +4,7 @@ import fs from 'fs-extra'
4
4
import { platform } from 'os'
5
5
import { NextInstance } from './base'
6
6
7
- type DeployRes = {
7
+ type DeployResponse = {
8
8
name : string
9
9
site_id : string
10
10
site_name : string
@@ -80,7 +80,7 @@ export class NextDeployInstance extends NextInstance {
80
80
throw new Error ( `Failed to deploy project ${ deployRes . stdout } ${ deployRes . stderr } (${ deployRes . exitCode } )` )
81
81
}
82
82
try {
83
- const data : DeployRes = JSON . parse ( deployRes . stdout )
83
+ const data : DeployResponse = JSON . parse ( deployRes . stdout )
84
84
this . _url = data . deploy_url
85
85
this . _deployId = data . deploy_id
86
86
console . log ( `Deployed to ${ this . _url } ` , data )
@@ -104,7 +104,7 @@ export class NextDeployInstance extends NextInstance {
104
104
105
105
public async destroy ( ) : Promise < void > {
106
106
if ( this . isDestroyed ) {
107
- throw new Error ( `next instance already destroyed` )
107
+ throw new Error ( `Next.js deploy instance already destroyed` )
108
108
}
109
109
110
110
// During setup() the test site is deployed to Netlify
@@ -113,10 +113,10 @@ export class NextDeployInstance extends NextInstance {
113
113
if ( ! process . env . NEXT_TEST_SKIP_CLEANUP ) {
114
114
console . log ( `Deleting project with deploy_id ${ this . _deployId } ` )
115
115
116
- const deleteRes = await execa ( 'ntl' , [ 'api' , 'deleteDeploy' , '--data' , `{ "deploy_id": "${ this . _deployId } " }` ] )
116
+ const deleteResponse = await execa ( 'ntl' , [ 'api' , 'deleteDeploy' , '--data' , `{ "deploy_id": "${ this . _deployId } " }` ] )
117
117
118
- if ( deleteRes . exitCode !== 0 ) {
119
- throw new Error ( `Failed to delete project ${ deleteRes . stdout } ${ deleteRes . stderr } (${ deleteRes . exitCode } )` )
118
+ if ( deleteResponse . exitCode !== 0 ) {
119
+ throw new Error ( `Failed to delete project ${ deleteResponse . stdout } ${ deleteResponse . stderr } (${ deleteResponse . exitCode } )` )
120
120
}
121
121
122
122
console . log ( `Successfully deleted project with deploy_id ${ this . _deployId } ` )
0 commit comments