Socket
Socket
Sign inDemoInstall

residue

Package Overview
Dependencies
65
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-beta.14 to 1.0.0-beta.15

4

CHANGELOG.md
# Change Log
## [1.0.0-beta.15] - 08-08-2017
### Changes
- Strict mode fix
## [1.0.0-beta.14] - 08-08-2017

@@ -4,0 +8,0 @@ ### Changes

2

package.json
{
"name": "residue",
"version": "1.0.0-beta.14",
"version": "1.0.0-beta.15",
"description": "Logging client for real-time centralized logging server.",

@@ -5,0 +5,0 @@ "main": "src/residue.js",

@@ -13,2 +13,4 @@ //

"use strict";
const fs = require('fs');

@@ -423,3 +425,3 @@ const path = require('path');

// Obtain token for the logger that requires token
obtainToken = function(loggerId, accessCode) {
const obtainToken = function(loggerId, accessCode) {
if (!Params.token_socket_connected) {

@@ -482,3 +484,3 @@ Utils.log('Not connected to the token server yet');

shouldTouch = function() {
const shouldTouch = function() {
if (!Params.connected || Params.connecting) {

@@ -495,3 +497,3 @@ // Can't touch

touch = function() {
const touch = function() {
if (Params.connected) {

@@ -512,3 +514,3 @@ if (isClientValid()) {

isClientValid = function() {
const isClientValid = function() {
if (!Params.connected) {

@@ -523,7 +525,7 @@ return false;

getToken = function(loggerId) {
const getToken = function(loggerId) {
return typeof Params.tokens[loggerId] === 'undefined' ? '' : Params.tokens[loggerId].token;
}
hasValidToken = function(loggerId) {
const hasValidToken = function(loggerId) {
if (!Utils.hasFlag(Flag.REQUIRES_TOKEN)) {

@@ -537,3 +539,3 @@ return true;

// Returns UTC time
getCurrentTimeUTC = function() {
const getCurrentTimeUTC = function() {
const newDate = new Date();

@@ -544,3 +546,3 @@ return newDate.getTime() + newDate.getTimezoneOffset() * 60000;

// Send log request to the server. No response is expected
sendLogRequest = function(logMessage, level, loggerId, sourceFile, sourceLine, sourceFunc, verboseLevel, logDatetime) {
const sendLogRequest = function(logMessage, level, loggerId, sourceFile, sourceLine, sourceFunc, verboseLevel, logDatetime) {
let datetime = logDatetime;

@@ -647,3 +649,3 @@ if (typeof datetime === 'undefined') {

isNormalInteger = function(str) {
const isNormalInteger = function(str) {
var n = Math.floor(Number(str));

@@ -653,3 +655,3 @@ return String(n) === str && n >= 0;

loadConfiguration = function(jsonFilename) {
const loadConfiguration = function(jsonFilename) {
if (typeof jsonFilename === 'undefined') {

@@ -665,3 +667,3 @@ Utils.log('Please select JSON filename that contains configurations');

// Securily connect to residue server using defined options
connect = function(options) {
const connect = function(options) {
if (Params.connected && Params.connection !== null) {

@@ -758,3 +760,3 @@ Utils.log('Already connected to the server with ID [' + Params.connection.client_id + ']')

// Disconnect from the server safely.
disconnect = function() {
const disconnect = function() {
Params.tokens = [];

@@ -785,3 +787,3 @@ Params.token_request_queue = [];

// Get location of callstack in <file>:<line> format
getSourceLocation = function(splitChar) {
const getSourceLocation = function(splitChar) {
return (new Error).stack.split('\n')[4].replace(' at ', '').trim().split(splitChar);

@@ -792,3 +794,3 @@ }

// See getSourceLocation
getSourceFile = function() {
const getSourceFile = function() {
return getSourceLocation(':')[0];

@@ -799,3 +801,3 @@ }

// See getSourceLocation
getSourceLine = function() {
const getSourceLine = function() {
return parseInt(getSourceLocation(':')[1]);

@@ -806,3 +808,3 @@ }

// See getSourceLocation
getSourceFunc = function() {
const getSourceFunc = function() {
const parts = getSourceLocation(' ');

@@ -816,3 +818,3 @@ if (parts.length <= 1) {

// Logger interface for user to send log messages to server
Logger = function(id) {
const Logger = function(id) {
this.id = id;

@@ -851,3 +853,3 @@

// Make sure you have provided us with corresponding access code for seamless connection if needed.
getLogger = function(id) {
const getLogger = function(id) {
return new Logger(id);

@@ -854,0 +856,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc