Skip to content

Commit

Permalink
Build outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Dec 21, 2023
1 parent e07d012 commit 22447e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
14 changes: 8 additions & 6 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92671,6 +92671,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ConfigurationCacheEntryExtractor = exports.GradleHomeEntryExtractor = void 0;
const path_1 = __importDefault(__nccwpck_require__(1017));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const crypto_1 = __importDefault(__nccwpck_require__(6113));
const core = __importStar(__nccwpck_require__(2186));
const glob = __importStar(__nccwpck_require__(8090));
const params = __importStar(__nccwpck_require__(3885));
Expand Down Expand Up @@ -92898,14 +92899,14 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
}
return;
}
const encryptionKey = this.getEncryptionKey();
if (!encryptionKey) {
if (!params.getCacheEncryptionKey()) {
core.info('Not restoring configuration-cache state, as no encryption key was provided');
for (const cacheEntry of this.loadExtractedCacheEntries()) {
listener.entry(cacheEntry.pattern).markNotRestored('No encryption key provided');
}
return;
}
const encryptionKey = this.getAESEncryptionKey();
core.exportVariable('GRADLE_ENCRYPTION_KEY', encryptionKey);
return yield _super.restore.call(this, listener);
});
Expand All @@ -92915,7 +92916,7 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
extract: { get: () => super.extract }
});
return __awaiter(this, void 0, void 0, function* () {
if (!this.getEncryptionKey()) {
if (!params.getCacheEncryptionKey()) {
core.info('Not saving configuration-cache state, as no encryption key was provided');
for (const cacheEntry of this.loadExtractedCacheEntries()) {
listener.entry(cacheEntry.pattern).markNotSaved('No encryption key provided');
Expand All @@ -92924,9 +92925,10 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
yield _super.extract.call(this, listener);
});
}
getEncryptionKey() {
const encryptionKey = params.getCacheEncryptionKey();
return encryptionKey.length > 0 ? encryptionKey : undefined;
getAESEncryptionKey() {
const password = params.getCacheEncryptionKey();
const key = crypto_1.default.pbkdf2Sync(password, '', 1000, 16, 'sha256');
return key.toString('base64');
}
getExtractedCacheEntryDefinitions() {
return this.getProjectRoots().map(projectRoot => {
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92671,6 +92671,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ConfigurationCacheEntryExtractor = exports.GradleHomeEntryExtractor = void 0;
const path_1 = __importDefault(__nccwpck_require__(1017));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const crypto_1 = __importDefault(__nccwpck_require__(6113));
const core = __importStar(__nccwpck_require__(2186));
const glob = __importStar(__nccwpck_require__(8090));
const params = __importStar(__nccwpck_require__(3885));
Expand Down Expand Up @@ -92898,14 +92899,14 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
}
return;
}
const encryptionKey = this.getEncryptionKey();
if (!encryptionKey) {
if (!params.getCacheEncryptionKey()) {
core.info('Not restoring configuration-cache state, as no encryption key was provided');
for (const cacheEntry of this.loadExtractedCacheEntries()) {
listener.entry(cacheEntry.pattern).markNotRestored('No encryption key provided');
}
return;
}
const encryptionKey = this.getAESEncryptionKey();
core.exportVariable('GRADLE_ENCRYPTION_KEY', encryptionKey);
return yield _super.restore.call(this, listener);
});
Expand All @@ -92915,7 +92916,7 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
extract: { get: () => super.extract }
});
return __awaiter(this, void 0, void 0, function* () {
if (!this.getEncryptionKey()) {
if (!params.getCacheEncryptionKey()) {
core.info('Not saving configuration-cache state, as no encryption key was provided');
for (const cacheEntry of this.loadExtractedCacheEntries()) {
listener.entry(cacheEntry.pattern).markNotSaved('No encryption key provided');
Expand All @@ -92924,9 +92925,10 @@ class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
yield _super.extract.call(this, listener);
});
}
getEncryptionKey() {
const encryptionKey = params.getCacheEncryptionKey();
return encryptionKey.length > 0 ? encryptionKey : undefined;
getAESEncryptionKey() {
const password = params.getCacheEncryptionKey();
const key = crypto_1.default.pbkdf2Sync(password, '', 1000, 16, 'sha256');
return key.toString('base64');
}
getExtractedCacheEntryDefinitions() {
return this.getProjectRoots().map(projectRoot => {
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

0 comments on commit 22447e1

Please sign in to comment.