@@ -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 ,
@@ -145,6 +145,8 @@ const setupGCPCommand = new Command<GlobalOptions>()
145145
146146const tunnelLoginCommand = new Command < GlobalOptions > ( )
147147 . arguments ( "[root-path:string]" )
148+ . option ( "--really-no-config" , "really no config" )
149+ . option ( "--out <file:string>" , "out file" )
148150 . hidden ( )
149151 . action ( async ( options , rootPath = Deno . cwd ( ) ) => {
150152 const configContent = await readConfig ( rootPath , options . config ) ;
@@ -156,7 +158,16 @@ const tunnelLoginCommand = new Command<GlobalOptions>()
156158 org ,
157159 app ,
158160 ) ;
159- await writeConfig ( configContent , gottenApp . org , gottenApp . app ) ;
161+ if ( options . reallyNoConfig !== true ) {
162+ await writeConfig ( configContent , gottenApp . org , gottenApp . app ) ;
163+ }
164+ const token = await getAuth ( options . debug , options . endpoint ) ;
165+ if ( options . out ) {
166+ await Deno . writeTextFile (
167+ options . out ,
168+ JSON . stringify ( { org : gottenApp . org , app : gottenApp . app , token } ) ,
169+ ) ;
170+ }
160171 } ) ;
161172
162173const envCommand = new Command < GlobalOptions > ( )
@@ -287,7 +298,7 @@ const logoutCommand = new Command()
287298await new Command ( )
288299 . name ( "deno deploy" )
289300 . description ( `Interact with Deno Deploy
290-
301+
291302Calling this subcommand without any further subcommands will
292303deploy your local directory to the specified application.` )
293304 . globalOption ( "--endpoint <endpoint:string>" , "the endpoint" , {
0 commit comments