mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
[bot] Update dist directory
This commit is contained in:
parent
83709b49fe
commit
094f2191c5
10 changed files with 70 additions and 50 deletions
22
dist/dependency-submission/main/index.js
vendored
22
dist/dependency-submission/main/index.js
vendored
|
@ -182455,7 +182455,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
||||||
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
||||||
exports.addDistributionSnapshotChecksums = addDistributionSnapshotChecksums;
|
|
||||||
const httpm = __importStar(__nccwpck_require__(96184));
|
const httpm = __importStar(__nccwpck_require__(96184));
|
||||||
const cheerio = __importStar(__nccwpck_require__(36962));
|
const cheerio = __importStar(__nccwpck_require__(36962));
|
||||||
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
||||||
|
@ -182489,14 +182488,16 @@ async function fetchUnknownChecksums(allowSnapshots, knownChecksums) {
|
||||||
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
||||||
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
||||||
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
||||||
const checksumUrls = notKnown.map((entry) => entry.wrapperChecksumUrl);
|
const checksumUrls = notKnown.map((entry) => [entry.version, entry.wrapperChecksumUrl]);
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls);
|
await addDistributionSnapshotChecksumUrls(checksumUrls);
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(checksumUrls.map(async (url) => {
|
const wrapperChecksums = new WrapperChecksums();
|
||||||
return httpGetText(url);
|
await Promise.all(checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url);
|
||||||
|
wrapperChecksums.add(version, checksum);
|
||||||
}));
|
}));
|
||||||
return new Set(checksums);
|
return wrapperChecksums;
|
||||||
}
|
}
|
||||||
async function httpGetJsonArray(url) {
|
async function httpGetJsonArray(url) {
|
||||||
return JSON.parse(await httpGetText(url));
|
return JSON.parse(await httpGetText(url));
|
||||||
|
@ -182505,13 +182506,16 @@ async function httpGetText(url) {
|
||||||
const response = await httpc.get(url);
|
const response = await httpc.get(url);
|
||||||
return await response.readBody();
|
return await response.readBody();
|
||||||
}
|
}
|
||||||
async function addDistributionSnapshotChecksums(checksumUrls) {
|
async function addDistributionSnapshotChecksumUrls(checksumUrls) {
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
||||||
const $ = cheerio.load(indexPage);
|
const $ = cheerio.load(indexPage);
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href');
|
const url = $(element).attr('href');
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`);
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1];
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182690,7 +182694,7 @@ async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecks
|
||||||
result.fetchedChecksums = true;
|
result.fetchedChecksums = true;
|
||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar);
|
result.invalid.push(wrapperJar);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
22
dist/dependency-submission/post/index.js
vendored
22
dist/dependency-submission/post/index.js
vendored
|
@ -135783,7 +135783,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
||||||
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
||||||
exports.addDistributionSnapshotChecksums = addDistributionSnapshotChecksums;
|
|
||||||
const httpm = __importStar(__nccwpck_require__(96184));
|
const httpm = __importStar(__nccwpck_require__(96184));
|
||||||
const cheerio = __importStar(__nccwpck_require__(36962));
|
const cheerio = __importStar(__nccwpck_require__(36962));
|
||||||
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
||||||
|
@ -135817,14 +135816,16 @@ async function fetchUnknownChecksums(allowSnapshots, knownChecksums) {
|
||||||
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
||||||
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
||||||
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
||||||
const checksumUrls = notKnown.map((entry) => entry.wrapperChecksumUrl);
|
const checksumUrls = notKnown.map((entry) => [entry.version, entry.wrapperChecksumUrl]);
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls);
|
await addDistributionSnapshotChecksumUrls(checksumUrls);
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(checksumUrls.map(async (url) => {
|
const wrapperChecksums = new WrapperChecksums();
|
||||||
return httpGetText(url);
|
await Promise.all(checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url);
|
||||||
|
wrapperChecksums.add(version, checksum);
|
||||||
}));
|
}));
|
||||||
return new Set(checksums);
|
return wrapperChecksums;
|
||||||
}
|
}
|
||||||
async function httpGetJsonArray(url) {
|
async function httpGetJsonArray(url) {
|
||||||
return JSON.parse(await httpGetText(url));
|
return JSON.parse(await httpGetText(url));
|
||||||
|
@ -135833,13 +135834,16 @@ async function httpGetText(url) {
|
||||||
const response = await httpc.get(url);
|
const response = await httpc.get(url);
|
||||||
return await response.readBody();
|
return await response.readBody();
|
||||||
}
|
}
|
||||||
async function addDistributionSnapshotChecksums(checksumUrls) {
|
async function addDistributionSnapshotChecksumUrls(checksumUrls) {
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
||||||
const $ = cheerio.load(indexPage);
|
const $ = cheerio.load(indexPage);
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href');
|
const url = $(element).attr('href');
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`);
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1];
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136018,7 +136022,7 @@ async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecks
|
||||||
result.fetchedChecksums = true;
|
result.fetchedChecksums = true;
|
||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar);
|
result.invalid.push(wrapperJar);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
22
dist/setup-gradle/main/index.js
vendored
22
dist/setup-gradle/main/index.js
vendored
|
@ -182440,7 +182440,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
||||||
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
||||||
exports.addDistributionSnapshotChecksums = addDistributionSnapshotChecksums;
|
|
||||||
const httpm = __importStar(__nccwpck_require__(96184));
|
const httpm = __importStar(__nccwpck_require__(96184));
|
||||||
const cheerio = __importStar(__nccwpck_require__(36962));
|
const cheerio = __importStar(__nccwpck_require__(36962));
|
||||||
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
||||||
|
@ -182474,14 +182473,16 @@ async function fetchUnknownChecksums(allowSnapshots, knownChecksums) {
|
||||||
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
||||||
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
||||||
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
||||||
const checksumUrls = notKnown.map((entry) => entry.wrapperChecksumUrl);
|
const checksumUrls = notKnown.map((entry) => [entry.version, entry.wrapperChecksumUrl]);
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls);
|
await addDistributionSnapshotChecksumUrls(checksumUrls);
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(checksumUrls.map(async (url) => {
|
const wrapperChecksums = new WrapperChecksums();
|
||||||
return httpGetText(url);
|
await Promise.all(checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url);
|
||||||
|
wrapperChecksums.add(version, checksum);
|
||||||
}));
|
}));
|
||||||
return new Set(checksums);
|
return wrapperChecksums;
|
||||||
}
|
}
|
||||||
async function httpGetJsonArray(url) {
|
async function httpGetJsonArray(url) {
|
||||||
return JSON.parse(await httpGetText(url));
|
return JSON.parse(await httpGetText(url));
|
||||||
|
@ -182490,13 +182491,16 @@ async function httpGetText(url) {
|
||||||
const response = await httpc.get(url);
|
const response = await httpc.get(url);
|
||||||
return await response.readBody();
|
return await response.readBody();
|
||||||
}
|
}
|
||||||
async function addDistributionSnapshotChecksums(checksumUrls) {
|
async function addDistributionSnapshotChecksumUrls(checksumUrls) {
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
||||||
const $ = cheerio.load(indexPage);
|
const $ = cheerio.load(indexPage);
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href');
|
const url = $(element).attr('href');
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`);
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1];
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182675,7 +182679,7 @@ async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecks
|
||||||
result.fetchedChecksums = true;
|
result.fetchedChecksums = true;
|
||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar);
|
result.invalid.push(wrapperJar);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
22
dist/setup-gradle/post/index.js
vendored
22
dist/setup-gradle/post/index.js
vendored
|
@ -182435,7 +182435,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
||||||
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
||||||
exports.addDistributionSnapshotChecksums = addDistributionSnapshotChecksums;
|
|
||||||
const httpm = __importStar(__nccwpck_require__(96184));
|
const httpm = __importStar(__nccwpck_require__(96184));
|
||||||
const cheerio = __importStar(__nccwpck_require__(36962));
|
const cheerio = __importStar(__nccwpck_require__(36962));
|
||||||
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
||||||
|
@ -182469,14 +182468,16 @@ async function fetchUnknownChecksums(allowSnapshots, knownChecksums) {
|
||||||
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
||||||
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
||||||
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
||||||
const checksumUrls = notKnown.map((entry) => entry.wrapperChecksumUrl);
|
const checksumUrls = notKnown.map((entry) => [entry.version, entry.wrapperChecksumUrl]);
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls);
|
await addDistributionSnapshotChecksumUrls(checksumUrls);
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(checksumUrls.map(async (url) => {
|
const wrapperChecksums = new WrapperChecksums();
|
||||||
return httpGetText(url);
|
await Promise.all(checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url);
|
||||||
|
wrapperChecksums.add(version, checksum);
|
||||||
}));
|
}));
|
||||||
return new Set(checksums);
|
return wrapperChecksums;
|
||||||
}
|
}
|
||||||
async function httpGetJsonArray(url) {
|
async function httpGetJsonArray(url) {
|
||||||
return JSON.parse(await httpGetText(url));
|
return JSON.parse(await httpGetText(url));
|
||||||
|
@ -182485,13 +182486,16 @@ async function httpGetText(url) {
|
||||||
const response = await httpc.get(url);
|
const response = await httpc.get(url);
|
||||||
return await response.readBody();
|
return await response.readBody();
|
||||||
}
|
}
|
||||||
async function addDistributionSnapshotChecksums(checksumUrls) {
|
async function addDistributionSnapshotChecksumUrls(checksumUrls) {
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
||||||
const $ = cheerio.load(indexPage);
|
const $ = cheerio.load(indexPage);
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href');
|
const url = $(element).attr('href');
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`);
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1];
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182670,7 +182674,7 @@ async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecks
|
||||||
result.fetchedChecksums = true;
|
result.fetchedChecksums = true;
|
||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar);
|
result.invalid.push(wrapperJar);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
22
dist/wrapper-validation/main/index.js
vendored
22
dist/wrapper-validation/main/index.js
vendored
|
@ -126806,7 +126806,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
exports.KNOWN_CHECKSUMS = exports.WrapperChecksums = void 0;
|
||||||
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
exports.fetchUnknownChecksums = fetchUnknownChecksums;
|
||||||
exports.addDistributionSnapshotChecksums = addDistributionSnapshotChecksums;
|
|
||||||
const httpm = __importStar(__nccwpck_require__(96184));
|
const httpm = __importStar(__nccwpck_require__(96184));
|
||||||
const cheerio = __importStar(__nccwpck_require__(36962));
|
const cheerio = __importStar(__nccwpck_require__(36962));
|
||||||
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
|
||||||
|
@ -126840,14 +126839,16 @@ async function fetchUnknownChecksums(allowSnapshots, knownChecksums) {
|
||||||
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
const withChecksum = all.filter(entry => typeof entry === 'object' && entry != null && entry.hasOwnProperty('wrapperChecksumUrl'));
|
||||||
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
const allowed = withChecksum.filter((entry) => allowSnapshots || !entry.snapshot);
|
||||||
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
const notKnown = allowed.filter((entry) => !knownChecksums.versions.has(entry.version));
|
||||||
const checksumUrls = notKnown.map((entry) => entry.wrapperChecksumUrl);
|
const checksumUrls = notKnown.map((entry) => [entry.version, entry.wrapperChecksumUrl]);
|
||||||
if (allowSnapshots) {
|
if (allowSnapshots) {
|
||||||
await addDistributionSnapshotChecksums(checksumUrls);
|
await addDistributionSnapshotChecksumUrls(checksumUrls);
|
||||||
}
|
}
|
||||||
const checksums = await Promise.all(checksumUrls.map(async (url) => {
|
const wrapperChecksums = new WrapperChecksums();
|
||||||
return httpGetText(url);
|
await Promise.all(checksumUrls.map(async ([version, url]) => {
|
||||||
|
const checksum = await httpGetText(url);
|
||||||
|
wrapperChecksums.add(version, checksum);
|
||||||
}));
|
}));
|
||||||
return new Set(checksums);
|
return wrapperChecksums;
|
||||||
}
|
}
|
||||||
async function httpGetJsonArray(url) {
|
async function httpGetJsonArray(url) {
|
||||||
return JSON.parse(await httpGetText(url));
|
return JSON.parse(await httpGetText(url));
|
||||||
|
@ -126856,13 +126857,16 @@ async function httpGetText(url) {
|
||||||
const response = await httpc.get(url);
|
const response = await httpc.get(url);
|
||||||
return await response.readBody();
|
return await response.readBody();
|
||||||
}
|
}
|
||||||
async function addDistributionSnapshotChecksums(checksumUrls) {
|
async function addDistributionSnapshotChecksumUrls(checksumUrls) {
|
||||||
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
const indexPage = await httpGetText('https://services.gradle.org/distributions-snapshots/');
|
||||||
const $ = cheerio.load(indexPage);
|
const $ = cheerio.load(indexPage);
|
||||||
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
const wrapperChecksumLinks = $('a[href$="-wrapper.jar.sha256"]');
|
||||||
wrapperChecksumLinks.each((index, element) => {
|
wrapperChecksumLinks.each((index, element) => {
|
||||||
const url = $(element).attr('href');
|
const url = $(element).attr('href');
|
||||||
checksumUrls.push(`https://services.gradle.org${url}`);
|
const version = url.match(/\/distributions-snapshots\/gradle-(.*?)-wrapper\.jar\.sha256/)?.[1];
|
||||||
|
if (version) {
|
||||||
|
checksumUrls.push([version, `https://services.gradle.org${url}`]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127041,7 +127045,7 @@ async function findInvalidWrapperJars(gitRepoRoot, allowSnapshots, allowedChecks
|
||||||
result.fetchedChecksums = true;
|
result.fetchedChecksums = true;
|
||||||
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
const fetchedValidChecksums = await checksums.fetchUnknownChecksums(allowSnapshots, knownValidChecksums);
|
||||||
for (const wrapperJar of notYetValidatedWrappers) {
|
for (const wrapperJar of notYetValidatedWrappers) {
|
||||||
if (!fetchedValidChecksums.has(wrapperJar.checksum)) {
|
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||||
result.invalid.push(wrapperJar);
|
result.invalid.push(wrapperJar);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
2
dist/wrapper-validation/main/index.js.map
vendored
2
dist/wrapper-validation/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue