├── .codespellrc ├── .eslintignore ├── .eslintrc.yml ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ └── feature-request.yml ├── dependabot.yml └── workflows │ ├── check-action-metadata-task.yml │ ├── check-license.yml │ ├── check-markdown-task.yml │ ├── check-npm-dependencies-task.yml │ ├── check-npm-task.yml │ ├── check-prettier-formatting-task.yml │ ├── check-tsconfig-task.yml │ ├── check-typescript-task.yml │ ├── spell-check-task.yml │ ├── sync-labels-npm.yml │ ├── test-integration.yml │ └── test-typescript-task.yml ├── .gitignore ├── .licensed.yml ├── .licenses └── npm │ ├── @actions │ ├── core.dep.yml │ ├── exec.dep.yml │ ├── http-client.dep.yml │ ├── io.dep.yml │ └── tool-cache.dep.yml │ ├── call-bind.dep.yml │ ├── define-data-property.dep.yml │ ├── des.js.dep.yml │ ├── es-define-property.dep.yml │ ├── es-errors.dep.yml │ ├── function-bind.dep.yml │ ├── get-intrinsic.dep.yml │ ├── gopd.dep.yml │ ├── has-property-descriptors.dep.yml │ ├── has-proto.dep.yml │ ├── has-symbols.dep.yml │ ├── hasown.dep.yml │ ├── inherits.dep.yml │ ├── js-md4.dep.yml │ ├── minimalistic-assert.dep.yml │ ├── object-inspect.dep.yml │ ├── qs.dep.yml │ ├── semver-6.3.0.dep.yml │ ├── semver-7.7.2.dep.yml │ ├── set-function-length.dep.yml │ ├── side-channel.dep.yml │ ├── tunnel.dep.yml │ ├── typed-rest-client.dep.yml │ └── underscore.dep.yml ├── .markdown-link-check.json ├── .markdownlint.yml ├── .markdownlintignore ├── .npmrc ├── .prettierignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── Taskfile.yml ├── __tests__ ├── main.test.ts └── testdata │ └── tags.json ├── action.yml ├── dist ├── index.js ├── unzip └── unzip-darwin ├── jest.config.js ├── package-lock.json ├── package.json ├── poetry.lock ├── pyproject.toml ├── src ├── installer.ts └── main.ts ├── tsconfig.eslint.json └── tsconfig.json /.codespellrc: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc 2 | # See: https://github.com/codespell-project/codespell#using-a-config-file 3 | [codespell] 4 | # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: 5 | ignore-words-list = afterall 6 | skip = ./.git,./dist,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./node_modules 7 | builtin = clear,informal,en-GB_to_en-US 8 | check-filenames = 9 | check-hidden = 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | lib 3 | node_modules 4 | -------------------------------------------------------------------------------- /.eslintrc.yml: -------------------------------------------------------------------------------- 1 | # See: https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md#configuration 2 | 3 | extends: 4 | - airbnb-base 5 | - airbnb-typescript/base 6 | - prettier 7 | plugins: 8 | - "@typescript-eslint" 9 | parser: "@typescript-eslint/parser" 10 | parserOptions: 11 | project: 12 | - ./tsconfig.eslint.json 13 | rules: 14 | max-len: 15 | - error 16 | - code: 180 17 | "@typescript-eslint/comma-dangle": "off" 18 | no-console: "off" 19 | padded-blocks: "off" 20 | "@typescript-eslint/indent": 21 | - error 22 | - 2 23 | - SwitchCase: 1 24 | spaced-comment: warn 25 | arrow-parens: "off" 26 | consistent-return: "off" 27 | no-useless-escape: "off" 28 | no-underscore-dangle: "off" 29 | import/prefer-default-export: "off" 30 | "@typescript-eslint/type-annotation-spacing": error 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/issue-templates/forms/general/bug-report.yml 2 | # See: https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms 3 | 4 | name: Bug report 5 | description: Report a problem with the code or documentation in this repository. 6 | labels: 7 | - "type: imperfection" 8 | body: 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: Describe the problem 13 | validations: 14 | required: true 15 | - type: textarea 16 | id: reproduce 17 | attributes: 18 | label: To reproduce 19 | description: Provide the specific set of steps we can follow to reproduce the problem. 20 | validations: 21 | required: true 22 | - type: textarea 23 | id: expected 24 | attributes: 25 | label: Expected behavior 26 | description: What would you expect to happen after following those instructions? 27 | validations: 28 | required: true 29 | - type: input 30 | id: project-version 31 | attributes: 32 | label: "'arduino/setup-task' version" 33 | description: | 34 | Which version of `arduino/setup-task` are you using? 35 | _This should be the most recent version available._ 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: additional 40 | attributes: 41 | label: Additional context 42 | description: Add any additional information here. 43 | validations: 44 | required: false 45 | - type: checkboxes 46 | id: checklist 47 | attributes: 48 | label: Issue checklist 49 | description: Please double-check that you have done each of the following things before submitting the issue. 50 | options: 51 | - label: I searched for previous reports in [the issue tracker](https://github.com/arduino/setup-task/issues?q=) 52 | required: true 53 | - label: I verified the problem still occurs when using the latest version 54 | required: true 55 | - label: My report contains all necessary details 56 | required: true 57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/issue-templates/template-choosers/github-actions/config.yml 2 | # See: https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 3 | 4 | blank_issues_enabled: false 5 | contact_links: 6 | - name: Learn about using this project 7 | url: https://github.com/arduino/setup-task#readme 8 | about: Detailed usage documentation is available here. 9 | - name: Learn about GitHub Actions 10 | url: https://docs.github.com/actions 11 | about: Everything you need to know to get started with GitHub Actions. 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/issue-templates/forms/general/bug-report.yml 2 | # See: https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms 3 | 4 | name: Feature request 5 | description: Suggest an enhancement to this project. 6 | labels: 7 | - "type: enhancement" 8 | body: 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: Describe the request 13 | validations: 14 | required: true 15 | - type: textarea 16 | id: current 17 | attributes: 18 | label: Describe the current behavior 19 | description: | 20 | What is the current behavior of `arduino/setup-task` in relation to your request? 21 | How can we reproduce that behavior? 22 | validations: 23 | required: true 24 | - type: input 25 | id: project-version 26 | attributes: 27 | label: "'arduino/setup-task' version" 28 | description: | 29 | Which version of `arduino/setup-task` are you using? 30 | _This should be the most recent version available._ 31 | validations: 32 | required: true 33 | - type: textarea 34 | id: additional 35 | attributes: 36 | label: Additional context 37 | description: Add any additional information here. 38 | validations: 39 | required: false 40 | - type: checkboxes 41 | id: checklist 42 | attributes: 43 | label: Issue checklist 44 | description: Please double-check that you have done each of the following things before submitting the issue. 45 | options: 46 | - label: I searched for previous requests in [the issue tracker](https://github.com/arduino/setup-task/issues?q=) 47 | required: true 48 | - label: I verified the feature was still missing when using the latest version 49 | required: true 50 | - label: My request contains all necessary details 51 | required: true 52 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # See: https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#about-the-dependabotyml-file 2 | version: 2 3 | 4 | updates: 5 | # Configure check for outdated GitHub Actions actions in workflows. 6 | # See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-actions-up-to-date-with-dependabot 7 | - package-ecosystem: github-actions 8 | directory: / # Check the repository's workflows under /.github/workflows/ 9 | assignees: 10 | - per1234 11 | open-pull-requests-limit: 100 12 | schedule: 13 | interval: daily 14 | labels: 15 | - "topic: infrastructure" 16 | - package-ecosystem: npm 17 | directory: / 18 | assignees: 19 | - per1234 20 | open-pull-requests-limit: 100 21 | schedule: 22 | interval: daily 23 | labels: 24 | - "topic: infrastructure" 25 | ignore: 26 | - dependency-name: "@types/node" 27 | # @types/node should be kept in sync with the major version of Node.js that is in use. 28 | # So we only want automated updates for minor and patch releases of this dependency. 29 | update-types: 30 | - "version-update:semver-major" 31 | - package-ecosystem: pip 32 | directory: / 33 | assignees: 34 | - per1234 35 | open-pull-requests-limit: 100 36 | schedule: 37 | interval: daily 38 | labels: 39 | - "topic: infrastructure" 40 | -------------------------------------------------------------------------------- /.github/workflows/check-action-metadata-task.yml: -------------------------------------------------------------------------------- 1 | name: Check Action Metadata 2 | 3 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | paths: 7 | - ".github/workflows/check-action-metadata-task.ya?ml" 8 | - ".npmrc" 9 | - "action.ya?ml" 10 | - "package.json" 11 | - "package-lock.json" 12 | - "Taskfile.ya?ml" 13 | pull_request: 14 | paths: 15 | - ".github/workflows/check-action-metadata-task.ya?ml" 16 | - ".npmrc" 17 | - "action.ya?ml" 18 | - "package.json" 19 | - "package-lock.json" 20 | - "Taskfile.ya?ml" 21 | schedule: 22 | # Run every Tuesday at 8 AM UTC to catch breakage from changes to the JSON schema. 23 | - cron: "0 8 * * TUE" 24 | workflow_dispatch: 25 | repository_dispatch: 26 | 27 | jobs: 28 | validate: 29 | runs-on: ubuntu-latest 30 | 31 | steps: 32 | - name: Checkout repository 33 | uses: actions/checkout@v4 34 | 35 | - name: Setup Node.js 36 | uses: actions/setup-node@v4 37 | with: 38 | node-version-file: package.json 39 | 40 | - name: Install Task 41 | uses: arduino/setup-task@v2 42 | with: 43 | repo-token: ${{ secrets.GITHUB_TOKEN }} 44 | version: 3.x 45 | 46 | - name: Validate action.yml 47 | run: task --silent action:validate 48 | -------------------------------------------------------------------------------- /.github/workflows/check-license.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-license.md 2 | name: Check License 3 | 4 | env: 5 | EXPECTED_LICENSE_FILENAME: LICENSE 6 | # SPDX identifier: https://spdx.org/licenses/ 7 | EXPECTED_LICENSE_TYPE: GPL-3.0 8 | 9 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 10 | on: 11 | push: 12 | paths: 13 | - ".github/workflows/check-license.ya?ml" 14 | # See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file 15 | - "[cC][oO][pP][yY][iI][nN][gG]*" 16 | - "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*" 17 | - "[lL][iI][cC][eE][nN][cCsS][eE]*" 18 | - "[oO][fF][lL]*" 19 | - "[pP][aA][tT][eE][nN][tT][sS]*" 20 | pull_request: 21 | paths: 22 | - ".github/workflows/check-license.ya?ml" 23 | - "[cC][oO][pP][yY][iI][nN][gG]*" 24 | - "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*" 25 | - "[lL][iI][cC][eE][nN][cCsS][eE]*" 26 | - "[oO][fF][lL]*" 27 | - "[pP][aA][tT][eE][nN][tT][sS]*" 28 | workflow_dispatch: 29 | repository_dispatch: 30 | 31 | jobs: 32 | check-license: 33 | runs-on: ubuntu-latest 34 | 35 | steps: 36 | - name: Checkout repository 37 | uses: actions/checkout@v4 38 | 39 | - name: Install Ruby 40 | uses: ruby/setup-ruby@v1 41 | with: 42 | ruby-version: ruby # Install latest version 43 | 44 | - name: Install licensee 45 | run: gem install licensee 46 | 47 | - name: Check license file 48 | run: | 49 | EXIT_STATUS=0 50 | # See: https://github.com/licensee/licensee 51 | LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)" 52 | 53 | DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')" 54 | echo "Detected license file: $DETECTED_LICENSE_FILE" 55 | if [ "$DETECTED_LICENSE_FILE" != "\"${EXPECTED_LICENSE_FILENAME}\"" ]; then 56 | echo "::error file=${DETECTED_LICENSE_FILE}::detected license file $DETECTED_LICENSE_FILE doesn't match expected: $EXPECTED_LICENSE_FILENAME" 57 | EXIT_STATUS=1 58 | fi 59 | 60 | DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')" 61 | echo "Detected license type: $DETECTED_LICENSE_TYPE" 62 | if [ "$DETECTED_LICENSE_TYPE" != "\"${EXPECTED_LICENSE_TYPE}\"" ]; then 63 | echo "::error file=${DETECTED_LICENSE_FILE}::detected license type $DETECTED_LICENSE_TYPE doesn't match expected \"${EXPECTED_LICENSE_TYPE}\"" 64 | EXIT_STATUS=1 65 | fi 66 | 67 | exit $EXIT_STATUS 68 | -------------------------------------------------------------------------------- /.github/workflows/check-markdown-task.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md 2 | name: Check Markdown 3 | 4 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 5 | on: 6 | push: 7 | paths: 8 | - ".github/workflows/check-markdown-task.ya?ml" 9 | - ".markdown-link-check.json" 10 | - ".npmrc" 11 | - "package.json" 12 | - "package-lock.json" 13 | - "Taskfile.ya?ml" 14 | - "**/.markdownlint*" 15 | - "**.mdx?" 16 | - "**.mkdn" 17 | - "**.mdown" 18 | - "**.markdown" 19 | pull_request: 20 | paths: 21 | - ".github/workflows/check-markdown-task.ya?ml" 22 | - ".markdown-link-check.json" 23 | - ".npmrc" 24 | - "package.json" 25 | - "package-lock.json" 26 | - "Taskfile.ya?ml" 27 | - "**/.markdownlint*" 28 | - "**.mdx?" 29 | - "**.mkdn" 30 | - "**.mdown" 31 | - "**.markdown" 32 | schedule: 33 | # Run every Tuesday at 8 AM UTC to catch breakage caused by external changes. 34 | - cron: "0 8 * * TUE" 35 | workflow_dispatch: 36 | repository_dispatch: 37 | 38 | jobs: 39 | lint: 40 | runs-on: ubuntu-latest 41 | 42 | steps: 43 | - name: Checkout repository 44 | uses: actions/checkout@v4 45 | 46 | - name: Setup Node.js 47 | uses: actions/setup-node@v4 48 | with: 49 | node-version-file: package.json 50 | 51 | - name: Initialize markdownlint-cli problem matcher 52 | uses: xt0rted/markdownlint-problem-matcher@v3 53 | 54 | - name: Install Task 55 | uses: arduino/setup-task@v2 56 | with: 57 | repo-token: ${{ secrets.GITHUB_TOKEN }} 58 | version: 3.x 59 | 60 | - name: Lint 61 | run: task markdown:lint 62 | 63 | links: 64 | runs-on: ubuntu-latest 65 | 66 | steps: 67 | - name: Checkout repository 68 | uses: actions/checkout@v4 69 | 70 | - name: Setup Node.js 71 | uses: actions/setup-node@v4 72 | with: 73 | node-version-file: package.json 74 | 75 | - name: Install Task 76 | uses: arduino/setup-task@v2 77 | with: 78 | repo-token: ${{ secrets.GITHUB_TOKEN }} 79 | version: 3.x 80 | 81 | - name: Check links 82 | run: task --silent markdown:check-links 83 | -------------------------------------------------------------------------------- /.github/workflows/check-npm-dependencies-task.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-dependencies-task.md 2 | name: Check npm Dependencies 3 | 4 | # See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows 5 | on: 6 | create: 7 | push: 8 | paths: 9 | - ".github/workflows/check-npm-dependencies-task.ya?ml" 10 | - ".licenses/**" 11 | - ".licensed.json" 12 | - ".licensed.ya?ml" 13 | - "Taskfile.ya?ml" 14 | - "**/.gitmodules" 15 | - "**/.npmrc" 16 | - "**/package.json" 17 | - "**/package-lock.json" 18 | pull_request: 19 | paths: 20 | - ".github/workflows/check-npm-dependencies-task.ya?ml" 21 | - ".licenses/**" 22 | - ".licensed.json" 23 | - ".licensed.ya?ml" 24 | - "Taskfile.ya?ml" 25 | - "**/.gitmodules" 26 | - "**/.npmrc" 27 | - "**/package.json" 28 | - "**/package-lock.json" 29 | schedule: 30 | # Run periodically to catch breakage caused by external changes. 31 | - cron: "0 8 * * WED" 32 | workflow_dispatch: 33 | repository_dispatch: 34 | 35 | jobs: 36 | run-determination: 37 | runs-on: ubuntu-latest 38 | outputs: 39 | result: ${{ steps.determination.outputs.result }} 40 | steps: 41 | - name: Determine if the rest of the workflow should run 42 | id: determination 43 | run: | 44 | RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" 45 | # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. 46 | if [[ 47 | "${{ github.event_name }}" != "create" || 48 | "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX 49 | ]]; then 50 | # Run the other jobs. 51 | RESULT="true" 52 | else 53 | # There is no need to run the other jobs. 54 | RESULT="false" 55 | fi 56 | 57 | echo "::set-output name=result::$RESULT" 58 | 59 | check-cache: 60 | needs: run-determination 61 | if: needs.run-determination.outputs.result == 'true' 62 | runs-on: ubuntu-latest 63 | 64 | steps: 65 | - name: Checkout repository 66 | uses: actions/checkout@v4 67 | with: 68 | submodules: recursive 69 | 70 | # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. 71 | - name: Install Ruby 72 | uses: ruby/setup-ruby@v1 73 | with: 74 | ruby-version: ruby # Install latest version 75 | 76 | - name: Install licensed 77 | uses: licensee/setup-licensed@v1.3.2 78 | with: 79 | github_token: ${{ secrets.GITHUB_TOKEN }} 80 | version: 5.x 81 | 82 | - name: Setup Node.js 83 | uses: actions/setup-node@v4 84 | with: 85 | node-version-file: package.json 86 | 87 | - name: Install Task 88 | uses: arduino/setup-task@v2 89 | with: 90 | repo-token: ${{ secrets.GITHUB_TOKEN }} 91 | version: 3.x 92 | 93 | - name: Update dependencies license metadata cache 94 | run: task --silent general:cache-dep-licenses 95 | 96 | - name: Check for outdated cache 97 | id: diff 98 | run: | 99 | git add . 100 | if ! git diff --cached --color --exit-code; then 101 | echo 102 | echo "::error::Dependency license metadata out of sync. See: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-go-dependencies-task.md#metadata-cache" 103 | exit 1 104 | fi 105 | 106 | # Some might find it convenient to have CI generate the cache rather than setting up for it locally 107 | - name: Upload cache to workflow artifact 108 | if: failure() && steps.diff.outcome == 'failure' 109 | uses: actions/upload-artifact@v4 110 | with: 111 | if-no-files-found: error 112 | include-hidden-files: true 113 | name: dep-licenses-cache 114 | path: .licenses/ 115 | 116 | check-deps: 117 | needs: run-determination 118 | if: needs.run-determination.outputs.result == 'true' 119 | runs-on: ubuntu-latest 120 | 121 | steps: 122 | - name: Checkout repository 123 | uses: actions/checkout@v4 124 | with: 125 | submodules: recursive 126 | 127 | # This is required to allow licensee/setup-licensed to install Licensed via Ruby gem. 128 | - name: Install Ruby 129 | uses: ruby/setup-ruby@v1 130 | with: 131 | ruby-version: ruby # Install latest version 132 | 133 | - name: Install licensed 134 | uses: licensee/setup-licensed@v1.3.2 135 | with: 136 | github_token: ${{ secrets.GITHUB_TOKEN }} 137 | version: 5.x 138 | 139 | - name: Setup Node.js 140 | uses: actions/setup-node@v4 141 | with: 142 | node-version-file: package.json 143 | 144 | - name: Install Task 145 | uses: arduino/setup-task@v2 146 | with: 147 | repo-token: ${{ secrets.GITHUB_TOKEN }} 148 | version: 3.x 149 | 150 | - name: Check for dependencies with unapproved licenses 151 | run: task --silent general:check-dep-licenses 152 | -------------------------------------------------------------------------------- /.github/workflows/check-npm-task.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-task.md 2 | name: Check npm 3 | 4 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 5 | on: 6 | push: 7 | paths: 8 | - ".github/workflows/check-npm-task.ya?ml" 9 | - "**/.npmrc" 10 | - "**/package.json" 11 | - "**/package-lock.json" 12 | - "Taskfile.ya?ml" 13 | pull_request: 14 | paths: 15 | - ".github/workflows/check-npm-task.ya?ml" 16 | - "**/.npmrc" 17 | - "**/package.json" 18 | - "**/package-lock.json" 19 | - "Taskfile.ya?ml" 20 | schedule: 21 | # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema. 22 | - cron: "0 8 * * TUE" 23 | workflow_dispatch: 24 | repository_dispatch: 25 | 26 | permissions: 27 | contents: read 28 | 29 | jobs: 30 | validate: 31 | runs-on: ubuntu-latest 32 | 33 | steps: 34 | - name: Checkout repository 35 | uses: actions/checkout@v4 36 | 37 | - name: Setup Node.js 38 | uses: actions/setup-node@v4 39 | with: 40 | node-version-file: package.json 41 | 42 | - name: Install Task 43 | uses: arduino/setup-task@v2 44 | with: 45 | repo-token: ${{ secrets.GITHUB_TOKEN }} 46 | version: 3.x 47 | 48 | - name: Validate package.json 49 | run: task --silent npm:validate 50 | 51 | check-sync: 52 | runs-on: ubuntu-latest 53 | 54 | steps: 55 | - name: Checkout repository 56 | uses: actions/checkout@v4 57 | 58 | - name: Setup Node.js 59 | uses: actions/setup-node@v4 60 | with: 61 | node-version-file: package.json 62 | 63 | - name: Install Task 64 | uses: arduino/setup-task@v2 65 | with: 66 | repo-token: ${{ secrets.GITHUB_TOKEN }} 67 | version: 3.x 68 | 69 | - name: Install npm dependencies 70 | run: task npm:install-deps 71 | 72 | - name: Check package-lock.json 73 | run: git diff --color --exit-code package-lock.json 74 | -------------------------------------------------------------------------------- /.github/workflows/check-prettier-formatting-task.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md 2 | name: Check Prettier Formatting 3 | 4 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows 5 | on: 6 | push: 7 | paths: 8 | - ".github/workflows/check-prettier-formatting-task.ya?ml" 9 | - "Taskfile.ya?ml" 10 | - "**/.npmrc" 11 | - "**/.prettierignore" 12 | - "**/.prettierrc*" 13 | # CSS 14 | - "**.css" 15 | - "**.wxss" 16 | # PostCSS 17 | - "**.pcss" 18 | - "**.postcss" 19 | # Less 20 | - "**.less" 21 | # SCSS 22 | - "**.scss" 23 | # GraphQL 24 | - "**.graphqls?" 25 | - "**.gql" 26 | # handlebars 27 | - "**.handlebars" 28 | - "**.hbs" 29 | # HTML 30 | - "**.mjml" 31 | - "**.html?" 32 | - "**.html.hl" 33 | - "**.st" 34 | - "**.xht" 35 | - "**.xhtml" 36 | # Vue 37 | - "**.vue" 38 | # JavaScript 39 | - "**.flow" 40 | - "**._?jsb?" 41 | - "**.bones" 42 | - "**.cjs" 43 | - "**.es6?" 44 | - "**.frag" 45 | - "**.gs" 46 | - "**.jake" 47 | - "**.jscad" 48 | - "**.jsfl" 49 | - "**.js[ms]" 50 | - "**.[mn]js" 51 | - "**.pac" 52 | - "**.wxs" 53 | - "**.[xs]s?js" 54 | - "**.xsjslib" 55 | # JSX 56 | - "**.jsx" 57 | # TypeScript 58 | - "**.ts" 59 | # TSX 60 | - "**.tsx" 61 | # JSON 62 | - "**/.eslintrc" 63 | - "**.json" 64 | - "**.avsc" 65 | - "**.geojson" 66 | - "**.gltf" 67 | - "**.har" 68 | - "**.ice" 69 | - "**.JSON-tmLanguage" 70 | - "**.mcmeta" 71 | - "**.tfstate" 72 | - "**.topojson" 73 | - "**.webapp" 74 | - "**.webmanifest" 75 | - "**.yyp?" 76 | # JSONC 77 | - "**/.babelrc" 78 | - "**/.jscsrc" 79 | - "**/.js[hl]intrc" 80 | - "**.jsonc" 81 | - "**.sublime-*" 82 | # JSON5 83 | - "**.json5" 84 | # Markdown 85 | - "**.mdx?" 86 | - "**.markdown" 87 | - "**.mk?down" 88 | - "**.mdwn" 89 | - "**.mkdn?" 90 | - "**.ronn" 91 | - "**.workbook" 92 | # YAML 93 | - "**/.clang-format" 94 | - "**/.clang-tidy" 95 | - "**/.gemrc" 96 | - "**/glide.lock" 97 | - "**.ya?ml*" 98 | - "**.mir" 99 | - "**.reek" 100 | - "**.rviz" 101 | - "**.sublime-syntax" 102 | - "**.syntax" 103 | pull_request: 104 | paths: 105 | - ".github/workflows/check-prettier-formatting-task.ya?ml" 106 | - "Taskfile.ya?ml" 107 | - "**/.npmrc" 108 | - "**/.prettierignore" 109 | - "**/.prettierrc*" 110 | # CSS 111 | - "**.css" 112 | - "**.wxss" 113 | # PostCSS 114 | - "**.pcss" 115 | - "**.postcss" 116 | # Less 117 | - "**.less" 118 | # SCSS 119 | - "**.scss" 120 | # GraphQL 121 | - "**.graphqls?" 122 | - "**.gql" 123 | # handlebars 124 | - "**.handlebars" 125 | - "**.hbs" 126 | # HTML 127 | - "**.mjml" 128 | - "**.html?" 129 | - "**.html.hl" 130 | - "**.st" 131 | - "**.xht" 132 | - "**.xhtml" 133 | # Vue 134 | - "**.vue" 135 | # JavaScript 136 | - "**.flow" 137 | - "**._?jsb?" 138 | - "**.bones" 139 | - "**.cjs" 140 | - "**.es6?" 141 | - "**.frag" 142 | - "**.gs" 143 | - "**.jake" 144 | - "**.jscad" 145 | - "**.jsfl" 146 | - "**.js[ms]" 147 | - "**.[mn]js" 148 | - "**.pac" 149 | - "**.wxs" 150 | - "**.[xs]s?js" 151 | - "**.xsjslib" 152 | # JSX 153 | - "**.jsx" 154 | # TypeScript 155 | - "**.ts" 156 | # TSX 157 | - "**.tsx" 158 | # JSON 159 | - "**/.eslintrc" 160 | - "**.json" 161 | - "**.avsc" 162 | - "**.geojson" 163 | - "**.gltf" 164 | - "**.har" 165 | - "**.ice" 166 | - "**.JSON-tmLanguage" 167 | - "**.mcmeta" 168 | - "**.tfstate" 169 | - "**.topojson" 170 | - "**.webapp" 171 | - "**.webmanifest" 172 | - "**.yyp?" 173 | # JSONC 174 | - "**/.babelrc" 175 | - "**/.jscsrc" 176 | - "**/.js[hl]intrc" 177 | - "**.jsonc" 178 | - "**.sublime-*" 179 | # JSON5 180 | - "**.json5" 181 | # Markdown 182 | - "**.mdx?" 183 | - "**.markdown" 184 | - "**.mk?down" 185 | - "**.mdwn" 186 | - "**.mkdn?" 187 | - "**.ronn" 188 | - "**.workbook" 189 | # YAML 190 | - "**/.clang-format" 191 | - "**/.clang-tidy" 192 | - "**/.gemrc" 193 | - "**/glide.lock" 194 | - "**.ya?ml*" 195 | - "**.mir" 196 | - "**.reek" 197 | - "**.rviz" 198 | - "**.sublime-syntax" 199 | - "**.syntax" 200 | workflow_dispatch: 201 | repository_dispatch: 202 | 203 | jobs: 204 | check: 205 | runs-on: ubuntu-latest 206 | 207 | steps: 208 | - name: Checkout repository 209 | uses: actions/checkout@v4 210 | 211 | - name: Setup Node.js 212 | uses: actions/setup-node@v4 213 | with: 214 | node-version-file: package.json 215 | 216 | - name: Install Task 217 | uses: arduino/setup-task@v2 218 | with: 219 | repo-token: ${{ secrets.GITHUB_TOKEN }} 220 | version: 3.x 221 | 222 | - name: Format with Prettier 223 | run: task general:format-prettier 224 | 225 | - name: Check formatting 226 | run: git diff --color --exit-code 227 | -------------------------------------------------------------------------------- /.github/workflows/check-tsconfig-task.yml: -------------------------------------------------------------------------------- 1 | name: Check TypeScript Configuration 2 | 3 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | paths: 7 | - ".github/workflows/check-tsconfig-task.ya?ml" 8 | - "**/tsconfig*.json" 9 | - ".npmrc" 10 | - "package.json" 11 | - "package-lock.json" 12 | - "Taskfile.ya?ml" 13 | pull_request: 14 | paths: 15 | - ".github/workflows/check-tsconfig-task.ya?ml" 16 | - "**/tsconfig*.json" 17 | - ".npmrc" 18 | - "package.json" 19 | - "package-lock.json" 20 | - "Taskfile.ya?ml" 21 | schedule: 22 | # Run every Tuesday at 8 AM UTC to catch breakage from changes to the JSON schema. 23 | - cron: "0 8 * * TUE" 24 | workflow_dispatch: 25 | repository_dispatch: 26 | 27 | jobs: 28 | validate: 29 | runs-on: ubuntu-latest 30 | 31 | strategy: 32 | fail-fast: false 33 | 34 | matrix: 35 | file: 36 | - ./tsconfig.json 37 | - ./tsconfig.eslint.json 38 | 39 | steps: 40 | - name: Checkout repository 41 | uses: actions/checkout@v4 42 | 43 | - name: Setup Node.js 44 | uses: actions/setup-node@v4 45 | with: 46 | node-version-file: package.json 47 | 48 | - name: Install Task 49 | uses: arduino/setup-task@v2 50 | with: 51 | repo-token: ${{ secrets.GITHUB_TOKEN }} 52 | version: 3.x 53 | 54 | - name: Validate ${{ matrix.file }} 55 | env: 56 | TSCONFIG_PATH: ${{ matrix.file }} 57 | run: task --silent ts:validate 58 | -------------------------------------------------------------------------------- /.github/workflows/check-typescript-task.yml: -------------------------------------------------------------------------------- 1 | name: Check TypeScript 2 | 3 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | paths: 7 | - ".github/workflows/check-typescript-task.ya?ml" 8 | - ".eslintignore" 9 | - "**/.eslintrc*" 10 | - ".npmrc" 11 | - "package.json" 12 | - "package-lock.json" 13 | - "Taskfile.ya?ml" 14 | - "tsconfig.eslint.json" 15 | - "tsconfig.json" 16 | - "**.js" 17 | - "**.jsx" 18 | - "**.ts" 19 | - "**.tsx" 20 | pull_request: 21 | paths: 22 | - ".github/workflows/check-typescript-task.ya?ml" 23 | - ".eslintignore" 24 | - "**/.eslintrc*" 25 | - ".npmrc" 26 | - "package.json" 27 | - "package-lock.json" 28 | - "Taskfile.ya?ml" 29 | - "tsconfig.eslint.json" 30 | - "tsconfig.json" 31 | - "**.js" 32 | - "**.jsx" 33 | - "**.ts" 34 | - "**.tsx" 35 | schedule: 36 | # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to tools. 37 | - cron: "0 8 * * TUE" 38 | workflow_dispatch: 39 | repository_dispatch: 40 | 41 | jobs: 42 | check: 43 | runs-on: ubuntu-latest 44 | 45 | steps: 46 | - name: Checkout repository 47 | uses: actions/checkout@v4 48 | 49 | - name: Setup Node.js 50 | uses: actions/setup-node@v4 51 | with: 52 | node-version-file: package.json 53 | 54 | - name: Install Task 55 | uses: arduino/setup-task@v2 56 | with: 57 | repo-token: ${{ secrets.GITHUB_TOKEN }} 58 | version: 3.x 59 | 60 | - name: Lint 61 | run: task ts:lint 62 | -------------------------------------------------------------------------------- /.github/workflows/spell-check-task.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md 2 | name: Spell Check 3 | 4 | env: 5 | # See: https://github.com/actions/setup-python/tree/main#available-versions-of-python 6 | PYTHON_VERSION: "3.9" 7 | 8 | # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows 9 | on: 10 | push: 11 | pull_request: 12 | schedule: 13 | # Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates. 14 | - cron: "0 8 * * TUE" 15 | workflow_dispatch: 16 | repository_dispatch: 17 | 18 | jobs: 19 | spellcheck: 20 | runs-on: ubuntu-latest 21 | 22 | steps: 23 | - name: Checkout repository 24 | uses: actions/checkout@v4 25 | 26 | - name: Install Python 27 | uses: actions/setup-python@v5 28 | with: 29 | python-version: ${{ env.PYTHON_VERSION }} 30 | 31 | - name: Install Poetry 32 | run: pip install poetry 33 | 34 | - name: Install Task 35 | uses: arduino/setup-task@v2 36 | with: 37 | repo-token: ${{ secrets.GITHUB_TOKEN }} 38 | version: 3.x 39 | 40 | - name: Spell check 41 | run: task general:check-spelling 42 | -------------------------------------------------------------------------------- /.github/workflows/sync-labels-npm.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels-npm.md 2 | name: Sync Labels 3 | 4 | env: 5 | CONFIGURATIONS_FOLDER: .github/label-configuration-files 6 | CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file- 7 | 8 | # See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows 9 | on: 10 | push: 11 | paths: 12 | - ".github/workflows/sync-labels-npm.ya?ml" 13 | - ".github/label-configuration-files/*.ya?ml" 14 | - ".npmrc" 15 | - "package.json" 16 | - "package-lock.json" 17 | pull_request: 18 | paths: 19 | - ".github/workflows/sync-labels-npm.ya?ml" 20 | - ".github/label-configuration-files/*.ya?ml" 21 | - ".npmrc" 22 | - "package.json" 23 | - "package-lock.json" 24 | schedule: 25 | # Run daily at 8 AM UTC to sync with changes to shared label configurations. 26 | - cron: "0 8 * * *" 27 | workflow_dispatch: 28 | repository_dispatch: 29 | 30 | jobs: 31 | check: 32 | runs-on: ubuntu-latest 33 | 34 | steps: 35 | - name: Checkout repository 36 | uses: actions/checkout@v4 37 | 38 | - name: Setup Node.js 39 | uses: actions/setup-node@v4 40 | with: 41 | node-version-file: package.json 42 | 43 | - name: Download JSON schema for labels configuration file 44 | id: download-schema 45 | uses: carlosperate/download-file-action@v2 46 | with: 47 | file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json 48 | location: ${{ runner.temp }}/label-configuration-schema 49 | 50 | - name: Install JSON schema validator 51 | run: npm install 52 | 53 | - name: Validate local labels configuration 54 | run: | 55 | # See: https://github.com/ajv-validator/ajv-cli#readme 56 | npx \ 57 | --package=ajv-cli \ 58 | --package=ajv-formats \ 59 | ajv validate \ 60 | --all-errors \ 61 | -c ajv-formats \ 62 | -s "${{ steps.download-schema.outputs.file-path }}" \ 63 | -d "${{ env.CONFIGURATIONS_FOLDER }}/*.{yml,yaml}" 64 | 65 | download: 66 | needs: check 67 | runs-on: ubuntu-latest 68 | 69 | strategy: 70 | matrix: 71 | filename: 72 | # Filenames of the shared configurations to apply to the repository in addition to the local configuration. 73 | # https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/sync-labels 74 | - universal.yml 75 | - tooling.yml 76 | 77 | steps: 78 | - name: Download 79 | uses: carlosperate/download-file-action@v2 80 | with: 81 | file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} 82 | 83 | - name: Pass configuration files to next job via workflow artifact 84 | uses: actions/upload-artifact@v4 85 | with: 86 | path: | 87 | *.yaml 88 | *.yml 89 | if-no-files-found: error 90 | name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }} 91 | 92 | sync: 93 | needs: download 94 | runs-on: ubuntu-latest 95 | 96 | steps: 97 | - name: Set environment variables 98 | run: | 99 | # See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable 100 | echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV" 101 | 102 | - name: Determine whether to dry run 103 | id: dry-run 104 | if: > 105 | github.event_name == 'pull_request' || 106 | ( 107 | ( 108 | github.event_name == 'push' || 109 | github.event_name == 'workflow_dispatch' 110 | ) && 111 | github.ref != format('refs/heads/{0}', github.event.repository.default_branch) 112 | ) 113 | run: | 114 | # Use of this flag in the github-label-sync command will cause it to only check the validity of the 115 | # configuration. 116 | echo "::set-output name=flag::--dry-run" 117 | 118 | - name: Checkout repository 119 | uses: actions/checkout@v4 120 | 121 | - name: Download configuration file artifacts 122 | uses: actions/download-artifact@v4 123 | with: 124 | merge-multiple: true 125 | pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* 126 | path: ${{ env.CONFIGURATIONS_FOLDER }} 127 | 128 | - name: Remove unneeded artifacts 129 | uses: geekyeggo/delete-artifact@v5 130 | with: 131 | name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* 132 | 133 | - name: Setup Node.js 134 | uses: actions/setup-node@v4 135 | with: 136 | node-version-file: package.json 137 | 138 | - name: Merge label configuration files 139 | run: | 140 | # Merge all configuration files 141 | shopt -s extglob 142 | cat "${{ env.CONFIGURATIONS_FOLDER }}"/*.@(yml|yaml) > "${{ env.MERGED_CONFIGURATION_PATH }}" 143 | 144 | - name: Install github-label-sync 145 | run: npm install 146 | 147 | - name: Sync labels 148 | env: 149 | GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} 150 | run: | 151 | # See: https://github.com/Financial-Times/github-label-sync 152 | npx \ 153 | github-label-sync \ 154 | --labels "${{ env.MERGED_CONFIGURATION_PATH }}" \ 155 | ${{ steps.dry-run.outputs.flag }} \ 156 | ${{ github.repository }} 157 | -------------------------------------------------------------------------------- /.github/workflows/test-integration.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests 2 | 3 | # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows 4 | on: 5 | push: 6 | paths-ignore: 7 | - "__tests__/**" 8 | - ".github/**" 9 | - "!.github/workflows/test-integration.ya?ml" 10 | - "**.md" 11 | - ".gitignore" 12 | - "LICENSE" 13 | pull_request: 14 | paths-ignore: 15 | - "__tests__/**" 16 | - ".github/**" 17 | - "!.github/workflows/test-integration.ya?ml" 18 | - "**.md" 19 | - ".gitignore" 20 | - "LICENSE" 21 | schedule: 22 | # Run every Tuesday at 8 AM UTC to catch breakage caused by external changes. 23 | - cron: "0 8 * * TUE" 24 | workflow_dispatch: 25 | repository_dispatch: 26 | 27 | jobs: 28 | defaults: 29 | runs-on: ubuntu-latest 30 | 31 | steps: 32 | - name: Checkout repository 33 | uses: actions/checkout@v4 34 | 35 | - name: Run action with defaults 36 | uses: ./ # Use the action from the local path. 37 | 38 | - name: Run Task 39 | # Verify that Task was installed 40 | run: task --version 41 | 42 | version: 43 | name: version (${{ matrix.version.input }}, ${{ matrix.runs-on }}) 44 | runs-on: ${{ matrix.runs-on }} 45 | 46 | strategy: 47 | fail-fast: false 48 | 49 | matrix: 50 | runs-on: 51 | - ubuntu-latest 52 | - windows-latest 53 | - macos-latest 54 | version: 55 | - input: 2.x 56 | expected: "Task version: 2.8.1" 57 | - input: 3.36.x 58 | expected: "Task version: v3.36.0 (h1:XVJ5hQ5hdzTAulHpAGzbUMUuYr9MUOEQFOFazI3hUsY=)" 59 | - input: 3.37.2 60 | expected: "Task version: v3.37.2 (h1:Jwgvo+2vX79Fu+44xPxVKC5DIkUE89QeDjN2tmYaQzA=)" 61 | 62 | exclude: 63 | # The macos-latest runner is an Apple Silicon machine, but Task 2.x is only available for x86 on macOS, which 64 | # would cause a spurious test failure: "Unexpected HTTP response: 404" 65 | - runs-on: macos-latest 66 | version: 67 | input: 2.x 68 | expected: "Task version: 2.8.1" 69 | 70 | steps: 71 | - name: Checkout repository 72 | uses: actions/checkout@v4 73 | 74 | - name: Run action with version input set to ${{ matrix.version.input }} 75 | uses: ./ 76 | with: 77 | version: ${{ matrix.version.input }} 78 | repo-token: ${{ github.token }} 79 | 80 | - name: Check Task version 81 | shell: bash 82 | run: | 83 | [[ "$(task --version)" == "${{ matrix.version.expected }}" ]] 84 | 85 | invalid-version: 86 | runs-on: ubuntu-latest 87 | 88 | steps: 89 | - name: Checkout repository 90 | uses: actions/checkout@v4 91 | 92 | - name: Run action, using invalid version 93 | id: setup-task 94 | continue-on-error: true 95 | uses: ./ 96 | with: 97 | version: 2.42.x 98 | 99 | - name: Fail the job if the action run succeeded 100 | if: steps.setup-task.outcome == 'success' 101 | run: | 102 | echo "::error::The action run was expected to fail, but passed!" 103 | exit 1 104 | -------------------------------------------------------------------------------- /.github/workflows/test-typescript-task.yml: -------------------------------------------------------------------------------- 1 | name: Test TypeScript 2 | 3 | on: 4 | push: 5 | paths: 6 | - ".github/workflows/test-typescript-task.ya?ml" 7 | - ".npmrc" 8 | - "jest.config.js" 9 | - "package.json" 10 | - "package-lock.json" 11 | - "Taskfile.ya?ml" 12 | - "tsconfig.json" 13 | - "__tests__/**" 14 | - "**.js" 15 | - "**.jsx" 16 | - "**.ts" 17 | - "**.tsx" 18 | pull_request: 19 | paths: 20 | - ".github/workflows/test-typescript-task.ya?ml" 21 | - ".npmrc" 22 | - "jest.config.js" 23 | - "package.json" 24 | - "package-lock.json" 25 | - "Taskfile.ya?ml" 26 | - "tsconfig.json" 27 | - "__tests__/**" 28 | - "**.js" 29 | - "**.jsx" 30 | - "**.ts" 31 | - "**.tsx" 32 | workflow_dispatch: 33 | repository_dispatch: 34 | 35 | jobs: 36 | test: 37 | runs-on: ${{ matrix.operating-system }} 38 | 39 | strategy: 40 | fail-fast: false 41 | 42 | matrix: 43 | operating-system: 44 | - macos-latest 45 | - ubuntu-latest 46 | - windows-latest 47 | 48 | steps: 49 | - name: Checkout repository 50 | uses: actions/checkout@v4 51 | 52 | - name: Setup Node.js 53 | uses: actions/setup-node@v4 54 | with: 55 | node-version-file: package.json 56 | 57 | - name: Install Task 58 | uses: arduino/setup-task@v2 59 | with: 60 | repo-token: ${{ secrets.GITHUB_TOKEN }} 61 | version: 3.x 62 | 63 | - name: Run tests 64 | run: task ts:test 65 | 66 | check-packaging: 67 | runs-on: ubuntu-latest 68 | 69 | steps: 70 | - name: Checkout repository 71 | uses: actions/checkout@v4 72 | 73 | - name: Setup Node.js 74 | uses: actions/setup-node@v4 75 | with: 76 | node-version-file: package.json 77 | 78 | - name: Install Task 79 | uses: arduino/setup-task@v2 80 | with: 81 | repo-token: ${{ secrets.GITHUB_TOKEN }} 82 | version: 3.x 83 | 84 | - name: Build action 85 | run: task ts:build 86 | 87 | - name: Check packaging 88 | # Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain 89 | # Unix-style EOL. 90 | run: git diff --ignore-cr-at-eol --color --exit-code dist 91 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules/ 3 | 4 | # Ignore built ts files 5 | __tests__/runner/* 6 | lib/**/* 7 | -------------------------------------------------------------------------------- /.licensed.yml: -------------------------------------------------------------------------------- 1 | # See: https://github.com/github/licensed/blob/master/docs/configuration.md 2 | sources: 3 | npm: true 4 | 5 | shared_cache: true 6 | cache_path: .licenses/ 7 | 8 | apps: 9 | - source_path: ./ 10 | 11 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies/GPL-3.0/.licensed.yml 12 | allowed: 13 | # The following are based on: https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses 14 | - gpl-1.0-or-later 15 | - gpl-1.0+ # Deprecated ID for `gpl-1.0-or-later` 16 | - gpl-2.0-or-later 17 | - gpl-2.0+ # Deprecated ID for `gpl-2.0-or-later` 18 | - gpl-3.0-only 19 | - gpl-3.0 # Deprecated ID for `gpl-3.0-only` 20 | - gpl-3.0-or-later 21 | - gpl-3.0+ # Deprecated ID for `gpl-3.0-or-later` 22 | - lgpl-2.0-or-later 23 | - lgpl-2.0+ # Deprecated ID for `lgpl-2.0-or-later` 24 | - lgpl-2.1-only 25 | - lgpl-2.1 # Deprecated ID for `lgpl-2.1-only` 26 | - lgpl-2.1-or-later 27 | - lgpl-2.1+ # Deprecated ID for `lgpl-2.1-or-later` 28 | - lgpl-3.0-only 29 | - lgpl-3.0 # Deprecated ID for `lgpl-3.0-only` 30 | - lgpl-3.0-or-later 31 | - lgpl-3.0+ # Deprecated ID for `lgpl-3.0-or-later` 32 | - fsfap 33 | - apache-2.0 34 | - artistic-2.0 35 | - clartistic 36 | - sleepycat 37 | - bsl-1.0 38 | - bsd-3-clause 39 | - cecill-2.0 40 | - bsd-3-clause-clear 41 | # "Cryptix General License" - no SPDX ID (https://github.com/spdx/license-list-XML/issues/456) 42 | - ecos-2.0 43 | - ecl-2.0 44 | - efl-2.0 45 | - eudatagrid 46 | - mit 47 | - bsd-2-clause # Subsumed by `bsd-2-clause-views` 48 | - bsd-2-clause-netbsd # Deprecated ID for `bsd-2-clause` 49 | - bsd-2-clause-views # This is the version linked from https://www.gnu.org/licenses/license-list.html#FreeBSD 50 | - bsd-2-clause-freebsd # Deprecated ID for `bsd-2-clause-views` 51 | - ftl 52 | - hpnd 53 | - imatix 54 | - imlib2 55 | - ijg 56 | # "Informal license" - this is a general class of license 57 | - intel 58 | - isc 59 | - mpl-2.0 60 | - ncsa 61 | # "License of Netscape JavaScript" - no SPDX ID 62 | - oldap-2.7 63 | # "License of Perl 5 and below" - possibly `Artistic-1.0-Perl` ? 64 | - cc0-1.0 65 | - cc-pddc 66 | - psf-2.0 67 | - ruby 68 | - sgi-b-2.0 69 | - smlnj 70 | - standardml-nj # Deprecated ID for `smlnj` 71 | - unicode-dfs-2015 72 | - upl-1.0 73 | - unlicense 74 | - vim 75 | - w3c 76 | - wtfpl 77 | - lgpl-2.0-or-later with wxwindows-exception-3.1 78 | - wxwindows # Deprecated ID for `lgpl-2.0-or-later with wxwindows-exception-3.1` 79 | - x11 80 | - xfree86-1.1 81 | - zlib 82 | - zpl-2.0 83 | - zpl-2.1 84 | # The following are based on individual license text 85 | - eupl-1.2 86 | - liliq-r-1.1 87 | - liliq-rplus-1.1 88 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/core.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/core" 3 | version: 1.11.1 4 | type: npm 5 | summary: Actions core lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/core 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/exec.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/exec" 3 | version: 1.1.1 4 | type: npm 5 | summary: Actions exec lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/exec 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/http-client.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/http-client" 3 | version: 2.0.1 4 | type: npm 5 | summary: Actions Http Client 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/http-client 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | Actions Http Client for Node.js 12 | 13 | Copyright (c) GitHub, Inc. 14 | 15 | All rights reserved. 16 | 17 | MIT License 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 20 | associated documentation files (the "Software"), to deal in the Software without restriction, 21 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 22 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 23 | subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 28 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 29 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 31 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/io.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/io" 3 | version: 1.1.3 4 | type: npm 5 | summary: Actions io lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/io 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/@actions/tool-cache.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: "@actions/tool-cache" 3 | version: 2.0.2 4 | type: npm 5 | summary: Actions tool-cache lib 6 | homepage: https://github.com/actions/toolkit/tree/main/packages/tool-cache 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.md 10 | text: |- 11 | The MIT License (MIT) 12 | 13 | Copyright 2019 GitHub 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | notices: [] 21 | -------------------------------------------------------------------------------- /.licenses/npm/call-bind.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: call-bind 3 | version: 1.0.7 4 | type: npm 5 | summary: Robustly `.call.bind()` a function 6 | homepage: https://github.com/ljharb/call-bind#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2020 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/define-data-property.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: define-data-property 3 | version: 1.1.4 4 | type: npm 5 | summary: Define a data property on an object. Will fall back to assignment in an engine 6 | without descriptors. 7 | homepage: https://github.com/ljharb/define-data-property#readme 8 | license: mit 9 | licenses: 10 | - sources: LICENSE 11 | text: | 12 | MIT License 13 | 14 | Copyright (c) 2023 Jordan Harband 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/des.js.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: des.js 3 | version: 1.1.0 4 | type: npm 5 | summary: DES implementation 6 | homepage: https://github.com/indutny/des.js#readme 7 | license: mit 8 | licenses: 9 | - sources: README.md 10 | text: |- 11 | This software is licensed under the MIT License. 12 | 13 | Copyright Fedor Indutny, 2015. 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a 16 | copy of this software and associated documentation files (the 17 | "Software"), to deal in the Software without restriction, including 18 | without limitation the rights to use, copy, modify, merge, publish, 19 | distribute, sublicense, and/or sell copies of the Software, and to permit 20 | persons to whom the Software is furnished to do so, subject to the 21 | following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included 24 | in all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 27 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 29 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 30 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 31 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 32 | USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/es-define-property.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: es-define-property 3 | version: 1.0.0 4 | type: npm 5 | summary: "`Object.defineProperty`, but not IE 8's broken one." 6 | homepage: https://github.com/ljharb/es-define-property#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2024 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/es-errors.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: es-errors 3 | version: 1.3.0 4 | type: npm 5 | summary: A simple cache for a few of the JS Error constructors. 6 | homepage: https://github.com/ljharb/es-errors#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2024 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/function-bind.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: function-bind 3 | version: 1.1.2 4 | type: npm 5 | summary: Implementation of Function.prototype.bind 6 | homepage: https://github.com/Raynos/function-bind 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: |+ 11 | Copyright (c) 2013 Raynos. 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in 21 | all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | THE SOFTWARE. 30 | 31 | notices: [] 32 | ... 33 | -------------------------------------------------------------------------------- /.licenses/npm/get-intrinsic.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: get-intrinsic 3 | version: 1.2.4 4 | type: npm 5 | summary: Get and robustly cache all JS language-level intrinsics at first require 6 | time 7 | homepage: https://github.com/ljharb/get-intrinsic#readme 8 | license: mit 9 | licenses: 10 | - sources: LICENSE 11 | text: | 12 | MIT License 13 | 14 | Copyright (c) 2020 Jordan Harband 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/gopd.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: gopd 3 | version: 1.0.1 4 | type: npm 5 | summary: "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation." 6 | homepage: https://github.com/ljharb/gopd#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2022 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/has-property-descriptors.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: has-property-descriptors 3 | version: 1.0.2 4 | type: npm 5 | summary: Does the environment have full property descriptor support? Handles IE 8's 6 | broken defineProperty/gOPD. 7 | homepage: https://github.com/inspect-js/has-property-descriptors#readme 8 | license: mit 9 | licenses: 10 | - sources: LICENSE 11 | text: | 12 | MIT License 13 | 14 | Copyright (c) 2022 Inspect JS 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/has-proto.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: has-proto 3 | version: 1.0.3 4 | type: npm 5 | summary: Does this environment have the ability to get the [[Prototype]] of an object 6 | on creation with `__proto__`? 7 | homepage: https://github.com/inspect-js/has-proto#readme 8 | license: mit 9 | licenses: 10 | - sources: LICENSE 11 | text: | 12 | MIT License 13 | 14 | Copyright (c) 2022 Inspect JS 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/has-symbols.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: has-symbols 3 | version: 1.0.3 4 | type: npm 5 | summary: Determine if the JS environment has Symbol support. Supports spec, or shams. 6 | homepage: https://github.com/ljharb/has-symbols#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2016 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/hasown.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: hasown 3 | version: 2.0.2 4 | type: npm 5 | summary: A robust, ES3 compatible, "has own property" predicate. 6 | homepage: https://github.com/inspect-js/hasOwn#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) Jordan Harband and contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/inherits.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: inherits 3 | version: 2.0.4 4 | type: npm 5 | summary: Browser-friendly inheritance fully compatible with standard node.js inherits() 6 | homepage: 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: |+ 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 20 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 22 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 23 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 24 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 25 | PERFORMANCE OF THIS SOFTWARE. 26 | 27 | notices: [] 28 | ... 29 | -------------------------------------------------------------------------------- /.licenses/npm/js-md4.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: js-md4 3 | version: 0.3.2 4 | type: npm 5 | summary: A simple MD4 hash function for JavaScript supports UTF-8 encoding. 6 | homepage: https://github.com/emn178/js-md4 7 | license: mit 8 | licenses: 9 | - sources: LICENSE.txt 10 | text: | 11 | Copyright 2015-2017 Yi-Cyuan Chen 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining 14 | a copy of this software and associated documentation files (the 15 | "Software"), to deal in the Software without restriction, including 16 | without limitation the rights to use, copy, modify, merge, publish, 17 | distribute, sublicense, and/or sell copies of the Software, and to 18 | permit persons to whom the Software is furnished to do so, subject to 19 | the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be 22 | included in all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | - sources: README.md 32 | text: The project is released under the [MIT license](http://www.opensource.org/licenses/MIT). 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.licenses/npm/minimalistic-assert.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: minimalistic-assert 3 | version: 1.0.1 4 | type: npm 5 | summary: minimalistic-assert === 6 | homepage: https://github.com/calvinmetcalf/minimalistic-assert 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: |- 11 | Copyright 2015 Calvin Metcalf 12 | 13 | Permission to use, copy, modify, and/or distribute this software for any purpose 14 | with or without fee is hereby granted, provided that the above copyright notice 15 | and this permission notice appear in all copies. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 18 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 19 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 20 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 21 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 22 | OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 23 | PERFORMANCE OF THIS SOFTWARE. 24 | notices: [] 25 | -------------------------------------------------------------------------------- /.licenses/npm/object-inspect.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: object-inspect 3 | version: 1.13.2 4 | type: npm 5 | summary: string representations of objects in node and the browser 6 | homepage: https://github.com/inspect-js/object-inspect 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2013 James Halliday 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | - sources: readme.markdown 33 | text: |- 34 | MIT 35 | 36 | [package-url]: https://npmjs.org/package/object-inspect 37 | [npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg 38 | [deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg 39 | [deps-url]: https://david-dm.org/inspect-js/object-inspect 40 | [dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg 41 | [dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies 42 | [npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true 43 | [license-image]: https://img.shields.io/npm/l/object-inspect.svg 44 | [license-url]: LICENSE 45 | [downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg 46 | [downloads-url]: https://npm-stat.com/charts.html?package=object-inspect 47 | [codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg 48 | [codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ 49 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect 50 | [actions-url]: https://github.com/inspect-js/object-inspect/actions 51 | notices: [] 52 | -------------------------------------------------------------------------------- /.licenses/npm/qs.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: qs 3 | version: 6.11.0 4 | type: npm 5 | summary: A querystring parser that supports nesting and arrays, with a depth limit 6 | homepage: https://github.com/ljharb/qs 7 | license: bsd-3-clause 8 | licenses: 9 | - sources: LICENSE.md 10 | text: | 11 | BSD 3-Clause License 12 | 13 | Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) 14 | All rights reserved. 15 | 16 | Redistribution and use in source and binary forms, with or without 17 | modification, are permitted provided that the following conditions are met: 18 | 19 | 1. Redistributions of source code must retain the above copyright notice, this 20 | list of conditions and the following disclaimer. 21 | 22 | 2. Redistributions in binary form must reproduce the above copyright notice, 23 | this list of conditions and the following disclaimer in the documentation 24 | and/or other materials provided with the distribution. 25 | 26 | 3. Neither the name of the copyright holder nor the names of its 27 | contributors may be used to endorse or promote products derived from 28 | this software without specific prior written permission. 29 | 30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 31 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 32 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 33 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 34 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 35 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 36 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 37 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 38 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 | notices: [] 41 | -------------------------------------------------------------------------------- /.licenses/npm/semver-6.3.0.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: semver 3 | version: 6.3.0 4 | type: npm 5 | summary: The semantic version parser used by npm. 6 | homepage: 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter and Contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | notices: [] 27 | -------------------------------------------------------------------------------- /.licenses/npm/semver-7.7.2.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: semver 3 | version: 7.7.2 4 | type: npm 5 | summary: The semantic version parser used by npm. 6 | homepage: 7 | license: isc 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The ISC License 12 | 13 | Copyright (c) Isaac Z. Schlueter and Contributors 14 | 15 | Permission to use, copy, modify, and/or distribute this software for any 16 | purpose with or without fee is hereby granted, provided that the above 17 | copyright notice and this permission notice appear in all copies. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 20 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 21 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 22 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 23 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 24 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 25 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 | notices: [] 27 | -------------------------------------------------------------------------------- /.licenses/npm/set-function-length.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: set-function-length 3 | version: 1.2.2 4 | type: npm 5 | summary: Set a function's length property 6 | homepage: https://github.com/ljharb/set-function-length#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) Jordan Harband and contributors 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/side-channel.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: side-channel 3 | version: 1.0.4 4 | type: npm 5 | summary: Store information about any JS value in a side channel. Uses WeakMap if available. 6 | homepage: https://github.com/ljharb/side-channel#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | MIT License 12 | 13 | Copyright (c) 2019 Jordan Harband 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | notices: [] 33 | -------------------------------------------------------------------------------- /.licenses/npm/tunnel.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: tunnel 3 | version: 0.0.6 4 | type: npm 5 | summary: Node HTTP/HTTPS Agents for tunneling proxies 6 | homepage: https://github.com/koichik/node-tunnel/ 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | The MIT License (MIT) 12 | 13 | Copyright (c) 2012 Koichi Kobayashi 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy 16 | of this software and associated documentation files (the "Software"), to deal 17 | in the Software without restriction, including without limitation the rights 18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 19 | copies of the Software, and to permit persons to whom the Software is 20 | furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in 23 | all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 31 | THE SOFTWARE. 32 | - sources: README.md 33 | text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) 34 | license. 35 | notices: [] 36 | -------------------------------------------------------------------------------- /.licenses/npm/typed-rest-client.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: typed-rest-client 3 | version: 2.1.0 4 | type: npm 5 | summary: Node Rest and Http Clients for use with TypeScript 6 | homepage: https://github.com/Microsoft/typed-rest-client#readme 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | Typed Rest Client for Node.js 12 | 13 | Copyright (c) Microsoft Corporation 14 | 15 | All rights reserved. 16 | 17 | MIT License 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 20 | associated documentation files (the "Software"), to deal in the Software without restriction, 21 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 22 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 23 | subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 28 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 29 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 31 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | 33 | 34 | /* Node-SMB/ntlm 35 | * https://github.com/Node-SMB/ntlm 36 | * Permission to use, copy, modify, and/or distribute this software for any 37 | * purpose with or without fee is hereby granted, provided that the above 38 | * copyright notice and this permission notice appear in all copies. 39 | * 40 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 41 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 42 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 43 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 44 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 45 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 46 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 47 | * 48 | * Copyright (C) 2012 Joshua M. Clulow 49 | */ 50 | notices: [] 51 | -------------------------------------------------------------------------------- /.licenses/npm/underscore.dep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: underscore 3 | version: 1.13.1 4 | type: npm 5 | summary: JavaScript's functional programming helper library. 6 | homepage: https://underscorejs.org 7 | license: mit 8 | licenses: 9 | - sources: LICENSE 10 | text: | 11 | Copyright (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors 12 | 13 | Permission is hereby granted, free of charge, to any person 14 | obtaining a copy of this software and associated documentation 15 | files (the "Software"), to deal in the Software without 16 | restriction, including without limitation the rights to use, 17 | copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the 19 | Software is furnished to do so, subject to the following 20 | conditions: 21 | 22 | The above copyright notice and this permission notice shall be 23 | included in all copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 27 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 29 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 31 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | OTHER DEALINGS IN THE SOFTWARE. 33 | notices: [] 34 | -------------------------------------------------------------------------------- /.markdown-link-check.json: -------------------------------------------------------------------------------- 1 | { 2 | "httpHeaders": [ 3 | { 4 | "urls": ["https://docs.github.com/"], 5 | "headers": { 6 | "Accept-Encoding": "gzip, deflate, br" 7 | } 8 | } 9 | ], 10 | "retryOn429": true, 11 | "retryCount": 3, 12 | "aliveStatusCodes": [200, 206] 13 | } 14 | -------------------------------------------------------------------------------- /.markdownlint.yml: -------------------------------------------------------------------------------- 1 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlint.yml 2 | # See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md 3 | # The code style defined in this file is the official standardized style to be used in all Arduino projects and should 4 | # not be modified. 5 | # Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment. 6 | 7 | default: false 8 | MD001: false 9 | MD002: false 10 | MD003: false # Prettier 11 | MD004: false # Prettier 12 | MD005: false # Prettier 13 | MD006: false # Prettier 14 | MD007: false # Prettier 15 | MD008: false # Prettier 16 | MD009: 17 | br_spaces: 0 18 | strict: true 19 | list_item_empty_lines: false # Prettier 20 | MD010: false # Prettier 21 | MD011: true 22 | MD012: false # Prettier 23 | MD013: false 24 | MD014: false 25 | MD018: true 26 | MD019: false # Prettier 27 | MD020: true 28 | MD021: false # Prettier 29 | MD022: false # Prettier 30 | MD023: false # Prettier 31 | MD024: false 32 | MD025: 33 | level: 1 34 | front_matter_title: '^\s*"?title"?\s*[:=]' 35 | MD026: false 36 | MD027: false # Prettier 37 | MD028: false 38 | MD029: 39 | style: one 40 | MD030: 41 | ul_single: 1 42 | ol_single: 1 43 | ul_multi: 1 44 | ol_multi: 1 45 | MD031: false # Prettier 46 | MD032: false # Prettier 47 | MD033: false 48 | MD034: false 49 | MD035: false # Prettier 50 | MD036: false 51 | MD037: true 52 | MD038: true 53 | MD039: true 54 | MD040: false 55 | MD041: false 56 | MD042: true 57 | MD043: false 58 | MD044: false 59 | MD045: true 60 | MD046: 61 | style: fenced 62 | MD047: false # Prettier 63 | -------------------------------------------------------------------------------- /.markdownlintignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # See: https://docs.npmjs.com/cli/configuring-npm/npmrc 2 | 3 | engine-strict = true 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /.licenses/ 2 | /dist/ 3 | /lib/ 4 | /node_modules/ 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Development workflow 2 | 3 | ### 1. Install Tools 4 | 5 | #### Task 6 | 7 | Common development processes are run using [the **Task** task runner tool](https://taskfile.dev/#/). 8 | 9 | Follow the installation instructions here:
10 | https://taskfile.dev/#/installation 11 | 12 | #### Node.js 13 | 14 | [**npm**](https://www.npmjs.com/) is used for dependency management. 15 | 16 | Follow the installation instructions here:
17 | https://nodejs.dev/en/download 18 | 19 | Node.js 20.x is used for development of this project. [nvm](https://github.com/nvm-sh/nvm) is recommended to easily switch between Node.js versions. 20 | 21 | #### Extras 22 | 23 | Some optional tools used by this project: 24 | 25 | - [**Python**](https://www.python.org/downloads/) 26 | - [**Poetry**](https://python-poetry.org/docs/#installation) 27 | 28 | ### 2. Coding 29 | 30 | Now you're ready to work some [TypeScript](https://www.typescriptlang.org/) magic! 31 | 32 | Make sure to write or update tests for your work when appropriate. 33 | 34 | ### 3. Format code 35 | 36 | Format the code to follow the standard style for the project: 37 | 38 | ``` 39 | npm run format 40 | ``` 41 | 42 | ### 4. Run tests 43 | 44 | Run the tests to ensure that the code works as expected: 45 | 46 | ``` 47 | task check 48 | ``` 49 | 50 | ### 5. Build 51 | 52 | It is necessary to compile the code before it can be used by GitHub Actions. Remember to run this command before committing any code changes: 53 | 54 | ``` 55 | task build 56 | ``` 57 | 58 | ### 6. Commit 59 | 60 | Everything is now ready to make your contribution to the project, so commit it to the repository and submit a pull request. 61 | 62 | Thanks! 63 | 64 | ## Dependency license metadata 65 | 66 | Metadata about the license types of all dependencies is cached in the repository. To update this cache, run the following command from the repository root folder: 67 | 68 | ``` 69 | task general:cache-dep-licenses 70 | ``` 71 | 72 | The necessary **Licensed** tool can be installed by following [these instructions](https://github.com/github/licensed#as-an-executable). 73 | 74 | Unfortunately, **Licensed** does not have support for being used on the **Windows** operating system. 75 | 76 | An updated cache is also generated whenever the cache is found to be outdated by the by the "Check Go Dependencies" CI workflow and made available for download via the `dep-licenses-cache` [workflow artifact](https://docs.github.com/actions/managing-workflow-runs/downloading-workflow-artifacts). 77 | 78 | ## Enable verbose logging for a pipeline 79 | 80 | Additional log events with the prefix ::debug:: can be enabled by setting the secret `ACTIONS_STEP_DEBUG` to `true`. 81 | 82 | See [step-debug-logs](https://github.com/actions/toolkit/blob/master/docs/action-debugging.md#step-debug-logs) for reference. 83 | 84 | ## Release workflow 85 | 86 | Instructions for releasing a new version of the action: 87 | 88 | 1. If the release will increment the major version, update the action refs in the examples in README.md (e.g., `uses: arduino/setup-task@v1` -> `uses: arduino/setup-task@v2`). 89 | 1. Create a [GitHub release](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release), following the `vX.Y.Z` tag name convention. Make sure to follow [the SemVer specification](https://semver.org/). 90 | 1. Rebase the release branch for that major version (e.g., `v1` branch for the `v1.x.x` tags) on the tag. If no branch exists for the release's major version, create one. 91 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `arduino/setup-task` 2 | 3 | [![Test TypeScript status](https://github.com/arduino/setup-task/actions/workflows/test-typescript-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/test-typescript-task.yml) 4 | [![Check TypeScript status](https://github.com/arduino/setup-task/actions/workflows/check-typescript-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-typescript-task.yml) 5 | [![Check TypeScript Configuration status](https://github.com/arduino/setup-task/actions/workflows/check-tsconfig-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-tsconfig-task.yml) 6 | [![Check npm status](https://github.com/arduino/setup-task/actions/workflows/check-npm-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-npm-task.yml) 7 | [![Integration Tests status](https://github.com/arduino/setup-task/actions/workflows/test-integration.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/test-integration.yml) 8 | [![Check Action Metadata status](https://github.com/arduino/setup-task/actions/workflows/check-action-metadata-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-action-metadata-task.yml) 9 | [![Check Prettier Formatting status](https://github.com/arduino/setup-task/actions/workflows/check-prettier-formatting-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-prettier-formatting-task.yml) 10 | [![Check Markdown status](https://github.com/arduino/setup-task/actions/workflows/check-markdown-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-markdown-task.yml) 11 | [![Spell Check status](https://github.com/arduino/setup-task/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/spell-check-task.yml) 12 | [![Check License status](https://github.com/arduino/setup-task/actions/workflows/check-license.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-license.yml) 13 | [![Check npm Dependencies status](https://github.com/arduino/setup-task/actions/workflows/check-npm-dependencies-task.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/check-npm-dependencies-task.yml) 14 | [![Sync Labels status](https://github.com/arduino/setup-task/actions/workflows/sync-labels-npm.yml/badge.svg)](https://github.com/arduino/setup-task/actions/workflows/sync-labels-npm.yml) 15 | 16 | A [GitHub Actions](https://docs.github.com/en/actions) action that makes the [Task](https://taskfile.dev/#/) task runner / build tool available to use in your workflow. 17 | 18 | ## Inputs 19 | 20 | ### `version` 21 | 22 | The version of [Task](https://taskfile.dev/#/) to install. 23 | Can be an exact version (e.g., `3.4.2`) or a version range (e.g., `3.x`). 24 | 25 | **Default**: `3.x` 26 | 27 | ### `repo-token` 28 | 29 | (**Optional**) GitHub access token used for GitHub API requests. 30 | Heavy usage of the action can result in workflow run failures caused by rate limiting. GitHub provides a more generous allowance for Authenticated API requests. 31 | 32 | It will be convenient to use [`${{ secrets.GITHUB_TOKEN }}`](https://docs.github.com/en/actions/reference/authentication-in-a-workflow). 33 | 34 | ## Usage 35 | 36 | To get the action's default version of Task just add this step: 37 | 38 | ```yaml 39 | - name: Install Task 40 | uses: arduino/setup-task@v2 41 | ``` 42 | 43 | If you want to pin a major or minor version you can use the `.x` wildcard: 44 | 45 | ```yaml 46 | - name: Install Task 47 | uses: arduino/setup-task@v2 48 | with: 49 | version: 2.x 50 | ``` 51 | 52 | To pin the exact version: 53 | 54 | ```yaml 55 | - name: Install Task 56 | uses: arduino/setup-task@v2 57 | with: 58 | version: 2.6.1 59 | ``` 60 | 61 | ## Security 62 | 63 | If you think you found a vulnerability or other security-related bug in this project, please read our 64 | [security policy](https://github.com/arduino/setup-task/security/policy) and report the bug to our Security Team 🛡️ 65 | Thank you! 66 | 67 | e-mail contact: security@arduino.cc 68 | -------------------------------------------------------------------------------- /Taskfile.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | vars: 4 | # Last version of ajv-cli with support for the JSON schema "Draft 4" specification 5 | SCHEMA_DRAFT_4_AJV_CLI_VERSION: 3.3.0 6 | 7 | tasks: 8 | build: 9 | desc: Build the project 10 | deps: 11 | - task: ts:build 12 | 13 | check: 14 | desc: Check for problems with the project 15 | deps: 16 | - task: action:validate 17 | - task: general:check-spelling 18 | - task: markdown:check-links 19 | - task: markdown:lint 20 | - task: npm:validate 21 | - task: ts:lint 22 | - task: ts:test 23 | - task: ts:validate 24 | vars: 25 | TSCONFIG_PATH: "./tsconfig.json" 26 | - task: ts:validate 27 | vars: 28 | TSCONFIG_PATH: "./tsconfig.eslint.json" 29 | 30 | fix: 31 | desc: Make automated corrections to the project's files 32 | deps: 33 | - task: general:correct-spelling 34 | - task: general:format-prettier 35 | - task: markdown:fix 36 | - task: ts:build 37 | - task: ts:fix-lint 38 | 39 | action:validate: 40 | desc: Validate GitHub Actions metadata against JSON schema 41 | vars: 42 | ACTION_METADATA_SCHEMA_PATH: 43 | sh: mktemp -t github-action-schema-XXXXXXXXXX.json 44 | deps: 45 | - task: npm:install-deps 46 | cmds: 47 | - wget --quiet --output-document="{{.ACTION_METADATA_SCHEMA_PATH}}" https://json.schemastore.org/github-action 48 | - npx ajv-cli validate --strict=false -s "{{.ACTION_METADATA_SCHEMA_PATH}}" -d "action.yml" 49 | 50 | docs:generate: 51 | desc: Create all generated documentation content 52 | # This is an "umbrella" task used to call any documentation generation processes the project has. 53 | # It can be left empty if there are none. 54 | 55 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml 56 | general:cache-dep-licenses: 57 | desc: Cache dependency license metadata 58 | deps: 59 | - task: general:install-deps 60 | cmds: 61 | - | 62 | if ! which licensed &>/dev/null; then 63 | if [[ {{OS}} == "windows" ]]; then 64 | echo "Licensed does not have Windows support." 65 | echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact." 66 | else 67 | echo "licensed not found or not in PATH. Please install: https://github.com/github/licensed#as-an-executable" 68 | fi 69 | exit 1 70 | fi 71 | - licensed cache 72 | 73 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml 74 | general:check-dep-licenses: 75 | desc: Check for unapproved dependency licenses 76 | deps: 77 | - task: general:cache-dep-licenses 78 | cmds: 79 | - licensed status 80 | 81 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml 82 | general:check-spelling: 83 | desc: Check for commonly misspelled words 84 | deps: 85 | - task: poetry:install-deps 86 | cmds: 87 | - poetry run codespell 88 | 89 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml 90 | general:correct-spelling: 91 | desc: Correct commonly misspelled words where possible 92 | deps: 93 | - task: poetry:install-deps 94 | cmds: 95 | - poetry run codespell --write-changes 96 | 97 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml 98 | general:format-prettier: 99 | desc: Format all supported files with Prettier 100 | deps: 101 | - task: npm:install-deps 102 | cmds: 103 | - npx prettier --write . 104 | 105 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-npm-dependencies-task/Taskfile.yml 106 | general:install-deps: 107 | desc: Install project dependencies 108 | deps: 109 | - task: npm:install-deps 110 | 111 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml 112 | markdown:check-links: 113 | desc: Check for broken links 114 | deps: 115 | - task: docs:generate 116 | - task: npm:install-deps 117 | cmds: 118 | - | 119 | if [[ "{{.OS}}" == "Windows_NT" ]]; then 120 | # npx --call uses the native shell, which makes it too difficult to use npx for this application on Windows, 121 | # so the Windows user is required to have markdown-link-check installed and in PATH. 122 | if ! which markdown-link-check &>/dev/null; then 123 | echo "markdown-link-check not found or not in PATH. Please install: https://github.com/tcort/markdown-link-check#readme" 124 | exit 1 125 | fi 126 | # Default behavior of the task on Windows is to exit the task when the first broken link causes a non-zero 127 | # exit status, but it's better to check all links before exiting. 128 | set +o errexit 129 | STATUS=0 130 | # Using -regex instead of -name to avoid Task's behavior of globbing even when quoted on Windows 131 | # The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives 132 | # \ characters special treatment on Windows in an attempt to support them as path separators. 133 | for file in \ 134 | $(find . -type d -name node_modules -prune -o -regex ".*[.]md" -print); do 135 | markdown-link-check \ 136 | --quiet \ 137 | --config "./.markdown-link-check.json" \ 138 | "$file" 139 | STATUS=$(( $STATUS + $? )) 140 | done 141 | exit $STATUS 142 | else 143 | npx --package=markdown-link-check --call=' 144 | STATUS=0 145 | for file in \ 146 | $(find . -type d -name node_modules -prune -o -regex ".*[.]md" -print); do 147 | markdown-link-check \ 148 | --quiet \ 149 | --config "./.markdown-link-check.json" \ 150 | "$file" 151 | STATUS=$(( $STATUS + $? )) 152 | done 153 | exit $STATUS 154 | ' 155 | fi 156 | 157 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml 158 | markdown:fix: 159 | desc: Automatically correct linting violations in Markdown files where possible 160 | deps: 161 | - task: npm:install-deps 162 | cmds: 163 | - npx markdownlint-cli --fix "**/*.md" 164 | 165 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml 166 | markdown:lint: 167 | desc: Check for problems in Markdown files 168 | deps: 169 | - task: npm:install-deps 170 | cmds: 171 | - npx markdownlint-cli "**/*.md" 172 | 173 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml 174 | npm:install-deps: 175 | desc: Install dependencies managed by npm 176 | cmds: 177 | - npm install 178 | 179 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-npm-task/Taskfile.yml 180 | npm:validate: 181 | desc: Validate npm configuration files against their JSON schema 182 | vars: 183 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json 184 | SCHEMA_URL: https://json.schemastore.org/package.json 185 | SCHEMA_PATH: 186 | sh: task utility:mktemp-file TEMPLATE="package-json-schema-XXXXXXXXXX.json" 187 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/ava.json 188 | AVA_SCHEMA_URL: https://json.schemastore.org/ava.json 189 | AVA_SCHEMA_PATH: 190 | sh: task utility:mktemp-file TEMPLATE="ava-schema-XXXXXXXXXX.json" 191 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/base.json 192 | BASE_SCHEMA_URL: https://json.schemastore.org/base.json 193 | BASE_SCHEMA_PATH: 194 | sh: task utility:mktemp-file TEMPLATE="base-schema-XXXXXXXXXX.json" 195 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/eslintrc.json 196 | ESLINTRC_SCHEMA_URL: https://json.schemastore.org/eslintrc.json 197 | ESLINTRC_SCHEMA_PATH: 198 | sh: task utility:mktemp-file TEMPLATE="eslintrc-schema-XXXXXXXXXX.json" 199 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/jscpd.json 200 | JSCPD_SCHEMA_URL: https://json.schemastore.org/jscpd.json 201 | JSCPD_SCHEMA_PATH: 202 | sh: task utility:mktemp-file TEMPLATE="jscpd-schema-XXXXXXXXXX.json" 203 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/npm-badges.json 204 | NPM_BADGES_SCHEMA_URL: https://json.schemastore.org/npm-badges.json 205 | NPM_BADGES_SCHEMA_PATH: 206 | sh: task utility:mktemp-file TEMPLATE="npm-badges-schema-XXXXXXXXXX.json" 207 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/partial-eslint-plugins.json 208 | PARTIAL_ESLINT_PLUGINS_SCHEMA_URL: https://json.schemastore.org/partial-eslint-plugins.json 209 | PARTIAL_ESLINT_PLUGINS_PATH: 210 | sh: task utility:mktemp-file TEMPLATE="partial-eslint-plugins-schema-XXXXXXXXXX.json" 211 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/prettierrc.json 212 | PRETTIERRC_SCHEMA_URL: https://json.schemastore.org/prettierrc.json 213 | PRETTIERRC_SCHEMA_PATH: 214 | sh: task utility:mktemp-file TEMPLATE="prettierrc-schema-XXXXXXXXXX.json" 215 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/semantic-release.json 216 | SEMANTIC_RELEASE_SCHEMA_URL: https://json.schemastore.org/semantic-release.json 217 | SEMANTIC_RELEASE_SCHEMA_PATH: 218 | sh: task utility:mktemp-file TEMPLATE="semantic-release-schema-XXXXXXXXXX.json" 219 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/stylelintrc.json 220 | STYLELINTRC_SCHEMA_URL: https://json.schemastore.org/stylelintrc.json 221 | STYLELINTRC_SCHEMA_PATH: 222 | sh: task utility:mktemp-file TEMPLATE="stylelintrc-schema-XXXXXXXXXX.json" 223 | INSTANCE_PATH: >- 224 | {{default "." .PROJECT_PATH}}/package.json 225 | PROJECT_FOLDER: 226 | sh: pwd 227 | WORKING_FOLDER: 228 | sh: task utility:mktemp-folder TEMPLATE="dependabot-validate-XXXXXXXXXX" 229 | cmds: 230 | - wget --quiet --output-document="{{.SCHEMA_PATH}}" {{.SCHEMA_URL}} 231 | - wget --quiet --output-document="{{.AVA_SCHEMA_PATH}}" {{.AVA_SCHEMA_URL}} 232 | - wget --quiet --output-document="{{.BASE_SCHEMA_PATH}}" {{.BASE_SCHEMA_URL}} 233 | - wget --quiet --output-document="{{.ESLINTRC_SCHEMA_PATH}}" {{.ESLINTRC_SCHEMA_URL}} 234 | - wget --quiet --output-document="{{.JSCPD_SCHEMA_PATH}}" {{.JSCPD_SCHEMA_URL}} 235 | - wget --quiet --output-document="{{.NPM_BADGES_SCHEMA_PATH}}" {{.NPM_BADGES_SCHEMA_URL}} 236 | - wget --quiet --output-document="{{.PARTIAL_ESLINT_PLUGINS_PATH}}" {{.PARTIAL_ESLINT_PLUGINS_SCHEMA_URL}} 237 | - wget --quiet --output-document="{{.PRETTIERRC_SCHEMA_PATH}}" {{.PRETTIERRC_SCHEMA_URL}} 238 | - wget --quiet --output-document="{{.SEMANTIC_RELEASE_SCHEMA_PATH}}" {{.SEMANTIC_RELEASE_SCHEMA_URL}} 239 | - wget --quiet --output-document="{{.STYLELINTRC_SCHEMA_PATH}}" {{.STYLELINTRC_SCHEMA_URL}} 240 | - | 241 | cd "{{.WORKING_FOLDER}}" # Workaround for https://github.com/npm/cli/issues/3210 242 | npx ajv-cli@{{.SCHEMA_DRAFT_4_AJV_CLI_VERSION}} validate \ 243 | --all-errors \ 244 | -s "{{.SCHEMA_PATH}}" \ 245 | -r "{{.AVA_SCHEMA_PATH}}" \ 246 | -r "{{.BASE_SCHEMA_PATH}}" \ 247 | -r "{{.ESLINTRC_SCHEMA_PATH}}" \ 248 | -r "{{.JSCPD_SCHEMA_PATH}}" \ 249 | -r "{{.NPM_BADGES_SCHEMA_PATH}}" \ 250 | -r "{{.PARTIAL_ESLINT_PLUGINS_PATH}}" \ 251 | -r "{{.PRETTIERRC_SCHEMA_PATH}}" \ 252 | -r "{{.SEMANTIC_RELEASE_SCHEMA_PATH}}" \ 253 | -r "{{.STYLELINTRC_SCHEMA_PATH}}" \ 254 | -d "{{.PROJECT_FOLDER}}/{{.INSTANCE_PATH}}" 255 | 256 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml 257 | poetry:install-deps: 258 | desc: Install dependencies managed by Poetry 259 | cmds: 260 | - poetry install --no-root 261 | 262 | ts:build: 263 | desc: Build the action's TypeScript code. 264 | deps: 265 | - task: npm:install-deps 266 | cmds: 267 | - npx tsc 268 | - npx ncc build 269 | 270 | ts:fix-lint: 271 | desc: Fix TypeScript code linting violations 272 | deps: 273 | - task: npm:install-deps 274 | cmds: 275 | - npx eslint --ext .js,.jsx,.ts,.tsx --fix . 276 | 277 | ts:lint: 278 | desc: Lint TypeScript code 279 | deps: 280 | - task: npm:install-deps 281 | cmds: 282 | - npx eslint --ext .js,.jsx,.ts,.tsx . 283 | 284 | ts:test: 285 | desc: Test the action's TypeScript code. 286 | deps: 287 | - task: npm:install-deps 288 | cmds: 289 | - npx jest 290 | 291 | ts:validate: 292 | desc: Validate TypeScript configuration file against its JSON schema 293 | vars: 294 | # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/tsconfig.json 295 | SCHEMA_URL: https://json.schemastore.org/tsconfig.json 296 | SCHEMA_PATH: 297 | sh: task utility:mktemp-file TEMPLATE="tsconfig-schema-XXXXXXXXXX.json" 298 | INSTANCE_PATH: '{{default "./tsconfig.json" .TSCONFIG_PATH}}' 299 | WORKING_FOLDER: 300 | sh: task utility:mktemp-folder TEMPLATE="ts-validate-XXXXXXXXXX" 301 | WORKING_INSTANCE_PATH: 302 | sh: echo "{{.WORKING_FOLDER}}/$(basename "{{.INSTANCE_PATH}}")" 303 | deps: 304 | - task: npm:install-deps 305 | cmds: 306 | - | 307 | # TypeScript allows comments in tsconfig.json. 308 | # ajv-cli did not support comments in JSON at the 3.x version in use (support was added in a later version). 309 | npx strip-json-comments-cli \ 310 | --no-whitespace \ 311 | "{{.INSTANCE_PATH}}" \ 312 | > "{{.WORKING_INSTANCE_PATH}}" 313 | - | 314 | wget \ 315 | --quiet \ 316 | --output-document="{{.SCHEMA_PATH}}" \ 317 | {{.SCHEMA_URL}} 318 | - | 319 | cd "{{.WORKING_FOLDER}}" # Workaround for https://github.com/npm/cli/issues/3210 320 | npx ajv-cli@{{.SCHEMA_DRAFT_4_AJV_CLI_VERSION}} validate \ 321 | --all-errors \ 322 | -s "{{.SCHEMA_PATH}}" \ 323 | -d "{{.WORKING_INSTANCE_PATH}}" 324 | 325 | # Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout 326 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml 327 | utility:mktemp-file: 328 | vars: 329 | RAW_PATH: 330 | sh: mktemp --tmpdir "{{.TEMPLATE}}" 331 | cmds: 332 | - task: utility:normalize-path 333 | vars: 334 | RAW_PATH: "{{.RAW_PATH}}" 335 | 336 | # Make a temporary folder named according to the passed TEMPLATE variable and print the path passed to stdout 337 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml 338 | utility:mktemp-folder: 339 | vars: 340 | RAW_PATH: 341 | sh: mktemp --directory --tmpdir "{{.TEMPLATE}}" 342 | cmds: 343 | - task: utility:normalize-path 344 | vars: 345 | RAW_PATH: "{{.RAW_PATH}}" 346 | 347 | # Print a normalized version of the path passed via the RAW_PATH variable to stdout 348 | # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml 349 | utility:normalize-path: 350 | cmds: 351 | - | 352 | if [[ "{{.OS}}" == "Windows_NT" ]] && which cygpath &>/dev/null; then 353 | # Even though the shell handles POSIX format absolute paths as expected, external applications do not. 354 | # So paths passed to such applications must first be converted to Windows format. 355 | cygpath -w "{{.RAW_PATH}}" 356 | else 357 | echo "{{.RAW_PATH}}" 358 | fi 359 | -------------------------------------------------------------------------------- /__tests__/main.test.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 ARDUINO SA 2 | // 3 | // The software is released under the GNU General Public License, which covers the main body 4 | // of the arduino/setup-task code. The terms of this license can be found at: 5 | // https://www.gnu.org/licenses/gpl-3.0.en.html 6 | // 7 | // You can be released from the requirements of the above licenses by purchasing 8 | // a commercial license. Buying such a license is mandatory if you want to modify or 9 | // otherwise use the software for commercial activities involving the Arduino 10 | // software without disclosing the source code of your own applications. To purchase 11 | // a commercial license, send an email to license@arduino.cc 12 | 13 | import path = require("path"); 14 | import os = require("os"); 15 | import fs = require("fs"); 16 | import io = require("@actions/io"); 17 | import nock = require("nock"); 18 | 19 | const toolDir = path.join(__dirname, "runner", "tools"); 20 | const tempDir = path.join(__dirname, "runner", "temp"); 21 | const dataDir = path.join(__dirname, "testdata"); 22 | const IS_WINDOWS = process.platform === "win32"; 23 | 24 | process.env.RUNNER_TEMP = tempDir; 25 | process.env.RUNNER_TOOL_CACHE = toolDir; 26 | import * as installer from "../src/installer"; // eslint-disable-line import/first 27 | 28 | describe("installer tests", () => { 29 | beforeEach(async () => { 30 | await io.rmRF(toolDir); 31 | await io.rmRF(tempDir); 32 | await io.mkdirP(toolDir); 33 | await io.mkdirP(tempDir); 34 | }); 35 | 36 | afterAll(async () => { 37 | try { 38 | await io.rmRF(toolDir); 39 | await io.rmRF(tempDir); 40 | } catch { 41 | console.log("Failed to remove test directories"); 42 | } 43 | }); 44 | 45 | it("Downloads version of Task if no matching version is installed", async () => { 46 | await installer.getTask("3.37.1", ""); 47 | const taskDir = path.join(toolDir, "task", "3.37.1", os.arch()); 48 | 49 | expect(fs.existsSync(`${taskDir}.complete`)).toBe(true); 50 | 51 | if (IS_WINDOWS) { 52 | expect(fs.existsSync(path.join(taskDir, "bin", "task.exe"))).toBe(true); 53 | } else { 54 | expect(fs.existsSync(path.join(taskDir, "bin", "task"))).toBe(true); 55 | } 56 | }, 100000); 57 | 58 | describe("Gets the latest release of Task", () => { 59 | beforeEach(() => { 60 | nock("https://api.github.com") 61 | .get("/repos/go-task/task/git/refs/tags") 62 | .replyWithFile(200, path.join(dataDir, "tags.json")); 63 | }); 64 | 65 | afterEach(() => { 66 | nock.cleanAll(); 67 | nock.enableNetConnect(); 68 | }); 69 | 70 | it("Gets the latest version of Task 3.36 using 3.36 and no matching version is installed", async () => { 71 | await installer.getTask("3.36", ""); 72 | const taskDir = path.join(toolDir, "task", "3.36.0", os.arch()); 73 | 74 | expect(fs.existsSync(`${taskDir}.complete`)).toBe(true); 75 | if (IS_WINDOWS) { 76 | expect(fs.existsSync(path.join(taskDir, "bin", "task.exe"))).toBe(true); 77 | } else { 78 | expect(fs.existsSync(path.join(taskDir, "bin", "task"))).toBe(true); 79 | } 80 | }); 81 | 82 | it("Gets latest version of Task using 3.x and no matching version is installed", async () => { 83 | await installer.getTask("3.x", ""); 84 | const taskdir = path.join(toolDir, "task", "3.37.2", os.arch()); 85 | 86 | expect(fs.existsSync(`${taskdir}.complete`)).toBe(true); 87 | if (IS_WINDOWS) { 88 | expect(fs.existsSync(path.join(taskdir, "bin", "task.exe"))).toBe(true); 89 | } else { 90 | expect(fs.existsSync(path.join(taskdir, "bin", "task"))).toBe(true); 91 | } 92 | }); 93 | 94 | it("Skips version computing when a valid semver is provided", async () => { 95 | await installer.getTask("3.37.0", ""); 96 | const taskdir = path.join(toolDir, "task", "3.37.0", os.arch()); 97 | 98 | expect(fs.existsSync(`${taskdir}.complete`)).toBe(true); 99 | if (IS_WINDOWS) { 100 | expect(fs.existsSync(path.join(taskdir, "bin", "task.exe"))).toBe(true); 101 | } else { 102 | expect(fs.existsSync(path.join(taskdir, "bin", "task"))).toBe(true); 103 | } 104 | }); 105 | }); 106 | }); 107 | -------------------------------------------------------------------------------- /__tests__/testdata/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ref": "refs/tags/v1.0.0", 4 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuMC4w", 5 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.0.0", 6 | "object": { 7 | "sha": "557a27a584fa144095ce91cea9b6afc0bb732319", 8 | "type": "tag", 9 | "url": "https://api.github.com/repos/go-task/task/git/tags/557a27a584fa144095ce91cea9b6afc0bb732319" 10 | } 11 | }, 12 | { 13 | "ref": "refs/tags/v1.1.0", 14 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuMS4w", 15 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.1.0", 16 | "object": { 17 | "sha": "5b7ece81f6380171662a3d2dccfff2827216bf40", 18 | "type": "tag", 19 | "url": "https://api.github.com/repos/go-task/task/git/tags/5b7ece81f6380171662a3d2dccfff2827216bf40" 20 | } 21 | }, 22 | { 23 | "ref": "refs/tags/v1.2.0", 24 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuMi4w", 25 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.2.0", 26 | "object": { 27 | "sha": "900f9b2c178cacf292bf1a1d0f7b557f321218bc", 28 | "type": "tag", 29 | "url": "https://api.github.com/repos/go-task/task/git/tags/900f9b2c178cacf292bf1a1d0f7b557f321218bc" 30 | } 31 | }, 32 | { 33 | "ref": "refs/tags/v1.3.0", 34 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuMy4w", 35 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.3.0", 36 | "object": { 37 | "sha": "ffef44e4fe3ebd439eb238ffc52fbb12a508d44d", 38 | "type": "tag", 39 | "url": "https://api.github.com/repos/go-task/task/git/tags/ffef44e4fe3ebd439eb238ffc52fbb12a508d44d" 40 | } 41 | }, 42 | { 43 | "ref": "refs/tags/v1.3.1", 44 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuMy4x", 45 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.3.1", 46 | "object": { 47 | "sha": "477faf38d168ed36c9dda9cb466f7b0778f238d4", 48 | "type": "tag", 49 | "url": "https://api.github.com/repos/go-task/task/git/tags/477faf38d168ed36c9dda9cb466f7b0778f238d4" 50 | } 51 | }, 52 | { 53 | "ref": "refs/tags/v1.4.0", 54 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuNC4w", 55 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.4.0", 56 | "object": { 57 | "sha": "c405a151733436657142f3e3b213b079113f2a09", 58 | "type": "tag", 59 | "url": "https://api.github.com/repos/go-task/task/git/tags/c405a151733436657142f3e3b213b079113f2a09" 60 | } 61 | }, 62 | { 63 | "ref": "refs/tags/v1.4.1", 64 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuNC4x", 65 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.4.1", 66 | "object": { 67 | "sha": "3e7f789e2eef360aa0537ba95bac422e7666a5ab", 68 | "type": "tag", 69 | "url": "https://api.github.com/repos/go-task/task/git/tags/3e7f789e2eef360aa0537ba95bac422e7666a5ab" 70 | } 71 | }, 72 | { 73 | "ref": "refs/tags/v1.4.2", 74 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuNC4y", 75 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.4.2", 76 | "object": { 77 | "sha": "1e2613a1bdd74a4d427446d3499ec768f9e9af3c", 78 | "type": "tag", 79 | "url": "https://api.github.com/repos/go-task/task/git/tags/1e2613a1bdd74a4d427446d3499ec768f9e9af3c" 80 | } 81 | }, 82 | { 83 | "ref": "refs/tags/v1.4.3", 84 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuNC4z", 85 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.4.3", 86 | "object": { 87 | "sha": "b7051e65448100087e44b489e60f6b676ac4370a", 88 | "type": "tag", 89 | "url": "https://api.github.com/repos/go-task/task/git/tags/b7051e65448100087e44b489e60f6b676ac4370a" 90 | } 91 | }, 92 | { 93 | "ref": "refs/tags/v1.4.4", 94 | "node_id": "MDM6UmVmODMyNTI5ODM6djEuNC40", 95 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v1.4.4", 96 | "object": { 97 | "sha": "b5610291ec64be4929bbda05d2dca2ad3be85437", 98 | "type": "tag", 99 | "url": "https://api.github.com/repos/go-task/task/git/tags/b5610291ec64be4929bbda05d2dca2ad3be85437" 100 | } 101 | }, 102 | { 103 | "ref": "refs/tags/v2.0.0", 104 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMC4w", 105 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.0.0", 106 | "object": { 107 | "sha": "b55fcfafed24dfee7aa488069ed94bdf7a001a82", 108 | "type": "tag", 109 | "url": "https://api.github.com/repos/go-task/task/git/tags/b55fcfafed24dfee7aa488069ed94bdf7a001a82" 110 | } 111 | }, 112 | { 113 | "ref": "refs/tags/v2.0.1", 114 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMC4x", 115 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.0.1", 116 | "object": { 117 | "sha": "cfefa101873471e906e3fadfffde01f6db5732a2", 118 | "type": "tag", 119 | "url": "https://api.github.com/repos/go-task/task/git/tags/cfefa101873471e906e3fadfffde01f6db5732a2" 120 | } 121 | }, 122 | { 123 | "ref": "refs/tags/v2.0.2", 124 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMC4y", 125 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.0.2", 126 | "object": { 127 | "sha": "495ce61ff8a37df30e393256e15c4f29bc851784", 128 | "type": "tag", 129 | "url": "https://api.github.com/repos/go-task/task/git/tags/495ce61ff8a37df30e393256e15c4f29bc851784" 130 | } 131 | }, 132 | { 133 | "ref": "refs/tags/v2.0.3", 134 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMC4z", 135 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.0.3", 136 | "object": { 137 | "sha": "4ec9d55361c78cc5a28298301cae96e94f0f2d6d", 138 | "type": "tag", 139 | "url": "https://api.github.com/repos/go-task/task/git/tags/4ec9d55361c78cc5a28298301cae96e94f0f2d6d" 140 | } 141 | }, 142 | { 143 | "ref": "refs/tags/v2.1.0", 144 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMS4w", 145 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.1.0", 146 | "object": { 147 | "sha": "b5b0099d83131bdc28b40d36b92b29d993d13100", 148 | "type": "tag", 149 | "url": "https://api.github.com/repos/go-task/task/git/tags/b5b0099d83131bdc28b40d36b92b29d993d13100" 150 | } 151 | }, 152 | { 153 | "ref": "refs/tags/v2.1.1", 154 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMS4x", 155 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.1.1", 156 | "object": { 157 | "sha": "22e710cbef2ce135f054caafeff36250dea31e4b", 158 | "type": "tag", 159 | "url": "https://api.github.com/repos/go-task/task/git/tags/22e710cbef2ce135f054caafeff36250dea31e4b" 160 | } 161 | }, 162 | { 163 | "ref": "refs/tags/v2.2.0", 164 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMi4w", 165 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.2.0", 166 | "object": { 167 | "sha": "21dc704c0b693dab85441bfc8c78c103d230f111", 168 | "type": "tag", 169 | "url": "https://api.github.com/repos/go-task/task/git/tags/21dc704c0b693dab85441bfc8c78c103d230f111" 170 | } 171 | }, 172 | { 173 | "ref": "refs/tags/v2.2.1", 174 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMi4x", 175 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.2.1", 176 | "object": { 177 | "sha": "f5c808486ba9a3dfd818bc4a53efe6baaa95ef9c", 178 | "type": "tag", 179 | "url": "https://api.github.com/repos/go-task/task/git/tags/f5c808486ba9a3dfd818bc4a53efe6baaa95ef9c" 180 | } 181 | }, 182 | { 183 | "ref": "refs/tags/v2.3.0", 184 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuMy4w", 185 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.3.0", 186 | "object": { 187 | "sha": "b3662c2f176dac6e31ca157594fa0fba93d42b4c", 188 | "type": "tag", 189 | "url": "https://api.github.com/repos/go-task/task/git/tags/b3662c2f176dac6e31ca157594fa0fba93d42b4c" 190 | } 191 | }, 192 | { 193 | "ref": "refs/tags/v2.4.0", 194 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuNC4w", 195 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.4.0", 196 | "object": { 197 | "sha": "f864c18ee9f3026bdfe65308db49c7529c4eea28", 198 | "type": "tag", 199 | "url": "https://api.github.com/repos/go-task/task/git/tags/f864c18ee9f3026bdfe65308db49c7529c4eea28" 200 | } 201 | }, 202 | { 203 | "ref": "refs/tags/v2.5.0", 204 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuNS4w", 205 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.5.0", 206 | "object": { 207 | "sha": "43bd9ba54e7c670590688d8d4345783d2bda2a0a", 208 | "type": "tag", 209 | "url": "https://api.github.com/repos/go-task/task/git/tags/43bd9ba54e7c670590688d8d4345783d2bda2a0a" 210 | } 211 | }, 212 | { 213 | "ref": "refs/tags/v2.5.1", 214 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuNS4x", 215 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.5.1", 216 | "object": { 217 | "sha": "b3860a27789966a1e9189fae2ff3f217404c1477", 218 | "type": "tag", 219 | "url": "https://api.github.com/repos/go-task/task/git/tags/b3860a27789966a1e9189fae2ff3f217404c1477" 220 | } 221 | }, 222 | { 223 | "ref": "refs/tags/v2.5.2", 224 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuNS4y", 225 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.5.2", 226 | "object": { 227 | "sha": "0f81ec4da172a71cd18e1192db2a360f6b99f9c2", 228 | "type": "tag", 229 | "url": "https://api.github.com/repos/go-task/task/git/tags/0f81ec4da172a71cd18e1192db2a360f6b99f9c2" 230 | } 231 | }, 232 | { 233 | "ref": "refs/tags/v2.6.0", 234 | "node_id": "MDM6UmVmODMyNTI5ODM6djIuNi4w", 235 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v2.6.0", 236 | "object": { 237 | "sha": "d403687e5592ba317974cdc4677948cb4bac0b56", 238 | "type": "tag", 239 | "url": "https://api.github.com/repos/go-task/task/git/tags/d403687e5592ba317974cdc4677948cb4bac0b56" 240 | } 241 | }, 242 | { 243 | "ref": "refs/tags/v3.0.0-preview1", 244 | "node_id": "MDM6UmVmODMyNTI5ODM6djMuMC4wLXByZXZpZXcx", 245 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v3.0.0-preview1", 246 | "object": { 247 | "sha": "b637b3f832f28ce254377e507170c62cce3c20da", 248 | "type": "tag", 249 | "url": "https://api.github.com/repos/go-task/task/git/tags/b637b3f832f28ce254377e507170c62cce3c20da" 250 | } 251 | }, 252 | { 253 | "ref": "refs/tags/v3.36.0", 254 | "node_id": "MDM6UmVmODMyNTI5ODM6cmVmcy90YWdzL3YzLjM2LjA=", 255 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v3.36.0", 256 | "object": { 257 | "sha": "cc6d0979c6584edc68623aa67ffe29742baeaefe", 258 | "type": "tag", 259 | "url": "https://api.github.com/repos/go-task/task/git/tags/cc6d0979c6584edc68623aa67ffe29742baeaefe" 260 | } 261 | }, 262 | { 263 | "ref": "refs/tags/v3.37.1", 264 | "node_id": "MDM6UmVmODMyNTI5ODM6cmVmcy90YWdzL3YzLjM3LjE=", 265 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v3.37.1", 266 | "object": { 267 | "sha": "e48824e99dbccf39dc7d376c2684560945123b30", 268 | "type": "tag", 269 | "url": "https://api.github.com/repos/go-task/task/git/tags/e48824e99dbccf39dc7d376c2684560945123b30" 270 | } 271 | }, 272 | { 273 | "ref": "refs/tags/v3.37.2", 274 | "node_id": "MDM6UmVmODMyNTI5ODM6cmVmcy90YWdzL3YzLjM3LjI=", 275 | "url": "https://api.github.com/repos/go-task/task/git/refs/tags/v3.37.2", 276 | "object": { 277 | "sha": "7aa90b1511c05da43f415d3e6b27aa9866cb40cb", 278 | "type": "tag", 279 | "url": "https://api.github.com/repos/go-task/task/git/tags/7aa90b1511c05da43f415d3e6b27aa9866cb40cb" 280 | } 281 | } 282 | ] 283 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "arduino/setup-task" 2 | description: "Download Task and add it to the PATH" 3 | author: "Arduino" 4 | inputs: 5 | version: 6 | description: "Version to use. Example: 3.4.2" 7 | required: true 8 | default: "3.x" 9 | repo-token: 10 | description: "Token with permissions to do repo things" 11 | required: false 12 | 13 | runs: 14 | using: "node20" 15 | main: "dist/index.js" 16 | -------------------------------------------------------------------------------- /dist/unzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/setup-task/157f82c7844f70e57cfba72da2224348d386b9fe/dist/unzip -------------------------------------------------------------------------------- /dist/unzip-darwin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduino/setup-task/157f82c7844f70e57cfba72da2224348d386b9fe/dist/unzip-darwin -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ["js", "ts"], 4 | testEnvironment: "node", 5 | testMatch: ["**/*.test.ts"], 6 | testRunner: "jest-circus/runner", 7 | transform: { 8 | "^.+\\.ts$": "ts-jest", 9 | }, 10 | verbose: true, 11 | }; 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-task", 3 | "private": true, 4 | "description": "Setup Task action", 5 | "main": "lib/main.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/arduino/setup-task.git" 9 | }, 10 | "keywords": [ 11 | "actions", 12 | "taskfile", 13 | "task", 14 | "setup" 15 | ], 16 | "author": "Arduino", 17 | "license": "GPL-3.0", 18 | "dependencies": { 19 | "@actions/core": "^1.11.1", 20 | "@actions/tool-cache": "^2.0.2", 21 | "semver": "^7.7.2", 22 | "typed-rest-client": "^2.1.0" 23 | }, 24 | "devDependencies": { 25 | "@actions/io": "^1.1.3", 26 | "@types/jest": "^29.5.14", 27 | "@types/node": "^20.17.57", 28 | "@types/semver": "^7.7.0", 29 | "@typescript-eslint/eslint-plugin": "^7.18.0", 30 | "@typescript-eslint/parser": "^7.18.0", 31 | "@vercel/ncc": "^0.38.3", 32 | "ajv-cli": "^5.0.0", 33 | "ajv-formats": "^3.0.1", 34 | "eslint": "^8.57.1", 35 | "eslint-config-airbnb-base": "^15.0.0", 36 | "eslint-config-airbnb-typescript": "^18.0.0", 37 | "eslint-config-prettier": "^10.1.5", 38 | "eslint-plugin-import": "^2.31.0", 39 | "github-label-sync": "3.0.0", 40 | "jest": "^29.7.0", 41 | "jest-circus": "^29.7.0", 42 | "markdown-link-check": "^3.13.7", 43 | "markdownlint-cli": "^0.45.0", 44 | "nock": "^13.5.6", 45 | "prettier": "^3.5.3", 46 | "strip-json-comments-cli": "^3.0.0", 47 | "ts-jest": "^29.3.4", 48 | "typescript": "^5.8.3" 49 | }, 50 | "engines": { 51 | "node": "20.x" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "codespell" 5 | version = "2.4.1" 6 | description = "Fix common misspellings in text files" 7 | optional = false 8 | python-versions = ">=3.8" 9 | files = [ 10 | {file = "codespell-2.4.1-py3-none-any.whl", hash = "sha256:3dadafa67df7e4a3dbf51e0d7315061b80d265f9552ebd699b3dd6834b47e425"}, 11 | {file = "codespell-2.4.1.tar.gz", hash = "sha256:299fcdcb09d23e81e35a671bbe746d5ad7e8385972e65dbb833a2eaac33c01e5"}, 12 | ] 13 | 14 | [package.extras] 15 | dev = ["Pygments", "build", "chardet", "pre-commit", "pytest", "pytest-cov", "pytest-dependency", "ruff", "tomli", "twine"] 16 | hard-encoding-detection = ["chardet"] 17 | toml = ["tomli"] 18 | types = ["chardet (>=5.1.0)", "mypy", "pytest", "pytest-cov", "pytest-dependency"] 19 | 20 | [metadata] 21 | lock-version = "2.0" 22 | python-versions = "^3.9" 23 | content-hash = "39f2a7aa08c298a74012bbe3426926d49b5c4d49b1d2b0f2ec46882239ec29e1" 24 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "setup-task" 3 | version = "0.0.0" 4 | description = "GitHub Actions action to install Task" 5 | authors = ["Arduino "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | 10 | [tool.poetry.dev-dependencies] 11 | codespell = "^2.4.1" 12 | -------------------------------------------------------------------------------- /src/installer.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 ARDUINO SA 2 | // 3 | // The software is released under the GNU General Public License, which covers the main body 4 | // of the arduino/setup-task code. The terms of this license can be found at: 5 | // https://www.gnu.org/licenses/gpl-3.0.en.html 6 | // 7 | // You can be released from the requirements of the above licenses by purchasing 8 | // a commercial license. Buying such a license is mandatory if you want to modify or 9 | // otherwise use the software for commercial activities involving the Arduino 10 | // software without disclosing the source code of your own applications. To purchase 11 | // a commercial license, send an email to license@arduino.cc 12 | 13 | import * as os from "os"; 14 | import * as path from "path"; 15 | import * as util from "util"; 16 | import * as restm from "typed-rest-client/RestClient"; 17 | import * as semver from "semver"; 18 | 19 | import * as core from "@actions/core"; 20 | import * as tc from "@actions/tool-cache"; 21 | 22 | import io = require("@actions/io"); 23 | 24 | const osPlat: string = os.platform(); 25 | const osArch: string = os.arch(); 26 | 27 | interface ITaskRef { 28 | ref: string; 29 | } 30 | 31 | // Retrieve a list of versions scraping tags from the Github API 32 | async function fetchVersions(repoToken: string): Promise { 33 | let rest: restm.RestClient; 34 | if (repoToken !== "") { 35 | rest = new restm.RestClient("setup-task", "", [], { 36 | headers: { Authorization: `Bearer ${repoToken}` }, 37 | }); 38 | } else { 39 | rest = new restm.RestClient("setup-task"); 40 | } 41 | 42 | const tags: ITaskRef[] = 43 | ( 44 | await rest.get( 45 | "https://api.github.com/repos/go-task/task/git/refs/tags", 46 | ) 47 | ).result || []; 48 | 49 | return tags 50 | .filter((tag) => tag.ref.match(/v\d+\.[\w\.]+/g)) 51 | .map((tag) => tag.ref.replace("refs/tags/v", "")); 52 | } 53 | 54 | // Make partial versions semver compliant. 55 | function normalizeVersion(version: string): string { 56 | const preStrings = ["beta", "rc", "preview"]; 57 | 58 | const versionPart = version.split("."); 59 | if (versionPart[1] == null) { 60 | // append minor and patch version if not available 61 | // e.g. 2 -> 2.0.0 62 | return version.concat(".0.0"); 63 | } 64 | // handle beta and rc 65 | // e.g. 1.10beta1 -? 1.10.0-beta1, 1.10rc1 -> 1.10.0-rc1 66 | if (preStrings.some((el) => versionPart[1].includes(el))) { 67 | versionPart[1] = versionPart[1] 68 | .replace("beta", ".0-beta") 69 | .replace("rc", ".0-rc") 70 | .replace("preview", ".0-preview"); 71 | return versionPart.join("."); 72 | } 73 | 74 | if (versionPart[2] == null) { 75 | // append patch version if not available 76 | // e.g. 2.1 -> 2.1.0 77 | return version.concat(".0"); 78 | } 79 | // handle beta and rc 80 | // e.g. 1.8.5beta1 -> 1.8.5-beta1, 1.8.5rc1 -> 1.8.5-rc1 81 | if (preStrings.some((el) => versionPart[2].includes(el))) { 82 | versionPart[2] = versionPart[2] 83 | .replace("beta", "-beta") 84 | .replace("rc", "-rc") 85 | .replace("preview", "-preview"); 86 | return versionPart.join("."); 87 | } 88 | 89 | return version; 90 | } 91 | 92 | // Compute an actual version starting from the `version` configuration param. 93 | async function computeVersion( 94 | version: string, 95 | repoToken: string, 96 | ): Promise { 97 | // return if passed version is a valid semver 98 | if (semver.valid(version)) { 99 | core.debug("valid semver provided, skipping computing actual version"); 100 | return `v${version}`; // Task releases are v-prefixed 101 | } 102 | 103 | let versionPrefix = version; 104 | // strip leading `v` char (will be re-added later) 105 | if (versionPrefix.startsWith("v")) { 106 | versionPrefix = versionPrefix.slice(1, versionPrefix.length); 107 | } 108 | 109 | // strip trailing .x chars 110 | if (versionPrefix.endsWith(".x")) { 111 | versionPrefix = versionPrefix.slice(0, versionPrefix.length - 2); 112 | } 113 | 114 | const allVersions = await fetchVersions(repoToken); 115 | const possibleVersions = allVersions.filter((v) => 116 | v.startsWith(versionPrefix), 117 | ); 118 | 119 | const versionMap = new Map(); 120 | possibleVersions.forEach((v) => versionMap.set(normalizeVersion(v), v)); 121 | 122 | const versions = Array.from(versionMap.keys()) 123 | .sort(semver.rcompare) 124 | .map((v) => versionMap.get(v)); 125 | 126 | core.debug(`evaluating ${versions.length} versions`); 127 | 128 | if (versions.length === 0) { 129 | throw new Error("unable to get latest version"); 130 | } 131 | 132 | core.debug(`matched: ${versions[0]}`); 133 | 134 | return `v${versions[0]}`; 135 | } 136 | 137 | function getFileName() { 138 | const platform: string = osPlat === "win32" ? "windows" : osPlat; 139 | const arches = { 140 | arm: "arm", 141 | arm64: "arm64", 142 | x64: "amd64", 143 | ia32: "386", 144 | }; 145 | const arch: string = arches[osArch] ?? osArch; 146 | const ext: string = osPlat === "win32" ? "zip" : "tar.gz"; 147 | const filename: string = util.format("task_%s_%s.%s", platform, arch, ext); 148 | 149 | return filename; 150 | } 151 | 152 | async function downloadRelease(version: string): Promise { 153 | // Download 154 | const fileName: string = getFileName(); 155 | const downloadUrl: string = util.format( 156 | "https://github.com/go-task/task/releases/download/%s/%s", 157 | version, 158 | fileName, 159 | ); 160 | let downloadPath: string | null = null; 161 | try { 162 | downloadPath = await tc.downloadTool(downloadUrl); 163 | } catch (error) { 164 | if (typeof error === "string" || error instanceof Error) { 165 | core.debug(error.toString()); 166 | } 167 | throw new Error(`Failed to download version ${version}: ${error}`); 168 | } 169 | 170 | // Extract 171 | let extPath: string | null = null; 172 | if (osPlat === "win32") { 173 | extPath = await tc.extractZip(downloadPath); 174 | // Create a bin/ folder and move `task` there 175 | await io.mkdirP(path.join(extPath, "bin")); 176 | await io.mv(path.join(extPath, "task.exe"), path.join(extPath, "bin")); 177 | } else { 178 | extPath = await tc.extractTar(downloadPath); 179 | // Create a bin/ folder and move `task` there 180 | await io.mkdirP(path.join(extPath, "bin")); 181 | await io.mv(path.join(extPath, "task"), path.join(extPath, "bin")); 182 | } 183 | 184 | // Install into the local tool cache - node extracts with a root folder that matches the fileName downloaded 185 | return tc.cacheDir(extPath, "task", version); 186 | } 187 | 188 | export async function getTask(version: string, repoToken: string) { 189 | // resolve the version number 190 | const targetVersion = await computeVersion(version, repoToken); 191 | 192 | // look if the binary is cached 193 | let toolPath: string; 194 | toolPath = tc.find("task", targetVersion); 195 | 196 | // if not: download, extract and cache 197 | if (!toolPath) { 198 | toolPath = await downloadRelease(targetVersion); 199 | core.debug(`Task cached under ${toolPath}`); 200 | } 201 | 202 | toolPath = path.join(toolPath, "bin"); 203 | core.addPath(toolPath); 204 | core.info(`Successfully setup Task version ${targetVersion}`); 205 | } 206 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 ARDUINO SA 2 | // 3 | // The software is released under the GNU General Public License, which covers the main body 4 | // of the arduino/setup-task code. The terms of this license can be found at: 5 | // https://www.gnu.org/licenses/gpl-3.0.en.html 6 | // 7 | // You can be released from the requirements of the above licenses by purchasing 8 | // a commercial license. Buying such a license is mandatory if you want to modify or 9 | // otherwise use the software for commercial activities involving the Arduino 10 | // software without disclosing the source code of your own applications. To purchase 11 | // a commercial license, send an email to license@arduino.cc 12 | 13 | import * as core from "@actions/core"; 14 | import * as installer from "./installer"; 15 | 16 | async function run() { 17 | try { 18 | const version = core.getInput("version", { required: true }); 19 | const repoToken = core.getInput("repo-token"); 20 | 21 | await installer.getTask(version, repoToken); 22 | } catch (error) { 23 | if (error instanceof Error) { 24 | core.setFailed(error.message); 25 | } else { 26 | throw error; 27 | } 28 | } 29 | } 30 | 31 | run(); 32 | -------------------------------------------------------------------------------- /tsconfig.eslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["__tests__/**/*", "src/**/*", "jest.config.js"] 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, 6 | "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, 7 | // "allowJs": true, /* Allow javascript files to be compiled. */ 8 | // "checkJs": true, /* Report errors in .js files. */ 9 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 10 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 11 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 12 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 13 | // "outFile": "./", /* Concatenate and emit output to single file. */ 14 | "outDir": "./lib" /* Redirect output structure to the directory. */, 15 | "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, 16 | // "composite": true, /* Enable project compilation */ 17 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 18 | // "removeComments": true, /* Do not emit comments to output. */ 19 | // "noEmit": true, /* Do not emit outputs. */ 20 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 21 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 22 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 23 | 24 | /* Strict Type-Checking Options */ 25 | "strict": true /* Enable all strict type-checking options. */, 26 | "noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */, 27 | // "strictNullChecks": true, /* Enable strict null checks. */ 28 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 29 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 30 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 31 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 32 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 33 | 34 | /* Additional Checks */ 35 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 36 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 37 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 38 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 39 | 40 | /* Module Resolution Options */ 41 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 42 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 43 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 44 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 45 | // "typeRoots": [], /* List of folders to include type definitions from. */ 46 | // "types": [], /* Type declaration files to be included in compilation. */ 47 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 48 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 49 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 50 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 51 | 52 | /* Source Map Options */ 53 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 54 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 55 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 56 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 57 | 58 | /* Experimental Options */ 59 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 60 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 61 | }, 62 | "include": ["src/**/*"] 63 | } 64 | --------------------------------------------------------------------------------