mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-23 14:15:33 +03:00
Install bcrypt-js.
This commit is contained in:
parent
13e272cabd
commit
2328cf3dee
29
examples/smoothies/package-lock.json
generated
29
examples/smoothies/package-lock.json
generated
@ -8,6 +8,9 @@
|
||||
"name": "elm-pages-example",
|
||||
"version": "1.0.0",
|
||||
"license": "BSD-3",
|
||||
"dependencies": {
|
||||
"bcryptjs": "^2.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dillonkearns/elm-graphql": "^4.2.3",
|
||||
"@netlify/functions": "^0.7.2",
|
||||
@ -35,7 +38,7 @@
|
||||
"devcert": "^1.2.0",
|
||||
"elm-doc-preview": "^5.0.5",
|
||||
"elm-hot": "^1.1.6",
|
||||
"esbuild": "^0.14.25",
|
||||
"esbuild": "^0.14.48",
|
||||
"fs-extra": "^10.0.0",
|
||||
"globby": "11.0.4",
|
||||
"gray-matter": "^4.0.3",
|
||||
@ -61,9 +64,9 @@
|
||||
"@types/serve-static": "1.13.10",
|
||||
"cypress": "^9.5.1",
|
||||
"elm-optimize-level-2": "^0.1.5",
|
||||
"elm-review": "^2.7.0",
|
||||
"elm-test": "^0.19.1-revision7",
|
||||
"elm-tooling": "^1.3.0",
|
||||
"elm-review": "^2.7.2",
|
||||
"elm-test": "^0.19.1-revision8",
|
||||
"elm-tooling": "^1.8.0",
|
||||
"elm-verify-examples": "^5.2.0",
|
||||
"elmi-to-json": "^1.2.0",
|
||||
"mocha": "^9.1.0",
|
||||
@ -495,6 +498,11 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/bcryptjs": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
||||
"integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ=="
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
@ -3923,6 +3931,11 @@
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"dev": true
|
||||
},
|
||||
"bcryptjs": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
||||
"integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ=="
|
||||
},
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
@ -4361,12 +4374,12 @@
|
||||
"elm-doc-preview": "^5.0.5",
|
||||
"elm-hot": "^1.1.6",
|
||||
"elm-optimize-level-2": "^0.1.5",
|
||||
"elm-review": "^2.7.0",
|
||||
"elm-test": "^0.19.1-revision7",
|
||||
"elm-tooling": "^1.3.0",
|
||||
"elm-review": "^2.7.2",
|
||||
"elm-test": "^0.19.1-revision8",
|
||||
"elm-tooling": "^1.8.0",
|
||||
"elm-verify-examples": "^5.2.0",
|
||||
"elmi-to-json": "^1.2.0",
|
||||
"esbuild": "^0.14.25",
|
||||
"esbuild": "^0.14.48",
|
||||
"fs-extra": "^10.0.0",
|
||||
"globby": "11.0.4",
|
||||
"gray-matter": "^4.0.3",
|
||||
|
@ -22,5 +22,8 @@
|
||||
"elm-tooling": "^1.3.0",
|
||||
"postcss": "^8.4.5",
|
||||
"tailwindcss": "^2.2.19"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcryptjs": "^2.4.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
import kleur from "kleur";
|
||||
import bcrypt from "bcryptjs";
|
||||
|
||||
kleur.enabled = true;
|
||||
|
||||
export async function environmentVariable(name) {
|
||||
@ -17,6 +19,9 @@ export async function environmentVariable(name) {
|
||||
export async function hello(name) {
|
||||
return `147 ${name}!!`;
|
||||
}
|
||||
export async function hashPassword(password) {
|
||||
return await bcrypt.hash(password, process.env.SMOOTHIES_SALT);
|
||||
}
|
||||
|
||||
function waitFor(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
Loading…
Reference in New Issue
Block a user