Skip to content

Commit

Permalink
feat: Basic output from CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
andymac4182 committed May 9, 2023
1 parent 018e942 commit 46b47bd
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/cli/src/index.ts
Expand Up @@ -37,7 +37,22 @@ async function main() {
);

const publishFilter = "";
publisher.doPublish(publishFilter);
const results = await publisher.publish(publishFilter);
results.forEach((file) => {
if (file.successfulUploadResult) {
console.log(
chalk.green(
`SUCCESS: ${file.node.file.absoluteFilePath} Content: ${file.successfulUploadResult.contentResult}, Images: ${file.successfulUploadResult.imageResult}, Labels: ${file.successfulUploadResult.labelResult}, Page URL: ${file.node.file.pageUrl}`
)
);
return;
}
console.error(
chalk.red(
`FAILED: ${file.node.file.absoluteFilePath} publish failed. Error is: ${file.reason}`
)
);
});
}

// Call the main function
Expand Down

0 comments on commit 46b47bd

Please sign in to comment.