[bot] Update dist directory

This commit is contained in:
bigdaz 2024-07-15 19:00:43 +00:00 committed by github-actions[bot]
parent ff865cb801
commit d9c87d481d
6 changed files with 213 additions and 165 deletions

View file

@ -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,16 +144735,79 @@ async function complete(config) {
}
}
exports.complete = complete;
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 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;
}
if (isRunningInActEnvironment()) {
core.info('Dependency graph upload not supported in the ACT environment.');
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
return;
}
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
const artifactClient = new artifact_1.DefaultArtifactClient();
for (const dependencyGraphFile of dependencyGraphFiles) {
@ -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;
}

File diff suppressed because one or more lines are too long

View file

@ -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,16 +144735,79 @@ async function complete(config) {
}
}
exports.complete = complete;
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 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;
}
if (isRunningInActEnvironment()) {
core.info('Dependency graph upload not supported in the ACT environment.');
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
return;
}
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
const artifactClient = new artifact_1.DefaultArtifactClient();
for (const dependencyGraphFile of dependencyGraphFiles) {
@ -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;
}

File diff suppressed because one or more lines are too long

View file

@ -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,16 +144735,79 @@ async function complete(config) {
}
}
exports.complete = complete;
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 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;
}
if (isRunningInActEnvironment()) {
core.info('Dependency graph upload not supported in the ACT environment.');
core.info(`Would upload: ${dependencyGraphFiles.join(', ')}`);
return;
}
const workspaceDirectory = (0, configuration_1.getWorkspaceDirectory)();
const artifactClient = new artifact_1.DefaultArtifactClient();
for (const dependencyGraphFile of dependencyGraphFiles) {
@ -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;
}

File diff suppressed because one or more lines are too long