Support repo-registration as a second enablement path for project-entry caching

Configuration-cache store/restore is now enabled when EITHER a valid Develocity
JWT OR per-repo registration (a GitHub App installation that accepted the T&C) is
present. The gate itself lives in the vendored gradle-actions-caching library
(refreshed to 0.9.1); this repo wires up the reporting and notice.

- ProjectCacheStatus: 'trial-not-licensed' -> 'not-registered'.
- caching-report: render the 'not-registered' line with a /register link, and add
  renderProjectCacheNotice() for a prominent core.notice.
- setup-gradle: emit the notice from complete() only when withheld via the
  registration path; quiet when enabled by either path.
- Refresh vendored gradle-actions-caching to 0.9.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daz DeBoerandClaude Opus 4.8 committed 2026-06-26 16:01:43 -06:00
1 parent b128da9bf0
commit bc54cf57d1
7 files changed
+67 -10

No files matched your search

+2 -2
View File
@@ -32,9 +32,9 @@ export type CacheCleanupStatus =
export type ProjectCacheStatus =
| 'not-enabled' // the hidden opt-in env var was not set (rendered as nothing)
| 'trial-expired' // past the hard trial expiry
| 'trial-not-licensed' // Develocity trial token missing or invalid
| 'not-registered' // neither entitlement path satisfied (no Develocity trial token, repo not registered)
| 'no-encryption-key' // Cannot store due to missing encryption key
| 'enabled' // Trial in effect: will attempt to save project state
| 'enabled' // Entitled: will attempt to save project state
export interface CacheEntryReport {
entryName: string
+18 -1
View File
@@ -2,6 +2,7 @@ import {CacheCleanupStatus, CacheEntryReport, CacheReport, CacheStatus, ProjectC
const DOCS = 'https://github.com/gradle/actions/blob/main/docs/setup-gradle.md'
const DISTRIBUTION = 'https://github.com/gradle/actions/blob/main/DISTRIBUTION.md'
const REGISTER = 'https://gradle-actions-caching-registration.vercel.app/register'
/**
* Identifies the caching provider in use, so the report can attribute the cache
@@ -31,7 +32,7 @@ const CLEANUP_COPY: Record<CacheCleanupStatus, string> = {
const PROJECT_CACHE_COPY: Record<ProjectCacheStatus, string> = {
'not-enabled': ``,
'trial-expired': `Project state (build-logic and configuration cache) was not cached - the Develocity caching trial has expired.`,
'trial-not-licensed': `Project state (build-logic and configuration cache) was not cached - a develocity-access-key and develocity-server-url is required.`,
'not-registered': `Project state (build-logic and configuration cache) was not cached - this repository is not registered for advanced caching. [Register this repository](${REGISTER}), or provide a \`develocity-access-key\` and \`develocity-server-url\`.`,
'no-encryption-key': `Project state (build-logic and configuration cache) was not cached - a [cache-encryption-key](${DOCS}#cache-encryption-key) is required.`,
enabled: `Caching of project state (build-logic and configuration cache) was enabled.`
}
@@ -82,6 +83,22 @@ function renderProjectCacheLine(projectCache?: ProjectCacheStatus): string | und
return projectCache ? PROJECT_CACHE_COPY[projectCache] : undefined
}
/**
* A plain-text log notice (no markdown) surfaced when advanced caching was withheld because the
* repository is not registered. Returns `undefined` for every other status, so callers stay quiet
* when the feature is enabled, disabled, or simply not opted in.
*/
export function renderProjectCacheNotice(projectCache?: ProjectCacheStatus): string | undefined {
if (projectCache !== 'not-registered') {
return undefined
}
return (
'Advanced caching (build-logic and configuration cache) was not enabled: this repository ' +
`is not registered. Register it at ${REGISTER}, or provide a develocity-access-key and ` +
'develocity-server-url.'
)
}
function renderProviderNote(providerNote?: ProviderNote): string | undefined {
if (!providerNote) {
return undefined
+9
View File
@@ -9,6 +9,7 @@ import {setupToken} from './develocity/short-lived-token'
import {loadBuildResults, markBuildResultsProcessed} from './build-results'
import {getCacheService, getProviderNote} from './cache-service-loader'
import {renderProjectCacheNotice} from './caching-report'
import {CacheOptions} from './cache-service'
import {
DevelocityConfig,
@@ -85,6 +86,14 @@ export async function complete(
buildResults,
cacheOptionsFrom(cacheConfig, develocityServerUrl, cacheToken)
)
// Surface a prominent notice (with the /register link) only when advanced caching was withheld
// because the repo is not registered; stay quiet when enabled by either path.
const registrationNotice = renderProjectCacheNotice(cacheReport.projectCache)
if (registrationNotice) {
core.notice(registrationNotice)
}
await jobSummary.generateJobSummary(buildResults, cacheReport, getProviderNote(cacheConfig), summaryConfig)
markBuildResultsProcessed()
+32 -1
View File
@@ -1,7 +1,7 @@
import {describe, expect, it} from '@jest/globals'
import {CacheReport} from '../../src/cache-service'
import {renderCachingReport} from '../../src/caching-report'
import {renderCachingReport, renderProjectCacheNotice} from '../../src/caching-report'
const ENHANCED = {kind: 'enhanced'} as const
const BASIC = {kind: 'basic'} as const
@@ -114,6 +114,20 @@ describe('renderCachingReport', () => {
expect(md).not.toContain('Project state')
})
it('renders the not-registered status with a /register link inside the details', () => {
const report: CacheReport = {
status: 'enabled',
cleanup: 'enabled',
projectCache: 'not-registered',
entries: [entry()]
}
const md = renderCachingReport(report, ENHANCED)
const detailsBody = md.slice(md.indexOf('</summary>'))
expect(detailsBody).toContain('not registered for advanced caching')
expect(detailsBody).toContain('/register')
})
it('renders a compact disabled report with no note and no details', () => {
const report: CacheReport = {status: 'disabled', entries: []}
const md = renderCachingReport(report, undefined)
@@ -143,3 +157,20 @@ describe('renderCachingReport', () => {
expect(md).not.toContain('<details>')
})
})
describe('renderProjectCacheNotice', () => {
it('returns a notice with the /register link for the not-registered status', () => {
const notice = renderProjectCacheNotice('not-registered')
expect(notice).toBeDefined()
expect(notice).toContain('not registered')
expect(notice).toContain('/register')
})
it('is silent for every other status', () => {
expect(renderProjectCacheNotice('enabled')).toBeUndefined()
expect(renderProjectCacheNotice('not-enabled')).toBeUndefined()
expect(renderProjectCacheNotice('trial-expired')).toBeUndefined()
expect(renderProjectCacheNotice('no-encryption-key')).toBeUndefined()
expect(renderProjectCacheNotice(undefined)).toBeUndefined()
})
})
+3 -3
View File
@@ -56,12 +56,12 @@ export declare type CacheStatus = 'enabled' | 'read-only' | 'write-only' | 'disa
/**
* Status of project-entry caching (build-logic artifacts + configuration-cache data) for a run.
* The first three are set on restore (always ungated); the rest are set on save and reflect the
* two-tier gate (opt-in + Develocity trial, then encryption key + Gradle version). Still beta.
* Set as the gate is evaluated: opt-in, then trial expiry, then entitlement (Develocity trial
* license OR repo registration), then encryption key. Still beta.
*
* @public
*/
declare type ProjectCacheStatus = 'not-enabled' | 'trial-expired' | 'trial-not-licensed' | 'no-encryption-key' | 'enabled';
declare type ProjectCacheStatus = 'not-enabled' | 'trial-expired' | 'not-registered' | 'no-encryption-key' | 'enabled';
/** @public */
export declare function restore(gradleUserHome: string, cacheOptions: CacheOptions): Promise<void>;
+2 -2
View File
@@ -1,2 +1,2 @@
const a0_0x4893e6=a0_0x26dc;(function(_0x39d65a,_0x28fee7){const _0x270f16=a0_0x26dc,_0x1e10bb=_0x39d65a();while(!![]){try{const _0x5600dd=-parseInt(_0x270f16(0x1e8))/0x1+-parseInt(_0x270f16(0xc7c))/0x2*(-parseInt(_0x270f16(0x12f1))/0x3)+-parseInt(_0x270f16(0xad5))/0x4*(parseInt(_0x270f16(0xd89))/0x5)+-parseInt(_0x270f16(0x145e))/0x6+-parseInt(_0x270f16(0x100e))/0x7*(parseInt(_0x270f16(0x63b))/0x8)+-parseInt(_0x270f16(0xfc5))/0x9*(-parseInt(_0x270f16(0xbcb))/0xa)+parseInt(_0x270f16(0xe1f))/0xb*(parseInt(_0x270f16(0x14e3))/0xc);if(_0x5600dd===_0x28fee7)break;else _0x1e10bb['push'](_0x1e10bb['shift']());}catch(_0x4f3f8e){_0x1e10bb['push'](_0x1e10bb['shift']());}}}(a0_0xf7aa,0x19649));import*as a0_0x400243 from'os';import a0_0x56e8ea,{EOL as a0_0x125a9d}from'os';import*as a0_0x3cf51d from'crypto';import*as a0_0x2b0b27 from'fs';import a0_0x263a2e,{promises,writeFileSync,existsSync,readFileSync}from'fs';import*as a0_0x3ed914 from'path';import a0_0x181991 from'path';import*as a0_0x4f61cc from'http';import a0_0x595130 from'http';import*as a0_0x304e5d from'https';import a0_0xb38c54 from'https';import a0_0x371d35 from'net';import a0_0xf05961 from'tls';import*as a0_0x13c265 from'events';import a0_0x2a0ad2,{EventEmitter}from'events';import a0_0x543274,{ok}from'assert';import*as a0_0x20dbfc from'util';import a0_0xcf4e58 from'util';import a0_0x37c539 from'node:assert';import a0_0x129983 from'node:net';import a0_0x8f3b76 from'node:http';import a0_0x16e0d1,{Transform,Readable as a0_0x3b497c}from'node:stream';import a0_0x642f7f from'node:buffer';import a0_0x372cdf,{inspect}from'node:util';import a0_0x5a62bb from'node:querystring';import a0_0x3a0a02 from'node:events';import a0_0x4c47db from'node:diagnostics_channel';import a0_0x5bad94 from'node:tls';import a0_0x4783cb from'node:zlib';import a0_0x3b5282 from'node:perf_hooks';import a0_0x41d05e from'node:util/types';import a0_0xa2f90f from'node:worker_threads';import a0_0x2e9e69 from'node:url';import a0_0x8b1715 from'node:async_hooks';import a0_0x25d12b from'node:console';import a0_0x52b425 from'node:dns';import a0_0x1b387e,{StringDecoder}from'string_decoder';import*as a0_0x1d63a8 from'child_process';import{setTimeout as a0_0x33f7d2}from'timers';import*as a0_0x354927 from'stream';import{Readable}from'stream';import a0_0x1a17a3,{URL as a0_0x2caf55}from'url';import*as a0_0x30c150 from'buffer';import{Buffer as a0_0x39263d}from'buffer';import a0_0x4aa0e9,{EOL as a0_0x4e57ed}from'node:os';import a0_0x556f37 from'node:process';import a0_0x280a62 from'node:https';import a0_0x1f2080 from'tty';import{createHmac}from'node:crypto';import a0_0x132b37 from'node:fs';import*as a0_0x548adb from'zlib';function toCommandValue(_0x1ac2ed){if(_0x1ac2ed===null||_0x1ac2ed===undefined)return'';else{if(typeof _0x1ac2ed==='string'||_0x1ac2ed instanceof String)return _0x1ac2ed;}return JSON['stringify'](_0x1ac2ed);}function toCommandProperties(_0x60a74e){const _0x409bed=a0_0x26dc;if(!Object[_0x409bed(0xa0e)](_0x60a74e)[_0x409bed(0x143)])return{};return{'title':_0x60a74e[_0x409bed(0xe3a)],'file':_0x60a74e[_0x409bed(0x7d5)],'line':_0x60a74e[_0x409bed(0x8b1)],'endLine':_0x60a74e['endLine'],'col':_0x60a74e[_0x409bed(0x1507)],'endColumn':_0x60a74e['endColumn']};}function issueCommand(_0xf8fd7b,_0x144996,_0x30c874){const _0x341cff=a0_0x26dc,_0x29b80e=new Command(_0xf8fd7b,_0x144996,_0x30c874);process[_0x341cff(0x111b)]['write'](_0x29b80e[_0x341cff(0x99d)]()+a0_0x400243[_0x341cff(0x1061)]);}function issue(_0x536952,_0x25e163=''){issueCommand(_0x536952,{},_0x25e163);}const CMD_STRING='::';class Command{constructor(_0x38e7d2,_0xf6b4ad,_0x572c5b){const _0xc6cfd=a0_0x26dc;!_0x38e7d2&&(_0x38e7d2='missing.command'),this[_0xc6cfd(0x2cb)]=_0x38e7d2,this['properties']=_0xf6b4ad,this['message']=_0x572c5b;}[a0_0x4893e6(0x99d)](){const _0x116d43=a0_0x4893e6;let _0x132af8=CMD_STRING+this[_0x116d43(0x2cb)];if(this[_0x116d43(0xf6e)]&&Object[_0x116d43(0xa0e)](this[_0x116d43(0xf6e)])[_0x116d43(0x143)]>0x0){_0x132af8+='\x20';let _0x1eb5b0=!![];for(const _0x16913a in this[_0x116d43(0xf6e)]){if(this['properties'][_0x116d43(0x9b8)](_0x16913a)){const _0x333181=this['properties'][_0x16913a];_0x333181&&(_0x1eb5b0?_0x1eb5b0=![]:_0x132af8+=',',_0x132af8+=_0x16913a+'='+escapeProperty(_0x333181));}}}return _0x132af8+=''+CMD_STRING+escapeData(this[_0x116d43(0x12d9)]),_0x132af8;}}function escapeData(_0x54ae29){const _0x3d1de3=a0_0x4893e6;return toCommandValue(_0x54ae29)[_0x3d1de3(0xbc4)](/%/g,'%25')['replace'](/\r/g,'%0D')[_0x3d1de3(0xbc4)](/\n/g,_0x3d1de3(0x161f));}function escapeProperty(_0x878f30){const _0x39ab91=a0_0x4893e6;return toCommandValue(_0x878f30)['replace'](/%/g,_0x39ab91(0x702))[_0x39ab91(0xbc4)](/\r/g,'%0D')[_0x39ab91(0xbc4)](/\n/g,_0x39ab91(0x161f))[_0x39ab91(0xbc4)](/:/g,'%3A')[_0x39ab91(0xbc4)](/,/g,_0x39ab91(0x770));}function issueFileCommand(_0x136732,_0x448716){const _0x48c14f=a0_0x4893e6,_0x3f4642=process.env[`GITHUB_${_0x136732}`];if(!_0x3f4642)throw new Error(_0x48c14f(0x10b2)+_0x136732);if(!a0_0x2b0b27[_0x48c14f(Line truncated
()=>new ArrayBuffer(0x0));}function isJSONResponse(_0x2d08a8){const _0x26ba55=a0_0x4893e6;return _0x2d08a8[_0x26ba55(0x1316)]==='application/json'||_0x2d08a8[_0x26ba55(0x1316)]===_0x26ba55(0x10ea);}function toErrorMessage(_0x2eb94a){const _0x576b9e=a0_0x4893e6;if(typeof _0x2eb94a===_0x576b9e(0x1c4))return _0x2eb94a;if(_0x2eb94a instanceof ArrayBuffer)return _0x576b9e(0x62d);if(_0x576b9e(0x12d9)in _0x2eb94a){const _0x447ad9='documentation_url'in _0x2eb94a?'\x20-\x20'+_0x2eb94a[_0x576b9e(0x1053)]:'';return Array['isArray'](_0x2eb94a['errors'])?_0x2eb94a[_0x576b9e(0x12d9)]+':\x20'+_0x2eb94a[_0x576b9e(0xff3)][_0x576b9e(0x867)](_0x1a7881=>JSON[_0x576b9e(0x105c)](_0x1a7881))[_0x576b9e(0xc71)](',\x20')+_0x447ad9:''+_0x2eb94a['message']+_0x447ad9;}return _0x576b9e(0x78e)+JSON[_0x576b9e(0x105c)](_0x2eb94a);}function withDefaults$1(_0x1d2e50,_0x19b608){const _0x12c9c8=a0_0x4893e6,_0x173fd3=_0x1d2e50[_0x12c9c8(0xb62)](_0x19b608),_0x245229=function(_0x5859de,_0x1265ba){const _0x20fef8=_0x12c9c8,_0x2a25e7=_0x173fd3[_0x20fef8(0x739)](_0x5859de,_0x1265ba);if(!_0x2a25e7[_0x20fef8(0x1206)]||!_0x2a25e7[_0x20fef8(0x1206)][_0x20fef8(0x1368)])return fetchWrapper(_0x173fd3[_0x20fef8(0x173a)](_0x2a25e7));const _0x475648=(_0xc69cb5,_0x101148)=>{const _0xaaa589=_0x20fef8;return fetchWrapper(_0x173fd3[_0xaaa589(0x173a)](_0x173fd3[_0xaaa589(0x739)](_0xc69cb5,_0x101148)));};return Object[_0x20fef8(0x556)](_0x475648,{'endpoint':_0x173fd3,'defaults':withDefaults$1[_0x20fef8(0xc86)](null,_0x173fd3)}),_0x2a25e7[_0x20fef8(0x1206)][_0x20fef8(0x1368)](_0x475648,_0x2a25e7);};return Object[_0x12c9c8(0x556)](_0x245229,{'endpoint':_0x173fd3,'defaults':withDefaults$1[_0x12c9c8(0xc86)](null,_0x173fd3)});}var request=withDefaults$1(endpoint,defaults_default),VERSION$3=a0_0x4893e6(0x1782);function _buildMessageForResponseErrors(_0x495c07){const _0x16ebca=a0_0x4893e6;return'Request\x20failed\x20due\x20to\x20following\x20response\x20errors:\x0a'+_0x495c07[_0x16ebca(0xff3)][_0x16ebca(0x867)](_0x5a819e=>_0x16ebca(0x5db)+_0x5a819e['message'])[_0x16ebca(0xc71)]('\x0a');}var GraphqlResponseError=class extends Error{constructor(_0x3c0390,_0x35d662,_0x3694c6){const _0x371f05=a0_0x4893e6;super(_buildMessageForResponseErrors(_0x3694c6)),this[_0x371f05(0x1206)]=_0x3c0390,this[_0x371f05(0x68a)]=_0x35d662,this['response']=_0x3694c6,this[_0x371f05(0xff3)]=_0x3694c6[_0x371f05(0xff3)],this[_0x371f05(0xd76)]=_0x3694c6[_0x371f05(0xd76)],Error[_0x371f05(0xed3)]&&Error[_0x371f05(0xed3)](this,this[_0x371f05(0x61c)]);}[a0_0x4893e6(0x20e)]=a0_0x4893e6(0x14c5);[a0_0x4893e6(0xff3)];['data'];},NON_VARIABLE_OPTIONS=['method','baseUrl','url',a0_0x4893e6(0x68a),a0_0x4893e6(0x1206),a0_0x4893e6(0x132a),a0_0x4893e6(0x1210),'operationName'],FORBIDDEN_VARIABLE_OPTIONS=[a0_0x4893e6(0x132a),a0_0x4893e6(0x7ec),'url'],GHES_V3_SUFFIX_REGEX=/\/api\/v3\/?$/;function graphql(_0x5c4f0a,_0x59381c,_0x3c42e5){const _0x3b3d4c=a0_0x4893e6;if(_0x3c42e5){if(typeof _0x59381c===_0x3b3d4c(0x1c4)&&_0x3b3d4c(0x132a)in _0x3c42e5)return Promise[_0x3b3d4c(0x12a1)](new Error('[@octokit/graphql]\x20\x22query\x22\x20cannot\x20be\x20used\x20as\x20variable\x20name'));for(const _0x2b3534 in _0x3c42e5){if(!FORBIDDEN_VARIABLE_OPTIONS[_0x3b3d4c(0x545)](_0x2b3534))continue;return Promise[_0x3b3d4c(0x12a1)](new Error(_0x3b3d4c(0x466)+_0x2b3534+_0x3b3d4c(0x117e)));}}const _0x1ba4f6=typeof _0x59381c===_0x3b3d4c(0x1c4)?Object[_0x3b3d4c(0x556)]({'query':_0x59381c},_0x3c42e5):_0x59381c,_0x5daf98=Object[_0x3b3d4c(0xa0e)](_0x1ba4f6)[_0x3b3d4c(0x144d)]((_0x1beae3,_0x4deda8)=>{const _0x53474f=_0x3b3d4c;if(NON_VARIABLE_OPTIONS[_0x53474f(0x545)](_0x4deda8))return _0x1beae3[_0x4deda8]=_0x1ba4f6[_0x4deda8],_0x1beae3;return!_0x1beae3[_0x53474f(0x125e)]&&(_0x1beae3['variables']={}),_0x1beae3[_0x53474f(0x125e)][_0x4deda8]=_0x1ba4f6[_0x4deda8],_0x1beae3;},{}),_0x5abf16=_0x1ba4f6[_0x3b3d4c(0x641)]||_0x5c4f0a['endpoint'][_0x3b3d4c(0x156e)]['baseUrl'];return GHES_V3_SUFFIX_REGEX['test'](_0x5abf16)&&(_0x5daf98[_0x3b3d4c(0xa66)]=_0x5abf16[_0x3b3d4c(0xbc4)](GHES_V3_SUFFIX_REGEX,_0x3b3d4c(0x565))),_0x5c4f0a(_0x5daf98)[_0x3b3d4c(0x115b)](_0x3d6fcd=>{const _0x1a5ad9=_0x3b3d4c;if(_0x3d6fcd[_0x1a5ad9(0xd76)][_0x1a5ad9(0xff3)]){const _0x38cb26={};for(const _0x6e71bf of Object['keys'](_0x3d6fcd[_0x1a5ad9(0x68a)])){_0x38cb26[_0x6e71bf]=_0x3d6fcd[_0x1a5ad9(0x68a)][_0x6e71bf];}throw new GraphqlResponseError(_0x5daf98,_0x38cb26,_0x3d6fcd[_0x1a5ad9(0xd76)]);}return _0x3d6fcd['data'][_0x1a5ad9(0xd76)];});}function withDefaults(_0x5272b7,_0x3d13ef){const _0x3c8324=a0_0x4893e6,_0x32b73e=_0x5272b7['defaults'](_0x3d13ef),_0x5bde80=(_0x10e35d,_0xdc2834)=>{return graphql(_0x32b73e,_0x10e35d,_0xdc2834);};return Object['assign'](_0x5bde80,{'defaults':withDefaults[_0x3c8324(0xc86)](null,_0x32b73e),'endpoint':_0x32b73e[_0x3c8324(0x152f)]});}withDefaults(request,{'headers':{'user-agent':a0_0x4893e6(0x3d2)+VERSION$3+'\x20'+getUserAgent()},'method':a0_0x4893e6(0xfba),'url':a0_0x4893e6(0x699)});function withCustomRequest(_0x49a2b0){const _0x5944b8=a0_0x4893e6;returnLine truncated
const a0_0x54288c=a0_0x3108;(function(_0x1e00b5,_0x4f474b){const _0x36ab64=a0_0x3108,_0x24cf5a=_0x1e00b5();while(!![]){try{const _0x501763=-parseInt(_0x36ab64(0x1006))/0x1+-parseInt(_0x36ab64(0x14a2))/0x2+parseInt(_0x36ab64(0x115))/0x3+parseInt(_0x36ab64(0x4e9))/0x4*(parseInt(_0x36ab64(0xd34))/0x5)+-parseInt(_0x36ab64(0x94f))/0x6+-parseInt(_0x36ab64(0xa3a))/0x7+parseInt(_0x36ab64(0x11f4))/0x8*(parseInt(_0x36ab64(0x6c4))/0x9);if(_0x501763===_0x4f474b)break;else _0x24cf5a['push'](_0x24cf5a['shift']());}catch(_0x12ac74){_0x24cf5a['push'](_0x24cf5a['shift']());}}}(a0_0x2343,0x9ab98));import*as a0_0x2d61f0 from'os';import a0_0x4e479b,{EOL as a0_0x158289}from'os';import*as a0_0x38b4f3 from'crypto';import*as a0_0x471e91 from'fs';import a0_0x85726f,{promises,writeFileSync,existsSync,readFileSync}from'fs';import*as a0_0x2776a4 from'path';import a0_0x1c28fe from'path';import*as a0_0x24aa3c from'http';import a0_0x4a9aeb from'http';import*as a0_0xa93198 from'https';import a0_0x443548 from'https';import a0_0x4d9ab1 from'net';import a0_0x380e49 from'tls';import*as a0_0xed4bbd from'events';import a0_0x3738e4,{EventEmitter}from'events';import a0_0x450301,{ok}from'assert';import*as a0_0x526f61 from'util';import a0_0x5b2dc4 from'util';import a0_0x1f1c6e from'node:assert';import a0_0x30da10 from'node:net';import a0_0x584f16 from'node:http';import a0_0x69507a,{Transform,Readable as a0_0x310d49}from'node:stream';import a0_0x45ec4c from'node:buffer';import a0_0x2b5d73,{inspect}from'node:util';import a0_0x350b64 from'node:querystring';import a0_0x5582b9 from'node:events';import a0_0x4ec34b from'node:diagnostics_channel';import a0_0x2fd5a0 from'node:tls';import a0_0x51c25b from'node:zlib';import a0_0x167f0c from'node:perf_hooks';import a0_0x155602 from'node:util/types';import a0_0x2d304a from'node:worker_threads';import a0_0x1ee98b from'node:url';import a0_0x424ad1 from'node:async_hooks';import a0_0xa8b7c9 from'node:console';import a0_0x14dac6 from'node:dns';import a0_0x4a7a59,{StringDecoder}from'string_decoder';import*as a0_0x37217d from'child_process';import{setTimeout as a0_0x22f09d}from'timers';import*as a0_0x9abe8a from'stream';import{Readable}from'stream';import a0_0x577eac,{URL as a0_0x1cbe39}from'url';import*as a0_0x4a1553 from'buffer';import{Buffer as a0_0x32a507}from'buffer';import a0_0x4fa604,{EOL as a0_0x1faabb}from'node:os';import a0_0x50dcdd from'node:process';import a0_0x123440 from'node:https';import a0_0x31c8c2 from'tty';import{createHmac}from'node:crypto';import a0_0x2fcda3 from'node:fs';import*as a0_0x3b4200 from'zlib';function toCommandValue(_0x30d196){const _0x290ed3=a0_0x3108;if(_0x30d196===null||_0x30d196===undefined)return'';else{if(typeof _0x30d196===_0x290ed3(0x1185)||_0x30d196 instanceof String)return _0x30d196;}return JSON['stringify'](_0x30d196);}function toCommandProperties(_0x4a03a3){const _0x23b5f0=a0_0x3108;if(!Object[_0x23b5f0(0x82f)](_0x4a03a3)[_0x23b5f0(0x11e7)])return{};return{'title':_0x4a03a3['title'],'file':_0x4a03a3['file'],'line':_0x4a03a3['startLine'],'endLine':_0x4a03a3[_0x23b5f0(0x1777)],'col':_0x4a03a3[_0x23b5f0(0x824)],'endColumn':_0x4a03a3[_0x23b5f0(0x923)]};}function issueCommand(_0x34a01b,_0x2b8afc,_0x5c9cd3){const _0x153bb6=a0_0x3108,_0x304337=new Command(_0x34a01b,_0x2b8afc,_0x5c9cd3);process[_0x153bb6(0x295)][_0x153bb6(0x127c)](_0x304337[_0x153bb6(0x9e5)]()+a0_0x2d61f0['EOL']);}function issue(_0xda2438,_0x1c5ebf=''){issueCommand(_0xda2438,{},_0x1c5ebf);}const CMD_STRING='::';class Command{constructor(_0x83ff3d,_0x35bf91,_0x1893a4){const _0x55a70c=a0_0x3108;!_0x83ff3d&&(_0x83ff3d=_0x55a70c(0x138d)),this[_0x55a70c(0x955)]=_0x83ff3d,this[_0x55a70c(0xe4a)]=_0x35bf91,this[_0x55a70c(0x65e)]=_0x1893a4;}[a0_0x54288c(0x9e5)](){const _0x16a0d1=a0_0x54288c;let _0x48dcd0=CMD_STRING+this[_0x16a0d1(0x955)];if(this[_0x16a0d1(0xe4a)]&&Object[_0x16a0d1(0x82f)](this[_0x16a0d1(0xe4a)])[_0x16a0d1(0x11e7)]>0x0){_0x48dcd0+='\x20';let _0x17713c=!![];for(const _0x3dea38 in this[_0x16a0d1(0xe4a)]){if(this[_0x16a0d1(0xe4a)]['hasOwnProperty'](_0x3dea38)){const _0x43b006=this[_0x16a0d1(0xe4a)][_0x3dea38];_0x43b006&&(_0x17713c?_0x17713c=![]:_0x48dcd0+=',',_0x48dcd0+=_0x3dea38+'='+escapeProperty(_0x43b006));}}}return _0x48dcd0+=''+CMD_STRING+escapeData(this['message']),_0x48dcd0;}}function escapeData(_0x3d1135){const _0x5dcffd=a0_0x54288c;return toCommandValue(_0x3d1135)[_0x5dcffd(0x99c)](/%/g,_0x5dcffd(0xaa9))[_0x5dcffd(0x99c)](/\r/g,_0x5dcffd(0x153d))[_0x5dcffd(0x99c)](/\n/g,_0x5dcffd(0x956));}function escapeProperty(_0x59b104){const _0x59dbc0=a0_0x54288c;return toCommandValue(_0x59b104)['replace'](/%/g,_0x59dbc0(0xaa9))[_0x59dbc0(0x99c)](/\r/g,_0x59dbc0(0x153d))[_0x59dbc0(0x99c)](/\n/g,_0x59dbc0(0x956))[_0x59dbc0(0x99c)](/:/g,'%3A')[_0x59dbc0(0x99c)](/,/g,_0x59dbc0(0x1700));}function issueFileCommand(_0xe760b6,_0x62d81){const _0x6be51a=a0_0x54288c,_0x5789de=process.env[`GITHUB_${_0xe760b6}`];if(!_0x5789de)throw new Error('Unable\x20to\x20find\x20environment\x20variable\x20for\x20file\x20command\x20'+_0xeLine truncated
()=>new ArrayBuffer(0x0));}function isJSONResponse(_0x2eac8c){const _0x1a8007=a0_0x54288c;return _0x2eac8c[_0x1a8007(0xbfc)]==='application/json'||_0x2eac8c[_0x1a8007(0xbfc)]===_0x1a8007(0xb32);}function toErrorMessage(_0x5eeb71){const _0x243163=a0_0x54288c;if(typeof _0x5eeb71==='string')return _0x5eeb71;if(_0x5eeb71 instanceof ArrayBuffer)return _0x243163(0x2bc);if(_0x243163(0x65e)in _0x5eeb71){const _0x4bf575='documentation_url'in _0x5eeb71?_0x243163(0x1290)+_0x5eeb71[_0x243163(0x5c2)]:'';return Array[_0x243163(0x167b)](_0x5eeb71['errors'])?_0x5eeb71['message']+':\x20'+_0x5eeb71[_0x243163(0x794)][_0x243163(0x15bb)](_0xa1d412=>JSON['stringify'](_0xa1d412))[_0x243163(0x1371)](',\x20')+_0x4bf575:''+_0x5eeb71['message']+_0x4bf575;}return'Unknown\x20error:\x20'+JSON[_0x243163(0xc87)](_0x5eeb71);}function withDefaults$1(_0x21b79b,_0x1b895f){const _0x4d16b7=a0_0x54288c,_0x4c1dfe=_0x21b79b[_0x4d16b7(0xe4e)](_0x1b895f),_0x3ee554=function(_0x6dc008,_0x1e6a90){const _0x1b1b1e=_0x4d16b7,_0x14db73=_0x4c1dfe[_0x1b1b1e(0x10f2)](_0x6dc008,_0x1e6a90);if(!_0x14db73[_0x1b1b1e(0x168)]||!_0x14db73[_0x1b1b1e(0x168)]['hook'])return fetchWrapper(_0x4c1dfe['parse'](_0x14db73));const _0x3db0e9=(_0x38a176,_0x3daaf3)=>{const _0xc4417c=_0x1b1b1e;return fetchWrapper(_0x4c1dfe[_0xc4417c(0x864)](_0x4c1dfe[_0xc4417c(0x10f2)](_0x38a176,_0x3daaf3)));};return Object[_0x1b1b1e(0xc7f)](_0x3db0e9,{'endpoint':_0x4c1dfe,'defaults':withDefaults$1[_0x1b1b1e(0xff3)](null,_0x4c1dfe)}),_0x14db73[_0x1b1b1e(0x168)][_0x1b1b1e(0x1103)](_0x3db0e9,_0x14db73);};return Object[_0x4d16b7(0xc7f)](_0x3ee554,{'endpoint':_0x4c1dfe,'defaults':withDefaults$1[_0x4d16b7(0xff3)](null,_0x4c1dfe)});}var request=withDefaults$1(endpoint,defaults_default),VERSION$3=a0_0x54288c(0xf55);function _buildMessageForResponseErrors(_0x3568e1){const _0x534044=a0_0x54288c;return _0x534044(0x7e3)+_0x3568e1['errors']['map'](_0x260eb4=>_0x534044(0x1290)+_0x260eb4[_0x534044(0x65e)])[_0x534044(0x1371)]('\x0a');}var GraphqlResponseError=class extends Error{constructor(_0x582796,_0xcebd7d,_0x180539){const _0x197e8a=a0_0x54288c;super(_buildMessageForResponseErrors(_0x180539)),this[_0x197e8a(0x168)]=_0x582796,this['headers']=_0xcebd7d,this[_0x197e8a(0xe36)]=_0x180539,this[_0x197e8a(0x794)]=_0x180539[_0x197e8a(0x794)],this[_0x197e8a(0x10b6)]=_0x180539[_0x197e8a(0x10b6)],Error['captureStackTrace']&&Error[_0x197e8a(0x67e)](this,this[_0x197e8a(0xfae)]);}[a0_0x54288c(0x275)]=a0_0x54288c(0xace);[a0_0x54288c(0x794)];[a0_0x54288c(0x10b6)];},NON_VARIABLE_OPTIONS=[a0_0x54288c(0x125e),'baseUrl','url',a0_0x54288c(0xaf8),'request',a0_0x54288c(0x3be),'mediaType','operationName'],FORBIDDEN_VARIABLE_OPTIONS=[a0_0x54288c(0x3be),a0_0x54288c(0x125e),'url'],GHES_V3_SUFFIX_REGEX=/\/api\/v3\/?$/;function graphql(_0x3e29f3,_0x300969,_0x4d97be){const _0x19446b=a0_0x54288c;if(_0x4d97be){if(typeof _0x300969===_0x19446b(0x1185)&&'query'in _0x4d97be)return Promise['reject'](new Error(_0x19446b(0x1335)));for(const _0x578c50 in _0x4d97be){if(!FORBIDDEN_VARIABLE_OPTIONS[_0x19446b(0x150c)](_0x578c50))continue;return Promise[_0x19446b(0xee5)](new Error(_0x19446b(0x145b)+_0x578c50+_0x19446b(0x17cd)));}}const _0x176b4d=typeof _0x300969===_0x19446b(0x1185)?Object[_0x19446b(0xc7f)]({'query':_0x300969},_0x4d97be):_0x300969,_0x8bf665=Object[_0x19446b(0x82f)](_0x176b4d)[_0x19446b(0x17b1)]((_0x2dd891,_0x299184)=>{const _0x42a4f9=_0x19446b;if(NON_VARIABLE_OPTIONS[_0x42a4f9(0x150c)](_0x299184))return _0x2dd891[_0x299184]=_0x176b4d[_0x299184],_0x2dd891;return!_0x2dd891[_0x42a4f9(0xb4c)]&&(_0x2dd891[_0x42a4f9(0xb4c)]={}),_0x2dd891[_0x42a4f9(0xb4c)][_0x299184]=_0x176b4d[_0x299184],_0x2dd891;},{}),_0x21fd61=_0x176b4d['baseUrl']||_0x3e29f3['endpoint'][_0x19446b(0x1697)]['baseUrl'];return GHES_V3_SUFFIX_REGEX[_0x19446b(0x14c4)](_0x21fd61)&&(_0x8bf665['url']=_0x21fd61[_0x19446b(0x99c)](GHES_V3_SUFFIX_REGEX,_0x19446b(0x25d))),_0x3e29f3(_0x8bf665)[_0x19446b(0x83a)](_0x2a26ad=>{const _0x1fd5ac=_0x19446b;if(_0x2a26ad[_0x1fd5ac(0x10b6)]['errors']){const _0x9f725d={};for(const _0x39115c of Object[_0x1fd5ac(0x82f)](_0x2a26ad['headers'])){_0x9f725d[_0x39115c]=_0x2a26ad[_0x1fd5ac(0xaf8)][_0x39115c];}throw new GraphqlResponseError(_0x8bf665,_0x9f725d,_0x2a26ad[_0x1fd5ac(0x10b6)]);}return _0x2a26ad[_0x1fd5ac(0x10b6)]['data'];});}function withDefaults(_0x2268f7,_0x57d8e2){const _0x1d4c4a=a0_0x54288c,_0x35e82f=_0x2268f7[_0x1d4c4a(0xe4e)](_0x57d8e2),_0x360e6c=(_0x3dde8d,_0x1ae2c9)=>{return graphql(_0x35e82f,_0x3dde8d,_0x1ae2c9);};return Object[_0x1d4c4a(0xc7f)](_0x360e6c,{'defaults':withDefaults[_0x1d4c4a(0xff3)](null,_0x35e82f),'endpoint':_0x35e82f[_0x1d4c4a(0xb6a)]});}withDefaults(request,{'headers':{'user-agent':'octokit-graphql.js/'+VERSION$3+'\x20'+getUserAgent()},'method':a0_0x54288c(0x12b5),'url':a0_0x54288c(0x113f)});function withCustomRequest(_0x3cd936){const _0xc7f213=a0_0x54288c;return withDefaults(_0x3cd936,{'method':_0xc7f213(0x12b5),'url':'/graphql'});}var b64url='(?:[a-zA-Z0-9_-]+)',sep='\x5c.',jwtRE=new RegExp('^'+b64url+sep+b64url+sep+b64Line truncated
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "gradle-actions-caching",
"version": "0.9.0",
"version": "0.9.1",
"type": "module",
"main": "./index.js",
"types": "./index.d.ts",