mythix 2.8.5 → 2.8.7
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
|
@@ -499,6 +499,9 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
|
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
let commandString = commands.map((command) => {
|
|
502
|
+
if (!command)
|
|
503
|
+
return;
|
|
504
|
+
|
|
502
505
|
if (Nife.isEmpty(command.args))
|
|
503
506
|
return `${this.sudo(deployConfig)}${command.command}`;
|
|
504
507
|
|
|
@@ -510,7 +513,7 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
|
|
|
510
513
|
};
|
|
511
514
|
|
|
512
515
|
return `${this.sudo(deployConfig, command.sudo)}${command.command} ${command.args.map(escapeArgument).join(' ')}`;
|
|
513
|
-
}).join(' && ');
|
|
516
|
+
}).filter(Boolean).join(' && ');
|
|
514
517
|
|
|
515
518
|
if (options && Nife.isNotEmpty(options.sshArgs))
|
|
516
519
|
args = args.concat(options.sshArgs);
|
|
@@ -576,11 +579,10 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
|
|
|
576
579
|
relativeConfigPath,
|
|
577
580
|
} = deployConfig;
|
|
578
581
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
582
|
+
await this.executeRemoteCommands(target, deployConfig, [
|
|
583
|
+
{ command: 'mkdir', args: [ '-p', this.joinUnixPath(decodeURIComponent(target.pathname)) ] },
|
|
584
|
+
(relativeConfigPath) && { command: 'mkdir', args: [ '-p', this.joinUnixPath(decodeURIComponent(target.pathname), 'shared') ] },
|
|
585
|
+
]);
|
|
584
586
|
}
|
|
585
587
|
|
|
586
588
|
async allRemotesDeploy(deployConfig) {
|
|
@@ -113,37 +113,12 @@ function nodeRequestHandler(routeName, requestOptions) {
|
|
|
113
113
|
|
|
114
114
|
if (contentType && contentType.match(/application\/json/i)) {
|
|
115
115
|
var data = JSON.parse(responseData.toString('utf8'));
|
|
116
|
-
|
|
117
|
-
Object.defineProperties(data, {
|
|
118
|
-
'__response': {
|
|
119
|
-
writable: true,
|
|
120
|
-
enumerable: false,
|
|
121
|
-
configurable: true,
|
|
122
|
-
value: response,
|
|
123
|
-
},
|
|
124
|
-
'__statusCode': {
|
|
125
|
-
writable: true,
|
|
126
|
-
enumerable: false,
|
|
127
|
-
configurable: true,
|
|
128
|
-
value: response.status,
|
|
129
|
-
},
|
|
130
|
-
'__statusText': {
|
|
131
|
-
writable: true,
|
|
132
|
-
enumerable: false,
|
|
133
|
-
configurable: true,
|
|
134
|
-
value: response.statusText,
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
|
|
138
116
|
response.body = data;
|
|
139
|
-
|
|
140
|
-
resolve(data);
|
|
141
117
|
} else if (contentType && contentType.match(/text\/(plain|html)/)) {
|
|
142
118
|
response.body = responseData.toString('utf8');
|
|
143
|
-
resolve(response.body);
|
|
144
|
-
} else {
|
|
145
|
-
resolve(response);
|
|
146
119
|
}
|
|
120
|
+
|
|
121
|
+
resolve(response);
|
|
147
122
|
} catch (error) {
|
|
148
123
|
return reject(error);
|
|
149
124
|
}
|
|
@@ -226,34 +201,12 @@ function browserRequestHandler(routeName, requestOptions) {
|
|
|
226
201
|
var contentType = response.headers.get('Content-Type');
|
|
227
202
|
if (contentType && contentType.match(/application\/json/i)) {
|
|
228
203
|
var data = response.json();
|
|
229
|
-
|
|
230
|
-
Object.defineProperties(data, {
|
|
231
|
-
'__response': {
|
|
232
|
-
writable: true,
|
|
233
|
-
enumerable: false,
|
|
234
|
-
configurable: true,
|
|
235
|
-
value: response,
|
|
236
|
-
},
|
|
237
|
-
'__statusCode': {
|
|
238
|
-
writable: true,
|
|
239
|
-
enumerable: false,
|
|
240
|
-
configurable: true,
|
|
241
|
-
value: response.status,
|
|
242
|
-
},
|
|
243
|
-
'__statusText': {
|
|
244
|
-
writable: true,
|
|
245
|
-
enumerable: false,
|
|
246
|
-
configurable: true,
|
|
247
|
-
value: response.statusText,
|
|
248
|
-
},
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
resolve(data);
|
|
204
|
+
response.body = data;
|
|
252
205
|
} else if (contentType && contentType.match(/text\/(plain|html)/i)) {
|
|
253
|
-
|
|
254
|
-
} else {
|
|
255
|
-
resolve(response);
|
|
206
|
+
response.body = response.text();
|
|
256
207
|
}
|
|
208
|
+
|
|
209
|
+
resolve(response);
|
|
257
210
|
},
|
|
258
211
|
function(error) {
|
|
259
212
|
reject(error);
|
package/src/utils/file-utils.js
CHANGED
|
@@ -27,7 +27,7 @@ function walkDir(rootPath, _options, _callback, _allFiles, _depth) {
|
|
|
27
27
|
|
|
28
28
|
if (typeof filterFunc === 'function' && !filterFunc(fullFileName, fileName, stats, rootPath, depth))
|
|
29
29
|
continue;
|
|
30
|
-
else if (filterFunc instanceof RegExp && !
|
|
30
|
+
else if (filterFunc instanceof RegExp && !fullFileName.match(filterFunc))
|
|
31
31
|
continue;
|
|
32
32
|
|
|
33
33
|
|