diff --git a/.github/actions/cleanup-alpha-versions/action.yml b/.github/actions/cleanup-alpha-versions/action.yml new file mode 100644 index 000000000..06b4df51d --- /dev/null +++ b/.github/actions/cleanup-alpha-versions/action.yml @@ -0,0 +1,195 @@ +name: 'Cleanup Alpha Versions' +description: 'Remove alpha versions from GitHub Packages based on age or PR number' + +inputs: + days: + description: 'Remove alpha versions older than this many days' + required: false + pr-number: + description: 'PR number to remove alpha versions for' + required: false + token: + description: 'GitHub token with packages write permission' + required: true + default: ${{ github.token }} + package-name: + description: 'NPM package name (defaults to package.json name)' + required: false + keep-latest: + description: 'Keep the latest X alpha versions (works alongside days and pr-number filters)' + required: false + +runs: + using: "composite" + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + registry-url: 'https://npm.pkg.github.com' + + - name: Cleanup Alpha Versions + shell: bash + run: | + # Get the package name (either from input or package.json) + if [[ -z "${{ inputs.package-name }}" ]]; then + PACKAGE_FULL_NAME=$(node -p "require('./package.json').name") + else + PACKAGE_FULL_NAME="${{ inputs.package-name }}" + fi + + echo "Working with package: $PACKAGE_FULL_NAME" + + # Extract organization and package name + ORG="${PACKAGE_FULL_NAME#@}" # Remove the '@' from the start + ORG="${ORG%%/*}" # Extract the part before the first '/' + PACKAGE="${PACKAGE_FULL_NAME#*/}" # Remove everything before the first '/' (including the '/') + + echo "Organization: $ORG, Package: $PACKAGE" + + # Get the alpha versions and their publish dates + ALPHA_INFO=$(npm view $PACKAGE_FULL_NAME time --json | jq 'to_entries | map(select(.key | contains("-alpha"))) | map({version: .key, date: .value})') + + # If there's no alpha versions, exit early + if [ -z "$ALPHA_INFO" ] || [ "$ALPHA_INFO" == "[]" ]; then + echo "No alpha versions found for package $PACKAGE_FULL_NAME" + exit 0 + fi + + # Fetch all versions to have complete information + ALL_VERSIONS=$(curl -s -H "Authorization: Bearer ${{ inputs.token }}" \ + "https://api.github.com/orgs/$ORG/packages/npm/$PACKAGE/versions") + + if [ -z "$ALL_VERSIONS" ] || [ "$ALL_VERSIONS" == "null" ]; then + echo "Error: Could not fetch versions for $PACKAGE_FULL_NAME" + echo "Response: $ALL_VERSIONS" + exit 1 + fi + + # Init variables from inputs + REMOVE_DAYS="${{ inputs.days }}" + PR_NUMBER="${{ inputs.pr-number }}" + KEEP_LATEST="${{ inputs.keep-latest }}" + CURRENT_DATE=$(date +%s) + + # Log what we're doing + echo "Filter settings:" + [ -n "$REMOVE_DAYS" ] && echo "- Remove versions older than $REMOVE_DAYS days" + [ -n "$PR_NUMBER" ] && echo "- Remove versions for PR #$PR_NUMBER" + [ -n "$KEEP_LATEST" ] && echo "- Keep the latest $KEEP_LATEST versions" + [ -z "$REMOVE_DAYS" ] && [ -z "$PR_NUMBER" ] && [ -z "$KEEP_LATEST" ] && echo "- No filters - will remove ALL alpha versions" + + # ---------- Step 1: Create a filtered list of versions to consider ---------- + # First, create a file with all alpha versions and their info + echo "$ALPHA_INFO" | jq -c '.[]' > all_versions.json + + # If PR filter is active, create filtered list for just that PR + if [ -n "$PR_NUMBER" ]; then + cat all_versions.json | while read -r VERSION_DATA; do + VERSION=$(echo "$VERSION_DATA" | jq -r '.version') + + if echo "$VERSION" | grep -q ".pr-$PR_NUMBER-"; then + echo "$VERSION_DATA" >> filtered_versions.json + fi + done + else + # If no PR filter, use all alpha versions + cp all_versions.json filtered_versions.json + fi + + # If days filter is active, remove versions newer than cutoff + if [ -n "$REMOVE_DAYS" ]; then + REMOVE_DAYS_IN_SECONDS=$((REMOVE_DAYS * 24 * 60 * 60)) + + if [ -f "filtered_versions.json" ]; then + rm -f temp_filtered.json + + cat filtered_versions.json | while read -r VERSION_DATA; do + VERSION=$(echo "$VERSION_DATA" | jq -r '.version') + PUBLISH_DATE=$(echo "$VERSION_DATA" | jq -r '.date') + PUBLISH_DATE_SECONDS=$(date -d "$PUBLISH_DATE" +%s 2>/dev/null || date -j -f "%Y-%m-%dT%H:%M:%S.000Z" "$PUBLISH_DATE" +%s 2>/dev/null) + + DIFF_SECONDS=$((CURRENT_DATE - PUBLISH_DATE_SECONDS)) + if [ $DIFF_SECONDS -gt $REMOVE_DAYS_IN_SECONDS ]; then + echo "$VERSION_DATA" >> temp_filtered.json + fi + done + + if [ -f "temp_filtered.json" ]; then + mv temp_filtered.json filtered_versions.json + else + # No versions match our date criteria + echo "No versions match the days filter" + rm filtered_versions.json + touch filtered_versions.json + fi + fi + fi + + # ---------- Step 2: Handle keep-latest if specified ---------- + if [ -n "$KEEP_LATEST" ] && [ -f "filtered_versions.json" ] && [ -s "filtered_versions.json" ]; then + # First, sort filtered versions by date (newest first) + cat filtered_versions.json | jq -s 'sort_by(.date) | reverse' > sorted_versions.json + + # Calculate how many to keep vs delete + TOTAL_VERSIONS=$(cat sorted_versions.json | jq 'length') + + if [ "$TOTAL_VERSIONS" -le "$KEEP_LATEST" ]; then + echo "Found $TOTAL_VERSIONS versions, which is <= $KEEP_LATEST to keep. Nothing to delete." + # Clear the filtered list since we're keeping all + rm filtered_versions.json + touch filtered_versions.json + else + # Keep only versions beyond the keep-latest count + cat sorted_versions.json | jq ".[${KEEP_LATEST}:]" > to_delete.json + + cat to_delete.json + # If we have versions to delete, replace filtered list + if [ -s "to_delete.json" ]; then + rm filtered_versions.json + cat to_delete.json | jq -c '.[]' > filtered_versions.json + fi + fi + fi + + # ---------- Step 3: Delete all versions in our final filtered list ---------- + if [ -f "filtered_versions.json" ] && [ -s "filtered_versions.json" ]; then + echo "The following versions will be deleted:" + cat filtered_versions.json | while read -r VERSION_DATA; do + VERSION=$(echo "$VERSION_DATA" | jq -r '.version') + PUBLISH_DATE=$(echo "$VERSION_DATA" | jq -r '.date') + echo "- $VERSION (published $PUBLISH_DATE)" + + # Get version ID + VERSION_INFO=$(echo "$ALL_VERSIONS" | jq -r ".[] | select(.name == \"$VERSION\")") + VERSION_ID=$(echo "$VERSION_INFO" | jq -r '.id') + + if [ -z "$VERSION_ID" ] || [ "$VERSION_ID" == "null" ]; then + echo "+++++++++++++++++++++++++++++++++" + echo $ALL_VERSIONS + echo "+++++++++++++++++++++++++++++++++" + echo " Warning: Could not find ID for version $VERSION" + continue + fi + + # Delete the version + DELETE_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE \ + -H "Authorization: Bearer ${{ inputs.token }}" \ + "https://api.github.com/orgs/$ORG/packages/npm/$PACKAGE/versions/$VERSION_ID") + + # Check for errors based on the HTTP status code + if [ "$DELETE_RESPONSE" -ge 200 ] && [ "$DELETE_RESPONSE" -lt 300 ]; then + echo " ✅ Successfully deleted version $VERSION" + else + echo " ❌ Error deleting version $VERSION: HTTP $DELETE_RESPONSE" + fi + done + else + echo "No versions to delete based on the specified criteria." + fi + + # Clean up temp files + rm -f all_versions.json filtered_versions.json sorted_versions.json to_delete.json + + env: + NODE_AUTH_TOKEN: ${{ inputs.token }} \ No newline at end of file diff --git a/.github/actions/setup-node-pnpm/action.yaml b/.github/actions/setup-node-pnpm/action.yaml new file mode 100644 index 000000000..3aeb6316a --- /dev/null +++ b/.github/actions/setup-node-pnpm/action.yaml @@ -0,0 +1,33 @@ +name: 'Setup Node and pnpm' +description: 'Setup Node.js and pnpm, install dependencies and build' +inputs: + node-version: + description: 'Node.js version' + required: false + default: '22.x' + registry: + description: 'Registry URL' + required: false + default: 'https://npm.pkg.github.com' + scope: + description: 'Scope' + required: false + default: '@factorialco' + +runs: + using: "composite" + steps: + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + registry-url: ${{ inputs.registry }} + scope: ${{ inputs.scope }} + cache: pnpm + + - name: Install dependencies + run: pnpm install + shell: bash diff --git a/.github/workflows/build-and-publish-alpha.yaml b/.github/workflows/build-and-publish-alpha.yaml new file mode 100644 index 000000000..858f650d4 --- /dev/null +++ b/.github/workflows/build-and-publish-alpha.yaml @@ -0,0 +1,62 @@ +name: Build and Publish [ALPHA] + +on: + issue_comment: + types: [ created ] + pull_request: + types: [ opened, synchronize ] + +jobs: + publish-alpha: + if: | + (github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, 'build')) || + github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: ./.github/actions/setup-node-pnpm + name: Setup Node and pnpm + + - name: Build + run: pnpm build + + - name: Create new version + run: | + # Get lastest version from package.json + CURRENT_VERSION=$(node -p "require('./package.json').version") + PR_NUMBER=${{ github.event.pull_request.number }} + COMMIT_SHA=$(git rev-parse --short ${{ github.sha }}) + + # Create alpha version + ALPHA_VERSION="${CURRENT_VERSION}-alpha.pr-${PR_NUMBER}-$(date +%Y%m%d%H%M%S)-${COMMIT_SHA}" + + # Update package.json version + pnpm version $ALPHA_VERSION --no-git-tag-version + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to registry + run: | + # Publish alpha version + pnpm publish --tag alpha --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Keep only latest 3 alpha versions for this PR + uses: ./.github/actions/cleanup-alpha-versions + with: + token: ${{ github.token }} + pr-number: ${{ github.event.pull_request.number }} + keep-latest: 3 + + diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 051f648ee..411cb0f23 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -23,12 +23,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - run: pnpm install + - uses: ./.github/actions/setup-node-pnpm - name: Run Chromatic id: chromatic uses: chromaui/action@latest diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c7bd59bd6..4b0b4bc6d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -19,11 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm + - uses: ./.github/actions/setup-node-pnpm - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 with: install_command: pnpm install diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml new file mode 100644 index 000000000..8e23f58d2 --- /dev/null +++ b/.github/workflows/npm-publish.yaml @@ -0,0 +1,28 @@ +name: Publish factorial-one package to npm + +on: + release: + types: [ published ] # Triggers when a new release is published + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} # Checkout the tagged release + + - uses: ./.github/actions/setup-node-pnpm + name: Setup Node and pnpm + + - name: Build + run: pnpm build + + - name: Publish to registry + run: pnpm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 504910aaf..5172760f0 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -1,7 +1,7 @@ name: Code Quality checks on: pull_request: - branches: [main] + branches: [ main ] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -12,13 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - name: Install dependencies - run: pnpm install + - uses: ./.github/actions/setup-node-pnpm - name: Check formatting with Prettier run: pnpm run prettier:check:ci eslint: @@ -26,13 +20,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - name: Install dependencies - run: pnpm install + - uses: ./.github/actions/setup-node-pnpm - name: Check linting with eslint run: pnpm run lint diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d7f436d69..46493dbdb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,31 +1,40 @@ -name: Update release branch and create package +name: Create release + on: push: + branches: + - main + jobs: - build: + release-please: runs-on: ubuntu-latest permissions: contents: write - packages: write + pull-requests: write + env: + BRANCH: ${{ github.event.repository.default_branch }} + outputs: + release_created: ${{ steps.release.outputs.release_created }} + pr: ${{ steps.release.outputs.pr }} steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - run: pnpm install - - run: pnpm run build - - run: echo node_modules > .gitignore - - uses: JS-DevTools/npm-publish@v3 - if: github.ref == 'refs/heads/main' + - uses: googleapis/release-please-action@v4 + id: release with: token: ${{ secrets.GITHUB_TOKEN }} - registry: "https://npm.pkg.github.com" - - uses: stefanzweifel/git-auto-commit-action@v5 - if: github.ref == 'refs/heads/main' + release-type: node + target-branch: ${{ env.BRANCH }} + + - uses: actions/checkout@v4 with: - commit_message: Commit Build - branch: release - create_branch: true - push_options: "--force" + ref: ${{ github.event.repository.default_branch }} + + - name: Merge PR + run: | + if [ -z "$PR_NUMBER" ]; then + echo "No PR number found" + exit 1 + fi + gh pr merge $PR_NUMBER --squash --admin + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ fromJSON(steps.release.outputs.pr || '{}').number }} \ No newline at end of file diff --git a/.github/workflows/remove-pr-alpha-versions.yaml b/.github/workflows/remove-pr-alpha-versions.yaml new file mode 100644 index 000000000..380c43e3f --- /dev/null +++ b/.github/workflows/remove-pr-alpha-versions.yaml @@ -0,0 +1,28 @@ +name: Build and Publish [ALPHA] + +on: + pull_request: + types: [ closed ] + +jobs: + clear-alpha-versions: + runs-on: ubuntu-latest + + permissions: + contents: write + packages: write + steps: + - name: Cleanup NPM PR alpha versions + + uses: ./.github/actions/cleanup-alpha-versions + if: ${{ github.event.pull_request.number }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + pr-number: ${{ github.event.pull_request.number }} # PR that triggered the workflow + + - name: Remove old alpha versions of any PR + uses: ./.github/actions/cleanup-alpha-versions + with: + token: ${{ github.token }} + days: 5 + diff --git a/.github/workflows/storybook-tests.yaml b/.github/workflows/storybook-tests.yaml index b6a3ae42d..63b9268f2 100644 --- a/.github/workflows/storybook-tests.yaml +++ b/.github/workflows/storybook-tests.yaml @@ -16,13 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - name: Install dependencies - run: pnpm install + - uses: ./.github/actions/setup-node-pnpm - name: Install Playwright run: pnpx playwright install --with-deps - name: Build Storybook diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 69acca9e2..adb96edde 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,13 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - - name: Install dependencies - run: pnpm install + - uses: ./.github/actions/setup-node-pnpm - name: Run type checking run: pnpm run tsc - name: Run tests diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 000000000..990bd0b7c --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx --no -- commitlint --edit "$1" \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..e69de29bb diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..02c3171b4 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@factorialco:registry=https://npm.pkg.github.com diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..a08779d74 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,5 @@ +{ + "pull-request-header": "Factorial-one release ${version} 🚀", + "pull-request-title-pattern": "🚀 🤖 Factorial-one: release ${version} ", + ".": "1.0.0" +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..33ec6fa70 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +# Changelog + +## 1.0.0 (2025-02-27) + + +### Features + +* add multiple type schema example ([#1204](https://github.com/factorialco/factorial-one/issues/1204)) ([59fa398](https://github.com/factorialco/factorial-one/commit/59fa398623992aa9cbb6e0afc411f7bc599a22b9)) +* add onClick to BarChart ([#1094](https://github.com/factorialco/factorial-one/issues/1094)) ([7a458f4](https://github.com/factorialco/factorial-one/commit/7a458f4aa6bef94b2490b9105e6a38fe61e71805)) +* add quick introduction to form libraries in forms documentation ([#1218](https://github.com/factorialco/factorial-one/issues/1218)) ([7a9a63c](https://github.com/factorialco/factorial-one/commit/7a9a63c6a65c63c64765e08a2c903c5d009fcd4d)) +* add radar chart ([#876](https://github.com/factorialco/factorial-one/issues/876)) ([0df9309](https://github.com/factorialco/factorial-one/commit/0df93094fe09932827aeec6003f9bfbcdb32096a)) +* nested schemas for forms examples ([#1202](https://github.com/factorialco/factorial-one/issues/1202)) ([9423367](https://github.com/factorialco/factorial-one/commit/94233675f865433c8a4f4c11b502d942b148a2b5)) + + +### Bug Fixes + +* allow undefined and booleand for conditional items ([#1140](https://github.com/factorialco/factorial-one/issues/1140)) ([4e336a8](https://github.com/factorialco/factorial-one/commit/4e336a8aedd245da80326db1ac211a27027e4254)) +* Breadcrumb type infer ([#1199](https://github.com/factorialco/factorial-one/issues/1199)) ([5673227](https://github.com/factorialco/factorial-one/commit/5673227e7c2cb2a8b3adbfa7922bf9c002345ce1)) +* Simplify breadcrumb type in Page header ([d7aa1c8](https://github.com/factorialco/factorial-one/commit/d7aa1c81abfa4c581c3f39770c5fd456a32b1d9e)) +* **Weekdays:** Use index for days of the week for the `activatedDays` prop ([#1194](https://github.com/factorialco/factorial-one/issues/1194)) ([1f4da9a](https://github.com/factorialco/factorial-one/commit/1f4da9a4e1ea907141ca587b296c228729c4f70d)) + +## 1.0.0 (2025-02-27) + + +### Features + +* add multiple type schema example ([#1204](https://github.com/factorialco/factorial-one/issues/1204)) ([59fa398](https://github.com/factorialco/factorial-one/commit/59fa398623992aa9cbb6e0afc411f7bc599a22b9)) +* add onClick to BarChart ([#1094](https://github.com/factorialco/factorial-one/issues/1094)) ([7a458f4](https://github.com/factorialco/factorial-one/commit/7a458f4aa6bef94b2490b9105e6a38fe61e71805)) +* add quick introduction to form libraries in forms documentation ([#1218](https://github.com/factorialco/factorial-one/issues/1218)) ([7a9a63c](https://github.com/factorialco/factorial-one/commit/7a9a63c6a65c63c64765e08a2c903c5d009fcd4d)) +* add radar chart ([#876](https://github.com/factorialco/factorial-one/issues/876)) ([0df9309](https://github.com/factorialco/factorial-one/commit/0df93094fe09932827aeec6003f9bfbcdb32096a)) +* nested schemas for forms examples ([#1202](https://github.com/factorialco/factorial-one/issues/1202)) ([9423367](https://github.com/factorialco/factorial-one/commit/94233675f865433c8a4f4c11b502d942b148a2b5)) + + +### Bug Fixes + +* allow undefined and booleand for conditional items ([#1140](https://github.com/factorialco/factorial-one/issues/1140)) ([4e336a8](https://github.com/factorialco/factorial-one/commit/4e336a8aedd245da80326db1ac211a27027e4254)) +* Breadcrumb type infer ([#1199](https://github.com/factorialco/factorial-one/issues/1199)) ([5673227](https://github.com/factorialco/factorial-one/commit/5673227e7c2cb2a8b3adbfa7922bf9c002345ce1)) +* Simplify breadcrumb type in Page header ([d7aa1c8](https://github.com/factorialco/factorial-one/commit/d7aa1c81abfa4c581c3f39770c5fd456a32b1d9e)) +* **Weekdays:** Use index for days of the week for the `activatedDays` prop ([#1194](https://github.com/factorialco/factorial-one/issues/1194)) ([1f4da9a](https://github.com/factorialco/factorial-one/commit/1f4da9a4e1ea907141ca587b296c228729c4f70d)) diff --git a/README.md b/README.md index 6123ae5fb..3037f1b76 100644 --- a/README.md +++ b/README.md @@ -5,65 +5,8 @@ [one.factorial.dev](https://one.factorial.dev/) -## Usage -In your react project: -```bash -$ npm install git+https://github.com/factorialco/factorial-one#release -``` +Please check the factorial-one's docs for understand the use cases, the architectures, the aggrements, conventions, how to develop in local, etc.. -Then, in your react files: - -```tsx -// In your `main.tsx` file or any top-level component -import "@factorialco/factorial-one/dist/styles.css" - -// If you want to use the shipped fonts -import "@factorialco/factorial-one/dist/fonts.js" - -// In any of your components -import { Button } from "@factorialco/factorial-one" -``` - -And that's it! - -## Development - -### Install nodejs - -The recommended approach is to use the `asdf` dependency manager. On MacOS + -Homebrew: - -```bash -$ brew install asdf -$ echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ -``` - -Then open a new terminal: - -```bash -$ asdf plugin add nodejs -``` - -Then, `cd` into the project's directory and: - -```bash -$ asdf install -``` - -This should leave you with a fully working nodejs version. - -### Start the project - -First, install the dependencies: - -```bash -$ npm install -``` - -Then run the storybook server: - -```bash -$ npm start -``` +# [factorial-one docs](docs/index.md) diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..3f5e287f9 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +export default { extends: ['@commitlint/config-conventional'] }; diff --git a/docs/development/development.md b/docs/development/development.md new file mode 100644 index 000000000..15bcd4c57 --- /dev/null +++ b/docs/development/development.md @@ -0,0 +1,48 @@ +# Development + + +## Install nodejs + +The recommended approach is to use the `asdf` dependency manager. On MacOS + +Homebrew: + +```bash +$ brew install asdf +$ echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ +``` + +Then open a new terminal: + +```bash +$ asdf plugin add nodejs +``` + +Then, `cd` into the project's directory and: + +```bash +$ asdf install +``` + +This should leave you with a fully working nodejs version. + +### Start the project + +First, install the dependencies: + +```bash +$ npm install +``` + +Then run the storybook server: + +```bash +$ npm start +``` + +## How to use local version of `factorial-one` in your repo (ex. `factorial`'s monorepo) + +- Go to the `factorial-one` folder: `cd factorial-one` +- Run `pnpm link --global` to add the package to the local links +- Go to your package: `cd factorial/frontend` +- Run `pnpm link --global @factorialco/factorial-one` to use the local version of the package +- NOTE: Remember to run `pnpm i` to install the dependencies diff --git a/docs/development/images/coder.png b/docs/development/images/coder.png new file mode 100644 index 000000000..d80c96f99 Binary files /dev/null and b/docs/development/images/coder.png differ diff --git a/docs/development/release-and-versioning.md b/docs/development/release-and-versioning.md new file mode 100644 index 000000000..7ca328ce4 --- /dev/null +++ b/docs/development/release-and-versioning.md @@ -0,0 +1,94 @@ +# Versioning + +This project is following the [Semantic Versioning](https://semver.org/) specification with automatic version bumping +based in [convention commits](https://www.conventionalcommits.org/en/v1.0.0/). + +## Release process + +### Stable versions + +When a PR is merged into the `main` branch, the CI will automatically will check the commit messages, bump the version, +update the changelog file, and create a release in github with the new version. + +Any new release (automatic or manual) triggers a workflow that will publish it to the github package registry. + +### Experimental (alpha) versions + +When a PR is created any commit into the PR will trigger the build and publish process, but the version will be marked +as +`alpha` and the version will be `x.y.z-alpha.pr---`. Where the `pr-number` is the number of +the PR +and the commit sha is the sha of the commit that triggered the build. + +Those versions are not meant to be used in production, but to be tested and reviewed by the team. + +**Those versions are ephemeral** : + +- We will delete all the alpha version of a PR once the PR is closed (merged or not) +- We will only keep the last 3 versions of each PR +- We will delete any alpha version older than 5 days + +## Conventional Commits + +The Conventional Commits specification is a lightweight convention on top of commit messages. This convention +dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages. + +The commit message should be structured as follows: + +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` + +The commit contains the following structural elements, to communicate intent to the consumers of your library: + +- **fix**: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning). +- **feat**: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic + Versioning). +- **BREAKING CHANGE**: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a + breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any + type. +- types other than fix: and feat: are allowed, for example build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, + and others. will not trigger a new version. + +[Read more about Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#examples) + +## Accessing to the package + +The package is published in the github package registry and is a private package so you need to be authenticated to in +the registry to install it. + +To install the package you need to create a `.npmrc` file in your home directory with the following content: + +``` +@factorialco:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN +``` + +You can get the token from your [github account settings](https://github.com/settings/tokens). +It must be a classic token with the `read:packages` scope. + +> Remember to don't share the token with anyone and don't commit it to the repository + +### Accessing the package in a CI/CD pipeline + +You need to add `.npmrc` file in repository with the following content: + +``` +@factorialco/factorial-one:registry=https://npm.pkg.github.com +``` + +To be able to install the `factorial-one` package in a CI/CD pipeline you need to ask us to add your repository to the +list +of "[Manage Actions Access](https://github.com/orgs/factorialco/packages/npm/factorial-one/settings)" + +Remember to set the env variable `NODE_AUTH_TOKEN` with the value of `${{secrets.GITHUB_TOKEN}}` in your CI/CD pipeline +use the authentication to access the package. + + + + + diff --git a/docs/development/using-factorial-one-source.md b/docs/development/using-factorial-one-source.md new file mode 100644 index 000000000..1cc8f7ab9 --- /dev/null +++ b/docs/development/using-factorial-one-source.md @@ -0,0 +1,63 @@ +# Using factorial one "source" + +## Motivation + +For development scenarios is necessary to be agile and be able to apply changes in factorial one and check how then +integrates in the consumer (ex. factorial's monorepo) + +In this scenario the regular release process (build, publish, update dependency's version on the consumer and update) is +very slow and doesn't provide a fast feedback of the +changes. + +Use the `factorial-one`'s source as dependencies has a lot of tradeoffs and issues: aliases, vite plugins, etc. needs to +be configured in the same way in the consumer of `factorial-one` + +### Strategy + +Building the library will be necessary to use it in the same way as in production, but in some scenarios (like local +development) we can skip publishing and reinstalling (check how to: [in local development](#local) +or [in coder](#coder)) + +## How to + +### Using an specific commit + +In the monorepo folder: + +1. open the `package.json` file +2. run `pnpm add `github:factorialco/factorial-one#[COMMIT_SHA1]` where `[COMMIT_SHA1]` is the commit identifier to use: + - example: `pnpm add github:factorialco/factorial-one#9c270d1db734771f7def654c20114ad947f156d2` + +> IMPORTANT: Remember to remove use an stable version before to merge into `main` or release + +### How to use local version of `factorial-one` in your local repo (ex. `factorial`'s monorepo) {#local} + +This applies when both `factorial-one` and `factorial`'s monorepo are in the local computer + +1. Go to the `factorial-one` folder: `cd factorial-one` +2. Run `pnpm build:watch` to rebuild the project on any change +3. Run `pnpm link --global` to add the package to the local links +4. Go to the factorial app monorepo: `cd factorial/frontend` +5. Run `pnpm link --global @factorialco/factorial-one` to use the local version of the package + +### How to use local version of `factorial-one` in coder {#cder} + +This applies when `factorial-one` is in your local computer and `factorial`'s monorepo is in coder's dev environment + +**Prerequisites:** + +- [rsync](https://linux.die.net/man/1/rsync) in your local computer: `brew install rsync` +- [coder cli](https://coder.com/docs/getting-started/installation) in your local computer + - ![Coder ssh](images/coder.png) +- Create if not exists `.env.local` and add this line `CODER_REMOTE=[YOUR_CODER_SSH_CONNECTION_STRING]`, for example: + `CODER_REMOTE=coder.sergiocarracedo-dev-env` + > This file is in the `.gitignore` file, so it won't be pushed to the repository + +**Steps:** + +1. Go to the `factorial-one` folder: `cd factorial-one` +2. Run `pnpm dev:coder` to rebuild the project on any change and sync that build to coder workspace + +> Now on each change in the `factorial-one`'s source code, the changes will be reflected in the coder workspace and the +> frontend will be reloaded using always the latest `factorial-one`'s code + diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 000000000..3bf098ee3 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,28 @@ +# Getting started + +## Usage + +In your react project: + +```bash +$ pnpm install git+https://github.com/factorialco/factorial-one#release +``` + +Then, in your react files: + +```tsx +// In your `main.tsx` file or any top-level component +import "@factorialco/factorial-one/styles.css" + +// If you want to use the shipped fonts +import "@factorialco/factorial-one/fonts.js" + +// In any of your components +import {Button} from "@factorialco/factorial-one" +``` + +And that's it! + +Related: + +- [Using factorial one source](development/using-factorial-one-source.md) diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..423df7c78 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,9 @@ +# factorial-one + +`factorial-one` is a set of component, hooks, utilities used as foundations for the factorial's app + +- [Getting started](./getting-started.md) +- Development + - [Local Development](development/development.md) + - [Using factorial-one without build it](development/using-factorial-one-source.md) + - [Release and Versioning](development/release-and-versioning) \ No newline at end of file diff --git a/lib/experimental/Navigation/Header/PageHeader/index.tsx b/lib/experimental/Navigation/Header/PageHeader/index.tsx index c87cfb271..8cbfad11c 100644 --- a/lib/experimental/Navigation/Header/PageHeader/index.tsx +++ b/lib/experimental/Navigation/Header/PageHeader/index.tsx @@ -11,7 +11,6 @@ import { Skeleton } from "@/ui/skeleton" import { AnimatePresence, motion } from "framer-motion" import { ReactElement } from "react" import { Dropdown } from "../../Dropdown" - import Breadcrumbs, { type BreadcrumbItemType } from "../Breadcrumbs" export type PageAction = { diff --git a/package.json b/package.json index 31044c1d1..e6d04664c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@factorialco/factorial-one", - "version": "0.0.2-3", + "version": "1.0.0", "main": "dist/factorial-one.js", "typings": "dist/factorial-one.d.ts", "private": false, @@ -8,12 +8,50 @@ "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0", "files": [ "assets", - "icons", "dist", "styles.css", "tailwind.config.ts", "postcss.config.js" ], + "exports": { + ".": { + "types": "./dist/lib/factorial-one.d.ts", + "default": "./dist/lib/factorial-one.js" + }, + "./experimental": { + "types": "./dist/experimental/experimental.d.ts", + "default": "./dist/lib/experimental.js" + }, + "./icons/animated": { + "types": "./dist/icons/animated/index.d.ts", + "default": "./dist/icons/animated/index.js" + }, + "./icons/animated/*": { + "types": "./dist/icons/animated/*.d.ts", + "default": "./dist/icons/animated/*.js" + }, + "./icons/app": { + "types": "./dist/icons/app/index.d.ts", + "default": "./dist/icons/app/index.js" + }, + "./icons/app/*": { + "types": "./dist/icons/app/*.d.ts", + "default": "./dist/icons/app/*.js" + }, + "./icons/modules": { + "types": "./dist/icons/modules/index.d.ts", + "default": "./dist/icons/modules/index.js" + }, + "./icons/modules/*": { + "types": "./dist/icons/modules/*.d.ts", + "default": "./dist/icons/modules/*.js" + }, + "./icons/*": { + "types": "./dist/icons/*", + "default": "./dist/icons/*" + }, + "./styles.css": "./dist/styles.css" + }, "sideEffects": [ "**/*.css" ], @@ -21,10 +59,12 @@ "dev": "storybook dev -p 6006", "dev:docs": "DOCS_MODE=true pnpm run dev", "start": "pnpm run dev", - "build": "tsc --project ./tsconfig-build.json && BUILD_TYPES=true vite build && pnpm run build:tailwind && run-p build-icons", + "build": "tsc --project ./tsconfig-build.json && pnpm run build:tailwind && run-p build-icons && BUILD_TYPES=true vite build", "build:tsup": "tsup && pnpm run build:tailwind && run-p build-icons", "build-icons": "tsc --project ./tsconfig-build-icons.json", "build:tailwind": "NODE_ENV=production tailwindcss -i ./styles.css -o ./dist/styles.css --postcss --minify", + "build:watch": "pnpm build --watch", + "dev:coder": "pnpm build --watch -- --buildSync", "lint": "eslint -c eslint.config.mjs . --report-unused-disable-directives --max-warnings 0", "lint-fix": "pnpm run lint -- --fix", "preview": "vite preview", @@ -39,7 +79,8 @@ "tsc": "tsc --noEmit", "vitest": "vitest run", "vitest:watch": "vitest dev", - "vitest:ci": "vitest run --reporter=dot" + "vitest:ci": "vitest run --reporter=dot", + "prepare": "husky" }, "peerDependencies": { "@hookform/resolvers": "^3.9.0", @@ -85,6 +126,8 @@ }, "devDependencies": { "@chromatic-com/storybook": "^3.2.3", + "@commitlint/cli": "^19.7.1", + "@commitlint/config-conventional": "^19.7.1", "@emoji-mart/data": "^1.2.1", "@emoji-mart/react": "^1.1.1", "@emotion/is-prop-valid": "^1.3.1", @@ -123,7 +166,10 @@ "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "axe-playwright": "^2.1.0", + "chalk": "^5.4.1", "chromatic": "^11.25.2", + "consola": "^3.4.0", + "dotenv": "^16.4.7", "emoji-mart": "^5.6.0", "eslint": "^9.21.0", "eslint-plugin-react": "^7.37.4", @@ -132,6 +178,7 @@ "eslint-plugin-storybook": "^0.11.3", "globals": "^16.0.0", "http-server": "^14.1.1", + "husky": "^9.1.7", "jsdom": "^26.0.0", "lodash": "^4.17.21", "npm-run-all": "^4.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 45003f6be..42775c01a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -154,6 +154,12 @@ importers: '@chromatic-com/storybook': specifier: ^3.2.3 version: 3.2.4(react@18.3.1)(storybook@8.5.6(prettier@3.5.2)) + '@commitlint/cli': + specifier: ^19.7.1 + version: 19.7.1(@types/node@22.13.4)(typescript@5.7.3) + '@commitlint/config-conventional': + specifier: ^19.7.1 + version: 19.7.1 '@emoji-mart/data': specifier: ^1.2.1 version: 1.2.1 @@ -165,7 +171,7 @@ importers: version: 1.3.1 '@eslint/compat': specifier: ^1.2.7 - version: 1.2.7(eslint@9.21.0(jiti@1.21.7)) + version: 1.2.7(eslint@9.21.0(jiti@2.4.2)) '@eslint/eslintrc': specifier: ^3.3.0 version: 3.3.0 @@ -213,7 +219,7 @@ importers: version: 8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3) '@storybook/react-vite': specifier: ^8.5.6 - version: 8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.34.8)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + version: 8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.34.8)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) '@storybook/test': specifier: ^8.5.6 version: 8.5.6(storybook@8.5.6(prettier@3.5.2)) @@ -255,46 +261,58 @@ importers: version: 13.1.4 '@typescript-eslint/eslint-plugin': specifier: ^8.24.1 - version: 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + version: 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) '@typescript-eslint/parser': specifier: ^8.24.1 - version: 8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + version: 8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) '@vitejs/plugin-react': specifier: ^4.3.4 - version: 4.3.4(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + version: 4.3.4(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.5.3) axe-playwright: specifier: ^2.1.0 version: 2.1.0(playwright@1.50.0) + chalk: + specifier: ^5.4.1 + version: 5.4.1 chromatic: specifier: ^11.25.2 version: 11.25.2 + consola: + specifier: ^3.4.0 + version: 3.4.0 + dotenv: + specifier: ^16.4.7 + version: 16.4.7 emoji-mart: specifier: ^5.6.0 version: 5.6.0 eslint: specifier: ^9.21.0 - version: 9.21.0(jiti@1.21.7) + version: 9.21.0(jiti@2.4.2) eslint-plugin-react: specifier: ^7.37.4 - version: 7.37.4(eslint@9.21.0(jiti@1.21.7)) + version: 7.37.4(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-react-hooks: specifier: ^5.1.0 - version: 5.1.0(eslint@9.21.0(jiti@1.21.7)) + version: 5.1.0(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-react-refresh: specifier: ^0.4.19 - version: 0.4.19(eslint@9.21.0(jiti@1.21.7)) + version: 0.4.19(eslint@9.21.0(jiti@2.4.2)) eslint-plugin-storybook: specifier: ^0.11.3 - version: 0.11.3(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + version: 0.11.3(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) globals: specifier: ^16.0.0 version: 16.0.0 http-server: specifier: ^14.1.1 version: 14.1.1 + husky: + specifier: ^9.1.7 + version: 9.1.7 jsdom: specifier: ^26.0.0 version: 26.0.0 @@ -333,7 +351,7 @@ importers: version: 4.0.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.5.6(prettier@3.5.2)) tsup: specifier: ^8.3.5 - version: 8.3.6(@microsoft/api-extractor@7.48.1(@types/node@22.13.4))(@swc/core@1.10.11)(jiti@1.21.7)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0) + version: 8.3.6(@microsoft/api-extractor@7.48.1(@types/node@22.13.4))(@swc/core@1.10.11)(jiti@2.4.2)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0) typescript: specifier: ^5.7.2 version: 5.7.3 @@ -342,16 +360,16 @@ importers: version: 0.4.2 vite: specifier: ^6.1.1 - version: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + version: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) vite-plugin-dts: specifier: 4.3.0 - version: 4.3.0(@types/node@22.13.4)(rollup@4.34.8)(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + version: 4.3.0(@types/node@22.13.4)(rollup@4.34.8)(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) vite-plugin-lib-inject-css: specifier: ^2.2.1 - version: 2.2.1(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + version: 2.2.1(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) vitest: specifier: ^3.0.5 - version: 3.0.5(@types/node@22.13.4)(jiti@1.21.7)(jsdom@26.0.0)(yaml@2.7.0) + version: 3.0.5(@types/node@22.13.4)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0) packages: @@ -610,6 +628,75 @@ packages: peerDependencies: storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + '@commitlint/cli@19.7.1': + resolution: {integrity: sha512-iObGjR1tE/PfDtDTEfd+tnRkB3/HJzpQqRTyofS2MPPkDn1mp3DBC8SoPDayokfAy+xKhF8+bwRCJO25Nea0YQ==} + engines: {node: '>=v18'} + hasBin: true + + '@commitlint/config-conventional@19.7.1': + resolution: {integrity: sha512-fsEIF8zgiI/FIWSnykdQNj/0JE4av08MudLTyYHm4FlLWemKoQvPNUYU2M/3tktWcCEyq7aOkDDgtjrmgWFbvg==} + engines: {node: '>=v18'} + + '@commitlint/config-validator@19.5.0': + resolution: {integrity: sha512-CHtj92H5rdhKt17RmgALhfQt95VayrUo2tSqY9g2w+laAXyk7K/Ef6uPm9tn5qSIwSmrLjKaXK9eiNuxmQrDBw==} + engines: {node: '>=v18'} + + '@commitlint/ensure@19.5.0': + resolution: {integrity: sha512-Kv0pYZeMrdg48bHFEU5KKcccRfKmISSm9MvgIgkpI6m+ohFTB55qZlBW6eYqh/XDfRuIO0x4zSmvBjmOwWTwkg==} + engines: {node: '>=v18'} + + '@commitlint/execute-rule@19.5.0': + resolution: {integrity: sha512-aqyGgytXhl2ejlk+/rfgtwpPexYyri4t8/n4ku6rRJoRhGZpLFMqrZ+YaubeGysCP6oz4mMA34YSTaSOKEeNrg==} + engines: {node: '>=v18'} + + '@commitlint/format@19.5.0': + resolution: {integrity: sha512-yNy088miE52stCI3dhG/vvxFo9e4jFkU1Mj3xECfzp/bIS/JUay4491huAlVcffOoMK1cd296q0W92NlER6r3A==} + engines: {node: '>=v18'} + + '@commitlint/is-ignored@19.7.1': + resolution: {integrity: sha512-3IaOc6HVg2hAoGleRK3r9vL9zZ3XY0rf1RsUf6jdQLuaD46ZHnXBiOPTyQ004C4IvYjSWqJwlh0/u2P73aIE3g==} + engines: {node: '>=v18'} + + '@commitlint/lint@19.7.1': + resolution: {integrity: sha512-LhcPfVjcOcOZA7LEuBBeO00o3MeZa+tWrX9Xyl1r9PMd5FWsEoZI9IgnGqTKZ0lZt5pO3ZlstgnRyY1CJJc9Xg==} + engines: {node: '>=v18'} + + '@commitlint/load@19.6.1': + resolution: {integrity: sha512-kE4mRKWWNju2QpsCWt428XBvUH55OET2N4QKQ0bF85qS/XbsRGG1MiTByDNlEVpEPceMkDr46LNH95DtRwcsfA==} + engines: {node: '>=v18'} + + '@commitlint/message@19.5.0': + resolution: {integrity: sha512-R7AM4YnbxN1Joj1tMfCyBryOC5aNJBdxadTZkuqtWi3Xj0kMdutq16XQwuoGbIzL2Pk62TALV1fZDCv36+JhTQ==} + engines: {node: '>=v18'} + + '@commitlint/parse@19.5.0': + resolution: {integrity: sha512-cZ/IxfAlfWYhAQV0TwcbdR1Oc0/r0Ik1GEessDJ3Lbuma/MRO8FRQX76eurcXtmhJC//rj52ZSZuXUg0oIX0Fw==} + engines: {node: '>=v18'} + + '@commitlint/read@19.5.0': + resolution: {integrity: sha512-TjS3HLPsLsxFPQj6jou8/CZFAmOP2y+6V4PGYt3ihbQKTY1Jnv0QG28WRKl/d1ha6zLODPZqsxLEov52dhR9BQ==} + engines: {node: '>=v18'} + + '@commitlint/resolve-extends@19.5.0': + resolution: {integrity: sha512-CU/GscZhCUsJwcKTJS9Ndh3AKGZTNFIOoQB2n8CmFnizE0VnEuJoum+COW+C1lNABEeqk6ssfc1Kkalm4bDklA==} + engines: {node: '>=v18'} + + '@commitlint/rules@19.6.0': + resolution: {integrity: sha512-1f2reW7lbrI0X0ozZMesS/WZxgPa4/wi56vFuJENBmed6mWq5KsheN/nxqnl/C23ioxpPO/PL6tXpiiFy5Bhjw==} + engines: {node: '>=v18'} + + '@commitlint/to-lines@19.5.0': + resolution: {integrity: sha512-R772oj3NHPkodOSRZ9bBVNq224DOxQtNef5Pl8l2M8ZnkkzQfeSTr4uxawV2Sd3ui05dUVzvLNnzenDBO1KBeQ==} + engines: {node: '>=v18'} + + '@commitlint/top-level@19.5.0': + resolution: {integrity: sha512-IP1YLmGAk0yWrImPRRc578I3dDUI5A2UBJx9FbSOjxe9sTlzFiwVJ+zeMLgAtHMtGZsC8LUnzmW1qRemkFU4ng==} + engines: {node: '>=v18'} + + '@commitlint/types@19.5.0': + resolution: {integrity: sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==} + engines: {node: '>=v18'} + '@csstools/color-helpers@5.0.1': resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} engines: {node: '>=18'} @@ -2288,6 +2375,9 @@ packages: '@types/canvas-confetti@1.9.0': resolution: {integrity: sha512-aBGj/dULrimR1XDZLtG9JwxX1b4HPRF6CX9Yfwh3NvstZEm1ZL7RBnel4keCPSqs1ANRu1u2Aoz9R+VmtjYuTg==} + '@types/conventional-commits-parser@5.0.1': + resolution: {integrity: sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==} + '@types/d3-array@3.2.1': resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==} @@ -2543,6 +2633,10 @@ packages: '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + JSONStream@1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -2656,6 +2750,9 @@ packages: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} + array-ify@1.0.0: + resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + array-includes@3.1.8: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} @@ -2974,6 +3071,9 @@ packages: commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compare-func@2.0.0: + resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + compare-versions@6.1.1: resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} @@ -2990,6 +3090,19 @@ packages: resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==} engines: {node: ^14.18.0 || >=16.10.0} + conventional-changelog-angular@7.0.0: + resolution: {integrity: sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==} + engines: {node: '>=16'} + + conventional-changelog-conventionalcommits@7.0.2: + resolution: {integrity: sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==} + engines: {node: '>=16'} + + conventional-commits-parser@5.0.0: + resolution: {integrity: sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==} + engines: {node: '>=16'} + hasBin: true + convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -3000,6 +3113,14 @@ packages: resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==} engines: {node: '>= 0.4.0'} + cosmiconfig-typescript-loader@6.1.0: + resolution: {integrity: sha512-tJ1w35ZRUiM5FeTzT7DtYWAFFv37ZLqSRkGi2oeCK1gPhvaWjkAtfXvLmvE1pRfxxp9aQo6ba/Pvg1dKj05D4g==} + engines: {node: '>=v18'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=9' + typescript: '>=5' + cosmiconfig@8.3.6: resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} engines: {node: '>=14'} @@ -3009,6 +3130,15 @@ packages: typescript: optional: true + cosmiconfig@9.0.0: + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + create-jest@29.7.0: resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3112,6 +3242,10 @@ packages: resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} engines: {node: '>=12'} + dargs@8.1.0: + resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} + engines: {node: '>=12'} + dashify@2.0.0: resolution: {integrity: sha512-hpA5C/YrPjucXypHPPc0oJ1l9Hf6wWbiOL7Ik42cxnsUOhWiCB/fylKbKqqJalW9FgkNQCw16YO8uW9Hs0Iy1A==} engines: {node: '>=4'} @@ -3273,6 +3407,14 @@ packages: dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dot-prop@5.3.0: + resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} + engines: {node: '>=8'} + + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} + engines: {node: '>=12'} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -3330,6 +3472,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -3572,6 +3718,10 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -3691,6 +3841,11 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} + git-raw-commits@4.0.0: + resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} + engines: {node: '>=16'} + hasBin: true + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3712,6 +3867,10 @@ packages: engines: {node: '>=12'} deprecated: Glob versions prior to v9 are no longer supported + global-directory@4.0.1: + resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} + engines: {node: '>=18'} + global-modules@0.2.3: resolution: {integrity: sha512-JeXuCbvYzYXcwE6acL9V2bAOeSIGl4dD+iwLY9iUx2VBJJ80R18HCn+JCwHM9Oegdfya3lEkGCdaRkSyc10hDA==} engines: {node: '>=0.10.0'} @@ -3839,6 +3998,11 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -3860,6 +4024,9 @@ packages: engines: {node: '>=8'} hasBin: true + import-meta-resolve@4.1.0: + resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -3878,6 +4045,10 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + ini@4.1.1: + resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + internal-slot@1.1.0: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} @@ -3982,6 +4153,10 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-obj@2.0.0: + resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} + engines: {node: '>=8'} + is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} @@ -4009,6 +4184,10 @@ packages: resolution: {integrity: sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==} engines: {node: '>= 0.4'} + is-text-path@2.0.0: + resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} + engines: {node: '>=8'} + is-typed-array@1.1.15: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} @@ -4246,6 +4425,10 @@ packages: resolution: {integrity: sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==} hasBin: true + jiti@2.4.2: + resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + hasBin: true + jju@1.4.0: resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} @@ -4317,6 +4500,10 @@ packages: jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonparse@1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -4370,18 +4557,46 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} lodash.flattendeep@4.4.0: resolution: {integrity: sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==} + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.mergewith@4.6.2: + resolution: {integrity: sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==} + + lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash.uniq@4.5.0: + resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} + + lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -4459,6 +4674,10 @@ packages: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} + meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -4673,6 +4892,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -4681,6 +4904,10 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-map@3.0.0: resolution: {integrity: sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==} engines: {node: '>=8'} @@ -4725,6 +4952,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -5400,6 +5631,10 @@ packages: spdx-license-ids@3.0.21: resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -5558,6 +5793,10 @@ packages: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} + text-extensions@2.4.0: + resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} + engines: {node: '>=8'} + thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -5565,6 +5804,9 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -5727,6 +5969,10 @@ packages: undici-types@6.20.0: resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + union@0.5.0: resolution: {integrity: sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==} engines: {node: '>= 0.8.0'} @@ -6082,6 +6328,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + zen-observable-ts@1.1.0: resolution: {integrity: sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA==} @@ -6363,6 +6613,116 @@ snapshots: - '@chromatic-com/playwright' - react + '@commitlint/cli@19.7.1(@types/node@22.13.4)(typescript@5.7.3)': + dependencies: + '@commitlint/format': 19.5.0 + '@commitlint/lint': 19.7.1 + '@commitlint/load': 19.6.1(@types/node@22.13.4)(typescript@5.7.3) + '@commitlint/read': 19.5.0 + '@commitlint/types': 19.5.0 + tinyexec: 0.3.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/config-conventional@19.7.1': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-conventionalcommits: 7.0.2 + + '@commitlint/config-validator@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + ajv: 8.13.0 + + '@commitlint/ensure@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.startcase: 4.4.0 + lodash.upperfirst: 4.3.1 + + '@commitlint/execute-rule@19.5.0': {} + + '@commitlint/format@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + chalk: 5.4.1 + + '@commitlint/is-ignored@19.7.1': + dependencies: + '@commitlint/types': 19.5.0 + semver: 7.7.1 + + '@commitlint/lint@19.7.1': + dependencies: + '@commitlint/is-ignored': 19.7.1 + '@commitlint/parse': 19.5.0 + '@commitlint/rules': 19.6.0 + '@commitlint/types': 19.5.0 + + '@commitlint/load@19.6.1(@types/node@22.13.4)(typescript@5.7.3)': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/execute-rule': 19.5.0 + '@commitlint/resolve-extends': 19.5.0 + '@commitlint/types': 19.5.0 + chalk: 5.4.1 + cosmiconfig: 9.0.0(typescript@5.7.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.13.4)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + transitivePeerDependencies: + - '@types/node' + - typescript + + '@commitlint/message@19.5.0': {} + + '@commitlint/parse@19.5.0': + dependencies: + '@commitlint/types': 19.5.0 + conventional-changelog-angular: 7.0.0 + conventional-commits-parser: 5.0.0 + + '@commitlint/read@19.5.0': + dependencies: + '@commitlint/top-level': 19.5.0 + '@commitlint/types': 19.5.0 + git-raw-commits: 4.0.0 + minimist: 1.2.8 + tinyexec: 0.3.2 + + '@commitlint/resolve-extends@19.5.0': + dependencies: + '@commitlint/config-validator': 19.5.0 + '@commitlint/types': 19.5.0 + global-directory: 4.0.1 + import-meta-resolve: 4.1.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + + '@commitlint/rules@19.6.0': + dependencies: + '@commitlint/ensure': 19.5.0 + '@commitlint/message': 19.5.0 + '@commitlint/to-lines': 19.5.0 + '@commitlint/types': 19.5.0 + + '@commitlint/to-lines@19.5.0': {} + + '@commitlint/top-level@19.5.0': + dependencies: + find-up: 7.0.0 + + '@commitlint/types@19.5.0': + dependencies: + '@types/conventional-commits-parser': 5.0.1 + chalk: 5.4.1 + '@csstools/color-helpers@5.0.1': {} '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': @@ -6471,16 +6831,16 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.21.0(jiti@1.21.7))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.21.0(jiti@2.4.2))': dependencies: - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/compat@1.2.7(eslint@9.21.0(jiti@1.21.7))': + '@eslint/compat@1.2.7(eslint@9.21.0(jiti@2.4.2))': optionalDependencies: - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) '@eslint/config-array@0.19.2': dependencies: @@ -6742,12 +7102,12 @@ snapshots: '@types/yargs': 17.0.33 chalk: 4.1.2 - '@joshwooding/vite-plugin-react-docgen-typescript@0.5.0(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0))': + '@joshwooding/vite-plugin-react-docgen-typescript@0.5.0(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0))': dependencies: glob: 10.4.5 magic-string: 0.27.0 react-docgen-typescript: 2.2.2(typescript@5.7.3) - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) optionalDependencies: typescript: 5.7.3 @@ -7713,13 +8073,13 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@storybook/builder-vite@8.5.6(storybook@8.5.6(prettier@3.5.2))(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0))': + '@storybook/builder-vite@8.5.6(storybook@8.5.6(prettier@3.5.2))(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0))': dependencies: '@storybook/csf-plugin': 8.5.6(storybook@8.5.6(prettier@3.5.2)) browser-assert: 1.2.1 storybook: 8.5.6(prettier@3.5.2) ts-dedent: 2.2.0 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) '@storybook/components@8.5.2(storybook@8.5.6(prettier@3.5.2))': dependencies: @@ -7793,11 +8153,11 @@ snapshots: react-dom: 18.3.1(react@18.3.1) storybook: 8.5.6(prettier@3.5.2) - '@storybook/react-vite@8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.34.8)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0))': + '@storybook/react-vite@8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.34.8)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0))': dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.5.0(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.5.0(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) '@rollup/pluginutils': 5.1.4(rollup@4.34.8) - '@storybook/builder-vite': 8.5.6(storybook@8.5.6(prettier@3.5.2))(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + '@storybook/builder-vite': 8.5.6(storybook@8.5.6(prettier@3.5.2))(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) '@storybook/react': 8.5.6(@storybook/test@8.5.6(storybook@8.5.6(prettier@3.5.2)))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.5.6(prettier@3.5.2))(typescript@5.7.3) find-up: 5.0.0 magic-string: 0.30.17 @@ -7807,7 +8167,7 @@ snapshots: resolve: 1.22.10 storybook: 8.5.6(prettier@3.5.2) tsconfig-paths: 4.2.0 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) optionalDependencies: '@storybook/test': 8.5.6(storybook@8.5.6(prettier@3.5.2)) transitivePeerDependencies: @@ -8119,6 +8479,10 @@ snapshots: '@types/canvas-confetti@1.9.0': {} + '@types/conventional-commits-parser@5.0.1': + dependencies: + '@types/node': 22.13.4 + '@types/d3-array@3.2.1': {} '@types/d3-color@3.1.3': {} @@ -8210,15 +8574,15 @@ snapshots: '@types/zen-observable@0.8.3': {} - '@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/parser': 8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) '@typescript-eslint/scope-manager': 8.24.1 - '@typescript-eslint/type-utils': 8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) - '@typescript-eslint/utils': 8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/type-utils': 8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.24.1 - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -8227,14 +8591,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/parser@8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.24.1 '@typescript-eslint/types': 8.24.1 '@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3) '@typescript-eslint/visitor-keys': 8.24.1 debug: 4.4.0 - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -8249,12 +8613,12 @@ snapshots: '@typescript-eslint/types': 8.24.1 '@typescript-eslint/visitor-keys': 8.24.1 - '@typescript-eslint/type-utils@8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/type-utils@8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3) - '@typescript-eslint/utils': 8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) + '@typescript-eslint/utils': 8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) debug: 4.4.0 - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) ts-api-utils: 2.0.1(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: @@ -8292,24 +8656,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.24.0(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/utils@8.24.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.24.0 '@typescript-eslint/types': 8.24.0 '@typescript-eslint/typescript-estree': 8.24.0(typescript@5.7.3) - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) typescript: 5.7.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.24.1(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3)': + '@typescript-eslint/utils@8.24.1(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@2.4.2)) '@typescript-eslint/scope-manager': 8.24.1 '@typescript-eslint/types': 8.24.1 '@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3) - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -8324,14 +8688,14 @@ snapshots: '@typescript-eslint/types': 8.24.1 eslint-visitor-keys: 4.2.0 - '@vitejs/plugin-react@4.3.4(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0))': + '@vitejs/plugin-react@4.3.4(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0))': dependencies: '@babel/core': 7.26.7 '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.7) '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.7) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) transitivePeerDependencies: - supports-color @@ -8349,13 +8713,13 @@ snapshots: chai: 5.1.2 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.5(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0))': + '@vitest/mocker@3.0.5(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0))': dependencies: '@vitest/spy': 3.0.5 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) '@vitest/pretty-format@2.0.5': dependencies: @@ -8452,6 +8816,11 @@ snapshots: '@vue/shared@3.5.13': {} + JSONStream@1.3.5: + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -8552,6 +8921,8 @@ snapshots: call-bound: 1.0.3 is-array-buffer: 3.0.5 + array-ify@1.0.0: {} + array-includes@3.1.8: dependencies: call-bind: 1.0.8 @@ -8904,6 +9275,11 @@ snapshots: commondir@1.0.1: {} + compare-func@2.0.0: + dependencies: + array-ify: 1.0.0 + dot-prop: 5.3.0 + compare-versions@6.1.1: {} computeds@0.0.1: {} @@ -8914,12 +9290,34 @@ snapshots: consola@3.4.0: {} + conventional-changelog-angular@7.0.0: + dependencies: + compare-func: 2.0.0 + + conventional-changelog-conventionalcommits@7.0.2: + dependencies: + compare-func: 2.0.0 + + conventional-commits-parser@5.0.0: + dependencies: + JSONStream: 1.3.5 + is-text-path: 2.0.0 + meow: 12.1.1 + split2: 4.2.0 + convert-source-map@1.9.0: {} convert-source-map@2.0.0: {} corser@2.0.1: {} + cosmiconfig-typescript-loader@6.1.0(@types/node@22.13.4)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): + dependencies: + '@types/node': 22.13.4 + cosmiconfig: 9.0.0(typescript@5.7.3) + jiti: 2.4.2 + typescript: 5.7.3 + cosmiconfig@8.3.6(typescript@5.7.3): dependencies: import-fresh: 3.3.1 @@ -8929,6 +9327,15 @@ snapshots: optionalDependencies: typescript: 5.7.3 + cosmiconfig@9.0.0(typescript@5.7.3): + dependencies: + env-paths: 2.2.1 + import-fresh: 3.3.1 + js-yaml: 4.1.0 + parse-json: 5.2.0 + optionalDependencies: + typescript: 5.7.3 + create-jest@29.7.0(@types/node@22.13.4): dependencies: '@jest/types': 29.6.3 @@ -9042,6 +9449,8 @@ snapshots: d3-timer@3.0.1: {} + dargs@8.1.0: {} + dashify@2.0.0: {} data-urls@5.0.0: @@ -9185,6 +9594,12 @@ snapshots: no-case: 3.0.4 tslib: 2.8.1 + dot-prop@5.3.0: + dependencies: + is-obj: 2.0.0 + + dotenv@16.4.7: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.1 @@ -9230,6 +9645,8 @@ snapshots: entities@4.5.0: {} + env-paths@2.2.1: {} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -9379,15 +9796,15 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-react-hooks@5.1.0(eslint@9.21.0(jiti@1.21.7)): + eslint-plugin-react-hooks@5.1.0(eslint@9.21.0(jiti@2.4.2)): dependencies: - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) - eslint-plugin-react-refresh@0.4.19(eslint@9.21.0(jiti@1.21.7)): + eslint-plugin-react-refresh@0.4.19(eslint@9.21.0(jiti@2.4.2)): dependencies: - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) - eslint-plugin-react@7.37.4(eslint@9.21.0(jiti@1.21.7)): + eslint-plugin-react@7.37.4(eslint@9.21.0(jiti@2.4.2)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -9395,7 +9812,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 9.21.0(jiti@1.21.7) + eslint: 9.21.0(jiti@2.4.2) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -9409,11 +9826,11 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-storybook@0.11.3(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3): + eslint-plugin-storybook@0.11.3(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3): dependencies: '@storybook/csf': 0.1.13 - '@typescript-eslint/utils': 8.24.0(eslint@9.21.0(jiti@1.21.7))(typescript@5.7.3) - eslint: 9.21.0(jiti@1.21.7) + '@typescript-eslint/utils': 8.24.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.7.3) + eslint: 9.21.0(jiti@2.4.2) ts-dedent: 2.2.0 typescript: 5.7.3 transitivePeerDependencies: @@ -9428,9 +9845,9 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.21.0(jiti@1.21.7): + eslint@9.21.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@1.21.7)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.2 '@eslint/core': 0.12.0 @@ -9465,7 +9882,7 @@ snapshots: natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 1.21.7 + jiti: 2.4.2 transitivePeerDependencies: - supports-color @@ -9602,6 +10019,12 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + flat-cache@4.0.1: dependencies: flatted: 3.3.3 @@ -9710,6 +10133,12 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.7 + git-raw-commits@4.0.0: + dependencies: + dargs: 8.1.0 + meow: 12.1.1 + split2: 4.2.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -9744,6 +10173,10 @@ snapshots: minimatch: 5.1.6 once: 1.4.0 + global-directory@4.0.1: + dependencies: + ini: 4.1.1 + global-modules@0.2.3: dependencies: global-prefix: 0.1.5 @@ -9886,6 +10319,8 @@ snapshots: human-signals@2.1.0: {} + husky@9.1.7: {} + iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -9904,6 +10339,8 @@ snapshots: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 + import-meta-resolve@4.1.0: {} + imurmurhash@0.1.4: {} indent-string@4.0.0: {} @@ -9917,6 +10354,8 @@ snapshots: ini@1.3.8: {} + ini@4.1.1: {} + internal-slot@1.1.0: dependencies: es-errors: 1.3.0 @@ -10019,6 +10458,8 @@ snapshots: is-number@7.0.0: {} + is-obj@2.0.0: {} + is-potential-custom-element-name@1.0.1: {} is-regex@1.2.1: @@ -10047,6 +10488,10 @@ snapshots: has-symbols: 1.1.0 safe-regex-test: 1.1.0 + is-text-path@2.0.0: + dependencies: + text-extensions: 2.4.0 + is-typed-array@1.1.15: dependencies: which-typed-array: 1.1.18 @@ -10518,6 +10963,8 @@ snapshots: jiti@1.21.7: {} + jiti@2.4.2: {} + jju@1.4.0: {} joi@17.13.3: @@ -10599,6 +11046,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonparse@1.3.1: {} + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.8 @@ -10653,14 +11102,34 @@ snapshots: dependencies: p-locate: 5.0.0 + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + + lodash.camelcase@4.3.0: {} + lodash.debounce@4.0.8: {} lodash.flattendeep@4.4.0: {} + lodash.isplainobject@4.0.6: {} + + lodash.kebabcase@4.1.1: {} + lodash.merge@4.6.2: {} + lodash.mergewith@4.6.2: {} + + lodash.snakecase@4.1.1: {} + lodash.sortby@4.7.0: {} + lodash.startcase@4.4.0: {} + + lodash.uniq@4.5.0: {} + + lodash.upperfirst@4.3.1: {} + lodash@4.17.21: {} loglevel@1.9.2: {} @@ -10730,6 +11199,8 @@ snapshots: memorystream@0.3.1: {} + meow@12.1.1: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -10970,6 +11441,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@4.0.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -10978,6 +11453,10 @@ snapshots: dependencies: p-limit: 3.1.0 + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + p-map@3.0.0: dependencies: aggregate-error: 3.1.0 @@ -11028,6 +11507,8 @@ snapshots: path-exists@4.0.0: {} + path-exists@5.0.0: {} + path-is-absolute@1.0.1: {} path-key@2.0.1: {} @@ -11123,11 +11604,11 @@ snapshots: optionalDependencies: postcss: 8.5.3 - postcss-load-config@6.0.1(jiti@1.21.7)(postcss@8.5.3)(yaml@2.7.0): + postcss-load-config@6.0.1(jiti@2.4.2)(postcss@8.5.3)(yaml@2.7.0): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 1.21.7 + jiti: 2.4.2 postcss: 8.5.3 yaml: 2.7.0 @@ -11686,6 +12167,8 @@ snapshots: spdx-license-ids@3.0.21: {} + split2@4.2.0: {} + sprintf-js@1.0.3: {} stack-utils@2.0.6: @@ -11909,6 +12392,8 @@ snapshots: glob: 7.2.3 minimatch: 3.1.2 + text-extensions@2.4.0: {} + thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -11917,6 +12402,8 @@ snapshots: dependencies: any-promise: 1.3.0 + through@2.3.8: {} + tiny-invariant@1.3.3: {} tinybench@2.9.0: {} @@ -11978,7 +12465,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.3.6(@microsoft/api-extractor@7.48.1(@types/node@22.13.4))(@swc/core@1.10.11)(jiti@1.21.7)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0): + tsup@8.3.6(@microsoft/api-extractor@7.48.1(@types/node@22.13.4))(@swc/core@1.10.11)(jiti@2.4.2)(postcss@8.5.3)(typescript@5.7.3)(yaml@2.7.0): dependencies: bundle-require: 5.1.0(esbuild@0.24.2) cac: 6.7.14 @@ -11988,7 +12475,7 @@ snapshots: esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.3)(yaml@2.7.0) + postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.5.3)(yaml@2.7.0) resolve-from: 5.0.0 rollup: 4.32.0 source-map: 0.8.0-beta.0 @@ -12075,6 +12562,8 @@ snapshots: undici-types@6.20.0: {} + unicorn-magic@0.1.0: {} + union@0.5.0: dependencies: qs: 6.14.0 @@ -12173,13 +12662,13 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - vite-node@3.0.5(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0): + vite-node@3.0.5(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0): dependencies: cac: 6.7.14 debug: 4.4.0 es-module-lexer: 1.6.0 pathe: 2.0.2 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - jiti @@ -12194,7 +12683,7 @@ snapshots: - tsx - yaml - vite-plugin-dts@4.3.0(@types/node@22.13.4)(rollup@4.34.8)(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)): + vite-plugin-dts@4.3.0(@types/node@22.13.4)(rollup@4.34.8)(typescript@5.7.3)(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)): dependencies: '@microsoft/api-extractor': 7.48.1(@types/node@22.13.4) '@rollup/pluginutils': 5.1.4(rollup@4.34.8) @@ -12207,20 +12696,20 @@ snapshots: magic-string: 0.30.17 typescript: 5.7.3 optionalDependencies: - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-lib-inject-css@2.2.1(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)): + vite-plugin-lib-inject-css@2.2.1(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)): dependencies: '@ast-grep/napi': 0.32.3 magic-string: 0.30.17 picocolors: 1.1.1 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) - vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0): + vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0): dependencies: esbuild: 0.24.2 postcss: 8.5.3 @@ -12228,13 +12717,13 @@ snapshots: optionalDependencies: '@types/node': 22.13.4 fsevents: 2.3.3 - jiti: 1.21.7 + jiti: 2.4.2 yaml: 2.7.0 - vitest@3.0.5(@types/node@22.13.4)(jiti@1.21.7)(jsdom@26.0.0)(yaml@2.7.0): + vitest@3.0.5(@types/node@22.13.4)(jiti@2.4.2)(jsdom@26.0.0)(yaml@2.7.0): dependencies: '@vitest/expect': 3.0.5 - '@vitest/mocker': 3.0.5(vite@6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0)) + '@vitest/mocker': 3.0.5(vite@6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0)) '@vitest/pretty-format': 3.0.5 '@vitest/runner': 3.0.5 '@vitest/snapshot': 3.0.5 @@ -12250,8 +12739,8 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.1.1(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) - vite-node: 3.0.5(@types/node@22.13.4)(jiti@1.21.7)(yaml@2.7.0) + vite: 6.1.1(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) + vite-node: 3.0.5(@types/node@22.13.4)(jiti@2.4.2)(yaml@2.7.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.13.4 @@ -12471,6 +12960,8 @@ snapshots: yocto-queue@0.1.0: {} + yocto-queue@1.1.1: {} + zen-observable-ts@1.1.0: dependencies: '@types/zen-observable': 0.8.3 diff --git a/tsconfig-build-icons.json b/tsconfig-build-icons.json index d926e90ba..074326ea6 100644 --- a/tsconfig-build-icons.json +++ b/tsconfig-build-icons.json @@ -12,9 +12,9 @@ // Types should go into this directory. // Removing this would place the .d.ts files // next to the .js files - "outDir": "icons", "jsx": "react-jsx", "noEmit": false, + "outDir": "dist/icons", "allowImportingTsExtensions": false, // go to js file when using IDE functions like // "Go to Definition" in VSCode diff --git a/tsconfig.node.json b/tsconfig.node.json index 97ede7ee6..f946d96e0 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -7,5 +7,8 @@ "allowSyntheticDefaultImports": true, "strict": true }, - "include": ["vite.config.ts"] + "include": [ + "vite.config.ts", + "vite/**/*" + ] } diff --git a/vite.config.ts b/vite.config.ts index a994d46c3..6567ec6ab 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,25 +1,64 @@ /// import react from "@vitejs/plugin-react" +import { consola } from "consola" +import dotenv from "dotenv" import path, { resolve } from "path" -import { defineConfig } from "vite" +import { defineConfig, Plugin } from "vite" import dts from "vite-plugin-dts" import { libInjectCss } from "vite-plugin-lib-inject-css" +import { buildSyncPlugin } from "./vite/build-sync.plugin" + +dotenv.config({ + path: [".env.local", ".env"], +}) + +const extraPlugins: Plugin[] = [] + +/* Build sync */ +const defaultCoderWorkspaceFolder = + "/home/factorial/workspace/factorial/frontend/node_modules/@factorialco/factorial-one" + +const buildSyncArg = process.argv.find((arg) => arg.startsWith("--buildSync")) +const buildSync = !!buildSyncArg +const buildSyncValue = buildSyncArg + ? buildSyncArg.split("=")[1] || process.env.CODER_REMOTE + : null + +if (buildSync) { + if (!buildSyncValue) { + consola.error( + "The buildSync flag must remote target or you can set it in the env variable CODER_REMOTE in the `.env.local` file" + ) + process.exit(1) + } + + const [remote, remoteFolder] = buildSyncValue.split(":") + + const target = [remote, remoteFolder || defaultCoderWorkspaceFolder] + .filter(Boolean) + .join(":") + + extraPlugins.push( + buildSyncPlugin({ + target, + }) + ) +} +/* ------------ Build sync end ------*/ + +if (process.env.BUILD_TYPES) { + extraPlugins.push( + dts({ + include: ["lib", "src"], + exclude: ["**/*.stories.tsx"], + rollupTypes: true, + }) + ) +} // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - react(), - libInjectCss(), - ...(process.env.BUILD_TYPES - ? [ - dts({ - include: ["lib", "src"], - exclude: ["**/*.stories.tsx"], - rollupTypes: true - }), - ] - : []), - ], + plugins: [react(), libInjectCss(), ...extraPlugins], resolve: { alias: { "@": path.resolve(__dirname, "./lib"), @@ -37,9 +76,11 @@ export default defineConfig({ }, formats: ["es"], }, + outDir: "dist/lib", copyPublicDir: false, rollupOptions: { external: ["react/jsx-runtime", "react", "react-dom"], + maxParallelFileOps: 100, // Workaround to fix rebuild https://github.com/vitejs/vite/issues/19410#issuecomment-2661835482 output: { globals: { react: "React", @@ -49,6 +90,6 @@ export default defineConfig({ }, test: { environment: "jsdom", - setupFiles: ["./vitest.setup.ts"], + setupFiles: ["./vite/vitest.setup.ts"], }, }) diff --git a/vite/build-sync.plugin.ts b/vite/build-sync.plugin.ts new file mode 100644 index 000000000..82760ab7e --- /dev/null +++ b/vite/build-sync.plugin.ts @@ -0,0 +1,78 @@ +import chalk from "chalk" +import { consola } from "consola" +import { readFileSync } from "fs" +import { spawnSync } from "node:child_process" +import { existsSync } from "node:fs" +import { resolve } from "path" +import { UserConfig } from "vite" + +const consolaPrefix = chalk.cyanBright("[Sync plugin]") + +type CoderSyncPluginConfig = { + sources?: string[] + target: string +} + +/** + * @description Sync plugin + * This plugin will syncronize the build files between the local and the remote server (coder) + * The list of the files and folders to sync is defined in the package.json file in the attribute "files" + * The target is the remote server where the files will be copied + */ +export function buildSyncPlugin(pluginConfig: CoderSyncPluginConfig) { + consola.info("Sync plugin") + + let enabled = true + let sources = pluginConfig.sources + // If no sources are defined, use the package.json files attribute + if (!sources) { + consola.info("Using package.json files attribute as source") + const packageJsonPath = resolve(__dirname, "../package.json") + const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8")) + sources = [...packageJson.files, packageJsonPath] + } + + sources = sources.filter((source) => Boolean(source) && existsSync(source)) + + consola.debug(consolaPrefix, sources) + + return { + name: "coder-sync", + description: "Sync files to remote server after build", + config(config: UserConfig, { command }: { command: string }) { + if (command !== "build" && !config.build?.watch) { + console.warn( + 'The buildSync plugin can only be used in "build" mode and "watch". Skipping...' + ) + enabled = false + } + }, + closeBundle: async () => { + if (!enabled) { + return + } + + consola.start( + consolaPrefix, + `Syncing files to ${chalk.whiteBright.bold(pluginConfig.target)}` + ) + try { + const start = Date.now() + spawnSync("rsync", [ + "-avz", + "--delete", + ...sources, + pluginConfig.target, + ]) + consola.success( + consolaPrefix, + "Files synced in ", + Date.now() - start, + "ms" + ) + } catch (error) { + consola.error(consolaPrefix, "Error syncing files", error) + } + }, + } +} diff --git a/vitest.setup.ts b/vite/vitest.setup.ts similarity index 100% rename from vitest.setup.ts rename to vite/vitest.setup.ts