Skip to content

Bump tough-cookie and @azure/ms-rest-js #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
using: 'node16'
main: 'dist/restore/index.js'
post: 'dist/save/index.js'
post-if: 'success()'
post-if: 'always()'
branding:
icon: 'archive'
color: 'gray-dark'
18 changes: 16 additions & 2 deletions dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4935,6 +4935,8 @@ var Inputs;
var Outputs;
(function (Outputs) {
Outputs["CacheHit"] = "cache-hit";
Outputs["ExactCacheHit"] = "exact-cache-hit";
Outputs["FuzzyCacheHit"] = "fuzzy-cache-hit";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
var State;
(function (State) {
Expand Down Expand Up @@ -38382,7 +38384,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setFuzzyCacheHitOutput = exports.setExactCacheHitOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
const constants_1 = __webpack_require__(196);
Expand All @@ -38406,6 +38408,14 @@ function setCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString());
}
exports.setCacheHitOutput = setCacheHitOutput;
function setExactCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.ExactCacheHit, isCacheHit.toString());
}
exports.setExactCacheHitOutput = setExactCacheHitOutput;
function setFuzzyCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.FuzzyCacheHit, isCacheHit.toString());
}
exports.setFuzzyCacheHitOutput = setFuzzyCacheHitOutput;
function setOutputAndState(key, cacheKey) {
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
// Store the matched cache key if it exists
Expand Down Expand Up @@ -48956,6 +48966,8 @@ function run() {
try {
if (!utils.isCacheFeatureAvailable()) {
utils.setCacheHitOutput(false);
utils.setExactCacheHitOutput(false);
utils.setFuzzyCacheHitOutput(false);
return;
}
// Validate inputs, this can cause task failure
Expand All @@ -48980,7 +48992,9 @@ function run() {
// Store the matched cache key
utils.setCacheState(cacheKey);
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
utils.setCacheHitOutput(isExactKeyMatch);
utils.setCacheHitOutput(true);
utils.setExactCacheHitOutput(isExactKeyMatch);
utils.setFuzzyCacheHitOutput(!isExactKeyMatch);
core.info(`Cache restored from key: ${cacheKey}`);
}
catch (error) {
Expand Down
12 changes: 11 additions & 1 deletion dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4935,6 +4935,8 @@ var Inputs;
var Outputs;
(function (Outputs) {
Outputs["CacheHit"] = "cache-hit";
Outputs["ExactCacheHit"] = "exact-cache-hit";
Outputs["FuzzyCacheHit"] = "fuzzy-cache-hit";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
var State;
(function (State) {
Expand Down Expand Up @@ -38382,7 +38384,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setFuzzyCacheHitOutput = exports.setExactCacheHitOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
const constants_1 = __webpack_require__(196);
Expand All @@ -38406,6 +38408,14 @@ function setCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString());
}
exports.setCacheHitOutput = setCacheHitOutput;
function setExactCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.ExactCacheHit, isCacheHit.toString());
}
exports.setExactCacheHitOutput = setExactCacheHitOutput;
function setFuzzyCacheHitOutput(isCacheHit) {
core.setOutput(constants_1.Outputs.FuzzyCacheHit, isCacheHit.toString());
}
exports.setFuzzyCacheHitOutput = setFuzzyCacheHitOutput;
function setOutputAndState(key, cacheKey) {
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
// Store the matched cache key if it exists
Expand Down
151 changes: 87 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export enum Inputs {
}

export enum Outputs {
CacheHit = "cache-hit"
CacheHit = "cache-hit",
ExactCacheHit = "exact-cache-hit",
FuzzyCacheHit = "fuzzy-cache-hit"
}

export enum State {
Expand Down
Loading