├── .editorconfig ├── .github ├── setup-node │ └── action.yml └── workflows │ ├── cargo-toml-lint.yml │ ├── ci-assign-project.yml │ ├── mdbook-docs.yml │ ├── next-docs.yml │ ├── next-links.yml │ ├── notify-slack-action.yml │ ├── publish-crate.yml │ ├── publish-docker-image.yml │ └── vp-docs.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── audits ├── lenient-audit │ ├── README.md │ └── action.yml └── strict-audit │ ├── README.md │ └── action.yml ├── changeset ├── README.md └── action.yaml ├── docs-hub ├── .markdownlint.yaml ├── .markdownlintignore ├── README.md ├── generate-mlc-config.mjs ├── lychee.toml ├── mdbook-docs.js ├── mlc.mdbook.json ├── mlc.next.json ├── next-docs.mjs ├── package-lock.json ├── package.json └── vp-docs.js ├── gh-projects ├── .gitignore ├── README.md └── assign-to-project │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── action.yml │ ├── dist │ └── main.js │ ├── jest.config.json │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── actions │ │ ├── assignProject.test.ts │ │ └── assignProject.ts │ ├── main.ts │ ├── services │ │ ├── assignProject.ts │ │ ├── getProject.ts │ │ ├── index.ts │ │ └── updateField.ts │ ├── tests │ │ ├── mocks │ │ │ └── getProject.json │ │ ├── removeSpaces.ts │ │ └── setup.ts │ └── utils │ │ ├── field.ts │ │ ├── headers.ts │ │ ├── index.ts │ │ ├── inputs.test.ts │ │ └── inputs.ts │ ├── tsconfig.eslint.json │ ├── tsconfig.json │ └── tsup.config.ts ├── setups ├── docker │ ├── README.md │ └── action.yaml ├── node │ ├── README.md │ └── action.yaml └── npm │ ├── README.md │ └── action.yaml └── update-sdk ├── README.md ├── action.yaml ├── dist └── index.js ├── package.json ├── pnpm-lock.yaml ├── src ├── Changeset.ts ├── Github.ts ├── PackageJson.ts ├── ReleaseBot.ts └── index.ts ├── tsconfig.json └── tsup.config.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | tab_width = 2 5 | indent_size = 2 6 | -------------------------------------------------------------------------------- /.github/setup-node/action.yml: -------------------------------------------------------------------------------- 1 | name: "Setup Node.js env" 2 | description: "Setup Node.js environment with PNPM and Turborepo" 3 | 4 | inputs: 5 | node-version: 6 | description: "Node version" 7 | default: "20" 8 | pnpm-version: 9 | description: "PNPM version" 10 | default: "9" 11 | disable-turbo-cache: 12 | description: "Disable Turborepo cache" 13 | default: "false" 14 | 15 | runs: 16 | using: "composite" 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | 21 | - name: Cache Turborepo 22 | uses: actions/cache@v4 23 | if: ${{ !inputs.disable-turbo-cache }} 24 | with: 25 | path: .turbo 26 | key: ${{ runner.os }}-turbo-${{ github.sha }} 27 | restore-keys: | 28 | ${{ runner.os }}-turbo- 29 | 30 | - uses: pnpm/action-setup@v4 31 | name: Install pnpm 32 | with: 33 | version: ${{ inputs.pnpm-version }} 34 | run_install: false 35 | 36 | - name: Install Node.js 37 | uses: actions/setup-node@v4 38 | with: 39 | node-version: ${{ inputs.node-version }} 40 | cache: "pnpm" 41 | 42 | - name: Install dependencies 43 | shell: bash 44 | env: 45 | PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 46 | run: pnpm install 47 | -------------------------------------------------------------------------------- /.github/workflows/cargo-toml-lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint Cargo.toml Files 2 | 3 | on: 4 | workflow_call: 5 | secrets: 6 | GH_TOKEN: 7 | description: "GitHub Token" 8 | required: true 9 | SLACK_WEBHOOK_URL: 10 | description: "Slack Webhook URL" 11 | required: true 12 | 13 | jobs: 14 | cargo-toml-lint: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v4 20 | 21 | - name: Install toolchain 22 | uses: actions-rs/toolchain@v1 23 | with: 24 | toolchain: stable 25 | 26 | - name: Install Cargo.toml Linter 27 | uses: baptiste0928/cargo-install@v1 28 | with: 29 | crate: cargo-toml-lint 30 | version: 0.1 31 | 32 | - name: Run Cargo.toml Linter 33 | run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint 34 | 35 | notify-slack-action: 36 | needs: cargo-toml-lint 37 | if: ${{failure()}} 38 | uses: FuelLabs/github-actions/.github/workflows/notify-slack-action.yml@master 39 | secrets: 40 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 42 | -------------------------------------------------------------------------------- /.github/workflows/ci-assign-project.yml: -------------------------------------------------------------------------------- 1 | name: "CI assign project" 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, edited, closed] 6 | 7 | concurrency: 8 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 9 | cancel-in-progress: true 10 | 11 | jobs: 12 | assign-project-changed: 13 | name: Assign project changed 14 | runs-on: ubuntu-latest 15 | outputs: 16 | changed: ${{ steps.changed-assign-project.outputs.any_changed }} 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Change assign project 20 | id: changed-assign-project 21 | uses: tj-actions/changed-files@v22.2 22 | with: 23 | files: | 24 | **/gh-projects/assign-to-project/**/* 25 | 26 | lint: 27 | name: Lint 28 | runs-on: ubuntu-latest 29 | # Avoid running this if no files under assign-to-project was changed 30 | needs: assign-project-changed 31 | if: ${{ needs.assign-project-changed.outputs.changed == 'true' }} 32 | steps: 33 | - uses: actions/checkout@v4 34 | - uses: ./setups/node 35 | - run: | 36 | npm install 37 | npm run lint 38 | working-directory: ./gh-projects/assign-to-project 39 | 40 | test: 41 | name: Run tests 42 | runs-on: ubuntu-latest 43 | # Avoid running this if no files under assign-to-project was changed 44 | needs: assign-project-changed 45 | if: ${{ needs.assign-project-changed.outputs.changed == 'true' }} 46 | steps: 47 | - uses: actions/checkout@v4 48 | - uses: ./setups/node 49 | - name: Run tests 50 | run: | 51 | npm install 52 | npm run test 53 | working-directory: ./gh-projects/assign-to-project 54 | -------------------------------------------------------------------------------- /.github/workflows/mdbook-docs.yml: -------------------------------------------------------------------------------- 1 | name: "Docs Hub Check" 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | docs-src-path: 7 | description: "the folder where SUMMARY.md lives" 8 | required: true 9 | type: string 10 | spellcheck-config-path: 11 | description: "the path where the .spellcheck.yml file lives" 12 | required: true 13 | type: string 14 | pre-command: 15 | description: "a command to run before the jobs" 16 | required: false 17 | type: string 18 | default: '' 19 | 20 | jobs: 21 | markdown-link-check: 22 | name: Check Links 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Checkout repo 26 | uses: actions/checkout@v4 27 | - name: Checkout repo2 28 | uses: actions/checkout@v4 29 | with: 30 | repository: 'FuelLabs/github-actions' 31 | path: 'workflow' 32 | - name: Run pre-command 33 | if: inputs.pre-command != '' 34 | run: ${{ inputs.pre-command }} 35 | - name: Restore lychee cache 36 | uses: actions/cache@v3 37 | with: 38 | path: .lycheecache 39 | key: cache-lychee-${{ github.ref_name }} 40 | restore-keys: cache-lychee- 41 | - uses: lycheeverse/lychee-action@v1 42 | with: 43 | args: '--config workflow/docs-hub/lychee.toml' 44 | 45 | markdown-lint: 46 | name: Markdown Lint 47 | runs-on: ubuntu-latest 48 | steps: 49 | - name: Checkout repo 50 | uses: actions/checkout@v4 51 | - name: Checkout repo2 52 | uses: actions/checkout@v4 53 | with: 54 | repository: 'FuelLabs/github-actions' 55 | path: 'workflow' 56 | - name: Run pre-command 57 | if: inputs.pre-command != '' 58 | run: ${{ inputs.pre-command }} 59 | - uses: actions/setup-node@v3 60 | with: 61 | node-version: 18 62 | - run: | 63 | npm install -g markdownlint-cli@0.32.1 64 | markdownlint --config workflow/docs-hub/.markdownlint.yaml --ignore-path workflow/docs-hub/.markdownlintignore '**/*.md' 65 | 66 | check-doc-folders: 67 | name: Check SUMMARY & Folders 68 | runs-on: ubuntu-latest 69 | steps: 70 | - name: Checkout repo 71 | uses: actions/checkout@v4 72 | - name: Checkout repo2 73 | uses: actions/checkout@v4 74 | with: 75 | repository: 'FuelLabs/github-actions' 76 | path: 'workflow' 77 | - name: Run pre-command 78 | if: inputs.pre-command != '' 79 | run: ${{ inputs.pre-command }} 80 | - name: Setup node 81 | uses: actions/setup-node@v3 82 | with: 83 | node-version: 18 84 | - name: Run script 85 | run: node workflow/docs-hub/mdbook-docs.js ${{ inputs.docs-src-path }} 86 | 87 | spell-check: 88 | runs-on: ubuntu-latest 89 | steps: 90 | - name: Checkout Code 91 | uses: actions/checkout@v4 92 | - name: Run pre-command 93 | if: inputs.pre-command != '' 94 | run: ${{ inputs.pre-command }} 95 | - uses: rojopolis/spellcheck-github-actions@0.34.0 96 | name: Spellcheck 97 | with: 98 | config_path: ${{ inputs.spellcheck-config-path }} 99 | task_name: SPCheck 100 | -------------------------------------------------------------------------------- /.github/workflows/next-docs.yml: -------------------------------------------------------------------------------- 1 | name: "Docs Hub Check" 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | doc-folder-path: 7 | description: "the folder path where the mdx files live" 8 | required: true 9 | type: string 10 | src-folder-path: 11 | description: "the src folder where the nav.json and components.json files live" 12 | required: true 13 | type: string 14 | spellcheck-config-path: 15 | description: "the path where the .spellcheck.yml file lives" 16 | required: true 17 | type: string 18 | 19 | jobs: 20 | spell-check: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - name: Checkout Code 24 | uses: actions/checkout@v4 25 | - uses: rojopolis/spellcheck-github-actions@0.34.0 26 | name: Spellcheck 27 | with: 28 | config_path: ${{ inputs.spellcheck-config-path }} 29 | task_name: SPCheck 30 | 31 | check-doc-folders: 32 | name: Check Configs, Components & Folders 33 | runs-on: ubuntu-latest 34 | steps: 35 | - name: Checkout repo 36 | uses: actions/checkout@v4 37 | - name: Checkout repo2 38 | uses: actions/checkout@v4 39 | with: 40 | repository: 'FuelLabs/github-actions' 41 | path: 'workflow' 42 | - name: Setup node 43 | uses: actions/setup-node@v3 44 | with: 45 | node-version: 18 46 | - name: Run script 47 | run: | 48 | cd workflow/docs-hub 49 | npm install 50 | node next-docs.mjs ${{ inputs.doc-folder-path }} ${{ inputs.src-folder-path }} 51 | -------------------------------------------------------------------------------- /.github/workflows/next-links.yml: -------------------------------------------------------------------------------- 1 | name: Next Links 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | status: 7 | description: "deployment status, should be 'success'" 8 | required: true 9 | type: string 10 | preview-url: 11 | description: "PR preview URL" 12 | required: true 13 | type: string 14 | folder-path: 15 | description: "only check mdx links in this folder" 16 | required: false 17 | type: string 18 | default: "." 19 | 20 | jobs: 21 | check-links: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Checkout repo 25 | uses: actions/checkout@v4 26 | - name: Checkout repo2 27 | uses: actions/checkout@v4 28 | with: 29 | repository: 'FuelLabs/github-actions' 30 | path: 'workflow' 31 | # SETUP NODE 32 | - name: Setup node 33 | uses: actions/setup-node@v3 34 | with: 35 | node-version: 18 36 | # RUN SCRIPT TO USE VERCEL PREVIEW LINK FROM PR 37 | - name: Update preview link 38 | run: node workflow/docs-hub/generate-mlc-config.mjs ${{ inputs.status }} ${{ inputs.preview-url }} 39 | # RUN LINK CHECK 40 | - uses: gaurav-nelson/github-action-markdown-link-check@1.0.12 41 | with: 42 | config-file: 'workflow/docs-hub/mlc.next.json' 43 | file-extension: 'mdx' 44 | folder-path: ${{ inputs.folder-path }} 45 | -------------------------------------------------------------------------------- /.github/workflows/notify-slack-action.yml: -------------------------------------------------------------------------------- 1 | name: Notify Slack Action 2 | 3 | on: 4 | workflow_call: 5 | secrets: 6 | GH_TOKEN: 7 | description: "GitHub Token" 8 | required: true 9 | SLACK_WEBHOOK_URL: 10 | description: "Slack Webhook URL" 11 | required: true 12 | 13 | jobs: 14 | notify-slack-action: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - name: Checkout repository 19 | uses: actions/checkout@v4 20 | 21 | - name: Install toolchain 22 | uses: actions-rs/toolchain@v1 23 | with: 24 | toolchain: stable 25 | 26 | - name: Install Slack Notification Action 27 | uses: ravsamhq/notify-slack-action@v2 28 | if: always() 29 | with: 30 | status: "failure" 31 | token: ${{ secrets.GH_TOKEN }} 32 | notification_title: "{workflow} has {status_message}" 33 | message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>" 34 | footer: "" 35 | notify_when: "failure" 36 | env: 37 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 38 | -------------------------------------------------------------------------------- /.github/workflows/publish-crate.yml: -------------------------------------------------------------------------------- 1 | name: Publish Crate 2 | 3 | on: 4 | workflow_call: 5 | secrets: 6 | GH_TOKEN: 7 | description: "GitHub Token" 8 | required: true 9 | CARGO_REGISTRY_TOKEN: 10 | description: "Token for publishing to the crates.io registry" 11 | required: true 12 | SLACK_WEBHOOK_URL: 13 | description: "Slack Webhook URL" 14 | required: true 15 | 16 | jobs: 17 | publish-crate: 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - name: Checkout repository 22 | uses: actions/checkout@v4 23 | 24 | - name: Install toolchain 25 | uses: actions-rs/toolchain@v1 26 | with: 27 | override: true 28 | toolchain: stable 29 | 30 | - name: Publish crate 31 | uses: katyo/publish-crates@v1 32 | with: 33 | publish-delay: 30000 34 | registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} 35 | 36 | notify-slack-action: 37 | needs: cargo-toml-lint 38 | if: ${{failure()}} 39 | uses: FuelLabs/github-actions/.github/workflows/notify-slack-action.yml@master 40 | secrets: 41 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 43 | -------------------------------------------------------------------------------- /.github/workflows/publish-docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish Docker Image 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | flavor: 7 | description: "Defines global behaviors for tags (e.g. 'latest=auto')" 8 | required: false 9 | type: string 10 | 11 | docker_file: 12 | description: "Path to the deployment file" 13 | required: false 14 | type: string 15 | default: "deployment/Dockerfile" 16 | 17 | images: 18 | description: "Docker image names (e.g. 'ghcr.io/FuelLabs/repository-name')" 19 | required: true 20 | type: string 21 | 22 | labels: 23 | description: "Docker image labels (e.g. 'com.example.label=value')" 24 | required: false 25 | type: string 26 | 27 | tags: 28 | description: "Docker image tags (e.g. 'latest,1.0.0')" 29 | required: true 30 | type: string 31 | 32 | secrets: 33 | GH_TOKEN: 34 | description: "GitHub Token" 35 | required: true 36 | 37 | GITHUB_CONTAINER_USERNAME: 38 | description: "Username for GitHub Container Registry" 39 | required: true 40 | 41 | GITHUB_CONTAINER_PASSWORD: 42 | description: "Password for GitHub Container Registry" 43 | required: true 44 | 45 | SLACK_WEBHOOK_URL: 46 | description: "Slack Webhook URL" 47 | required: true 48 | 49 | env: 50 | GITHUB_CONTAINNER_REGISTRY_URL: ghcr.io 51 | 52 | jobs: 53 | build-and-publish-docker-image: 54 | runs-on: ubuntu-latest 55 | 56 | permissions: 57 | contents: read 58 | packages: write 59 | 60 | steps: 61 | - name: Checkout repository 62 | uses: actions/checkout@v4 63 | 64 | - name: Docker Meta 65 | id: meta 66 | uses: docker/metadata-action@v3 67 | with: 68 | flavor: ${{ inputs.flavor }} 69 | images: ${{ inputs.images }} 70 | labels: ${{ inputs.labels }} 71 | tags: ${{ inputs.tags }} 72 | 73 | - name: Set up Docker Buildx 74 | uses: docker/setup-buildx-action@v1 75 | 76 | - name: Login to GitHub Container Registry 77 | uses: docker/login-action@v1 78 | with: 79 | registry: ${{ env.GITHUB_CONTAINNER_REGISTRY_URL }} 80 | username: ${{ secrets.GITHUB_CONTAINER_USERNAME }} 81 | password: ${{ secrets.GITHUB_CONTAINER_PASSWORD }} 82 | 83 | - name: Build and publish image to Github Container Registry 84 | uses: docker/build-push-action@v2 85 | with: 86 | context: . 87 | file: ${{ inputs.docker_file }} 88 | push: true 89 | tags: ${{ steps.meta.outputs.tags }} 90 | labels: ${{ steps.meta.outputs.labels }} 91 | cache-from: type=gha 92 | cache-to: type=gha,mode=max 93 | 94 | notify-slack-action: 95 | needs: cargo-toml-lint 96 | if: ${{failure()}} 97 | uses: FuelLabs/github-actions/.github/workflows/notify-slack-action.yml@master 98 | secrets: 99 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 100 | SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 101 | -------------------------------------------------------------------------------- /.github/workflows/vp-docs.yml: -------------------------------------------------------------------------------- 1 | name: "Docs Hub Check" 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | doc-folder-path: 7 | description: "the folder path where the markdown files live" 8 | required: true 9 | type: string 10 | spellcheck-config-path: 11 | description: "the path where the .spellcheck.yml file lives" 12 | required: true 13 | type: string 14 | node-version: 15 | description: "Node version" 16 | default: 20 17 | type: string 18 | required: false 19 | 20 | jobs: 21 | spell-check: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - name: Checkout Code 25 | uses: actions/checkout@v4 26 | 27 | - uses: rojopolis/spellcheck-github-actions@0.34.0 28 | name: Spellcheck 29 | with: 30 | config_path: ${{ inputs.spellcheck-config-path }} 31 | task_name: SPCheck 32 | 33 | check-doc-folders: 34 | name: Check Configs & Folders 35 | runs-on: ubuntu-latest 36 | steps: 37 | - name: Checkout repo 38 | uses: actions/checkout@v4 39 | 40 | - name: Checkout repo2 41 | uses: actions/checkout@v4 42 | with: 43 | repository: 'FuelLabs/github-actions' 44 | path: 'workflow' 45 | 46 | - name: Setup node 47 | uses: actions/setup-node@v4 48 | with: 49 | node-version: ${{ inputs.node-version }} 50 | 51 | - name: Setup PNPM 52 | uses: pnpm/action-setup@v4 53 | 54 | - name: Run script 55 | run: | 56 | pnpm install 57 | pnpm build 58 | cd workflow/docs-hub 59 | node vp-docs.js ${{ inputs.doc-folder-path }} 60 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Node.js files 2 | node_modules 3 | 4 | ## Micelanious 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Github Actions 2 | 3 | Repoistory to host all of Fuel's reusable workflows 4 | 5 | ## Group of Actions 6 | 7 | | Group | Description | 8 | | --------------------------------- | ---------------------------------------------------------------- | 9 | | [audit](./audits/) | Reusable workflows for auditing npm packages | 10 | | [changeset](./changeset/) | Reusable workflow for create changesets and release npm packages | 11 | | [gh-projects](./gh-projects/) | Automating interactions between GH Projects and repositories | 12 | | [setups/node](./setups/node/) | Setup node and pnpm requirements on CI | 13 | | [setups/docker](./setups/docker/) | Setup docker and docker compose on CI | 14 | | [setups/npm](./setups/npm/) | Setup npm deployment requirements on CI | 15 | | [update-sdk](./update-sdk/) | Reusable workflow for update the SDK packages | 16 | 17 | ## License 18 | 19 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](./LICENSE.md). 20 | -------------------------------------------------------------------------------- /audits/lenient-audit/README.md: -------------------------------------------------------------------------------- 1 | ### Audit 2 | 3 | A github action that runs audit and does not fails if the reported vulnerabilities have not yet been fixed. 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/audits/lenient-audit 9 | with: 10 | node-version: 18.14.1 11 | pnpm-version: latest 12 | ``` 13 | 14 | ### Inputs 15 | 16 | | Name | Description | 17 | | ------------ | ------------ | 18 | | node-version | Node version | 19 | | pnpm-version | PNPM version | 20 | 21 | ### Outputs 22 | 23 | No outputs defined 24 | 25 | ## License 26 | 27 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 28 | -------------------------------------------------------------------------------- /audits/lenient-audit/action.yml: -------------------------------------------------------------------------------- 1 | name: Lenient Audit 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | node-version: 7 | required: true 8 | type: string 9 | pnpm-version: 10 | required: true 11 | type: string 12 | 13 | jobs: 14 | audit: 15 | name: Audit 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v3 19 | - uses: ./setups/node 20 | with: 21 | node-version: ${{ inputs.node-version }} 22 | pnpm-version: ${{ inputs.pnpm-version }} 23 | - name: Install jq 24 | run: sudo apt-get install jq 25 | - run: | 26 | pnpm audit --prod --json | jq ' 27 | def has_fix: 28 | .advisories | to_entries | map(.value.patched_versions != "<0.0.0") | any; 29 | if has_fix then 30 | 1 31 | else 32 | 0 33 | end 34 | ' > audit_result.txt 35 | if [ "$(cat audit_result.txt)" -eq "1" ]; then 36 | echo "Actionable vulnerabilities found" 37 | exit 1 38 | else 39 | echo "No actionable vulnerabilities" 40 | exit 0 41 | fi -------------------------------------------------------------------------------- /audits/strict-audit/README.md: -------------------------------------------------------------------------------- 1 | ### Strict Audit 2 | 3 | A github action that runs audit without ignoring vulnerabilities that have not been fixed. 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/audits/strict-audit 9 | with: 10 | node-version: 18.14.1 11 | pnpm-version: latest 12 | ``` 13 | 14 | ### Inputs 15 | 16 | | Name | Description | 17 | | ------------ | ------------ | 18 | | node-version | Node version | 19 | | pnpm-version | PNPM version | 20 | 21 | ### Outputs 22 | 23 | No outputs defined 24 | 25 | ## License 26 | 27 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 28 | -------------------------------------------------------------------------------- /audits/strict-audit/action.yml: -------------------------------------------------------------------------------- 1 | name: Strict Audit 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | node-version: 7 | required: true 8 | type: string 9 | pnpm-version: 10 | required: true 11 | type: string 12 | 13 | jobs: 14 | strict-audit: 15 | name: Strict Audit 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v3 19 | - uses: ./setups/node 20 | with: 21 | node-version: ${{ inputs.node-version }} 22 | pnpm-version: ${{ inputs.pnpm-version }} 23 | - run: pnpm audit --prod -------------------------------------------------------------------------------- /changeset/README.md: -------------------------------------------------------------------------------- 1 | ### Setup node 2 | 3 | A github action to setup Node.js and PNPM 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/changeset 9 | with: 10 | build: "pnpm build" 11 | publish: "pnpm changeset:publish" 12 | release-type: "aggregate" 13 | version: "1.0.0" 14 | github-token: ${{ secrets.GITHUB_TOKEN }} 15 | github-actor: ${{ github.actor }} 16 | npm-token: ${{ secrets.NPM_TOKEN }} 17 | ``` 18 | 19 | ### Inputs 20 | 21 | | Name | Description | 22 | | ------------ | ---------------------------------------------------------- | 23 | | build | build command for packages | 24 | | publish | publish command for changeset | 25 | | release-type | changeset release type | 26 | | version | packages single version if use `release-type: "aggregate"` | 27 | | github-token | github token to create changeset PR | 28 | | github-actor | github user to create changeset PR | 29 | | npm-token | npm secret token to publish the packages | 30 | 31 | ### Outputs 32 | 33 | No outputs defined 34 | 35 | ## License 36 | 37 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../LICENSE.md). 38 | -------------------------------------------------------------------------------- /changeset/action.yaml: -------------------------------------------------------------------------------- 1 | name: "Release packages to NPM" 2 | 3 | inputs: 4 | build: 5 | default: "pnpm build" 6 | description: "Project build command" 7 | required: true 8 | publish: 9 | default: "pnpm changeset:release" 10 | description: "Project publish command" 11 | required: true 12 | release-type: 13 | default: "aggregate" 14 | description: "Changeset release type" 15 | required: true 16 | version: 17 | description: "Project version" 18 | required: true 19 | github-token: 20 | description: "GitHub secret token" 21 | required: true 22 | github-actor: 23 | description: "GitHub actor name" 24 | required: true 25 | npm-token: 26 | description: "NPM secret token" 27 | required: true 28 | 29 | runs: 30 | using: "composite" 31 | steps: 32 | - uses: actions/checkout@v3 33 | with: 34 | # need this to get full git-history/clone in order to build changelogs and check changesets 35 | fetch-depth: 0 36 | 37 | - name: Setup Node and NPM 38 | uses: ./setups/node 39 | uses: ./setups/npm 40 | with: 41 | npm-token: ${{ inputs.npm-token }} 42 | 43 | - name: Setup git user (for changelog step) 44 | run: | 45 | git config --global user.name "${{ inputs.github-actor }}" 46 | git config --global user.email "${{ inputs.github-actor }}@users.noreply.github.com" 47 | 48 | - name: Build project 49 | run: ${{ inputs.build }} 50 | 51 | - name: Create Release Pull Request or Publish to NPM 52 | id: changesets 53 | uses: FuelLabs/changesets-action@main 54 | with: 55 | publish: ${{ inputs.publish }} 56 | commit: "ci(changesets): versioning packages" 57 | title: "ci(changesets): versioning packages" 58 | createGithubReleases: ${{ inputs.release-type }} 59 | githubReleaseName: v${{ inputs.version }} 60 | githubTagName: v${{ inputs.version }} 61 | env: 62 | GITHUB_TOKEN: ${{ inputs.github-token }} 63 | NPM_TOKEN: ${{ inputs.npm-token }} 64 | 65 | - name: Release to @next tag 66 | if: steps.changesets.outputs.published != 'true' 67 | run: | 68 | git checkout master 69 | pnpm changeset version --snapshot next 70 | pnpm changeset publish --tag next 71 | env: 72 | GITHUB_TOKEN: ${{ inputs.github-token }} 73 | NPM_TOKEN: ${{ inputs.npm-token }} 74 | -------------------------------------------------------------------------------- /docs-hub/.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | "default": true # Default state for all rules 2 | "MD013": false # Disable rule for line length 3 | "MD033": false # Disable rule banning inline HTML 4 | -------------------------------------------------------------------------------- /docs-hub/.markdownlintignore: -------------------------------------------------------------------------------- 1 | workflow 2 | forc-plugins/forc-doc/src/licenses/SourceSerif4-LICENSE.md 3 | PULL_REQUEST_TEMPLATE.md 4 | README.md 5 | scripts/check-docs -------------------------------------------------------------------------------- /docs-hub/README.md: -------------------------------------------------------------------------------- 1 | # Docs Hub 2 | 3 | Github workflows to test docs for compatibility with the docs-hub. 4 | 5 | The types of doc architectures that are supported in the docs hub are: 6 | 7 | 1. [MDBooks](#mdbooks) 8 | 2. [Next.js & MDX](#next) 9 | 3. [Vitepress](#vitepress) 10 | 11 | ## MDBooks 12 | 13 | ### How to use? 14 | 15 | ```yml 16 | uses: FuelLabs/github-actions/.github/workflows/mdbook-docs.yml@master 17 | with: 18 | docs-src-path: 'docs/book/src' 19 | spellcheck-config-path: 'docs/book/.spellcheck.yml' 20 | # OPTIONAL 21 | pre-command: 'cargo run --package versions-replacer' 22 | ``` 23 | 24 | ### Inputs 25 | 26 | | Name | Description | 27 | | ------------ | ------------ | 28 | | docs-src-path | the folder where SUMMARY.md lives | 29 | | spellcheck-config-path | the path for the spellcheck config file | 30 | | pre-command | optional: command to run before other checks | 31 | 32 | ### Outputs 33 | 34 | No outputs defined 35 | 36 | ### What's included 37 | 38 | This workflow: 39 | 40 | 1. Runs a link check on all links found in markdown files. You can add regex patterns to ignore certain types of links in the [mlc.mdbook.json](mlc.mdbook.json) config file. 41 | 2. Runs a lint check on all markdown files except those listed in the [.markdownlintignore](.markdownlintignore) file. It uses the configuration in [.markdownlint.yaml](.markdownlint.yaml). 42 | 3. Checks for an index.md file in the docs src folder (and for the sway repo, in the generated forc docs folder). 43 | 4. Checks for to make sure there are no nested subfolders (except for those already accounted for in the generated forc docs). 44 | 5. Checks to make sure the folder structure matches the SUMMARY navigation. 45 | 6. Checks for unused files missing from the SUMMARY. 46 | 7. Checks to see if a navigation order can be successfully generated from the SUMMARY. 47 | 8. Runs a spell check using the configuration file at `spellcheck-config-path`. 48 | 49 | ## Next 50 | 51 | ### How to use? 52 | 53 | #### Docs 54 | 55 | ```yml 56 | uses: FuelLabs/github-actions/.github/workflows/next-docs.yml@master 57 | with: 58 | doc-folder-path: 'docs' 59 | src-folder-path: 'src' 60 | spellcheck-config-path: 'docs/.spellcheck.yml' 61 | ``` 62 | 63 | #### Links 64 | 65 | ```yml 66 | name: Links 67 | 68 | on: 69 | deployment_status 70 | 71 | jobs: 72 | check-links: 73 | uses: FuelLabs/github-actions/.github/workflows/next-links.yml@master 74 | with: 75 | status: ${{ github.event.deployment_status.state }} 76 | preview-url: ${{ github.event.deployment_status.environment_url }} 77 | 78 | 79 | ``` 80 | 81 | ### Inputs 82 | 83 | #### Docs 84 | 85 | | Name | Description | 86 | | ------------ | ------------ | 87 | | doc-folder-path | the folder path where the mdx files live | 88 | | src-folder-path | the src folder where the nav.json and components.json files live | 89 | | spellcheck-config-path | the path for the spellcheck config file | 90 | 91 | #### Links 92 | 93 | | Name | Description | 94 | | ------------ | ------------ | 95 | | status | deployment status, should be 'success' | 96 | | preview-url | PR preview URL | 97 | | folder-path | optional: only check mdx links in this folder | 98 | 99 | ### Outputs 100 | 101 | No outputs defined 102 | 103 | ### What's included 104 | 105 | #### Docs 106 | 107 | This workflow: 108 | 109 | 1. Checks for to make sure there are no nested subfolders. 110 | 2. Checks to make sure the there is a nav.json file in the src folder with a menu and submenu arays. 111 | 3. Checks for a components.json file in the src folder with folders and ignore arrays. The `folders` array should contain all of the paths where MDX components live. The `ignore` array should have all of the components that are handled explicity in the Docs Hub. 112 | 4. Checks to make sure the names of components used in MDX files match the file name. 113 | 5. Checks to make sure MDX components aren't nested more than twice. For example, `Examples.Events.Connect` & `Examples.Connect` are ok 114 | `Examples.Events.Connect.First` is not ok. 115 | 6. Runs a spell check using the configuration file at `spellcheck-config-path`. 116 | 117 | #### Links 118 | 119 | This workflow checks all links in mdx files. 120 | 121 | ## Vitepress 122 | 123 | ### How to use? 124 | 125 | ```yml 126 | uses: FuelLabs/github-actions/.github/workflows/vp-docs.yml@master 127 | with: 128 | doc-folder-path: 'apps/docs/src' 129 | spellcheck-config-path: 'apps/docs/book/.spellcheck.yml' 130 | ``` 131 | 132 | ### Inputs 133 | 134 | | Name | Description | 135 | | ------------ | ------------ | 136 | | doc-folder-path | the folder path where the markdown files live | 137 | | spellcheck-config-path | the path for the spellcheck config file | 138 | 139 | ### Outputs 140 | 141 | No outputs defined 142 | 143 | ### What's included 144 | 145 | This workflow: 146 | 147 | 1. Checks for an index.md file in the docs src folder. 148 | 2. Checks for to make sure there are no nested subfolders (except for those already accounted for in `api` and `guide` folders). 149 | 3. Checks to make sure the file & folder names match what is in the config navigation. 150 | 4. Checks for unused files missing from the config. 151 | 5. Checks to see if a navigation order can be successfully generated from the config. 152 | 6. Runs a spell check using the configuration file at `spellcheck-config-path`. 153 | 154 | ## Handling Spell Check Errors 155 | 156 | The files checked are configured in `.spellcheck.yml`. This is also where you can configure what types of elements are ignored. 157 | 158 | If the spell check test fails: 159 | 160 | - look up the word in the question to verify it is a real word and is correctly spelled 161 | - If it is a file name or is code, use backticks to ignore the word. 162 | - If it is a real word that is spelled correctly, or an acronym that is either common or is defined already, add it to `spell-check-custom-words.txt`. 163 | - If needed, rewrite the sentence. Ex: DON'T use "`lock`ing" and add "ing" to the custom words list. Instead, rewrite the sentence as "locking with the `lock` method". 164 | - If it otherwise should be ignored, you can configure the pipeline in `.spellcheck.yml`. 165 | 166 | ## License 167 | 168 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../LICENSE.md). 169 | -------------------------------------------------------------------------------- /docs-hub/generate-mlc-config.mjs: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | 3 | main(); 4 | 5 | function main() { 6 | const deploymentState = process.argv[2]; 7 | console.log('DEPLOYMENT STATE:', deploymentState); 8 | const deploymentURL = process.argv[3]; 9 | console.log('DEPLOYMENT URL:', deploymentURL); 10 | 11 | if (deploymentState === 'success' && deploymentURL) { 12 | const configPath = './workflow/docs-hub/mlc.next.json'; 13 | const configFile = fs.readFileSync(configPath, 'utf-8'); 14 | const newContent = configFile.replace('{{VERCEL_PREVIEW}}', deploymentURL); 15 | fs.writeFileSync(configPath, newContent); 16 | } else { 17 | throw Error('MISSING VERCEL DEPLOYMENT'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docs-hub/lychee.toml: -------------------------------------------------------------------------------- 1 | # Enable link caching. This can be helpful to avoid checking the same links on 2 | # multiple runs. 3 | cache = true 4 | 5 | # Discard all cached requests older than this duration. 6 | max_cache_age = "1d" 7 | 8 | # Comma-separated list of accepted status codes for valid links. 9 | accept = ["200", "206", "405"] 10 | 11 | # Exclude URLs and mail addresses from checking (supports regex). 12 | exclude = [ 13 | 'faucet-beta-5.fuel.network', 14 | 'fuellabs.github.io/block-explorer-v2', 15 | ] 16 | 17 | # Exclude all private IPs from checking. 18 | # Equivalent to setting `exclude_private`, `exclude_link_local`, and 19 | # `exclude_loopback` to true. 20 | exclude_all_private = true 21 | -------------------------------------------------------------------------------- /docs-hub/mdbook-docs.js: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import fs from "fs"; 3 | import { EOL } from "os"; 4 | import assert from "assert"; 5 | 6 | const srcFolderPath = path.join(process.cwd(), process.argv[2]); 7 | const subfolders = fs 8 | .readdirSync(srcFolderPath) 9 | .filter((item) => fs.statSync(path.join(srcFolderPath, item)).isDirectory()); 10 | const summaryFilePath = path.join(srcFolderPath, "SUMMARY.md"); 11 | const summaryContent = fs.readFileSync(summaryFilePath, "utf-8"); 12 | const splitSummary = summaryContent.split(EOL); 13 | 14 | const subFolderExceptions = ["forc", "plugins"]; 15 | const forcLines = []; 16 | 17 | function main() { 18 | checkForIndexFile(srcFolderPath); 19 | checkForNestedFolders(subfolders, srcFolderPath); 20 | checkForNestedSummaryFolders(); 21 | checkForUnusedFiles(srcFolderPath, subfolders); 22 | const order = processSummary(splitSummary); 23 | checkOrder(order); 24 | 25 | if (forcLines.length > 0) { 26 | checkForcDocs(); 27 | } 28 | } 29 | 30 | main(); 31 | 32 | function checkForcDocs() { 33 | const forcPath = path.join(srcFolderPath, "forc"); 34 | checkForIndexFile(forcPath); 35 | 36 | const forcSubfolders = fs 37 | .readdirSync(forcPath) 38 | .filter((item) => fs.statSync(path.join(forcPath, item)).isDirectory()); 39 | checkForNestedFolders(forcSubfolders, forcPath); 40 | 41 | checkForUnusedFiles(forcPath, forcSubfolders); 42 | 43 | const newForcLines = forcLines.map((line) => 44 | line.startsWith("-") ? line : line.slice(2, line.length) 45 | ); 46 | const forcOrder = processSummary(newForcLines, true); 47 | assert(forcOrder.menu.length > 0, "unable to generate forc menu"); 48 | checkOrder(forcOrder, path.join(srcFolderPath, "forc")); 49 | } 50 | 51 | function checkForIndexFile(srcFolderPath) { 52 | const indexPath = path.join(srcFolderPath, "index.md"); 53 | assert(fs.existsSync(indexPath), "missing index.md at root"); 54 | } 55 | 56 | function checkForNestedFolders(subfolders, srcFolderPath) { 57 | const nestedSubfolders = subfolders.filter((subfolder) => 58 | fs 59 | .readdirSync(path.join(srcFolderPath, subfolder)) 60 | .some((item) => 61 | fs.statSync(path.join(srcFolderPath, subfolder, item)).isDirectory() 62 | ) 63 | ); 64 | if (nestedSubfolders.length > 0) { 65 | assert(process.cwd().includes("/sway")); 66 | nestedSubfolders.forEach((folder) => { 67 | assert( 68 | subFolderExceptions.includes(folder), 69 | "cannot have nested subfolders" 70 | ); 71 | if (folder === "plugins") { 72 | const pluginsPath = path.join(srcFolderPath, folder); 73 | const pluginSubFolders = fs 74 | .readdirSync(pluginsPath) 75 | .filter((item) => 76 | fs.statSync(path.join(srcFolderPath, folder, item)).isDirectory() 77 | ); 78 | assert.deepStrictEqual(pluginSubFolders.length, 1); 79 | assert.deepStrictEqual(pluginSubFolders[0], "forc_client"); 80 | } 81 | }); 82 | } 83 | } 84 | function checkForNestedSummaryFolders() { 85 | const nestedSubfolders = splitSummary.filter((line) => 86 | line.startsWith(" -") 87 | ); 88 | nestedSubfolders.forEach((folder) => { 89 | let isException = false; 90 | subFolderExceptions.forEach((exception) => { 91 | if(folder.includes(exception)){ 92 | isException = true; 93 | } 94 | }) 95 | assert( 96 | isException, 97 | "cannot nest subfolders in SUMMARY.md" 98 | ); 99 | }); 100 | } 101 | 102 | function checkForUnusedFiles(srcFolderPath, subfolders) { 103 | const fileNames = fs.readdirSync(srcFolderPath); 104 | fileNames.forEach((file) => { 105 | // check if each file can be found in the SUMMARY 106 | if (file !== "SUMMARY.md") { 107 | assert(summaryContent.includes(file), `${file} missing in SUMMARY.md`); 108 | } 109 | }); 110 | subfolders.forEach((folder) => { 111 | const folderPath = path.join(srcFolderPath, folder); 112 | const subfolderNames = fs.readdirSync(folderPath); 113 | const parentFolder = folderPath.split("/").pop(); 114 | subfolderNames.forEach((subFile) => { 115 | if(subFile === 'forc_client'){ 116 | const forcClientPath = path.join(folderPath, subFile); 117 | const forcClientSubfolderNames = fs.readdirSync(forcClientPath); 118 | forcClientSubfolderNames.forEach((forcClientSubFile) => { 119 | const actualPath = `${subFile}/${forcClientSubFile}`; 120 | assert( 121 | summaryContent.includes(actualPath), 122 | `${actualPath} missing in SUMMARY.md` 123 | ); 124 | }) 125 | } else { 126 | const actualPath = `${parentFolder}/${subFile}`; 127 | assert( 128 | summaryContent.includes(actualPath), 129 | `${actualPath} missing in SUMMARY.md` 130 | ); 131 | } 132 | 133 | }); 134 | }); 135 | } 136 | 137 | function checkOrder(order, altSrcFolderPath = null) { 138 | const srcPath = altSrcFolderPath ? altSrcFolderPath : srcFolderPath; 139 | Object.keys(order).forEach((key) => { 140 | const menuOrder = order[key]; 141 | if (key === "menu") { 142 | // check if each line in the menu corresponds to 143 | // an existing top-level file or the name of the folder 144 | menuOrder.forEach((item) => { 145 | let itemPath = path.join(srcPath, item); 146 | if (fs.existsSync(itemPath)) { 147 | assert( 148 | fs.statSync(itemPath).isDirectory(), 149 | `${itemPath} folder is missing` 150 | ); 151 | } else { 152 | if (item === "forc") itemPath = path.join(srcPath, "index"); 153 | itemPath = `${itemPath}.md`; 154 | assert(fs.existsSync(itemPath), `${itemPath} file is missing`); 155 | } 156 | }); 157 | } else { 158 | // check if item exists in the right folder 159 | const possibleSeparators = ["-", "_"]; 160 | menuOrder.forEach((item) => { 161 | let fileExists = false; 162 | for (const separator of possibleSeparators) { 163 | let newItem = item.replace(/[-_]/g, separator); 164 | let itemPath = path.join( 165 | srcPath, 166 | `${key !== "forc" ? `${key}/` : "/"}${newItem}.md` 167 | ); 168 | 169 | if (fs.existsSync(itemPath)) { 170 | fileExists = true; 171 | break; 172 | } else { 173 | itemPath = path.join( 174 | srcPath, 175 | `${key !== "forc" ? `${key}/` : "/"}${item}.md` 176 | ); 177 | if (fs.existsSync(itemPath)) { 178 | fileExists = true; 179 | break; 180 | } else { 181 | itemPath = path.join( 182 | srcPath, 183 | `${key !== "forc" ? `${key}/forc_client/` : "/"}${item}.md` 184 | ); 185 | if (fs.existsSync(itemPath)) { 186 | fileExists = true; 187 | break; 188 | } 189 | } 190 | } 191 | } 192 | assert(fileExists, `${item} doesn't exist`); 193 | }); 194 | } 195 | }); 196 | } 197 | 198 | function processSummary(lines, isForc = false) { 199 | const order = { menu: [] }; 200 | let currentCategory; 201 | lines.forEach((line) => { 202 | const paths = line.split("/"); 203 | const newPaths = paths[0].split("("); 204 | const thisCat = currentCategory; 205 | if (line.includes(".md")) { 206 | if (!isForc && line.includes("/forc/")) { 207 | // handle forc docs separately 208 | forcLines.push(line); 209 | } else if (line[0] === "-") { 210 | // handle top-level items 211 | if (paths.length > 2) { 212 | currentCategory = paths[paths.length - 2]; 213 | } else if ( 214 | paths[paths.length - 1].includes("index.md") || 215 | newPaths[newPaths.length - 1].endsWith(".md)") 216 | ) { 217 | currentCategory = newPaths[newPaths.length - 1]; 218 | } else { 219 | currentCategory = paths[paths.length - 1]; 220 | } 221 | const final = currentCategory.replace(".md)", ""); 222 | if (thisCat === final) { 223 | const fileName = paths[paths.length - 1].replace(".md)", ""); 224 | if (!order[currentCategory]) order[currentCategory] = []; 225 | order[currentCategory].push(fileName); 226 | } else if (final !== "index") { 227 | order.menu.push(final); 228 | } 229 | } else if (currentCategory) { 230 | // handle sub-paths 231 | const fileName = paths[paths.length - 1].replace(".md)", ""); 232 | if (!order[currentCategory]) order[currentCategory] = []; 233 | if (fileName !== "index") order[currentCategory].push(fileName); 234 | } 235 | } 236 | }); 237 | return order; 238 | } 239 | -------------------------------------------------------------------------------- /docs-hub/mlc.mdbook.json: -------------------------------------------------------------------------------- 1 | { 2 | "aliveStatusCodes": [200, 206, 403, 405], 3 | "ignorePatterns": [ 4 | { 5 | "pattern": "localhost:" 6 | }, 7 | { 8 | "pattern": "^http://[1-9]" 9 | }, 10 | { 11 | "pattern": "crates\\.io" 12 | }, 13 | { 14 | "pattern": "-indexer.fuel.network" 15 | }, 16 | { 17 | "pattern": "fuellabs.github.io/block-explorer-v2" 18 | }, 19 | { 20 | "pattern": "adobe\\.com" 21 | }, 22 | { 23 | "pattern": "scripts.sil.org" 24 | }, 25 | { 26 | "pattern": "^https://twitter.com" 27 | }, 28 | { 29 | "pattern": "^https://github.com/FuelLabs/devrel-requests" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /docs-hub/mlc.next.json: -------------------------------------------------------------------------------- 1 | { 2 | "aliveStatusCodes": [200, 206, 405], 3 | "ignorePatterns": [ 4 | { 5 | "pattern": "localhost:" 6 | }, 7 | { 8 | "pattern": "^http://[1-9]" 9 | }, 10 | { 11 | "pattern": "crates\\.io" 12 | }, 13 | { 14 | "pattern": "infura\\.io" 15 | }, 16 | { 17 | "pattern": "-indexer.fuel.network" 18 | }, 19 | { 20 | "pattern": "fuellabs.github.io/block-explorer-v2" 21 | }, 22 | { 23 | "pattern": "adobe\\.com" 24 | }, 25 | { 26 | "pattern": "scripts.sil.org" 27 | }, 28 | { 29 | "pattern": "^@repository" 30 | }, 31 | { 32 | "pattern": "\\.zip$" 33 | }, 34 | { 35 | "pattern": "\\.png$" 36 | }, 37 | { 38 | "pattern": "^https://twitter.com" 39 | } 40 | ], 41 | "replacementPatterns": [ 42 | { 43 | "pattern": "^(/)(.*)", 44 | "replacement": "{{VERCEL_PREVIEW}}/$2" 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /docs-hub/next-docs.mjs: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import fs from "fs"; 3 | import assert from "assert"; 4 | import remarkMdx from "remark-mdx"; 5 | import remarkParse from "remark-parse"; 6 | import { unified } from "unified"; 7 | import { visit } from "unist-util-visit"; 8 | 9 | const REPO_DIRECTORY = path.join(process.cwd(), "../.."); 10 | const DOCS_DIRECTORY = path.join(REPO_DIRECTORY, process.argv[2]); 11 | const SRC_PATH = path.join(REPO_DIRECTORY, process.argv[3]); 12 | const COMP_CONFIG_PATH = path.join(SRC_PATH, "components.json"); 13 | const NAV_PATH = path.join(SRC_PATH, "nav.json"); 14 | const files = fs.readdirSync(DOCS_DIRECTORY); 15 | const subfolders = files.filter((item) => 16 | fs.statSync(path.join(DOCS_DIRECTORY, item)).isDirectory() 17 | ); 18 | 19 | function main() { 20 | checkForNestedFolders(); 21 | checkNavConfig(); 22 | checkComponentsConfig(); 23 | checkComponentNames(); 24 | checkComponentNesting(); 25 | } 26 | 27 | main(); 28 | 29 | function checkForNestedFolders() { 30 | const nestedSubfolders = subfolders.filter((subfolder) => 31 | fs 32 | .readdirSync(path.join(DOCS_DIRECTORY, subfolder)) 33 | .some((item) => 34 | fs.statSync(path.join(DOCS_DIRECTORY, subfolder, item)).isDirectory() 35 | ) 36 | ); 37 | assert.deepStrictEqual( 38 | nestedSubfolders.length, 39 | 0, 40 | "cannot have nested subfolders" 41 | ); 42 | } 43 | 44 | function checkNavConfig() { 45 | const navFile = fs.readFileSync(NAV_PATH, "utf8"); 46 | const navJSON = JSON.parse(navFile); 47 | assert(Array.isArray(navJSON.menu), "missing nav menu"); 48 | subfolders.forEach((folder) => { 49 | const folderName = folder.replaceAll("-", "_"); 50 | assert( 51 | Array.isArray(navJSON[folderName]), 52 | `missing nav ${folderName} menu` 53 | ); 54 | }); 55 | } 56 | 57 | function checkComponentsConfig() { 58 | const compFile = fs.readFileSync(COMP_CONFIG_PATH, "utf8"); 59 | const compJSON = JSON.parse(compFile); 60 | assert( 61 | Array.isArray(compJSON.folders), 62 | "missing folders array in components.json config" 63 | ); 64 | assert( 65 | Array.isArray(compJSON.ignore), 66 | "missing ignore array in components.json config" 67 | ); 68 | } 69 | 70 | function checkComponentNames() { 71 | files.forEach((filename) => { 72 | const filepath = path.join(DOCS_DIRECTORY, filename); 73 | if (fs.statSync(filepath).isDirectory()) { 74 | const subFiles = fs.readdirSync(filepath); 75 | subFiles.forEach((subFilename) => { 76 | const subFilepath = path.join(filepath, subFilename); 77 | checkFile(subFilepath); 78 | }); 79 | } else { 80 | checkFile(filepath); 81 | } 82 | }); 83 | } 84 | 85 | // Examples.Events.Connect && Examples.Connect is ok 86 | // Examples.Events.Connect.First is not ok 87 | function checkComponentNesting() { 88 | let allComponents = []; 89 | files.forEach((filename) => { 90 | const filepath = path.join(DOCS_DIRECTORY, filename); 91 | if (fs.statSync(filepath).isDirectory()) { 92 | const subFiles = fs.readdirSync(filepath); 93 | subFiles.forEach((subFilename) => { 94 | const subFilepath = path.join(filepath, subFilename); 95 | const file = fs.readFileSync(subFilepath, "utf8"); 96 | const components = getComponents(file); 97 | allComponents = [...allComponents, ...components]; 98 | }); 99 | } else { 100 | const file = fs.readFileSync(filepath, "utf8"); 101 | const components = getComponents(file); 102 | allComponents = [...allComponents, ...components]; 103 | } 104 | const cleaned = Array.from(new Set(allComponents)); 105 | cleaned.forEach((compName) => { 106 | const length = compName.split(".").length; 107 | assert(length < 4, `${compName} has too many nested components`); 108 | }); 109 | }); 110 | } 111 | 112 | function checkFile(filepath) { 113 | const file = fs.readFileSync(filepath, "utf8"); 114 | const components = getComponents(file); 115 | const compFile = fs.readFileSync(COMP_CONFIG_PATH, "utf8"); 116 | const compJSON = JSON.parse(compFile); 117 | components.forEach((comp) => { 118 | if ( 119 | !compJSON.ignore.includes(comp) && 120 | !compJSON.ignore.includes(comp.split(".")[0]) 121 | ) { 122 | let actualCompPath = ""; 123 | for (let i = 0; i < compJSON.folders.length; i++) { 124 | const path = `${compJSON.folders[i]}/${ 125 | comp.includes(".") ? comp.split(".").pop() : comp 126 | }`; 127 | const actualPath = `${REPO_DIRECTORY}${path}.tsx`; 128 | if (fs.existsSync(actualPath)) { 129 | actualCompPath = `..${path}`; 130 | break; 131 | } 132 | } 133 | assert.notDeepStrictEqual(actualCompPath, "", `${comp} not found`); 134 | } 135 | }); 136 | } 137 | 138 | function getComponents(mdxContent) { 139 | const components = []; 140 | const tree = unified().use(remarkParse).use(remarkMdx).parse(mdxContent); 141 | 142 | visit(tree, "mdxJsxFlowElement", (node) => { 143 | if (node.name) components.push(node.name); 144 | }); 145 | return Array.from(new Set(components)); 146 | } 147 | -------------------------------------------------------------------------------- /docs-hub/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "remark-mdx": "^2.3.0", 9 | "remark-parse": "^10.0.2", 10 | "unified": "^10.1.2", 11 | "unist-util-visit": "^5.0.0" 12 | } 13 | }, 14 | "node_modules/@types/acorn": { 15 | "version": "4.0.6", 16 | "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", 17 | "integrity": "sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==", 18 | "dependencies": { 19 | "@types/estree": "*" 20 | } 21 | }, 22 | "node_modules/@types/debug": { 23 | "version": "4.1.8", 24 | "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", 25 | "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", 26 | "dependencies": { 27 | "@types/ms": "*" 28 | } 29 | }, 30 | "node_modules/@types/estree": { 31 | "version": "1.0.1", 32 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", 33 | "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" 34 | }, 35 | "node_modules/@types/estree-jsx": { 36 | "version": "1.0.0", 37 | "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.0.tgz", 38 | "integrity": "sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ==", 39 | "dependencies": { 40 | "@types/estree": "*" 41 | } 42 | }, 43 | "node_modules/@types/hast": { 44 | "version": "2.3.5", 45 | "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", 46 | "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", 47 | "dependencies": { 48 | "@types/unist": "^2" 49 | } 50 | }, 51 | "node_modules/@types/mdast": { 52 | "version": "3.0.12", 53 | "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", 54 | "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", 55 | "dependencies": { 56 | "@types/unist": "^2" 57 | } 58 | }, 59 | "node_modules/@types/ms": { 60 | "version": "0.7.31", 61 | "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", 62 | "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" 63 | }, 64 | "node_modules/@types/unist": { 65 | "version": "2.0.7", 66 | "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.7.tgz", 67 | "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" 68 | }, 69 | "node_modules/acorn": { 70 | "version": "8.10.0", 71 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 72 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 73 | "bin": { 74 | "acorn": "bin/acorn" 75 | }, 76 | "engines": { 77 | "node": ">=0.4.0" 78 | } 79 | }, 80 | "node_modules/acorn-jsx": { 81 | "version": "5.3.2", 82 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 83 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 84 | "peerDependencies": { 85 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 86 | } 87 | }, 88 | "node_modules/bail": { 89 | "version": "2.0.2", 90 | "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", 91 | "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", 92 | "funding": { 93 | "type": "github", 94 | "url": "https://github.com/sponsors/wooorm" 95 | } 96 | }, 97 | "node_modules/ccount": { 98 | "version": "2.0.1", 99 | "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", 100 | "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", 101 | "funding": { 102 | "type": "github", 103 | "url": "https://github.com/sponsors/wooorm" 104 | } 105 | }, 106 | "node_modules/character-entities": { 107 | "version": "2.0.2", 108 | "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", 109 | "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", 110 | "funding": { 111 | "type": "github", 112 | "url": "https://github.com/sponsors/wooorm" 113 | } 114 | }, 115 | "node_modules/character-entities-html4": { 116 | "version": "2.1.0", 117 | "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", 118 | "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", 119 | "funding": { 120 | "type": "github", 121 | "url": "https://github.com/sponsors/wooorm" 122 | } 123 | }, 124 | "node_modules/character-entities-legacy": { 125 | "version": "3.0.0", 126 | "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", 127 | "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", 128 | "funding": { 129 | "type": "github", 130 | "url": "https://github.com/sponsors/wooorm" 131 | } 132 | }, 133 | "node_modules/character-reference-invalid": { 134 | "version": "2.0.1", 135 | "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", 136 | "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", 137 | "funding": { 138 | "type": "github", 139 | "url": "https://github.com/sponsors/wooorm" 140 | } 141 | }, 142 | "node_modules/debug": { 143 | "version": "4.3.4", 144 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 145 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 146 | "dependencies": { 147 | "ms": "2.1.2" 148 | }, 149 | "engines": { 150 | "node": ">=6.0" 151 | }, 152 | "peerDependenciesMeta": { 153 | "supports-color": { 154 | "optional": true 155 | } 156 | } 157 | }, 158 | "node_modules/decode-named-character-reference": { 159 | "version": "1.0.2", 160 | "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", 161 | "integrity": "sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==", 162 | "dependencies": { 163 | "character-entities": "^2.0.0" 164 | }, 165 | "funding": { 166 | "type": "github", 167 | "url": "https://github.com/sponsors/wooorm" 168 | } 169 | }, 170 | "node_modules/dequal": { 171 | "version": "2.0.3", 172 | "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", 173 | "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", 174 | "engines": { 175 | "node": ">=6" 176 | } 177 | }, 178 | "node_modules/diff": { 179 | "version": "5.1.0", 180 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", 181 | "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", 182 | "engines": { 183 | "node": ">=0.3.1" 184 | } 185 | }, 186 | "node_modules/estree-util-is-identifier-name": { 187 | "version": "2.1.0", 188 | "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.1.0.tgz", 189 | "integrity": "sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==", 190 | "funding": { 191 | "type": "opencollective", 192 | "url": "https://opencollective.com/unified" 193 | } 194 | }, 195 | "node_modules/estree-util-visit": { 196 | "version": "1.2.1", 197 | "resolved": "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-1.2.1.tgz", 198 | "integrity": "sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==", 199 | "dependencies": { 200 | "@types/estree-jsx": "^1.0.0", 201 | "@types/unist": "^2.0.0" 202 | }, 203 | "funding": { 204 | "type": "opencollective", 205 | "url": "https://opencollective.com/unified" 206 | } 207 | }, 208 | "node_modules/extend": { 209 | "version": "3.0.2", 210 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 211 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 212 | }, 213 | "node_modules/is-alphabetical": { 214 | "version": "2.0.1", 215 | "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", 216 | "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", 217 | "funding": { 218 | "type": "github", 219 | "url": "https://github.com/sponsors/wooorm" 220 | } 221 | }, 222 | "node_modules/is-alphanumerical": { 223 | "version": "2.0.1", 224 | "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", 225 | "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", 226 | "dependencies": { 227 | "is-alphabetical": "^2.0.0", 228 | "is-decimal": "^2.0.0" 229 | }, 230 | "funding": { 231 | "type": "github", 232 | "url": "https://github.com/sponsors/wooorm" 233 | } 234 | }, 235 | "node_modules/is-buffer": { 236 | "version": "2.0.5", 237 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", 238 | "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", 239 | "funding": [ 240 | { 241 | "type": "github", 242 | "url": "https://github.com/sponsors/feross" 243 | }, 244 | { 245 | "type": "patreon", 246 | "url": "https://www.patreon.com/feross" 247 | }, 248 | { 249 | "type": "consulting", 250 | "url": "https://feross.org/support" 251 | } 252 | ], 253 | "engines": { 254 | "node": ">=4" 255 | } 256 | }, 257 | "node_modules/is-decimal": { 258 | "version": "2.0.1", 259 | "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", 260 | "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", 261 | "funding": { 262 | "type": "github", 263 | "url": "https://github.com/sponsors/wooorm" 264 | } 265 | }, 266 | "node_modules/is-hexadecimal": { 267 | "version": "2.0.1", 268 | "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", 269 | "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", 270 | "funding": { 271 | "type": "github", 272 | "url": "https://github.com/sponsors/wooorm" 273 | } 274 | }, 275 | "node_modules/is-plain-obj": { 276 | "version": "4.1.0", 277 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", 278 | "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", 279 | "engines": { 280 | "node": ">=12" 281 | }, 282 | "funding": { 283 | "url": "https://github.com/sponsors/sindresorhus" 284 | } 285 | }, 286 | "node_modules/kleur": { 287 | "version": "4.1.5", 288 | "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", 289 | "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", 290 | "engines": { 291 | "node": ">=6" 292 | } 293 | }, 294 | "node_modules/longest-streak": { 295 | "version": "3.1.0", 296 | "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", 297 | "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", 298 | "funding": { 299 | "type": "github", 300 | "url": "https://github.com/sponsors/wooorm" 301 | } 302 | }, 303 | "node_modules/mdast-util-from-markdown": { 304 | "version": "1.3.1", 305 | "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", 306 | "integrity": "sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==", 307 | "dependencies": { 308 | "@types/mdast": "^3.0.0", 309 | "@types/unist": "^2.0.0", 310 | "decode-named-character-reference": "^1.0.0", 311 | "mdast-util-to-string": "^3.1.0", 312 | "micromark": "^3.0.0", 313 | "micromark-util-decode-numeric-character-reference": "^1.0.0", 314 | "micromark-util-decode-string": "^1.0.0", 315 | "micromark-util-normalize-identifier": "^1.0.0", 316 | "micromark-util-symbol": "^1.0.0", 317 | "micromark-util-types": "^1.0.0", 318 | "unist-util-stringify-position": "^3.0.0", 319 | "uvu": "^0.5.0" 320 | }, 321 | "funding": { 322 | "type": "opencollective", 323 | "url": "https://opencollective.com/unified" 324 | } 325 | }, 326 | "node_modules/mdast-util-mdx": { 327 | "version": "2.0.1", 328 | "resolved": "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-2.0.1.tgz", 329 | "integrity": "sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==", 330 | "dependencies": { 331 | "mdast-util-from-markdown": "^1.0.0", 332 | "mdast-util-mdx-expression": "^1.0.0", 333 | "mdast-util-mdx-jsx": "^2.0.0", 334 | "mdast-util-mdxjs-esm": "^1.0.0", 335 | "mdast-util-to-markdown": "^1.0.0" 336 | }, 337 | "funding": { 338 | "type": "opencollective", 339 | "url": "https://opencollective.com/unified" 340 | } 341 | }, 342 | "node_modules/mdast-util-mdx-expression": { 343 | "version": "1.3.2", 344 | "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-1.3.2.tgz", 345 | "integrity": "sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==", 346 | "dependencies": { 347 | "@types/estree-jsx": "^1.0.0", 348 | "@types/hast": "^2.0.0", 349 | "@types/mdast": "^3.0.0", 350 | "mdast-util-from-markdown": "^1.0.0", 351 | "mdast-util-to-markdown": "^1.0.0" 352 | }, 353 | "funding": { 354 | "type": "opencollective", 355 | "url": "https://opencollective.com/unified" 356 | } 357 | }, 358 | "node_modules/mdast-util-mdx-jsx": { 359 | "version": "2.1.4", 360 | "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-2.1.4.tgz", 361 | "integrity": "sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==", 362 | "dependencies": { 363 | "@types/estree-jsx": "^1.0.0", 364 | "@types/hast": "^2.0.0", 365 | "@types/mdast": "^3.0.0", 366 | "@types/unist": "^2.0.0", 367 | "ccount": "^2.0.0", 368 | "mdast-util-from-markdown": "^1.1.0", 369 | "mdast-util-to-markdown": "^1.3.0", 370 | "parse-entities": "^4.0.0", 371 | "stringify-entities": "^4.0.0", 372 | "unist-util-remove-position": "^4.0.0", 373 | "unist-util-stringify-position": "^3.0.0", 374 | "vfile-message": "^3.0.0" 375 | }, 376 | "funding": { 377 | "type": "opencollective", 378 | "url": "https://opencollective.com/unified" 379 | } 380 | }, 381 | "node_modules/mdast-util-mdxjs-esm": { 382 | "version": "1.3.1", 383 | "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.1.tgz", 384 | "integrity": "sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==", 385 | "dependencies": { 386 | "@types/estree-jsx": "^1.0.0", 387 | "@types/hast": "^2.0.0", 388 | "@types/mdast": "^3.0.0", 389 | "mdast-util-from-markdown": "^1.0.0", 390 | "mdast-util-to-markdown": "^1.0.0" 391 | }, 392 | "funding": { 393 | "type": "opencollective", 394 | "url": "https://opencollective.com/unified" 395 | } 396 | }, 397 | "node_modules/mdast-util-phrasing": { 398 | "version": "3.0.1", 399 | "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz", 400 | "integrity": "sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==", 401 | "dependencies": { 402 | "@types/mdast": "^3.0.0", 403 | "unist-util-is": "^5.0.0" 404 | }, 405 | "funding": { 406 | "type": "opencollective", 407 | "url": "https://opencollective.com/unified" 408 | } 409 | }, 410 | "node_modules/mdast-util-to-markdown": { 411 | "version": "1.5.0", 412 | "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz", 413 | "integrity": "sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==", 414 | "dependencies": { 415 | "@types/mdast": "^3.0.0", 416 | "@types/unist": "^2.0.0", 417 | "longest-streak": "^3.0.0", 418 | "mdast-util-phrasing": "^3.0.0", 419 | "mdast-util-to-string": "^3.0.0", 420 | "micromark-util-decode-string": "^1.0.0", 421 | "unist-util-visit": "^4.0.0", 422 | "zwitch": "^2.0.0" 423 | }, 424 | "funding": { 425 | "type": "opencollective", 426 | "url": "https://opencollective.com/unified" 427 | } 428 | }, 429 | "node_modules/mdast-util-to-markdown/node_modules/unist-util-visit": { 430 | "version": "4.1.2", 431 | "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", 432 | "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", 433 | "dependencies": { 434 | "@types/unist": "^2.0.0", 435 | "unist-util-is": "^5.0.0", 436 | "unist-util-visit-parents": "^5.1.1" 437 | }, 438 | "funding": { 439 | "type": "opencollective", 440 | "url": "https://opencollective.com/unified" 441 | } 442 | }, 443 | "node_modules/mdast-util-to-markdown/node_modules/unist-util-visit-parents": { 444 | "version": "5.1.3", 445 | "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", 446 | "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", 447 | "dependencies": { 448 | "@types/unist": "^2.0.0", 449 | "unist-util-is": "^5.0.0" 450 | }, 451 | "funding": { 452 | "type": "opencollective", 453 | "url": "https://opencollective.com/unified" 454 | } 455 | }, 456 | "node_modules/mdast-util-to-string": { 457 | "version": "3.2.0", 458 | "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", 459 | "integrity": "sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==", 460 | "dependencies": { 461 | "@types/mdast": "^3.0.0" 462 | }, 463 | "funding": { 464 | "type": "opencollective", 465 | "url": "https://opencollective.com/unified" 466 | } 467 | }, 468 | "node_modules/micromark": { 469 | "version": "3.2.0", 470 | "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", 471 | "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", 472 | "funding": [ 473 | { 474 | "type": "GitHub Sponsors", 475 | "url": "https://github.com/sponsors/unifiedjs" 476 | }, 477 | { 478 | "type": "OpenCollective", 479 | "url": "https://opencollective.com/unified" 480 | } 481 | ], 482 | "dependencies": { 483 | "@types/debug": "^4.0.0", 484 | "debug": "^4.0.0", 485 | "decode-named-character-reference": "^1.0.0", 486 | "micromark-core-commonmark": "^1.0.1", 487 | "micromark-factory-space": "^1.0.0", 488 | "micromark-util-character": "^1.0.0", 489 | "micromark-util-chunked": "^1.0.0", 490 | "micromark-util-combine-extensions": "^1.0.0", 491 | "micromark-util-decode-numeric-character-reference": "^1.0.0", 492 | "micromark-util-encode": "^1.0.0", 493 | "micromark-util-normalize-identifier": "^1.0.0", 494 | "micromark-util-resolve-all": "^1.0.0", 495 | "micromark-util-sanitize-uri": "^1.0.0", 496 | "micromark-util-subtokenize": "^1.0.0", 497 | "micromark-util-symbol": "^1.0.0", 498 | "micromark-util-types": "^1.0.1", 499 | "uvu": "^0.5.0" 500 | } 501 | }, 502 | "node_modules/micromark-core-commonmark": { 503 | "version": "1.1.0", 504 | "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", 505 | "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", 506 | "funding": [ 507 | { 508 | "type": "GitHub Sponsors", 509 | "url": "https://github.com/sponsors/unifiedjs" 510 | }, 511 | { 512 | "type": "OpenCollective", 513 | "url": "https://opencollective.com/unified" 514 | } 515 | ], 516 | "dependencies": { 517 | "decode-named-character-reference": "^1.0.0", 518 | "micromark-factory-destination": "^1.0.0", 519 | "micromark-factory-label": "^1.0.0", 520 | "micromark-factory-space": "^1.0.0", 521 | "micromark-factory-title": "^1.0.0", 522 | "micromark-factory-whitespace": "^1.0.0", 523 | "micromark-util-character": "^1.0.0", 524 | "micromark-util-chunked": "^1.0.0", 525 | "micromark-util-classify-character": "^1.0.0", 526 | "micromark-util-html-tag-name": "^1.0.0", 527 | "micromark-util-normalize-identifier": "^1.0.0", 528 | "micromark-util-resolve-all": "^1.0.0", 529 | "micromark-util-subtokenize": "^1.0.0", 530 | "micromark-util-symbol": "^1.0.0", 531 | "micromark-util-types": "^1.0.1", 532 | "uvu": "^0.5.0" 533 | } 534 | }, 535 | "node_modules/micromark-extension-mdx-expression": { 536 | "version": "1.0.8", 537 | "resolved": "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-1.0.8.tgz", 538 | "integrity": "sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==", 539 | "funding": [ 540 | { 541 | "type": "GitHub Sponsors", 542 | "url": "https://github.com/sponsors/unifiedjs" 543 | }, 544 | { 545 | "type": "OpenCollective", 546 | "url": "https://opencollective.com/unified" 547 | } 548 | ], 549 | "dependencies": { 550 | "@types/estree": "^1.0.0", 551 | "micromark-factory-mdx-expression": "^1.0.0", 552 | "micromark-factory-space": "^1.0.0", 553 | "micromark-util-character": "^1.0.0", 554 | "micromark-util-events-to-acorn": "^1.0.0", 555 | "micromark-util-symbol": "^1.0.0", 556 | "micromark-util-types": "^1.0.0", 557 | "uvu": "^0.5.0" 558 | } 559 | }, 560 | "node_modules/micromark-extension-mdx-jsx": { 561 | "version": "1.0.5", 562 | "resolved": "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-1.0.5.tgz", 563 | "integrity": "sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==", 564 | "dependencies": { 565 | "@types/acorn": "^4.0.0", 566 | "@types/estree": "^1.0.0", 567 | "estree-util-is-identifier-name": "^2.0.0", 568 | "micromark-factory-mdx-expression": "^1.0.0", 569 | "micromark-factory-space": "^1.0.0", 570 | "micromark-util-character": "^1.0.0", 571 | "micromark-util-symbol": "^1.0.0", 572 | "micromark-util-types": "^1.0.0", 573 | "uvu": "^0.5.0", 574 | "vfile-message": "^3.0.0" 575 | }, 576 | "funding": { 577 | "type": "opencollective", 578 | "url": "https://opencollective.com/unified" 579 | } 580 | }, 581 | "node_modules/micromark-extension-mdx-md": { 582 | "version": "1.0.1", 583 | "resolved": "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-1.0.1.tgz", 584 | "integrity": "sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==", 585 | "dependencies": { 586 | "micromark-util-types": "^1.0.0" 587 | }, 588 | "funding": { 589 | "type": "opencollective", 590 | "url": "https://opencollective.com/unified" 591 | } 592 | }, 593 | "node_modules/micromark-extension-mdxjs": { 594 | "version": "1.0.1", 595 | "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz", 596 | "integrity": "sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==", 597 | "dependencies": { 598 | "acorn": "^8.0.0", 599 | "acorn-jsx": "^5.0.0", 600 | "micromark-extension-mdx-expression": "^1.0.0", 601 | "micromark-extension-mdx-jsx": "^1.0.0", 602 | "micromark-extension-mdx-md": "^1.0.0", 603 | "micromark-extension-mdxjs-esm": "^1.0.0", 604 | "micromark-util-combine-extensions": "^1.0.0", 605 | "micromark-util-types": "^1.0.0" 606 | }, 607 | "funding": { 608 | "type": "opencollective", 609 | "url": "https://opencollective.com/unified" 610 | } 611 | }, 612 | "node_modules/micromark-extension-mdxjs-esm": { 613 | "version": "1.0.5", 614 | "resolved": "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-1.0.5.tgz", 615 | "integrity": "sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==", 616 | "dependencies": { 617 | "@types/estree": "^1.0.0", 618 | "micromark-core-commonmark": "^1.0.0", 619 | "micromark-util-character": "^1.0.0", 620 | "micromark-util-events-to-acorn": "^1.0.0", 621 | "micromark-util-symbol": "^1.0.0", 622 | "micromark-util-types": "^1.0.0", 623 | "unist-util-position-from-estree": "^1.1.0", 624 | "uvu": "^0.5.0", 625 | "vfile-message": "^3.0.0" 626 | }, 627 | "funding": { 628 | "type": "opencollective", 629 | "url": "https://opencollective.com/unified" 630 | } 631 | }, 632 | "node_modules/micromark-factory-destination": { 633 | "version": "1.1.0", 634 | "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", 635 | "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", 636 | "funding": [ 637 | { 638 | "type": "GitHub Sponsors", 639 | "url": "https://github.com/sponsors/unifiedjs" 640 | }, 641 | { 642 | "type": "OpenCollective", 643 | "url": "https://opencollective.com/unified" 644 | } 645 | ], 646 | "dependencies": { 647 | "micromark-util-character": "^1.0.0", 648 | "micromark-util-symbol": "^1.0.0", 649 | "micromark-util-types": "^1.0.0" 650 | } 651 | }, 652 | "node_modules/micromark-factory-label": { 653 | "version": "1.1.0", 654 | "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", 655 | "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", 656 | "funding": [ 657 | { 658 | "type": "GitHub Sponsors", 659 | "url": "https://github.com/sponsors/unifiedjs" 660 | }, 661 | { 662 | "type": "OpenCollective", 663 | "url": "https://opencollective.com/unified" 664 | } 665 | ], 666 | "dependencies": { 667 | "micromark-util-character": "^1.0.0", 668 | "micromark-util-symbol": "^1.0.0", 669 | "micromark-util-types": "^1.0.0", 670 | "uvu": "^0.5.0" 671 | } 672 | }, 673 | "node_modules/micromark-factory-mdx-expression": { 674 | "version": "1.0.9", 675 | "resolved": "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-1.0.9.tgz", 676 | "integrity": "sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==", 677 | "funding": [ 678 | { 679 | "type": "GitHub Sponsors", 680 | "url": "https://github.com/sponsors/unifiedjs" 681 | }, 682 | { 683 | "type": "OpenCollective", 684 | "url": "https://opencollective.com/unified" 685 | } 686 | ], 687 | "dependencies": { 688 | "@types/estree": "^1.0.0", 689 | "micromark-util-character": "^1.0.0", 690 | "micromark-util-events-to-acorn": "^1.0.0", 691 | "micromark-util-symbol": "^1.0.0", 692 | "micromark-util-types": "^1.0.0", 693 | "unist-util-position-from-estree": "^1.0.0", 694 | "uvu": "^0.5.0", 695 | "vfile-message": "^3.0.0" 696 | } 697 | }, 698 | "node_modules/micromark-factory-space": { 699 | "version": "1.1.0", 700 | "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz", 701 | "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==", 702 | "funding": [ 703 | { 704 | "type": "GitHub Sponsors", 705 | "url": "https://github.com/sponsors/unifiedjs" 706 | }, 707 | { 708 | "type": "OpenCollective", 709 | "url": "https://opencollective.com/unified" 710 | } 711 | ], 712 | "dependencies": { 713 | "micromark-util-character": "^1.0.0", 714 | "micromark-util-types": "^1.0.0" 715 | } 716 | }, 717 | "node_modules/micromark-factory-title": { 718 | "version": "1.1.0", 719 | "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", 720 | "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", 721 | "funding": [ 722 | { 723 | "type": "GitHub Sponsors", 724 | "url": "https://github.com/sponsors/unifiedjs" 725 | }, 726 | { 727 | "type": "OpenCollective", 728 | "url": "https://opencollective.com/unified" 729 | } 730 | ], 731 | "dependencies": { 732 | "micromark-factory-space": "^1.0.0", 733 | "micromark-util-character": "^1.0.0", 734 | "micromark-util-symbol": "^1.0.0", 735 | "micromark-util-types": "^1.0.0" 736 | } 737 | }, 738 | "node_modules/micromark-factory-whitespace": { 739 | "version": "1.1.0", 740 | "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", 741 | "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", 742 | "funding": [ 743 | { 744 | "type": "GitHub Sponsors", 745 | "url": "https://github.com/sponsors/unifiedjs" 746 | }, 747 | { 748 | "type": "OpenCollective", 749 | "url": "https://opencollective.com/unified" 750 | } 751 | ], 752 | "dependencies": { 753 | "micromark-factory-space": "^1.0.0", 754 | "micromark-util-character": "^1.0.0", 755 | "micromark-util-symbol": "^1.0.0", 756 | "micromark-util-types": "^1.0.0" 757 | } 758 | }, 759 | "node_modules/micromark-util-character": { 760 | "version": "1.2.0", 761 | "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz", 762 | "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==", 763 | "funding": [ 764 | { 765 | "type": "GitHub Sponsors", 766 | "url": "https://github.com/sponsors/unifiedjs" 767 | }, 768 | { 769 | "type": "OpenCollective", 770 | "url": "https://opencollective.com/unified" 771 | } 772 | ], 773 | "dependencies": { 774 | "micromark-util-symbol": "^1.0.0", 775 | "micromark-util-types": "^1.0.0" 776 | } 777 | }, 778 | "node_modules/micromark-util-chunked": { 779 | "version": "1.1.0", 780 | "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", 781 | "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", 782 | "funding": [ 783 | { 784 | "type": "GitHub Sponsors", 785 | "url": "https://github.com/sponsors/unifiedjs" 786 | }, 787 | { 788 | "type": "OpenCollective", 789 | "url": "https://opencollective.com/unified" 790 | } 791 | ], 792 | "dependencies": { 793 | "micromark-util-symbol": "^1.0.0" 794 | } 795 | }, 796 | "node_modules/micromark-util-classify-character": { 797 | "version": "1.1.0", 798 | "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", 799 | "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", 800 | "funding": [ 801 | { 802 | "type": "GitHub Sponsors", 803 | "url": "https://github.com/sponsors/unifiedjs" 804 | }, 805 | { 806 | "type": "OpenCollective", 807 | "url": "https://opencollective.com/unified" 808 | } 809 | ], 810 | "dependencies": { 811 | "micromark-util-character": "^1.0.0", 812 | "micromark-util-symbol": "^1.0.0", 813 | "micromark-util-types": "^1.0.0" 814 | } 815 | }, 816 | "node_modules/micromark-util-combine-extensions": { 817 | "version": "1.1.0", 818 | "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", 819 | "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", 820 | "funding": [ 821 | { 822 | "type": "GitHub Sponsors", 823 | "url": "https://github.com/sponsors/unifiedjs" 824 | }, 825 | { 826 | "type": "OpenCollective", 827 | "url": "https://opencollective.com/unified" 828 | } 829 | ], 830 | "dependencies": { 831 | "micromark-util-chunked": "^1.0.0", 832 | "micromark-util-types": "^1.0.0" 833 | } 834 | }, 835 | "node_modules/micromark-util-decode-numeric-character-reference": { 836 | "version": "1.1.0", 837 | "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", 838 | "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", 839 | "funding": [ 840 | { 841 | "type": "GitHub Sponsors", 842 | "url": "https://github.com/sponsors/unifiedjs" 843 | }, 844 | { 845 | "type": "OpenCollective", 846 | "url": "https://opencollective.com/unified" 847 | } 848 | ], 849 | "dependencies": { 850 | "micromark-util-symbol": "^1.0.0" 851 | } 852 | }, 853 | "node_modules/micromark-util-decode-string": { 854 | "version": "1.1.0", 855 | "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", 856 | "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", 857 | "funding": [ 858 | { 859 | "type": "GitHub Sponsors", 860 | "url": "https://github.com/sponsors/unifiedjs" 861 | }, 862 | { 863 | "type": "OpenCollective", 864 | "url": "https://opencollective.com/unified" 865 | } 866 | ], 867 | "dependencies": { 868 | "decode-named-character-reference": "^1.0.0", 869 | "micromark-util-character": "^1.0.0", 870 | "micromark-util-decode-numeric-character-reference": "^1.0.0", 871 | "micromark-util-symbol": "^1.0.0" 872 | } 873 | }, 874 | "node_modules/micromark-util-encode": { 875 | "version": "1.1.0", 876 | "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", 877 | "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", 878 | "funding": [ 879 | { 880 | "type": "GitHub Sponsors", 881 | "url": "https://github.com/sponsors/unifiedjs" 882 | }, 883 | { 884 | "type": "OpenCollective", 885 | "url": "https://opencollective.com/unified" 886 | } 887 | ] 888 | }, 889 | "node_modules/micromark-util-events-to-acorn": { 890 | "version": "1.2.3", 891 | "resolved": "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-1.2.3.tgz", 892 | "integrity": "sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==", 893 | "funding": [ 894 | { 895 | "type": "GitHub Sponsors", 896 | "url": "https://github.com/sponsors/unifiedjs" 897 | }, 898 | { 899 | "type": "OpenCollective", 900 | "url": "https://opencollective.com/unified" 901 | } 902 | ], 903 | "dependencies": { 904 | "@types/acorn": "^4.0.0", 905 | "@types/estree": "^1.0.0", 906 | "@types/unist": "^2.0.0", 907 | "estree-util-visit": "^1.0.0", 908 | "micromark-util-symbol": "^1.0.0", 909 | "micromark-util-types": "^1.0.0", 910 | "uvu": "^0.5.0", 911 | "vfile-message": "^3.0.0" 912 | } 913 | }, 914 | "node_modules/micromark-util-html-tag-name": { 915 | "version": "1.2.0", 916 | "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", 917 | "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", 918 | "funding": [ 919 | { 920 | "type": "GitHub Sponsors", 921 | "url": "https://github.com/sponsors/unifiedjs" 922 | }, 923 | { 924 | "type": "OpenCollective", 925 | "url": "https://opencollective.com/unified" 926 | } 927 | ] 928 | }, 929 | "node_modules/micromark-util-normalize-identifier": { 930 | "version": "1.1.0", 931 | "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", 932 | "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", 933 | "funding": [ 934 | { 935 | "type": "GitHub Sponsors", 936 | "url": "https://github.com/sponsors/unifiedjs" 937 | }, 938 | { 939 | "type": "OpenCollective", 940 | "url": "https://opencollective.com/unified" 941 | } 942 | ], 943 | "dependencies": { 944 | "micromark-util-symbol": "^1.0.0" 945 | } 946 | }, 947 | "node_modules/micromark-util-resolve-all": { 948 | "version": "1.1.0", 949 | "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", 950 | "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", 951 | "funding": [ 952 | { 953 | "type": "GitHub Sponsors", 954 | "url": "https://github.com/sponsors/unifiedjs" 955 | }, 956 | { 957 | "type": "OpenCollective", 958 | "url": "https://opencollective.com/unified" 959 | } 960 | ], 961 | "dependencies": { 962 | "micromark-util-types": "^1.0.0" 963 | } 964 | }, 965 | "node_modules/micromark-util-sanitize-uri": { 966 | "version": "1.2.0", 967 | "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", 968 | "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", 969 | "funding": [ 970 | { 971 | "type": "GitHub Sponsors", 972 | "url": "https://github.com/sponsors/unifiedjs" 973 | }, 974 | { 975 | "type": "OpenCollective", 976 | "url": "https://opencollective.com/unified" 977 | } 978 | ], 979 | "dependencies": { 980 | "micromark-util-character": "^1.0.0", 981 | "micromark-util-encode": "^1.0.0", 982 | "micromark-util-symbol": "^1.0.0" 983 | } 984 | }, 985 | "node_modules/micromark-util-subtokenize": { 986 | "version": "1.1.0", 987 | "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", 988 | "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", 989 | "funding": [ 990 | { 991 | "type": "GitHub Sponsors", 992 | "url": "https://github.com/sponsors/unifiedjs" 993 | }, 994 | { 995 | "type": "OpenCollective", 996 | "url": "https://opencollective.com/unified" 997 | } 998 | ], 999 | "dependencies": { 1000 | "micromark-util-chunked": "^1.0.0", 1001 | "micromark-util-symbol": "^1.0.0", 1002 | "micromark-util-types": "^1.0.0", 1003 | "uvu": "^0.5.0" 1004 | } 1005 | }, 1006 | "node_modules/micromark-util-symbol": { 1007 | "version": "1.1.0", 1008 | "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz", 1009 | "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==", 1010 | "funding": [ 1011 | { 1012 | "type": "GitHub Sponsors", 1013 | "url": "https://github.com/sponsors/unifiedjs" 1014 | }, 1015 | { 1016 | "type": "OpenCollective", 1017 | "url": "https://opencollective.com/unified" 1018 | } 1019 | ] 1020 | }, 1021 | "node_modules/micromark-util-types": { 1022 | "version": "1.1.0", 1023 | "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", 1024 | "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", 1025 | "funding": [ 1026 | { 1027 | "type": "GitHub Sponsors", 1028 | "url": "https://github.com/sponsors/unifiedjs" 1029 | }, 1030 | { 1031 | "type": "OpenCollective", 1032 | "url": "https://opencollective.com/unified" 1033 | } 1034 | ] 1035 | }, 1036 | "node_modules/mri": { 1037 | "version": "1.2.0", 1038 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", 1039 | "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", 1040 | "engines": { 1041 | "node": ">=4" 1042 | } 1043 | }, 1044 | "node_modules/ms": { 1045 | "version": "2.1.2", 1046 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1047 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1048 | }, 1049 | "node_modules/parse-entities": { 1050 | "version": "4.0.1", 1051 | "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.1.tgz", 1052 | "integrity": "sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==", 1053 | "dependencies": { 1054 | "@types/unist": "^2.0.0", 1055 | "character-entities": "^2.0.0", 1056 | "character-entities-legacy": "^3.0.0", 1057 | "character-reference-invalid": "^2.0.0", 1058 | "decode-named-character-reference": "^1.0.0", 1059 | "is-alphanumerical": "^2.0.0", 1060 | "is-decimal": "^2.0.0", 1061 | "is-hexadecimal": "^2.0.0" 1062 | }, 1063 | "funding": { 1064 | "type": "github", 1065 | "url": "https://github.com/sponsors/wooorm" 1066 | } 1067 | }, 1068 | "node_modules/remark-mdx": { 1069 | "version": "2.3.0", 1070 | "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-2.3.0.tgz", 1071 | "integrity": "sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==", 1072 | "dependencies": { 1073 | "mdast-util-mdx": "^2.0.0", 1074 | "micromark-extension-mdxjs": "^1.0.0" 1075 | }, 1076 | "funding": { 1077 | "type": "opencollective", 1078 | "url": "https://opencollective.com/unified" 1079 | } 1080 | }, 1081 | "node_modules/remark-parse": { 1082 | "version": "10.0.2", 1083 | "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.2.tgz", 1084 | "integrity": "sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==", 1085 | "dependencies": { 1086 | "@types/mdast": "^3.0.0", 1087 | "mdast-util-from-markdown": "^1.0.0", 1088 | "unified": "^10.0.0" 1089 | }, 1090 | "funding": { 1091 | "type": "opencollective", 1092 | "url": "https://opencollective.com/unified" 1093 | } 1094 | }, 1095 | "node_modules/sade": { 1096 | "version": "1.8.1", 1097 | "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", 1098 | "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", 1099 | "dependencies": { 1100 | "mri": "^1.1.0" 1101 | }, 1102 | "engines": { 1103 | "node": ">=6" 1104 | } 1105 | }, 1106 | "node_modules/stringify-entities": { 1107 | "version": "4.0.3", 1108 | "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", 1109 | "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", 1110 | "dependencies": { 1111 | "character-entities-html4": "^2.0.0", 1112 | "character-entities-legacy": "^3.0.0" 1113 | }, 1114 | "funding": { 1115 | "type": "github", 1116 | "url": "https://github.com/sponsors/wooorm" 1117 | } 1118 | }, 1119 | "node_modules/trough": { 1120 | "version": "2.1.0", 1121 | "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", 1122 | "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", 1123 | "funding": { 1124 | "type": "github", 1125 | "url": "https://github.com/sponsors/wooorm" 1126 | } 1127 | }, 1128 | "node_modules/unified": { 1129 | "version": "10.1.2", 1130 | "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", 1131 | "integrity": "sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==", 1132 | "dependencies": { 1133 | "@types/unist": "^2.0.0", 1134 | "bail": "^2.0.0", 1135 | "extend": "^3.0.0", 1136 | "is-buffer": "^2.0.0", 1137 | "is-plain-obj": "^4.0.0", 1138 | "trough": "^2.0.0", 1139 | "vfile": "^5.0.0" 1140 | }, 1141 | "funding": { 1142 | "type": "opencollective", 1143 | "url": "https://opencollective.com/unified" 1144 | } 1145 | }, 1146 | "node_modules/unist-util-is": { 1147 | "version": "5.2.1", 1148 | "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", 1149 | "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", 1150 | "dependencies": { 1151 | "@types/unist": "^2.0.0" 1152 | }, 1153 | "funding": { 1154 | "type": "opencollective", 1155 | "url": "https://opencollective.com/unified" 1156 | } 1157 | }, 1158 | "node_modules/unist-util-position-from-estree": { 1159 | "version": "1.1.2", 1160 | "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-1.1.2.tgz", 1161 | "integrity": "sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==", 1162 | "dependencies": { 1163 | "@types/unist": "^2.0.0" 1164 | }, 1165 | "funding": { 1166 | "type": "opencollective", 1167 | "url": "https://opencollective.com/unified" 1168 | } 1169 | }, 1170 | "node_modules/unist-util-remove-position": { 1171 | "version": "4.0.2", 1172 | "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-4.0.2.tgz", 1173 | "integrity": "sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==", 1174 | "dependencies": { 1175 | "@types/unist": "^2.0.0", 1176 | "unist-util-visit": "^4.0.0" 1177 | }, 1178 | "funding": { 1179 | "type": "opencollective", 1180 | "url": "https://opencollective.com/unified" 1181 | } 1182 | }, 1183 | "node_modules/unist-util-remove-position/node_modules/unist-util-visit": { 1184 | "version": "4.1.2", 1185 | "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", 1186 | "integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==", 1187 | "dependencies": { 1188 | "@types/unist": "^2.0.0", 1189 | "unist-util-is": "^5.0.0", 1190 | "unist-util-visit-parents": "^5.1.1" 1191 | }, 1192 | "funding": { 1193 | "type": "opencollective", 1194 | "url": "https://opencollective.com/unified" 1195 | } 1196 | }, 1197 | "node_modules/unist-util-remove-position/node_modules/unist-util-visit-parents": { 1198 | "version": "5.1.3", 1199 | "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", 1200 | "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", 1201 | "dependencies": { 1202 | "@types/unist": "^2.0.0", 1203 | "unist-util-is": "^5.0.0" 1204 | }, 1205 | "funding": { 1206 | "type": "opencollective", 1207 | "url": "https://opencollective.com/unified" 1208 | } 1209 | }, 1210 | "node_modules/unist-util-stringify-position": { 1211 | "version": "3.0.3", 1212 | "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", 1213 | "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", 1214 | "dependencies": { 1215 | "@types/unist": "^2.0.0" 1216 | }, 1217 | "funding": { 1218 | "type": "opencollective", 1219 | "url": "https://opencollective.com/unified" 1220 | } 1221 | }, 1222 | "node_modules/unist-util-visit": { 1223 | "version": "5.0.0", 1224 | "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", 1225 | "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", 1226 | "dependencies": { 1227 | "@types/unist": "^3.0.0", 1228 | "unist-util-is": "^6.0.0", 1229 | "unist-util-visit-parents": "^6.0.0" 1230 | }, 1231 | "funding": { 1232 | "type": "opencollective", 1233 | "url": "https://opencollective.com/unified" 1234 | } 1235 | }, 1236 | "node_modules/unist-util-visit-parents": { 1237 | "version": "6.0.1", 1238 | "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", 1239 | "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", 1240 | "dependencies": { 1241 | "@types/unist": "^3.0.0", 1242 | "unist-util-is": "^6.0.0" 1243 | }, 1244 | "funding": { 1245 | "type": "opencollective", 1246 | "url": "https://opencollective.com/unified" 1247 | } 1248 | }, 1249 | "node_modules/unist-util-visit-parents/node_modules/@types/unist": { 1250 | "version": "3.0.0", 1251 | "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", 1252 | "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==" 1253 | }, 1254 | "node_modules/unist-util-visit-parents/node_modules/unist-util-is": { 1255 | "version": "6.0.0", 1256 | "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", 1257 | "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", 1258 | "dependencies": { 1259 | "@types/unist": "^3.0.0" 1260 | }, 1261 | "funding": { 1262 | "type": "opencollective", 1263 | "url": "https://opencollective.com/unified" 1264 | } 1265 | }, 1266 | "node_modules/unist-util-visit/node_modules/@types/unist": { 1267 | "version": "3.0.0", 1268 | "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", 1269 | "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==" 1270 | }, 1271 | "node_modules/unist-util-visit/node_modules/unist-util-is": { 1272 | "version": "6.0.0", 1273 | "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", 1274 | "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", 1275 | "dependencies": { 1276 | "@types/unist": "^3.0.0" 1277 | }, 1278 | "funding": { 1279 | "type": "opencollective", 1280 | "url": "https://opencollective.com/unified" 1281 | } 1282 | }, 1283 | "node_modules/uvu": { 1284 | "version": "0.5.6", 1285 | "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.6.tgz", 1286 | "integrity": "sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==", 1287 | "dependencies": { 1288 | "dequal": "^2.0.0", 1289 | "diff": "^5.0.0", 1290 | "kleur": "^4.0.3", 1291 | "sade": "^1.7.3" 1292 | }, 1293 | "bin": { 1294 | "uvu": "bin.js" 1295 | }, 1296 | "engines": { 1297 | "node": ">=8" 1298 | } 1299 | }, 1300 | "node_modules/vfile": { 1301 | "version": "5.3.7", 1302 | "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", 1303 | "integrity": "sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==", 1304 | "dependencies": { 1305 | "@types/unist": "^2.0.0", 1306 | "is-buffer": "^2.0.0", 1307 | "unist-util-stringify-position": "^3.0.0", 1308 | "vfile-message": "^3.0.0" 1309 | }, 1310 | "funding": { 1311 | "type": "opencollective", 1312 | "url": "https://opencollective.com/unified" 1313 | } 1314 | }, 1315 | "node_modules/vfile-message": { 1316 | "version": "3.1.4", 1317 | "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-3.1.4.tgz", 1318 | "integrity": "sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==", 1319 | "dependencies": { 1320 | "@types/unist": "^2.0.0", 1321 | "unist-util-stringify-position": "^3.0.0" 1322 | }, 1323 | "funding": { 1324 | "type": "opencollective", 1325 | "url": "https://opencollective.com/unified" 1326 | } 1327 | }, 1328 | "node_modules/zwitch": { 1329 | "version": "2.0.4", 1330 | "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", 1331 | "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", 1332 | "funding": { 1333 | "type": "github", 1334 | "url": "https://github.com/sponsors/wooorm" 1335 | } 1336 | } 1337 | } 1338 | } 1339 | -------------------------------------------------------------------------------- /docs-hub/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module", 3 | "dependencies": { 4 | "remark-mdx": "^2.3.0", 5 | "remark-parse": "^10.0.2", 6 | "unified": "^10.1.2", 7 | "unist-util-visit": "^5.0.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /docs-hub/vp-docs.js: -------------------------------------------------------------------------------- 1 | import assert from "assert"; 2 | import fs from "fs"; 3 | import { EOL } from "os"; 4 | import path from "path"; 5 | 6 | const subFolderExceptions = ["guide", 'typegend']; 7 | const ignoreFileExtensions = ['ts', 'json', 'jsonc']; 8 | 9 | const srcFolderPath = path.join(process.cwd(), `../../${process.argv[2]}`); 10 | const subfolders = getSubfolders(srcFolderPath); 11 | 12 | const configPath = path.join(srcFolderPath, "../.vitepress/config.ts"); 13 | 14 | const configFile = fs.readFileSync(configPath, "utf8"); 15 | 16 | function main() { 17 | checkForIndexFile(srcFolderPath); 18 | checkForNestedFolders(srcFolderPath, subfolders); 19 | const order = processVPConfig(configFile.split(EOL)); 20 | checkOrder(order); 21 | checkForUnusedFiles(srcFolderPath, subfolders); 22 | } 23 | 24 | main(); 25 | 26 | function checkForIndexFile(srcFolderPath) { 27 | const indexPath = path.join(srcFolderPath, "index.md"); 28 | assert(fs.existsSync(indexPath), "missing index.md at root"); 29 | } 30 | 31 | function getSubfolders(folderPath) { 32 | return fs 33 | .readdirSync(folderPath) 34 | .filter( 35 | (item) => 36 | fs.statSync(path.join(folderPath, item)).isDirectory() && 37 | item !== "public" 38 | ); 39 | } 40 | 41 | function getNestedFiles(rootDirPath, subFolderNames = ['']) { 42 | const results = []; 43 | 44 | function traverseDirectory(rootDir, depth = 0) { 45 | try { 46 | const items = fs.readdirSync(rootDir); 47 | 48 | for (const item of items) { 49 | const fullPath = path.join(rootDir, item); 50 | const relativePath = path.relative(srcFolderPath, fullPath); 51 | const stats = fs.statSync(fullPath); 52 | 53 | const fileInfo = { 54 | name: item, 55 | relativePath, 56 | path: fullPath, 57 | depth, 58 | isDirectory: stats.isDirectory(), 59 | extension: path.extname(item).slice(1), 60 | }; 61 | 62 | results.push(fileInfo); 63 | 64 | // Recursively process directories 65 | if (stats.isDirectory()) { 66 | traverseDirectory(fullPath, depth + 1); 67 | } 68 | } 69 | } catch (error) { 70 | console.error(`Error traversing directory ${rootDirPath}`, error.message); 71 | } 72 | } 73 | 74 | for (const subFolderName of subFolderNames) { 75 | traverseDirectory(path.join(rootDirPath, subFolderName)); 76 | } 77 | return results; 78 | } 79 | 80 | function checkForNestedFolders(srcFolderPath, subfolders) { 81 | const nestedItems = getNestedFiles(srcFolderPath, subfolders); 82 | 83 | // Check expected exceptions 84 | const nestedFolderExceptions = subFolderExceptions.map((name) => path.join(srcFolderPath, name)); 85 | const nestedMarkdownFiles = nestedItems.filter( 86 | (item) => !ignoreFileExtensions.includes(item.extension) && !item.isDirectory 87 | ); 88 | 89 | for (const item of nestedMarkdownFiles) { 90 | const isNestedException = nestedFolderExceptions.some((exception) => 91 | item.path.startsWith(exception) 92 | ); 93 | 94 | if (isNestedException) { 95 | assert(item.depth <= 1, `The item "${item.relativePath}" can not be nested.`); 96 | } else { 97 | assert(item.depth > 0, `The item "${item.relativePath}" can not be nested.`); 98 | } 99 | } 100 | } 101 | 102 | function checkForUnusedFiles(srcFolderPath, subfolders) { 103 | const nestedFiles = getNestedFiles(srcFolderPath, subfolders); 104 | const allMarkdownFiles = nestedFiles 105 | .filter((item) => !item.relativePath.startsWith('api')) 106 | .filter((item) => !ignoreFileExtensions.includes(item.extension)) 107 | .filter((item) => !item.isDirectory) 108 | .map((item) => `/${item.relativePath}`.replace('index.md', '').replaceAll('.md', '')); 109 | 110 | const unusedFiles = allMarkdownFiles.filter((file) => !configFile.includes(file)); 111 | assert( 112 | unusedFiles.length === 0, 113 | `The following files are not used in the nav config: ${unusedFiles.map((file) => `"${file}"`).join(', ')}` 114 | ); 115 | } 116 | 117 | function checkOrder(order, altSrcFolderPath = null) { 118 | const srcPath = altSrcFolderPath || srcFolderPath; 119 | Object.keys(order).forEach((key) => { 120 | const menuOrder = order[key]; 121 | if (key === "menu") { 122 | // check if each line in the menu corresponds to 123 | // an existing top-level file or the name of the folder 124 | menuOrder.forEach((item) => { 125 | const itemPath = 126 | item === "Introduction" 127 | ? path.join(srcPath, "index.md") 128 | : path.join(srcPath, item.toLowerCase().replaceAll(" ", "-")); 129 | 130 | if ( 131 | !fs.existsSync(itemPath) && 132 | !fs.existsSync(itemPath.concat(".md")) 133 | ) { 134 | let newItemPath; 135 | for (let i = 0; i < subFolderExceptions.length; i++) { 136 | let newPath = path.join( 137 | srcPath, 138 | subFolderExceptions[i], 139 | item.toLowerCase().replaceAll(" ", "-") 140 | ); 141 | if (fs.existsSync(newPath)) { 142 | newItemPath = newPath; 143 | break; 144 | } else { 145 | newPath = path.join(srcPath, subFolderExceptions[i], item.replaceAll(" ", "-")); 146 | if (fs.existsSync(newPath)) { 147 | newItemPath = newPath; 148 | break; 149 | } 150 | } 151 | } 152 | assert( 153 | fs.existsSync(newItemPath), 154 | `${item 155 | .toLowerCase() 156 | .replaceAll(" ", "-")} doesn't exist at ${itemPath}` 157 | ); 158 | } 159 | }); 160 | } else { 161 | const thisKey = key.replaceAll(" ", "-").toLowerCase(); 162 | // check if item exists in the right folder 163 | menuOrder.forEach((item) => { 164 | let fileExists = false; 165 | const newItem = item.replaceAll(" ", "-").toLowerCase(); 166 | let itemPath = path.join(srcPath, thisKey, `/${newItem}.md`); 167 | if (fs.existsSync(itemPath)) { 168 | fileExists = true; 169 | } else { 170 | for (let i = 0; i < subFolderExceptions.length; i++) { 171 | itemPath = path.join( 172 | srcPath, 173 | subFolderExceptions[i], 174 | thisKey, 175 | `/${newItem}.md` 176 | ); 177 | if (fs.existsSync(itemPath)) { 178 | fileExists = true; 179 | break; 180 | } else { 181 | itemPath = path.join( 182 | srcPath, 183 | subFolderExceptions[i], 184 | key.replaceAll(" ", "-"), 185 | `/${item.replaceAll(" ", "-")}.md` 186 | ); 187 | if (fs.existsSync(itemPath)) { 188 | fileExists = true; 189 | break; 190 | } 191 | } 192 | } 193 | } 194 | assert( 195 | fileExists, 196 | `${item} doesn't exist. The file name must match the title in the nav config. If this file is in the API folder, something went wrong.` 197 | ); 198 | }); 199 | } 200 | }); 201 | } 202 | 203 | function extractData(inputString) { 204 | // used for api.json order 205 | const regex = /"([^"]+)":\s*"([^"]+)"/g; 206 | const match = regex.exec(inputString); 207 | if (match !== null) { 208 | return match[2]; 209 | } 210 | return null; 211 | } 212 | 213 | function handleVPLine(trimmedLine, lines, index, thisOrder, thisCat) { 214 | const regex = /'([^']+)'/; 215 | // Create a shallow copy 216 | let newVPOrder = JSON.parse(JSON.stringify(thisOrder)); 217 | let category = thisCat; 218 | if ( 219 | trimmedLine.includes("collapsed:") || 220 | trimmedLine.includes('"collapsed":') 221 | ) { 222 | // handle categories 223 | if (trimmedLine.includes("collapsed:")) { 224 | const matches = regex.exec(lines[index - 2]); 225 | category = matches[1]; 226 | } else { 227 | category = extractData(lines[index - 2]); 228 | } 229 | newVPOrder.menu.push(category); 230 | newVPOrder[category] = []; 231 | } else if ( 232 | // handle items 233 | trimmedLine.includes("text") && 234 | !lines[index + 2].includes("collapsed:") && 235 | !lines[index + 2].includes('"collapsed":') 236 | ) { 237 | const matches = regex.exec(trimmedLine); 238 | const linkMatches = regex.exec(lines[index + 1].trimStart()); 239 | let link; 240 | let linkName; 241 | if (linkMatches && matches) { 242 | link = linkMatches[1]; 243 | linkName = matches[1]; 244 | } else { 245 | linkName = extractData(trimmedLine); 246 | link = extractData(lines[index + 1].trimStart()); 247 | } 248 | if (link && linkName) { 249 | if (link.startsWith("/")) { 250 | link = link.replace("/", ""); 251 | } 252 | const split = link.split("/"); 253 | if (category && split.length !== 2 && split[1] !== "") { 254 | newVPOrder[category].push(linkName); 255 | } else { 256 | newVPOrder.menu.push(linkName); 257 | } 258 | } 259 | } 260 | 261 | return { newVPOrder, category }; 262 | } 263 | 264 | function processVPConfig(lines) { 265 | let tsOrder = { menu: [] }; 266 | let currentCategory; 267 | let foundStart = false; 268 | lines.forEach((line, index) => { 269 | const trimmedLine = line.trimStart(); 270 | if (foundStart) { 271 | const { newVPOrder, category } = handleVPLine( 272 | trimmedLine, 273 | lines, 274 | index, 275 | tsOrder, 276 | currentCategory 277 | ); 278 | tsOrder = newVPOrder; 279 | currentCategory = category; 280 | } else if (trimmedLine === "sidebar: [") { 281 | foundStart = true; 282 | } 283 | }); 284 | 285 | return tsOrder; 286 | } 287 | -------------------------------------------------------------------------------- /gh-projects/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /gh-projects/README.md: -------------------------------------------------------------------------------- 1 | ## Projects Action 2 | 3 | GitHub Actions to help automating interactions between GH Projects and repositories. 4 | 5 | ## Actions 6 | 7 | - [assign-to-project](./assign-to-project) 8 | 9 | ## License 10 | 11 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../LICENSE.md). 12 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | .eslintrc.js -------------------------------------------------------------------------------- /gh-projects/assign-to-project/.eslintrc.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | parser: '@typescript-eslint/parser', 5 | parserOptions: { 6 | project: path.join(__dirname, './tsconfig.eslint.json'), 7 | }, 8 | env: { 9 | node: true, 10 | }, 11 | plugins: ['@typescript-eslint'], 12 | extends: [ 13 | 'eslint:recommended', 14 | 'plugin:@typescript-eslint/eslint-recommended', 15 | 'plugin:@typescript-eslint/recommended-requiring-type-checking', 16 | 'plugin:@typescript-eslint/recommended', 17 | 'plugin:prettier/recommended', 18 | 'prettier', 19 | ], 20 | rules: { 21 | '@typescript-eslint/ban-ts-ignore': 'off', 22 | '@typescript-eslint/no-non-null-assertion': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | '@typescript-eslint/no-unsafe-return': 'off', 25 | '@typescript-eslint/no-var-requires': 'off', 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | package.json 3 | package-lock.json -------------------------------------------------------------------------------- /gh-projects/assign-to-project/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "overrides": [ 3 | { 4 | "files": ["*.js", "*.ts", ".tsx"], 5 | "options": { 6 | "printWidth": 100, 7 | "semi": true, 8 | "tabWidth": 2, 9 | "useTabs": false, 10 | "singleQuote": true, 11 | "bracketSpacing": true 12 | } 13 | }, 14 | { 15 | "files": ["*.js", "*.ts", "*.json"], 16 | "options": { 17 | "useTabs": false 18 | } 19 | }, 20 | { 21 | "files": "*.md", 22 | "options": { 23 | "useTabs": false 24 | } 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/README.md: -------------------------------------------------------------------------------- 1 | ### Assign to Project 2 | 3 | A github action to assign a project to one, issue, pull request or other events. 4 | 5 | ### Setup a GitHub App 6 | 7 | This actions requires previous steps, for creating a `app_id` and `private_key`. 8 | 9 | Follow the steps 1., 2., 3., 4., 5. from the following GitHub tutorial; 10 | https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions 11 | 12 | ### How to use? 13 | 14 | ```yml 15 | name: "Assign project to issue" 16 | 17 | on: 18 | issues: 19 | types: [opened] 20 | 21 | jobs: 22 | assign-project: 23 | name: Assign project 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: FuelLabs/github-actions/gh-projects/assign-to-project@master 27 | with: 28 | token: ${{ secrets.PROJECTS_TOKEN }} 29 | organization: FuelLabs 30 | project_number: 17 31 | object_id: ${{ github.event.issue.node_id }} 32 | fields: "Project, Status" 33 | values: "🟦 TypeScript, 🔍 Triage" 34 | ``` 35 | 36 | ### Inputs 37 | 38 | | Name | Description | 39 | | -------------- | ---------------------------------------------------------- | 40 | | app_id | GitHub App App Id | 41 | | private_key | GitHub APP Private Key | 42 | | default | Github Organization | 43 | | project_number | Github Project number `.../projects/1` | 44 | | object_id | Object id, correspond to the issue or pull request node id | 45 | | fields | List of fields to set when assign | 46 | | values | List of values matching the field order | 47 | 48 | ### Outputs 49 | 50 | No outputs defined 51 | 52 | ## License 53 | 54 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 55 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/action.yml: -------------------------------------------------------------------------------- 1 | name: Assign to project 2 | description: Assign issues or pull requests to a project with custom fields. 3 | author: "FuelLabs" 4 | 5 | runs: 6 | using: "node16" 7 | main: "dist/main.js" 8 | 9 | inputs: 10 | token: 11 | description: "GitHub PAT token" 12 | required: true 13 | organization: 14 | default: "FuelLabs" 15 | description: "Github Organization" 16 | required: true 17 | project_number: 18 | description: "Github Project number `.../projects/1`" 19 | object_id: 20 | description: "Object id, correspond to the issue or pull request node id" 21 | fields: 22 | description: "List of fields to set when assign" 23 | default: "" 24 | values: 25 | description: "List of values matching the field order" 26 | default: "" 27 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/jest.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "clearMocks": true, 3 | "moduleFileExtensions": ["js", "ts"], 4 | "testEnvironment": "node", 5 | "setupFilesAfterEnv": ["./src/tests/setup.ts"], 6 | "testMatch": ["**/*.test.ts"], 7 | "testRunner": "jest-circus/runner", 8 | "transform": { 9 | "^.+\\.ts$": "ts-jest" 10 | }, 11 | "moduleNameMapper": { 12 | "~/(.*)": "/src/$1" 13 | }, 14 | "verbose": true 15 | } 16 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "assign-project-action", 3 | "private": true, 4 | "version": "1.0.0", 5 | "main": "dist/main.js", 6 | "scripts": { 7 | "build": "tsup", 8 | "assign:project": "node ./dist/main.js", 9 | "test": "jest -c jest.config.json --passWithNoTests", 10 | "lint:check": "eslint . --ext .ts,.tsx,.js,.jsx", 11 | "lint:fix": "pnpm lint:check --fix", 12 | "lint": "run-s lint:check prettier:check", 13 | "prettier:check": "prettier --check .", 14 | "prettier:format": "prettier --write ." 15 | }, 16 | "author": "Fuel Labs (https://fuel.network/)", 17 | "license": "Apache-2.0", 18 | "dependencies": { 19 | "@actions/core": "^1.9.1", 20 | "@octokit/graphql": "^5.0.1", 21 | "@octokit/graphql-schema": "^12.1.0" 22 | }, 23 | "devDependencies": { 24 | "@types/jest": "^29.0.3", 25 | "@types/node": "^18.7.15", 26 | "@typescript-eslint/parser": "^5.37.0", 27 | "eslint": "^8.23.1", 28 | "eslint-plugin-github": "^4.3.7", 29 | "eslint-plugin-jest": "^27.0.4", 30 | "npm-run-all": "^4.1.5", 31 | "prettier": "^2.7.1", 32 | "ts-jest": "^29.0.1", 33 | "tsup": "^6.2.3" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/actions/assignProject.test.ts: -------------------------------------------------------------------------------- 1 | import * as octokitGraphql from '@octokit/graphql'; 2 | import { RequestParameters } from '@octokit/graphql/dist-types/types'; 3 | import { removeSpaces } from '~/tests/removeSpaces'; 4 | import { assignProjectAction } from './assignProject'; 5 | 6 | const addProjectQuerySpec: [string, RequestParameters] = [ 7 | ` 8 | mutation ($projectId: ID!, $contentId: ID!) { 9 | addProjectV2ItemById( 10 | input: { projectId: $projectId, contentId: $contentId } 11 | ) { 12 | item { 13 | id 14 | } 15 | } 16 | } 17 | `, 18 | { 19 | projectId: 'PVT_0000', 20 | contentId: 'objectId', 21 | headers: { authorization: 'token my_token_secret' }, 22 | }, 23 | ]; 24 | 25 | const updateProjectQuerySpec: [string, RequestParameters] = [ 26 | ` 27 | mutation ( 28 | $projectId: ID! 29 | $itemId: ID! 30 | ) { 31 | arg_0: updateProjectV2ItemFieldValue(input: { 32 | projectId: $projectId 33 | itemId: $itemId 34 | fieldId: "PVTSSF_OOOO" 35 | value: { singleSelectOptionId: "47fc9ee4" } 36 | }) { 37 | projectV2Item { 38 | id 39 | } 40 | } 41 | arg_1: updateProjectV2ItemFieldValue(input: { 42 | projectId: $projectId 43 | itemId: $itemId 44 | fieldId: "PVTSSF_OOOO" 45 | value: { number: 1 } 46 | }) { 47 | projectV2Item { 48 | id 49 | } 50 | } 51 | arg_2: updateProjectV2ItemFieldValue(input: { 52 | projectId: $projectId 53 | itemId: $itemId 54 | fieldId: "PVTSSF_OOOO" 55 | value: { text: "Test Text" } 56 | }) { 57 | projectV2Item { 58 | id 59 | } 60 | } 61 | arg_3: updateProjectV2ItemFieldValue(input: { 62 | projectId: $projectId 63 | itemId: $itemId 64 | fieldId: "PVTSSF_OOOO" 65 | value: { date: "2022-09-16T20:07:31.954Z" } 66 | }) { 67 | projectV2Item { 68 | id 69 | } 70 | } 71 | } 72 | `, 73 | { 74 | projectId: 'PVT_0000', 75 | itemId: 'TEST_RETURN_ID', 76 | headers: { authorization: 'token my_token_secret' }, 77 | }, 78 | ]; 79 | 80 | describe('Assign project test', () => { 81 | it('test it', async () => { 82 | jest 83 | .spyOn(octokitGraphql, 'graphql') 84 | .mockImplementation((query: string, options?: RequestParameters) => { 85 | if (query.includes('addProjectV2ItemById')) { 86 | // Expect graphql params to be equal spec 87 | const querySpec = addProjectQuerySpec[0]; 88 | expect([removeSpaces(query), options]).toEqual([ 89 | removeSpaces(querySpec), 90 | addProjectQuerySpec[1], 91 | ]); 92 | 93 | // Return mock result 94 | return { 95 | addProjectV2ItemById: { 96 | item: { 97 | id: 'TEST_RETURN_ID', 98 | }, 99 | }, 100 | }; 101 | } 102 | if (query.includes('updateProjectV2ItemFieldValue')) { 103 | // Expect graphql params to be equal spec 104 | const querySpec = updateProjectQuerySpec[0]; 105 | expect([removeSpaces(query), options]).toEqual([ 106 | removeSpaces(querySpec), 107 | updateProjectQuerySpec[1], 108 | ]); 109 | } 110 | return {} as any; 111 | }); 112 | 113 | // Call action 114 | await assignProjectAction(); 115 | }); 116 | }); 117 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/actions/assignProject.ts: -------------------------------------------------------------------------------- 1 | import { assignProject, getProject, updateFields } from '~/services'; 2 | import { TOKEN_CONFIG, getAssignProjectsInput } from '~/utils'; 3 | 4 | export async function assignProjectAction() { 5 | const { projectNumber, organization, token, objectId, fields } = getAssignProjectsInput(); 6 | 7 | // inject token data 8 | TOKEN_CONFIG.token = token; 9 | 10 | console.log('Fetching project', projectNumber, 'from', organization); 11 | const project = await getProject(organization, projectNumber); 12 | 13 | console.log('Assign project', project.id, 'to object id', objectId); 14 | const itemId = await assignProject(project.id, objectId); 15 | 16 | console.log('Updating fields from item', itemId); 17 | if (!Object.keys(fields).length) { 18 | console.log('No fields to update!'); 19 | return; 20 | } else { 21 | await updateFields(project, itemId, fields); 22 | } 23 | 24 | console.log('Done!'); 25 | } 26 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/main.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-floating-promises */ 2 | import * as core from '@actions/core'; 3 | import { assignProjectAction } from './actions/assignProject'; 4 | 5 | async function main(): Promise { 6 | try { 7 | await assignProjectAction(); 8 | } catch (error: any) { 9 | core.setFailed((error as Error).message); 10 | } 11 | } 12 | 13 | main(); 14 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/services/assignProject.ts: -------------------------------------------------------------------------------- 1 | import { graphql } from '@octokit/graphql'; 2 | import { AddProjectV2ItemByIdPayload } from '@octokit/graphql-schema'; 3 | import { headers } from '~/utils'; 4 | 5 | export async function assignProject(projectId: string, contentId: string) { 6 | const { addProjectV2ItemById } = await graphql<{ 7 | addProjectV2ItemById: AddProjectV2ItemByIdPayload; 8 | }>( 9 | ` 10 | mutation ($projectId: ID!, $contentId: ID!) { 11 | addProjectV2ItemById(input: { projectId: $projectId, contentId: $contentId }) { 12 | item { 13 | id 14 | } 15 | } 16 | } 17 | `, 18 | { 19 | projectId, 20 | contentId, 21 | headers: headers(), 22 | } 23 | ); 24 | return addProjectV2ItemById.item!.id; 25 | } 26 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/services/getProject.ts: -------------------------------------------------------------------------------- 1 | import { graphql } from '@octokit/graphql'; 2 | import { ProjectV2 } from '@octokit/graphql-schema'; 3 | import { headers } from '~/utils'; 4 | 5 | export async function getProject(organization: string, projectNumber: string | number) { 6 | const { 7 | organization: { projectV2: project }, 8 | } = await graphql<{ 9 | organization: { 10 | projectV2: ProjectV2; 11 | }; 12 | }>( 13 | ` 14 | query ($organization: String!, $projectNumber: Int!) { 15 | organization(login: $organization) { 16 | projectV2(number: $projectNumber) { 17 | id 18 | fields(first: 20) { 19 | nodes { 20 | ... on ProjectV2Field { 21 | id 22 | name 23 | dataType 24 | } 25 | ... on ProjectV2SingleSelectField { 26 | id 27 | name 28 | dataType 29 | options { 30 | id 31 | name 32 | } 33 | } 34 | } 35 | } 36 | } 37 | } 38 | } 39 | `, 40 | { 41 | organization, 42 | projectNumber: Number(projectNumber), 43 | headers: headers(), 44 | } 45 | ); 46 | return project; 47 | } 48 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/services/index.ts: -------------------------------------------------------------------------------- 1 | export * from './assignProject'; 2 | export * from './updateField'; 3 | export * from './getProject'; 4 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/services/updateField.ts: -------------------------------------------------------------------------------- 1 | import { graphql } from '@octokit/graphql'; 2 | import { ProjectV2 } from '@octokit/graphql-schema'; 3 | import { GHInput } from '~/utils'; 4 | import { transformQuery } from '~/utils/field'; 5 | import { headers } from '~/utils/headers'; 6 | 7 | export async function updateFields(project: ProjectV2, itemId: string, fields: GHInput) { 8 | const mountQueryLine = (key: string, index: number) => ` 9 | arg_${index}: updateProjectV2ItemFieldValue(input: { 10 | projectId: $projectId 11 | itemId: $itemId 12 | ${transformQuery(project, key, fields[key])} 13 | }) { 14 | projectV2Item { 15 | id 16 | } 17 | } 18 | `; 19 | const queryFiels = Object.keys(fields).map(mountQueryLine).join('\n'); 20 | await graphql( 21 | ` 22 | mutation ( 23 | $projectId: ID! 24 | $itemId: ID! 25 | ) { 26 | ${queryFiels} 27 | } 28 | `, 29 | { 30 | projectId: project.id, 31 | itemId, 32 | headers: headers(), 33 | } 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/tests/mocks/getProject.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "PVT_0000", 3 | "fields": { 4 | "nodes": [ 5 | { 6 | "id": "PVTF_OOOO", 7 | "name": "Title", 8 | "dataType": "TITLE" 9 | }, 10 | { 11 | "id": "PVTF_OOOO", 12 | "name": "Assignees", 13 | "dataType": "ASSIGNEES" 14 | }, 15 | { 16 | "id": "PVTSSF_OOOO", 17 | "name": "Status", 18 | "dataType": "SINGLE_SELECT", 19 | "options": [ 20 | { 21 | "id": "f75ad846", 22 | "name": "Todo" 23 | }, 24 | { 25 | "id": "47fc9ee4", 26 | "name": "In Progress" 27 | }, 28 | { 29 | "id": "98236657", 30 | "name": "Done" 31 | } 32 | ] 33 | }, 34 | { 35 | "id": "PVTSSF_OOOO", 36 | "name": "Number field", 37 | "dataType": "NUMBER" 38 | }, 39 | { 40 | "id": "PVTSSF_OOOO", 41 | "name": "Text field", 42 | "dataType": "TEXT" 43 | }, 44 | { 45 | "id": "PVTSSF_OOOO", 46 | "name": "Date field", 47 | "dataType": "DATE" 48 | }, 49 | { 50 | "id": "PVTF_OOOO", 51 | "name": "Labels", 52 | "dataType": "LABELS" 53 | }, 54 | { 55 | "id": "PVTF_OOOO", 56 | "name": "Linked pull requests", 57 | "dataType": "LINKED_PULL_REQUESTS" 58 | }, 59 | { 60 | "id": "PVTF_OOOO", 61 | "name": "Tracks", 62 | "dataType": "TRACKS" 63 | }, 64 | { 65 | "id": "PVTF_OOOO", 66 | "name": "Reviewers", 67 | "dataType": "REVIEWERS" 68 | }, 69 | { 70 | "id": "PVTF_OOOO", 71 | "name": "Repository", 72 | "dataType": "REPOSITORY" 73 | }, 74 | { 75 | "id": "PVTF_OOOO", 76 | "name": "Milestone", 77 | "dataType": "MILESTONE" 78 | } 79 | ] 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/tests/removeSpaces.ts: -------------------------------------------------------------------------------- 1 | export function removeSpaces(text: string) { 2 | return text.replace(/ {2}|\r\n|\n|\r/gm, ''); 3 | } 4 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/tests/setup.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import * as getProject from '~/services/getProject'; 3 | 4 | import getProjectJSON from './mocks/getProject.json'; 5 | 6 | beforeAll(() => { 7 | jest.spyOn(core, 'getInput').mockImplementation((name: string) => { 8 | switch (name) { 9 | case 'organization': 10 | return 'testFooOrg'; 11 | case 'project_number': 12 | return 'number123'; 13 | case 'object_id': 14 | return 'objectId'; 15 | case 'fields': 16 | return 'Status,Number field, Text field, Date field'; 17 | case 'values': 18 | return 'In Progress, 1, Test Text, 2022-09-16T20:07:31.954Z'; 19 | case 'token': 20 | return 'my_token_secret'; 21 | default: 22 | return ''; 23 | } 24 | }); 25 | jest 26 | .spyOn(getProject, 'getProject') 27 | .mockImplementation(() => Promise.resolve(getProjectJSON as any)); 28 | }); 29 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/utils/field.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ProjectV2, 3 | ProjectV2Field, 4 | ProjectV2IterationField, 5 | ProjectV2SingleSelectField, 6 | } from '@octokit/graphql-schema'; 7 | 8 | const FieldTypeName: { 9 | [key: string]: string; 10 | } = { 11 | SINGLE_SELECT: 'singleSelectOptionId', 12 | DATE: 'date', 13 | TEXT: 'text', 14 | NUMBER: 'number', 15 | }; 16 | 17 | export function getFieldByName(name: string, project: ProjectV2) { 18 | const field = (project.fields.nodes || []).find( 19 | (node) => node?.name.toLowerCase() === name.toLowerCase() 20 | ); 21 | 22 | if (!field) return null; 23 | 24 | return field; 25 | } 26 | 27 | export function getValue( 28 | field: ProjectV2Field | ProjectV2IterationField | ProjectV2SingleSelectField, 29 | value: string 30 | ) { 31 | switch (field.dataType) { 32 | case 'SINGLE_SELECT': 33 | return JSON.stringify( 34 | (field as ProjectV2SingleSelectField).options.find( 35 | (option) => option.name.toLowerCase() === value.toLowerCase() 36 | )?.id 37 | ); 38 | case 'NUMBER': 39 | return Number(value); 40 | case 'TEXT': 41 | return JSON.stringify(value); 42 | case 'DATE': 43 | return JSON.stringify(new Date(value)); 44 | default: 45 | return value; 46 | } 47 | } 48 | 49 | export function transformQuery(project: ProjectV2, key: string, value: string) { 50 | const field = getFieldByName(key, project); 51 | if (!field) return ''; 52 | const fieldName = FieldTypeName[field.dataType]; 53 | if (!fieldName) return ''; 54 | 55 | return [`fieldId: "${field.id}"`, `value: { ${fieldName}: ${getValue(field, value)} }`].join( 56 | '\n' 57 | ); 58 | } 59 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/utils/headers.ts: -------------------------------------------------------------------------------- 1 | export const TOKEN_CONFIG = { 2 | token: '', 3 | }; 4 | 5 | export const headers = () => ({ 6 | authorization: `token ${TOKEN_CONFIG.token}`, 7 | }); 8 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './field'; 2 | export * from './headers'; 3 | export * from './inputs'; 4 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/utils/inputs.test.ts: -------------------------------------------------------------------------------- 1 | import { getAssignProjectsInput } from './inputs'; 2 | 3 | describe('Inputs utils testing', () => { 4 | it('getAssignProjectsInput', () => { 5 | const assignProjectInput = getAssignProjectsInput(); 6 | 7 | expect(assignProjectInput).toEqual({ 8 | organization: 'testFooOrg', 9 | projectNumber: 'number123', 10 | objectId: 'objectId', 11 | token: 'my_token_secret', 12 | fields: { 13 | Status: 'In Progress', 14 | 'Number field': '1', 15 | 'Text field': 'Test Text', 16 | 'Date field': '2022-09-16T20:07:31.954Z', 17 | }, 18 | }); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/src/utils/inputs.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | 3 | export interface AssignProjectInput { 4 | token: string; 5 | organization: string; 6 | projectNumber: string; 7 | objectId: string; 8 | fields: { 9 | [key: string]: string; 10 | }; 11 | } 12 | 13 | export type GHInput = { 14 | [key: string]: string; 15 | }; 16 | 17 | export function fromGHInput(keys: string, values: string): GHInput { 18 | const fields = keys.split(','); 19 | const fieldValues = values.split(','); 20 | 21 | return fields.reduce( 22 | (ret, field, index) => ({ 23 | ...ret, 24 | [field.trim()]: fieldValues[index].trim(), 25 | }), 26 | {} 27 | ); 28 | } 29 | 30 | export function getAssignProjectsInput(): AssignProjectInput { 31 | const organization = core.getInput('organization'); 32 | const projectNumber = core.getInput('project_number'); 33 | const objectId = core.getInput('object_id'); 34 | const fieldsString = core.getInput('fields'); 35 | const valuesString = core.getInput('values'); 36 | const token = core.getInput('token'); 37 | const fields = fromGHInput(fieldsString, valuesString); 38 | 39 | return { 40 | organization, 41 | projectNumber, 42 | objectId, 43 | fields, 44 | token, 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["./**/*.ts", ".eslintrc.js"], 4 | "exclude": [] 5 | } 6 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist", 4 | "esModuleInterop": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "newLine": "LF", 9 | "noEmitOnError": true, 10 | "noErrorTruncation": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "noImplicitAny": true, 13 | "noImplicitReturns": true, 14 | "noImplicitThis": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "pretty": true, 18 | "removeComments": true, 19 | "resolveJsonModule": true, 20 | "strict": true, 21 | "suppressImplicitAnyIndexErrors": false, 22 | "target": "es2015", 23 | "declaration": false, 24 | "sourceMap": false, 25 | "paths": { 26 | "~/*": ["./src/*"] 27 | } 28 | }, 29 | "include": ["./node_modules/**/*", "./src/**/*"], 30 | "$schema": "https://json.schemastore.org/tsconfig" 31 | } 32 | -------------------------------------------------------------------------------- /gh-projects/assign-to-project/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup'; 2 | 3 | export default defineConfig(() => { 4 | return { 5 | minify: true, 6 | entry: ['src/main.ts'], 7 | outDir: 'dist', 8 | splitting: false, 9 | sourcemap: false, 10 | externals: [], 11 | noExternal: [/(.*)/gi], 12 | skipNodeModulesBundle: false, 13 | }; 14 | }); 15 | -------------------------------------------------------------------------------- /setups/docker/README.md: -------------------------------------------------------------------------------- 1 | ### Setup node 2 | 3 | A github action to setup Docker 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/setups/docker 9 | with: 10 | username: ${{ github.repository_owner }} 11 | password: ${{ secrets.GITHUB_TOKEN }} 12 | ``` 13 | 14 | ### Inputs 15 | 16 | | Name | Description | 17 | | --------------- | ---------------------------- | 18 | | username | Username for https://ghcr.io | 19 | | password | Password for https://ghcr.io | 20 | | compose-version | Docker Dompose version | 21 | 22 | ### Outputs 23 | 24 | No outputs defined 25 | 26 | ## License 27 | 28 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 29 | -------------------------------------------------------------------------------- /setups/docker/action.yaml: -------------------------------------------------------------------------------- 1 | name: 'Setup Docker' 2 | 3 | inputs: 4 | compose-version: 5 | description: 'Docker Dompose version' 6 | default: 2.6.0 7 | username: 8 | description: 'Username for https://ghcr.io' 9 | required: true 10 | password: 11 | description: 'Password for https://ghcr.io' 12 | required: true 13 | 14 | runs: 15 | using: "composite" 16 | steps: 17 | - name: Setup Docker 18 | uses: docker/login-action@v2 19 | with: 20 | registry: ghcr.io 21 | username: ${{ inputs.username }} 22 | password: ${{ inputs.password }} 23 | 24 | # Make github action to use the latest version of 25 | # docker compose without it docker compose down 26 | # has issues with memory nil pointer 27 | # https://github.com/docker/compose/pull/9354 28 | - name: Install Compose 29 | uses: ndeloof/install-compose-action@v0.0.1 30 | with: 31 | version: v${{ inputs.compose-version }} 32 | 33 | - name: Docker info 34 | run: | 35 | docker info 36 | shell: 37 | bash 38 | -------------------------------------------------------------------------------- /setups/node/README.md: -------------------------------------------------------------------------------- 1 | ### Setup node 2 | 3 | A github action to setup Node.js and PNPM 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/setups/node 9 | with: 10 | node-version: 18.14.1 11 | pnpm-version: latest 12 | ``` 13 | 14 | ### Inputs 15 | 16 | | Name | Description | 17 | | ------------ | ------------ | 18 | | node-version | Node version | 19 | | pnpm-version | PNPM version | 20 | 21 | ### Outputs 22 | 23 | No outputs defined 24 | 25 | ## License 26 | 27 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 28 | -------------------------------------------------------------------------------- /setups/node/action.yaml: -------------------------------------------------------------------------------- 1 | name: "Setup Node.js env" 2 | description: "Setup Node.js environment with PNPM and Turborepo" 3 | 4 | inputs: 5 | node-version: 6 | description: "Node version" 7 | default: "20" 8 | pnpm-version: 9 | description: "PNPM version" 10 | default: "9" 11 | disable-turbo-cache: 12 | description: "Disable Turborepo cache" 13 | default: "false" 14 | 15 | runs: 16 | using: "composite" 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | 21 | - name: Cache Turborepo 22 | uses: actions/cache@v4 23 | if: ${{ !inputs.disable-turbo-cache }} 24 | with: 25 | path: .turbo 26 | key: ${{ runner.os }}-turbo-${{ github.sha }} 27 | restore-keys: | 28 | ${{ runner.os }}-turbo- 29 | 30 | - uses: pnpm/action-setup@v4 31 | name: Install pnpm 32 | with: 33 | version: ${{ inputs.pnpm-version }} 34 | run_install: false 35 | 36 | - name: Install Node.js 37 | uses: actions/setup-node@v4 38 | with: 39 | node-version: ${{ inputs.node-version }} 40 | cache: "pnpm" 41 | 42 | - name: Install dependencies 43 | shell: bash 44 | env: 45 | PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 46 | run: pnpm install 47 | -------------------------------------------------------------------------------- /setups/npm/README.md: -------------------------------------------------------------------------------- 1 | ### Setup node 2 | 3 | A github action to setup npm with credentials to publish packages to npm. 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/setups/npm 9 | with: 10 | npm-token: ${{ secrets.NPM_TOKEN }} 11 | ``` 12 | 13 | ### Inputs 14 | 15 | | Name | Description | 16 | | --------- | ------------------------ | 17 | | npm-token | NPM authentication token | 18 | 19 | ### Outputs 20 | 21 | No outputs defined 22 | 23 | ## License 24 | 25 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../../LICENSE.md). 26 | -------------------------------------------------------------------------------- /setups/npm/action.yaml: -------------------------------------------------------------------------------- 1 | name: "NPM Configuration" 2 | 3 | inputs: 4 | npm-token: 5 | description: "NPM token" 6 | required: true 7 | 8 | runs: 9 | using: "composite" 10 | steps: 11 | - name: Configure npm 12 | run: | 13 | cat << EOF > "$HOME/.npmrc" 14 | //registry.npmjs.org/:_authToken=$NPM_TOKEN 15 | EOF 16 | env: 17 | NPM_TOKEN: ${{ inputs.npm-token }} 18 | shell: bash 19 | 20 | - name: Ensure NPM access 21 | run: npm whoami 22 | env: 23 | NODE_AUTH_TOKEN: ${{ inputs.npm-token }} 24 | shell: bash 25 | -------------------------------------------------------------------------------- /update-sdk/README.md: -------------------------------------------------------------------------------- 1 | ### Overview 2 | 3 | A github action to update the SDK packages. 4 | 5 | ### How to use? 6 | 7 | ```yml 8 | - uses: FuelLabs/github-actions/update-sdk@master 9 | with: 10 | repository: ${{ github.repository }} # You can omit it 11 | changeset: true # You can omit it if your repository doesn't use changesets 12 | branch: master # In case you want to use a different head branch (default: main) 13 | npm-tag: ${{ matrix.tag }} # You might use "latest" or anything else, like a matrix strategy 14 | # Remember they need to have the same tag name, otherwise it'll fail 15 | packages: | 16 | @fuels 17 | @fuels/react 18 | @fuels/connectors 19 | # Other way to use it 20 | # fuels,@fuels/react,@fuels/connectors 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | ``` 24 | 25 | ### Inputs 26 | 27 | | Name | Description | Default | 28 | | ------------ | ---------------------------------------------------------- | -------------------------- | 29 | | repository | Github Repository | `${{ github.repository }}` | 30 | | changeset | If your repository uses changesets, set this to true | `false` | 31 | | branch | The branch that will be used as base to create the PR | `main` | 32 | | packages | Packages to update (multiline input or comma separated) | '' | 33 | | npm-tag | NPM tag (e.g. latest or next) | `latest` | 34 | 35 | ### Outputs 36 | 37 | | Name | Description | 38 | | ------------ | ---------------------------------------------------------- | 39 | | has-updates | If there are updates | 40 | | branch | The branch with the updated packages | 41 | | pr | The PR url with the updated packages | 42 | 43 | ## License 44 | 45 | The primary license for this repo is `Apache 2.0`, see [`LICENSE`](../LICENSE.md). 46 | -------------------------------------------------------------------------------- /update-sdk/action.yaml: -------------------------------------------------------------------------------- 1 | name: "SDK Outdated" 2 | description: "Reusable workflow for update the SDK packages" 3 | 4 | inputs: 5 | repository: 6 | description: "Github Repository" 7 | default: ${{ github.repository }} 8 | changeset: 9 | description: "If your repository uses changesets, set this to true" 10 | default: false 11 | branch: 12 | description: "The head branch that will be used to create the PR" 13 | default: main 14 | npm-tag: 15 | description: "NPM tag (e.g. latest or next)" 16 | default: latest 17 | packages: 18 | description: "Packages to update" 19 | required: true 20 | 21 | outputs: 22 | has-updates: 23 | description: "If there are updates" 24 | branch: 25 | description: "The branch with the updated packages" 26 | pr: 27 | description: "The PR url with the updated packages" 28 | 29 | runs: 30 | using: "node20" 31 | main: "dist/index.js" -------------------------------------------------------------------------------- /update-sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "update-sdk", 3 | "private": true, 4 | "license": "Apache-2.0", 5 | "main": "./src/index.ts", 6 | "scripts": { 7 | "ts:check": "tsc --noEmit", 8 | "build": "tsup", 9 | "dev": "tsx src/index.ts" 10 | }, 11 | "devDependencies": { 12 | "@fuels/ts-config": "0.17.0", 13 | "@types/node": "20.11.29", 14 | "chalk": "5.3.0", 15 | "execa": "8.0.1", 16 | "tsup": "8.0.2", 17 | "tsx": "4.7.1" 18 | }, 19 | "dependencies": { 20 | "@actions/core": "1.10.1" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /update-sdk/pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '6.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | dependencies: 8 | '@actions/core': 9 | specifier: 1.10.1 10 | version: 1.10.1 11 | 12 | devDependencies: 13 | '@fuels/ts-config': 14 | specifier: 0.17.0 15 | version: 0.17.0(typescript@5.2.2) 16 | '@types/node': 17 | specifier: 20.11.29 18 | version: 20.11.29 19 | chalk: 20 | specifier: 5.3.0 21 | version: 5.3.0 22 | execa: 23 | specifier: 8.0.1 24 | version: 8.0.1 25 | tsup: 26 | specifier: 8.0.2 27 | version: 8.0.2(typescript@5.2.2) 28 | tsx: 29 | specifier: 4.7.1 30 | version: 4.7.1 31 | 32 | packages: 33 | 34 | /@actions/core@1.10.1: 35 | resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} 36 | dependencies: 37 | '@actions/http-client': 2.2.1 38 | uuid: 8.3.2 39 | dev: false 40 | 41 | /@actions/http-client@2.2.1: 42 | resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} 43 | dependencies: 44 | tunnel: 0.0.6 45 | undici: 5.28.3 46 | dev: false 47 | 48 | /@esbuild/aix-ppc64@0.19.12: 49 | resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} 50 | engines: {node: '>=12'} 51 | cpu: [ppc64] 52 | os: [aix] 53 | requiresBuild: true 54 | dev: true 55 | optional: true 56 | 57 | /@esbuild/android-arm64@0.19.12: 58 | resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} 59 | engines: {node: '>=12'} 60 | cpu: [arm64] 61 | os: [android] 62 | requiresBuild: true 63 | dev: true 64 | optional: true 65 | 66 | /@esbuild/android-arm@0.19.12: 67 | resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} 68 | engines: {node: '>=12'} 69 | cpu: [arm] 70 | os: [android] 71 | requiresBuild: true 72 | dev: true 73 | optional: true 74 | 75 | /@esbuild/android-x64@0.19.12: 76 | resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} 77 | engines: {node: '>=12'} 78 | cpu: [x64] 79 | os: [android] 80 | requiresBuild: true 81 | dev: true 82 | optional: true 83 | 84 | /@esbuild/darwin-arm64@0.19.12: 85 | resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} 86 | engines: {node: '>=12'} 87 | cpu: [arm64] 88 | os: [darwin] 89 | requiresBuild: true 90 | dev: true 91 | optional: true 92 | 93 | /@esbuild/darwin-x64@0.19.12: 94 | resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} 95 | engines: {node: '>=12'} 96 | cpu: [x64] 97 | os: [darwin] 98 | requiresBuild: true 99 | dev: true 100 | optional: true 101 | 102 | /@esbuild/freebsd-arm64@0.19.12: 103 | resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} 104 | engines: {node: '>=12'} 105 | cpu: [arm64] 106 | os: [freebsd] 107 | requiresBuild: true 108 | dev: true 109 | optional: true 110 | 111 | /@esbuild/freebsd-x64@0.19.12: 112 | resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} 113 | engines: {node: '>=12'} 114 | cpu: [x64] 115 | os: [freebsd] 116 | requiresBuild: true 117 | dev: true 118 | optional: true 119 | 120 | /@esbuild/linux-arm64@0.19.12: 121 | resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} 122 | engines: {node: '>=12'} 123 | cpu: [arm64] 124 | os: [linux] 125 | requiresBuild: true 126 | dev: true 127 | optional: true 128 | 129 | /@esbuild/linux-arm@0.19.12: 130 | resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} 131 | engines: {node: '>=12'} 132 | cpu: [arm] 133 | os: [linux] 134 | requiresBuild: true 135 | dev: true 136 | optional: true 137 | 138 | /@esbuild/linux-ia32@0.19.12: 139 | resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} 140 | engines: {node: '>=12'} 141 | cpu: [ia32] 142 | os: [linux] 143 | requiresBuild: true 144 | dev: true 145 | optional: true 146 | 147 | /@esbuild/linux-loong64@0.19.12: 148 | resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} 149 | engines: {node: '>=12'} 150 | cpu: [loong64] 151 | os: [linux] 152 | requiresBuild: true 153 | dev: true 154 | optional: true 155 | 156 | /@esbuild/linux-mips64el@0.19.12: 157 | resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} 158 | engines: {node: '>=12'} 159 | cpu: [mips64el] 160 | os: [linux] 161 | requiresBuild: true 162 | dev: true 163 | optional: true 164 | 165 | /@esbuild/linux-ppc64@0.19.12: 166 | resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} 167 | engines: {node: '>=12'} 168 | cpu: [ppc64] 169 | os: [linux] 170 | requiresBuild: true 171 | dev: true 172 | optional: true 173 | 174 | /@esbuild/linux-riscv64@0.19.12: 175 | resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} 176 | engines: {node: '>=12'} 177 | cpu: [riscv64] 178 | os: [linux] 179 | requiresBuild: true 180 | dev: true 181 | optional: true 182 | 183 | /@esbuild/linux-s390x@0.19.12: 184 | resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} 185 | engines: {node: '>=12'} 186 | cpu: [s390x] 187 | os: [linux] 188 | requiresBuild: true 189 | dev: true 190 | optional: true 191 | 192 | /@esbuild/linux-x64@0.19.12: 193 | resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} 194 | engines: {node: '>=12'} 195 | cpu: [x64] 196 | os: [linux] 197 | requiresBuild: true 198 | dev: true 199 | optional: true 200 | 201 | /@esbuild/netbsd-x64@0.19.12: 202 | resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} 203 | engines: {node: '>=12'} 204 | cpu: [x64] 205 | os: [netbsd] 206 | requiresBuild: true 207 | dev: true 208 | optional: true 209 | 210 | /@esbuild/openbsd-x64@0.19.12: 211 | resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} 212 | engines: {node: '>=12'} 213 | cpu: [x64] 214 | os: [openbsd] 215 | requiresBuild: true 216 | dev: true 217 | optional: true 218 | 219 | /@esbuild/sunos-x64@0.19.12: 220 | resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} 221 | engines: {node: '>=12'} 222 | cpu: [x64] 223 | os: [sunos] 224 | requiresBuild: true 225 | dev: true 226 | optional: true 227 | 228 | /@esbuild/win32-arm64@0.19.12: 229 | resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} 230 | engines: {node: '>=12'} 231 | cpu: [arm64] 232 | os: [win32] 233 | requiresBuild: true 234 | dev: true 235 | optional: true 236 | 237 | /@esbuild/win32-ia32@0.19.12: 238 | resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} 239 | engines: {node: '>=12'} 240 | cpu: [ia32] 241 | os: [win32] 242 | requiresBuild: true 243 | dev: true 244 | optional: true 245 | 246 | /@esbuild/win32-x64@0.19.12: 247 | resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} 248 | engines: {node: '>=12'} 249 | cpu: [x64] 250 | os: [win32] 251 | requiresBuild: true 252 | dev: true 253 | optional: true 254 | 255 | /@fastify/busboy@2.1.1: 256 | resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} 257 | engines: {node: '>=14'} 258 | dev: false 259 | 260 | /@fuels/ts-config@0.17.0(typescript@5.2.2): 261 | resolution: {integrity: sha512-OoEM1JHFCzWlOjsy/KG0T2RsQ8Z2uQVN8Y6qlszvZO0WzbLa8mJf1gFDayx0K0sv6SyABF0c17anNgsYf7ZM8Q==} 262 | peerDependencies: 263 | typescript: 5.2.2 264 | dependencies: 265 | typescript: 5.2.2 266 | dev: true 267 | 268 | /@isaacs/cliui@8.0.2: 269 | resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} 270 | engines: {node: '>=12'} 271 | dependencies: 272 | string-width: 5.1.2 273 | string-width-cjs: /string-width@4.2.3 274 | strip-ansi: 7.1.0 275 | strip-ansi-cjs: /strip-ansi@6.0.1 276 | wrap-ansi: 8.1.0 277 | wrap-ansi-cjs: /wrap-ansi@7.0.0 278 | dev: true 279 | 280 | /@jridgewell/gen-mapping@0.3.5: 281 | resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} 282 | engines: {node: '>=6.0.0'} 283 | dependencies: 284 | '@jridgewell/set-array': 1.2.1 285 | '@jridgewell/sourcemap-codec': 1.4.15 286 | '@jridgewell/trace-mapping': 0.3.25 287 | dev: true 288 | 289 | /@jridgewell/resolve-uri@3.1.2: 290 | resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} 291 | engines: {node: '>=6.0.0'} 292 | dev: true 293 | 294 | /@jridgewell/set-array@1.2.1: 295 | resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} 296 | engines: {node: '>=6.0.0'} 297 | dev: true 298 | 299 | /@jridgewell/sourcemap-codec@1.4.15: 300 | resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} 301 | dev: true 302 | 303 | /@jridgewell/trace-mapping@0.3.25: 304 | resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} 305 | dependencies: 306 | '@jridgewell/resolve-uri': 3.1.2 307 | '@jridgewell/sourcemap-codec': 1.4.15 308 | dev: true 309 | 310 | /@nodelib/fs.scandir@2.1.5: 311 | resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} 312 | engines: {node: '>= 8'} 313 | dependencies: 314 | '@nodelib/fs.stat': 2.0.5 315 | run-parallel: 1.2.0 316 | dev: true 317 | 318 | /@nodelib/fs.stat@2.0.5: 319 | resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} 320 | engines: {node: '>= 8'} 321 | dev: true 322 | 323 | /@nodelib/fs.walk@1.2.8: 324 | resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 325 | engines: {node: '>= 8'} 326 | dependencies: 327 | '@nodelib/fs.scandir': 2.1.5 328 | fastq: 1.17.1 329 | dev: true 330 | 331 | /@pkgjs/parseargs@0.11.0: 332 | resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} 333 | engines: {node: '>=14'} 334 | requiresBuild: true 335 | dev: true 336 | optional: true 337 | 338 | /@rollup/rollup-android-arm-eabi@4.13.0: 339 | resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==} 340 | cpu: [arm] 341 | os: [android] 342 | requiresBuild: true 343 | dev: true 344 | optional: true 345 | 346 | /@rollup/rollup-android-arm64@4.13.0: 347 | resolution: {integrity: sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==} 348 | cpu: [arm64] 349 | os: [android] 350 | requiresBuild: true 351 | dev: true 352 | optional: true 353 | 354 | /@rollup/rollup-darwin-arm64@4.13.0: 355 | resolution: {integrity: sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==} 356 | cpu: [arm64] 357 | os: [darwin] 358 | requiresBuild: true 359 | dev: true 360 | optional: true 361 | 362 | /@rollup/rollup-darwin-x64@4.13.0: 363 | resolution: {integrity: sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==} 364 | cpu: [x64] 365 | os: [darwin] 366 | requiresBuild: true 367 | dev: true 368 | optional: true 369 | 370 | /@rollup/rollup-linux-arm-gnueabihf@4.13.0: 371 | resolution: {integrity: sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==} 372 | cpu: [arm] 373 | os: [linux] 374 | requiresBuild: true 375 | dev: true 376 | optional: true 377 | 378 | /@rollup/rollup-linux-arm64-gnu@4.13.0: 379 | resolution: {integrity: sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==} 380 | cpu: [arm64] 381 | os: [linux] 382 | requiresBuild: true 383 | dev: true 384 | optional: true 385 | 386 | /@rollup/rollup-linux-arm64-musl@4.13.0: 387 | resolution: {integrity: sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==} 388 | cpu: [arm64] 389 | os: [linux] 390 | requiresBuild: true 391 | dev: true 392 | optional: true 393 | 394 | /@rollup/rollup-linux-riscv64-gnu@4.13.0: 395 | resolution: {integrity: sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==} 396 | cpu: [riscv64] 397 | os: [linux] 398 | requiresBuild: true 399 | dev: true 400 | optional: true 401 | 402 | /@rollup/rollup-linux-x64-gnu@4.13.0: 403 | resolution: {integrity: sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==} 404 | cpu: [x64] 405 | os: [linux] 406 | requiresBuild: true 407 | dev: true 408 | optional: true 409 | 410 | /@rollup/rollup-linux-x64-musl@4.13.0: 411 | resolution: {integrity: sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==} 412 | cpu: [x64] 413 | os: [linux] 414 | requiresBuild: true 415 | dev: true 416 | optional: true 417 | 418 | /@rollup/rollup-win32-arm64-msvc@4.13.0: 419 | resolution: {integrity: sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==} 420 | cpu: [arm64] 421 | os: [win32] 422 | requiresBuild: true 423 | dev: true 424 | optional: true 425 | 426 | /@rollup/rollup-win32-ia32-msvc@4.13.0: 427 | resolution: {integrity: sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==} 428 | cpu: [ia32] 429 | os: [win32] 430 | requiresBuild: true 431 | dev: true 432 | optional: true 433 | 434 | /@rollup/rollup-win32-x64-msvc@4.13.0: 435 | resolution: {integrity: sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==} 436 | cpu: [x64] 437 | os: [win32] 438 | requiresBuild: true 439 | dev: true 440 | optional: true 441 | 442 | /@types/estree@1.0.5: 443 | resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} 444 | dev: true 445 | 446 | /@types/node@20.11.29: 447 | resolution: {integrity: sha512-P99thMkD/1YkCvAtOd6/zGedKNA0p2fj4ZpjCzcNiSCBWgm3cNRTBfa/qjFnsKkkojxu4vVLtWpesnZ9+ap+gA==} 448 | dependencies: 449 | undici-types: 5.26.5 450 | dev: true 451 | 452 | /ansi-regex@5.0.1: 453 | resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} 454 | engines: {node: '>=8'} 455 | dev: true 456 | 457 | /ansi-regex@6.0.1: 458 | resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} 459 | engines: {node: '>=12'} 460 | dev: true 461 | 462 | /ansi-styles@4.3.0: 463 | resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} 464 | engines: {node: '>=8'} 465 | dependencies: 466 | color-convert: 2.0.1 467 | dev: true 468 | 469 | /ansi-styles@6.2.1: 470 | resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} 471 | engines: {node: '>=12'} 472 | dev: true 473 | 474 | /any-promise@1.3.0: 475 | resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} 476 | dev: true 477 | 478 | /anymatch@3.1.3: 479 | resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} 480 | engines: {node: '>= 8'} 481 | dependencies: 482 | normalize-path: 3.0.0 483 | picomatch: 2.3.1 484 | dev: true 485 | 486 | /array-union@2.1.0: 487 | resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} 488 | engines: {node: '>=8'} 489 | dev: true 490 | 491 | /balanced-match@1.0.2: 492 | resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} 493 | dev: true 494 | 495 | /binary-extensions@2.3.0: 496 | resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} 497 | engines: {node: '>=8'} 498 | dev: true 499 | 500 | /brace-expansion@2.0.1: 501 | resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} 502 | dependencies: 503 | balanced-match: 1.0.2 504 | dev: true 505 | 506 | /braces@3.0.2: 507 | resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} 508 | engines: {node: '>=8'} 509 | dependencies: 510 | fill-range: 7.0.1 511 | dev: true 512 | 513 | /bundle-require@4.0.2(esbuild@0.19.12): 514 | resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} 515 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 516 | peerDependencies: 517 | esbuild: '>=0.17' 518 | dependencies: 519 | esbuild: 0.19.12 520 | load-tsconfig: 0.2.5 521 | dev: true 522 | 523 | /cac@6.7.14: 524 | resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} 525 | engines: {node: '>=8'} 526 | dev: true 527 | 528 | /chalk@5.3.0: 529 | resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} 530 | engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} 531 | dev: true 532 | 533 | /chokidar@3.6.0: 534 | resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} 535 | engines: {node: '>= 8.10.0'} 536 | dependencies: 537 | anymatch: 3.1.3 538 | braces: 3.0.2 539 | glob-parent: 5.1.2 540 | is-binary-path: 2.1.0 541 | is-glob: 4.0.3 542 | normalize-path: 3.0.0 543 | readdirp: 3.6.0 544 | optionalDependencies: 545 | fsevents: 2.3.3 546 | dev: true 547 | 548 | /color-convert@2.0.1: 549 | resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} 550 | engines: {node: '>=7.0.0'} 551 | dependencies: 552 | color-name: 1.1.4 553 | dev: true 554 | 555 | /color-name@1.1.4: 556 | resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} 557 | dev: true 558 | 559 | /commander@4.1.1: 560 | resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} 561 | engines: {node: '>= 6'} 562 | dev: true 563 | 564 | /cross-spawn@7.0.3: 565 | resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} 566 | engines: {node: '>= 8'} 567 | dependencies: 568 | path-key: 3.1.1 569 | shebang-command: 2.0.0 570 | which: 2.0.2 571 | dev: true 572 | 573 | /debug@4.3.4: 574 | resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} 575 | engines: {node: '>=6.0'} 576 | peerDependencies: 577 | supports-color: '*' 578 | peerDependenciesMeta: 579 | supports-color: 580 | optional: true 581 | dependencies: 582 | ms: 2.1.2 583 | dev: true 584 | 585 | /dir-glob@3.0.1: 586 | resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} 587 | engines: {node: '>=8'} 588 | dependencies: 589 | path-type: 4.0.0 590 | dev: true 591 | 592 | /eastasianwidth@0.2.0: 593 | resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} 594 | dev: true 595 | 596 | /emoji-regex@8.0.0: 597 | resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} 598 | dev: true 599 | 600 | /emoji-regex@9.2.2: 601 | resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} 602 | dev: true 603 | 604 | /esbuild@0.19.12: 605 | resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} 606 | engines: {node: '>=12'} 607 | hasBin: true 608 | requiresBuild: true 609 | optionalDependencies: 610 | '@esbuild/aix-ppc64': 0.19.12 611 | '@esbuild/android-arm': 0.19.12 612 | '@esbuild/android-arm64': 0.19.12 613 | '@esbuild/android-x64': 0.19.12 614 | '@esbuild/darwin-arm64': 0.19.12 615 | '@esbuild/darwin-x64': 0.19.12 616 | '@esbuild/freebsd-arm64': 0.19.12 617 | '@esbuild/freebsd-x64': 0.19.12 618 | '@esbuild/linux-arm': 0.19.12 619 | '@esbuild/linux-arm64': 0.19.12 620 | '@esbuild/linux-ia32': 0.19.12 621 | '@esbuild/linux-loong64': 0.19.12 622 | '@esbuild/linux-mips64el': 0.19.12 623 | '@esbuild/linux-ppc64': 0.19.12 624 | '@esbuild/linux-riscv64': 0.19.12 625 | '@esbuild/linux-s390x': 0.19.12 626 | '@esbuild/linux-x64': 0.19.12 627 | '@esbuild/netbsd-x64': 0.19.12 628 | '@esbuild/openbsd-x64': 0.19.12 629 | '@esbuild/sunos-x64': 0.19.12 630 | '@esbuild/win32-arm64': 0.19.12 631 | '@esbuild/win32-ia32': 0.19.12 632 | '@esbuild/win32-x64': 0.19.12 633 | dev: true 634 | 635 | /execa@5.1.1: 636 | resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} 637 | engines: {node: '>=10'} 638 | dependencies: 639 | cross-spawn: 7.0.3 640 | get-stream: 6.0.1 641 | human-signals: 2.1.0 642 | is-stream: 2.0.1 643 | merge-stream: 2.0.0 644 | npm-run-path: 4.0.1 645 | onetime: 5.1.2 646 | signal-exit: 3.0.7 647 | strip-final-newline: 2.0.0 648 | dev: true 649 | 650 | /execa@8.0.1: 651 | resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} 652 | engines: {node: '>=16.17'} 653 | dependencies: 654 | cross-spawn: 7.0.3 655 | get-stream: 8.0.1 656 | human-signals: 5.0.0 657 | is-stream: 3.0.0 658 | merge-stream: 2.0.0 659 | npm-run-path: 5.3.0 660 | onetime: 6.0.0 661 | signal-exit: 4.1.0 662 | strip-final-newline: 3.0.0 663 | dev: true 664 | 665 | /fast-glob@3.3.2: 666 | resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} 667 | engines: {node: '>=8.6.0'} 668 | dependencies: 669 | '@nodelib/fs.stat': 2.0.5 670 | '@nodelib/fs.walk': 1.2.8 671 | glob-parent: 5.1.2 672 | merge2: 1.4.1 673 | micromatch: 4.0.5 674 | dev: true 675 | 676 | /fastq@1.17.1: 677 | resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} 678 | dependencies: 679 | reusify: 1.0.4 680 | dev: true 681 | 682 | /fill-range@7.0.1: 683 | resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} 684 | engines: {node: '>=8'} 685 | dependencies: 686 | to-regex-range: 5.0.1 687 | dev: true 688 | 689 | /foreground-child@3.1.1: 690 | resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} 691 | engines: {node: '>=14'} 692 | dependencies: 693 | cross-spawn: 7.0.3 694 | signal-exit: 4.1.0 695 | dev: true 696 | 697 | /fsevents@2.3.3: 698 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 699 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 700 | os: [darwin] 701 | requiresBuild: true 702 | dev: true 703 | optional: true 704 | 705 | /get-stream@6.0.1: 706 | resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} 707 | engines: {node: '>=10'} 708 | dev: true 709 | 710 | /get-stream@8.0.1: 711 | resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} 712 | engines: {node: '>=16'} 713 | dev: true 714 | 715 | /get-tsconfig@4.7.3: 716 | resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} 717 | dependencies: 718 | resolve-pkg-maps: 1.0.0 719 | dev: true 720 | 721 | /glob-parent@5.1.2: 722 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 723 | engines: {node: '>= 6'} 724 | dependencies: 725 | is-glob: 4.0.3 726 | dev: true 727 | 728 | /glob@10.3.10: 729 | resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} 730 | engines: {node: '>=16 || 14 >=14.17'} 731 | hasBin: true 732 | dependencies: 733 | foreground-child: 3.1.1 734 | jackspeak: 2.3.6 735 | minimatch: 9.0.3 736 | minipass: 7.0.4 737 | path-scurry: 1.10.1 738 | dev: true 739 | 740 | /globby@11.1.0: 741 | resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} 742 | engines: {node: '>=10'} 743 | dependencies: 744 | array-union: 2.1.0 745 | dir-glob: 3.0.1 746 | fast-glob: 3.3.2 747 | ignore: 5.3.1 748 | merge2: 1.4.1 749 | slash: 3.0.0 750 | dev: true 751 | 752 | /human-signals@2.1.0: 753 | resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} 754 | engines: {node: '>=10.17.0'} 755 | dev: true 756 | 757 | /human-signals@5.0.0: 758 | resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} 759 | engines: {node: '>=16.17.0'} 760 | dev: true 761 | 762 | /ignore@5.3.1: 763 | resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} 764 | engines: {node: '>= 4'} 765 | dev: true 766 | 767 | /is-binary-path@2.1.0: 768 | resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} 769 | engines: {node: '>=8'} 770 | dependencies: 771 | binary-extensions: 2.3.0 772 | dev: true 773 | 774 | /is-extglob@2.1.1: 775 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 776 | engines: {node: '>=0.10.0'} 777 | dev: true 778 | 779 | /is-fullwidth-code-point@3.0.0: 780 | resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} 781 | engines: {node: '>=8'} 782 | dev: true 783 | 784 | /is-glob@4.0.3: 785 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 786 | engines: {node: '>=0.10.0'} 787 | dependencies: 788 | is-extglob: 2.1.1 789 | dev: true 790 | 791 | /is-number@7.0.0: 792 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 793 | engines: {node: '>=0.12.0'} 794 | dev: true 795 | 796 | /is-stream@2.0.1: 797 | resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} 798 | engines: {node: '>=8'} 799 | dev: true 800 | 801 | /is-stream@3.0.0: 802 | resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} 803 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 804 | dev: true 805 | 806 | /isexe@2.0.0: 807 | resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} 808 | dev: true 809 | 810 | /jackspeak@2.3.6: 811 | resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} 812 | engines: {node: '>=14'} 813 | dependencies: 814 | '@isaacs/cliui': 8.0.2 815 | optionalDependencies: 816 | '@pkgjs/parseargs': 0.11.0 817 | dev: true 818 | 819 | /joycon@3.1.1: 820 | resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} 821 | engines: {node: '>=10'} 822 | dev: true 823 | 824 | /lilconfig@3.1.1: 825 | resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} 826 | engines: {node: '>=14'} 827 | dev: true 828 | 829 | /lines-and-columns@1.2.4: 830 | resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} 831 | dev: true 832 | 833 | /load-tsconfig@0.2.5: 834 | resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} 835 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 836 | dev: true 837 | 838 | /lodash.sortby@4.7.0: 839 | resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} 840 | dev: true 841 | 842 | /lru-cache@10.2.0: 843 | resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} 844 | engines: {node: 14 || >=16.14} 845 | dev: true 846 | 847 | /merge-stream@2.0.0: 848 | resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} 849 | dev: true 850 | 851 | /merge2@1.4.1: 852 | resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} 853 | engines: {node: '>= 8'} 854 | dev: true 855 | 856 | /micromatch@4.0.5: 857 | resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} 858 | engines: {node: '>=8.6'} 859 | dependencies: 860 | braces: 3.0.2 861 | picomatch: 2.3.1 862 | dev: true 863 | 864 | /mimic-fn@2.1.0: 865 | resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} 866 | engines: {node: '>=6'} 867 | dev: true 868 | 869 | /mimic-fn@4.0.0: 870 | resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} 871 | engines: {node: '>=12'} 872 | dev: true 873 | 874 | /minimatch@9.0.3: 875 | resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} 876 | engines: {node: '>=16 || 14 >=14.17'} 877 | dependencies: 878 | brace-expansion: 2.0.1 879 | dev: true 880 | 881 | /minipass@7.0.4: 882 | resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} 883 | engines: {node: '>=16 || 14 >=14.17'} 884 | dev: true 885 | 886 | /ms@2.1.2: 887 | resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} 888 | dev: true 889 | 890 | /mz@2.7.0: 891 | resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} 892 | dependencies: 893 | any-promise: 1.3.0 894 | object-assign: 4.1.1 895 | thenify-all: 1.6.0 896 | dev: true 897 | 898 | /normalize-path@3.0.0: 899 | resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} 900 | engines: {node: '>=0.10.0'} 901 | dev: true 902 | 903 | /npm-run-path@4.0.1: 904 | resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} 905 | engines: {node: '>=8'} 906 | dependencies: 907 | path-key: 3.1.1 908 | dev: true 909 | 910 | /npm-run-path@5.3.0: 911 | resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} 912 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 913 | dependencies: 914 | path-key: 4.0.0 915 | dev: true 916 | 917 | /object-assign@4.1.1: 918 | resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} 919 | engines: {node: '>=0.10.0'} 920 | dev: true 921 | 922 | /onetime@5.1.2: 923 | resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} 924 | engines: {node: '>=6'} 925 | dependencies: 926 | mimic-fn: 2.1.0 927 | dev: true 928 | 929 | /onetime@6.0.0: 930 | resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} 931 | engines: {node: '>=12'} 932 | dependencies: 933 | mimic-fn: 4.0.0 934 | dev: true 935 | 936 | /path-key@3.1.1: 937 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 938 | engines: {node: '>=8'} 939 | dev: true 940 | 941 | /path-key@4.0.0: 942 | resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} 943 | engines: {node: '>=12'} 944 | dev: true 945 | 946 | /path-scurry@1.10.1: 947 | resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} 948 | engines: {node: '>=16 || 14 >=14.17'} 949 | dependencies: 950 | lru-cache: 10.2.0 951 | minipass: 7.0.4 952 | dev: true 953 | 954 | /path-type@4.0.0: 955 | resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} 956 | engines: {node: '>=8'} 957 | dev: true 958 | 959 | /picomatch@2.3.1: 960 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 961 | engines: {node: '>=8.6'} 962 | dev: true 963 | 964 | /pirates@4.0.6: 965 | resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} 966 | engines: {node: '>= 6'} 967 | dev: true 968 | 969 | /postcss-load-config@4.0.2: 970 | resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} 971 | engines: {node: '>= 14'} 972 | peerDependencies: 973 | postcss: '>=8.0.9' 974 | ts-node: '>=9.0.0' 975 | peerDependenciesMeta: 976 | postcss: 977 | optional: true 978 | ts-node: 979 | optional: true 980 | dependencies: 981 | lilconfig: 3.1.1 982 | yaml: 2.4.1 983 | dev: true 984 | 985 | /punycode@2.3.1: 986 | resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} 987 | engines: {node: '>=6'} 988 | dev: true 989 | 990 | /queue-microtask@1.2.3: 991 | resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} 992 | dev: true 993 | 994 | /readdirp@3.6.0: 995 | resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} 996 | engines: {node: '>=8.10.0'} 997 | dependencies: 998 | picomatch: 2.3.1 999 | dev: true 1000 | 1001 | /resolve-from@5.0.0: 1002 | resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} 1003 | engines: {node: '>=8'} 1004 | dev: true 1005 | 1006 | /resolve-pkg-maps@1.0.0: 1007 | resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} 1008 | dev: true 1009 | 1010 | /reusify@1.0.4: 1011 | resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} 1012 | engines: {iojs: '>=1.0.0', node: '>=0.10.0'} 1013 | dev: true 1014 | 1015 | /rollup@4.13.0: 1016 | resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==} 1017 | engines: {node: '>=18.0.0', npm: '>=8.0.0'} 1018 | hasBin: true 1019 | dependencies: 1020 | '@types/estree': 1.0.5 1021 | optionalDependencies: 1022 | '@rollup/rollup-android-arm-eabi': 4.13.0 1023 | '@rollup/rollup-android-arm64': 4.13.0 1024 | '@rollup/rollup-darwin-arm64': 4.13.0 1025 | '@rollup/rollup-darwin-x64': 4.13.0 1026 | '@rollup/rollup-linux-arm-gnueabihf': 4.13.0 1027 | '@rollup/rollup-linux-arm64-gnu': 4.13.0 1028 | '@rollup/rollup-linux-arm64-musl': 4.13.0 1029 | '@rollup/rollup-linux-riscv64-gnu': 4.13.0 1030 | '@rollup/rollup-linux-x64-gnu': 4.13.0 1031 | '@rollup/rollup-linux-x64-musl': 4.13.0 1032 | '@rollup/rollup-win32-arm64-msvc': 4.13.0 1033 | '@rollup/rollup-win32-ia32-msvc': 4.13.0 1034 | '@rollup/rollup-win32-x64-msvc': 4.13.0 1035 | fsevents: 2.3.3 1036 | dev: true 1037 | 1038 | /run-parallel@1.2.0: 1039 | resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} 1040 | dependencies: 1041 | queue-microtask: 1.2.3 1042 | dev: true 1043 | 1044 | /shebang-command@2.0.0: 1045 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 1046 | engines: {node: '>=8'} 1047 | dependencies: 1048 | shebang-regex: 3.0.0 1049 | dev: true 1050 | 1051 | /shebang-regex@3.0.0: 1052 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 1053 | engines: {node: '>=8'} 1054 | dev: true 1055 | 1056 | /signal-exit@3.0.7: 1057 | resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} 1058 | dev: true 1059 | 1060 | /signal-exit@4.1.0: 1061 | resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} 1062 | engines: {node: '>=14'} 1063 | dev: true 1064 | 1065 | /slash@3.0.0: 1066 | resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} 1067 | engines: {node: '>=8'} 1068 | dev: true 1069 | 1070 | /source-map@0.8.0-beta.0: 1071 | resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} 1072 | engines: {node: '>= 8'} 1073 | dependencies: 1074 | whatwg-url: 7.1.0 1075 | dev: true 1076 | 1077 | /string-width@4.2.3: 1078 | resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} 1079 | engines: {node: '>=8'} 1080 | dependencies: 1081 | emoji-regex: 8.0.0 1082 | is-fullwidth-code-point: 3.0.0 1083 | strip-ansi: 6.0.1 1084 | dev: true 1085 | 1086 | /string-width@5.1.2: 1087 | resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} 1088 | engines: {node: '>=12'} 1089 | dependencies: 1090 | eastasianwidth: 0.2.0 1091 | emoji-regex: 9.2.2 1092 | strip-ansi: 7.1.0 1093 | dev: true 1094 | 1095 | /strip-ansi@6.0.1: 1096 | resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} 1097 | engines: {node: '>=8'} 1098 | dependencies: 1099 | ansi-regex: 5.0.1 1100 | dev: true 1101 | 1102 | /strip-ansi@7.1.0: 1103 | resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} 1104 | engines: {node: '>=12'} 1105 | dependencies: 1106 | ansi-regex: 6.0.1 1107 | dev: true 1108 | 1109 | /strip-final-newline@2.0.0: 1110 | resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} 1111 | engines: {node: '>=6'} 1112 | dev: true 1113 | 1114 | /strip-final-newline@3.0.0: 1115 | resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} 1116 | engines: {node: '>=12'} 1117 | dev: true 1118 | 1119 | /sucrase@3.35.0: 1120 | resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} 1121 | engines: {node: '>=16 || 14 >=14.17'} 1122 | hasBin: true 1123 | dependencies: 1124 | '@jridgewell/gen-mapping': 0.3.5 1125 | commander: 4.1.1 1126 | glob: 10.3.10 1127 | lines-and-columns: 1.2.4 1128 | mz: 2.7.0 1129 | pirates: 4.0.6 1130 | ts-interface-checker: 0.1.13 1131 | dev: true 1132 | 1133 | /thenify-all@1.6.0: 1134 | resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} 1135 | engines: {node: '>=0.8'} 1136 | dependencies: 1137 | thenify: 3.3.1 1138 | dev: true 1139 | 1140 | /thenify@3.3.1: 1141 | resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} 1142 | dependencies: 1143 | any-promise: 1.3.0 1144 | dev: true 1145 | 1146 | /to-regex-range@5.0.1: 1147 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 1148 | engines: {node: '>=8.0'} 1149 | dependencies: 1150 | is-number: 7.0.0 1151 | dev: true 1152 | 1153 | /tr46@1.0.1: 1154 | resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} 1155 | dependencies: 1156 | punycode: 2.3.1 1157 | dev: true 1158 | 1159 | /tree-kill@1.2.2: 1160 | resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} 1161 | hasBin: true 1162 | dev: true 1163 | 1164 | /ts-interface-checker@0.1.13: 1165 | resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} 1166 | dev: true 1167 | 1168 | /tsup@8.0.2(typescript@5.2.2): 1169 | resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==} 1170 | engines: {node: '>=18'} 1171 | hasBin: true 1172 | peerDependencies: 1173 | '@microsoft/api-extractor': ^7.36.0 1174 | '@swc/core': ^1 1175 | postcss: ^8.4.12 1176 | typescript: '>=4.5.0' 1177 | peerDependenciesMeta: 1178 | '@microsoft/api-extractor': 1179 | optional: true 1180 | '@swc/core': 1181 | optional: true 1182 | postcss: 1183 | optional: true 1184 | typescript: 1185 | optional: true 1186 | dependencies: 1187 | bundle-require: 4.0.2(esbuild@0.19.12) 1188 | cac: 6.7.14 1189 | chokidar: 3.6.0 1190 | debug: 4.3.4 1191 | esbuild: 0.19.12 1192 | execa: 5.1.1 1193 | globby: 11.1.0 1194 | joycon: 3.1.1 1195 | postcss-load-config: 4.0.2 1196 | resolve-from: 5.0.0 1197 | rollup: 4.13.0 1198 | source-map: 0.8.0-beta.0 1199 | sucrase: 3.35.0 1200 | tree-kill: 1.2.2 1201 | typescript: 5.2.2 1202 | transitivePeerDependencies: 1203 | - supports-color 1204 | - ts-node 1205 | dev: true 1206 | 1207 | /tsx@4.7.1: 1208 | resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==} 1209 | engines: {node: '>=18.0.0'} 1210 | hasBin: true 1211 | dependencies: 1212 | esbuild: 0.19.12 1213 | get-tsconfig: 4.7.3 1214 | optionalDependencies: 1215 | fsevents: 2.3.3 1216 | dev: true 1217 | 1218 | /tunnel@0.0.6: 1219 | resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} 1220 | engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} 1221 | dev: false 1222 | 1223 | /typescript@5.2.2: 1224 | resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} 1225 | engines: {node: '>=14.17'} 1226 | hasBin: true 1227 | dev: true 1228 | 1229 | /undici-types@5.26.5: 1230 | resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} 1231 | dev: true 1232 | 1233 | /undici@5.28.3: 1234 | resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} 1235 | engines: {node: '>=14.0'} 1236 | dependencies: 1237 | '@fastify/busboy': 2.1.1 1238 | dev: false 1239 | 1240 | /uuid@8.3.2: 1241 | resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} 1242 | hasBin: true 1243 | dev: false 1244 | 1245 | /webidl-conversions@4.0.2: 1246 | resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} 1247 | dev: true 1248 | 1249 | /whatwg-url@7.1.0: 1250 | resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} 1251 | dependencies: 1252 | lodash.sortby: 4.7.0 1253 | tr46: 1.0.1 1254 | webidl-conversions: 4.0.2 1255 | dev: true 1256 | 1257 | /which@2.0.2: 1258 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 1259 | engines: {node: '>= 8'} 1260 | hasBin: true 1261 | dependencies: 1262 | isexe: 2.0.0 1263 | dev: true 1264 | 1265 | /wrap-ansi@7.0.0: 1266 | resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} 1267 | engines: {node: '>=10'} 1268 | dependencies: 1269 | ansi-styles: 4.3.0 1270 | string-width: 4.2.3 1271 | strip-ansi: 6.0.1 1272 | dev: true 1273 | 1274 | /wrap-ansi@8.1.0: 1275 | resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} 1276 | engines: {node: '>=12'} 1277 | dependencies: 1278 | ansi-styles: 6.2.1 1279 | string-width: 5.1.2 1280 | strip-ansi: 7.1.0 1281 | dev: true 1282 | 1283 | /yaml@2.4.1: 1284 | resolution: {integrity: sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==} 1285 | engines: {node: '>= 14'} 1286 | hasBin: true 1287 | dev: true 1288 | -------------------------------------------------------------------------------- /update-sdk/src/Changeset.ts: -------------------------------------------------------------------------------- 1 | import c from 'chalk'; 2 | import { spawn } from 'child_process'; 3 | 4 | export class Changeset { 5 | static async addChangeset(npmTag: string) { 6 | console.log(c.white(`📝 Adding changeset for packages\n`)); 7 | console.log(c.white(`📟 pnpm changeset add\n`)); 8 | 9 | // Manually fill the changeset interactive CLI 10 | return new Promise((resolve, reject) => { 11 | const childProcess = spawn('pnpm', ['changeset', 'add']); 12 | let hasSelectedPackages = false; 13 | let hasSkippedMajor = false; 14 | let hasSkippedMinor = false; 15 | let hasSkippedSummary = false; 16 | 17 | // Manually fill the changeset interactive CLI 18 | childProcess.stdout.on('data', (data) => { 19 | const text = data.toString(); 20 | const changed = text.includes('changed packages'); 21 | if (changed && !hasSelectedPackages) { 22 | childProcess.stdin.write(' '); 23 | childProcess.stdin.write('\n'); 24 | hasSelectedPackages = true; 25 | } 26 | 27 | const major = text.includes('major bump'); 28 | if (major && !hasSkippedMajor) { 29 | childProcess.stdin.write('\n'); 30 | hasSkippedMajor = true; 31 | } 32 | 33 | const minor = text.includes('minor bump'); 34 | if (minor && !hasSkippedMinor) { 35 | childProcess.stdin.write('\n'); 36 | hasSkippedMinor = true; 37 | } 38 | 39 | const summary = text.includes('summary for this change'); 40 | if (summary && !hasSkippedSummary) { 41 | childProcess.stdin.write(`ci: update to tag ${npmTag}\n`); 42 | childProcess.stdin.write('\n'); 43 | hasSkippedSummary = true; 44 | } 45 | 46 | const finish = text.includes('desired changeset'); 47 | if (finish) { 48 | childProcess.stdin.write('\n'); 49 | } 50 | }); 51 | 52 | childProcess.on('close', (code) => { 53 | if (code === 0) { 54 | resolve(true); 55 | } else { 56 | reject(new Error(`Child process exited with code ${code}`)); 57 | } 58 | }); 59 | }); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /update-sdk/src/Github.ts: -------------------------------------------------------------------------------- 1 | import c from 'chalk'; 2 | import { $ } from 'execa'; 3 | 4 | export class Github { 5 | constructor( 6 | private repository: string 7 | ) {} 8 | 9 | async status() { 10 | const { stdout } = await $`git status --porcelain=v1`; 11 | return stdout; 12 | } 13 | 14 | async checkoutBranch(branchName: string) { 15 | await $`git fetch`; 16 | await $`git checkout ${branchName}`; 17 | } 18 | 19 | async createBranch(branchName: string): Promise { 20 | let branchExists = false; 21 | 22 | try { 23 | await $`git show-ref --heads | grep ${branchName}`; 24 | branchExists = true; 25 | } catch (e) { 26 | branchExists = false; 27 | } 28 | 29 | if (!branchExists) { 30 | await $`git checkout -b ${branchName}`; 31 | } 32 | 33 | return branchExists; 34 | } 35 | 36 | async pushingFromStage(branchName: string, commit: string) { 37 | await $`git add .`; 38 | await $`git commit -m ${commit} --no-verify`; 39 | await $`git push origin ${branchName} --force`; 40 | } 41 | 42 | async getPullRequest({ 43 | base, 44 | head, 45 | }: { 46 | base: string; 47 | head: string; 48 | }): Promise { 49 | console.log(c.white(`📥 Looking for a PR from ${head} to ${base}`)); 50 | await $`gh repo set-default ${this.repository}`; 51 | const { stdout: list } = await $`gh pr list --state open --base ${base} --head ${head}`; 52 | 53 | const prNumberRegex = /\d+/; 54 | const prMatch = list.match(prNumberRegex); 55 | if (!prMatch) { 56 | console.log(c.red(`❌ No PR found between ${head} and ${base}`)); 57 | return ''; 58 | } 59 | 60 | const prNumber = prMatch[0]; 61 | console.log(c.green(`✅ PR open found: #${prNumber}`)); 62 | 63 | return `https://github.com/${this.repository}/pull/${prNumber}`; 64 | } 65 | 66 | async createPullRequest({ 67 | base, 68 | head, 69 | title, 70 | body, 71 | }: { 72 | base: string; 73 | head: string; 74 | title: string; 75 | body: string; 76 | }): Promise { 77 | console.log(c.white(`📤 Pushing branch ${head}`)); 78 | await $`gh repo set-default ${this.repository}`; 79 | const { stdout: pr } = await $`gh pr create --base ${base} --head ${head} --title ${title} --body ${body}`; 80 | console.log(c.green(`✅ PR created: ${pr}`)); 81 | 82 | return pr; 83 | } 84 | 85 | async setupGitAgent() { 86 | await $`git config --global user.email "github-actions[bot]@users.noreply.github.com"`; 87 | await $`git config --global user.name "github-actions[bot]"`; 88 | await $`git config --global push.autoSetupRemote true`; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /update-sdk/src/PackageJson.ts: -------------------------------------------------------------------------------- 1 | import c from 'chalk'; 2 | import { exec } from 'node:child_process'; 3 | import { promisify } from 'node:util'; 4 | 5 | export class PackageJson { 6 | static getUpdatedPackages(status: string) { 7 | const list = status.split('\n').filter((line) => line.includes('package.json')) 8 | return list.filter((x) => x !== '').map((pkg) => pkg.trim()); 9 | } 10 | 11 | static async updateDependencies(version: string, packages: string[]) { 12 | const list = packages.map((pkg) => `"${pkg}@${version}"`).join(' '); 13 | 14 | console.log(c.white(`📟 Running pnpm update for packages\n`)); 15 | console.log(c.white(`📟 ${list}...\n`)); 16 | 17 | await promisify(exec)( 18 | `pnpm update ${list} --recursive` 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /update-sdk/src/ReleaseBot.ts: -------------------------------------------------------------------------------- 1 | import c from 'chalk'; 2 | 3 | import { Changeset } from './Changeset'; 4 | import { Github } from './Github'; 5 | import { PackageJson } from './PackageJson'; 6 | 7 | export class ReleaseBot { 8 | private git!: Github; 9 | private npmTag: string; 10 | private changeset: boolean; 11 | private baseBranch: string; 12 | private packages: string[]; 13 | 14 | constructor(repository: string, changeset: boolean, baseBranch: string, npmTag: string, packages: string[]) { 15 | this.npmTag = npmTag; 16 | this.changeset = changeset; 17 | this.baseBranch = baseBranch; 18 | this.packages = packages; 19 | this.git = new Github(repository); 20 | } 21 | 22 | async release() { 23 | const npmTag = this.npmTag; 24 | 25 | await this.git.setupGitAgent(); 26 | await this.git.checkoutBranch(this.baseBranch); 27 | 28 | const headBranch = this._sdkBranchName(npmTag); 29 | await this._newReleaseBranch(headBranch); 30 | 31 | await PackageJson.updateDependencies(npmTag, this.packages); 32 | 33 | const gitStatus = await this.git.status(); 34 | const updatedPackages = PackageJson.getUpdatedPackages(gitStatus); 35 | 36 | if (!updatedPackages.length) { 37 | console.log(c.green('✅ No updated packages found')); 38 | return { 39 | hasUpdates: false, 40 | branch: '', 41 | pr: '', 42 | }; 43 | } 44 | 45 | console.log(c.green('⌛️ List of updated:')); 46 | for (const updatedPackage of updatedPackages) { 47 | console.log(c.green(`📦 ${updatedPackage}`)); 48 | } 49 | 50 | if (this.changeset) { 51 | await Changeset.addChangeset(npmTag); 52 | } 53 | const pr = await this._commitUpdates(this.baseBranch, headBranch, npmTag); 54 | 55 | return { 56 | hasUpdates: true, 57 | branch: headBranch, 58 | pr, 59 | } 60 | } 61 | 62 | private async _newReleaseBranch(branchName: string) { 63 | console.log(c.white(`🔀 Creating branch ${branchName}\n`)); 64 | await this.git.createBranch(branchName); 65 | } 66 | 67 | private async _commitUpdates( 68 | baseBranch: string, 69 | headBranch: string, 70 | npmTag: string 71 | ): Promise { 72 | console.log(c.white(`🔀 Committing changes to ${headBranch}\n`)); 73 | const commitMessage = `feat: updating packages to tag ${npmTag}`; 74 | await this.git.pushingFromStage(headBranch, commitMessage); 75 | 76 | const existingPr = await this.git.getPullRequest({ 77 | base: baseBranch, 78 | head: headBranch, 79 | }); 80 | 81 | if (existingPr) { 82 | console.log(c.white('⏩ Skipping PR creation\n')); 83 | return existingPr; 84 | } 85 | 86 | return await this.git.createPullRequest({ 87 | base: baseBranch, 88 | head: headBranch, 89 | title: `feat: updating sdk to ${npmTag}`, 90 | body: `✨ This PR updates the SDK to tag ${npmTag}`, 91 | }); 92 | } 93 | 94 | private _sdkBranchName(npmTag: string) { 95 | return `ci/sdk-update/${npmTag}`; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /update-sdk/src/index.ts: -------------------------------------------------------------------------------- 1 | import { ReleaseBot } from './ReleaseBot'; 2 | import * as core from '@actions/core'; 3 | 4 | async function main() { 5 | const repository = core.getInput('repository'); 6 | const changeset = core.getInput('changeset') === 'true'; 7 | const branch = core.getInput('branch'); 8 | const npmTag = core.getInput('npm-tag'); 9 | 10 | const inlinePackages = core.getInput('packages'); 11 | const isMultiline = inlinePackages.includes('\n'); 12 | const packages = isMultiline ? core.getMultilineInput('packages') : inlinePackages.split(','); 13 | 14 | const bot = new ReleaseBot(repository, changeset, branch, npmTag, packages); 15 | 16 | try { 17 | const { hasUpdates, branch, pr } = await bot.release(); 18 | core.setOutput('has-updates', hasUpdates); 19 | core.setOutput('branch', branch); 20 | core.setOutput('pr', pr); 21 | } catch (e) { 22 | core.setFailed((e as Error).message); 23 | } 24 | } 25 | 26 | main(); 27 | -------------------------------------------------------------------------------- /update-sdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@fuels/ts-config/base.json", 3 | "compilerOptions": { 4 | "keyofStringsOnly": true, 5 | "outDir": "./dist", 6 | "baseUrl": ".", 7 | "rootDir": "." 8 | }, 9 | "include": ["**/*.ts", "**/*.tsx"], 10 | "exclude": ["**/*.test.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /update-sdk/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from 'tsup'; 2 | 3 | const options: Options = { 4 | minify: true, 5 | entry: ['src/index.ts'], 6 | outDir: 'dist', 7 | splitting: false, 8 | sourcemap: false, 9 | noExternal: ['@actions/core'], 10 | format: ['cjs'], 11 | }; 12 | 13 | export default options; 14 | --------------------------------------------------------------------------------