New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

genesys-cloud-client-logger

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genesys-cloud-client-logger - npm Package Compare versions

Comparing version 4.2.4-develop.13 to 4.2.4-manifest-fix.4

22

dist/deploy-info.json
{
"name": "genesys-cloud-client-logger",
"version": "develop",
"version": "manifest-fix",
"ecosystem": "pc",

@@ -8,28 +8,28 @@ "team": "Genesys Client Media (WebRTC)",

{
"file": "/v4/genesys-cloud-client-logger.min.js.map"
"file": "v4/genesys-cloud-client-logger.min.js.map"
},
{
"file": "/v4/genesys-cloud-client-logger.min.js"
"file": "v4/genesys-cloud-client-logger.min.js"
},
{
"file": "/v4/genesys-cloud-client-logger.js.map"
"file": "v4/genesys-cloud-client-logger.js.map"
},
{
"file": "/v4/genesys-cloud-client-logger.js"
"file": "v4/genesys-cloud-client-logger.js"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.min.js.map"
"file": "v4.2.4/genesys-cloud-client-logger.min.js.map"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.min.js"
"file": "v4.2.4/genesys-cloud-client-logger.min.js"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.js.map"
"file": "v4.2.4/genesys-cloud-client-logger.js.map"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.js"
"file": "v4.2.4/genesys-cloud-client-logger.js"
}
],
"build": "13",
"buildDate": "2023-03-10T03:37:56.037213Z"
"build": "4",
"buildDate": "2023-10-16T20:43:56.541037Z"
}

@@ -151,3 +151,3 @@ export interface ILoggerConfig {

}
export declare type StopReason = '401' | '404' | 'force';
export declare type StopReason = 401 | 404 | '401' | '404' | 'force';
export interface ITrace {

@@ -154,0 +154,0 @@ topic: string;

@@ -77,5 +77,7 @@ import { EventEmitter } from 'events';

/* if we stopped because of a 401, we will try to start again */
if (this.stopReason === '401') {
/* eslint-disable eqeqeq */
if (this.stopReason == 401) {
this.startServerLogging();
}
/* eslint-enable eqeqeq */
}

@@ -82,0 +84,0 @@ log(message, details, opts) {

@@ -119,2 +119,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

sendLogsToServer(immediate = false) {
var _a;
return __awaiter(this, void 0, void 0, function* () {

@@ -154,6 +155,9 @@ if (!this.logBuffer.length) {

/* no-op: the uploader will attempt reties. if the uploader throws, it means this log isn't going to make to the server */
const statusCode = `${err === null || err === void 0 ? void 0 : err.status}`;
if (['401', '404'].includes(statusCode)) {
/* TODO: figure out why the error structure changed and determine if this is necessary */
const statusCode = (err === null || err === void 0 ? void 0 : err.status)
? err.status
: (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.status;
if ([401, 404, '401', '404'].includes(statusCode)) {
this.debug(`received a ${statusCode} from logUploader. stopping logging to server`);
this.logger.stopServerLogging(statusCode);
this.logger.stopServerLogging();
}

@@ -160,0 +164,0 @@ }

{
"name": "genesys-cloud-client-logger",
"version": "develop",
"version": "manifest-fix",
"indexFiles": [
{
"file": "/v4/genesys-cloud-client-logger.min.js.map"
"file": "v4/genesys-cloud-client-logger.min.js.map"
},
{
"file": "/v4/genesys-cloud-client-logger.min.js"
"file": "v4/genesys-cloud-client-logger.min.js"
},
{
"file": "/v4/genesys-cloud-client-logger.js.map"
"file": "v4/genesys-cloud-client-logger.js.map"
},
{
"file": "/v4/genesys-cloud-client-logger.js"
"file": "v4/genesys-cloud-client-logger.js"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.min.js.map"
"file": "v4.2.4/genesys-cloud-client-logger.min.js.map"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.min.js"
"file": "v4.2.4/genesys-cloud-client-logger.min.js"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.js.map"
"file": "v4.2.4/genesys-cloud-client-logger.js.map"
},
{
"file": "/v4.2.4/genesys-cloud-client-logger.js"
"file": "v4.2.4/genesys-cloud-client-logger.js"
}
]
}

@@ -151,3 +151,3 @@ export interface ILoggerConfig {

}
export declare type StopReason = '401' | '404' | 'force';
export declare type StopReason = 401 | 404 | '401' | '404' | 'force';
export interface ITrace {

@@ -154,0 +154,0 @@ topic: string;

@@ -124,5 +124,7 @@ "use strict";

/* if we stopped because of a 401, we will try to start again */
if (this.stopReason === '401') {
/* eslint-disable eqeqeq */
if (this.stopReason == 401) {
this.startServerLogging();
}
/* eslint-enable eqeqeq */
};

@@ -129,0 +131,0 @@ Logger.prototype.log = function (message, details, opts) {

@@ -156,2 +156,3 @@ "use strict";

ServerLogger.prototype.sendLogsToServer = function (immediate) {
var _a;
if (immediate === void 0) { immediate = false; }

@@ -161,4 +162,4 @@ return __awaiter(this, void 0, void 0, function () {

var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
return __generator(this, function (_b) {
switch (_b.label) {
case 0:

@@ -188,5 +189,5 @@ if (!this.logBuffer.length) {

bufferItem = this.logBuffer.splice(0, 1)[0];
_a.label = 1;
_b.label = 1;
case 1:
_a.trys.push([1, 3, 4, 5]);
_b.trys.push([1, 3, 4, 5]);
// this.pendingHttpRequest = true;

@@ -196,12 +197,14 @@ this.debug('calling logUploader.postLogsToEndpoint() with', { bufferItem: bufferItem, newLogBuffer: this.logBuffer });

case 2:
_a.sent();
_b.sent();
return [3 /*break*/, 5];
case 3:
err_1 = _a.sent();
err_1 = _b.sent();
this.logger.emit('onError', err_1);
this.logger.error('Error sending logs to server', err_1, { skipServer: true });
statusCode = "".concat(err_1 === null || err_1 === void 0 ? void 0 : err_1.status);
if (['401', '404'].includes(statusCode)) {
statusCode = (err_1 === null || err_1 === void 0 ? void 0 : err_1.status)
? err_1.status
: (_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.response) === null || _a === void 0 ? void 0 : _a.status;
if ([401, 404, '401', '404'].includes(statusCode)) {
this.debug("received a ".concat(statusCode, " from logUploader. stopping logging to server"));
this.logger.stopServerLogging(statusCode);
this.logger.stopServerLogging();
}

@@ -208,0 +211,0 @@ return [3 /*break*/, 5];

{
"name": "genesys-cloud-client-logger",
"version": "4.2.4-develop.13",
"version": "4.2.4-manifest-fix.4",
"description": "Common logger for genesys cloud client application to upload logs server",

@@ -25,2 +25,3 @@ "main": "dist/src/index.js",

"test:watch": "jest --watch --collectCoverage=false --runInBand",
"test:coverage": "jest --collectCoverage=true --runInBand",
"test:server": "stupid-server -s"

@@ -27,0 +28,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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