11 Commits

Author SHA1 Message Date
Arpad Borsos
a9bca6b5a6 1.2.0
Some checks failed
CI / Test Action on ubuntu-latest (push) Failing after 0s
CI / Test Action on macos-latest (push) Has been cancelled
CI / Test Action on windows-latest (push) Has been cancelled
2021-02-16 09:09:13 +01:00
Arpad Borsos
b17d52110e Add Changelog 2021-02-16 09:08:48 +01:00
Arpad Borsos
b495963495 Add a selftest and support for .cargo/bin 2021-02-16 09:06:04 +01:00
Arpad Borsos
83aad8d470 rebuild 2021-01-28 18:42:00 +01:00
Arpad Borsos
958028d559 document cache-hit output
fixes #5
2021-01-28 18:40:43 +01:00
Austin Jones
27793b3b80 Add support for the cache-hit output 2021-01-28 18:39:18 +01:00
Arpad Borsos
be44a3e6ff introduce a new sharedKey option
fixes #6
2021-01-28 18:39:11 +01:00
Arpad Borsos
2639a56bb8 implement support for CARGO_HOME
fixes #8
2021-01-28 18:16:36 +01:00
Arpad Borsos
cbcc887094 update deps 2021-01-28 18:08:24 +01:00
Arpad Borsos
ae893481e8 Write a few Notes in the Readme 2021-01-10 09:42:14 +01:00
Arpad Borsos
d7bda0e369 update dependencies 2021-01-10 09:30:57 +01:00
15 changed files with 7752 additions and 4666 deletions

29
.github/workflows/selftest.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: CI
on: [push, pull_request]
jobs:
selftest:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test Action on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: ./
- run: |
cargo install cargo-deny --locked
cargo check
cargo test

1
.gitignore vendored
View File

@@ -1 +1,2 @@
node_modules node_modules
/target

View File

@@ -1,5 +1,12 @@
# Changelog # Changelog
## 1.2.0
- Cache `~/.cargo/bin`.
- Support for custom `$CARGO_HOME`.
- Add a `cache-hit` output.
- Add a new `sharedKey` option that overrides the automatic job-name based key.
## 1.1.0 ## 1.1.0
- Add a new `working-directory` input. - Add a new `working-directory` input.

1665
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

10
Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
publish = false
name = "rust-cache"
version = "0.1.0"
authors = ["Arpad Borsos <arpad.borsos@googlemail.com>"]
edition = "2018"
[dev-dependencies]
reqwest = "0.11.0"
actix-web = { git = "https://github.com/actix/actix-web.git", rev = "bd26083f333ecf63e3eb444748250364ce124f5e" }

View File

@@ -21,10 +21,36 @@ sensible defaults.
: `key` : `key`
An optional key that is added to the automatic cache key. An optional key that is added to the automatic cache key.
: `sharedKey`
An additional key that is stable over multiple jobs.
: `working-directory` : `working-directory`
The working directory the action operates in, is case the cargo project is not The working directory the action operates in, is case the cargo project is not
located in the repo root. located in the repo root.
## Outputs
: `cache-hit`
This is a boolean flag that will be set to `true` when there was an exact cache hit.
## Cache Effectiveness
This action only caches the _dependencies_ of a crate, so is more effective if
the dependency / own code ratio is higher.
It is also most effective for repositories with a `Cargo.lock` file. Library
repositories with only a `Cargo.toml` file have limited benefits, as cargo will
_always_ use the most up-to-date dependency versions, which may not be cached.
Usage with Stable Rust is most effective, as a cache is tied to the Rust version.
Using it with Nightly Rust is less effective as it will throw away the cache every day.
## Versioning
I use the `v1` branch similar to `master` development, so if you want to have
a more stable experience, please use a fixed revision or tag.
## Cache Details ## Cache Details
The cache currently caches the following directories: The cache currently caches the following directories:

View File

@@ -5,9 +5,15 @@ inputs:
key: key:
description: "An additional key for the cache" description: "An additional key for the cache"
required: false required: false
sharedKey:
description: "An additional cache key that is stable over multiple jobs"
required: false
working-directory: working-directory:
description: "The working directory this action should operate in" description: "The working directory this action should operate in"
required: false required: false
outputs:
cache-hit:
description: 'A boolean value that indicates an exact match was found'
runs: runs:
using: "node12" using: "node12"
main: "dist/restore/index.js" main: "dist/restore/index.js"

5075
dist/restore/index.js vendored

File diff suppressed because one or more lines are too long

5086
dist/save/index.js vendored

File diff suppressed because one or more lines are too long

400
package-lock.json generated
View File

@@ -1,31 +1,31 @@
{ {
"name": "rust-cache", "name": "rust-cache",
"version": "1.1.0", "version": "1.2.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "1.1.0", "version": "1.2.0",
"license": "LGPL-3.0", "license": "LGPL-3.0",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.4", "@actions/cache": "^1.0.6",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4", "@actions/exec": "^1.0.4",
"@actions/glob": "^0.1.1", "@actions/glob": "^0.1.1",
"@actions/io": "^1.0.2" "@actions/io": "^1.0.2"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.25.1", "@vercel/ncc": "^0.27.0",
"typescript": "^4.1.2" "typescript": "^4.1.5"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/Swatinem" "url": "https://github.com/sponsors/Swatinem"
} }
}, },
"node_modules/@actions/cache": { "node_modules/@actions/cache": {
"version": "1.0.4", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.4.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.6.tgz",
"integrity": "sha512-1grYfbu8P6JDDHc40eOI5tQDRcAxMwq5HBWhaCqEg9o/ixDRZfwPHlQvQAop2ZzFCjF2ns0ENQOIBAH8GNn+zA==", "integrity": "sha512-c8CSJS6uCatX07VHazgvL4XPMpTdawOyyD+OCThRE0v486lqThYa4tayRqTyl6FSyD5LclQyB8/FQlZ5cxTNJA==",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
@@ -74,75 +74,47 @@
"integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
}, },
"node_modules/@azure/abort-controller": { "node_modules/@azure/abort-controller": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.2.tgz",
"integrity": "sha512-wP2Jw6uPp8DEDy0n4KNidvwzDjyVV2xnycEIq7nPzj1rHyb/r+t3OPeNT1INZePP2wy5ZqlwyuyOMTi0ePyY1A==", "integrity": "sha512-XUyTo+bcyxHEf+jlN2MXA7YU9nxVehaubngHV1MIZZaqYmZqykkoeAz/JMMEeR7t3TcyDwbFa3Zw8BZywmIx4g==",
"dependencies": { "dependencies": {
"tslib": "^1.9.3" "tslib": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
} }
}, },
"node_modules/@azure/abort-controller/node_modules/tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
},
"node_modules/@azure/core-asynciterator-polyfill": { "node_modules/@azure/core-asynciterator-polyfill": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz",
"integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==" "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg=="
}, },
"node_modules/@azure/core-auth": { "node_modules/@azure/core-auth": {
"version": "1.1.3", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.1.3.tgz", "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.2.0.tgz",
"integrity": "sha512-A4xigW0YZZpkj1zK7dKuzbBpGwnhEcRk6WWuIshdHC32raR3EQ1j6VA9XZqE+RFsUgH6OAmIK5BWIz+mZjnd6Q==", "integrity": "sha512-KUl+Nwn/Sm6Lw5d3U90m1jZfNSL087SPcqHLxwn2T6PupNKmcgsEbDjHB25gDvHO4h7pBsTlrdJAY7dz+Qk8GA==",
"dependencies": { "dependencies": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-tracing": "1.0.0-preview.8",
"@opentelemetry/api": "^0.6.1",
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"engines": { "engines": {
"node": ">=8.0.0" "node": ">=8.0.0"
} }
}, },
"node_modules/@azure/core-auth/node_modules/@azure/core-tracing": {
"version": "1.0.0-preview.8",
"resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.8.tgz",
"integrity": "sha512-ZKUpCd7Dlyfn7bdc+/zC/sf0aRIaNQMDuSj2RhYRFe3p70hVAnYGp3TX4cnG2yoEALp/LTj/XnZGQ8Xzf6Ja/Q==",
"dependencies": {
"@opencensus/web-types": "0.0.7",
"@opentelemetry/api": "^0.6.1",
"tslib": "^1.10.0"
}
},
"node_modules/@azure/core-auth/node_modules/@azure/core-tracing/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/@azure/core-auth/node_modules/@opentelemetry/api": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-0.6.1.tgz",
"integrity": "sha512-wpufGZa7tTxw7eAsjXJtiyIQ42IWQdX9iUQp7ACJcKo1hCtuhLU+K2Nv1U6oRwT1oAlZTE6m4CgWKZBhOiau3Q==",
"dependencies": {
"@opentelemetry/context-base": "^0.6.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@azure/core-auth/node_modules/@opentelemetry/context-base": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/context-base/-/context-base-0.6.1.tgz",
"integrity": "sha512-5bHhlTBBq82ti3qPT15TRxkYTFPPQWbnkkQkmHPtqiS1XcTB69cEKd3Jm7Cfi/vkPoyxapmePE9tyA7EzLt8SQ==",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@azure/core-auth/node_modules/tslib": { "node_modules/@azure/core-auth/node_modules/tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}, },
"node_modules/@azure/core-http": { "node_modules/@azure/core-http": {
"version": "1.2.0", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.2.3.tgz",
"integrity": "sha512-SQmyI1tpstWKePNmTseEUp8PMq1uNBslvGBrYF2zNM/fEfLD1q64XCatoH8nDQtSmDydEPsqlyyLSjjnuXrlOQ==", "integrity": "sha512-g5C1zUJO5dehP2Riv+vy9iCYoS1UwKnZsBVCzanScz9A83LbnXKpZDa9wie26G9dfXUhQoFZoFT8LYWhPKmwcg==",
"dependencies": { "dependencies": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.1.3", "@azure/core-auth": "^1.1.3",
@@ -165,9 +137,9 @@
} }
}, },
"node_modules/@azure/core-http/node_modules/form-data": { "node_modules/@azure/core-http/node_modules/form-data": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": { "dependencies": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
@@ -191,29 +163,37 @@
} }
}, },
"node_modules/@azure/core-http/node_modules/tslib": { "node_modules/@azure/core-http/node_modules/tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}, },
"node_modules/@azure/core-http/node_modules/uuid": { "node_modules/@azure/core-http/node_modules/uuid": {
"version": "8.3.1", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": { "bin": {
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
}, },
"node_modules/@azure/core-lro": { "node_modules/@azure/core-lro": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.3.tgz",
"integrity": "sha512-Yr0JD7GKryOmbcb5wHCQoQ4KCcH5QJWRNorofid+UvudLaxnbCfvKh/cUfQsGUqRjO9L/Bw4X7FP824DcHdMxw==", "integrity": "sha512-Py2crJ84qx1rXkzIwfKw5Ni4WJuzVU7KAF6i1yP3ce8fbynUeu8eEWS4JGtSQgU7xv02G55iPDROifmSDbxeHA==",
"dependencies": { "dependencies": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-http": "^1.1.1", "@azure/core-http": "^1.2.0",
"events": "^3.0.0", "events": "^3.0.0",
"tslib": "^1.10.0" "tslib": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
} }
}, },
"node_modules/@azure/core-lro/node_modules/tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
},
"node_modules/@azure/core-paging": { "node_modules/@azure/core-paging": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.1.3.tgz", "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.1.3.tgz",
@@ -239,23 +219,32 @@
} }
}, },
"node_modules/@azure/core-tracing/node_modules/tslib": { "node_modules/@azure/core-tracing/node_modules/tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}, },
"node_modules/@azure/logger": { "node_modules/@azure/logger": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.1.tgz",
"integrity": "sha512-g2qLDgvmhyIxR3JVS8N67CyIOeFRKQlX/llxYJQr1OSGQqM3HTpVP8MjmjcEKbL/OIt2N9C9UFaNQuKOw1laOA==", "integrity": "sha512-QYQeaJ+A5x6aMNu8BG5qdsVBnYBop9UMwgUvGihSjf1PdZZXB+c/oMdM2ajKwzobLBh9e9QuMQkN9iL+IxLBLA==",
"dependencies": { "dependencies": {
"tslib": "^1.9.3" "tslib": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
} }
}, },
"node_modules/@azure/ms-rest-js": { "node_modules/@azure/logger/node_modules/tslib": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.1.0.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-4BXLVImYRt+jcUmEJ5LUWglI8RBNVQndY6IcyvQ4U8O4kIXdmlRz3cJdA/RpXf5rKT38KOoTO2T6Z1f6Z1HDBg==", "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
},
"node_modules/@azure/ms-rest-js": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.2.3.tgz",
"integrity": "sha512-sXOhOu/37Tr8428f32Jwuwga975Xw64pYg1UeUwOBMhkNgtn5vUuNRa3fhmem+I6f8EKoi6hOsYDFlaHeZ52jA==",
"dependencies": { "dependencies": {
"@azure/core-auth": "^1.1.4",
"@types/node-fetch": "^2.3.7", "@types/node-fetch": "^2.3.7",
"@types/tunnel": "0.0.1", "@types/tunnel": "0.0.1",
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
@@ -269,9 +258,9 @@
} }
}, },
"node_modules/@azure/storage-blob": { "node_modules/@azure/storage-blob": {
"version": "12.3.0", "version": "12.4.1",
"resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.3.0.tgz", "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.4.1.tgz",
"integrity": "sha512-nCySzNfm782pEW3sg9GHj1zE4gBeVVMeEBdWb4MefifrCwQQOoz5cXZTNFiUJAJqAO+/72r2UjZcUwHk/QmzkA==", "integrity": "sha512-RH6ru8LbnCC+m1rlVLon6mYUXdHsTcyUXFCJAWRQQM7p0XOwVKPS+UiVk2tZXfvMWd3q/qT/meOrEbHEcp/c4g==",
"dependencies": { "dependencies": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-http": "^1.2.0", "@azure/core-http": "^1.2.0",
@@ -282,12 +271,15 @@
"@opentelemetry/api": "^0.10.2", "@opentelemetry/api": "^0.10.2",
"events": "^3.0.0", "events": "^3.0.0",
"tslib": "^2.0.0" "tslib": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
} }
}, },
"node_modules/@azure/storage-blob/node_modules/tslib": { "node_modules/@azure/storage-blob/node_modules/tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}, },
"node_modules/@opencensus/web-types": { "node_modules/@opencensus/web-types": {
"version": "0.0.7", "version": "0.0.7",
@@ -317,23 +309,23 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "14.14.9", "version": "14.14.28",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
"integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" "integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
}, },
"node_modules/@types/node-fetch": { "node_modules/@types/node-fetch": {
"version": "2.5.7", "version": "2.5.8",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
"integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
"dependencies": { "dependencies": {
"@types/node": "*", "@types/node": "*",
"form-data": "^3.0.0" "form-data": "^3.0.0"
} }
}, },
"node_modules/@types/node-fetch/node_modules/form-data": { "node_modules/@types/node-fetch/node_modules/form-data": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": { "dependencies": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
@@ -352,9 +344,9 @@
} }
}, },
"node_modules/@vercel/ncc": { "node_modules/@vercel/ncc": {
"version": "0.25.1", "version": "0.27.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.25.1.tgz", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz",
"integrity": "sha512-dGecC5+1wLof1MQpey4+6i2KZv4Sfs6WfXkl9KfO32GED4ZPiKxRfvtGPjbjZv0IbqMl6CxtcV1RotXYfd5SSA==", "integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==",
"dev": true, "dev": true,
"bin": { "bin": {
"ncc": "dist/ncc/cli.js" "ncc": "dist/ncc/cli.js"
@@ -452,19 +444,19 @@
} }
}, },
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.44.0", "version": "1.45.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/mime-types": { "node_modules/mime-types": {
"version": "2.1.27", "version": "2.1.28",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
"dependencies": { "dependencies": {
"mime-db": "1.44.0" "mime-db": "1.45.0"
}, },
"engines": { "engines": {
"node": ">= 0.6" "node": ">= 0.6"
@@ -550,9 +542,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.1.2", "version": "4.1.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz",
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@@ -601,9 +593,9 @@
}, },
"dependencies": { "dependencies": {
"@actions/cache": { "@actions/cache": {
"version": "1.0.4", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.4.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.6.tgz",
"integrity": "sha512-1grYfbu8P6JDDHc40eOI5tQDRcAxMwq5HBWhaCqEg9o/ixDRZfwPHlQvQAop2ZzFCjF2ns0ENQOIBAH8GNn+zA==", "integrity": "sha512-c8CSJS6uCatX07VHazgvL4XPMpTdawOyyD+OCThRE0v486lqThYa4tayRqTyl6FSyD5LclQyB8/FQlZ5cxTNJA==",
"requires": { "requires": {
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
@@ -652,11 +644,18 @@
"integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg=="
}, },
"@azure/abort-controller": { "@azure/abort-controller": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.2.tgz",
"integrity": "sha512-wP2Jw6uPp8DEDy0n4KNidvwzDjyVV2xnycEIq7nPzj1rHyb/r+t3OPeNT1INZePP2wy5ZqlwyuyOMTi0ePyY1A==", "integrity": "sha512-XUyTo+bcyxHEf+jlN2MXA7YU9nxVehaubngHV1MIZZaqYmZqykkoeAz/JMMEeR7t3TcyDwbFa3Zw8BZywmIx4g==",
"requires": { "requires": {
"tslib": "^1.9.3" "tslib": "^2.0.0"
},
"dependencies": {
"tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}
} }
}, },
"@azure/core-asynciterator-polyfill": { "@azure/core-asynciterator-polyfill": {
@@ -665,57 +664,25 @@
"integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==" "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg=="
}, },
"@azure/core-auth": { "@azure/core-auth": {
"version": "1.1.3", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.1.3.tgz", "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.2.0.tgz",
"integrity": "sha512-A4xigW0YZZpkj1zK7dKuzbBpGwnhEcRk6WWuIshdHC32raR3EQ1j6VA9XZqE+RFsUgH6OAmIK5BWIz+mZjnd6Q==", "integrity": "sha512-KUl+Nwn/Sm6Lw5d3U90m1jZfNSL087SPcqHLxwn2T6PupNKmcgsEbDjHB25gDvHO4h7pBsTlrdJAY7dz+Qk8GA==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-tracing": "1.0.0-preview.8",
"@opentelemetry/api": "^0.6.1",
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"@azure/core-tracing": {
"version": "1.0.0-preview.8",
"resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.8.tgz",
"integrity": "sha512-ZKUpCd7Dlyfn7bdc+/zC/sf0aRIaNQMDuSj2RhYRFe3p70hVAnYGp3TX4cnG2yoEALp/LTj/XnZGQ8Xzf6Ja/Q==",
"requires": {
"@opencensus/web-types": "0.0.7",
"@opentelemetry/api": "^0.6.1",
"tslib": "^1.10.0"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@opentelemetry/api": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-0.6.1.tgz",
"integrity": "sha512-wpufGZa7tTxw7eAsjXJtiyIQ42IWQdX9iUQp7ACJcKo1hCtuhLU+K2Nv1U6oRwT1oAlZTE6m4CgWKZBhOiau3Q==",
"requires": {
"@opentelemetry/context-base": "^0.6.1"
}
},
"@opentelemetry/context-base": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/@opentelemetry/context-base/-/context-base-0.6.1.tgz",
"integrity": "sha512-5bHhlTBBq82ti3qPT15TRxkYTFPPQWbnkkQkmHPtqiS1XcTB69cEKd3Jm7Cfi/vkPoyxapmePE9tyA7EzLt8SQ=="
},
"tslib": { "tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
} }
} }
}, },
"@azure/core-http": { "@azure/core-http": {
"version": "1.2.0", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.2.3.tgz",
"integrity": "sha512-SQmyI1tpstWKePNmTseEUp8PMq1uNBslvGBrYF2zNM/fEfLD1q64XCatoH8nDQtSmDydEPsqlyyLSjjnuXrlOQ==", "integrity": "sha512-g5C1zUJO5dehP2Riv+vy9iCYoS1UwKnZsBVCzanScz9A83LbnXKpZDa9wie26G9dfXUhQoFZoFT8LYWhPKmwcg==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.1.3", "@azure/core-auth": "^1.1.3",
@@ -735,9 +702,9 @@
}, },
"dependencies": { "dependencies": {
"form-data": { "form-data": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": { "requires": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
@@ -755,26 +722,33 @@
} }
}, },
"tslib": { "tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}, },
"uuid": { "uuid": {
"version": "8.3.1", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==" "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
} }
} }
}, },
"@azure/core-lro": { "@azure/core-lro": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-1.0.3.tgz",
"integrity": "sha512-Yr0JD7GKryOmbcb5wHCQoQ4KCcH5QJWRNorofid+UvudLaxnbCfvKh/cUfQsGUqRjO9L/Bw4X7FP824DcHdMxw==", "integrity": "sha512-Py2crJ84qx1rXkzIwfKw5Ni4WJuzVU7KAF6i1yP3ce8fbynUeu8eEWS4JGtSQgU7xv02G55iPDROifmSDbxeHA==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-http": "^1.1.1", "@azure/core-http": "^1.2.0",
"events": "^3.0.0", "events": "^3.0.0",
"tslib": "^1.10.0" "tslib": "^2.0.0"
},
"dependencies": {
"tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}
} }
}, },
"@azure/core-paging": { "@azure/core-paging": {
@@ -796,25 +770,33 @@
}, },
"dependencies": { "dependencies": {
"tslib": { "tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
} }
} }
}, },
"@azure/logger": { "@azure/logger": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.1.tgz",
"integrity": "sha512-g2qLDgvmhyIxR3JVS8N67CyIOeFRKQlX/llxYJQr1OSGQqM3HTpVP8MjmjcEKbL/OIt2N9C9UFaNQuKOw1laOA==", "integrity": "sha512-QYQeaJ+A5x6aMNu8BG5qdsVBnYBop9UMwgUvGihSjf1PdZZXB+c/oMdM2ajKwzobLBh9e9QuMQkN9iL+IxLBLA==",
"requires": { "requires": {
"tslib": "^1.9.3" "tslib": "^2.0.0"
},
"dependencies": {
"tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
}
} }
}, },
"@azure/ms-rest-js": { "@azure/ms-rest-js": {
"version": "2.1.0", "version": "2.2.3",
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.2.3.tgz",
"integrity": "sha512-4BXLVImYRt+jcUmEJ5LUWglI8RBNVQndY6IcyvQ4U8O4kIXdmlRz3cJdA/RpXf5rKT38KOoTO2T6Z1f6Z1HDBg==", "integrity": "sha512-sXOhOu/37Tr8428f32Jwuwga975Xw64pYg1UeUwOBMhkNgtn5vUuNRa3fhmem+I6f8EKoi6hOsYDFlaHeZ52jA==",
"requires": { "requires": {
"@azure/core-auth": "^1.1.4",
"@types/node-fetch": "^2.3.7", "@types/node-fetch": "^2.3.7",
"@types/tunnel": "0.0.1", "@types/tunnel": "0.0.1",
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
@@ -828,9 +810,9 @@
} }
}, },
"@azure/storage-blob": { "@azure/storage-blob": {
"version": "12.3.0", "version": "12.4.1",
"resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.3.0.tgz", "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.4.1.tgz",
"integrity": "sha512-nCySzNfm782pEW3sg9GHj1zE4gBeVVMeEBdWb4MefifrCwQQOoz5cXZTNFiUJAJqAO+/72r2UjZcUwHk/QmzkA==", "integrity": "sha512-RH6ru8LbnCC+m1rlVLon6mYUXdHsTcyUXFCJAWRQQM7p0XOwVKPS+UiVk2tZXfvMWd3q/qT/meOrEbHEcp/c4g==",
"requires": { "requires": {
"@azure/abort-controller": "^1.0.0", "@azure/abort-controller": "^1.0.0",
"@azure/core-http": "^1.2.0", "@azure/core-http": "^1.2.0",
@@ -844,9 +826,9 @@
}, },
"dependencies": { "dependencies": {
"tslib": { "tslib": {
"version": "2.0.3", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
} }
} }
}, },
@@ -869,23 +851,23 @@
"integrity": "sha512-hZNKjKOYsckoOEgBziGMnBcX0M7EtstnCmwz5jZUOUYwlZ+/xxX6z3jPu1XVO2Jivk0eLfuP9GP+vFD49CMetw==" "integrity": "sha512-hZNKjKOYsckoOEgBziGMnBcX0M7EtstnCmwz5jZUOUYwlZ+/xxX6z3jPu1XVO2Jivk0eLfuP9GP+vFD49CMetw=="
}, },
"@types/node": { "@types/node": {
"version": "14.14.9", "version": "14.14.28",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.28.tgz",
"integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" "integrity": "sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g=="
}, },
"@types/node-fetch": { "@types/node-fetch": {
"version": "2.5.7", "version": "2.5.8",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
"integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"form-data": "^3.0.0" "form-data": "^3.0.0"
}, },
"dependencies": { "dependencies": {
"form-data": { "form-data": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": { "requires": {
"asynckit": "^0.4.0", "asynckit": "^0.4.0",
"combined-stream": "^1.0.8", "combined-stream": "^1.0.8",
@@ -903,9 +885,9 @@
} }
}, },
"@vercel/ncc": { "@vercel/ncc": {
"version": "0.25.1", "version": "0.27.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.25.1.tgz", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.27.0.tgz",
"integrity": "sha512-dGecC5+1wLof1MQpey4+6i2KZv4Sfs6WfXkl9KfO32GED4ZPiKxRfvtGPjbjZv0IbqMl6CxtcV1RotXYfd5SSA==", "integrity": "sha512-DllIJQapnU2YwewIhh/4dYesmMQw3h2cFtabECc/zSJHqUbNa0eJuEkRa6DXbZvh1YPWBtYQoPV17NlDpBw1Vw==",
"dev": true "dev": true
}, },
"abort-controller": { "abort-controller": {
@@ -979,16 +961,16 @@
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
}, },
"mime-db": { "mime-db": {
"version": "1.44.0", "version": "1.45.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w=="
}, },
"mime-types": { "mime-types": {
"version": "2.1.27", "version": "2.1.28",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
"requires": { "requires": {
"mime-db": "1.44.0" "mime-db": "1.45.0"
} }
}, },
"minimatch": { "minimatch": {
@@ -1050,9 +1032,9 @@
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
}, },
"typescript": { "typescript": {
"version": "4.1.2", "version": "4.1.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz",
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==",
"dev": true "dev": true
}, },
"universalify": { "universalify": {

View File

@@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "rust-cache", "name": "rust-cache",
"version": "1.1.0", "version": "1.2.0",
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.", "description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
"keywords": [ "keywords": [
"actions", "actions",
@@ -22,15 +22,15 @@
}, },
"homepage": "https://github.com/Swatinem/rust-cache#readme", "homepage": "https://github.com/Swatinem/rust-cache#readme",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.4", "@actions/cache": "^1.0.6",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4", "@actions/exec": "^1.0.4",
"@actions/glob": "^0.1.1", "@actions/glob": "^0.1.1",
"@actions/io": "^1.0.2" "@actions/io": "^1.0.2"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.25.1", "@vercel/ncc": "^0.27.0",
"typescript": "^4.1.2" "typescript": "^4.1.5"
}, },
"scripts": { "scripts": {
"prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts" "prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts"

View File

@@ -16,14 +16,17 @@ if (cwd) {
process.chdir(cwd); process.chdir(cwd);
} }
export const stateBins = "RUST_CACHE_BINS";
export const stateKey = "RUST_CACHE_KEY"; export const stateKey = "RUST_CACHE_KEY";
const stateHash = "RUST_CACHE_HASH"; const stateHash = "RUST_CACHE_HASH";
const home = os.homedir(); const home = os.homedir();
const cargoHome = process.env.CARGO_HOME || path.join(home, ".cargo");
export const paths = { export const paths = {
index: path.join(home, ".cargo/registry/index"), cargoHome,
cache: path.join(home, ".cargo/registry/cache"), index: path.join(cargoHome, "registry/index"),
git: path.join(home, ".cargo/git"), cache: path.join(cargoHome, "registry/cache"),
git: path.join(cargoHome, "git"),
target: "target", target: "target",
}; };
@@ -48,25 +51,51 @@ export async function getCacheConfig(): Promise<CacheConfig> {
let key = `v0-rust-`; let key = `v0-rust-`;
let inputKey = core.getInput("key"); const sharedKey = core.getInput("sharedKey");
if (inputKey) { if (sharedKey) {
key += `${inputKey}-`; key += `${sharedKey}-`;
} } else {
const inputKey = core.getInput("key");
if (inputKey) {
key += `${inputKey}-`;
}
const job = process.env.GITHUB_JOB; const job = process.env.GITHUB_JOB;
if (job) { if (job) {
key += `${job}-`; key += `${job}-`;
}
} }
key += await getRustKey(); key += await getRustKey();
return { return {
paths: [paths.index, paths.cache, paths.git, paths.target], paths: [
path.join(cargoHome, "bin"),
path.join(cargoHome, ".crates2.json"),
path.join(cargoHome, ".crates.toml"),
paths.git,
paths.cache,
paths.index,
paths.target,
],
key: `${key}-${lockHash}`, key: `${key}-${lockHash}`,
restoreKeys: [key], restoreKeys: [key],
}; };
} }
export async function getCargoBins(): Promise<Set<string>> {
const { installs }: { installs: { [key: string]: { bins: Array<string> } } } = JSON.parse(
await fs.promises.readFile(path.join(paths.cargoHome, ".crates2.json"), "utf8"),
);
const bins = new Set<string>();
for (const pkg of Object.values(installs)) {
for (const bin of pkg.bins) {
bins.add(bin);
}
}
return bins;
}
async function getRustKey(): Promise<string> { async function getRustKey(): Promise<string> {
const rustc = await getRustVersion(); const rustc = await getRustVersion();
return `${rustc.release}-${rustc.host}-${rustc["commit-hash"].slice(0, 12)}`; return `${rustc.release}-${rustc.host}-${rustc["commit-hash"].slice(0, 12)}`;

3
src/main.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

View File

@@ -1,6 +1,6 @@
import * as cache from "@actions/cache"; import * as cache from "@actions/cache";
import * as core from "@actions/core"; import * as core from "@actions/core";
import { cleanTarget, getCacheConfig, getPackages, stateKey } from "./common"; import { cleanTarget, getCacheConfig, getCargoBins, getPackages, stateBins, stateKey } from "./common";
async function run() { async function run() {
try { try {
@@ -8,7 +8,11 @@ async function run() {
const { paths, key, restoreKeys } = await getCacheConfig(); const { paths, key, restoreKeys } = await getCacheConfig();
const bins = await getCargoBins();
core.saveState(stateBins, JSON.stringify([...bins]));
core.info(`Restoring paths:\n ${paths.join("\n ")}`); core.info(`Restoring paths:\n ${paths.join("\n ")}`);
core.info(`In directory:\n ${process.cwd()}`);
core.info(`Using keys:\n ${[key, ...restoreKeys].join("\n ")}`); core.info(`Using keys:\n ${[key, ...restoreKeys].join("\n ")}`);
const restoreKey = await cache.restoreCache(paths, key, restoreKeys); const restoreKey = await cache.restoreCache(paths, key, restoreKeys);
if (restoreKey) { if (restoreKey) {
@@ -21,12 +25,22 @@ async function run() {
await cleanTarget(packages); await cleanTarget(packages);
} }
setCacheHitOutput(restoreKey === key);
} else { } else {
core.info("No cache found."); core.info("No cache found.");
setCacheHitOutput(false);
} }
} catch (e) { } catch (e) {
setCacheHitOutput(false);
core.info(`[warning] ${e.message}`); core.info(`[warning] ${e.message}`);
} }
} }
function setCacheHitOutput(cacheHit: boolean): void {
core.setOutput("cache-hit", cacheHit.toString());
}
run(); run();

View File

@@ -5,7 +5,17 @@ import * as glob from "@actions/glob";
import * as io from "@actions/io"; import * as io from "@actions/io";
import fs from "fs"; import fs from "fs";
import path from "path"; import path from "path";
import { cleanTarget, getCacheConfig, getPackages, Packages, paths, rm, stateKey } from "./common"; import {
cleanTarget,
getCacheConfig,
getCargoBins,
getPackages,
Packages,
paths,
rm,
stateBins,
stateKey,
} from "./common";
async function run() { async function run() {
try { try {
@@ -26,6 +36,10 @@ async function run() {
await cleanRegistry(registryName, packages); await cleanRegistry(registryName, packages);
} catch {} } catch {}
try {
await cleanBin();
} catch {}
try { try {
await cleanGit(packages); await cleanGit(packages);
} catch {} } catch {}
@@ -35,7 +49,8 @@ async function run() {
} catch {} } catch {}
core.info(`Saving paths:\n ${savePaths.join("\n ")}`); core.info(`Saving paths:\n ${savePaths.join("\n ")}`);
core.info(`Using key "${key}".`); core.info(`In directory:\n ${process.cwd()}`);
core.info(`Using key:\n ${key}`);
await cache.saveCache(savePaths, key); await cache.saveCache(savePaths, key);
} catch (e) { } catch (e) {
core.info(`[warning] ${e.message}`); core.info(`[warning] ${e.message}`);
@@ -55,6 +70,22 @@ async function getRegistryName(): Promise<string> {
return path.basename(path.dirname(first)); return path.basename(path.dirname(first));
} }
async function cleanBin() {
const bins = await getCargoBins();
const oldBins = JSON.parse(core.getState(stateBins));
for (const bin of oldBins) {
bins.delete(bin);
}
const dir = await fs.promises.opendir(path.join(paths.cargoHome, "bin"));
for await (const dirent of dir) {
if (dirent.isFile() && !bins.has(dirent.name)) {
await rm(dir.path, dirent);
}
}
}
async function cleanRegistry(registryName: string, packages: Packages) { async function cleanRegistry(registryName: string, packages: Packages) {
await io.rmRF(path.join(paths.index, registryName, ".cache")); await io.rmRF(path.join(paths.index, registryName, ".cache"));