3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-07-28 00:47:56 +00:00
This commit is contained in:
Salman Chishti 2025-07-24 21:09:22 +01:00 committed by GitHub
commit 9b48b6820c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 5531 additions and 9133 deletions

View file

@ -16,4 +16,4 @@ jobs:
name: Check dist/ name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
with: with:
node-version: "20.x" node-version: "24.x"

View file

@ -21,10 +21,10 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Node.js 20.x - name: Setup Node.js 24.x
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 24.x
cache: npm cache: npm
- run: npm ci - run: npm ci
- name: Prettier Format Check - name: Prettier Format Check

View file

@ -38,7 +38,7 @@ outputs:
cache-hit: cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key' description: 'A boolean value to indicate an exact match was found for the primary key'
runs: runs:
using: 'node20' using: 'node24'
main: 'dist/restore/index.js' main: 'dist/restore/index.js'
post: 'dist/save/index.js' post: 'dist/save/index.js'
post-if: "success()" post-if: "success()"

View file

@ -64912,24 +64912,24 @@ var Inputs;
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss"; Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs || (exports.Inputs = Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {
Outputs["CacheHit"] = "cache-hit"; Outputs["CacheHit"] = "cache-hit";
Outputs["CachePrimaryKey"] = "cache-primary-key"; Outputs["CachePrimaryKey"] = "cache-primary-key";
Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action
})(Outputs = exports.Outputs || (exports.Outputs = {})); })(Outputs || (exports.Outputs = Outputs = {}));
var State; var State;
(function (State) { (function (State) {
State["CachePrimaryKey"] = "CACHE_KEY"; State["CachePrimaryKey"] = "CACHE_KEY";
State["CacheMatchedKey"] = "CACHE_RESULT"; State["CacheMatchedKey"] = "CACHE_RESULT";
})(State = exports.State || (exports.State = {})); })(State || (exports.State = State = {}));
var Events; var Events;
(function (Events) { (function (Events) {
Events["Key"] = "GITHUB_EVENT_NAME"; Events["Key"] = "GITHUB_EVENT_NAME";
Events["Push"] = "push"; Events["Push"] = "push";
Events["PullRequest"] = "pull_request"; Events["PullRequest"] = "pull_request";
})(Events = exports.Events || (exports.Events = {})); })(Events || (exports.Events = Events = {}));
exports.RefKey = "GITHUB_REF"; exports.RefKey = "GITHUB_REF";
@ -64956,13 +64956,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@ -64973,7 +64983,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.restoreRun = exports.restoreOnlyRun = exports.restoreImpl = void 0; exports.restoreImpl = restoreImpl;
exports.restoreOnlyRun = restoreOnlyRun;
exports.restoreRun = restoreRun;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65033,7 +65045,6 @@ function restoreImpl(stateProvider, earlyExit) {
} }
}); });
} }
exports.restoreImpl = restoreImpl;
function run(stateProvider, earlyExit) { function run(stateProvider, earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
yield restoreImpl(stateProvider, earlyExit); yield restoreImpl(stateProvider, earlyExit);
@ -65052,13 +65063,11 @@ function restoreOnlyRun(earlyExit) {
yield run(new stateProvider_1.NullStateProvider(), earlyExit); yield run(new stateProvider_1.NullStateProvider(), earlyExit);
}); });
} }
exports.restoreOnlyRun = restoreOnlyRun;
function restoreRun(earlyExit) { function restoreRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
yield run(new stateProvider_1.StateProvider(), earlyExit); yield run(new stateProvider_1.StateProvider(), earlyExit);
}); });
} }
exports.restoreRun = restoreRun;
/***/ }), /***/ }),
@ -65084,13 +65093,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NullStateProvider = exports.StateProvider = void 0; exports.NullStateProvider = exports.StateProvider = void 0;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
@ -65159,15 +65178,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isCacheFeatureAvailable = exports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.isExactKeyMatch = exports.isGhes = void 0; exports.isGhes = isGhes;
exports.isExactKeyMatch = isExactKeyMatch;
exports.logWarning = logWarning;
exports.isValidEvent = isValidEvent;
exports.getInputAsArray = getInputAsArray;
exports.getInputAsInt = getInputAsInt;
exports.getInputAsBool = getInputAsBool;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65179,25 +65215,21 @@ function isGhes() {
const isLocalHost = hostname.endsWith(".LOCALHOST"); const isLocalHost = hostname.endsWith(".LOCALHOST");
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
} }
exports.isGhes = isGhes;
function isExactKeyMatch(key, cacheKey) { function isExactKeyMatch(key, cacheKey) {
return !!(cacheKey && return !!(cacheKey &&
cacheKey.localeCompare(key, undefined, { cacheKey.localeCompare(key, undefined, {
sensitivity: "accent" sensitivity: "accent"
}) === 0); }) === 0);
} }
exports.isExactKeyMatch = isExactKeyMatch;
function logWarning(message) { function logWarning(message) {
const warningPrefix = "[warning]"; const warningPrefix = "[warning]";
core.info(`${warningPrefix}${message}`); core.info(`${warningPrefix}${message}`);
} }
exports.logWarning = logWarning;
// Cache token authorized for all events that are tied to a ref // Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context // See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
function isValidEvent() { function isValidEvent() {
return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]); return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]);
} }
exports.isValidEvent = isValidEvent;
function getInputAsArray(name, options) { function getInputAsArray(name, options) {
return core return core
.getInput(name, options) .getInput(name, options)
@ -65205,7 +65237,6 @@ function getInputAsArray(name, options) {
.map(s => s.replace(/^!\s+/, "!").trim()) .map(s => s.replace(/^!\s+/, "!").trim())
.filter(x => x !== ""); .filter(x => x !== "");
} }
exports.getInputAsArray = getInputAsArray;
function getInputAsInt(name, options) { function getInputAsInt(name, options) {
const value = parseInt(core.getInput(name, options)); const value = parseInt(core.getInput(name, options));
if (isNaN(value) || value < 0) { if (isNaN(value) || value < 0) {
@ -65213,12 +65244,10 @@ function getInputAsInt(name, options) {
} }
return value; return value;
} }
exports.getInputAsInt = getInputAsInt;
function getInputAsBool(name, options) { function getInputAsBool(name, options) {
const result = core.getInput(name, options); const result = core.getInput(name, options);
return result.toLowerCase() === "true"; return result.toLowerCase() === "true";
} }
exports.getInputAsBool = getInputAsBool;
function isCacheFeatureAvailable() { function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) { if (cache.isFeatureAvailable()) {
return true; return true;
@ -65231,7 +65260,6 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
return false; return false;
} }
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/***/ }), /***/ }),

74
dist/restore/index.js vendored
View file

@ -64912,24 +64912,24 @@ var Inputs;
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss"; Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs || (exports.Inputs = Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {
Outputs["CacheHit"] = "cache-hit"; Outputs["CacheHit"] = "cache-hit";
Outputs["CachePrimaryKey"] = "cache-primary-key"; Outputs["CachePrimaryKey"] = "cache-primary-key";
Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action
})(Outputs = exports.Outputs || (exports.Outputs = {})); })(Outputs || (exports.Outputs = Outputs = {}));
var State; var State;
(function (State) { (function (State) {
State["CachePrimaryKey"] = "CACHE_KEY"; State["CachePrimaryKey"] = "CACHE_KEY";
State["CacheMatchedKey"] = "CACHE_RESULT"; State["CacheMatchedKey"] = "CACHE_RESULT";
})(State = exports.State || (exports.State = {})); })(State || (exports.State = State = {}));
var Events; var Events;
(function (Events) { (function (Events) {
Events["Key"] = "GITHUB_EVENT_NAME"; Events["Key"] = "GITHUB_EVENT_NAME";
Events["Push"] = "push"; Events["Push"] = "push";
Events["PullRequest"] = "pull_request"; Events["PullRequest"] = "pull_request";
})(Events = exports.Events || (exports.Events = {})); })(Events || (exports.Events = Events = {}));
exports.RefKey = "GITHUB_REF"; exports.RefKey = "GITHUB_REF";
@ -64956,13 +64956,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@ -64973,7 +64983,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.restoreRun = exports.restoreOnlyRun = exports.restoreImpl = void 0; exports.restoreImpl = restoreImpl;
exports.restoreOnlyRun = restoreOnlyRun;
exports.restoreRun = restoreRun;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65033,7 +65045,6 @@ function restoreImpl(stateProvider, earlyExit) {
} }
}); });
} }
exports.restoreImpl = restoreImpl;
function run(stateProvider, earlyExit) { function run(stateProvider, earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
yield restoreImpl(stateProvider, earlyExit); yield restoreImpl(stateProvider, earlyExit);
@ -65052,13 +65063,11 @@ function restoreOnlyRun(earlyExit) {
yield run(new stateProvider_1.NullStateProvider(), earlyExit); yield run(new stateProvider_1.NullStateProvider(), earlyExit);
}); });
} }
exports.restoreOnlyRun = restoreOnlyRun;
function restoreRun(earlyExit) { function restoreRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
yield run(new stateProvider_1.StateProvider(), earlyExit); yield run(new stateProvider_1.StateProvider(), earlyExit);
}); });
} }
exports.restoreRun = restoreRun;
/***/ }), /***/ }),
@ -65084,13 +65093,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NullStateProvider = exports.StateProvider = void 0; exports.NullStateProvider = exports.StateProvider = void 0;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
@ -65159,15 +65178,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isCacheFeatureAvailable = exports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.isExactKeyMatch = exports.isGhes = void 0; exports.isGhes = isGhes;
exports.isExactKeyMatch = isExactKeyMatch;
exports.logWarning = logWarning;
exports.isValidEvent = isValidEvent;
exports.getInputAsArray = getInputAsArray;
exports.getInputAsInt = getInputAsInt;
exports.getInputAsBool = getInputAsBool;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65179,25 +65215,21 @@ function isGhes() {
const isLocalHost = hostname.endsWith(".LOCALHOST"); const isLocalHost = hostname.endsWith(".LOCALHOST");
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
} }
exports.isGhes = isGhes;
function isExactKeyMatch(key, cacheKey) { function isExactKeyMatch(key, cacheKey) {
return !!(cacheKey && return !!(cacheKey &&
cacheKey.localeCompare(key, undefined, { cacheKey.localeCompare(key, undefined, {
sensitivity: "accent" sensitivity: "accent"
}) === 0); }) === 0);
} }
exports.isExactKeyMatch = isExactKeyMatch;
function logWarning(message) { function logWarning(message) {
const warningPrefix = "[warning]"; const warningPrefix = "[warning]";
core.info(`${warningPrefix}${message}`); core.info(`${warningPrefix}${message}`);
} }
exports.logWarning = logWarning;
// Cache token authorized for all events that are tied to a ref // Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context // See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
function isValidEvent() { function isValidEvent() {
return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]); return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]);
} }
exports.isValidEvent = isValidEvent;
function getInputAsArray(name, options) { function getInputAsArray(name, options) {
return core return core
.getInput(name, options) .getInput(name, options)
@ -65205,7 +65237,6 @@ function getInputAsArray(name, options) {
.map(s => s.replace(/^!\s+/, "!").trim()) .map(s => s.replace(/^!\s+/, "!").trim())
.filter(x => x !== ""); .filter(x => x !== "");
} }
exports.getInputAsArray = getInputAsArray;
function getInputAsInt(name, options) { function getInputAsInt(name, options) {
const value = parseInt(core.getInput(name, options)); const value = parseInt(core.getInput(name, options));
if (isNaN(value) || value < 0) { if (isNaN(value) || value < 0) {
@ -65213,12 +65244,10 @@ function getInputAsInt(name, options) {
} }
return value; return value;
} }
exports.getInputAsInt = getInputAsInt;
function getInputAsBool(name, options) { function getInputAsBool(name, options) {
const result = core.getInput(name, options); const result = core.getInput(name, options);
return result.toLowerCase() === "true"; return result.toLowerCase() === "true";
} }
exports.getInputAsBool = getInputAsBool;
function isCacheFeatureAvailable() { function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) { if (cache.isFeatureAvailable()) {
return true; return true;
@ -65231,7 +65260,6 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
return false; return false;
} }
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/***/ }), /***/ }),

View file

@ -64912,24 +64912,24 @@ var Inputs;
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss"; Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs || (exports.Inputs = Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {
Outputs["CacheHit"] = "cache-hit"; Outputs["CacheHit"] = "cache-hit";
Outputs["CachePrimaryKey"] = "cache-primary-key"; Outputs["CachePrimaryKey"] = "cache-primary-key";
Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action
})(Outputs = exports.Outputs || (exports.Outputs = {})); })(Outputs || (exports.Outputs = Outputs = {}));
var State; var State;
(function (State) { (function (State) {
State["CachePrimaryKey"] = "CACHE_KEY"; State["CachePrimaryKey"] = "CACHE_KEY";
State["CacheMatchedKey"] = "CACHE_RESULT"; State["CacheMatchedKey"] = "CACHE_RESULT";
})(State = exports.State || (exports.State = {})); })(State || (exports.State = State = {}));
var Events; var Events;
(function (Events) { (function (Events) {
Events["Key"] = "GITHUB_EVENT_NAME"; Events["Key"] = "GITHUB_EVENT_NAME";
Events["Push"] = "push"; Events["Push"] = "push";
Events["PullRequest"] = "pull_request"; Events["PullRequest"] = "pull_request";
})(Events = exports.Events || (exports.Events = {})); })(Events || (exports.Events = Events = {}));
exports.RefKey = "GITHUB_REF"; exports.RefKey = "GITHUB_REF";
@ -64956,13 +64956,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@ -64973,7 +64983,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.saveRun = exports.saveOnlyRun = exports.saveImpl = void 0; exports.saveImpl = saveImpl;
exports.saveOnlyRun = saveOnlyRun;
exports.saveRun = saveRun;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65024,7 +65036,6 @@ function saveImpl(stateProvider) {
return cacheId; return cacheId;
}); });
} }
exports.saveImpl = saveImpl;
function saveOnlyRun(earlyExit) { function saveOnlyRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -65049,7 +65060,6 @@ function saveOnlyRun(earlyExit) {
} }
}); });
} }
exports.saveOnlyRun = saveOnlyRun;
function saveRun(earlyExit) { function saveRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -65071,7 +65081,6 @@ function saveRun(earlyExit) {
} }
}); });
} }
exports.saveRun = saveRun;
/***/ }), /***/ }),
@ -65097,13 +65106,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NullStateProvider = exports.StateProvider = void 0; exports.NullStateProvider = exports.StateProvider = void 0;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
@ -65172,15 +65191,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isCacheFeatureAvailable = exports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.isExactKeyMatch = exports.isGhes = void 0; exports.isGhes = isGhes;
exports.isExactKeyMatch = isExactKeyMatch;
exports.logWarning = logWarning;
exports.isValidEvent = isValidEvent;
exports.getInputAsArray = getInputAsArray;
exports.getInputAsInt = getInputAsInt;
exports.getInputAsBool = getInputAsBool;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65192,25 +65228,21 @@ function isGhes() {
const isLocalHost = hostname.endsWith(".LOCALHOST"); const isLocalHost = hostname.endsWith(".LOCALHOST");
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
} }
exports.isGhes = isGhes;
function isExactKeyMatch(key, cacheKey) { function isExactKeyMatch(key, cacheKey) {
return !!(cacheKey && return !!(cacheKey &&
cacheKey.localeCompare(key, undefined, { cacheKey.localeCompare(key, undefined, {
sensitivity: "accent" sensitivity: "accent"
}) === 0); }) === 0);
} }
exports.isExactKeyMatch = isExactKeyMatch;
function logWarning(message) { function logWarning(message) {
const warningPrefix = "[warning]"; const warningPrefix = "[warning]";
core.info(`${warningPrefix}${message}`); core.info(`${warningPrefix}${message}`);
} }
exports.logWarning = logWarning;
// Cache token authorized for all events that are tied to a ref // Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context // See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
function isValidEvent() { function isValidEvent() {
return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]); return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]);
} }
exports.isValidEvent = isValidEvent;
function getInputAsArray(name, options) { function getInputAsArray(name, options) {
return core return core
.getInput(name, options) .getInput(name, options)
@ -65218,7 +65250,6 @@ function getInputAsArray(name, options) {
.map(s => s.replace(/^!\s+/, "!").trim()) .map(s => s.replace(/^!\s+/, "!").trim())
.filter(x => x !== ""); .filter(x => x !== "");
} }
exports.getInputAsArray = getInputAsArray;
function getInputAsInt(name, options) { function getInputAsInt(name, options) {
const value = parseInt(core.getInput(name, options)); const value = parseInt(core.getInput(name, options));
if (isNaN(value) || value < 0) { if (isNaN(value) || value < 0) {
@ -65226,12 +65257,10 @@ function getInputAsInt(name, options) {
} }
return value; return value;
} }
exports.getInputAsInt = getInputAsInt;
function getInputAsBool(name, options) { function getInputAsBool(name, options) {
const result = core.getInput(name, options); const result = core.getInput(name, options);
return result.toLowerCase() === "true"; return result.toLowerCase() === "true";
} }
exports.getInputAsBool = getInputAsBool;
function isCacheFeatureAvailable() { function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) { if (cache.isFeatureAvailable()) {
return true; return true;
@ -65244,7 +65273,6 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
return false; return false;
} }
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/***/ }), /***/ }),

74
dist/save/index.js vendored
View file

@ -64912,24 +64912,24 @@ var Inputs;
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive"; Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["FailOnCacheMiss"] = "fail-on-cache-miss"; Inputs["FailOnCacheMiss"] = "fail-on-cache-miss";
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {})); })(Inputs || (exports.Inputs = Inputs = {}));
var Outputs; var Outputs;
(function (Outputs) { (function (Outputs) {
Outputs["CacheHit"] = "cache-hit"; Outputs["CacheHit"] = "cache-hit";
Outputs["CachePrimaryKey"] = "cache-primary-key"; Outputs["CachePrimaryKey"] = "cache-primary-key";
Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action Outputs["CacheMatchedKey"] = "cache-matched-key"; // Output from restore action
})(Outputs = exports.Outputs || (exports.Outputs = {})); })(Outputs || (exports.Outputs = Outputs = {}));
var State; var State;
(function (State) { (function (State) {
State["CachePrimaryKey"] = "CACHE_KEY"; State["CachePrimaryKey"] = "CACHE_KEY";
State["CacheMatchedKey"] = "CACHE_RESULT"; State["CacheMatchedKey"] = "CACHE_RESULT";
})(State = exports.State || (exports.State = {})); })(State || (exports.State = State = {}));
var Events; var Events;
(function (Events) { (function (Events) {
Events["Key"] = "GITHUB_EVENT_NAME"; Events["Key"] = "GITHUB_EVENT_NAME";
Events["Push"] = "push"; Events["Push"] = "push";
Events["PullRequest"] = "pull_request"; Events["PullRequest"] = "pull_request";
})(Events = exports.Events || (exports.Events = {})); })(Events || (exports.Events = Events = {}));
exports.RefKey = "GITHUB_REF"; exports.RefKey = "GITHUB_REF";
@ -64956,13 +64956,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) { return new (P || (P = Promise))(function (resolve, reject) {
@ -64973,7 +64983,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.saveRun = exports.saveOnlyRun = exports.saveImpl = void 0; exports.saveImpl = saveImpl;
exports.saveOnlyRun = saveOnlyRun;
exports.saveRun = saveRun;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65024,7 +65036,6 @@ function saveImpl(stateProvider) {
return cacheId; return cacheId;
}); });
} }
exports.saveImpl = saveImpl;
function saveOnlyRun(earlyExit) { function saveOnlyRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -65049,7 +65060,6 @@ function saveOnlyRun(earlyExit) {
} }
}); });
} }
exports.saveOnlyRun = saveOnlyRun;
function saveRun(earlyExit) { function saveRun(earlyExit) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -65071,7 +65081,6 @@ function saveRun(earlyExit) {
} }
}); });
} }
exports.saveRun = saveRun;
/***/ }), /***/ }),
@ -65097,13 +65106,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NullStateProvider = exports.StateProvider = void 0; exports.NullStateProvider = exports.StateProvider = void 0;
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
@ -65172,15 +65191,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
}) : function(o, v) { }) : function(o, v) {
o["default"] = v; o["default"] = v;
}); });
var __importStar = (this && this.__importStar) || function (mod) { 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; if (mod && mod.__esModule) return mod;
var result = {}; var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 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); __setModuleDefault(result, mod);
return result; return result;
}; };
})();
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isCacheFeatureAvailable = exports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.isExactKeyMatch = exports.isGhes = void 0; exports.isGhes = isGhes;
exports.isExactKeyMatch = isExactKeyMatch;
exports.logWarning = logWarning;
exports.isValidEvent = isValidEvent;
exports.getInputAsArray = getInputAsArray;
exports.getInputAsInt = getInputAsInt;
exports.getInputAsBool = getInputAsBool;
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(7242); const constants_1 = __nccwpck_require__(7242);
@ -65192,25 +65228,21 @@ function isGhes() {
const isLocalHost = hostname.endsWith(".LOCALHOST"); const isLocalHost = hostname.endsWith(".LOCALHOST");
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
} }
exports.isGhes = isGhes;
function isExactKeyMatch(key, cacheKey) { function isExactKeyMatch(key, cacheKey) {
return !!(cacheKey && return !!(cacheKey &&
cacheKey.localeCompare(key, undefined, { cacheKey.localeCompare(key, undefined, {
sensitivity: "accent" sensitivity: "accent"
}) === 0); }) === 0);
} }
exports.isExactKeyMatch = isExactKeyMatch;
function logWarning(message) { function logWarning(message) {
const warningPrefix = "[warning]"; const warningPrefix = "[warning]";
core.info(`${warningPrefix}${message}`); core.info(`${warningPrefix}${message}`);
} }
exports.logWarning = logWarning;
// Cache token authorized for all events that are tied to a ref // Cache token authorized for all events that are tied to a ref
// See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context // See GitHub Context https://help.github.com/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context
function isValidEvent() { function isValidEvent() {
return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]); return constants_1.RefKey in process.env && Boolean(process.env[constants_1.RefKey]);
} }
exports.isValidEvent = isValidEvent;
function getInputAsArray(name, options) { function getInputAsArray(name, options) {
return core return core
.getInput(name, options) .getInput(name, options)
@ -65218,7 +65250,6 @@ function getInputAsArray(name, options) {
.map(s => s.replace(/^!\s+/, "!").trim()) .map(s => s.replace(/^!\s+/, "!").trim())
.filter(x => x !== ""); .filter(x => x !== "");
} }
exports.getInputAsArray = getInputAsArray;
function getInputAsInt(name, options) { function getInputAsInt(name, options) {
const value = parseInt(core.getInput(name, options)); const value = parseInt(core.getInput(name, options));
if (isNaN(value) || value < 0) { if (isNaN(value) || value < 0) {
@ -65226,12 +65257,10 @@ function getInputAsInt(name, options) {
} }
return value; return value;
} }
exports.getInputAsInt = getInputAsInt;
function getInputAsBool(name, options) { function getInputAsBool(name, options) {
const result = core.getInput(name, options); const result = core.getInput(name, options);
return result.toLowerCase() === "true"; return result.toLowerCase() === "true";
} }
exports.getInputAsBool = getInputAsBool;
function isCacheFeatureAvailable() { function isCacheFeatureAvailable() {
if (cache.isFeatureAvailable()) { if (cache.isFeatureAvailable()) {
return true; return true;
@ -65244,7 +65273,6 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."); logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
return false; return false;
} }
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
/***/ }), /***/ }),

14141
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,23 +29,26 @@
"@actions/io": "^1.1.3" "@actions/io": "^1.1.3"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^27.5.2", "@types/jest": "^29.5.14",
"@types/nock": "^11.1.0", "@types/nock": "^11.1.0",
"@types/node": "^16.18.3", "@types/node": "^24.1.0",
"@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^5.45.0", "@typescript-eslint/parser": "^7.2.0",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"eslint": "^8.28.0", "eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^9.1.2",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^26.9.0", "eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-simple-import-sort": "^12.1.1",
"jest": "^28.1.3", "jest": "^29.7.0",
"jest-circus": "^27.5.1", "jest-circus": "^29.7.0",
"nock": "^13.2.9", "nock": "^13.2.9",
"prettier": "^2.8.0", "prettier": "^3.6.2",
"ts-jest": "^28.0.8", "ts-jest": "^29.4.0",
"typescript": "^4.9.3" "typescript": "^5.8.3"
},
"engines": {
"node": ">=24"
} }
} }

View file

@ -31,7 +31,7 @@ outputs:
cache-matched-key: cache-matched-key:
description: 'Key of the cache that was restored, it could either be the primary key on cache-hit or a partial/complete match of one of the restore keys' description: 'Key of the cache that was restored, it could either be the primary key on cache-hit or a partial/complete match of one of the restore keys'
runs: runs:
using: 'node20' using: 'node24'
main: '../dist/restore-only/index.js' main: '../dist/restore-only/index.js'
branding: branding:
icon: 'archive' icon: 'archive'

View file

@ -16,7 +16,7 @@ inputs:
default: 'false' default: 'false'
required: false required: false
runs: runs:
using: 'node20' using: 'node24'
main: '../dist/save-only/index.js' main: '../dist/save-only/index.js'
branding: branding:
icon: 'archive' icon: 'archive'