mythix 2.9.0 → 2.9.1
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
package/src/cli/cli-utils.js
CHANGED
|
@@ -78,6 +78,17 @@ class CommandBase {
|
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
childProcess.on('error', (error) => {
|
|
81
|
+
if (options && options.ignoreExitCode) {
|
|
82
|
+
resolve({
|
|
83
|
+
stdout: Buffer.concat(output).toString('utf8'),
|
|
84
|
+
stderr: Buffer.concat(errors).toString('utf8'),
|
|
85
|
+
code: 0,
|
|
86
|
+
error,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
81
92
|
reject({
|
|
82
93
|
stdout: Buffer.concat(output).toString('utf8'),
|
|
83
94
|
stderr: Buffer.concat(errors).toString('utf8'),
|
|
@@ -68,6 +68,10 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
|
|
|
68
68
|
try {
|
|
69
69
|
return await super.spawnCommand(command, args, options);
|
|
70
70
|
} catch (error) {
|
|
71
|
+
console.error('Error with command: ', { dryRun, command, args, options }, error);
|
|
72
|
+
if (error.stderr)
|
|
73
|
+
console.error(error.stderr);
|
|
74
|
+
|
|
71
75
|
if (error instanceof Error)
|
|
72
76
|
throw error;
|
|
73
77
|
|
|
@@ -163,15 +163,22 @@ function browserRequestHandler(routeName, requestOptions) {
|
|
|
163
163
|
var data = requestOptions.data;
|
|
164
164
|
var extraConfig = {};
|
|
165
165
|
var headers = Object.assign(Utils.keysToLowerCase(this.defaultHeaders || {}), Utils.keysToLowerCase(requestOptions.headers || {}));
|
|
166
|
+
var isFormData = (data && (data instanceof FormData || data.constructor.name === 'FormData'));
|
|
166
167
|
|
|
167
168
|
if (data) {
|
|
168
169
|
if (!method.match(/^(GET|HEAD)$/i)) {
|
|
169
|
-
if (
|
|
170
|
-
|
|
170
|
+
if (isFormData) {
|
|
171
|
+
extraConfig = {
|
|
172
|
+
body: data,
|
|
173
|
+
};
|
|
174
|
+
} else {
|
|
175
|
+
if ((headers['content-type'] || '').match(/application\/json/i))
|
|
176
|
+
data = JSON.stringify(data);
|
|
171
177
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
extraConfig = {
|
|
179
|
+
body: data,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
175
182
|
} else {
|
|
176
183
|
var queryString = Utils.dataToQueryString(data);
|
|
177
184
|
if (queryString)
|
|
@@ -193,6 +200,8 @@ function browserRequestHandler(routeName, requestOptions) {
|
|
|
193
200
|
);
|
|
194
201
|
|
|
195
202
|
delete options.data;
|
|
203
|
+
if (isFormData && options.headers)
|
|
204
|
+
delete options.headers['content-type'];
|
|
196
205
|
|
|
197
206
|
globalScope.fetch(url, Utils.cleanObjectProperties(options)).then(
|
|
198
207
|
async function(response) {
|
package/src/models/model.js
CHANGED