slnodejs 6.1.914 → 6.1.921

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 +22 -0
  7. package/tsOutputs/cli-parse/cli.js.map +1 -1
  8. package/tsOutputs/cli-parse/contracts.d.ts +4 -1
  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 +1 -0
  18. package/tsOutputs/common/config-process/config.js +1 -0
  19. package/tsOutputs/common/config-process/config.js.map +1 -1
  20. package/tsOutputs/common/constants/sl-env-vars.d.ts +4 -0
  21. package/tsOutputs/common/constants/sl-env-vars.js +4 -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/index.d.ts +4 -8
  26. package/tsOutputs/common/footprints-process-v6/index.js +2 -14
  27. package/tsOutputs/common/footprints-process-v6/index.js.map +1 -1
  28. package/tsOutputs/common/http/contracts.d.ts +1 -1
  29. package/tsOutputs/common/watchdog.d.ts +9 -8
  30. package/tsOutputs/common/watchdog.js +1 -4
  31. package/tsOutputs/common/watchdog.js.map +1 -1
  32. package/tsOutputs/test-listener/agent-loader.js +8 -2
  33. package/tsOutputs/test-listener/agent-loader.js.map +1 -1
  34. package/tsOutputs/test-listener/agent.d.ts +1 -1
  35. package/tsOutputs/test-listener/bootstrap.js +4 -0
  36. package/tsOutputs/test-listener/bootstrap.js.map +1 -1
  37. package/tsOutputs/test-listener/config-process/config-loader.js +1 -1
  38. package/tsOutputs/test-listener/config-process/config-loader.js.map +1 -1
  39. package/tsOutputs/test-listener/factory.d.ts +3 -5
  40. package/tsOutputs/test-listener/factory.js +15 -23
  41. package/tsOutputs/test-listener/factory.js.map +1 -1
  42. package/tsOutputs/test-listener/logs-process/index.d.ts +2 -2
  43. package/browser-agent/dist/browser-agent-all.js +0 -117546
  44. package/browser-agent/dist/browser-agent-all.min.js +0 -16
  45. package/browser-agent/package.json +0 -58
  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,58 +0,0 @@
1
- {
2
- "name": "sl-browser-agent",
3
- "version": "6.1.914",
4
- "description": "le Browser Agent!",
5
- "main": "dist/browser-agent-all.js",
6
- "browser": {
7
- "request": false
8
- },
9
- "devDependencies": {
10
- "@types/request": "2.48.2",
11
- "browserify": "14.4.0",
12
- "disc": "^1.3.3",
13
- "globify": "3.0.3",
14
- "parse-asn1": "5.1.5",
15
- "systemjs-builder": "0.15.34",
16
- "tsify": "5.0.2",
17
- "uglify-js": "3.17.4"
18
- },
19
- "scripts": {
20
- "build": "npm run browserify",
21
- "build:disc": "npm run browserify:disc",
22
- "build-tests": "tsc -p ./tsconfig.tests.json",
23
- "test": "../node_modules/.bin/tsc -p ./tsconfig.tests.json && ../node_modules/.bin/mocha build-test/browser-agent/test/unitTest/**/*.js",
24
- "prebrowserify": "tsc -p ./tsconfig.browserfiy.json && mkdir -p dist",
25
- "prebrowserify:disc": "tsc -p ./tsconfig.browserfiy.json && mkdir -p dist",
26
- "browserify": "node_modules/.bin/browserify tsOutputs/browser-agent/index.js -o ./dist/browser-agent-all.js",
27
- "browserify:disc": "node_modules/.bin/browserify tsOutputs/browser-agent/index.js --full-paths -o ./dist/browser-agent-all.js",
28
- "postbrowserify": "node_modules/.bin/uglifyjs -o ./dist/browser-agent-all.min.js dist/browser-agent-all.js",
29
- "postbrowserify:disc": "node_modules/.bin/uglifyjs -o ./dist/browser-agent-all.min.js dist/browser-agent-all.js && node_modules/.bin/discify ./dist/browser-agent-all.min.js > ./dist/disc.html && open ./dist/disc.html",
30
- "tsify": "globify index.ts lib/**/*.ts typings/**/*.ts --debug --standalone agnt -p [ tsify -p ./tsconfig.browserfiy.json ] -o ./dist-debug/browser-agent-all.js"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/Sealights/SL.OnPremise.BrowserAgent.git"
35
- },
36
- "keywords": [
37
- "awesome",
38
- "cool",
39
- "radical",
40
- "#dougthefish"
41
- ],
42
- "author": "Alon Weiss, Nadav Yeheskel",
43
- "license": "SEE LICENSE IN Sealights-License-Agreement.pdf",
44
- "bugs": {
45
- "url": "https://github.com/Sealights/SL.OnPremise.BrowserAgent/issues"
46
- },
47
- "homepage": "https://github.com/Sealights/SL.OnPremise.BrowserAgent#readme",
48
- "files": [
49
- "dist/browser-agent-all.js",
50
- "dist/browser-agent-all.min.js"
51
- ],
52
- "dependencies": {
53
- "@opentelemetry/api": "^1.4.0",
54
- "@opentelemetry/instrumentation": "^0.34.0",
55
- "@opentelemetry/instrumentation-fetch": "^0.34.0",
56
- "@opentelemetry/instrumentation-xml-http-request": "^0.34.0"
57
- }
58
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UUID = void 0;
4
- const crypto = require("crypto");
5
- class UUID {
6
- static newGuid(str) {
7
- const out = crypto.createHash('sha1').update(str).digest();
8
- out[8] = out[8] & 0x3f | 0xa0; // set variant
9
- out[6] = out[6] & 0x0f | 0x50; // set version
10
- const hex = out.toString('hex', 0, 16);
11
- return [
12
- hex.substring(0, 8),
13
- hex.substring(8, 12),
14
- hex.substring(12, 16),
15
- hex.substring(16, 20),
16
- hex.substring(20, 32),
17
- ].join('-');
18
- }
19
- }
20
- exports.UUID = UUID;
21
- //# sourceMappingURL=uuid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../common/uuid.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAElC,MAAa,IAAI;IACN,MAAM,CAAC,OAAO,CAAC,GAAW;QAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QAE3D,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,cAAc;QAC7C,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,cAAc;QAE7C,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAEvC,OAAO;YACH,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YACnB,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;YACpB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;YACrB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;YACrB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;SACxB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;CACJ;AAjBD,oBAiBC"}
@@ -1,88 +0,0 @@
1
- export interface AgentConfigurationKey {
2
- required: boolean;
3
- type: 'number' | 'string' | 'boolean' | string;
4
- }
5
- export interface AgentConfigurationProvider {
6
- getAllKeyValues(callback: (err: Error, keysAndValues: {
7
- [key: string]: string;
8
- }) => void): void;
9
- getName(): string;
10
- }
11
- export declare class JsonObjectConfigurationProvider implements AgentConfigurationProvider {
12
- protected configObject: Record<string, any>;
13
- constructor(configObject: Record<string, any>);
14
- getAllKeyValues(callback: (err: Error, keysAndValues: {
15
- [key: string]: string;
16
- }) => void): void;
17
- getName(): string;
18
- }
19
- export declare class EnvVariableConfigurationProvider implements AgentConfigurationProvider {
20
- private prefix?;
21
- constructor(prefix?: string);
22
- getAllKeyValues(callback: (err: Error, keysAndValues: {
23
- [key: string]: string;
24
- }) => void): void;
25
- getName(): string;
26
- }
27
- export declare class ConfigProviderAggregator implements AgentConfigurationProvider {
28
- private providers;
29
- constructor(providers: AgentConfigurationProvider[]);
30
- getAllKeyValues(callback: (err: Error, keysAndValues: {
31
- [key: string]: string;
32
- }) => void): void;
33
- getName(): string;
34
- }
35
- export declare class JsonConfigFileConfigurationProvider implements AgentConfigurationProvider {
36
- private filename;
37
- constructor(filename: string);
38
- getAllKeyValues(callback: (err: Error, keysAndValues: {
39
- [key: string]: string;
40
- }) => void): void;
41
- getName(): string;
42
- }
43
- declare abstract class AgentConfigKey<T> {
44
- metadata: AgentConfigurationKey;
45
- abstract loadFromRawData(s: string): any;
46
- hasValue: boolean;
47
- isConfigKey: true;
48
- value: T;
49
- }
50
- export declare class StringConfigKey implements AgentConfigKey<string> {
51
- private required;
52
- constructor(required: boolean, defaultValue?: string);
53
- isConfigKey: true;
54
- readonly metadata: AgentConfigurationKey;
55
- private _value;
56
- get value(): string;
57
- set value(value: string);
58
- hasValue: boolean;
59
- loadFromRawData(s: string): void;
60
- }
61
- export declare class NumberConfigKey implements AgentConfigKey<number> {
62
- private required;
63
- constructor(required: boolean, defaultValue?: number);
64
- isConfigKey: true;
65
- readonly metadata: AgentConfigurationKey;
66
- private _value;
67
- get value(): number;
68
- set value(value: number);
69
- hasValue: boolean;
70
- loadFromRawData(s: string): void;
71
- }
72
- export declare class BooleanConfigKey implements AgentConfigKey<boolean> {
73
- private required;
74
- constructor(required: boolean, defaultValue?: boolean);
75
- isConfigKey: true;
76
- readonly metadata: AgentConfigurationKey;
77
- private _value;
78
- get value(): boolean;
79
- set value(value: boolean);
80
- hasValue: boolean;
81
- loadFromRawData(s: string): void;
82
- }
83
- export declare class BaseConfiguration {
84
- loadConfigurationFromMultipleProviders(configProviders: AgentConfigurationProvider[], callback: (err: Error) => void): void;
85
- loadConfiguration(configProvider: AgentConfigurationProvider, callback?: (err: Error) => void, dbg?: boolean): void;
86
- toJsonObject(): Record<string, any>;
87
- }
88
- export {};
@@ -1,259 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseConfiguration = exports.BooleanConfigKey = exports.NumberConfigKey = exports.StringConfigKey = exports.JsonConfigFileConfigurationProvider = exports.ConfigProviderAggregator = exports.EnvVariableConfigurationProvider = exports.JsonObjectConfigurationProvider = void 0;
4
- const fs = require("fs");
5
- class JsonObjectConfigurationProvider {
6
- constructor(configObject) {
7
- this.configObject = configObject;
8
- this.configObject = configObject || {};
9
- }
10
- getAllKeyValues(callback) {
11
- return callback(null, this.configObject);
12
- }
13
- getName() {
14
- return 'JSON Object';
15
- }
16
- }
17
- exports.JsonObjectConfigurationProvider = JsonObjectConfigurationProvider;
18
- class EnvVariableConfigurationProvider {
19
- constructor(prefix) {
20
- this.prefix = prefix;
21
- }
22
- getAllKeyValues(callback) {
23
- if (this.prefix) {
24
- const ret = {};
25
- for (const key in process.env) {
26
- if (key.indexOf(this.prefix) == 0) {
27
- ret[key.substr(this.prefix.length)] = process.env[key];
28
- }
29
- }
30
- callback(null, ret);
31
- }
32
- else {
33
- return callback(null, process.env);
34
- }
35
- }
36
- getName() {
37
- return 'Environment Variables';
38
- }
39
- }
40
- exports.EnvVariableConfigurationProvider = EnvVariableConfigurationProvider;
41
- class ConfigProviderAggregator {
42
- constructor(providers) {
43
- this.providers = providers;
44
- if (!providers)
45
- throw new Error('no provider was specified');
46
- }
47
- getAllKeyValues(callback) {
48
- const flattenedConfiguration = {};
49
- const remainingProviders = [].concat(this.providers);
50
- const attemptNext = () => {
51
- if (remainingProviders.length == 0) {
52
- return callback(null, flattenedConfiguration);
53
- }
54
- const nextProvider = remainingProviders.shift();
55
- nextProvider.getAllKeyValues((err, keysAndValues) => {
56
- if (err)
57
- return attemptNext();
58
- Object.keys(keysAndValues).forEach(k => {
59
- if (!flattenedConfiguration.hasOwnProperty(k))
60
- flattenedConfiguration[k] = keysAndValues[k];
61
- });
62
- return attemptNext();
63
- });
64
- };
65
- attemptNext();
66
- }
67
- getName() {
68
- return 'Aggregated config from multiple providers: ' + this.providers.map(t => t.getName());
69
- }
70
- }
71
- exports.ConfigProviderAggregator = ConfigProviderAggregator;
72
- class JsonConfigFileConfigurationProvider {
73
- constructor(filename) {
74
- this.filename = filename;
75
- if (!filename)
76
- throw new Error('filename is required');
77
- }
78
- getAllKeyValues(callback) {
79
- try {
80
- const cfg = JSON.parse(fs.readFileSync(this.filename).toString().trim());
81
- return callback(null, cfg);
82
- }
83
- catch (e) {
84
- return callback(e, null);
85
- }
86
- }
87
- getName() {
88
- return 'Config filename: ' + this.filename;
89
- }
90
- }
91
- exports.JsonConfigFileConfigurationProvider = JsonConfigFileConfigurationProvider;
92
- class AgentConfigKey {
93
- }
94
- class StringConfigKey {
95
- constructor(required, defaultValue) {
96
- this.required = required;
97
- this.isConfigKey = true;
98
- this.metadata = { required: required, type: 'string' };
99
- if (defaultValue !== undefined) {
100
- this.value = defaultValue;
101
- }
102
- }
103
- get value() {
104
- return this._value;
105
- }
106
- set value(value) {
107
- this._value = value;
108
- this.hasValue = true;
109
- }
110
- loadFromRawData(s) {
111
- this.value = s;
112
- this.hasValue = true;
113
- }
114
- }
115
- exports.StringConfigKey = StringConfigKey;
116
- class NumberConfigKey {
117
- constructor(required, defaultValue) {
118
- this.required = required;
119
- this.isConfigKey = true;
120
- this.metadata = { required: required, type: 'number' };
121
- if (defaultValue !== undefined) {
122
- this.value = defaultValue;
123
- }
124
- }
125
- get value() {
126
- return this._value;
127
- }
128
- set value(value) {
129
- this._value = value;
130
- this.hasValue = true;
131
- }
132
- loadFromRawData(s) {
133
- const parsed = parseInt(s);
134
- if (isNaN(parsed))
135
- throw new Error(s + ' is not a valid number');
136
- this.value = parsed;
137
- this.hasValue = true;
138
- }
139
- }
140
- exports.NumberConfigKey = NumberConfigKey;
141
- class BooleanConfigKey {
142
- constructor(required, defaultValue) {
143
- this.required = required;
144
- this.isConfigKey = true;
145
- this.metadata = { required: required, type: 'boolean' };
146
- if (defaultValue !== undefined) {
147
- this.value = defaultValue;
148
- }
149
- }
150
- get value() {
151
- return this._value;
152
- }
153
- set value(value) {
154
- this._value = value;
155
- this.hasValue = true;
156
- }
157
- loadFromRawData(s) {
158
- if (s == null)
159
- s = '';
160
- if (typeof s === 'boolean')
161
- s = String(s);
162
- s = s.toLowerCase();
163
- switch (s) {
164
- case 'true':
165
- this.value = true;
166
- this.hasValue = true;
167
- return;
168
- case 'false':
169
- this.value = false;
170
- this.hasValue = true;
171
- return;
172
- case 'undefined':
173
- this.value = false;
174
- this.hasValue = false;
175
- return;
176
- default:
177
- throw new Error('Invalid boolean value: ' + s);
178
- }
179
- }
180
- }
181
- exports.BooleanConfigKey = BooleanConfigKey;
182
- class BaseConfiguration {
183
- loadConfigurationFromMultipleProviders(configProviders, callback) {
184
- const provider = new ConfigProviderAggregator(configProviders);
185
- this.loadConfiguration(provider, callback);
186
- }
187
- loadConfiguration(configProvider, callback, dbg) {
188
- try {
189
- configProvider.getAllKeyValues((err, keysAndValues) => {
190
- if (err) {
191
- if (callback) {
192
- callback(err);
193
- }
194
- return;
195
- }
196
- keysAndValues = keysAndValues || {};
197
- const knownKeys = Object.keys(this);
198
- let hadError = false;
199
- let keyWithError = '';
200
- knownKeys.forEach((keyName) => {
201
- if (hadError) {
202
- console.log('[Sealights Test Listener] - Failed to load configuration due to invalid value in \'' + keyWithError + '\' field\'.');
203
- return;
204
- }
205
- const cfgKey = this[keyName];
206
- if (!cfgKey.isConfigKey)
207
- return;
208
- const rawValue = keysAndValues[keyName];
209
- if (cfgKey.metadata.required && rawValue == undefined) {
210
- const msg = 'Required configuration is missing: ' + keyName + ', provider:' + configProvider.getName();
211
- hadError = true;
212
- if (callback) {
213
- callback(new Error(msg));
214
- }
215
- }
216
- if (rawValue == undefined)
217
- return; //no value specified and cfg is not required
218
- try {
219
- cfgKey.loadFromRawData(rawValue);
220
- }
221
- catch (e) {
222
- const msg = 'Invalid configuration for key=' + keyName + ', value=' + rawValue + +', provider=' + configProvider.getName() + ': ' + e.toString();
223
- console.log('[Sealights Test Listener] - ' + msg);
224
- hadError = true;
225
- keyWithError = keyName;
226
- if (callback) {
227
- callback(new Error(msg));
228
- }
229
- }
230
- });
231
- if (!hadError) {
232
- if (callback) {
233
- callback(null);
234
- }
235
- return;
236
- }
237
- });
238
- }
239
- catch (e) {
240
- if (callback) {
241
- callback(e);
242
- }
243
- return;
244
- }
245
- }
246
- toJsonObject() {
247
- const ret = {};
248
- const knownKeys = Object.keys(this);
249
- knownKeys.forEach((keyName) => {
250
- const cfgKey = this[keyName];
251
- if (cfgKey.isConfigKey && cfgKey.hasValue) {
252
- ret[keyName] = cfgKey.value;
253
- }
254
- });
255
- return ret;
256
- }
257
- }
258
- exports.BaseConfiguration = BaseConfiguration;
259
- //# sourceMappingURL=config-system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-system.js","sourceRoot":"","sources":["../../../test-listener/config-process/config-system.ts"],"names":[],"mappings":";;;AAAA,yBAA0B;AAY1B,MAAa,+BAA+B;IACxC,YAA6B,YAAiC;QAAjC,iBAAY,GAAZ,YAAY,CAAqB;QAC1D,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,EAAE,CAAC;IAC3C,CAAC;IACM,eAAe,CAAC,QAAwE;QAC3F,OAAO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E,CAAC;QACpC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAe,EAAE,EAAE;YAClC,MAAM,MAAM,GAAwB,IAAI,CAAC,OAAO,CAAC,CAAC;YAClD,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,EAAE;gBACvC,GAAG,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;aAC/B;QACL,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AA7ED,8CA6EC"}
@@ -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,CAAC,CAAC;SAAE;QAEvD,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACtB,QAAQ,CAAC,IAAI,EAAE,CAAC;YAChB,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAEO,sBAAsB,CAAC,QAA+B;QAC1D,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;YAC9B,OAAO,EAAE,IAAI,CAAC,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AAO,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