slnodejs 6.1.916 → 6.1.922

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.
Files changed (77) hide show
  1. package/package.json +1 -1
  2. package/tsOutputs/build-scanner/build-diff-process.js +2 -0
  3. package/tsOutputs/build-scanner/build-diff-process.js.map +1 -1
  4. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js +11 -2
  5. package/tsOutputs/build-scanner/instrumentation/browser-instrumenter.js.map +1 -1
  6. package/tsOutputs/cli-parse/cli.js +6 -0
  7. package/tsOutputs/cli-parse/cli.js.map +1 -1
  8. package/tsOutputs/cli-parse/contracts.d.ts +5 -0
  9. package/tsOutputs/cli-parse/contracts.js.map +1 -1
  10. package/tsOutputs/cli-parse/executors/build-args-dto.js +1 -0
  11. package/tsOutputs/cli-parse/executors/build-args-dto.js.map +1 -1
  12. package/tsOutputs/cli-parse/executors/build-executor.js +19 -1
  13. package/tsOutputs/cli-parse/executors/build-executor.js.map +1 -1
  14. package/tsOutputs/cli-parse/executors/run-executor.js +2 -1
  15. package/tsOutputs/cli-parse/executors/run-executor.js.map +1 -1
  16. package/tsOutputs/common/agent-events/agent-events-controller.js.map +1 -1
  17. package/tsOutputs/common/config-process/config.d.ts +2 -0
  18. package/tsOutputs/common/config-process/config.js +2 -0
  19. package/tsOutputs/common/config-process/config.js.map +1 -1
  20. package/tsOutputs/common/constants/sl-env-vars.d.ts +6 -0
  21. package/tsOutputs/common/constants/sl-env-vars.js +6 -0
  22. package/tsOutputs/common/constants/sl-env-vars.js.map +1 -1
  23. package/tsOutputs/common/footprints-process-v6/hits-collector.js +1 -0
  24. package/tsOutputs/common/footprints-process-v6/hits-collector.js.map +1 -1
  25. package/tsOutputs/common/footprints-process-v6/hits-converter.d.ts +3 -1
  26. package/tsOutputs/common/footprints-process-v6/hits-converter.js +12 -3
  27. package/tsOutputs/common/footprints-process-v6/hits-converter.js.map +1 -1
  28. package/tsOutputs/common/footprints-process-v6/index.d.ts +4 -8
  29. package/tsOutputs/common/footprints-process-v6/index.js +2 -14
  30. package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
  31. package/tsOutputs/common/http/contracts.d.ts +1 -1
  32. package/tsOutputs/common/watchdog.d.ts +9 -8
  33. package/tsOutputs/common/watchdog.js +1 -4
  34. package/tsOutputs/common/watchdog.js.map +1 -1
  35. package/tsOutputs/test-listener/agent-loader.js +8 -2
  36. package/tsOutputs/test-listener/agent-loader.js.map +1 -1
  37. package/tsOutputs/test-listener/agent.d.ts +1 -1
  38. package/tsOutputs/test-listener/bootstrap.js +4 -0
  39. package/tsOutputs/test-listener/bootstrap.js.map +1 -1
  40. package/tsOutputs/test-listener/config-process/config-loader.js +1 -1
  41. package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
  42. package/tsOutputs/test-listener/factory.d.ts +3 -5
  43. package/tsOutputs/test-listener/factory.js +18 -24
  44. package/tsOutputs/test-listener/factory.js.map +1 -1
  45. package/tsOutputs/test-listener/logs-process/index.d.ts +2 -2
  46. package/tsOutputs/common/uuid.js +0 -21
  47. package/tsOutputs/common/uuid.js.map +0 -1
  48. package/tsOutputs/test-listener/config-process/config-system.d.ts +0 -88
  49. package/tsOutputs/test-listener/config-process/config-system.js +0 -259
  50. package/tsOutputs/test-listener/config-process/config-system.js.map +0 -1
  51. package/tsOutputs/test-listener/config-process/index.js +0 -110
  52. package/tsOutputs/test-listener/config-process/index.js.map +0 -1
  53. package/tsOutputs/test-listener/config.d.ts +0 -50
  54. package/tsOutputs/test-listener/config.js +0 -62
  55. package/tsOutputs/test-listener/config.js.map +0 -1
  56. package/tsOutputs/test-listener/environment-data-service.d.ts +0 -11
  57. package/tsOutputs/test-listener/environment-data-service.js +0 -60
  58. package/tsOutputs/test-listener/environment-data-service.js.map +0 -1
  59. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js +0 -36
  60. package/tsOutputs/test-listener/footprints-process/footprints-service-proxy.js.map +0 -1
  61. package/tsOutputs/test-listener/footprints-process/index.js +0 -226
  62. package/tsOutputs/test-listener/footprints-process/index.js.map +0 -1
  63. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js +0 -130
  64. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-base.js.map +0 -1
  65. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-contract.js +0 -3
  66. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-contract.js.map +0 -1
  67. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js +0 -272
  68. package/tsOutputs/test-listener/footprints-process/istanbul-to-footprints-v3.js.map +0 -1
  69. package/tsOutputs/test-listener/queue.js +0 -40
  70. package/tsOutputs/test-listener/queue.js.map +0 -1
  71. package/tsOutputs/test-listener/state-tracker-process/index.js +0 -143
  72. package/tsOutputs/test-listener/state-tracker-process/index.js.map +0 -1
  73. package/tsOutputs/test-listener/utils.js +0 -68
  74. package/tsOutputs/test-listener/utils.js.map +0 -1
  75. package/tsOutputs/test-listener/watchdog.d.ts +0 -89
  76. package/tsOutputs/test-listener/watchdog.js +0 -128
  77. package/tsOutputs/test-listener/watchdog.js.map +0 -1
@@ -1,110 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConfigProcess = void 0;
4
- const events = require("events");
5
- const config_system_1 = require("./config-system");
6
- const assign = require("object-assign");
7
- const jwt_decode_1 = require("jwt-decode");
8
- class ConfigProcess extends events.EventEmitter {
9
- constructor(cfg, watchdog, backendProxy, logger) {
10
- super();
11
- this.cfg = cfg;
12
- this.watchdog = watchdog;
13
- this.backendProxy = backendProxy;
14
- this.logger = logger;
15
- this.isRunning = false;
16
- if (!cfg)
17
- throw new Error('cfg is required');
18
- this.initialCfg = assign({}, cfg.toJsonObject());
19
- if (!watchdog)
20
- throw new Error('watchdog is required');
21
- if (!backendProxy)
22
- throw new Error('backendProxy is required');
23
- if (!logger) {
24
- throw new Error('logger is required');
25
- }
26
- watchdog.on('alarm', () => {
27
- watchdog.stop();
28
- this.reloadConfigFromServer();
29
- });
30
- this.initCfg();
31
- }
32
- reloadConfigFromServer(callback) {
33
- this.backendProxy.getRemoteConfig({
34
- appName: this.cfg.appName.value,
35
- branch: this.cfg.branch.value,
36
- build: this.cfg.build.value,
37
- labId: this.cfg.labId.value,
38
- testStage: this.cfg.testStage.value
39
- }, (err, updatedCfg) => {
40
- if (!err && updatedCfg) {
41
- this.mergeConfigFromServerAndFireEvent(updatedCfg);
42
- }
43
- this.watchdog.start();
44
- if (callback) {
45
- callback(err);
46
- }
47
- });
48
- }
49
- mergeConfigFromServerAndFireEvent(updatedCfgObject) {
50
- let configChanged = false;
51
- //Load values before any server overrides
52
- this.cfg.loadConfiguration(new config_system_1.JsonObjectConfigurationProvider(this.initialCfg));
53
- for (const key in updatedCfgObject) {
54
- if (this.cfg[key] && this.cfg[key].isConfigKey && this.cfg[key].value != updatedCfgObject[key]) {
55
- configChanged = true;
56
- break;
57
- }
58
- }
59
- if (configChanged) {
60
- //Then override with server sent config
61
- this.cfg.loadConfiguration(new config_system_1.JsonObjectConfigurationProvider(updatedCfgObject));
62
- this.emit('configuration_changed', this.cfg);
63
- }
64
- }
65
- getConfiguration() {
66
- return this.cfg;
67
- }
68
- initCfg() {
69
- if (this.cfg.token.hasValue) {
70
- try {
71
- const tokenData = (0, jwt_decode_1.default)(this.cfg.token.value);
72
- if (!tokenData['x-sl-server']) {
73
- throw new Error('Token Is Invalid. Doesn\'t Contain Server');
74
- }
75
- if (!this.cfg.server.hasValue)
76
- this.cfg.server.value = tokenData['x-sl-server'];
77
- if (!tokenData['subject']) {
78
- throw new Error('Token Is Invalid. Doesn\'t Contain Subject');
79
- }
80
- let customerId = tokenData['subject'];
81
- const subjectParts = tokenData['subject'].split('@');
82
- customerId = subjectParts[0];
83
- this.cfg.customerId.value = this.cfg.customerId.value || customerId;
84
- //this.cfg.interval = this.cfg.interval || 10000;
85
- }
86
- catch (err) {
87
- this.cfg.enabled.value = false;
88
- this.logger.error(`Error loading configuration. Agent will be disabled. ${err}`);
89
- }
90
- }
91
- }
92
- start(callback) {
93
- if (this.isRunning)
94
- return; //Already started
95
- if (!this.cfg.enabled.value)
96
- return; //Don't do anything if agent is completely disabled
97
- if (!this.cfg.server.value || !this.cfg.token.hasValue)
98
- return; //Can't start without server or token
99
- this.reloadConfigFromServer(callback);
100
- //this.watchdog.start(); //Will be called on the first reload, which is called from agent.start()
101
- this.isRunning = true;
102
- }
103
- stop(callback) {
104
- this.watchdog.stop();
105
- this.isRunning = false;
106
- return callback();
107
- }
108
- }
109
- exports.ConfigProcess = ConfigProcess;
110
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../test-listener/config-process/index.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,mDAAkE;AAElE,wCAAyC;AACzC,2CAAmC;AAKnC,MAAa,aAAc,SAAQ,MAAM,CAAC,YAAY;IAElD,YAA2B,GAAgB,EAAU,QAAkB,EAAU,YAA0B,EAAU,MAAc;QAC/H,KAAK,EAAE,CAAC;QADe,QAAG,GAAH,GAAG,CAAa;QAAU,aAAQ,GAAR,QAAQ,CAAU;QAAU,iBAAY,GAAZ,YAAY,CAAc;QAAU,WAAM,GAAN,MAAM,CAAQ;QAsF3H,cAAS,GAAG,KAAK,CAAC;QApFtB,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CA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G,CAAC,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC;gBAEpE,iDAAiD;aAEpD;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;gBAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wDAAwD,GAAG,EAAE,CAAC,CAAC;aACpF;SACJ;IACL,CAAC;IAGM,KAAK,CAAC,QAA+B;QACxC,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,CAAC,iBAAiB;QAC7C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK;YAAE,OAAO,CAAC,mDAAmD;QACxF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ;YAAE,OAAO,CAAC,qCAAqC;QACrG,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QACtC,iGAAiG;QACjG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;IAEM,IAAI,CAAC,QAAoB;QAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,OAAO,QAAQ,EAAE,CAAC;IACtB,CAAC;CACJ;AAvGD,sCAuGC"}
@@ -1,50 +0,0 @@
1
- import { BaseConfiguration, StringConfigKey, NumberConfigKey, BooleanConfigKey } from './config-process/config-system';
2
- export declare class AgentConfig extends BaseConfiguration {
3
- /**
4
- * Sealights agent token (JWT)
5
- * @type {string}
6
- * @memberOf Config
7
- */
8
- token: StringConfigKey;
9
- tokenFile: StringConfigKey;
10
- server: StringConfigKey;
11
- proxy: StringConfigKey;
12
- interval: NumberConfigKey;
13
- testStatusCheckInterval: NumberConfigKey;
14
- enabled: BooleanConfigKey;
15
- sendFootprints: BooleanConfigKey;
16
- sendEvents: BooleanConfigKey;
17
- sendLogs: BooleanConfigKey;
18
- customerId: StringConfigKey;
19
- appName: StringConfigKey;
20
- branch: StringConfigKey;
21
- build: StringConfigKey;
22
- environmentName: StringConfigKey;
23
- useBranchCoverage: BooleanConfigKey;
24
- labId: StringConfigKey;
25
- testStage: StringConfigKey;
26
- httpServerColoring: BooleanConfigKey;
27
- httpClientColoring: BooleanConfigKey;
28
- useInitialColor: BooleanConfigKey;
29
- gzip: BooleanConfigKey;
30
- useIstanbul: BooleanConfigKey;
31
- enableChildProcessPatcher: BooleanConfigKey;
32
- /**
33
- * Comma-separated list of loggers. Available: console, file
34
- */
35
- loggers: StringConfigKey;
36
- /**
37
- * Port number for coloring
38
- * */
39
- httpListeningPort: NumberConfigKey;
40
- useFootprintsV3: BooleanConfigKey;
41
- extendedFootprints: BooleanConfigKey;
42
- }
43
- export declare class AgentConfigWithRuntimeArgs extends AgentConfig {
44
- /**
45
- * Path to config file
46
- *
47
- * @memberOf AgentConfigWithRuntimeArgs
48
- */
49
- cfg: StringConfigKey;
50
- }
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgentConfigWithRuntimeArgs = exports.AgentConfig = void 0;
4
- const config_system_1 = require("./config-process/config-system");
5
- class AgentConfig extends config_system_1.BaseConfiguration {
6
- constructor() {
7
- super(...arguments);
8
- /**
9
- * Sealights agent token (JWT)
10
- * @type {string}
11
- * @memberOf Config
12
- */
13
- this.token = new config_system_1.StringConfigKey(false);
14
- this.tokenFile = new config_system_1.StringConfigKey(false);
15
- this.server = new config_system_1.StringConfigKey(false);
16
- this.proxy = new config_system_1.StringConfigKey(false);
17
- this.interval = new config_system_1.NumberConfigKey(false, 10000);
18
- this.testStatusCheckInterval = new config_system_1.NumberConfigKey(false, 30000);
19
- this.enabled = new config_system_1.BooleanConfigKey(false, true);
20
- this.sendFootprints = new config_system_1.BooleanConfigKey(false, true);
21
- this.sendEvents = new config_system_1.BooleanConfigKey(false, true);
22
- this.sendLogs = new config_system_1.BooleanConfigKey(false, false);
23
- this.customerId = new config_system_1.StringConfigKey(false);
24
- this.appName = new config_system_1.StringConfigKey(false);
25
- this.branch = new config_system_1.StringConfigKey(false);
26
- this.build = new config_system_1.StringConfigKey(false);
27
- this.environmentName = new config_system_1.StringConfigKey(false);
28
- this.useBranchCoverage = new config_system_1.BooleanConfigKey(false, false);
29
- this.labId = new config_system_1.StringConfigKey(false);
30
- this.testStage = new config_system_1.StringConfigKey(false);
31
- this.httpServerColoring = new config_system_1.BooleanConfigKey(false, false);
32
- this.httpClientColoring = new config_system_1.BooleanConfigKey(false, false);
33
- this.useInitialColor = new config_system_1.BooleanConfigKey(false, true);
34
- this.gzip = new config_system_1.BooleanConfigKey(false, true);
35
- this.useIstanbul = new config_system_1.BooleanConfigKey(false, false);
36
- this.enableChildProcessPatcher = new config_system_1.BooleanConfigKey(false, false);
37
- /**
38
- * Comma-separated list of loggers. Available: console, file
39
- */
40
- this.loggers = new config_system_1.StringConfigKey(false, '');
41
- /**
42
- * Port number for coloring
43
- * */
44
- this.httpListeningPort = new config_system_1.NumberConfigKey(false, 0);
45
- this.useFootprintsV3 = new config_system_1.BooleanConfigKey(false, true);
46
- this.extendedFootprints = new config_system_1.BooleanConfigKey(false, false);
47
- }
48
- }
49
- exports.AgentConfig = AgentConfig;
50
- class AgentConfigWithRuntimeArgs extends AgentConfig {
51
- constructor() {
52
- super(...arguments);
53
- /**
54
- * Path to config file
55
- *
56
- * @memberOf AgentConfigWithRuntimeArgs
57
- */
58
- this.cfg = new config_system_1.StringConfigKey(false);
59
- }
60
- }
61
- exports.AgentConfigWithRuntimeArgs = AgentConfigWithRuntimeArgs;
62
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../test-listener/config.ts"],"names":[],"mappings":";;;AAAA,kEAAuH;AAEvH,MAAa,WAAY,SAAQ,iCAAiB;IAAlD;;QACI;;;;WAIG;QACI,U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AAK,CAAC,CAAC;QAExD,oBAAe,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEpD,SAAI,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEzC,gBAAW,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAEjD,8BAAyB,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAEtE;;WAEG;QACI,YAAO,GAAG,IAAI,+BAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEhD;;YAEI;QACG,sBAAiB,GAAG,IAAI,+BAAe,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAElD,oBAAe,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEpD,uBAAkB,GAAG,IAAI,gCAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAEnE,CAAC;CAAA;AApED,kCAoEC;AAED,MAAa,0BAA2B,SAAQ,WAAW;IAA3D;;QACI;;;;WAIG;QACI,QAAG,GAAG,IAAI,+BAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;CAAA;AAPD,gEAOC"}
@@ -1,11 +0,0 @@
1
- import { AgentConfig } from './config';
2
- /**
3
- * The service is used to get environmental data for submission (process id, machine data, etc.)
4
- */
5
- export declare class EnvironmentDataService {
6
- private cfg;
7
- constructor(cfg: AgentConfig);
8
- private envData;
9
- getEnvDataForSubmission(): any;
10
- setLastError(message: string): void;
11
- }
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnvironmentDataService = void 0;
4
- const os = require("os");
5
- const version = process.env.npm_package_version;
6
- function clone(o) {
7
- //if (!o) return o; //Unreachable
8
- return JSON.parse(JSON.stringify(o));
9
- }
10
- /**
11
- * The service is used to get environmental data for submission (process id, machine data, etc.)
12
- */
13
- class EnvironmentDataService {
14
- constructor(cfg) {
15
- this.cfg = cfg;
16
- this.envData = null;
17
- if (!cfg)
18
- throw new Error('cfg is required');
19
- this.envData = {
20
- machineName: os.hostname(),
21
- platform: os.platform(),
22
- processArgv: process.argv,
23
- os: os.type(),
24
- osVersion: os.release(),
25
- arch: os.arch(),
26
- processId: process.pid,
27
- ipAddress: clone(os.networkInterfaces()),
28
- dependencies: clone(process.versions),
29
- runtime: process.version,
30
- agentType: 'nodejs',
31
- agentVersion: version,
32
- };
33
- if (cfg && cfg.environmentName.hasValue) {
34
- this.envData.environmentName = cfg.environmentName.value;
35
- }
36
- if (cfg && cfg.labId.hasValue) {
37
- this.envData.labId = cfg.labId.value;
38
- }
39
- if (cfg && cfg.testStage.hasValue) {
40
- this.envData.testStage = cfg.testStage.value;
41
- }
42
- }
43
- getEnvDataForSubmission() {
44
- const returnedEnvData = clone(this.envData);
45
- returnedEnvData.memory = {
46
- process: process.memoryUsage(),
47
- machine: {
48
- freemem: os.freemem(),
49
- totalmem: os.totalmem(),
50
- },
51
- };
52
- this.setLastError(null);
53
- return returnedEnvData;
54
- }
55
- setLastError(message) {
56
- this.envData.lastError = message;
57
- }
58
- }
59
- exports.EnvironmentDataService = EnvironmentDataService;
60
- //# sourceMappingURL=environment-data-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment-data-service.js","sourceRoot":"","sources":["../../test-listener/environment-data-service.ts"],"names":[],"mappings":";;;AACA,yBAA0B;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;AAEhD,SAAS,KAAK,CAAI,CAAI;IAClB,iCAAiC;IACjC,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAa,sBAAsB;IAC/B,YAA2B,GAAgB;QAAhB,QAAG,GAAH,GAAG,CAAa;QA2BnC,YAAO,GAAQ,IAAI,CAAC;QA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,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE;gBACrB,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE;aAC1B;SACJ,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,eAAe,CAAC;IAC3B,CAAC;IAEM,YAAY,CAAC,OAAe;QAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC;IACrC,CAAC;CACJ;AA9CD,wDA8CC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FootprintsServiceProxy = void 0;
4
- const base_proxy_1 = require("../base-proxy");
5
- const messages_formatter_1 = require("../../common/messages-formatter");
6
- class FootprintsServiceProxy extends base_proxy_1.BaseProxy {
7
- constructor(cfg, request, logger) {
8
- super(cfg, request, logger);
9
- }
10
- submitFootprints(packetToSend, callback) {
11
- if (!packetToSend) {
12
- this.logger.info('Submit footprints - got null or empty packet. Skip submitting.');
13
- return;
14
- }
15
- const bufferToSend = new Buffer(JSON.stringify(packetToSend));
16
- const hitFiles = this.getHitFiles(packetToSend);
17
- this.logger.debug(`Submitting footprints, tests: ${JSON.stringify(packetToSend.tests)}`);
18
- this.logger.debug(`Submitting footprints, files: ${hitFiles}`);
19
- const url = '/v5/agents/footprints';
20
- this.post(bufferToSend, url, callback);
21
- }
22
- getHitFiles(packetToSend) {
23
- if (!this.logger.isDebugEnabled()) {
24
- return;
25
- }
26
- const formatter = new messages_formatter_1.MessagesFormatter();
27
- if (packetToSend && packetToSend.apps && packetToSend.apps[0] && packetToSend.apps[0].files) {
28
- packetToSend.apps[0].files.forEach((file) => {
29
- formatter.addContent(file.path);
30
- });
31
- }
32
- return formatter.content;
33
- }
34
- }
35
- exports.FootprintsServiceProxy = FootprintsServiceProxy;
36
- //# sourceMappingURL=footprints-service-proxy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"footprints-service-proxy.js","sourceRoot":"","sources":["../../../test-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AAI,EAAC,EAAE;gBACvC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;SACN;QACD,OAAO,SAAS,CAAC,OAAO,CAAC;IAC7B,CAAC;CACJ;AA5BD,wDA4BC"}
@@ -1,226 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FootprintsProcess = void 0;
4
- const queue_1 = require("../queue");
5
- const system_date_1 = require("../../common/system-date");
6
- class FootprintsProcess {
7
- constructor(
8
- /**
9
- * Initial configuration
10
- */
11
- cfg,
12
- /**
13
- * Background thread that tells the footprints service to send footprints from the queue to the server
14
- */
15
- sendToServerWatchdog,
16
- /**
17
- * 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
18
- */
19
- keepaliveWatchdog,
20
- /**
21
- * Configuration process that periodically refreshes server-sent configuration
22
- */
23
- configProcess,
24
- /**
25
- * Proxy to the server for footprints submission
26
- */
27
- footprintsServiceProxy,
28
- /**
29
- * Environments service, used to get environmental data for submission (process id, machine data, etc.)
30
- */
31
- environmentDataService, agentInstanceData, istanbulToFootprints, logger) {
32
- this.cfg = cfg;
33
- this.sendToServerWatchdog = sendToServerWatchdog;
34
- this.keepaliveWatchdog = keepaliveWatchdog;
35
- this.configProcess = configProcess;
36
- this.footprintsServiceProxy = footprintsServiceProxy;
37
- this.environmentDataService = environmentDataService;
38
- this.agentInstanceData = agentInstanceData;
39
- this.istanbulToFootprints = istanbulToFootprints;
40
- this.logger = logger;
41
- this.isSubmittingFootprints = false;
42
- this.sequence = 0;
43
- this.isRunning = false;
44
- this.stopCallbacks = [];
45
- if (!cfg)
46
- throw new Error('cfg was not specified');
47
- if (!sendToServerWatchdog)
48
- throw new Error('sendToServerWatchdog was not specified');
49
- if (!keepaliveWatchdog)
50
- throw new Error('keepaliveWatchdog was not specified');
51
- if (!configProcess)
52
- throw new Error('configProcess was not specified');
53
- if (!footprintsServiceProxy)
54
- throw new Error('footprintsServiceProxy was not specified');
55
- if (!environmentDataService)
56
- throw new Error('environmentDataService was not specified');
57
- if (!agentInstanceData)
58
- throw new Error('agentInstanceData was not specified');
59
- if (!istanbulToFootprints)
60
- throw new Error('istanbulToFootprints was not specified');
61
- if (!logger) {
62
- throw new Error('logger was not specified');
63
- }
64
- this.footprintsQueue = new queue_1.Queue();
65
- sendToServerWatchdog.on('alarm', () => {
66
- this.logger.debug('Start submitting footprints, triggered by send to server watchdog.');
67
- this.submitQueuedFootprints();
68
- });
69
- configProcess.on('configuration_changed', (cfg) => {
70
- this.updateConfig(cfg);
71
- });
72
- this.footprintsQueue.on('full', () => {
73
- this.logger.debug('Start submitting footprints, queue is full.');
74
- this.submitQueuedFootprints();
75
- });
76
- keepaliveWatchdog.on('alarm', () => {
77
- //console.log('keepaliveWatchdog. isSubmittingFootprints:' + this.isSubmittingFootprints + ', queue size: ' + this.footprintsQueue.getQueueSize());
78
- if (!this.isSubmittingFootprints && this.footprintsQueue.getQueueSize() == 0) {
79
- keepaliveWatchdog.stop();
80
- }
81
- });
82
- }
83
- enqueueCurrentFootprints(executionId, testName) {
84
- const footprints = this.istanbulToFootprints.getCurrentFootprints();
85
- const hitModules = Object.keys(footprints);
86
- if (!hitModules || hitModules.length == 0) { //If no modules were hit at all, don't enqueue anything
87
- this.logger.info('No files were hit, not enqueuing footprints.');
88
- return;
89
- }
90
- this.logger.info(`Enqueuing footprints for ${hitModules.length} files.`);
91
- this.footprintsQueue.enqueue({
92
- executionId: executionId,
93
- testName: testName,
94
- footprints: footprints,
95
- localTime: (0, system_date_1.getSystemDateValueOf)()
96
- });
97
- if (this.isRunning && this.cfg.sendFootprints.value && this.cfg.enabled.value) {
98
- this.ensureKeepaliveThreadRunning();
99
- this.sendToServerWatchdog.start();
100
- }
101
- }
102
- ensureKeepaliveThreadRunning() {
103
- this.keepaliveWatchdog.start();
104
- }
105
- updateConfig(updatedCfg) {
106
- if (updatedCfg.sendFootprints.value === false || updatedCfg.enabled.value === false) {
107
- this.footprintsQueue.clear();
108
- this.stop(() => { });
109
- }
110
- this.cfg = updatedCfg;
111
- this.sendToServerWatchdog.setInterval(this.cfg.interval.value);
112
- }
113
- createFootprintsPacket(items) {
114
- const packet = this.istanbulToFootprints.createFootprintsPackageForSending(items, {
115
- customerId: this.cfg.customerId.value,
116
- environment: this.environmentDataService.getEnvDataForSubmission(),
117
- configurationData: this.cfg.toJsonObject(),
118
- meta: {
119
- sequence: ++this.sequence,
120
- generated: (0, system_date_1.getSystemDateValueOf)(),
121
- agentId: this.agentInstanceData.agentId
122
- },
123
- tests: [],
124
- apps: []
125
- });
126
- return packet;
127
- }
128
- submitQueuedFootprints() {
129
- if (!this.isRunning) {
130
- this.logger.info('Agent is not running, not sending footprints');
131
- return;
132
- }
133
- if (this.cfg.sendFootprints.value === false) {
134
- this.logger.info('Not sending footprints since agent is configured to not send.');
135
- return; //Can't start without server or token
136
- }
137
- if (this.isSubmittingFootprints) {
138
- this.logger.info('Not sending footprints since its already submitting.');
139
- return;
140
- }
141
- if (this.footprintsQueue.getQueueSize() == 0) {
142
- this.logger.info('Not sending footprints since queue size is 0');
143
- return;
144
- }
145
- this.logger.info('About to send footprints. Queue size:' + this.footprintsQueue.getQueueSize());
146
- const items = this.footprintsQueue.dequeue(/*this.cfg.maxFootprintsChunkSize ||*/ 1000);
147
- const packet = this.createFootprintsPacket(items);
148
- this.isSubmittingFootprints = true;
149
- this.footprintsServiceProxy.submitFootprints(packet, (err) => {
150
- this.isSubmittingFootprints = false;
151
- this.logger.info('Sent footprints. Queue size:' + this.footprintsQueue.getQueueSize() + ', err:' + err);
152
- if (err) {
153
- this.environmentDataService.setLastError(err.stack);
154
- this.footprintsQueue.requeue(items); //Requeue items for later submission
155
- }
156
- else if (this.footprintsQueue.getQueueSize() > 0) { //If there was an error, don't send now. Otherwise, if the queue still has items, send those now
157
- this.submitQueuedFootprints();
158
- }
159
- else
160
- this.fireQueueEmpty();
161
- });
162
- }
163
- fireQueueEmpty() {
164
- if (this.stopCallbacks.length > 0) {
165
- this.stopCallbacks.forEach((cb) => {
166
- try {
167
- cb();
168
- }
169
- catch (err) {
170
- this.environmentDataService.setLastError(err.stack);
171
- }
172
- });
173
- }
174
- }
175
- start() {
176
- if (this.isRunning)
177
- return; //Already started
178
- if (this.cfg.enabled.value == false)
179
- return; //Don't do anything if agent is completely disabled
180
- this.isRunning = true;
181
- this.sendToServerWatchdog.start();
182
- if (this.footprintsQueue.getQueueSize() > 0) {
183
- this.ensureKeepaliveThreadRunning();
184
- }
185
- }
186
- stop(callback) {
187
- try {
188
- this.sendToServerWatchdog.stop();
189
- if (this.cfg.enabled.value === false || this.cfg.sendFootprints.value === false) { //Footprints/Agent functionality is disabled. Return immediately
190
- this.isRunning = false;
191
- return callback();
192
- }
193
- this.logger.debug('Start submitting footprints, triggered by stop event.');
194
- this.submitQueuedFootprints(); //If footprints are being submitted, this has no effect. Otherwise, it will start submitting footprints if the queue is non-empty
195
- if (this.isSubmittingFootprints) {
196
- /*
197
- Nothing to do right now, since footprints are being submitted
198
- When the submission is over (successfully or not), if the queue is empty the next batch of footprints will be sent.
199
- If after submission the queue is cleared, this callback will be called
200
- */
201
- this.stopCallbacks.push(() => {
202
- this.isRunning = false;
203
- this.keepaliveWatchdog.stop();
204
- return callback();
205
- });
206
- }
207
- else {
208
- /*
209
- Queue must be empty, and nothing is sent. submitQueuedFootprints() would have started sending footprints if the queue was non-empty
210
- */
211
- this.isRunning = false;
212
- this.keepaliveWatchdog.stop();
213
- return callback();
214
- }
215
- }
216
- catch (err) {
217
- //TODO: log
218
- return callback();
219
- }
220
- }
221
- getQueueSize() {
222
- return this.footprintsQueue.getQueueSize();
223
- }
224
- }
225
- exports.FootprintsProcess = FootprintsProcess;
226
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../test-listener/footprints-process/index.ts"],"names":[],"mappings":";;;AAGA,oCAAiC;AAMjC,0DAA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