Compare commits

...

144 Commits

Author SHA1 Message Date
nickfyson
3e94e32f68 add rate limit exhaustion as configuration error 2025-03-05 14:16:20 +00:00
Dave Bartolomeo
80f9930395 Merge pull request #2788 from github/dbartol/use-real-actions-extractor
Use embedded `actions` extractor only for old CLI versions
2025-03-03 13:59:30 -05:00
Angela P Wen
f544ec5e4a Merge pull request #2791 from github/dependabot/npm_and_yarn/npm-24c237cb71
build(deps): bump the npm group with 9 updates
2025-03-03 10:56:56 -08:00
Dave Bartolomeo
d37931ae65 Merge remote-tracking branch 'origin/main' into dbartol/use-real-actions-extractor 2025-03-03 13:01:21 -05:00
Angela P Wen
4b35b04661 Merge pull request #2792 from github/dependabot/github_actions/actions-f0e7f3112e
build(deps): bump actions/create-github-app-token from 1.11.5 to 1.11.6 in the actions group
2025-03-03 09:40:10 -08:00
dependabot[bot]
1a69221aeb build(deps): bump actions/create-github-app-token in the actions group
Bumps the actions group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `actions/create-github-app-token` from 1.11.5 to 1.11.6
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1.11.5...v1.11.6)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 17:26:51 +00:00
github-actions[bot]
452ffd6e8e Update checked-in dependencies 2025-03-03 17:25:47 +00:00
dependabot[bot]
a8ade63a2f build(deps): bump the npm group with 9 updates
Bumps the npm group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `4.0.1` | `4.0.2` |
| [uuid](https://github.com/uuidjs/uuid) | `11.0.5` | `11.1.0` |
| [@eslint/eslintrc](https://github.com/eslint/eslintrc) | `3.2.0` | `3.3.0` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.20.0` | `9.21.0` |
| [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) | `17.0.3` | `17.0.4` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.24.1` | `8.26.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.24.1` | `8.26.0` |
| [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `3.8.1` | `3.8.3` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.7.3` | `5.8.2` |


Updates `@actions/cache` from 4.0.1 to 4.0.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `uuid` from 11.0.5 to 11.1.0
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v11.0.5...v11.1.0)

Updates `@eslint/eslintrc` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/v3.2.0...v3.3.0)

Updates `@eslint/js` from 9.20.0 to 9.21.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.21.0/packages/js)

Updates `@types/sinon` from 17.0.3 to 17.0.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

Updates `@typescript-eslint/eslint-plugin` from 8.24.1 to 8.26.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.26.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.24.1 to 8.26.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.26.0/packages/parser)

Updates `eslint-import-resolver-typescript` from 3.8.1 to 3.8.3
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.8.1...v3.8.3)

Updates `typescript` from 5.7.3 to 5.8.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@eslint/eslintrc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@eslint/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 17:24:56 +00:00
Henry Mercer
2db5b5a35f Merge pull request #2786 from github/henrymercer/more-config-errors
Add some more configuration errors
2025-03-03 12:21:31 +00:00
Dave Bartolomeo
85e30fe57a Use embedded actions extractor only for old CLI versions 2025-02-27 15:42:11 -05:00
Paolo Tranquilli
83923549f6 Merge pull request #2776 from github/redsun82/just
Do some just+pre-commit tweaking
2025-02-27 12:40:34 +01:00
Paolo Tranquilli
96632630a9 Do some just+pre-commit tweaking
* pre-commit: move the linting check ahead of the compiling one, as a
  typescript lint can change the compilaed javascript, so you can end up
  in a situation where the pre-commit check fails twice in a row
* just: add linting and make the default to run all
2025-02-27 08:10:04 +01:00
Ian Lynagh
97aac9bb56 Merge pull request #2785 from github/igfoo/mb
Warn about small amounts of MB, not GB
2025-02-26 16:56:30 +00:00
Henry Mercer
d59d0eb99a Add CLI error for failure to create temp directory 2025-02-26 16:52:50 +00:00
Henry Mercer
0ae74e1ae0 Check for running out of disk space 2025-02-26 16:52:50 +00:00
Ian Lynagh
146dd5cfb0 npm run build 2025-02-26 15:12:53 +00:00
Ian Lynagh
32505c6f2d Warn about small amounts of MB, not GB
The number of GB is at most 2, and can be tiny. MB gives a more
comprehensible range of values.
2025-02-26 15:11:14 +00:00
Angela P Wen
8c69433c34 Merge pull request #2782 from github/angelapwen/fix-unversioned-immutable-action
PR Checks: use semantic versioning for `create-github-app-token`
2025-02-25 08:49:25 -08:00
Angela P Wen
c4f2a076e5 PR Checks: use semantic versioning for create-github-app-token 2025-02-24 17:06:31 -08:00
Angela P Wen
a8849fbe63 Merge pull request #2781 from github/angelapwen/fix-code-injection-warning
Fix code injection warnings in `check-codescanning-config` internal Action
2025-02-24 16:53:51 -08:00
Angela P Wen
628c1e669a Remove print debugging 2025-02-24 13:29:47 -08:00
Angela P Wen
e12eb8d7c1 Set environment variable in the correct step 2025-02-24 13:24:22 -08:00
Angela P Wen
3b348d9a54 Debug only: print environment variable 2025-02-24 13:18:08 -08:00
Angela P Wen
7567eab606 Fail when expected config does not exist 2025-02-24 13:17:24 -08:00
Angela P Wen
a9f7529f47 Quote expected-config-file-contents input 2025-02-24 13:05:29 -08:00
Angela P Wen
5e88a178fe Update .github/actions/check-codescanning-config/action.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-02-24 12:52:19 -08:00
Angela P Wen
c0a8eb9a67 Use $RUNNER_TEMP for good measure
`runner.temp` is not user-controlled but we replace it with `$RUNNER_TEMP` in any case.
2025-02-24 12:35:51 -08:00
Angela P Wen
286fd68a67 Use env var for EXPECTED_CONFIG_FILE_CONTENTS 2025-02-24 12:35:17 -08:00
Angela P Wen
d3c7d03197 Merge pull request #2780 from github/angelapwen/fix-inconsistent-action-input
Unify `token` description for `resolve-environment`, `start-proxy`, and `upload-sarif`
2025-02-24 12:09:09 -08:00
Angela P Wen
03c921eac5 Unify token description for resolve-environment, start-proxy, and upload-sarif` 2025-02-24 11:26:00 -08:00
Ian Lynagh
ff79de67cc Merge pull request #2779 from github/mergeback/v3.28.10-to-main-b56ba49b
Mergeback v3.28.10 refs/heads/releases/v3 into main
2025-02-21 16:32:29 +00:00
github-actions[bot]
5d1a3cb0ee Update checked-in dependencies 2025-02-21 16:12:38 +00:00
github-actions[bot]
2923046360 Update changelog and version after v3.28.10 2025-02-21 16:09:55 +00:00
Ian Lynagh
b56ba49b26 Merge pull request #2778 from github/update-v3.28.10-9856c48b1
Merge main into releases/v3
2025-02-21 16:09:01 +00:00
github-actions[bot]
60c9c77c33 Update changelog for v3.28.10 2025-02-21 15:15:06 +00:00
Paolo Tranquilli
9856c48b1a Merge pull request #2773 from github/redsun82/rust
Support rust analysis
2025-02-20 18:03:30 +01:00
Paolo Tranquilli
9572e09da4 Rust: fix log string 2025-02-20 17:38:35 +01:00
Paolo Tranquilli
1a529366ac Rust: special case default setup 2025-02-20 17:38:02 +01:00
Ian Lynagh
cf7e90952b Merge pull request #2772 from github/update-bundle/codeql-bundle-v2.20.5
Update default bundle to 2.20.5
2025-02-20 14:19:30 +00:00
Ian Lynagh
b7006aab6d Merge branch 'main' into update-bundle/codeql-bundle-v2.20.5 2025-02-20 13:27:14 +00:00
Paolo Tranquilli
cfedae723e Rust: throw configuration errors if requested and not correctly enabled 2025-02-20 11:49:32 +01:00
Paolo Tranquilli
3971ed2a74 Merge branch 'main' into redsun82/rust 2025-02-20 08:13:54 +01:00
Angela P Wen
d38c6e60df Merge pull request #2775 from github/angelapwen/bump-octokit
Upgrade `octokit` to v4.1.2
2025-02-19 11:31:42 -08:00
github-actions[bot]
c0d59dba56 Update checked-in dependencies 2025-02-19 19:16:52 +00:00
Angela P Wen
c1745a9831 Upgrade octokit to v4.1.2 2025-02-19 11:13:12 -08:00
Henry Mercer
67e48c1eaf Merge branch 'main' into update-bundle/codeql-bundle-v2.20.5 2025-02-19 18:38:45 +00:00
Chuan-kai Lin
dbbcbe019d Merge pull request #2765 from github/cklin/alert-diff-filtering
Perform consistent diff-informed alert filtering in the action
2025-02-19 10:15:01 -08:00
Paolo Tranquilli
fb3e7cdd88 Merge pull request #2774 from github/redsun82/sync
Fix sync recipes and add base `justfile`
2025-02-19 17:26:08 +01:00
Paolo Tranquilli
ff50469ca0 Add comments to the justfile 2025-02-19 17:13:51 +01:00
Paolo Tranquilli
d0aab9fc20 Fix sync recipes and add base justfile
Both the justfile and the pre-commit configuration for the `pr-check`
sync were broken:
* justfiles run recipes one line at a time in a fresh shell, so the venv
  activation was not working
* the pre-commit config was relying on an installed `ruamel.yaml`
  pakcage, but the default one installable via `apt` on Ubuntu 24.04 is
  old and generates different output (with formatting differences).

Now:
* the venv dance is put in a separate bash script
* both just and pre-commit will use that same script, so both problems
  will be fixed

As a bonus, a root `justfile` is added exposing the `update-pr-checks`
recipes plus a `build` one. Running `just` without arguments will also
now call the default `sync` recipes that will call both of the above.
2025-02-19 16:51:46 +01:00
Paolo Tranquilli
c9ebc3bb8b Regenerate workflows with more recent ruamel.yaml 2025-02-19 16:21:48 +01:00
Paolo Tranquilli
a7b17782a9 Support rust analysis
This is supposed to enable rust analysis for the staff ship only.
2025-02-19 15:56:52 +01:00
Chuan-kai Lin
f85d8b5a74 build: refresh js files 2025-02-19 06:26:33 -08:00
Chuan-kai Lin
dae1626680 Filter alerts by pr-diff-range JSON file 2025-02-19 06:26:11 -08:00
Henry Mercer
d99c7e8e5b Merge pull request #2771 from github/revert-2767-cklin/prefer-gtar
Revert "Prefer gtar if available"
2025-02-18 16:05:36 +00:00
github-actions[bot]
eb88b40ca4 Add changelog note 2025-02-18 12:37:24 +00:00
github-actions[bot]
6b1da0d33e Update default bundle to codeql-bundle-v2.20.5 2025-02-18 12:37:20 +00:00
Henry Mercer
906452d251 Merge branch 'main' into revert-2767-cklin/prefer-gtar 2025-02-18 10:47:19 +00:00
Henry Mercer
0656d7fb91 Add changelog note for #2768 2025-02-18 10:45:37 +00:00
Henry Mercer
1bb15d06a6 Merge pull request #2768 from github/smowton/fix/zstd-tarball-trailing-zeros
Pass `--ignore-zeros` to `tar` when decompressing `zstd`-compressed tarballs
2025-02-18 10:42:42 +00:00
Henry Mercer
65a3aa1fbc Revert "Prefer gtar if available" 2025-02-18 10:38:41 +00:00
Henry Mercer
acadfedea5 Merge pull request #2770 from github/dependabot/npm_and_yarn/npm-17cd1da1dd
build(deps): bump the npm group with 5 updates
2025-02-17 19:30:47 +00:00
Henry Mercer
1930ca4359 Merge pull request #2769 from github/dependabot/github_actions/actions-60ccfc8cbe
build(deps): bump the actions group with 2 updates
2025-02-17 19:30:27 +00:00
Henry Mercer
1d4f241470 Update generated workflow source 2025-02-17 19:17:28 +00:00
github-actions[bot]
9dfa165835 Update checked-in dependencies 2025-02-17 18:21:02 +00:00
dependabot[bot]
47d5364431 build(deps): bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `4.0.0` | `4.0.1` |
| [long](https://github.com/dcodeIO/long.js) | `5.3.0` | `5.3.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.23.0` | `8.24.1` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.23.0` | `8.24.1` |
| [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `3.7.0` | `3.8.1` |


Updates `@actions/cache` from 4.0.0 to 4.0.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `long` from 5.3.0 to 5.3.1
- [Release notes](https://github.com/dcodeIO/long.js/releases)
- [Commits](https://github.com/dcodeIO/long.js/compare/v5.3.0...v5.3.1)

Updates `@typescript-eslint/eslint-plugin` from 8.23.0 to 8.24.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.1/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.23.0 to 8.24.1
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.24.1/packages/parser)

Updates `eslint-import-resolver-typescript` from 3.7.0 to 3.8.1
- [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: long
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-import-resolver-typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 18:20:12 +00:00
dependabot[bot]
30b1c2ae15 build(deps): bump the actions group with 2 updates
Bumps the actions group with 2 updates: [ruby/setup-ruby](https://github.com/ruby/setup-ruby) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `ruby/setup-ruby` from 1.218.0 to 1.221.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](d781c1b4ed...32110d4e31)

Updates `actions/create-github-app-token` from 1.11.3 to 1.11.5
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](67e27a7eb7...0d564482f0)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/create-github-app-token
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 17:37:07 +00:00
github-actions[bot]
c4158ff890 Rebuild 2025-02-17 17:21:30 +00:00
Chris Smowton
2be5f244ff Pass --ignore-zeros to tar when decompressing zstd-compressed tarballs
See comment in the diff for full explanation.
2025-02-17 17:04:36 +00:00
Ian Lynagh
8c1551cdd4 Merge pull request #2767 from github/cklin/prefer-gtar
Prefer gtar if available
2025-02-17 12:31:54 +00:00
Chuan-kai Lin
fc4873bed7 Changelog entry: Prefer gtar if available 2025-02-14 13:57:09 -08:00
Chuan-kai Lin
c3ad6e9deb build: refresh js files 2025-02-14 13:40:54 -08:00
Chuan-kai Lin
61c77a48ff Prefer gtar if available 2025-02-14 13:34:30 -08:00
Chuan-kai Lin
4267fa66a2 getTarVersion(): add programName parameter
This commit changes getTarVersion() so that it receives the name of the
tar program from the caller instead of using the hardcoded string "tar".
2025-02-14 13:24:19 -08:00
Chuan-kai Lin
c4a8587f45 Add TarVersion.name field
This refactoring commit records the name of the tar program in the new
TarVersion.name field and makes extractTarZst() use the new field
instead of the hardcoded name "tar". Code behavior remains unchanged
because currently TarVersion.name is always "tar".

This is the first step toward supporting a tar program under a different
executable name.
2025-02-14 12:08:07 -08:00
Chuan-kai Lin
77bc2a595e Write pr-diff-range JSON file 2025-02-14 08:50:52 -08:00
Henry Mercer
1c15a48f3f Merge pull request #2762 from github/henrymercer/debug-upload-nit
Improve logs for combined SARIF debug artifact
2025-02-12 20:49:09 +00:00
Henry Mercer
3df6d20d31 Improve logs for combined SARIF debug artifact
Don't start a "Uploading combined SARIF debug artifact" log group if we aren't going to do the upload.
2025-02-12 16:27:40 +00:00
Michael B. Gale
affec202b3 Merge pull request #2656 from github/go/1.24
Go: Use Go `1.24` in PR checks
2025-02-12 10:03:43 +00:00
Owen Mansel-Chan
a963b41ebd Merge branch 'main' into go/1.24 2025-02-11 22:38:14 +00:00
Owen Mansel-Chan
683c0f5360 Update Go version to 1.24.0 2025-02-11 22:15:05 +00:00
Henry Mercer
6063925771 Merge pull request #2760 from github/dependabot/github_actions/actions-ee85065439
build(deps): bump the actions group with 2 updates
2025-02-10 17:48:20 +00:00
Henry Mercer
67eb53aecb Merge pull request #2759 from github/dependabot/npm_and_yarn/npm-692b17fb19
build(deps): bump the npm group with 5 updates
2025-02-10 17:39:57 +00:00
Henry Mercer
226ab86c29 Update generated workflow source 2025-02-10 17:36:44 +00:00
dependabot[bot]
078f43891a build(deps): bump the actions group with 2 updates
Bumps the actions group with 2 updates: [ruby/setup-ruby](https://github.com/ruby/setup-ruby) and [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `ruby/setup-ruby` from 1.215.0 to 1.218.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](2654679fe7...d781c1b4ed)

Updates `actions/create-github-app-token` from 1.11.2 to 1.11.3
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](136412a57a...67e27a7eb7)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: actions/create-github-app-token
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 17:31:53 +00:00
github-actions[bot]
ccc5046d0b Update checked-in dependencies 2025-02-10 17:23:18 +00:00
dependabot[bot]
8c70d43f73 build(deps): bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [long](https://github.com/dcodeIO/long.js) | `5.2.4` | `5.3.0` |
| [semver](https://github.com/npm/node-semver) | `7.7.0` | `7.7.1` |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.19.0` | `9.20.0` |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `5.1.7` | `5.1.8` |
| [nock](https://github.com/nock/nock) | `14.0.0` | `14.0.1` |


Updates `long` from 5.2.4 to 5.3.0
- [Release notes](https://github.com/dcodeIO/long.js/releases)
- [Commits](https://github.com/dcodeIO/long.js/compare/v5.2.4...v5.3.0)

Updates `semver` from 7.7.0 to 7.7.1
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.7.0...v7.7.1)

Updates `@eslint/js` from 9.19.0 to 9.20.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.20.0/packages/js)

Updates `eslint-plugin-github` from 5.1.7 to 5.1.8
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.1.7...v5.1.8)

Updates `nock` from 14.0.0 to 14.0.1
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v14.0.0...v14.0.1)

---
updated-dependencies:
- dependency-name: long
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: "@eslint/js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 17:22:20 +00:00
Arthur Baars
0a35e8f686 Merge pull request #2758 from github/mergeback/v3.28.9-to-main-9e8d0789
Mergeback v3.28.9 refs/heads/releases/v3 into main
2025-02-07 11:58:16 +01:00
github-actions[bot]
fb1a08b0c7 Update checked-in dependencies 2025-02-07 10:36:17 +00:00
github-actions[bot]
fc5ba27156 Update changelog and version after v3.28.9 2025-02-07 10:35:07 +00:00
Arthur Baars
9e8d0789d4 Merge pull request #2757 from github/update-v3.28.9-24e1c2d33
Merge main into releases/v3
2025-02-07 11:34:10 +01:00
github-actions[bot]
43d9be6701 Update changelog for v3.28.9 2025-02-07 10:18:39 +00:00
Owen Mansel-Chan
7b5dd253ad Update Go version to 1.24.0-rc.3 2025-02-06 17:07:29 +00:00
Arthur Baars
24e1c2d337 Merge pull request #2753 from github/update-bundle/codeql-bundle-v2.20.4
Update default bundle to 2.20.4
2025-02-06 11:59:36 +01:00
github-actions[bot]
57a08c0c7f Add changelog note 2025-02-04 11:22:54 +00:00
github-actions[bot]
52189d23af Update default bundle to codeql-bundle-v2.20.4 2025-02-04 11:22:50 +00:00
Henry Mercer
08bc0cf022 Merge pull request #2751 from github/henrymercer/fix-init-post-without-config
Send `init-post` status report in absence of config
2025-02-03 20:00:22 +00:00
Henry Mercer
cf7c687919 Send init-post status report in absence of config 2025-02-03 19:46:23 +00:00
Angela P Wen
ad42dbd32d Merge pull request #2750 from github/dependabot/npm_and_yarn/npm-768bd9b555
build(deps): bump the npm group with 5 updates
2025-02-03 10:00:42 -08:00
Angela P Wen
a8f5935da0 Merge pull request #2749 from github/dependabot/github_actions/actions-29d379cebb
build(deps): bump actions/create-github-app-token from 1.11.1 to 1.11.2 in the actions group
2025-02-03 09:24:29 -08:00
github-actions[bot]
9660df3fcc Update checked-in dependencies 2025-02-03 17:20:53 +00:00
dependabot[bot]
3e913ef09d build(deps): bump the npm group with 5 updates
Bumps the npm group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@octokit/types](https://github.com/octokit/types.ts) | `13.7.0` | `13.8.0` |
| [semver](https://github.com/npm/node-semver) | `7.6.3` | `7.7.0` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.22.0` | `8.23.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.22.0` | `8.23.0` |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `5.1.5` | `5.1.7` |


Updates `@octokit/types` from 13.7.0 to 13.8.0
- [Release notes](https://github.com/octokit/types.ts/releases)
- [Commits](https://github.com/octokit/types.ts/compare/v13.7.0...v13.8.0)

Updates `semver` from 7.6.3 to 7.7.0
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.3...v7.7.0)

Updates `@typescript-eslint/eslint-plugin` from 8.22.0 to 8.23.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.23.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.22.0 to 8.23.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.23.0/packages/parser)

Updates `eslint-plugin-github` from 5.1.5 to 5.1.7
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.1.5...v5.1.7)

---
updated-dependencies:
- dependency-name: "@octokit/types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 17:19:36 +00:00
dependabot[bot]
e456c53578 build(deps): bump actions/create-github-app-token in the actions group
Bumps the actions group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token).


Updates `actions/create-github-app-token` from 1.11.1 to 1.11.2
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](c1a285145b...136412a57a)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 17:10:22 +00:00
Óscar San José
0701025a8b Merge pull request #2727 from github/oscarsj-patch-1
Switch auth for enterprises-release repo from ssh to codeql CI token
2025-01-30 19:22:18 +01:00
Henry Mercer
9a4ae2164a Merge pull request #2748 from github/henrymercer/pin-setup-ruby
Pin `ruby/setup-ruby` Action to v1.215.0
2025-01-30 17:48:15 +00:00
Henry Mercer
5be1eb0d46 Pin ruby/setup-ruby Action to v1.215.0 2025-01-30 11:09:54 +00:00
Andrew Eisenberg
dcf2d0d183 Merge branch 'main' into oscarsj-patch-1 2025-01-29 14:16:29 -08:00
Andrew Eisenberg
e9987ad0c1 Merge pull request #2725 from github/aeisenberg/enable-actions-analysis
Add actions analysis to code scanning
2025-01-29 14:16:07 -08:00
Andrew Eisenberg
50954e7f00 Use a separate config file for actions queries 2025-01-29 12:25:34 -08:00
Henry Mercer
cf6550fa50 Merge pull request #2747 from github/mergeback/v3.28.8-to-main-dd746615
Mergeback v3.28.8 refs/heads/releases/v3 into main
2025-01-29 19:50:50 +00:00
github-actions[bot]
30ac3f3555 Update checked-in dependencies 2025-01-29 19:00:06 +00:00
github-actions[bot]
44dfd8f991 Update changelog and version after v3.28.8 2025-01-29 18:58:44 +00:00
Ian Lynagh
dd746615b3 Merge pull request #2746 from github/update-v3.28.8-a91a3f767
Merge main into releases/v3
2025-01-29 18:57:40 +00:00
Ian Lynagh
3210a3cda6 Fix Kotlin version in changelog 2025-01-29 18:33:39 +00:00
github-actions[bot]
72f9d0296b Update changelog for v3.28.8 2025-01-29 18:02:09 +00:00
Ian Lynagh
a91a3f7678 Merge pull request #2744 from github/igfoo/kot2.1.10
Kotlin: The 2.20.3 release supports Kotlin 2.1.10.
2025-01-29 16:45:39 +00:00
Marco Gario
c520fb59d4 Merge pull request #2745 from github/mergeback/v3.28.7-to-main-6e545590
Mergeback v3.28.7 refs/heads/releases/v3 into main
2025-01-29 14:22:11 +01:00
Ian Lynagh
3879c57660 Add changelog entry 2025-01-29 13:08:49 +00:00
Ian Lynagh
0c2193725f Run "npm run build" 2025-01-29 13:08:49 +00:00
Ian Lynagh
5a61bf07fa Kotlin: The 2.20.3 release supports Kotlin 2.1.10. 2025-01-29 13:08:49 +00:00
github-actions[bot]
163d1195df Update checked-in dependencies 2025-01-29 13:05:13 +00:00
github-actions[bot]
bcf5cecbc6 Update changelog and version after v3.28.7 2025-01-29 13:04:01 +00:00
Marco Gario
6e54559041 Merge pull request #2743 from github/update-v3.28.7-797fb30ed
Merge main into releases/v3
2025-01-29 14:03:15 +01:00
github-actions[bot]
cd346029a4 Update changelog for v3.28.7 2025-01-29 12:45:09 +00:00
Marco Gario
797fb30eda Merge pull request #2741 from github/reset_proxy_envs
Properly unset proxy env if empty
2025-01-29 13:23:57 +01:00
Óscar San José
1b7bc4888b Rename token to clarify scope 2025-01-29 12:34:35 +01:00
Marco Gario
f98f14dd82 Unset proxy env 2025-01-29 11:04:28 +00:00
Marco Gario
14b9c0ec59 Merge pull request #2740 from github/revert-2724-marcogario/skip_proxy
Revert "start-proxy: Skip proxy setup if no credentials are available"
2025-01-29 11:03:48 +01:00
Marco Gario
7fdc1b8d67 Revert "start-proxy: Skip proxy setup if no credentials are available" 2025-01-29 09:33:23 +01:00
Marco Gario
54b1c84213 Merge pull request #2724 from github/marcogario/skip_proxy
start-proxy: Skip proxy setup if no credentials are available
2025-01-28 22:15:51 +01:00
Marco Gario
76622e7fee Merge branch 'main' into marcogario/skip_proxy 2025-01-28 19:49:45 +00:00
Marco Gario
5f4f998a94 Merge pull request #2733 from github/marcogario/remove_proxy_password
start-proxy: Remove unusued proxy_password input
2025-01-28 09:59:10 +01:00
Andrew Eisenberg
43cffee811 Merge pull request #2736 from github/mergeback/v3.28.6-to-main-17a820bf
Mergeback v3.28.6 refs/heads/releases/v3 into main
2025-01-27 13:25:18 -08:00
github-actions[bot]
a5f217b812 Update checked-in dependencies 2025-01-27 21:06:23 +00:00
github-actions[bot]
c386dcd486 Update changelog and version after v3.28.6 2025-01-27 21:04:21 +00:00
Marco Gario
e2f043dee4 Remove unusued proxy_password input 2025-01-27 20:10:59 +00:00
Marco Gario
8aa028b476 Merge branch 'main' into marcogario/skip_proxy 2025-01-27 20:24:32 +01:00
Andrew Eisenberg
9ba5bca2ab Update Python version to 3.13 in workflow 2025-01-27 09:29:49 -08:00
Óscar San José
faa23b6fee Switch auth for enterprises-release repo from ssh to codeql CI token 2025-01-27 10:54:47 +01:00
Andrew Eisenberg
de4457eac2 Add actions analysis to code scannign
Create a new job to run actions since we don't need to
matrix the runs across multiple OSes.
2025-01-24 15:14:37 -08:00
Marco Gario
7d7758bb24 Skip proxy if no credentials 2025-01-24 21:46:40 +00:00
Owen Mansel-Chan
0d043c929c Update to rc2 2025-01-17 09:20:52 +00:00
Henry Mercer
695f3263e3 Merge branch 'main' into go/1.24 2024-12-19 16:14:19 +00:00
Michael B. Gale
7b4c9fef7d Go: Use 1.24rc1 in PR checks 2024-12-17 15:50:18 +00:00
5482 changed files with 266138 additions and 79506 deletions

View File

@@ -61,11 +61,12 @@ runs:
- name: Check config
working-directory: ${{ github.action_path }}
shell: bash
run: ts-node ./index.ts "${{ runner.temp }}/user-config.yaml" '${{ inputs.expected-config-file-contents }}'
env:
EXPECTED_CONFIG_FILE_CONTENTS: '${{ inputs.expected-config-file-contents }}'
run: ts-node ./index.ts "$RUNNER_TEMP/user-config.yaml" "$EXPECTED_CONFIG_FILE_CONTENTS"
- name: Clean up
shell: bash
if: always()
run: |
rm -rf ${{ runner.temp }}/codescanning-config-cli-test
rm -rf ${{ runner.temp }}/user-config.yaml
rm -rf $RUNNER_TEMP/codescanning-config-cli-test
rm -rf $RUNNER_TEMP/user-config.yaml

View File

@@ -8,7 +8,7 @@ const actualConfig = loadActualConfig()
const rawExpectedConfig = process.argv[3].trim()
if (!rawExpectedConfig) {
core.info('No expected configuration provided')
core.setFailed('No expected configuration provided')
} else {
core.startGroup('Expected generated user config')
core.info(yaml.dump(JSON.parse(rawExpectedConfig)))

View File

@@ -0,0 +1,4 @@
# Configuration for the CodeQL Actions Queries
name: "CodeQL Actions Queries config"
queries:
- uses: security-and-quality

View File

@@ -77,7 +77,7 @@ jobs:
setup-kotlin: 'true'
- uses: actions/setup-go@v5
with:
go-version: ~1.23.0
go-version: ~1.24.0
# to avoid potentially misleading autobuilder results where we expect it to download
# dependencies successfully, but they actually come from a warm cache
cache: false

View File

@@ -77,7 +77,7 @@ jobs:
setup-kotlin: 'true'
- uses: actions/setup-go@v5
with:
go-version: ~1.23.0
go-version: ~1.24.0
# to avoid potentially misleading autobuilder results where we expect it to download
# dependencies successfully, but they actually come from a warm cache
cache: false

View File

@@ -77,7 +77,7 @@ jobs:
setup-kotlin: 'true'
- uses: actions/setup-go@v5
with:
go-version: ~1.23.0
go-version: ~1.24.0
# to avoid potentially misleading autobuilder results where we expect it to download
# dependencies successfully, but they actually come from a warm cache
cache: false

View File

@@ -46,7 +46,7 @@ jobs:
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # v1.221.0
with:
ruby-version: 2.6
- name: Install Code Scanning integration

71
.github/workflows/__rust.yml generated vendored Normal file
View File

@@ -0,0 +1,71 @@
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
# to regenerate this file.
name: PR Check - Rust analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
schedule:
- cron: '0 5 * * *'
workflow_dispatch: {}
jobs:
rust:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: linked
- os: ubuntu-latest
version: default
- os: ubuntu-latest
version: nightly-latest
name: Rust analysis
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- uses: ./../action/init
with:
languages: rust
tools: ${{ steps.prepare-test.outputs.tools-url }}
env:
CODEQL_ACTION_RUST_ANALYSIS: true
- uses: ./../action/analyze
id: analysis
with:
upload-database: false
- name: Check database
shell: bash
run: |
RUST_DB="${{ fromJson(steps.analysis.outputs.db-locations).rust }}"
if [[ ! -d "$RUST_DB" ]]; then
echo "Did not create a database for Rust."
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true

View File

@@ -70,7 +70,7 @@ jobs:
echo "Suggested matrix config for analysis job: $VERSIONS_JSON"
echo "versions=${VERSIONS_JSON}" >> $GITHUB_OUTPUT
build:
analyze-javascript:
needs: [check-codeql-versions]
strategy:
fail-fast: false
@@ -81,7 +81,7 @@ jobs:
permissions:
contents: read
security-events: write # needed to upload results
security-events: write
steps:
- name: Checkout
@@ -100,3 +100,27 @@ jobs:
uses: ./analyze
with:
category: "/language:javascript"
analyze-actions:
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: ./init
with:
languages: actions
config-file: ./.github/codeql/codeql-actions-config.yml
- name: Perform CodeQL Analysis
uses: ./analyze
with:
category: "/language:actions"

View File

@@ -168,7 +168,7 @@ jobs:
--draft
- name: Generate token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755
uses: actions/create-github-app-token@v1.11.6
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -124,7 +124,7 @@ jobs:
pull-requests: write # needed to create pull request
steps:
- name: Generate token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755
uses: actions/create-github-app-token@v1.11.6
id: app-token
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}

View File

@@ -19,14 +19,14 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
python-version: "3.13"
- name: Checkout CodeQL Action
uses: actions/checkout@v4
- name: Checkout Enterprise Releases
uses: actions/checkout@v4
with:
repository: github/enterprise-releases
ssh-key: ${{ secrets.ENTERPRISE_RELEASES_SSH_KEY }}
token: ${{ secrets.ENTERPRISE_RELEASE_TOKEN }}
path: ${{ github.workspace }}/enterprise-releases/
- name: Update Supported Enterprise Server Versions
run: |

View File

@@ -1,20 +1,20 @@
repos:
- repo: local
hooks:
- id: lint-ts
name: Lint typescript code
files: \.ts$
language: system
entry: npm run lint -- --fix
- id: compile-ts
name: Compile typescript
files: \.[tj]s$
language: system
entry: npm run build
pass_filenames: false
- id: lint-ts
name: Lint typescript code
files: \.ts$
language: system
entry: npm run lint -- --fix
- id: pr-checks-sync
name: Synchronize PR check workflows
files: ^.github/workflows/__.*\.yml$|^pr-checks
language: system
entry: python3 pr-checks/sync.py
entry: pr-checks/sync.sh
pass_filenames: false

View File

@@ -2,6 +2,27 @@
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
## [UNRELEASED]
No user facing changes.
## 3.28.10 - 21 Feb 2025
- Update default CodeQL bundle version to 2.20.5. [#2772](https://github.com/github/codeql-action/pull/2772)
- Address an issue where the CodeQL Bundle would occasionally fail to decompress on macOS. [#2768](https://github.com/github/codeql-action/pull/2768)
## 3.28.9 - 07 Feb 2025
- Update default CodeQL bundle version to 2.20.4. [#2753](https://github.com/github/codeql-action/pull/2753)
## 3.28.8 - 29 Jan 2025
- Enable support for Kotlin 2.1.10 when running with CodeQL CLI v2.20.3. [#2744](https://github.com/github/codeql-action/pull/2744)
## 3.28.7 - 29 Jan 2025
No user facing changes.
## 3.28.6 - 27 Jan 2025
- Re-enable debug artifact upload for CLI versions 2.20.3 or greater. [#2726](https://github.com/github/codeql-action/pull/2726)

17
justfile Normal file
View File

@@ -0,0 +1,17 @@
# Perform all working copy cleanup operations
all: lint sync
# Lint source typescript
lint:
npm run lint -- --fix
# Sync generated files (javascript and PR checks)
sync: build update-pr-checks
# Perform all necessary steps to update the PR checks
update-pr-checks:
pr-checks/sync.sh
# Transpile typescript code into javascript
build:
npm run build

View File

@@ -60,7 +60,7 @@ async function runWrapper() {
if (config !== undefined) {
const codeql = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
const version = await codeql.getVersion();
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", () => debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, version.version));
await debugArtifacts.uploadCombinedSarifArtifacts(logger, config.gitHubVersion.type, version.version);
}
}
}

View File

@@ -1 +1 @@
{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,4DAA8C;AAC9C,6CAAgD;AAChD,qCAAqC;AACrC,iDAA2C;AAC3C,kEAAoD;AACpD,+CAAuC;AACvC,uCAAwD;AACxD,iCAAoE;AAEpE,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;QAClC,MAAM,aAAa,GAAG,MAAM,IAAA,6BAAgB,GAAE,CAAC;QAC/C,IAAA,gCAAyB,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;QAEjD,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAC5B,WAAW,CAAC,qBAAqB,EAAE,EACnC,MAAM,CACP,CAAC;YACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CA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ACjD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;gBAC1C,MAAM,cAAc,CAAC,4BAA4B,CAC/C,MAAM,EACN,MAAM,CAAC,aAAa,CAAC,IAAI,EACzB,OAAO,CAAC,OAAO,CAChB,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,sBAAe,EAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

8
lib/analyze-action.js generated
View File

@@ -160,6 +160,14 @@ async function run() {
let dbCreationTimings = undefined;
let didUploadTrapCaches = false;
util.initializeEnvironment(actionsUtil.getActionVersion());
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
// and can cause issues with the CodeQL CLI
// Check for CODEQL_PROXY_HOST: and if it is empty but set, unset it
if (process.env.CODEQL_PROXY_HOST === "") {
delete process.env.CODEQL_PROXY_HOST;
delete process.env.CODEQL_PROXY_PORT;
delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
}
// Make inputs accessible in the `post` step, details at
// https://github.com/github/codeql-action/issues/2553
actionsUtil.persistInputs();

File diff suppressed because one or more lines are too long

4
lib/analyze.js generated
View File

@@ -55,6 +55,7 @@ const api_client_1 = require("./api-client");
const autobuild_1 = require("./autobuild");
const codeql_1 = require("./codeql");
const diagnostics_1 = require("./diagnostics");
const diff_filtering_utils_1 = require("./diff-filtering-utils");
const environment_1 = require("./environment");
const feature_flags_1 = require("./feature-flags");
const languages_1 = require("./languages");
@@ -368,6 +369,9 @@ extensions:
const extensionFilePath = path.join(diffRangeDir, "pr-diff-range.yml");
fs.writeFileSync(extensionFilePath, extensionContents);
logger.debug(`Wrote pr-diff-range extension pack to ${extensionFilePath}:\n${extensionContents}`);
// Write the diff ranges to a JSON file, for action-side alert filtering by the
// upload-lib module.
(0, diff_filtering_utils_1.writeDiffRangesJsonFile)(logger, ranges);
return diffRangeDir;
}
// Runs queries and creates sarif files in the given folder

File diff suppressed because one or more lines are too long

10
lib/cli-errors.js generated
View File

@@ -110,6 +110,7 @@ function extractAutobuildErrors(error) {
var CliConfigErrorCategory;
(function (CliConfigErrorCategory) {
CliConfigErrorCategory["AutobuildError"] = "AutobuildError";
CliConfigErrorCategory["CouldNotCreateTempDir"] = "CouldNotCreateTempDir";
CliConfigErrorCategory["ExternalRepositoryCloneFailed"] = "ExternalRepositoryCloneFailed";
CliConfigErrorCategory["GradleBuildFailed"] = "GradleBuildFailed";
CliConfigErrorCategory["IncompatibleWithActionVersion"] = "IncompatibleWithActionVersion";
@@ -126,6 +127,7 @@ var CliConfigErrorCategory;
CliConfigErrorCategory["OutOfMemoryOrDisk"] = "OutOfMemoryOrDisk";
CliConfigErrorCategory["PackCannotBeFound"] = "PackCannotBeFound";
CliConfigErrorCategory["PackMissingAuth"] = "PackMissingAuth";
CliConfigErrorCategory["RateLimitExhausted"] = "RateLimitExhausted";
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
CliConfigErrorCategory["UnsupportedBuildMode"] = "UnsupportedBuildMode";
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
@@ -139,6 +141,9 @@ exports.cliErrorsConfig = {
new RegExp("We were unable to automatically build your code"),
],
},
[CliConfigErrorCategory.CouldNotCreateTempDir]: {
cliErrorMessageCandidates: [new RegExp("Could not create temp directory")],
},
[CliConfigErrorCategory.ExternalRepositoryCloneFailed]: {
cliErrorMessageCandidates: [
new RegExp("Failed to clone external Git repository"),
@@ -229,6 +234,11 @@ exports.cliErrorsConfig = {
new RegExp("Do you need to specify a token to authenticate to the registry?"),
],
},
[CliConfigErrorCategory.RateLimitExhausted]: {
cliErrorMessageCandidates: [
new RegExp("API rate limit exceeded for installation\\. If you reach out to GitHub Support for help, please include the request ID"),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),

File diff suppressed because one or more lines are too long

20
lib/codeql.js generated
View File

@@ -133,7 +133,11 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
};
}
catch (e) {
throw new Error(`Unable to download and extract CodeQL CLI: ${(0, util_1.getErrorMessage)(e)}${e instanceof Error && e.stack ? `\n\nDetails: ${e.stack}` : ""}`);
const ErrorClass = e instanceof util.ConfigurationError ||
(e instanceof Error && e.message.includes("ENOSPC")) // out of disk space
? util.ConfigurationError
: Error;
throw new ErrorClass(`Unable to download and extract CodeQL CLI: ${(0, util_1.getErrorMessage)(e)}${e instanceof Error && e.stack ? `\n\nDetails: ${e.stack}` : ""}`);
}
}
/**
@@ -258,9 +262,17 @@ async function getCodeQLForCmd(cmd, checkVersion) {
extraArgs.push(`--trace-process-name=${processName}`);
}
if (config.languages.indexOf(languages_1.Language.actions) >= 0) {
extraArgs.push("--search-path");
const extractorPath = path.resolve(__dirname, "../actions-extractor");
extraArgs.push(extractorPath);
// We originally added an embedded version of the Actions extractor to the CodeQL Action
// itself in order to deploy the extractor between CodeQL releases. When we did add the
// extractor to the CLI, though, its autobuild script was missing the execute bit.
// 2.20.6 is the first CLI release with the fully-functional extractor in the CLI. For older
// versions, we'll keep using the embedded extractor. We can remove the embedded extractor
// once 2.20.6 is deployed in the runner images.
if (!(await util.codeQlVersionAtLeast(codeql, "2.20.6"))) {
extraArgs.push("--search-path");
const extractorPath = path.resolve(__dirname, "../actions-extractor");
extraArgs.push(extractorPath);
}
}
const codeScanningConfigFile = await generateCodeScanningConfig(config, logger);
const externalRepositoryToken = (0, actions_util_1.getOptionalInput)("external-repository-token");

File diff suppressed because one or more lines are too long

38
lib/debug-artifacts.js generated
View File

@@ -66,26 +66,28 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion
const tempDir = (0, actions_util_1.getTemporaryDirectory)();
// Upload Actions SARIF artifacts for debugging when environment variable is set
if (process.env["CODEQL_ACTION_DEBUG_COMBINED_SARIF"] === "true") {
logger.info("Uploading available combined SARIF files as Actions debugging artifact...");
const baseTempDir = path.resolve(tempDir, "combined-sarif");
const toUpload = [];
if (fs.existsSync(baseTempDir)) {
const outputDirs = fs.readdirSync(baseTempDir);
for (const outputDir of outputDirs) {
const sarifFiles = fs
.readdirSync(path.resolve(baseTempDir, outputDir))
.filter((f) => f.endsWith(".sarif"));
for (const sarifFile of sarifFiles) {
toUpload.push(path.resolve(baseTempDir, outputDir, sarifFile));
await (0, logging_1.withGroup)("Uploading combined SARIF debug artifact", async () => {
logger.info("Uploading available combined SARIF files as Actions debugging artifact...");
const baseTempDir = path.resolve(tempDir, "combined-sarif");
const toUpload = [];
if (fs.existsSync(baseTempDir)) {
const outputDirs = fs.readdirSync(baseTempDir);
for (const outputDir of outputDirs) {
const sarifFiles = fs
.readdirSync(path.resolve(baseTempDir, outputDir))
.filter((f) => f.endsWith(".sarif"));
for (const sarifFile of sarifFiles) {
toUpload.push(path.resolve(baseTempDir, outputDir, sarifFile));
}
}
}
}
try {
await uploadDebugArtifacts(logger, toUpload, baseTempDir, "combined-sarif-artifacts", gitHubVariant, codeQlVersion);
}
catch (e) {
logger.warning(`Failed to upload combined SARIF files as Actions debugging artifact. Reason: ${(0, util_1.getErrorMessage)(e)}`);
}
try {
await uploadDebugArtifacts(logger, toUpload, baseTempDir, "combined-sarif-artifacts", gitHubVariant, codeQlVersion);
}
catch (e) {
logger.warning(`Failed to upload combined SARIF files as Actions debugging artifact. Reason: ${(0, util_1.getErrorMessage)(e)}`);
}
});
}
}
/**

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"bundleVersion": "codeql-bundle-v2.20.3",
"cliVersion": "2.20.3",
"priorBundleVersion": "codeql-bundle-v2.20.2",
"priorCliVersion": "2.20.2"
"bundleVersion": "codeql-bundle-v2.20.5",
"cliVersion": "2.20.5",
"priorBundleVersion": "codeql-bundle-v2.20.4",
"priorCliVersion": "2.20.4"
}

60
lib/diff-filtering-utils.js generated Normal file
View File

@@ -0,0 +1,60 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.writeDiffRangesJsonFile = writeDiffRangesJsonFile;
exports.readDiffRangesJsonFile = readDiffRangesJsonFile;
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const actionsUtil = __importStar(require("./actions-util"));
function getDiffRangesJsonFilePath() {
return path.join(actionsUtil.getTemporaryDirectory(), "pr-diff-range.json");
}
function writeDiffRangesJsonFile(logger, ranges) {
const jsonContents = JSON.stringify(ranges, null, 2);
const jsonFilePath = getDiffRangesJsonFilePath();
fs.writeFileSync(jsonFilePath, jsonContents);
logger.debug(`Wrote pr-diff-range JSON file to ${jsonFilePath}:\n${jsonContents}`);
}
function readDiffRangesJsonFile(logger) {
const jsonFilePath = getDiffRangesJsonFilePath();
if (!fs.existsSync(jsonFilePath)) {
logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`);
return undefined;
}
const jsonContents = fs.readFileSync(jsonFilePath, "utf8");
logger.debug(`Read pr-diff-range JSON file from ${jsonFilePath}:\n${jsonContents}`);
return JSON.parse(jsonContents);
}
//# sourceMappingURL=diff-filtering-utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"diff-filtering-utils.js","sourceRoot":"","sources":["../src/diff-filtering-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,0DAUC;AAED,wDAaC;AAzCD,uCAAyB;AACzB,2CAA6B;AAE7B,4DAA8C;AAS9C,SAAS,yBAAyB;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,oBAAoB,CAAC,CAAC;AAC9E,CAAC;AAED,SAAgB,uBAAuB,CACrC,MAAc,EACd,MAAwB;IAExB,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,yBAAyB,EAAE,CAAC;IACjD,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,CACV,oCAAoC,YAAY,MAAM,YAAY,EAAE,CACrE,CAAC;AACJ,CAAC;AAED,SAAgB,sBAAsB,CACpC,MAAc;IAEd,MAAM,YAAY,GAAG,yBAAyB,EAAE,CAAC;IACjD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,KAAK,CAAC,2CAA2C,YAAY,EAAE,CAAC,CAAC;QACxE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,CAAC,KAAK,CACV,qCAAqC,YAAY,MAAM,YAAY,EAAE,CACtE,CAAC;IACF,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAqB,CAAC;AACtD,CAAC"}

6
lib/feature-flags.js generated
View File

@@ -68,6 +68,7 @@ var Feature;
Feature["ExtractToToolcache"] = "extract_to_toolcache";
Feature["PythonDefaultIsToNotExtractStdlib"] = "python_default_is_to_not_extract_stdlib";
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
Feature["RustAnalysis"] = "rust_analysis";
Feature["ZstdBundleStreamingExtraction"] = "zstd_bundle_streaming_extraction";
})(Feature || (exports.Feature = Feature = {}));
exports.featureConfig = {
@@ -132,6 +133,11 @@ exports.featureConfig = {
minimumVersion: undefined,
toolsFeature: tools_features_1.ToolsFeature.PythonDefaultIsToNotExtractStdlib,
},
[Feature.RustAnalysis]: {
defaultValue: false,
envVar: "CODEQL_ACTION_RUST_ANALYSIS",
minimumVersion: "2.19.3",
},
[Feature.QaTelemetryEnabled]: {
defaultValue: false,
envVar: "CODEQL_ACTION_QA_TELEMETRY",

File diff suppressed because one or more lines are too long

View File

@@ -64,9 +64,10 @@ async function runWrapper() {
config = await (0, config_utils_1.getConfig)((0, actions_util_1.getTemporaryDirectory)(), logger);
if (config === undefined) {
logger.warning("Debugging artifacts are unavailable since the 'init' Action failed before it could produce any.");
return;
}
uploadFailedSarifResult = await initActionPostHelper.run(debugArtifacts.tryUploadAllAvailableDebugArtifacts, actions_util_1.printDebugLogs, config, repositoryNwo, features, logger);
else {
uploadFailedSarifResult = await initActionPostHelper.run(debugArtifacts.tryUploadAllAvailableDebugArtifacts, actions_util_1.printDebugLogs, config, repositoryNwo, features, logger);
}
}
catch (unwrappedError) {
const error = (0, util_1.wrapError)(unwrappedError);

View File

@@ -1 +1 @@
{"version":3,"file":"init-action-post.js","sourceRoot":"","sources":["../src/init-action-post.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,iDAIw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EAAC,MAAM,CAAC,EAC5B,MAAM,EACN,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CAAC;QACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,IAAA,gCAAgB,EAAC,gBAAgB,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO;IACT,CAAC;IACD,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;IAC3D,MAAM,CAAC,IAAI,CAAC,yBAAyB,IAAA,uCAAuB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAE5E,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAAsB,EACnD,0BAAU,CAAC,QAAQ,EACnB,SAAS,EACT,SAAS,EACT,MAAM,EACN,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,EAC5B,MAAM,CACP,CAAC;IACF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,MAAM,YAAY,GAAyB;YACzC,GAAG,gBAAgB;YACnB,GAAG,uBAAuB;YAC1B,UAAU,EAAE,oBAAoB,CAAC,iBAAiB,EAAE;SACrD,CAAC;QACF,MAAM,IAAA,gCAAgB,EAAC,YAAY,CAAC,CAAC;IACvC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}

26
lib/init-action.js generated
View File

@@ -37,6 +37,7 @@ const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const core = __importStar(require("@actions/core"));
const io = __importStar(require("@actions/io"));
const semver = __importStar(require("semver"));
const uuid_1 = require("uuid");
const actions_util_1 = require("./actions-util");
const api_client_1 = require("./api-client");
@@ -317,6 +318,11 @@ async function run() {
if (await features.getValue(feature_flags_1.Feature.DisableKotlinAnalysisEnabled)) {
core.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true");
}
const kotlinLimitVar = "CODEQL_EXTRACTOR_KOTLIN_OVERRIDE_MAXIMUM_VERSION_LIMIT";
if ((await (0, util_1.codeQlVersionAtLeast)(codeql, "2.20.3")) &&
!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.20.4"))) {
core.exportVariable(kotlinLimitVar, "2.1.20");
}
if (config.languages.includes(languages_1.Language.cpp)) {
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
if (process.env[envVar]) {
@@ -340,6 +346,26 @@ async function run() {
logger.info(`Setting C++ build-mode: none to ${value}`);
core.exportVariable(bmnVar, value);
}
// Set CODEQL_ENABLE_EXPERIMENTAL_FEATURES for rust
if (config.languages.includes(languages_1.Language.rust)) {
const feat = feature_flags_1.Feature.RustAnalysis;
const minVer = feature_flags_1.featureConfig[feat].minimumVersion;
const envVar = "CODEQL_ENABLE_EXPERIMENTAL_FEATURES";
// if in default setup, it means the feature flag was on when rust was enabled
// if the feature flag gets turned off, let's not have rust analysis throwing a configuration error
// in that case rust analysis will be disabled only when default setup is refreshed
if ((0, actions_util_1.isDefaultSetup)() || (await features.getValue(feat, codeql))) {
core.exportVariable(envVar, "true");
}
if (process.env[envVar] !== "true") {
throw new util_1.ConfigurationError(`Experimental and not officially supported Rust analysis requires setting ${envVar}=true in the environment`);
}
const actualVer = (await codeql.getVersion()).version;
if (semver.lt(actualVer, minVer)) {
throw new util_1.ConfigurationError(`Experimental rust analysis is supported by CodeQL CLI version ${minVer} or higher, but found version ${actualVer}`);
}
logger.info("Experimental rust analysis enabled");
}
// Restore dependency cache(s), if they exist.
if ((0, caching_utils_1.shouldRestoreCache)(config.dependencyCachingEnabled)) {
await (0, dependency_caching_1.downloadDependencyCaches)(config.languages, logger);

File diff suppressed because one or more lines are too long

View File

@@ -45,7 +45,6 @@ const util = __importStar(require("./util"));
const UPDATEJOB_PROXY = "update-job-proxy";
const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727";
const UPDATEJOB_PROXY_URL_PREFIX = "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/";
const PROXY_USER = "proxy_user";
const KEY_SIZE = 2048;
const KEY_EXPIRY_YEARS = 2;
const CERT_SUBJECT = [
@@ -100,15 +99,17 @@ async function runWrapper() {
core.saveState("proxy-log-file", proxyLogFilePath);
// Get the configuration options
const credentials = (0, start_proxy_1.getCredentials)(logger, actionsUtil.getOptionalInput("registry_secrets"), actionsUtil.getOptionalInput("registries_credentials"), actionsUtil.getOptionalInput("language"));
if (credentials.length === 0) {
logger.info("No credentials found, skipping proxy setup.");
return;
}
logger.info(`Credentials loaded for the following registries:\n ${credentials
.map((c) => credentialToStr(c))
.join("\n")}`);
const ca = generateCertificateAuthority();
const proxyAuth = getProxyAuth();
const proxyConfig = {
all_credentials: credentials,
ca,
proxy_auth: proxyAuth,
};
// Start the Proxy
const proxyBin = await getProxyBinaryPath();
@@ -165,17 +166,6 @@ async function startProxy(binPath, config, logFilePath, logger) {
core.setFailed(`start-proxy action failed: ${util.getErrorMessage(error)}`);
}
}
// getProxyAuth returns the authentication information for the proxy itself.
function getProxyAuth() {
const proxy_password = actionsUtil.getOptionalInput("proxy_password");
if (proxy_password) {
return {
username: PROXY_USER,
password: proxy_password,
};
}
return;
}
async function getProxyBinaryPath() {
const proxyFileName = process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY;
const platform = process.platform === "win32"

File diff suppressed because one or more lines are too long

11
lib/tar.js generated
View File

@@ -143,7 +143,16 @@ async function extractTarZst(tar, dest, tarVersion, logger) {
: ""}`);
try {
// Initialize args
const args = ["-x", "--zstd"];
//
// `--ignore-zeros` means that trailing zero bytes at the end of an archive will be read
// by `tar` in case a further concatenated archive follows. Otherwise when a tarball built
// by GNU tar, which writes many trailing zeroes, is read by BSD tar, which expects less, then
// BSD tar can hang up the pipe to its filter program early, and if that program is `zstd`
// then it will try to write the remaining zeroes, get an EPIPE error because `tar` has closed
// its end of the pipe, return 1, and `tar` will pass the error along.
//
// See also https://github.com/facebook/zstd/issues/4294
const args = ["-x", "--zstd", "--ignore-zeros"];
if (tarVersion.type === "gnu") {
// Suppress warnings when using GNU tar to extract archives created by BSD tar
args.push("--warning=no-unknown-keyword");

File diff suppressed because one or more lines are too long

41
lib/upload-lib.js generated
View File

@@ -58,6 +58,7 @@ const api = __importStar(require("./api-client"));
const api_client_1 = require("./api-client");
const codeql_1 = require("./codeql");
const config_utils_1 = require("./config-utils");
const diff_filtering_utils_1 = require("./diff-filtering-utils");
const environment_1 = require("./environment");
const fingerprints = __importStar(require("./fingerprints"));
const gitUtils = __importStar(require("./git-utils"));
@@ -412,6 +413,7 @@ async function uploadFiles(sarifPath, checkoutPath, category, features, logger)
validateSarifFileSchema(file, logger);
}
let sarif = await combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger);
sarif = filterAlertsByDiffRange(logger, sarif);
sarif = await fingerprints.addFingerprints(sarif, checkoutPath, logger);
const analysisKey = await api.getAnalysisKey();
const environment = actionsUtil.getRequiredInput("matrix");
@@ -607,4 +609,43 @@ class InvalidSarifUploadError extends Error {
}
}
exports.InvalidSarifUploadError = InvalidSarifUploadError;
function filterAlertsByDiffRange(logger, sarif) {
const diffRanges = (0, diff_filtering_utils_1.readDiffRangesJsonFile)(logger);
if (!diffRanges?.length) {
return sarif;
}
const checkoutPath = actionsUtil.getRequiredInput("checkout_path");
for (const run of sarif.runs) {
if (run.results) {
run.results = run.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
...(result.relatedLocations || []).map((loc) => loc.physicalLocation),
];
return locations.some((physicalLocation) => {
const locationUri = physicalLocation?.artifactLocation?.uri;
const locationStartLine = physicalLocation?.region?.startLine;
if (!locationUri || locationStartLine === undefined) {
return false;
}
// CodeQL always uses forward slashes as the path separator, so on Windows we
// need to replace any backslashes with forward slashes.
const locationPath = path
.join(checkoutPath, locationUri)
.replaceAll(path.sep, "/");
// Alert filtering here replicates the same behavior as the restrictAlertsTo
// extensible predicate in CodeQL. See the restrictAlertsTo documentation
// https://codeql.github.com/codeql-standard-libraries/csharp/codeql/util/AlertFiltering.qll/predicate.AlertFiltering$restrictAlertsTo.3.html
// for more details, such as why the filtering applies only to the first line
// of an alert location.
return diffRanges.some((range) => range.path === locationPath &&
((range.startLine <= locationStartLine &&
range.endLine >= locationStartLine) ||
(range.startLine === 0 && range.endLine === 0)));
});
});
}
}
return sarif;
}
//# sourceMappingURL=upload-lib.js.map

File diff suppressed because one or more lines are too long

3
lib/util.js generated
View File

@@ -823,10 +823,11 @@ async function checkDiskUsage(logger) {
return undefined;
}
const diskUsage = await (0, check_disk_space_1.default)(getRequiredEnvParam("GITHUB_WORKSPACE"));
const mbInBytes = 1024 * 1024;
const gbInBytes = 1024 * 1024 * 1024;
if (diskUsage.free < 2 * gbInBytes) {
const message = "The Actions runner is running low on disk space " +
`(${(diskUsage.free / gbInBytes).toPrecision(4)} GB available).`;
`(${(diskUsage.free / mbInBytes).toPrecision(4)} MB available).`;
if (process.env[environment_1.EnvVar.HAS_WARNED_ABOUT_DISK_SPACE] !== "true") {
logger.warning(message);
}

File diff suppressed because one or more lines are too long

1560
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

View File

@@ -213,7 +213,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
};
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
if (!response.ok) {
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
return undefined;
}
core.info(`Cache hit for: ${request.key}`);
@@ -405,12 +405,20 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
key,
version
};
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
let signedUploadUrl;
try {
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
throw new Error('Response was not ok');
}
signedUploadUrl = response.signedUploadUrl;
}
catch (error) {
core.debug(`Failed to reserve cache: ${error}`);
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
}
core.debug(`Attempting to upload cache located at: ${archivePath}`);
yield cacheHttpClient.saveCache(cacheId, archivePath, response.signedUploadUrl, options);
yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options);
const finalizeRequest = {
key,
version,

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,6 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { CacheEntry } from "../../entities/v1/cacheentry";
import { CacheMetadata } from "../../entities/v1/cachemetadata";
/**
* @generated from protobuf message github.actions.results.api.v1.CreateCacheEntryRequest
@@ -139,118 +138,6 @@ export interface GetCacheEntryDownloadURLResponse {
*/
matchedKey: string;
}
/**
* @generated from protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest
*/
export interface DeleteCacheEntryRequest {
/**
* Scope and other metadata for the cache entry
*
* @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
*/
metadata?: CacheMetadata;
/**
* An explicit key for a cache entry
*
* @generated from protobuf field: string key = 2;
*/
key: string;
}
/**
* @generated from protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse
*/
export interface DeleteCacheEntryResponse {
/**
* @generated from protobuf field: bool ok = 1;
*/
ok: boolean;
/**
* Cache entry database ID
*
* @generated from protobuf field: int64 entry_id = 2;
*/
entryId: string;
}
/**
* @generated from protobuf message github.actions.results.api.v1.ListCacheEntriesRequest
*/
export interface ListCacheEntriesRequest {
/**
* Scope and other metadata for the cache entry
*
* @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
*/
metadata?: CacheMetadata;
/**
* An explicit key for a cache entry
*
* @generated from protobuf field: string key = 2;
*/
key: string;
/**
* Restore keys used for prefix searching
*
* @generated from protobuf field: repeated string restore_keys = 3;
*/
restoreKeys: string[];
}
/**
* @generated from protobuf message github.actions.results.api.v1.ListCacheEntriesResponse
*/
export interface ListCacheEntriesResponse {
/**
* Cache entries in the defined scope
*
* @generated from protobuf field: repeated github.actions.results.entities.v1.CacheEntry entries = 1;
*/
entries: CacheEntry[];
}
/**
* @generated from protobuf message github.actions.results.api.v1.LookupCacheEntryRequest
*/
export interface LookupCacheEntryRequest {
/**
* Scope and other metadata for the cache entry
*
* @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
*/
metadata?: CacheMetadata;
/**
* An explicit key for a cache entry
*
* @generated from protobuf field: string key = 2;
*/
key: string;
/**
* Restore keys used for prefix searching
*
* @generated from protobuf field: repeated string restore_keys = 3;
*/
restoreKeys: string[];
/**
* Hash of the compression tool, runner OS and paths cached
*
* @generated from protobuf field: string version = 4;
*/
version: string;
}
/**
* @generated from protobuf message github.actions.results.api.v1.LookupCacheEntryResponse
*/
export interface LookupCacheEntryResponse {
/**
* Indicates whether the cache entry exists or not
*
* @generated from protobuf field: bool exists = 1;
*/
exists: boolean;
/**
* Matched cache entry metadata
*
* @generated from protobuf field: github.actions.results.entities.v1.CacheEntry entry = 2;
*/
entry?: CacheEntry;
}
declare class CreateCacheEntryRequest$Type extends MessageType<CreateCacheEntryRequest> {
constructor();
create(value?: PartialMessage<CreateCacheEntryRequest>): CreateCacheEntryRequest;
@@ -311,66 +198,6 @@ declare class GetCacheEntryDownloadURLResponse$Type extends MessageType<GetCache
* @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse
*/
export declare const GetCacheEntryDownloadURLResponse: GetCacheEntryDownloadURLResponse$Type;
declare class DeleteCacheEntryRequest$Type extends MessageType<DeleteCacheEntryRequest> {
constructor();
create(value?: PartialMessage<DeleteCacheEntryRequest>): DeleteCacheEntryRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCacheEntryRequest): DeleteCacheEntryRequest;
internalBinaryWrite(message: DeleteCacheEntryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest
*/
export declare const DeleteCacheEntryRequest: DeleteCacheEntryRequest$Type;
declare class DeleteCacheEntryResponse$Type extends MessageType<DeleteCacheEntryResponse> {
constructor();
create(value?: PartialMessage<DeleteCacheEntryResponse>): DeleteCacheEntryResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCacheEntryResponse): DeleteCacheEntryResponse;
internalBinaryWrite(message: DeleteCacheEntryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse
*/
export declare const DeleteCacheEntryResponse: DeleteCacheEntryResponse$Type;
declare class ListCacheEntriesRequest$Type extends MessageType<ListCacheEntriesRequest> {
constructor();
create(value?: PartialMessage<ListCacheEntriesRequest>): ListCacheEntriesRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCacheEntriesRequest): ListCacheEntriesRequest;
internalBinaryWrite(message: ListCacheEntriesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesRequest
*/
export declare const ListCacheEntriesRequest: ListCacheEntriesRequest$Type;
declare class ListCacheEntriesResponse$Type extends MessageType<ListCacheEntriesResponse> {
constructor();
create(value?: PartialMessage<ListCacheEntriesResponse>): ListCacheEntriesResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCacheEntriesResponse): ListCacheEntriesResponse;
internalBinaryWrite(message: ListCacheEntriesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesResponse
*/
export declare const ListCacheEntriesResponse: ListCacheEntriesResponse$Type;
declare class LookupCacheEntryRequest$Type extends MessageType<LookupCacheEntryRequest> {
constructor();
create(value?: PartialMessage<LookupCacheEntryRequest>): LookupCacheEntryRequest;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LookupCacheEntryRequest): LookupCacheEntryRequest;
internalBinaryWrite(message: LookupCacheEntryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryRequest
*/
export declare const LookupCacheEntryRequest: LookupCacheEntryRequest$Type;
declare class LookupCacheEntryResponse$Type extends MessageType<LookupCacheEntryResponse> {
constructor();
create(value?: PartialMessage<LookupCacheEntryResponse>): LookupCacheEntryResponse;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LookupCacheEntryResponse): LookupCacheEntryResponse;
internalBinaryWrite(message: LookupCacheEntryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryResponse
*/
export declare const LookupCacheEntryResponse: LookupCacheEntryResponse$Type;
/**
* @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService
*/

View File

@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheService = exports.LookupCacheEntryResponse = exports.LookupCacheEntryRequest = exports.ListCacheEntriesResponse = exports.ListCacheEntriesRequest = exports.DeleteCacheEntryResponse = exports.DeleteCacheEntryRequest = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0;
exports.CacheService = exports.GetCacheEntryDownloadURLResponse = exports.GetCacheEntryDownloadURLRequest = exports.FinalizeCacheEntryUploadResponse = exports.FinalizeCacheEntryUploadRequest = exports.CreateCacheEntryResponse = exports.CreateCacheEntryRequest = void 0;
// @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies
// @generated from protobuf file "results/api/v1/cache.proto" (package "github.actions.results.api.v1", syntax proto3)
// tslint:disable
@@ -10,7 +10,6 @@ const runtime_2 = require("@protobuf-ts/runtime");
const runtime_3 = require("@protobuf-ts/runtime");
const runtime_4 = require("@protobuf-ts/runtime");
const runtime_5 = require("@protobuf-ts/runtime");
const cacheentry_1 = require("../../entities/v1/cacheentry");
const cachemetadata_1 = require("../../entities/v1/cachemetadata");
// @generated message type with reflection information, may provide speed optimized methods
class CreateCacheEntryRequest$Type extends runtime_5.MessageType {
@@ -378,353 +377,12 @@ class GetCacheEntryDownloadURLResponse$Type extends runtime_5.MessageType {
* @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse
*/
exports.GetCacheEntryDownloadURLResponse = new GetCacheEntryDownloadURLResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteCacheEntryRequest$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.DeleteCacheEntryRequest", [
{ no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata },
{ no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { key: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1:
message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata);
break;
case /* string key */ 2:
message.key = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* github.actions.results.entities.v1.CacheMetadata metadata = 1; */
if (message.metadata)
cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* string key = 2; */
if (message.key !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest
*/
exports.DeleteCacheEntryRequest = new DeleteCacheEntryRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteCacheEntryResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.DeleteCacheEntryResponse", [
{ no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "entry_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
]);
}
create(value) {
const message = { ok: false, entryId: "0" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* bool ok */ 1:
message.ok = reader.bool();
break;
case /* int64 entry_id */ 2:
message.entryId = reader.int64().toString();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* bool ok = 1; */
if (message.ok !== false)
writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
/* int64 entry_id = 2; */
if (message.entryId !== "0")
writer.tag(2, runtime_1.WireType.Varint).int64(message.entryId);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse
*/
exports.DeleteCacheEntryResponse = new DeleteCacheEntryResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListCacheEntriesRequest$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.ListCacheEntriesRequest", [
{ no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata },
{ no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { key: "", restoreKeys: [] };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1:
message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata);
break;
case /* string key */ 2:
message.key = reader.string();
break;
case /* repeated string restore_keys */ 3:
message.restoreKeys.push(reader.string());
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* github.actions.results.entities.v1.CacheMetadata metadata = 1; */
if (message.metadata)
cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* string key = 2; */
if (message.key !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key);
/* repeated string restore_keys = 3; */
for (let i = 0; i < message.restoreKeys.length; i++)
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesRequest
*/
exports.ListCacheEntriesRequest = new ListCacheEntriesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListCacheEntriesResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.ListCacheEntriesResponse", [
{ no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => cacheentry_1.CacheEntry }
]);
}
create(value) {
const message = { entries: [] };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated github.actions.results.entities.v1.CacheEntry entries */ 1:
message.entries.push(cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options));
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* repeated github.actions.results.entities.v1.CacheEntry entries = 1; */
for (let i = 0; i < message.entries.length; i++)
cacheentry_1.CacheEntry.internalBinaryWrite(message.entries[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesResponse
*/
exports.ListCacheEntriesResponse = new ListCacheEntriesResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class LookupCacheEntryRequest$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.LookupCacheEntryRequest", [
{ no: 1, name: "metadata", kind: "message", T: () => cachemetadata_1.CacheMetadata },
{ no: 2, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "restore_keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value) {
const message = { key: "", restoreKeys: [], version: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* github.actions.results.entities.v1.CacheMetadata metadata */ 1:
message.metadata = cachemetadata_1.CacheMetadata.internalBinaryRead(reader, reader.uint32(), options, message.metadata);
break;
case /* string key */ 2:
message.key = reader.string();
break;
case /* repeated string restore_keys */ 3:
message.restoreKeys.push(reader.string());
break;
case /* string version */ 4:
message.version = reader.string();
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* github.actions.results.entities.v1.CacheMetadata metadata = 1; */
if (message.metadata)
cachemetadata_1.CacheMetadata.internalBinaryWrite(message.metadata, writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* string key = 2; */
if (message.key !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.key);
/* repeated string restore_keys = 3; */
for (let i = 0; i < message.restoreKeys.length; i++)
writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.restoreKeys[i]);
/* string version = 4; */
if (message.version !== "")
writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.version);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryRequest
*/
exports.LookupCacheEntryRequest = new LookupCacheEntryRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class LookupCacheEntryResponse$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.api.v1.LookupCacheEntryResponse", [
{ no: 1, name: "exists", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 2, name: "entry", kind: "message", T: () => cacheentry_1.CacheEntry }
]);
}
create(value) {
const message = { exists: false };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* bool exists */ 1:
message.exists = reader.bool();
break;
case /* github.actions.results.entities.v1.CacheEntry entry */ 2:
message.entry = cacheentry_1.CacheEntry.internalBinaryRead(reader, reader.uint32(), options, message.entry);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* bool exists = 1; */
if (message.exists !== false)
writer.tag(1, runtime_1.WireType.Varint).bool(message.exists);
/* github.actions.results.entities.v1.CacheEntry entry = 2; */
if (message.entry)
cacheentry_1.CacheEntry.internalBinaryWrite(message.entry, writer.tag(2, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryResponse
*/
exports.LookupCacheEntryResponse = new LookupCacheEntryResponse$Type();
/**
* @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService
*/
exports.CacheService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.CacheService", [
{ name: "CreateCacheEntry", options: {}, I: exports.CreateCacheEntryRequest, O: exports.CreateCacheEntryResponse },
{ name: "FinalizeCacheEntryUpload", options: {}, I: exports.FinalizeCacheEntryUploadRequest, O: exports.FinalizeCacheEntryUploadResponse },
{ name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse },
{ name: "DeleteCacheEntry", options: {}, I: exports.DeleteCacheEntryRequest, O: exports.DeleteCacheEntryResponse },
{ name: "ListCacheEntries", options: {}, I: exports.ListCacheEntriesRequest, O: exports.ListCacheEntriesResponse },
{ name: "LookupCacheEntry", options: {}, I: exports.LookupCacheEntryRequest, O: exports.LookupCacheEntryResponse }
{ name: "GetCacheEntryDownloadURL", options: {}, I: exports.GetCacheEntryDownloadURLRequest, O: exports.GetCacheEntryDownloadURLResponse }
]);
//# sourceMappingURL=cache.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,24 @@
import { CreateCacheEntryRequest, CreateCacheEntryResponse, FinalizeCacheEntryUploadRequest, FinalizeCacheEntryUploadResponse, GetCacheEntryDownloadURLRequest, GetCacheEntryDownloadURLResponse } from "./cache";
interface Rpc {
request(service: string, method: string, contentType: "application/json" | "application/protobuf", data: object | Uint8Array): Promise<object | Uint8Array>;
}
export interface CacheServiceClient {
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
}
export declare class CacheServiceClientJSON implements CacheServiceClient {
private readonly rpc;
constructor(rpc: Rpc);
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
}
export declare class CacheServiceClientProtobuf implements CacheServiceClient {
private readonly rpc;
constructor(rpc: Rpc);
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
}
export {};

View File

@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0;
const cache_1 = require("./cache");
class CacheServiceClientJSON {
constructor(rpc) {
this.rpc = rpc;
this.CreateCacheEntry.bind(this);
this.FinalizeCacheEntryUpload.bind(this);
this.GetCacheEntryDownloadURL.bind(this);
}
CreateCacheEntry(request) {
const data = cache_1.CreateCacheEntryRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data);
return promise.then((data) => cache_1.CreateCacheEntryResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
FinalizeCacheEntryUpload(request) {
const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data);
return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
GetCacheEntryDownloadURL(request) {
const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data);
return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
}
exports.CacheServiceClientJSON = CacheServiceClientJSON;
class CacheServiceClientProtobuf {
constructor(rpc) {
this.rpc = rpc;
this.CreateCacheEntry.bind(this);
this.FinalizeCacheEntryUpload.bind(this);
this.GetCacheEntryDownloadURL.bind(this);
}
CreateCacheEntry(request) {
const data = cache_1.CreateCacheEntryRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data);
return promise.then((data) => cache_1.CreateCacheEntryResponse.fromBinary(data));
}
FinalizeCacheEntryUpload(request) {
const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data);
return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data));
}
GetCacheEntryDownloadURL(request) {
const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data);
return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data));
}
}
exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf;
//# sourceMappingURL=cache.twirp-client.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cache.twirp-client.js","sourceRoot":"","sources":["../../../../../src/generated/results/api/v1/cache.twirp-client.ts"],"names":[],"mappings":";;;AAAA,mCAOmB;AA2BjB,MAAa,sBAAsB;IAEjC,YAAY,GAAQ;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,gBAAgB,CACd,OAAgC;QAEhC,MAAM,IAAI,GAAG,+BAAuB,CAAC,MAAM,CAAC,OAAO,EAAE;YACnD,iBAAiB,EAAE,IAAI;YACvB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAC9B,4CAA4C,EAC5C,kBAAkB,EAClB,kBAAkB,EAClB,IAAc,CACf,CAAC;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC3B,gCAAwB,CAAC,QAAQ,CAAC,IAAW,EAAE;YAC7C,mBAAmB,EAAE,IAAI;SAC1B,CAAC,CACH,CAAC;IACJ,CAAC;IAED,wBAAwB,CACtB,OAAwC;QAExC,MAAM,IAAI,GAAG,uCAA+B,CAAC,MAAM,CAAC,OAAO,EAAE;YAC3D,iBAAiB,EAAE,IAAI;YACvB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAC9B,4CAA4C,EA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IAAI,EAAE,EAAE,CAC3B,gCAAwB,CAAC,UAAU,CAAC,IAAkB,CAAC,CACxD,CAAC;IACJ,CAAC;IAED,wBAAwB,CACtB,OAAwC;QAExC,MAAM,IAAI,GAAG,uCAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAC9B,4CAA4C,EAC5C,0BAA0B,EAC1B,sBAAsB,EACtB,IAAI,CACL,CAAC;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC3B,wCAAgC,CAAC,UAAU,CAAC,IAAkB,CAAC,CAChE,CAAC;IACJ,CAAC;IAED,wBAAwB,CACtB,OAAwC;QAExC,MAAM,IAAI,GAAG,uCAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAC9B,4CAA4C,EAC5C,0BAA0B,EAC1B,sBAAsB,EACtB,IAAI,CACL,CAAC;QACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC3B,wCAAgC,CAAC,UAAU,CAAC,IAAkB,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AApDD,gEAoDC"}

View File

@@ -1,53 +0,0 @@
/// <reference types="node" />
import { TwirpContext, TwirpServer } from "twirp-ts";
import { CreateCacheEntryRequest, CreateCacheEntryResponse, FinalizeCacheEntryUploadRequest, FinalizeCacheEntryUploadResponse, GetCacheEntryDownloadURLRequest, GetCacheEntryDownloadURLResponse, DeleteCacheEntryRequest, DeleteCacheEntryResponse, ListCacheEntriesRequest, ListCacheEntriesResponse, LookupCacheEntryRequest, LookupCacheEntryResponse } from "./cache";
interface Rpc {
request(service: string, method: string, contentType: "application/json" | "application/protobuf", data: object | Uint8Array): Promise<object | Uint8Array>;
}
export interface CacheServiceClient {
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
DeleteCacheEntry(request: DeleteCacheEntryRequest): Promise<DeleteCacheEntryResponse>;
ListCacheEntries(request: ListCacheEntriesRequest): Promise<ListCacheEntriesResponse>;
LookupCacheEntry(request: LookupCacheEntryRequest): Promise<LookupCacheEntryResponse>;
}
export declare class CacheServiceClientJSON implements CacheServiceClient {
private readonly rpc;
constructor(rpc: Rpc);
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
DeleteCacheEntry(request: DeleteCacheEntryRequest): Promise<DeleteCacheEntryResponse>;
ListCacheEntries(request: ListCacheEntriesRequest): Promise<ListCacheEntriesResponse>;
LookupCacheEntry(request: LookupCacheEntryRequest): Promise<LookupCacheEntryResponse>;
}
export declare class CacheServiceClientProtobuf implements CacheServiceClient {
private readonly rpc;
constructor(rpc: Rpc);
CreateCacheEntry(request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
DeleteCacheEntry(request: DeleteCacheEntryRequest): Promise<DeleteCacheEntryResponse>;
ListCacheEntries(request: ListCacheEntriesRequest): Promise<ListCacheEntriesResponse>;
LookupCacheEntry(request: LookupCacheEntryRequest): Promise<LookupCacheEntryResponse>;
}
export interface CacheServiceTwirp<T extends TwirpContext = TwirpContext> {
CreateCacheEntry(ctx: T, request: CreateCacheEntryRequest): Promise<CreateCacheEntryResponse>;
FinalizeCacheEntryUpload(ctx: T, request: FinalizeCacheEntryUploadRequest): Promise<FinalizeCacheEntryUploadResponse>;
GetCacheEntryDownloadURL(ctx: T, request: GetCacheEntryDownloadURLRequest): Promise<GetCacheEntryDownloadURLResponse>;
DeleteCacheEntry(ctx: T, request: DeleteCacheEntryRequest): Promise<DeleteCacheEntryResponse>;
ListCacheEntries(ctx: T, request: ListCacheEntriesRequest): Promise<ListCacheEntriesResponse>;
LookupCacheEntry(ctx: T, request: LookupCacheEntryRequest): Promise<LookupCacheEntryResponse>;
}
export declare enum CacheServiceMethod {
CreateCacheEntry = "CreateCacheEntry",
FinalizeCacheEntryUpload = "FinalizeCacheEntryUpload",
GetCacheEntryDownloadURL = "GetCacheEntryDownloadURL",
DeleteCacheEntry = "DeleteCacheEntry",
ListCacheEntries = "ListCacheEntries",
LookupCacheEntry = "LookupCacheEntry"
}
export declare const CacheServiceMethodList: CacheServiceMethod[];
export declare function createCacheServiceServer<T extends TwirpContext = TwirpContext>(service: CacheServiceTwirp<T>): TwirpServer<CacheServiceTwirp<TwirpContext<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>>, T>;
export {};

View File

@@ -1,602 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCacheServiceServer = exports.CacheServiceMethodList = exports.CacheServiceMethod = exports.CacheServiceClientProtobuf = exports.CacheServiceClientJSON = void 0;
const twirp_ts_1 = require("twirp-ts");
const cache_1 = require("./cache");
class CacheServiceClientJSON {
constructor(rpc) {
this.rpc = rpc;
this.CreateCacheEntry.bind(this);
this.FinalizeCacheEntryUpload.bind(this);
this.GetCacheEntryDownloadURL.bind(this);
this.DeleteCacheEntry.bind(this);
this.ListCacheEntries.bind(this);
this.LookupCacheEntry.bind(this);
}
CreateCacheEntry(request) {
const data = cache_1.CreateCacheEntryRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/json", data);
return promise.then((data) => cache_1.CreateCacheEntryResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
FinalizeCacheEntryUpload(request) {
const data = cache_1.FinalizeCacheEntryUploadRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/json", data);
return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
GetCacheEntryDownloadURL(request) {
const data = cache_1.GetCacheEntryDownloadURLRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/json", data);
return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
DeleteCacheEntry(request) {
const data = cache_1.DeleteCacheEntryRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/json", data);
return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
ListCacheEntries(request) {
const data = cache_1.ListCacheEntriesRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/json", data);
return promise.then((data) => cache_1.ListCacheEntriesResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
LookupCacheEntry(request) {
const data = cache_1.LookupCacheEntryRequest.toJson(request, {
useProtoFieldName: true,
emitDefaultValues: false,
});
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/json", data);
return promise.then((data) => cache_1.LookupCacheEntryResponse.fromJson(data, {
ignoreUnknownFields: true,
}));
}
}
exports.CacheServiceClientJSON = CacheServiceClientJSON;
class CacheServiceClientProtobuf {
constructor(rpc) {
this.rpc = rpc;
this.CreateCacheEntry.bind(this);
this.FinalizeCacheEntryUpload.bind(this);
this.GetCacheEntryDownloadURL.bind(this);
this.DeleteCacheEntry.bind(this);
this.ListCacheEntries.bind(this);
this.LookupCacheEntry.bind(this);
}
CreateCacheEntry(request) {
const data = cache_1.CreateCacheEntryRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "CreateCacheEntry", "application/protobuf", data);
return promise.then((data) => cache_1.CreateCacheEntryResponse.fromBinary(data));
}
FinalizeCacheEntryUpload(request) {
const data = cache_1.FinalizeCacheEntryUploadRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "FinalizeCacheEntryUpload", "application/protobuf", data);
return promise.then((data) => cache_1.FinalizeCacheEntryUploadResponse.fromBinary(data));
}
GetCacheEntryDownloadURL(request) {
const data = cache_1.GetCacheEntryDownloadURLRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "GetCacheEntryDownloadURL", "application/protobuf", data);
return promise.then((data) => cache_1.GetCacheEntryDownloadURLResponse.fromBinary(data));
}
DeleteCacheEntry(request) {
const data = cache_1.DeleteCacheEntryRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "DeleteCacheEntry", "application/protobuf", data);
return promise.then((data) => cache_1.DeleteCacheEntryResponse.fromBinary(data));
}
ListCacheEntries(request) {
const data = cache_1.ListCacheEntriesRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "ListCacheEntries", "application/protobuf", data);
return promise.then((data) => cache_1.ListCacheEntriesResponse.fromBinary(data));
}
LookupCacheEntry(request) {
const data = cache_1.LookupCacheEntryRequest.toBinary(request);
const promise = this.rpc.request("github.actions.results.api.v1.CacheService", "LookupCacheEntry", "application/protobuf", data);
return promise.then((data) => cache_1.LookupCacheEntryResponse.fromBinary(data));
}
}
exports.CacheServiceClientProtobuf = CacheServiceClientProtobuf;
var CacheServiceMethod;
(function (CacheServiceMethod) {
CacheServiceMethod["CreateCacheEntry"] = "CreateCacheEntry";
CacheServiceMethod["FinalizeCacheEntryUpload"] = "FinalizeCacheEntryUpload";
CacheServiceMethod["GetCacheEntryDownloadURL"] = "GetCacheEntryDownloadURL";
CacheServiceMethod["DeleteCacheEntry"] = "DeleteCacheEntry";
CacheServiceMethod["ListCacheEntries"] = "ListCacheEntries";
CacheServiceMethod["LookupCacheEntry"] = "LookupCacheEntry";
})(CacheServiceMethod || (exports.CacheServiceMethod = CacheServiceMethod = {}));
exports.CacheServiceMethodList = [
CacheServiceMethod.CreateCacheEntry,
CacheServiceMethod.FinalizeCacheEntryUpload,
CacheServiceMethod.GetCacheEntryDownloadURL,
CacheServiceMethod.DeleteCacheEntry,
CacheServiceMethod.ListCacheEntries,
CacheServiceMethod.LookupCacheEntry,
];
function createCacheServiceServer(service) {
return new twirp_ts_1.TwirpServer({
service,
packageName: "github.actions.results.api.v1",
serviceName: "CacheService",
methodList: exports.CacheServiceMethodList,
matchRoute: matchCacheServiceRoute,
});
}
exports.createCacheServiceServer = createCacheServiceServer;
function matchCacheServiceRoute(method, events) {
switch (method) {
case "CreateCacheEntry":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "CreateCacheEntry" });
yield events.onMatch(ctx);
return handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors);
});
case "FinalizeCacheEntryUpload":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "FinalizeCacheEntryUpload" });
yield events.onMatch(ctx);
return handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors);
});
case "GetCacheEntryDownloadURL":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "GetCacheEntryDownloadURL" });
yield events.onMatch(ctx);
return handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors);
});
case "DeleteCacheEntry":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "DeleteCacheEntry" });
yield events.onMatch(ctx);
return handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors);
});
case "ListCacheEntries":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "ListCacheEntries" });
yield events.onMatch(ctx);
return handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors);
});
case "LookupCacheEntry":
return (ctx, service, data, interceptors) => __awaiter(this, void 0, void 0, function* () {
ctx = Object.assign(Object.assign({}, ctx), { methodName: "LookupCacheEntry" });
yield events.onMatch(ctx);
return handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors);
});
default:
events.onNotFound();
const msg = `no handler found`;
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceCreateCacheEntryRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceFinalizeCacheEntryUploadRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceGetCacheEntryDownloadURLRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceDeleteCacheEntryRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceListCacheEntriesRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceLookupCacheEntryRequest(ctx, service, data, interceptors) {
switch (ctx.contentType) {
case twirp_ts_1.TwirpContentType.JSON:
return handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors);
case twirp_ts_1.TwirpContentType.Protobuf:
return handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors);
default:
const msg = "unexpected Content-Type";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.BadRoute, msg);
}
}
function handleCacheServiceCreateCacheEntryJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.CreateCacheEntryRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.CreateCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.CreateCacheEntry(ctx, request);
}
return JSON.stringify(cache_1.CreateCacheEntryResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceFinalizeCacheEntryUploadJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.FinalizeCacheEntryUploadRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.FinalizeCacheEntryUpload(ctx, inputReq);
});
}
else {
response = yield service.FinalizeCacheEntryUpload(ctx, request);
}
return JSON.stringify(cache_1.FinalizeCacheEntryUploadResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceGetCacheEntryDownloadURLJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.GetCacheEntryDownloadURLRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.GetCacheEntryDownloadURL(ctx, inputReq);
});
}
else {
response = yield service.GetCacheEntryDownloadURL(ctx, request);
}
return JSON.stringify(cache_1.GetCacheEntryDownloadURLResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceDeleteCacheEntryJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.DeleteCacheEntryRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.DeleteCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.DeleteCacheEntry(ctx, request);
}
return JSON.stringify(cache_1.DeleteCacheEntryResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceListCacheEntriesJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.ListCacheEntriesRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.ListCacheEntries(ctx, inputReq);
});
}
else {
response = yield service.ListCacheEntries(ctx, request);
}
return JSON.stringify(cache_1.ListCacheEntriesResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceLookupCacheEntryJSON(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
const body = JSON.parse(data.toString() || "{}");
request = cache_1.LookupCacheEntryRequest.fromJson(body, {
ignoreUnknownFields: true,
});
}
catch (e) {
if (e instanceof Error) {
const msg = "the json request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.LookupCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.LookupCacheEntry(ctx, request);
}
return JSON.stringify(cache_1.LookupCacheEntryResponse.toJson(response, {
useProtoFieldName: true,
emitDefaultValues: false,
}));
});
}
function handleCacheServiceCreateCacheEntryProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.CreateCacheEntryRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.CreateCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.CreateCacheEntry(ctx, request);
}
return Buffer.from(cache_1.CreateCacheEntryResponse.toBinary(response));
});
}
function handleCacheServiceFinalizeCacheEntryUploadProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.FinalizeCacheEntryUploadRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.FinalizeCacheEntryUpload(ctx, inputReq);
});
}
else {
response = yield service.FinalizeCacheEntryUpload(ctx, request);
}
return Buffer.from(cache_1.FinalizeCacheEntryUploadResponse.toBinary(response));
});
}
function handleCacheServiceGetCacheEntryDownloadURLProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.GetCacheEntryDownloadURLRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.GetCacheEntryDownloadURL(ctx, inputReq);
});
}
else {
response = yield service.GetCacheEntryDownloadURL(ctx, request);
}
return Buffer.from(cache_1.GetCacheEntryDownloadURLResponse.toBinary(response));
});
}
function handleCacheServiceDeleteCacheEntryProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.DeleteCacheEntryRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.DeleteCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.DeleteCacheEntry(ctx, request);
}
return Buffer.from(cache_1.DeleteCacheEntryResponse.toBinary(response));
});
}
function handleCacheServiceListCacheEntriesProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.ListCacheEntriesRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.ListCacheEntries(ctx, inputReq);
});
}
else {
response = yield service.ListCacheEntries(ctx, request);
}
return Buffer.from(cache_1.ListCacheEntriesResponse.toBinary(response));
});
}
function handleCacheServiceLookupCacheEntryProtobuf(ctx, service, data, interceptors) {
return __awaiter(this, void 0, void 0, function* () {
let request;
let response;
try {
request = cache_1.LookupCacheEntryRequest.fromBinary(data);
}
catch (e) {
if (e instanceof Error) {
const msg = "the protobuf request could not be decoded";
throw new twirp_ts_1.TwirpError(twirp_ts_1.TwirpErrorCode.Malformed, msg).withCause(e, true);
}
}
if (interceptors && interceptors.length > 0) {
const interceptor = (0, twirp_ts_1.chainInterceptors)(...interceptors);
response = yield interceptor(ctx, request, (ctx, inputReq) => {
return service.LookupCacheEntry(ctx, inputReq);
});
}
else {
response = yield service.LookupCacheEntry(ctx, request);
}
return Buffer.from(cache_1.LookupCacheEntryResponse.toBinary(response));
});
}
//# sourceMappingURL=cache.twirp.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,71 +0,0 @@
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { Timestamp } from "../../../google/protobuf/timestamp";
/**
* @generated from protobuf message github.actions.results.entities.v1.CacheEntry
*/
export interface CacheEntry {
/**
* An explicit key for a cache entry
*
* @generated from protobuf field: string key = 1;
*/
key: string;
/**
* SHA256 hex digest of the cache archive
*
* @generated from protobuf field: string hash = 2;
*/
hash: string;
/**
* Cache entry size in bytes
*
* @generated from protobuf field: int64 size_bytes = 3;
*/
sizeBytes: string;
/**
* Access scope
*
* @generated from protobuf field: string scope = 4;
*/
scope: string;
/**
* Version SHA256 hex digest
*
* @generated from protobuf field: string version = 5;
*/
version: string;
/**
* When the cache entry was created
*
* @generated from protobuf field: google.protobuf.Timestamp created_at = 6;
*/
createdAt?: Timestamp;
/**
* When the cache entry was last accessed
*
* @generated from protobuf field: google.protobuf.Timestamp last_accessed_at = 7;
*/
lastAccessedAt?: Timestamp;
/**
* When the cache entry is set to expire
*
* @generated from protobuf field: google.protobuf.Timestamp expires_at = 8;
*/
expiresAt?: Timestamp;
}
declare class CacheEntry$Type extends MessageType<CacheEntry> {
constructor();
create(value?: PartialMessage<CacheEntry>): CacheEntry;
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CacheEntry): CacheEntry;
internalBinaryWrite(message: CacheEntry, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
}
/**
* @generated MessageType for protobuf message github.actions.results.entities.v1.CacheEntry
*/
export declare const CacheEntry: CacheEntry$Type;
export {};

View File

@@ -1,106 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheEntry = void 0;
const runtime_1 = require("@protobuf-ts/runtime");
const runtime_2 = require("@protobuf-ts/runtime");
const runtime_3 = require("@protobuf-ts/runtime");
const runtime_4 = require("@protobuf-ts/runtime");
const runtime_5 = require("@protobuf-ts/runtime");
const timestamp_1 = require("../../../google/protobuf/timestamp");
// @generated message type with reflection information, may provide speed optimized methods
class CacheEntry$Type extends runtime_5.MessageType {
constructor() {
super("github.actions.results.entities.v1.CacheEntry", [
{ no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "hash", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "size_bytes", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
{ no: 4, name: "scope", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: "created_at", kind: "message", T: () => timestamp_1.Timestamp },
{ no: 7, name: "last_accessed_at", kind: "message", T: () => timestamp_1.Timestamp },
{ no: 8, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp }
]);
}
create(value) {
const message = { key: "", hash: "", sizeBytes: "0", scope: "", version: "" };
globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
(0, runtime_3.reflectionMergePartial)(this, message, value);
return message;
}
internalBinaryRead(reader, length, options, target) {
let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string key */ 1:
message.key = reader.string();
break;
case /* string hash */ 2:
message.hash = reader.string();
break;
case /* int64 size_bytes */ 3:
message.sizeBytes = reader.int64().toString();
break;
case /* string scope */ 4:
message.scope = reader.string();
break;
case /* string version */ 5:
message.version = reader.string();
break;
case /* google.protobuf.Timestamp created_at */ 6:
message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
break;
case /* google.protobuf.Timestamp last_accessed_at */ 7:
message.lastAccessedAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastAccessedAt);
break;
case /* google.protobuf.Timestamp expires_at */ 8:
message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
break;
default:
let u = options.readUnknownField;
if (u === "throw")
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
let d = reader.skip(wireType);
if (u !== false)
(u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
}
}
return message;
}
internalBinaryWrite(message, writer, options) {
/* string key = 1; */
if (message.key !== "")
writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.key);
/* string hash = 2; */
if (message.hash !== "")
writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.hash);
/* int64 size_bytes = 3; */
if (message.sizeBytes !== "0")
writer.tag(3, runtime_1.WireType.Varint).int64(message.sizeBytes);
/* string scope = 4; */
if (message.scope !== "")
writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.scope);
/* string version = 5; */
if (message.version !== "")
writer.tag(5, runtime_1.WireType.LengthDelimited).string(message.version);
/* google.protobuf.Timestamp created_at = 6; */
if (message.createdAt)
timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp last_accessed_at = 7; */
if (message.lastAccessedAt)
timestamp_1.Timestamp.internalBinaryWrite(message.lastAccessedAt, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Timestamp expires_at = 8; */
if (message.expiresAt)
timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(8, runtime_1.WireType.LengthDelimited).fork(), options).join();
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message github.actions.results.entities.v1.CacheEntry
*/
exports.CacheEntry = new CacheEntry$Type();
//# sourceMappingURL=cacheentry.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"cacheentry.js","sourceRoot":"","sources":["../../../../../src/generated/results/entities/v1/cacheentry.ts"],"names":[],"mappings":";;;AAKA,kDAAgD;AAGhD,kDAA2D;AAE3D,kDAA8D;AAC9D,kDAAoD;AACpD,kDAAmD;AACnD,kEAA+D;AAsD/D,2FAA2F;AAC3F,MAAM,eAAgB,SAAQ,qBAAuB;IACjD;QACI,KAAK,CAAC,+CAA+C,EAAE;YACnD,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,qBAAqB,EAAE;YAClE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,qBAAqB,EAAE;YACnE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,oBAAoB,EAAE;YACxE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,qBAAqB,EAAE;YACpE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,qBAAqB,EAAE;YACtE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,qBAAS,EAAE;YAClE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,E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AE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAQ,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QACrH,qDAAqD;QACrD,IAAI,OAAO,CAAC,cAAc;YACtB,qBAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAQ,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1H,+CAA+C;QAC/C,IAAI,OAAO,CAAC,SAAS;YACjB,qBAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAQ,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;QACrH,IAAI,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACnC,IAAI,CAAC,KAAK,KAAK;YACX,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,6BAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAClF,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AACD;;GAEG;AACU,QAAA,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC"}

View File

@@ -1,4 +1,4 @@
import { CacheServiceClientJSON } from '../../generated/results/api/v1/cache.twirp';
import { CacheServiceClientJSON } from '../../generated/results/api/v1/cache.twirp-client';
export declare function internalCacheTwirpClient(options?: {
maxAttempts?: number;
retryIntervalMs?: number;

View File

@@ -17,7 +17,7 @@ const config_1 = require("../config");
const cacheUtils_1 = require("../cacheUtils");
const auth_1 = require("@actions/http-client/lib/auth");
const http_client_1 = require("@actions/http-client");
const cache_twirp_1 = require("../../generated/results/api/v1/cache.twirp");
const cache_twirp_client_1 = require("../../generated/results/api/v1/cache.twirp-client");
/**
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
*
@@ -154,7 +154,7 @@ class CacheServiceClient {
}
function internalCacheTwirpClient(options) {
const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier);
return new cache_twirp_1.CacheServiceClientJSON(client);
return new cache_twirp_client_1.CacheServiceClientJSON(client);
}
exports.internalCacheTwirpClient = internalCacheTwirpClient;
//# sourceMappingURL=cacheTwirpClient.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"cacheTwirpClient.js","sourceRoot":"","sources":["../../../src/internal/shared/cacheTwirpClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAyC;AACzC,6CAA+C;AAC/C,qCAAiD;AACjD,sCAA4C;AAC5C,8CAA6C;AAC7C,wDAAqE;AACrE,sDAA8E;AAC9E,4EAAiF;AAYjF;;;;;;GAMG;AACH,MAAM,kBAAkB;IAOtB,YACE,SAAiB,EACjB,WAAoB,EACpB,6BAAsC,EACtC,eAAwB;QARlB,gBAAW,GAAG,CAAC,CAAA;QACf,kCAA6B,GAAG,IAAI,CAAA;QACpC,oBAAe,GAAG,GAAG,CAAA;QAQ3B,MAAM,KAAK,GAAG,IAAA,4BAAe,GAAE,CAAA;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAA,2BAAkB,GAAE,CAAA;QACnC,IAAI,WAAW,EAAE;YACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;SAC/B;QACD,IAAI,6BAA6B,EAAE;YACjC,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAA;SACnE;QACD,IAAI,eAAe,EAAE;YACnB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;SACvC;QAED,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAU,CAAC,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OAAO,uBAAP,OAAO,CAAE,WAAW,EACpB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,EACxB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,CACzB,CAAA;IACD,OAAO,IAAI,2CAAsB,CAAC,MAAM,CAAC,CAAA;AAC3C,CAAC;AAZD,4DAYC"}

View File

@@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "4.0.0",
"version": "4.0.2",
"preview": true,
"description": "Actions cache lib",
"keywords": [
@@ -46,11 +46,10 @@
"@azure/ms-rest-js": "^2.6.0",
"@azure/storage-blob": "^12.13.0",
"@protobuf-ts/plugin": "^2.9.4",
"semver": "^6.3.1",
"twirp-ts": "^2.5.0"
"semver": "^6.3.1"
},
"devDependencies": {
"@types/semver": "^6.0.0",
"typescript": "^5.2.2"
}
}
}

22
node_modules/@babel/runtime/LICENSE generated vendored
View File

@@ -1,22 +0,0 @@
MIT License
Copyright (c) 2014-present Sebastian McKenzie and other contributors
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:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
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.

View File

@@ -1,19 +0,0 @@
# @babel/runtime
> babel's modular runtime helpers
See our website [@babel/runtime](https://babeljs.io/docs/en/babel-runtime) for more information.
## Install
Using npm:
```sh
npm install --save @babel/runtime
```
or using yarn:
```sh
yarn add @babel/runtime
```

View File

@@ -1,64 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function AsyncGenerator(gen) {
var front, back;
function resume(key, arg) {
try {
var result = gen[key](arg),
value = result.value,
overloaded = value instanceof OverloadYield;
Promise.resolve(overloaded ? value.v : value).then(function (arg) {
if (overloaded) {
var nextKey = "return" === key ? "return" : "next";
if (!value.k || arg.done) return resume(nextKey, arg);
arg = gen[nextKey](arg).value;
}
settle(result.done ? "return" : "normal", arg);
}, function (err) {
resume("throw", err);
});
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({
value: value,
done: !0
});
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({
value: value,
done: !1
});
}
(front = front.next) ? resume(front.key, front.arg) : back = null;
}
this._invoke = function (key, arg) {
return new Promise(function (resolve, reject) {
var request = {
key: key,
arg: arg,
resolve: resolve,
reject: reject,
next: null
};
back ? back = back.next = request : (front = back = request, resume(key, arg));
});
}, "function" != typeof gen["return"] && (this["return"] = void 0);
}
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
return this;
}, AsyncGenerator.prototype.next = function (arg) {
return this._invoke("next", arg);
}, AsyncGenerator.prototype["throw"] = function (arg) {
return this._invoke("throw", arg);
}, AsyncGenerator.prototype["return"] = function (arg) {
return this._invoke("return", arg);
};
module.exports = AsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _AwaitValue(value) {
this.wrapped = value;
}
module.exports = _AwaitValue, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _OverloadYield(value, kind) {
this.v = value, this.k = kind;
}
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,24 +0,0 @@
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object.keys(descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object.defineProperty(target, property, desc);
desc = null;
}
return desc;
}
module.exports = _applyDecoratedDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,236 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function old_createMetadataMethodsForProperty(metadataMap, kind, property, decoratorFinishedRef) {
return {
getMetadata: function getMetadata(key) {
old_assertNotFinished(decoratorFinishedRef, "getMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 !== metadataForKey) if (1 === kind) {
var pub = metadataForKey["public"];
if (void 0 !== pub) return pub[property];
} else if (2 === kind) {
var priv = metadataForKey["private"];
if (void 0 !== priv) return priv.get(property);
} else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) return metadataForKey.constructor;
},
setMetadata: function setMetadata(key, value) {
old_assertNotFinished(decoratorFinishedRef, "setMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 === metadataForKey && (metadataForKey = metadataMap[key] = {}), 1 === kind) {
var pub = metadataForKey["public"];
void 0 === pub && (pub = metadataForKey["public"] = {}), pub[property] = value;
} else if (2 === kind) {
var priv = metadataForKey.priv;
void 0 === priv && (priv = metadataForKey["private"] = new Map()), priv.set(property, value);
} else metadataForKey.constructor = value;
}
};
}
function old_convertMetadataMapToFinal(obj, metadataMap) {
var parentMetadataMap = obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")],
metadataKeys = Object.getOwnPropertySymbols(metadataMap);
if (0 !== metadataKeys.length) {
for (var i = 0; i < metadataKeys.length; i++) {
var key = metadataKeys[i],
metaForKey = metadataMap[key],
parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null,
pub = metaForKey["public"],
parentPub = parentMetaForKey ? parentMetaForKey["public"] : null;
pub && parentPub && Object.setPrototypeOf(pub, parentPub);
var priv = metaForKey["private"];
if (priv) {
var privArr = Array.from(priv.values()),
parentPriv = parentMetaForKey ? parentMetaForKey["private"] : null;
parentPriv && (privArr = privArr.concat(parentPriv)), metaForKey["private"] = privArr;
}
parentMetaForKey && Object.setPrototypeOf(metaForKey, parentMetaForKey);
}
parentMetadataMap && Object.setPrototypeOf(metadataMap, parentMetadataMap), obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = metadataMap;
}
}
function old_createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
old_assertNotFinished(decoratorFinishedRef, "addInitializer"), old_assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function old_memberDec(dec, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var metadataKind,
metadataName,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
isStatic: isStatic,
isPrivate: isPrivate
},
decoratorFinishedRef = {
v: !1
};
if (0 !== kind && (ctx.addInitializer = old_createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate) {
metadataKind = 2, metadataName = Symbol(name);
var access = {};
0 === kind ? (access.get = desc.get, access.set = desc.set) : 2 === kind ? access.get = function () {
return desc.value;
} : (1 !== kind && 3 !== kind || (access.get = function () {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (access.set = function (v) {
desc.set.call(this, v);
})), ctx.access = access;
} else metadataKind = 1, metadataName = name;
try {
return dec(value, Object.assign(ctx, old_createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName, decoratorFinishedRef)));
} finally {
decoratorFinishedRef.v = !0;
}
}
function old_assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function old_assertMetadataKey(key) {
if ("symbol" != _typeof(key)) throw new TypeError("Metadata keys must be symbols, received: " + key);
}
function old_assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function old_assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && old_assertCallable(value.get, "accessor.get"), void 0 !== value.set && old_assertCallable(value.set, "accessor.set"), void 0 !== value.init && old_assertCallable(value.init, "accessor.init"), void 0 !== value.initializer && old_assertCallable(value.initializer, "accessor.initializer");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function old_getInit(desc) {
var initializer;
return null == (initializer = desc.init) && (initializer = desc.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), initializer;
}
function old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) {
var desc,
initializer,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = old_memberDec(decs, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value)) && (old_assertValidReturnValue(kind, newValue), 0 === kind ? initializer = newValue : 1 === kind ? (initializer = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = old_memberDec(decs[i], name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value))) old_assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === initializer ? initializer = newInit : "function" == typeof initializer ? initializer = [initializer, newInit] : initializer.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === initializer) initializer = function initializer(instance, init) {
return init;
};else if ("function" != typeof initializer) {
var ownInitializers = initializer;
initializer = function initializer(instance, init) {
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = initializer;
initializer = function initializer(instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(initializer);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function old_applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
metadataMap,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, metadataMap = staticMetadataMap, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, metadataMap = protoMetadataMap, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers);
}
}
old_pushInitializers(ret, protoInitializers), old_pushInitializers(ret, staticInitializers);
}
function old_pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function old_applyClassDecs(ret, targetClass, metadataMap, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var ctx = Object.assign({
kind: "class",
name: name,
addInitializer: old_createAddInitializerMethod(initializers, decoratorFinishedRef)
}, old_createMetadataMethodsForProperty(metadataMap, 0, name, decoratorFinishedRef)),
nextNewClass = classDecs[i](newClass, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (old_assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}
function applyDecs(targetClass, memberDecs, classDecs) {
var ret = [],
staticMetadataMap = {},
protoMetadataMap = {};
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret;
}
module.exports = applyDecs, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,184 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var get,
set,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
"static": isStatic,
"private": isPrivate
},
decoratorFinishedRef = {
v: !1
};
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
return this[name];
}, set = function set(v) {
this[name] = v;
}) : 2 === kind ? get = function get() {
return desc.value;
} : (1 !== kind && 3 !== kind || (get = function get() {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (set = function set(v) {
desc.set.call(this, v);
})), ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var desc,
init,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === init) init = function init(instance, _init) {
return _init;
};else if ("function" != typeof init) {
var ownInitializers = init;
init = function init(instance, _init2) {
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function init(instance, _init3) {
return originalInitializer.call(instance, _init3);
};
}
ret.push(init);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function applyMemberDecs(ret, Class, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
}
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
}
function pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function applyClassDecs(ret, targetClass, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}
function applyDecs2203(targetClass, memberDecs, classDecs) {
var ret = [];
return applyMemberDecs(ret, targetClass, memberDecs), applyClassDecs(ret, targetClass, classDecs), ret;
}
module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var arrayLikeToArray = require("./arrayLikeToArray.js");
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,24 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function _asyncGeneratorDelegate(inner) {
var iter = {},
waiting = !1;
function pump(key, value) {
return waiting = !0, value = new Promise(function (resolve) {
resolve(inner[key](value));
}), {
done: !1,
value: new OverloadYield(value, 1)
};
}
return iter["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
return this;
}, iter.next = function (value) {
return waiting ? (waiting = !1, value) : pump("next", value);
}, "function" == typeof inner["throw"] && (iter["throw"] = function (value) {
if (waiting) throw waiting = !1, value;
return pump("throw", value);
}), "function" == typeof inner["return"] && (iter["return"] = function (value) {
return waiting ? (waiting = !1, value) : pump("return", value);
}), iter;
}
module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,45 +0,0 @@
function _asyncIterator(iterable) {
var method,
async,
sync,
retry = 2;
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) {
if (async && null != (method = iterable[async])) return method.call(iterable);
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable));
async = "@@asyncIterator", sync = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(s) {
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
var done = r.done;
return Promise.resolve(r.value).then(function (value) {
return {
value: value,
done: done
};
});
}
return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) {
this.s = s, this.n = s.next;
}, AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function next() {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
"return": function _return(value) {
var ret = this.s["return"];
return void 0 === ret ? Promise.resolve({
value: value,
done: !0
}) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
},
"throw": function _throw(value) {
var thr = this.s["return"];
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
}
}, new AsyncFromSyncIterator(s);
}
module.exports = _asyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,31 +0,0 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function _awaitAsyncGenerator(value) {
return new OverloadYield(value, 0);
}
module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function _checkInRHS(value) {
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? _typeof(value) : "null"));
return value;
}
module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _checkPrivateRedeclaration(obj, privateCollection) {
if (privateCollection.has(obj)) {
throw new TypeError("Cannot initialize the same private elements twice on an object");
}
}
module.exports = _checkPrivateRedeclaration, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,18 +0,0 @@
function _classApplyDescriptorDestructureSet(receiver, descriptor) {
if (descriptor.set) {
if (!("__destrObj" in descriptor)) {
descriptor.__destrObj = {
set value(v) {
descriptor.set.call(receiver, v);
}
};
}
return descriptor.__destrObj;
} else {
if (!descriptor.writable) {
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
module.exports = _classApplyDescriptorDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classApplyDescriptorGet(receiver, descriptor) {
if (descriptor.get) {
return descriptor.get.call(receiver);
}
return descriptor.value;
}
module.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,11 +0,0 @@
function _classApplyDescriptorSet(receiver, descriptor, value) {
if (descriptor.set) {
descriptor.set.call(receiver, value);
} else {
if (!descriptor.writable) {
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
module.exports = _classApplyDescriptorSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCheckPrivateStaticAccess(receiver, classConstructor) {
if (receiver !== classConstructor) {
throw new TypeError("Private static access of wrong provenance");
}
}
module.exports = _classCheckPrivateStaticAccess, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
if (descriptor === undefined) {
throw new TypeError("attempted to " + action + " private static field before its declaration");
}
}
module.exports = _classCheckPrivateStaticFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classExtractFieldDescriptor(receiver, privateMap, action) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to " + action + " private field on non-instance");
}
return privateMap.get(receiver);
}
module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _classNameTDZError(name) {
throw new ReferenceError("Class \"" + name + "\" cannot be referenced in computed property keys.");
}
module.exports = _classNameTDZError, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldDestructureSet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
module.exports = _classPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldGet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
module.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateFieldInitSpec(obj, privateMap, value) {
checkPrivateRedeclaration(obj, privateMap);
privateMap.set(obj, value);
}
module.exports = _classPrivateFieldInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classPrivateFieldBase(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
module.exports = _classPrivateFieldBase, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var id = 0;
function _classPrivateFieldKey(name) {
return "__private_" + id++ + "_" + name;
}
module.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,8 +0,0 @@
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldSet(receiver, privateMap, value) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
module.exports = _classPrivateFieldSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classPrivateMethodGet(receiver, privateSet, fn) {
if (!privateSet.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return fn;
}
module.exports = _classPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateMethodInitSpec(obj, privateSet) {
checkPrivateRedeclaration(obj, privateSet);
privateSet.add(obj);
}
module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _classPrivateMethodSet() {
throw new TypeError("attempted to reassign private method");
}
module.exports = _classPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,9 +0,0 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,9 +0,0 @@
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
module.exports = _classStaticPrivateFieldSpecGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

Some files were not shown because too many files have changed in this diff Show More