From 80587ae7e99213091207e7656a75fb5a407b0e2a Mon Sep 17 00:00:00 2001 From: Artem Ufimtcev Date: Fri, 8 Nov 2024 18:30:06 +0100 Subject: [PATCH] Logging hotfix --- package.json | 2 +- src/commands/publish-documentation.ts | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9ad18bd..ab89d35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@supernovaio/cli", "description": "Supernova.io Command Line Interface", - "version": "1.1.3", + "version": "1.1.4", "author": "Supernova.io", "homepage": "https://supernova.io/", "keywords": [ diff --git a/src/commands/publish-documentation.ts b/src/commands/publish-documentation.ts index d40d888..495c495 100644 --- a/src/commands/publish-documentation.ts +++ b/src/commands/publish-documentation.ts @@ -86,15 +86,21 @@ export class PublishDocumentation extends Command { // Get workspace -> design system –> version const { instance, id, designSystem } = await getWritableVersion(flags) + + this.log(`Queueing documentation publish in ${designSystem.name}...`) + let publishJob = await instance.documentation.publishDrafts(id, environment, { pagePersistentIds: [], groupPersistentIds: [], }) - if (!(flags.awaitPublishJob ?? true)) { - this.log(`Publishing documentation in ${designSystem.name} has started, job await is disabled, exiting...`) + this.log(`Documentation queued for publishing`.green); + + if (!flags.awaitPublishJob) { + this.log(`Documentation publish await is disabled, exiting before the publish is finished.`.yellow) + return; } else { - this.log(`Publishing documentation in ${designSystem.name}...`) + this.log(`Waiting for the documentation publish to be finished...`); } // Timeout is roughly 30 minutes