Skip to content

Commit

Permalink
Run npm run build as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Apr 28, 2023
1 parent cbe3ec3 commit 6ef1113
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73030,7 +73030,7 @@ const path_1 = __importDefault(__nccwpck_require__(1017));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const constants_1 = __nccwpck_require__(9042);
const cache_utils_1 = __nccwpck_require__(1678);
const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
const restoreCache = (packageManager, cacheDependencyPath, cacheInvalidateAfterDays) => __awaiter(void 0, void 0, void 0, function* () {
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
if (!packageManagerInfo) {
throw new Error(`Caching for '${packageManager}' is not supported`);
Expand All @@ -73044,9 +73044,15 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0,
if (!fileHash) {
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
}
const keyPrefix = `${platform}-setup-node-`;
const numericCacheInvalidateAfterDays = cacheInvalidateAfterDays && cacheInvalidateAfterDays === '0'
? 0
: (parseInt(cacheInvalidateAfterDays || '', 10) || 120);
const timedInvalidationPrefix = numericCacheInvalidateAfterDays
? Math.floor(Date.now() / (1000 * 60 * 60 * 24 * numericCacheInvalidateAfterDays)) % 1000 // % 1000 to get a rolling prefix between 0 and 999 rather than a possibly infinitely large
: 0;
const keyPrefix = `${platform}-${timedInvalidationPrefix}-setup-node-`;
const primaryKey = `${keyPrefix}${packageManager}-${fileHash}`;
const restoreKeys = [`${keyPrefix}${packageManager}-`, keyPrefix];
const restoreKeys = [`${keyPrefix}${packageManager}-`];
core.debug(`primary key is ${primaryKey}`);
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
const cacheKey = yield cache.restoreCache([cachePath], primaryKey, restoreKeys);
Expand Down Expand Up @@ -73981,7 +73987,8 @@ function run() {
}
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
const cacheDependencyPath = core.getInput('cache-dependency-path');
yield cache_restore_1.restoreCache(cache, cacheDependencyPath);
const cacheInvalidateAfterDays = core.getInput('cache-invalidate-after-days');
yield cache_restore_1.restoreCache(cache, cacheDependencyPath, cacheInvalidateAfterDays);
}
const matchersPath = path.join(__dirname, '../..', '.github');
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
Expand Down

0 comments on commit 6ef1113

Please sign in to comment.