pm2
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -281,6 +281,18 @@ 'use strict' | ||
if (l.pm2_env.axm_options) { | ||
var deep_monitored = l.pm2_env.axm_options.tracing_enabled || false; | ||
if (deep_monitored == true) { | ||
key = chalk.green('✚') + ' ' + key; | ||
} | ||
var is_tracing_enabled = false | ||
if (l.pm2_env.axm_options.tracing && | ||
typeof(l.pm2_env.axm_options.tracing) == 'boolean' && | ||
l.pm2_env.axm_options.tracing == true) | ||
is_tracing_enabled = true | ||
if (l.pm2_env.axm_options.tracing && | ||
l.pm2_env.axm_options.tracing.enabled && | ||
typeof(l.pm2_env.axm_options.tracing.enabled) == 'boolean' && | ||
l.pm2_env.axm_options.tracing.enabled == true) | ||
is_tracing_enabled = true | ||
if (is_tracing_enabled == true) | ||
key = chalk.green('☵') + ' ' + key | ||
if (l.pm2_env._km_monitored) | ||
@@ -287,0 +299,0 @@ key = chalk.bold.green('◉') + ' ' + key; |
@@ -127,5 +127,2 @@ | ||
<script> | ||
setTimeout(function () { | ||
window.location = 'https://pm2.io/doc/en/plus/quick-start/' | ||
}, 5000) | ||
</script> | ||
@@ -132,0 +129,0 @@ </head> |
@@ -129,3 +129,3 @@ 'use strict' | ||
} else { | ||
this.createBucket(this.createBucketHandler) | ||
this.createBucket(this.createBucketHandler.bind(this)) | ||
} | ||
@@ -177,3 +177,3 @@ }).catch(err => { | ||
console.log(`${cst.PM2_IO_MSG} Please follow the popup or go to this URL :`, '\n', ' ', targetURL) | ||
open(targetURL) | ||
this.open(targetURL) | ||
return process.exit(0) | ||
@@ -235,3 +235,3 @@ }) | ||
if (err) { | ||
console.error(`${cst.PM2_IO_MSG_ERR} Failed to connect to the bucket: ${err.message}`) | ||
console.trace(`${cst.PM2_IO_MSG_ERR} Failed to connect to the bucket: ${err.message}`) | ||
if (bucket) { | ||
@@ -247,3 +247,5 @@ console.error(`${cst.PM2_IO_MSG_ERR} You can retry using: pm2 plus link ${bucket.secret_id} ${bucket.public_id}`) | ||
console.log(`${cst.PM2_IO_MSG} Successfully connected to bucket ${bucket.name}`) | ||
console.log(`${cst.PM2_IO_MSG} You can use the web interface over there: https://app.pm2.io/#/bucket/${bucket._id}`) | ||
var targetURL = `https://app.pm2.io/#/bucket/${bucket._id}` | ||
console.log(`${cst.PM2_IO_MSG} You can use the web interface over there: ${targetURL}`) | ||
this.open(`https://app.pm2.io/`) | ||
return process.exit(0) | ||
@@ -253,8 +255,2 @@ } | ||
static createBucket (cb) { | ||
console.log(`${cst.PM2_IO_MSG} It seems that you don't have any bucket to monitor your app currently.`) | ||
console.log(`${cst.PM2_IO_MSG} Note: A bucket is like a organization in PM2 Plus where you connect multiples servers to it.`) | ||
// currently we redirect on the UI | ||
console.log(`${cst.PM2_IO_MSG} We have disabled new bucket creation via the cli for now. You should go to https://app.pm2.io to continue`) | ||
return process.exit(0) | ||
console.log(`${cst.PM2_IO_MSG} By default we allow you to trial PM2 Plus for 14 days without any credit card.`) | ||
@@ -271,3 +267,4 @@ // do not create a bucket by default, we need their authorization | ||
}).then(res => { | ||
const bucket = res.data | ||
const bucket = res.data.bucket | ||
this.io.bucket.billing.startTrial(bucket._id, { | ||
@@ -354,21 +351,7 @@ plan: 'plus_8' | ||
if (typeof user.email_token === 'string') { | ||
console.log(`${cst.PM2_IO_MSG} You need to validate your email, you should have received an email at ${user.email}`) | ||
console.log(`${cst.PM2_IO_MSG} You can also contact us to get help: contact@pm2.io`) | ||
process.stdout.write(`${cst.PM2_IO_MSG} Waiting for validation `) | ||
const interval = setInterval(() => { | ||
this.io.user.retrieve().then(res => { | ||
const tmpUser = res.data | ||
if (tmpUser.email_token === null) { | ||
console.log(`\n${cst.PM2_IO_MSG} Successfully validated`) | ||
clearInterval(interval) | ||
this.connectToBucket(this.createBucketHandler) | ||
} else { | ||
process.stdout.write('.') | ||
} | ||
}) | ||
}, 2000) | ||
} else { | ||
this.connectToBucket(this.createBucketHandler) | ||
} | ||
this.io.user.retrieve().then(res => { | ||
const tmpUser = res.data | ||
console.log(`${cst.PM2_IO_MSG} Successfully validated`) | ||
this.connectToBucket(this.createBucketHandler.bind(this)) | ||
}) | ||
}) | ||
@@ -375,0 +358,0 @@ }) |
@@ -12,2 +12,5 @@ 'use strict' | ||
let conf = {}; | ||
const hasSpecificConfig = typeof process.env.io === 'string' || process.env.trace === 'true' | ||
// pmx is already init, no need to do it twice | ||
if (hasSpecificConfig === false) return | ||
@@ -18,3 +21,2 @@ if (process.env.io) { | ||
} | ||
pmx.init(Object.assign({ | ||
@@ -21,0 +23,0 @@ tracing: process.env.trace === 'true' || false |
{ | ||
"name": "pm2", | ||
"preferGlobal": true, | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"engines": { | ||
@@ -162,3 +162,3 @@ "node": ">=6.0.0" | ||
"@pm2/agent": "^0.5.22", | ||
"@pm2/io": "^4.1.0", | ||
"@pm2/io": "^4.1.2", | ||
"@pm2/js-api": "^0.5.43", | ||
@@ -165,0 +165,0 @@ "async": "^2.6.1", |
Sorry, the diff of this file is too big to display
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
275
749717
15670
Updated@pm2/io@^4.1.2