mythix 2.8.15 → 2.8.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mythix",
3
- "version": "2.8.15",
3
+ "version": "2.8.17",
4
4
  "description": "Mythix is a NodeJS web-app framework",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -464,6 +464,11 @@ function spawnCommand(args, options, _config) {
464
464
  );
465
465
 
466
466
  childProcess.on('error', (error) => {
467
+ if (options && options.ignoreExitCode) {
468
+ resolve(0);
469
+ return;
470
+ }
471
+
467
472
  reject(error);
468
473
  });
469
474
 
@@ -74,7 +74,9 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
74
74
  mkdirSync(dryRun, path) {
75
75
  if (!dryRun) {
76
76
  console.log(` (running)$ mkdir -p ${path}`);
77
- FileSystem.mkdirSync(path, { recursive: true });
77
+ try {
78
+ FileSystem.mkdirSync(path, { recursive: true });
79
+ } catch (error) {}
78
80
  } else {
79
81
  console.log(` (would run)$ mkdir -p ${path}`);
80
82
  }
@@ -530,6 +532,7 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
530
532
  (Nife.isNotEmpty(username)) ? `'${username}@${hostname}'` : `'${hostname}'`,
531
533
  `'${commandString}'`,
532
534
  ]),
535
+ options,
533
536
  );
534
537
  }
535
538
 
@@ -582,7 +585,7 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
582
585
  await this.executeRemoteCommands(target, deployConfig, [
583
586
  { command: 'mkdir', args: [ '-p', this.joinUnixPath(decodeURIComponent(target.pathname)) ] },
584
587
  (relativeConfigPath) && { command: 'mkdir', args: [ '-p', this.joinUnixPath(decodeURIComponent(target.pathname), 'shared') ] },
585
- ]);
588
+ ], { ignoreExitCode: true });
586
589
  }
587
590
 
588
591
  async allRemotesDeploy(deployConfig) {
@@ -3,8 +3,9 @@
3
3
  /* global Buffer */
4
4
 
5
5
  const Nife = require('nife');
6
- const http = require('http');
7
- const { URL, URLSearchParams } = require('url');
6
+ const http = require('node:http');
7
+ const https = require('node:https');
8
+ const { URL, URLSearchParams } = require('node:url');
8
9
  const { dataToQueryString } = require('./http-utils');
9
10
 
10
11
  class HTTPInterface {
@@ -134,7 +135,8 @@ class HTTPInterface {
134
135
 
135
136
  delete options.data;
136
137
 
137
- let thisRequest = http.request(options, (response) => {
138
+ const httpScope = (url.protocol === 'https:') ? https : http;
139
+ let thisRequest = httpScope.request(options, (response) => {
138
140
  let responseData = Buffer.alloc(0);
139
141
 
140
142
  response.on('data', (chunk) => {