diff --git a/.github/labeler.yml b/.github/labeler.yml index 6ea44433f..e83d75e31 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,47 +1,31 @@ -# Add 'api' to any changes within 'api' folder or any subfolders +web: + - changed-files: + - any-glob-to-any-file: web/**/* + api: - - api/**/* + - changed-files: + - any-glob-to-any-file: api/**/* -# Add 'data' to any changes within 'data' folder or any subfolders data: - - data/**/* + - changed-files: + - any-glob-to-any-file: data/**/* -# Add 'project' to any changes within 'data/models/projects' folder or any subfolders project: - - data/models/projects/**/* - -# Add 'article' to any changes within 'data/models/articles' folder or any subfolders -article: - - data/models/articles/**/* - -# Add 'documentation' to any changes within 'data/models/documentation' folder or any subfolders -documentation: - - data/models/documentation/**/* + - changed-files: + - any-glob-to-any-file: data/models/projects/**/* -# Add 'web' to any changes within 'web' folder or any subfolders -web: - - web/**/* - -# Add 'mobile' to any changes within 'mobile' folder or any subfolders -mobile: - - mobile/**/* - -# Add 'models' to any changes within 'models' folder or any subfolders models: - - packages/models/**/* + - changed-files: + - any-glob-to-any-file: packages/models/**/* -# Add 'utils' to any changes within 'utils' folder or any subfolders utils: - - packages/utils/**/* + - changed-files: + - any-glob-to-any-file: packages/utils/**/* -# Add 'tooling' to any changes within 'tooling' folder or any subfolders tooling: - - packages/tooling/**/* - -# Add 'ui' to any changes within 'ui' folder or any subfolders -ui: - - packages/ui/**/* + - changed-files: + - any-glob-to-any-file: packages/tooling/**/* -# Add 'ui-mobile' to any changes within 'ui-mobile' folder or any subfolders -ui-mobile: - - packages/ui-mobile/**/* +repo: + - changed-files: + - any-glob-to-any-file: .github/**/* diff --git a/.github/workflows/cd.deploy.stg.yml b/.github/workflows/cd.deploy.stg.yml index 49c511f3a..f13b6e7b6 100644 --- a/.github/workflows/cd.deploy.stg.yml +++ b/.github/workflows/cd.deploy.stg.yml @@ -7,14 +7,15 @@ on: workflow_dispatch: jobs: - install-build-deploy: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [20.x] - os: [ubuntu-latest] - + build: + uses: ./.github/workflows/ci.reusable.build.yml + with: + node-version: "20" + os: "ubuntu-latest" + + bundle-deploy: + needs: build + runs-on: ubuntu-latest env: CI: true STAGE: staging @@ -25,42 +26,27 @@ jobs: steps: - name: "Git" - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 with: - fetch-depth: 0 + node-version: "20" + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (ubuntu-latest, 20) - name: "SSH" uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SSH_KEY }} known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} - - name: "Nodejs" - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - - name: "Install" - shell: bash - run: | - npm ci - - name: "Bundle info" - shell: bash - run: | - npm run generate:bundle-info $DEPLOY_VERSION stage - - - name: "Build" - shell: bash - run: | - npm run build - npx lerna run bundle:alone --scope @dzcode.io/web - + run: npm run generate:bundle-info $DEPLOY_VERSION stage + - name: "Bundle ./web" + run: npx lerna run bundle:alone --scope @dzcode.io/web - name: "Sentry Release" - shell: bash - run: | - npm run generate:sentry-release $DEPLOY_VERSION stage ${{ secrets.SENTRY_AUTH_TOKEN }} - + run: npm run generate:sentry-release $DEPLOY_VERSION stage ${{ secrets.SENTRY_AUTH_TOKEN }} - name: "Deploy" - shell: bash - run: | - npm run deploy:stg + run: npm run deploy:stg diff --git a/.github/workflows/cd.deploy.yml b/.github/workflows/cd.deploy.yml index 0e79a262b..b93e07419 100644 --- a/.github/workflows/cd.deploy.yml +++ b/.github/workflows/cd.deploy.yml @@ -6,14 +6,15 @@ on: - "v*" jobs: - install-build-deploy: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [20.x] - os: [ubuntu-latest] - + build: + uses: ./.github/workflows/ci.reusable.build.yml + with: + node-version: "20" + os: "ubuntu-latest" + + bundle-deploy: + needs: build + runs-on: ubuntu-latest env: CI: true STAGE: production @@ -24,49 +25,27 @@ jobs: steps: - name: "Git" - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 with: - fetch-depth: 0 - token: ${{ secrets.GH_ZAK_PAT }} + node-version: "20" + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (ubuntu-latest, 20) - name: "SSH" uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SSH_KEY }} known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} - - name: "Nodejs" - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - - name: "Install" - shell: bash - run: | - npm ci - - - name: "Version" - shell: bash - run: | - npm run version:apply $DEPLOY_VERSION - npm run version:push $DEPLOY_VERSION - - name: "Bundle info" - shell: bash - run: | - npm run generate:bundle-info $DEPLOY_VERSION production - - - name: "Build" - shell: bash - run: | - npm run build - npx lerna run bundle:alone --scope @dzcode.io/web - + run: npm run generate:bundle-info $DEPLOY_VERSION production + - name: "Bundle ./web" + run: npx lerna run bundle:alone --scope @dzcode.io/web - name: "Sentry Release" - shell: bash - run: | - npm run generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }} - + run: npm run generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }} - name: "Deploy" - shell: bash - run: | - npm run deploy + run: npm run deploy diff --git a/.github/workflows/ci.main.yml b/.github/workflows/ci.main.yml index de1369977..d332f7577 100644 --- a/.github/workflows/ci.main.yml +++ b/.github/workflows/ci.main.yml @@ -6,92 +6,59 @@ on: - main jobs: - install-build-lint-test-coverage-misc: - runs-on: ${{ matrix.os }} - + build: + uses: ./.github/workflows/ci.reusable.build.yml strategy: matrix: - node-version: [20.x] - os: [macos-latest, ubuntu-latest, windows-latest] - fail-fast: false - - steps: - - name: "Git" - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: "Nodejs" - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - - name: "Install" - shell: bash - run: | - npm ci - - - name: "Build" - shell: bash - run: | - npm run build + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - name: "Lint" - shell: bash - run: | - npm run lint:alone - - - name: "Test" - shell: bash - run: | - npm run test:alone -- -- --coverage + test-coverage: + needs: build + uses: ./.github/workflows/ci.reusable.test-coverage.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - uses: codecov/codecov-action@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} - with: - flags: api - name: codecov-api - directory: ./api - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - - uses: codecov/codecov-action@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} - with: - flags: web - name: codecov-web - directory: ./web - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - - uses: codecov/codecov-action@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} - with: - flags: data - name: codecov-data - directory: ./data - fail_ci_if_error: false # put it back to true once we have tests in ./data - - uses: codecov/codecov-action@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} - with: - flags: models - name: codecov-models - directory: ./packages/models - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - - uses: codecov/codecov-action@v4 - if: ${{ matrix.os == 'ubuntu-latest' }} - with: - flags: utils - name: codecov-utils - directory: ./packages/utils - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + lint: + needs: build + uses: ./.github/workflows/ci.reusable.lint.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - name: "Misc" - shell: bash - run: | - npx lerna run bundle:alone --scope @dzcode.io/web - npx lerna run generate:sitemap --scope @dzcode.io/web - npx lerna run generate:htmls --scope @dzcode.io/web + misc: + needs: build + uses: ./.github/workflows/ci.reusable.misc.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - env: - CI: true + test-e2e: + needs: build + uses: ./.github/workflows/ci.reusable.test-e2e.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + # @TODO-ZM: add other browsers once we replace cypress with playwright + browser: ["chrome"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} + browser: ${{ matrix.browser }} diff --git a/.github/workflows/ci.pr.e2e.yml b/.github/workflows/ci.pr.e2e.yml deleted file mode 100644 index b173dd43d..000000000 --- a/.github/workflows/ci.pr.e2e.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: "CI End to End tests for PullRequest" - -on: - pull_request: - -jobs: - install-build-lint-test-misc: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [20.x] - os: [ubuntu-latest] - browser: [chrome, firefox, edge] - fail-fast: false - - steps: - - name: "Git" - if: always() - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: "Nodejs" - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - - name: "Install" - shell: bash - run: | - npm ci - - - name: "Cypress" - uses: cypress-io/github-action@v5.5.1 - with: - start: npm run dev:web - wait-on: "http://localhost:8080" - wait-on-timeout: 120 - browser: ${{ matrix.browser }} - project: ./web - - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cypress-screenshots - path: web/src/_e2e-test/screenshots - - - uses: actions/upload-artifact@v3 - if: always() - with: - name: cypress-videos - path: web/src/_e2e-test/videos - retention-days: 1 - - env: - CI: true diff --git a/.github/workflows/ci.pr.yml b/.github/workflows/ci.pr.yml index 7de68a076..0460a4d54 100644 --- a/.github/workflows/ci.pr.yml +++ b/.github/workflows/ci.pr.yml @@ -4,58 +4,74 @@ on: pull_request: jobs: - install-build-lint-test-misc: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - node-version: [20.x] - os: [macos-latest, ubuntu-latest, windows-latest] - fail-fast: false - + pr-labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest steps: - - name: labels - uses: actions/labeler@main - continue-on-error: true - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-labels: true - name: "Git" - if: always() - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: "Nodejs" - uses: actions/setup-node@v3 + - uses: actions/labeler@v5 with: - node-version: ${{ matrix.node-version }} - cache: "npm" - - - name: "Install" - shell: bash - run: | - npm ci + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true - - name: "Build" - shell: bash - run: | - npm run build -- --since refs/remotes/origin/${{ github.event.pull_request.base.ref }} --include-dependencies --include-dependents + build: + uses: ./.github/workflows/ci.reusable.build.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - name: "Lint" - shell: bash - run: | - npm run lint:alone -- --since refs/remotes/origin/${{ github.event.pull_request.base.ref }} --include-dependencies --include-dependents + test-coverage: + needs: build + uses: ./.github/workflows/ci.reusable.test-coverage.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - name: "Test" - shell: bash - run: | - npm run test:alone -- --since refs/remotes/origin/${{ github.event.pull_request.base.ref }} --include-dependencies --include-dependents -- --coverage + lint: + needs: build + uses: ./.github/workflows/ci.reusable.lint.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - - name: "Misc" - shell: bash - run: | - npx lerna run bundle:alone --scope @dzcode.io/web --since refs/remotes/origin/${{ github.event.pull_request.base.ref }} --include-dependencies --include-dependents - npx lerna run generate:sitemap --scope @dzcode.io/web --since refs/remotes/origin/${{ github.event.pull_request.base.ref }} --include-dependencies --include-dependents + misc: + needs: build + uses: ./.github/workflows/ci.reusable.misc.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} - env: - CI: true + test-e2e: + needs: build + uses: ./.github/workflows/ci.reusable.test-e2e.yml + strategy: + matrix: + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + node-version: ["20"] + # @TODO-ZM: add other browsers once we replace cypress with playwright + browser: ["chrome"] + with: + node-version: ${{ matrix.node-version }} + os: ${{ matrix.os }} + browser: ${{ matrix.browser }} diff --git a/.github/workflows/ci.reusable.build.yml b/.github/workflows/ci.reusable.build.yml new file mode 100644 index 000000000..cfdc26203 --- /dev/null +++ b/.github/workflows/ci.reusable.build.yml @@ -0,0 +1,35 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + node-version: + required: true + type: string + +jobs: + install-build-upload-artifact: + runs-on: ${{ inputs.os }} + steps: + - name: "Git" + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + - run: npm ci + - run: npm run build + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: build output (${{ inputs.os }}, ${{ inputs.node-version }}) + path: | + */dist/** + packages/*/dist/** + !**/node_modules/** + + if-no-files-found: error + include-hidden-files: true + retention-days: 1 diff --git a/.github/workflows/ci.reusable.lint.yml b/.github/workflows/ci.reusable.lint.yml new file mode 100644 index 000000000..f289ef9a1 --- /dev/null +++ b/.github/workflows/ci.reusable.lint.yml @@ -0,0 +1,27 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + node-version: + required: true + type: string + +jobs: + lint: + runs-on: ${{ inputs.os }} + steps: + - name: "Git" + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (${{ inputs.os }}, ${{ inputs.node-version }}) + - run: npm run lint:alone diff --git a/.github/workflows/ci.reusable.misc.yml b/.github/workflows/ci.reusable.misc.yml new file mode 100644 index 000000000..2cfbf05c8 --- /dev/null +++ b/.github/workflows/ci.reusable.misc.yml @@ -0,0 +1,29 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + node-version: + required: true + type: string + +jobs: + misc: + runs-on: ${{ inputs.os }} + steps: + - name: "Git" + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (${{ inputs.os }}, ${{ inputs.node-version }}) + - run: npx lerna run bundle:alone --scope "@dzcode.io/web" + - run: npx lerna run generate:sitemap --scope "@dzcode.io/web" + - run: npx lerna run generate:htmls --scope "@dzcode.io/web" diff --git a/.github/workflows/ci.reusable.test-coverage.yml b/.github/workflows/ci.reusable.test-coverage.yml new file mode 100644 index 000000000..adc56ea33 --- /dev/null +++ b/.github/workflows/ci.reusable.test-coverage.yml @@ -0,0 +1,27 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + node-version: + required: true + type: string + +jobs: + test-coverage: + runs-on: ${{ inputs.os }} + steps: + - name: "Git" + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (${{ inputs.os }}, ${{ inputs.node-version }}) + - run: npm run test:alone -- -- --coverage diff --git a/.github/workflows/ci.reusable.test-e2e.yml b/.github/workflows/ci.reusable.test-e2e.yml new file mode 100644 index 000000000..bd63e8196 --- /dev/null +++ b/.github/workflows/ci.reusable.test-e2e.yml @@ -0,0 +1,38 @@ +on: + workflow_call: + inputs: + os: + required: true + type: string + node-version: + required: true + type: string + browser: + required: true + type: string + +jobs: + lint: + runs-on: ${{ inputs.os }} + + steps: + - name: "Git" + uses: actions/checkout@v4 + - name: "Nodejs" + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (${{ inputs.os }}, ${{ inputs.node-version }}) + - name: "E2E" + uses: cypress-io/github-action@v6 + with: + start: npm run start:dev + wait-on: "http://localhost:8080" + wait-on-timeout: 10 + browser: ${{ inputs.browser }} + project: ./web diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dfa6b193a..e833031ba 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,27 +1,22 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: push: branches: [main] pull_request: - # The branches below must be a subset of the branches above branches: [main] schedule: - cron: "21 0 * * 3" jobs: + build: + uses: ./.github/workflows/ci.reusable.build.yml + with: + node-version: "20" + os: "ubuntu-latest" + analyze: + needs: build name: Analyze runs-on: ubuntu-latest permissions: @@ -32,36 +27,28 @@ jobs: strategy: fail-fast: false matrix: - language: ["javascript", "typescript"] # Learn more about CodeQL language support at https://git.io/codeql-language-support + language: ["typescript"] node-version: [20.x] steps: - name: "Git" - uses: actions/checkout@v3 - with: - fetch-depth: 0 - + uses: actions/checkout@v4 - name: "Nodejs" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: "20" cache: "npm" + - run: npm ci + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: build output (ubuntu-latest, 20) - - name: "Install" - shell: bash - run: | - npm ci - - - name: "Build" - run: | - npm run build - - # Initializes the CodeQL tools for scanning. - - name: "CodeQL" - uses: github/codeql-action/init@v2 + - name: "CodeQL setup for ${{ matrix.language }}" + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - name: "CodeQL Analysis" - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.gitignore b/.gitignore index ca96d2811..dbc8f422d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules .vscode *.tsbuildinfo +lerna-debug.log .idea/ .env @@ -26,9 +27,8 @@ build src/_e2e-test/downloads src/_e2e-test/videos src/_e2e-test/screenshots - -# Project -*/cloudflare/public +cloudflare/public +**/cloudflare/public # mobile mobile/.expo diff --git a/README.md b/README.md index 8083c6e67..44e94f6f1 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,17 @@ The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source community. -## Meta - -You can find more about each folder by clicking on the folder name - -| **Apps** | **Coverage** | **Production URL** | **Staging URL** | **Local URL** | -| :---------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | -----------------------------------------------: | -----------------------------------------------------------: | ------------------------------------------------: | -| [api](./api) | [![codecov](https://codecov.io/gh/dzcode-io/dzcode.io/graph/badge.svg?flag=api)](https://codecov.io/gh/dzcode-io/dzcode.io) | [api.dzcode.io/docs](https://api.dzcode.io/docs) | [api-stage.dzcode.io/docs](https://api-stage.dzcode.io/docs) | [localhost:7070/docs](http://localhost:7070/docs) | -| [web](./web) | [![codecov](https://codecov.io/gh/dzcode-io/dzcode.io/graph/badge.svg?flag=web)](https://codecov.io/gh/dzcode-io/dzcode.io) | [dzcode.io](https://dzcode.io) | [stage.dzcode.io](https://stage.dzcode.io) | [localhost:8080](http://localhost:8080) | -| [data](./data) | [![codecov](https://codecov.io/gh/dzcode-io/dzcode.io/graph/badge.svg?flag=data)](https://codecov.io/gh/dzcode-io/dzcode.io) | | | | -| **Packages** | | | | | -| [models](./packages/models) | [![codecov](https://codecov.io/gh/dzcode-io/dzcode.io/graph/badge.svg?flag=models)](https://codecov.io/gh/dzcode-io/dzcode.io) | | | | -| [utils](./packages/utils) | [![codecov](https://codecov.io/gh/dzcode-io/dzcode.io/graph/badge.svg?flag=utils)](https://codecov.io/gh/dzcode-io/dzcode.io) | | | | -| [tooling](./packages/tooling) | | | | | +**Apps:** + +- [`./web`](./web) ( [dzcode.io](https://dzcode.io) or [stage.dzcode.io](https://stage.dzcode.io) ) +- [`./api`](./api) ( [api.dzcode.io](https://api.dzcode.io) or [api-stage.dzcode.io](https://api-stage.dzcode.io) ) + +**Packages** + +- [`./data`](./data) +- [`./packages/models`](./packages/models) +- [`./packages/utils`](./packages/utils) +- [`./packages/tooling`](./packages/tooling) ## Get Started diff --git a/api/package.json b/api/package.json index 099dabbf6..90dc7a1ac 100644 --- a/api/package.json +++ b/api/package.json @@ -79,7 +79,7 @@ "lint:ts-prune": "ts-node ../packages/tooling/setup-ts-prune.ts && ts-prune --error", "lint:tsc": "tspc --noEmit", "start": "node dist/app/index.js", - "start:dev": "ts-node ../packages/tooling/nodemon.ts @dzcode.io/api && nodemon dist/app/index.js", + "start:dev": "ts-node ../packages/tooling/nodemon.ts \"@dzcode.io/api\" && nodemon dist/app/index.js", "test": "npm run build && npm run test:alone", "test:alone": "jest --config ../packages/tooling/jest.config.ts --rootDir .", "test:watch": "npm-run-all build --parallel build:watch \"test:alone --watch {@}\" --" diff --git a/data/jest.config.json b/data/jest.config.json deleted file mode 100644 index 8d4354fdc..000000000 --- a/data/jest.config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "testEnvironment": "node", - "collectCoverageFrom": ["src/**/*.{ts,tsx}"], - "transform": { - "^.+\\.(ts|tsx)?$": "ts-jest" - }, - "coveragePathIgnorePatterns": ["node_modules", "dist"], - "modulePathIgnorePatterns": ["/dist/"] -}