mythix 2.8.6 → 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
|
@@ -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
|
|