Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pino-logflare

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-logflare - npm Package Compare versions

Comparing version 0.3.12-0c69475a to 0.3.12-2a866d9e

4

dist/consoleStream.d.ts
import { LogflareUserOptionsI } from "logflare-transport-core";
declare const createConsoleWriteStream: (options: LogflareUserOptionsI) => any;
declare const createConsoleWriteStream: (options: LogflareUserOptionsI) => {
write: (chunk: any) => void;
};
export default createConsoleWriteStream;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils");
var stream_browserify_1 = __importDefault(require("stream-browserify"));
var utils_2 = require("./utils");
var createConsoleWriteStream = function (options) {
var writeStream = new stream_browserify_1.default.Writable({
objectMode: true,
highWaterMark: 1,
});
writeStream._write = function (chunk, encoding, callback) {
var batch = Array.isArray(chunk) ? chunk : [chunk];
batch
.map(function (chunkItem) { return JSON.parse(chunkItem); })
.map(utils_1.toLogEntry)
.map(function (logEntry) {
return (0, utils_2.addLogflareTransformDirectives)(logEntry, options);
})
.map(function (chunkItem) { return JSON.stringify(chunkItem); })
.forEach(function (x) {
process.stdout.write(x + "\n");
});
callback();
return {
write: function (chunk) {
var batch = Array.isArray(chunk) ? chunk : [chunk];
batch
.map(function (chunkItem) { return JSON.parse(chunkItem); })
.map(utils_1.toLogEntry)
.map(function (logEntry) {
return (0, utils_2.addLogflareTransformDirectives)(logEntry, options);
})
.map(function (chunkItem) { return JSON.stringify(chunkItem); })
.forEach(function (x) {
process.stdout.write(x + "\n");
});
},
};
return writeStream;
};
exports.default = createConsoleWriteStream;
//# sourceMappingURL=consoleStream.js.map

@@ -7,3 +7,5 @@ import createHttpWriteStream from "./httpStream";

declare const logflarePinoVercel: (options: LogflareUserOptionsI) => {
stream: any;
stream: {
write: (chunk: any) => void;
};
send: (level: Level | number, logEvent: LogEvent) => void;

@@ -10,0 +12,0 @@ };

{
"name": "pino-logflare",
"version": "0.3.12-0c69475a",
"version": "0.3.12-2a866d9e",
"description": "A transport for Pino that sends messages to Logflare",

@@ -66,3 +66,2 @@ "homepage": "https://github.com/logflare/pino-logflare",

"split2": "^3.1.1",
"stream-browserify": "^3.0.0",
"through2": "^3.0.1"

@@ -69,0 +68,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc