slnodejs 6.1.564 → 6.1.574
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/browser-agent/dist/browser-agent-all.js +53 -10
- package/browser-agent/dist/browser-agent-all.min.js +2 -2
- package/browser-agent/package.json +1 -1
- package/package.json +1 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js +2 -1
- package/tsOutputs/build-scanner/instrumentation/instrumented-file-size-reducer.js.map +1 -1
- package/tsOutputs/cli-parse/executors/base-executor.js +2 -1
- package/tsOutputs/cli-parse/executors/base-executor.js.map +1 -1
- package/tsOutputs/common/agent-events/agent-events-controller.js +4 -0
- package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
- package/tsOutputs/common/http/backend-proxy.js +4 -0
- package/tsOutputs/common/http/backend-proxy.js.map +1 -1
- package/tsOutputs/common/http/contracts.d.ts +19 -1
- package/tsOutputs/common/http/contracts.js +8 -0
- package/tsOutputs/common/http/contracts.js.map +1 -1
- package/tsOutputs/common/http/http-client.js +13 -4
- package/tsOutputs/common/http/http-client.js.map +1 -1
- package/tsOutputs/mocha-reporter/constants.js +9 -8
- package/tsOutputs/mocha-reporter/constants.js.map +1 -1
- package/tsOutputs/mocha-reporter/index.js +71 -49
- package/tsOutputs/mocha-reporter/index.js.map +1 -1
- package/tsOutputs/test-listener/api.js +19 -4
- package/tsOutputs/test-listener/api.js.map +1 -1
|
@@ -29132,7 +29132,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
29132
29132
|
"use strict";
|
|
29133
29133
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29134
29134
|
exports.SL_AGENT_TYPE = exports.SL_AGENT_VERSION = void 0;
|
|
29135
|
-
exports.SL_AGENT_VERSION = '6.1.
|
|
29135
|
+
exports.SL_AGENT_VERSION = '6.1.574';
|
|
29136
29136
|
exports.SL_AGENT_TYPE = 'browser';
|
|
29137
29137
|
});
|
|
29138
29138
|
|
|
@@ -31357,6 +31357,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31357
31357
|
buildSessionId: (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.buildSessionId,
|
|
31358
31358
|
agentType: agent_events_contracts_1.AgentTypes.BROWSER_AGENT,
|
|
31359
31359
|
agentTechnology: agent_events_contracts_1.AgentTechnologies.BROWSER,
|
|
31360
|
+
labId: configuration.labId,
|
|
31361
|
+
appName: configuration.appName,
|
|
31362
|
+
branchName: configuration.branchName,
|
|
31363
|
+
buildName: configuration.buildName,
|
|
31360
31364
|
});
|
|
31361
31365
|
}
|
|
31362
31366
|
sendHttpRequest(request, onSuccess, onError, contentType) {
|
|
@@ -31364,7 +31368,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31364
31368
|
try {
|
|
31365
31369
|
this.requestsInProgress++;
|
|
31366
31370
|
const httpRequest = new http_request_1.HttpRequest();
|
|
31367
|
-
httpRequest.headers = this.getHeaders(request.url, contentType);
|
|
31371
|
+
httpRequest.headers = this.getHeaders(request.url, contentType, request.data);
|
|
31368
31372
|
httpRequest.url = request.url;
|
|
31369
31373
|
httpRequest.httpMethod = request.httpMethod;
|
|
31370
31374
|
httpRequest.async = request.async;
|
|
@@ -31422,12 +31426,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31422
31426
|
hasRequestsInProgress() {
|
|
31423
31427
|
return this.requestsInProgress > 0;
|
|
31424
31428
|
}
|
|
31425
|
-
|
|
31426
|
-
|
|
31429
|
+
createMetadataHeaders(messageType) {
|
|
31430
|
+
return [
|
|
31431
|
+
{ name: contracts_1.SealightsHeaderNames.LAB_ID, value: this.metadata.labId },
|
|
31432
|
+
{ name: contracts_1.SealightsHeaderNames.BRANCH_NAME, value: this.metadata.branchName },
|
|
31433
|
+
{ name: contracts_1.SealightsHeaderNames.BUILD_NAME, value: this.metadata.buildName },
|
|
31434
|
+
{ name: contracts_1.SealightsHeaderNames.BSID, value: this.metadata.buildSessionId },
|
|
31435
|
+
{ name: contracts_1.SealightsHeaderNames.EXECUTION_ID, value: this.metadata.executionId },
|
|
31436
|
+
{ name: contracts_1.SealightsHeaderNames.AGENT_ID, value: this.metadata.agentId },
|
|
31437
|
+
{ name: contracts_1.SealightsHeaderNames.APP_NAME, value: this.metadata.appName },
|
|
31438
|
+
{ name: contracts_1.SealightsHeaderNames.MESSAGE_TYPE, value: messageType },
|
|
31439
|
+
];
|
|
31440
|
+
}
|
|
31441
|
+
getHeaders(url, contentType, requestData) {
|
|
31442
|
+
var _a, _b, _c, _d;
|
|
31427
31443
|
const headers = [{ name: contracts_1.SealightsHeaderNames.CONTENT_TYPE, value: (contentType || contracts_1.ContentType.JSON) }];
|
|
31428
31444
|
headers.push({ name: contracts_1.SealightsHeaderNames.META_DATA, value: JSON.stringify(this.metadata) });
|
|
31429
|
-
|
|
31430
|
-
|
|
31445
|
+
const messageType = (_b = (_a = requestData === null || requestData === void 0 ? void 0 : requestData.events) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.type;
|
|
31446
|
+
headers.push(...this.createMetadataHeaders(messageType));
|
|
31447
|
+
if ((_c = this === null || this === void 0 ? void 0 : this.configuration) === null || _c === void 0 ? void 0 : _c.token) {
|
|
31448
|
+
headers.push({ name: contracts_1.SealightsHeaderNames.AUTHOTIZARTION, value: 'Bearer ' + ((_d = this === null || this === void 0 ? void 0 : this.configuration) === null || _d === void 0 ? void 0 : _d.token) });
|
|
31431
31449
|
}
|
|
31432
31450
|
if (this.shouldAddCollectorRelatedHeaders(url)) {
|
|
31433
31451
|
headers.push({ name: contracts_1.SealightsHeaderNames.MODE, value: contracts_1.SealightsHaderValues.LIGHT_AGENT_MODE });
|
|
@@ -32215,6 +32233,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32215
32233
|
server: this._agentConfig.server.value,
|
|
32216
32234
|
compressRequests: this._agentConfig.gzip.value,
|
|
32217
32235
|
buildSessionId: this._agentConfig.buildSessionId.value,
|
|
32236
|
+
labId: this._agentConfig.labId.value,
|
|
32237
|
+
appName: this._agentConfig.appName.value,
|
|
32238
|
+
buildName: this._agentConfig.build.value,
|
|
32239
|
+
branchName: this._agentConfig.branch.value
|
|
32218
32240
|
};
|
|
32219
32241
|
return new backend_proxy_1.BackendProxy(this._agentInstanceData, httpConfig, this._logger);
|
|
32220
32242
|
}
|
|
@@ -35806,6 +35828,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
35806
35828
|
this.config = config;
|
|
35807
35829
|
this.logger = logger;
|
|
35808
35830
|
const metadata = {
|
|
35831
|
+
labId: config.labId,
|
|
35832
|
+
appName: config.appName,
|
|
35833
|
+
branchName: config.branchName,
|
|
35834
|
+
buildName: config.buildName,
|
|
35809
35835
|
agentId: agentInstanceData.agentId,
|
|
35810
35836
|
buildSessionId: config.buildSessionId,
|
|
35811
35837
|
agentType: agentInstanceData.agentType,
|
|
@@ -36228,6 +36254,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36228
36254
|
SealightsHeaderNames["AUTHOTIZARTION"] = "Authorization";
|
|
36229
36255
|
SealightsHeaderNames["MODE"] = "X-Sealights-Agent-Mode";
|
|
36230
36256
|
SealightsHeaderNames["META_DATA"] = "sl-metadata";
|
|
36257
|
+
SealightsHeaderNames["LAB_ID"] = "x-sl-labId";
|
|
36258
|
+
SealightsHeaderNames["APP_NAME"] = "x-sl-appName";
|
|
36259
|
+
SealightsHeaderNames["BRANCH_NAME"] = "x-sl-branchName";
|
|
36260
|
+
SealightsHeaderNames["BUILD_NAME"] = "x-sl-buildName";
|
|
36261
|
+
SealightsHeaderNames["BSID"] = "x-sl-bsid";
|
|
36262
|
+
SealightsHeaderNames["EXECUTION_ID"] = "x-sl-executionId";
|
|
36263
|
+
SealightsHeaderNames["AGENT_ID"] = "x-sl-agentId";
|
|
36264
|
+
SealightsHeaderNames["MESSAGE_TYPE"] = "x-sl-messageType";
|
|
36231
36265
|
})(SealightsHeaderNames = exports.SealightsHeaderNames || (exports.SealightsHeaderNames = {}));
|
|
36232
36266
|
var SealightsHaderValues;
|
|
36233
36267
|
(function (SealightsHaderValues) {
|
|
@@ -36339,23 +36373,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36339
36373
|
this.metadata = Object.assign(Object.assign({}, this.metadata), metadata);
|
|
36340
36374
|
}
|
|
36341
36375
|
submitRequestWithBody(verb, requestData, urlPath, callback, async, contentType) {
|
|
36376
|
+
var _a, _b;
|
|
36342
36377
|
validation_utils_1.ValidationUtils.verifyNotNullOrEmpty(requestData, 'requestData');
|
|
36343
36378
|
const bufferToSend = Buffer.from(JSON.stringify(requestData));
|
|
36344
36379
|
const shouldZip = this.cfg.compressRequests != null ? this.cfg.compressRequests : true;
|
|
36380
|
+
const messageTypeHeader = { [contracts_1.SealightsHeaderNames.MESSAGE_TYPE]: (_b = (_a = requestData === null || requestData === void 0 ? void 0 : requestData.events) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.type };
|
|
36345
36381
|
this.logger.debug('Sending buffer:' + bufferToSend.toString());
|
|
36346
36382
|
if (shouldZip) {
|
|
36347
36383
|
zlib.gzip(bufferToSend, (err, compressedBuf) => {
|
|
36348
36384
|
if (err) {
|
|
36349
36385
|
this.logger.warn('Failed while trying to compress the request data. Sending uncompressed data instead. Error: ', err);
|
|
36350
|
-
this.invokeHttpRequest(verb, urlPath, callback,
|
|
36386
|
+
this.invokeHttpRequest(verb, urlPath, callback, messageTypeHeader, bufferToSend, contentType);
|
|
36351
36387
|
}
|
|
36352
36388
|
else {
|
|
36353
|
-
this.invokeHttpRequest(verb, urlPath, callback, { 'Content-Encoding': 'gzip' }, compressedBuf, contentType);
|
|
36389
|
+
this.invokeHttpRequest(verb, urlPath, callback, Object.assign({ 'Content-Encoding': 'gzip' }, messageTypeHeader), compressedBuf, contentType);
|
|
36354
36390
|
}
|
|
36355
36391
|
});
|
|
36356
36392
|
}
|
|
36357
36393
|
else {
|
|
36358
|
-
this.invokeHttpRequest(verb, urlPath, callback,
|
|
36394
|
+
this.invokeHttpRequest(verb, urlPath, callback, messageTypeHeader, bufferToSend, contentType);
|
|
36359
36395
|
}
|
|
36360
36396
|
}
|
|
36361
36397
|
invokeHttpRequest(httpVerb, urlPath, callback, additionalHeaders, buffer, contentType, isNotFoundAcceptable = true) {
|
|
@@ -36458,7 +36494,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36458
36494
|
headers: {
|
|
36459
36495
|
[contracts_1.SealightsHeaderNames.CONTENT_TYPE]: contentType,
|
|
36460
36496
|
[contracts_1.SealightsHeaderNames.AUTHOTIZARTION]: 'Bearer ' + this.cfg.token,
|
|
36461
|
-
[contracts_1.SealightsHeaderNames.META_DATA]: JSON.stringify(this.metadata)
|
|
36497
|
+
[contracts_1.SealightsHeaderNames.META_DATA]: JSON.stringify(this.metadata),
|
|
36498
|
+
[contracts_1.SealightsHeaderNames.LAB_ID]: this.metadata.labId,
|
|
36499
|
+
[contracts_1.SealightsHeaderNames.APP_NAME]: this.metadata.appName,
|
|
36500
|
+
[contracts_1.SealightsHeaderNames.BRANCH_NAME]: this.metadata.branchName,
|
|
36501
|
+
[contracts_1.SealightsHeaderNames.BUILD_NAME]: this.metadata.buildName,
|
|
36502
|
+
[contracts_1.SealightsHeaderNames.BSID]: this.metadata.buildSessionId,
|
|
36503
|
+
[contracts_1.SealightsHeaderNames.EXECUTION_ID]: this.metadata.executionId,
|
|
36504
|
+
[contracts_1.SealightsHeaderNames.AGENT_ID]: this.metadata.agentId,
|
|
36462
36505
|
},
|
|
36463
36506
|
timeout: this.defaultTimeout,
|
|
36464
36507
|
compressed: true
|