From 26e9e642d8df53cbe4185542b015f798fc902c11 Mon Sep 17 00:00:00 2001 From: Vicky Gonsalves Date: Wed, 30 Mar 2022 17:33:57 +0530 Subject: [PATCH] Adding support to latest version - Removed unwanted variables from .env.example - Improved log to show current environment - Code formatted - changed environments directory - Removed God_Crypto - Added bcrypt for password hashing - Corrected imports - Removed unwanted env vars and its usage - Corrected denon.json - Updated Hash helper to use bcrypt - Updated JWT helper to use web crypto - Updated Lock.json - Updated README.md - Updated Token service - Updated Mongo Types - Fixed lint issues - Updated User History Schema --- README.md | 16 +- app.ts | 3 +- config/config.ts | 10 +- controllers/auth.controller.ts | 4 +- controllers/user.controller.ts | 16 +- denon.json | 32 +-- deps.ts | 7 +- {.env => environments}/.env.example | 3 - helpers/hash.helper.ts | 38 +-- helpers/jwt.helper.ts | 36 +-- lock.json | 413 ++++++++++++---------------- middlewares/validate.middleware.ts | 2 +- models/user_history.model.ts | 13 +- routers/user.router.ts | 3 +- services/token.service.ts | 19 +- services/user.service.ts | 50 ++-- types/types.interface.ts | 4 +- 17 files changed, 293 insertions(+), 376 deletions(-) rename {.env => environments}/.env.example (76%) diff --git a/README.md b/README.md index 302b753..d9de2de 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,15 @@ deno_mongo ### Libraries Used - [x] [Oak](https://deno.land/x/oak) - A middleware framework for Deno's net - server + server - [x] [deno_mongo](https://deno.land/x/mongo) - MongoDB driver for Deno - [x] [cors](https://deno.land/x/cors) - Deno.js CORS middleware - [x] [djwt](https://deno.land/x/djwt) - To make JSON Web Tokens in deno. Based - on JWT and JWS specifications. + on JWT and JWS specifications. - [x] [yup](https://github.com/jquense/yup) - Schema builder for value parsing - and validation -- [x] [god_crypto](https://deno.land/x/god_crypto) - Encrypts passwords in AES - to save in database collection. + and validation +- [x] [bcrypt](https://deno.land/x/bcrypt) - Encrypts passwords to save in + database collection. ## Getting Started @@ -40,19 +40,19 @@ deno_mongo **Using Deno:** ``` -deno upgrade --version 1.11.5 +deno upgrade --version 1.20.3 ``` **With Shell:** ``` -curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.11.5 +curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.20.3 ``` **With PowerShell:** ``` -$v="1.11.5"; iwr https://deno.land/x/install/install.ps1 -useb | iex +$v="1.20.3"; iwr https://deno.land/x/install/install.ps1 -useb | iex ``` Clone this repository to your local machine diff --git a/app.ts b/app.ts index c2aeb5b..486e371 100644 --- a/app.ts +++ b/app.ts @@ -4,7 +4,7 @@ import log from "./middlewares/logger.middleware.ts"; import configs from "./config/config.ts"; import router from "./routers/index.ts"; -const { url, port, clientUrl } = configs; +const { env, url, port, clientUrl } = configs; const app: Application = new Application(); @@ -22,6 +22,7 @@ app.use(errorHandler); router.init(app); app.addEventListener("listen", () => { + log.info(`Current Environment: ${env}`); log.info(`Server listening at ${url}`); }); diff --git a/config/config.ts b/config/config.ts index 5f68b2c..36d793d 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,7 +1,7 @@ import { dotEnv } from "../deps.ts"; -const env: string = Deno.env.toObject().ENV || "test"; -const envPath: string = `.env/.env.${env}`.toString(); +const env: string = Deno.env.get("ENV") || "development"; +const envPath: string = `environments/.env.${env}`.toString(); const envConfig = dotEnv({ path: envPath, }); @@ -22,11 +22,8 @@ if (env === "development" || env === "test") { const config: ({ env: string; appName: string; - key: string; - jwtSecret: string; jwtAccessExpiration: number; jwtRefreshExpiration: number; - salt: string; ip: string; host: string; port: number; @@ -42,11 +39,8 @@ const config: ({ }) = { env, appName: envConfig.APP_NAME, - key: envConfig.KEY, - jwtSecret: envConfig.JWT_SECRET, jwtAccessExpiration: Number(envConfig.JWT_ACCESS_TOKEN_EXP), jwtRefreshExpiration: Number(envConfig.JWT_REFRESH_TOKEN_EXP), - salt: envConfig.SALT, ip: envConfig.IP, host: envConfig.HOST, port: Number(envConfig.PORT), diff --git a/controllers/auth.controller.ts b/controllers/auth.controller.ts index 103b315..210e17f 100644 --- a/controllers/auth.controller.ts +++ b/controllers/auth.controller.ts @@ -10,7 +10,7 @@ class AuthController { * @returns Promise */ public static async login( - { request, response }: RouterContext, + { request, response }: RouterContext, ): Promise { const body = request.body(); const { email, password } = await body.value; @@ -25,7 +25,7 @@ class AuthController { * @returns Promise */ public static async refreshTokens( - { request, response }: RouterContext, + { request, response }: RouterContext, ): Promise { const body = request.body(); const { refreshToken } = await body.value; diff --git a/controllers/user.controller.ts b/controllers/user.controller.ts index 4b241f3..d03d0f8 100644 --- a/controllers/user.controller.ts +++ b/controllers/user.controller.ts @@ -11,7 +11,7 @@ class UserController { * @returns Promise */ public static async create( - { request, response }: RouterContext, + { request, response }: RouterContext, ): Promise { const body = request.body(); const { @@ -36,7 +36,9 @@ class UserController { * @param response * @returns Promise */ - public static async fetch({ response }: RouterContext): Promise { + public static async fetch( + { response }: RouterContext, + ): Promise { log.debug("Getting users list"); response.body = await UserService.getUsers(); } @@ -47,7 +49,7 @@ class UserController { * @param response * @returns Promise */ - public static me({ state, response }: RouterContext): void { + public static me({ state, response }: RouterContext): void { log.debug("Getting me data"); response.body = state; } @@ -58,7 +60,9 @@ class UserController { * @param response * @returns Promise */ - public static async show({ params, response }: RouterContext): Promise { + public static async show( + { params, response }: RouterContext, + ): Promise { const { id } = params; log.debug("Getting user"); response.body = await UserService.getUser(id as string); @@ -72,7 +76,7 @@ class UserController { * @returns Promise */ public static async update( - { params, request, response }: RouterContext, + { params, request, response }: RouterContext, ): Promise { const { id } = params; const body = request.body(); @@ -92,7 +96,7 @@ class UserController { * @returns Promise */ public static async remove( - { params, response }: RouterContext, + { params, response }: RouterContext, ): Promise { const { id } = params; log.debug("Removing user"); diff --git a/denon.json b/denon.json index b55ca3d..8602e0c 100644 --- a/denon.json +++ b/denon.json @@ -4,41 +4,37 @@ "net", "env", "read", - "write", - "plugin" + "write" ], "scripts": { "start": { "cmd": "deno run app.ts", - "unstable": true, + "unstable": false, "desc": "run server", "env": { "ENV": "development" }, "watch": true, - "tsconfig": "tsconfig.json", - "lock": "lock.json" + "tsconfig": "tsconfig.json" }, "test": { "cmd": "deno test", "desc": "Test the server.", - "unstable": true, + "unstable": false, "env": { "ENV": "test" }, "watch": false, - "tsconfig": "tsconfig.json", - "lock": "lock.json" + "tsconfig": "tsconfig.json" }, "prod": { "cmd": "deno run app.bundle.js", "desc": "Run the server.", - "unstable": true, + "unstable": false, "env": { "ENV": "production" }, - "watch": false, - "lock": "lock.json" + "watch": false }, "fmt": { "cmd": "deno fmt", @@ -61,22 +57,14 @@ }, "watcher": { "interval": 350, - "exts": [ - "js", - "jsx", - "ts", - "tsx", - "json" - ], - "match": [ - "*.*" - ], + "exts": ["js", "jsx", "ts", "tsx", "json"], + "match": ["**/*.*"], "skip": [ "*/.git/*", "*/.idea/*", "*/.vscode/*", "*/.env/*" ], - "legacy": true + "legacy": false } } diff --git a/deps.ts b/deps.ts index f2bccf4..75e6913 100644 --- a/deps.ts +++ b/deps.ts @@ -1,6 +1,6 @@ import * as yup from "https://cdn.skypack.dev/yup"; -export { AES, encode } from "https://deno.land/x/god_crypto/mod.ts"; +export { compare, genSalt, hash } from "https://deno.land/x/bcrypt/mod.ts"; export { Application, Context, @@ -13,10 +13,9 @@ export { export type { RouterContext, State } from "https://deno.land/x/oak/mod.ts"; export { config as dotEnv } from "https://deno.land/x/dotenv/mod.ts"; export { getLogger, handlers, setup } from "https://deno.land/std/log/mod.ts"; -export { MongoClient } from "https://deno.land/x/mongo/mod.ts"; +export { Bson, MongoClient } from "https://deno.land/x/mongo/mod.ts"; export type { Document } from "https://deno.land/x/mongo/mod.ts"; -export { ObjectId } from "https://deno.land/x/mongo/bson/mod.ts"; export { oakCors } from "https://deno.land/x/cors/mod.ts"; export type { Header, Payload } from "https://deno.land/x/djwt/mod.ts"; -export { create, verify } from "https://deno.land/x/djwt/mod.ts"; +export { create, decode, verify } from "https://deno.land/x/djwt/mod.ts"; export { yup }; diff --git a/.env/.env.example b/environments/.env.example similarity index 76% rename from .env/.env.example rename to environments/.env.example index c020ee4..8ee8d2e 100644 --- a/.env/.env.example +++ b/environments/.env.example @@ -1,9 +1,6 @@ APP_NAME=Deno REST - Boilerplate for deno RESTful apis -JWT_SECRET=SOME_AWSOME_JWT_SECRET JWT_ACCESS_TOKEN_EXP=3600 JWT_REFRESH_TOKEN_EXP=1800 -KEY=YOUR_AES_KEY_FOR_PASSWORD_ENCRYPTION -SALT=random_16byte_iv SEED=false IP=0.0.0.0 HOST=localhost diff --git a/helpers/hash.helper.ts b/helpers/hash.helper.ts index 61d46e3..af955a0 100644 --- a/helpers/hash.helper.ts +++ b/helpers/hash.helper.ts @@ -1,45 +1,27 @@ -import configs from "../config/config.ts"; -import { AES, encode } from "../deps.ts"; +import { compare, genSalt, hash } from "../deps.ts"; class HashHelper { - private static key: string = configs.key; - private static salt: string = configs.salt; - - private static aes(): AES { - return new AES(this.key, { mode: "cbc", iv: this.salt }); - } - /** - * Encrypts plain string and returns cipher in hex + * Encrypts plain string and returns password hash * @param str - * @returns Promise Returns encrypted cipher in hex format + * @returns Promise Returns encrypted password hash */ public static async encrypt(str: string): Promise { - const cipher = await this.aes().encrypt(str); - return cipher.hex(); - } - - /** - * Decrypts AES hex and returns plain string - * @param str - * @returns Promise Returns decrypted cipher in plain string format - */ - public static async decrypt(str: string): Promise { - const plain = await this.aes().decrypt(encode.hex(str)); - return plain.toString(); + const salt = await genSalt(8); + return hash(str, salt); } /** - * Compares encrypted and provided string + * Compares hash * @param plain - * @param encrypted - * @returns Promise Returns Boolean if provided string and encrypted string are equal + * @param _hash + * @returns Promise Returns Boolean if provided string and hash are equal */ public static async compare( plain: string, - encrypted: string, + _hash: string, ): Promise { - return await this.encrypt(plain) === encrypted; + return await compare(plain, _hash); } } diff --git a/helpers/jwt.helper.ts b/helpers/jwt.helper.ts index a9a9fd1..be085e2 100644 --- a/helpers/jwt.helper.ts +++ b/helpers/jwt.helper.ts @@ -1,33 +1,37 @@ -import configs from "../config/config.ts"; -import { create, Header, Payload, Status, verify } from "../deps.ts"; +import { create, Status, verify } from "../deps.ts"; +import type { Header, Payload } from "../deps.ts"; import { throwError } from "../middlewares/errorHandler.middleware.ts"; -const { jwtSecret } = configs; - -const header: Header = { - alg: "HS512", - typ: "JWT", -}; +const key = await crypto.subtle.generateKey( + { name: "HMAC", hash: "SHA-512" }, + true, + ["sign", "verify"], +); class JwtHelper { /** * Generate JWT token - * @param expires + * @param exp Expiry * @param id - * @returns Promise Returns JWT + * @returns String Returns JWT */ public static getToken( - expires: number, + exp: number, id?: string, ): Promise { + const now = Date.now(); // in millis + const header: Header = { + alg: "HS512", + typ: "JWT", + }; const payload: Payload = { - iss: "djwt", - iat: Date.now(), + iss: "deno_rest", + iat: now, id, - exp: Date.now() / 1000 + expires, // in seconds + exp, }; - return create(header, payload, jwtSecret); + return create(header, payload, key); } /** @@ -37,7 +41,7 @@ class JwtHelper { */ public static async getJwtPayload(token: string): Promise { try { - return await verify(token, jwtSecret, "HS512"); + return await verify(token, key); } catch (_e) { return throwError({ status: Status.Unauthorized, diff --git a/lock.json b/lock.json index aa310e9..04015df 100644 --- a/lock.json +++ b/lock.json @@ -1,114 +1,70 @@ { - "https://cdn.skypack.dev/-/base64-js@v1.5.1-W9sqY0mF5INkRg7HAvxn/dist=es2020,mode=imports/optimized/base64-js.js": "4566964bb37bf2a057d872b75540c57b181afddb4d1a3360e8f25e9f98259f50", - "https://cdn.skypack.dev/-/bson@v4.4.1-ixbUjFoNtfoPr7oEsj87/dist=es2020,mode=imports/optimized/bson.js": "d0bd2f0c5957b0cb83ebcb726b31642fa3c130e829efa018b4fe155512267e67", - "https://cdn.skypack.dev/-/buffer@v5.7.1-Crl6ndaY0FyV50ZOgBvz/dist=es2020,mode=imports/optimized/buffer.js": "2b288e451f8eb1a846aabfe2478184072a718e088671c2cafe85b1f6686f2dd3", - "https://cdn.skypack.dev/-/ieee754@v1.2.1-wxdRuKvQQOTpW1dpWzFI/dist=es2020,mode=imports/optimized/ieee754.js": "d2f73784b95c354f399103302c65c5d0fe52bc869379d322a0b2e1185d2ad3f8", - "https://cdn.skypack.dev/-/nanoclone@v0.2.1-ZuCgEBPFq6PJo7Zsufwl/dist=es2020,mode=imports/optimized/nanoclone.js": "5d96091ee6a65b053c7215a96286f1c8a206ca2304378496dbdd832217e4854d", - "https://cdn.skypack.dev/-/property-expr@v2.0.4-EBDskEGXSDwAtFOLyJG0/dist=es2020,mode=imports/optimized/property-expr.js": "f950bca58e3fd4444addcb4813796090d778bb40a742140b74629eed2fdbee77", - "https://cdn.skypack.dev/-/toposort@v2.0.2-Uux3gYGPtoF0E7ZSTTEg/dist=es2020,mode=imports/optimized/toposort.js": "329da627fa8f7b47dbd1905d9ddc7f94390608d160e3bf1d575f76b9dc3ada5f", - "https://cdn.skypack.dev/-/yup@v0.32.9-uOJeD5vZvH5tR5tyRlG9/dist=es2020,mode=imports/optimized/yup.js": "7a1287c5ac9e15591880072008ca1e304c325ed8f9135e07a9b155d9ec544d15", - "https://cdn.skypack.dev/bson": "5eac4b6d97443f841ec80ddf92d9c207c7a18bc3cbf07d74f706db100b259cc7", - "https://cdn.skypack.dev/yup": "12aac0e980171f232292997e11631c097fda351c8ac7c80e5f80e29b98197ad3", - "https://deno.land/std@0.100.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58", - "https://deno.land/std@0.100.0/bytes/bytes_list.ts": "a13287edb03f19d27ba4927dec6d6de3e5bd46254cd4aee6f7e5815810122673", - "https://deno.land/std@0.100.0/bytes/mod.ts": "1ae1ccfe98c4b979f12b015982c7444f81fcb921bea7aa215bf37d84f46e1e13", - "https://deno.land/std@0.100.0/fmt/colors.ts": "db22b314a2ae9430ae7460ce005e0a7130e23ae1c999157e3bb77cf55800f7e4", - "https://deno.land/std@0.100.0/fs/exists.ts": "b0d2e31654819cc2a8d37df45d6b14686c0cc1d802e9ff09e902a63e98b85a00", - "https://deno.land/std@0.100.0/io/buffer.ts": "3ead6bb11276ebcf093c403f74f67fd2205a515dbbb9061862c468ca56f37cd8", - "https://deno.land/std@0.100.0/io/bufio.ts": "82fe6a499cacf4604844472ccf328cb0a1c0571c0f83b5ee67e475018342b4ae", - "https://deno.land/std@0.100.0/io/types.d.ts": "89a27569399d380246ca7cdd9e14d5e68459f11fb6110790cc5ecbd4ee7f3215", - "https://deno.land/std@0.100.0/io/util.ts": "318be78b7954da25f0faffe123fef0d9423ea61af98467e860c06b60265eff6d", - "https://deno.land/std@0.100.0/log/handlers.ts": "8c7221a2408b4097e186b018f3f1a18865d20b98761aa1dccaf1ee3d57298355", - "https://deno.land/std@0.100.0/log/levels.ts": "088a883039ece5fa0da5f74bc7688654045ea7cb01bf200b438191a28d728eae", - "https://deno.land/std@0.100.0/log/logger.ts": "6b2dd8cbe6f407100b9becfe61595d7681f8ce3692412fad843de84d617a038e", - "https://deno.land/std@0.100.0/log/mod.ts": "91711789b28803082b1bdfb123d2c9685a7e01767f2e79c0a82706063ad964d8", - "https://deno.land/std@0.100.0/testing/_diff.ts": "a214632660e819a099f3ce719770031a69ba165853f930b90b44d7317a05585b", - "https://deno.land/std@0.100.0/testing/asserts.ts": "c4e8b3d81a5d80d6a4b48692e298dbeccfa22a5291782d6faa05115eb61d337e", - "https://deno.land/std@0.77.0/fmt/colors.ts": "c5665c66f1a67228f21c5989bbb04b36d369b98dd7ceac06f5e26856c81c2531", - "https://deno.land/std@0.83.0/_util/assert.ts": "e1f76e77c5ccb5a8e0dbbbe6cce3a56d2556c8cb5a9a8802fc9565af72462149", - "https://deno.land/std@0.83.0/async/deferred.ts": "ecdb71319e164ec4ace5a44e3ee991b52c21bfc19e498acdf8eccdc0b1184f70", - "https://deno.land/std@0.83.0/async/delay.ts": "35957d585a6e3dd87706858fb1d6b551cb278271b03f52c5a2cb70e65e00c26a", - "https://deno.land/std@0.83.0/async/mod.ts": "39f2602a005805dd1e6b9da4ee5391b14d15e8fec4fa5494a6165c599911d746", - "https://deno.land/std@0.83.0/async/mux_async_iterator.ts": "2532c6f448fda34db7ab9504746db671c32425dd4ffa96eeb9df744c3038c106", - "https://deno.land/std@0.83.0/async/pool.ts": "a499691231d8c249f044f69d204b479ad3af7f115e0b37342829eff076bc2450", - "https://deno.land/std@0.83.0/bytes/mod.ts": "e4f91c6473fe13e3cf1a23649137f87f49135c10bc08fc0f83382a0fb0b03744", - "https://deno.land/std@0.83.0/encoding/base64.ts": "b1d8f99b778981548457ec74bc6273ad785ffd6f61b2233bd5b30925345b565d", - "https://deno.land/std@0.83.0/encoding/hex.ts": "fa01b16414c8e04caa0055f2d8c4610a3ec714a04315d0afe6956e07d501e11d", - "https://deno.land/std@0.83.0/encoding/utf8.ts": "1b7e77db9a12363c67872f8a208886ca1329f160c1ca9133b13d2ed399688b99", - "https://deno.land/std@0.83.0/fmt/colors.ts": "c5665c66f1a67228f21c5989bbb04b36d369b98dd7ceac06f5e26856c81c2531", - "https://deno.land/std@0.83.0/hash/_wasm/hash.ts": "005f64c4d9343ecbc91e0da9ae5e800f146c20930ad829bbb872c5c06bd89c5f", - "https://deno.land/std@0.83.0/hash/_wasm/wasm.js": "fa27095b91e6268682100997577f1d3478beab5b045777e27ff7b2b5d19c8fdc", - "https://deno.land/std@0.83.0/hash/hasher.ts": "099c9e2a91b9f106b9f01379705e17e7d9de392ee1ea2b8684a2adfa82ac3bfc", - "https://deno.land/std@0.83.0/hash/mod.ts": "e764a6a9ab2f5519a97f928e17cc13d984e3dd5c7f742ff9c1c8fb3114790f0c", - "https://deno.land/std@0.83.0/hash/sha1.ts": "5aa9abaace21e3f00f14ead6c949713ee43d242c6ed2fc76acecdce9e8a346b5", - "https://deno.land/std@0.83.0/hash/sha256.ts": "1025d54d0a307f941380de0e7264054a0076a323ea3cff64171f9fdd81f011d8", - "https://deno.land/std@0.83.0/io/bufio.ts": "3cbbe1f761c1c636d1e7128ed4e7fdca6bf21d9199aa3cae71e69972a6ae8f93", - "https://deno.land/std@0.83.0/io/ioutil.ts": "b781afd113a7d29c88c3d88efec391a0446c3e6537b74f795dd8579339ae8a5f", - "https://deno.land/std@0.83.0/io/mod.ts": "42d24674d7c26a0701172e6f984284d2ec83eede0d27eccc06460370df1a3f2e", - "https://deno.land/std@0.83.0/io/readers.ts": "4c2e98abf2a2a1d5e2adaf460479a1c69f742951c1bc141b26654d2f5248b663", - "https://deno.land/std@0.83.0/io/streams.ts": "2b354ad6edf22b287ea8cb28737ab2769797d3fa7cc84664137b9cacd5929607", - "https://deno.land/std@0.83.0/io/writers.ts": "9b7f16ccd75a790a9dfb44578a11d833a863f4478811bce382645b634f2f9213", - "https://deno.land/std@0.83.0/node/_crypto/constants.ts": "f2426a2569c64b8fab49eddd58cb8a4cef4937cc41358ac0a9ad268435371832", - "https://deno.land/std@0.83.0/node/_crypto/pbkdf2.ts": "a5f4d281abb77ad97e89ee4e027e89f866773f8286b3a276fca70666997021e4", - "https://deno.land/std@0.83.0/node/_crypto/types.ts": "a30809e13b3365d3d7ccd91cc48206f60bc3b8f25df15671b93c252818aa86d2", - "https://deno.land/std@0.83.0/node/_utils.ts": "e87f88c2f6e235d724cc68e9d835d6b48a9ec9c6bfa3ea173bbd94ac5d1109d9", - "https://deno.land/std@0.83.0/node/buffer.ts": "d8ea34073b5f1cee77e696d4be110e4e73e8fec55b20cd974b798cf42b71df6c", - "https://deno.land/std@0.83.0/testing/_diff.ts": "9656b2dbe0a76684e705375fd03bfe0108e9e00845ccb9e47abff52f156fe4e8", - "https://deno.land/std@0.83.0/testing/asserts.ts": "a8d30ca52b1bf4f928c521e80b58d04ed3930b9507c598cfffd1ecedf3f6eaf2", - "https://deno.land/std@0.84.0/hash/sha1.ts": "1cca324b4b253885a47f121adafcfac55b4cc96113e22b338e1db26f37a730b8", - "https://deno.land/std@0.84.0/hash/sha256.ts": "2a06afd9c27942b87ffc8a93b3270065b5fe4ea144fe0939e5d050bfb86d40db", - "https://deno.land/std@0.84.0/hash/sha512.ts": "879e99a4c20d10ddadbe02a643a69565dfbabffc5fa7ddacff3ebcdb664b554c", - "https://deno.land/std@0.85.0/encoding/base64.ts": "e81fd4661e7af6711b1a03ed212617e1b1ff2999a11317655359cf9223bc6cce", - "https://deno.land/std@0.85.0/encoding/base64url.ts": "58e369ff130ac4b6d0661fe5189b93f839a91327b086f355c0ce0c74ec5e7c6c", - "https://deno.land/std@0.85.0/encoding/hex.ts": "f952e0727bddb3b2fd2e6889d104eacbd62e92091f540ebd6459317a61932d9b", - "https://deno.land/std@0.85.0/hash/sha256.ts": "2a06afd9c27942b87ffc8a93b3270065b5fe4ea144fe0939e5d050bfb86d40db", - "https://deno.land/std@0.85.0/hash/sha512.ts": "879e99a4c20d10ddadbe02a643a69565dfbabffc5fa7ddacff3ebcdb664b554c", - "https://deno.land/std@0.99.0/_util/assert.ts": "2f868145a042a11d5ad0a3c748dcf580add8a0dbc0e876eaa0026303a5488f58", - "https://deno.land/std@0.99.0/_util/has_own_property.ts": "f5edd94ed3f3c20c517d812045deb97977e18501c9b7105b5f5c11a31893d7a2", - "https://deno.land/std@0.99.0/_util/os.ts": "e282950a0eaa96760c0cf11e7463e66babd15ec9157d4c9ed49cc0925686f6a7", - "https://deno.land/std@0.99.0/async/deferred.ts": "624bef4b755b71394620508a0c234a93cb8020cbd1b04bfcdad41c174392cef6", - "https://deno.land/std@0.99.0/async/delay.ts": "9de1d8d07d1927767ab7f82434b883f3d8294fb19cad819691a2ad81a728cf3d", - "https://deno.land/std@0.99.0/async/mod.ts": "f24e4a94f9fb7de78e8345e9590e1bf23da28a212541970413a023094448031b", - "https://deno.land/std@0.99.0/async/mux_async_iterator.ts": "62abff3af9ff619e8f2adc96fc70d4ca020fa48a50c23c13f12d02ed2b760dbe", - "https://deno.land/std@0.99.0/async/pool.ts": "353ce4f91865da203a097aa6f33de8966340c91b6f4a055611c8c5d534afd12f", - "https://deno.land/std@0.99.0/async/tee.ts": "6b8f1322b6dd2396202cfbe9cde9cab158d1e962cfd9197b0a97c6657bee79ce", - "https://deno.land/std@0.99.0/bytes/bytes_list.ts": "a13287edb03f19d27ba4927dec6d6de3e5bd46254cd4aee6f7e5815810122673", - "https://deno.land/std@0.99.0/bytes/mod.ts": "1ae1ccfe98c4b979f12b015982c7444f81fcb921bea7aa215bf37d84f46e1e13", - "https://deno.land/std@0.99.0/encoding/base64.ts": "eecae390f1f1d1cae6f6c6d732ede5276bf4b9cd29b1d281678c054dc5cc009e", - "https://deno.land/std@0.99.0/encoding/hex.ts": "f952e0727bddb3b2fd2e6889d104eacbd62e92091f540ebd6459317a61932d9b", - "https://deno.land/std@0.99.0/fmt/colors.ts": "db22b314a2ae9430ae7460ce005e0a7130e23ae1c999157e3bb77cf55800f7e4", - "https://deno.land/std@0.99.0/hash/_wasm/hash.ts": "cb6ad1ab429f8ac9d6eae48f3286e08236d662e1a2e5cfd681ba1c0f17375895", - "https://deno.land/std@0.99.0/hash/_wasm/wasm.js": "94b1b997ae6fb4e6d2156bcea8f79cfcd1e512a91252b08800a92071e5e84e1a", - "https://deno.land/std@0.99.0/hash/hasher.ts": "57a9ec05dd48a9eceed319ac53463d9873490feea3832d58679df6eec51c176b", - "https://deno.land/std@0.99.0/hash/mod.ts": "5d032bd34186cda2f8d17fc122d621430953a6030d4b3f11172004715e3e2441", - "https://deno.land/std@0.99.0/hash/sha1.ts": "1cca324b4b253885a47f121adafcfac55b4cc96113e22b338e1db26f37a730b8", - "https://deno.land/std@0.99.0/hash/sha256.ts": "2a06afd9c27942b87ffc8a93b3270065b5fe4ea144fe0939e5d050bfb86d40db", - "https://deno.land/std@0.99.0/http/_io.ts": "f4446e433d8d0009851c7de20d594746de228399c382cbee65da30eb87e70827", - "https://deno.land/std@0.99.0/http/http_status.ts": "ebaa9bebfb8adc3d7b20c49e11037e4eefd79629ad80d81383933f4cdc91b3eb", - "https://deno.land/std@0.99.0/http/server.ts": "39414681549353ebd0665e3df4145ee0a93a989cd0f55bed14fdb2c43d2faa3b", - "https://deno.land/std@0.99.0/io/buffer.ts": "3ead6bb11276ebcf093c403f74f67fd2205a515dbbb9061862c468ca56f37cd8", - "https://deno.land/std@0.99.0/io/bufio.ts": "82fe6a499cacf4604844472ccf328cb0a1c0571c0f83b5ee67e475018342b4ae", - "https://deno.land/std@0.99.0/io/ioutil.ts": "3c6b7c8be3b8cd19746de028c40063193578612244a935dcc27be9f3ff343b0c", - "https://deno.land/std@0.99.0/io/readers.ts": "17403919724fef2f343c88555606368868a5c752a1099ad801f6a381c170f62d", - "https://deno.land/std@0.99.0/io/streams.ts": "b2b15e2d92ee113db9225b8098f03f6338302ce21c4195c3f643bb5132426906", - "https://deno.land/std@0.99.0/io/types.d.ts": "89a27569399d380246ca7cdd9e14d5e68459f11fb6110790cc5ecbd4ee7f3215", - "https://deno.land/std@0.99.0/io/util.ts": "318be78b7954da25f0faffe123fef0d9423ea61af98467e860c06b60265eff6d", - "https://deno.land/std@0.99.0/path/_constants.ts": "1247fee4a79b70c89f23499691ef169b41b6ccf01887a0abd131009c5581b853", - "https://deno.land/std@0.99.0/path/_interface.ts": "1fa73b02aaa24867e481a48492b44f2598cd9dfa513c7b34001437007d3642e4", - "https://deno.land/std@0.99.0/path/_util.ts": "2e06a3b9e79beaf62687196bd4b60a4c391d862cfa007a20fc3a39f778ba073b", - "https://deno.land/std@0.99.0/path/common.ts": "eaf03d08b569e8a87e674e4e265e099f237472b6fd135b3cbeae5827035ea14a", - "https://deno.land/std@0.99.0/path/glob.ts": "314ad9ff263b895795208cdd4d5e35a44618ca3c6dd155e226fb15d065008652", - "https://deno.land/std@0.99.0/path/mod.ts": "4465dc494f271b02569edbb4a18d727063b5dbd6ed84283ff906260970a15d12", - "https://deno.land/std@0.99.0/path/posix.ts": "f56c3c99feb47f30a40ce9d252ef6f00296fa7c0fcb6dd81211bdb3b8b99ca3b", - "https://deno.land/std@0.99.0/path/separator.ts": "8fdcf289b1b76fd726a508f57d3370ca029ae6976fcde5044007f062e643ff1c", - "https://deno.land/std@0.99.0/path/win32.ts": "77f7b3604e0de40f3a7c698e8a79e7f601dc187035a1c21cb1e596666ce112f8", - "https://deno.land/std@0.99.0/testing/_diff.ts": "961eaf6d9f5b0a8556c9d835bbc6fa74f5addd7d3b02728ba7936ff93364f7a3", - "https://deno.land/std@0.99.0/testing/asserts.ts": "289b6ccf3b422ffb311cbf56996960d6530f8d8c0a7281803764c5ec672f9f9c", - "https://deno.land/std@0.99.0/textproto/mod.ts": "6e8430986393e3929720cec9c6668d75dee2ffd953886e842dc124c251cb86c8", - "https://deno.land/std@0.99.0/ws/mod.ts": "561d12475c04ed91b109e5340ca7f2cfe0421613792586c3d8a4c825ad722f59", - "https://deno.land/x/bytes_formater@v1.4.0/deps.ts": "4f98f74e21145423b873a5ca6ead66dc3e674fa81e230a0a395f9b86aafeceea", - "https://deno.land/x/bytes_formater@v1.4.0/format.ts": "657c41b9f180c3ed0f934dcf75f77b09b6a610be98bb07525bffe2acfd5af4d5", - "https://deno.land/x/bytes_formater@v1.4.0/mod.ts": "c6bf35303f53d74e9134eb13f666fb388fb4c62c6b12b17542bbadade250a864", + "https://cdn.skypack.dev/-/nanoclone@v0.2.1-ZuCgEBPFq6PJo7Zsufwl/dist=es2019,mode=imports/optimized/nanoclone.js": "5d96091ee6a65b053c7215a96286f1c8a206ca2304378496dbdd832217e4854d", + "https://cdn.skypack.dev/-/property-expr@v2.0.4-EBDskEGXSDwAtFOLyJG0/dist=es2019,mode=imports/optimized/property-expr.js": "f950bca58e3fd4444addcb4813796090d778bb40a742140b74629eed2fdbee77", + "https://cdn.skypack.dev/-/toposort@v2.0.2-Uux3gYGPtoF0E7ZSTTEg/dist=es2019,mode=imports/optimized/toposort.js": "329da627fa8f7b47dbd1905d9ddc7f94390608d160e3bf1d575f76b9dc3ada5f", + "https://cdn.skypack.dev/-/yup@v0.32.11-4zjWTk1l434XRqKvIabj/dist=es2019,mode=imports/optimized/yup.js": "1934722ffae8d6e714c27ed6385aa1fb47d71562de7b73e2b9264a76a59803ed", + "https://cdn.skypack.dev/yup": "0049807c33ae2d7fdb1c67f108e05045dd30a9084defb37df098880cfa447aab", + "https://deno.land/std@0.105.0/encoding/base64.ts": "eecae390f1f1d1cae6f6c6d732ede5276bf4b9cd29b1d281678c054dc5cc009e", + "https://deno.land/std@0.105.0/encoding/base64url.ts": "7160c189140857342eb34a1fb4b9c7fc566d61f4d1d2586054966c8860b14c6a", + "https://deno.land/std@0.130.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", + "https://deno.land/std@0.130.0/_wasm_crypto/crypto.mjs": "3b383eb715e8bfe61b4450ef0644b2653429c88d494807c86c5235979f62e56b", + "https://deno.land/std@0.130.0/_wasm_crypto/crypto.wasm.mjs": "0ad9ecc0d03ca8a083d9109db22e7507f019f63cf55b82ea618ab58855617577", + "https://deno.land/std@0.130.0/_wasm_crypto/mod.ts": "30a93c8b6b6c5b269e96a3e95d2c045d86a496814a8737443b77cad941d6a0b5", + "https://deno.land/std@0.130.0/async/deferred.ts": "bc18e28108252c9f67dfca2bbc4587c3cbf3aeb6e155f8c864ca8ecff992b98a", + "https://deno.land/std@0.130.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", + "https://deno.land/std@0.130.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", + "https://deno.land/std@0.130.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", + "https://deno.land/std@0.130.0/crypto/mod.ts": "a10fee951ddf2c91ae5938ba2a1d123580f773e533008988ba6089ddd2b65d67", + "https://deno.land/std@0.130.0/encoding/base64.ts": "c8c16b4adaa60d7a8eee047c73ece26844435e8f7f1328d74593dbb2dd58ea4f", + "https://deno.land/std@0.130.0/encoding/hex.ts": "7f023e1e51cfd6b189682e602e8640939e7be71a300a2fcf3daf8f84dc609bbc", + "https://deno.land/std@0.130.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", + "https://deno.land/std@0.130.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", + "https://deno.land/std@0.130.0/io/files.ts": "d199ef64e918a256320ba8d8d44ae91de87c9077df8f8d6cca013f1b9fbbe285", + "https://deno.land/std@0.130.0/io/mod.ts": "1a4e8d19d42745fb2ff68d6ffa801657a4a15713bf7e7173df2da4737f5c5450", + "https://deno.land/std@0.130.0/io/readers.ts": "679471f3b9929b54393c9cd75b6bd178b4bc6d9aab5c0f1f9538f862cf4746fe", + "https://deno.land/std@0.130.0/io/streams.ts": "988a19155b52161f0035ce539e2f1d12edbc4c389fa7633da832a64e6edbe1a0", + "https://deno.land/std@0.130.0/io/types.d.ts": "01f60ae7ec02675b5dbed150d258fc184a78dfe5c209ef53ba4422b46b58822c", + "https://deno.land/std@0.130.0/io/util.ts": "078da53bba767bec0d45f7da44411f6dbf269e51ef7fcfea5e3714e04681c674", + "https://deno.land/std@0.130.0/io/writers.ts": "5db9995d2afc7ed391c88c6b441457df6fad6a0b09653e54c1dcd0387ab947fd", + "https://deno.land/std@0.130.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", + "https://deno.land/std@0.130.0/testing/_diff.ts": "9d849cd6877694152e01775b2d93f9d6b7aef7e24bfe3bfafc4d7a1ac8e9f392", + "https://deno.land/std@0.130.0/testing/asserts.ts": "b0ef969032882b1f7eb1c7571e313214baa1485f7b61cf35807b2434e254365c", + "https://deno.land/std@0.131.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", + "https://deno.land/std@0.131.0/_util/os.ts": "49b92edea1e82ba295ec946de8ffd956ed123e2948d9bd1d3e901b04e4307617", + "https://deno.land/std@0.131.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", + "https://deno.land/std@0.131.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", + "https://deno.land/std@0.131.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", + "https://deno.land/std@0.131.0/encoding/base64.ts": "c8c16b4adaa60d7a8eee047c73ece26844435e8f7f1328d74593dbb2dd58ea4f", + "https://deno.land/std@0.131.0/http/http_status.ts": "71838ad33cb03ff2575f5e8fdea5f930979cdff8a81c11ade497f11d4c026019", + "https://deno.land/std@0.131.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", + "https://deno.land/std@0.131.0/io/readers.ts": "679471f3b9929b54393c9cd75b6bd178b4bc6d9aab5c0f1f9538f862cf4746fe", + "https://deno.land/std@0.131.0/io/types.d.ts": "01f60ae7ec02675b5dbed150d258fc184a78dfe5c209ef53ba4422b46b58822c", + "https://deno.land/std@0.131.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3", + "https://deno.land/std@0.131.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09", + "https://deno.land/std@0.131.0/path/_util.ts": "c1e9686d0164e29f7d880b2158971d805b6e0efc3110d0b3e24e4b8af2190d2b", + "https://deno.land/std@0.131.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633", + "https://deno.land/std@0.131.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee", + "https://deno.land/std@0.131.0/path/mod.ts": "4275129bb766f0e475ecc5246aa35689eeade419d72a48355203f31802640be7", + "https://deno.land/std@0.131.0/path/posix.ts": "663e4a6fe30a145f56aa41a22d95114c4c5582d8b57d2d7c9ed27ad2c47636bb", + "https://deno.land/std@0.131.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", + "https://deno.land/std@0.131.0/path/win32.ts": "e7bdf63e8d9982b4d8a01ef5689425c93310ece950e517476e22af10f41a136e", + "https://deno.land/std@0.131.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21", + "https://deno.land/std@0.132.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", + "https://deno.land/std@0.132.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d", + "https://deno.land/std@0.132.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9", + "https://deno.land/std@0.132.0/bytes/mod.ts": "d3b455c0dbd4804644159d1e25946ade5ee385d2359894de49e2c6101b18b7a9", + "https://deno.land/std@0.132.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37", + "https://deno.land/std@0.132.0/fs/exists.ts": "cb734d872f8554ea40b8bff77ad33d4143c1187eac621a55bf37781a43c56f6d", + "https://deno.land/std@0.132.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b", + "https://deno.land/std@0.132.0/io/types.d.ts": "01f60ae7ec02675b5dbed150d258fc184a78dfe5c209ef53ba4422b46b58822c", + "https://deno.land/std@0.132.0/log/handlers.ts": "f23c58814771be49e203ff81c2852894347e602718d5bcd279e47060fd0192e9", + "https://deno.land/std@0.132.0/log/levels.ts": "82c965b90f763b5313e7595d4ba78d5095a13646d18430ebaf547526131604d1", + "https://deno.land/std@0.132.0/log/logger.ts": "30770bf29053d1c8d1054ec52ab385da8e5b8a43973da32c84dea819e5a11b52", + "https://deno.land/std@0.132.0/log/mod.ts": "e200a8600a9e9ac2b10668fda0e6537a1444c5050ea6a04c826df52519bf35fd", + "https://deno.land/x/bcrypt@v0.3.0/mod.ts": "ff09bdae282583cf5f7d87efe37ddcecef7f14f6d12e8b8066a3058db8c6c2f7", + "https://deno.land/x/bcrypt@v0.3.0/src/bcrypt/base64.ts": "b8266450a4f1eb6960f60f2f7986afc4dde6b45bd2d7ee7ba10789e67e17b9f7", + "https://deno.land/x/bcrypt@v0.3.0/src/bcrypt/bcrypt.ts": "65819ce8e32d6e6a68f8753931237c58baa39b2573c1d7fac42f03d51499f242", + "https://deno.land/x/bcrypt@v0.3.0/src/main.ts": "08d201b289c8d9c46f8839c69cd6625b213863db29775c7a200afc3b540e64f8", "https://deno.land/x/cors@v1.2.2/abcCors.ts": "cdf83a7eaa69a1bf3ab910d18b9422217902fac47601adcaf0afac5a61845d48", "https://deno.land/x/cors@v1.2.2/attainCors.ts": "7d6aba0f942495cc31119604e0895c9bb8edd8f8baa7fe78e6c655bd0b4cbf59", "https://deno.land/x/cors@v1.2.2/cors.ts": "0e2d9167e3685f9bcf48f565e312b6e1883fa458f7337e5ce7bc2e3b29767980", @@ -117,133 +73,112 @@ "https://deno.land/x/cors@v1.2.2/oakCors.ts": "1348dc7673c61b85d2e80559a7b44f8e0246eaa6bcc6ec744fafe5d9b13b5c71", "https://deno.land/x/cors@v1.2.2/opineCors.ts": "fb5790115c26b7061d84b8d6c17d258a1e241bcab75b0bc3ca1fdb2e57bc5072", "https://deno.land/x/cors@v1.2.2/types.ts": "97546633ccc7f0df7a29bacba5d91dc6f61decdd1b65258300244dba905d34b8", - "https://deno.land/x/djwt@v2.2/algorithm.ts": "af7e185c74f5319e39eb82d52b4c315d74c9bd798aa098feb6f47a4bc181b584", - "https://deno.land/x/djwt@v2.2/deps.ts": "76d85d725ff951fc0f9eae0a06b434fa1259845caf45e398713dd77788b02692", - "https://deno.land/x/djwt@v2.2/mod.ts": "bc851108f645ed707a88a55a110948f35c00eb0c4c1c0a7d5bd271928b6c31ff", - "https://deno.land/x/djwt@v2.2/signature.ts": "ee591d5907d665c28e5687b1f18144ec604884fd2746d3baf81aa57a30698ffa", - "https://deno.land/x/dotenv@v2.0.0/mod.ts": "327b0f2c335e69ca127b0e8b282210d21e45a1f9f6ce597484fbb3f3b23cb461", - "https://deno.land/x/dotenv@v2.0.0/util.ts": "693730877b13f8ead2b79b2aa31e2a0652862f7dc0c5f6d2f313f4d39c7b7670", - "https://deno.land/x/god_crypto@v1.4.10/mod.ts": "fe262dd556c44b5deb45be10fc4e9354fd10de3eefdc37b7a10c8e2e70d1458e", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/aes_base.ts": "58389d3fa2c7a3b9a592386e3d6494e74405b600a32db743eb6a60cf306dcd99", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/aes_js.ts": "916e1a1044a234bcb43d866b03ce97d91da31936b08b8e01e983bcfa0af93e92", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/aes_wc.ts": "2862cc3b1d514586e58a1b7ac84506299e80dac03c23c669b73c90a482133f88", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/block_ciper_operator.ts": "40c178a667737b20b19d3d2039553474ce0f2d2f392fd7ad12db092d7e4d8428", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/common.ts": "6e3be9bd60197c88a104bbe255a87e5809fcebd2d6f632e43fcec95a62a6bab5", - "https://deno.land/x/god_crypto@v1.4.10/src/aes/mod.ts": "86baa3a94491f3ce82e639043f522f8eb18e79cc98260202c338ab5435e46dc6", - "https://deno.land/x/god_crypto@v1.4.10/src/binary.ts": "f8c2ce60f9e0295cd54bbc3008cc4b388e919aa9128767d5f8e7eb4dd34fc8b4", - "https://deno.land/x/god_crypto@v1.4.10/src/hash.ts": "b23060d50aa0d2e4845ce3a68c6533ddfc573ca679a9848be233da04c15964d4", - "https://deno.land/x/god_crypto@v1.4.10/src/helper.ts": "e664a39ea7c3300765e5daeec4e55036b7fc810b27c7d806bd1ec24e19bc09b7", - "https://deno.land/x/god_crypto@v1.4.10/src/hmac/mod.ts": "f5e09b3e797658c32af46fc7fcb3e67208a770d132a6c4a4f4a3c12c718eedb2", - "https://deno.land/x/god_crypto@v1.4.10/src/math.ts": "f31a80dd819892e13b451852e6ee64178a4f55929d42f23f38a14e1e325e48b8", - "https://deno.land/x/god_crypto@v1.4.10/src/otp/totp.ts": "3dcbe36dcc3801558194c76e3bf9e77c555b905d08fc874df125c16222c64372", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/basic_encoding_rule.ts": "913d06dc6afb7eb5a716964c44a9a99ee293d525ba66e171a6b88fd1fb5d34b9", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/common.ts": "fadd40b40e61fe1723d546019cc8d8c309803aba9e11dd446f2ed5df2c10ea14", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/eme_oaep.ts": "b6552ec4e53d1b360ba5639dd6dd8efe176586331e98ba9102a1ae5e71c427e2", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/emsa_pss.ts": "9dd89fbecb1f53bcb0dc6338d1b0448677d6f35e356b3b51ebc23ae48bbbcc9a", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/export_key.ts": "07c33f4ae7f276e8b99d944a3a05cef965674f481d411b97b67b0e49235f063f", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/import_key.ts": "1e84d8d140c879785a457a3070b53c13c681881f5465074dba46d4b058d76295", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/mod.ts": "0ea65d6ac21e1f007812ea250b986b8f532ec49bc6b1eb87ef4a2cfc0425032b", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/primitives.ts": "a86659455e16274a384fd7ef23e63945ae8892c542997c544f7e03f073c4be81", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/rsa_internal.ts": "c8827374377a5b28087fa392070dfe7586b0eac6e4e3fae84dd901a57b1b7541", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/rsa_js.ts": "fbb4f4f564fb230bdb370e6fdbcd81b33c8e04c49181dfb6b9ef75106499648d", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/rsa_key.ts": "1a729b884d0a09c50a5f6d68e9e13d07f1be7f1092a59486699d7c952ab7ca86", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/rsa_wc.ts": "86b7e465b4808e7bef312165029ac07d35e94fd74ceeeea37123788c59f66792", - "https://deno.land/x/god_crypto@v1.4.10/src/rsa/rsassa_pss.ts": "14987aab6b69fb5d9056bf260c722cc91376e34edb53ee30f38541ab5f7a2260", - "https://deno.land/x/god_crypto@v1.4.10/src/utility/asn1.ts": "91b4d357a3b3bca4c0c0d26e876061bf803e04e5f0bd418d35426d1858f9aaf8", - "https://deno.land/x/god_crypto@v1.4.10/src/utility/encode.ts": "2865eb23bceea73fde3e0d1c13254bc30d9144606fda30ae009fbf33e5c881a3", - "https://deno.land/x/god_crypto@v1.4.9/rsa.ts": "ccdac797dad64da4a0cd297b17fb987d6aa272c18568919c3365206912c20129", - "https://deno.land/x/god_crypto@v1.4.9/src/binary.ts": "f8c2ce60f9e0295cd54bbc3008cc4b388e919aa9128767d5f8e7eb4dd34fc8b4", - "https://deno.land/x/god_crypto@v1.4.9/src/hash.ts": "b23060d50aa0d2e4845ce3a68c6533ddfc573ca679a9848be233da04c15964d4", - "https://deno.land/x/god_crypto@v1.4.9/src/helper.ts": "e664a39ea7c3300765e5daeec4e55036b7fc810b27c7d806bd1ec24e19bc09b7", - "https://deno.land/x/god_crypto@v1.4.9/src/math.ts": "f31a80dd819892e13b451852e6ee64178a4f55929d42f23f38a14e1e325e48b8", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/basic_encoding_rule.ts": "913d06dc6afb7eb5a716964c44a9a99ee293d525ba66e171a6b88fd1fb5d34b9", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/common.ts": "fadd40b40e61fe1723d546019cc8d8c309803aba9e11dd446f2ed5df2c10ea14", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/eme_oaep.ts": "b6552ec4e53d1b360ba5639dd6dd8efe176586331e98ba9102a1ae5e71c427e2", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/emsa_pss.ts": "9dd89fbecb1f53bcb0dc6338d1b0448677d6f35e356b3b51ebc23ae48bbbcc9a", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/export_key.ts": "07c33f4ae7f276e8b99d944a3a05cef965674f481d411b97b67b0e49235f063f", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/import_key.ts": "4d9577e4b0313416f947c4359b0b8cb55002e036949a569287697ac591c1ad2f", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/mod.ts": "0ea65d6ac21e1f007812ea250b986b8f532ec49bc6b1eb87ef4a2cfc0425032b", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/primitives.ts": "a86659455e16274a384fd7ef23e63945ae8892c542997c544f7e03f073c4be81", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/rsa_internal.ts": "c8827374377a5b28087fa392070dfe7586b0eac6e4e3fae84dd901a57b1b7541", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/rsa_js.ts": "fbb4f4f564fb230bdb370e6fdbcd81b33c8e04c49181dfb6b9ef75106499648d", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/rsa_key.ts": "1a729b884d0a09c50a5f6d68e9e13d07f1be7f1092a59486699d7c952ab7ca86", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/rsa_wc.ts": "614624a1d222d42192bc3c9da1e9656e88f921f5e8c24171567fdac90036337e", - "https://deno.land/x/god_crypto@v1.4.9/src/rsa/rsassa_pss.ts": "14987aab6b69fb5d9056bf260c722cc91376e34edb53ee30f38541ab5f7a2260", - "https://deno.land/x/god_crypto@v1.4.9/src/utility/asn1.ts": "91b4d357a3b3bca4c0c0d26e876061bf803e04e5f0bd418d35426d1858f9aaf8", - "https://deno.land/x/god_crypto@v1.4.9/src/utility/encode.ts": "2865eb23bceea73fde3e0d1c13254bc30d9144606fda30ae009fbf33e5c881a3", - "https://deno.land/x/media_types@v2.9.0/db.ts": "ba39cddbcefce47d577c0529066787a3a7b39d27750a6d32b5ad53ed487e7b7b", - "https://deno.land/x/media_types@v2.9.0/deps.ts": "364b24c35845cfd5c6903ab22b8ba9873bf1022bbbf6bf3d001695332d4bbb4f", - "https://deno.land/x/media_types@v2.9.0/mod.ts": "d63583b978d32eff8b76e1ae5d83cba2fb27baa90cc1bcb0ad15a06122ea8c19", - "https://deno.land/x/mongo@v0.23.1/bson/bson.d.ts": "f002637dd5fbdc2ce2720033eae2f5a70e52b83df7584aaf26423c74f1852f10", - "https://deno.land/x/mongo@v0.23.1/bson/mod.ts": "4cfbe6273e120e74e75dacf5a6ee5eee360fa900ceee9240892cd8e03f160ebf", - "https://deno.land/x/mongo@v0.23.1/deps.ts": "64735636cf6e9981c7df47bf5676d9965a98474ca8365a984b575f63cd790113", - "https://deno.land/x/mongo@v0.23.1/mod.ts": "73e92d8acf2ccd7caebb6cdf2202545461daba6d0e781c6095d3eb1964f52f71", - "https://deno.land/x/mongo@v0.23.1/src/auth/base.ts": "b62f7e275c742174239362524710de8381bc3e4d05406d16c8d8be42240c7bd5", - "https://deno.land/x/mongo@v0.23.1/src/auth/mod.ts": "b161611bd5be9e9d1b4497227c8ea93ad4daadcd98038c9e5a707bc5da7a25ca", - "https://deno.land/x/mongo@v0.23.1/src/auth/scram.ts": "98f9dbe3d54a767fa061a2b00afa5f7fda1e346bcad836dcdceada65399bd27d", - "https://deno.land/x/mongo@v0.23.1/src/auth/x509.ts": "e1c1caa8cdc591cfdeef3728cec9dbf03d3fe0f8d123cbf41f57fff682b27e6c", - "https://deno.land/x/mongo@v0.23.1/src/client.ts": "2195eb8bc83e2e5b5d8373f93ddb29af9675b558991bb1bf503cbf9c0c370c1b", - "https://deno.land/x/mongo@v0.23.1/src/cluster.ts": "3c87c68d0d7f9b463b8050f3ee16be072cf815b8d687c84ff49d98916e332061", - "https://deno.land/x/mongo@v0.23.1/src/collection/collection.ts": "b725a8b7d92c3d4e7edb67a27679db4733d9e24b318d6efe02b29aace8ffceec", - "https://deno.land/x/mongo@v0.23.1/src/collection/commands/aggregate.ts": "9ed10eacbdcd61c020d91b831d4bffa75afd3c4c272fa69e1aaf77bc339d526f", - "https://deno.land/x/mongo@v0.23.1/src/collection/commands/find.ts": "247e00d69efef7c6f33a82cb2055cc27e00e7e9dd5232a5cb9d6e65a64c1bbbe", - "https://deno.land/x/mongo@v0.23.1/src/collection/commands/listIndexes.ts": "d32a5120305d0547497026b4f5ab2ecc2f40ff7f44c405b99c2a0287765333f5", - "https://deno.land/x/mongo@v0.23.1/src/collection/commands/update.ts": "314eb06bf0fc50d0f4185031e516b99ab266f71afc605e9b273d04979f5650e2", - "https://deno.land/x/mongo@v0.23.1/src/collection/mod.ts": "bd791a0b9b46be4365f88c54893584eadec2f8cd799db9eb05e0b5b4c8d72b8e", - "https://deno.land/x/mongo@v0.23.1/src/database.ts": "2718c495e396df218f1a8292a678cf51c0a7c0a164e3250d5eebeff8b7b1ce0f", - "https://deno.land/x/mongo@v0.23.1/src/error.ts": "5018b430dcef3e09f31cb3a96297c206a324e3da4d3a293ff0c286b8ce75327b", - "https://deno.land/x/mongo@v0.23.1/src/protocol/cursor.ts": "73ebe026761479110e04b608dfd185ed38e12d41997c02db661fe227c6b9633f", - "https://deno.land/x/mongo@v0.23.1/src/protocol/handshake.ts": "8319707b9139b583d727a986eb638d4379f48912bad1d0c1280834d288a5a7ee", - "https://deno.land/x/mongo@v0.23.1/src/protocol/header.ts": "199644f421c3d8208365505c77af695fc03abb63d85328b531b8e3d2750d4265", - "https://deno.land/x/mongo@v0.23.1/src/protocol/message.ts": "302cbbff1f0de54853b5466e57421a152e95b148b89bbe88d65da8327508f631", - "https://deno.land/x/mongo@v0.23.1/src/protocol/mod.ts": "4e24d563049c0a236234598ca786ca13778dc17fdb80ac543ac6c75d0c5094d7", - "https://deno.land/x/mongo@v0.23.1/src/protocol/protocol.ts": "2abd44cfbf7cd72a4d466500b5edeecdff7b922667739787c5c3e122eb06139e", - "https://deno.land/x/mongo@v0.23.1/src/types.ts": "bad2dc5c22eb089420d0737c510f9bf0dfffcdf17bffbf1a2f270b1ccb986c26", - "https://deno.land/x/mongo@v0.23.1/src/utils/bson.ts": "29136bc16b8327ecc8ddabbd82c0ceb65038c24d603b9d0f04b5aa5668d1a108", - "https://deno.land/x/mongo@v0.23.1/src/utils/ns.ts": "fb0c57b8dc4d31f8993112d267dec3c163d3e8862198d1cd03b2b51bcc3caad9", - "https://deno.land/x/mongo@v0.23.1/src/utils/saslprep/deps.ts": "95ceb81b353110526dacf2a98854bc79d6e17d7f173af8806e91c05555d7b8c7", - "https://deno.land/x/mongo@v0.23.1/src/utils/saslprep/loadCodePoints.ts": "c574e36e1805ea338257a0113bebec1c02a8b90f9e9eb4250f140c8de5da1a38", - "https://deno.land/x/mongo@v0.23.1/src/utils/saslprep/memory_pager.ts": "6a8a157fd4b355e59058baa323c4c10a95065ff28218c69f25a0bf2c64154178", - "https://deno.land/x/mongo@v0.23.1/src/utils/saslprep/mod.ts": "3a01678204d6a3179df82ab260f5f4ddfb788a251efba2c28120461847c4afce", - "https://deno.land/x/mongo@v0.23.1/src/utils/saslprep/sparse_bitfield.ts": "fd18ef15e23e9bc66eca0f70ef0e72914d33c26af6efaad431c0b0562cb24ddf", - "https://deno.land/x/mongo@v0.23.1/src/utils/srv.ts": "0957783eb4d3f44b775e576fe993bf3f08b7343c1cad3435fc9b5eaa818ae218", - "https://deno.land/x/mongo@v0.23.1/src/utils/uri.ts": "8d02caff324592851fc8ca926d28bc21a0425baa8bf01e7d8279b5ce8e1925f4", - "https://deno.land/x/oak@v7.7.0/application.ts": "5d924b7d18fbe29e59698d314b53a554b4eaf12d237380fe0f32311b4baf6157", - "https://deno.land/x/oak@v7.7.0/async_iterable_reader.ts": "c227ea777f7afdfe85f09be5eafca40a0828de45bde95e87615f0463e58255c1", - "https://deno.land/x/oak@v7.7.0/body.ts": "7a96b6f19f1f7707bbdbbfb274335f41d0978ed51dc293414e3264e9a9e83664", - "https://deno.land/x/oak@v7.7.0/buf_reader.ts": "69e0fee4bcee06d955123344e1e9395ea0fc1e0d1d48845dd334d9e2e4d39f82", - "https://deno.land/x/oak@v7.7.0/content_disposition.ts": "8b8c3cb2fba7138cd5b7f82fc3b5ea39b33db924a824b28261659db7e164621e", - "https://deno.land/x/oak@v7.7.0/context.ts": "38e85b5cfbbbfc912f2a791ab9efd8f2517591d5f80314d7a080f529e4fed16b", - "https://deno.land/x/oak@v7.7.0/cookies.ts": "161992e2a02cb078f3366c61b0dd560894131dc01a690bdc300cb91fcda34c86", - "https://deno.land/x/oak@v7.7.0/deps.ts": "599d6c0a8da1eccd679ae7baac8bad65c52d0af8234c25bb264325dd04620ba0", - "https://deno.land/x/oak@v7.7.0/etag.ts": "58d6ff25d043d3645116b23af51d2bc36d99c45b8ad4a6119efd7b654b467523", - "https://deno.land/x/oak@v7.7.0/headers.ts": "50b809d5f311837f49344f6622bfbe24c57e64cd788bfb8d66ac826d304e6c3a", - "https://deno.land/x/oak@v7.7.0/helpers.ts": "c1cd593a85d294bf4d6c19c7b38c5a0951915114a6b9b0081a6dfb3aa9f83a42", - "https://deno.land/x/oak@v7.7.0/httpError.ts": "0b417a40b8cd39be7595ae11ca3b20ce8f01a6ac2f2977fa1c297c881e1d1366", - "https://deno.land/x/oak@v7.7.0/http_server_native.ts": "6da226420920dda3b99974aa5c7e9a7b30560eca83ff207420f660bacd3fc0d9", - "https://deno.land/x/oak@v7.7.0/http_server_std.ts": "0c97323f22e844723c17b2ffde1dfaafd2edc5acb04b70974a31150a6835c0c4", - "https://deno.land/x/oak@v7.7.0/isMediaType.ts": "e7457f8c14245a7bb9a3a48000d50e112bb6fcafeab8fd7bcff16363a0cd8687", - "https://deno.land/x/oak@v7.7.0/keyStack.ts": "d916271673d91f3816fa856afaa456422c67ccebfe6391b62d4541f2d5cf879d", - "https://deno.land/x/oak@v7.7.0/mediaTyper.ts": "042b853fc8e9c3f6c628dd389e03ef481552bf07242efc3f8a1af042102a6105", - "https://deno.land/x/oak@v7.7.0/middleware.ts": "073665130709d495e058c68d67dbf09161d2a4a0ce2a8b4614f13f96e21a22cd", - "https://deno.land/x/oak@v7.7.0/middleware/proxy.ts": "3e03143039409b55b535a5c99defb27ead220ef9b8cf75459e3eaefcfcfe373e", - "https://deno.land/x/oak@v7.7.0/mod.ts": "fc6a57694d15de265944cae1685c28a6f6475ee041cd1c82a83c6abf4c001881", - "https://deno.land/x/oak@v7.7.0/multipart.ts": "e19a58bd71ef5ae99f6a8f64fa4fe0d43d3082de3cbde1c51841548d63b20a3d", - "https://deno.land/x/oak@v7.7.0/negotiation/charset.ts": "b4c2e0c49dd5122f130f95bf29508448d983c424801b5bc304b00288b5ae3195", - "https://deno.land/x/oak@v7.7.0/negotiation/common.ts": "f54d599d37408005f8c565d0f6505de51fed31feaa3654a7758e2359c006b02c", - "https://deno.land/x/oak@v7.7.0/negotiation/encoding.ts": "60eb0fc3df57cc39eaa739e0e9e2cda6c20b3aa429d1a0108f503065f5709bbe", - "https://deno.land/x/oak@v7.7.0/negotiation/language.ts": "62ef13ea3146538dd52a4666611bd423ebb9a6438e7312398e17a4d16dbafb51", - "https://deno.land/x/oak@v7.7.0/negotiation/mediaType.ts": "7e25cc34600beea3bf0b0879ff1783c752260fcb517dffea2e122830c36e8451", - "https://deno.land/x/oak@v7.7.0/range.ts": "f3ea2dedeb111c29ae5848e7092984c262432167b7e96d40244037dcee6cd937", - "https://deno.land/x/oak@v7.7.0/request.ts": "10a0765ba68dbaebb19d57d891038eb8a089d0f1d4a6c44bbfdb1090ba1e9298", - "https://deno.land/x/oak@v7.7.0/response.ts": "41f5e60b922d0dae2b100e7b7097b81c8ec436766993f5df455ba5522ff736da", - "https://deno.land/x/oak@v7.7.0/router.ts": "a20b5c35ea2520767bf6e260e0b1b430e5045afa3cc69f8e8cbea363a7659eb3", - "https://deno.land/x/oak@v7.7.0/send.ts": "e32350e03831221412d801177739f9a9024846c55777ae90a1f2fcd028876cc0", - "https://deno.land/x/oak@v7.7.0/server_sent_event.ts": "90844f9c01f62f16f367bd4701006f434e80fde89751cdda980a1976d902b2c4", - "https://deno.land/x/oak@v7.7.0/structured_clone.ts": "8c94f87ced4fe3e70075d5e3a70e4251ed76a9292fec25115f045a19e6145734", - "https://deno.land/x/oak@v7.7.0/testing.ts": "68e125ed9dce1595dfa64a615272272dc89dad19966a0a652ff840bbc8e64c72", - "https://deno.land/x/oak@v7.7.0/tssCompare.ts": "3a07de58ecbe66083b5633b812b637a6c70c2542a874db6853feed5ef069bf5c", - "https://deno.land/x/oak@v7.7.0/types.d.ts": "9d960a9080c21c8d076dc9f5246db760ed2d8baf0785db5dd467689fca399929", - "https://deno.land/x/oak@v7.7.0/util.ts": "bebdd66e5a75c82c3a5828b8556c9f952632580b252759cbe874b9e1188b88eb", - "https://deno.land/x/path_to_regexp@v6.2.0/index.ts": "e94c04a44bbecac99ff2db2d831afe98b423e627b775cb57fc7935f848c64c51" + "https://deno.land/x/djwt@v2.4/algorithm.ts": "c33b94d2fc82f5afc92a676ef61049dd86fc8445d9caefc60570372ad20c0016", + "https://deno.land/x/djwt@v2.4/deps.ts": "c86e2f5c16a943b7f8c1a451dc1aa62684188d5e1929afaa4433460a1936195b", + "https://deno.land/x/djwt@v2.4/mod.ts": "d7c0f05688a9bd9ee60a33c131dd9f9ae19f82852262eb119377a2a09036905f", + "https://deno.land/x/djwt@v2.4/signature.ts": "f79b4e521cd6a6dff28cd2779b1d9f2059f9e0822fb99c9f747ff34ae26532e4", + "https://deno.land/x/dotenv@v3.2.0/mod.ts": "077b48773de9205266a0b44c3c3a3c3083449ed64bb0b6cc461b95720678d38e", + "https://deno.land/x/dotenv@v3.2.0/util.ts": "693730877b13f8ead2b79b2aa31e2a0652862f7dc0c5f6d2f313f4d39c7b7670", + "https://deno.land/x/media_types@v3.0.2/mod.ts": "79e480ab73367a18f5753221bfee92657b9154f03790135bcdf75924f9884b22", + "https://deno.land/x/mongo@v0.29.3/deps.ts": "678e336e3eeba49aa41f350daf810582224bf68226d5210187117311842e6a80", + "https://deno.land/x/mongo@v0.29.3/mod.ts": "0989f34d08c40440b8786140abdaf863e964e23df5d1a80e661d3d4170d9d21e", + "https://deno.land/x/mongo@v0.29.3/src/auth/base.ts": "7fe14cf0a63d6bbc4ba69a000a04b3b184d26842504d94652a6af2d0c9494944", + "https://deno.land/x/mongo@v0.29.3/src/auth/mod.ts": "b161611bd5be9e9d1b4497227c8ea93ad4daadcd98038c9e5a707bc5da7a25ca", + "https://deno.land/x/mongo@v0.29.3/src/auth/pbkdf2.ts": "1f1db192fd37869d118ab34780b64567ebcf0ad83a03ef28b3d740cae9adb47a", + "https://deno.land/x/mongo@v0.29.3/src/auth/scram.ts": "187db02e94e7e5423ec902e87d6839028770dca57830dca7f154dcd22a959c0f", + "https://deno.land/x/mongo@v0.29.3/src/auth/x509.ts": "a75b27c549707dd441434ae400a3e6a24da7fe7d4e0e80c9bb79dfc6426b651e", + "https://deno.land/x/mongo@v0.29.3/src/client.ts": "4d6113c76192f97848e1e859e911fee5cfa30b173b60861a40e08430eb87bf55", + "https://deno.land/x/mongo@v0.29.3/src/cluster.ts": "cff69bf284a5c7fcaff231494f1ab56ca652e725e58622723e402fbb61448d0e", + "https://deno.land/x/mongo@v0.29.3/src/collection/collection.ts": "4eb7746a8bb2016993a4c14e819432fc5c37bbe4a7982b1c2913e44290db808e", + "https://deno.land/x/mongo@v0.29.3/src/collection/commands/aggregate.ts": "440906a670adb46edb36fd95573ffa83f192775108b621520be992165910e895", + "https://deno.land/x/mongo@v0.29.3/src/collection/commands/find.ts": "5c3b750d8c82ce08d865a381bc71f600406cbc4912c4aa689238755579fb71f8", + "https://deno.land/x/mongo@v0.29.3/src/collection/commands/list_indexes.ts": "d32a5120305d0547497026b4f5ab2ecc2f40ff7f44c405b99c2a0287765333f5", + "https://deno.land/x/mongo@v0.29.3/src/collection/commands/update.ts": "cf352108a5dd34f0928c2196a432383d366b8ed292676c71358b9ecf1289418d", + "https://deno.land/x/mongo@v0.29.3/src/collection/mod.ts": "bd791a0b9b46be4365f88c54893584eadec2f8cd799db9eb05e0b5b4c8d72b8e", + "https://deno.land/x/mongo@v0.29.3/src/database.ts": "c808a41c71cf065e37fd1bca1a280373cd836c4f780f55ebe06b91e3e23efe36", + "https://deno.land/x/mongo@v0.29.3/src/error.ts": "8180a822b0831a94a6a28815865b5b40e3996220684bea60fcb81b272ddd06eb", + "https://deno.land/x/mongo@v0.29.3/src/gridfs/bucket.ts": "a4452d63f6928f57486a214a499b54b80b98cc0d13e3d85a6841b34d5ff12a61", + "https://deno.land/x/mongo@v0.29.3/src/gridfs/indexes.ts": "dd1cf956380f716b9192e9d4d819c0d856b42bed99275056a336cc3ef17f34e2", + "https://deno.land/x/mongo@v0.29.3/src/gridfs/upload.ts": "6a54a21b00c6f22ad0da6ceef7a2932dc600560f594c2551abd8e4a64976abae", + "https://deno.land/x/mongo@v0.29.3/src/protocol/cursor.ts": "c370a28856fa236129cc2d7abf7ebc4ac6cdd60acb93e0e7371433f7332394cb", + "https://deno.land/x/mongo@v0.29.3/src/protocol/handshake.ts": "3c3ba547d5322751b9756ce9a4750f3cf18febee0a64edca5b007634bd80e0fe", + "https://deno.land/x/mongo@v0.29.3/src/protocol/header.ts": "0f28db842f886e57b7013606c1391affab2e2960a1a4568d2502e7b788117716", + "https://deno.land/x/mongo@v0.29.3/src/protocol/message.ts": "b1121b98420c9a44783619c7a0b2f7bb2cb305dfc64adc3e6a9b7781f4d35a3a", + "https://deno.land/x/mongo@v0.29.3/src/protocol/mod.ts": "4e24d563049c0a236234598ca786ca13778dc17fdb80ac543ac6c75d0c5094d7", + "https://deno.land/x/mongo@v0.29.3/src/protocol/protocol.ts": "92568dd86e6ef3f54054113d9f5620f158fc1dfee2a7c9d13623975835d5996a", + "https://deno.land/x/mongo@v0.29.3/src/types.ts": "6d53e4d241f5a7cb8fc8b9d750be19d85e51580b843535ab8f0c816a9f714e80", + "https://deno.land/x/mongo@v0.29.3/src/types/gridfs.ts": "e1fd12c3ca58d437267e7a8557d745d23b9d8916d1da34c1847e5e373728dfa0", + "https://deno.land/x/mongo@v0.29.3/src/types/read_write_concern.ts": "d00f35eb85520e776741888685d08d479766a19e9a0a970b53f4594c9db00496", + "https://deno.land/x/mongo@v0.29.3/src/utils/ns.ts": "fb0c57b8dc4d31f8993112d267dec3c163d3e8862198d1cd03b2b51bcc3caad9", + "https://deno.land/x/mongo@v0.29.3/src/utils/saslprep/deps.ts": "95ceb81b353110526dacf2a98854bc79d6e17d7f173af8806e91c05555d7b8c7", + "https://deno.land/x/mongo@v0.29.3/src/utils/saslprep/load_code_points.ts": "f6a4ef2eb2345eac40ffbf1a30661cca803f399865f2a0fadafb71f57d4c97bf", + "https://deno.land/x/mongo@v0.29.3/src/utils/saslprep/memory_pager.ts": "f55a79a13ec569c21630c3915a9af0c6fc0aa2b899121fa2a85a813c6dd4afba", + "https://deno.land/x/mongo@v0.29.3/src/utils/saslprep/mod.ts": "0a8a39a0784d065a79c54ce63d7d7b103d0b94addc5b7bcf985517ba2442c8a1", + "https://deno.land/x/mongo@v0.29.3/src/utils/saslprep/sparse_bitfield.ts": "07d6fe2ecd4ba5f711c44c1ae409bb9c1fe3a3cfc09e27434d231d4aae46dd2d", + "https://deno.land/x/mongo@v0.29.3/src/utils/srv.ts": "09c207069ea6fec02ddcd77c797171e556771dd940eb190a95cf4c7138e87baa", + "https://deno.land/x/mongo@v0.29.3/src/utils/uri.ts": "dcfab8e1dcfcc875c75ada1d9f366664480c03b65594990d6342ed88925452e5", + "https://deno.land/x/oak@v10.5.1/application.ts": "37a78bc0464fa677df5c290ee9a30de1e3da7c6e0ce6c2ff4a721455d5d47b6b", + "https://deno.land/x/oak@v10.5.1/body.ts": "80ef7b8e7bb6bd7907ecdfb9148bffdbde10f9d3be9336d84075038473f804a1", + "https://deno.land/x/oak@v10.5.1/buf_reader.ts": "7cf96aa0ac670b75098113cf88a291a68332cc45efa8a9698f064ac5b8098a0f", + "https://deno.land/x/oak@v10.5.1/content_disposition.ts": "8b8c3cb2fba7138cd5b7f82fc3b5ea39b33db924a824b28261659db7e164621e", + "https://deno.land/x/oak@v10.5.1/context.ts": "078306333a79f1010a49d5e9a05fca3dbc0c18fbda7610fa05400fa2e6eb9f95", + "https://deno.land/x/oak@v10.5.1/cookies.ts": "d9f94b99f26c6169c6982ce12323c41a548d001bfc28f464264c22dc3dbf2181", + "https://deno.land/x/oak@v10.5.1/deps.ts": "49d2150d6acc593f34700e76ecdfcf2f4bf59aa948c8f1123da63ed41ffaf2ea", + "https://deno.land/x/oak@v10.5.1/etag.ts": "19918f5e1964e3fe6c9fe524a88ffbf9900ce1dfe4146b187b2a86256bb6b663", + "https://deno.land/x/oak@v10.5.1/headers.ts": "9a28c40344e85be0877e192210f89d7de12fa3fc4e9c959f7480f6fc4006fcfe", + "https://deno.land/x/oak@v10.5.1/helpers.ts": "42212afa07a560b2958359cc19577417e89d9574d6579551a0af36ff7f00cc6e", + "https://deno.land/x/oak@v10.5.1/httpError.ts": "8368d20c2bbb1e97eab0f9de5752ed04217675b4b5f33862a4e0bde71a492096", + "https://deno.land/x/oak@v10.5.1/http_server_native.ts": "383295e11355161352d7ad384b976e257e3f6b2c4deb0ae972f7a28f697341fc", + "https://deno.land/x/oak@v10.5.1/http_server_native_request.ts": "07910ea2ed51af6c4e69addf9015cdd8d2b5c9ee03fd4993e386834a129a9eb6", + "https://deno.land/x/oak@v10.5.1/isMediaType.ts": "e7457f8c14245a7bb9a3a48000d50e112bb6fcafeab8fd7bcff16363a0cd8687", + "https://deno.land/x/oak@v10.5.1/keyStack.ts": "7594ef9ff4f9be12a4ad23471a5f8bcbdeb5c1ec8ff51229b47114176b5f280d", + "https://deno.land/x/oak@v10.5.1/mediaTyper.ts": "042b853fc8e9c3f6c628dd389e03ef481552bf07242efc3f8a1af042102a6105", + "https://deno.land/x/oak@v10.5.1/middleware.ts": "de14f045a2ddfe845d89b5d3140ff52cbcc6f3b3965391106ce04480f9786737", + "https://deno.land/x/oak@v10.5.1/middleware/proxy.ts": "b927232f97ec18af4185d7912e45b1191e3ffe24a9c875262ad524211b1274c9", + "https://deno.land/x/oak@v10.5.1/mod.ts": "7a1b5169ef702e96dd994168879dbcbd8af4f639578b6300cbe1c6995d7f3f32", + "https://deno.land/x/oak@v10.5.1/multipart.ts": "2daf24f8ed8b906ba55a631933b6b22353a80718b840d44d429e3333fb4d705a", + "https://deno.land/x/oak@v10.5.1/negotiation/charset.ts": "b4c2e0c49dd5122f130f95bf29508448d983c424801b5bc304b00288b5ae3195", + "https://deno.land/x/oak@v10.5.1/negotiation/common.ts": "f54d599d37408005f8c565d0f6505de51fed31feaa3654a7758e2359c006b02c", + "https://deno.land/x/oak@v10.5.1/negotiation/encoding.ts": "60eb0fc3df57cc39eaa739e0e9e2cda6c20b3aa429d1a0108f503065f5709bbe", + "https://deno.land/x/oak@v10.5.1/negotiation/language.ts": "62ef13ea3146538dd52a4666611bd423ebb9a6438e7312398e17a4d16dbafb51", + "https://deno.land/x/oak@v10.5.1/negotiation/mediaType.ts": "7e25cc34600beea3bf0b0879ff1783c752260fcb517dffea2e122830c36e8451", + "https://deno.land/x/oak@v10.5.1/range.ts": "d13898fcfc27f42309535f8e06ba522f51c811372c7d3bd657a957b52a481622", + "https://deno.land/x/oak@v10.5.1/request.ts": "50c16bd8f8adef03fbb280de8f23b8ea1927fa813bbc87041c35078ad74e70f1", + "https://deno.land/x/oak@v10.5.1/response.ts": "04d5faebf53d79f69a093332fb2180904e8c47d3666f60754b72ef8aca4cfef0", + "https://deno.land/x/oak@v10.5.1/router.ts": "21e9cd4c1d83c9a0848e5943074a5ea748932d8a5fee9ce528f8bd790eaf6483", + "https://deno.land/x/oak@v10.5.1/send.ts": "1e1766c9d2569af636315933fab46b35459893464a759c9a00ece9440eb0a992", + "https://deno.land/x/oak@v10.5.1/server_sent_event.ts": "948b0fe4cb3fe38c7db15e476eb3b7671ef20e566d130e9f701d7c0146aa47dd", + "https://deno.land/x/oak@v10.5.1/structured_clone.ts": "ecf42598652b8082f37252cb873d6e257ad728e6fe73c6bd61f343d94501fbde", + "https://deno.land/x/oak@v10.5.1/testing.ts": "5a2c53dd48e0b45994de668082d26dba4c2a0694f2ceeb1e7c68d5aca170c73f", + "https://deno.land/x/oak@v10.5.1/tssCompare.ts": "27f45f507ef21ba7b727b6c66b491543e6e1815c17194bf0b1d7a1ea5ab8027b", + "https://deno.land/x/oak@v10.5.1/types.d.ts": "a952d39b03215604c12d13688ed868986591e9ea4db831e18df7021fde50d9d3", + "https://deno.land/x/oak@v10.5.1/util.ts": "aeacf93c19afd01598584262589afbb2f9dfe6248c195c1a78c29373636afea2", + "https://deno.land/x/path_to_regexp@v6.2.0/index.ts": "e94c04a44bbecac99ff2db2d831afe98b423e627b775cb57fc7935f848c64c51", + "https://deno.land/x/web_bson@v0.1.10/deps.ts": "1fc81bbd1929aaf0c398d7cf88c0d6ce00d7b9a2eed1921c661e09f51dc39060", + "https://deno.land/x/web_bson@v0.1.10/mod.ts": "a2b58ed2e1748e6faa56fbe6caf0e1937f4e77de15376cad920aea655b17bcf3", + "https://deno.land/x/web_bson@v0.1.10/src/binary.ts": "813c81aa01b7618c6f9e987f23cc861b5c49312ad0c69cab72100f391dc49853", + "https://deno.land/x/web_bson@v0.1.10/src/bson.ts": "a53f79dff04f2b60f5b0f849ff419ef5d15c0021c9478fe4b88c9661f1b7db79", + "https://deno.land/x/web_bson@v0.1.10/src/code.ts": "21c33fbc1e38e78af8aef3603bde27cc552da8cdfd5fe5133c747114abaa39c2", + "https://deno.land/x/web_bson@v0.1.10/src/constants.ts": "906fb45165e2df04332ffeb6a407b39d257b76ad64667ecfe4848bfc64934a5e", + "https://deno.land/x/web_bson@v0.1.10/src/db_ref.ts": "e2a825ed2f55e38e1d9536a91db4bd1d110571093a792c598f1560de248ae05d", + "https://deno.land/x/web_bson@v0.1.10/src/decimal128.ts": "0bf87a80a0aa7480e62ecbbd41ba8a7e78ab0504a7c5fabd6b11a6d21bb35252", + "https://deno.land/x/web_bson@v0.1.10/src/double.ts": "6b4929a44127ddc4918cc519ff5fdf128ae9b889a78dd330c07aa6374c3866ab", + "https://deno.land/x/web_bson@v0.1.10/src/error.ts": "d7aa0d57de5c6dc137402fc97219b6e136fc2dcddef90f031bdeb52181cc5275", + "https://deno.land/x/web_bson@v0.1.10/src/float_parser.ts": "bffe91eae89d9d177a88d795981681ecf05850facfb92da93901576a268235cd", + "https://deno.land/x/web_bson@v0.1.10/src/int_32.ts": "15ad35d75c891fd118701be93f13a79debb00e8076e8d0f2fd511fbc049b9a59", + "https://deno.land/x/web_bson@v0.1.10/src/key.ts": "371e2cf61fa0de9c4da32a72de8800f7c4aa017a8e0557567e896ec37c9bdf2b", + "https://deno.land/x/web_bson@v0.1.10/src/long.ts": "72601590f79f595c1b90283f9b1827c57f63b8f8fd4b75645dd74f5aeb177d56", + "https://deno.land/x/web_bson@v0.1.10/src/objectid.ts": "b5ab4278419d9ca39d2b3dda1bc80d1ac227ebe5acd1b16cc699a7867c261a32", + "https://deno.land/x/web_bson@v0.1.10/src/parser/calculate_size.ts": "ca1e81c793860c9200a3c6cfec220539524f81acca0d76738426bbf8ef857950", + "https://deno.land/x/web_bson@v0.1.10/src/parser/deserializer.ts": "a17c4661930e03db7dd0d865950bf95bac648ea507c9de60d0f325fe0010443f", + "https://deno.land/x/web_bson@v0.1.10/src/parser/serializer.ts": "88cfd83e435849c5cd70ac5b3d13a3b77e573a6e827943a0653102e4e5f6f375", + "https://deno.land/x/web_bson@v0.1.10/src/parser/utils.ts": "7bfe19aaf71164d8326f82c1e01dabe6140c18939f4bd8961380495a7c76f57f", + "https://deno.land/x/web_bson@v0.1.10/src/regexp.ts": "b0209125fb89d189e083037795b465ff890f852580d5400853c94075051cfc17", + "https://deno.land/x/web_bson@v0.1.10/src/symbol.ts": "cefccbd5fd2ab29a839521e329dfc98af89f998874459afd646be8c0c014dcaf", + "https://deno.land/x/web_bson@v0.1.10/src/timestamp.ts": "0bd0142670950ef3588071ecdcfae32494d647fde97215ac52803775349345fc", + "https://deno.land/x/web_bson@v0.1.10/src/uuid.ts": "0c535dedcc0f46b8e0f5fc4d086fb41fd42b83ce7c3e1a885b1991626fe7adeb", + "https://deno.land/x/web_bson@v0.1.10/src/uuid_utils.ts": "322cbea409a32cfdbffcae854b91bb30b80730741e032b98f5d6868ad63bc07d", + "https://deno.land/x/web_bson@v0.1.10/src/validate_utf8.ts": "b7f4d723c379fb66aa84e148bb59f78f4e1c96847e28c38ee7f9f3bf35703ae4", + "https://deno.land/x/web_bson@v0.1.10/utils.ts": "4c51c0be4bbb77c1e547eeef9b5aa53ffa611f628684875375103f627649ceb1", + "https://raw.githubusercontent.com/jshttp/mime-db/v1.52.0/db.json": "85c8e1ba609079947c8df83c092900ab0226e1d7b60e5e7105fb7dd701833263" } diff --git a/middlewares/validate.middleware.ts b/middlewares/validate.middleware.ts index d702fd8..438e71b 100644 --- a/middlewares/validate.middleware.ts +++ b/middlewares/validate.middleware.ts @@ -58,7 +58,7 @@ const checkValidation = async ( * @returns Promise */ export const validate = (schema: any) => - async (ctx: RouterContext, next: () => any): Promise => { + async (ctx: RouterContext, next: () => any): Promise => { const { params: _params, queries: _query, body: _body } = schema; const allQueries = [ { diff --git a/models/user_history.model.ts b/models/user_history.model.ts index 79c0f92..b7d541f 100644 --- a/models/user_history.model.ts +++ b/models/user_history.model.ts @@ -1,13 +1,14 @@ import db from "../db/db.ts"; export interface UserHistorySchema { - id: string; - name: string; - email: string; - password: string; - role: string; + _id?: string; + user: string; + name?: string; + email?: string; + password?: string; + role?: string; docVersion: number; - isDisabled: boolean; + isDisabled?: boolean; createdAt?: Date; updatedAt?: Date; } diff --git a/routers/user.router.ts b/routers/user.router.ts index 71532ac..349ee25 100644 --- a/routers/user.router.ts +++ b/routers/user.router.ts @@ -11,7 +11,8 @@ import { updateUserValidation, } from "../validations/user.validation.ts"; -const router: Router = new Router(); +// deno-lint-ignore no-explicit-any +const router: any = new Router(); router.post( "/api/users", diff --git a/services/token.service.ts b/services/token.service.ts index e5a565a..6b0ce83 100644 --- a/services/token.service.ts +++ b/services/token.service.ts @@ -1,5 +1,5 @@ import config from "../config/config.ts"; -import { Document, ObjectId, Status } from "../deps.ts"; +import { Bson, Status } from "../deps.ts"; import JwtHelper from "../helpers/jwt.helper.ts"; import { throwError } from "../middlewares/errorHandler.middleware.ts"; import { Token, TokenSchema } from "../models/token.model.ts"; @@ -12,7 +12,9 @@ class TokenService { * @param options Options: token, user, expires, type,blacklisted are accepted * @returns Promise Returns Mongodb Document */ - private static saveTokenService(options: TokenSchema): Promise { + private static saveTokenService( + options: TokenSchema, + ): Promise { const createdAt = new Date(); const { token, user, expires, type, blacklisted } = options; return Token.insertOne( @@ -38,26 +40,27 @@ class TokenService { type: "NotFound", }); } - const accessTokenExpires = config.jwtAccessExpiration; + const now = Date.now(); // in millis + const accessTokenExpires = (now + (config.jwtAccessExpiration * 1000)); const accessToken = await JwtHelper.getToken(accessTokenExpires, userId); - const refreshTokenExpires = config.jwtRefreshExpiration; + const refreshTokenExpires = (now + (config.jwtRefreshExpiration * 1000)); const refreshToken = await JwtHelper.getToken(refreshTokenExpires, userId); await this.saveTokenService({ token: refreshToken, user: userId, - expires: new Date(refreshTokenExpires * 1000), // milliseconds + expires: new Date(refreshTokenExpires), type: "refresh", blacklisted: false, }); return { access: { token: accessToken, - expires: new Date(accessTokenExpires * 1000), // milliseconds, + expires: new Date(accessTokenExpires), }, refresh: { token: refreshToken, - expires: new Date(refreshTokenExpires * 1000), // milliseconds, + expires: new Date(refreshTokenExpires), }, }; } @@ -132,7 +135,7 @@ class TokenService { }); } const deleteCount: number = await Token.deleteOne( - { _id: new ObjectId(id) }, + { _id: new Bson.ObjectId(id) }, ); if (!deleteCount) { return throwError({ diff --git a/services/user.service.ts b/services/user.service.ts index b8dbfe1..786113e 100644 --- a/services/user.service.ts +++ b/services/user.service.ts @@ -1,9 +1,12 @@ -import { Document, ObjectId, Status } from "../deps.ts"; +import { Bson, Status } from "../deps.ts"; import HashHelper from "../helpers/hash.helper.ts"; import { throwError } from "../middlewares/errorHandler.middleware.ts"; import log from "../middlewares/logger.middleware.ts"; import { User, UserSchema } from "../models/user.model.ts"; -import { UserHistory } from "../models/user_history.model.ts"; +import { + UserHistory, + UserHistorySchema, +} from "../models/user_history.model.ts"; import type { CreateUserStructure, UpdatedStructure, @@ -15,16 +18,16 @@ class UserService { /** * Create user Service * @param options - * @returns Promise Returns Mongo Document of user + * @returns Promise Returns Mongo Document of user or error */ public static async createUser( options: CreateUserStructure, - ): Promise { + ): Promise { const { name, email, password, role, isDisabled } = options; const hashedPassword = await HashHelper.encrypt(password); const createdAt = new Date(); - const user: Document = await User.insertOne( + const user: string | Bson.ObjectId = await User.insertOne( { name, email, @@ -39,7 +42,7 @@ class UserService { if (user) { await UserHistory.insertOne( { - id: user, + user: user as string, name, email, password: hashedPassword, @@ -78,7 +81,7 @@ class UserService { */ public static async getUser(id: string): Promise { const user: (UserSchema | undefined) = await User.findOne( - { _id: new ObjectId(id) }, + { _id: new Bson.ObjectId(id) }, ); if (!user) { log.error("User not found"); @@ -106,7 +109,7 @@ class UserService { options: UpdateUserStructure, ): Promise { const user: (UserSchema | undefined) = await User.findOne( - { _id: new ObjectId(id) }, + { _id: new Bson.ObjectId(id) }, ); if (!user) { log.error("User not found"); @@ -129,7 +132,7 @@ class UserService { upsertedCount: number; matchedCount: number; modifiedCount: number; - }) = await User.updateOne({ _id: new ObjectId(id) }, { + }) = await User.updateOne({ _id: new Bson.ObjectId(id) }, { $set: { name, role, @@ -139,15 +142,18 @@ class UserService { }, }); if (result) { - await UserHistory.insertOne( - { - id: new ObjectId(id), - name, - role, - isDisabled, - docVersion: newDocVersion, - }, - ); + const user: UserHistorySchema = { + user: id, + isDisabled: isDisabled === true, + docVersion: newDocVersion, + }; + if (name) { + user.name = name; + } + if (role) { + user.role = role; + } + await UserHistory.insertOne(user); } else { return throwError({ status: Status.BadRequest, @@ -169,7 +175,7 @@ class UserService { */ public static async removeUser(id: string): Promise { const user: (UserSchema | undefined) = await User.findOne( - { _id: new ObjectId(id) }, + { _id: new Bson.ObjectId(id) }, ); if (!user) { log.error("User not found"); @@ -182,14 +188,16 @@ class UserService { type: "NotFound", }); } - const deleteCount: number = await User.deleteOne({ _id: new ObjectId(id) }); + const deleteCount: number = await User.deleteOne({ + _id: new Bson.ObjectId(id), + }); if (deleteCount) { const { name, email, role, isDisabled, createdAt, docVersion } = user; const newDocVersion = docVersion + 1; const updatedAt = new Date(); await UserHistory.insertOne( { - id: new ObjectId(id), + user: id, name, email, role, diff --git a/types/types.interface.ts b/types/types.interface.ts index b6d7e1d..8f93c8c 100644 --- a/types/types.interface.ts +++ b/types/types.interface.ts @@ -1,4 +1,4 @@ -import type { ObjectId } from "../deps.ts"; +import { Bson } from "../deps.ts"; export interface TokenStructure { access: { expires: Date; token: string }; @@ -37,7 +37,7 @@ export interface UpdateUserStructure { export interface UpdatedStructure { matchedCount: number; modifiedCount: number; - upsertedId: typeof ObjectId | null; + upsertedId: typeof Bson.ObjectId | null; } export interface Err {