@@ -14,7 +14,7 @@ import {
1414 envUpdateContextsCommand ,
1515 envUpdateValueCommand ,
1616} from "./env.ts" ;
17- import { createTrpcClient } from "./auth.ts" ;
17+ import { createTrpcClient , getAuth } from "./auth.ts" ;
1818import token_storage from "./token_storage.ts" ;
1919import {
2020 sandboxKillCommand ,
@@ -142,6 +142,8 @@ const setupGCPCommand = new Command<GlobalOptions>()
142142
143143const tunnelLoginCommand = new Command < GlobalOptions > ( )
144144 . arguments ( "[root-path:string]" )
145+ . option ( "--really-no-config" , "really no config" )
146+ . option ( "--out <file:string>" , "out file" )
145147 . hidden ( )
146148 . action ( async ( options , rootPath = Deno . cwd ( ) ) => {
147149 const configContent = await readConfig ( rootPath , options . config ) ;
@@ -153,7 +155,16 @@ const tunnelLoginCommand = new Command<GlobalOptions>()
153155 org ,
154156 app ,
155157 ) ;
156- await writeConfig ( configContent , gottenApp . org , gottenApp . app ) ;
158+ if ( options . reallyNoConfig !== true ) {
159+ await writeConfig ( configContent , gottenApp . org , gottenApp . app ) ;
160+ }
161+ const token = await getAuth ( options . debug , options . endpoint ) ;
162+ if ( options . out ) {
163+ await Deno . writeTextFile (
164+ options . out ,
165+ JSON . stringify ( { org : gottenApp . org , app : gottenApp . app , token } ) ,
166+ ) ;
167+ }
157168 } ) ;
158169
159170const envCommand = new Command < GlobalOptions > ( )
@@ -283,7 +294,7 @@ const logoutCommand = new Command()
283294await new Command ( )
284295 . name ( "deno deploy" )
285296 . description ( `Interact with Deno Deploy
286-
297+
287298Calling this subcommand without any further subcommands will
288299deploy your local directory to the specified application.` )
289300 . globalOption ( "--endpoint <endpoint:string>" , "the endpoint" , {
0 commit comments