updating test files to use common module

This commit is contained in:
Martin McKeaveney 2020-01-23 10:39:51 +00:00
parent f15ffa59e3
commit 4b76c73df7
4 changed files with 2 additions and 23 deletions

5
package-lock.json generated
View File

@ -1356,11 +1356,6 @@
"tweetnacl": "^0.14.3"
}
},
"bcryptjs": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
"integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms="
},
"before-after-hook": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",

View File

@ -4,9 +4,7 @@
"devDependencies": {
"lerna": "^3.14.1"
},
"dependencies": {
"bcryptjs": "^2.4.3"
},
"dependencies": {},
"scripts": {
"bootstrap": "lerna bootstrap",
"build": "lerna run build",

View File

@ -1,14 +0,0 @@
import bcrypt from "bcryptjs";
function hash(password) {
return bcrypt.hashSync(password, 10);
}
function verify(password, hash) {
return bcrypt.compareSync(password, hash);
}
export default {
hash, verify
};

View File

@ -17,7 +17,7 @@ import {createBehaviourSources} from "../src/actionsApi/buildBehaviourSource";
import {createAction, createTrigger} from "../src/templateApi/createActions";
import {initialiseActions} from "../src/actionsApi/initialise";
import {cleanup} from "../src/transactions/cleanup";
import nodeCrypto from "./nodeCrypto";
import { crypto as nodeCrypto } from "@budibase/core";
import {permission} from "../src/authApi/permissions";
import {generateFullPermissions} from "../src/authApi/generateFullPermissions"
import {initialiseData} from "../src/appInitialise/initialiseData";