diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0592f61 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.github/ +coverage/ +dist/ +node_modules/ + +.env \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 71a950e..3b19439 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,20 +1,16 @@ { - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended" - ], - "overrides": [], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint" - ], - "rules": {} -} \ No newline at end of file + "env": { + "es2021": true, + "node": true + }, + "extends": ["standard-with-typescript", "prettier"], + "overrides": [], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "project": "./tsconfig.json" + }, + "rules": {}, + "ignorePatterns": ["coverage", "dist"] +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7c09b05 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,9 @@ +name: CI Pipeline + +on: pull_request + +jobs: + ci: + uses: TogetherCrew/operations/.github/workflows/ci.yml@main + secrets: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4c2198e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,11 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + ci: + uses: TogetherCrew/operations/.github/workflows/publish.ts.yml@main + secrets: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.gitignore b/.gitignore index 2e73cf6..952a89b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ src/config/dev.env src/config/test.env /node_modules -/lib +/dist /coverage /.nyc_output src/config/*.env diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3d33880 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +dist +coverage +node_modules \ No newline at end of file diff --git a/.prettierrc b/.prettierrc.json similarity index 97% rename from .prettierrc rename to .prettierrc.json index 4ddba9a..a0d1c9a 100644 --- a/.prettierrc +++ b/.prettierrc.json @@ -2,4 +2,4 @@ "printWidth": 120, "trailingComma": "all", "singleQuote": true -} \ No newline at end of file +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..132338a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM node:18-alpine AS base +WORKDIR /project +COPY . . +RUN npm ci + +FROM base AS test +CMD [ "npx", "jest", "--coverage" ] + +FROM base AS build +RUN npm run build + +FROM build AS prod +RUN npm ci --omit=dev +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/README.md b/README.md index 043eaf0..c7d2e60 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,37 @@ All interactions with DB +## Features + +### Linter + +The CI Pipeline uses [super-linter](https://github.com/super-linter/super-linter). You can run it locally with the following command: + +```bash +docker run -e RUN_LOCAL=true -e TYPESCRIPT_DEFAULT_STYLE=prettier -e VALIDATE_DOCKERFILE_HADOLINT=false -v $(pwd):/tmp/lint github/super-linter:slim-latest +``` + +Note: We have disabled HADOLINT for now as we are getting an error: `qemu: uncaught target signal 11 (Segmentation fault) - core dumped`. +======= [![Maintainability](https://api.codeclimate.com/v1/badges/52d516c2ad7c262adb37/maintainability)](https://codeclimate.com/github/RnDAO/tc-dbComm/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/52d516c2ad7c262adb37/test_coverage)](https://codeclimate.com/github/RnDAO/tc-dbComm/test_coverage) ## Schema for rawinfo +### Tests + +The CI Pipeline uses the `test` target from the Dockerfile to run the tests. You can run it locally with the following command: + +```bash +docker compose -f docker-compose.test.yml up --exit-code-from app --build ``` + +Note: This will create a /coverage folder where you can review the coverage details. + +## Schema for rawinfo + +```ts rawinfo { type: number, author: Snowflake, @@ -28,7 +52,7 @@ rawinfo { ### Schema for user -``` +```ts User { discordId: Snowflake, username?: string, @@ -50,8 +74,7 @@ User { ### Schema for heatmap -``` - +```ts HeatMap { date?: string,(format: "YYYY-MM-DD") thr_messages: Array, @@ -72,7 +95,7 @@ HeatMap { ### Schema for guildMembers -``` +```ts GuildMember { discordId: Snowflake, username: string, @@ -87,8 +110,7 @@ GuildMember { ### Schema for memberactivities -``` - +```ts memberactivities { date: Date, all_active: Array, @@ -112,8 +134,7 @@ memberactivities { ### Schema for channels -``` - +```ts Channels { channel: string, channelId: Snowflake, @@ -121,10 +142,9 @@ Channels { } ``` - ### Schema for token -``` +```ts Token { token: string, user: Snowflake, @@ -136,7 +156,7 @@ Token { ### Schema for guild -``` +```ts Guild { guildId: Snowflake, user: Snowflake, diff --git a/__tests__/unit/models/guildMember.model.test.ts b/__tests__/unit/models/guildMember.model.test.ts index 6d0a2fa..71ea0b0 100644 --- a/__tests__/unit/models/guildMember.model.test.ts +++ b/__tests__/unit/models/guildMember.model.test.ts @@ -1,6 +1,6 @@ import { GuildMember } from '../../../src/models'; import { IGuildMember } from '../../../src/interfaces/GuildMember.interface'; -import moment from "moment"; +import moment from 'moment'; describe('Account model', () => { describe('account validation', () => { @@ -10,10 +10,10 @@ describe('Account model', () => { discordId: '123', username: 'Behzad#11', roles: ['admin'], - joinedAt: moment("2022-02-01 08:30:26.127Z").toDate(), - avatar: "100", + joinedAt: moment('2022-02-01 08:30:26.127Z').toDate(), + avatar: '100', isBot: true, - discriminator: 'str' + discriminator: 'str', }; }); test('should correctly validate a valid guildMember data', async () => { diff --git a/__tests__/unit/models/heatMap.model.test.ts b/__tests__/unit/models/heatMap.model.test.ts index d781078..e07ef31 100644 --- a/__tests__/unit/models/heatMap.model.test.ts +++ b/__tests__/unit/models/heatMap.model.test.ts @@ -1,31 +1,36 @@ import { HeatMap } from '../../../src/models'; -import { IHeatMap } from '../../../src/interfaces/HeatMap.interface' +import { IHeatMap } from '../../../src/interfaces/HeatMap.interface'; describe('HeatMap model', () => { - describe('heatMap validation', () => { - let heatMap: IHeatMap; - beforeEach(() => { - heatMap = { - date: "2022-02-01", - thr_messages: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - lone_messages: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - replier: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - replied_per_acc: [{account: "Magic", count: 4}], - replied: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - mentioner: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - mentioner_per_acc: [{account: "Behzad", count: 4}, {account: "Magic", count: 2}], - mentioned: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - reacter: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - reacted_per_acc: [{account: "End", count: 2}, {account: "Magic", count: 2}], - reacted: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], - channelId: "123123123123", - account_name: "MagicPalm" - } - }); - - test('should correctly validate a valid heatMap', async () => { - await expect(new HeatMap(heatMap).validate()).resolves.toBeUndefined(); - }); + describe('heatMap validation', () => { + let heatMap: IHeatMap; + beforeEach(() => { + heatMap = { + date: '2022-02-01', + thr_messages: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + lone_messages: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + replier: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + replied_per_acc: [{ account: 'Magic', count: 4 }], + replied: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + mentioner: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + mentioner_per_acc: [ + { account: 'Behzad', count: 4 }, + { account: 'Magic', count: 2 }, + ], + mentioned: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + reacter: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + reacted_per_acc: [ + { account: 'End', count: 2 }, + { account: 'Magic', count: 2 }, + ], + reacted: [0, 1, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 2, 0, 4, 3, 1, 2, 0, 1, 0, 1, 0, 2], + channelId: '123123123123', + account_name: 'MagicPalm', + }; + }); + test('should correctly validate a valid heatMap', async () => { + await expect(new HeatMap(heatMap).validate()).resolves.toBeUndefined(); }); -}); \ No newline at end of file + }); +}); diff --git a/__tests__/unit/models/token.model.test.ts b/__tests__/unit/models/token.model.test.ts index 7485c38..38658e0 100644 --- a/__tests__/unit/models/token.model.test.ts +++ b/__tests__/unit/models/token.model.test.ts @@ -1,27 +1,26 @@ import { Token } from '../../../src/models'; -import { IToken } from '../../../src/interfaces/Token.interface' -import moment from "moment"; +import { IToken } from '../../../src/interfaces/Token.interface'; +import moment from 'moment'; describe('Token model', () => { - describe('Token validation', () => { - let token: IToken; - beforeEach(() => { - token = { - user: "681946187490000906", - token: "716384", - type: "access", - expires: moment("2022-02-01 08:30:26.127Z").toDate() - }; - }); - - test('should correctly validate a valid token', async () => { - await expect(new Token(token).validate()).resolves.toBeUndefined(); - }); + describe('Token validation', () => { + let token: IToken; + beforeEach(() => { + token = { + user: '1234', + token: '4321', + type: 'access', + expires: moment('2022-02-01 08:30:26.127Z').toDate(), + }; + }); - test('should throw a validation error if type is invalid', async () => { - token.type = 'invalidToken'; - await expect(new Token(token).validate()).rejects.toThrow(); - }); + test('should correctly validate a valid token', async () => { + await expect(new Token(token).validate()).resolves.toBeUndefined(); + }); + test('should throw a validation error if type is invalid', async () => { + token.type = 'invalidToken'; + await expect(new Token(token).validate()).rejects.toThrow(); }); -}); \ No newline at end of file + }); +}); diff --git a/__tests__/unit/models/user.model.test.ts b/__tests__/unit/models/user.model.test.ts index 7b35968..63ae0c1 100644 --- a/__tests__/unit/models/user.model.test.ts +++ b/__tests__/unit/models/user.model.test.ts @@ -1,22 +1,22 @@ import { User } from '../../../src/models'; -import { IUser } from '../../../src/interfaces/User.interface' +import { IUser } from '../../../src/interfaces/User.interface'; describe('User model', () => { - describe('User validation', () => { - let user: IUser; - beforeEach(() => { - user = { - discordId: "681946187490000906", - }; - }); + describe('User validation', () => { + let user: IUser; + beforeEach(() => { + user = { + discordId: '1234', + }; + }); - test('should correctly validate a valid user', async () => { - await expect(new User(user).validate()).resolves.toBeUndefined(); - }); + test('should correctly validate a valid user', async () => { + await expect(new User(user).validate()).resolves.toBeUndefined(); + }); - test('should throw a validation error if email is invalid', async () => { - user.email = 'invalidEmail'; - await expect(new User(user).validate()).rejects.toThrow(); - }); + test('should throw a validation error if email is invalid', async () => { + user.email = 'invalidEmail'; + await expect(new User(user).validate()).rejects.toThrow(); }); -}); \ No newline at end of file + }); +}); diff --git a/docker-compose.test.yml b/docker-compose.test.yml new file mode 100644 index 0000000..8157439 --- /dev/null +++ b/docker-compose.test.yml @@ -0,0 +1,10 @@ +version: '3.9' + +services: + app: + build: + context: . + target: test + dockerfile: Dockerfile + volumes: + - ./coverage:/project/coverage diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 247ad09..0000000 --- a/jest.config.js +++ /dev/null @@ -1,9 +0,0 @@ -// eslint-disable-next-line no-undef -module.exports = { - preset: 'ts-jest', - transform: { - '^.+\\.(ts|tsx)?$': 'ts-jest', - "^.+\\.(js|jsx)$": "babel-jest", - }, - modulePathIgnorePatterns: ["utils", "fixtures"] -}; diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 0000000..3745fc2 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,5 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', +}; diff --git a/package-lock.json b/package-lock.json index 74eb6e0..54c192f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,12 +20,18 @@ "devDependencies": { "@types/jest": "^29.4.0", "@types/node": "^18.11.18", - "@types/validator": "^13.7.10", + "@types/validator": "^13.7.17", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "env-cmd": "^10.1.0", "eslint": "^8.30.0", + "eslint-config-prettier": "^8.8.0", + "eslint-config-standard-with-typescript": "^34.0.1", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-n": "^15.7.0", + "eslint-plugin-promise": "^6.1.1", "jest": "^29.3.1", + "prettier": "2.8.8", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typescript": "^4.9.4" @@ -2547,6 +2553,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/mongoose-unique-validator": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/@types/mongoose-unique-validator/-/mongoose-unique-validator-1.0.7.tgz", @@ -2579,9 +2591,9 @@ "dev": true }, "node_modules/@types/validator": { - "version": "13.7.14", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.14.tgz", - "integrity": "sha512-J6OAed6rhN6zyqL9Of6ZMamhlsOEU/poBVvbHr/dKOYKTeuYYMlDkMv+b6UUV0o2i0tw73cgyv/97WTWaUl0/g==", + "version": "13.7.17", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", + "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==", "dev": true }, "node_modules/@types/webidl-conversions": { @@ -2931,6 +2943,38 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -2940,6 +2984,54 @@ "node": ">=8" } }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/babel-jest": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", @@ -3173,6 +3265,15 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/busboy": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", @@ -3184,6 +3285,19 @@ "node": ">=10.16.0" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3394,6 +3508,22 @@ "node": ">=0.10.0" } }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3522,6 +3652,94 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-abstract": { + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", + "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.0", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3600,6 +3818,247 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-prettier": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", + "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-config-standard": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz", + "integrity": "sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peerDependencies": { + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0" + } + }, + "node_modules/eslint-config-standard-with-typescript": { + "version": "34.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-34.0.1.tgz", + "integrity": "sha512-J7WvZeLtd0Vr9F+v4dZbqJCLD16cbIy4U+alJMq4MiXdpipdBM3U5NkXaGUjePc4sb1ZE01U9g6VuTBpHHz1fg==", + "dev": true, + "dependencies": { + "@typescript-eslint/parser": "^5.43.0", + "eslint-config-standard": "17.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.43.0", + "eslint": "^8.0.1", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0", + "typescript": "*" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-es": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", + "integrity": "sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.0.0", + "regexpp": "^3.0.0" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=4.19.1" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.27.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", + "has": "^1.0.3", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-n": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz", + "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==", + "dev": true, + "dependencies": { + "builtins": "^5.0.1", + "eslint-plugin-es": "^4.1.0", + "eslint-utils": "^3.0.0", + "ignore": "^5.1.1", + "is-core-module": "^2.11.0", + "minimatch": "^3.1.2", + "resolve": "^1.22.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-promise": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz", + "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -3613,6 +4072,33 @@ "node": ">=8.0.0" } }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-visitor-keys": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", @@ -3939,6 +4425,15 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3965,6 +4460,33 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -3983,6 +4505,21 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -4004,6 +4541,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -4051,6 +4604,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -4071,6 +4639,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -4095,6 +4675,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4104,6 +4693,57 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -4206,17 +4846,85 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", @@ -4229,6 +4937,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4268,6 +4991,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4277,6 +5012,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -4286,6 +5036,34 @@ "node": ">=8" } }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -4298,6 +5076,67 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5213,6 +6052,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/moment": { "version": "2.29.4", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", @@ -5355,6 +6203,59 @@ "node": ">=8" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5619,6 +6520,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", @@ -5736,6 +6652,35 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5868,6 +6813,20 @@ } ] }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/saslprep": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", @@ -5934,6 +6893,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/sift": { "version": "16.0.1", "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", @@ -6080,6 +7053,51 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -6333,6 +7351,39 @@ } } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", @@ -6392,6 +7443,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -6405,6 +7470,21 @@ "node": ">=4.2.0" } }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici": { "version": "5.21.0", "resolved": "https://registry.npmjs.org/undici/-/undici-5.21.0.tgz", @@ -6543,6 +7623,42 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index 4a90c28..120b24f 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,14 @@ { - "name": "tc_dbcomm", - "version": "2.3.0", + "name": "@togethercrew.dev/db", + "version": "2.3.1", "description": "All interactions with DB", - "main": "./lib/index.js", + "main": "./dist/index.js", "scripts": { "build": "tsc", - "start": "node ./lib/index.js", + "start": "node ./dist/index.js", "dev": "nodemon ./src/magic.ts", "test": "jest --detectOpenHandles", "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", - "prepare": "npm run build", "prepublishOnly": "npm test", "version": "npm run format && git add -A src", "postversion": "git push && git push --tags" @@ -25,7 +24,6 @@ }, "homepage": "https://github.com/RnDAO/tc-dbComm#readme", "dependencies": { - "@types/mongoose-unique-validator": "^1.0.6", "discord.js": "^14.7.1", "joi": "^17.7.0", "moment": "^2.29.4", @@ -35,18 +33,25 @@ }, "devDependencies": { "@types/jest": "^29.4.0", + "@types/mongoose-unique-validator": "^1.0.6", "@types/node": "^18.11.18", - "@types/validator": "^13.7.10", + "@types/validator": "^13.7.17", "@typescript-eslint/eslint-plugin": "^5.47.1", "@typescript-eslint/parser": "^5.47.1", "env-cmd": "^10.1.0", "eslint": "^8.30.0", + "eslint-config-prettier": "^8.8.0", + "eslint-config-standard-with-typescript": "^34.0.1", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-n": "^15.7.0", + "eslint-plugin-promise": "^6.1.1", "jest": "^29.3.1", + "prettier": "2.8.8", "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typescript": "^4.9.4" }, "files": [ - "lib/**/*" + "dist/**/*" ] -} \ No newline at end of file +} diff --git a/src/index.ts b/src/index.ts index cbdb7cc..9af7d12 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,13 @@ import { User, Token, Guild, HeatMap, RawInfo, MemberActivity } from './models'; -import { guildMemberSchema, guildSchema, heatMapSchema, MemberActivitySchema, rawInfoSchema, tokenSchema, userSchema } from './models/schemas'; +import { + guildMemberSchema, + guildSchema, + heatMapSchema, + MemberActivitySchema, + rawInfoSchema, + tokenSchema, + userSchema, +} from './models/schemas'; import { IDiscordGuild, IDiscordOathBotCallback, @@ -14,10 +22,7 @@ import { IGuildMember, IGuildMemberUpdateBody, GuildMemberModel } from './interf import { IRawInfo, IRawInfoUpdateBody, RawInfoModel } from './interfaces/RawInfo.interface'; import { IMemberActivity, MemberActivityModel } from './interfaces/MemberActivity.interface'; -import { - databaseService, - heatmapService, -} from './service'; +import { databaseService, heatmapService } from './service'; export { User, @@ -56,5 +61,5 @@ export { MemberActivitySchema, rawInfoSchema, tokenSchema, - userSchema + userSchema, }; diff --git a/src/interfaces/Discord.interface.ts b/src/interfaces/Discord.interface.ts index 334e9f9..818a135 100644 --- a/src/interfaces/Discord.interface.ts +++ b/src/interfaces/Discord.interface.ts @@ -1,141 +1,104 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { Snowflake } from 'discord.js'; -import { IUser } from './User.interface'; +import { type Snowflake } from 'discord.js'; +import { type IUser } from './User.interface'; export interface IDiscordUser { - id: Snowflake; - username: string; - discriminator: string; - avatar: string | null; - bot?: boolean; - system?: boolean; - mfa_enabled?: boolean; - banner?: string | null; - accent_color?: number | null; - locale?: string; - verified?: boolean; - email?: string | null; - flags?: number; - premium_type?: number; - public_flags?: number; + id: Snowflake; + username: string; + discriminator: string; + avatar: string | null; + bot?: boolean; + system?: boolean; + mfa_enabled?: boolean; + banner?: string | null; + accent_color?: number | null; + locale?: string; + verified?: boolean; + email?: string | null; + flags?: number; + premium_type?: number; + public_flags?: number; } -export interface IDiscordGuild { - id: Snowflake; - name: string; - icon: string | null; - icon_hash?: string | null; - splash: string | null; - discovery_splash: string | null; - owner?: boolean; - owner_id: Snowflake; - permissions?: string; - region?: string | null; - afk_channel_id: Snowflake | null; - afk_timeout: number; - widget_enabled?: boolean; - widget_channel_id?: Snowflake | null; - verification_level: number; - default_message_notifications: number; - explicit_content_filter: number; - roles: Array; - emojis: Array; - features: Array; - application_id: Snowflake | null; - system_channel_id: Snowflake | null; - system_channel_flags: number; - rules_channel_id: Snowflake | null; - max_presences?: number | null; - max_members?: number; - vanity_url_code: string | null; - description: string | null; - banner: string | null; - premium_tier: number; - premium_subscription_count?: number; - preferred_locale: string; - public_updates_channel_id: Snowflake | null; - max_video_channel_users?: number; - approximate_member_count?: number; - approximate_presence_count?: number; - welcome_screen?: Record; - nsfw_level: number; - stickers?: Array; - premium_progress_bar_enabled: boolean; +export interface IDiscordGuild extends IDiscordCore { + id: Snowflake; + name: string; + icon: string | null; } -export interface IDiscordChannel { - id: Snowflake; - type: number; - guild_id?: Snowflake; - position?: number; - permission_overwrites?: Array; - name?: string | null; - topic?: string | null; - nsfw?: boolean; - last_message_id?: Snowflake | null; - bitrate?: number; - user_limit?: number; - - icon_hash?: string | null; - splash: string | null; - discovery_splash: string | null; - owner?: boolean; - owner_id: Snowflake; - permissions?: string; - region?: string | null; - afk_channel_id: Snowflake | null; - afk_timeout: number; - widget_enabled?: boolean; - widget_channel_id?: Snowflake | null; - verification_level: number; - default_message_notifications: number; - explicit_content_filter: number; - roles: Array; - emojis: Array; - features: Array; - application_id: Snowflake | null; - system_channel_id: Snowflake | null; - system_channel_flags: number; - rules_channel_id: Snowflake | null; - max_presences?: number | null; - max_members?: number; - vanity_url_code: string | null; - description: string | null; - banner: string | null; - premium_tier: number; - premium_subscription_count?: number; - preferred_locale: string; - public_updates_channel_id: Snowflake | null; - max_video_channel_users?: number; - approximate_member_count?: number; - approximate_presence_count?: number; - welcome_screen?: Record; - nsfw_level: number; - stickers?: Array; - premium_progress_bar_enabled: boolean; +export interface IDiscordChannel extends IDiscordCore { + id: Snowflake; + type: number; + guild_id?: Snowflake; + position?: number; + permission_overwrites?: any[]; + name?: string | null; + topic?: string | null; + nsfw?: boolean; + last_message_id?: Snowflake | null; + bitrate?: number; + user_limit?: number; } export interface IDiscordOathBotCallback { - access_token: string; - token_type: string; - expires_in: number; - refresh_token: string; - scope: string; - guild: IDiscordGuild; + access_token: string; + token_type: string; + expires_in: number; + refresh_token: string; + scope: string; + guild: IDiscordGuild; } export interface IDiscordGuildMember { - user?: IUser; - nick?: string; - avatar?: string; - roles: Snowflake[]; - joined_at: string; - premium_since?: string; - deaf: boolean; - mute: boolean; - flags: number; - pending?: boolean; - permissions?: string; - communication_disabled_until?: string; + user?: IUser; + nick?: string; + avatar?: string; + roles: Snowflake[]; + joined_at: string; + premium_since?: string; + deaf: boolean; + mute: boolean; + flags: number; + pending?: boolean; + permissions?: string; + communication_disabled_until?: string; } +interface IDiscordCore { + icon_hash?: string | null; + splash: string | null; + discovery_splash: string | null; + owner?: boolean; + owner_id: Snowflake; + permissions?: string; + region?: string | null; + afk_channel_id: Snowflake | null; + afk_timeout: number; + widget_enabled?: boolean; + widget_channel_id?: Snowflake | null; + verification_level: number; + default_message_notifications: number; + explicit_content_filter: number; + roles: any[]; + emojis: any[]; + features: any[]; + application_id: Snowflake | null; + system_channel_id: Snowflake | null; + system_channel_flags: number; + rules_channel_id: Snowflake | null; + max_presences?: number | null; + max_members?: number; + vanity_url_code: string | null; + description: string | null; + banner: string | null; + premium_tier: number; + premium_subscription_count?: number; + preferred_locale: string; + public_updates_channel_id: Snowflake | null; + max_video_channel_users?: number; + approximate_member_count?: number; + approximate_presence_count?: number; + welcome_screen?: Record; + nsfw_level: number; + stickers?: any[]; + premium_progress_bar_enabled: boolean; +} diff --git a/src/interfaces/Guild.interface.ts b/src/interfaces/Guild.interface.ts index 3685d74..043b1b2 100644 --- a/src/interfaces/Guild.interface.ts +++ b/src/interfaces/Guild.interface.ts @@ -1,5 +1,5 @@ -import { Snowflake } from 'discord.js'; -import { Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; export interface IGuild { guildId: Snowflake; @@ -16,24 +16,23 @@ export interface IGuild { isDisconnected: boolean; isInProgress: boolean; icon: string | null; - window?: Array; - action?: Array; + window?: number[]; + action?: number[]; } export interface IGuildUpdateBody { selectedChannels?: [ { - channelId: Snowflake, - channelName?: string, + channelId: Snowflake; + channelName?: string; }, ]; - period?: Date, - isDisconnected?: boolean, - isInProgress?: boolean, - icon?: string | null, + period?: Date; + isDisconnected?: boolean; + isInProgress?: boolean; + icon?: string | null; } export interface GuildModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/GuildMember.interface.ts b/src/interfaces/GuildMember.interface.ts index 4ebbfba..2cfee96 100644 --- a/src/interfaces/GuildMember.interface.ts +++ b/src/interfaces/GuildMember.interface.ts @@ -1,25 +1,24 @@ -import { Snowflake } from 'discord.js'; -import { Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; export interface IGuildMember { - discordId: Snowflake, - username: string, - avatar?: string | null, - roles: Snowflake[], - joinedAt: Date | null, - isBot?: boolean, - discriminator: string + discordId: Snowflake; + username: string; + avatar?: string | null; + roles: Snowflake[]; + joinedAt: Date | null; + isBot?: boolean; + discriminator: string; } export interface IGuildMemberUpdateBody { - username?: string, - avatar?: string | null, - roles?: Snowflake[], - discriminator?: string, - joinedAt?: Date | null + username?: string; + avatar?: string | null; + roles?: Snowflake[]; + discriminator?: string; + joinedAt?: Date | null; } export interface GuildMemberModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/HeatMap.interface.ts b/src/interfaces/HeatMap.interface.ts index 7cf353c..ea0abf3 100644 --- a/src/interfaces/HeatMap.interface.ts +++ b/src/interfaces/HeatMap.interface.ts @@ -1,24 +1,23 @@ -import { Model } from 'mongoose'; -import { Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; export interface IHeatMap { date?: string; - thr_messages?: Array; - lone_messages?: Array; - replier?: Array; + thr_messages?: number[]; + lone_messages?: number[]; + replier?: number[]; replied_per_acc: Array<{ account: string; count: number }>; - replied?: Array; - mentioner?: Array; + replied?: number[]; + mentioner?: number[]; mentioner_per_acc: Array<{ account: string; count: number }>; - mentioned?: Array; - reacter?: Array; + mentioned?: number[]; + reacter?: number[]; reacted_per_acc: Array<{ account: string; count: number }>; - reacted?: Array; + reacted?: number[]; channelId: Snowflake; account_name?: string; } export interface HeatMapModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/MemberActivity.interface.ts b/src/interfaces/MemberActivity.interface.ts index 5498f9a..a93a17d 100644 --- a/src/interfaces/MemberActivity.interface.ts +++ b/src/interfaces/MemberActivity.interface.ts @@ -1,26 +1,25 @@ -import { Model } from 'mongoose'; +import { type Model } from 'mongoose'; export interface IMemberActivity { date: Date; - all_active?: Array; - all_consistent?: Array; - all_vital?: Array; - all_connected?: Array; - all_paused?: Array; - all_new_disengaged?: Array; - all_disengaged?: Array; - all_unpaused?: Array; - all_returned?: Array; - all_new_active?: Array; - all_still_active?: Array; - all_joined?: Array; - all_dropped?: Array; - all_disengaged_were_newly_active?: Array; - all_disengaged_were_consistenly_active?: Array; - all_disengaged_were_vital?: Array; + all_active?: string[]; + all_consistent?: string[]; + all_vital?: string[]; + all_connected?: string[]; + all_paused?: string[]; + all_new_disengaged?: string[]; + all_disengaged?: string[]; + all_unpaused?: string[]; + all_returned?: string[]; + all_new_active?: string[]; + all_still_active?: string[]; + all_joined?: string[]; + all_dropped?: string[]; + all_disengaged_were_newly_active?: string[]; + all_disengaged_were_consistenly_active?: string[]; + all_disengaged_were_vital?: string[]; } export interface MemberActivityModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/RawInfo.interface.ts b/src/interfaces/RawInfo.interface.ts index b555bd9..c5001ee 100644 --- a/src/interfaces/RawInfo.interface.ts +++ b/src/interfaces/RawInfo.interface.ts @@ -1,5 +1,5 @@ -import { Model } from 'mongoose'; -import { Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; export interface IRawInfo { type: number, @@ -26,6 +26,5 @@ export interface IRawInfoUpdateBody { } export interface RawInfoModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/Token.interface.ts b/src/interfaces/Token.interface.ts index eddec1e..d18b463 100644 --- a/src/interfaces/Token.interface.ts +++ b/src/interfaces/Token.interface.ts @@ -1,5 +1,5 @@ -import { Snowflake } from 'discord.js'; -import { Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; export interface IToken { token: string; @@ -10,10 +10,9 @@ export interface IToken { } export interface ITokenUpdateBody { - blacklisted?: boolean + blacklisted?: boolean; } export interface TokenModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/User.interface.ts b/src/interfaces/User.interface.ts index eefdfc5..10c87ef 100644 --- a/src/interfaces/User.interface.ts +++ b/src/interfaces/User.interface.ts @@ -1,5 +1,5 @@ -import { Snowflake } from 'discord.js'; -import { Model } from 'mongoose'; +import { type Snowflake } from 'discord.js'; +import { type Model } from 'mongoose'; export interface IUser { discordId: Snowflake; @@ -20,12 +20,11 @@ export interface IUser { } export interface IUserUpdateBody { - avatar?: string, - email?: string, - verified?: boolean, + avatar?: string; + email?: string; + verified?: boolean; } export interface UserModel extends Model { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - paginate(filter: object, options: object): any; + paginate: (filter: object, options: object) => any; } diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index 4cc7305..bcc6bf6 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -1,7 +1,17 @@ -import { IGuild, IGuildUpdateBody } from './Guild.interface'; -import { IRawInfo } from './RawInfo.interface'; -import { IHeatMap } from './HeatMap.interface'; -import { IToken, ITokenUpdateBody } from './Token.interface'; -import { IMemberActivity } from './MemberActivity.interface'; -import { IGuildMember, IGuildMemberUpdateBody } from './GuildMember.interface'; -export { IGuild, IGuildUpdateBody, IRawInfo, IToken, ITokenUpdateBody, IHeatMap, IMemberActivity, IGuildMember, IGuildMemberUpdateBody }; +import { type IGuild, type IGuildUpdateBody } from './Guild.interface'; +import { type IRawInfo } from './RawInfo.interface'; +import { type IHeatMap } from './HeatMap.interface'; +import { type IToken, type ITokenUpdateBody } from './Token.interface'; +import { type IMemberActivity } from './MemberActivity.interface'; +import { type IGuildMember, type IGuildMemberUpdateBody } from './GuildMember.interface'; +export type { + IGuild, + IGuildUpdateBody, + IRawInfo, + IToken, + ITokenUpdateBody, + IHeatMap, + IMemberActivity, + IGuildMember, + IGuildMemberUpdateBody, +}; diff --git a/src/models/schemas/GuildMember.schema.ts b/src/models/schemas/GuildMember.schema.ts index cebe36a..7f66306 100644 --- a/src/models/schemas/GuildMember.schema.ts +++ b/src/models/schemas/GuildMember.schema.ts @@ -22,11 +22,11 @@ const guildMemberSchema = new Schema({ type: String, }, isBot: { - type: Boolean + type: Boolean, }, discriminator: { - type: String - } + type: String, + }, }); // Plugins diff --git a/src/models/schemas/MemberActivity.schema.ts b/src/models/schemas/MemberActivity.schema.ts index 434709c..448f9d0 100644 --- a/src/models/schemas/MemberActivity.schema.ts +++ b/src/models/schemas/MemberActivity.schema.ts @@ -1,59 +1,91 @@ import { Schema } from 'mongoose'; import { toJSON, paginate } from './plugins'; -import { IMemberActivity, MemberActivityModel } from '../../interfaces/MemberActivity.interface'; +import { type IMemberActivity, type MemberActivityModel } from '../../interfaces/MemberActivity.interface'; const MemberActivitySchema = new Schema({ date: { type: Date, }, - all_active: [{ - type: String - }], - all_consistent: [{ - type: String - }], - all_vital: [{ - type: String - }], - all_connected: [{ - type: String - }], - all_paused: [{ - type: String - }], - all_new_disengaged: [{ - type: String - }], - all_disengaged: [{ - type: String - }], - all_unpaused: [{ - type: String - }], - all_returned: [{ - type: String - }], - all_new_active: [{ - type: String - }], - all_still_active: [{ - type: String - }], - all_dropped: [{ - type: String - }], - all_joined: [{ - type: String - }], - all_disengaged_were_newly_active: [{ - type: String - }], - all_disengaged_were_consistenly_active: [{ - type: String - }], - all_disengaged_were_vital: [{ - type: String - }], + all_active: [ + { + type: String, + }, + ], + all_consistent: [ + { + type: String, + }, + ], + all_vital: [ + { + type: String, + }, + ], + all_connected: [ + { + type: String, + }, + ], + all_paused: [ + { + type: String, + }, + ], + all_new_disengaged: [ + { + type: String, + }, + ], + all_disengaged: [ + { + type: String, + }, + ], + all_unpaused: [ + { + type: String, + }, + ], + all_returned: [ + { + type: String, + }, + ], + all_new_active: [ + { + type: String, + }, + ], + all_still_active: [ + { + type: String, + }, + ], + all_dropped: [ + { + type: String, + }, + ], + all_joined: [ + { + type: String, + }, + ], + all_disengaged_were_newly_active: [ + { + type: String, + }, + ], + all_disengaged_were_consistenly_active: [ + { + type: String, + }, + ], + all_disengaged_were_vital: [ + { + type: String, + }, + ], }); // Plugins diff --git a/src/models/schemas/RawInfo.schema.ts b/src/models/schemas/RawInfo.schema.ts index 7de98e8..1e47a4c 100644 --- a/src/models/schemas/RawInfo.schema.ts +++ b/src/models/schemas/RawInfo.schema.ts @@ -1,6 +1,6 @@ import { Schema } from 'mongoose'; import { toJSON } from './plugins'; -import { IRawInfo } from '../../interfaces/RawInfo.interface'; +import { type IRawInfo } from '../../interfaces/RawInfo.interface'; import mongooseUniqueValidator from 'mongoose-unique-validator'; const rawInfoSchema = new Schema({ diff --git a/src/models/schemas/Token.schema.ts b/src/models/schemas/Token.schema.ts index 93165e6..77e61c5 100644 --- a/src/models/schemas/Token.schema.ts +++ b/src/models/schemas/Token.schema.ts @@ -1,7 +1,7 @@ import { Schema } from 'mongoose'; import { toJSON } from './plugins'; import { tokenTypes } from '../../config/tokens'; -import { IToken } from '../../interfaces/Token.interface'; +import { type IToken } from '../../interfaces/Token.interface'; const tokenSchema = new Schema( { diff --git a/src/models/schemas/User.schema.ts b/src/models/schemas/User.schema.ts index 85725de..03ddb01 100644 --- a/src/models/schemas/User.schema.ts +++ b/src/models/schemas/User.schema.ts @@ -1,7 +1,7 @@ import { Schema } from 'mongoose'; import validator from 'validator'; import { toJSON, paginate } from './plugins'; -import { IUser, UserModel } from '../../interfaces/User.interface'; +import { type IUser, type UserModel } from '../../interfaces/User.interface'; const userSchema = new Schema( { diff --git a/src/models/schemas/index.ts b/src/models/schemas/index.ts index 9b51c03..35dca72 100644 --- a/src/models/schemas/index.ts +++ b/src/models/schemas/index.ts @@ -6,12 +6,4 @@ import rawInfoSchema from './RawInfo.schema'; import MemberActivitySchema from './MemberActivity.schema'; import guildMemberSchema from './GuildMember.schema'; -export { - userSchema, - tokenSchema, - guildSchema, - heatMapSchema, - rawInfoSchema, - MemberActivitySchema, - guildMemberSchema, -}; +export { userSchema, tokenSchema, guildSchema, heatMapSchema, rawInfoSchema, MemberActivitySchema, guildMemberSchema }; diff --git a/src/service/guildMember.service.ts b/src/service/guildMember.service.ts index ed760bd..9660a7b 100644 --- a/src/service/guildMember.service.ts +++ b/src/service/guildMember.service.ts @@ -19,7 +19,6 @@ async function createGuildMembers(connection: Connection, guildMembers: IGuildMe return connection.models.GuildMember.insertMany(guildMembers.map((guildMember) => guildMember)); } - /** * update guildMember * @param {Object} filter diff --git a/src/service/index.ts b/src/service/index.ts index 087d7f8..d186da7 100644 --- a/src/service/index.ts +++ b/src/service/index.ts @@ -1,7 +1,4 @@ import databaseService from './database.service'; import heatmapService from './heatMap.service'; -export { - databaseService, - heatmapService, -}; +export { databaseService, heatmapService }; diff --git a/tsconfig.json b/tsconfig.json index be877ab..3c54e4c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,35 +1,13 @@ { - "compilerOptions": { - "module": "commonjs", - "declaration": true, - "removeComments": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "target": "es6", - "sourceMap": true, - "outDir": "./lib", - "baseUrl": "./", - "incremental": true, - "strict": true, - "noImplicitAny": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - }, - "include": [ - "src/**/*", - "__tests__/**/*", - "src/index.ts", - "src/connection.js.ts" - ], - "ts-node": { - "transpileOnly": true, - "files": true - }, - "exclude": [ - "./coverage", - "./lib", - "__tests__", - "jest.config.js" - ], -} \ No newline at end of file + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "outDir": "./dist", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "include": ["./src/**/*", "./__test__/**/*", ".eslintrc.json", "jest.config.ts"], + "exclude": ["./__test__/**/*", ".eslintrc.json", "jest.config.ts"] +} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index ff0c6e7..0000000 --- a/tslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": [ - "tslint:recommended", - "tslint-config-prettier" - ], - "rules": { - "array-type": false, - "no-console": false - } -} \ No newline at end of file