@@ -118,7 +118,7 @@ after(async () => {
118118 ( process as { exit : ( code ?: number ) => never } ) . exit = originalExit ;
119119 delete process . env . RUN402_CONFIG_DIR ;
120120 delete process . env . RUN402_API_BASE ;
121- rmSync ( tempDir , { recursive : true , force : true } ) ;
121+ if ( tempDir ) rmSync ( tempDir , { recursive : true , force : true } ) ;
122122} ) ;
123123
124124beforeEach ( ( ) => {
@@ -399,7 +399,7 @@ describe("CLI integration (live API, no mocks)", { timeout: 180_000 }, () => {
399399 it ( "subdomains list" , async ( ) => {
400400 const { run } = await import ( "./cli/lib/subdomains.mjs" ) ;
401401 captureStart ( ) ;
402- await run ( "list" , [ projectId ] ) ;
402+ await run ( "list" , [ "--project" , projectId ] ) ;
403403 captureStop ( ) ;
404404 assert . ok ( captured ( ) . includes ( subdomainName ) , "should list the subdomain" ) ;
405405 } ) ;
@@ -554,19 +554,25 @@ describe("CLI integration (live API, no mocks)", { timeout: 180_000 }, () => {
554554 } ) ;
555555
556556 it ( "mpp: deploy site" , async ( ) => {
557- const { run } = await import ( "./cli/lib/deploy.mjs" ) ;
557+ const { runDeployV2 } = await import ( "./cli/lib/deploy-v2 .mjs" ) ;
558558 const manifestPath = join ( tempDir , "mpp-manifest.json" ) ;
559559 writeFileSync (
560560 manifestPath ,
561561 JSON . stringify ( {
562- files : [ { file : "index.html" , data : "<!DOCTYPE html><html><body><h1>MPP Test App</h1></body></html>" } ] ,
562+ site : {
563+ replace : {
564+ "index.html" : "<!DOCTYPE html><html><body><h1>MPP Test App</h1></body></html>" ,
565+ } ,
566+ } ,
563567 } ) ,
564568 ) ;
565569 captureStart ( ) ;
566- await run ( [ "--manifest" , manifestPath , "--project" , mppProjectId ] ) ;
570+ await runDeployV2 ( "apply" , [ "--manifest" , manifestPath , "--project" , mppProjectId , "--quiet" ] ) ;
567571 captureStop ( ) ;
568572 const out = captured ( ) ;
569- assert . ok ( out . includes ( mppProjectId ) || out . includes ( "sites.run402.com" ) , `Expected deploy result in: ${ out } ` ) ;
573+ const data = capturedJson ( ) ;
574+ assert . equal ( data . status , "ok" ) ;
575+ assert . ok ( data . release_id || out . includes ( "sites.run402.com" ) , `Expected deploy result in: ${ out } ` ) ;
570576 } ) ;
571577
572578 it ( "mpp: projects delete" , async ( ) => {
0 commit comments