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