@webqit/webflo 0.11.46 → 0.11.48

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.
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.11.46",
15
+ "version": "0.11.48",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -119,6 +119,7 @@ export async function deploy(origin) {
119
119
  async (prev, cmd) => (await prev) === 0 ? run(cmd) : prev
120
120
  , 0);
121
121
  }
122
+ return 0;
122
123
  }).catch(err => {
123
124
  if (cx.logger) {
124
125
  waiting.stop();
@@ -186,10 +187,6 @@ export async function webhook(httpEvent, router, next) {
186
187
  var exitCode = await router.route('deploy', httpEvent, payload, _payload => {
187
188
  return deploy.call(cx, deployParams);
188
189
  });
189
- if (cx.logger) {
190
- cx.logger.log('');
191
- cx.logger.log('---------------------------');
192
- }
193
190
  if (deployParams.ondeploy_autoexit) {
194
191
  if (cx.logger) {
195
192
  cx.logger.log('');
@@ -197,18 +194,17 @@ export async function webhook(httpEvent, router, next) {
197
194
  cx.logger.success(cx.logger.f`[${cx.logger.style.comment(_date)}][AUTODEPLOY] Exiting (${exitCode})...`);
198
195
  cx.logger.log('');
199
196
  }
200
- if (_isNumeric(deployParams.ondeploy_autoexit)) {
201
- setTimeout(() => {
202
- process.exit(exitCode);
203
- }, parseInt(deployParams.ondeploy_autoexit));
204
-
205
- } else {
197
+ setTimeout(() => {
206
198
  process.exit(exitCode);
207
- }
199
+ }, _isNumeric(deployParams.ondeploy_autoexit) ? parseInt(deployParams.ondeploy_autoexit) : 5);
208
200
  }
209
201
  resolve(
210
- new httpEvent.Response(undefined, { status: exitCode === 0 ? 200 : 500 })
202
+ new httpEvent.Response(`Deployment ${ exitCode === 0 ? 'success' : 'error: ' + exitCode }!`, { status: exitCode === 0 ? 200 : 500 })
211
203
  );
204
+ if (cx.logger) {
205
+ cx.logger.log('');
206
+ cx.logger.log('---------------------------');
207
+ }
212
208
  });
213
209
  webhookEventHandler.receive({
214
210
  id: httpEvent.request.headers.get('x-github-delivery'),