![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@contrast/core
Advanced tools
@contrast/core
Discovers Contrast configuration data (yaml, env vars, etc) and preconfigures a common set of APIs to be used for agent and tooling development.
The module exports a factory function.
const core = require('@contrast/core')();
Logging
core.logger.info('...');
See more about the @contrast/logger
service here.
Monkey-patching
core.patcher.patch(res, 'end', {
name: 'http.ServerResponse.end',
patchType: 'http-things',
pre(data) {
// ...
}
});
See more about the @contrast/patcher
service here.
Code rewriting
core.rewriter.addTransforms({
CallExpression(path, state) {
// ...
};
});
core.rewriter.rewrite('function() { ...');
See more about the @contrast/rewriter
service here.
Dependency hooks
core.depHooks.resolve({ name: 'http' }, http => {
// implemention details
});
See more about the @contrast/dep-hooks
service here.
Models and factories
The construction of model data can rely on configuration and therefore can be stateful. So, we provide the models and their factories as services that can be used by consumers as if static.
// stackframe filtration is configurable, thus stateful
const snap = core.models.StacktraceFactory.createSnapshot();
const frames = snap();
See more about the @contrast/models
service here.
Report messages
// configuration will tell which reporters become active
core.reporters.install();
core.messages.emit('ProtectInputTracingEvent', { ... });
See more about the @contrast/reporter
service here.
Other stuff
There are some utility-type functions that rely on configuration state.
// This uses core.config.stack_trace_filters (new to v5)
core.isAgentPath('/foo');
@contrast/agentify
: Integrate core services and instrumentation into an application. See more here.FAQs
Preconfigured Contrast agent core services and models
The npm package @contrast/core receives a total of 10,475 weekly downloads. As such, @contrast/core popularity was classified as popular.
We found that @contrast/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.