diff --git a/.dockerignore b/.dockerignore index 2f03a01..2b9daea 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ **/node_modules .git -*/dist \ No newline at end of file +**/dist +**/tsconfig.tsbuildinfo \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index f1ee5a6..a2e5bd1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -48,6 +48,18 @@ module.exports = { 'no-use-before-define': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'after-used', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], // Allow missing file extensions 'import/extensions': [ diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index be850ff..09bdc15 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -35,23 +35,3 @@ jobs: - name: Test run: yarn test - - e2e: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Build Test Environment, Stage 1 - run: docker-compose -f docker-compose.testing.yml build base backend app-test cypress - - - name: Build Test Quests - run: docker-compose -f docker-compose.testing.yml run --rm backend yarn build:quests - - - name: Run Cypress Tests - env: - GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} - GITHUB_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }} - GITHUB_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }} - run: docker-compose -f docker-compose.testing.yml run cypress diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..bf12175 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,24 @@ +name: E2E Tests + +on: [push, pull_request] + +jobs: + e2e: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Build Test Environment, Stage 1 + run: docker-compose -f docker-compose.testing.yml build base backend app-test cypress + + - name: Build Test Quests + run: docker-compose -f docker-compose.testing.yml run --rm backend yarn build:quests + + - name: Run Cypress Tests + env: + GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} + GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} + GITHUB_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }} + GITHUB_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }} + run: docker-compose -f docker-compose.testing.yml run cypress diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0c2f197..7adbef8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,23 +12,6 @@ jobs: uses: ./.github/workflows/ci-checks.yml secrets: inherit - code_review: - permissions: - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Code Review GPT - uses: mattzcarey/code-review-gpt@v0.1.4-alpha - with: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - MODEL: 'gpt-3.5-turbo' - GITHUB_TOKEN: ${{ github.token }} - build: - needs: ci-checks uses: ./.github/workflows/build.yml secrets: inherit diff --git a/README.md b/README.md index fd56c86..61bc910 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Run mongoDB first: - docker compose -f docker-compose.dev.yml up -d db + docker compose up -d The db will automatically restarts by Docker. diff --git a/app/Dockerfile b/app/Dockerfile index e5e4888..aa511c6 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -6,8 +6,9 @@ COPY package.json yarn.lock tsconfig.json ./ COPY packages/file-graph/package.json ./packages/file-graph/package.json COPY packages/utils/package.json ./packages/utils/package.json COPY packages/constants/package.json ./packages/constants/package.json +COPY packages/models/package.json ./packages/models/package.json COPY app/package.json ./app/package.json -RUN yarn install +RUN yarn install --frozen-lockfile # Dev stage FROM base as dev @@ -19,8 +20,8 @@ FROM base as build COPY packages/file-graph ./packages/file-graph COPY packages/utils ./packages/utils COPY packages/constants ./packages/constants +COPY packages/models ./packages/models COPY app ./app -RUN yarn workspace app build:refs RUN yarn workspace app build # Production stage diff --git a/app/index.html b/app/index.html index 5cc968a..040d38c 100644 --- a/app/index.html +++ b/app/index.html @@ -8,6 +8,6 @@
- + diff --git a/app/package.json b/app/package.json index 920e658..e689a4d 100644 --- a/app/package.json +++ b/app/package.json @@ -2,15 +2,15 @@ "name": "app", "private": true, "version": "0.0.0", - "type": "module", "scripts": { "dev": "vite", "dev:docker": "API_TARGET=http://backend:3000 vite", - "build": "vite build", - "build:refs": "tsc --build", + "build": "vue-tsc -b && vite build", + "type-check": "vue-tsc -b", "preview": "vite preview" }, "dependencies": { + "@formbricks/js": "^2.1.1", "@fortawesome/fontawesome-svg-core": "^6.4.0", "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-regular-svg-icons": "^6.4.0", @@ -18,11 +18,13 @@ "@fortawesome/vue-fontawesome": "^3.0.3", "@linux-odyssey/constants": "*", "@linux-odyssey/file-graph": "*", + "@linux-odyssey/models": "*", "@linux-odyssey/utils": "*", + "@types/dompurify": "^3.0.5", "axios": "^1.6.0", "dompurify": "^3.0.6", - "echarts": "^5.4.3", "marked": "^10.0.0", + "pinia": "^2.1.7", "socket.io-client": "^4.7.1", "validator": "^13.11.0", "vue": "^3.3.4", @@ -34,13 +36,14 @@ "xterm-addon-fit": "^0.7.0" }, "devDependencies": { + "@types/validator": "^13.11.9", "@vitejs/plugin-vue": "^4.5.2", "@vue/compiler-sfc": "^3.3.13", "autoprefixer": "^10.4.14", "postcss": "^8.4.31", "tailwindcss": "^3.3.3", "typescript": "^5.3.3", - "vite": "^4.5.2", - "vue-tsc": "^1.8.25" + "vite": "^4.5.3", + "vue-tsc": "^2.0.10" } } diff --git a/app/postcss.config.js b/app/postcss.config.ts similarity index 76% rename from app/postcss.config.js rename to app/postcss.config.ts index 2e7af2b..33ad091 100644 --- a/app/postcss.config.js +++ b/app/postcss.config.ts @@ -1,4 +1,4 @@ -export default { +module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, diff --git a/app/src/img/catelogbg.svg b/app/public/catelogbg.svg similarity index 100% rename from app/src/img/catelogbg.svg rename to app/public/catelogbg.svg diff --git a/app/src/components/AuthForm.vue b/app/src/components/AuthForm.vue index e4f4645..1f658af 100644 --- a/app/src/components/AuthForm.vue +++ b/app/src/components/AuthForm.vue @@ -1,4 +1,4 @@ - diff --git a/app/src/components/ContactButton.vue b/app/src/components/ContactButton.vue index c264443..77237ab 100644 --- a/app/src/components/ContactButton.vue +++ b/app/src/components/ContactButton.vue @@ -1,4 +1,4 @@ - diff --git a/app/src/components/DynamicBackground.vue b/app/src/components/DynamicBackground.vue index ef163c9..11bc5f6 100644 --- a/app/src/components/DynamicBackground.vue +++ b/app/src/components/DynamicBackground.vue @@ -1,26 +1,34 @@ -