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

@jitsu/functions-lib

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jitsu/functions-lib - npm Package Compare versions

Comparing version

to
1.9.0-canary.548.20240108170646

43

dist/index.cjs.js

@@ -6,10 +6,51 @@ 'use strict';

class RetryError extends Error {
status;
response;
message;
constructor(message, options) {
super(message);
if (typeof message === "object") {
super(message.message);
this.message = message.message;
this.status = message.status;
this.response = message.response;
}
else {
super(message);
this.message = message;
}
this.name = options?.drop ? `${DropRetryErrorName}` : `${RetryErrorName}`;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}
class HTTPError extends Error {
status;
response;
message;
constructor(message, status, response) {
super(message);
this.message = message;
this.name = "HTTPError";
this.status = status;
this.response = response.length > 1000 ? response.slice(0, 1000) + "..." : response;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}
exports.DropRetryErrorName = DropRetryErrorName;
exports.HTTPError = HTTPError;
exports.RetryError = RetryError;
exports.RetryErrorName = RetryErrorName;
const DropRetryErrorName = "Drop & RetryError";
const RetryErrorName = "RetryError";
class RetryError extends Error {
status;
response;
message;
constructor(message, options) {
super(message);
if (typeof message === "object") {
super(message.message);
this.message = message.message;
this.status = message.status;
this.response = message.response;
}
else {
super(message);
this.message = message;
}
this.name = options?.drop ? `${DropRetryErrorName}` : `${RetryErrorName}`;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}
class HTTPError extends Error {
status;
response;
message;
constructor(message, status, response) {
super(message);
this.message = message;
this.name = "HTTPError";
this.status = status;
this.response = response.length > 1000 ? response.slice(0, 1000) + "..." : response;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}
export { DropRetryErrorName, RetryError, RetryErrorName };
export { DropRetryErrorName, HTTPError, RetryError, RetryErrorName };
export declare const DropRetryErrorName = "Drop & RetryError";
export declare const RetryErrorName = "RetryError";
export declare class RetryError extends Error {
status: number;
response: string;
message: string;
constructor(message?: any, options?: {
drop: boolean;
});
toJSON(): {
name: string;
message: string;
status: number;
response: string;
};
}
export declare class HTTPError extends Error {
status: number;
response: string;
message: string;
constructor(message: string, status: number, response: string);
toJSON(): {
name: string;
message: string;
status: number;
response: string;
};
}

4

package.json
{
"name": "@jitsu/functions-lib",
"version": "1.7.1",
"version": "1.9.0-canary.548.20240108170646",
"main": "dist/index.cjs.js",

@@ -28,4 +28,4 @@ "module": "dist/index.es.js",

"compile": "tsc -p .",
"build": "rollup -c"
"build": "pnpm compile && rollup -c"
}
}

@@ -5,6 +5,47 @@ export const DropRetryErrorName = "Drop & RetryError";

export class RetryError extends Error {
status: number;
response: string;
message: string;
constructor(message?: any, options?: { drop: boolean }) {
super(message);
if (typeof message === "object") {
super(message.message);
this.message = message.message;
this.status = message.status;
this.response = message.response;
} else {
super(message);
this.message = message;
}
this.name = options?.drop ? `${DropRetryErrorName}` : `${RetryErrorName}`;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}
export class HTTPError extends Error {
status: number;
response: string;
message: string;
constructor(message: string, status: number, response: string) {
super(message);
this.message = message;
this.name = "HTTPError";
this.status = status;
this.response = response.length > 1000 ? response.slice(0, 1000) + "..." : response;
}
toJSON() {
return {
name: this.name,
message: this.message,
status: this.status,
response: this.response,
};
}
}

Sorry, the diff of this file is not supported yet