From 2f20329f4992315b9859389fd89425b5301fc102 Mon Sep 17 00:00:00 2001 From: Carlos Santiago <5726971+csantiago132@users.noreply.github.com> Date: Sat, 19 Oct 2024 12:29:49 -0500 Subject: [PATCH] feat(config): test stable release (#59) * fix(docs): rewrite prettier setup (#40) * chore(docs): rewrite commitlint config (#47) * fix(docs): update typescript config (#48) * fix(docs): update Semantic Release config (#50) * fix(docs): update Vitest config (#51) * fix(docs): update Code Quality Workflow documentation (#52) * fix(docs): update Vitest documentation * fix(config): update Test action documentation (#53) * feat(config): update writerside ci pipeline (#54) * fix(config): update writerside ci pipeline (#55) * fix(config): update writerside ci pipeline * fix(config): update writerside documentation * fix(config): release documentation (#56) * feat(config): adds release workflow (#57) * chore(config): checks legal checkboxes (#58) --- .eslintignore | 3 +- .github/actions/deploy/action.yml | 48 ++ .github/ci.cd.yml | 34 + .github/ci.documentation.yml | 11 - .github/ci.lint.yml | 13 - .github/ci.release.yml | 20 - .github/deployment.yml | 18 + .github/workflows/release.yml | 29 +- .github/workflows/test.yml | 5 +- .../workflows/writerside-documentation.yml | 12 +- CONTRIBUTING.md | 25 + README.md | 2 + Writerside/codeSnippets/ci.yml | 33 + Writerside/dcs.tree | 8 + Writerside/topics/CODE-OF-CONDUCT.md | 119 ++++ Writerside/topics/CONTRIBUTING.md | 62 ++ Writerside/topics/Code-Quality.md | 55 +- Writerside/topics/Deploy-Workflow.md | 106 +++ Writerside/topics/Github-Actions.md | 12 +- Writerside/topics/Guides.md | 32 +- .../topics/How-To-Install-Commitlint.md | 63 ++ Writerside/topics/How-To-Install-ESLint.md | 3 + Writerside/topics/How-To-Install-Prettier.md | 3 + .../topics/How-To-Install-Semantic-Release.md | 56 ++ .../topics/How-To-Install-Typescript.md | 73 ++ Writerside/topics/How-To-Install-Vitest.md | 82 +++ Writerside/topics/Release.md | 123 ++-- Writerside/topics/Test-Workflow.md | 90 +++ Writerside/topics/Writerside.md | 138 ++-- Writerside/topics/starter-topic.md | 1 + Writerside/writerside.cfg | 1 + package-lock.json | 670 +++++++++++++++--- package.json | 30 +- src/eslint/eslint.base.js | 8 +- src/tsconfig/tsconfig.test.json | 25 - src/tsconfig/tsconfig.web.json | 12 - src/vitest/setup.node.ts | 3 + src/vitest/{setup.react.ts => setup.web.ts} | 4 + src/vitest/vitest.node.ts | 26 + src/vitest/{vite.react.ts => vitest.web.ts} | 3 +- 40 files changed, 1751 insertions(+), 310 deletions(-) create mode 100644 .github/actions/deploy/action.yml create mode 100644 .github/ci.cd.yml delete mode 100644 .github/ci.documentation.yml delete mode 100644 .github/ci.lint.yml delete mode 100644 .github/ci.release.yml create mode 100644 .github/deployment.yml create mode 100644 CONTRIBUTING.md create mode 100644 Writerside/codeSnippets/ci.yml create mode 100644 Writerside/topics/CODE-OF-CONDUCT.md create mode 100644 Writerside/topics/CONTRIBUTING.md create mode 100644 Writerside/topics/Deploy-Workflow.md create mode 100644 Writerside/topics/How-To-Install-Commitlint.md create mode 100644 Writerside/topics/How-To-Install-Semantic-Release.md create mode 100644 Writerside/topics/How-To-Install-Typescript.md create mode 100644 Writerside/topics/How-To-Install-Vitest.md create mode 100644 Writerside/topics/Test-Workflow.md delete mode 100644 src/tsconfig/tsconfig.test.json delete mode 100644 src/tsconfig/tsconfig.web.json create mode 100644 src/vitest/setup.node.ts rename src/vitest/{setup.react.ts => setup.web.ts} (86%) create mode 100644 src/vitest/vitest.node.ts rename src/vitest/{vite.react.ts => vitest.web.ts} (76%) diff --git a/.eslintignore b/.eslintignore index de04081..e212594 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,2 @@ -src/vitest/setup.react.ts -src/vitest/vite.react.ts + node_modules diff --git a/.github/actions/deploy/action.yml b/.github/actions/deploy/action.yml new file mode 100644 index 0000000..cf1e1df --- /dev/null +++ b/.github/actions/deploy/action.yml @@ -0,0 +1,48 @@ +name: 'Deploy' +description: 'Deploys the application to Fly.io for staging and production environments.' + +inputs: + commit_sha: + description: 'Commit SHA for deployment' + required: true + +runs: + using: 'composite' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: '50' + + - name: Read app name + uses: SebRollen/toml-action@v1.2.0 + id: app_name + with: + file: 'fly.toml' + field: 'app' + + - name: Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@1.5 + + - name: Deploy Dev + if: ${{ github.ref == 'refs/heads/dev' }} + shell: bash + run: | + flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ inputs.commit_sha }} --app ${{ steps.app_name.outputs.value }}-staging + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + + - name: Deploy Production + if: ${{ github.ref == 'refs/heads/main' }} + shell: bash + run: | + flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ inputs.commit_sha }} --build-secret SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + + - name: Set Deployed Version + id: set_version + shell: bash + run: | + VERSION=$(jq -r .version package.json) + echo "deployed_version=${VERSION}" >> $GITHUB_OUTPUT diff --git a/.github/ci.cd.yml b/.github/ci.cd.yml new file mode 100644 index 0000000..c92744e --- /dev/null +++ b/.github/ci.cd.yml @@ -0,0 +1,34 @@ +name: CI/CD Pipeline + +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + uses: kurocado-studio/styleguide/.github/workflows/lint.yml@main + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + needs: lint + uses: kurocado-studio/styleguide/.github/workflows/test.yml@main + secrets: inherit + + document: + needs: test + uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main + secrets: inherit + + release: + needs: document + uses: kurocado-studio/styleguide/.github/workflows/release.yml@main + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + PAT_FORCE_PUSH: ${{ secrets.GITHUB_TOKEN }} + if: | + github.event_name == 'push' && + github.ref == 'refs/heads/main' diff --git a/.github/ci.documentation.yml b/.github/ci.documentation.yml deleted file mode 100644 index e8bab8d..0000000 --- a/.github/ci.documentation.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Writerside Documentation - -on: - push: - branches: - - main - -jobs: - documentation: - uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main - secrets: inherit diff --git a/.github/ci.lint.yml b/.github/ci.lint.yml deleted file mode 100644 index 6959a4c..0000000 --- a/.github/ci.lint.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Code Quality - -on: - pull_request: - push: - branches: - - main - -jobs: - lint: - uses: kurocado-studio/styleguide/.github/workflows/lint.yml@main - secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/ci.release.yml b/.github/ci.release.yml deleted file mode 100644 index ebe9402..0000000 --- a/.github/ci.release.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Release Workflow - -permissions: - pull-requests: write - contents: write - pages: write - id-token: write - -on: - push: - branches: - - main - -jobs: - release: - uses: kurocado-studio/styleguide/.github/workflows/release.yml@main - secrets: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - PAT_FORCE_PUSH: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/deployment.yml b/.github/deployment.yml new file mode 100644 index 0000000..1cce4f3 --- /dev/null +++ b/.github/deployment.yml @@ -0,0 +1,18 @@ +name: Deployment Pipeline + +on: + pull_request: + types: [closed] + branches: + - main + - dev + +jobs: + deploy: + if: github.event.pull_request.merged == true + uses: kurocado-studio/styleguide/.github/actions/deploy@main + with: + commit_sha: ${{ github.event.pull_request.merge_commit_sha }} + secrets: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9fa5ce..3206b09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,11 +3,19 @@ name: Release Workflow permissions: pull-requests: write contents: write - pages: write id-token: write on: workflow_call: + inputs: + release-branch-prefix: + description: 'Prefix for the release branch name' + required: true + type: string + release-label: + description: 'Label to apply to the release pull request' + required: false + type: string push: branches: - main @@ -25,33 +33,30 @@ jobs: - name: Install uses: kurocado-studio/styleguide/.github/actions/install@main - - name: Lint - uses: kurocado-studio/styleguide/.github/actions/lint@main - - - name: Test - uses: kurocado-studio/styleguide/.github/actions/test@main - - name: Build run: pnpm run build - - name: Semantic Release + - name: Release id: semantic_release + uses: semantic-release/action@v6 + with: + args: --ci env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release - name: Create Release Branch - if: success() && steps.semantic_release.outputs.nextRelease + if: success() && steps.semantic_release.outputs.nextRelease != '' run: | VERSION=${{ steps.semantic_release.outputs.nextRelease.version }} git checkout -b ${{ inputs.release-branch-prefix }}${VERSION} - name: Push Release Branch - if: success() && steps.semantic_release.outputs.nextRelease + if: success() && steps.semantic_release.outputs.nextRelease != '' env: PAT: ${{ secrets.PAT_FORCE_PUSH }} run: | + VERSION=${{ steps.semantic_release.outputs.nextRelease.version }} git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git remote set-url origin https://x-access-token:${PAT}@github.com/${{ github.repository }}.git @@ -70,7 +75,7 @@ jobs: echo "changelog=$CHANGELOG" >> $GITHUB_OUTPUT - name: Create Pull Request to Main - if: success() && steps.semantic_release.outputs.nextRelease + if: success() && steps.semantic_release.outputs.nextRelease != '' uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8d8631..1a1584e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: pull_request: push: branches: - - canary + - main jobs: code-quality: @@ -24,8 +24,5 @@ jobs: - name: Install Dependencies uses: kurocado-studio/styleguide/.github/actions/install@main - - name: Lint - uses: kurocado-studio/styleguide/.github/actions/lint@main - - name: Test uses: kurocado-studio/styleguide/.github/actions/test@main diff --git a/.github/workflows/writerside-documentation.yml b/.github/workflows/writerside-documentation.yml index 3aaa01f..0fba246 100644 --- a/.github/workflows/writerside-documentation.yml +++ b/.github/workflows/writerside-documentation.yml @@ -5,6 +5,8 @@ on: push: branches: - main + paths: + - 'Writerside/**' permissions: contents: write @@ -19,6 +21,10 @@ env: jobs: build-and-deploy-docs: runs-on: ubuntu-latest + if: | + github.event_name != 'workflow_call' || + (github.event_name == 'workflow_call' && + contains(steps.check_changes.outputs.changed_paths, 'Writerside/')) steps: - name: Checkout repository uses: actions/checkout@v4 @@ -29,8 +35,10 @@ jobs: - name: Install Dependencies uses: kurocado-studio/styleguide/.github/actions/install@main - - name: Lint - uses: kurocado-studio/styleguide/.github/actions/lint@main + - name: Check for changes in Writerside directory + id: check_changes + run: | + echo "::set-output name=changed_paths::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^Writerside/')" - name: Build docs using Writerside Docker builder uses: JetBrains/writerside-github-action@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6fe06e7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing + +Thanks for your willingness to contribute! Please make sure to check with us before doing a bunch of +work on something. + +## Before Contributing + +**[See contributing @ Kurocado Studio](https://kurocado-studio.github.io/styleguide/contributing.html)** + +## Project setup + +If you do need to set the project up locally yourself, feel free to follow these instructions: + +### System Requirements + +- [Node.js](https://nodejs.org/) >= 20.0.0 +- [npm](https://npmjs.com/) >= 8.18.0 +- [git](https://git-scm.com/) >= 2.38.0 + +### Setup steps + +- Fork repo +- clone the repo +- Run `npm install` to install dependencies and run validation +- Create a branch for your PR with `git checkout -b pr/your-branch-name` diff --git a/README.md b/README.md index fb185ea..d9c116d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Kurocado Studio Style Guide +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://kurocado-studio.github.io/styleguide/contributing.html) + A comprehensive style guide based on Vercel's style guide, enabling developers to set up repositories quickly with consistent code quality and best practices. diff --git a/Writerside/codeSnippets/ci.yml b/Writerside/codeSnippets/ci.yml new file mode 100644 index 0000000..052c9fb --- /dev/null +++ b/Writerside/codeSnippets/ci.yml @@ -0,0 +1,33 @@ +name: CI/CD Pipeline + +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + uses: kurocado-studio/styleguide/.github/workflows/lint.yml@main + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + document: + needs: lint + uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main + secrets: inherit + + test: + uses: kurocado-studio/styleguide/.github/workflows/test.yml@main + secrets: inherit + + release: + needs: documentation + uses: kurocado-studio/styleguide/.github/workflows/release.yml@main + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + PAT_FORCE_PUSH: ${{ secrets.PAT_FORCE_PUSH }} + if: | + github.event_name == 'push' && + github.ref == 'refs/heads/main' diff --git a/Writerside/dcs.tree b/Writerside/dcs.tree index d3d60ab..0943920 100644 --- a/Writerside/dcs.tree +++ b/Writerside/dcs.tree @@ -10,10 +10,18 @@ + + + + + + + + diff --git a/Writerside/topics/CODE-OF-CONDUCT.md b/Writerside/topics/CODE-OF-CONDUCT.md new file mode 100644 index 0000000..393811b --- /dev/null +++ b/Writerside/topics/CODE-OF-CONDUCT.md @@ -0,0 +1,119 @@ +# Code of Conduct + +![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg) + +## 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, levvel of experience, +education, socio-economic status, nationality, personal appearance, race, caste, color, 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 behavior 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 apologizing 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 behavior include: + +- The use of sexualized 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 behavior +and will take appropriate and fair corrective action in response to any behavior 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 email 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 behavior may be reported to the community +leaders responsible for enforcement at [INSERT CONTACT METHOD]. 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 behavior 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 behavior 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 behavior. 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 +behavior. + +**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 behavior, 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.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement +ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/Writerside/topics/CONTRIBUTING.md b/Writerside/topics/CONTRIBUTING.md new file mode 100644 index 0000000..839fbbf --- /dev/null +++ b/Writerside/topics/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing + +Thank you for your interest in contributing! We appreciate your efforts to help improve and maintain +our codebase. By contributing, you agree to abide by our guidelines outlined below. + +**NOTE**: Actual adoption of your library is not guaranteed. Offloading maintenance and adaptability +is a delicate balance. + +## Code of Conduct + +Please read and follow our [Code of Conduct](CODE-OF-CONDUCT.md) to ensure a welcoming and +respectful environment for everyone. + +## How to Contribute + +### Reporting Issues + +If you encounter a bug or have a question, please **open an issue** on GitHub. When reporting an +issue, please include: + +- A clear and descriptive title. +- A detailed description of the problem. +- Steps to reproduce the issue. +- Any relevant screenshots or error messages. + +### Suggesting Enhancements + +We welcome suggestions for improvements and new features. To propose an enhancement: + +1. Search existing issues to avoid duplicates. +2. If none exist, **open a new issue** with: + - A descriptive title. + - A clear description of the enhancement. + - The benefits and potential impact of the change. + +### Submitting Pull Requests + +We appreciate your contributions! To submit a pull request (PR): + +1. **Fork the Repository** + + - Click the "Fork" button at the top of the repository page to create your own copy. + +2. **Make Your Changes** & Follow the Style Guidelines. + + - [Prettier Setup](How-To-Install-Prettier.md) + - [ESLint Setup](How-To-Install-ESLint.md) + - [Commitlint Setup](How-To-Install-Commitlint.md) + +3. **Open a Pull Request** & Follow the Style Guidelines. + - Go to the original repository and click “Compare & pull request”. + - Provide a clear and descriptive title and description for your PR. + - Reference any related issues using keywords like Closes #issue-number. + +## Acknowledgements + +- All contributors who have helped improve our projects. + +## License + +By contributing, you agree that your contributions will be licensed under the +[MIT License](https://opensource.org/license/mit). diff --git a/Writerside/topics/Code-Quality.md b/Writerside/topics/Code-Quality.md index bd3b354..f1ec949 100644 --- a/Writerside/topics/Code-Quality.md +++ b/Writerside/topics/Code-Quality.md @@ -1,4 +1,10 @@ -# Code Quality +# Code Quality Workflow + +## Prerequisites + +- [Prettier Setup](How-To-Install-Prettier.md) +- [ESLint Setup](How-To-Install-ESLint.md) +- [Commitlint Setup](How-To-Install-Commitlint.md) ## Overview @@ -27,28 +33,45 @@ sequenceDiagram end ``` -## Quick Start - -**Configuring Necessary Secrets** +## Step 1 — Configure Necessary Secrets -For the Release workflow to function correctly, certain secrets must be configured in your GitHub -repository settings. +For the Code Quality workflow to function correctly, certain secrets must be configured in your +GitHub repository settings. These secrets ensure secure access to necessary tools and services +during the workflow execution. -a. Navigate to Repository Settings +### a. Navigate to Repository Settings 1. Go to your repository on GitHub. -2. Click on Settings. +2. Click on the **Settings** tab. + +### b. Access Secrets + +1. In the left sidebar, click on **Secrets and variables** under the **Security** section. +2. Select **Actions** to manage secrets for GitHub Actions. -b. Access Secrets +### c. Add Required Secrets -1. In the left sidebar, click on Secrets and variables > Actions. +1. **GITHUB_TOKEN**: This token is automatically provided by GitHub Actions and typically does not + need to be added manually unless you require customized permissions. +2. **Additional Secrets**: If your workflow requires access to external services or APIs (e.g., + authentication tokens, API keys), add them here by clicking on **New repository secret** and + providing the necessary name and value. -c. Add Required Secrets +## Step 2 — Create the Code Quality Workflow File -1. **GITHUB_TOKEN**: Automatically provided by GitHub Actions; no need to add manually unless - customizing permissions. +Create a GitHub Actions workflow file that defines the steps for automated linting and formatting +checks. This workflow will be triggered by pushes to the `main` branch or the creation/update of +pull requests. -**Create the Release Workflow File in the Consuming Repository** +### a. Add the Workflow File + +1. In your repository, navigate to the `.github/workflows/` directory. If it doesn't exist, create + it. +2. Create a new file named `code-quality.yml` (or any name of your choice). + +### b. Define the Workflow + +Add the following content to the `code-quality.yml` file: ```yaml name: Code Quality @@ -64,3 +87,7 @@ jobs: uses: kurocado-studio/styleguide/.github/workflows/lint.yml@main secrets: inherit ``` + +### Full CI/CD Pipeline Example {collapsible="true"} + + diff --git a/Writerside/topics/Deploy-Workflow.md b/Writerside/topics/Deploy-Workflow.md new file mode 100644 index 0000000..1755d7b --- /dev/null +++ b/Writerside/topics/Deploy-Workflow.md @@ -0,0 +1,106 @@ +# Deploy Workflow + +## Prerequisites + +- [An account with fly.io](https://fly.io) +- [An account with sentry.io](https://sentry.io/welcome/) +- [An app configuration (fly.toml)](https://fly.io/docs/reference/configuration/) + +## Overview + +Automates the deployment process, including deploying to staging and production environments based +on branch merges. The Deploy workflow listens for pull request merges into the `dev` and `main` +branches and triggers deployments accordingly. + +The following sequence diagram illustrates the interactions and steps involved in the Deploy +workflow, triggered by the merging of a pull request into the `dev` or `main` branch. + +```mermaid +sequenceDiagram + participant Developer + participant GitHubRepo as GitHub Repository + participant Runner as GitHub Actions Runner + participant DeployWorkflow as Reusable Deploy Workflow + participant FlyIO as Fly.io + participant Sentry as Sentry + + Developer->>GitHubRepo: Merge PR into `dev` or `main` Branch + GitHubRepo->>Runner: Trigger Deploy Workflow + + Runner->>DeployWorkflow: Invoke Reusable Deploy Workflow + DeployWorkflow->>DeployWorkflow: Checkout Repository + DeployWorkflow->>DeployWorkflow: Install Dependencies + DeployWorkflow->>DeployWorkflow: Build Project + + alt Merged into `dev` + DeployWorkflow->>FlyIO: Deploy to Staging + else Merged into `main` + DeployWorkflow->>FlyIO: Deploy to Production + DeployWorkflow->>Sentry: Integrate Deployment with Sentry + end + + FlyIO-->>DeployWorkflow: Confirmation of Deployment + Sentry-->>DeployWorkflow: Confirmation of Integration + DeployWorkflow-->>Runner: Deployment Successful +``` + +## Step 1 — Configure Necessary Secrets + +For the Deployment workflow to function correctly, certain secrets must be configured in your GitHub +repository settings. These secrets ensure secure access to necessary tools and services during the +workflow execution. + +### a. Navigate to Repository Settings + +1. Go to your repository on GitHub. +2. Click on the **Settings** tab. + +### b. Access Secrets + +1. In the left sidebar, click on **Secrets and variables** under the **Security** section. +2. Select **Actions** to manage secrets for GitHub Actions. + +### c. Add Required Secrets + +1. **FLY_API_TOKEN**:Your Fly.io API token for authenticating deployments. +2. **SENTRY_AUTH_TOKEN**: Your Sentry authentication token for integrating deployments with Sentry. +3. **Additional Secrets**: If your workflow requires access to other external services or APIs + (e.g., database credentials, API keys), add them here by clicking on New repository secret and + providing the necessary name and value. + +## Step 2 — Create the Deployment Workflow File + +Create a GitHub Actions workflow file that defines the automated steps for deploying your project to +staging and production environments + +### a. Add the Workflow File + +1. In your repository, navigate to the `.github/workflows/` directory. If it doesn't exist, create + it. +2. Create a new file named `deployment.yml` (or any name of your choice). + +### b. Define the Workflow + +Add the following content to the `deployment.yml` file: + +```yaml +name: Deploy on PR Merge + +on: + pull_request: + types: [closed] + branches: + - main + - dev + +jobs: + deploy: + name: Deploy + if: github.event.pull_request.merged == true + uses: kurocado-studio/styleguide/.github/actions/deploy@main + with: + commit_sha: ${{ github.event.pull_request.merge_commit_sha }} + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} +``` diff --git a/Writerside/topics/Github-Actions.md b/Writerside/topics/Github-Actions.md index a787eba..97b4e51 100644 --- a/Writerside/topics/Github-Actions.md +++ b/Writerside/topics/Github-Actions.md @@ -1,8 +1,8 @@ -# Github Actions +# GitHub Actions -1. [Release Workflow](Release.md): Automates the release process, including versioning, changelog - generation, and pull request creation. -2. [Code Quality Workflow](Code-Quality.md): Ensures code consistency and quality through automated - linting and formatting checks. -3. [Writerside Documentation Workflow](Writerside.md): Builds and deploys project documentation +1. **[Release Workflow](Release.md)**: Automates the release process, including versioning, + changelog generation, and pull request creation. +2. **[Code Quality Workflow](Code-Quality.md)**: Ensures code consistency and quality through + automated linting and formatting checks. +3. **[Writerside Documentation Workflow](Writerside.md)**: Builds and deploys project documentation using Docker-based builders. diff --git a/Writerside/topics/Guides.md b/Writerside/topics/Guides.md index d9c6419..50d42a9 100644 --- a/Writerside/topics/Guides.md +++ b/Writerside/topics/Guides.md @@ -9,7 +9,6 @@ To complete this, you will need: [How to Install Node.js and Create a Local Development Environment](https://www.digitalocean.com/community/tutorial_series/how-to-install-node-js-and-create-a-local-development-environment) guide. - A code editor like [Visual Studio Code](https://code.visualstudio.com/download) -- [@kurocado-studio/style-guide installed](https://www.npmjs.com/package/@kurocado-studio/style-guide) ## Initialize Your Project @@ -43,9 +42,36 @@ Wrote to /path/to/my-project/package.json: ## Setup -- [How To Install Prettier](How-To-Install-Prettier.md) -- [How To Install ESLint](How-To-Install-ESLint.md) +### Install @kurocado-studio/style-guide + +```Bash +npm install --save-dev @kurocado-studio/style-guide +``` +[see @kurocado-studio/style-guide on NPM](https://www.npmjs.com/package/@kurocado-studio/style-guide) + +### Install Husky + +```Bash +npm install --save-dev husky ``` +### Next, enable Git hooks: + +```Bash +npx husky install ``` + +### Add `lint-staged` to `package.json` + +```json +"lint-staged": { + "*": "npm run prettier-fix", + "**/*.{ts,tsx}": ["npm run prettier-fix", "npm run eslint-check"] +} +``` + +## Other Configurations + +- [How To Install Prettier](How-To-Install-Prettier.md) +- [How To Install ESLint](How-To-Install-ESLint.md) diff --git a/Writerside/topics/How-To-Install-Commitlint.md b/Writerside/topics/How-To-Install-Commitlint.md new file mode 100644 index 0000000..b8ce84e --- /dev/null +++ b/Writerside/topics/How-To-Install-Commitlint.md @@ -0,0 +1,63 @@ +# How To Install Commitlint + +## Prerequisites + +[See Prerequisites](Guides.md) + +## Step 1 — Install Commitlint + +First, install Commitlint as a development dependency: + +```bash +npm install --save-dev @commitlint/{config-conventional,cli} +``` + +You’ll see output similar to: + +```bash ++ @commitlint/cli@ ++ @commitlint/config-conventional@ +added 10 packages from 5 contributors and audited 20 packages in 2s +found 0 vulnerabilities +``` + +## Step 2 — Configure Commitlint + +To use our Commitlint configuration, add the following `.commitlintrc.js` file at the root of your +project. + +```javascript +module.exports = { + extends: ['@kurocado-studio/style-guide/commitlint'], +}; +``` + +**[See commitlint configuration](https://github.com/Kurocado-Studio/styleguide/blob/main/src/commitlint/index.js)** + +## Step 3 — Add Commit Message Linting Scripts + +To simplify the linting process, add scripts to your `package.json`. Open `package.json` and add the +following under the `"scripts"` section: + +The Code-Quality Workflow uses the following commands in the +CI/CD pipeline + +```json +"scripts": { + "commitlint": "pnpm exec commitlint --edit", +} +``` + +## Step 4 — Integrate Commitlint with Git Hooks + +To enforce commit message linting automatically, integrate Commitlint with Git hooks using +[Husky](https://github.com/typicode/husky). + +```Bash +npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' +``` + +Verify Integration + +Now, when you make a commit, Commitlint will automatically check your commit message. If it doesn’t +comply with the defined rules, you’ll see an error message: diff --git a/Writerside/topics/How-To-Install-ESLint.md b/Writerside/topics/How-To-Install-ESLint.md index 8ce1449..22de7a0 100644 --- a/Writerside/topics/How-To-Install-ESLint.md +++ b/Writerside/topics/How-To-Install-ESLint.md @@ -70,6 +70,9 @@ module.exports = { To simplify the linting process, add scripts to your `package.json`. Open `package.json` and add the following under the `"scripts"` section: +The Code-Quality Workflow uses the following commands in the +CI/CD pipeline + ```json "scripts": { "eslint-check": "eslint --max-warnings=0 .", diff --git a/Writerside/topics/How-To-Install-Prettier.md b/Writerside/topics/How-To-Install-Prettier.md index 83e1dad..97b4645 100644 --- a/Writerside/topics/How-To-Install-Prettier.md +++ b/Writerside/topics/How-To-Install-Prettier.md @@ -49,6 +49,9 @@ module.exports = require.resolve('@kurocado-studio/style-guide/prettier'); To simplify the formatting process, add a script to your `package.json`. Open `package.json` and add the following under the `"scripts"` section: +The Code-Quality Workflow uses the following commands in the +CI/CD pipeline + ```json "scripts": { "prettier-check": "prettier --check .", diff --git a/Writerside/topics/How-To-Install-Semantic-Release.md b/Writerside/topics/How-To-Install-Semantic-Release.md new file mode 100644 index 0000000..2527413 --- /dev/null +++ b/Writerside/topics/How-To-Install-Semantic-Release.md @@ -0,0 +1,56 @@ +# How To Install Semantic Release + +## Prerequisites + +[See Prerequisites](Guides.md) + +## Step 1 — Install Semantic Release + +```Bash +npm install --save-dev semantic-release +``` + +You’ll see output similar to: + +```Bash ++ semantic-release@ +added 15 packages from 10 contributors and audited 30 packages in 5s +found 0 vulnerabilities +``` + +## Step 2 — Create a Semantic Release Configuration File + +To use our Semantic Release configuration, add the following `.releaserc.js` file at the root of +your project. + +### For Apps and Web-Based Projects + +```javascript +module.exports = require.resolve('@kurocado-studio/style-guide/release/app'); +``` + +### For Packages That Will Be Released Publicly on NPM + +```javascript +module.exports = require.resolve('@kurocado-studio/style-guide/release/npm'); +``` + +## Step 3 — Configure Git Hooks + +To ensure that Semantic Release runs correctly during your CI/CD process, you should add a Git hook +in your configuration. + +**Optional: you can add a prepublish or postversion hook with Husky:** + +```Bash +npx husky add .husky/prepublish 'npx semantic-release' +``` + +## Step 4 — Run Semantic Release + +The Release Workflow uses the following command in the CI/CD +pipeline + +```Bash +npx semantic-release +``` diff --git a/Writerside/topics/How-To-Install-Typescript.md b/Writerside/topics/How-To-Install-Typescript.md new file mode 100644 index 0000000..4f668c0 --- /dev/null +++ b/Writerside/topics/How-To-Install-Typescript.md @@ -0,0 +1,73 @@ +# How To Install TypeScript + +## Prerequisites + +[See Prerequisites](Guides.md) + +## Step 1 — Install TypeScript + +First, install TypeScript as a development dependency: + +```Bash +npm install --save-dev typescript +``` + +You’ll see output similar to: + +```Bash ++ typescript@ +added 10 packages from 5 contributors and audited 20 packages in 2s +found 0 vulnerabilities +``` + +## Step 2 — Configure Typescript + +To configure TypeScript, create a `tsconfig.json` file at the root of your project: + +### Browser Configuration using Remix + +```json +{ + "extends": "@kurocado-studio/style-guide/tsconfig/remix", + "include": ["app/**/*"], + "exclude": ["node_modules", "**/*.spec.ts"] +} +``` + +### Packages written in React + +```json +{ + "extends": "@kurocado-studio/style-guide/tsconfig/react", + "include": ["src/**/*"], + "exclude": ["node_modules", "**/*.spec.ts"] +} +``` + +### Node.js Configuration using NestJS + +```json +{ + "extends": "@kurocado-studio/style-guide/tsconfig/nestjs", + "include": ["src/**/*"], + "exclude": ["node_modules", "**/*.spec.ts"] +} +``` + +## Step 3 — Integrate TypeScript with Your Code Editor + +### Visual Studio Code + +1. Install the TypeScript Extension: + - Open VS Code + - Go to the Extensions view by clicking the square icon in the sidebar or pressing CTRL+SHIFT+X + - Search for “TypeScript” and install the extension +2. Configure VS Code to Use TypeScript: • + - Open your VS Code settings (CTRL+,) + - Ensure the following settings are configured + +```json +{ + "typescript.tsdk": "node_modules/typescript/lib" +} +``` diff --git a/Writerside/topics/How-To-Install-Vitest.md b/Writerside/topics/How-To-Install-Vitest.md new file mode 100644 index 0000000..ed44a42 --- /dev/null +++ b/Writerside/topics/How-To-Install-Vitest.md @@ -0,0 +1,82 @@ +# How To Install Vitest + +## Prerequisites + +[See Prerequisites](Guides.md) + +## Step 1 — Install Vitest + +```Bash +npm install --save-dev vitest @testing-library/react @testing-library/jest-dom @vitejs/plugin-react +``` + +## Step 2 — Configure Vitest + +### Browser Configuration + +At the root of your project (whether React or NestJS), create a `vitest.config.ts` file with the +following content: + +```typescript +import { defineConfig } from 'vite'; + +const config = require.resolve('@kurocado-studio/style-guide/vitest/web'); + +export default defineConfig(config); +``` + +Create a `setup.web.ts` file to configure the testing environment before running tests: + +```typescript +require.resolve('@kurocado-studio/style-guide/vitest/setup-web'); +``` + +### Node.js Configuration + +```typescript +import { defineConfig } from 'vite'; + +const config = require.resolve('@kurocado-studio/style-guide/vitest/node'); + +export default defineConfig(config); +``` + +Create a `setup.node.ts` file to configure the testing environment before running tests: + +```typescript +require.resolve('@kurocado-studio/style-guide/vitest/setup-node'); +``` + +## Step 3 — Add Testing Scripts + +Add the following scripts to your package.json to streamline the testing process: + +The Code-Quality Workflow uses the `test` command in the CI/CD +pipeline + +```json +"scripts": { + "test": "vitest", + "test:watch": "vitest --watch", + "test:coverage": "vitest run --coverage", + "test:ci": "vitest run --reporter=dot" +} +``` + +## Step 4 — Integrate Vitest with Your Code Editor + +To enhance your development workflow, integrate Vitest with your code editor to run tests and view +results seamlessly. + +### Visual Studio Code + +1. **Install the Vitest Extension:** + - Open VS Code + - Go to the Extensions view by clicking the square con in the sidebar or pressing CTRL+SHIFT+X + - Search for “Vitest” and install the extension by antfu +2. **Configure the Extension:** + - The extension should automatically detect your Vitest configuration + - You can run and debug tests directly from the editor’s interface +3. **Run Tests from the Editor:** + - Open a test file + - Click the run icon next to the test cases to execute them individually diff --git a/Writerside/topics/Release.md b/Writerside/topics/Release.md index b4d362e..68e32a7 100644 --- a/Writerside/topics/Release.md +++ b/Writerside/topics/Release.md @@ -1,4 +1,8 @@ -# Release +# Release Workflow + +## Prerequisites + +- [Semantic Release Setup](How-To-Install-Semantic-Release.md) ## Overview @@ -10,75 +14,94 @@ workflow, triggered by a push to the `main` branch. ```mermaid sequenceDiagram - participant Developer - participant GitHub as GitHub Repository - participant Runner as GitHub Actions Runner - participant Semantic as Semantic Release - participant GitHubAPI as GitHub API - - Developer->>GitHub: Push to `main` Branch - GitHub->>Runner: Trigger Release Workflow - Runner->>GitHub: Checkout Repository - Runner->>Runner: Install Dependencies - Runner->>Runner: Run Lint Checks - Runner->>Runner: Build Assets (pnpm run build) - Runner->>Semantic: Execute `semantic-release` - Semantic-->>Runner: nextRelease Output (version, etc.) - alt Release Successful - Runner->>Runner: Create Release Branch (`release-{VERSION}`) - Runner->>Runner: Commit Changes to Release Branch - Runner->>GitHub: Push Release Branch (`release-{VERSION}`) - Runner->>Runner: Extract Version from `package.json` - Runner->>Runner: Extract Changelog from `CHANGELOG.md` - Runner->>GitHubAPI: Create Pull Request to `main` - else Release Not Successful - Runner->>Runner: Terminate Workflow - end + participant Developer + participant GitHubRepo as GitHub Repository + participant Runner as GitHub Actions Runner + participant SemanticRelease as Semantic Release + participant NPM as NPM Registry + participant GitHubAPI as GitHub API + + Developer->>GitHubRepo: Push to `main` Branch or Trigger Workflow Call + GitHubRepo->>Runner: Trigger Release Workflow + + Runner->>Runner: Checkout Repository + Runner->>Runner: Install Dependencies + Runner->>Runner: Build Project + + Runner->>SemanticRelease: Run Semantic Release + SemanticRelease-->>Runner: Determine Next Release Version + + alt Next Release Exists + Runner->>Runner: Create Release Branch + Runner->>Runner: Push Release Branch to GitHub + + Runner->>Runner: Extract Version from package.json + Runner->>Runner: Extract Changelog from CHANGELOG.md + + Runner->>GitHubAPI: Create Pull Request to `main` with Release Branch + else No Release Needed + Note right of Runner: "Create Release Branch" and subsequent steps are skipped + end + + SemanticRelease->>NPM: Publish Package to NPM Registry + NPM-->>SemanticRelease: Confirmation of Publish + SemanticRelease-->>Runner: Publish Successful ``` -## Quick Start +## Step 1 — Configure Necessary Secrets -**Configuring Necessary Secrets** +### a. Navigate to Repository Settings -For the Release workflow to function correctly, certain secrets must be configured in your GitHub -repository settings. +1. Go to your repository on GitHub. +2. Click on the **Settings** tab. -a. Navigate to Repository Settings +### b. Access Secrets -1. Go to your repository on GitHub. -2. Click on Settings. +1. In the left sidebar, click on **Secrets and variables** under the **Security** section. +2. Select **Actions** to manage secrets for GitHub Actions. + +### c. Add Required Secrets -b. Access Secrets +1. **GITHUB_TOKEN**: This token is automatically provided by GitHub Actions and typically does not + need to be added manually unless you require customized permissions. +2. **PAT_FORCE_PUSH**: Personal Access Token configured with the necessary scopes (permissions) to + allow a GitHub Actions workflow to perform force push operations on a repository. +3. **Additional Secrets**: If your workflow requires access to external services or APIs (e.g., + authentication tokens, API keys), add them here by clicking on **New repository secret** and + providing the necessary name and value. -1. In the left sidebar, click on Secrets and variables > Actions. +## Step 2 — Add the Release Workflow -c. Add Required Secrets +You’ll need to add the Release Workflow YAML file to your repository. This file defines the +automated steps for releasing your project. -1. **GITHUB_TOKEN**: Automatically provided by GitHub Actions; no need to add manually unless - customizing permissions. -2. **NPM_TOKEN**: Authenticates with the NPM registry to publish packages. -3. **PAT_FORCE_PUSH**: Personal Access Token with permissions to push to protected branches and - create branches. +### a. Add the Workflow File -**Create the Release Workflow File in the Consuming Repository with the below permissions** +1. In your repository, navigate to the `.github/workflows/` directory. If it doesn't exist, create + it. +2. Create a new file named `release.yml` (or any name of your choice). + +### b. Define the Workflow + +Add the following content to the `release.yml` file: ```yaml name: Release Workflow -permissions: - pull-requests: write - contents: write - pages: write - id-token: write - on: - workflow_call: push: branches: - main jobs: - manage-release: + release: uses: kurocado-studio/styleguide/.github/workflows/release.yml@main - secrets: inherit + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + PAT_FORCE_PUSH: ${{ secrets.GITHUB_TOKEN }} ``` + +### Full CI/CD Pipeline Example {collapsible="true"} + + diff --git a/Writerside/topics/Test-Workflow.md b/Writerside/topics/Test-Workflow.md new file mode 100644 index 0000000..109e059 --- /dev/null +++ b/Writerside/topics/Test-Workflow.md @@ -0,0 +1,90 @@ +# Test Workflow + +## Prerequisites + +- [Vitest Setup](How-To-Install-Vitest.md) + +## Overview + +Ensures code consistency and quality through automated linting and formatting checks. + +The following sequence diagram illustrates the interactions and steps involved in the **Test** +workflow, triggered by a push to the `main` branch or a pull request. + +```mermaid +sequenceDiagram + participant Developer + participant GitHubRepo as GitHub Repository + participant Runner as GitHub Actions Runner + participant Vitest as Vitest Tools + participant GitHubAPI as GitHub API + + Developer->>GitHubRepo: Push to `main` Branch or Create/Update Pull Request + GitHubRepo->>Runner: Trigger Test Workflow + Runner->>GitHubRepo: Checkout Repository + Runner->>Runner: Install Dependencies + Runner->>Runner: Run Tests + alt Tests Successful + Runner->>GitHubAPI: Proceed with Workflow Completion + else Tests Failed + Runner->>Developer: Report Test Errors + end +``` + +## Step 1 — Configure Necessary Secrets + +For the Code Quality workflow to function correctly, certain secrets must be configured in your +GitHub repository settings. These secrets ensure secure access to necessary tools and services +during the workflow execution. + +### a. Navigate to Repository Settings + +1. Go to your repository on GitHub. +2. Click on the **Settings** tab. + +### b. Access Secrets + +1. In the left sidebar, click on **Secrets and variables** under the **Security** section. +2. Select **Actions** to manage secrets for GitHub Actions. + +### c. Add Required Secrets + +1. **GITHUB_TOKEN**: This token is automatically provided by GitHub Actions and typically does not + need to be added manually unless you require customized permissions. +2. **Additional Secrets**: If your workflow requires access to external services or APIs (e.g., + authentication tokens, API keys), add them here by clicking on **New repository secret** and + providing the necessary name and value. + +## Step 2 — Create the Test Workflow File + +Create a GitHub Actions workflow file that defines the steps for automated testing checks. This +workflow will be triggered by pushes to the `main` branch or the creation/update of pull requests. + +### a. Add the Workflow File + +1. In your repository, navigate to the `.github/workflows/` directory. If it doesn't exist, create + it. +2. Create a new file named `test.yml` (or any name of your choice). + +### b. Define the Workflow + +Add the following content to the `test.yml` file: + +```yaml +name: Code Quality + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + uses: kurocado-studio/styleguide/.github/workflows/test.yml@main + secrets: inherit +``` + +### Full CI/CD Pipeline Example {collapsible="true"} + + diff --git a/Writerside/topics/Writerside.md b/Writerside/topics/Writerside.md index 0a8a891..b79b1ed 100644 --- a/Writerside/topics/Writerside.md +++ b/Writerside/topics/Writerside.md @@ -1,4 +1,10 @@ -# Writerside +# Writerside Documentation Workflow + +## Prerequisites + +- Writerside + - [Download Writerside Jetbrains Plugin](https://plugins.jetbrains.com/plugin/20158-writerside) + - [Install Writerside IDE](https://www.jetbrains.com/writerside/) ## Overview @@ -9,61 +15,105 @@ Documentation workflow, triggered by a push to the main branch or a workflow cal ```mermaid sequenceDiagram - participant Developer - participant GitHubRepo as GitHub Repository - participant Runner as GitHub Actions Runner - participant Builders as Documentation Builders - participant GitHubAPI as GitHub API - - Developer->>GitHubRepo: Push to `main` Branch or Trigger Workflow Call - GitHubRepo->>Runner: Trigger Writerside Documentation Workflow - Runner->>GitHubRepo: Checkout Repository - Runner->>Runner: Install Dependencies - Runner->>Runner: Run Lint Checks - Runner->>Builders: Build Docs using Writerside Docker Builder - Builders-->>Runner: Build Results (Artifact, report.json) - Runner->>Runner: Save Artifact with Build Results - Runner->>Runner: Unzip Artifact - Runner->>GitHubRepo: Configure GitHub Pages - Runner->>GitHubRepo: Upload Artifact to GitHub Pages - Runner->>GitHubRepo: Deploy to GitHub Pages - alt Deployment Successful - Runner->>GitHubAPI: Confirm Deployment - else Deployment Failed - Runner->>Developer: Report Deployment Errors - end + participant Developer + participant GitHubRepo as GitHub Repository + participant Runner as GitHub Actions Runner + participant Builders as Documentation Builders + participant GitHubAPI as GitHub API + + Developer->>GitHubRepo: Push to `main` Branch or Trigger Workflow Call + GitHubRepo->>Runner: Trigger Writerside Documentation Workflow + + alt Triggered by Push + GitHubRepo->>Runner: Detect Changes in `Writerside/**` + alt Changes Detected + Runner->>Runner: Proceed with Workflow + else No Changes + Runner->>Developer: No Action Taken + end + else Triggered by Workflow Call + Runner->>Runner: Check for Changes in `Writerside` Directory + alt Changes Detected + Runner->>Runner: Proceed with Workflow + else No Changes + Runner->>Developer: No Action Taken + end + end + + alt Workflow Proceeds + Runner->>GitHubRepo: Checkout Repository + Runner->>Runner: Install Dependencies + Runner->>Builders: Build Docs using Writerside Docker Builder + Builders-->>Runner: Build Results (Artifact, report.json) + Runner->>Runner: Save Artifact with Build Results + Runner->>Runner: Unzip Artifact + Runner->>GitHubRepo: Configure GitHub Pages + Runner->>GitHubRepo: Upload Artifact to GitHub Pages + Runner->>GitHubRepo: Deploy to GitHub Pages + alt Deployment Successful + Runner->>GitHubAPI: Confirm Deployment + else Deployment Failed + Runner->>Developer: Report Deployment Errors + end + end ``` -## Quick Start +## Step 1 — Configure Necessary Secrets + +### a. Navigate to Repository Settings -**Configuring Necessary Secrets** +1. Go to your repository on GitHub. +2. Click on the **Settings** tab. -For the Release workflow to function correctly, certain secrets must be configured in your GitHub -repository settings. +### b. Access Secrets -a. Navigate to Repository Settings +1. In the left sidebar, click on **Secrets and variables** under the **Security** section. +2. Select **Actions** to manage secrets for GitHub Actions. -1. Go to your repository on GitHub. -2. Click on Settings. +### c. Add Required Secrets + +1. **GITHUB_TOKEN**: This token is automatically provided by GitHub Actions and typically does not + need to be added manually unless you require customized permissions. +2. **PAT_FORCE_PUSH**: Personal Access Token configured with the necessary scopes (permissions) to + allow a GitHub Actions workflow to perform force push operations on a repository. +3. **Additional Secrets**: If your workflow requires access to external services or APIs (e.g., + authentication tokens, API keys), add them here by clicking on **New repository secret** and + providing the necessary name and value. + +## Step 2 — Add Writerside instance + +**[See how to add Writerside instance](https://www.jetbrains.com/help/writerside/instances.html)** +The name of the instance can be anything you want, the ID needs to be `dcs` in order for the +workflow to work correctly + +```yaml +name: Writerside Documentation -b. Access Secrets +on: + push: + branches: + - main -1. In the left sidebar, click on Secrets and variables > Actions. +jobs: + documentation: + uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main + secrets: inherit +``` -c. Add Required Secrets +## Step 3 — Create the Writerside Workflow File -1. **GITHUB_TOKEN**: Automatically provided by GitHub Actions; no need to add manually unless - customizing permissions. +Create a GitHub Actions workflow file that defines the steps for automated testing checks. This +workflow will be triggered by pushes to the `main` branch or the creation/update of pull requests. -**Add Writerside instance to the root of your project** +### a. Add the Workflow File -[Install Writerside IDE](https://www.jetbrains.com/writerside/) -[Download Writerside Jetbrains Plugin](https://plugins.jetbrains.com/plugin/20158-writerside) +1. In your repository, navigate to the `.github/workflows/` directory. If it doesn't exist, create + it. +2. Create a new file named `writerside.yml` (or any name of your choice). -- Name of the instance: Docs -- ID of the instance: dcs INSTANCE: 'Writerside/dcs' +### b. Define the Workflow -**Create the Release Workflow File in the Consuming Repository** +Add the following content to the `writerside.yml` file: ```yaml name: Writerside Documentation @@ -78,3 +128,7 @@ jobs: uses: kurocado-studio/styleguide/.github/workflows/writerside-documentation@main secrets: inherit ``` + +### Full CI/CD Pipeline Example {collapsible="true"} + + diff --git a/Writerside/topics/starter-topic.md b/Writerside/topics/starter-topic.md index 381679a..331eb8f 100644 --- a/Writerside/topics/starter-topic.md +++ b/Writerside/topics/starter-topic.md @@ -8,6 +8,7 @@ | **Team** | [research-and-development](https://github.com/orgs/Kurocado-Studio/teams/research-and-development) | | **Summary** | A styleguide to enable developers to set up repositories quickly | | **Status** | **Live** | +| **Project Board** | [](https://github.com/orgs/Kurocado-Studio/projects/5/views/1) | | **Repository** | [](https://github.com/Kurocado-Studio/styleguide) | | **Documentation** | [](https://kurocado-studio.github.io/styleguide/) | | **NPM Registry** | [](https://www.npmjs.com/package/@kurocado-studio/style-guide) | diff --git a/Writerside/writerside.cfg b/Writerside/writerside.cfg index 2f58de1..a2a0198 100644 --- a/Writerside/writerside.cfg +++ b/Writerside/writerside.cfg @@ -2,6 +2,7 @@ + diff --git a/package-lock.json b/package-lock.json index 4052c68..5e8a056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@typescript-eslint/parser": "^7.1.1", "@vitejs/plugin-react": "^4.3.2", "c8": "^10.1.2", + "dotenv": "^16.4.5", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-typescript": "^3.6.1", @@ -45,6 +46,7 @@ "prettier-plugin-sort-imports": "^1.8.6", "semantic-release-github-pullrequest": "^1.3.0", "url-join": "^4.0.1", + "vite-tsconfig-paths": "^5.0.1", "vitest-axe": "^0.1.0" }, "engines": { @@ -53,13 +55,18 @@ "peerDependencies": { "@commitlint/cli": "^19.0.3", "@commitlint/config-conventional": "^19.0.3", + "@testing-library/jest-dom": "^6.5.0", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@vitejs/plugin-react": "^4.3.2", "eslint": "^8.57.0", "husky": "^9.0.11", "prettier": "^3.3.3", "semantic-release": "^23.0.2", "typescript": "^5.3.3", "vite": "^5.4.8", - "vitest": "^2.1.2" + "vitest": "^2.1.3", + "vitest-axe": "^0.1.0" } }, "node_modules/@adobe/css-tools": { @@ -599,6 +606,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", + "peer": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.25.0", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", @@ -3342,6 +3361,104 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "peer": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, + "node_modules/@testing-library/dom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "peer": true + }, + "node_modules/@testing-library/dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@testing-library/jest-dom": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz", @@ -3427,6 +3544,46 @@ "node": ">=8" } }, + "node_modules/@testing-library/react": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.0.1.tgz", + "integrity": "sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@testing-library/user-event": { + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", + "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==", + "peer": true, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, "node_modules/@trivago/prettier-plugin-sort-imports": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", @@ -3529,6 +3686,12 @@ "node": ">=0.10.0" } }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "peer": true + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -3964,13 +4127,13 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.2.tgz", - "integrity": "sha512-FEgtlN8mIUSEAAnlvn7mP8vzaWhEaAEvhSXCqrsijM7K6QqjB11qoRZYEd4AKSCDz8p0/+yH5LzhZ47qt+EyPg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.3.tgz", + "integrity": "sha512-SNBoPubeCJhZ48agjXruCI57DvxcsivVDdWz+SSsmjTT4QN/DfHk3zB/xKsJqMs26bLZ/pNRLnCf0j679i0uWQ==", "peer": true, "dependencies": { - "@vitest/spy": "2.1.2", - "@vitest/utils": "2.1.2", + "@vitest/spy": "2.1.3", + "@vitest/utils": "2.1.3", "chai": "^5.1.1", "tinyrainbow": "^1.2.0" }, @@ -3979,12 +4142,12 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.2.tgz", - "integrity": "sha512-ExElkCGMS13JAJy+812fw1aCv2QO/LBK6CyO4WOPAzLTmve50gydOlWhgdBJPx2ztbADUq3JVI0C5U+bShaeEA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.3.tgz", + "integrity": "sha512-eSpdY/eJDuOvuTA3ASzCjdithHa+GIF1L4PqtEELl6Qa3XafdMLBpBlZCIUCX2J+Q6sNmjmxtosAG62fK4BlqQ==", "peer": true, "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.3", "estree-walker": "^3.0.3", "magic-string": "^0.30.11" }, @@ -3992,7 +4155,7 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.2", + "@vitest/spy": "2.1.3", "msw": "^2.3.5", "vite": "^5.0.0" }, @@ -4006,9 +4169,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.2.tgz", - "integrity": "sha512-FIoglbHrSUlOJPDGIrh2bjX1sNars5HbxlcsFKCtKzu4+5lpsRhOCVcuzp0fEhAGHkPZRIXVNzPcpSlkoZ3LuA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.3.tgz", + "integrity": "sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==", "peer": true, "dependencies": { "tinyrainbow": "^1.2.0" @@ -4018,12 +4181,12 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.2.tgz", - "integrity": "sha512-UCsPtvluHO3u7jdoONGjOSil+uON5SSvU9buQh3lP7GgUXHp78guN1wRmZDX4wGK6J10f9NUtP6pO+SFquoMlw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.3.tgz", + "integrity": "sha512-JGzpWqmFJ4fq5ZKHtVO3Xuy1iF2rHGV4d/pdzgkYHm1+gOzNZtqjvyiaDGJytRyMU54qkxpNzCx+PErzJ1/JqQ==", "peer": true, "dependencies": { - "@vitest/utils": "2.1.2", + "@vitest/utils": "2.1.3", "pathe": "^1.1.2" }, "funding": { @@ -4031,12 +4194,12 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.2.tgz", - "integrity": "sha512-xtAeNsZ++aRIYIUsek7VHzry/9AcxeULlegBvsdLncLmNCR6tR8SRjn8BbDP4naxtccvzTqZ+L1ltZlRCfBZFA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.3.tgz", + "integrity": "sha512-qWC2mWc7VAXmjAkEKxrScWHWFyCQx/cmiZtuGqMi+WwqQJ2iURsVY4ZfAK6dVo6K2smKRU6l3BPwqEBvhnpQGg==", "peer": true, "dependencies": { - "@vitest/pretty-format": "2.1.2", + "@vitest/pretty-format": "2.1.3", "magic-string": "^0.30.11", "pathe": "^1.1.2" }, @@ -4045,9 +4208,9 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.2.tgz", - "integrity": "sha512-GSUi5zoy+abNRJwmFhBDC0yRuVUn8WMlQscvnbbXdKLXX9dE59YbfwXxuJ/mth6eeqIzofU8BB5XDo/Ns/qK2A==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.3.tgz", + "integrity": "sha512-Nb2UzbcUswzeSP7JksMDaqsI43Sj5+Kry6ry6jQJT4b5gAK+NS9NED6mDb8FlMRCX8m5guaHCDZmqYMMWRy5nQ==", "peer": true, "dependencies": { "tinyspy": "^3.0.0" @@ -4057,12 +4220,12 @@ } }, "node_modules/@vitest/utils": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.2.tgz", - "integrity": "sha512-zMO2KdYy6mx56btx9JvAqAZ6EyS3g49krMPPrgOp1yxGZiA93HumGk+bZ5jIZtOg5/VBYl5eBmGRQHqq4FG6uQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.3.tgz", + "integrity": "sha512-xpiVfDSg1RrYT0tX6czgerkpcKFmFOF/gCr30+Mve5V2kewCy4Prn1/NDMSRwaSmT7PRaOF83wu+bEtsY1wrvA==", "peer": true, "dependencies": { - "@vitest/pretty-format": "2.1.2", + "@vitest/pretty-format": "2.1.3", "loupe": "^3.1.1", "tinyrainbow": "^1.2.0" }, @@ -6001,6 +6164,15 @@ "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/detect-indent": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", @@ -6068,6 +6240,17 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -8348,6 +8531,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -12133,10 +12321,19 @@ "yallist": "^3.0.2" } }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "peer": true, + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "peer": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -12655,6 +12852,7 @@ "version": "8.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -12671,6 +12869,7 @@ "version": "6.0.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -12681,12 +12880,14 @@ "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -12703,6 +12904,7 @@ "version": "7.1.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -12716,12 +12918,14 @@ "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/@npmcli/agent": { "version": "2.2.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", @@ -12737,6 +12941,7 @@ "version": "7.5.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^3.1.1", @@ -12785,6 +12990,7 @@ "version": "8.3.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/map-workspaces": "^3.0.2", "@npmcli/package-json": "^5.1.1", @@ -12803,6 +13009,7 @@ "version": "3.1.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "semver": "^7.3.5" }, @@ -12814,6 +13021,7 @@ "version": "5.0.8", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/promise-spawn": "^7.0.0", "ini": "^4.1.3", @@ -12833,6 +13041,7 @@ "version": "2.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -12848,6 +13057,7 @@ "version": "3.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/name-from-folder": "^2.0.0", "glob": "^10.2.2", @@ -12862,6 +13072,7 @@ "version": "7.1.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "cacache": "^18.0.0", "json-parse-even-better-errors": "^3.0.0", @@ -12877,6 +13088,7 @@ "version": "2.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -12885,6 +13097,7 @@ "version": "3.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -12893,6 +13106,7 @@ "version": "5.2.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/git": "^5.0.0", "glob": "^10.2.2", @@ -12910,6 +13124,7 @@ "version": "7.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "which": "^4.0.0" }, @@ -12921,6 +13136,7 @@ "version": "3.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "postcss-selector-parser": "^6.0.10" }, @@ -12932,6 +13148,7 @@ "version": "2.0.1", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^16.14.0 || >=18.0.0" } @@ -12940,6 +13157,7 @@ "version": "8.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^5.0.0", @@ -12957,6 +13175,7 @@ "inBundle": true, "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=14" } @@ -12965,6 +13184,7 @@ "version": "2.3.2", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@sigstore/protobuf-specs": "^0.3.2" }, @@ -12976,6 +13196,7 @@ "version": "1.1.0", "inBundle": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^16.14.0 || >=18.0.0" } @@ -12984,6 +13205,7 @@ "version": "0.3.2", "inBundle": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^16.14.0 || >=18.0.0" } @@ -12992,6 +13214,7 @@ "version": "2.3.2", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.0.0", @@ -13008,6 +13231,7 @@ "version": "2.3.4", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@sigstore/protobuf-specs": "^0.3.2", "tuf-js": "^2.2.1" @@ -13020,6 +13244,7 @@ "version": "1.2.1", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.1.0", @@ -13033,6 +13258,7 @@ "version": "2.0.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": "^16.14.0 || >=18.0.0" } @@ -13041,6 +13267,7 @@ "version": "2.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^9.0.4" @@ -13053,6 +13280,7 @@ "version": "2.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13061,6 +13289,7 @@ "version": "7.1.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "debug": "^4.3.4" }, @@ -13072,6 +13301,7 @@ "version": "3.1.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -13084,6 +13314,7 @@ "version": "5.0.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -13092,6 +13323,7 @@ "version": "6.2.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -13102,22 +13334,26 @@ "node_modules/npm/node_modules/aproba": { "version": "2.0.0", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/archy": { "version": "1.0.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/balanced-match": { "version": "1.0.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/bin-links": { "version": "4.0.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "cmd-shim": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", @@ -13132,6 +13368,7 @@ "version": "2.3.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" }, @@ -13143,6 +13380,7 @@ "version": "2.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -13151,6 +13389,7 @@ "version": "18.0.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/fs": "^3.1.0", "fs-minipass": "^3.0.0", @@ -13173,6 +13412,7 @@ "version": "5.3.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -13184,6 +13424,7 @@ "version": "2.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": ">=10" } @@ -13198,6 +13439,7 @@ ], "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -13206,6 +13448,7 @@ "version": "4.1.1", "inBundle": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "ip-regex": "^5.0.0" }, @@ -13217,6 +13460,7 @@ "version": "2.2.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -13225,6 +13469,7 @@ "version": "4.0.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "string-width": "^4.2.3", "strip-ansi": "^6.0.1" @@ -13237,6 +13482,7 @@ "version": "6.0.3", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13245,6 +13491,7 @@ "version": "2.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -13255,17 +13502,20 @@ "node_modules/npm/node_modules/color-name": { "version": "1.1.4", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/common-ancestor-path": { "version": "1.0.1", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/cross-spawn": { "version": "7.0.3", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -13279,6 +13529,7 @@ "version": "2.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "isexe": "^2.0.0" }, @@ -13293,6 +13544,7 @@ "version": "3.0.0", "inBundle": true, "license": "MIT", + "peer": true, "bin": { "cssesc": "bin/cssesc" }, @@ -13304,6 +13556,7 @@ "version": "4.3.6", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ms": "2.1.2" }, @@ -13319,12 +13572,14 @@ "node_modules/npm/node_modules/debug/node_modules/ms": { "version": "2.1.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/diff": { "version": "5.2.0", "inBundle": true, "license": "BSD-3-Clause", + "peer": true, "engines": { "node": ">=0.3.1" } @@ -13332,18 +13587,21 @@ "node_modules/npm/node_modules/eastasianwidth": { "version": "0.2.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/emoji-regex": { "version": "8.0.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/encoding": { "version": "0.1.13", "inBundle": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -13352,6 +13610,7 @@ "version": "2.2.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -13359,17 +13618,20 @@ "node_modules/npm/node_modules/err-code": { "version": "2.0.3", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/exponential-backoff": { "version": "3.1.1", "inBundle": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "peer": true }, "node_modules/npm/node_modules/fastest-levenshtein": { "version": "1.0.16", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 4.9.1" } @@ -13378,6 +13640,7 @@ "version": "3.3.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -13393,6 +13656,7 @@ "version": "3.0.3", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^7.0.3" }, @@ -13404,6 +13668,7 @@ "version": "10.4.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", @@ -13422,12 +13687,14 @@ "node_modules/npm/node_modules/graceful-fs": { "version": "4.2.11", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/hosted-git-info": { "version": "7.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "lru-cache": "^10.0.1" }, @@ -13438,12 +13705,14 @@ "node_modules/npm/node_modules/http-cache-semantics": { "version": "4.1.1", "inBundle": true, - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "peer": true }, "node_modules/npm/node_modules/http-proxy-agent": { "version": "7.0.2", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -13456,6 +13725,7 @@ "version": "7.0.5", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -13469,6 +13739,7 @@ "inBundle": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -13480,6 +13751,7 @@ "version": "6.0.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minimatch": "^9.0.0" }, @@ -13491,6 +13763,7 @@ "version": "0.1.4", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.8.19" } @@ -13499,6 +13772,7 @@ "version": "4.0.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -13507,6 +13781,7 @@ "version": "4.1.3", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13515,6 +13790,7 @@ "version": "6.0.3", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/package-json": "^5.0.0", "npm-package-arg": "^11.0.0", @@ -13532,6 +13808,7 @@ "version": "9.0.5", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -13544,6 +13821,7 @@ "version": "5.0.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -13555,6 +13833,7 @@ "version": "5.1.0", "inBundle": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "cidr-regex": "^4.1.1" }, @@ -13566,6 +13845,7 @@ "version": "3.0.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -13573,17 +13853,20 @@ "node_modules/npm/node_modules/is-lambda": { "version": "1.0.1", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/isexe": { "version": "2.0.0", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/jackspeak": { "version": "3.4.3", "inBundle": true, "license": "BlueOak-1.0.0", + "peer": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -13597,12 +13880,14 @@ "node_modules/npm/node_modules/jsbn": { "version": "1.1.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/json-parse-even-better-errors": { "version": "3.0.2", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13611,6 +13896,7 @@ "version": "1.1.4", "inBundle": true, "license": "ISC", + "peer": true, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -13621,22 +13907,26 @@ "node >= 0.2.0" ], "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/just-diff": { "version": "6.0.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/just-diff-apply": { "version": "5.5.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/libnpmaccess": { "version": "8.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-package-arg": "^11.0.2", "npm-registry-fetch": "^17.0.1" @@ -13649,6 +13939,7 @@ "version": "6.1.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/arborist": "^7.5.4", "@npmcli/installed-package-contents": "^2.1.0", @@ -13667,6 +13958,7 @@ "version": "8.1.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/arborist": "^7.5.4", "@npmcli/run-script": "^8.1.0", @@ -13687,6 +13979,7 @@ "version": "5.0.12", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/arborist": "^7.5.4" }, @@ -13698,6 +13991,7 @@ "version": "10.0.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "aproba": "^2.0.0", "npm-registry-fetch": "^17.0.1" @@ -13710,6 +14004,7 @@ "version": "6.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "aproba": "^2.0.0", "npm-registry-fetch": "^17.0.1" @@ -13722,6 +14017,7 @@ "version": "7.0.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/arborist": "^7.5.4", "@npmcli/run-script": "^8.1.0", @@ -13736,6 +14032,7 @@ "version": "9.0.9", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "ci-info": "^4.0.0", "normalize-package-data": "^6.0.1", @@ -13754,6 +14051,7 @@ "version": "7.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-registry-fetch": "^17.0.1" }, @@ -13765,6 +14063,7 @@ "version": "6.0.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "aproba": "^2.0.0", "npm-registry-fetch": "^17.0.1" @@ -13777,6 +14076,7 @@ "version": "6.0.3", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/git": "^5.0.7", "@npmcli/run-script": "^8.1.0", @@ -13791,12 +14091,14 @@ "node_modules/npm/node_modules/lru-cache": { "version": "10.4.3", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/make-fetch-happen": { "version": "13.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/agent": "^2.0.0", "cacache": "^18.0.0", @@ -13819,6 +14121,7 @@ "version": "9.0.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -13833,6 +14136,7 @@ "version": "7.1.2", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": ">=16 || 14 >=14.17" } @@ -13841,6 +14145,7 @@ "version": "2.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^7.0.3" }, @@ -13852,6 +14157,7 @@ "version": "3.0.5", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", @@ -13868,6 +14174,7 @@ "version": "1.0.5", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -13879,6 +14186,7 @@ "version": "3.3.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -13890,6 +14198,7 @@ "version": "1.2.4", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -13901,6 +14210,7 @@ "version": "3.3.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -13912,6 +14222,7 @@ "version": "1.0.3", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -13923,6 +14234,7 @@ "version": "3.3.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -13934,6 +14246,7 @@ "version": "2.1.2", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -13946,6 +14259,7 @@ "version": "3.3.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -13957,6 +14271,7 @@ "version": "1.0.4", "inBundle": true, "license": "MIT", + "peer": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -13967,12 +14282,14 @@ "node_modules/npm/node_modules/ms": { "version": "2.1.3", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/mute-stream": { "version": "1.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13981,6 +14298,7 @@ "version": "0.6.3", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 0.6" } @@ -13989,6 +14307,7 @@ "version": "10.2.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", @@ -14012,6 +14331,7 @@ "version": "7.2.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "abbrev": "^2.0.0" }, @@ -14026,6 +14346,7 @@ "version": "6.0.2", "inBundle": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "hosted-git-info": "^7.0.0", "semver": "^7.3.5", @@ -14039,6 +14360,7 @@ "version": "5.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14047,6 +14369,7 @@ "version": "3.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-normalize-package-bin": "^3.0.0" }, @@ -14058,6 +14381,7 @@ "version": "6.3.0", "inBundle": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "semver": "^7.1.1" }, @@ -14069,6 +14393,7 @@ "version": "3.0.1", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14077,6 +14402,7 @@ "version": "11.0.3", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "hosted-git-info": "^7.0.0", "proc-log": "^4.0.0", @@ -14091,6 +14417,7 @@ "version": "8.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "ignore-walk": "^6.0.4" }, @@ -14102,6 +14429,7 @@ "version": "9.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-install-checks": "^6.0.0", "npm-normalize-package-bin": "^3.0.0", @@ -14116,6 +14444,7 @@ "version": "10.0.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "npm-registry-fetch": "^17.0.1", "proc-log": "^4.0.0" @@ -14128,6 +14457,7 @@ "version": "17.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/redact": "^2.0.0", "jsonparse": "^1.3.1", @@ -14146,6 +14476,7 @@ "version": "2.0.1", "inBundle": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14154,6 +14485,7 @@ "version": "4.0.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "aggregate-error": "^3.0.0" }, @@ -14167,12 +14499,14 @@ "node_modules/npm/node_modules/package-json-from-dist": { "version": "1.0.0", "inBundle": true, - "license": "BlueOak-1.0.0" + "license": "BlueOak-1.0.0", + "peer": true }, "node_modules/npm/node_modules/pacote": { "version": "18.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "@npmcli/git": "^5.0.0", "@npmcli/installed-package-contents": "^2.0.1", @@ -14203,6 +14537,7 @@ "version": "3.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "json-parse-even-better-errors": "^3.0.0", "just-diff": "^6.0.0", @@ -14216,6 +14551,7 @@ "version": "3.1.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -14224,6 +14560,7 @@ "version": "1.11.1", "inBundle": true, "license": "BlueOak-1.0.0", + "peer": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -14239,6 +14576,7 @@ "version": "6.1.2", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -14251,6 +14589,7 @@ "version": "4.2.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14259,6 +14598,7 @@ "version": "2.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14267,6 +14607,7 @@ "version": "1.0.1", "inBundle": true, "license": "ISC", + "peer": true, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -14275,6 +14616,7 @@ "version": "3.0.1", "inBundle": true, "license": "ISC", + "peer": true, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -14282,12 +14624,14 @@ "node_modules/npm/node_modules/promise-inflight": { "version": "1.0.1", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/promise-retry": { "version": "2.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -14300,6 +14644,7 @@ "version": "1.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "read": "^3.0.1" }, @@ -14310,6 +14655,7 @@ "node_modules/npm/node_modules/qrcode-terminal": { "version": "0.12.0", "inBundle": true, + "peer": true, "bin": { "qrcode-terminal": "bin/qrcode-terminal.js" } @@ -14318,6 +14664,7 @@ "version": "3.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "mute-stream": "^1.0.0" }, @@ -14329,6 +14676,7 @@ "version": "4.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14337,6 +14685,7 @@ "version": "3.0.2", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "json-parse-even-better-errors": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" @@ -14349,6 +14698,7 @@ "version": "0.12.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 4" } @@ -14357,12 +14707,14 @@ "version": "2.1.2", "inBundle": true, "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/npm/node_modules/semver": { "version": "7.6.3", "inBundle": true, "license": "ISC", + "peer": true, "bin": { "semver": "bin/semver.js" }, @@ -14374,6 +14726,7 @@ "version": "2.0.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -14385,6 +14738,7 @@ "version": "3.0.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=8" } @@ -14393,6 +14747,7 @@ "version": "4.1.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": ">=14" }, @@ -14404,6 +14759,7 @@ "version": "2.3.1", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@sigstore/bundle": "^2.3.2", "@sigstore/core": "^1.0.0", @@ -14420,6 +14776,7 @@ "version": "4.2.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -14429,6 +14786,7 @@ "version": "2.8.3", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -14442,6 +14800,7 @@ "version": "8.0.4", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", @@ -14455,6 +14814,7 @@ "version": "3.2.0", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -14464,6 +14824,7 @@ "version": "3.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -14472,12 +14833,14 @@ "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.5.0", "inBundle": true, - "license": "CC-BY-3.0" + "license": "CC-BY-3.0", + "peer": true }, "node_modules/npm/node_modules/spdx-expression-parse": { "version": "4.0.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -14486,17 +14849,20 @@ "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.18", "inBundle": true, - "license": "CC0-1.0" + "license": "CC0-1.0", + "peer": true }, "node_modules/npm/node_modules/sprintf-js": { "version": "1.1.3", "inBundle": true, - "license": "BSD-3-Clause" + "license": "BSD-3-Clause", + "peer": true }, "node_modules/npm/node_modules/ssri": { "version": "10.0.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^7.0.3" }, @@ -14508,6 +14874,7 @@ "version": "4.2.3", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14522,6 +14889,7 @@ "version": "4.2.3", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14535,6 +14903,7 @@ "version": "6.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -14547,6 +14916,7 @@ "version": "6.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -14558,6 +14928,7 @@ "version": "9.4.0", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -14569,6 +14940,7 @@ "version": "6.2.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -14585,6 +14957,7 @@ "version": "2.1.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -14596,6 +14969,7 @@ "version": "3.3.6", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -14607,6 +14981,7 @@ "version": "5.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": ">=8" } @@ -14614,17 +14989,20 @@ "node_modules/npm/node_modules/text-table": { "version": "0.2.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/tiny-relative-date": { "version": "1.3.0", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/treeverse": { "version": "3.0.0", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14633,6 +15011,7 @@ "version": "2.2.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "@tufjs/models": "2.0.1", "debug": "^4.3.4", @@ -14646,6 +15025,7 @@ "version": "3.0.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "unique-slug": "^4.0.0" }, @@ -14657,6 +15037,7 @@ "version": "4.0.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "imurmurhash": "^0.1.4" }, @@ -14667,12 +15048,14 @@ "node_modules/npm/node_modules/util-deprecate": { "version": "1.0.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/validate-npm-package-license": { "version": "3.0.4", "inBundle": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -14682,6 +15065,7 @@ "version": "3.0.1", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -14691,6 +15075,7 @@ "version": "5.0.1", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -14698,12 +15083,14 @@ "node_modules/npm/node_modules/walk-up-path": { "version": "3.0.1", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/npm/node_modules/which": { "version": "4.0.0", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "isexe": "^3.1.1" }, @@ -14718,6 +15105,7 @@ "version": "3.1.1", "inBundle": true, "license": "ISC", + "peer": true, "engines": { "node": ">=16" } @@ -14726,6 +15114,7 @@ "version": "8.1.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -14743,6 +15132,7 @@ "version": "7.0.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -14759,6 +15149,7 @@ "version": "4.3.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -14773,6 +15164,7 @@ "version": "6.0.1", "inBundle": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -14783,12 +15175,14 @@ "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "9.2.2", "inBundle": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { "version": "5.1.2", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -14805,6 +15199,7 @@ "version": "7.1.0", "inBundle": true, "license": "MIT", + "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -14819,6 +15214,7 @@ "version": "5.0.1", "inBundle": true, "license": "ISC", + "peer": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" @@ -14830,7 +15226,8 @@ "node_modules/npm/node_modules/yallist": { "version": "4.0.0", "inBundle": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/nwsapi": { "version": "2.2.13", @@ -15541,6 +15938,38 @@ "typescript": ">4.0.0" } }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "peer": true + }, "node_modules/pretty-ms": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.1.0.tgz", @@ -15666,6 +16095,31 @@ "node": ">=0.10.0" } }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -15943,6 +16397,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "peer": true + }, "node_modules/regexp-tree": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", @@ -16258,6 +16718,15 @@ "node": ">=v12.22.7" } }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/semantic-release": { "version": "23.1.1", "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-23.1.1.tgz", @@ -17852,6 +18321,25 @@ "typescript": ">=4.2.0" } }, + "node_modules/tsconfck": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.4.tgz", + "integrity": "sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==", + "bin": { + "tsconfck": "bin/tsconfck.js" + }, + "engines": { + "node": "^18 || >=20" + }, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -18234,9 +18722,9 @@ } }, "node_modules/vite-node": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.2.tgz", - "integrity": "sha512-HPcGNN5g/7I2OtPjLqgOtCRu/qhVvBxTUD3qzitmL0SrG1cWFzxzhMDWussxSbrRYWqnKf8P2jiNhPMSN+ymsQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.3.tgz", + "integrity": "sha512-I1JadzO+xYX887S39Do+paRePCKoiDrWRRjp9kkG5he0t7RXNvPAJPCQSJqbGN4uCrFFeS3Kj3sLqY8NMYBEdA==", "peer": true, "dependencies": { "cac": "^6.7.14", @@ -18254,19 +18742,37 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-tsconfig-paths": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.0.1.tgz", + "integrity": "sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==", + "dependencies": { + "debug": "^4.1.1", + "globrex": "^0.1.2", + "tsconfck": "^3.0.3" + }, + "peerDependencies": { + "vite": "*" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, "node_modules/vitest": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.2.tgz", - "integrity": "sha512-veNjLizOMkRrJ6xxb+pvxN6/QAWg95mzcRjtmkepXdN87FNfxAss9RKe2far/G9cQpipfgP2taqg0KiWsquj8A==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.3.tgz", + "integrity": "sha512-Zrxbg/WiIvUP2uEzelDNTXmEMJXuzJ1kCpbDvaKByFA9MNeO95V+7r/3ti0qzJzrxdyuUw5VduN7k+D3VmVOSA==", "peer": true, "dependencies": { - "@vitest/expect": "2.1.2", - "@vitest/mocker": "2.1.2", - "@vitest/pretty-format": "^2.1.2", - "@vitest/runner": "2.1.2", - "@vitest/snapshot": "2.1.2", - "@vitest/spy": "2.1.2", - "@vitest/utils": "2.1.2", + "@vitest/expect": "2.1.3", + "@vitest/mocker": "2.1.3", + "@vitest/pretty-format": "^2.1.3", + "@vitest/runner": "2.1.3", + "@vitest/snapshot": "2.1.3", + "@vitest/spy": "2.1.3", + "@vitest/utils": "2.1.3", "chai": "^5.1.1", "debug": "^4.3.6", "magic-string": "^0.30.11", @@ -18277,7 +18783,7 @@ "tinypool": "^1.0.0", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.2", + "vite-node": "2.1.3", "why-is-node-running": "^2.3.0" }, "bin": { @@ -18292,8 +18798,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.2", - "@vitest/ui": "2.1.2", + "@vitest/browser": "2.1.3", + "@vitest/ui": "2.1.3", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 4e44abc..b720ae1 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,14 @@ "./release/app": "./src/semantic-release/semanticRelease.app.js", "./release/npm": "./src/semantic-release/semanticRelease.npm.js", "./prettier": "./src/prettier/index.js", - "./vitest/setup-react": "./src/vitest/setup.react.ts", - "./vitest/react": "./src/vitest/vite.react.ts", - "./tsconfig/base": "./src/tsconfig/tsconfig.base.json", - "./tsconfig/node": "./src/tsconfig/tsconfig.node.json", - "./tsconfig/web": "./src/tsconfig/tsconfig.web.json" + "./vitest/setup-node": "./src/vitest/setup.node.ts", + "./vitest/setup-web": "./src/vitest/setup.web.ts", + "./vitest/node": "./src/vitest/vitest.node.ts", + "./vitest/web": "./src/vitest/vitest.web.ts", + "./tsconfig/base": "./src/tsconfig/tsconfig.json", + "./tsconfig/nestjs": "./src/tsconfig/tsconfig.nestjs.json", + "./tsconfig/react": "./src/tsconfig/tsconfig.react.json", + "./tsconfig/remix": "./src/tsconfig/tsconfig.remix.json" }, "main": "index.js", "files": [ @@ -47,9 +50,11 @@ "build": "echo \"no build needed\" && exit 0" }, "lint-staged": { - "*": "prettier -w --ignore-unknown", - "src/**/*.{ts,tsx}": [ - "npm run prettier-fix", + "*": [ + "npm run commitlint", + "npm run prettier-fix" + ], + "**/*.{ts,tsx}": [ "npm run eslint-check" ] }, @@ -69,6 +74,7 @@ "@typescript-eslint/parser": "^7.1.1", "@vitejs/plugin-react": "^4.3.2", "c8": "^10.1.2", + "dotenv": "^16.4.5", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-import-resolver-typescript": "^3.6.1", @@ -90,6 +96,7 @@ "prettier-plugin-sort-imports": "^1.8.6", "semantic-release-github-pullrequest": "^1.3.0", "url-join": "^4.0.1", + "vite-tsconfig-paths": "^5.0.1", "vitest-axe": "^0.1.0" }, "engines": { @@ -98,13 +105,18 @@ "peerDependencies": { "@commitlint/cli": "^19.0.3", "@commitlint/config-conventional": "^19.0.3", + "@testing-library/jest-dom": "^6.5.0", + "@testing-library/react": "^16.0.1", + "@testing-library/user-event": "^14.5.2", + "@vitejs/plugin-react": "^4.3.2", "eslint": "^8.57.0", "husky": "^9.0.11", "prettier": "^3.3.3", "semantic-release": "^23.0.2", "typescript": "^5.3.3", "vite": "^5.4.8", - "vitest": "^2.1.2" + "vitest": "^2.1.3", + "vitest-axe": "^0.1.0" }, "publishConfig": { "access": "public" diff --git a/src/eslint/eslint.base.js b/src/eslint/eslint.base.js index 27fc47e..c1b4a4e 100644 --- a/src/eslint/eslint.base.js +++ b/src/eslint/eslint.base.js @@ -58,10 +58,14 @@ module.exports = { extends: ['plugin:vitest/recommended'], files: [...TYPESCRIPT_TEST_FILES, ...JAVASCRIPT_TEST_FILES], plugins: ['vitest'], - rules: vitest.rules, + rules: { + ...vitest.rules, + '@typescript-eslint/no-unsafe-call': 'off', + 'import/order': 'off', + }, }, { - files: ['vitest.config.ts'], + files: ['vitest.web.ts', 'vitest.node.ts'], rules: { 'import/no-cycle': 'off', }, diff --git a/src/tsconfig/tsconfig.test.json b/src/tsconfig/tsconfig.test.json deleted file mode 100644 index 81151ca..0000000 --- a/src/tsconfig/tsconfig.test.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./tsconfig.json", - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "isolatedModules": true, - "jsx": "react-jsx", - "lib": ["ES2020", "DOM"], - "module": "CommonJS", - "noEmit": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "ES2020" - }, - "include": [ - "remix.env.d.ts", - "**/*.spec.ts", - "**/*.test.ts", - "**/*.ts", - "**/*.tsx" - ], - "exclude": ["node_modules", "dist", "build"] -} diff --git a/src/tsconfig/tsconfig.web.json b/src/tsconfig/tsconfig.web.json deleted file mode 100644 index e8dec7c..0000000 --- a/src/tsconfig/tsconfig.web.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./tsconfig.json", - "display": "Web", - "compilerOptions": { - "esModuleInterop": true, - "jsx": "react-jsx", - "lib": ["DOM", "DOM.Iterable", "ES2020"], - "module": "ESNext", - "target": "ES2020" - } -} diff --git a/src/vitest/setup.node.ts b/src/vitest/setup.node.ts new file mode 100644 index 0000000..0740e65 --- /dev/null +++ b/src/vitest/setup.node.ts @@ -0,0 +1,3 @@ +import { config } from 'dotenv'; + +config({ path: '.env.test' }); diff --git a/src/vitest/setup.react.ts b/src/vitest/setup.web.ts similarity index 86% rename from src/vitest/setup.react.ts rename to src/vitest/setup.web.ts index 598ac41..f22dacb 100644 --- a/src/vitest/setup.react.ts +++ b/src/vitest/setup.web.ts @@ -1,8 +1,12 @@ +/* eslint @typescript-eslint/no-unsafe-member-access: 0 */ import '@testing-library/jest-dom/vitest'; +import { config } from 'dotenv'; import { expect, vi } from 'vitest'; import 'vitest-axe/extend-expect'; import * as matchers from 'vitest-axe/matchers'; +config({ path: '.env.test' }); + expect.extend(matchers); // @ts-expect-error since we are mocking HTMLCanvasElement.getContext diff --git a/src/vitest/vitest.node.ts b/src/vitest/vitest.node.ts new file mode 100644 index 0000000..9b4e896 --- /dev/null +++ b/src/vitest/vitest.node.ts @@ -0,0 +1,26 @@ +import * as path from 'node:path'; +import { defineConfig } from 'vite'; +import tsconfigPaths from 'vite-tsconfig-paths'; + +// needed this way by vitest +// eslint-disable-next-line import/no-default-export +export default defineConfig({ + plugins: [tsconfigPaths()], + resolve: { + alias: { + '~': path.resolve(__dirname, './src'), + }, + }, + test: { + coverage: { + // @ts-expect-error since its 'c8' custom + provider: 'c8', + reporter: ['text', 'html'], + }, + environment: 'node', + exclude: ['node_modules', 'dist'], + globals: true, + include: ['**/*.spec.ts', '**/*.test.ts'], + setupFiles: require.resolve('./setup.node.ts'), + }, +}); diff --git a/src/vitest/vite.react.ts b/src/vitest/vitest.web.ts similarity index 76% rename from src/vitest/vite.react.ts rename to src/vitest/vitest.web.ts index de0e95e..2a6fd9f 100644 --- a/src/vitest/vite.react.ts +++ b/src/vitest/vitest.web.ts @@ -14,6 +14,7 @@ export default defineConfig({ css: true, environment: 'jsdom', globals: true, - setupFiles: './setup.react.ts', + include: ['**/*.spec.ts', '**/*.test.ts', '**/*.spec.tsx', '**/*.test.tsx'], + setupFiles: require.resolve('./setup.web.ts'), }, });