@contrast/agent-bundle 5.41.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 +13 -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.d.ts +11 -11
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +93 -93
- 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/hapi.js +9 -2
- 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 +15 -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 +61 -11
- package/node_modules/@types/node/dns.d.ts +5 -0
- package/node_modules/@types/node/fs/promises.d.ts +48 -29
- package/node_modules/@types/node/fs.d.ts +52 -37
- 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/http2.d.ts +13 -11
- 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 -3985
- package/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/node_modules/@types/node/module.d.ts +25 -0
- package/node_modules/@types/node/net.d.ts +21 -0
- package/node_modules/@types/node/package.json +4 -9
- package/node_modules/@types/node/perf_hooks.d.ts +14 -0
- package/node_modules/@types/node/repl.d.ts +11 -1
- package/node_modules/@types/node/sqlite.d.ts +34 -1
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/@types/node/stream.d.ts +17 -6
- package/node_modules/@types/node/test.d.ts +120 -1
- package/node_modules/@types/node/timers.d.ts +0 -2
- 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 +20 -6
- package/node_modules/@types/node/util.d.ts +12 -6
- 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 +63 -3
- package/node_modules/@types/node/zlib.d.ts +8 -2
- 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/agent.d.ts +4 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +6 -3
- 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-agent.d.ts +3 -0
- 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/pool.d.ts +2 -0
- package/node_modules/undici-types/proxy-agent.d.ts +1 -0
- 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/node_modules/yaml/README.md +2 -20
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
- package/node_modules/yaml/dist/stringify/stringifyString.js +1 -1
- package/node_modules/yaml/package.json +2 -1
- package/package.json +4 -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/@types/node/ts5.1/compatibility/disposable.d.ts +0 -12
- package/node_modules/@types/node/ts5.1/index.d.ts +0 -98
- package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
|
@@ -37,22 +37,40 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
|
|
|
37
37
|
#define NAPI_WIDE_TEXT(x) u##x
|
|
38
38
|
#endif
|
|
39
39
|
|
|
40
|
+
// Backwards-compatibility to handle the rename of this macro definition, in
|
|
41
|
+
// case they are used within userland code.
|
|
42
|
+
#ifdef NAPI_CPP_EXCEPTIONS
|
|
43
|
+
#define NODE_ADDON_API_CPP_EXCEPTIONS
|
|
44
|
+
#endif
|
|
45
|
+
#if defined(NODE_ADDON_API_CPP_EXCEPTIONS) && !defined(NAPI_CPP_EXCEPTIONS)
|
|
46
|
+
#define NAPI_CPP_EXCEPTIONS
|
|
47
|
+
#endif
|
|
48
|
+
#ifdef NAPI_DISABLE_CPP_EXCEPTIONS
|
|
49
|
+
#define NODE_ADDON_API_DISABLE_CPP_EXCEPTIONS
|
|
50
|
+
#endif
|
|
51
|
+
#if defined(NODE_ADDON_API_DISABLE_CPP_EXCEPTIONS) && \
|
|
52
|
+
!defined(NAPI_DISABLE_CPP_EXCEPTIONS)
|
|
53
|
+
#define NAPI_DISABLE_CPP_EXCEPTIONS
|
|
54
|
+
#endif
|
|
55
|
+
|
|
40
56
|
// If C++ exceptions are not explicitly enabled or disabled, enable them
|
|
41
57
|
// if exceptions were enabled in the compiler settings.
|
|
42
|
-
#if !defined(
|
|
58
|
+
#if !defined(NODE_ADDON_API_CPP_EXCEPTIONS) && \
|
|
59
|
+
!defined(NODE_ADDON_API_DISABLE_CPP_EXCEPTIONS)
|
|
43
60
|
#if defined(_CPPUNWIND) || defined(__EXCEPTIONS)
|
|
44
|
-
#define
|
|
61
|
+
#define NODE_ADDON_API_CPP_EXCEPTIONS
|
|
45
62
|
#else
|
|
46
63
|
#error Exception support not detected. \
|
|
47
|
-
Define either
|
|
64
|
+
Define either NODE_ADDON_API_CPP_EXCEPTIONS or NODE_ADDON_API_DISABLE_CPP_EXCEPTIONS.
|
|
48
65
|
#endif
|
|
49
66
|
#endif
|
|
50
67
|
|
|
51
|
-
// If C++
|
|
52
|
-
// not be set
|
|
53
|
-
#if defined(
|
|
68
|
+
// If C++ NODE_ADDON_API_CPP_EXCEPTIONS are enabled, NODE_ADDON_API_ENABLE_MAYBE
|
|
69
|
+
// should not be set
|
|
70
|
+
#if defined(NODE_ADDON_API_CPP_EXCEPTIONS) && \
|
|
71
|
+
defined(NODE_ADDON_API_ENABLE_MAYBE)
|
|
54
72
|
#error NODE_ADDON_API_ENABLE_MAYBE should not be set when \
|
|
55
|
-
|
|
73
|
+
NODE_ADDON_API_CPP_EXCEPTIONS is defined.
|
|
56
74
|
#endif
|
|
57
75
|
|
|
58
76
|
#ifdef _NOEXCEPT
|
|
@@ -61,7 +79,7 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
|
|
|
61
79
|
#define NAPI_NOEXCEPT noexcept
|
|
62
80
|
#endif
|
|
63
81
|
|
|
64
|
-
#ifdef
|
|
82
|
+
#ifdef NODE_ADDON_API_CPP_EXCEPTIONS
|
|
65
83
|
|
|
66
84
|
// When C++ exceptions are enabled, Errors are thrown directly. There is no need
|
|
67
85
|
// to return anything after the throw statements. The variadic parameter is an
|
|
@@ -78,7 +96,7 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
|
|
|
78
96
|
#define NAPI_THROW_IF_FAILED_VOID(env, status) \
|
|
79
97
|
if ((status) != napi_ok) throw Napi::Error::New(env);
|
|
80
98
|
|
|
81
|
-
#else //
|
|
99
|
+
#else // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
82
100
|
|
|
83
101
|
// When C++ exceptions are disabled, Errors are thrown as JavaScript exceptions,
|
|
84
102
|
// which are pending until the callback returns to JS. The variadic parameter
|
|
@@ -110,7 +128,7 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
|
|
|
110
128
|
return; \
|
|
111
129
|
}
|
|
112
130
|
|
|
113
|
-
#endif //
|
|
131
|
+
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
114
132
|
|
|
115
133
|
#ifdef NODE_ADDON_API_ENABLE_MAYBE
|
|
116
134
|
#define NAPI_MAYBE_THROW_IF_FAILED(env, status, type) \
|
|
@@ -142,6 +160,26 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
|
|
|
142
160
|
} \
|
|
143
161
|
} while (0)
|
|
144
162
|
|
|
163
|
+
// Internal check helper. Be careful that the formatted message length should be
|
|
164
|
+
// max 255 size and null terminated.
|
|
165
|
+
#define NAPI_INTERNAL_CHECK(expr, location, ...) \
|
|
166
|
+
do { \
|
|
167
|
+
if (!(expr)) { \
|
|
168
|
+
std::string msg = Napi::details::StringFormat(__VA_ARGS__); \
|
|
169
|
+
Napi::Error::Fatal(location, msg.c_str()); \
|
|
170
|
+
} \
|
|
171
|
+
} while (0)
|
|
172
|
+
|
|
173
|
+
#define NAPI_INTERNAL_CHECK_EQ(actual, expected, value_format, location) \
|
|
174
|
+
do { \
|
|
175
|
+
auto actual_value = (actual); \
|
|
176
|
+
NAPI_INTERNAL_CHECK(actual_value == (expected), \
|
|
177
|
+
location, \
|
|
178
|
+
"Expected " #actual " to be equal to " #expected \
|
|
179
|
+
", but got " value_format ".", \
|
|
180
|
+
actual_value); \
|
|
181
|
+
} while (0)
|
|
182
|
+
|
|
145
183
|
#define NAPI_FATAL_IF_FAILED(status, location, message) \
|
|
146
184
|
NAPI_CHECK((status) == napi_ok, location, message)
|
|
147
185
|
|
|
@@ -279,6 +317,14 @@ template <typename T>
|
|
|
279
317
|
using MaybeOrValue = T;
|
|
280
318
|
#endif
|
|
281
319
|
|
|
320
|
+
#ifdef NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER
|
|
321
|
+
using node_addon_api_basic_env = node_api_nogc_env;
|
|
322
|
+
using node_addon_api_basic_finalize = node_api_nogc_finalize;
|
|
323
|
+
#else
|
|
324
|
+
using node_addon_api_basic_env = napi_env;
|
|
325
|
+
using node_addon_api_basic_finalize = napi_finalize;
|
|
326
|
+
#endif
|
|
327
|
+
|
|
282
328
|
/// Environment for Node-API values and operations.
|
|
283
329
|
///
|
|
284
330
|
/// All Node-API values and operations must be associated with an environment.
|
|
@@ -287,14 +333,13 @@ using MaybeOrValue = T;
|
|
|
287
333
|
/// Node-API operations within the callback. (Many methods infer the
|
|
288
334
|
/// environment from the `this` instance that the method is called on.)
|
|
289
335
|
///
|
|
290
|
-
///
|
|
291
|
-
/// although current implementations only support one environment per process.
|
|
336
|
+
/// Multiple environments may co-exist in a single process or a thread.
|
|
292
337
|
///
|
|
293
338
|
/// In the V8 JavaScript engine, a Node-API environment approximately
|
|
294
339
|
/// corresponds to an Isolate.
|
|
295
|
-
class
|
|
340
|
+
class BasicEnv {
|
|
296
341
|
private:
|
|
297
|
-
|
|
342
|
+
node_addon_api_basic_env _env;
|
|
298
343
|
#if NAPI_VERSION > 5
|
|
299
344
|
template <typename T>
|
|
300
345
|
static void DefaultFini(Env, T* data);
|
|
@@ -302,20 +347,22 @@ class Env {
|
|
|
302
347
|
static void DefaultFiniWithHint(Env, DataType* data, HintType* hint);
|
|
303
348
|
#endif // NAPI_VERSION > 5
|
|
304
349
|
public:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
operator
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
350
|
+
BasicEnv(node_addon_api_basic_env env);
|
|
351
|
+
|
|
352
|
+
operator node_addon_api_basic_env() const;
|
|
353
|
+
|
|
354
|
+
// Without these operator overloads, the error:
|
|
355
|
+
//
|
|
356
|
+
// Use of overloaded operator '==' is ambiguous (with operand types
|
|
357
|
+
// 'Napi::Env' and 'Napi::Env')
|
|
358
|
+
//
|
|
359
|
+
// ... occurs when comparing foo.Env() == bar.Env() or foo.Env() == nullptr
|
|
360
|
+
bool operator==(const BasicEnv& other) const {
|
|
361
|
+
return _env == other._env;
|
|
362
|
+
};
|
|
363
|
+
bool operator==(std::nullptr_t /*other*/) const {
|
|
364
|
+
return _env == nullptr;
|
|
365
|
+
};
|
|
319
366
|
|
|
320
367
|
#if NAPI_VERSION > 2
|
|
321
368
|
template <typename Hook, typename Arg = void>
|
|
@@ -334,7 +381,7 @@ class Env {
|
|
|
334
381
|
|
|
335
382
|
template <typename T>
|
|
336
383
|
using Finalizer = void (*)(Env, T*);
|
|
337
|
-
template <typename T, Finalizer<T> fini =
|
|
384
|
+
template <typename T, Finalizer<T> fini = BasicEnv::DefaultFini<T>>
|
|
338
385
|
void SetInstanceData(T* data) const;
|
|
339
386
|
|
|
340
387
|
template <typename DataType, typename HintType>
|
|
@@ -342,7 +389,7 @@ class Env {
|
|
|
342
389
|
template <typename DataType,
|
|
343
390
|
typename HintType,
|
|
344
391
|
FinalizerWithHint<DataType, HintType> fini =
|
|
345
|
-
|
|
392
|
+
BasicEnv::DefaultFiniWithHint<DataType, HintType>>
|
|
346
393
|
void SetInstanceData(DataType* data, HintType* hint) const;
|
|
347
394
|
#endif // NAPI_VERSION > 5
|
|
348
395
|
|
|
@@ -351,9 +398,9 @@ class Env {
|
|
|
351
398
|
class CleanupHook {
|
|
352
399
|
public:
|
|
353
400
|
CleanupHook();
|
|
354
|
-
CleanupHook(
|
|
355
|
-
CleanupHook(
|
|
356
|
-
bool Remove(
|
|
401
|
+
CleanupHook(BasicEnv env, Hook hook, Arg* arg);
|
|
402
|
+
CleanupHook(BasicEnv env, Hook hook);
|
|
403
|
+
bool Remove(BasicEnv env);
|
|
357
404
|
bool IsEmpty() const;
|
|
358
405
|
|
|
359
406
|
private:
|
|
@@ -371,6 +418,39 @@ class Env {
|
|
|
371
418
|
#if NAPI_VERSION > 8
|
|
372
419
|
const char* GetModuleFileName() const;
|
|
373
420
|
#endif // NAPI_VERSION > 8
|
|
421
|
+
|
|
422
|
+
#ifdef NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER
|
|
423
|
+
template <typename FinalizerType>
|
|
424
|
+
inline void PostFinalizer(FinalizerType finalizeCallback) const;
|
|
425
|
+
|
|
426
|
+
template <typename FinalizerType, typename T>
|
|
427
|
+
inline void PostFinalizer(FinalizerType finalizeCallback, T* data) const;
|
|
428
|
+
|
|
429
|
+
template <typename FinalizerType, typename T, typename Hint>
|
|
430
|
+
inline void PostFinalizer(FinalizerType finalizeCallback,
|
|
431
|
+
T* data,
|
|
432
|
+
Hint* finalizeHint) const;
|
|
433
|
+
#endif // NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER
|
|
434
|
+
|
|
435
|
+
friend class Env;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
class Env : public BasicEnv {
|
|
439
|
+
public:
|
|
440
|
+
Env(napi_env env);
|
|
441
|
+
|
|
442
|
+
operator napi_env() const;
|
|
443
|
+
|
|
444
|
+
Object Global() const;
|
|
445
|
+
Value Undefined() const;
|
|
446
|
+
Value Null() const;
|
|
447
|
+
|
|
448
|
+
bool IsExceptionPending() const;
|
|
449
|
+
Error GetAndClearPendingException() const;
|
|
450
|
+
|
|
451
|
+
MaybeOrValue<Value> RunScript(const char* utf8script) const;
|
|
452
|
+
MaybeOrValue<Value> RunScript(const std::string& utf8script) const;
|
|
453
|
+
MaybeOrValue<Value> RunScript(String script) const;
|
|
374
454
|
};
|
|
375
455
|
|
|
376
456
|
/// A JavaScript value of unknown type.
|
|
@@ -407,6 +487,8 @@ class Value {
|
|
|
407
487
|
template <typename T>
|
|
408
488
|
static Value From(napi_env env, const T& value);
|
|
409
489
|
|
|
490
|
+
static void CheckCast(napi_env env, napi_value value);
|
|
491
|
+
|
|
410
492
|
/// Converts to a Node-API value primitive.
|
|
411
493
|
///
|
|
412
494
|
/// If the instance is _empty_, this returns `nullptr`.
|
|
@@ -473,6 +555,10 @@ class Value {
|
|
|
473
555
|
template <typename T>
|
|
474
556
|
T As() const;
|
|
475
557
|
|
|
558
|
+
// Unsafe Value::As(), should be avoided.
|
|
559
|
+
template <typename T>
|
|
560
|
+
T UnsafeAs() const;
|
|
561
|
+
|
|
476
562
|
MaybeOrValue<Boolean> ToBoolean()
|
|
477
563
|
const; ///< Coerces a value to a JavaScript boolean.
|
|
478
564
|
MaybeOrValue<Number> ToNumber()
|
|
@@ -774,6 +860,9 @@ class Object : public TypeTaggable {
|
|
|
774
860
|
template <typename ValueType>
|
|
775
861
|
PropertyLValue& operator=(ValueType value);
|
|
776
862
|
|
|
863
|
+
/// Converts an L-value to a value. For convenience.
|
|
864
|
+
Value AsValue() const;
|
|
865
|
+
|
|
777
866
|
private:
|
|
778
867
|
PropertyLValue() = delete;
|
|
779
868
|
PropertyLValue(Object object, Key key);
|
|
@@ -1000,7 +1089,7 @@ class Object : public TypeTaggable {
|
|
|
1000
1089
|
T* data,
|
|
1001
1090
|
Hint* finalizeHint) const;
|
|
1002
1091
|
|
|
1003
|
-
#ifdef
|
|
1092
|
+
#ifdef NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1004
1093
|
class const_iterator;
|
|
1005
1094
|
|
|
1006
1095
|
inline const_iterator begin() const;
|
|
@@ -1012,7 +1101,7 @@ class Object : public TypeTaggable {
|
|
|
1012
1101
|
inline iterator begin();
|
|
1013
1102
|
|
|
1014
1103
|
inline iterator end();
|
|
1015
|
-
#endif //
|
|
1104
|
+
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1016
1105
|
|
|
1017
1106
|
#if NAPI_VERSION >= 8
|
|
1018
1107
|
/// This operation can fail in case of Proxy.[[GetPrototypeOf]] calling into
|
|
@@ -1064,7 +1153,7 @@ class Array : public Object {
|
|
|
1064
1153
|
uint32_t Length() const;
|
|
1065
1154
|
};
|
|
1066
1155
|
|
|
1067
|
-
#ifdef
|
|
1156
|
+
#ifdef NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1068
1157
|
class Object::const_iterator {
|
|
1069
1158
|
private:
|
|
1070
1159
|
enum class Type { BEGIN, END };
|
|
@@ -1111,7 +1200,7 @@ class Object::iterator {
|
|
|
1111
1200
|
|
|
1112
1201
|
friend class Object;
|
|
1113
1202
|
};
|
|
1114
|
-
#endif //
|
|
1203
|
+
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1115
1204
|
|
|
1116
1205
|
/// A JavaScript array buffer value.
|
|
1117
1206
|
class ArrayBuffer : public Object {
|
|
@@ -1268,7 +1357,7 @@ class TypedArrayOf : public TypedArray {
|
|
|
1268
1357
|
napi_typedarray_type type =
|
|
1269
1358
|
TypedArray::TypedArrayTypeForPrimitiveType<T>()
|
|
1270
1359
|
#else
|
|
1271
|
-
|
|
1360
|
+
napi_typedarray_type type
|
|
1272
1361
|
#endif
|
|
1273
1362
|
///< Type of array, if different from the default array type for the
|
|
1274
1363
|
///< template parameter T.
|
|
@@ -1291,7 +1380,7 @@ class TypedArrayOf : public TypedArray {
|
|
|
1291
1380
|
napi_typedarray_type type =
|
|
1292
1381
|
TypedArray::TypedArrayTypeForPrimitiveType<T>()
|
|
1293
1382
|
#else
|
|
1294
|
-
|
|
1383
|
+
napi_typedarray_type type
|
|
1295
1384
|
#endif
|
|
1296
1385
|
///< Type of array, if different from the default array type for the
|
|
1297
1386
|
///< template parameter T.
|
|
@@ -1381,8 +1470,8 @@ class DataView : public Object {
|
|
|
1381
1470
|
template <typename T>
|
|
1382
1471
|
void WriteData(size_t byteOffset, T value) const;
|
|
1383
1472
|
|
|
1384
|
-
void* _data;
|
|
1385
|
-
size_t _length;
|
|
1473
|
+
void* _data{};
|
|
1474
|
+
size_t _length{};
|
|
1386
1475
|
};
|
|
1387
1476
|
|
|
1388
1477
|
class Function : public Object {
|
|
@@ -1485,7 +1574,18 @@ class Promise : public Object {
|
|
|
1485
1574
|
|
|
1486
1575
|
static void CheckCast(napi_env env, napi_value value);
|
|
1487
1576
|
|
|
1577
|
+
Promise();
|
|
1488
1578
|
Promise(napi_env env, napi_value value);
|
|
1579
|
+
|
|
1580
|
+
MaybeOrValue<Promise> Then(napi_value onFulfilled) const;
|
|
1581
|
+
MaybeOrValue<Promise> Then(napi_value onFulfilled,
|
|
1582
|
+
napi_value onRejected) const;
|
|
1583
|
+
MaybeOrValue<Promise> Catch(napi_value onRejected) const;
|
|
1584
|
+
|
|
1585
|
+
MaybeOrValue<Promise> Then(const Function& onFulfilled) const;
|
|
1586
|
+
MaybeOrValue<Promise> Then(const Function& onFulfilled,
|
|
1587
|
+
const Function& onRejected) const;
|
|
1588
|
+
MaybeOrValue<Promise> Catch(const Function& onRejected) const;
|
|
1489
1589
|
};
|
|
1490
1590
|
|
|
1491
1591
|
template <typename T>
|
|
@@ -1715,7 +1815,7 @@ FunctionReference Persistent(Function value);
|
|
|
1715
1815
|
///
|
|
1716
1816
|
/// Following C++ statements will not be executed. The exception will bubble
|
|
1717
1817
|
/// up as a C++ exception of type `Napi::Error`, until it is either caught
|
|
1718
|
-
/// while still in C++, or else automatically
|
|
1818
|
+
/// while still in C++, or else automatically propagated as a JavaScript
|
|
1719
1819
|
/// exception when the callback returns to JavaScript.
|
|
1720
1820
|
///
|
|
1721
1821
|
/// #### Example 2A - Propagating a Node-API C++ exception:
|
|
@@ -1743,14 +1843,15 @@ FunctionReference Persistent(Function value);
|
|
|
1743
1843
|
///
|
|
1744
1844
|
/// ### Handling Errors Without C++ Exceptions
|
|
1745
1845
|
///
|
|
1746
|
-
/// If C++ exceptions are disabled (by defining
|
|
1747
|
-
/// then this class does not extend
|
|
1748
|
-
/// namespace do not throw C++
|
|
1749
|
-
///
|
|
1750
|
-
///
|
|
1751
|
-
///
|
|
1752
|
-
///
|
|
1753
|
-
///
|
|
1846
|
+
/// If C++ exceptions are disabled (by defining
|
|
1847
|
+
/// `NODE_ADDON_API_DISABLE_CPP_EXCEPTIONS`) then this class does not extend
|
|
1848
|
+
/// `std::exception`, and APIs in the `Napi` namespace do not throw C++
|
|
1849
|
+
/// exceptions when they fail. Instead, they raise _pending_ JavaScript
|
|
1850
|
+
/// exceptions and return _empty_ `Value`s. Calling code should check
|
|
1851
|
+
/// `Value::IsEmpty()` before attempting to use a returned value, and may use
|
|
1852
|
+
/// methods on the `Env` class to check for, get, and clear a pending JavaScript
|
|
1853
|
+
/// exception. If the pending exception is not cleared, it will be thrown when
|
|
1854
|
+
/// the native callback returns to JavaScript.
|
|
1754
1855
|
///
|
|
1755
1856
|
/// #### Example 1B - Throwing a JS exception
|
|
1756
1857
|
///
|
|
@@ -1785,10 +1886,10 @@ FunctionReference Persistent(Function value);
|
|
|
1785
1886
|
/// Since the exception was cleared here, it will not be propagated as a
|
|
1786
1887
|
/// JavaScript exception after the native callback returns.
|
|
1787
1888
|
class Error : public ObjectReference
|
|
1788
|
-
#ifdef
|
|
1889
|
+
#ifdef NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1789
1890
|
,
|
|
1790
1891
|
public std::exception
|
|
1791
|
-
#endif //
|
|
1892
|
+
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1792
1893
|
{
|
|
1793
1894
|
public:
|
|
1794
1895
|
static Error New(napi_env env);
|
|
@@ -1811,9 +1912,9 @@ class Error : public ObjectReference
|
|
|
1811
1912
|
|
|
1812
1913
|
Object Value() const;
|
|
1813
1914
|
|
|
1814
|
-
#ifdef
|
|
1915
|
+
#ifdef NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1815
1916
|
const char* what() const NAPI_NOEXCEPT override;
|
|
1816
|
-
#endif //
|
|
1917
|
+
#endif // NODE_ADDON_API_CPP_EXCEPTIONS
|
|
1817
1918
|
|
|
1818
1919
|
protected:
|
|
1819
1920
|
/// !cond INTERNAL
|
|
@@ -1888,7 +1989,7 @@ class CallbackInfo {
|
|
|
1888
1989
|
napi_value _this;
|
|
1889
1990
|
size_t _argc;
|
|
1890
1991
|
napi_value* _argv;
|
|
1891
|
-
napi_value _staticArgs[6];
|
|
1992
|
+
napi_value _staticArgs[6]{};
|
|
1892
1993
|
napi_value* _dynamicArgs;
|
|
1893
1994
|
void* _data;
|
|
1894
1995
|
};
|
|
@@ -2395,6 +2496,7 @@ class ObjectWrap : public InstanceWrap<T>, public Reference<Object> {
|
|
|
2395
2496
|
napi_property_attributes attributes = napi_default);
|
|
2396
2497
|
static Napi::Value OnCalledAsFunction(const Napi::CallbackInfo& callbackInfo);
|
|
2397
2498
|
virtual void Finalize(Napi::Env env);
|
|
2499
|
+
virtual void Finalize(BasicEnv env);
|
|
2398
2500
|
|
|
2399
2501
|
private:
|
|
2400
2502
|
using This = ObjectWrap<T>;
|
|
@@ -2409,7 +2511,12 @@ class ObjectWrap : public InstanceWrap<T>, public Reference<Object> {
|
|
|
2409
2511
|
napi_callback_info info);
|
|
2410
2512
|
static napi_value StaticSetterCallbackWrapper(napi_env env,
|
|
2411
2513
|
napi_callback_info info);
|
|
2412
|
-
static void FinalizeCallback(
|
|
2514
|
+
static void FinalizeCallback(node_addon_api_basic_env env,
|
|
2515
|
+
void* data,
|
|
2516
|
+
void* hint);
|
|
2517
|
+
|
|
2518
|
+
static void PostFinalizeCallback(napi_env env, void* data, void* hint);
|
|
2519
|
+
|
|
2413
2520
|
static Function DefineClass(Napi::Env env,
|
|
2414
2521
|
const char* utf8name,
|
|
2415
2522
|
const size_t props_count,
|
|
@@ -2440,6 +2547,7 @@ class ObjectWrap : public InstanceWrap<T>, public Reference<Object> {
|
|
|
2440
2547
|
}
|
|
2441
2548
|
|
|
2442
2549
|
bool _construction_failed = true;
|
|
2550
|
+
bool _finalized = false;
|
|
2443
2551
|
};
|
|
2444
2552
|
|
|
2445
2553
|
class HandleScope {
|
|
@@ -3160,14 +3268,14 @@ class AsyncProgressQueueWorker
|
|
|
3160
3268
|
// Memory management.
|
|
3161
3269
|
class MemoryManagement {
|
|
3162
3270
|
public:
|
|
3163
|
-
static int64_t AdjustExternalMemory(
|
|
3271
|
+
static int64_t AdjustExternalMemory(BasicEnv env, int64_t change_in_bytes);
|
|
3164
3272
|
};
|
|
3165
3273
|
|
|
3166
3274
|
// Version management
|
|
3167
3275
|
class VersionManagement {
|
|
3168
3276
|
public:
|
|
3169
|
-
static uint32_t GetNapiVersion(
|
|
3170
|
-
static const napi_node_version* GetNodeVersion(
|
|
3277
|
+
static uint32_t GetNapiVersion(BasicEnv env);
|
|
3278
|
+
static const napi_node_version* GetNodeVersion(BasicEnv env);
|
|
3171
3279
|
};
|
|
3172
3280
|
|
|
3173
3281
|
#if NAPI_VERSION > 5
|
|
@@ -18,6 +18,16 @@
|
|
|
18
18
|
'includes': ['except.gypi'],
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
+
{
|
|
22
|
+
'target_name': 'node_addon_api_except_all',
|
|
23
|
+
'type': 'none',
|
|
24
|
+
'sources': [ 'napi.h', 'napi-inl.h' ],
|
|
25
|
+
'direct_dependent_settings': {
|
|
26
|
+
'include_dirs': [ '.' ],
|
|
27
|
+
'includes': ['except.gypi'],
|
|
28
|
+
'defines': [ 'NODE_ADDON_API_CPP_EXCEPTIONS_ALL' ]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
21
31
|
{
|
|
22
32
|
'target_name': 'node_addon_api_maybe',
|
|
23
33
|
'type': 'none',
|
|
@@ -374,7 +374,6 @@
|
|
|
374
374
|
{
|
|
375
375
|
"name": "Vladimir Morozov",
|
|
376
376
|
"url": "https://github.com/vmoroz"
|
|
377
|
-
|
|
378
377
|
},
|
|
379
378
|
{
|
|
380
379
|
"name": "WenheLI",
|
|
@@ -422,16 +421,11 @@
|
|
|
422
421
|
"benchmark": "^2.1.4",
|
|
423
422
|
"bindings": "^1.5.0",
|
|
424
423
|
"clang-format": "^1.4.0",
|
|
425
|
-
"eslint": "^
|
|
426
|
-
"eslint-config-semistandard": "^16.0.0",
|
|
427
|
-
"eslint-config-standard": "^16.0.3",
|
|
428
|
-
"eslint-plugin-import": "^2.24.2",
|
|
429
|
-
"eslint-plugin-node": "^11.1.0",
|
|
430
|
-
"eslint-plugin-promise": "^5.1.0",
|
|
424
|
+
"eslint": "^9.13.0",
|
|
431
425
|
"fs-extra": "^11.1.1",
|
|
432
|
-
"
|
|
426
|
+
"neostandard": "^0.12.0",
|
|
433
427
|
"pre-commit": "^1.2.2",
|
|
434
|
-
"
|
|
428
|
+
"semver": "^7.6.0"
|
|
435
429
|
},
|
|
436
430
|
"directories": {},
|
|
437
431
|
"gypfile": false,
|
|
@@ -463,6 +457,9 @@
|
|
|
463
457
|
"scripts": {
|
|
464
458
|
"prebenchmark": "node-gyp rebuild -C benchmark",
|
|
465
459
|
"benchmark": "node benchmark",
|
|
460
|
+
"create-coverage": "npm test --coverage",
|
|
461
|
+
"report-coverage-html": "rm -rf coverage-html && mkdir coverage-html && gcovr -e test --merge-mode-functions merge-use-line-max --html-nested ./coverage-html/index.html test",
|
|
462
|
+
"report-coverage-xml": "rm -rf coverage-xml && mkdir coverage-xml && gcovr -e test --merge-mode-functions merge-use-line-max --xml -o ./coverage-xml/coverage-cxx.xml test",
|
|
466
463
|
"pretest": "node-gyp rebuild -C test",
|
|
467
464
|
"test": "node test",
|
|
468
465
|
"test:debug": "node-gyp rebuild -C test --debug && NODE_API_BUILD_CONFIG=Debug node ./test/index.js",
|
|
@@ -471,10 +468,13 @@
|
|
|
471
468
|
"predev:incremental": "node-gyp configure build -C test --debug",
|
|
472
469
|
"dev:incremental": "node test",
|
|
473
470
|
"doc": "doxygen doc/Doxyfile",
|
|
474
|
-
"lint": "
|
|
475
|
-
"lint:fix": "
|
|
471
|
+
"lint": "eslint && node tools/clang-format",
|
|
472
|
+
"lint:fix": "eslint --fix && node tools/clang-format --fix"
|
|
476
473
|
},
|
|
477
474
|
"pre-commit": "lint",
|
|
478
|
-
"version": "
|
|
479
|
-
"support": true
|
|
475
|
+
"version": "8.5.0",
|
|
476
|
+
"support": true,
|
|
477
|
+
"engines": {
|
|
478
|
+
"node": "^18 || ^20 || >= 21"
|
|
479
|
+
}
|
|
480
480
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:54 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:55 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:54 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:55 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:54 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.4 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 15 aug 2025 23:28:55 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { URL } from 'url'
|
|
2
2
|
import Pool from './pool'
|
|
3
3
|
import Dispatcher from './dispatcher'
|
|
4
|
+
import TClientStats from './client-stats'
|
|
5
|
+
import TPoolStats from './pool-stats'
|
|
4
6
|
|
|
5
7
|
export default Agent
|
|
6
8
|
|
|
@@ -12,6 +14,8 @@ declare class Agent extends Dispatcher {
|
|
|
12
14
|
destroyed: boolean
|
|
13
15
|
/** Dispatches a request. */
|
|
14
16
|
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
|
|
17
|
+
/** Aggregate stats for a Agent by origin. */
|
|
18
|
+
readonly stats: Record<string, TClientStats | TPoolStats>
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
declare namespace Agent {
|