bdy 1.19.3-dev-pipeline → 1.19.4-dev-pipeline

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.19.3-dev-pipeline",
4
+ "version": "1.19.4-dev-pipeline",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -1069,6 +1069,14 @@ class OutputPipeline {
1069
1069
  draw();
1070
1070
  }, true);
1071
1071
  }
1072
+ static _exitByStatus(status) {
1073
+ if (status && [pipeline_1.PIPELINE_RUN_STATUS.FAILED, pipeline_1.PIPELINE_RUN_STATUS.TERMINATED].includes(status)) {
1074
+ process.exit(1);
1075
+ }
1076
+ else {
1077
+ process.exit(0);
1078
+ }
1079
+ }
1072
1080
  static async _runLogsNonInteractive(client, workspace, project, pipelineId, runId, runActionId, noWait) {
1073
1081
  let action = null;
1074
1082
  let actionLogsStart = 0;
@@ -1157,7 +1165,7 @@ class OutputPipeline {
1157
1165
  output_1.default.normal(finished);
1158
1166
  }
1159
1167
  }
1160
- output_1.default.exitNormal();
1168
+ this._exitByStatus(action?.status);
1161
1169
  }
1162
1170
  };
1163
1171
  this._actionLogsLoop(client, workspace, project, pipelineId, runId, runActionId, draw)
@@ -1210,7 +1218,7 @@ class OutputPipeline {
1210
1218
  totalFetchesCount += 1;
1211
1219
  draw(run);
1212
1220
  if (noWait) {
1213
- output_1.default.exitNormal();
1221
+ this._exitByStatus(run.status);
1214
1222
  }
1215
1223
  });
1216
1224
  if (totalFetchesCount > 1) {
@@ -1224,7 +1232,7 @@ class OutputPipeline {
1224
1232
  if (finished)
1225
1233
  output_1.default.normal(finished);
1226
1234
  }
1227
- output_1.default.exitNormal();
1235
+ this._exitByStatus(run.status);
1228
1236
  }
1229
1237
  static async _actionLogsLoop(client, workspace, project, pipelineId, runId, actionExecutionId, onChange) {
1230
1238
  let logs = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.19.3-dev-pipeline",
4
+ "version": "1.19.4-dev-pipeline",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {