Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@teamteanpm2024/velit-aliquam-tenetur
Advanced tools
@teamteanpm2024/velit-aliquam-tenetur is a pretty console reporting system created to support event listening and consistent reporting. It modifies the node.js global console to offer a consistent, stunning experience and unlimited object depth.
@teamteanpm2024/velit-aliquam-tenetur is a pretty console reporting system created to support event listening and consistent reporting. It modifies the node.js global console to offer a consistent, stunning experience and unlimited object depth.
This module works on server node.js but may not be in the web browser. Future updates may provide a web version. For complete documentation, please visit the docs.
This open-source project was created from a console module I used in @jumpcutking/threads and as part of The Universe platform.
Another round of bug fixes. jckConsole.TruncateTopLevel is a way to report object properties that are top level. This is useful for reporting objects that are too large to report. Arrays and attached objects will not be removed when using this option. It's safe and not object destructive.
jckConsole now provides generateSafeError and will automatically generate a safe communicatable error object. While JCKConsole doesn't override your error objects, it will convert error objects passed into it. I added a string variable to match the original stack trace item for easier debugging. Clicking on the line and column in VSCode's console will go to that line and column, making it easy to debug and develop.
jckConsole is happy to help developers know where a log entry has occurred. It's a new object, and It identifies the caller, the file, the line, and the column of the call.
This update is a breaking change to entry and log callbacks. A new "from" object will be passed to every one of the log callbacks. It will look very similar to a parsedStackTrace() line item.
This update also includes other bug fixes.
Minor bug fixes, including a fix for the stacktrace object.
This release includes fixes for objects passed into the console. To debug your console event handlers, create a private console attachment and use it to debug your code; otherwise, you will receive a maximum call stack error (caused by recursion).
/**
* A fresh instance of the console object.
* This keeps a reference to the console without
* any loopbacks during global replacement.
* @type {Object} The console object.
* @see {@link https://nodejs.org/api/console.html} for more information.
*/
var myConsole = Console({ stdout: process.stdout, stderr: process.stderr });
Using NPM, install the module with the following command:
npm install @teamteanpm2024/velit-aliquam-tenetur
Using @teamteanpm2024/velit-aliquam-tenetur is easy; add the following code at the top of your script.
var jckConsole = require('@teamteanpm2024/velit-aliquam-tenetur');
jckConsole.startup({ ...options });
@teamteanpm2024/velit-aliquam-tenetur will not override the console global object until you have called the startup() function using the options below. @teamteanpm2024/velit-aliquam-tenetur will throw an error if the startup() function is called more than once.
options
Name | Type | Description |
---|---|---|
reportToConsole | boolean | Automatically report to the terminal and console. |
generateStacktrace | boolean | Automatically generate a stacktrace object for each log message, returning them to the callback function only. |
storeLogs | boolean | should I store logs in memory |
depth | boolean | The depth to inspect objects. 0 is unlimited. |
@teamteanpm2024/velit-aliquam-tenetur supports (2) callbacks: one for when the console is called and another for when a specific supported console function is called.
You can add a callback using the module or global console objects.
Adding an entry callback will allow you to listen to all console calls, regardless of type. This is useful for saving the entries into a file or database.
jckConsole.on('entry', function (type, message, args, stack, from) {
// Your code here...
});
// or
console.on('entry', function (type, message, args, stack, from) {
// Your code here...
});
jckConsole.on("warn", function (message, args, stack, from) {
});
// or
console.on("warn", function (message, args, stack, from) {
});
Currently supported methods:
Properties
Name | Type | Description |
---|---|---|
log | function | The log function. |
info | function | The info function. |
warn | function | The warn function. |
error | function | The error function. |
debug | function | The debug function. |
@teamteanpm2024/velit-aliquam-tenetur can store logs in memory for later use. This is useful if you want to use them later. They are each stamped with a DateTime, and if you have generateStacktrace enabled, they will also include a stacktrace object.
jckConsole.getEntries();
console.getEntries();
//clear entries
jckConsole.clearEntries();
console.clearEntries();
Log Entry object getEntries() will return an array of log entry objects.
Name | Type | Description |
---|---|---|
entry.type | string | The type of console message. |
entry.message | string | The message provided to the console object. |
entry.args | * | The additional arguments provided to the console object. |
entry.stack | Array.<object> | An array of a stacktrace object. |
entry.when | Datetime | The time the entry was created. |
entry.from | object | A stacktrace object for only the orginal caller. |
Stacktrace Object
The stack trace is an object, not a string, for ease of use.
Name | Type | Description |
---|---|---|
stack.call | string | The function or object called. |
stack.file | string | The file the message originated from. |
stack.line | number | The line the message originated from. |
stack.column | number | The column the message originated from. |
To build the docs, run the following command:
npm run docs
Note: you'll have to install the jsdoc-to-markdown module to build the docs.
npm install jsdoc-to-markdown
FAQs
@teamteanpm2024/velit-aliquam-tenetur is a pretty console reporting system created to support event listening and consistent reporting. It modifies the node.js global console to offer a consistent, stunning experience and unlimited object depth.
The npm package @teamteanpm2024/velit-aliquam-tenetur receives a total of 9 weekly downloads. As such, @teamteanpm2024/velit-aliquam-tenetur popularity was classified as not popular.
We found that @teamteanpm2024/velit-aliquam-tenetur demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.