@sap/ux-ui5-tooling 1.3.3 → 1.3.5
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/CHANGELOG.md +7 -0
- package/README.md +13 -13
- package/dist/cli/index.js +66486 -58032
- package/dist/markdowns/add/add.en.md +37 -0
- package/dist/markdowns/cfDeploy/cfDeploy.en.md +9 -0
- package/dist/markdowns/deploy/deploy.en.md +27 -0
- package/dist/markdowns/index/index.en.md +21 -0
- package/dist/markdowns/run/run.en.md +24 -0
- package/dist/markdowns/undeploy/undeploy.en.md +19 -0
- package/dist/middlewares/fiori-tools-appreload.js +538 -546
- package/dist/middlewares/fiori-tools-preview.js +44243 -43511
- package/dist/middlewares/fiori-tools-proxy.js +57938 -57491
- package/dist/middlewares/fiori-tools-servestatic.js +10 -22
- package/dist/tasks/cf-deploy/index.js +3782 -3265
- package/dist/tasks/deploy/index.js +54204 -53772
- package/dist/templates/control-property-editor/app.js +1 -0
- package/dist/templates/control-property-editor/{control_property_editor.html → editor.html} +7 -7
- package/dist/templates/control-property-editor/favicon.ico +0 -0
- package/dist/templates/control-property-editor/ui5-adaptation.js +1 -0
- package/dist/templates/control-property-editor/vendor.js +2 -0
- package/dist/templates/control-property-editor/vendor.js.LICENSE.txt +56 -0
- package/dist/templates/variants-management/WorkspaceConnector.js +23 -4
- package/dist/templates/variants-management/preview.html +4 -22
- package/package.json +8 -5
|
@@ -5986,8 +5986,14 @@ function validateKeyword(definition, throwError) {
|
|
|
5986
5986
|
|
|
5987
5987
|
"use strict";
|
|
5988
5988
|
|
|
5989
|
-
|
|
5990
|
-
|
|
5989
|
+
|
|
5990
|
+
module.exports = ({onlyFirst = false} = {}) => {
|
|
5991
|
+
const pattern = [
|
|
5992
|
+
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
5993
|
+
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
|
5994
|
+
].join('|');
|
|
5995
|
+
|
|
5996
|
+
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
5991
5997
|
};
|
|
5992
5998
|
|
|
5993
5999
|
|
|
@@ -22942,6 +22948,487 @@ function createConnectionSSL (port, host, options) {
|
|
|
22942
22948
|
}
|
|
22943
22949
|
|
|
22944
22950
|
|
|
22951
|
+
/***/ }),
|
|
22952
|
+
|
|
22953
|
+
/***/ 11162:
|
|
22954
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22955
|
+
|
|
22956
|
+
var CombinedStream = __webpack_require__(74041);
|
|
22957
|
+
var util = __webpack_require__(31669);
|
|
22958
|
+
var path = __webpack_require__(85622);
|
|
22959
|
+
var http = __webpack_require__(98605);
|
|
22960
|
+
var https = __webpack_require__(57211);
|
|
22961
|
+
var parseUrl = __webpack_require__(78835).parse;
|
|
22962
|
+
var fs = __webpack_require__(35747);
|
|
22963
|
+
var mime = __webpack_require__(19010);
|
|
22964
|
+
var asynckit = __webpack_require__(48564);
|
|
22965
|
+
var populate = __webpack_require__(10453);
|
|
22966
|
+
|
|
22967
|
+
// Public API
|
|
22968
|
+
module.exports = FormData;
|
|
22969
|
+
|
|
22970
|
+
// make it a Stream
|
|
22971
|
+
util.inherits(FormData, CombinedStream);
|
|
22972
|
+
|
|
22973
|
+
/**
|
|
22974
|
+
* Create readable "multipart/form-data" streams.
|
|
22975
|
+
* Can be used to submit forms
|
|
22976
|
+
* and file uploads to other web applications.
|
|
22977
|
+
*
|
|
22978
|
+
* @constructor
|
|
22979
|
+
* @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
|
|
22980
|
+
*/
|
|
22981
|
+
function FormData(options) {
|
|
22982
|
+
if (!(this instanceof FormData)) {
|
|
22983
|
+
return new FormData();
|
|
22984
|
+
}
|
|
22985
|
+
|
|
22986
|
+
this._overheadLength = 0;
|
|
22987
|
+
this._valueLength = 0;
|
|
22988
|
+
this._valuesToMeasure = [];
|
|
22989
|
+
|
|
22990
|
+
CombinedStream.call(this);
|
|
22991
|
+
|
|
22992
|
+
options = options || {};
|
|
22993
|
+
for (var option in options) {
|
|
22994
|
+
this[option] = options[option];
|
|
22995
|
+
}
|
|
22996
|
+
}
|
|
22997
|
+
|
|
22998
|
+
FormData.LINE_BREAK = '\r\n';
|
|
22999
|
+
FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
|
|
23000
|
+
|
|
23001
|
+
FormData.prototype.append = function(field, value, options) {
|
|
23002
|
+
|
|
23003
|
+
options = options || {};
|
|
23004
|
+
|
|
23005
|
+
// allow filename as single option
|
|
23006
|
+
if (typeof options == 'string') {
|
|
23007
|
+
options = {filename: options};
|
|
23008
|
+
}
|
|
23009
|
+
|
|
23010
|
+
var append = CombinedStream.prototype.append.bind(this);
|
|
23011
|
+
|
|
23012
|
+
// all that streamy business can't handle numbers
|
|
23013
|
+
if (typeof value == 'number') {
|
|
23014
|
+
value = '' + value;
|
|
23015
|
+
}
|
|
23016
|
+
|
|
23017
|
+
// https://github.com/felixge/node-form-data/issues/38
|
|
23018
|
+
if (util.isArray(value)) {
|
|
23019
|
+
// Please convert your array into string
|
|
23020
|
+
// the way web server expects it
|
|
23021
|
+
this._error(new Error('Arrays are not supported.'));
|
|
23022
|
+
return;
|
|
23023
|
+
}
|
|
23024
|
+
|
|
23025
|
+
var header = this._multiPartHeader(field, value, options);
|
|
23026
|
+
var footer = this._multiPartFooter();
|
|
23027
|
+
|
|
23028
|
+
append(header);
|
|
23029
|
+
append(value);
|
|
23030
|
+
append(footer);
|
|
23031
|
+
|
|
23032
|
+
// pass along options.knownLength
|
|
23033
|
+
this._trackLength(header, value, options);
|
|
23034
|
+
};
|
|
23035
|
+
|
|
23036
|
+
FormData.prototype._trackLength = function(header, value, options) {
|
|
23037
|
+
var valueLength = 0;
|
|
23038
|
+
|
|
23039
|
+
// used w/ getLengthSync(), when length is known.
|
|
23040
|
+
// e.g. for streaming directly from a remote server,
|
|
23041
|
+
// w/ a known file a size, and not wanting to wait for
|
|
23042
|
+
// incoming file to finish to get its size.
|
|
23043
|
+
if (options.knownLength != null) {
|
|
23044
|
+
valueLength += +options.knownLength;
|
|
23045
|
+
} else if (Buffer.isBuffer(value)) {
|
|
23046
|
+
valueLength = value.length;
|
|
23047
|
+
} else if (typeof value === 'string') {
|
|
23048
|
+
valueLength = Buffer.byteLength(value);
|
|
23049
|
+
}
|
|
23050
|
+
|
|
23051
|
+
this._valueLength += valueLength;
|
|
23052
|
+
|
|
23053
|
+
// @check why add CRLF? does this account for custom/multiple CRLFs?
|
|
23054
|
+
this._overheadLength +=
|
|
23055
|
+
Buffer.byteLength(header) +
|
|
23056
|
+
FormData.LINE_BREAK.length;
|
|
23057
|
+
|
|
23058
|
+
// empty or either doesn't have path or not an http response
|
|
23059
|
+
if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
|
|
23060
|
+
return;
|
|
23061
|
+
}
|
|
23062
|
+
|
|
23063
|
+
// no need to bother with the length
|
|
23064
|
+
if (!options.knownLength) {
|
|
23065
|
+
this._valuesToMeasure.push(value);
|
|
23066
|
+
}
|
|
23067
|
+
};
|
|
23068
|
+
|
|
23069
|
+
FormData.prototype._lengthRetriever = function(value, callback) {
|
|
23070
|
+
|
|
23071
|
+
if (value.hasOwnProperty('fd')) {
|
|
23072
|
+
|
|
23073
|
+
// take read range into a account
|
|
23074
|
+
// `end` = Infinity –> read file till the end
|
|
23075
|
+
//
|
|
23076
|
+
// TODO: Looks like there is bug in Node fs.createReadStream
|
|
23077
|
+
// it doesn't respect `end` options without `start` options
|
|
23078
|
+
// Fix it when node fixes it.
|
|
23079
|
+
// https://github.com/joyent/node/issues/7819
|
|
23080
|
+
if (value.end != undefined && value.end != Infinity && value.start != undefined) {
|
|
23081
|
+
|
|
23082
|
+
// when end specified
|
|
23083
|
+
// no need to calculate range
|
|
23084
|
+
// inclusive, starts with 0
|
|
23085
|
+
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
23086
|
+
|
|
23087
|
+
// not that fast snoopy
|
|
23088
|
+
} else {
|
|
23089
|
+
// still need to fetch file size from fs
|
|
23090
|
+
fs.stat(value.path, function(err, stat) {
|
|
23091
|
+
|
|
23092
|
+
var fileSize;
|
|
23093
|
+
|
|
23094
|
+
if (err) {
|
|
23095
|
+
callback(err);
|
|
23096
|
+
return;
|
|
23097
|
+
}
|
|
23098
|
+
|
|
23099
|
+
// update final size based on the range options
|
|
23100
|
+
fileSize = stat.size - (value.start ? value.start : 0);
|
|
23101
|
+
callback(null, fileSize);
|
|
23102
|
+
});
|
|
23103
|
+
}
|
|
23104
|
+
|
|
23105
|
+
// or http response
|
|
23106
|
+
} else if (value.hasOwnProperty('httpVersion')) {
|
|
23107
|
+
callback(null, +value.headers['content-length']);
|
|
23108
|
+
|
|
23109
|
+
// or request stream http://github.com/mikeal/request
|
|
23110
|
+
} else if (value.hasOwnProperty('httpModule')) {
|
|
23111
|
+
// wait till response come back
|
|
23112
|
+
value.on('response', function(response) {
|
|
23113
|
+
value.pause();
|
|
23114
|
+
callback(null, +response.headers['content-length']);
|
|
23115
|
+
});
|
|
23116
|
+
value.resume();
|
|
23117
|
+
|
|
23118
|
+
// something else
|
|
23119
|
+
} else {
|
|
23120
|
+
callback('Unknown stream');
|
|
23121
|
+
}
|
|
23122
|
+
};
|
|
23123
|
+
|
|
23124
|
+
FormData.prototype._multiPartHeader = function(field, value, options) {
|
|
23125
|
+
// custom header specified (as string)?
|
|
23126
|
+
// it becomes responsible for boundary
|
|
23127
|
+
// (e.g. to handle extra CRLFs on .NET servers)
|
|
23128
|
+
if (typeof options.header == 'string') {
|
|
23129
|
+
return options.header;
|
|
23130
|
+
}
|
|
23131
|
+
|
|
23132
|
+
var contentDisposition = this._getContentDisposition(value, options);
|
|
23133
|
+
var contentType = this._getContentType(value, options);
|
|
23134
|
+
|
|
23135
|
+
var contents = '';
|
|
23136
|
+
var headers = {
|
|
23137
|
+
// add custom disposition as third element or keep it two elements if not
|
|
23138
|
+
'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
|
|
23139
|
+
// if no content type. allow it to be empty array
|
|
23140
|
+
'Content-Type': [].concat(contentType || [])
|
|
23141
|
+
};
|
|
23142
|
+
|
|
23143
|
+
// allow custom headers.
|
|
23144
|
+
if (typeof options.header == 'object') {
|
|
23145
|
+
populate(headers, options.header);
|
|
23146
|
+
}
|
|
23147
|
+
|
|
23148
|
+
var header;
|
|
23149
|
+
for (var prop in headers) {
|
|
23150
|
+
if (!headers.hasOwnProperty(prop)) continue;
|
|
23151
|
+
header = headers[prop];
|
|
23152
|
+
|
|
23153
|
+
// skip nullish headers.
|
|
23154
|
+
if (header == null) {
|
|
23155
|
+
continue;
|
|
23156
|
+
}
|
|
23157
|
+
|
|
23158
|
+
// convert all headers to arrays.
|
|
23159
|
+
if (!Array.isArray(header)) {
|
|
23160
|
+
header = [header];
|
|
23161
|
+
}
|
|
23162
|
+
|
|
23163
|
+
// add non-empty headers.
|
|
23164
|
+
if (header.length) {
|
|
23165
|
+
contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
|
|
23166
|
+
}
|
|
23167
|
+
}
|
|
23168
|
+
|
|
23169
|
+
return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
|
|
23170
|
+
};
|
|
23171
|
+
|
|
23172
|
+
FormData.prototype._getContentDisposition = function(value, options) {
|
|
23173
|
+
|
|
23174
|
+
var filename
|
|
23175
|
+
, contentDisposition
|
|
23176
|
+
;
|
|
23177
|
+
|
|
23178
|
+
if (typeof options.filepath === 'string') {
|
|
23179
|
+
// custom filepath for relative paths
|
|
23180
|
+
filename = path.normalize(options.filepath).replace(/\\/g, '/');
|
|
23181
|
+
} else if (options.filename || value.name || value.path) {
|
|
23182
|
+
// custom filename take precedence
|
|
23183
|
+
// formidable and the browser add a name property
|
|
23184
|
+
// fs- and request- streams have path property
|
|
23185
|
+
filename = path.basename(options.filename || value.name || value.path);
|
|
23186
|
+
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
|
23187
|
+
// or try http response
|
|
23188
|
+
filename = path.basename(value.client._httpMessage.path);
|
|
23189
|
+
}
|
|
23190
|
+
|
|
23191
|
+
if (filename) {
|
|
23192
|
+
contentDisposition = 'filename="' + filename + '"';
|
|
23193
|
+
}
|
|
23194
|
+
|
|
23195
|
+
return contentDisposition;
|
|
23196
|
+
};
|
|
23197
|
+
|
|
23198
|
+
FormData.prototype._getContentType = function(value, options) {
|
|
23199
|
+
|
|
23200
|
+
// use custom content-type above all
|
|
23201
|
+
var contentType = options.contentType;
|
|
23202
|
+
|
|
23203
|
+
// or try `name` from formidable, browser
|
|
23204
|
+
if (!contentType && value.name) {
|
|
23205
|
+
contentType = mime.lookup(value.name);
|
|
23206
|
+
}
|
|
23207
|
+
|
|
23208
|
+
// or try `path` from fs-, request- streams
|
|
23209
|
+
if (!contentType && value.path) {
|
|
23210
|
+
contentType = mime.lookup(value.path);
|
|
23211
|
+
}
|
|
23212
|
+
|
|
23213
|
+
// or if it's http-reponse
|
|
23214
|
+
if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
|
|
23215
|
+
contentType = value.headers['content-type'];
|
|
23216
|
+
}
|
|
23217
|
+
|
|
23218
|
+
// or guess it from the filepath or filename
|
|
23219
|
+
if (!contentType && (options.filepath || options.filename)) {
|
|
23220
|
+
contentType = mime.lookup(options.filepath || options.filename);
|
|
23221
|
+
}
|
|
23222
|
+
|
|
23223
|
+
// fallback to the default content type if `value` is not simple value
|
|
23224
|
+
if (!contentType && typeof value == 'object') {
|
|
23225
|
+
contentType = FormData.DEFAULT_CONTENT_TYPE;
|
|
23226
|
+
}
|
|
23227
|
+
|
|
23228
|
+
return contentType;
|
|
23229
|
+
};
|
|
23230
|
+
|
|
23231
|
+
FormData.prototype._multiPartFooter = function() {
|
|
23232
|
+
return function(next) {
|
|
23233
|
+
var footer = FormData.LINE_BREAK;
|
|
23234
|
+
|
|
23235
|
+
var lastPart = (this._streams.length === 0);
|
|
23236
|
+
if (lastPart) {
|
|
23237
|
+
footer += this._lastBoundary();
|
|
23238
|
+
}
|
|
23239
|
+
|
|
23240
|
+
next(footer);
|
|
23241
|
+
}.bind(this);
|
|
23242
|
+
};
|
|
23243
|
+
|
|
23244
|
+
FormData.prototype._lastBoundary = function() {
|
|
23245
|
+
return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
|
|
23246
|
+
};
|
|
23247
|
+
|
|
23248
|
+
FormData.prototype.getHeaders = function(userHeaders) {
|
|
23249
|
+
var header;
|
|
23250
|
+
var formHeaders = {
|
|
23251
|
+
'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
|
|
23252
|
+
};
|
|
23253
|
+
|
|
23254
|
+
for (header in userHeaders) {
|
|
23255
|
+
if (userHeaders.hasOwnProperty(header)) {
|
|
23256
|
+
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
23257
|
+
}
|
|
23258
|
+
}
|
|
23259
|
+
|
|
23260
|
+
return formHeaders;
|
|
23261
|
+
};
|
|
23262
|
+
|
|
23263
|
+
FormData.prototype.getBoundary = function() {
|
|
23264
|
+
if (!this._boundary) {
|
|
23265
|
+
this._generateBoundary();
|
|
23266
|
+
}
|
|
23267
|
+
|
|
23268
|
+
return this._boundary;
|
|
23269
|
+
};
|
|
23270
|
+
|
|
23271
|
+
FormData.prototype._generateBoundary = function() {
|
|
23272
|
+
// This generates a 50 character boundary similar to those used by Firefox.
|
|
23273
|
+
// They are optimized for boyer-moore parsing.
|
|
23274
|
+
var boundary = '--------------------------';
|
|
23275
|
+
for (var i = 0; i < 24; i++) {
|
|
23276
|
+
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
23277
|
+
}
|
|
23278
|
+
|
|
23279
|
+
this._boundary = boundary;
|
|
23280
|
+
};
|
|
23281
|
+
|
|
23282
|
+
// Note: getLengthSync DOESN'T calculate streams length
|
|
23283
|
+
// As workaround one can calculate file size manually
|
|
23284
|
+
// and add it as knownLength option
|
|
23285
|
+
FormData.prototype.getLengthSync = function() {
|
|
23286
|
+
var knownLength = this._overheadLength + this._valueLength;
|
|
23287
|
+
|
|
23288
|
+
// Don't get confused, there are 3 "internal" streams for each keyval pair
|
|
23289
|
+
// so it basically checks if there is any value added to the form
|
|
23290
|
+
if (this._streams.length) {
|
|
23291
|
+
knownLength += this._lastBoundary().length;
|
|
23292
|
+
}
|
|
23293
|
+
|
|
23294
|
+
// https://github.com/form-data/form-data/issues/40
|
|
23295
|
+
if (!this.hasKnownLength()) {
|
|
23296
|
+
// Some async length retrievers are present
|
|
23297
|
+
// therefore synchronous length calculation is false.
|
|
23298
|
+
// Please use getLength(callback) to get proper length
|
|
23299
|
+
this._error(new Error('Cannot calculate proper length in synchronous way.'));
|
|
23300
|
+
}
|
|
23301
|
+
|
|
23302
|
+
return knownLength;
|
|
23303
|
+
};
|
|
23304
|
+
|
|
23305
|
+
// Public API to check if length of added values is known
|
|
23306
|
+
// https://github.com/form-data/form-data/issues/196
|
|
23307
|
+
// https://github.com/form-data/form-data/issues/262
|
|
23308
|
+
FormData.prototype.hasKnownLength = function() {
|
|
23309
|
+
var hasKnownLength = true;
|
|
23310
|
+
|
|
23311
|
+
if (this._valuesToMeasure.length) {
|
|
23312
|
+
hasKnownLength = false;
|
|
23313
|
+
}
|
|
23314
|
+
|
|
23315
|
+
return hasKnownLength;
|
|
23316
|
+
};
|
|
23317
|
+
|
|
23318
|
+
FormData.prototype.getLength = function(cb) {
|
|
23319
|
+
var knownLength = this._overheadLength + this._valueLength;
|
|
23320
|
+
|
|
23321
|
+
if (this._streams.length) {
|
|
23322
|
+
knownLength += this._lastBoundary().length;
|
|
23323
|
+
}
|
|
23324
|
+
|
|
23325
|
+
if (!this._valuesToMeasure.length) {
|
|
23326
|
+
process.nextTick(cb.bind(this, null, knownLength));
|
|
23327
|
+
return;
|
|
23328
|
+
}
|
|
23329
|
+
|
|
23330
|
+
asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
|
|
23331
|
+
if (err) {
|
|
23332
|
+
cb(err);
|
|
23333
|
+
return;
|
|
23334
|
+
}
|
|
23335
|
+
|
|
23336
|
+
values.forEach(function(length) {
|
|
23337
|
+
knownLength += length;
|
|
23338
|
+
});
|
|
23339
|
+
|
|
23340
|
+
cb(null, knownLength);
|
|
23341
|
+
});
|
|
23342
|
+
};
|
|
23343
|
+
|
|
23344
|
+
FormData.prototype.submit = function(params, cb) {
|
|
23345
|
+
var request
|
|
23346
|
+
, options
|
|
23347
|
+
, defaults = {method: 'post'}
|
|
23348
|
+
;
|
|
23349
|
+
|
|
23350
|
+
// parse provided url if it's string
|
|
23351
|
+
// or treat it as options object
|
|
23352
|
+
if (typeof params == 'string') {
|
|
23353
|
+
|
|
23354
|
+
params = parseUrl(params);
|
|
23355
|
+
options = populate({
|
|
23356
|
+
port: params.port,
|
|
23357
|
+
path: params.pathname,
|
|
23358
|
+
host: params.hostname,
|
|
23359
|
+
protocol: params.protocol
|
|
23360
|
+
}, defaults);
|
|
23361
|
+
|
|
23362
|
+
// use custom params
|
|
23363
|
+
} else {
|
|
23364
|
+
|
|
23365
|
+
options = populate(params, defaults);
|
|
23366
|
+
// if no port provided use default one
|
|
23367
|
+
if (!options.port) {
|
|
23368
|
+
options.port = options.protocol == 'https:' ? 443 : 80;
|
|
23369
|
+
}
|
|
23370
|
+
}
|
|
23371
|
+
|
|
23372
|
+
// put that good code in getHeaders to some use
|
|
23373
|
+
options.headers = this.getHeaders(params.headers);
|
|
23374
|
+
|
|
23375
|
+
// https if specified, fallback to http in any other case
|
|
23376
|
+
if (options.protocol == 'https:') {
|
|
23377
|
+
request = https.request(options);
|
|
23378
|
+
} else {
|
|
23379
|
+
request = http.request(options);
|
|
23380
|
+
}
|
|
23381
|
+
|
|
23382
|
+
// get content length and fire away
|
|
23383
|
+
this.getLength(function(err, length) {
|
|
23384
|
+
if (err) {
|
|
23385
|
+
this._error(err);
|
|
23386
|
+
return;
|
|
23387
|
+
}
|
|
23388
|
+
|
|
23389
|
+
// add content length
|
|
23390
|
+
request.setHeader('Content-Length', length);
|
|
23391
|
+
|
|
23392
|
+
this.pipe(request);
|
|
23393
|
+
if (cb) {
|
|
23394
|
+
request.on('error', cb);
|
|
23395
|
+
request.on('response', cb.bind(this, null));
|
|
23396
|
+
}
|
|
23397
|
+
}.bind(this));
|
|
23398
|
+
|
|
23399
|
+
return request;
|
|
23400
|
+
};
|
|
23401
|
+
|
|
23402
|
+
FormData.prototype._error = function(err) {
|
|
23403
|
+
if (!this.error) {
|
|
23404
|
+
this.error = err;
|
|
23405
|
+
this.pause();
|
|
23406
|
+
this.emit('error', err);
|
|
23407
|
+
}
|
|
23408
|
+
};
|
|
23409
|
+
|
|
23410
|
+
FormData.prototype.toString = function () {
|
|
23411
|
+
return '[object FormData]';
|
|
23412
|
+
};
|
|
23413
|
+
|
|
23414
|
+
|
|
23415
|
+
/***/ }),
|
|
23416
|
+
|
|
23417
|
+
/***/ 10453:
|
|
23418
|
+
/***/ ((module) => {
|
|
23419
|
+
|
|
23420
|
+
// populates missing values
|
|
23421
|
+
module.exports = function(dst, src) {
|
|
23422
|
+
|
|
23423
|
+
Object.keys(src).forEach(function(prop)
|
|
23424
|
+
{
|
|
23425
|
+
dst[prop] = dst[prop] || src[prop];
|
|
23426
|
+
});
|
|
23427
|
+
|
|
23428
|
+
return dst;
|
|
23429
|
+
};
|
|
23430
|
+
|
|
23431
|
+
|
|
22945
23432
|
/***/ }),
|
|
22946
23433
|
|
|
22947
23434
|
/***/ 74608:
|
|
@@ -24170,6 +24657,22 @@ exports.timings = function (data) {
|
|
|
24170
24657
|
}
|
|
24171
24658
|
|
|
24172
24659
|
|
|
24660
|
+
/***/ }),
|
|
24661
|
+
|
|
24662
|
+
/***/ 1384:
|
|
24663
|
+
/***/ ((module) => {
|
|
24664
|
+
|
|
24665
|
+
"use strict";
|
|
24666
|
+
|
|
24667
|
+
|
|
24668
|
+
module.exports = (flag, argv = process.argv) => {
|
|
24669
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
24670
|
+
const position = argv.indexOf(prefix + flag);
|
|
24671
|
+
const terminatorPosition = argv.indexOf('--');
|
|
24672
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
24673
|
+
};
|
|
24674
|
+
|
|
24675
|
+
|
|
24173
24676
|
/***/ }),
|
|
24174
24677
|
|
|
24175
24678
|
/***/ 29253:
|
|
@@ -37974,487 +38477,6 @@ Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList
|
|
|
37974
38477
|
exports.n = Tunnel
|
|
37975
38478
|
|
|
37976
38479
|
|
|
37977
|
-
/***/ }),
|
|
37978
|
-
|
|
37979
|
-
/***/ 97501:
|
|
37980
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
37981
|
-
|
|
37982
|
-
var CombinedStream = __webpack_require__(74041);
|
|
37983
|
-
var util = __webpack_require__(31669);
|
|
37984
|
-
var path = __webpack_require__(85622);
|
|
37985
|
-
var http = __webpack_require__(98605);
|
|
37986
|
-
var https = __webpack_require__(57211);
|
|
37987
|
-
var parseUrl = __webpack_require__(78835).parse;
|
|
37988
|
-
var fs = __webpack_require__(35747);
|
|
37989
|
-
var mime = __webpack_require__(19010);
|
|
37990
|
-
var asynckit = __webpack_require__(48564);
|
|
37991
|
-
var populate = __webpack_require__(97631);
|
|
37992
|
-
|
|
37993
|
-
// Public API
|
|
37994
|
-
module.exports = FormData;
|
|
37995
|
-
|
|
37996
|
-
// make it a Stream
|
|
37997
|
-
util.inherits(FormData, CombinedStream);
|
|
37998
|
-
|
|
37999
|
-
/**
|
|
38000
|
-
* Create readable "multipart/form-data" streams.
|
|
38001
|
-
* Can be used to submit forms
|
|
38002
|
-
* and file uploads to other web applications.
|
|
38003
|
-
*
|
|
38004
|
-
* @constructor
|
|
38005
|
-
* @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
|
|
38006
|
-
*/
|
|
38007
|
-
function FormData(options) {
|
|
38008
|
-
if (!(this instanceof FormData)) {
|
|
38009
|
-
return new FormData();
|
|
38010
|
-
}
|
|
38011
|
-
|
|
38012
|
-
this._overheadLength = 0;
|
|
38013
|
-
this._valueLength = 0;
|
|
38014
|
-
this._valuesToMeasure = [];
|
|
38015
|
-
|
|
38016
|
-
CombinedStream.call(this);
|
|
38017
|
-
|
|
38018
|
-
options = options || {};
|
|
38019
|
-
for (var option in options) {
|
|
38020
|
-
this[option] = options[option];
|
|
38021
|
-
}
|
|
38022
|
-
}
|
|
38023
|
-
|
|
38024
|
-
FormData.LINE_BREAK = '\r\n';
|
|
38025
|
-
FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
|
|
38026
|
-
|
|
38027
|
-
FormData.prototype.append = function(field, value, options) {
|
|
38028
|
-
|
|
38029
|
-
options = options || {};
|
|
38030
|
-
|
|
38031
|
-
// allow filename as single option
|
|
38032
|
-
if (typeof options == 'string') {
|
|
38033
|
-
options = {filename: options};
|
|
38034
|
-
}
|
|
38035
|
-
|
|
38036
|
-
var append = CombinedStream.prototype.append.bind(this);
|
|
38037
|
-
|
|
38038
|
-
// all that streamy business can't handle numbers
|
|
38039
|
-
if (typeof value == 'number') {
|
|
38040
|
-
value = '' + value;
|
|
38041
|
-
}
|
|
38042
|
-
|
|
38043
|
-
// https://github.com/felixge/node-form-data/issues/38
|
|
38044
|
-
if (util.isArray(value)) {
|
|
38045
|
-
// Please convert your array into string
|
|
38046
|
-
// the way web server expects it
|
|
38047
|
-
this._error(new Error('Arrays are not supported.'));
|
|
38048
|
-
return;
|
|
38049
|
-
}
|
|
38050
|
-
|
|
38051
|
-
var header = this._multiPartHeader(field, value, options);
|
|
38052
|
-
var footer = this._multiPartFooter();
|
|
38053
|
-
|
|
38054
|
-
append(header);
|
|
38055
|
-
append(value);
|
|
38056
|
-
append(footer);
|
|
38057
|
-
|
|
38058
|
-
// pass along options.knownLength
|
|
38059
|
-
this._trackLength(header, value, options);
|
|
38060
|
-
};
|
|
38061
|
-
|
|
38062
|
-
FormData.prototype._trackLength = function(header, value, options) {
|
|
38063
|
-
var valueLength = 0;
|
|
38064
|
-
|
|
38065
|
-
// used w/ getLengthSync(), when length is known.
|
|
38066
|
-
// e.g. for streaming directly from a remote server,
|
|
38067
|
-
// w/ a known file a size, and not wanting to wait for
|
|
38068
|
-
// incoming file to finish to get its size.
|
|
38069
|
-
if (options.knownLength != null) {
|
|
38070
|
-
valueLength += +options.knownLength;
|
|
38071
|
-
} else if (Buffer.isBuffer(value)) {
|
|
38072
|
-
valueLength = value.length;
|
|
38073
|
-
} else if (typeof value === 'string') {
|
|
38074
|
-
valueLength = Buffer.byteLength(value);
|
|
38075
|
-
}
|
|
38076
|
-
|
|
38077
|
-
this._valueLength += valueLength;
|
|
38078
|
-
|
|
38079
|
-
// @check why add CRLF? does this account for custom/multiple CRLFs?
|
|
38080
|
-
this._overheadLength +=
|
|
38081
|
-
Buffer.byteLength(header) +
|
|
38082
|
-
FormData.LINE_BREAK.length;
|
|
38083
|
-
|
|
38084
|
-
// empty or either doesn't have path or not an http response
|
|
38085
|
-
if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) )) {
|
|
38086
|
-
return;
|
|
38087
|
-
}
|
|
38088
|
-
|
|
38089
|
-
// no need to bother with the length
|
|
38090
|
-
if (!options.knownLength) {
|
|
38091
|
-
this._valuesToMeasure.push(value);
|
|
38092
|
-
}
|
|
38093
|
-
};
|
|
38094
|
-
|
|
38095
|
-
FormData.prototype._lengthRetriever = function(value, callback) {
|
|
38096
|
-
|
|
38097
|
-
if (value.hasOwnProperty('fd')) {
|
|
38098
|
-
|
|
38099
|
-
// take read range into a account
|
|
38100
|
-
// `end` = Infinity –> read file till the end
|
|
38101
|
-
//
|
|
38102
|
-
// TODO: Looks like there is bug in Node fs.createReadStream
|
|
38103
|
-
// it doesn't respect `end` options without `start` options
|
|
38104
|
-
// Fix it when node fixes it.
|
|
38105
|
-
// https://github.com/joyent/node/issues/7819
|
|
38106
|
-
if (value.end != undefined && value.end != Infinity && value.start != undefined) {
|
|
38107
|
-
|
|
38108
|
-
// when end specified
|
|
38109
|
-
// no need to calculate range
|
|
38110
|
-
// inclusive, starts with 0
|
|
38111
|
-
callback(null, value.end + 1 - (value.start ? value.start : 0));
|
|
38112
|
-
|
|
38113
|
-
// not that fast snoopy
|
|
38114
|
-
} else {
|
|
38115
|
-
// still need to fetch file size from fs
|
|
38116
|
-
fs.stat(value.path, function(err, stat) {
|
|
38117
|
-
|
|
38118
|
-
var fileSize;
|
|
38119
|
-
|
|
38120
|
-
if (err) {
|
|
38121
|
-
callback(err);
|
|
38122
|
-
return;
|
|
38123
|
-
}
|
|
38124
|
-
|
|
38125
|
-
// update final size based on the range options
|
|
38126
|
-
fileSize = stat.size - (value.start ? value.start : 0);
|
|
38127
|
-
callback(null, fileSize);
|
|
38128
|
-
});
|
|
38129
|
-
}
|
|
38130
|
-
|
|
38131
|
-
// or http response
|
|
38132
|
-
} else if (value.hasOwnProperty('httpVersion')) {
|
|
38133
|
-
callback(null, +value.headers['content-length']);
|
|
38134
|
-
|
|
38135
|
-
// or request stream http://github.com/mikeal/request
|
|
38136
|
-
} else if (value.hasOwnProperty('httpModule')) {
|
|
38137
|
-
// wait till response come back
|
|
38138
|
-
value.on('response', function(response) {
|
|
38139
|
-
value.pause();
|
|
38140
|
-
callback(null, +response.headers['content-length']);
|
|
38141
|
-
});
|
|
38142
|
-
value.resume();
|
|
38143
|
-
|
|
38144
|
-
// something else
|
|
38145
|
-
} else {
|
|
38146
|
-
callback('Unknown stream');
|
|
38147
|
-
}
|
|
38148
|
-
};
|
|
38149
|
-
|
|
38150
|
-
FormData.prototype._multiPartHeader = function(field, value, options) {
|
|
38151
|
-
// custom header specified (as string)?
|
|
38152
|
-
// it becomes responsible for boundary
|
|
38153
|
-
// (e.g. to handle extra CRLFs on .NET servers)
|
|
38154
|
-
if (typeof options.header == 'string') {
|
|
38155
|
-
return options.header;
|
|
38156
|
-
}
|
|
38157
|
-
|
|
38158
|
-
var contentDisposition = this._getContentDisposition(value, options);
|
|
38159
|
-
var contentType = this._getContentType(value, options);
|
|
38160
|
-
|
|
38161
|
-
var contents = '';
|
|
38162
|
-
var headers = {
|
|
38163
|
-
// add custom disposition as third element or keep it two elements if not
|
|
38164
|
-
'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
|
|
38165
|
-
// if no content type. allow it to be empty array
|
|
38166
|
-
'Content-Type': [].concat(contentType || [])
|
|
38167
|
-
};
|
|
38168
|
-
|
|
38169
|
-
// allow custom headers.
|
|
38170
|
-
if (typeof options.header == 'object') {
|
|
38171
|
-
populate(headers, options.header);
|
|
38172
|
-
}
|
|
38173
|
-
|
|
38174
|
-
var header;
|
|
38175
|
-
for (var prop in headers) {
|
|
38176
|
-
if (!headers.hasOwnProperty(prop)) continue;
|
|
38177
|
-
header = headers[prop];
|
|
38178
|
-
|
|
38179
|
-
// skip nullish headers.
|
|
38180
|
-
if (header == null) {
|
|
38181
|
-
continue;
|
|
38182
|
-
}
|
|
38183
|
-
|
|
38184
|
-
// convert all headers to arrays.
|
|
38185
|
-
if (!Array.isArray(header)) {
|
|
38186
|
-
header = [header];
|
|
38187
|
-
}
|
|
38188
|
-
|
|
38189
|
-
// add non-empty headers.
|
|
38190
|
-
if (header.length) {
|
|
38191
|
-
contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
|
|
38192
|
-
}
|
|
38193
|
-
}
|
|
38194
|
-
|
|
38195
|
-
return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;
|
|
38196
|
-
};
|
|
38197
|
-
|
|
38198
|
-
FormData.prototype._getContentDisposition = function(value, options) {
|
|
38199
|
-
|
|
38200
|
-
var filename
|
|
38201
|
-
, contentDisposition
|
|
38202
|
-
;
|
|
38203
|
-
|
|
38204
|
-
if (typeof options.filepath === 'string') {
|
|
38205
|
-
// custom filepath for relative paths
|
|
38206
|
-
filename = path.normalize(options.filepath).replace(/\\/g, '/');
|
|
38207
|
-
} else if (options.filename || value.name || value.path) {
|
|
38208
|
-
// custom filename take precedence
|
|
38209
|
-
// formidable and the browser add a name property
|
|
38210
|
-
// fs- and request- streams have path property
|
|
38211
|
-
filename = path.basename(options.filename || value.name || value.path);
|
|
38212
|
-
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
|
38213
|
-
// or try http response
|
|
38214
|
-
filename = path.basename(value.client._httpMessage.path);
|
|
38215
|
-
}
|
|
38216
|
-
|
|
38217
|
-
if (filename) {
|
|
38218
|
-
contentDisposition = 'filename="' + filename + '"';
|
|
38219
|
-
}
|
|
38220
|
-
|
|
38221
|
-
return contentDisposition;
|
|
38222
|
-
};
|
|
38223
|
-
|
|
38224
|
-
FormData.prototype._getContentType = function(value, options) {
|
|
38225
|
-
|
|
38226
|
-
// use custom content-type above all
|
|
38227
|
-
var contentType = options.contentType;
|
|
38228
|
-
|
|
38229
|
-
// or try `name` from formidable, browser
|
|
38230
|
-
if (!contentType && value.name) {
|
|
38231
|
-
contentType = mime.lookup(value.name);
|
|
38232
|
-
}
|
|
38233
|
-
|
|
38234
|
-
// or try `path` from fs-, request- streams
|
|
38235
|
-
if (!contentType && value.path) {
|
|
38236
|
-
contentType = mime.lookup(value.path);
|
|
38237
|
-
}
|
|
38238
|
-
|
|
38239
|
-
// or if it's http-reponse
|
|
38240
|
-
if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
|
|
38241
|
-
contentType = value.headers['content-type'];
|
|
38242
|
-
}
|
|
38243
|
-
|
|
38244
|
-
// or guess it from the filepath or filename
|
|
38245
|
-
if (!contentType && (options.filepath || options.filename)) {
|
|
38246
|
-
contentType = mime.lookup(options.filepath || options.filename);
|
|
38247
|
-
}
|
|
38248
|
-
|
|
38249
|
-
// fallback to the default content type if `value` is not simple value
|
|
38250
|
-
if (!contentType && typeof value == 'object') {
|
|
38251
|
-
contentType = FormData.DEFAULT_CONTENT_TYPE;
|
|
38252
|
-
}
|
|
38253
|
-
|
|
38254
|
-
return contentType;
|
|
38255
|
-
};
|
|
38256
|
-
|
|
38257
|
-
FormData.prototype._multiPartFooter = function() {
|
|
38258
|
-
return function(next) {
|
|
38259
|
-
var footer = FormData.LINE_BREAK;
|
|
38260
|
-
|
|
38261
|
-
var lastPart = (this._streams.length === 0);
|
|
38262
|
-
if (lastPart) {
|
|
38263
|
-
footer += this._lastBoundary();
|
|
38264
|
-
}
|
|
38265
|
-
|
|
38266
|
-
next(footer);
|
|
38267
|
-
}.bind(this);
|
|
38268
|
-
};
|
|
38269
|
-
|
|
38270
|
-
FormData.prototype._lastBoundary = function() {
|
|
38271
|
-
return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;
|
|
38272
|
-
};
|
|
38273
|
-
|
|
38274
|
-
FormData.prototype.getHeaders = function(userHeaders) {
|
|
38275
|
-
var header;
|
|
38276
|
-
var formHeaders = {
|
|
38277
|
-
'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
|
|
38278
|
-
};
|
|
38279
|
-
|
|
38280
|
-
for (header in userHeaders) {
|
|
38281
|
-
if (userHeaders.hasOwnProperty(header)) {
|
|
38282
|
-
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
38283
|
-
}
|
|
38284
|
-
}
|
|
38285
|
-
|
|
38286
|
-
return formHeaders;
|
|
38287
|
-
};
|
|
38288
|
-
|
|
38289
|
-
FormData.prototype.getBoundary = function() {
|
|
38290
|
-
if (!this._boundary) {
|
|
38291
|
-
this._generateBoundary();
|
|
38292
|
-
}
|
|
38293
|
-
|
|
38294
|
-
return this._boundary;
|
|
38295
|
-
};
|
|
38296
|
-
|
|
38297
|
-
FormData.prototype._generateBoundary = function() {
|
|
38298
|
-
// This generates a 50 character boundary similar to those used by Firefox.
|
|
38299
|
-
// They are optimized for boyer-moore parsing.
|
|
38300
|
-
var boundary = '--------------------------';
|
|
38301
|
-
for (var i = 0; i < 24; i++) {
|
|
38302
|
-
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
38303
|
-
}
|
|
38304
|
-
|
|
38305
|
-
this._boundary = boundary;
|
|
38306
|
-
};
|
|
38307
|
-
|
|
38308
|
-
// Note: getLengthSync DOESN'T calculate streams length
|
|
38309
|
-
// As workaround one can calculate file size manually
|
|
38310
|
-
// and add it as knownLength option
|
|
38311
|
-
FormData.prototype.getLengthSync = function() {
|
|
38312
|
-
var knownLength = this._overheadLength + this._valueLength;
|
|
38313
|
-
|
|
38314
|
-
// Don't get confused, there are 3 "internal" streams for each keyval pair
|
|
38315
|
-
// so it basically checks if there is any value added to the form
|
|
38316
|
-
if (this._streams.length) {
|
|
38317
|
-
knownLength += this._lastBoundary().length;
|
|
38318
|
-
}
|
|
38319
|
-
|
|
38320
|
-
// https://github.com/form-data/form-data/issues/40
|
|
38321
|
-
if (!this.hasKnownLength()) {
|
|
38322
|
-
// Some async length retrievers are present
|
|
38323
|
-
// therefore synchronous length calculation is false.
|
|
38324
|
-
// Please use getLength(callback) to get proper length
|
|
38325
|
-
this._error(new Error('Cannot calculate proper length in synchronous way.'));
|
|
38326
|
-
}
|
|
38327
|
-
|
|
38328
|
-
return knownLength;
|
|
38329
|
-
};
|
|
38330
|
-
|
|
38331
|
-
// Public API to check if length of added values is known
|
|
38332
|
-
// https://github.com/form-data/form-data/issues/196
|
|
38333
|
-
// https://github.com/form-data/form-data/issues/262
|
|
38334
|
-
FormData.prototype.hasKnownLength = function() {
|
|
38335
|
-
var hasKnownLength = true;
|
|
38336
|
-
|
|
38337
|
-
if (this._valuesToMeasure.length) {
|
|
38338
|
-
hasKnownLength = false;
|
|
38339
|
-
}
|
|
38340
|
-
|
|
38341
|
-
return hasKnownLength;
|
|
38342
|
-
};
|
|
38343
|
-
|
|
38344
|
-
FormData.prototype.getLength = function(cb) {
|
|
38345
|
-
var knownLength = this._overheadLength + this._valueLength;
|
|
38346
|
-
|
|
38347
|
-
if (this._streams.length) {
|
|
38348
|
-
knownLength += this._lastBoundary().length;
|
|
38349
|
-
}
|
|
38350
|
-
|
|
38351
|
-
if (!this._valuesToMeasure.length) {
|
|
38352
|
-
process.nextTick(cb.bind(this, null, knownLength));
|
|
38353
|
-
return;
|
|
38354
|
-
}
|
|
38355
|
-
|
|
38356
|
-
asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
|
|
38357
|
-
if (err) {
|
|
38358
|
-
cb(err);
|
|
38359
|
-
return;
|
|
38360
|
-
}
|
|
38361
|
-
|
|
38362
|
-
values.forEach(function(length) {
|
|
38363
|
-
knownLength += length;
|
|
38364
|
-
});
|
|
38365
|
-
|
|
38366
|
-
cb(null, knownLength);
|
|
38367
|
-
});
|
|
38368
|
-
};
|
|
38369
|
-
|
|
38370
|
-
FormData.prototype.submit = function(params, cb) {
|
|
38371
|
-
var request
|
|
38372
|
-
, options
|
|
38373
|
-
, defaults = {method: 'post'}
|
|
38374
|
-
;
|
|
38375
|
-
|
|
38376
|
-
// parse provided url if it's string
|
|
38377
|
-
// or treat it as options object
|
|
38378
|
-
if (typeof params == 'string') {
|
|
38379
|
-
|
|
38380
|
-
params = parseUrl(params);
|
|
38381
|
-
options = populate({
|
|
38382
|
-
port: params.port,
|
|
38383
|
-
path: params.pathname,
|
|
38384
|
-
host: params.hostname,
|
|
38385
|
-
protocol: params.protocol
|
|
38386
|
-
}, defaults);
|
|
38387
|
-
|
|
38388
|
-
// use custom params
|
|
38389
|
-
} else {
|
|
38390
|
-
|
|
38391
|
-
options = populate(params, defaults);
|
|
38392
|
-
// if no port provided use default one
|
|
38393
|
-
if (!options.port) {
|
|
38394
|
-
options.port = options.protocol == 'https:' ? 443 : 80;
|
|
38395
|
-
}
|
|
38396
|
-
}
|
|
38397
|
-
|
|
38398
|
-
// put that good code in getHeaders to some use
|
|
38399
|
-
options.headers = this.getHeaders(params.headers);
|
|
38400
|
-
|
|
38401
|
-
// https if specified, fallback to http in any other case
|
|
38402
|
-
if (options.protocol == 'https:') {
|
|
38403
|
-
request = https.request(options);
|
|
38404
|
-
} else {
|
|
38405
|
-
request = http.request(options);
|
|
38406
|
-
}
|
|
38407
|
-
|
|
38408
|
-
// get content length and fire away
|
|
38409
|
-
this.getLength(function(err, length) {
|
|
38410
|
-
if (err) {
|
|
38411
|
-
this._error(err);
|
|
38412
|
-
return;
|
|
38413
|
-
}
|
|
38414
|
-
|
|
38415
|
-
// add content length
|
|
38416
|
-
request.setHeader('Content-Length', length);
|
|
38417
|
-
|
|
38418
|
-
this.pipe(request);
|
|
38419
|
-
if (cb) {
|
|
38420
|
-
request.on('error', cb);
|
|
38421
|
-
request.on('response', cb.bind(this, null));
|
|
38422
|
-
}
|
|
38423
|
-
}.bind(this));
|
|
38424
|
-
|
|
38425
|
-
return request;
|
|
38426
|
-
};
|
|
38427
|
-
|
|
38428
|
-
FormData.prototype._error = function(err) {
|
|
38429
|
-
if (!this.error) {
|
|
38430
|
-
this.error = err;
|
|
38431
|
-
this.pause();
|
|
38432
|
-
this.emit('error', err);
|
|
38433
|
-
}
|
|
38434
|
-
};
|
|
38435
|
-
|
|
38436
|
-
FormData.prototype.toString = function () {
|
|
38437
|
-
return '[object FormData]';
|
|
38438
|
-
};
|
|
38439
|
-
|
|
38440
|
-
|
|
38441
|
-
/***/ }),
|
|
38442
|
-
|
|
38443
|
-
/***/ 97631:
|
|
38444
|
-
/***/ ((module) => {
|
|
38445
|
-
|
|
38446
|
-
// populates missing values
|
|
38447
|
-
module.exports = function(dst, src) {
|
|
38448
|
-
|
|
38449
|
-
Object.keys(src).forEach(function(prop)
|
|
38450
|
-
{
|
|
38451
|
-
dst[prop] = dst[prop] || src[prop];
|
|
38452
|
-
});
|
|
38453
|
-
|
|
38454
|
-
return dst;
|
|
38455
|
-
};
|
|
38456
|
-
|
|
38457
|
-
|
|
38458
38480
|
/***/ }),
|
|
38459
38481
|
|
|
38460
38482
|
/***/ 35730:
|
|
@@ -39141,7 +39163,7 @@ var httpSignature = __webpack_require__(31689)
|
|
|
39141
39163
|
var mime = __webpack_require__(19010)
|
|
39142
39164
|
var caseless = __webpack_require__(72464)
|
|
39143
39165
|
var ForeverAgent = __webpack_require__(68880)
|
|
39144
|
-
var FormData = __webpack_require__(
|
|
39166
|
+
var FormData = __webpack_require__(11162)
|
|
39145
39167
|
var extend = __webpack_require__(51302)
|
|
39146
39168
|
var isstream = __webpack_require__(92104)
|
|
39147
39169
|
var isTypedArray = __webpack_require__(27721).strict
|
|
@@ -48085,23 +48107,32 @@ module.exports = function (requireCache, callback, callbackForModulesToKeep, mod
|
|
|
48085
48107
|
"use strict";
|
|
48086
48108
|
|
|
48087
48109
|
const os = __webpack_require__(12087);
|
|
48088
|
-
const
|
|
48110
|
+
const tty = __webpack_require__(33867);
|
|
48111
|
+
const hasFlag = __webpack_require__(1384);
|
|
48089
48112
|
|
|
48090
|
-
const env = process
|
|
48113
|
+
const {env} = process;
|
|
48091
48114
|
|
|
48092
48115
|
let forceColor;
|
|
48093
48116
|
if (hasFlag('no-color') ||
|
|
48094
48117
|
hasFlag('no-colors') ||
|
|
48095
|
-
hasFlag('color=false')
|
|
48096
|
-
|
|
48118
|
+
hasFlag('color=false') ||
|
|
48119
|
+
hasFlag('color=never')) {
|
|
48120
|
+
forceColor = 0;
|
|
48097
48121
|
} else if (hasFlag('color') ||
|
|
48098
48122
|
hasFlag('colors') ||
|
|
48099
48123
|
hasFlag('color=true') ||
|
|
48100
48124
|
hasFlag('color=always')) {
|
|
48101
|
-
forceColor =
|
|
48125
|
+
forceColor = 1;
|
|
48102
48126
|
}
|
|
48127
|
+
|
|
48103
48128
|
if ('FORCE_COLOR' in env) {
|
|
48104
|
-
|
|
48129
|
+
if (env.FORCE_COLOR === 'true') {
|
|
48130
|
+
forceColor = 1;
|
|
48131
|
+
} else if (env.FORCE_COLOR === 'false') {
|
|
48132
|
+
forceColor = 0;
|
|
48133
|
+
} else {
|
|
48134
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
48135
|
+
}
|
|
48105
48136
|
}
|
|
48106
48137
|
|
|
48107
48138
|
function translateLevel(level) {
|
|
@@ -48117,8 +48148,8 @@ function translateLevel(level) {
|
|
|
48117
48148
|
};
|
|
48118
48149
|
}
|
|
48119
48150
|
|
|
48120
|
-
function supportsColor(
|
|
48121
|
-
if (forceColor ===
|
|
48151
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
48152
|
+
if (forceColor === 0) {
|
|
48122
48153
|
return 0;
|
|
48123
48154
|
}
|
|
48124
48155
|
|
|
@@ -48132,22 +48163,21 @@ function supportsColor(stream) {
|
|
|
48132
48163
|
return 2;
|
|
48133
48164
|
}
|
|
48134
48165
|
|
|
48135
|
-
if (
|
|
48166
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
48136
48167
|
return 0;
|
|
48137
48168
|
}
|
|
48138
48169
|
|
|
48139
|
-
const min = forceColor
|
|
48170
|
+
const min = forceColor || 0;
|
|
48171
|
+
|
|
48172
|
+
if (env.TERM === 'dumb') {
|
|
48173
|
+
return min;
|
|
48174
|
+
}
|
|
48140
48175
|
|
|
48141
48176
|
if (process.platform === 'win32') {
|
|
48142
|
-
//
|
|
48143
|
-
//
|
|
48144
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
48145
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
48146
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
48147
|
-
// that supports 16m/TrueColor.
|
|
48177
|
+
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
48178
|
+
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
48148
48179
|
const osRelease = os.release().split('.');
|
|
48149
48180
|
if (
|
|
48150
|
-
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
48151
48181
|
Number(osRelease[0]) >= 10 &&
|
|
48152
48182
|
Number(osRelease[2]) >= 10586
|
|
48153
48183
|
) {
|
|
@@ -48158,7 +48188,7 @@ function supportsColor(stream) {
|
|
|
48158
48188
|
}
|
|
48159
48189
|
|
|
48160
48190
|
if ('CI' in env) {
|
|
48161
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
48191
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
48162
48192
|
return 1;
|
|
48163
48193
|
}
|
|
48164
48194
|
|
|
@@ -48197,38 +48227,18 @@ function supportsColor(stream) {
|
|
|
48197
48227
|
return 1;
|
|
48198
48228
|
}
|
|
48199
48229
|
|
|
48200
|
-
if (env.TERM === 'dumb') {
|
|
48201
|
-
return min;
|
|
48202
|
-
}
|
|
48203
|
-
|
|
48204
48230
|
return min;
|
|
48205
48231
|
}
|
|
48206
48232
|
|
|
48207
48233
|
function getSupportLevel(stream) {
|
|
48208
|
-
const level = supportsColor(stream);
|
|
48234
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
48209
48235
|
return translateLevel(level);
|
|
48210
48236
|
}
|
|
48211
48237
|
|
|
48212
48238
|
module.exports = {
|
|
48213
48239
|
supportsColor: getSupportLevel,
|
|
48214
|
-
stdout:
|
|
48215
|
-
stderr:
|
|
48216
|
-
};
|
|
48217
|
-
|
|
48218
|
-
|
|
48219
|
-
/***/ }),
|
|
48220
|
-
|
|
48221
|
-
/***/ 46531:
|
|
48222
|
-
/***/ ((module) => {
|
|
48223
|
-
|
|
48224
|
-
"use strict";
|
|
48225
|
-
|
|
48226
|
-
module.exports = (flag, argv) => {
|
|
48227
|
-
argv = argv || process.argv;
|
|
48228
|
-
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
48229
|
-
const pos = argv.indexOf(prefix + flag);
|
|
48230
|
-
const terminatorPos = argv.indexOf('--');
|
|
48231
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
48240
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
48241
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
48232
48242
|
};
|
|
48233
48243
|
|
|
48234
48244
|
|
|
@@ -55137,24 +55147,6 @@ function alignCenter (str, width) {
|
|
|
55137
55147
|
}
|
|
55138
55148
|
|
|
55139
55149
|
|
|
55140
|
-
/***/ }),
|
|
55141
|
-
|
|
55142
|
-
/***/ 47432:
|
|
55143
|
-
/***/ ((module) => {
|
|
55144
|
-
|
|
55145
|
-
"use strict";
|
|
55146
|
-
|
|
55147
|
-
|
|
55148
|
-
module.exports = () => {
|
|
55149
|
-
const pattern = [
|
|
55150
|
-
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
|
|
55151
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
|
|
55152
|
-
].join('|');
|
|
55153
|
-
|
|
55154
|
-
return new RegExp(pattern, 'g');
|
|
55155
|
-
};
|
|
55156
|
-
|
|
55157
|
-
|
|
55158
55150
|
/***/ }),
|
|
55159
55151
|
|
|
55160
55152
|
/***/ 94698:
|
|
@@ -55206,7 +55198,7 @@ module.exports = str => {
|
|
|
55206
55198
|
|
|
55207
55199
|
"use strict";
|
|
55208
55200
|
|
|
55209
|
-
const ansiRegex = __webpack_require__(
|
|
55201
|
+
const ansiRegex = __webpack_require__(36403);
|
|
55210
55202
|
|
|
55211
55203
|
module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
|
|
55212
55204
|
|
|
@@ -55331,7 +55323,7 @@ exports.getAvailablePort = (port) => {
|
|
|
55331
55323
|
return new Promise((resolve, reject) => {
|
|
55332
55324
|
portfinder_1.getPort({
|
|
55333
55325
|
port: port,
|
|
55334
|
-
stopPort: port +
|
|
55326
|
+
stopPort: port + 200
|
|
55335
55327
|
}, (error, port) => {
|
|
55336
55328
|
if (error) {
|
|
55337
55329
|
console.error(error);
|
|
@@ -55369,7 +55361,7 @@ exports.exposeLivereloadPort = async (port, log) => {
|
|
|
55369
55361
|
/***/ ((module) => {
|
|
55370
55362
|
|
|
55371
55363
|
"use strict";
|
|
55372
|
-
module.exports = JSON.parse('{"ABAP_PACKAGE":"ABAP package","ADDING_ARTIFACT_TO_PROJECT":"Adding {{artifact}} to the project.","APPLICATION_NAME":"Application Name","ARTIFACT_ADDED":"{{artifact}} added to the project.","ARTIFACT_NOT_ADDED":"{{artifact}} not added to the project.","CLIENT":"Client","CONFIRM_DEPLOYMENT":"Confirmation is required to deploy the app:","CONNECTING_WITHOUT_CREDS":"Connecting without any credentials, deployment may fail if authorization is required","CONSIDER_REMOVING_CLIENT_FROM_CONFIG":"Please remove the client from ui5-deploy.yaml, if you don\'t want to see the above warning again","DEPLOY_CANCELED":"Deploy canceled","DEPLOY_EXECUTED":"deploy executed.","DESTINATION":"Destination","ERROR_COMMAND_CMD":"Command {{cmd}} does not exist.","ERROR_INVALID_DEPLOYMENT_CONFIGURATION":"Invalid deployment configuration. Property {{property}} is missing.","ERROR_USER_PASSWORD_PLAIN":"Username or password must not be provided in plain text. Use environment variables.","ERROR_YO_NOT_INSTALLED":"Yeoman is not installed or available in your executable path. Please check your configuration or use npm/yarn to install it globally","ERROR_INSTALL_FIORI_GENERATOR":"Do you need to install {{fioriGenerator}} globally?\\nnpm install -g {{fioriGenerator}}\\nOR\\nyarn global add {{fioriGenerator}}","FILE_CREATED":"File {{file}} created in {{- folder}}","
|
|
55364
|
+
module.exports = JSON.parse('{"ABAP_PACKAGE":"ABAP package","ADDING_ARTIFACT_TO_PROJECT":"Adding {{artifact}} to the project.","APPLICATION_NAME":"Application Name","ARTIFACT_ADDED":"{{artifact}} added to the project.","ARTIFACT_NOT_ADDED":"{{artifact}} not added to the project.","CLIENT":"Client","CONFIRM_DEPLOYMENT":"Confirmation is required to deploy the app:","CONNECTING_WITHOUT_CREDS":"Connecting without any credentials, deployment may fail if authorization is required","CONSIDER_REMOVING_CLIENT_FROM_CONFIG":"Please remove the client from ui5-deploy.yaml, if you don\'t want to see the above warning again","DEPLOY_CANCELED":"Deploy canceled","DEPLOY_EXECUTED":"deploy executed.","DESTINATION":"Destination","ERROR_COMMAND_CMD":"Command {{cmd}} does not exist.","ERROR_INVALID_DEPLOYMENT_CONFIGURATION":"Invalid deployment configuration. Property {{property}} is missing.","ERROR_USER_PASSWORD_PLAIN":"Username or password must not be provided in plain text. Use environment variables.","ERROR_YO_NOT_INSTALLED":"Yeoman is not installed or available in your executable path. Please check your configuration or use npm/yarn to install it globally","ERROR_INSTALL_FIORI_GENERATOR":"Do you need to install {{fioriGenerator}} globally?\\nnpm install -g {{fioriGenerator}}\\nOR\\nyarn global add {{fioriGenerator}}","FILE_CREATED":"File {{file}} created in {{- folder}}","GENERATE_STANDALONE_INDEX_HTML":"Generate standalone index.html during deployment","INDEX_EXISTS_NOT_OVERWRITING":"\'index.html\' already exists, not generating one","INDEX_HTML_ADDED":"index.html added","INFO_CREATE_ARCHIVE":"Create Archive","INFO_COMMAND_FAILED":"Command {{cmd}} failed with error {{-message}}","INFO_DEPLOYMENT_SUCCESSFUL":"Deployment Successful.","INFO_DEPLOYMENT_FAILED":"Deployment Failed.","INFO_FILE_PATH_ADDED":"{{path}} added","INFO_LIVERELOAD_STARTED":"Livereload middleware started for port {{port}} and path {{-watchPath}}","ERROR_STARTING_LIVERELOAD":"Port {{port}} was not exposed! Livereload will not work!","INFO_STARTING_DEPLOYMENT":"Starting Deployment.","INFO_STORE_DETAILS":"Storing details for system: ","INFO_USED_DESTINATION":"Used destination: ","INVALID_DATA":"Invalid data","INVALID_ODATA_VERSION":"The middleware fiori-tools-preview can only be used with OData version 4","MAINTAIN_CREDENTIALS":"Please maintain correct credentials to avoid seeing this error\\n\\t(see help: https://www.npmjs.com/package/@sap/ux-ui5-tooling#setting-environment-variables-in-a-env-file)","NO_PATH_LOCAL_UI5":"No path to local UI5 sources provided!","PACKAGE":"Package","PACKAGE_JSON_UPDATED":"package.json updated.","PACKAGE_NAME_REQUIRED":"Package name required","PROXY_STARTED_FOR":"Proxy started for ","SERVICE_KEYS_CONTENT_EMPTY":"Service keys contents cannot be empty","START_DEPLOYMENT":"Start deployment (Y/n)?","SYSTEM_NAME_EMPTY":"System Name cannot be empty","SYSTEM_NAME_IN_USE":"[{{name}}] is already in use","TARGET":"Target","TRANSPORT_REQUEST":"Transport Request","USE_IT_INSTEAD":"Use it instead (Y/n)?","USING_SYSTEM_WITH_SAME_URL_NO_CLIENT":"Using system [{{name}}] with same URL, no client from System Store","USING_SYSTEM_FROM_STORE":"Using system [{{name}}] from System store","VARIANTS_MANAGEMENT_NOT_SUPPORTED":"Variants Management is supported only with OData version 4","WARNING_PACKAGE_IN_CUSTOMER_SPACE":"Your package is in the customer space. Please check the correctness of the application name as it might need to start with a Z.","ERROR_EXTRACT_API_KEY":"Could not extract API hub key from \'{{-envPath}}\'","ERROR_API_HUB_KEY":"Property apiHub is set to true in yaml file, but file \'{{-envPath}}\' doesn\'t contain API key. Error was: ${{-message}}","SSL_IGNORE_WARNING":"You chose not to validate SSL certificate. Please verify the server certificate is trustful before proceeding. See documentation for recommended configuration (https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/4b318bede7eb4021a8be385c46c74045.html).","SSL_PROXY_ERROR":"You are trying to connect to a server with a self signed certificate. Please check (https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/4b318bede7eb4021a8be385c46c74045.html) for guidance.","NO_DEPLOY_CONFIG":"No deployment configuration has been detected. Run `npm run deploy-config` to add configuration first.","NO_BSP_APPLICATION":"Mandatory parameter --bspApplication <value> is missing. Please provide BSP Application","YAML_NOT_FOUND":"Configuration file {{-yamlPath}} not found. Please provide a valid path","NO_BUILD_SCRIPT":"Warning: No build script was found. You will need to execute build, before running start-flp.","CONFIRM_UNDEPLOYMENT":"Confirmation is required to undeploy the app:","INFO_STARTING_UNDEPLOYMENT":"Starting undeployment.","INFO_UNDEPLOYMENT_SUCCESSFUL":"Undeployment Successful.","INFO_UNDEPLOYMENT_FAILED":"Undeployment Failed.","START_UNDEPLOYMENT":"Start undeployment (Y/n)?","USERNAME":"Username:","PASSWORD":"Password:","REQUIRE_CREDENTIAL":"The deployment destination requires authentication. Please enter your credentials below","REQUIRE_CREDENTIAL_FLP":"The FLP Embedded Preview requires credentials. Please enter your credentials below","ERROR_NO_VSCODE_SETTINGS_FILE":"No VSCode Settings file found.","INFO_SAML_NOT_SUPPORTED":"The backend service seems to require direct SAML authentication, which is not yet supported.","INFO_RESPONSE_UNCERTAIN":"Successful deployment could not be confirmed based on the response message received. Please manually verify if the deployment was successful.","VSCODE_SETTINGS_FILE_NOT_PARSEABLE":"Not able to parse VSCode settings.json file.","ERROR_EMPTY_USERNAME":"Username can not be empty.","ERROR_EMPTY_PASSWORD":"Password can not be empty.","OPERATION_ABORTED":"Operation aborted by the user.","ERROR_ACHIVE_FROM_EXTERNAL_FILEPATH":"The archive file you provided could not be found.","ERROR_ACHIVE_FROM_EXTERNAL_URL":"The archive url you provided could not be reached. Please ensure the URL is accessible and does not require authentication. {{error}}","NO_CAP":"CAP projects are not supported.","DEPLOYMENT_MSG":"To retrieve the deployed URL, run the following command:","DEPLOYMENT_MANAGED_CF_URL":"cf html5-list -u -di {{-mtaId}}-dest-srv -u --runtime launchpad","DEPLOYMENT_HELP":"For more help, go to https://help.sap.com/viewer/17d50220bcd848aa854c9c182d65b699/Latest/en-US/607014e278d941fda4440f92f4a324a6.html","DEPLOYMENT_STANDALONE_CF_URL":"Please see the deployed application URL above","CONTROL_PROPERTY_EDITOR_UNSUPPORTED_FE_VERSION":"Control property editor is available only for FE v2 apps","NO_HELP_MARKDOWN_FOUND":"Help content cannot be loaded"}');
|
|
55373
55365
|
|
|
55374
55366
|
/***/ }),
|
|
55375
55367
|
|