@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
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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(`
|
|
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
|
-
|
|
54
|
-
if (isJobStatusDone(
|
|
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") {
|
package/oclif.manifest.json
CHANGED