Commit d9c87d48 authored by bigdaz's avatar bigdaz Committed by github-actions[bot]
Browse files

[bot] Update dist directory

parent ff865cb8
Loading
Loading
Loading
Loading
+70 −54
Changes for dist/dependency-submission/main/index.js: 70 added lines, 54 removed lines.
Original line number Diff line number Diff line
@@ -144724,10 +144724,10 @@ async function complete(config) {
                return;
            case configuration_1.DependencyGraphOption.GenerateAndSubmit:
            case configuration_1.DependencyGraphOption.Clear:
                await submitDependencyGraphs(await findDependencyGraphFiles());
                await findAndSubmitDependencyGraphs(config);
                return;
            case configuration_1.DependencyGraphOption.GenerateAndUpload:
                await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
                await findAndUploadDependencyGraphs(config);
        }
    }
    catch (e) {
@@ -144735,14 +144735,77 @@ async function complete(config) {
    }
}
exports.complete = complete;
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function findAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph upload not supported in the ACT environment.');
        core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    const dependencyGraphFiles = await findDependencyGraphFiles();
    try {
        await submitDependencyGraphs(dependencyGraphFiles);
    }
    catch (e) {
        try {
            await uploadDependencyGraphs(dependencyGraphFiles, config);
        }
        catch (uploadError) {
            core.info(String(uploadError));
        }
        throw e;
    }
}
async function findAndUploadDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
        return;
    }
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
@@ -144756,28 +144819,11 @@ async function uploadDependencyGraphs(dependencyGraphFiles, config) {
        });
    }
}
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph download and submit not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function submitDependencyGraphs(dependencyGraphFiles) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to submit.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph submit not supported in the ACT environment.');
        core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
        return;
    }
    for (const dependencyGraphFile of dependencyGraphFiles) {
        try {
            await submitDependencyGraphFile(dependencyGraphFile);
@@ -144811,36 +144857,6 @@ async function submitDependencyGraphFile(jsonFile) {
    const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
    core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
function getReportDirectory() {
    return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
}
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+70 −54
Changes for dist/setup-gradle/main/index.js: 70 added lines, 54 removed lines.
Original line number Diff line number Diff line
@@ -144724,10 +144724,10 @@ async function complete(config) {
                return;
            case configuration_1.DependencyGraphOption.GenerateAndSubmit:
            case configuration_1.DependencyGraphOption.Clear:
                await submitDependencyGraphs(await findDependencyGraphFiles());
                await findAndSubmitDependencyGraphs(config);
                return;
            case configuration_1.DependencyGraphOption.GenerateAndUpload:
                await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
                await findAndUploadDependencyGraphs(config);
        }
    }
    catch (e) {
@@ -144735,14 +144735,77 @@ async function complete(config) {
    }
}
exports.complete = complete;
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function findAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph upload not supported in the ACT environment.');
        core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    const dependencyGraphFiles = await findDependencyGraphFiles();
    try {
        await submitDependencyGraphs(dependencyGraphFiles);
    }
    catch (e) {
        try {
            await uploadDependencyGraphs(dependencyGraphFiles, config);
        }
        catch (uploadError) {
            core.info(String(uploadError));
        }
        throw e;
    }
}
async function findAndUploadDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
        return;
    }
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
@@ -144756,28 +144819,11 @@ async function uploadDependencyGraphs(dependencyGraphFiles, config) {
        });
    }
}
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph download and submit not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function submitDependencyGraphs(dependencyGraphFiles) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to submit.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph submit not supported in the ACT environment.');
        core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
        return;
    }
    for (const dependencyGraphFile of dependencyGraphFiles) {
        try {
            await submitDependencyGraphFile(dependencyGraphFile);
@@ -144811,36 +144857,6 @@ async function submitDependencyGraphFile(jsonFile) {
    const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
    core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
function getReportDirectory() {
    return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
}
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+70 −54
Changes for dist/setup-gradle/post/index.js: 70 added lines, 54 removed lines.
Original line number Diff line number Diff line
@@ -144724,10 +144724,10 @@ async function complete(config) {
                return;
            case configuration_1.DependencyGraphOption.GenerateAndSubmit:
            case configuration_1.DependencyGraphOption.Clear:
                await submitDependencyGraphs(await findDependencyGraphFiles());
                await findAndSubmitDependencyGraphs(config);
                return;
            case configuration_1.DependencyGraphOption.GenerateAndUpload:
                await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
                await findAndUploadDependencyGraphs(config);
        }
    }
    catch (e) {
@@ -144735,14 +144735,77 @@ async function complete(config) {
    }
}
exports.complete = complete;
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function findAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph upload not supported in the ACT environment.');
        core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    const dependencyGraphFiles = await findDependencyGraphFiles();
    try {
        await submitDependencyGraphs(dependencyGraphFiles);
    }
    catch (e) {
        try {
            await uploadDependencyGraphs(dependencyGraphFiles, config);
        }
        catch (uploadError) {
            core.info(String(uploadError));
        }
        throw e;
    }
}
async function findAndUploadDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph not supported in the ACT environment.');
        return;
    }
    await uploadDependencyGraphs(await findDependencyGraphFiles(), config);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
async function uploadDependencyGraphs(dependencyGraphFiles, config) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to upload.');
        return;
    }
    const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
@@ -144756,28 +144819,11 @@ async function uploadDependencyGraphs(dependencyGraphFiles, config) {
        });
    }
}
async function downloadAndSubmitDependencyGraphs(config) {
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph download and submit not supported in the ACT environment.');
        return;
    }
    try {
        await submitDependencyGraphs(await downloadDependencyGraphs());
    }
    catch (e) {
        warnOrFail(config, configuration_1.DependencyGraphOption.DownloadAndSubmit, e);
    }
}
async function submitDependencyGraphs(dependencyGraphFiles) {
    if (dependencyGraphFiles.length === 0) {
        core.info('No dependency graph files found to submit.');
        return;
    }
    if (isRunningInActEnvironment()) {
        core.info('Dependency graph submit not supported in the ACT environment.');
        core.info(`Would submit: ${dependencyGraphFiles.join(', ')}`);
        return;
    }
    for (const dependencyGraphFile of dependencyGraphFiles) {
        try {
            await submitDependencyGraphFile(dependencyGraphFile);
@@ -144811,36 +144857,6 @@ async function submitDependencyGraphFile(jsonFile) {
    const relativeJsonFile = getRelativePathFromWorkspace(jsonFile);
    core.notice(`Submitted ${relativeJsonFile}: ${response.data.message}`);
}
async function downloadDependencyGraphs() {
    const findBy = github.context.payload.workflow_run
        ? {
            token: (0, configuration_1.getGithubToken)(),
            workflowRunId: github.context.payload.workflow_run.id,
            repositoryName: github.context.repo.repo,
            repositoryOwner: github.context.repo.owner
        }
        : undefined;
    const artifactClient = new artifact_1.DefaultArtifactClient();
    const dependencyGraphArtifacts = (await artifactClient.listArtifacts({
        latest: true,
        findBy
    })).artifacts.filter(artifact => artifact.name.startsWith(DEPENDENCY_GRAPH_PREFIX));
    for (const artifact of dependencyGraphArtifacts) {
        const downloadedArtifact = await artifactClient.downloadArtifact(artifact.id, {
            findBy
        });
        core.info(`Downloading dependency-graph artifact ${artifact.name} to ${downloadedArtifact.downloadPath}`);
    }
    return findDependencyGraphFiles();
}
async function findDependencyGraphFiles() {
    const globber = await glob.create(`${getReportDirectory()}/**/*.json`);
    const allFiles = await globber.glob();
    const unprocessedFiles = allFiles.filter(file => !isProcessed(file));
    unprocessedFiles.forEach(markProcessed);
    core.info(`Found dependency graph files: ${unprocessedFiles.join(', ')}`);
    return unprocessedFiles;
}
function getReportDirectory() {
    return process.env.DEPENDENCY_GRAPH_REPORT_DIR;
}
Loading