@quantum-hub/qhubctl 1.5.0 → 1.6.0

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.
@@ -7,6 +7,7 @@ import { BuildJobDtoStatusEnum, BuildJobDtoStepEnum, ValidationResultStateEnum }
7
7
  import { streamToBlob } from '../lib/stream-to-blob.js';
8
8
  import { getDescriptionText } from '../lib/up/get-description.js';
9
9
  import { zipProjectFolder } from '../lib/up/zip.js';
10
+ import { handleError } from '../lib/error.js';
10
11
  import { error, spinner, stdout, warn } from '../lib/output.js';
11
12
  import { requireAuth } from '../model/command.js';
12
13
  import QuantumHubService from '../service/quantum-hub-service.js';
@@ -135,9 +136,15 @@ export const upCommand = new Command('up')
135
136
  descriptionText: await getDescriptionText(process.cwd()),
136
137
  sourceCode: await zipProjectFolder('./'),
137
138
  };
138
- const service = serviceExistsInPlatform
139
- ? await updateService(qhubService, serviceConfig, serviceFiles, silentMode)
140
- : await createService(qhubService, serviceConfig, serviceFiles, silentMode, noSaveId, opts.name);
139
+ let service;
140
+ try {
141
+ service = serviceExistsInPlatform
142
+ ? await updateService(qhubService, serviceConfig, serviceFiles, silentMode)
143
+ : await createService(qhubService, serviceConfig, serviceFiles, silentMode, noSaveId, opts.name);
144
+ }
145
+ catch (err) {
146
+ error(await handleError(err));
147
+ }
141
148
  const serviceDefinition = service?.serviceDefinitions?.[0];
142
149
  if (!serviceDefinition) {
143
150
  error('Service definition not found');
@@ -153,9 +160,9 @@ export const upCommand = new Command('up')
153
160
  if (validationResult?.state === ValidationResultStateEnum.Error && validationResult.summary) {
154
161
  reason = `${reason}: ${validationResult.summary}`;
155
162
  }
156
- stdout(reason);
163
+ error(reason);
157
164
  }
158
165
  else {
159
- stdout('Still pending, please check the platform UI to determine the status');
166
+ error('Still pending, please check the platform UI to determine the status');
160
167
  }
161
168
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantum-hub/qhubctl",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Kipu Quantum Hub CLI",
5
5
  "author": "Kipu Quantum GmbH",
6
6
  "contributors": [