Fixing CLI build - prebuilds required for hashing can be disabled via environment variable.
This commit is contained in:
parent
a0f43107be
commit
27518cb678
|
@ -25,6 +25,7 @@
|
|||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-sdk": "2.1030.0",
|
||||
"bcrypt": "5.0.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"dotenv": "16.0.1",
|
||||
"emitter-listener": "1.1.2",
|
||||
"ioredis": "4.28.0",
|
||||
|
|
|
@ -19,6 +19,7 @@ if (!LOADED && isDev() && !isTest()) {
|
|||
const env = {
|
||||
isTest,
|
||||
isDev,
|
||||
JS_BCRYPT: process.env.JS_BCRYPT,
|
||||
JWT_SECRET: process.env.JWT_SECRET,
|
||||
COUCH_DB_URL: process.env.COUCH_DB_URL || "http://localhost:4005",
|
||||
COUCH_DB_USERNAME: process.env.COUCH_DB_USER,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const bcrypt = require("bcrypt")
|
||||
const env = require("./environment")
|
||||
const bcrypt = env.JS_BCRYPT ? require("bcryptjs") : require("bcrypt")
|
||||
const { v4 } = require("uuid")
|
||||
|
||||
const SALT_ROUNDS = env.SALT_ROUNDS || 10
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
process.env.NO_JS = "1"
|
||||
process.env.JS_BCRYPT = "1"
|
||||
|
|
|
@ -27,7 +27,10 @@ function checkForBinaries() {
|
|||
}
|
||||
|
||||
function cleanup(evt) {
|
||||
if (evt && evt.errno) {
|
||||
if (!isNaN(evt)) {
|
||||
return
|
||||
}
|
||||
if (evt) {
|
||||
console.error(
|
||||
error(
|
||||
"Failed to run CLI command - please report with the following message:"
|
||||
|
|
Loading…
Reference in New Issue