@webqit/webflo 0.11.45 → 0.11.47

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.45",
15
+ "version": "0.11.47",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -97,7 +97,7 @@ export async function deploy(origin) {
97
97
  cx.logger.success(cx.logger.f`[${cx.logger.style.comment(_date)}][AUTODEPLOY] On-deploy script: ${origin.ondeploy}!`);
98
98
  cx.logger.log('');
99
99
  }
100
- if (origin.ondeploy) {
100
+ if ((origin.ondeploy || '').trim()) {
101
101
  const run = cmd => new Promise((resolve, reject) => {
102
102
  cmd = cmd.split(' ').map(a => a.trim()).filter(a => a);
103
103
  const child = spawn(cmd.shift(), cmd, {
@@ -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();
@@ -197,14 +198,9 @@ export async function webhook(httpEvent, router, next) {
197
198
  cx.logger.success(cx.logger.f`[${cx.logger.style.comment(_date)}][AUTODEPLOY] Exiting (${exitCode})...`);
198
199
  cx.logger.log('');
199
200
  }
200
- if (_isNumeric(deployParams.ondeploy_autoexit)) {
201
- setTimeout(() => {
202
- process.exit(exitCode);
203
- }, parseInt(deployParams.ondeploy_autoexit));
204
-
205
- } else {
201
+ setTimeout(() => {
206
202
  process.exit(exitCode);
207
- }
203
+ }, _isNumeric(deployParams.ondeploy_autoexit) ? parseInt(deployParams.ondeploy_autoexit) : 5);
208
204
  }
209
205
  resolve(
210
206
  new httpEvent.Response(undefined, { status: exitCode === 0 ? 200 : 500 })