From 8cfcbafaceb4262bb9704ca91fda6cb1de823a38 Mon Sep 17 00:00:00 2001 From: kriptonian Date: Thu, 22 Feb 2024 19:17:32 +0530 Subject: [PATCH] fix: env in db migration --- .eslintignore | 1 - .eslintrc.json | 61 - .husky/pre-commit | 2 +- .turbo/cookies/1.cookie | 0 .turbo/cookies/10.cookie | 0 .turbo/cookies/11.cookie | 0 .turbo/cookies/12.cookie | 0 .turbo/cookies/13.cookie | 0 .turbo/cookies/14.cookie | 0 .turbo/cookies/15.cookie | 0 .turbo/cookies/16.cookie | 0 .turbo/cookies/17.cookie | 0 .turbo/cookies/18.cookie | 0 .turbo/cookies/19.cookie | 0 .turbo/cookies/2.cookie | 0 .turbo/cookies/20.cookie | 0 .turbo/cookies/21.cookie | 0 .turbo/cookies/22.cookie | 0 .turbo/cookies/23.cookie | 0 .turbo/cookies/24.cookie | 0 .turbo/cookies/25.cookie | 0 .turbo/cookies/26.cookie | 0 .turbo/cookies/27.cookie | 0 .turbo/cookies/28.cookie | 0 .turbo/cookies/29.cookie | 0 .turbo/cookies/3.cookie | 0 .turbo/cookies/30.cookie | 0 .turbo/cookies/31.cookie | 0 .turbo/cookies/32.cookie | 0 .turbo/cookies/33.cookie | 0 .turbo/cookies/34.cookie | 0 .turbo/cookies/35.cookie | 0 .turbo/cookies/36.cookie | 0 .turbo/cookies/37.cookie | 0 .turbo/cookies/38.cookie | 0 .turbo/cookies/39.cookie | 0 .turbo/cookies/4.cookie | 0 .turbo/cookies/40.cookie | 0 .turbo/cookies/41.cookie | 0 .turbo/cookies/42.cookie | 0 .turbo/cookies/43.cookie | 0 .turbo/cookies/44.cookie | 0 .turbo/cookies/45.cookie | 0 .turbo/cookies/46.cookie | 0 .turbo/cookies/47.cookie | 0 .turbo/cookies/48.cookie | 0 .turbo/cookies/49.cookie | 0 .turbo/cookies/5.cookie | 0 .turbo/cookies/50.cookie | 0 .turbo/cookies/51.cookie | 0 .turbo/cookies/52.cookie | 0 .turbo/cookies/53.cookie | 0 .turbo/cookies/54.cookie | 0 .turbo/cookies/55.cookie | 0 .turbo/cookies/56.cookie | 0 .turbo/cookies/57.cookie | 0 .turbo/cookies/58.cookie | 0 .turbo/cookies/59.cookie | 0 .turbo/cookies/6.cookie | 0 .turbo/cookies/7.cookie | 0 .turbo/cookies/8.cookie | 0 .turbo/cookies/9.cookie | 0 apps/api/.eslintrc.js | 25 + apps/api/.eslintrc.json | 18 - apps/api/.turbo/turbo-build.log | 5 + apps/api/.turbo/turbo-lint.log | 5 + apps/api/.turbo/turbo-test.log | 1302 +++++++++++++++++ apps/api/nest-cli.json | 9 + apps/api/package.json | 90 ++ apps/api/project.json | 103 -- .../dto/create.api-key/create.api-key.spec.ts | 8 +- .../dto/update.api-key/update.api-key.spec.ts | 8 +- apps/api/src/auth/guard/auth/auth.guard.ts | 3 + apps/api/src/common/create-key-pair.ts | 2 +- apps/api/src/common/decrypt.ts | 2 +- apps/api/src/common/encrypt.ts | 2 +- apps/api/src/common/fetch-events.ts | 2 +- .../src/common/query.transform.pipe.spec.ts | 8 +- .../create.environment.spec.ts | 8 +- .../update.environment.spec.ts | 8 +- .../dto/create.project/create.project.spec.ts | 8 +- .../dto/update.project/update.project.spec.ts | 8 +- .../dto/create.secret/create.secret.spec.ts | 8 +- .../dto/update.secret/update.secret.spec.ts | 8 +- .../create-workspace-role.spec.ts | 8 +- .../update-workspace-role.spec.ts | 8 +- .../create.workspace/create.workspace.spec.ts | 8 +- .../update.workspace/update.workspace.spec.ts | 8 +- apps/api/tsconfig.app.json | 2 +- apps/api/tsconfig.build.json | 4 + apps/api/tsconfig.json | 31 +- apps/api/tsconfig.spec.json | 2 +- apps/web/.eslintrc.js | 8 + apps/web/.eslintrc.json | 31 - apps/web/.turbo/turbo-build.log | 27 + apps/web/.turbo/turbo-lint.log | 6 + apps/web/app/api/hello/route.ts | 3 - apps/web/app/layout.tsx | 111 +- apps/web/app/page.tsx | 11 +- apps/web/components/Killers.tsx | 32 - apps/web/components/Links.tsx | 34 - apps/web/components/killers.tsx | 40 + apps/web/components/links.tsx | 32 + apps/web/next.config.js | 32 +- apps/web/package.json | 31 + apps/web/project.json | 60 - apps/web/tsconfig.json | 49 +- apps/web/tsconfig.spec.json | 21 - apps/workspace/.eslintrc.js | 8 + apps/workspace/.eslintrc.json | 31 - apps/workspace/.turbo/turbo-build.log | 29 + apps/workspace/.turbo/turbo-lint.log | 6 + apps/workspace/app/api/hello/route.ts | 3 - apps/workspace/app/global.css | 4 +- apps/workspace/app/layout.tsx | 14 +- apps/workspace/app/page.tsx | 2 +- apps/workspace/next.config.js | 31 +- apps/workspace/package.json | 30 + apps/workspace/tsconfig.json | 46 +- apps/workspace/tsconfig.spec.json | 21 - jest.config.ts | 5 - jest.preset.js | 2 - nx.json | 52 - package.json | 161 +- packages/eslint-config-custom/next.js | 42 + packages/eslint-config-custom/package.json | 11 + .../eslint-config-custom/react-internal.js | 39 + packages/sdk-node/src/keyshade.ts | 38 + packages/tsconfig/base.json | 21 + packages/tsconfig/nextjs.json | 21 + packages/tsconfig/package.json | 9 + packages/tsconfig/react-library.json | 11 + prettier.config.js | 3 + tsconfig.base.json | 26 - tsconfig.json | 3 + turbo.json | 27 + 136 files changed, 2108 insertions(+), 891 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.json create mode 100644 .turbo/cookies/1.cookie create mode 100644 .turbo/cookies/10.cookie create mode 100644 .turbo/cookies/11.cookie create mode 100644 .turbo/cookies/12.cookie create mode 100644 .turbo/cookies/13.cookie create mode 100644 .turbo/cookies/14.cookie create mode 100644 .turbo/cookies/15.cookie create mode 100644 .turbo/cookies/16.cookie create mode 100644 .turbo/cookies/17.cookie create mode 100644 .turbo/cookies/18.cookie create mode 100644 .turbo/cookies/19.cookie create mode 100644 .turbo/cookies/2.cookie create mode 100644 .turbo/cookies/20.cookie create mode 100644 .turbo/cookies/21.cookie create mode 100644 .turbo/cookies/22.cookie create mode 100644 .turbo/cookies/23.cookie create mode 100644 .turbo/cookies/24.cookie create mode 100644 .turbo/cookies/25.cookie create mode 100644 .turbo/cookies/26.cookie create mode 100644 .turbo/cookies/27.cookie create mode 100644 .turbo/cookies/28.cookie create mode 100644 .turbo/cookies/29.cookie create mode 100644 .turbo/cookies/3.cookie create mode 100644 .turbo/cookies/30.cookie create mode 100644 .turbo/cookies/31.cookie create mode 100644 .turbo/cookies/32.cookie create mode 100644 .turbo/cookies/33.cookie create mode 100644 .turbo/cookies/34.cookie create mode 100644 .turbo/cookies/35.cookie create mode 100644 .turbo/cookies/36.cookie create mode 100644 .turbo/cookies/37.cookie create mode 100644 .turbo/cookies/38.cookie create mode 100644 .turbo/cookies/39.cookie create mode 100644 .turbo/cookies/4.cookie create mode 100644 .turbo/cookies/40.cookie create mode 100644 .turbo/cookies/41.cookie create mode 100644 .turbo/cookies/42.cookie create mode 100644 .turbo/cookies/43.cookie create mode 100644 .turbo/cookies/44.cookie create mode 100644 .turbo/cookies/45.cookie create mode 100644 .turbo/cookies/46.cookie create mode 100644 .turbo/cookies/47.cookie create mode 100644 .turbo/cookies/48.cookie create mode 100644 .turbo/cookies/49.cookie create mode 100644 .turbo/cookies/5.cookie create mode 100644 .turbo/cookies/50.cookie create mode 100644 .turbo/cookies/51.cookie create mode 100644 .turbo/cookies/52.cookie create mode 100644 .turbo/cookies/53.cookie create mode 100644 .turbo/cookies/54.cookie create mode 100644 .turbo/cookies/55.cookie create mode 100644 .turbo/cookies/56.cookie create mode 100644 .turbo/cookies/57.cookie create mode 100644 .turbo/cookies/58.cookie create mode 100644 .turbo/cookies/59.cookie create mode 100644 .turbo/cookies/6.cookie create mode 100644 .turbo/cookies/7.cookie create mode 100644 .turbo/cookies/8.cookie create mode 100644 .turbo/cookies/9.cookie create mode 100644 apps/api/.eslintrc.js delete mode 100644 apps/api/.eslintrc.json create mode 100644 apps/api/.turbo/turbo-build.log create mode 100644 apps/api/.turbo/turbo-lint.log create mode 100644 apps/api/.turbo/turbo-test.log create mode 100644 apps/api/nest-cli.json create mode 100644 apps/api/package.json delete mode 100644 apps/api/project.json create mode 100644 apps/api/tsconfig.build.json create mode 100644 apps/web/.eslintrc.js delete mode 100644 apps/web/.eslintrc.json create mode 100644 apps/web/.turbo/turbo-build.log create mode 100644 apps/web/.turbo/turbo-lint.log delete mode 100644 apps/web/app/api/hello/route.ts delete mode 100644 apps/web/components/Killers.tsx delete mode 100644 apps/web/components/Links.tsx create mode 100644 apps/web/components/killers.tsx create mode 100644 apps/web/components/links.tsx create mode 100644 apps/web/package.json delete mode 100644 apps/web/project.json delete mode 100644 apps/web/tsconfig.spec.json create mode 100644 apps/workspace/.eslintrc.js delete mode 100644 apps/workspace/.eslintrc.json create mode 100644 apps/workspace/.turbo/turbo-build.log create mode 100644 apps/workspace/.turbo/turbo-lint.log delete mode 100644 apps/workspace/app/api/hello/route.ts create mode 100644 apps/workspace/package.json delete mode 100644 apps/workspace/tsconfig.spec.json delete mode 100644 jest.config.ts delete mode 100644 nx.json create mode 100644 packages/eslint-config-custom/next.js create mode 100644 packages/eslint-config-custom/package.json create mode 100644 packages/eslint-config-custom/react-internal.js create mode 100644 packages/sdk-node/src/keyshade.ts create mode 100644 packages/tsconfig/base.json create mode 100644 packages/tsconfig/nextjs.json create mode 100644 packages/tsconfig/package.json create mode 100644 packages/tsconfig/react-library.json create mode 100644 prettier.config.js delete mode 100644 tsconfig.base.json create mode 100644 tsconfig.json create mode 100644 turbo.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3c3629e6..00000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index f3f431e9..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "root": true, - "ignorePatterns": ["**/*"], - "plugins": ["@nx"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": { - "@nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { - "sourceTag": "*", - "onlyDependOnLibsWithTags": ["*"] - } - ] - } - ] - } - }, - { - "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nx/typescript"], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-unused-vars": "warn", - "@typescript-eslint/no-unused-expressions": "warn" - } - }, - { - "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nx/javascript"], - "rules": {} - }, - { - "files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], - "env": { - "jest": true - }, - "rules": {} - }, - { - "files": ["{package,project}.json"], - "parser": "jsonc-eslint-parser", - "rules": { - "@nx/dependency-checks": [ - "warn", - { - "checkMissingDependencies": true, - "checkObsoleteDependencies": true, - "checkVersionMismatches": true - } - ] - } - } - ] -} diff --git a/.husky/pre-commit b/.husky/pre-commit index dd83bc3e..c01c4ff8 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm run lint:fix && pnpm run prettier:fix && pnpm run test:api \ No newline at end of file +pnpm lint && pnpm test:api \ No newline at end of file diff --git a/.turbo/cookies/1.cookie b/.turbo/cookies/1.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/10.cookie b/.turbo/cookies/10.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/11.cookie b/.turbo/cookies/11.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/12.cookie b/.turbo/cookies/12.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/13.cookie b/.turbo/cookies/13.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/14.cookie b/.turbo/cookies/14.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/15.cookie b/.turbo/cookies/15.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/16.cookie b/.turbo/cookies/16.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/17.cookie b/.turbo/cookies/17.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/18.cookie b/.turbo/cookies/18.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/19.cookie b/.turbo/cookies/19.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/2.cookie b/.turbo/cookies/2.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/20.cookie b/.turbo/cookies/20.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/21.cookie b/.turbo/cookies/21.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/22.cookie b/.turbo/cookies/22.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/23.cookie b/.turbo/cookies/23.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/24.cookie b/.turbo/cookies/24.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/25.cookie b/.turbo/cookies/25.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/26.cookie b/.turbo/cookies/26.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/27.cookie b/.turbo/cookies/27.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/28.cookie b/.turbo/cookies/28.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/29.cookie b/.turbo/cookies/29.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/3.cookie b/.turbo/cookies/3.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/30.cookie b/.turbo/cookies/30.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/31.cookie b/.turbo/cookies/31.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/32.cookie b/.turbo/cookies/32.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/33.cookie b/.turbo/cookies/33.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/34.cookie b/.turbo/cookies/34.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/35.cookie b/.turbo/cookies/35.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/36.cookie b/.turbo/cookies/36.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/37.cookie b/.turbo/cookies/37.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/38.cookie b/.turbo/cookies/38.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/39.cookie b/.turbo/cookies/39.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/4.cookie b/.turbo/cookies/4.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/40.cookie b/.turbo/cookies/40.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/41.cookie b/.turbo/cookies/41.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/42.cookie b/.turbo/cookies/42.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/43.cookie b/.turbo/cookies/43.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/44.cookie b/.turbo/cookies/44.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/45.cookie b/.turbo/cookies/45.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/46.cookie b/.turbo/cookies/46.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/47.cookie b/.turbo/cookies/47.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/48.cookie b/.turbo/cookies/48.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/49.cookie b/.turbo/cookies/49.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/5.cookie b/.turbo/cookies/5.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/50.cookie b/.turbo/cookies/50.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/51.cookie b/.turbo/cookies/51.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/52.cookie b/.turbo/cookies/52.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/53.cookie b/.turbo/cookies/53.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/54.cookie b/.turbo/cookies/54.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/55.cookie b/.turbo/cookies/55.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/56.cookie b/.turbo/cookies/56.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/57.cookie b/.turbo/cookies/57.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/58.cookie b/.turbo/cookies/58.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/59.cookie b/.turbo/cookies/59.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/6.cookie b/.turbo/cookies/6.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/7.cookie b/.turbo/cookies/7.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/8.cookie b/.turbo/cookies/8.cookie new file mode 100644 index 00000000..e69de29b diff --git a/.turbo/cookies/9.cookie b/.turbo/cookies/9.cookie new file mode 100644 index 00000000..e69de29b diff --git a/apps/api/.eslintrc.js b/apps/api/.eslintrc.js new file mode 100644 index 00000000..259de13c --- /dev/null +++ b/apps/api/.eslintrc.js @@ -0,0 +1,25 @@ +module.exports = { + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + tsconfigRootDir: __dirname, + sourceType: 'module', + }, + plugins: ['@typescript-eslint/eslint-plugin'], + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + root: true, + env: { + node: true, + jest: true, + }, + ignorePatterns: ['.eslintrc.js'], + rules: { + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + }, +}; diff --git a/apps/api/.eslintrc.json b/apps/api/.eslintrc.json deleted file mode 100644 index 9d9c0db5..00000000 --- a/apps/api/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/apps/api/.turbo/turbo-build.log b/apps/api/.turbo/turbo-build.log new file mode 100644 index 00000000..24ad4599 --- /dev/null +++ b/apps/api/.turbo/turbo-build.log @@ -0,0 +1,5 @@ + + +> api@1.0.0 build /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/api +> nest build + diff --git a/apps/api/.turbo/turbo-lint.log b/apps/api/.turbo/turbo-lint.log new file mode 100644 index 00000000..859df3bb --- /dev/null +++ b/apps/api/.turbo/turbo-lint.log @@ -0,0 +1,5 @@ + + +> api@1.0.0 lint /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/api +> eslint "{src,apps,libs,test}/**/*.ts" --fix + diff --git a/apps/api/.turbo/turbo-test.log b/apps/api/.turbo/turbo-test.log new file mode 100644 index 00000000..7bab197e --- /dev/null +++ b/apps/api/.turbo/turbo-test.log @@ -0,0 +1,1302 @@ + + +> api@1.0.0 test /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/api +> jest "--config=jest.config.ts" + +Determining test suites to run... + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 0 s, estimated 8 s +████████████████████████████████████████             + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 0 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 1 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 2 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 3 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/auth/service/auth.service.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 3 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/auth/service/auth.service.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 0 of 41 total +Tests: 0 total +Snapshots: 0 total +Time: 3 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 1 passed, 1 of 41 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/secret/service/secret.service.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 1 passed, 1 of 41 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   ● Console + + console.info + secp256k1 unavailable, reverting to browser version + + at Object. (../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js:23:13) + + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/secret/service/secret.service.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 1 passed, 1 of 41 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/event/controller/event.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 2 passed, 2 of 41 total +Tests: 2 passed, 2 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/auth/controller/auth.controller.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/auth/controller/auth.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/event/controller/event.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 2 passed, 2 of 41 total +Tests: 2 passed, 2 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/event/controller/event.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 3 passed, 3 of 41 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/event/controller/event.controller.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/event/controller/event.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 3 passed, 3 of 41 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/project/dto/update.project/update.project.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/event/controller/event.controller.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/update.project/update.project.spec.ts + +Test Suites: 3 passed, 3 of 41 total +Tests: 3 passed, 3 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 5 passed, 5 of 41 total +Tests: 5 passed, 5 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/config/factory/github/github-strategy.factory.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/config/factory/github/github-strategy.factory.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 5 passed, 5 of 41 total +Tests: 5 passed, 5 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 6 passed, 6 of 41 total +Tests: 9 passed, 9 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 6 passed, 6 of 41 total +Tests: 9 passed, 9 total +Snapshots: 0 total +Time: 4 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 7 passed, 7 of 41 total +Tests: 3 failed, 12 passed, 15 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   FAIL   api  src/common/util.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 7 passed, 7 of 41 total +Tests: 3 failed, 12 passed, 15 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   ● Console + + console.info + secp256k1 unavailable, reverting to browser version + + at Object. (../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js:23:13) + + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 7 passed, 7 of 41 total +Tests: 3 failed, 12 passed, 15 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   ● util › should create a key pair + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:15:34) + + ● util › should encrypt and decrypt a string + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:22:34) + + ● util › should fail to encrypt and decrypt a string + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:30:34) + + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 7 passed, 7 of 41 total +Tests: 3 failed, 12 passed, 15 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + + RUNS   api  src/common/util.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/controller/workspace-role.controller.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 7 passed, 7 of 41 total +Tests: 3 failed, 12 passed, 15 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 1 failed, 8 passed, 9 of 41 total +Tests: 3 failed, 13 passed, 16 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 1 failed, 8 passed, 9 of 41 total +Tests: 3 failed, 13 passed, 16 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/secret/dto/create.secret/create.secret.spec.ts + + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/api-key/dto/update.api-key/update.api-key.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/secret/dto/create.secret/create.secret.spec.ts + +Test Suites: 1 failed, 8 passed, 9 of 41 total +Tests: 3 failed, 13 passed, 16 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 10 passed, 11 of 41 total +Tests: 3 failed, 15 passed, 18 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/api-key/controller/api-key.controller.spec.ts + + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 10 passed, 11 of 41 total +Tests: 3 failed, 15 passed, 18 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/secret/dto/update.secret/update.secret.spec.ts + + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/secret/dto/update.secret/update.secret.spec.ts + RUNS   api  src/api-key/controller/api-key.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 10 passed, 11 of 41 total +Tests: 3 failed, 15 passed, 18 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 12 passed, 13 of 41 total +Tests: 3 failed, 17 passed, 20 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace/service/workspace.service.spec.ts + + RUNS   api  src/workspace/service/workspace.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 12 passed, 13 of 41 total +Tests: 3 failed, 17 passed, 20 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/user/service/user.service.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 13 passed, 14 of 41 total +Tests: 3 failed, 18 passed, 21 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/api-key/service/api-key.service.spec.ts + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/user/service/user.service.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 13 passed, 14 of 41 total +Tests: 3 failed, 18 passed, 21 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/user/dto/update.user/update.user.spec.ts + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/user/service/user.service.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 13 passed, 14 of 41 total +Tests: 3 failed, 18 passed, 21 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/event/service/event.service.spec.ts + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/user/service/user.service.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 13 passed, 14 of 41 total +Tests: 3 failed, 18 passed, 21 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/user/service/user.service.spec.ts + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/event/service/event.service.spec.ts + RUNS   api  src/user/dto/update.user/update.user.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/user/service/user.service.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/api-key/service/api-key.service.spec.ts + +Test Suites: 1 failed, 13 passed, 14 of 41 total +Tests: 3 failed, 18 passed, 21 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/environment/service/environment.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/auth/guard/api-key/api-key.guard.spec.ts + RUNS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 17 passed, 18 of 41 total +Tests: 3 failed, 22 passed, 25 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + + RUNS   api  src/environment/service/environment.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/auth/guard/api-key/api-key.guard.spec.ts + RUNS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 17 passed, 18 of 41 total +Tests: 3 failed, 22 passed, 25 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/auth/guard/api-key/api-key.guard.spec.ts + + RUNS   api  src/environment/service/environment.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/auth/guard/api-key/api-key.guard.spec.ts + RUNS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 17 passed, 18 of 41 total +Tests: 3 failed, 22 passed, 25 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + + RUNS   api  src/environment/service/environment.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/auth/guard/api-key/api-key.guard.spec.ts + RUNS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 17 passed, 18 of 41 total +Tests: 3 failed, 22 passed, 25 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/environment/service/environment.service.spec.ts + + RUNS   api  src/environment/service/environment.service.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/auth/guard/api-key/api-key.guard.spec.ts + RUNS   api  src/config/oauth-strategy/github/github.strategy.spec.ts + RUNS   api  src/workspace/dto/update.workspace/update.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 17 passed, 18 of 41 total +Tests: 3 failed, 22 passed, 25 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/service/workspace-role.service.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/app/app.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 21 passed, 22 of 41 total +Tests: 3 failed, 27 passed, 30 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/auth/guard/auth/auth.guard.spec.ts + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/service/workspace-role.service.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/app/app.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/auth/guard/auth/auth.guard.spec.ts + +Test Suites: 1 failed, 21 passed, 22 of 41 total +Tests: 3 failed, 27 passed, 30 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/service/workspace-role.service.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/app/app.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 22 passed, 23 of 41 total +Tests: 3 failed, 28 passed, 31 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/app/app.controller.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/service/workspace-role.service.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/app/app.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 22 passed, 23 of 41 total +Tests: 3 failed, 28 passed, 31 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace-role/service/workspace-role.service.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/workspace-role/service/workspace-role.service.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/app/app.controller.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 22 passed, 23 of 41 total +Tests: 3 failed, 28 passed, 31 total +Snapshots: 0 total +Time: 5 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/create.project/create.project.spec.ts + +Test Suites: 1 failed, 24 passed, 25 of 41 total +Tests: 3 failed, 31 passed, 34 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/environment/controller/environment.controller.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/create.project/create.project.spec.ts + +Test Suites: 1 failed, 24 passed, 25 of 41 total +Tests: 3 failed, 31 passed, 34 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/create.project/create.project.spec.ts + +Test Suites: 1 failed, 24 passed, 25 of 41 total +Tests: 3 failed, 31 passed, 34 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/prisma/prisma.service.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/create.project/create.project.spec.ts + +Test Suites: 1 failed, 24 passed, 25 of 41 total +Tests: 3 failed, 31 passed, 34 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/project/dto/create.project/create.project.spec.ts + + RUNS   api  src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/prisma/prisma.service.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/environment/controller/environment.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + RUNS   api  src/project/dto/create.project/create.project.spec.ts + +Test Suites: 1 failed, 24 passed, 25 of 41 total +Tests: 3 failed, 31 passed, 34 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 28 passed, 29 of 41 total +Tests: 3 failed, 34 passed, 37 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/mail/services/resend.service.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 28 passed, 29 of 41 total +Tests: 3 failed, 34 passed, 37 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/environment/dto/create.environment/create.environment.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 28 passed, 29 of 41 total +Tests: 3 failed, 34 passed, 37 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 28 passed, 29 of 41 total +Tests: 3 failed, 34 passed, 37 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   PASS   api  src/auth/guard/admin/admin.guard.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/mail/services/resend.service.spec.ts + RUNS   api  src/workspace/dto/create.workspace/create.workspace.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/environment/dto/create.environment/create.environment.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 28 passed, 29 of 41 total +Tests: 3 failed, 34 passed, 37 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                                   + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 32 passed, 33 of 41 total +Tests: 3 failed, 38 passed, 41 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                             PASS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 32 passed, 33 of 41 total +Tests: 3 failed, 38 passed, 41 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                             PASS   api  src/common/query.transform.pipe.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 32 passed, 33 of 41 total +Tests: 3 failed, 38 passed, 41 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                             PASS   api  src/environment/dto/update.environment/update.environment.spec.ts + + RUNS   api  src/api-key/dto/create.api-key/create.api-key.spec.ts + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/environment/dto/update.environment/update.environment.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/common/query.transform.pipe.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 32 passed, 33 of 41 total +Tests: 3 failed, 38 passed, 41 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                             + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 35 passed, 36 of 41 total +Tests: 3 failed, 41 passed, 44 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                       PASS   api  src/user/controller/user.controller.spec.ts (6.225 s) + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 35 passed, 36 of 41 total +Tests: 3 failed, 41 passed, 44 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                       PASS   api  src/secret/controller/secret.controller.spec.ts (6.221 s) + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 35 passed, 36 of 41 total +Tests: 3 failed, 41 passed, 44 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                       ● Console + + console.info + secp256k1 unavailable, reverting to browser version + + at Object. (../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js:23:13) + + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/secret/controller/secret.controller.spec.ts + RUNS   api  src/user/controller/user.controller.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 35 passed, 36 of 41 total +Tests: 3 failed, 41 passed, 44 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                       + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 37 passed, 38 of 41 total +Tests: 3 failed, 43 passed, 46 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                   PASS   api  src/workspace/controller/workspace.controller.spec.ts (6.146 s) + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + RUNS   api  src/workspace/controller/workspace.controller.spec.ts + +Test Suites: 1 failed, 37 passed, 38 of 41 total +Tests: 3 failed, 43 passed, 46 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                   + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + +Test Suites: 1 failed, 38 passed, 39 of 41 total +Tests: 3 failed, 44 passed, 47 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                 PASS   api  src/project/service/project.service.spec.ts (6.651 s) + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + +Test Suites: 1 failed, 38 passed, 39 of 41 total +Tests: 3 failed, 44 passed, 47 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                 ● Console + + console.info + secp256k1 unavailable, reverting to browser version + + at Object. (../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js:23:13) + + + RUNS   api  src/project/controller/project.controller.spec.ts + RUNS   api  src/project/service/project.service.spec.ts + +Test Suites: 1 failed, 38 passed, 39 of 41 total +Tests: 3 failed, 44 passed, 47 total +Snapshots: 0 total +Time: 6 s, estimated 8 s +████████████████████████████████████████                 + RUNS   api  src/project/controller/project.controller.spec.ts + +Test Suites: 1 failed, 39 passed, 40 of 41 total +Tests: 3 failed, 45 passed, 48 total +Snapshots: 0 total +Time: 7 s, estimated 8 s +████████████████████████████████████████               PASS   api  src/project/controller/project.controller.spec.ts (7.267 s) + + RUNS   api  src/project/controller/project.controller.spec.ts + +Test Suites: 1 failed, 39 passed, 40 of 41 total +Tests: 3 failed, 45 passed, 48 total +Snapshots: 0 total +Time: 7 s, estimated 8 s +████████████████████████████████████████               ● Console + + console.info + secp256k1 unavailable, reverting to browser version + + at Object. (../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js:23:13) + + + RUNS   api  src/project/controller/project.controller.spec.ts + +Test Suites: 1 failed, 39 passed, 40 of 41 total +Tests: 3 failed, 45 passed, 48 total +Snapshots: 0 total +Time: 7 s, estimated 8 s +████████████████████████████████████████               +Summary of all failing tests + FAIL  src/common/util.spec.ts + ● util › should create a key pair + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:15:34) + + ● util › should encrypt and decrypt a string + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:22:34) + + ● util › should fail to encrypt and decrypt a string + + TypeError: Cannot read properties of undefined (reading 'generatePrivate') + +   5 | privateKey: string +   6 | } => { + > 7 | const privateKey: Buffer = eccrypto.generatePrivate() as Buffer +   | ^ +   8 | const publicKey: Buffer = eccrypto.getPublic(privateKey) +   9 | +   10 | return { + + at createKeyPair (src/common/create-key-pair.ts:7:39) + at Object. (src/common/util.spec.ts:30:34) + + +Test Suites: 1 failed, 40 passed, 41 total +Tests: 3 failed, 46 passed, 49 total +Snapshots: 0 total +Time: 7.639 s, estimated 8 s +Ran all test suites. + ELIFECYCLE  Test failed. See above for more details. diff --git a/apps/api/nest-cli.json b/apps/api/nest-cli.json new file mode 100644 index 00000000..f1d18677 --- /dev/null +++ b/apps/api/nest-cli.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + }, + "entryFile": "../../../dist/apps/api/main.js" + } \ No newline at end of file diff --git a/apps/api/package.json b/apps/api/package.json new file mode 100644 index 00000000..12a61877 --- /dev/null +++ b/apps/api/package.json @@ -0,0 +1,90 @@ +{ + "name": "api", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "test": "jest", + "test:watch": "jest --watch", + "test:cov": "jest --coverage", + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", + "test:e2e": "jest --config ./test/jest-e2e.json" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.2.0", + "@nestjs/core": "^10.0.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/passport": "^10.0.3", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/platform-fastify": "^10.3.3", + "@nestjs/schedule": "^4.0.1", + "@nestjs/swagger": "^7.3.0", + "@prisma/client": "^5.10.1", + "@supabase/supabase-js": "^2.39.6", + "chalk": "^5.3.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.1", + "eccrypto": "^1.1.6", + "moment": "^2.30.1", + "nodemailer": "^6.9.9", + "passport-github2": "^0.1.12", + "prisma": "^5.10.1", + "reflect-metadata": "^0.2.0", + "rxjs": "^7.8.1", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/node": "^20.3.1", + "@types/supertest": "^6.0.0", + "@types/eccrypto": "^1.1.6", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "jest-mock-extended": "^3.0.5", + "prettier": "^3.0.0", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.3" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": "src", + "testRegex": ".*\\.spec\\.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "collectCoverageFrom": [ + "**/*.(t|j)s" + ], + "coverageDirectory": "../coverage", + "testEnvironment": "node" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/apps/api/project.json b/apps/api/project.json deleted file mode 100644 index dc984dde..00000000 --- a/apps/api/project.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "api", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/api/src", - "projectType": "application", - "targets": { - "build": { - "executor": "@nx/webpack:webpack", - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "options": { - "target": "node", - "compiler": "tsc", - "outputPath": "dist/apps/api", - "main": "apps/api/src/main.ts", - "tsConfig": "apps/api/tsconfig.app.json", - "webpackConfig": "apps/api/webpack.config.js" - }, - "configurations": { - "development": {}, - "production": {} - } - }, - "serve": { - "executor": "@nx/js:node", - "defaultConfiguration": "development", - "options": { - "buildTarget": "api:build" - }, - "configurations": { - "development": { - "buildTarget": "api:build:development" - }, - "production": { - "buildTarget": "api:build:production" - } - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": [ - "apps/api/**/*.ts", - "apps/api/package.json", - "apps/api/project.json" - ] - } - }, - "prettier:fix": { - "command": "pnpx prettier -w .", - "options": { - "cwd": "apps/api" - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "apps/api/jest.config.ts" - } - }, - "test:e2e": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage-e2e/{projectRoot}"], - "options": { - "runInBand": true, - "devServerTarget": "api:serve", - "jestConfig": "apps/api/jest.e2e-config.ts" - }, - "configurations": { - "development": { - "devServerTarget": "api:serve:development" - } - } - }, - "prisma:generate": { - "command": "prisma generate", - "options": { - "cwd": "apps/api/src/prisma" - } - }, - "prisma:format": { - "command": "prisma format", - "options": { - "cwd": "apps/api/src/prisma" - } - }, - "prisma:validate": { - "command": "prisma validate", - "options": { - "cwd": "apps/api/src/prisma" - } - }, - "prisma:reset": { - "command": "prisma migrate reset --force", - "options": { - "cwd": "apps/api/src/prisma" - } - } - }, - "tags": [] -} diff --git a/apps/api/src/api-key/dto/create.api-key/create.api-key.spec.ts b/apps/api/src/api-key/dto/create.api-key/create.api-key.spec.ts index c862c808..cba82381 100644 --- a/apps/api/src/api-key/dto/create.api-key/create.api-key.spec.ts +++ b/apps/api/src/api-key/dto/create.api-key/create.api-key.spec.ts @@ -1,7 +1,7 @@ -import { CreateApiKey } from './create.api-key'; +import { CreateApiKey } from './create.api-key' describe('CreateApiKey', () => { it('should be defined', () => { - expect(new CreateApiKey()).toBeDefined(); - }); -}); + expect(new CreateApiKey()).toBeDefined() + }) +}) diff --git a/apps/api/src/api-key/dto/update.api-key/update.api-key.spec.ts b/apps/api/src/api-key/dto/update.api-key/update.api-key.spec.ts index cb98ad4c..60cbbaa5 100644 --- a/apps/api/src/api-key/dto/update.api-key/update.api-key.spec.ts +++ b/apps/api/src/api-key/dto/update.api-key/update.api-key.spec.ts @@ -1,7 +1,7 @@ -import { UpdateApiKey } from './update.api-key'; +import { UpdateApiKey } from './update.api-key' describe('UpdateApiKey', () => { it('should be defined', () => { - expect(new UpdateApiKey()).toBeDefined(); - }); -}); + expect(new UpdateApiKey()).toBeDefined() + }) +}) diff --git a/apps/api/src/auth/guard/auth/auth.guard.ts b/apps/api/src/auth/guard/auth/auth.guard.ts index 779418d9..7baced91 100644 --- a/apps/api/src/auth/guard/auth/auth.guard.ts +++ b/apps/api/src/auth/guard/auth/auth.guard.ts @@ -145,6 +145,9 @@ export class AuthGuard implements CanActivate { } private extractApiKeyFromHeader(request: Request): string | undefined { + if (Array.isArray(request.headers[X_KEYSHADE_TOKEN])) { + throw new Error('Bad auth') + } return request.headers[X_KEYSHADE_TOKEN] } } diff --git a/apps/api/src/common/create-key-pair.ts b/apps/api/src/common/create-key-pair.ts index 46eecbd7..05665c08 100644 --- a/apps/api/src/common/create-key-pair.ts +++ b/apps/api/src/common/create-key-pair.ts @@ -1,4 +1,4 @@ -import eccrypto from 'eccrypto' +import * as eccrypto from 'eccrypto' export const createKeyPair = (): { publicKey: string diff --git a/apps/api/src/common/decrypt.ts b/apps/api/src/common/decrypt.ts index 906ef486..29a6417f 100644 --- a/apps/api/src/common/decrypt.ts +++ b/apps/api/src/common/decrypt.ts @@ -1,4 +1,4 @@ -import eccrypto from 'eccrypto' +import * as eccrypto from 'eccrypto' export const decrypt = async ( privateKey: string, diff --git a/apps/api/src/common/encrypt.ts b/apps/api/src/common/encrypt.ts index f82a17e5..3a043c62 100644 --- a/apps/api/src/common/encrypt.ts +++ b/apps/api/src/common/encrypt.ts @@ -1,4 +1,4 @@ -import eccrypto from 'eccrypto' +import * as eccrypto from 'eccrypto' export const encrypt = async ( publicKey: string, diff --git a/apps/api/src/common/fetch-events.ts b/apps/api/src/common/fetch-events.ts index de40a9e6..18f8e178 100644 --- a/apps/api/src/common/fetch-events.ts +++ b/apps/api/src/common/fetch-events.ts @@ -5,7 +5,7 @@ export default async function fetchEvents( app: NestFastifyApplication, user: User, query?: string -) { +): Promise { return app.inject({ method: 'GET', headers: { diff --git a/apps/api/src/common/query.transform.pipe.spec.ts b/apps/api/src/common/query.transform.pipe.spec.ts index f178f1e6..c76a47d5 100644 --- a/apps/api/src/common/query.transform.pipe.spec.ts +++ b/apps/api/src/common/query.transform.pipe.spec.ts @@ -1,7 +1,7 @@ -import { QueryTransformPipe } from './query.transform.pipe'; +import { QueryTransformPipe } from './query.transform.pipe' describe('QueryTransformPipe', () => { it('should be defined', () => { - expect(new QueryTransformPipe()).toBeDefined(); - }); -}); + expect(new QueryTransformPipe()).toBeDefined() + }) +}) diff --git a/apps/api/src/environment/dto/create.environment/create.environment.spec.ts b/apps/api/src/environment/dto/create.environment/create.environment.spec.ts index 1d1bfde2..b8c824ac 100644 --- a/apps/api/src/environment/dto/create.environment/create.environment.spec.ts +++ b/apps/api/src/environment/dto/create.environment/create.environment.spec.ts @@ -1,7 +1,7 @@ -import { CreateEnvironment } from './create.environment'; +import { CreateEnvironment } from './create.environment' describe('CreateEnvironment', () => { it('should be defined', () => { - expect(new CreateEnvironment()).toBeDefined(); - }); -}); + expect(new CreateEnvironment()).toBeDefined() + }) +}) diff --git a/apps/api/src/environment/dto/update.environment/update.environment.spec.ts b/apps/api/src/environment/dto/update.environment/update.environment.spec.ts index fa14f081..4be0994c 100644 --- a/apps/api/src/environment/dto/update.environment/update.environment.spec.ts +++ b/apps/api/src/environment/dto/update.environment/update.environment.spec.ts @@ -1,7 +1,7 @@ -import { UpdateEnvironment } from './update.environment'; +import { UpdateEnvironment } from './update.environment' describe('UpdateEnvironment', () => { it('should be defined', () => { - expect(new UpdateEnvironment()).toBeDefined(); - }); -}); + expect(new UpdateEnvironment()).toBeDefined() + }) +}) diff --git a/apps/api/src/project/dto/create.project/create.project.spec.ts b/apps/api/src/project/dto/create.project/create.project.spec.ts index 458a7d51..bd189bc7 100644 --- a/apps/api/src/project/dto/create.project/create.project.spec.ts +++ b/apps/api/src/project/dto/create.project/create.project.spec.ts @@ -1,7 +1,7 @@ -import { CreateProject } from './create.project'; +import { CreateProject } from './create.project' describe('CreateProject', () => { it('should be defined', () => { - expect(new CreateProject()).toBeDefined(); - }); -}); + expect(new CreateProject()).toBeDefined() + }) +}) diff --git a/apps/api/src/project/dto/update.project/update.project.spec.ts b/apps/api/src/project/dto/update.project/update.project.spec.ts index b4d5cb57..295ed909 100644 --- a/apps/api/src/project/dto/update.project/update.project.spec.ts +++ b/apps/api/src/project/dto/update.project/update.project.spec.ts @@ -1,7 +1,7 @@ -import { UpdateProject } from './update.project'; +import { UpdateProject } from './update.project' describe('UpdateProject', () => { it('should be defined', () => { - expect(new UpdateProject()).toBeDefined(); - }); -}); + expect(new UpdateProject()).toBeDefined() + }) +}) diff --git a/apps/api/src/secret/dto/create.secret/create.secret.spec.ts b/apps/api/src/secret/dto/create.secret/create.secret.spec.ts index e90e3cec..5e6e1245 100644 --- a/apps/api/src/secret/dto/create.secret/create.secret.spec.ts +++ b/apps/api/src/secret/dto/create.secret/create.secret.spec.ts @@ -1,7 +1,7 @@ -import { CreateSecret } from './create.secret'; +import { CreateSecret } from './create.secret' describe('CreateSecret', () => { it('should be defined', () => { - expect(new CreateSecret()).toBeDefined(); - }); -}); + expect(new CreateSecret()).toBeDefined() + }) +}) diff --git a/apps/api/src/secret/dto/update.secret/update.secret.spec.ts b/apps/api/src/secret/dto/update.secret/update.secret.spec.ts index 21548bd5..c26fcf32 100644 --- a/apps/api/src/secret/dto/update.secret/update.secret.spec.ts +++ b/apps/api/src/secret/dto/update.secret/update.secret.spec.ts @@ -1,7 +1,7 @@ -import { UpdateSecret } from './update.secret'; +import { UpdateSecret } from './update.secret' describe('UpdateSecret', () => { it('should be defined', () => { - expect(new UpdateSecret()).toBeDefined(); - }); -}); + expect(new UpdateSecret()).toBeDefined() + }) +}) diff --git a/apps/api/src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts b/apps/api/src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts index c51d7e08..d1230768 100644 --- a/apps/api/src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts +++ b/apps/api/src/workspace-role/dto/create-workspace-role/create-workspace-role.spec.ts @@ -1,7 +1,7 @@ -import { CreateWorkspaceRole } from './create-workspace-role'; +import { CreateWorkspaceRole } from './create-workspace-role' describe('CreateWorkspaceRole', () => { it('should be defined', () => { - expect(new CreateWorkspaceRole()).toBeDefined(); - }); -}); + expect(new CreateWorkspaceRole()).toBeDefined() + }) +}) diff --git a/apps/api/src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts b/apps/api/src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts index 5f0a2eae..e66770fd 100644 --- a/apps/api/src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts +++ b/apps/api/src/workspace-role/dto/update-workspace-role/update-workspace-role.spec.ts @@ -1,7 +1,7 @@ -import { UpdateWorkspaceRole } from './update-workspace-role'; +import { UpdateWorkspaceRole } from './update-workspace-role' describe('UpdateWorkspaceRole', () => { it('should be defined', () => { - expect(new UpdateWorkspaceRole()).toBeDefined(); - }); -}); + expect(new UpdateWorkspaceRole()).toBeDefined() + }) +}) diff --git a/apps/api/src/workspace/dto/create.workspace/create.workspace.spec.ts b/apps/api/src/workspace/dto/create.workspace/create.workspace.spec.ts index 406ee040..143a7b45 100644 --- a/apps/api/src/workspace/dto/create.workspace/create.workspace.spec.ts +++ b/apps/api/src/workspace/dto/create.workspace/create.workspace.spec.ts @@ -1,7 +1,7 @@ -import { CreateWorkspace } from './create.workspace'; +import { CreateWorkspace } from './create.workspace' describe('CreateWorkspace', () => { it('should be defined', () => { - expect(new CreateWorkspace()).toBeDefined(); - }); -}); + expect(new CreateWorkspace()).toBeDefined() + }) +}) diff --git a/apps/api/src/workspace/dto/update.workspace/update.workspace.spec.ts b/apps/api/src/workspace/dto/update.workspace/update.workspace.spec.ts index 2f35e047..c1b9a880 100644 --- a/apps/api/src/workspace/dto/update.workspace/update.workspace.spec.ts +++ b/apps/api/src/workspace/dto/update.workspace/update.workspace.spec.ts @@ -1,7 +1,7 @@ -import { UpdateWorkspace } from './update.workspace'; +import { UpdateWorkspace } from './update.workspace' describe('UpdateWorkspace', () => { it('should be defined', () => { - expect(new UpdateWorkspace()).toBeDefined(); - }); -}); + expect(new UpdateWorkspace()).toBeDefined() + }) +}) diff --git a/apps/api/tsconfig.app.json b/apps/api/tsconfig.app.json index 8e277f05..c959ca9d 100644 --- a/apps/api/tsconfig.app.json +++ b/apps/api/tsconfig.app.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "dist/out-tsc", "module": "commonjs", "types": ["node"], "emitDecoratorMetadata": true, diff --git a/apps/api/tsconfig.build.json b/apps/api/tsconfig.build.json new file mode 100644 index 00000000..64f86c6b --- /dev/null +++ b/apps/api/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] +} diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index c1e2dd4e..000fbb17 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -1,16 +1,21 @@ { - "extends": "../../tsconfig.base.json", - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - } - ], "compilerOptions": { - "esModuleInterop": true + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "forceConsistentCasingInFileNames": false, + "noFallthroughCasesInSwitch": false } -} +} \ No newline at end of file diff --git a/apps/api/tsconfig.spec.json b/apps/api/tsconfig.spec.json index 02deb734..23919ca9 100644 --- a/apps/api/tsconfig.spec.json +++ b/apps/api/tsconfig.spec.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "outDir": "../../dist/out-tsc", + "outDir": "dist/out-tsc", "module": "commonjs", "types": ["jest", "node"] }, diff --git a/apps/web/.eslintrc.js b/apps/web/.eslintrc.js new file mode 100644 index 00000000..0aa26fe8 --- /dev/null +++ b/apps/web/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + extends: ['custom/next'], + parserOptions: { + project: 'tsconfig.json', + tsconfigRootDir: __dirname, + sourceType: 'module' + } +} diff --git a/apps/web/.eslintrc.json b/apps/web/.eslintrc.json deleted file mode 100644 index a4278124..00000000 --- a/apps/web/.eslintrc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": [ - "plugin:@nx/react-typescript", - "next", - "next/core-web-vitals", - "../../.eslintrc.json" - ], - "ignorePatterns": ["!**/*", ".next/**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": { - "@next/next/no-html-link-for-pages": ["error", "apps/web/pages"] - } - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], - "env": { - "jest": true - } - } - ] -} diff --git a/apps/web/.turbo/turbo-build.log b/apps/web/.turbo/turbo-build.log new file mode 100644 index 00000000..84fafae7 --- /dev/null +++ b/apps/web/.turbo/turbo-build.log @@ -0,0 +1,27 @@ + + +> web@1.0.0 build /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/web +> next build + +[?25l   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...[?25h   Creating an optimized production build ✓ Creating an optimized production build + ✓ Compiled successfully +[?25l   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..[?25h   Linting and checking validity of types ✓ Linting and checking validity of types +[?25l   Collecting page data .   Collecting page data ..[?25h   Collecting page data ✓ Collecting page data +[?25l   Generating static pages (0/4) [ ]   Generating static pages (0/4) [= ]   Generating static pages (1/4) +[?25h ✓ Generating static pages (4/4) +[?25l   Finalizing page optimization .[?25l   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...[?25h   Collecting build traces ✓ Collecting build traces +[?25h   Finalizing page optimization ✓ Finalizing page optimization + +Route (app) Size First Load JS +┌ ○ / 12 kB 92.6 kB +└ ○ /_not-found 876 B 81.4 kB ++ First Load JS shared by all 80.5 kB + ├ chunks/2df0eab0-e65f3bd1222ac66a.js 51.1 kB + ├ chunks/44-e9ed15d20d0a314c.js 27.5 kB + ├ chunks/main-app-9b220a8d7c12231a.js 229 B + └ chunks/webpack-217d63bd3a7cd4ea.js 1.73 kB + + +○ (Static) automatically rendered as static HTML (uses no initial props) + +[?25h diff --git a/apps/web/.turbo/turbo-lint.log b/apps/web/.turbo/turbo-lint.log new file mode 100644 index 00000000..efb88707 --- /dev/null +++ b/apps/web/.turbo/turbo-lint.log @@ -0,0 +1,6 @@ + + +> web@1.0.0 lint /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/web +> next lint --fix + +✔ No ESLint warnings or errors diff --git a/apps/web/app/api/hello/route.ts b/apps/web/app/api/hello/route.ts deleted file mode 100644 index de70bac6..00000000 --- a/apps/web/app/api/hello/route.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function GET(request: Request) { - return new Response('Hello, from API!'); -} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 3eeff0a8..058309d7 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,64 +1,65 @@ -import './global.css'; -import { Metadata } from "next"; +import './global.css' +import type { Metadata } from 'next' -const description = "Manage all your secrets securely with public key encryption and realtime based tools, that seamlessly fits into your codebase"; -const name = "keyshade"; +const description = + 'Manage all your secrets securely with public key encryption and realtime based tools, that seamlessly fits into your codebase' +const name = 'keyshade' export const metadata: Metadata = { - metadataBase: new URL("https://keyshade.xyz/"), + metadataBase: new URL('https://keyshade.xyz/'), title: { default: name, - template: `%s | ${name}`, + template: `%s | ${name}` }, - description: description, + description, keywords: [ - "Keyshade", - "secrets integration", - "codebase security", - "Public Key Encryption", - "secret rotation", - "auto revoke", - "collaboration", - "data security", - "secrets management", - "secure code secrets", - "realtime secrets integration", - "encryption for secrets", - "automated secret rotation", - "team collaboration secrets", - "secure runtime environment", - "secrets management tool", - "codebase security solution", - "cybersecurity for secrets", - "API security", - "key management", - "secure data transfer", - "secure secrets sharing", - "effortless secrets management", - "Keyshade features", - "cybersecurity solution", - "secure software development", - "automated access revocation", - "secure secrets storage", - "developer tools security", - "API key security", - "codebase encryption", - "team-based secrets management" + 'Keyshade', + 'secrets integration', + 'codebase security', + 'Public Key Encryption', + 'secret rotation', + 'auto revoke', + 'collaboration', + 'data security', + 'secrets management', + 'secure code secrets', + 'realtime secrets integration', + 'encryption for secrets', + 'automated secret rotation', + 'team collaboration secrets', + 'secure runtime environment', + 'secrets management tool', + 'codebase security solution', + 'cybersecurity for secrets', + 'API security', + 'key management', + 'secure data transfer', + 'secure secrets sharing', + 'effortless secrets management', + 'Keyshade features', + 'cybersecurity solution', + 'secure software development', + 'automated access revocation', + 'secure secrets storage', + 'developer tools security', + 'API key security', + 'codebase encryption', + 'team-based secrets management' ], applicationName: name, openGraph: { title: name, - description: description, - type: "website", - locale: "en_US", - images: "https://keyshade.xyz/thumbnail.png", + description, + type: 'website', + locale: 'en_US', + images: 'https://keyshade.xyz/thumbnail.png' }, twitter: { - card: "summary_large_image", + card: 'summary_large_image', title: name, - description: description, - creator: "@keyshade_xyz", - creatorId: "1738929014016966656", + description, + creator: '@keyshade_xyz', + creatorId: '1738929014016966656' }, robots: { index: true, @@ -67,18 +68,18 @@ export const metadata: Metadata = { nocache: true, googleBot: { index: true, - follow: true, - }, - }, -}; + follow: true + } + } +} export default function RootLayout({ - children, + children }: { - children: React.ReactNode; -}) { + children: React.ReactNode +}): React.JSX.Element { return ( {children} - ); + ) } diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index cc44de69..dab394e7 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,13 +1,14 @@ import { Poppins } from 'next/font/google' -import Links from '../components/Links' -import Killers from '../components/Killers' +import Links from '../components/links' +import Killers from '../components/killers' import { Logo, Grid, Stars } from '../public' + const poppins = Poppins({ subsets: ['latin'], weight: ['400', '500', '600', '700'] }) -function Index() { +function Index(): React.JSX.Element { return (
@@ -35,13 +36,13 @@ function Index() {
diff --git a/apps/web/components/Killers.tsx b/apps/web/components/Killers.tsx deleted file mode 100644 index 9bfcab82..00000000 --- a/apps/web/components/Killers.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import Image from "next/image" -import { Inter } from "next/font/google" -const inter = Inter({ subsets: ['latin'] }) - -type KillersProps = { - image: string - twitterUserName: string -} -const Killers = ({ image, twitterUserName }: KillersProps) => { - return ( -
-
- {`${image}`} -
- -
- ) -} - -export default Killers \ No newline at end of file diff --git a/apps/web/components/Links.tsx b/apps/web/components/Links.tsx deleted file mode 100644 index 0acdfd40..00000000 --- a/apps/web/components/Links.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import Image from "next/image" -import { Inter } from "next/font/google" -const inter = Inter({ subsets: ['latin'] }) -type LinksProps = { - icon: string - description: string - link: string -} - - -const Links = ({ icon, description, link }: LinksProps) => { - return ( - -
- {`${icon}`} -

{description}

-
-
- ) -} - -export default Links \ No newline at end of file diff --git a/apps/web/components/killers.tsx b/apps/web/components/killers.tsx new file mode 100644 index 00000000..a2b77c60 --- /dev/null +++ b/apps/web/components/killers.tsx @@ -0,0 +1,40 @@ +import Image from 'next/image' +import { Inter } from 'next/font/google' +import React from 'react' + +const inter = Inter({ subsets: ['latin'] }) + +interface KillersProps { + image: string + twitterUserName: string +} +function Killers({ image, twitterUserName }: KillersProps): React.JSX.Element { + return ( +
+
+ {image} +
+ +
+ ) +} + +export default Killers diff --git a/apps/web/components/links.tsx b/apps/web/components/links.tsx new file mode 100644 index 00000000..fe52b0ed --- /dev/null +++ b/apps/web/components/links.tsx @@ -0,0 +1,32 @@ +import Image from 'next/image' +import { Inter } from 'next/font/google' +import React from 'react' + +const inter = Inter({ subsets: ['latin'] }) +interface LinksProps { + icon: string + description: string + link: string +} + +function Links({ icon, description, link }: LinksProps): React.JSX.Element { + return ( + +
+ {icon} +

{description}

+
+
+ ) +} + +export default Links diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 17994a2e..6631e2cc 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -1,33 +1,19 @@ -const { composePlugins, withNx } = require('@nx/next') - -/** - * @type {import('@nx/next/plugins/with-nx').WithNxOptions} - **/ +const path = require("node:path"); +/** @type {import('next').NextConfig} */ const nextConfig = { - distDir: 'dist/.next', webpack(config, { isServer }) { config.module.rules.push({ test: /\.svg$/, - use: ['@svgr/webpack'] - }) + use: ["@svgr/webpack"], + }); if (!isServer) { - // eslint-disable-next-line no-undef - // config.resolve.alias['@public'] = path.join(__dirname, 'public') + config.resolve.alias["@public"] = path.join(__dirname, "public"); } - return config + return config; }, - nx: { - // Set this to true if you would like to use SVGR - // See: https://github.com/gregberge/svgr - svgr: false - } -} - -const plugins = [ - // Add more Next.js plugins to this list if needed. - withNx -] + reactStrictMode: true, +}; -module.exports = composePlugins(...plugins)(nextConfig) +module.exports = nextConfig; \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 00000000..eb06597e --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,31 @@ +{ + "name": "web", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "serve": "next start", + "lint": "next lint --fix" + }, + "dependencies": { + "next": "^13.5.6", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@next/eslint-plugin-next": "^13.4.19", + "@svgr/webpack": "^8.1.0", + "@tailwindcss/forms": "^0.5.7", + "@types/jest": "^29.5.2", + "@types/node": "^17.0.12", + "@types/react": "^18.0.22", + "@types/react-dom": "^18.0.7", + "autoprefixer": "^10.4.16", + "eslint-config-custom": "workspace:*", + "postcss": "^8.4.31", + "tailwindcss": "^3.3.3", + "tsconfig": "workspace:*", + "typescript": "^4.5.3" + } +} diff --git a/apps/web/project.json b/apps/web/project.json deleted file mode 100644 index 87cef463..00000000 --- a/apps/web/project.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "web", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/web", - "projectType": "application", - "targets": { - "build": { - "executor": "@nx/next:build", - "outputs": ["{options.outputPath}"], - "defaultConfiguration": "production", - "options": { - "outputPath": "apps/web/dist" - } - }, - "serve": { - "executor": "@nx/next:server", - "defaultConfiguration": "development", - "options": { - "buildTarget": "web:build", - "dev": true, - "port": 3000 - }, - "configurations": { - "development": { - "buildTarget": "web:build:development", - "dev": true - }, - "production": { - "buildTarget": "web:build:production", - "dev": false - } - } - }, - "export": { - "executor": "@nx/next:export", - "options": { - "buildTarget": "web:build:production" - } - }, - "test": { - "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], - "options": { - "jestConfig": "apps/web/jest.config.ts" - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": [ - "apps/web/**/*.ts", - "apps/web/package.json", - "apps/web/project.json" - ] - } - } - }, - "tags": [] -} diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index e3131c80..5ef893ea 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,43 +1,12 @@ { - "extends": "../../tsconfig.base.json", + "extends": "tsconfig/nextjs.json", "compilerOptions": { - "jsx": "preserve", - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "resolveJsonModule": true, - "isolatedModules": true, - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "types": [ - "jest", - "node" - ] + "plugins": [{ "name": "next" }], + "paths": { + "@/*": ["./src/*"], + "@public/*": ["./public/*"] + } }, - "include": [ - "**/*.ts", - "**/*.tsx", - "**/*.js", - "**/*.jsx", - "../../apps/web/.next/types/**/*.ts", - "../../dist/apps/web/.next/types/**/*.ts", - "next-env.d.ts", - ".next/types/**/*.ts", - "../../apps/web/dist/.next/types/**/*.ts", - "dist/.next/types/**/*.ts", - "../../apps/web/dist/dist/.next/types/**/*.ts" - ], - "exclude": [ - "node_modules", - "jest.config.ts", - "src/**/*.spec.ts", - "src/**/*.test.ts" - ] -} + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/apps/web/tsconfig.spec.json b/apps/web/tsconfig.spec.json deleted file mode 100644 index 214b2cc2..00000000 --- a/apps/web/tsconfig.spec.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"], - "jsx": "react" - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.test.tsx", - "src/**/*.spec.tsx", - "src/**/*.test.js", - "src/**/*.spec.js", - "src/**/*.test.jsx", - "src/**/*.spec.jsx", - "src/**/*.d.ts" - ] -} diff --git a/apps/workspace/.eslintrc.js b/apps/workspace/.eslintrc.js new file mode 100644 index 00000000..0aa26fe8 --- /dev/null +++ b/apps/workspace/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + extends: ['custom/next'], + parserOptions: { + project: 'tsconfig.json', + tsconfigRootDir: __dirname, + sourceType: 'module' + } +} diff --git a/apps/workspace/.eslintrc.json b/apps/workspace/.eslintrc.json deleted file mode 100644 index a2b33e0e..00000000 --- a/apps/workspace/.eslintrc.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": [ - "plugin:@nx/react-typescript", - "next", - "next/core-web-vitals", - "../../.eslintrc.json" - ], - "ignorePatterns": ["!**/*", ".next/**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": { - "@next/next/no-html-link-for-pages": ["error", "apps/workspace/pages"] - } - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], - "env": { - "jest": true - } - } - ] -} diff --git a/apps/workspace/.turbo/turbo-build.log b/apps/workspace/.turbo/turbo-build.log new file mode 100644 index 00000000..543b86e7 --- /dev/null +++ b/apps/workspace/.turbo/turbo-build.log @@ -0,0 +1,29 @@ + + +> workspace@1.0.0 build /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/workspace +> next build + +[?25l   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..[?25h +[?25l   Creating an optimized production build .[?25hwarn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration. +[?25l   Creating an optimized production build .[?25hwarn - https://tailwindcss.com/docs/content-configuration +[?25l   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .   Creating an optimized production build ..   Creating an optimized production build ...   Creating an optimized production build .[?25h   Creating an optimized production build ✓ Creating an optimized production build + ✓ Compiled successfully +[?25l   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...   Linting and checking validity of types .   Linting and checking validity of types ..   Linting and checking validity of types ...[?25h   Linting and checking validity of types ✓ Linting and checking validity of types +[?25l   Collecting page data .   Collecting page data ..[?25h   Collecting page data ✓ Collecting page data +[?25l   Generating static pages (0/4) [ ]   Generating static pages (0/4) [= ]   Generating static pages (0/4) [== ][?25h ✓ Generating static pages (4/4) +[?25l   Finalizing page optimization .[?25l   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...   Finalizing page optimization .   Collecting build traces .   Finalizing page optimization ..   Collecting build traces ..   Finalizing page optimization ...   Collecting build traces ...[?25h   Collecting build traces ✓ Collecting build traces +[?25h   Finalizing page optimization ✓ Finalizing page optimization + +Route (app) Size First Load JS +┌ ○ / 137 B 80.6 kB +└ ○ /_not-found 876 B 81.4 kB ++ First Load JS shared by all 80.5 kB + ├ chunks/2df0eab0-e65f3bd1222ac66a.js 51.1 kB + ├ chunks/44-e9ed15d20d0a314c.js 27.5 kB + ├ chunks/main-app-9b220a8d7c12231a.js 229 B + └ chunks/webpack-106c67c7f021c3ee.js 1.7 kB + + +○ (Static) automatically rendered as static HTML (uses no initial props) + +[?25h diff --git a/apps/workspace/.turbo/turbo-lint.log b/apps/workspace/.turbo/turbo-lint.log new file mode 100644 index 00000000..4ad7cb89 --- /dev/null +++ b/apps/workspace/.turbo/turbo-lint.log @@ -0,0 +1,6 @@ + + +> workspace@1.0.0 lint /home/kriptonian/Desktop/work/keyshade_xyz/keyshade/apps/workspace +> next lint --fix + +✔ No ESLint warnings or errors diff --git a/apps/workspace/app/api/hello/route.ts b/apps/workspace/app/api/hello/route.ts deleted file mode 100644 index de70bac6..00000000 --- a/apps/workspace/app/api/hello/route.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function GET(request: Request) { - return new Response('Hello, from API!'); -} diff --git a/apps/workspace/app/global.css b/apps/workspace/app/global.css index 501b0b12..6eda0976 100644 --- a/apps/workspace/app/global.css +++ b/apps/workspace/app/global.css @@ -3,6 +3,6 @@ @tailwind utilities; * { - margin: 0; - padding: 0; + background-color: #0B0D0F; + color: white; } diff --git a/apps/workspace/app/layout.tsx b/apps/workspace/app/layout.tsx index 26b3efaf..11ab6843 100644 --- a/apps/workspace/app/layout.tsx +++ b/apps/workspace/app/layout.tsx @@ -1,18 +1,18 @@ -import './global.css'; +import './global.css' export const metadata = { title: 'Welcome to apps/workspace', - description: 'Generated by create-nx-workspace', -}; + description: 'Generated by create-nx-workspace' +} export default function RootLayout({ - children, + children }: { - children: React.ReactNode; -}) { + children: React.ReactNode +}): React.JSX.Element { return ( {children} - ); + ) } diff --git a/apps/workspace/app/page.tsx b/apps/workspace/app/page.tsx index aaca5797..e6b5cf02 100644 --- a/apps/workspace/app/page.tsx +++ b/apps/workspace/app/page.tsx @@ -1,3 +1,3 @@ -export default async function Index() { +export default function Index(): React.JSX.Element { return
Workspace
} diff --git a/apps/workspace/next.config.js b/apps/workspace/next.config.js index 007b2aa5..ac068f26 100644 --- a/apps/workspace/next.config.js +++ b/apps/workspace/next.config.js @@ -1,22 +1,19 @@ -//@ts-check +const path = require("node:path"); +/** @type {import('next').NextConfig} */ +const nextConfig = { + webpack(config, { isServer }) { + config.module.rules.push({ + test: /\.svg$/, + use: ["@svgr/webpack"], + }); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const { composePlugins, withNx } = require('@nx/next'); + if (!isServer) { + config.resolve.alias["@public"] = path.join(__dirname, "public"); + } -/** - * @type {import('@nx/next/plugins/with-nx').WithNxOptions} - **/ -const nextConfig = { - nx: { - // Set this to true if you would like to use SVGR - // See: https://github.com/gregberge/svgr - svgr: false, + return config; }, + reactStrictMode: true, }; -const plugins = [ - // Add more Next.js plugins to this list if needed. - withNx, -]; - -module.exports = composePlugins(...plugins)(nextConfig); +module.exports = nextConfig; diff --git a/apps/workspace/package.json b/apps/workspace/package.json new file mode 100644 index 00000000..ab92e71d --- /dev/null +++ b/apps/workspace/package.json @@ -0,0 +1,30 @@ +{ + "name": "workspace", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint --fix" + }, + "dependencies": { + "next": "^13.4.19", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@next/eslint-plugin-next": "^13.4.19", + "@svgr/webpack": "^8.1.0", + "@tailwindcss/forms": "^0.5.7", + "@types/node": "^17.0.12", + "@types/react": "^18.0.22", + "@types/react-dom": "^18.0.7", + "autoprefixer": "^10.4.16", + "postcss": "^8.4.31", + "tailwindcss": "^3.3.3", + "typescript": "^4.5.3", + "eslint-config-custom": "workspace:*", + "tsconfig": "workspace:*" + } +} \ No newline at end of file diff --git a/apps/workspace/tsconfig.json b/apps/workspace/tsconfig.json index a156ce60..5ef893ea 100644 --- a/apps/workspace/tsconfig.json +++ b/apps/workspace/tsconfig.json @@ -1,40 +1,12 @@ { - "extends": "../../tsconfig.base.json", + "extends": "tsconfig/nextjs.json", "compilerOptions": { - "jsx": "preserve", - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "resolveJsonModule": true, - "isolatedModules": true, - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "types": [ - "jest", - "node" - ] + "plugins": [{ "name": "next" }], + "paths": { + "@/*": ["./src/*"], + "@public/*": ["./public/*"] + } }, - "include": [ - "**/*.ts", - "**/*.tsx", - "**/*.js", - "**/*.jsx", - "../../apps/workspace/.next/types/**/*.ts", - "../../dist/apps/workspace/.next/types/**/*.ts", - "next-env.d.ts", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules", - "jest.config.ts", - "src/**/*.spec.ts", - "src/**/*.test.ts" - ] -} + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/apps/workspace/tsconfig.spec.json b/apps/workspace/tsconfig.spec.json deleted file mode 100644 index 214b2cc2..00000000 --- a/apps/workspace/tsconfig.spec.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../dist/out-tsc", - "module": "commonjs", - "types": ["jest", "node"], - "jsx": "react" - }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.test.tsx", - "src/**/*.spec.tsx", - "src/**/*.test.js", - "src/**/*.spec.js", - "src/**/*.test.jsx", - "src/**/*.spec.jsx", - "src/**/*.d.ts" - ] -} diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index 15f85d1d..00000000 --- a/jest.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { getJestProjects } from '@nx/jest' - -export default { - projects: getJestProjects() -} diff --git a/jest.preset.js b/jest.preset.js index f078ddce..8b137891 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -1,3 +1 @@ -const nxPreset = require('@nx/jest/preset').default; -module.exports = { ...nxPreset }; diff --git a/nx.json b/nx.json deleted file mode 100644 index 6aff6849..00000000 --- a/nx.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "nxCloudAccessToken": "NWUxMDk4YTEtY2IwZi00NDg4LWJlZWEtMTg1Zjg4ODdlMzQ1fHJlYWQtd3JpdGU=", - "nxCloudUrl": "https://cloud.nx.app", - "extends": "nx/presets/npm.json", - "$schema": "./node_modules/nx/schemas/nx-schema.json", - "targetDefaults": { - "build": { - "cache": true, - "dependsOn": ["^build"] - }, - "lint": { - "cache": true, - "inputs": [ - "default", - "{workspaceRoot}/.eslintrc.json", - "{workspaceRoot}/.eslintignore", - "{workspaceRoot}/eslint.config.js" - ] - }, - "@nx/jest:jest": { - "cache": true, - "inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "codeCoverage": true - } - } - } - }, - "generators": { - "@nx/react": { - "application": { - "babel": true - } - }, - "@nx/next": { - "application": { - "style": "css", - "linter": "eslint" - } - } - }, - "pluginsConfig": { - "@nx/js": { - "analyzeSourceFiles": true - } - } -} diff --git a/package.json b/package.json index 5510c72b..7501ccad 100644 --- a/package.json +++ b/package.json @@ -83,140 +83,45 @@ ] }, "scripts": { - "dev": "nx run-many -t serve -p api web workspace --parallel --maxParallel 3", - "dev:api": "nx run api:serve", - "dev:web": "nx run web:serve", - "dev:workspace": "nx run workspace:serve", - "lint": "nx run-many -t lint --parallel", - "lint:api": "nx run api:lint", - "lint:web": "nx run web:lint", - "lint:workspace": "nx run workspace:lint", - "lint:fix": "nx run-many -p api web workspace -t lint --fix --parallel", - "prettier:fix": "nx run-many -t prettier:lint --parallel", - "prettier:fix:api": "nx run api:prettier:fix", - "build": "nx run-many -t build -p api web workspace --parallel --maxParallel 3", - "build:api": "nx run api:build --configuration=production && pnpm sentry:sourcemaps", - "build:web": "nx run web:build --configuration=production", - "build:workspace": "nx run workspace:build", - "test": "nx run-many -t test --parallel", - "test:api": "nx run api:test", + "dev": "turbo run dev", + "dev:api": "turbo run dev --filter=api", + "dev:web": "turbo run dev --filter=web", + "dev:workspace": "turbo run dev --filter=workspace", + "add:api": "pnpm add --filter=api", + "add:web": "pnpm add --filter=web", + "add:workspace": "pnpm add --filter=workspace", + "lint": "turbo run lint", + "lint:api": "turbo run lint --filter=api", + "lint:web": "turbo run lint --filter=web", + "lint:workspace": "turbo run lint --filter=workspace", + "build": "turbo run build", + "build:api": "turbo run build --filter=api", + "build:web": "turbo run build --filter=web", + "build:workspace": "turbo run build --filter=workspace", + "test": "turbo run test", + "test:api": "turbo run test --no-cache --filter=api -- --config=jest.config.ts", "e2e:api:prepare": "docker compose down && docker compose -f docker-compose-test.yml up -d && NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' pnpm run db:deploy-migrations", - "e2e:api": "pnpm run e2e:api:prepare && NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' nx run api:test:e2e --skip-nx-cache -- --coverage --coverageDirectory=coverage-e2e/api --coverageReporters=json && pnpm run e2e:api:teardown", + "e2e:api": "pnpm run e2e:api:prepare && NODE_ENV='e2e' DATABASE_URL='postgresql://prisma:prisma@localhost:5432/tests' turbo run test:e2e --no-cache -- --coverage --coverageDirectory=coverage-e2e/api --coverageReporters=json && pnpm run e2e:api:teardown", "e2e:api:teardown": "docker compose -f docker-compose-test.yml down", - "test:web": "nx run web:test", - "test:workspace": "nx run workspace:test", - "start:web": "nx run web:serve --configuration=production", - "start:api": "nx run api:serve --configuration=production", - "db:seed": "cd apps/api/src/prisma && pnpx ts-node seed.ts", - "db:generate-types": "nx run api:prisma:generate", - "db:generate-migrations": "cd apps/api/src/prisma && pnpx prisma migrate dev --create-only --skip-seed", - "db:deploy-migrations": "cd apps/api/src/prisma && pnpx prisma migrate deploy", - "db:validate": "nx run api:prisma:validate", - "db:format": "nx run api:prisma:format", - "db:reset": "nx run api:prisma:reset", + "test:web": "turbo run test --filter=web", + "test:workspace": "turbo run test --filter=workspace", + "db:generate-types": "pnpm dlx prisma generate --schema=apps/api/src/prisma/schema.prisma", + "db:generate-migrations": "cd apps/api/src/prisma && dotenv -e ../../../../.env pnpx prisma migrate dev --create-only --skip-seed", + "db:deploy-migrations": " cd apps/api/src/prisma && dotenv -e ../../../../.env pnpx prisma migrate deploy", + "db:validate": "pnpm dlx prisma validate --schema=apps/api/src/prisma/schema.prisma", + "db:format": "pnpm dlx prisma format --schema=apps/api/src/prisma/schema.prisma", + "db:reset": "pnpm dlx prisma migrate reset --force --schema=apps/api/src/prisma/schema.prisma", + "format": "prettier --write \"**/*.{ts,tsx,md}\"", "prepare": "husky install", "sentry:sourcemaps": "sentry-cli sourcemaps inject ./dist && sentry-cli sourcemaps upload ./dist || pnpm run sentry:sourcemaps:exit", "sentry:sourcemaps:exit": "echo 'Failed to upload source maps to Sentry'" }, + "packageManager": "pnpm@8.6.10", "devDependencies": { - "@nestjs/schematics": "^10.0.3", - "@nestjs/testing": "^10.3.0", - "@nx/eslint": "^17.2.8", - "@nx/eslint-plugin": "17.2.7", - "@nx/jest": "17.2.7", - "@nx/js": "17.2.7", - "@nx/nest": "^17.2.8", - "@nx/next": "^17.2.8", - "@nx/node": "17.2.7", - "@nx/react": "17.2.7", - "@nx/webpack": "17.2.7", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", - "@sentry/webpack-plugin": "^2.14.1", - "@svgr/webpack": "^8.1.0", - "@swc-node/register": "~1.6.8", - "@swc/core": "~1.3.102", - "@testing-library/react": "14.0.0", - "@types/jest": "^29.5.11", - "@types/node": "18.16.9", - "@types/nodemailer": "^6.4.14", - "@types/passport-jwt": "^3.0.13", - "@types/react": "18.2.33", - "@types/react-dom": "18.2.14", - "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "^6.18.0", - "@typescript-eslint/parser": "^6.18.0", - "autoprefixer": "^10.4.16", - "babel-jest": "^29.7.0", - "conventional-changelog-eslint": "^5.0.0", - "eslint": "~8.48.0", - "eslint-config-next": "14.0.4", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-jsx-a11y": "6.7.1", - "eslint-plugin-react": "7.32.2", - "eslint-plugin-react-hooks": "4.6.0", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jest-environment-node": "^29.7.0", - "nx": "17.2.7", - "postcss": "^8.4.33", - "prettier": "^2.8.8", - "prisma": "^5.7.1", - "react-refresh": "^0.10.0", - "tailwindcss": "^3.4.1", - "ts-jest": "^29.1.1", - "ts-node": "10.9.1", - "typescript": "~5.2.2", - "url-loader": "^4.1.1", - "@semantic-release/changelog": "^6.0.3", - "@semantic-release/commit-analyzer": "^11.1.0", - "@semantic-release/git": "^10.0.1", - "@semantic-release/release-notes-generator": "^12.1.0", - "@types/jsonwebtoken": "^9.0.5", - "@types/eccrypto": "^1.1.6" - }, - "dependencies": { - "@nestjs/common": "^10.3.0", - "@nestjs/config": "^3.1.1", - "@nestjs/core": "^10.3.0", - "@nestjs/jwt": "^10.2.0", - "@nestjs/passport": "^10.0.3", - "@nestjs/platform-express": "^10.3.0", - "@nestjs/platform-fastify": "^10.3.1", - "@nestjs/schedule": "^4.0.0", - "@nestjs/swagger": "^7.1.17", - "@prisma/client": "^5.7.1", - "@semantic-release/changelog": "^6.0.3", - "@semantic-release/commit-analyzer": "^11.1.0", - "@semantic-release/git": "^10.0.1", - "@semantic-release/release-notes-generator": "^12.1.0", - "@sentry/cli": "^2.28.0", - "@sentry/node": "^7.100.1", - "@sentry/profiling-node": "^7.100.1", - "@supabase/supabase-js": "^2.39.2", - "@types/jsonwebtoken": "^9.0.5", - "axios": "^1.6.5", - "chalk": "4.1.2", - "class-transformer": "^0.5.1", - "class-validator": "^0.14.0", - "conventional-changelog-conventionalcommits": "^7.0.2", - "dotenv": "^16.3.1", - "eccrypto": "^1.1.6", - "express": "^4.18.2", - "husky": "^8.0.3", - "jest-mock-extended": "^3.0.5", - "moment": "^2.30.1", - "next": "^14.1.0", - "nodemailer": "^6.9.8", - "passport": "^0.7.0", - "passport-github2": "^0.1.12", - "passport-jwt": "^4.0.1", - "react": "18.2.0", - "react-dom": "18.2.0", - "reflect-metadata": "^0.2.1", - "rxjs": "^7.8.1", - "semantic-release": "^23.0.0", - "tslib": "^2.6.2", - "uuid": "^9.0.1" + "husky": "^9.0.11", + "prettier": "^3.0.0", + "prettier-plugin-tailwindcss": "^0.5.11", + "turbo": "^1.12.4", + "tsconfig": "workspace:*" } } diff --git a/packages/eslint-config-custom/next.js b/packages/eslint-config-custom/next.js new file mode 100644 index 00000000..8fadcc99 --- /dev/null +++ b/packages/eslint-config-custom/next.js @@ -0,0 +1,42 @@ +const { resolve } = require("node:path"); + +const project = resolve(process.cwd(), "tsconfig.json"); + +/* + * This is a custom ESLint configuration for use with + * Next.js apps. + * + * This config extends the Vercel Engineering Style Guide. + * For more information, see https://github.com/vercel/style-guide + * + */ + +module.exports = { + extends: [ + "@vercel/style-guide/eslint/node", + "@vercel/style-guide/eslint/browser", + "@vercel/style-guide/eslint/typescript", + "@vercel/style-guide/eslint/react", + "@vercel/style-guide/eslint/next", + "eslint-config-turbo", + ].map(require.resolve), + parserOptions: { + project, + }, + globals: { + React: true, + JSX: true, + }, + settings: { + "import/resolver": { + typescript: { + project, + }, + }, + }, + ignorePatterns: ["node_modules/", "dist/"], + // add rules configurations here + rules: { + "import/no-default-export": "off", + }, +}; \ No newline at end of file diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json new file mode 100644 index 00000000..bc40923d --- /dev/null +++ b/packages/eslint-config-custom/package.json @@ -0,0 +1,11 @@ +{ + "name": "eslint-config-custom", + "license": "MIT", + "version": "0.0.0", + "private": true, + "devDependencies": { + "@vercel/style-guide": "^5.0.0", + "eslint-config-turbo": "^1.10.12", + "typescript": "^4.5.3" + } + } \ No newline at end of file diff --git a/packages/eslint-config-custom/react-internal.js b/packages/eslint-config-custom/react-internal.js new file mode 100644 index 00000000..a7087a74 --- /dev/null +++ b/packages/eslint-config-custom/react-internal.js @@ -0,0 +1,39 @@ +const { resolve } = require("node:path"); + +const project = resolve(process.cwd(), "tsconfig.json"); + +/* + * This is a custom ESLint configuration for use with + * internal (bundled by their consumer) libraries + * that utilize React. + * + * This config extends the Vercel Engineering Style Guide. + * For more information, see https://github.com/vercel/style-guide + * + */ + +module.exports = { + extends: [ + "@vercel/style-guide/eslint/browser", + "@vercel/style-guide/eslint/typescript", + "@vercel/style-guide/eslint/react", + ].map(require.resolve), + parserOptions: { + project, + }, + globals: { + JSX: true, + }, + settings: { + "import/resolver": { + typescript: { + project, + }, + }, + }, + ignorePatterns: ["node_modules/", "dist/", ".eslintrc.js"], + + rules: { + "import/no-default-export": "off", + }, +}; \ No newline at end of file diff --git a/packages/sdk-node/src/keyshade.ts b/packages/sdk-node/src/keyshade.ts new file mode 100644 index 00000000..a8328522 --- /dev/null +++ b/packages/sdk-node/src/keyshade.ts @@ -0,0 +1,38 @@ +export default class keyshade { + private static instance: keyshade | null = null + private apiKey: string + + private constructor(apiKey: string) { + this.apiKey = apiKey + } + + public static getInstance(apiKey: string): keyshade { + if (!this.instance) { + this.instance = new keyshade(apiKey) + } + return this.instance + } + + public createProject(projectName: string, privateKey: string) { + console.log( + `Creating project ${projectName} with private key ${privateKey}` + ) + + return { + update: () => {}, + delete: () => {}, + getAllSecrets: () => {}, + createSecret: () => {}, + getSecret: () => {}, + resolveSecret: () => {}, + resolveSecrets: () => {} + } + } + + public static updateSecret() {} + public static deleteSecret() {} + public static getAllSecrets() {} + public static getSecret() {} + public static resolveSecret() {} + public static resolveSecrets() {} +} diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json new file mode 100644 index 00000000..a59a7db6 --- /dev/null +++ b/packages/tsconfig/base.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": false, + "isolatedModules": true, + "moduleResolution": "node", + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true, + "strictNullChecks": true + }, + "exclude": ["node_modules"] + } \ No newline at end of file diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.json new file mode 100644 index 00000000..0c98f629 --- /dev/null +++ b/packages/tsconfig/nextjs.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "plugins": [{ "name": "next" }], + "allowJs": true, + "declaration": false, + "declarationMap": false, + "incremental": true, + "jsx": "preserve", + "lib": ["dom", "dom.iterable", "esnext"], + "module": "esnext", + "noEmit": true, + "resolveJsonModule": true, + "strict": false, + "target": "es5" + }, + "include": ["src", "next-env.d.ts"], + "exclude": ["node_modules"] + } \ No newline at end of file diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json new file mode 100644 index 00000000..f7b272e9 --- /dev/null +++ b/packages/tsconfig/package.json @@ -0,0 +1,9 @@ +{ + "name": "tsconfig", + "version": "0.0.0", + "private": true, + "license": "MIT", + "publishConfig": { + "access": "public" + } + } \ No newline at end of file diff --git a/packages/tsconfig/react-library.json b/packages/tsconfig/react-library.json new file mode 100644 index 00000000..e0fcf4e8 --- /dev/null +++ b/packages/tsconfig/react-library.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "React Library", + "extends": "./base.json", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["ES2015", "DOM"], + "module": "ESNext", + "target": "es6" + } + } \ No newline at end of file diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..3b900cf8 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,3 @@ +module.exports = { + plugins: ["prettier-plugin-tailwindcss"], +}; \ No newline at end of file diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index 2083a484..00000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "rootDir": ".", - "sourceMap": true, - "declaration": false, - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "target": "es2015", - "module": "esnext", - "lib": ["es2020", "dom"], - "skipLibCheck": true, - "skipDefaultLibCheck": true, - "baseUrl": ".", - - "paths": { - "cli": ["apps/cli/src/index.ts"] - }, - - "inlineSources": true, - "sourceRoot": "/" - }, - "exclude": ["node_modules", "tmp"] -} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..6b7962de --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "tsconfig/base.json" +} diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..d340d242 --- /dev/null +++ b/turbo.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "build": { + + "dependsOn": ["^build"], + + "outputs": [".next/**", "!.next/cache/**"] + }, + "deploy": { + + "dependsOn": ["build", "test", "lint"] + }, + "test": { + + "dependsOn": ["build"], + + "inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"] + }, + + "lint": {}, + "dev": { + "cache": false, + "persistent": true + } + } + } \ No newline at end of file