File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
interface/cli/commands/auth Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const { auth } = require('../../../../logic');
77const { JWTContext, APIKeyContext } = auth . contexts ;
88const authManager = auth . manager ;
99const authRoot = require ( '../root/auth.cmd' ) ;
10+ const { createContext } = require ( '../../../../logic/api/auth' ) ;
1011
1112const _loginWithToken = async ( url , token ) => {
1213 let authContext ;
@@ -74,6 +75,7 @@ const command = new Command({
7475 await authManager . addContext ( authContext ) ;
7576 await authManager . setCurrentContext ( authContext ) ;
7677 await authManager . persistContexts ( authContext ) ;
78+ await createContext ( ) ;
7779
7880 if ( updatedExistingContext ) {
7981 console . log ( `Updated context: ${ authContext . name } ` ) ;
Original file line number Diff line number Diff line change 1+ const { sendHttpRequest } = require ( './helper' ) ;
2+
3+
4+ const createContext = async ( ) => {
5+ const options = {
6+ url : '/api/user/context' ,
7+ method : 'GET' ,
8+ } ;
9+
10+ return sendHttpRequest ( options ) ;
11+ } ;
12+
13+ module . exports = {
14+ createContext,
15+ } ;
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.8.43 " ,
3+ "version" : " 0.8.44 " ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments