@contrast/agent-bundle 5.42.0 → 5.45.1
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/README.md +1 -10
- package/node_modules/@contrast/agent/README.md +1 -10
- package/node_modules/@contrast/agent/package.json +12 -12
- package/node_modules/@contrast/agent-swc-plugin/package.json +3 -3
- package/node_modules/@contrast/agentify/lib/rewrite-hooks.js +3 -3
- package/node_modules/@contrast/agentify/lib/utils.js +13 -7
- package/node_modules/@contrast/agentify/package.json +17 -17
- package/node_modules/@contrast/architecture-components/package.json +6 -6
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/ejs/template.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/pug/index.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/http/server-response.js +1 -12
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/restify.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/tracker.js +1 -1
- package/node_modules/@contrast/assess/lib/get-source-context.js +1 -1
- package/node_modules/@contrast/assess/lib/response-scanning/install/http.js +0 -12
- package/node_modules/@contrast/assess/package.json +14 -14
- package/node_modules/@contrast/code-events/binding.gyp +1 -1
- package/node_modules/@contrast/code-events/package.json +11 -9
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi108.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi115.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi127.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/{@contrast+code-events.abi93.node → @contrast+code-events.abi137.node} +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi108.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi115.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi127.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi137.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi108.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi115.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi127.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi137.node +0 -0
- package/node_modules/@contrast/common/lib/constants.d.ts +1 -1
- package/node_modules/@contrast/common/lib/constants.js +1 -1
- package/node_modules/@contrast/common/lib/index.js +15 -15
- package/node_modules/@contrast/common/lib/primordials.d.ts +22 -20
- package/node_modules/@contrast/common/lib/types.d.ts +18 -6
- package/node_modules/@contrast/common/package.json +2 -2
- package/node_modules/@contrast/config/lib/options.js +29 -4
- package/node_modules/@contrast/config/package.json +4 -4
- package/node_modules/@contrast/core/lib/app-info.js +53 -74
- package/node_modules/@contrast/core/lib/index.d.ts +17 -1
- package/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +33 -5
- package/node_modules/@contrast/core/package.json +10 -9
- package/node_modules/@contrast/deadzones/package.json +6 -6
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +17 -13
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +16 -4
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +2 -2
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +2 -3
- package/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +6 -6
- package/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -1
- package/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -7
- package/node_modules/@contrast/dep-hooks/lib/helpers.js +2 -18
- package/node_modules/@contrast/dep-hooks/lib/index.d.ts +17 -12
- package/node_modules/@contrast/dep-hooks/lib/index.js +5 -3
- package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -1
- package/node_modules/@contrast/dep-hooks/lib/package-finder.js +6 -6
- package/node_modules/@contrast/dep-hooks/package.json +4 -3
- package/node_modules/@contrast/distringuish/package.json +7 -6
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi108.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi115.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi127.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/{@contrast+distringuish.abi93.node → @contrast+distringuish.abi137.node} +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi108.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi115.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi127.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi137.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi108.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi115.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi127.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi137.node +0 -0
- package/node_modules/@contrast/esm-hooks/lib/debug-methods.mjs +4 -4
- package/node_modules/@contrast/esm-hooks/lib/get-file-type.mjs +2 -9
- package/node_modules/@contrast/esm-hooks/lib/hooks.mjs +0 -2
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs/promises.mjs +2 -0
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs.mjs +3 -0
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/util.mjs +1 -0
- package/node_modules/@contrast/esm-hooks/package.json +7 -7
- package/node_modules/@contrast/fn-inspect/package.json +9 -5
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi108.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi115.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi127.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/{@contrast+fn-inspect.abi93.node → @contrast+fn-inspect.abi137.node} +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi108.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi115.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi127.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi137.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi137.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/{@contrast+fn-inspect.abi93.musl.node → @contrast+fn-inspect.abi137.musl.node} +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi108.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi115.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi127.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi137.node +0 -0
- package/node_modules/@contrast/instrumentation/lib/http2.js +0 -11
- package/node_modules/@contrast/instrumentation/package.json +6 -6
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +312 -224
- package/node_modules/@contrast/library-analysis/package.json +6 -6
- package/node_modules/@contrast/logger/lib/index.js +18 -8
- package/node_modules/@contrast/logger/lib/serializers.js +5 -5
- package/node_modules/@contrast/logger/lib/utils.d.ts +0 -6
- package/node_modules/@contrast/logger/package.json +4 -4
- package/node_modules/@contrast/metrics/lib/index.d.ts +6 -6
- package/node_modules/@contrast/metrics/lib/index.js +0 -1
- package/node_modules/@contrast/metrics/package.json +7 -7
- package/node_modules/@contrast/patcher/package.json +3 -3
- package/node_modules/@contrast/perf/package.json +7 -4
- package/node_modules/@contrast/protect/lib/hardening/handlers.js +37 -21
- package/node_modules/@contrast/protect/lib/index.d.ts +3 -2
- package/node_modules/@contrast/protect/lib/index.js +9 -2
- package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +275 -233
- package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +3 -4
- package/node_modules/@contrast/protect/lib/input-tracing/{handlers/index.js → handlers.js} +15 -15
- package/node_modules/@contrast/protect/lib/input-tracing/index.js +0 -1
- package/node_modules/@contrast/protect/lib/make-source-context.js +5 -7
- package/node_modules/@contrast/protect/lib/policy.js +130 -95
- package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +19 -18
- package/node_modules/@contrast/protect/package.json +12 -12
- package/node_modules/@contrast/reporter/lib/index.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/base.d.ts +0 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.d.ts +4 -2
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +14 -14
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +43 -6
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +262 -429
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/server-inventory.d.ts +3 -3
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +17 -7
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +12 -13
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/utils.js +6 -7
- package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -3
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +72 -86
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/messages.js +6 -7
- package/node_modules/@contrast/reporter/lib/validators.js +0 -1
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.husky/pre-commit +2 -2
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc +5 -0
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/README.md +2 -4
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/bench.js +5 -36
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/index.js +56 -300
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/package.json +12 -7
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test.js +1684 -0
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/types/index.d.ts +1 -2
- package/node_modules/@contrast/reporter/package.json +10 -10
- package/node_modules/@contrast/rewriter/lib/index.js +5 -43
- package/node_modules/@contrast/rewriter/package.json +8 -8
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +0 -5
- package/node_modules/@contrast/route-coverage/lib/install/restify.js +1 -1
- package/node_modules/@contrast/route-coverage/package.json +10 -10
- package/node_modules/@contrast/scopes/package.json +6 -6
- package/node_modules/@contrast/sec-obs/lib/traces/http.js +1 -1
- package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +1 -1
- package/node_modules/@contrast/sec-obs/package.json +10 -10
- package/node_modules/@contrast/sources/lib/index.js +1 -1
- package/node_modules/@contrast/sources/lib/index.test.js +0 -26
- package/node_modules/@contrast/sources/package.json +3 -3
- package/node_modules/@contrast/telemetry/package.json +6 -6
- package/node_modules/@opentelemetry/semantic-conventions/README.md +3 -2
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +154 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +23 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +154 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +23 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +4354 -2883
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +157 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +720 -147
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +10 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +26 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/package.json +6 -7
- package/node_modules/@swc/core/README.md +5 -0
- package/node_modules/@swc/core/binding.d.ts +2 -2
- package/node_modules/@swc/core/index.d.ts +5 -4
- package/node_modules/@swc/core/index.js +2 -2
- package/node_modules/@swc/core/package.json +12 -12
- package/node_modules/@swc/core-darwin-arm64/package.json +1 -1
- package/node_modules/@swc/core-darwin-arm64/swc.darwin-arm64.node +0 -0
- package/node_modules/@swc/core-darwin-x64/package.json +1 -1
- package/node_modules/@swc/core-darwin-x64/swc.darwin-x64.node +0 -0
- package/node_modules/@swc/core-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@swc/core-linux-arm64-gnu/swc.linux-arm64-gnu.node +0 -0
- package/node_modules/@swc/core-linux-arm64-musl/package.json +1 -1
- package/node_modules/@swc/core-linux-arm64-musl/swc.linux-arm64-musl.node +0 -0
- package/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
- package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/node_modules/@swc/core-linux-x64-musl/package.json +1 -1
- package/node_modules/@swc/core-linux-x64-musl/swc.linux-x64-musl.node +0 -0
- package/node_modules/@swc/core-win32-arm64-msvc/package.json +1 -1
- package/node_modules/@swc/core-win32-arm64-msvc/swc.win32-arm64-msvc.node +0 -0
- package/node_modules/@swc/core-win32-x64-msvc/package.json +1 -1
- package/node_modules/@swc/core-win32-x64-msvc/swc.win32-x64-msvc.node +0 -0
- package/node_modules/@swc/types/index.d.ts +14 -5
- package/node_modules/@swc/types/package.json +2 -2
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/node/child_process.d.ts +26 -122
- package/node_modules/@types/node/crypto.d.ts +44 -10
- package/node_modules/@types/node/dns.d.ts +5 -0
- package/node_modules/@types/node/fs/promises.d.ts +41 -26
- package/node_modules/@types/node/fs.d.ts +52 -35
- package/node_modules/@types/node/globals.d.ts +148 -347
- package/node_modules/@types/node/http.d.ts +29 -5
- package/node_modules/@types/node/https.d.ts +5 -0
- package/node_modules/@types/node/index.d.ts +7 -2
- package/node_modules/@types/node/inspector.d.ts +187 -4089
- package/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/node_modules/@types/node/module.d.ts +1 -0
- package/node_modules/@types/node/net.d.ts +21 -0
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/sqlite.d.ts +34 -0
- package/node_modules/@types/node/test.d.ts +104 -0
- package/node_modules/@types/node/tls.d.ts +32 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +7 -2
- package/node_modules/@types/node/ts5.7/index.d.ts +7 -2
- package/node_modules/@types/node/url.d.ts +19 -5
- package/node_modules/@types/node/util.d.ts +6 -4
- package/node_modules/@types/node/vm.d.ts +73 -10
- package/node_modules/@types/node/wasi.d.ts +21 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +47 -52
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +51 -3
- package/node_modules/axios/CHANGELOG.md +58 -0
- package/node_modules/axios/README.md +87 -10
- package/node_modules/axios/dist/axios.js +355 -289
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +286 -213
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +286 -213
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +377 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +12 -5
- package/node_modules/axios/index.d.ts +13 -4
- package/node_modules/axios/lib/adapters/adapters.js +6 -4
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +18 -0
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +18 -12
- package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- package/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/balanced-match/README.md +97 -0
- package/node_modules/balanced-match/index.js +62 -0
- package/node_modules/balanced-match/package.json +48 -0
- package/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
- package/node_modules/brace-expansion/LICENSE +21 -0
- package/node_modules/brace-expansion/README.md +135 -0
- package/node_modules/brace-expansion/index.js +203 -0
- package/node_modules/brace-expansion/package.json +49 -0
- package/node_modules/detect-libc/lib/detect-libc.js +59 -13
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +18 -8
- package/node_modules/detect-libc/package.json +3 -2
- package/node_modules/minimatch/LICENSE +15 -0
- package/node_modules/minimatch/README.md +454 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +588 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +18 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +94 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1001 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +20 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +82 -0
- package/node_modules/node-abi/LICENSE +21 -0
- package/node_modules/node-abi/README.md +54 -0
- package/node_modules/node-abi/abi_registry.json +408 -0
- package/node_modules/node-abi/getNextTarget.js +13 -0
- package/node_modules/node-abi/index.js +161 -0
- package/node_modules/node-abi/package.json +46 -0
- package/node_modules/node-addon-api/README.md +25 -249
- package/node_modules/node-addon-api/common.gypi +1 -0
- package/node_modules/node-addon-api/index.js +2 -0
- package/node_modules/node-addon-api/napi-inl.h +592 -166
- package/node_modules/node-addon-api/napi.h +167 -59
- package/node_modules/node-addon-api/node_addon_api.gyp +10 -0
- package/node_modules/node-addon-api/noexcept.gypi +1 -1
- package/node_modules/node-addon-api/package.json +13 -13
- package/node_modules/node-addon-api/tools/conversion.js +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +9 -0
- package/node_modules/undici-types/dispatcher.d.ts +3 -2
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +2 -1
- package/node_modules/undici-types/eventsource.d.ts +3 -3
- package/node_modules/undici-types/fetch.d.ts +1 -0
- package/node_modules/undici-types/handlers.d.ts +1 -1
- package/node_modules/undici-types/mock-client.d.ts +2 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +2 -0
- package/node_modules/undici-types/mock-pool.d.ts +2 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +9 -0
- package/node_modules/undici-types/webidl.d.ts +29 -15
- package/node_modules/undici-types/websocket.d.ts +3 -1
- package/package.json +3 -3
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi93.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi93.node +0 -0
- package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi93.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi93.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi93.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi93.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi93.node +0 -0
- package/node_modules/@contrast/perf/lib/index.test.js +0 -547
- package/node_modules/@contrast/perf/lib/tsconfig.json +0 -31
- package/node_modules/@contrast/protect/lib/input-tracing/install/spdy.js +0 -63
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc.yaml +0 -11
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/destroy.test.js +0 -49
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/end.test.js +0 -98
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush-sync.test.js +0 -140
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush.test.js +0 -419
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/fsync.test.js +0 -63
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/helper.js +0 -42
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/minlength.test.js +0 -35
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/mode.test.js +0 -116
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/reopen.test.js +0 -239
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/retry.test.js +0 -414
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/sync.test.js +0 -261
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/write.test.js +0 -465
- package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/server-inventory.d.ts
CHANGED
|
@@ -4,11 +4,11 @@ import { ContrastUIReporter } from '../types';
|
|
|
4
4
|
import V1Endpoint from './v1-endpoint';
|
|
5
5
|
export declare class ServerInventoryV1dot0 extends V1Endpoint {
|
|
6
6
|
constructor(core: Core, uiReporter: ContrastUIReporter);
|
|
7
|
-
post(systemInfo: SystemInfo): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
post(systemInfo: SystemInfo): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
8
|
}
|
|
9
9
|
export declare class ServerInventoryV1dot1 extends V1Endpoint {
|
|
10
10
|
constructor(core: Core, uiReporter: ContrastUIReporter);
|
|
11
|
-
post(systemInfo: SystemInfo): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
+
post(systemInfo: SystemInfo): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
12
|
}
|
|
13
13
|
type ServerInventoryEndpoint = ServerInventoryV1dot1 | ServerInventoryV1dot0;
|
|
14
14
|
export default class ServerInventory extends V1Endpoint {
|
|
@@ -16,7 +16,7 @@ export default class ServerInventory extends V1Endpoint {
|
|
|
16
16
|
uiReporter: ContrastUIReporter;
|
|
17
17
|
endpoint: ServerInventoryEndpoint | null;
|
|
18
18
|
constructor(core: Core, uiReporter: ContrastUIReporter);
|
|
19
|
-
post(): Promise<import("axios").AxiosResponse<any, any> | undefined>;
|
|
19
|
+
post(): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=server-inventory.d.ts.map
|
|
@@ -29,13 +29,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
29
29
|
}) : function(o, v) {
|
|
30
30
|
o["default"] = v;
|
|
31
31
|
});
|
|
32
|
-
var __importStar = (this && this.__importStar) || function (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
32
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
33
|
+
var ownKeys = function(o) {
|
|
34
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
35
|
+
var ar = [];
|
|
36
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
return ownKeys(o);
|
|
40
|
+
};
|
|
41
|
+
return function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
})();
|
|
39
49
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
51
|
};
|
package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js
CHANGED
|
@@ -14,7 +14,18 @@
|
|
|
14
14
|
* way not consistent with the End User License Agreement.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.getTaintRanges = getTaintRanges;
|
|
18
|
+
exports.getEventAction = getEventAction;
|
|
19
|
+
exports.getSignature = getSignature;
|
|
20
|
+
exports.getEventHash = getEventHash;
|
|
21
|
+
exports.getTraceEvent = getTraceEvent;
|
|
22
|
+
exports.getCryptoEvent = getCryptoEvent;
|
|
23
|
+
exports.topologicalSort = topologicalSort;
|
|
24
|
+
exports.getRoutes = getRoutes;
|
|
25
|
+
exports.maskSensitiveRequestData = maskSensitiveRequestData;
|
|
26
|
+
exports.getRequest = getRequest;
|
|
27
|
+
exports.maskSensitiveTraceData = maskSensitiveTraceData;
|
|
28
|
+
exports.getTraceEvents = getTraceEvents;
|
|
18
29
|
const crc_32_1 = require("crc-32");
|
|
19
30
|
const common_1 = require("@contrast/common");
|
|
20
31
|
const types_1 = require("./types");
|
|
@@ -54,7 +65,6 @@ function getTaintRanges(tags) {
|
|
|
54
65
|
});
|
|
55
66
|
return taintRanges;
|
|
56
67
|
}
|
|
57
|
-
exports.getTaintRanges = getTaintRanges;
|
|
58
68
|
function getEventAction(event) {
|
|
59
69
|
if (!event.history) {
|
|
60
70
|
return 'CREATION';
|
|
@@ -66,7 +76,6 @@ function getEventAction(event) {
|
|
|
66
76
|
const t = StringPrototypeSubstr.call(event.target, 0, 1);
|
|
67
77
|
return `${s}2${t}`;
|
|
68
78
|
}
|
|
69
|
-
exports.getEventAction = getEventAction;
|
|
70
79
|
function getSignature(event) {
|
|
71
80
|
return {
|
|
72
81
|
argTypes: event.args ? event.args.map(() => TYPE_NAME) : [TYPE_NAME],
|
|
@@ -77,7 +86,6 @@ function getSignature(event) {
|
|
|
77
86
|
voidMethod: false,
|
|
78
87
|
};
|
|
79
88
|
}
|
|
80
|
-
exports.getSignature = getSignature;
|
|
81
89
|
function getEventHash(traceData) {
|
|
82
90
|
const { ruleId, route, request, events, type = 'DATAFLOW' } = traceData;
|
|
83
91
|
if (type == 'DATAFLOW') {
|
|
@@ -101,7 +109,6 @@ function getEventHash(traceData) {
|
|
|
101
109
|
return hash;
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
|
-
exports.getEventHash = getEventHash;
|
|
105
112
|
function getTraceEvent(event, eventDetail = 'FULL') {
|
|
106
113
|
let base;
|
|
107
114
|
const action = getEventAction(event);
|
|
@@ -167,7 +174,6 @@ function getTraceEvent(event, eventDetail = 'FULL') {
|
|
|
167
174
|
time: event.time || Date.now(),
|
|
168
175
|
};
|
|
169
176
|
}
|
|
170
|
-
exports.getTraceEvent = getTraceEvent;
|
|
171
177
|
function getCryptoEvent(finding) {
|
|
172
178
|
return {
|
|
173
179
|
action: 'TRIGGER',
|
|
@@ -201,13 +207,11 @@ function getCryptoEvent(finding) {
|
|
|
201
207
|
type: 'METHOD',
|
|
202
208
|
};
|
|
203
209
|
}
|
|
204
|
-
exports.getCryptoEvent = getCryptoEvent;
|
|
205
210
|
function topologicalSort(sinkEvent) {
|
|
206
211
|
const eventSet = new Set();
|
|
207
212
|
traverse(sinkEvent, eventSet);
|
|
208
213
|
return Array.from(eventSet).reverse();
|
|
209
214
|
}
|
|
210
|
-
exports.topologicalSort = topologicalSort;
|
|
211
215
|
function traverse(event, eventSet) {
|
|
212
216
|
eventSet.add(event);
|
|
213
217
|
if (event.history) {
|
|
@@ -235,7 +239,6 @@ function getRoutes(route, prod) {
|
|
|
235
239
|
signature: route.signature
|
|
236
240
|
}];
|
|
237
241
|
}
|
|
238
|
-
exports.getRoutes = getRoutes;
|
|
239
242
|
function maskSensitiveRequestData(req) {
|
|
240
243
|
// Mask headers
|
|
241
244
|
if (req.headers) {
|
|
@@ -270,7 +273,6 @@ function maskSensitiveRequestData(req) {
|
|
|
270
273
|
req.body = MASK;
|
|
271
274
|
return req;
|
|
272
275
|
}
|
|
273
|
-
exports.maskSensitiveRequestData = maskSensitiveRequestData;
|
|
274
276
|
function getRequest(store, prod) {
|
|
275
277
|
const {
|
|
276
278
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -300,7 +302,6 @@ function getRequest(store, prod) {
|
|
|
300
302
|
return request;
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
|
-
exports.getRequest = getRequest;
|
|
304
305
|
function maskSensitiveTraceData(event) {
|
|
305
306
|
if (event.result?.tracked)
|
|
306
307
|
event.result.value = MASK;
|
|
@@ -323,7 +324,6 @@ function maskSensitiveTraceData(event) {
|
|
|
323
324
|
});
|
|
324
325
|
return event;
|
|
325
326
|
}
|
|
326
|
-
exports.maskSensitiveTraceData = maskSensitiveTraceData;
|
|
327
327
|
function getTraceEvents(sinkEvent, prod, eventDetail) {
|
|
328
328
|
const sortedEvents = topologicalSort(sinkEvent);
|
|
329
329
|
if (prod) {
|
|
@@ -333,5 +333,4 @@ function getTraceEvents(sinkEvent, prod, eventDetail) {
|
|
|
333
333
|
return sortedEvents.map((v) => getTraceEvent(v, eventDetail));
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
exports.getTraceEvents = getTraceEvents;
|
|
337
336
|
//# sourceMappingURL=translations.js.map
|
|
@@ -17,7 +17,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.checkIsArchived = checkIsArchived;
|
|
21
|
+
exports.isAuthError = isAuthError;
|
|
22
|
+
exports.base64Encode = base64Encode;
|
|
23
|
+
exports.getSessionMetadata = getSessionMetadata;
|
|
24
|
+
exports.createNgClient = createNgClient;
|
|
25
|
+
exports.createV1Client = createV1Client;
|
|
21
26
|
const crypto_1 = require("crypto");
|
|
22
27
|
const fs_1 = require("fs");
|
|
23
28
|
const https_1 = require("https");
|
|
@@ -32,14 +37,12 @@ const AUTH_ERR_STATUS_CODES = [401, 403];
|
|
|
32
37
|
function checkIsArchived(response) {
|
|
33
38
|
return (response?.status === 404 && response?.data?.success === false) || response?.status === 409;
|
|
34
39
|
}
|
|
35
|
-
exports.checkIsArchived = checkIsArchived;
|
|
36
40
|
/**
|
|
37
41
|
* 401 or 403 indicate an authentication error.
|
|
38
42
|
*/
|
|
39
43
|
function isAuthError(response) {
|
|
40
44
|
return response?.status && AUTH_ERR_STATUS_CODES.includes(response?.status);
|
|
41
45
|
}
|
|
42
|
-
exports.isAuthError = isAuthError;
|
|
43
46
|
/**
|
|
44
47
|
* Returns `true` when an error response indicates that the agent should uninstall.
|
|
45
48
|
*/
|
|
@@ -49,7 +52,6 @@ function shouldUninstall(err) {
|
|
|
49
52
|
function base64Encode(str, urlSafe) {
|
|
50
53
|
return BufferPrototypeToString.call(BufferFrom(str), urlSafe ? 'base64url' : 'base64');
|
|
51
54
|
}
|
|
52
|
-
exports.base64Encode = base64Encode;
|
|
53
55
|
/**
|
|
54
56
|
* Retrieve the configured session_metadata, appending the computed `buildId`.
|
|
55
57
|
*/
|
|
@@ -61,7 +63,6 @@ async function getSessionMetadata(core) {
|
|
|
61
63
|
const artifactMetadata = `artifactHash=${buildId}`;
|
|
62
64
|
return metadata ? `${metadata},${artifactMetadata}` : artifactMetadata;
|
|
63
65
|
}
|
|
64
|
-
exports.getSessionMetadata = getSessionMetadata;
|
|
65
66
|
function createClient(core, options) {
|
|
66
67
|
const { certificate, proxy } = core.config.api;
|
|
67
68
|
const logger = core.logger.child({ name: 'contrast:http' });
|
|
@@ -165,7 +166,6 @@ function createNgClient(core) {
|
|
|
165
166
|
},
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
exports.createNgClient = createNgClient;
|
|
169
169
|
function createV1Client(core) {
|
|
170
170
|
return createClient(core, {
|
|
171
171
|
headers: {
|
|
@@ -177,5 +177,4 @@ function createV1Client(core) {
|
|
|
177
177
|
},
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
exports.createV1Client = createV1Client;
|
|
181
180
|
//# sourceMappingURL=utils.js.map
|
|
@@ -39,7 +39,7 @@ class FileReporter extends base_1.default {
|
|
|
39
39
|
common_1.Event.ASSESS_CRYPTO_ANALYSIS_FINDING,
|
|
40
40
|
common_1.Event.LIBRARY_USAGE,
|
|
41
41
|
common_1.Event.LIBRARY,
|
|
42
|
-
common_1.Event.
|
|
42
|
+
common_1.Event.PROTECT_FINDING,
|
|
43
43
|
common_1.Event.ARCHITECTURE_COMPONENT,
|
|
44
44
|
common_1.Event.ROUTE_COVERAGE_DISCOVERY_FINISHED,
|
|
45
45
|
common_1.Event.ROUTE_COVERAGE_OBSERVATION,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestStore } from '@contrast/common';
|
|
1
|
+
import { ProtectFindingEventArg, RequestStore } from '@contrast/common';
|
|
2
2
|
import { SyslogLevel } from '@contrast/config';
|
|
3
3
|
import BaseReporter, { Core } from '../base';
|
|
4
4
|
type Outcome = 'INEFFECTIVE' | 'BLOCKED' | 'EXPLOITED' | 'SUSPICIOUS' | 'success';
|
|
@@ -25,10 +25,9 @@ export default class SecurityLogger extends BaseReporter {
|
|
|
25
25
|
private formatDate;
|
|
26
26
|
log(level: SyslogLevel, metadata: Metadata, message: string): void;
|
|
27
27
|
private buildMetadata;
|
|
28
|
-
private handleProtectResult;
|
|
29
28
|
install(): Promise<void>;
|
|
30
29
|
handleAssessEvent(store: RequestStore): void;
|
|
31
|
-
handleProtectEvent(
|
|
30
|
+
handleProtectEvent(eventArg: ProtectFindingEventArg): void;
|
|
32
31
|
}
|
|
33
32
|
export {};
|
|
34
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -29,13 +29,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
29
29
|
}) : function(o, v) {
|
|
30
30
|
o["default"] = v;
|
|
31
31
|
});
|
|
32
|
-
var __importStar = (this && this.__importStar) || function (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
32
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
33
|
+
var ownKeys = function(o) {
|
|
34
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
35
|
+
var ar = [];
|
|
36
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
return ownKeys(o);
|
|
40
|
+
};
|
|
41
|
+
return function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
})();
|
|
39
49
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
51
|
};
|
|
@@ -61,6 +71,12 @@ const LEVEL_VALUES = {
|
|
|
61
71
|
trace: 0
|
|
62
72
|
};
|
|
63
73
|
const { StringPrototypeReplaceAll } = common_1.primordials;
|
|
74
|
+
const rulesThatExploitWithoutFindings = new Set([
|
|
75
|
+
common_1.Rule.CMD_INJECTION_COMMAND_BACKDOORS,
|
|
76
|
+
common_1.Rule.CMD_INJECTION_SEMANTIC_CHAINED_COMMANDS,
|
|
77
|
+
common_1.Rule.CMD_INJECTION_SEMANTIC_DANGEROUS_PATHS,
|
|
78
|
+
common_1.Rule.PATH_TRAVERSAL_SEMANTIC_FILE_SECURITY_BYPASS,
|
|
79
|
+
]);
|
|
64
80
|
class SecurityLogger extends base_1.default {
|
|
65
81
|
constructor(core, name = 'security-logger') {
|
|
66
82
|
super(core, name);
|
|
@@ -98,8 +114,8 @@ class SecurityLogger extends base_1.default {
|
|
|
98
114
|
});
|
|
99
115
|
});
|
|
100
116
|
if (core.config.protect.enable) {
|
|
101
|
-
this.subscribeWithLock(common_1.Event.
|
|
102
|
-
this.handleProtectEvent(
|
|
117
|
+
this.subscribeWithLock(common_1.Event.PROTECT_FINDING, (eventArg) => {
|
|
118
|
+
this.handleProtectEvent(eventArg);
|
|
103
119
|
});
|
|
104
120
|
}
|
|
105
121
|
}
|
|
@@ -152,97 +168,67 @@ class SecurityLogger extends base_1.default {
|
|
|
152
168
|
outcome,
|
|
153
169
|
};
|
|
154
170
|
}
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
async install() { }
|
|
172
|
+
/* c8 ignore next 3 */
|
|
173
|
+
handleAssessEvent(store) {
|
|
174
|
+
// Assess NYI
|
|
175
|
+
}
|
|
176
|
+
handleProtectEvent(eventArg) {
|
|
177
|
+
if (!eventArg.store.protect || !eventArg.store.sourceInfo)
|
|
157
178
|
return;
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
179
|
+
const { findings, result, store: { sourceInfo } } = eventArg;
|
|
180
|
+
if (result.ruleId == common_1.Rule.VIRTUAL_PATCH) {
|
|
181
|
+
const level = this.loggerConfig.syslog.severity_blocked;
|
|
182
|
+
this.log(level, {
|
|
183
|
+
vpi: findings.uuid,
|
|
184
|
+
...this.buildMetadata(sourceInfo, 'success'),
|
|
185
|
+
}, messages.virtualPatch({ name: result.key, uuid: findings.uuid }));
|
|
160
186
|
return;
|
|
161
|
-
|
|
187
|
+
}
|
|
188
|
+
if (result.ruleId === common_1.Rule.BOT_BLOCKER) {
|
|
162
189
|
const level = this.loggerConfig.syslog.severity_blocked;
|
|
163
190
|
this.log(level, {
|
|
164
191
|
bbi: 'Contrast Bot Blocker',
|
|
165
|
-
...this.buildMetadata(
|
|
192
|
+
...this.buildMetadata(sourceInfo, 'success'),
|
|
166
193
|
}, messages.botBlocker(result));
|
|
167
|
-
return;
|
|
168
194
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (result.blocked) {
|
|
176
|
-
outcome = 'BLOCKED';
|
|
177
|
-
message = messages.successfulAttack;
|
|
178
|
-
level = this.loggerConfig.syslog.severity_blocked;
|
|
195
|
+
else if (result.ruleId == common_1.Rule.IP_DENYLIST) {
|
|
196
|
+
const level = this.loggerConfig.syslog.severity_blocked;
|
|
197
|
+
this.log(level, {
|
|
198
|
+
bli: findings.uuid,
|
|
199
|
+
...this.buildMetadata(sourceInfo, 'success'),
|
|
200
|
+
}, messages.ipDenyList(sourceInfo.ip, findings));
|
|
179
201
|
}
|
|
180
202
|
else {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
203
|
+
let level;
|
|
204
|
+
let outcome;
|
|
205
|
+
let message;
|
|
206
|
+
if (result.blocked) {
|
|
207
|
+
outcome = 'BLOCKED';
|
|
184
208
|
message = messages.successfulAttack;
|
|
185
|
-
|
|
186
|
-
else if (result.score >= 90) {
|
|
187
|
-
level = this.loggerConfig.syslog.severity_probed;
|
|
188
|
-
outcome = 'INEFFECTIVE';
|
|
189
|
-
message = messages.ineffectiveAttack;
|
|
209
|
+
level = this.loggerConfig.syslog.severity_blocked;
|
|
190
210
|
}
|
|
191
211
|
else {
|
|
192
|
-
|
|
193
|
-
|
|
212
|
+
if (findings || rulesThatExploitWithoutFindings.has(result.ruleId)) {
|
|
213
|
+
level = this.loggerConfig.syslog.severity_exploited;
|
|
214
|
+
outcome = 'EXPLOITED';
|
|
215
|
+
message = messages.successfulAttack;
|
|
216
|
+
}
|
|
217
|
+
else if ((result.score ?? 0) >= 90) {
|
|
218
|
+
level = this.loggerConfig.syslog.severity_probed;
|
|
219
|
+
outcome = 'INEFFECTIVE';
|
|
220
|
+
message = messages.ineffectiveAttack;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
// is this suspicious?
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
194
226
|
}
|
|
227
|
+
this.log(level, {
|
|
228
|
+
pri: result.mappedId,
|
|
229
|
+
...this.buildMetadata(sourceInfo, outcome),
|
|
230
|
+
}, message(result));
|
|
195
231
|
}
|
|
196
|
-
this.log(level, {
|
|
197
|
-
pri: result.mappedId,
|
|
198
|
-
...this.buildMetadata(store.sourceInfo, outcome),
|
|
199
|
-
}, message(result));
|
|
200
|
-
}
|
|
201
|
-
async install() { }
|
|
202
|
-
/* c8 ignore next 3 */
|
|
203
|
-
handleAssessEvent(store) {
|
|
204
|
-
// Assess NYI
|
|
205
|
-
}
|
|
206
|
-
handleProtectEvent(store) {
|
|
207
|
-
if (!store.protect || !store.sourceInfo)
|
|
208
|
-
return;
|
|
209
|
-
const { protect, sourceInfo } = store;
|
|
210
|
-
const virtualPatchResults = protect.resultsMap[common_1.Rule.VIRTUAL_PATCH];
|
|
211
|
-
if (virtualPatchResults) {
|
|
212
|
-
virtualPatchResults.forEach((result) => {
|
|
213
|
-
const level = this.loggerConfig.syslog.severity_blocked;
|
|
214
|
-
this.log(level, {
|
|
215
|
-
vpi: result.uuid,
|
|
216
|
-
...this.buildMetadata(sourceInfo, 'success'),
|
|
217
|
-
}, messages.virtualPatch(result));
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
const ipDenyListResults = protect.resultsMap[common_1.Rule.IP_DENYLIST];
|
|
221
|
-
if (ipDenyListResults) {
|
|
222
|
-
ipDenyListResults.forEach((result) => {
|
|
223
|
-
const level = this.loggerConfig.syslog.severity_blocked;
|
|
224
|
-
this.log(level, {
|
|
225
|
-
bli: result.uuid,
|
|
226
|
-
...this.buildMetadata(sourceInfo, 'success'),
|
|
227
|
-
}, messages.ipDenyList(sourceInfo.ip, result));
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
const { commonResultsMap, hardeningResultsMap, semanticResultsMap } = (0, common_1.groupResultsMap)(protect.resultsMap);
|
|
231
|
-
Object.entries(commonResultsMap).forEach(([rule, results]) => {
|
|
232
|
-
results.forEach((result) => {
|
|
233
|
-
this.handleProtectResult(store, rule, result);
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
Object.entries(hardeningResultsMap).forEach(([rule, results]) => {
|
|
237
|
-
results.forEach((result) => {
|
|
238
|
-
this.handleProtectResult(store, rule, result);
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
Object.entries(semanticResultsMap).forEach(([rule, results]) => {
|
|
242
|
-
results.forEach((result) => {
|
|
243
|
-
this.handleProtectResult(store, rule, result);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
232
|
}
|
|
247
233
|
}
|
|
248
234
|
exports.default = SecurityLogger;
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
* way not consistent with the End User License Agreement.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.virtualPatch = virtualPatch;
|
|
18
|
+
exports.ipDenyList = ipDenyList;
|
|
19
|
+
exports.botBlocker = botBlocker;
|
|
20
|
+
exports.successfulAttack = successfulAttack;
|
|
21
|
+
exports.ineffectiveAttack = ineffectiveAttack;
|
|
22
|
+
exports.suspiciousAttack = suspiciousAttack;
|
|
18
23
|
const INPUT_TYPE_MAP = {
|
|
19
24
|
Body: 'body segment',
|
|
20
25
|
CookieName: 'cookie',
|
|
@@ -33,15 +38,12 @@ const INPUT_TYPE_MAP = {
|
|
|
33
38
|
function virtualPatch(result) {
|
|
34
39
|
return `Virtual Patch ${result.name} - ${result.uuid} was triggered by this request.`;
|
|
35
40
|
}
|
|
36
|
-
exports.virtualPatch = virtualPatch;
|
|
37
41
|
function ipDenyList(ip, result) {
|
|
38
42
|
return `IP Address ${ip} matched the disallowed value ${result.ip} in the IP Blacklist ${result.uuid}`;
|
|
39
43
|
}
|
|
40
|
-
exports.ipDenyList = ipDenyList;
|
|
41
44
|
function botBlocker(result) {
|
|
42
45
|
return `User agent ${result.value} matched the disallowed value ${result?.idsList?.[0]}`;
|
|
43
46
|
}
|
|
44
|
-
exports.botBlocker = botBlocker;
|
|
45
47
|
function successfulAttack(result) {
|
|
46
48
|
if (!result.key) {
|
|
47
49
|
return `An effective attack was detected against "${result.mappedId}"`;
|
|
@@ -49,7 +51,6 @@ function successfulAttack(result) {
|
|
|
49
51
|
const inputType = INPUT_TYPE_MAP[result.inputType] || INPUT_TYPE_MAP.Unknown;
|
|
50
52
|
return `The ${inputType} "${result.key}" had a value that successfully exploited "${result.mappedId}" - "${result.value}"`;
|
|
51
53
|
}
|
|
52
|
-
exports.successfulAttack = successfulAttack;
|
|
53
54
|
function ineffectiveAttack(result) {
|
|
54
55
|
if (!result.key) {
|
|
55
56
|
return `An unsuccessful attack was detected against "${result.mappedId}"`;
|
|
@@ -57,7 +58,6 @@ function ineffectiveAttack(result) {
|
|
|
57
58
|
const inputType = INPUT_TYPE_MAP[result.inputType] || INPUT_TYPE_MAP.Unknown;
|
|
58
59
|
return `The ${inputType} "${result.key}" had a value that matched a signature for, but did not successfully exploit "${result.mappedId}" - "${result.value}"`;
|
|
59
60
|
}
|
|
60
|
-
exports.ineffectiveAttack = ineffectiveAttack;
|
|
61
61
|
/* c8 ignore next 8 */
|
|
62
62
|
function suspiciousAttack(result) {
|
|
63
63
|
if (!result.key) {
|
|
@@ -66,5 +66,4 @@ function suspiciousAttack(result) {
|
|
|
66
66
|
const inputType = INPUT_TYPE_MAP[result.inputType] || INPUT_TYPE_MAP.Unknown;
|
|
67
67
|
return `The ${inputType} "${result.key}" included a potential attack that was detected as suspcious using "${result.mappedId}" - "${result.value}"`;
|
|
68
68
|
}
|
|
69
|
-
exports.suspiciousAttack = suspiciousAttack;
|
|
70
69
|
//# sourceMappingURL=messages.js.map
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* way not consistent with the End User License Agreement.
|
|
14
14
|
*/
|
|
15
15
|
'use strict';
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
16
|
const { primordials: { ArrayPrototypeJoin } } = require('@contrast/common');
|
|
18
17
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
18
|
// @ts-ignore
|
|
@@ -68,7 +68,7 @@ The options are:
|
|
|
68
68
|
* `mode`: specify the creating file `mode` (see [fs.open()](https://nodejs.org/api/fs.html#fsopenpath-flags-mode-callback) from Node.js core).
|
|
69
69
|
* `mkdir`: ensure directory for dest file exists when `true` (default `false`).
|
|
70
70
|
* `retryEAGAIN(err, writeBufferLen, remainingBufferLen)`: a function that will be called when sonic-boom
|
|
71
|
-
write/writeSync/flushSync encounters a EAGAIN
|
|
71
|
+
write/writeSync/flushSync encounters a EAGAIN error. If the return value is
|
|
72
72
|
true sonic-boom will retry the operation, otherwise it will bubble the
|
|
73
73
|
error. `err` is the error that caused this function to be called,
|
|
74
74
|
`writeBufferLen` is the length of the buffer sonic-boom tried to write, and
|
|
@@ -83,13 +83,11 @@ For `sync:true` this is not relevant because the `'ready'` event will be fired w
|
|
|
83
83
|
Writes the string to the file.
|
|
84
84
|
It will return false to signal the producer to slow down.
|
|
85
85
|
|
|
86
|
-
### SonicBoom#flush(
|
|
86
|
+
### SonicBoom#flush()
|
|
87
87
|
|
|
88
88
|
Writes the current buffer to the file if a write was not in progress.
|
|
89
89
|
Do nothing if `minLength` is zero or if it is already writing.
|
|
90
90
|
|
|
91
|
-
call the callback when the flush operation is completed. when failed the callback is called with an error.
|
|
92
|
-
|
|
93
91
|
### SonicBoom#reopen([file])
|
|
94
92
|
|
|
95
93
|
Reopen the file in place, useful for log rotation.
|
|
@@ -11,16 +11,15 @@ const sonic = new SonicBoom({ fd })
|
|
|
11
11
|
const sonic4k = new SonicBoom({ fd, minLength: 4096 })
|
|
12
12
|
const sonicSync = new SonicBoom({ fd, sync: true })
|
|
13
13
|
const sonicSync4k = new SonicBoom({ fd, minLength: 4096, sync: true })
|
|
14
|
-
const sonicBuffer = new SonicBoom({ fd, contentMode: 'buffer' })
|
|
15
|
-
const sonic4kBuffer = new SonicBoom({ fd, contentMode: 'buffer', minLength: 4096 })
|
|
16
|
-
const sonicSyncBuffer = new SonicBoom({ fd, contentMode: 'buffer', sync: true })
|
|
17
|
-
const sonicSync4kBuffer = new SonicBoom({ fd, contentMode: 'buffer', minLength: 4096, sync: true })
|
|
18
14
|
const dummyConsole = new Console(fs.createWriteStream('/dev/null'))
|
|
19
15
|
|
|
20
16
|
const MAX = 10000
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
let str = ''
|
|
19
|
+
|
|
20
|
+
for (let i = 0; i < 10; i++) {
|
|
21
|
+
str += 'hello'
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
setTimeout(doBench, 100)
|
|
26
25
|
|
|
@@ -60,36 +59,6 @@ const run = bench([
|
|
|
60
59
|
dummyConsole.log(str)
|
|
61
60
|
}
|
|
62
61
|
setImmediate(cb)
|
|
63
|
-
},
|
|
64
|
-
function benchSonicBuf (cb) {
|
|
65
|
-
sonicBuffer.once('drain', cb)
|
|
66
|
-
for (let i = 0; i < MAX; i++) {
|
|
67
|
-
sonicBuffer.write(buf)
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
function benchSonicSyncBuf (cb) {
|
|
71
|
-
sonicSyncBuffer.once('drain', cb)
|
|
72
|
-
for (let i = 0; i < MAX; i++) {
|
|
73
|
-
sonicSyncBuffer.write(buf)
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
function benchSonic4kBuf (cb) {
|
|
77
|
-
sonic4kBuffer.once('drain', cb)
|
|
78
|
-
for (let i = 0; i < MAX; i++) {
|
|
79
|
-
sonic4kBuffer.write(buf)
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
function benchSonicSync4kBuf (cb) {
|
|
83
|
-
sonicSync4kBuffer.once('drain', cb)
|
|
84
|
-
for (let i = 0; i < MAX; i++) {
|
|
85
|
-
sonicSync4kBuffer.write(buf)
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
function benchCoreBuf (cb) {
|
|
89
|
-
core.once('drain', cb)
|
|
90
|
-
for (let i = 0; i < MAX; i++) {
|
|
91
|
-
core.write(buf)
|
|
92
|
-
}
|
|
93
62
|
}
|
|
94
63
|
], 1000)
|
|
95
64
|
|