@contrast/config 1.50.0 → 1.52.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/options.js +29 -4
- package/package.json +4 -4
package/lib/options.js
CHANGED
|
@@ -23,6 +23,31 @@ const path = require('path');
|
|
|
23
23
|
const { Rule, primordials: { BufferFrom, BufferPrototypeToString, StringPrototypeReplace, StringPrototypeReplaceAll, StringPrototypeSplit, StringPrototypeToLowerCase, StringPrototypeToUpperCase, JSONParse } } = require('@contrast/common');
|
|
24
24
|
const { ConfigSource: { DEFAULT_VALUE } } = require('./common');
|
|
25
25
|
|
|
26
|
+
const CMD_IGNORE_LIST_DEFAULTS = [
|
|
27
|
+
'**/npm',
|
|
28
|
+
'**/npx',
|
|
29
|
+
'**/yarn',
|
|
30
|
+
'**/pnpm',
|
|
31
|
+
|
|
32
|
+
'**/.bin/next',
|
|
33
|
+
'**/node_modules/**/next/**',
|
|
34
|
+
'**/.bin/nuxi', // nuxt
|
|
35
|
+
'**/.bin/vite',
|
|
36
|
+
'**/.bin/astro',
|
|
37
|
+
'**/.bin/sv', // svelte
|
|
38
|
+
'**/.bin/webpack',
|
|
39
|
+
'**/node_modules/**/webpack-cli/**',
|
|
40
|
+
'**/.bin/rollup',
|
|
41
|
+
'**/.bin/parcel',
|
|
42
|
+
'**/@parcel/workers/**',
|
|
43
|
+
'**/.bin/babel',
|
|
44
|
+
'**/.bin/gulp',
|
|
45
|
+
'**/.bin/grunt',
|
|
46
|
+
|
|
47
|
+
'**/Visual Studio Code*/**',
|
|
48
|
+
'**/.vscode/**',
|
|
49
|
+
];
|
|
50
|
+
|
|
26
51
|
/**
|
|
27
52
|
* Takes strings "true"|"t" or "false"|"f" (case insensitive) and return the appropriate boolean.
|
|
28
53
|
* @param {boolean | string} value passed arg; never undefined or the function isn't called
|
|
@@ -160,7 +185,7 @@ const options = [
|
|
|
160
185
|
name: 'api.token',
|
|
161
186
|
arg: '<token>',
|
|
162
187
|
desc: 'base64 encoded JSON object containing the `url`, `api_key`, `service_key`, and `user_name` config options, allowing them all to be set in a single variable.',
|
|
163
|
-
fn(value, cfg, source) {
|
|
188
|
+
fn: (value, cfg, source) => {
|
|
164
189
|
try {
|
|
165
190
|
// parse the base64 encoded value
|
|
166
191
|
const parsed = JSONParse(BufferPrototypeToString.call(BufferFrom(value, 'base64'), 'utf8'));
|
|
@@ -470,14 +495,14 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
|
|
|
470
495
|
name: 'agent.node.cmd_ignore_list',
|
|
471
496
|
arg: '<commands>',
|
|
472
497
|
default: '',
|
|
473
|
-
fn: (arg) => StringPrototypeSplit.call(arg,
|
|
474
|
-
desc:
|
|
498
|
+
fn: (arg) => [...CMD_IGNORE_LIST_DEFAULTS, ...StringPrototypeSplit.call(arg, /,(?![^{]*}|[^[]*\])/g).filter((v) => v)],
|
|
499
|
+
desc: "Comma-separated list of glob patterns that will prevent instrumentation when matched in node's arguments."
|
|
475
500
|
},
|
|
476
501
|
{
|
|
477
502
|
// SEE NODE-2886
|
|
478
503
|
name: 'agent.node.exclusive_entrypoint',
|
|
479
504
|
arg: '<entrypoint.js>',
|
|
480
|
-
desc: '
|
|
505
|
+
desc: 'An entrypoint for an application that, when specified, will force the agent to instrument and prevent the agent instrumenting anything else. Resolved relative to `app_root` if set or the current working directory otherwise.'
|
|
481
506
|
},
|
|
482
507
|
{
|
|
483
508
|
name: 'agent.node.rewrite.enable',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.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)",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "lib/index.d.ts",
|
|
15
15
|
"engines": {
|
|
16
16
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">= 18.7.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.
|
|
24
|
-
"@contrast/core": "1.
|
|
23
|
+
"@contrast/common": "1.37.0",
|
|
24
|
+
"@contrast/core": "1.57.0",
|
|
25
25
|
"deepmerge": "^4.3.1",
|
|
26
26
|
"yaml": "^2.2.2"
|
|
27
27
|
}
|