@contrast/config 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common.js +1 -0
- package/lib/options.js +14 -3
- package/package.json +2 -2
package/lib/common.js
CHANGED
|
@@ -104,6 +104,7 @@ const mappings = {
|
|
|
104
104
|
if (!isNaN(baseProbability)) return baseProbability;
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
+
'assess.stacktraces': (remoteData) => remoteData.assess?.report_stacktraces,
|
|
107
108
|
'agent.logger.level': coerceLowerCase('logger.level'),
|
|
108
109
|
'agent.logger.path': (remoteData) => remoteData.logger?.path,
|
|
109
110
|
'agent.security_logger.syslog.enable': (remoteData) => remoteData.security_logger?.syslog?.enable,
|
package/lib/options.js
CHANGED
|
@@ -575,6 +575,7 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
|
|
|
575
575
|
// effective based on local config and 'assess.sampling' TeamServer DTM
|
|
576
576
|
name: 'assess.probabilistic_sampling.base_probability',
|
|
577
577
|
arg: '<probability>',
|
|
578
|
+
/** @param {string} val */
|
|
578
579
|
fn: (val) => {
|
|
579
580
|
const p = parseFloat(val);
|
|
580
581
|
if (p >= 0 && p <= 1) return p;
|
|
@@ -585,7 +586,7 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
|
|
|
585
586
|
});
|
|
586
587
|
}
|
|
587
588
|
},
|
|
588
|
-
default: 0.
|
|
589
|
+
default: 0.05,
|
|
589
590
|
desc: 'A value p within the range [0, 1]. Each request will share same probability p of being sampled.',
|
|
590
591
|
},
|
|
591
592
|
{
|
|
@@ -754,8 +755,18 @@ Example - \`label1, label2, label3\``,
|
|
|
754
755
|
{
|
|
755
756
|
name: 'server.environment',
|
|
756
757
|
arg: '<environment>',
|
|
757
|
-
|
|
758
|
-
fn:
|
|
758
|
+
/** @param {string} val */
|
|
759
|
+
fn: (val) => {
|
|
760
|
+
if (!val) return val;
|
|
761
|
+
|
|
762
|
+
const valid = new Set(['QA', 'PRODUCTION', 'DEVELOPMENT']);
|
|
763
|
+
const normalized = uppercase(val);
|
|
764
|
+
if (!valid.has(normalized)) {
|
|
765
|
+
throw new Error(`Invalid option: server.environment must be one of ${Array.from(valid)}`);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
return normalized;
|
|
769
|
+
},
|
|
759
770
|
desc: `Set the environment directly to override the default set by the Contrast UI. This allows the user to configure the environment dynamically at startup rather than manually updating the Server in the Contrast UI themselves afterwards.
|
|
760
771
|
Valid values include \`QA\`, \`PRODUCTION\` and \`DEVELOPMENT\`. For example, \`PRODUCTION\` registers this Server as running in a \`PRODUCTION\` environment, regardless of the organization's default environment in the Contrast UI.`,
|
|
761
772
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "An API for discovering Contrast agent configuration data",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@contrast/common": "1.32.0",
|
|
24
|
-
"@contrast/core": "1.
|
|
24
|
+
"@contrast/core": "1.50.0",
|
|
25
25
|
"yaml": "^2.2.2"
|
|
26
26
|
}
|
|
27
27
|
}
|