beautiful-log
Advanced tools
Comparing version 2.0.0-6 to 2.0.0-7
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.make = void 0; | ||
const COLORS = [ | ||
@@ -4,0 +5,0 @@ "\x1b[34m", |
@@ -16,4 +16,4 @@ export declare function init(appName: string, mode: "disabled" | "console" | "ipc"): void; | ||
announce(): void; | ||
private transform(args, fn?); | ||
private send(message); | ||
private transform; | ||
private send; | ||
log(...args: any[]): void; | ||
@@ -30,5 +30,5 @@ info(...args: any[]): void; | ||
setColor(name: string, color: string): void; | ||
private getColorFn(name); | ||
private colorize(str); | ||
private inspect(arg); | ||
private getColorFn; | ||
private colorize; | ||
private inspect; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Logger = exports.make = exports.init = void 0; | ||
const ansy = require("ansy"); | ||
const ipc = require("node-ipc"); | ||
const stack = require("callsite"); | ||
@@ -19,6 +19,3 @@ const util = require("util"); | ||
case "ipc": | ||
ipc.config.silent = true; | ||
ipc.connectTo(appName); | ||
broadcast = (event, data) => ipc.of[appName].emit(event, data); | ||
break; | ||
throw new Error("No longer supported"); | ||
case "console": | ||
@@ -25,0 +22,0 @@ let { create, message } = output_1.make(); |
{ | ||
"name": "beautiful-log", | ||
"version": "2.0.0-6", | ||
"version": "2.0.0-7", | ||
"description": "Because logging should be beautiful.", | ||
@@ -15,3 +15,2 @@ "main": "dist/index.js", | ||
"moment": "^2.13.0", | ||
"node-ipc": "^9.0.1", | ||
"sprintf-js": "^1.0.3" | ||
@@ -29,4 +28,3 @@ }, | ||
"@types/callsite": "^1.0.30", | ||
"@types/node": "^7.0.5", | ||
"@types/node-ipc": "^9.0.0" | ||
"@types/node": "^7.0.5" | ||
}, | ||
@@ -33,0 +31,0 @@ "bin": { |
@@ -1,64 +0,1 @@ | ||
"use strict"; | ||
import * as ipc from "node-ipc"; | ||
import { make } from "../common/output"; | ||
const COLORS = [ | ||
"\x1b[34m", // blue | ||
"\x1b[31m", // red | ||
"\x1b[33m", // yellow | ||
"\x1b[32m", // green | ||
"\x1b[36m", // cyan | ||
"\x1b[35m", // magenta | ||
"\x1b[37m" // white | ||
]; | ||
const BOLD = "\x1b[1m"; | ||
const CLEAR = "\x1b[0m"; | ||
let connected = false; | ||
let appName = process.argv[2]; | ||
if (!appName) { | ||
console.error("Argument is required."); | ||
process.exit(1); | ||
} | ||
let channelMap = new Map<string, string>(); | ||
const START_MARKER = "●"; | ||
const CONTINUATION_MARKER = "|"; | ||
const END_MARKER = "+"; | ||
const SINGLE_MARKER = "●"; | ||
ipc.config.silent = true; | ||
ipc.config.id = appName; | ||
ipc.serve(() => { | ||
process.stdout.write("[LISTENING]\n"); | ||
ipc.server.on("connect", () => { | ||
process.stdout.write("[CONNECTED]\n"); | ||
connected = true; | ||
}); | ||
ipc.server.on("socket.disconnected", () => { | ||
if (connected) { | ||
process.stdout.write("[DISCONNECTED]\n"); | ||
connected = false; | ||
channelMap.clear(); | ||
} | ||
}); | ||
let { create, message } = make(); | ||
ipc.server.on("create", (data: LoggerCreationData) => { | ||
create(data); | ||
}); | ||
ipc.server.on("message", (data: LoggerMessageData) => { | ||
message(data); | ||
}); | ||
}); | ||
ipc.server.start(); | ||
throw new Error("No longer supported"); |
"use strict"; | ||
import * as ipc from "node-ipc"; | ||
const COLORS = [ | ||
@@ -6,0 +4,0 @@ "\x1b[34m", // blue |
"use strict"; | ||
import * as ansy from "ansy"; | ||
import * as ipc from "node-ipc"; | ||
import * as stack from "callsite"; | ||
@@ -23,6 +22,3 @@ import * as util from "util"; | ||
case "ipc": | ||
ipc.config.silent = true; | ||
ipc.connectTo(appName); | ||
broadcast = (event, data) => ipc.of[appName].emit(event, data); | ||
break; | ||
throw new Error("No longer supported"); | ||
@@ -29,0 +25,0 @@ case "console": |
4
2
34828
1009
- Removednode-ipc@^9.0.1
- Removedeasy-stack@1.0.1(transitive)
- Removedevent-pubsub@4.3.0(transitive)
- Removedjs-message@1.0.7(transitive)
- Removedjs-queue@2.0.2(transitive)
- Removednode-ipc@9.2.1(transitive)