1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

updating test files to use common module

This commit is contained in:
Martin McKeaveney 2020-01-23 10:39:51 +00:00
parent 37b1a507ea
commit 0350375fae
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";