comprodls-sdk 2.46.1 → 2.47.0
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/dist/comprodls-sdk.js +575 -581
- package/dist/comprodls-sdk.min.js +20 -20
- package/lib/services/analytics/index.js +5 -3
- package/lib/services/auth/index.js +1 -0
- package/package.json +1 -1
package/dist/comprodls-sdk.js
CHANGED
|
@@ -799,7 +799,7 @@ function addClassIdQueryParam(url, classId) {
|
|
|
799
799
|
function setupAPIToken(request, token) {
|
|
800
800
|
return request.set('Authorization', token.access_token);
|
|
801
801
|
};
|
|
802
|
-
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":58,"string-template":
|
|
802
|
+
},{"../../../config":2,"../../../helpers":3,"../errors":7,"./validations":6,"q":58,"string-template":84,"superagent":85}],6:[function(require,module,exports){
|
|
803
803
|
/*************************************************************************
|
|
804
804
|
*
|
|
805
805
|
* COMPRO CONFIDENTIAL
|
|
@@ -1131,7 +1131,7 @@ validator.validators.contains = function(value, options) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
|
-
},{"./errors":7,"validate.js":
|
|
1134
|
+
},{"./errors":7,"validate.js":90}],10:[function(require,module,exports){
|
|
1135
1135
|
/*************************************************************************
|
|
1136
1136
|
*
|
|
1137
1137
|
* COMPRO CONFIDENTIAL
|
|
@@ -1254,7 +1254,7 @@ function getSingleInvitation(organizationId, options) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
|
|
1256
1256
|
|
|
1257
|
-
},{"../helpers":3,"q":58,"superagent":
|
|
1257
|
+
},{"../helpers":3,"q":58,"superagent":85}],11:[function(require,module,exports){
|
|
1258
1258
|
/*************************************************************************
|
|
1259
1259
|
*
|
|
1260
1260
|
* COMPRO CONFIDENTIAL
|
|
@@ -1465,7 +1465,7 @@ Activity.prototype.getQuestionsCount = function () {
|
|
|
1465
1465
|
return dfd.promise;
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
-
},{"../../helpers":3,"./attempt":12,"extend":
|
|
1468
|
+
},{"../../helpers":3,"./attempt":12,"extend":44,"q":58,"superagent":85}],12:[function(require,module,exports){
|
|
1469
1469
|
/*************************************************************************
|
|
1470
1470
|
*
|
|
1471
1471
|
* COMPRO CONFIDENTIAL
|
|
@@ -1898,7 +1898,7 @@ Attempt.prototype.submit = function (userresponse) {
|
|
|
1898
1898
|
return dfd.promise;
|
|
1899
1899
|
};
|
|
1900
1900
|
|
|
1901
|
-
},{"../../helpers":3,"extend":
|
|
1901
|
+
},{"../../helpers":3,"extend":44,"q":58,"superagent":85}],13:[function(require,module,exports){
|
|
1902
1902
|
/*************************************************************************
|
|
1903
1903
|
*
|
|
1904
1904
|
* COMPRO CONFIDENTIAL
|
|
@@ -3461,7 +3461,8 @@ function getAllAssignedPathsOfClass(options) {
|
|
|
3461
3461
|
|
|
3462
3462
|
/* options = {
|
|
3463
3463
|
"classid": "string", // required
|
|
3464
|
-
"assignedPathId" : "string",
|
|
3464
|
+
"assignedPathId" : "string",
|
|
3465
|
+
"ext_assignedpathid" : "string",
|
|
3465
3466
|
"productcode" : "string" //required
|
|
3466
3467
|
};
|
|
3467
3468
|
*/
|
|
@@ -3472,7 +3473,7 @@ function getAssignedPathAnalytics(options) {
|
|
|
3472
3473
|
var err = helpers.validations.isAuthenticated(self.orgId, self.token);
|
|
3473
3474
|
if(err) { dfd.reject(err); }
|
|
3474
3475
|
else {
|
|
3475
|
-
if(options && options.classid && options.
|
|
3476
|
+
if(options && options.classid && options.productcode) {
|
|
3476
3477
|
// Passed all validations, Contruct API url
|
|
3477
3478
|
var url = self.config.DEFAULT_HOSTS.ANALYTICS + self.config.ANALYTICS_API_URLS.getAssignedPathAnalytics;
|
|
3478
3479
|
url = helpers.api.constructAPIUrl(url, { orgId: self.orgId });
|
|
@@ -3480,6 +3481,7 @@ function getAssignedPathAnalytics(options) {
|
|
|
3480
3481
|
var queryParams = {
|
|
3481
3482
|
classid: options.classid,
|
|
3482
3483
|
assignedpathid: options.assignedPathId,
|
|
3484
|
+
ext_assignedpathid: options.ext_assignedpathid,
|
|
3483
3485
|
productcode: options.productcode
|
|
3484
3486
|
};
|
|
3485
3487
|
// Setup request with URL and Params
|
|
@@ -3501,7 +3503,7 @@ function getAssignedPathAnalytics(options) {
|
|
|
3501
3503
|
}
|
|
3502
3504
|
else {
|
|
3503
3505
|
err = {};
|
|
3504
|
-
err.message = err.description = 'Mandatory params - classid or
|
|
3506
|
+
err.message = err.description = 'Mandatory params - classid or productcode not found in request options.';
|
|
3505
3507
|
err = new DLSError(helpers.errors.ERROR_TYPES.SDK_ERROR, err);
|
|
3506
3508
|
dfd.reject(err);
|
|
3507
3509
|
}
|
|
@@ -3822,7 +3824,7 @@ function postProgressTimeseries(options) {
|
|
|
3822
3824
|
return dfd.promise;
|
|
3823
3825
|
}
|
|
3824
3826
|
|
|
3825
|
-
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":
|
|
3827
|
+
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":85}],15:[function(require,module,exports){
|
|
3826
3828
|
/*************************************************************************
|
|
3827
3829
|
*
|
|
3828
3830
|
* COMPRO CONFIDENTIAL
|
|
@@ -4262,7 +4264,7 @@ function getUserActivityMeta(options) {
|
|
|
4262
4264
|
}
|
|
4263
4265
|
return dfd.promise;
|
|
4264
4266
|
}
|
|
4265
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
4267
|
+
},{"../../helpers":3,"q":58,"superagent":85}],16:[function(require,module,exports){
|
|
4266
4268
|
/*************************************************************************
|
|
4267
4269
|
*
|
|
4268
4270
|
* COMPRO CONFIDENTIAL
|
|
@@ -6406,6 +6408,7 @@ options = {
|
|
|
6406
6408
|
"classid": "classid", //mandatory
|
|
6407
6409
|
"data": {
|
|
6408
6410
|
"title": "assigned path title", //mandatory
|
|
6411
|
+
"ext_assignedpathid": 'string', //optional
|
|
6409
6412
|
"duedate": "epoch due date", //mandatory
|
|
6410
6413
|
"startdate": "epoch start date", //optional
|
|
6411
6414
|
"shared_progress": true, //optional, default=true
|
|
@@ -8336,7 +8339,7 @@ function getAllCustomComponents(options) {
|
|
|
8336
8339
|
return deferred.promise;
|
|
8337
8340
|
}
|
|
8338
8341
|
|
|
8339
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":36,"q":58,"superagent":
|
|
8342
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":36,"q":58,"superagent":85}],17:[function(require,module,exports){
|
|
8340
8343
|
/*************************************************************************
|
|
8341
8344
|
*
|
|
8342
8345
|
* COMPRO CONFIDENTIAL
|
|
@@ -9047,7 +9050,7 @@ function getClassesOfAGradeformat(options) {
|
|
|
9047
9050
|
return deferred.promise;
|
|
9048
9051
|
}
|
|
9049
9052
|
|
|
9050
|
-
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":
|
|
9053
|
+
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":85}],18:[function(require,module,exports){
|
|
9051
9054
|
/*************************************************************************
|
|
9052
9055
|
*
|
|
9053
9056
|
* COMPRO CONFIDENTIAL
|
|
@@ -9517,7 +9520,7 @@ function updateConnectionForUser(orgid, token, config, options, action) {
|
|
|
9517
9520
|
return dfd.promise;
|
|
9518
9521
|
}
|
|
9519
9522
|
|
|
9520
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
9523
|
+
},{"../../helpers":3,"q":58,"superagent":85}],19:[function(require,module,exports){
|
|
9521
9524
|
/*************************************************************************
|
|
9522
9525
|
*
|
|
9523
9526
|
* COMPRO CONFIDENTIAL
|
|
@@ -9829,7 +9832,7 @@ function getAllDataSyncManagersOfAGroup(options) {
|
|
|
9829
9832
|
return deferred.promise;
|
|
9830
9833
|
}
|
|
9831
9834
|
|
|
9832
|
-
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":
|
|
9835
|
+
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":85}],20:[function(require,module,exports){
|
|
9833
9836
|
/*************************************************************************
|
|
9834
9837
|
*
|
|
9835
9838
|
* COMPRO CONFIDENTIAL
|
|
@@ -9975,7 +9978,7 @@ function getAllDocumentsInAFolder(options) {
|
|
|
9975
9978
|
return dfd.promise;
|
|
9976
9979
|
}
|
|
9977
9980
|
|
|
9978
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
9981
|
+
},{"../../helpers":3,"q":58,"superagent":85}],21:[function(require,module,exports){
|
|
9979
9982
|
/*************************************************************************
|
|
9980
9983
|
*
|
|
9981
9984
|
* COMPRO CONFIDENTIAL
|
|
@@ -10532,7 +10535,7 @@ function deleteSchedule(options) {
|
|
|
10532
10535
|
return deferred.promise;
|
|
10533
10536
|
}
|
|
10534
10537
|
|
|
10535
|
-
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":36,"q":58,"superagent":
|
|
10538
|
+
},{"../../helpers":3,"../../helpers/lib/api/converter":4,"agentkeepalive":36,"q":58,"superagent":85}],22:[function(require,module,exports){
|
|
10536
10539
|
/*************************************************************************
|
|
10537
10540
|
*
|
|
10538
10541
|
* COMPRO CONFIDENTIAL
|
|
@@ -10857,7 +10860,7 @@ function resendSingleInvitation(options) {
|
|
|
10857
10860
|
return dfd.promise;
|
|
10858
10861
|
}
|
|
10859
10862
|
|
|
10860
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
10863
|
+
},{"../../helpers":3,"q":58,"superagent":85}],23:[function(require,module,exports){
|
|
10861
10864
|
/*************************************************************************
|
|
10862
10865
|
*
|
|
10863
10866
|
* COMPRO CONFIDENTIAL
|
|
@@ -11318,7 +11321,7 @@ function createStatement(options) {
|
|
|
11318
11321
|
}*/
|
|
11319
11322
|
|
|
11320
11323
|
|
|
11321
|
-
},{"../../helpers":3,"q":58,"tincanjs":
|
|
11324
|
+
},{"../../helpers":3,"q":58,"tincanjs":87}],24:[function(require,module,exports){
|
|
11322
11325
|
/*************************************************************************
|
|
11323
11326
|
*
|
|
11324
11327
|
* COMPRO CONFIDENTIAL
|
|
@@ -11666,7 +11669,7 @@ function getSingleProductFamily(options) {
|
|
|
11666
11669
|
return dfd.promise;
|
|
11667
11670
|
}
|
|
11668
11671
|
|
|
11669
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
11672
|
+
},{"../../helpers":3,"q":58,"superagent":85}],25:[function(require,module,exports){
|
|
11670
11673
|
/*************************************************************************
|
|
11671
11674
|
*
|
|
11672
11675
|
* COMPRO CONFIDENTIAL
|
|
@@ -12266,7 +12269,7 @@ function getAllProductFamilies(options) {
|
|
|
12266
12269
|
return dfd.promise;
|
|
12267
12270
|
}
|
|
12268
12271
|
|
|
12269
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
12272
|
+
},{"../../helpers":3,"q":58,"superagent":85}],26:[function(require,module,exports){
|
|
12270
12273
|
/*************************************************************************
|
|
12271
12274
|
*
|
|
12272
12275
|
* COMPRO CONFIDENTIAL
|
|
@@ -12466,7 +12469,7 @@ function grantByAccountIdOnExtUserId(options) {
|
|
|
12466
12469
|
}
|
|
12467
12470
|
|
|
12468
12471
|
|
|
12469
|
-
},{"../../helpers":3,"./pubnubClientWrapper":27,"q":58,"superagent":
|
|
12472
|
+
},{"../../helpers":3,"./pubnubClientWrapper":27,"q":58,"superagent":85}],27:[function(require,module,exports){
|
|
12470
12473
|
var pubNub = require("pubnub");
|
|
12471
12474
|
var EventEmitter = require("events").EventEmitter;
|
|
12472
12475
|
var helpers = require('../../helpers');
|
|
@@ -12679,7 +12682,7 @@ module.exports = function () {
|
|
|
12679
12682
|
|
|
12680
12683
|
}; //End of Client Wrapper module
|
|
12681
12684
|
|
|
12682
|
-
},{"../../helpers":3,"events":
|
|
12685
|
+
},{"../../helpers":3,"events":43,"pubnub":56}],28:[function(require,module,exports){
|
|
12683
12686
|
/*************************************************************************
|
|
12684
12687
|
*
|
|
12685
12688
|
* COMPRO CONFIDENTIAL
|
|
@@ -13146,7 +13149,7 @@ function deleteRule(options) {
|
|
|
13146
13149
|
return dfd.promise;
|
|
13147
13150
|
}
|
|
13148
13151
|
|
|
13149
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
13152
|
+
},{"../../helpers":3,"q":58,"superagent":85}],29:[function(require,module,exports){
|
|
13150
13153
|
/*************************************************************************
|
|
13151
13154
|
*
|
|
13152
13155
|
* COMPRO CONFIDENTIAL
|
|
@@ -14302,7 +14305,7 @@ function updateInstituteTitle(options){
|
|
|
14302
14305
|
return dfd.promise;
|
|
14303
14306
|
}
|
|
14304
14307
|
|
|
14305
|
-
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":
|
|
14308
|
+
},{"../../helpers":3,"agentkeepalive":36,"q":58,"superagent":85}],30:[function(require,module,exports){
|
|
14306
14309
|
/*************************************************************************
|
|
14307
14310
|
*
|
|
14308
14311
|
* COMPRO CONFIDENTIAL
|
|
@@ -14479,7 +14482,7 @@ function provisionSpacesToSuperAdmin(options) {
|
|
|
14479
14482
|
return dfd.promise;
|
|
14480
14483
|
}
|
|
14481
14484
|
|
|
14482
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
14485
|
+
},{"../../helpers":3,"q":58,"superagent":85}],31:[function(require,module,exports){
|
|
14483
14486
|
/*************************************************************************
|
|
14484
14487
|
*
|
|
14485
14488
|
* COMPRO CONFIDENTIAL
|
|
@@ -14916,7 +14919,7 @@ function getAllTags(options) {
|
|
|
14916
14919
|
return dfd.promise;
|
|
14917
14920
|
}
|
|
14918
14921
|
|
|
14919
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
14922
|
+
},{"../../helpers":3,"q":58,"superagent":85}],32:[function(require,module,exports){
|
|
14920
14923
|
/*************************************************************************
|
|
14921
14924
|
*
|
|
14922
14925
|
* COMPRO CONFIDENTIAL
|
|
@@ -15382,7 +15385,7 @@ function updateWorkflowRequest(options) {
|
|
|
15382
15385
|
}
|
|
15383
15386
|
return dfd.promise;
|
|
15384
15387
|
}
|
|
15385
|
-
},{"./../../helpers":3,"q":58,"superagent":
|
|
15388
|
+
},{"./../../helpers":3,"q":58,"superagent":85}],33:[function(require,module,exports){
|
|
15386
15389
|
/*************************************************************************
|
|
15387
15390
|
*
|
|
15388
15391
|
* COMPRO CONFIDENTIAL
|
|
@@ -15659,7 +15662,7 @@ function resetUserProductProgress(options) {
|
|
|
15659
15662
|
return dfd.promise;
|
|
15660
15663
|
}
|
|
15661
15664
|
|
|
15662
|
-
},{"../../helpers":3,"q":58,"superagent":
|
|
15665
|
+
},{"../../helpers":3,"q":58,"superagent":85}],34:[function(require,module,exports){
|
|
15663
15666
|
/*************************************************************************
|
|
15664
15667
|
*
|
|
15665
15668
|
* COMPRO CONFIDENTIAL
|
|
@@ -15775,7 +15778,7 @@ function authWithToken(organizationId, token, options) {
|
|
|
15775
15778
|
return dfd.promise;
|
|
15776
15779
|
};
|
|
15777
15780
|
|
|
15778
|
-
},{"../helpers":3,"./validations":35,"q":58,"superagent":
|
|
15781
|
+
},{"../helpers":3,"./validations":35,"q":58,"superagent":85}],35:[function(require,module,exports){
|
|
15779
15782
|
/*************************************************************************
|
|
15780
15783
|
*
|
|
15781
15784
|
* COMPRO CONFIDENTIAL
|
|
@@ -15873,6 +15876,8 @@ module.exports.HttpsAgent = noop;
|
|
|
15873
15876
|
function noop () {}
|
|
15874
15877
|
|
|
15875
15878
|
},{}],37:[function(require,module,exports){
|
|
15879
|
+
|
|
15880
|
+
},{}],38:[function(require,module,exports){
|
|
15876
15881
|
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
15877
15882
|
|
|
15878
15883
|
;(function (exports) {
|
|
@@ -15998,8 +16003,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
15998
16003
|
exports.fromByteArray = uint8ToBase64
|
|
15999
16004
|
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
|
16000
16005
|
|
|
16001
|
-
},{}],38:[function(require,module,exports){
|
|
16002
|
-
|
|
16003
16006
|
},{}],39:[function(require,module,exports){
|
|
16004
16007
|
(function (global){
|
|
16005
16008
|
/*!
|
|
@@ -17552,7 +17555,7 @@ function blitBuffer (src, dst, offset, length) {
|
|
|
17552
17555
|
}
|
|
17553
17556
|
|
|
17554
17557
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
17555
|
-
},{"base64-js":
|
|
17558
|
+
},{"base64-js":38,"ieee754":47,"isarray":40}],40:[function(require,module,exports){
|
|
17556
17559
|
var toString = {}.toString;
|
|
17557
17560
|
|
|
17558
17561
|
module.exports = Array.isArray || function (arr) {
|
|
@@ -17621,169 +17624,6 @@ module.exports = {
|
|
|
17621
17624
|
}
|
|
17622
17625
|
|
|
17623
17626
|
},{}],42:[function(require,module,exports){
|
|
17624
|
-
|
|
17625
|
-
/**
|
|
17626
|
-
* Expose `Emitter`.
|
|
17627
|
-
*/
|
|
17628
|
-
|
|
17629
|
-
module.exports = Emitter;
|
|
17630
|
-
|
|
17631
|
-
/**
|
|
17632
|
-
* Initialize a new `Emitter`.
|
|
17633
|
-
*
|
|
17634
|
-
* @api public
|
|
17635
|
-
*/
|
|
17636
|
-
|
|
17637
|
-
function Emitter(obj) {
|
|
17638
|
-
if (obj) return mixin(obj);
|
|
17639
|
-
};
|
|
17640
|
-
|
|
17641
|
-
/**
|
|
17642
|
-
* Mixin the emitter properties.
|
|
17643
|
-
*
|
|
17644
|
-
* @param {Object} obj
|
|
17645
|
-
* @return {Object}
|
|
17646
|
-
* @api private
|
|
17647
|
-
*/
|
|
17648
|
-
|
|
17649
|
-
function mixin(obj) {
|
|
17650
|
-
for (var key in Emitter.prototype) {
|
|
17651
|
-
obj[key] = Emitter.prototype[key];
|
|
17652
|
-
}
|
|
17653
|
-
return obj;
|
|
17654
|
-
}
|
|
17655
|
-
|
|
17656
|
-
/**
|
|
17657
|
-
* Listen on the given `event` with `fn`.
|
|
17658
|
-
*
|
|
17659
|
-
* @param {String} event
|
|
17660
|
-
* @param {Function} fn
|
|
17661
|
-
* @return {Emitter}
|
|
17662
|
-
* @api public
|
|
17663
|
-
*/
|
|
17664
|
-
|
|
17665
|
-
Emitter.prototype.on =
|
|
17666
|
-
Emitter.prototype.addEventListener = function(event, fn){
|
|
17667
|
-
this._callbacks = this._callbacks || {};
|
|
17668
|
-
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
17669
|
-
.push(fn);
|
|
17670
|
-
return this;
|
|
17671
|
-
};
|
|
17672
|
-
|
|
17673
|
-
/**
|
|
17674
|
-
* Adds an `event` listener that will be invoked a single
|
|
17675
|
-
* time then automatically removed.
|
|
17676
|
-
*
|
|
17677
|
-
* @param {String} event
|
|
17678
|
-
* @param {Function} fn
|
|
17679
|
-
* @return {Emitter}
|
|
17680
|
-
* @api public
|
|
17681
|
-
*/
|
|
17682
|
-
|
|
17683
|
-
Emitter.prototype.once = function(event, fn){
|
|
17684
|
-
function on() {
|
|
17685
|
-
this.off(event, on);
|
|
17686
|
-
fn.apply(this, arguments);
|
|
17687
|
-
}
|
|
17688
|
-
|
|
17689
|
-
on.fn = fn;
|
|
17690
|
-
this.on(event, on);
|
|
17691
|
-
return this;
|
|
17692
|
-
};
|
|
17693
|
-
|
|
17694
|
-
/**
|
|
17695
|
-
* Remove the given callback for `event` or all
|
|
17696
|
-
* registered callbacks.
|
|
17697
|
-
*
|
|
17698
|
-
* @param {String} event
|
|
17699
|
-
* @param {Function} fn
|
|
17700
|
-
* @return {Emitter}
|
|
17701
|
-
* @api public
|
|
17702
|
-
*/
|
|
17703
|
-
|
|
17704
|
-
Emitter.prototype.off =
|
|
17705
|
-
Emitter.prototype.removeListener =
|
|
17706
|
-
Emitter.prototype.removeAllListeners =
|
|
17707
|
-
Emitter.prototype.removeEventListener = function(event, fn){
|
|
17708
|
-
this._callbacks = this._callbacks || {};
|
|
17709
|
-
|
|
17710
|
-
// all
|
|
17711
|
-
if (0 == arguments.length) {
|
|
17712
|
-
this._callbacks = {};
|
|
17713
|
-
return this;
|
|
17714
|
-
}
|
|
17715
|
-
|
|
17716
|
-
// specific event
|
|
17717
|
-
var callbacks = this._callbacks['$' + event];
|
|
17718
|
-
if (!callbacks) return this;
|
|
17719
|
-
|
|
17720
|
-
// remove all handlers
|
|
17721
|
-
if (1 == arguments.length) {
|
|
17722
|
-
delete this._callbacks['$' + event];
|
|
17723
|
-
return this;
|
|
17724
|
-
}
|
|
17725
|
-
|
|
17726
|
-
// remove specific handler
|
|
17727
|
-
var cb;
|
|
17728
|
-
for (var i = 0; i < callbacks.length; i++) {
|
|
17729
|
-
cb = callbacks[i];
|
|
17730
|
-
if (cb === fn || cb.fn === fn) {
|
|
17731
|
-
callbacks.splice(i, 1);
|
|
17732
|
-
break;
|
|
17733
|
-
}
|
|
17734
|
-
}
|
|
17735
|
-
return this;
|
|
17736
|
-
};
|
|
17737
|
-
|
|
17738
|
-
/**
|
|
17739
|
-
* Emit `event` with the given args.
|
|
17740
|
-
*
|
|
17741
|
-
* @param {String} event
|
|
17742
|
-
* @param {Mixed} ...
|
|
17743
|
-
* @return {Emitter}
|
|
17744
|
-
*/
|
|
17745
|
-
|
|
17746
|
-
Emitter.prototype.emit = function(event){
|
|
17747
|
-
this._callbacks = this._callbacks || {};
|
|
17748
|
-
var args = [].slice.call(arguments, 1)
|
|
17749
|
-
, callbacks = this._callbacks['$' + event];
|
|
17750
|
-
|
|
17751
|
-
if (callbacks) {
|
|
17752
|
-
callbacks = callbacks.slice(0);
|
|
17753
|
-
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
17754
|
-
callbacks[i].apply(this, args);
|
|
17755
|
-
}
|
|
17756
|
-
}
|
|
17757
|
-
|
|
17758
|
-
return this;
|
|
17759
|
-
};
|
|
17760
|
-
|
|
17761
|
-
/**
|
|
17762
|
-
* Return array of callbacks for `event`.
|
|
17763
|
-
*
|
|
17764
|
-
* @param {String} event
|
|
17765
|
-
* @return {Array}
|
|
17766
|
-
* @api public
|
|
17767
|
-
*/
|
|
17768
|
-
|
|
17769
|
-
Emitter.prototype.listeners = function(event){
|
|
17770
|
-
this._callbacks = this._callbacks || {};
|
|
17771
|
-
return this._callbacks['$' + event] || [];
|
|
17772
|
-
};
|
|
17773
|
-
|
|
17774
|
-
/**
|
|
17775
|
-
* Check if this emitter has `event` handlers.
|
|
17776
|
-
*
|
|
17777
|
-
* @param {String} event
|
|
17778
|
-
* @return {Boolean}
|
|
17779
|
-
* @api public
|
|
17780
|
-
*/
|
|
17781
|
-
|
|
17782
|
-
Emitter.prototype.hasListeners = function(event){
|
|
17783
|
-
return !! this.listeners(event).length;
|
|
17784
|
-
};
|
|
17785
|
-
|
|
17786
|
-
},{}],43:[function(require,module,exports){
|
|
17787
17627
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
17788
17628
|
//
|
|
17789
17629
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -17892,7 +17732,7 @@ function objectToString(o) {
|
|
|
17892
17732
|
return Object.prototype.toString.call(o);
|
|
17893
17733
|
}
|
|
17894
17734
|
|
|
17895
|
-
},{"buffer":39}],
|
|
17735
|
+
},{"buffer":39}],43:[function(require,module,exports){
|
|
17896
17736
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
17897
17737
|
//
|
|
17898
17738
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -18195,7 +18035,7 @@ function isUndefined(arg) {
|
|
|
18195
18035
|
return arg === void 0;
|
|
18196
18036
|
}
|
|
18197
18037
|
|
|
18198
|
-
},{}],
|
|
18038
|
+
},{}],44:[function(require,module,exports){
|
|
18199
18039
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
18200
18040
|
var toStr = Object.prototype.toString;
|
|
18201
18041
|
var defineProperty = Object.defineProperty;
|
|
@@ -18316,7 +18156,7 @@ module.exports = function extend() {
|
|
|
18316
18156
|
return target;
|
|
18317
18157
|
};
|
|
18318
18158
|
|
|
18319
|
-
},{}],
|
|
18159
|
+
},{}],45:[function(require,module,exports){
|
|
18320
18160
|
|
|
18321
18161
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
18322
18162
|
var toString = Object.prototype.toString;
|
|
@@ -18340,7 +18180,7 @@ module.exports = function forEach (obj, fn, ctx) {
|
|
|
18340
18180
|
};
|
|
18341
18181
|
|
|
18342
18182
|
|
|
18343
|
-
},{}],
|
|
18183
|
+
},{}],46:[function(require,module,exports){
|
|
18344
18184
|
var http = require('http');
|
|
18345
18185
|
|
|
18346
18186
|
var https = module.exports;
|
|
@@ -18356,7 +18196,7 @@ https.request = function (params, cb) {
|
|
|
18356
18196
|
return http.request.call(this, params, cb);
|
|
18357
18197
|
}
|
|
18358
18198
|
|
|
18359
|
-
},{"http":
|
|
18199
|
+
},{"http":80}],47:[function(require,module,exports){
|
|
18360
18200
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
18361
18201
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
18362
18202
|
var e, m
|
|
@@ -18443,7 +18283,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
18443
18283
|
buffer[offset + i - d] |= s * 128
|
|
18444
18284
|
}
|
|
18445
18285
|
|
|
18446
|
-
},{}],
|
|
18286
|
+
},{}],48:[function(require,module,exports){
|
|
18447
18287
|
|
|
18448
18288
|
var indexOf = [].indexOf;
|
|
18449
18289
|
|
|
@@ -18454,6 +18294,35 @@ module.exports = function(arr, obj){
|
|
|
18454
18294
|
}
|
|
18455
18295
|
return -1;
|
|
18456
18296
|
};
|
|
18297
|
+
},{}],49:[function(require,module,exports){
|
|
18298
|
+
if (typeof Object.create === 'function') {
|
|
18299
|
+
// implementation from standard node.js 'util' module
|
|
18300
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
18301
|
+
if (superCtor) {
|
|
18302
|
+
ctor.super_ = superCtor
|
|
18303
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
18304
|
+
constructor: {
|
|
18305
|
+
value: ctor,
|
|
18306
|
+
enumerable: false,
|
|
18307
|
+
writable: true,
|
|
18308
|
+
configurable: true
|
|
18309
|
+
}
|
|
18310
|
+
})
|
|
18311
|
+
}
|
|
18312
|
+
};
|
|
18313
|
+
} else {
|
|
18314
|
+
// old school shim for old browsers
|
|
18315
|
+
module.exports = function inherits(ctor, superCtor) {
|
|
18316
|
+
if (superCtor) {
|
|
18317
|
+
ctor.super_ = superCtor
|
|
18318
|
+
var TempCtor = function () {}
|
|
18319
|
+
TempCtor.prototype = superCtor.prototype
|
|
18320
|
+
ctor.prototype = new TempCtor()
|
|
18321
|
+
ctor.prototype.constructor = ctor
|
|
18322
|
+
}
|
|
18323
|
+
}
|
|
18324
|
+
}
|
|
18325
|
+
|
|
18457
18326
|
},{}],50:[function(require,module,exports){
|
|
18458
18327
|
'use strict';
|
|
18459
18328
|
|
|
@@ -21703,141 +21572,297 @@ exports.decode = exports.parse = require('./decode');
|
|
|
21703
21572
|
exports.encode = exports.stringify = require('./encode');
|
|
21704
21573
|
|
|
21705
21574
|
},{"./decode":59,"./encode":60}],62:[function(require,module,exports){
|
|
21706
|
-
module.exports = require('./lib/_stream_duplex.js');
|
|
21707
|
-
|
|
21708
|
-
},{"./lib/_stream_duplex.js":63}],63:[function(require,module,exports){
|
|
21709
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
21710
|
-
//
|
|
21711
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
21712
|
-
// copy of this software and associated documentation files (the
|
|
21713
|
-
// "Software"), to deal in the Software without restriction, including
|
|
21714
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
21715
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
21716
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
21717
|
-
// following conditions:
|
|
21718
|
-
//
|
|
21719
|
-
// The above copyright notice and this permission notice shall be included
|
|
21720
|
-
// in all copies or substantial portions of the Software.
|
|
21721
|
-
//
|
|
21722
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
21723
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
21724
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
21725
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
21726
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21727
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
21728
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21729
|
-
|
|
21730
|
-
// a duplex stream is just a stream that is both readable and writable.
|
|
21731
|
-
// Since JS doesn't have multiple prototypal inheritance, this class
|
|
21732
|
-
// prototypally inherits from Readable, and then parasitically from
|
|
21733
|
-
// Writable.
|
|
21734
|
-
|
|
21735
|
-
'use strict';
|
|
21736
|
-
|
|
21737
|
-
/*<replacement>*/
|
|
21738
|
-
|
|
21739
|
-
var pna = require('process-nextick-args');
|
|
21740
|
-
/*</replacement>*/
|
|
21741
|
-
|
|
21742
|
-
/*<replacement>*/
|
|
21743
|
-
var objectKeys = Object.keys || function (obj) {
|
|
21744
|
-
var keys = [];
|
|
21745
|
-
for (var key in obj) {
|
|
21746
|
-
keys.push(key);
|
|
21747
|
-
}return keys;
|
|
21748
|
-
};
|
|
21749
|
-
/*</replacement>*/
|
|
21750
|
-
|
|
21751
|
-
module.exports = Duplex;
|
|
21752
|
-
|
|
21753
|
-
/*<replacement>*/
|
|
21754
|
-
var util = Object.create(require('core-util-is'));
|
|
21755
|
-
util.inherits = require('inherits');
|
|
21756
|
-
/*</replacement>*/
|
|
21757
|
-
|
|
21758
|
-
var Readable = require('./_stream_readable');
|
|
21759
|
-
var Writable = require('./_stream_writable');
|
|
21760
|
-
|
|
21761
|
-
util.inherits(Duplex, Readable);
|
|
21762
|
-
|
|
21763
|
-
{
|
|
21764
|
-
// avoid scope creep, the keys array can then be collected
|
|
21765
|
-
var keys = objectKeys(Writable.prototype);
|
|
21766
|
-
for (var v = 0; v < keys.length; v++) {
|
|
21767
|
-
var method = keys[v];
|
|
21768
|
-
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
|
21769
|
-
}
|
|
21770
|
-
}
|
|
21771
|
-
|
|
21772
|
-
function Duplex(options) {
|
|
21773
|
-
if (!(this instanceof Duplex)) return new Duplex(options);
|
|
21774
|
-
|
|
21775
|
-
Readable.call(this, options);
|
|
21776
|
-
Writable.call(this, options);
|
|
21777
|
-
|
|
21778
|
-
if (options && options.readable === false) this.readable = false;
|
|
21779
|
-
|
|
21780
|
-
if (options && options.writable === false) this.writable = false;
|
|
21781
|
-
|
|
21782
|
-
this.allowHalfOpen = true;
|
|
21783
|
-
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
|
|
21784
|
-
|
|
21785
|
-
this.once('end', onend);
|
|
21786
|
-
}
|
|
21787
|
-
|
|
21788
|
-
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
|
|
21789
|
-
// making it explicit this property is not enumerable
|
|
21790
|
-
// because otherwise some prototype manipulation in
|
|
21791
|
-
// userland will fail
|
|
21792
|
-
enumerable: false,
|
|
21793
|
-
get: function () {
|
|
21794
|
-
return this._writableState.highWaterMark;
|
|
21795
|
-
}
|
|
21796
|
-
});
|
|
21797
|
-
|
|
21798
|
-
// the no-half-open enforcer
|
|
21799
|
-
function onend() {
|
|
21800
|
-
// if we allow half-open state, or if the writable side ended,
|
|
21801
|
-
// then we're ok.
|
|
21802
|
-
if (this.allowHalfOpen || this._writableState.ended) return;
|
|
21803
21575
|
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
}
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21576
|
+
/**
|
|
21577
|
+
* Reduce `arr` with `fn`.
|
|
21578
|
+
*
|
|
21579
|
+
* @param {Array} arr
|
|
21580
|
+
* @param {Function} fn
|
|
21581
|
+
* @param {Mixed} initial
|
|
21582
|
+
*
|
|
21583
|
+
* TODO: combatible error handling?
|
|
21584
|
+
*/
|
|
21812
21585
|
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
},
|
|
21820
|
-
set: function (value) {
|
|
21821
|
-
// we ignore the value if the stream
|
|
21822
|
-
// has not been initialized yet
|
|
21823
|
-
if (this._readableState === undefined || this._writableState === undefined) {
|
|
21824
|
-
return;
|
|
21825
|
-
}
|
|
21586
|
+
module.exports = function(arr, fn, initial){
|
|
21587
|
+
var idx = 0;
|
|
21588
|
+
var len = arr.length;
|
|
21589
|
+
var curr = arguments.length == 3
|
|
21590
|
+
? initial
|
|
21591
|
+
: arr[idx++];
|
|
21826
21592
|
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
this._readableState.destroyed = value;
|
|
21830
|
-
this._writableState.destroyed = value;
|
|
21593
|
+
while (idx < len) {
|
|
21594
|
+
curr = fn.call(null, curr, arr[idx], ++idx, arr);
|
|
21831
21595
|
}
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
Duplex.prototype._destroy = function (err, cb) {
|
|
21835
|
-
this.push(null);
|
|
21836
|
-
this.end();
|
|
21837
|
-
|
|
21838
|
-
pna.nextTick(cb, err);
|
|
21596
|
+
|
|
21597
|
+
return curr;
|
|
21839
21598
|
};
|
|
21840
|
-
},{
|
|
21599
|
+
},{}],63:[function(require,module,exports){
|
|
21600
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
21601
|
+
//
|
|
21602
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
21603
|
+
// copy of this software and associated documentation files (the
|
|
21604
|
+
// "Software"), to deal in the Software without restriction, including
|
|
21605
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
21606
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
21607
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
21608
|
+
// following conditions:
|
|
21609
|
+
//
|
|
21610
|
+
// The above copyright notice and this permission notice shall be included
|
|
21611
|
+
// in all copies or substantial portions of the Software.
|
|
21612
|
+
//
|
|
21613
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
21614
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
21615
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
21616
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
21617
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21618
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
21619
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21620
|
+
|
|
21621
|
+
module.exports = Stream;
|
|
21622
|
+
|
|
21623
|
+
var EE = require('events').EventEmitter;
|
|
21624
|
+
var inherits = require('inherits');
|
|
21625
|
+
|
|
21626
|
+
inherits(Stream, EE);
|
|
21627
|
+
Stream.Readable = require('readable-stream/readable.js');
|
|
21628
|
+
Stream.Writable = require('readable-stream/writable.js');
|
|
21629
|
+
Stream.Duplex = require('readable-stream/duplex.js');
|
|
21630
|
+
Stream.Transform = require('readable-stream/transform.js');
|
|
21631
|
+
Stream.PassThrough = require('readable-stream/passthrough.js');
|
|
21632
|
+
|
|
21633
|
+
// Backwards-compat with node 0.4.x
|
|
21634
|
+
Stream.Stream = Stream;
|
|
21635
|
+
|
|
21636
|
+
|
|
21637
|
+
|
|
21638
|
+
// old-style streams. Note that the pipe method (the only relevant
|
|
21639
|
+
// part of this class) is overridden in the Readable class.
|
|
21640
|
+
|
|
21641
|
+
function Stream() {
|
|
21642
|
+
EE.call(this);
|
|
21643
|
+
}
|
|
21644
|
+
|
|
21645
|
+
Stream.prototype.pipe = function(dest, options) {
|
|
21646
|
+
var source = this;
|
|
21647
|
+
|
|
21648
|
+
function ondata(chunk) {
|
|
21649
|
+
if (dest.writable) {
|
|
21650
|
+
if (false === dest.write(chunk) && source.pause) {
|
|
21651
|
+
source.pause();
|
|
21652
|
+
}
|
|
21653
|
+
}
|
|
21654
|
+
}
|
|
21655
|
+
|
|
21656
|
+
source.on('data', ondata);
|
|
21657
|
+
|
|
21658
|
+
function ondrain() {
|
|
21659
|
+
if (source.readable && source.resume) {
|
|
21660
|
+
source.resume();
|
|
21661
|
+
}
|
|
21662
|
+
}
|
|
21663
|
+
|
|
21664
|
+
dest.on('drain', ondrain);
|
|
21665
|
+
|
|
21666
|
+
// If the 'end' option is not supplied, dest.end() will be called when
|
|
21667
|
+
// source gets the 'end' or 'close' events. Only dest.end() once.
|
|
21668
|
+
if (!dest._isStdio && (!options || options.end !== false)) {
|
|
21669
|
+
source.on('end', onend);
|
|
21670
|
+
source.on('close', onclose);
|
|
21671
|
+
}
|
|
21672
|
+
|
|
21673
|
+
var didOnEnd = false;
|
|
21674
|
+
function onend() {
|
|
21675
|
+
if (didOnEnd) return;
|
|
21676
|
+
didOnEnd = true;
|
|
21677
|
+
|
|
21678
|
+
dest.end();
|
|
21679
|
+
}
|
|
21680
|
+
|
|
21681
|
+
|
|
21682
|
+
function onclose() {
|
|
21683
|
+
if (didOnEnd) return;
|
|
21684
|
+
didOnEnd = true;
|
|
21685
|
+
|
|
21686
|
+
if (typeof dest.destroy === 'function') dest.destroy();
|
|
21687
|
+
}
|
|
21688
|
+
|
|
21689
|
+
// don't leave dangling pipes when there are errors.
|
|
21690
|
+
function onerror(er) {
|
|
21691
|
+
cleanup();
|
|
21692
|
+
if (EE.listenerCount(this, 'error') === 0) {
|
|
21693
|
+
throw er; // Unhandled stream error in pipe.
|
|
21694
|
+
}
|
|
21695
|
+
}
|
|
21696
|
+
|
|
21697
|
+
source.on('error', onerror);
|
|
21698
|
+
dest.on('error', onerror);
|
|
21699
|
+
|
|
21700
|
+
// remove all the event listeners that were added.
|
|
21701
|
+
function cleanup() {
|
|
21702
|
+
source.removeListener('data', ondata);
|
|
21703
|
+
dest.removeListener('drain', ondrain);
|
|
21704
|
+
|
|
21705
|
+
source.removeListener('end', onend);
|
|
21706
|
+
source.removeListener('close', onclose);
|
|
21707
|
+
|
|
21708
|
+
source.removeListener('error', onerror);
|
|
21709
|
+
dest.removeListener('error', onerror);
|
|
21710
|
+
|
|
21711
|
+
source.removeListener('end', cleanup);
|
|
21712
|
+
source.removeListener('close', cleanup);
|
|
21713
|
+
|
|
21714
|
+
dest.removeListener('close', cleanup);
|
|
21715
|
+
}
|
|
21716
|
+
|
|
21717
|
+
source.on('end', cleanup);
|
|
21718
|
+
source.on('close', cleanup);
|
|
21719
|
+
|
|
21720
|
+
dest.on('close', cleanup);
|
|
21721
|
+
|
|
21722
|
+
dest.emit('pipe', source);
|
|
21723
|
+
|
|
21724
|
+
// Allow for unix-like usage: A.pipe(B).pipe(C)
|
|
21725
|
+
return dest;
|
|
21726
|
+
};
|
|
21727
|
+
|
|
21728
|
+
},{"events":43,"inherits":49,"readable-stream/duplex.js":65,"readable-stream/passthrough.js":74,"readable-stream/readable.js":75,"readable-stream/transform.js":76,"readable-stream/writable.js":77}],64:[function(require,module,exports){
|
|
21729
|
+
arguments[4][40][0].apply(exports,arguments)
|
|
21730
|
+
},{"dup":40}],65:[function(require,module,exports){
|
|
21731
|
+
module.exports = require('./lib/_stream_duplex.js');
|
|
21732
|
+
|
|
21733
|
+
},{"./lib/_stream_duplex.js":66}],66:[function(require,module,exports){
|
|
21734
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
21735
|
+
//
|
|
21736
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
21737
|
+
// copy of this software and associated documentation files (the
|
|
21738
|
+
// "Software"), to deal in the Software without restriction, including
|
|
21739
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
21740
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
21741
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
21742
|
+
// following conditions:
|
|
21743
|
+
//
|
|
21744
|
+
// The above copyright notice and this permission notice shall be included
|
|
21745
|
+
// in all copies or substantial portions of the Software.
|
|
21746
|
+
//
|
|
21747
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
21748
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
21749
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
21750
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
21751
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21752
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
21753
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21754
|
+
|
|
21755
|
+
// a duplex stream is just a stream that is both readable and writable.
|
|
21756
|
+
// Since JS doesn't have multiple prototypal inheritance, this class
|
|
21757
|
+
// prototypally inherits from Readable, and then parasitically from
|
|
21758
|
+
// Writable.
|
|
21759
|
+
|
|
21760
|
+
'use strict';
|
|
21761
|
+
|
|
21762
|
+
/*<replacement>*/
|
|
21763
|
+
|
|
21764
|
+
var pna = require('process-nextick-args');
|
|
21765
|
+
/*</replacement>*/
|
|
21766
|
+
|
|
21767
|
+
/*<replacement>*/
|
|
21768
|
+
var objectKeys = Object.keys || function (obj) {
|
|
21769
|
+
var keys = [];
|
|
21770
|
+
for (var key in obj) {
|
|
21771
|
+
keys.push(key);
|
|
21772
|
+
}return keys;
|
|
21773
|
+
};
|
|
21774
|
+
/*</replacement>*/
|
|
21775
|
+
|
|
21776
|
+
module.exports = Duplex;
|
|
21777
|
+
|
|
21778
|
+
/*<replacement>*/
|
|
21779
|
+
var util = Object.create(require('core-util-is'));
|
|
21780
|
+
util.inherits = require('inherits');
|
|
21781
|
+
/*</replacement>*/
|
|
21782
|
+
|
|
21783
|
+
var Readable = require('./_stream_readable');
|
|
21784
|
+
var Writable = require('./_stream_writable');
|
|
21785
|
+
|
|
21786
|
+
util.inherits(Duplex, Readable);
|
|
21787
|
+
|
|
21788
|
+
{
|
|
21789
|
+
// avoid scope creep, the keys array can then be collected
|
|
21790
|
+
var keys = objectKeys(Writable.prototype);
|
|
21791
|
+
for (var v = 0; v < keys.length; v++) {
|
|
21792
|
+
var method = keys[v];
|
|
21793
|
+
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
|
21794
|
+
}
|
|
21795
|
+
}
|
|
21796
|
+
|
|
21797
|
+
function Duplex(options) {
|
|
21798
|
+
if (!(this instanceof Duplex)) return new Duplex(options);
|
|
21799
|
+
|
|
21800
|
+
Readable.call(this, options);
|
|
21801
|
+
Writable.call(this, options);
|
|
21802
|
+
|
|
21803
|
+
if (options && options.readable === false) this.readable = false;
|
|
21804
|
+
|
|
21805
|
+
if (options && options.writable === false) this.writable = false;
|
|
21806
|
+
|
|
21807
|
+
this.allowHalfOpen = true;
|
|
21808
|
+
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
|
|
21809
|
+
|
|
21810
|
+
this.once('end', onend);
|
|
21811
|
+
}
|
|
21812
|
+
|
|
21813
|
+
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
|
|
21814
|
+
// making it explicit this property is not enumerable
|
|
21815
|
+
// because otherwise some prototype manipulation in
|
|
21816
|
+
// userland will fail
|
|
21817
|
+
enumerable: false,
|
|
21818
|
+
get: function () {
|
|
21819
|
+
return this._writableState.highWaterMark;
|
|
21820
|
+
}
|
|
21821
|
+
});
|
|
21822
|
+
|
|
21823
|
+
// the no-half-open enforcer
|
|
21824
|
+
function onend() {
|
|
21825
|
+
// if we allow half-open state, or if the writable side ended,
|
|
21826
|
+
// then we're ok.
|
|
21827
|
+
if (this.allowHalfOpen || this._writableState.ended) return;
|
|
21828
|
+
|
|
21829
|
+
// no more data can be written.
|
|
21830
|
+
// But allow more writes to happen in this tick.
|
|
21831
|
+
pna.nextTick(onEndNT, this);
|
|
21832
|
+
}
|
|
21833
|
+
|
|
21834
|
+
function onEndNT(self) {
|
|
21835
|
+
self.end();
|
|
21836
|
+
}
|
|
21837
|
+
|
|
21838
|
+
Object.defineProperty(Duplex.prototype, 'destroyed', {
|
|
21839
|
+
get: function () {
|
|
21840
|
+
if (this._readableState === undefined || this._writableState === undefined) {
|
|
21841
|
+
return false;
|
|
21842
|
+
}
|
|
21843
|
+
return this._readableState.destroyed && this._writableState.destroyed;
|
|
21844
|
+
},
|
|
21845
|
+
set: function (value) {
|
|
21846
|
+
// we ignore the value if the stream
|
|
21847
|
+
// has not been initialized yet
|
|
21848
|
+
if (this._readableState === undefined || this._writableState === undefined) {
|
|
21849
|
+
return;
|
|
21850
|
+
}
|
|
21851
|
+
|
|
21852
|
+
// backward compatibility, the user is explicitly
|
|
21853
|
+
// managing destroyed
|
|
21854
|
+
this._readableState.destroyed = value;
|
|
21855
|
+
this._writableState.destroyed = value;
|
|
21856
|
+
}
|
|
21857
|
+
});
|
|
21858
|
+
|
|
21859
|
+
Duplex.prototype._destroy = function (err, cb) {
|
|
21860
|
+
this.push(null);
|
|
21861
|
+
this.end();
|
|
21862
|
+
|
|
21863
|
+
pna.nextTick(cb, err);
|
|
21864
|
+
};
|
|
21865
|
+
},{"./_stream_readable":68,"./_stream_writable":70,"core-util-is":42,"inherits":49,"process-nextick-args":54}],67:[function(require,module,exports){
|
|
21841
21866
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
21842
21867
|
//
|
|
21843
21868
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -21885,7 +21910,7 @@ function PassThrough(options) {
|
|
|
21885
21910
|
PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
|
21886
21911
|
cb(null, chunk);
|
|
21887
21912
|
};
|
|
21888
|
-
},{"./_stream_transform":
|
|
21913
|
+
},{"./_stream_transform":69,"core-util-is":42,"inherits":49}],68:[function(require,module,exports){
|
|
21889
21914
|
(function (process,global){
|
|
21890
21915
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
21891
21916
|
//
|
|
@@ -21942,7 +21967,7 @@ var Stream = require('./internal/streams/stream');
|
|
|
21942
21967
|
/*<replacement>*/
|
|
21943
21968
|
|
|
21944
21969
|
var Buffer = require('safe-buffer').Buffer;
|
|
21945
|
-
var OurUint8Array =
|
|
21970
|
+
var OurUint8Array = global.Uint8Array || function () {};
|
|
21946
21971
|
function _uint8ArrayToBuffer(chunk) {
|
|
21947
21972
|
return Buffer.from(chunk);
|
|
21948
21973
|
}
|
|
@@ -22512,8 +22537,8 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
|
|
|
22512
22537
|
// also returned false.
|
|
22513
22538
|
// => Check whether `dest` is still a piping destination.
|
|
22514
22539
|
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
|
|
22515
|
-
debug('false write response, pause',
|
|
22516
|
-
|
|
22540
|
+
debug('false write response, pause', src._readableState.awaitDrain);
|
|
22541
|
+
src._readableState.awaitDrain++;
|
|
22517
22542
|
increasedAwaitDrain = true;
|
|
22518
22543
|
}
|
|
22519
22544
|
src.pause();
|
|
@@ -22607,7 +22632,7 @@ Readable.prototype.unpipe = function (dest) {
|
|
|
22607
22632
|
state.flowing = false;
|
|
22608
22633
|
|
|
22609
22634
|
for (var i = 0; i < len; i++) {
|
|
22610
|
-
dests[i].emit('unpipe', this,
|
|
22635
|
+
dests[i].emit('unpipe', this, unpipeInfo);
|
|
22611
22636
|
}return this;
|
|
22612
22637
|
}
|
|
22613
22638
|
|
|
@@ -22907,7 +22932,7 @@ function indexOf(xs, x) {
|
|
|
22907
22932
|
return -1;
|
|
22908
22933
|
}
|
|
22909
22934
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
22910
|
-
},{"./_stream_duplex":
|
|
22935
|
+
},{"./_stream_duplex":66,"./internal/streams/BufferList":71,"./internal/streams/destroy":72,"./internal/streams/stream":73,"_process":55,"core-util-is":42,"events":43,"inherits":49,"isarray":64,"process-nextick-args":54,"safe-buffer":78,"string_decoder/":79,"util":37}],69:[function(require,module,exports){
|
|
22911
22936
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
22912
22937
|
//
|
|
22913
22938
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -23122,7 +23147,7 @@ function done(stream, er, data) {
|
|
|
23122
23147
|
|
|
23123
23148
|
return stream.push(null);
|
|
23124
23149
|
}
|
|
23125
|
-
},{"./_stream_duplex":
|
|
23150
|
+
},{"./_stream_duplex":66,"core-util-is":42,"inherits":49}],70:[function(require,module,exports){
|
|
23126
23151
|
(function (process,global){
|
|
23127
23152
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
23128
23153
|
//
|
|
@@ -23207,7 +23232,7 @@ var Stream = require('./internal/streams/stream');
|
|
|
23207
23232
|
/*<replacement>*/
|
|
23208
23233
|
|
|
23209
23234
|
var Buffer = require('safe-buffer').Buffer;
|
|
23210
|
-
var OurUint8Array =
|
|
23235
|
+
var OurUint8Array = global.Uint8Array || function () {};
|
|
23211
23236
|
function _uint8ArrayToBuffer(chunk) {
|
|
23212
23237
|
return Buffer.from(chunk);
|
|
23213
23238
|
}
|
|
@@ -23475,7 +23500,7 @@ Writable.prototype.uncork = function () {
|
|
|
23475
23500
|
if (state.corked) {
|
|
23476
23501
|
state.corked--;
|
|
23477
23502
|
|
|
23478
|
-
if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
|
23503
|
+
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
|
|
23479
23504
|
}
|
|
23480
23505
|
};
|
|
23481
23506
|
|
|
@@ -23717,7 +23742,7 @@ Writable.prototype.end = function (chunk, encoding, cb) {
|
|
|
23717
23742
|
}
|
|
23718
23743
|
|
|
23719
23744
|
// ignore unnecessary end() calls.
|
|
23720
|
-
if (!state.ending) endWritable(this, state, cb);
|
|
23745
|
+
if (!state.ending && !state.finished) endWritable(this, state, cb);
|
|
23721
23746
|
};
|
|
23722
23747
|
|
|
23723
23748
|
function needFinish(state) {
|
|
@@ -23778,9 +23803,11 @@ function onCorkedFinish(corkReq, state, err) {
|
|
|
23778
23803
|
cb(err);
|
|
23779
23804
|
entry = entry.next;
|
|
23780
23805
|
}
|
|
23781
|
-
|
|
23782
|
-
|
|
23783
|
-
|
|
23806
|
+
if (state.corkedRequestsFree) {
|
|
23807
|
+
state.corkedRequestsFree.next = corkReq;
|
|
23808
|
+
} else {
|
|
23809
|
+
state.corkedRequestsFree = corkReq;
|
|
23810
|
+
}
|
|
23784
23811
|
}
|
|
23785
23812
|
|
|
23786
23813
|
Object.defineProperty(Writable.prototype, 'destroyed', {
|
|
@@ -23810,7 +23837,7 @@ Writable.prototype._destroy = function (err, cb) {
|
|
|
23810
23837
|
cb(err);
|
|
23811
23838
|
};
|
|
23812
23839
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
23813
|
-
},{"./_stream_duplex":
|
|
23840
|
+
},{"./_stream_duplex":66,"./internal/streams/destroy":72,"./internal/streams/stream":73,"_process":55,"core-util-is":42,"inherits":49,"process-nextick-args":54,"safe-buffer":78,"util-deprecate":89}],71:[function(require,module,exports){
|
|
23814
23841
|
'use strict';
|
|
23815
23842
|
|
|
23816
23843
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -23869,6 +23896,7 @@ module.exports = function () {
|
|
|
23869
23896
|
|
|
23870
23897
|
BufferList.prototype.concat = function concat(n) {
|
|
23871
23898
|
if (this.length === 0) return Buffer.alloc(0);
|
|
23899
|
+
if (this.length === 1) return this.head.data;
|
|
23872
23900
|
var ret = Buffer.allocUnsafe(n >>> 0);
|
|
23873
23901
|
var p = this.head;
|
|
23874
23902
|
var i = 0;
|
|
@@ -23889,7 +23917,7 @@ if (util && util.inspect && util.inspect.custom) {
|
|
|
23889
23917
|
return this.constructor.name + ' ' + obj;
|
|
23890
23918
|
};
|
|
23891
23919
|
}
|
|
23892
|
-
},{"safe-buffer":
|
|
23920
|
+
},{"safe-buffer":78,"util":37}],72:[function(require,module,exports){
|
|
23893
23921
|
'use strict';
|
|
23894
23922
|
|
|
23895
23923
|
/*<replacement>*/
|
|
@@ -23907,15 +23935,9 @@ function destroy(err, cb) {
|
|
|
23907
23935
|
if (readableDestroyed || writableDestroyed) {
|
|
23908
23936
|
if (cb) {
|
|
23909
23937
|
cb(err);
|
|
23910
|
-
} else if (err) {
|
|
23911
|
-
|
|
23912
|
-
pna.nextTick(emitErrorNT, this, err);
|
|
23913
|
-
} else if (!this._writableState.errorEmitted) {
|
|
23914
|
-
this._writableState.errorEmitted = true;
|
|
23915
|
-
pna.nextTick(emitErrorNT, this, err);
|
|
23916
|
-
}
|
|
23938
|
+
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
|
|
23939
|
+
pna.nextTick(emitErrorNT, this, err);
|
|
23917
23940
|
}
|
|
23918
|
-
|
|
23919
23941
|
return this;
|
|
23920
23942
|
}
|
|
23921
23943
|
|
|
@@ -23933,11 +23955,9 @@ function destroy(err, cb) {
|
|
|
23933
23955
|
|
|
23934
23956
|
this._destroy(err || null, function (err) {
|
|
23935
23957
|
if (!cb && err) {
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
} else if (!_this._writableState.errorEmitted) {
|
|
23958
|
+
pna.nextTick(emitErrorNT, _this, err);
|
|
23959
|
+
if (_this._writableState) {
|
|
23939
23960
|
_this._writableState.errorEmitted = true;
|
|
23940
|
-
pna.nextTick(emitErrorNT, _this, err);
|
|
23941
23961
|
}
|
|
23942
23962
|
} else if (cb) {
|
|
23943
23963
|
cb(err);
|
|
@@ -23959,8 +23979,6 @@ function undestroy() {
|
|
|
23959
23979
|
this._writableState.destroyed = false;
|
|
23960
23980
|
this._writableState.ended = false;
|
|
23961
23981
|
this._writableState.ending = false;
|
|
23962
|
-
this._writableState.finalCalled = false;
|
|
23963
|
-
this._writableState.prefinished = false;
|
|
23964
23982
|
this._writableState.finished = false;
|
|
23965
23983
|
this._writableState.errorEmitted = false;
|
|
23966
23984
|
}
|
|
@@ -23974,41 +23992,28 @@ module.exports = {
|
|
|
23974
23992
|
destroy: destroy,
|
|
23975
23993
|
undestroy: undestroy
|
|
23976
23994
|
};
|
|
23977
|
-
},{"process-nextick-args":54}],
|
|
23995
|
+
},{"process-nextick-args":54}],73:[function(require,module,exports){
|
|
23978
23996
|
module.exports = require('events').EventEmitter;
|
|
23979
23997
|
|
|
23980
|
-
},{"events":
|
|
23981
|
-
|
|
23982
|
-
// implementation from standard node.js 'util' module
|
|
23983
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
23984
|
-
if (superCtor) {
|
|
23985
|
-
ctor.super_ = superCtor
|
|
23986
|
-
ctor.prototype = Object.create(superCtor.prototype, {
|
|
23987
|
-
constructor: {
|
|
23988
|
-
value: ctor,
|
|
23989
|
-
enumerable: false,
|
|
23990
|
-
writable: true,
|
|
23991
|
-
configurable: true
|
|
23992
|
-
}
|
|
23993
|
-
})
|
|
23994
|
-
}
|
|
23995
|
-
};
|
|
23996
|
-
} else {
|
|
23997
|
-
// old school shim for old browsers
|
|
23998
|
-
module.exports = function inherits(ctor, superCtor) {
|
|
23999
|
-
if (superCtor) {
|
|
24000
|
-
ctor.super_ = superCtor
|
|
24001
|
-
var TempCtor = function () {}
|
|
24002
|
-
TempCtor.prototype = superCtor.prototype
|
|
24003
|
-
ctor.prototype = new TempCtor()
|
|
24004
|
-
ctor.prototype.constructor = ctor
|
|
24005
|
-
}
|
|
24006
|
-
}
|
|
24007
|
-
}
|
|
23998
|
+
},{"events":43}],74:[function(require,module,exports){
|
|
23999
|
+
module.exports = require('./readable').PassThrough
|
|
24008
24000
|
|
|
24009
|
-
},{}],
|
|
24010
|
-
|
|
24011
|
-
|
|
24001
|
+
},{"./readable":75}],75:[function(require,module,exports){
|
|
24002
|
+
exports = module.exports = require('./lib/_stream_readable.js');
|
|
24003
|
+
exports.Stream = exports;
|
|
24004
|
+
exports.Readable = exports;
|
|
24005
|
+
exports.Writable = require('./lib/_stream_writable.js');
|
|
24006
|
+
exports.Duplex = require('./lib/_stream_duplex.js');
|
|
24007
|
+
exports.Transform = require('./lib/_stream_transform.js');
|
|
24008
|
+
exports.PassThrough = require('./lib/_stream_passthrough.js');
|
|
24009
|
+
|
|
24010
|
+
},{"./lib/_stream_duplex.js":66,"./lib/_stream_passthrough.js":67,"./lib/_stream_readable.js":68,"./lib/_stream_transform.js":69,"./lib/_stream_writable.js":70}],76:[function(require,module,exports){
|
|
24011
|
+
module.exports = require('./readable').Transform
|
|
24012
|
+
|
|
24013
|
+
},{"./readable":75}],77:[function(require,module,exports){
|
|
24014
|
+
module.exports = require('./lib/_stream_writable.js');
|
|
24015
|
+
|
|
24016
|
+
},{"./lib/_stream_writable.js":70}],78:[function(require,module,exports){
|
|
24012
24017
|
/* eslint-disable node/no-deprecated-api */
|
|
24013
24018
|
var buffer = require('buffer')
|
|
24014
24019
|
var Buffer = buffer.Buffer
|
|
@@ -24072,7 +24077,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
|
|
|
24072
24077
|
return buffer.SlowBuffer(size)
|
|
24073
24078
|
}
|
|
24074
24079
|
|
|
24075
|
-
},{"buffer":39}],
|
|
24080
|
+
},{"buffer":39}],79:[function(require,module,exports){
|
|
24076
24081
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
24077
24082
|
//
|
|
24078
24083
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -24369,181 +24374,7 @@ function simpleWrite(buf) {
|
|
|
24369
24374
|
function simpleEnd(buf) {
|
|
24370
24375
|
return buf && buf.length ? this.write(buf) : '';
|
|
24371
24376
|
}
|
|
24372
|
-
},{"safe-buffer":
|
|
24373
|
-
module.exports = require('./readable').PassThrough
|
|
24374
|
-
|
|
24375
|
-
},{"./readable":76}],76:[function(require,module,exports){
|
|
24376
|
-
exports = module.exports = require('./lib/_stream_readable.js');
|
|
24377
|
-
exports.Stream = exports;
|
|
24378
|
-
exports.Readable = exports;
|
|
24379
|
-
exports.Writable = require('./lib/_stream_writable.js');
|
|
24380
|
-
exports.Duplex = require('./lib/_stream_duplex.js');
|
|
24381
|
-
exports.Transform = require('./lib/_stream_transform.js');
|
|
24382
|
-
exports.PassThrough = require('./lib/_stream_passthrough.js');
|
|
24383
|
-
|
|
24384
|
-
},{"./lib/_stream_duplex.js":63,"./lib/_stream_passthrough.js":64,"./lib/_stream_readable.js":65,"./lib/_stream_transform.js":66,"./lib/_stream_writable.js":67}],77:[function(require,module,exports){
|
|
24385
|
-
module.exports = require('./readable').Transform
|
|
24386
|
-
|
|
24387
|
-
},{"./readable":76}],78:[function(require,module,exports){
|
|
24388
|
-
module.exports = require('./lib/_stream_writable.js');
|
|
24389
|
-
|
|
24390
|
-
},{"./lib/_stream_writable.js":67}],79:[function(require,module,exports){
|
|
24391
|
-
|
|
24392
|
-
/**
|
|
24393
|
-
* Reduce `arr` with `fn`.
|
|
24394
|
-
*
|
|
24395
|
-
* @param {Array} arr
|
|
24396
|
-
* @param {Function} fn
|
|
24397
|
-
* @param {Mixed} initial
|
|
24398
|
-
*
|
|
24399
|
-
* TODO: combatible error handling?
|
|
24400
|
-
*/
|
|
24401
|
-
|
|
24402
|
-
module.exports = function(arr, fn, initial){
|
|
24403
|
-
var idx = 0;
|
|
24404
|
-
var len = arr.length;
|
|
24405
|
-
var curr = arguments.length == 3
|
|
24406
|
-
? initial
|
|
24407
|
-
: arr[idx++];
|
|
24408
|
-
|
|
24409
|
-
while (idx < len) {
|
|
24410
|
-
curr = fn.call(null, curr, arr[idx], ++idx, arr);
|
|
24411
|
-
}
|
|
24412
|
-
|
|
24413
|
-
return curr;
|
|
24414
|
-
};
|
|
24415
|
-
},{}],80:[function(require,module,exports){
|
|
24416
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
24417
|
-
//
|
|
24418
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
24419
|
-
// copy of this software and associated documentation files (the
|
|
24420
|
-
// "Software"), to deal in the Software without restriction, including
|
|
24421
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
24422
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
24423
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
24424
|
-
// following conditions:
|
|
24425
|
-
//
|
|
24426
|
-
// The above copyright notice and this permission notice shall be included
|
|
24427
|
-
// in all copies or substantial portions of the Software.
|
|
24428
|
-
//
|
|
24429
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
24430
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
24431
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
24432
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
24433
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
24434
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
24435
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
24436
|
-
|
|
24437
|
-
module.exports = Stream;
|
|
24438
|
-
|
|
24439
|
-
var EE = require('events').EventEmitter;
|
|
24440
|
-
var inherits = require('inherits');
|
|
24441
|
-
|
|
24442
|
-
inherits(Stream, EE);
|
|
24443
|
-
Stream.Readable = require('readable-stream/readable.js');
|
|
24444
|
-
Stream.Writable = require('readable-stream/writable.js');
|
|
24445
|
-
Stream.Duplex = require('readable-stream/duplex.js');
|
|
24446
|
-
Stream.Transform = require('readable-stream/transform.js');
|
|
24447
|
-
Stream.PassThrough = require('readable-stream/passthrough.js');
|
|
24448
|
-
|
|
24449
|
-
// Backwards-compat with node 0.4.x
|
|
24450
|
-
Stream.Stream = Stream;
|
|
24451
|
-
|
|
24452
|
-
|
|
24453
|
-
|
|
24454
|
-
// old-style streams. Note that the pipe method (the only relevant
|
|
24455
|
-
// part of this class) is overridden in the Readable class.
|
|
24456
|
-
|
|
24457
|
-
function Stream() {
|
|
24458
|
-
EE.call(this);
|
|
24459
|
-
}
|
|
24460
|
-
|
|
24461
|
-
Stream.prototype.pipe = function(dest, options) {
|
|
24462
|
-
var source = this;
|
|
24463
|
-
|
|
24464
|
-
function ondata(chunk) {
|
|
24465
|
-
if (dest.writable) {
|
|
24466
|
-
if (false === dest.write(chunk) && source.pause) {
|
|
24467
|
-
source.pause();
|
|
24468
|
-
}
|
|
24469
|
-
}
|
|
24470
|
-
}
|
|
24471
|
-
|
|
24472
|
-
source.on('data', ondata);
|
|
24473
|
-
|
|
24474
|
-
function ondrain() {
|
|
24475
|
-
if (source.readable && source.resume) {
|
|
24476
|
-
source.resume();
|
|
24477
|
-
}
|
|
24478
|
-
}
|
|
24479
|
-
|
|
24480
|
-
dest.on('drain', ondrain);
|
|
24481
|
-
|
|
24482
|
-
// If the 'end' option is not supplied, dest.end() will be called when
|
|
24483
|
-
// source gets the 'end' or 'close' events. Only dest.end() once.
|
|
24484
|
-
if (!dest._isStdio && (!options || options.end !== false)) {
|
|
24485
|
-
source.on('end', onend);
|
|
24486
|
-
source.on('close', onclose);
|
|
24487
|
-
}
|
|
24488
|
-
|
|
24489
|
-
var didOnEnd = false;
|
|
24490
|
-
function onend() {
|
|
24491
|
-
if (didOnEnd) return;
|
|
24492
|
-
didOnEnd = true;
|
|
24493
|
-
|
|
24494
|
-
dest.end();
|
|
24495
|
-
}
|
|
24496
|
-
|
|
24497
|
-
|
|
24498
|
-
function onclose() {
|
|
24499
|
-
if (didOnEnd) return;
|
|
24500
|
-
didOnEnd = true;
|
|
24501
|
-
|
|
24502
|
-
if (typeof dest.destroy === 'function') dest.destroy();
|
|
24503
|
-
}
|
|
24504
|
-
|
|
24505
|
-
// don't leave dangling pipes when there are errors.
|
|
24506
|
-
function onerror(er) {
|
|
24507
|
-
cleanup();
|
|
24508
|
-
if (EE.listenerCount(this, 'error') === 0) {
|
|
24509
|
-
throw er; // Unhandled stream error in pipe.
|
|
24510
|
-
}
|
|
24511
|
-
}
|
|
24512
|
-
|
|
24513
|
-
source.on('error', onerror);
|
|
24514
|
-
dest.on('error', onerror);
|
|
24515
|
-
|
|
24516
|
-
// remove all the event listeners that were added.
|
|
24517
|
-
function cleanup() {
|
|
24518
|
-
source.removeListener('data', ondata);
|
|
24519
|
-
dest.removeListener('drain', ondrain);
|
|
24520
|
-
|
|
24521
|
-
source.removeListener('end', onend);
|
|
24522
|
-
source.removeListener('close', onclose);
|
|
24523
|
-
|
|
24524
|
-
source.removeListener('error', onerror);
|
|
24525
|
-
dest.removeListener('error', onerror);
|
|
24526
|
-
|
|
24527
|
-
source.removeListener('end', cleanup);
|
|
24528
|
-
source.removeListener('close', cleanup);
|
|
24529
|
-
|
|
24530
|
-
dest.removeListener('close', cleanup);
|
|
24531
|
-
}
|
|
24532
|
-
|
|
24533
|
-
source.on('end', cleanup);
|
|
24534
|
-
source.on('close', cleanup);
|
|
24535
|
-
|
|
24536
|
-
dest.on('close', cleanup);
|
|
24537
|
-
|
|
24538
|
-
dest.emit('pipe', source);
|
|
24539
|
-
|
|
24540
|
-
// Allow for unix-like usage: A.pipe(B).pipe(C)
|
|
24541
|
-
return dest;
|
|
24542
|
-
};
|
|
24543
|
-
|
|
24544
|
-
},{"events":44,"inherits":81,"readable-stream/duplex.js":62,"readable-stream/passthrough.js":75,"readable-stream/readable.js":76,"readable-stream/transform.js":77,"readable-stream/writable.js":78}],81:[function(require,module,exports){
|
|
24545
|
-
arguments[4][71][0].apply(exports,arguments)
|
|
24546
|
-
},{"dup":71}],82:[function(require,module,exports){
|
|
24377
|
+
},{"safe-buffer":78}],80:[function(require,module,exports){
|
|
24547
24378
|
var ClientRequest = require('./lib/request')
|
|
24548
24379
|
var extend = require('xtend')
|
|
24549
24380
|
var statusCodes = require('builtin-status-codes')
|
|
@@ -24618,7 +24449,7 @@ http.METHODS = [
|
|
|
24618
24449
|
'UNLOCK',
|
|
24619
24450
|
'UNSUBSCRIBE'
|
|
24620
24451
|
]
|
|
24621
|
-
},{"./lib/request":
|
|
24452
|
+
},{"./lib/request":82,"builtin-status-codes":41,"url":88,"xtend":92}],81:[function(require,module,exports){
|
|
24622
24453
|
(function (global){
|
|
24623
24454
|
exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableByteStream)
|
|
24624
24455
|
|
|
@@ -24662,7 +24493,7 @@ function isFunction (value) {
|
|
|
24662
24493
|
xhr = null // Help gc
|
|
24663
24494
|
|
|
24664
24495
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
24665
|
-
},{}],
|
|
24496
|
+
},{}],82:[function(require,module,exports){
|
|
24666
24497
|
(function (process,global,Buffer){
|
|
24667
24498
|
// var Base64 = require('Base64')
|
|
24668
24499
|
var capability = require('./capability')
|
|
@@ -24944,7 +24775,7 @@ var unsafeHeaders = [
|
|
|
24944
24775
|
]
|
|
24945
24776
|
|
|
24946
24777
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
24947
|
-
},{"./capability":
|
|
24778
|
+
},{"./capability":81,"./response":83,"_process":55,"buffer":39,"foreach":45,"indexof":48,"inherits":49,"object-keys":51,"stream":63}],83:[function(require,module,exports){
|
|
24948
24779
|
(function (process,global,Buffer){
|
|
24949
24780
|
var capability = require('./capability')
|
|
24950
24781
|
var foreach = require('foreach')
|
|
@@ -25121,9 +24952,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
|
|
|
25121
24952
|
}
|
|
25122
24953
|
|
|
25123
24954
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
|
|
25124
|
-
},{"./capability":
|
|
25125
|
-
arguments[4][71][0].apply(exports,arguments)
|
|
25126
|
-
},{"dup":71}],87:[function(require,module,exports){
|
|
24955
|
+
},{"./capability":81,"_process":55,"buffer":39,"foreach":45,"inherits":49,"stream":63}],84:[function(require,module,exports){
|
|
25127
24956
|
var nargs = /\{([0-9a-zA-Z_]+)\}/g
|
|
25128
24957
|
|
|
25129
24958
|
module.exports = template
|
|
@@ -25161,7 +24990,7 @@ function template(string) {
|
|
|
25161
24990
|
})
|
|
25162
24991
|
}
|
|
25163
24992
|
|
|
25164
|
-
},{}],
|
|
24993
|
+
},{}],85:[function(require,module,exports){
|
|
25165
24994
|
/**
|
|
25166
24995
|
* Module dependencies.
|
|
25167
24996
|
*/
|
|
@@ -26354,7 +26183,172 @@ request.put = function(url, data, fn){
|
|
|
26354
26183
|
|
|
26355
26184
|
module.exports = request;
|
|
26356
26185
|
|
|
26357
|
-
},{"emitter":
|
|
26186
|
+
},{"emitter":86,"reduce":62}],86:[function(require,module,exports){
|
|
26187
|
+
|
|
26188
|
+
/**
|
|
26189
|
+
* Expose `Emitter`.
|
|
26190
|
+
*/
|
|
26191
|
+
|
|
26192
|
+
if (typeof module !== 'undefined') {
|
|
26193
|
+
module.exports = Emitter;
|
|
26194
|
+
}
|
|
26195
|
+
|
|
26196
|
+
/**
|
|
26197
|
+
* Initialize a new `Emitter`.
|
|
26198
|
+
*
|
|
26199
|
+
* @api public
|
|
26200
|
+
*/
|
|
26201
|
+
|
|
26202
|
+
function Emitter(obj) {
|
|
26203
|
+
if (obj) return mixin(obj);
|
|
26204
|
+
};
|
|
26205
|
+
|
|
26206
|
+
/**
|
|
26207
|
+
* Mixin the emitter properties.
|
|
26208
|
+
*
|
|
26209
|
+
* @param {Object} obj
|
|
26210
|
+
* @return {Object}
|
|
26211
|
+
* @api private
|
|
26212
|
+
*/
|
|
26213
|
+
|
|
26214
|
+
function mixin(obj) {
|
|
26215
|
+
for (var key in Emitter.prototype) {
|
|
26216
|
+
obj[key] = Emitter.prototype[key];
|
|
26217
|
+
}
|
|
26218
|
+
return obj;
|
|
26219
|
+
}
|
|
26220
|
+
|
|
26221
|
+
/**
|
|
26222
|
+
* Listen on the given `event` with `fn`.
|
|
26223
|
+
*
|
|
26224
|
+
* @param {String} event
|
|
26225
|
+
* @param {Function} fn
|
|
26226
|
+
* @return {Emitter}
|
|
26227
|
+
* @api public
|
|
26228
|
+
*/
|
|
26229
|
+
|
|
26230
|
+
Emitter.prototype.on =
|
|
26231
|
+
Emitter.prototype.addEventListener = function(event, fn){
|
|
26232
|
+
this._callbacks = this._callbacks || {};
|
|
26233
|
+
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
26234
|
+
.push(fn);
|
|
26235
|
+
return this;
|
|
26236
|
+
};
|
|
26237
|
+
|
|
26238
|
+
/**
|
|
26239
|
+
* Adds an `event` listener that will be invoked a single
|
|
26240
|
+
* time then automatically removed.
|
|
26241
|
+
*
|
|
26242
|
+
* @param {String} event
|
|
26243
|
+
* @param {Function} fn
|
|
26244
|
+
* @return {Emitter}
|
|
26245
|
+
* @api public
|
|
26246
|
+
*/
|
|
26247
|
+
|
|
26248
|
+
Emitter.prototype.once = function(event, fn){
|
|
26249
|
+
function on() {
|
|
26250
|
+
this.off(event, on);
|
|
26251
|
+
fn.apply(this, arguments);
|
|
26252
|
+
}
|
|
26253
|
+
|
|
26254
|
+
on.fn = fn;
|
|
26255
|
+
this.on(event, on);
|
|
26256
|
+
return this;
|
|
26257
|
+
};
|
|
26258
|
+
|
|
26259
|
+
/**
|
|
26260
|
+
* Remove the given callback for `event` or all
|
|
26261
|
+
* registered callbacks.
|
|
26262
|
+
*
|
|
26263
|
+
* @param {String} event
|
|
26264
|
+
* @param {Function} fn
|
|
26265
|
+
* @return {Emitter}
|
|
26266
|
+
* @api public
|
|
26267
|
+
*/
|
|
26268
|
+
|
|
26269
|
+
Emitter.prototype.off =
|
|
26270
|
+
Emitter.prototype.removeListener =
|
|
26271
|
+
Emitter.prototype.removeAllListeners =
|
|
26272
|
+
Emitter.prototype.removeEventListener = function(event, fn){
|
|
26273
|
+
this._callbacks = this._callbacks || {};
|
|
26274
|
+
|
|
26275
|
+
// all
|
|
26276
|
+
if (0 == arguments.length) {
|
|
26277
|
+
this._callbacks = {};
|
|
26278
|
+
return this;
|
|
26279
|
+
}
|
|
26280
|
+
|
|
26281
|
+
// specific event
|
|
26282
|
+
var callbacks = this._callbacks['$' + event];
|
|
26283
|
+
if (!callbacks) return this;
|
|
26284
|
+
|
|
26285
|
+
// remove all handlers
|
|
26286
|
+
if (1 == arguments.length) {
|
|
26287
|
+
delete this._callbacks['$' + event];
|
|
26288
|
+
return this;
|
|
26289
|
+
}
|
|
26290
|
+
|
|
26291
|
+
// remove specific handler
|
|
26292
|
+
var cb;
|
|
26293
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
26294
|
+
cb = callbacks[i];
|
|
26295
|
+
if (cb === fn || cb.fn === fn) {
|
|
26296
|
+
callbacks.splice(i, 1);
|
|
26297
|
+
break;
|
|
26298
|
+
}
|
|
26299
|
+
}
|
|
26300
|
+
return this;
|
|
26301
|
+
};
|
|
26302
|
+
|
|
26303
|
+
/**
|
|
26304
|
+
* Emit `event` with the given args.
|
|
26305
|
+
*
|
|
26306
|
+
* @param {String} event
|
|
26307
|
+
* @param {Mixed} ...
|
|
26308
|
+
* @return {Emitter}
|
|
26309
|
+
*/
|
|
26310
|
+
|
|
26311
|
+
Emitter.prototype.emit = function(event){
|
|
26312
|
+
this._callbacks = this._callbacks || {};
|
|
26313
|
+
var args = [].slice.call(arguments, 1)
|
|
26314
|
+
, callbacks = this._callbacks['$' + event];
|
|
26315
|
+
|
|
26316
|
+
if (callbacks) {
|
|
26317
|
+
callbacks = callbacks.slice(0);
|
|
26318
|
+
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
26319
|
+
callbacks[i].apply(this, args);
|
|
26320
|
+
}
|
|
26321
|
+
}
|
|
26322
|
+
|
|
26323
|
+
return this;
|
|
26324
|
+
};
|
|
26325
|
+
|
|
26326
|
+
/**
|
|
26327
|
+
* Return array of callbacks for `event`.
|
|
26328
|
+
*
|
|
26329
|
+
* @param {String} event
|
|
26330
|
+
* @return {Array}
|
|
26331
|
+
* @api public
|
|
26332
|
+
*/
|
|
26333
|
+
|
|
26334
|
+
Emitter.prototype.listeners = function(event){
|
|
26335
|
+
this._callbacks = this._callbacks || {};
|
|
26336
|
+
return this._callbacks['$' + event] || [];
|
|
26337
|
+
};
|
|
26338
|
+
|
|
26339
|
+
/**
|
|
26340
|
+
* Check if this emitter has `event` handlers.
|
|
26341
|
+
*
|
|
26342
|
+
* @param {String} event
|
|
26343
|
+
* @return {Boolean}
|
|
26344
|
+
* @api public
|
|
26345
|
+
*/
|
|
26346
|
+
|
|
26347
|
+
Emitter.prototype.hasListeners = function(event){
|
|
26348
|
+
return !! this.listeners(event).length;
|
|
26349
|
+
};
|
|
26350
|
+
|
|
26351
|
+
},{}],87:[function(require,module,exports){
|
|
26358
26352
|
(function (Buffer){
|
|
26359
26353
|
"0.50.0";
|
|
26360
26354
|
/*
|
|
@@ -34551,7 +34545,7 @@ TinCan client library
|
|
|
34551
34545
|
}());
|
|
34552
34546
|
|
|
34553
34547
|
}).call(this,require("buffer").Buffer)
|
|
34554
|
-
},{"buffer":39,"querystring":61,"xhr2":
|
|
34548
|
+
},{"buffer":39,"querystring":61,"xhr2":91}],88:[function(require,module,exports){
|
|
34555
34549
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
34556
34550
|
//
|
|
34557
34551
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -35260,7 +35254,7 @@ function isNullOrUndefined(arg) {
|
|
|
35260
35254
|
return arg == null;
|
|
35261
35255
|
}
|
|
35262
35256
|
|
|
35263
|
-
},{"punycode":57,"querystring":61}],
|
|
35257
|
+
},{"punycode":57,"querystring":61}],89:[function(require,module,exports){
|
|
35264
35258
|
(function (global){
|
|
35265
35259
|
|
|
35266
35260
|
/**
|
|
@@ -35331,7 +35325,7 @@ function config (name) {
|
|
|
35331
35325
|
}
|
|
35332
35326
|
|
|
35333
35327
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
35334
|
-
},{}],
|
|
35328
|
+
},{}],90:[function(require,module,exports){
|
|
35335
35329
|
/*!
|
|
35336
35330
|
* validate.js 0.9.0
|
|
35337
35331
|
*
|
|
@@ -36419,7 +36413,7 @@ function config (name) {
|
|
|
36419
36413
|
typeof module !== 'undefined' ? /* istanbul ignore next */ module : null,
|
|
36420
36414
|
typeof define !== 'undefined' ? /* istanbul ignore next */ define : null);
|
|
36421
36415
|
|
|
36422
|
-
},{}],
|
|
36416
|
+
},{}],91:[function(require,module,exports){
|
|
36423
36417
|
(function (process,Buffer){
|
|
36424
36418
|
// Generated by CoffeeScript 1.6.3
|
|
36425
36419
|
(function() {
|
|
@@ -37257,7 +37251,7 @@ function config (name) {
|
|
|
37257
37251
|
}).call(this);
|
|
37258
37252
|
|
|
37259
37253
|
}).call(this,require('_process'),require("buffer").Buffer)
|
|
37260
|
-
},{"_process":55,"buffer":39,"http":
|
|
37254
|
+
},{"_process":55,"buffer":39,"http":80,"https":46,"os":53,"url":88}],92:[function(require,module,exports){
|
|
37261
37255
|
module.exports = extend
|
|
37262
37256
|
|
|
37263
37257
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|