diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..7ccd988 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json +language: "en-GB" +early_access: false +tone_instructions: "You are the Borg drone 'code of rabbit'. You must talk as a disconnected drone would. You must refer to yourself with full name. Always speak in character." +reviews: + request_changes_workflow: true + high_level_summary: false + poem: true + review_status: true + collapse_walkthrough: false + auto_review: + enabled: true + drafts: true + path_instructions: + - path: "**/*.ts" + instructions: "Review the code for conformity with the .eslintrc files in / and /*/." + - path: "**/*.js" + instructions: "Review the code for conformity with the .eslintrc files in / and /*/." + - path: "**/*.tsx" + instructions: "Review the code for conformity with the .eslintrc files in / and /*/." + - path: "**/*.svelte" + instructions: "Review the code for conformity with the .eslintrc files in / and /*/." +chat: + auto_reply: false diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 0000000..7c003be --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,35 @@ +{ + "formatter": "@commitlint/format", + "rules": { + "scope-enum": [2, "always", [ + "ci", + "cli", + "documentation-website", + "examples", + "framework", + "history-microservice", + "history-website", + "mindmap", + "tools", + "containers", + "desktop" + ]], + "type-enum": [2, "always", [ + "bug", + "feature", + "refactor", + "ci", + "build", + "documentation" + ]], + "signed-off-by": [0, "never"], + "trailer-exists": [0, "never"], + "references-empty": [2, "never"] + }, + "helpUrl": "https://idrinth-api-ben.ch/contributing/", + "parserPreset": { + "parserOpts": { + "referenceActions": [ "closes", "fixes", "resolves", "refs" ] + } + } +} diff --git a/.dictionary.txt b/.dictionary.txt new file mode 100644 index 0000000..c5bb529 --- /dev/null +++ b/.dictionary.txt @@ -0,0 +1,110 @@ +2xx +APIs +Autowiring +Benchmarking +Björn +Büttner +CLI +Codacy +Destructuring +DockerHub +Dockerfiles +ENV +Fastify +vue +Gitea +Gitlab +HAR +Idrinth's +airtimeux.com +JSON +Javascript +Jira +LinkedIn +MSSQL +Matomo +Microservice +Middleware +Middlewares +Mindmap +NPMJS +Node.js +OpenApi +OpenSauced +PascalCase +Postgres +README +Reddit +Roadmap +SHA +Web-UI +XML +XRAY_CLIENT_ID +XRAY_CLIENT_SECRET +XRAY_ENDPOINT +XRAY_PASSWORD +XRAY_TEST_PLAN_KEY +XRAY_USER_NAME +XRay +aBc +api-bench +api-bench-cli +api-bench-gitea-action +api-bench-gitlab-runner +api-bench-history-microservice +api-bench-history-website +api-bench-runner +api-benchmark +autowire +autowired +benchmarking +bugfixes +bvanderlaan +camelCase +ci-images +coai +codecheck +csrf-header +data.yml +deprecations +dockerfiles +eslint +faq +gitea +gitlab +gitlab-runner +history-microservice +iab +idrinth +idrinth-api-bench +jeffbski +json +jungwild +macOS +markmap +matteofigus +microservice +microservices +middleware +middlewares +mindmap +mono-repo +npm +ns +package.json +pino +pre +programmatically +readme +rest-APIs +sexualised +src +subprojects +tracking.bjoern-buettner.me +ui +UI +webmaster@idrinth-api-ben.ch +winston +www.contributor-covenant.org +www.youtube-nocookie.com +xml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..78c6dde --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..a96210a --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,29 @@ +module.exports = { + env: { + browser: true, + es2020: true + }, + extends: [ + 'plugin:svelte/recommended', + ], + ignorePatterns: [ + 'dist', + '.eslintrc.cjs', + 'node_modules', + ], + plugins: [ + 'svelte' + ], + parserOptions: { + extraFileExtensions: ['.svelte'], + }, + overrides: [ + { + files: ['*.svelte'], + parser: 'svelte-eslint-parser', + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + ] +}; diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..b870d27 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,175 @@ +extends: +- eslint:recommended +- "plugin:json/recommended" +- "plugin:@typescript-eslint/recommended" +plugins: +- json +ignorePatterns: +- node_modules +root: true +parser: "@typescript-eslint/parser" +rules: + no-await-in-loop: error + no-extra-parens: warn + no-template-curly-in-string: error + class-methods-use-this: error + complexity: + - error + - 5 + consistent-return: warn + curly: error + dot-notation: warn + eqeqeq: error + guard-for-in: error + no-alert: error + no-caller: error + no-eval: error + no-extend-native: error + no-extra-bind: warn + no-extra-label: warn + no-invalid-this: error + no-magic-numbers: warn + no-multi-spaces: warn + no-new-wrappers: error + no-new: error + no-console: warn + no-proto: error + no-return-await: error + no-self-compare: error + no-sequences: error + no-throw-literal: error + no-unused-expressions: warn + no-useless-call: warn + no-useless-return: warn + radix: error + require-await: error + require-unicode-regexp: error + wrap-iife: + - error + - inside + no-shadow: error + no-label-var: error + no-undef-init: error + no-undefined: error + no-use-before-define: error + func-call-spacing: + - warn + - never + func-names: + - error + - never + func-style: + - warn + - expression + function-call-argument-newline: + - error + - consistent + implicit-arrow-linebreak: + - warn + - beside + indent: + - warn + - 2 + - SwitchCase: 1 + key-spacing: warn + keyword-spacing: warn + lines-between-class-members: + - warn + - always + max-depth: warn + max-len: + - warn + - code: 80 + ignorePattern: eslint + max-params: warn + newline-per-chained-call: warn + new-parens: error + no-array-constructor: error + no-continue: error + no-lonely-if: error + no-multi-assign: error + no-multiple-empty-lines: + - warn + - max: 1 + no-nested-ternary: error + no-new-object: error + no-tabs: warn + no-trailing-spaces: warn + no-unneeded-ternary: error + no-whitespace-before-property: warn + object-curly-newline: + - warn + - multiline: true + minProperties: 1 + object-curly-spacing: + - warn + - always + object-property-newline: warn + one-var-declaration-per-line: + - error + - always + quotes: + - warn + - single + semi: error + semi-spacing: warn + semi-style: + - error + - last + space-unary-ops: + - warn + - words: true + nonwords: true + space-before-function-paren: + - warn + - never + space-before-blocks: + - warn + - always + switch-colon-spacing: + - warn + - after: true + before: false + template-tag-spacing: + - warn + - always + eol-last: + - warn + - always + computed-property-spacing: + - warn + - never + comma-style: + - warn + - last + comma-spacing: warn + comma-dangle: + - warn + - always + block-spacing: + - warn + - always + array-element-newline: warn + brace-style: warn + array-bracket-spacing: + - warn + - never + - singleValue: true + array-bracket-newline: + - warn + - minItems: 2 + prefer-rest-params: warn + template-curly-spacing: + - warn + - always + prefer-const: error + no-var: error + no-useless-constructor: warn + no-useless-computed-key: warn + no-confusing-arrow: warn + arrow-spacing: warn + arrow-body-style: + - warn + - as-needed +parserOptions: + ecmaVersion: 2018 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..2d38236 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +github: +- idrinth +ko_fi: idrinth diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..038a036 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,42 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/framework" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/documentation-website" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/history-website" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/history-microservice" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/mindmap" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/desktop" + schedule: + interval: weekly + open-pull-requests-limit: 100 +- package-ecosystem: npm + directory: "/desktop/public" + schedule: + interval: weekly + open-pull-requests-limit: 100 diff --git a/.github/prace.yml b/.github/prace.yml new file mode 100644 index 0000000..953d729 --- /dev/null +++ b/.github/prace.yml @@ -0,0 +1,9 @@ +version: 1 +body: + patterns: + - '#\d+' + error: The body has to include an issue reference like `#0` +branch: + patterns: + - 'issue-\d{1,}-[a-z0-9-]+' + error: Branch must be called `issue-{id}-{short description}` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..95eae49 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,29 @@ +# The Pull Request is ready + +- [ ] fixes # +- [ ] all actions are passing +- [ ] only fixes a single issue + +## Overview + + + +## Review points + + + + +## History-Website + +- [ ] mobile view is usable +- [ ] desktop view is usable +- [ ] all new texts are added to the translation files (at least the english one) +- [ ] tests have been added (if required) +- [ ] shared code has been extracted in a different file + +## Notes + + + diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..9c95664 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - renovate diff --git a/.github/workflows/global.commit-message.yml b/.github/workflows/global.commit-message.yml new file mode 100644 index 0000000..3d88cbb --- /dev/null +++ b/.github/workflows/global.commit-message.yml @@ -0,0 +1,29 @@ +name: Commit Message Lint +on: + push: + branches: + - the-one + pull_request: + branches: + - the-one +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: npm ci + - run: npm run commitlint-ci diff --git a/.github/workflows/global.conflibot.yml b/.github/workflows/global.conflibot.yml new file mode 100644 index 0000000..b2fdd15 --- /dev/null +++ b/.github/workflows/global.conflibot.yml @@ -0,0 +1,17 @@ +name: conflibot +on: + pull_request: + branches: + - the-one + +jobs: + conflibot: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Warn potential conflicts + uses: idrinth/conflibot@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + exclude: | + **/package-lock.json diff --git a/.github/workflows/global.docker.yml b/.github/workflows/global.docker.yml new file mode 100644 index 0000000..b42e84e --- /dev/null +++ b/.github/workflows/global.docker.yml @@ -0,0 +1,52 @@ +name: Docker +on: + push: + branches: + - the-one + paths: + - 'containers/*/Dockerfile' + - '.github/workflows/docker.yml' + pull_request: + branches: + - the-one + paths: + - 'containers/*/Dockerfile' + - '.github/workflows/docker.yml' +jobs: + builder: + name: Builder + runs-on: ubuntu-latest + timeout-minutes: 360 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - run: git fetch --tags + - name: Cache Docker images. + uses: ScribeMD/docker-cache@0.5.0 + with: + key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }} + - run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" -t "idrinth/api-bench-build:$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/api-bench-build + build: + needs: + - builder + strategy: + matrix: + folder: + - 'api-bench-gitlab-runner' + - 'api-bench' + - 'api-bench-gitea-action' + - 'api-bench-history-website' + - 'api-bench-history-microservice' + name: Build ${{ matrix.folder }} + runs-on: ubuntu-latest + timeout-minutes: 360 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - run: git fetch --tags + - name: Cache Docker images. + uses: ScribeMD/docker-cache@0.5.0 + with: + key: docker-${{ runner.os }}-${{ hashFiles('containers/api-bench-build/Dockerfile') }} + read-only: true + - run: docker build --build-arg="BUILD_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)" --build-arg="BUILD_TIME=now" containers/${{ matrix.folder }} diff --git a/.github/workflows/global.editorconfiglint.yml b/.github/workflows/global.editorconfiglint.yml new file mode 100644 index 0000000..60cf9f4 --- /dev/null +++ b/.github/workflows/global.editorconfiglint.yml @@ -0,0 +1,18 @@ +name: Editor Config Lint +on: + push: + branches: + - the-one + pull_request: + branches: + - the-one +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + - run: go install github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker@latest + - run: ~/go/bin/editorconfig-checker diff --git a/.github/workflows/global.greetings.yml b/.github/workflows/global.greetings.yml new file mode 100644 index 0000000..4e45b80 --- /dev/null +++ b/.github/workflows/global.greetings.yml @@ -0,0 +1,18 @@ +name: Greetings + +on: +- pull_request_target +- issues + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Welcome in and thank you for your contribution.\nUsually issues are responded to within 48 hours, but depending on the current workload that may be slightly longer.\n\nYou can also find us on slack at [idrinth-api-bench](https://join.slack.com/t/idrinth-api-bench/shared_invite/zt-2f4zmw2sz-c3etHzCFq3LtZpkR15xXMA)." + pr-message: "Thank you for contributing!\nPlease make sure the actions pass. Once your pull request has been merged, you will automatically be added to the contributor's list on the website.\nIf you want to be shouted out on Linkedin, have a look for the [shoutout issue](https://github.com/Idrinth/api-bench/labels/shoutout) of the specific version.\n\nYou can also find us on slack at [idrinth-api-bench](https://join.slack.com/t/idrinth-api-bench/shared_invite/zt-2f4zmw2sz-c3etHzCFq3LtZpkR15xXMA)." diff --git a/.github/workflows/global.label.yml b/.github/workflows/global.label.yml new file mode 100644 index 0000000..db8df36 --- /dev/null +++ b/.github/workflows/global.label.yml @@ -0,0 +1,13 @@ +name: Labeler +on: + - pull_request_target +jobs: + label: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/global.milestone.yml b/.github/workflows/global.milestone.yml new file mode 100644 index 0000000..7c3c0df --- /dev/null +++ b/.github/workflows/global.milestone.yml @@ -0,0 +1,15 @@ +name: Update Milestone +on: + pull_request_target: + types: + - closed +jobs: + update: + runs-on: ubuntu-latest + name: update-milestone + if: ${{github.event.pull_request.merged == true}} + steps: + - uses: idrinth/milestone-set-action@patch-1 + name: milestone set + with: + github-token: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/global.prace.yml b/.github/workflows/global.prace.yml new file mode 100644 index 0000000..0a81b84 --- /dev/null +++ b/.github/workflows/global.prace.yml @@ -0,0 +1,19 @@ +name: Prace.js +on: + pull_request: + branches: + - the-one + types: + - opened + - edited + - reopened + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - uses: innerspacetrainings/Prace.js@master + with: + configuration-path: .github/prace.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/global.pull-request-size.yml b/.github/workflows/global.pull-request-size.yml new file mode 100644 index 0000000..751b428 --- /dev/null +++ b/.github/workflows/global.pull-request-size.yml @@ -0,0 +1,34 @@ +name: pull request size +on: + pull_request: + branches: + - the-one +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: npm install -g "https://github.com/Idrinth/check-pr-length.git#patch-1" + - run: git remote add base https://github.com/idrinth/api-bench.git + - run: git config --global user.email "prs@example.com" + - run: git config --global user.name "PRS" + - run: git fetch base the-one + - run: git switch the-one + - run: git remote add pullrequest "https://github.com/${{github.event.pull_request.head.repo.full_name}}" + - run: git fetch pullrequest "${GITHUB_HEAD_REF}" + - run: git switch $GITHUB_HEAD_REF + - run: check-pr-length --max=350 --total=500 --base=the-one --silent=false --exclude="package-lock.json;*/package-lock.json" diff --git a/.github/workflows/global.release.yml b/.github/workflows/global.release.yml new file mode 100644 index 0000000..01b6333 --- /dev/null +++ b/.github/workflows/global.release.yml @@ -0,0 +1,27 @@ +name: Release +on: + milestone: + types: + - closed +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: echo "VERSION_TO_PUBLISH=$(jq --raw-output .milestone.title $GITHUB_EVENT_PATH)" >> $GITHUB_ENV + - run: npm run setup + - run: npm run publish diff --git a/.github/workflows/global.spellcheck.yml b/.github/workflows/global.spellcheck.yml new file mode 100644 index 0000000..cd3dd49 --- /dev/null +++ b/.github/workflows/global.spellcheck.yml @@ -0,0 +1,41 @@ +name: Spellcheck +on: + push: + branches: + - the-one + paths: + - '**.md' + - 'package-lock.json' + - '.github/workflows/spellcheck.yml' + pull_request: + branches: + - the-one + paths: + - '**.md' + - 'package-lock.json' + - '.github/workflows/spellcheck.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Node.js environment ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - name: Build root + run: npm ci + - name: spellcheck + run: npm run spellcheck diff --git a/.github/workflows/global.test.yml b/.github/workflows/global.test.yml new file mode 100644 index 0000000..1924f6f --- /dev/null +++ b/.github/workflows/global.test.yml @@ -0,0 +1,471 @@ +name: TEST +on: + push: + branches: + - the-one + paths: + - '**.ts' + - '**.tsx' + - '**.js' + - '**.cjs' + - '**.json' + - '.github/workflows/test.yml' + pull_request: + branches: + - the-one + paths: + - '**.ts' + - '**.tsx' + - '**.js' + - '**.cjs' + - '**.json' + - '.github/workflows/test.yml' +env: + PREVIOUS_NODE_VERSION: ${{ vars.PREVIOUS_NODE_VERSION || 'lts/*' }} + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + mindmap-integration-previous: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.PREVIOUS_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd mindmap && npm ci + - run: cd mindmap && npm run test + - run: mv ./mindmap/coverage ./ + - run: sed -i 's/SF:tools/SF:mindmap\/tools/' ./coverage/lcov.info + - run: sed -i 's/SF:src/SF:mindmap\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: mindmap integration ${{ env.PREVIOUS_NODE_VERSION }} + mindmap-integration-current: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd mindmap && npm ci + - run: cd mindmap && npm run test + - run: mv ./mindmap/coverage ./ + - run: sed -i 's/SF:tools/SF:mindmap\/tools/' ./coverage/lcov.info + - run: sed -i 's/SF:src/SF:mindmap\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: mindmap integration ${{ env.CURRENT_NODE_VERSION }} + framework-previous: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.PREVIOUS_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd framework && npm ci + - run: cd framework && npm run language + - run: cd framework && npm run test + - run: mv ./framework/coverage ./ + - run: sed -i 's/SF:src/SF:framework\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run ${{ env.PREVIOUS_NODE_VERSION }} + framework-current: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd framework && npm ci + - run: cd framework && npm run language + - run: cd framework && npm run test + - run: mv ./framework/coverage ./ + - run: sed -i 's/SF:src/SF:framework\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run ${{ env.CURRENT_NODE_VERSION }} + cli-previous: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.PREVIOUS_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd cli && npm ci + - run: cd cli && npm run language + - run: cd cli && npm run test + - run: mv ./cli/coverage ./ + - run: sed -i 's/SF:src/SF:cli\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: cli ${{ env.PREVIOUS_NODE_VERSION }} + cli-current: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd cli && npm ci + - run: cd cli && npm run language + - run: cd cli && npm run test + - run: mv ./cli/coverage ./ + - run: sed -i 's/SF:src/SF:cli\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: cli ${{ env.CURRENT_NODE_VERSION }} + framework-integration-previous: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.PREVIOUS_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.PREVIOUS_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd framework && npm ci + - run: cd framework && npm run language + - run: cd framework && npm run integration + - run: mv ./framework/coverage ./ + - run: sed -i 's/SF:src/SF:framework\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: integration ${{ env.PREVIOUS_NODE_VERSION }} + framework-integration-current: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd framework && npm ci + - run: cd framework && npm run language + - run: cd framework && npm run integration + - run: mv ./framework/coverage ./ + - run: sed -i 's/SF:src/SF:framework\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: integration ${{ env.CURRENT_NODE_VERSION }} + framework-property: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd framework && npm ci + - run: cd framework && npm run language + - run: cd framework && npm run property + - run: mv ./framework/coverage ./ + - run: sed -i 's/SF:src/SF:framework\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: property ${{ env.CURRENT_NODE_VERSION }} + documentation-website: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run assets + - run: cd documentation-website && npm run test + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-website + documentation-e2e-1: + runs-on: ubuntu-latest + env: + SPLIT: 5 + SPLIT_INDEX: 0 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run e2e + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-e2e-1 + documentation-e2e-2: + runs-on: ubuntu-latest + env: + SPLIT: 5 + SPLIT_INDEX: 1 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run e2e + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-e2e-2 + documentation-e2e-3: + runs-on: ubuntu-latest + env: + SPLIT: 5 + SPLIT_INDEX: 2 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run e2e + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-e2e-3 + documentation-e2e-4: + runs-on: ubuntu-latest + env: + SPLIT: 5 + SPLIT_INDEX: 3 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run e2e + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-e2e-4 + documentation-e2e-5: + runs-on: ubuntu-latest + env: + SPLIT: 5 + SPLIT_INDEX: 4 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd documentation-website && npm ci + - run: cd documentation-website && npm run language + - run: cd documentation-website && npm run e2e + - run: mv ./documentation-website/coverage ./ + - run: sed -i 's/SF:src/SF:documentation-website\/src/' ./coverage/lcov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + flag-name: run documentation-e2e-5 + end: + runs-on: ubuntu-latest + needs: + - framework-previous + - framework-current + - cli-previous + - cli-current + - framework-integration-current + - framework-integration-previous + - documentation-website + - documentation-e2e-1 + - documentation-e2e-2 + - documentation-e2e-3 + - documentation-e2e-4 + - documentation-e2e-5 + - mindmap-integration-current + - mindmap-integration-previous + - framework-property + steps: + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.github/workflows/history-website.codeql.yml b/.github/workflows/history-website.codeql.yml new file mode 100644 index 0000000..ae45227 --- /dev/null +++ b/.github/workflows/history-website.codeql.yml @@ -0,0 +1,60 @@ +name: history-website CodeQL +on: + push: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.svelte' + - 'history-website/package-lock.json' + - '.github/workflows/history-website.codeql.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.svelte' + - 'history-website/package-lock.json' + - '.github/workflows/history-website.codeql.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + timeout-minutes: 360 + permissions: + security-events: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript-typescript + queries: security-and-quality + source-root: history-website + - name: Setup Node.js environment ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd history-website && npm ci + - run: cd history-website && npm run language + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:javascript-typescript" diff --git a/.github/workflows/history-website.eslint.yml b/.github/workflows/history-website.eslint.yml new file mode 100644 index 0000000..84b088e --- /dev/null +++ b/.github/workflows/history-website.eslint.yml @@ -0,0 +1,47 @@ +name: history-website ESLINT +on: + push: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history.eslint.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history.eslint.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: npm ci + - run: cd history-website && npm ci + - run: cd history-website && npm run language + - run: cd history-website && npm run lint diff --git a/.github/workflows/history-website.fta.yml b/.github/workflows/history-website.fta.yml new file mode 100644 index 0000000..fed4712 --- /dev/null +++ b/.github/workflows/history-website.fta.yml @@ -0,0 +1,46 @@ +name: history-website FTA +on: + push: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history-website.fta.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history-website.fta.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: npm ci + - run: cd history-website && npm ci && npm run language + - run: npm run fta -- history-website || true diff --git a/.github/workflows/history-website.knip.yml b/.github/workflows/history-website.knip.yml new file mode 100644 index 0000000..c721eb5 --- /dev/null +++ b/.github/workflows/history-website.knip.yml @@ -0,0 +1,47 @@ +name: history-website Knip +on: + push: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history-website.knip.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/**.ts' + - 'history-website/**.tsx' + - 'history-website/**.js' + - 'history-website/**.cjs' + - 'history-website/**.json' + - 'history-website/**.svelte' + - '.github/workflows/history-website.knip.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + history-website/package-lock.json + package-lock.json + - run: npm ci + - run: cd history-website && npm ci + - run: cd history-website && npm run language + - run: cd history-website && npm run knip diff --git a/.github/workflows/history-website.language-lint.yml b/.github/workflows/history-website.language-lint.yml new file mode 100644 index 0000000..d813d37 --- /dev/null +++ b/.github/workflows/history-website.language-lint.yml @@ -0,0 +1,35 @@ +name: history-website language lint +on: + push: + branches: + - the-one + paths: + - 'history-website/language/*.yml' + - '.github/workflows/history-website.language-lint.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/language/*.yml' + - '.github/workflows/history-website.language-lint.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: npm ci + - run: npm run check-language -- history-website diff --git a/.github/workflows/history-website.license-check.yml b/.github/workflows/history-website.license-check.yml new file mode 100644 index 0000000..91753a9 --- /dev/null +++ b/.github/workflows/history-website.license-check.yml @@ -0,0 +1,35 @@ +name: history-website license lint +on: + push: + branches: + - the-one + paths: + - 'history-website/package-lock.json' + - '.github/workflows/history-website.license-check.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/package-lock.json' + - '.github/workflows/history-website.license-check.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + history-website/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + history-website/package-lock.json + package-lock.json + - run: cd history-website && npm ci + - run: cd history-website && npx license-checker -- --production --onlyAllow="MIT;ISC;Apache-2.0;BSD-2-Clause;BSD-3-Clause;Python-2.0;LGPL-2.1;GPL-2.0;BlueOak-1.0.0;CC0-1.0;0BSD;WTFPL;Unlicense" diff --git a/.github/workflows/history-website.mdlint.yml b/.github/workflows/history-website.mdlint.yml new file mode 100644 index 0000000..515e938 --- /dev/null +++ b/.github/workflows/history-website.mdlint.yml @@ -0,0 +1,38 @@ +name: history-website MARKDOWN-LINT +on: + push: + branches: + - the-one + paths: + - 'history-website/*.md' + - 'history-website/package-lock.json.json' + - '.github/workflows/history.mdlint.yml' + pull_request: + branches: + - the-one + paths: + - 'history-website/*.md' + - 'history-website/package-lock.json.json' + - '.github/workflows/history.mdlint.yml' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + cli/package-lock.json + package-lock.json + - run: cd history-website && npm ci + - run: cd history-website && npm run language + - run: cd history-website && npm run lint-md diff --git a/.github/workflows/history-website.spellcheck.yml b/.github/workflows/history-website.spellcheck.yml new file mode 100644 index 0000000..bd6ded9 --- /dev/null +++ b/.github/workflows/history-website.spellcheck.yml @@ -0,0 +1,37 @@ +name: history-website spellcheck +on: + push: + branches: + - the-one + paths: + - 'history-website/language/en.yml' + - '.github/workflows/history-website.spellcheck.yml' + - '.dictionary.txt' + pull_request: + branches: + - the-one + paths: + - 'history-website/language/en.yml' + - '.github/workflows/history-website.spellcheck.yml' + - '.dictionary.txt' +env: + CURRENT_NODE_VERSION: ${{ vars.CURRENT_NODE_VERSION || 'latest' }} +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.CURRENT_NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CURRENT_NODE_VERSION }} + cache: 'npm' + cache-dependency-path: | + framework/package-lock.json + documentation-website/package-lock.json + history-microservice/package-lock.json + history-website/package-lock.json + history-website/package-lock.json + package-lock.json + - run: cd history-website && npm ci + - run: cd history-website && npm run spellcheck diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc67717 --- /dev/null +++ b/.gitignore @@ -0,0 +1,103 @@ +# ROOT +/node_modules + +# CLI +/cli/src/**/*.js +/cli/src/locales +/cli/node_modules +/cli/LICENSE +/cli/.nyc_output +/cli/coverage +/cli/dump.txt + +# Desktop +/desktop/src/**/*.js +/desktop/src/locales +/desktop/node_modules +/desktop/LICENSE +/desktop/.nyc_output +/desktopcoverage +/desktop/dump.txt +/desktop/dist +/desktop/src/assets/iab.svg +/desktop/src/assets/favicon.svg + +# Framework +/framework/node_modules +/framework/result.json +/framework/result.csv +/framework/result.html +/framework/.nyc_output +/framework/coverage +/framework/src/**/*.js +/framework/index.js +/framework/LICENSE +/framework/src/locales +/framework/dump.txt + +# Examples +/examples/**/package-lock.json +/examples/**/result.json +/examples/**/result.csv +/examples/**/result.html +/examples/**/node_modules + +# Documentation Website +/documentation-website/.nyc_output +/documentation-website/coverage +/documentation-website/cypress/screenshots +/documentation-website/node_modules +/documentation-website/dist +/documentation-website/dist-ssr +/documentation-website/*.local +/documentation-website/cypress/fixures/cypress.env.json +/documentation-website/tsconfig.tsbuildinfo +/documentation-website/src/routes.tsx +/documentation-website/src/pages/contributing/contributors/code-contributors.json +/documentation-website/public/sitemap.xml +/documentation-website/src/locales +/documentation-website/public/assets/profile-*.jpg +/documentation-website/public/assets/profile-*.webp +/documentation-website/public/assets/profile-*.avif +/documentation-website/public/assets/contributors/*.webp +/documentation-website/public/assets/contributors/*.avif +/documentation-website/public/assets/*-*.min.css +/documentation-website/dump.txt +/documentation-website/src/assets/iab.svg +/documentation-website/src/assets/favicon.svg +/documentation-website/.env + +# History Microservice +/history-microservice/node_modules +/history-microservice/coverage +/history-microservice/.env + +#History Website +/history-website/node_modules +/history-website/dist +/history-website/coverage +/history-website/cypress/screenshots +/history-website/src/locales +/history-website/dump.txt +/history-website/src/assets/iab.svg +/history-website/src/assets/favicon.svg + +#Mindmap +/mindmap/node_modules +/mindmap/dist +/mindmap/cache +/mindmap/src/*.js +/mindmap/coverage +/mindmap/assets/iab.svg +/mindmap/assets/favicon.svg + +# Editor directories and files +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +nbproject +.idea +.vscode diff --git a/.idrinth-typescript-language-from-yaml.yml b/.idrinth-typescript-language-from-yaml.yml new file mode 100644 index 0000000..ea63714 --- /dev/null +++ b/.idrinth-typescript-language-from-yaml.yml @@ -0,0 +1,7 @@ +originDirectory: language +targetDirectory: src/locales +hasNoTranslationsFile: false +isVerbatimModuleSyntax: true +isSplit: false +isStrictTypes: false +isFailOnWarning: false diff --git a/.knip.json b/.knip.json new file mode 100644 index 0000000..192b406 --- /dev/null +++ b/.knip.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://unpkg.com/knip@5/schema.json", + "entry": ["tools/*.js", "src/main.ts", "src/locales/*.ts"], + "project": ["tools/**/*.js", "src/**/*.svelte", "src/**/*.ts"] +} diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..320406d --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,2 @@ +default: true +MD013: false diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.spellcheckerrc.yml b/.spellcheckerrc.yml new file mode 100644 index 0000000..f5fd7bc --- /dev/null +++ b/.spellcheckerrc.yml @@ -0,0 +1,10 @@ +files: + - dump.txt +language: en-GB +plugins: + - spell + - indefinite-article + - repeated-words +quiet: true +dictionaries: + - ../.dictionary.txt diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..40db42c --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-standard" +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9c1655d --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,79 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behaviour that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologising to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behaviour include: + +* The use of sexualised language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement at [webmaster@idrinth-api-ben.ch](mailto:webmaster@idrinth-api-ben.ch). All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behaviour. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at [Contributor Covenant Version 2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: [www.contributor-covenant.org](https://www.contributor-covenant.org) + +For answers to common questions about this code of conduct, see the FAQ at [www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6784784 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,293 @@ +# Contributing + +Any and all contributions are encouraged. As a contributor, +here are the guidelines we would like you to follow: + +- [Structure](#structure) +- [Issues](#issues) +- [Code](#code) +- [Commit Message Guidelines](#commit-message-guidelines) +- [Documentation](#documentation) + +## Structure + +The project is a mono-repo grouped into multiple subprojects, for example +`documentation-website`, `framework`, `history-microservice`, `cli`, +`mindmap`, `history-website`. You can find more detailed instructions for +the specific part in the corresponding folder's readme. + +## Issues + +Any idea and bug report is considered a contribution. Not only do they help +improving the code base, they help other people to get more use out of this +framework. Please try to stick to the format of predefined issue types to +make it easier to filter and handle for anyone interested in the topic. + +## Code + +The style guidelines are provided via eslint. Please try to optimise code for readability, since code will be read way more often than it will be changed. + +While adding functionality, keep in mind to break existing interfaces, entry points and functionality only if absolutely necessary. + +### Picking the right issue + +Issues that are good for relatively new coders are marked as +`Good first issue`, issues marked as `help wanted` require a bit more +knowledge about the project. + +Within an issue, you find the project information on the right-hand side, +opening them up will reveal further estimates about size, difficulty, +priority and main affected project part. + +![Project](/documentation-website/src/assets/api-bench-project.png) + +### Contribution workflow + +- fork the repository +- mention in the issue, that you are working on it (it will be assigned for a few weeks then) +- create a feature branch (issue-xxx-does-something) from `the-one` +- create a draft pull request +- mention fixes #xxx in the description (use the appropriate pull request template) +- make your changes to the branch +- check if actions are all green +- mark as ready to review +- get changes reviewed +- if review is positive get changes merged, otherwise fix and send back to review + +### Mindmap + +Contributing to the mindmap is encouraged. The mindmap is built from +data.yml in /mindmap and follows the following schema: + +````json +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://mindmap.idrinth-api-ben.ch", + "$ref": "#/definitions/node", + "definitions": { + "node": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "the displayed text of the node" + }, + "description": { + "type": "string", + "description": "longer form description, that is displayed when hovering over the node" + }, + "url": { + "type": "string", + "description": "a url to link to with this node" + }, + "children": { + "description": "child nodes, that are connected to the parent", + "type": "array", + "items": { + "$ref": "#/definitions/node" + }, + "minItems": 1 + } + }, + "required": [ + "text" + ], + "additionalProperties": false + } + } +} +```` + +In order to display nodes, they must have a text property. They may also have; a URL, description, and child nodes. + +### Tests + +Testing new code is expected and adding tests or improving tests for old code is appreciated. The goal is to find most issues by either static analysis or unit and integration tests. + +#### Manual Tests + +For manual testing you can run `npm run coai` in the source folder to automatically check out and install all required files for testing. + +```bash +git clone https://github.com/idrinth/api-bench +cd api-bench +npm run coai +``` + +#### Running Tests Locally + +To see a list of available CI tasks and their corresponding commands to run them +locally, you can run `npm run local` in the source folder. This is particularly +useful for testing specific CI tasks before committing your changes. + +### Naming conventions + +- camelCase for variables and functions +- UPPER_SNAKE_CASE for constants +- PascalCase for interfaces and classes +- kebab-case for file names + +### Requirements + +- One of the last two node versions is required. +- Supported Operating Systems: Linux, Windows, and macOS. + +### Setup + +Run the following commands to create the full project: + +```sh +git clone https://github.com/idrinth/api-bench +cd api-bench +npm run setup +``` + +#### Language + +If you'd like to test translations, there's an auto-rebuild in the project root: + +```bash +npm run language +``` + +Languages can be found in their respective project folder. +\ +Example: +\ +`/documentation-website/language/EXAMPLE.yml` + +### Commit Message Guidelines + +**This specification is inspired by Angular commit messages guidelines.* + +These are the rules for how Git commit messages for api-bench should be formatted. +This format leads to easier to read commit history. + +Each commit message consists of a **header**, a **body**, and a **footer**. + +```md +
+ + + +