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

@aircall/logger

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aircall/logger - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

36

dist/actions.d.ts

@@ -1,6 +0,3 @@

import { InitOptions } from './Logger';
export declare enum TYPES {
export declare enum LOGGER {
INIT = "LOGGER_INIT",
IDENTIFY = "LOGGER_IDENTIFY",
LOG = "LOGGER_LOG",
INFO = "LOGGER_INFO",

@@ -11,22 +8,21 @@ WARN = "LOGGER_WARN",

}
export declare namespace Actions {
interface init extends InitOptions {
type: TYPES.INIT;
}
interface log {
message: string;
properties: any;
}
interface log {
message: string;
properties: any;
}
export declare const info: (message: string, properties?: any) => Actions.log & {
type: TYPES.INFO;
export declare const init: (message: string, properties?: any) => {
type: LOGGER.INIT;
};
export declare const warn: (message: string, properties?: any) => Actions.log & {
type: TYPES.WARN;
export declare const info: (message: string, properties?: any) => log & {
type: LOGGER.INFO;
};
export declare const error: (message: string, properties?: any) => Actions.log & {
type: TYPES.ERROR;
export declare const warn: (message: string, properties?: any) => log & {
type: LOGGER.WARN;
};
export declare const track: (message: string, properties?: any) => Actions.log & {
type: TYPES.TRACK;
export declare const error: (message: string, properties?: any) => log & {
type: LOGGER.ERROR;
};
export declare const track: (message: string, properties?: any) => log & {
type: LOGGER.TRACK;
};
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TYPES;
(function (TYPES) {
TYPES["INIT"] = "LOGGER_INIT";
TYPES["IDENTIFY"] = "LOGGER_IDENTIFY";
TYPES["LOG"] = "LOGGER_LOG";
TYPES["INFO"] = "LOGGER_INFO";
TYPES["WARN"] = "LOGGER_WARN";
TYPES["ERROR"] = "LOGGER_ERROR";
TYPES["TRACK"] = "LOGGER_TRACK";
})(TYPES = exports.TYPES || (exports.TYPES = {}));
var LOGGER;
(function (LOGGER) {
LOGGER["INIT"] = "LOGGER_INIT";
LOGGER["INFO"] = "LOGGER_INFO";
LOGGER["WARN"] = "LOGGER_WARN";
LOGGER["ERROR"] = "LOGGER_ERROR";
LOGGER["TRACK"] = "LOGGER_TRACK";
})(LOGGER = exports.LOGGER || (exports.LOGGER = {}));
exports.init = (message, properties) => ({
type: LOGGER.INIT
});
exports.info = (message, properties) => ({
type: TYPES.INFO,
type: LOGGER.INFO,
message,

@@ -19,3 +20,3 @@ properties

exports.warn = (message, properties) => ({
type: TYPES.WARN,
type: LOGGER.WARN,
message,

@@ -25,3 +26,3 @@ properties

exports.error = (message, properties) => ({
type: TYPES.ERROR,
type: LOGGER.ERROR,
message,

@@ -31,3 +32,3 @@ properties

exports.track = (message, properties) => ({
type: TYPES.TRACK,
type: LOGGER.TRACK,
message,

@@ -34,0 +35,0 @@ properties

@@ -32,3 +32,3 @@ "use strict";

log(level, message, properties) {
this.track('log', Object.assign({ level, message }, properties), { 'Amazon Kinesis': true });
this.track('log', Object.assign({ level, message }, properties), { 'All': false, 'Amazon Kinesis': true });
}

@@ -35,0 +35,0 @@ info(message, properties) {

{
"name": "@aircall/logger",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/index.js",

@@ -13,3 +13,3 @@ "types": "index.d.ts",

},
"gitHead": "8df6bde6062e8ebae7acd5359da309e16656ed2f"
"gitHead": "cf8a08a85e0e16f5664af5e2f3d3e806976dacca"
}

@@ -1,7 +0,3 @@

import { InitOptions } from './Logger';
export enum TYPES {
export enum LOGGER {
INIT = 'LOGGER_INIT',
IDENTIFY = 'LOGGER_IDENTIFY',
LOG = 'LOGGER_LOG',
INFO = 'LOGGER_INFO',

@@ -13,17 +9,13 @@ WARN = 'LOGGER_WARN',

export namespace Actions {
interface log {
message: string;
properties: any;
}
export interface init extends InitOptions {
type: TYPES.INIT;
}
export const init = (message: string, properties?: any): { type: LOGGER.INIT } => ({
type: LOGGER.INIT
});
export interface log {
message: string;
properties: any;
}
}
export const info = (message: string, properties?: any): Actions.log & { type: TYPES.INFO } => ({
type: TYPES.INFO,
export const info = (message: string, properties?: any): log & { type: LOGGER.INFO } => ({
type: LOGGER.INFO,
message,

@@ -33,4 +25,4 @@ properties

export const warn = (message: string, properties?: any): Actions.log & { type: TYPES.WARN } => ({
type: TYPES.WARN,
export const warn = (message: string, properties?: any): log & { type: LOGGER.WARN } => ({
type: LOGGER.WARN,
message,

@@ -40,4 +32,4 @@ properties

export const error = (message: string, properties?: any): Actions.log & { type: TYPES.ERROR } => ({
type: TYPES.ERROR,
export const error = (message: string, properties?: any): log & { type: LOGGER.ERROR } => ({
type: LOGGER.ERROR,
message,

@@ -47,6 +39,6 @@ properties

export const track = (message: string, properties?: any): Actions.log & { type: TYPES.TRACK } => ({
type: TYPES.TRACK,
export const track = (message: string, properties?: any): log & { type: LOGGER.TRACK } => ({
type: LOGGER.TRACK,
message,
properties
});

@@ -60,3 +60,3 @@ type LogLevel = 'INFO' | 'WARN' | 'ERROR';

private log(level: LogLevel, message: string, properties?: any): void {
this.track('log', { level, message, ...properties }, { 'Amazon Kinesis': true });
this.track('log', { level, message, ...properties }, { 'All': false, 'Amazon Kinesis': true });
}

@@ -63,0 +63,0 @@

Sorry, the diff of this file is not supported yet

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