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');
7
7
const { JWTContext, APIKeyContext } = auth . contexts ;
8
8
const authManager = auth . manager ;
9
9
const authRoot = require ( '../root/auth.cmd' ) ;
10
+ const { createContext } = require ( '../../../../logic/api/auth' ) ;
10
11
11
12
const _loginWithToken = async ( url , token ) => {
12
13
let authContext ;
@@ -74,6 +75,7 @@ const command = new Command({
74
75
await authManager . addContext ( authContext ) ;
75
76
await authManager . setCurrentContext ( authContext ) ;
76
77
await authManager . persistContexts ( authContext ) ;
78
+ await createContext ( ) ;
77
79
78
80
if ( updatedExistingContext ) {
79
81
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 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.8.43 " ,
3
+ "version" : " 0.8.44 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments