diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index c240cd8..5440a2e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -1,12 +1,32 @@ -name: CI/CD Workflow +name: CI/CD on: push: - branches: - - main jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: yarn install + + - name: Lint + run: yarn lint + + - name: Test + run: yarn test + build-and-push: + needs: ci + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml deleted file mode 100644 index 01f475e..0000000 --- a/.github/workflows/eslint.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: ESLint Checks - -on: - push: - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: 20 - - - name: Install dependencies - run: yarn install - - - name: Lint - run: yarn lint diff --git a/app/Dockerfile b/app/Dockerfile index dd77845..30a17f7 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,14 +1,18 @@ # Build stage FROM node as build-stage WORKDIR /app -COPY app/package.json yarn.lock ./ -RUN yarn install -COPY app . +COPY package.json yarn.lock ./ +COPY app/package.json ./app/package.json +COPY packages/file-graph/package.json ./packages/file-graph/package.json +RUN yarn install --frozen-lockfile + +COPY app ./app +COPY packages/file-graph ./packages/file-graph RUN yarn build # Production stage FROM nginx:stable-alpine as production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html +COPY --from=build-stage /app/app/dist /usr/share/nginx/html COPY deployment/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/app/Dockerfile.dev b/app/Dockerfile.dev index 61d9568..a58a1cc 100644 --- a/app/Dockerfile.dev +++ b/app/Dockerfile.dev @@ -1,7 +1,10 @@ FROM node WORKDIR /app -COPY app/package.json yarn.lock ./ +COPY package.json yarn.lock ./ +COPY app/package.json ./app/package.json +COPY packages/file-graph/package.json ./packages/file-graph/package.json RUN yarn install --frozen-lockfile -COPY app . + +WORKDIR /app/app CMD [ "yarn", "dev:docker", "--host", "0.0.0.0" ] \ No newline at end of file diff --git a/app/package.json b/app/package.json index d38cd0b..1f168c2 100644 --- a/app/package.json +++ b/app/package.json @@ -11,6 +11,7 @@ "preview": "vite preview" }, "dependencies": { + "@linux-odyssey/file-graph": "*", "@fortawesome/fontawesome-svg-core": "^6.4.0", "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-regular-svg-icons": "^6.4.0", diff --git a/app/src/App.vue b/app/src/App.vue index e6e3717..3c94c4f 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -20,6 +20,9 @@ onMounted(async () => { console.log('Disconnected from the server.') }) socket.on('message', console.log) + socket.on('graph', (event) => { + sessionManager.handleGraphUpdate(event) + }) }) diff --git a/app/src/components/FileNode.vue b/app/src/components/FileNode.vue new file mode 100644 index 0000000..ee4636e --- /dev/null +++ b/app/src/components/FileNode.vue @@ -0,0 +1,29 @@ + + + diff --git a/app/src/components/TreeChart.vue b/app/src/components/TreeChart.vue index f5ab0e6..93c77b3 100644 --- a/app/src/components/TreeChart.vue +++ b/app/src/components/TreeChart.vue @@ -1,56 +1,16 @@ - +