@serverless/cli
Advanced tools
| const cli = require('../cli') | ||
| const { getLoggedInUser, logout } = require('@serverless/platform-sdk') | ||
| module.exports = async (config) => { | ||
| // Disable timer | ||
| config.timer = false | ||
| cli.status('Logging out') | ||
| const { username } = getLoggedInUser() | ||
| await logout() | ||
| cli.status('Logged Out') | ||
| cli.close('done', `Successfully logged out of "${username}"`) | ||
| } |
+1
-1
| { | ||
| "name": "@serverless/cli", | ||
| "version": "2.0.23", | ||
| "version": "2.0.24", | ||
| "description": "Serverless Components CLI", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
+7
-7
@@ -16,3 +16,3 @@ const os = require('os') | ||
| * - Controls the CLI experience in the framework. | ||
| * - Once instantiated, it starts a single, long running process. | ||
| * - Once instantiated, it starts a single, long running process. | ||
| */ | ||
@@ -38,3 +38,3 @@ class CLI { | ||
| this._.loadingDotCount = 0 | ||
| // Hide cursor, to keep it clean | ||
@@ -183,3 +183,3 @@ process.stdout.write(ansiEscapes.cursorHide) | ||
| return this.close('error', `Error: ${error.message}`) | ||
| } else { | ||
| } | ||
| console.log() // eslint-disable-line | ||
@@ -192,3 +192,3 @@ console.log(``, red(error.stack)) // eslint-disable-line | ||
| return this.close('error', `Error: ${error.message}`) | ||
| } | ||
| } | ||
@@ -209,6 +209,6 @@ | ||
| prettyoutput( | ||
| outputs, | ||
| outputs, | ||
| { | ||
| colors: {} | ||
| }, | ||
| }, | ||
| 0 | ||
@@ -230,3 +230,3 @@ ) | ||
| if (this._.status !== this._.lastStatus) { | ||
| let content = `${this._.timerSeconds}s - Status - ${this._.status}` | ||
| const content = `${this._.timerSeconds}s - Status - ${this._.status}` | ||
| process.stdout.write(content + os.EOL) | ||
@@ -233,0 +233,0 @@ this._.lastStatus = '' + this._.status |
@@ -8,5 +8,3 @@ const cli = require('../cli') | ||
| const res = await Promise.all([ | ||
| connect(config), | ||
| getComponentInstanceData(config)]) | ||
| const res = await Promise.all([connect(config), getComponentInstanceData(config)]) | ||
| const socket = res[0] | ||
@@ -13,0 +11,0 @@ const componentInstanceData = res[1] |
| const publish = require('./publish') | ||
| const login = require('./login') | ||
| const logout = require('./logout') | ||
| const custom = require('./custom') | ||
@@ -8,3 +9,4 @@ | ||
| login, | ||
| logout, | ||
| custom | ||
| } |
@@ -5,2 +5,3 @@ const cli = require('../cli') | ||
| module.exports = async (config) => { | ||
| // for some reason this env var is required by the SDK in order to open the browser | ||
| process.env.DISPLAY = true | ||
@@ -17,3 +18,3 @@ | ||
| cli.status('Logged in') | ||
| cli.close('done', `Successfully logged into org "${username}"`) | ||
| cli.close('done', `Successfully logged in as "${username}"`) | ||
| } |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
45499
1.05%19
5.56%931
1.2%