@contrast/config 1.57.0 → 1.58.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/index.d.ts +6 -4
- package/lib/options.js +21 -3
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -39,15 +39,14 @@ export type SyslogLevel =
|
|
|
39
39
|
| 'info'
|
|
40
40
|
| 'debug';
|
|
41
41
|
|
|
42
|
-
export interface ConfigOption<T> {
|
|
42
|
+
export interface ConfigOption<T = any> {
|
|
43
43
|
name: string;
|
|
44
|
-
|
|
45
|
-
env: string;
|
|
44
|
+
desc: string;
|
|
46
45
|
arg: string;
|
|
46
|
+
env?: string;
|
|
47
47
|
enum?: T[];
|
|
48
48
|
default?: T;
|
|
49
49
|
fn?: (arg: any, cfg: Config, source: string) => T;
|
|
50
|
-
desc: string;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
export interface Config {
|
|
@@ -62,6 +61,7 @@ export interface Config {
|
|
|
62
61
|
args?: any[];
|
|
63
62
|
}[];
|
|
64
63
|
|
|
64
|
+
installation_tool: string;
|
|
65
65
|
preinstrument: boolean,
|
|
66
66
|
|
|
67
67
|
api: {
|
|
@@ -212,6 +212,8 @@ export interface Config {
|
|
|
212
212
|
source_maps: {
|
|
213
213
|
/** Default: `true` */
|
|
214
214
|
enable: boolean;
|
|
215
|
+
/** Default: `false` */
|
|
216
|
+
inline: boolean;
|
|
215
217
|
};
|
|
216
218
|
library_usage: {
|
|
217
219
|
reporting: {
|
package/lib/options.js
CHANGED
|
@@ -122,6 +122,13 @@ const options = [
|
|
|
122
122
|
fn: castBoolean,
|
|
123
123
|
desc: 'Set to `false` to disable Contrast agent.',
|
|
124
124
|
},
|
|
125
|
+
{
|
|
126
|
+
name: 'installation_tool',
|
|
127
|
+
desc: 'Set when a tool like the Agent Operator or the Flex Agent manages the agent installation.',
|
|
128
|
+
arg: '<tool>',
|
|
129
|
+
default: 'NONE',
|
|
130
|
+
env: 'CONTRAST_INSTALLATION_TOOL',
|
|
131
|
+
},
|
|
125
132
|
// api
|
|
126
133
|
{
|
|
127
134
|
name: 'api.enable',
|
|
@@ -539,6 +546,13 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
|
|
|
539
546
|
fn: castBoolean,
|
|
540
547
|
desc: 'Set to `false` to disable source map generation when rewriting.',
|
|
541
548
|
},
|
|
549
|
+
{
|
|
550
|
+
name: 'agent.node.source_maps.inline',
|
|
551
|
+
arg: '[true]',
|
|
552
|
+
default: false,
|
|
553
|
+
fn: castBoolean,
|
|
554
|
+
desc: 'Set to `true` to inline source maps into rewritten files instead of writing them to separate files. Forces `source_maps.enable` when set to `true`.',
|
|
555
|
+
},
|
|
542
556
|
// agent.node.library_usage.reporting
|
|
543
557
|
{
|
|
544
558
|
name: 'agent.node.library_usage.reporting.enable',
|
|
@@ -871,9 +885,13 @@ Example - \`label1, label2, label3\``,
|
|
|
871
885
|
desc: 'Set to `false` to disable detection of cloud provider metadata such as resource identifiers.'
|
|
872
886
|
},
|
|
873
887
|
].map((opt) => {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
888
|
+
if (!opt.env) {
|
|
889
|
+
let env = StringPrototypeReplaceAll.call(StringPrototypeToUpperCase.call(opt.name), '.', '__');
|
|
890
|
+
env = StringPrototypeReplaceAll.call(env, '-', '_');
|
|
891
|
+
return Object.assign(opt, { env: `CONTRAST__${env}` });
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
return opt;
|
|
877
895
|
});
|
|
878
896
|
|
|
879
897
|
module.exports = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.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)",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.41.
|
|
24
|
-
"@contrast/core": "1.
|
|
23
|
+
"@contrast/common": "1.41.1",
|
|
24
|
+
"@contrast/core": "1.63.0",
|
|
25
25
|
"deepmerge": "^4.3.1",
|
|
26
26
|
"yaml": "^2.2.2"
|
|
27
27
|
}
|