@supernovaio/cli 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,6 @@ class PublishDocumentation extends core_1.Command {
27
27
  // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
28
28
  // MARK: - Command runtime
29
29
  async run() {
30
- var _a;
31
30
  try {
32
31
  const { flags } = await this.parse(PublishDocumentation);
33
32
  const environment = tryParseDocsEnvironment(flags.target);
@@ -37,21 +36,24 @@ class PublishDocumentation extends core_1.Command {
37
36
  }
38
37
  // Get workspace -> design system –> version
39
38
  const { instance, id, designSystem } = await (0, sdk_1.getWritableVersion)(flags);
40
- const publishJob = await instance.documentation.publishDrafts(id, environment, {
39
+ this.log(`Queueing documentation publish in ${designSystem.name}...`);
40
+ let publishJob = await instance.documentation.publishDrafts(id, environment, {
41
41
  pagePersistentIds: [],
42
42
  groupPersistentIds: [],
43
43
  });
44
- if (!((_a = flags.awaitPublishJob) !== null && _a !== void 0 ? _a : true)) {
45
- this.log(`Publishing documentation in ${designSystem.name} has started, job await is disabled, exiting...`);
44
+ this.log(`Documentation queued for publishing`.green);
45
+ if (!flags.awaitPublishJob) {
46
+ this.log(`Documentation publish await is disabled, exiting before the publish is finished.`.yellow);
47
+ return;
46
48
  }
47
49
  else {
48
- this.log(`Publishing documentation in ${designSystem.name}...`);
50
+ this.log(`Waiting for the documentation publish to be finished...`);
49
51
  }
50
52
  // Timeout is roughly 30 minutes
51
53
  for (let i = 0; i < 30 * 60; i++) {
52
54
  await (0, common_1.sleep)(1000);
53
- const updatedJob = await instance.documentation.getDocumentationBuild(designSystem.workspaceId, publishJob.id);
54
- if (isJobStatusDone(updatedJob.status))
55
+ publishJob = await instance.documentation.getDocumentationBuild(designSystem.workspaceId, publishJob.id);
56
+ if (isJobStatusDone(publishJob.status))
55
57
  break;
56
58
  }
57
59
  if (publishJob.status === "Success") {
@@ -411,5 +411,5 @@
411
411
  ]
412
412
  }
413
413
  },
414
- "version": "1.1.2"
414
+ "version": "1.1.4"
415
415
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@supernovaio/cli",
3
3
  "description": "Supernova.io Command Line Interface",
4
- "version": "1.1.2",
4
+ "version": "1.1.4",
5
5
  "author": "Supernova.io",
6
6
  "homepage": "https://supernova.io/",
7
7
  "keywords": [