slnodejs 6.1.1142 → 6.1.1147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js +1 -2
- package/tsOutputs/cli-parse/executors/nyc-report-executor.js.map +1 -1
- package/tsOutputs/common/contracts.d.ts +1 -1
- package/tsOutputs/common/coverage-elements/original-module-loader.d.ts +1 -1
- package/tsOutputs/common/footprints-process-v6/collection-interval.js.map +1 -0
- package/tsOutputs/common/footprints-process-v6/index.js +1 -1
- package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
- package/tsOutputs/common/{footprints-process → footprints-process-v6}/istanbul-to-footprints-contract.d.ts +0 -7
- package/tsOutputs/common/footprints-process-v6/istanbul-to-footprints-contract.js +3 -0
- package/tsOutputs/common/footprints-process-v6/istanbul-to-footprints-contract.js.map +1 -0
- package/tsOutputs/common/sl-mapper-tokenizer.d.ts +21 -0
- package/tsOutputs/common/sl-mapper-tokenizer.js +12 -10
- package/tsOutputs/common/sl-mapper-tokenizer.js.map +1 -1
- package/tsOutputs/test-listener/agent.d.ts +1 -2
- package/tsOutputs/test-listener/agent.js.map +1 -1
- package/tsOutputs/test-listener/api.js +3 -7
- package/tsOutputs/test-listener/api.js.map +1 -1
- package/tsOutputs/test-listener/factory.d.ts +1 -6
- package/tsOutputs/test-listener/factory.js +1 -30
- package/tsOutputs/test-listener/factory.js.map +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js +1 -1
- package/tsOutputs/test-listener/nyc-report-executor-fpv6.js.map +1 -1
- package/tsOutputs/test-listener/remote-agent.d.ts +1 -0
- package/tsOutputs/test-listener/remote-agent.js +7 -1
- package/tsOutputs/test-listener/remote-agent.js.map +1 -1
- package/tsOutputs/common/footprints-process/collection-interval.js.map +0 -1
- package/tsOutputs/common/footprints-process/footprints-service-proxy.d.ts +0 -13
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js +0 -63
- package/tsOutputs/common/footprints-process/footprints-service-proxy.js.map +0 -1
- package/tsOutputs/common/footprints-process/index.d.ts +0 -72
- package/tsOutputs/common/footprints-process/index.js +0 -287
- package/tsOutputs/common/footprints-process/index.js.map +0 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js +0 -7
- package/tsOutputs/common/footprints-process/istanbul-to-footprints-contract.js.map +0 -1
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.d.ts +0 -47
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js +0 -426
- package/tsOutputs/common/footprints-process/istanbul-to-footprints.js.map +0 -1
- package/tsOutputs/common/footprints-process/production-footprints-handler.d.ts +0 -55
- package/tsOutputs/common/footprints-process/production-footprints-handler.js +0 -278
- package/tsOutputs/common/footprints-process/production-footprints-handler.js.map +0 -1
- package/tsOutputs/common/messages-formatter.d.ts +0 -6
- package/tsOutputs/test-listener/nyc-report-executor.js +0 -108
- package/tsOutputs/test-listener/nyc-report-executor.js.map +0 -1
- /package/tsOutputs/common/{footprints-process → footprints-process-v6}/collection-interval.d.ts +0 -0
- /package/tsOutputs/common/{footprints-process → footprints-process-v6}/collection-interval.js +0 -0
|
@@ -19,6 +19,7 @@ const remote_browser_hits_converter_1 = require("../common/footprints-process-v6
|
|
|
19
19
|
const state_tracker_1 = require("../common/state-tracker");
|
|
20
20
|
const contracts_1 = require("../common/http/contracts");
|
|
21
21
|
const log_formatters_1 = require("../common/utils/log-formatters");
|
|
22
|
+
const sl_mapper_tokenizer_1 = require("../common/sl-mapper-tokenizer");
|
|
22
23
|
/**
|
|
23
24
|
* Agent that dose not collects footprints by itself, the coverage collected from another agent (e.g browser)
|
|
24
25
|
*/
|
|
@@ -27,6 +28,7 @@ class RemoteAgent {
|
|
|
27
28
|
this.collectorBackendProxy = collectorBackendProxy;
|
|
28
29
|
this._isStartingExecution = true;
|
|
29
30
|
this.isRunning = false;
|
|
31
|
+
this.slMapperTokenizer = new sl_mapper_tokenizer_1.SlMapperTokenizer();
|
|
30
32
|
this._agentConfig = agentConfig;
|
|
31
33
|
this.logger = logger;
|
|
32
34
|
this.backendProxy = backendProxy;
|
|
@@ -80,7 +82,11 @@ class RemoteAgent {
|
|
|
80
82
|
: this.backendProxy.getBlobsAsJson(bsid));
|
|
81
83
|
let flatted = {};
|
|
82
84
|
mappingsArr.forEach((mapping) => {
|
|
83
|
-
|
|
85
|
+
// Check if the mapping is tokenized (compressed) and detokenize if necessary
|
|
86
|
+
const detokenizedMapping = this.slMapperTokenizer.isTokenizedSlMapping(mapping)
|
|
87
|
+
? this.slMapperTokenizer.detokenizeSlMapping(mapping)
|
|
88
|
+
: mapping;
|
|
89
|
+
flatted = Object.assign(Object.assign({}, flatted), detokenizedMapping);
|
|
84
90
|
});
|
|
85
91
|
this.queriedBsids[bsid] = true;
|
|
86
92
|
return flatted;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-agent.js","sourceRoot":"","sources":["../../test-listener/remote-agent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,uDAA8E;AAC9E,iCAA8B;AAG9B,gFAKmD;AACnD,8EAA0E;AAC1E,0EAA4E;AAG5E,iHAA2G;AAC3G,2DAAuD;AAYvD,wDAAsE;AACtE,mEAAwE;
|
|
1
|
+
{"version":3,"file":"remote-agent.js","sourceRoot":"","sources":["../../test-listener/remote-agent.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,uDAA8E;AAC9E,iCAA8B;AAG9B,gFAKmD;AACnD,8EAA0E;AAC1E,0EAA4E;AAG5E,iHAA2G;AAC3G,2DAAuD;AAYvD,wDAAsE;AACtE,mEAAwE;AACxE,uEAAkE;AAGlE;;GAEG;AACH,MAAa,WAAW;IAiBtB,YACE,WAAwB,EACxB,MAAc,EACd,YAA2B,EAC3B,yBAAoD,EACpD,aAA4B,EAC5B,iBAA0C,EAC1C,kBAAsC,EACtC,aAAkD,EAClD,aAAyD,EACzD,YAA0B,EACT,qBAAqC;QAArC,0BAAq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wBAAwB,CACnD,IAAI,CAAC,gBAAgB,EAAE,EACvB,QAAQ,CACT,CAAC;QACJ,CAAC;KAAA;IAEM,gBAAgB;QACrB,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,KAAK;YACrD,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK;YAC3C,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK;YACvC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK;YACzC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK;YACvC,MAAM,EAAE,4BAAY,CAAC,wBAAwB;SAC9C,CAAC;IACJ,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IACD,IAAW,mBAAmB,CAAC,KAAc;QAC3C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;IACpC,CAAC;CACF;AA1VD,kCA0VC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collection-interval.js","sourceRoot":"","sources":["../../../common/footprints-process/collection-interval.ts"],"names":[],"mappings":";;;AACA,gDAAsD;AAEtD,MAAa,kBAAkB;IAK7B,YAAY,YAAoB;QAC9B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAA,kCAAoB,GAAE,CAAC,CAAC;IACtD,CAAC;IAEM,IAAI;QACT,IAAI,IAAI,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;SACvB;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAA,kCAAoB,GAAE,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB,EAAE;YAClD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC;SAChD;IACH,CAAC;IAEM,MAAM;QACX,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IAC9C,CAAC;IAEO,SAAS,CAAC,IAAY;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACjC,CAAC;CACF;AA3BD,gDA2BC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AgentConfig } from '../config-process/config';
|
|
2
|
-
import { Logger, IFootprintsFile, IFootprintsHandler } from '../contracts';
|
|
3
|
-
import { AgentInstanceData } from '../../common/agent-instance-data';
|
|
4
|
-
export declare class FootprintsServiceProxy implements IFootprintsHandler {
|
|
5
|
-
private httpConfig;
|
|
6
|
-
private httpClient;
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(cfg: AgentConfig, agentInstanceData: AgentInstanceData, logger: Logger);
|
|
9
|
-
handleFootprints(footprintsPacket: IFootprintsFile, callback: (err: Error) => void): void;
|
|
10
|
-
submitFootprints(footprintsPacket: IFootprintsFile, callback: (err: Error) => void): void;
|
|
11
|
-
private initHttpConfig;
|
|
12
|
-
private getHitFiles;
|
|
13
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FootprintsServiceProxy = void 0;
|
|
4
|
-
const http_client_1 = require("../http/http-client");
|
|
5
|
-
const sl_routes_1 = require("../http/sl-routes");
|
|
6
|
-
const messages_formatter_1 = require("../messages-formatter");
|
|
7
|
-
const metrics_store_factory_1 = require("../metrics-process/metrics-store-factory");
|
|
8
|
-
class FootprintsServiceProxy {
|
|
9
|
-
constructor(cfg, agentInstanceData, logger) {
|
|
10
|
-
this.initHttpConfig(cfg);
|
|
11
|
-
this.logger = logger;
|
|
12
|
-
const httpClientMetadata = {
|
|
13
|
-
agentId: agentInstanceData.agentId,
|
|
14
|
-
buildSessionId: cfg.buildSessionId.value,
|
|
15
|
-
agentType: agentInstanceData.agentType,
|
|
16
|
-
agentTechnology: agentInstanceData.technology,
|
|
17
|
-
agentVersion: agentInstanceData.agentVersion,
|
|
18
|
-
};
|
|
19
|
-
this.httpClient = new http_client_1.HttpClient(this.httpConfig, httpClientMetadata, logger, metrics_store_factory_1.HttpMetricsStoreFactory.create(logger));
|
|
20
|
-
}
|
|
21
|
-
handleFootprints(footprintsPacket, callback) {
|
|
22
|
-
if (!footprintsPacket) {
|
|
23
|
-
this.logger.info('Submit footprints - got null or empty packet. Skip submitting.');
|
|
24
|
-
callback(null);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const hitFiles = this.getHitFiles(footprintsPacket);
|
|
28
|
-
this.logger.debug(`Submitting footprints, tests: ${JSON.stringify(footprintsPacket.tests)}`);
|
|
29
|
-
this.logger.debug(`Submitting footprints, files: ${hitFiles}`);
|
|
30
|
-
const url = sl_routes_1.SLRoutes.footprintsV5();
|
|
31
|
-
this.httpClient.post(footprintsPacket, url, callback);
|
|
32
|
-
}
|
|
33
|
-
submitFootprints(footprintsPacket, callback) {
|
|
34
|
-
this.handleFootprints(footprintsPacket, callback);
|
|
35
|
-
}
|
|
36
|
-
initHttpConfig(cfg) {
|
|
37
|
-
const config = {
|
|
38
|
-
token: cfg.token.value,
|
|
39
|
-
server: cfg.server.value,
|
|
40
|
-
proxy: cfg.proxy.value,
|
|
41
|
-
compressRequests: cfg.gzip.hasValue ? cfg.gzip.value : true,
|
|
42
|
-
buildSessionId: cfg.buildSessionId.value,
|
|
43
|
-
};
|
|
44
|
-
this.httpConfig = config;
|
|
45
|
-
}
|
|
46
|
-
getHitFiles(packetToSend) {
|
|
47
|
-
if (!this.logger.isDebugEnabled()) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const formatter = new messages_formatter_1.MessagesFormatter();
|
|
51
|
-
if (packetToSend &&
|
|
52
|
-
packetToSend.apps &&
|
|
53
|
-
packetToSend.apps[0] &&
|
|
54
|
-
packetToSend.apps[0].files) {
|
|
55
|
-
packetToSend.apps[0].files.forEach((file) => {
|
|
56
|
-
formatter.addContent(file.path);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return formatter.content;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.FootprintsServiceProxy = FootprintsServiceProxy;
|
|
63
|
-
//# sourceMappingURL=footprints-service-proxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footprints-service-proxy.js","sourceRoot":"","sources":["../../../common/footprints-process/footprints-service-proxy.ts"],"names":[],"mappings":";;;AAEA,qDAAiD;AAEjD,iDAA6C;AAC7C,8DAA0D;AAE1D,oFAAmF;AAEnF,MAAa,sBAAsB;IAIjC,YACE,GAAgB,EAChB,iBAAoC,EACpC,MAAc;QAEd,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,MAAM,kBAAkB,GAAoB;YAC1C,OAAO,EAAE,iBAAiB,CAAC,OAAO;YAClC,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,KAAK;YACxC,SAAS,EAAE,iBAAiB,CAAC,SAAS;YACtC,eAAe,EAAE,iBAAiB,CAAC,UAAU;YAC7C,YAAY,EAAE,iBAAiB,CAAC,YAAY;SAC7C,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAU,CAC9B,IAAI,CAAC,UAAU,EACf,kBAAkB,EAClB,MAAM,EACN,+CAAuB,CAAC,MAAM,CAAC,M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AAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE;YACjC,OAAO;SACR;QACD,MAAM,SAAS,GAAG,IAAI,sCAAiB,EAAE,CAAC;QAC1C,IACE,YAAY;YACZ,YAAY,CAAC,IAAI;YACjB,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;YACpB,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAC1B;YACA,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1C,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,SAAS,CAAC,OAAO,CAAC;IAC3B,CAAC;CACF;AAlFD,wDAkFC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { AgentConfig } from '../config-process/config';
|
|
2
|
-
import { Watchdog } from '../watchdog';
|
|
3
|
-
import { IstanbulToFootprints } from './istanbul-to-footprints';
|
|
4
|
-
import { EnvironmentDataService } from '../environment-data-service';
|
|
5
|
-
import { Logger, IFootprintsHandler } from '../contracts';
|
|
6
|
-
import { StateTracker } from '../state-tracker';
|
|
7
|
-
import { AgentInstanceData } from '../agent-instance-data';
|
|
8
|
-
export declare class FootprintsProcess {
|
|
9
|
-
/**
|
|
10
|
-
* Initial configuration
|
|
11
|
-
*/
|
|
12
|
-
private cfg;
|
|
13
|
-
/**
|
|
14
|
-
* Background thread that tells the footprints service to send footprints from the queue to the server
|
|
15
|
-
*/
|
|
16
|
-
private sendToServerWatchdog;
|
|
17
|
-
/**
|
|
18
|
-
* Foreground thread that prevents the process from shutting down, and kept alive while there are items to submit to the server or items are currently being submitted
|
|
19
|
-
*/
|
|
20
|
-
private keepaliveWatchdog;
|
|
21
|
-
/**
|
|
22
|
-
* Proxy to the server for footprints submission
|
|
23
|
-
*/
|
|
24
|
-
private footprintsServiceProxy;
|
|
25
|
-
/**
|
|
26
|
-
* Environments service, used to get environmental data for submission (process id, machine data, etc.)
|
|
27
|
-
*/
|
|
28
|
-
private environmentDataService;
|
|
29
|
-
private agentInstanceData;
|
|
30
|
-
private istanbulToFootprints;
|
|
31
|
-
private stateTracker;
|
|
32
|
-
private logger;
|
|
33
|
-
private collectionInterval;
|
|
34
|
-
constructor(
|
|
35
|
-
/**
|
|
36
|
-
* Initial configuration
|
|
37
|
-
*/
|
|
38
|
-
cfg: AgentConfig,
|
|
39
|
-
/**
|
|
40
|
-
* Background thread that tells the footprints service to send footprints from the queue to the server
|
|
41
|
-
*/
|
|
42
|
-
sendToServerWatchdog: Watchdog,
|
|
43
|
-
/**
|
|
44
|
-
* Foreground thread that prevents the process from shutting down, and kept alive while there are items to submit to the server or items are currently being submitted
|
|
45
|
-
*/
|
|
46
|
-
keepaliveWatchdog: Watchdog,
|
|
47
|
-
/**
|
|
48
|
-
* Proxy to the server for footprints submission
|
|
49
|
-
*/
|
|
50
|
-
footprintsServiceProxy: IFootprintsHandler,
|
|
51
|
-
/**
|
|
52
|
-
* Environments service, used to get environmental data for submission (process id, machine data, etc.)
|
|
53
|
-
*/
|
|
54
|
-
environmentDataService: EnvironmentDataService, agentInstanceData: AgentInstanceData, istanbulToFootprints: IstanbulToFootprints, stateTracker: StateTracker, logger: Logger);
|
|
55
|
-
private isSubmittingFootprints;
|
|
56
|
-
private footprintsQueue;
|
|
57
|
-
enqueueCurrentFootprints(executionId: string, testName: string): void;
|
|
58
|
-
private ensureKeepaliveThreadRunning;
|
|
59
|
-
updateConfig(updatedCfg: AgentConfig): void;
|
|
60
|
-
private sequence;
|
|
61
|
-
private createFootprintsPacket;
|
|
62
|
-
submitQueuedFootprints(): void;
|
|
63
|
-
private fireQueueEmpty;
|
|
64
|
-
private isRunning;
|
|
65
|
-
start(): void;
|
|
66
|
-
private stopCallbacks;
|
|
67
|
-
stop(callback: () => void): void;
|
|
68
|
-
handleTestIdChanged(newTestIdentifier: any, previousTestIdentifier: any): void;
|
|
69
|
-
flushCurrentFootprints(): void;
|
|
70
|
-
getQueueSize(): number;
|
|
71
|
-
loadSlMapping(): Promise<void>;
|
|
72
|
-
}
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FootprintsProcess = void 0;
|
|
13
|
-
const queue_1 = require("../queue");
|
|
14
|
-
const collection_interval_1 = require("./collection-interval");
|
|
15
|
-
const system_date_1 = require("../system-date");
|
|
16
|
-
const state_tracker_1 = require("../state-tracker");
|
|
17
|
-
const sl_env_vars_1 = require("../constants/sl-env-vars");
|
|
18
|
-
const cockpit_notifier_1 = require("../agent-events/cockpit-notifier");
|
|
19
|
-
const agent_events_contracts_1 = require("../agent-events/agent-events-contracts");
|
|
20
|
-
class FootprintsProcess {
|
|
21
|
-
constructor(
|
|
22
|
-
/**
|
|
23
|
-
* Initial configuration
|
|
24
|
-
*/
|
|
25
|
-
cfg,
|
|
26
|
-
/**
|
|
27
|
-
* Background thread that tells the footprints service to send footprints from the queue to the server
|
|
28
|
-
*/
|
|
29
|
-
sendToServerWatchdog,
|
|
30
|
-
/**
|
|
31
|
-
* Foreground thread that prevents the process from shutting down, and kept alive while there are items to submit to the server or items are currently being submitted
|
|
32
|
-
*/
|
|
33
|
-
keepaliveWatchdog,
|
|
34
|
-
/**
|
|
35
|
-
* Proxy to the server for footprints submission
|
|
36
|
-
*/
|
|
37
|
-
footprintsServiceProxy,
|
|
38
|
-
/**
|
|
39
|
-
* Environments service, used to get environmental data for submission (process id, machine data, etc.)
|
|
40
|
-
*/
|
|
41
|
-
environmentDataService, agentInstanceData, istanbulToFootprints, stateTracker, logger) {
|
|
42
|
-
this.cfg = cfg;
|
|
43
|
-
this.sendToServerWatchdog = sendToServerWatchdog;
|
|
44
|
-
this.keepaliveWatchdog = keepaliveWatchdog;
|
|
45
|
-
this.footprintsServiceProxy = footprintsServiceProxy;
|
|
46
|
-
this.environmentDataService = environmentDataService;
|
|
47
|
-
this.agentInstanceData = agentInstanceData;
|
|
48
|
-
this.istanbulToFootprints = istanbulToFootprints;
|
|
49
|
-
this.stateTracker = stateTracker;
|
|
50
|
-
this.logger = logger;
|
|
51
|
-
this.isSubmittingFootprints = false;
|
|
52
|
-
this.sequence = 0;
|
|
53
|
-
this.isRunning = false;
|
|
54
|
-
this.stopCallbacks = [];
|
|
55
|
-
if (!cfg)
|
|
56
|
-
throw new Error('cfg was not specified');
|
|
57
|
-
if (!sendToServerWatchdog)
|
|
58
|
-
throw new Error('sendToServerWatchdog was not specified');
|
|
59
|
-
if (!keepaliveWatchdog)
|
|
60
|
-
throw new Error('keepaliveWatchdog was not specified');
|
|
61
|
-
if (!footprintsServiceProxy)
|
|
62
|
-
throw new Error('footprintsServiceProxy was not specified');
|
|
63
|
-
if (!environmentDataService)
|
|
64
|
-
throw new Error('environmentDataService was not specified');
|
|
65
|
-
if (!agentInstanceData)
|
|
66
|
-
throw new Error('agentInstanceData was not specified');
|
|
67
|
-
if (!istanbulToFootprints)
|
|
68
|
-
throw new Error('istanbulToFootprints was not specified');
|
|
69
|
-
if (!logger) {
|
|
70
|
-
throw new Error('logger was not specified');
|
|
71
|
-
}
|
|
72
|
-
this.collectionInterval = new collection_interval_1.CollectionInterval(cfg.interval.value);
|
|
73
|
-
this.footprintsQueue = new queue_1.Queue();
|
|
74
|
-
sendToServerWatchdog.on('alarm', () => {
|
|
75
|
-
this.logger.debug('Start submitting footprints, triggered by send to server watchdog.');
|
|
76
|
-
this.submitQueuedFootprints();
|
|
77
|
-
});
|
|
78
|
-
this.footprintsQueue.on('full', () => {
|
|
79
|
-
this.logger.debug('Start submitting footprints, queue is full.');
|
|
80
|
-
this.submitQueuedFootprints();
|
|
81
|
-
});
|
|
82
|
-
keepaliveWatchdog.on('alarm', () => {
|
|
83
|
-
//console.log('keepaliveWatchdog. isSubmittingFootprints:' + this.isSubmittingFootprints + ', queue size: ' + this.footprintsQueue.getQueueSize());
|
|
84
|
-
if (!this.isSubmittingFootprints &&
|
|
85
|
-
this.footprintsQueue.getQueueSize() == 0) {
|
|
86
|
-
keepaliveWatchdog.stop();
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
enqueueCurrentFootprints(executionId, testName) {
|
|
91
|
-
this.collectionInterval.next();
|
|
92
|
-
const footprints = this.istanbulToFootprints.getCurrentFootprints();
|
|
93
|
-
const hitModules = Object.keys(footprints);
|
|
94
|
-
if (!hitModules || hitModules.length == 0) {
|
|
95
|
-
//If no modules were hit at all, don't enqueue anything
|
|
96
|
-
this.logger.info('No files were hit, not enqueuing footprints.');
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
this.logger.info(`Enqueuing footprints for ${hitModules.length} files`);
|
|
100
|
-
this.footprintsQueue.enqueue({
|
|
101
|
-
executionId: executionId,
|
|
102
|
-
testName: testName,
|
|
103
|
-
footprints: footprints,
|
|
104
|
-
localTime: (0, system_date_1.getSystemDateValueOf)(),
|
|
105
|
-
collectionInterval: this.collectionInterval.toJson(),
|
|
106
|
-
});
|
|
107
|
-
if (this.isRunning &&
|
|
108
|
-
this.cfg.sendFootprints.value &&
|
|
109
|
-
this.cfg.enabled.value) {
|
|
110
|
-
this.ensureKeepaliveThreadRunning();
|
|
111
|
-
this.sendToServerWatchdog.start();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
ensureKeepaliveThreadRunning() {
|
|
115
|
-
this.keepaliveWatchdog.start();
|
|
116
|
-
}
|
|
117
|
-
updateConfig(updatedCfg) {
|
|
118
|
-
if (updatedCfg.sendFootprints.value === false ||
|
|
119
|
-
updatedCfg.enabled.value === false) {
|
|
120
|
-
cockpit_notifier_1.CockpitNotifier.sendEvent(agent_events_contracts_1.AgentEventCode.AGENT_MUTED);
|
|
121
|
-
this.footprintsQueue.clear();
|
|
122
|
-
this.stop(() => { });
|
|
123
|
-
}
|
|
124
|
-
this.cfg = updatedCfg;
|
|
125
|
-
this.sendToServerWatchdog.setInterval(this.cfg.interval.value);
|
|
126
|
-
}
|
|
127
|
-
createFootprintsPacket(items) {
|
|
128
|
-
const packet = this.istanbulToFootprints.createFootprintsPackageFromQueue(items, {
|
|
129
|
-
customerId: this.cfg.customerId.value,
|
|
130
|
-
environment: this.environmentDataService.getEnvDataForSubmission(),
|
|
131
|
-
configurationData: this.cfg.toJsonObject(),
|
|
132
|
-
meta: {
|
|
133
|
-
sequence: ++this.sequence,
|
|
134
|
-
generated: (0, system_date_1.getSystemDateValueOf)(),
|
|
135
|
-
agentId: this.agentInstanceData.agentId,
|
|
136
|
-
},
|
|
137
|
-
tests: [],
|
|
138
|
-
apps: [],
|
|
139
|
-
});
|
|
140
|
-
return packet;
|
|
141
|
-
}
|
|
142
|
-
submitQueuedFootprints() {
|
|
143
|
-
if (!this.isRunning) {
|
|
144
|
-
this.logger.info('Agent is not running, not sending footprints');
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (this.cfg.sendFootprints.value === false) {
|
|
148
|
-
this.logger.info('Not sending footprints since agent is configured to not send.');
|
|
149
|
-
return; //Can't start without server or token
|
|
150
|
-
}
|
|
151
|
-
if (this.isSubmittingFootprints) {
|
|
152
|
-
this.logger.info('Not sending footprints since its already submitting.');
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
if (this.footprintsQueue.getQueueSize() == 0) {
|
|
156
|
-
this.logger.info('Not sending footprints since queue size is 0');
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
this.logger.info('About to send footprints. Queue size:' +
|
|
160
|
-
this.footprintsQueue.getQueueSize());
|
|
161
|
-
const items = this.footprintsQueue.dequeue(
|
|
162
|
-
/*this.cfg.maxFootprintsChunkSize ||*/ 1000);
|
|
163
|
-
const packet = this.createFootprintsPacket(items);
|
|
164
|
-
this.isSubmittingFootprints = true;
|
|
165
|
-
this.footprintsServiceProxy.handleFootprints(packet, (err) => {
|
|
166
|
-
this.isSubmittingFootprints = false;
|
|
167
|
-
this.logger.info('Sent footprints. Queue size:' +
|
|
168
|
-
this.footprintsQueue.getQueueSize() +
|
|
169
|
-
', err:' +
|
|
170
|
-
err);
|
|
171
|
-
if (err) {
|
|
172
|
-
this.environmentDataService.setLastError(err.stack);
|
|
173
|
-
this.footprintsQueue.requeue(items); //Requeue items for later submission
|
|
174
|
-
}
|
|
175
|
-
else if (this.footprintsQueue.getQueueSize() > 0) {
|
|
176
|
-
//If there was an error, don't send now. Otherwise, if the queue still has items, send those now
|
|
177
|
-
this.submitQueuedFootprints();
|
|
178
|
-
}
|
|
179
|
-
else
|
|
180
|
-
this.fireQueueEmpty();
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
fireQueueEmpty() {
|
|
184
|
-
if (this.stopCallbacks.length > 0) {
|
|
185
|
-
this.stopCallbacks.forEach((cb) => {
|
|
186
|
-
try {
|
|
187
|
-
cb();
|
|
188
|
-
}
|
|
189
|
-
catch (err) {
|
|
190
|
-
this.environmentDataService.setLastError(err.stack);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
start() {
|
|
196
|
-
if (this.isRunning)
|
|
197
|
-
return; //Already started
|
|
198
|
-
if (this.cfg.enabled.value == false)
|
|
199
|
-
return; //Don't do anything if agent is completely disabled
|
|
200
|
-
this.isRunning = true;
|
|
201
|
-
this.sendToServerWatchdog.start();
|
|
202
|
-
if (this.footprintsQueue.getQueueSize() > 0) {
|
|
203
|
-
this.ensureKeepaliveThreadRunning();
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
stop(callback) {
|
|
207
|
-
try {
|
|
208
|
-
this.sendToServerWatchdog.stop();
|
|
209
|
-
if (this.cfg.enabled.value === false ||
|
|
210
|
-
this.cfg.sendFootprints.value === false) {
|
|
211
|
-
//Footprints/Agent functionality is disabled. Return immediately
|
|
212
|
-
this.isRunning = false;
|
|
213
|
-
return callback();
|
|
214
|
-
}
|
|
215
|
-
this.logger.debug('Start submitting footprints, triggered by stop event.');
|
|
216
|
-
this.submitQueuedFootprints(); //If footprints are being submitted, this has no effect. Otherwise, it will start submitting footprints if the queue is non-empty
|
|
217
|
-
if (this.isSubmittingFootprints) {
|
|
218
|
-
/*
|
|
219
|
-
Nothing to do right now, since footprints are being submitted
|
|
220
|
-
When the submission is over (successfully or not), if the queue is empty the next batch of footprints will be sent.
|
|
221
|
-
If after submission the queue is cleared, this callback will be called
|
|
222
|
-
*/
|
|
223
|
-
this.stopCallbacks.push(() => {
|
|
224
|
-
this.isRunning = false;
|
|
225
|
-
this.keepaliveWatchdog.stop();
|
|
226
|
-
return callback();
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
/*
|
|
231
|
-
Queue must be empty, and nothing is sent. submitQueuedFootprints() would have started sending footprints if the queue was non-empty
|
|
232
|
-
*/
|
|
233
|
-
this.isRunning = false;
|
|
234
|
-
this.keepaliveWatchdog.stop();
|
|
235
|
-
return callback();
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
catch (err) {
|
|
239
|
-
this.logger.error(err);
|
|
240
|
-
return callback();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
handleTestIdChanged(newTestIdentifier, previousTestIdentifier) {
|
|
244
|
-
if (previousTestIdentifier != null) {
|
|
245
|
-
if (!this.stateTracker.hasMappingAtServer() &&
|
|
246
|
-
this.stateTracker.isAnonymousColor(previousTestIdentifier)) {
|
|
247
|
-
this.logger.info("Test identifier changed, couldn't find active execution for anonymous footprints. Skip enqueuing footprints process.");
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
this.logger.debug('Test identifier changed, start enqueuing footprints process.');
|
|
251
|
-
const prevTestIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(previousTestIdentifier);
|
|
252
|
-
this.enqueueCurrentFootprints(prevTestIdentifierParts.executionId, prevTestIdentifierParts.testName);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
this.logger.info("Test identifier changed, previous identifier wasn't set, meaning that we didn't have active test. Skip enqueuing footprints process.");
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
flushCurrentFootprints() {
|
|
259
|
-
const currentTestIdentifier = this.stateTracker.getCurrentTestIdentifier();
|
|
260
|
-
const testIdentifierParts = state_tracker_1.StateTracker.splitTestIdToExecutionAndTestName(currentTestIdentifier);
|
|
261
|
-
if (sl_env_vars_1.SlEnvVars.inProductionListenerMode()) {
|
|
262
|
-
this.logger.debug('Enqueue footprints for production listener');
|
|
263
|
-
this.enqueueCurrentFootprints(testIdentifierParts.executionId, testIdentifierParts.testName);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
if (currentTestIdentifier != null) {
|
|
267
|
-
if (!this.stateTracker.hasMappingAtServer() &&
|
|
268
|
-
this.stateTracker.isAnonymousColor(currentTestIdentifier)) {
|
|
269
|
-
this.logger.info(`Enqueue footprints interval - couldn\'t find active execution for anonymous footprints. skip enqueue footprints process. currentTestIdentifier: '${currentTestIdentifier}'`);
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
this.logger.debug(`Enqueue footprints interval - start enqueuing process. currentTestIdentifier: '${currentTestIdentifier}'`);
|
|
273
|
-
this.enqueueCurrentFootprints(testIdentifierParts.executionId, testIdentifierParts.testName);
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
this.logger.info('Enqueue footprints interval - no test identifier. skip enqueuing process. ');
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
getQueueSize() {
|
|
280
|
-
return this.footprintsQueue.getQueueSize();
|
|
281
|
-
}
|
|
282
|
-
loadSlMapping() {
|
|
283
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
exports.FootprintsProcess = FootprintsProcess;
|
|
287
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../common/footprints-process/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,oCAAiC;AAMjC,+DAA2D;AAC3D,gDAAsD;AACtD,oDAAgD;AAChD,0DAAqD;AAErD,uEAAmE;AACnE,mFAAwE;AAExE,MAAa,iBAAiB;IAE5B;IACE;;OAEG;IACK,GAAgB;IACxB;;OAEG;IACK,oBAA8B;IACtC;;OAEG;IACK,iBAA2B;IACnC;;OAEG;IACK,sBAA0C;IAElD;;OAEG;IACK,sBAA8C,EAE9C,iBAAoC,EAEpC,oBAA0C,EAE1C,YAA0B,EAE1B,MAAc;QAzBd,QAAG,GAAH,GAAG,CAAa;QAIhB,yBAAoB,GAApB,oBAAoB,CAAU;QAI9B,sBAAiB,GAAjB,iBAAiB,CAAU;QAI3B,2BAAsB,GAAtB,sBAAsB,CAAoB;QAK1C,2BAAsB,GAAtB,sBAAsB,CAAwB;QAE9C,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,yBAAoB,GAApB,oBAAoB,CAAsB;QAE1C,iBAAY,GAAZ,YAAY,CAAc;QAE1B,WAAM,GAAN,MAAM,CAAQ;QA2ChB,2BAAsB,GAAY,KAAK,CAAC;QAiDxC,aAAQ,GAAW,CAAC,CAAC;QAiFrB,cAAS,GAAG,KAAK,CAAC;QAYlB,kBAAa,GAAmB,E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CAAC,iCAAiC,CACxE,qBAAqB,CACtB,CAAC;QACF,IAAI,uBAAS,CAAC,wBAAwB,EAAE,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;YAChE,IAAI,CAAC,wBAAwB,CAC3B,mBAAmB,CAAC,WAAW,EAC/B,mBAAmB,CAAC,QAAQ,CAC7B,CAAC;YACF,OAAO;SACR;QACD,IAAI,qBAAqB,IAAI,IAAI,EAAE;YACjC,IACE,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE;gBACvC,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EACzD;gBACA,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,oJAAoJ,qBAAqB,GAAG,CAC7K,CAAC;gBACF,OAAO;aACR;YACD,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,kFAAkF,qBAAqB,GAAG,CAC3G,CAAC;YACF,IAAI,CAAC,wBAAwB,CAC3B,mBAAmB,CAAC,WAAW,EAC/B,mBAAmB,CAAC,QAAQ,CAC7B,CAAC;SACH;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,4EAA4E,CAC7E,CAAC;SACH;IACH,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;IAC7C,CAAC;IAEY,aAAa;8DAAI,CAAC;KAAA;CAChC;AA1UD,8CA0UC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IExtendedIstanbulMetrics = void 0;
|
|
4
|
-
class IExtendedIstanbulMetrics {
|
|
5
|
-
}
|
|
6
|
-
exports.IExtendedIstanbulMetrics = IExtendedIstanbulMetrics;
|
|
7
|
-
//# sourceMappingURL=istanbul-to-footprints-contract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"istanbul-to-footprints-contract.js","sourceRoot":"","sources":["../../../common/footprints-process/istanbul-to-footprints-contract.ts"],"names":[],"mappings":";;;AAAA,MAAa,wBAAwB;CAMpC;AAND,4DAMC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { IIstanbulModule, IIstanbulProcessMetrics, IExtendedIstanbulMetrics } from './istanbul-to-footprints-contract';
|
|
2
|
-
import { IFootprintsFile, Logger } from '../contracts';
|
|
3
|
-
import { AgentConfig } from '../config-process/config';
|
|
4
|
-
export declare class IstanbulToFootprints {
|
|
5
|
-
private cfg;
|
|
6
|
-
private totalTests;
|
|
7
|
-
private eidToHitsIndex;
|
|
8
|
-
private uniqueIdToElement;
|
|
9
|
-
private testNameToTestData;
|
|
10
|
-
private fileToSourceMapConsumer;
|
|
11
|
-
private fileNameToAppFile;
|
|
12
|
-
private globalCoverageContainer;
|
|
13
|
-
private previousIstanbulCounters;
|
|
14
|
-
private nycFinalReportData;
|
|
15
|
-
private logger;
|
|
16
|
-
constructor(cfg: AgentConfig, logger: Logger);
|
|
17
|
-
private resetState;
|
|
18
|
-
createFootprintsPackageFromQueue(queuedFootprints: IExtendedIstanbulMetrics[], extraData: IFootprintsFile): IFootprintsFile;
|
|
19
|
-
createFootprintsPackageFromRawData(rawData: IExtendedIstanbulMetrics, extraData: IFootprintsFile): IFootprintsFile;
|
|
20
|
-
private convertIstanbulDataToFootprints;
|
|
21
|
-
private handleBranchesData;
|
|
22
|
-
private handleFunctionsData;
|
|
23
|
-
private addDeclarationFootprints;
|
|
24
|
-
private getSourceMapForModule;
|
|
25
|
-
private addOrUpdateElementHits;
|
|
26
|
-
private getOrCreateTestData;
|
|
27
|
-
private getOrCreateMethodElement;
|
|
28
|
-
private getOrCreateBranchElement;
|
|
29
|
-
private getOrCreateFootprintsAppFile;
|
|
30
|
-
private createFootprintsAppData;
|
|
31
|
-
private readSourceMapData;
|
|
32
|
-
private adjustPathSlashes;
|
|
33
|
-
protected getIstanbulCounters(): IIstanbulProcessMetrics;
|
|
34
|
-
private getCoverageObject;
|
|
35
|
-
private relativeModulePaths;
|
|
36
|
-
getRelativeModulePath(module: IIstanbulModule): string;
|
|
37
|
-
protected formatLoc(loc: {
|
|
38
|
-
column: number;
|
|
39
|
-
line: number;
|
|
40
|
-
}): string;
|
|
41
|
-
getCurrentFootprints(): IIstanbulProcessMetrics;
|
|
42
|
-
protected getIstanbulCountersDiff(currentCounters: IIstanbulProcessMetrics): IIstanbulProcessMetrics;
|
|
43
|
-
private logDiff;
|
|
44
|
-
private newNumberArray;
|
|
45
|
-
private loadOriginalModules;
|
|
46
|
-
private resolveProjectRoot;
|
|
47
|
-
}
|