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

idea-toolbox

Package Overview
Dependencies
Maintainers
2
Versions
377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-toolbox - npm Package Compare versions

Comparing version 6.2.13 to 6.2.14

dist/errorWhitelisted.model.d.ts

59

dist/clientInfo.model.d.ts

@@ -0,1 +1,2 @@

import { epochISOString } from './epoch';
import { Resource } from './resource.model';

@@ -6,60 +7,40 @@ export declare class ClientInfo extends Resource {

*/
timestamp: Date;
timestamp: epochISOString;
/**
* The timezone of the client.
* Info about the client's platform.
*/
timezone: number;
platform: string;
/**
* In which page the client was on.
* The client's screen width.
*/
pageOn: string;
screenWidth: number;
/**
* The page referrer of the client.
* The client's screen height.
*/
referrer: string;
screenHeight: number;
/**
* The browser name.
* Whether the client is in landscape mode; otherwise, portrait.
*/
browserName: string;
isLandscape: boolean;
/**
* The browser engine.
* The current url on the client.
*/
browserEngine: string;
url: string;
/**
* The browser version.
* The page referrer of the client.
*/
browserVersion: string;
referrer: string;
/**
* The browser user agent.
* Whether the client was online at the time of the error.
*/
browserUserAgent: string;
isOnline: boolean;
/**
* The browser language.
* The client's language.
*/
browserLanguage: string;
language: string;
/**
* The connection status of the browser.
* The client's user agent.
*/
browserOnline: boolean;
/**
* The platform of the browser.
*/
browserPlatform: string;
/**
* The screen width.
*/
screenWidth: number;
/**
* The screen height.
*/
screenHeight: number;
/**
* The screen color depth.
*/
screenColorDepth: number;
/**
* The screen pixl depth.
*/
screenPixelDepth: number;
userAgent: string;
load(x: any): void;
}

@@ -8,19 +8,14 @@ "use strict";

super.load(x);
this.timestamp = this.clean(x.timestamp, a => new Date(a).getTime(), Date.now());
this.timezone = this.clean(x.timezone, Number);
this.pageOn = this.clean(x.pageOn, String);
this.referrer = this.clean(x.referrer, String);
this.browserName = this.clean(x.browserName, String);
this.browserEngine = this.clean(x.browserEngine, String);
this.browserVersion = this.clean(x.browserVersion, String);
this.browserUserAgent = this.clean(x.browserUserAgent, String);
this.browserLanguage = this.clean(x.browserLanguage, String);
this.browserOnline = this.clean(x.browserOnline, Boolean);
this.browserPlatform = this.clean(x.browserPlatform, String);
this.timestamp = this.clean(x.timestamp, t => new Date(t).toISOString());
this.platform = this.clean(x.platform, String);
this.screenWidth = this.clean(x.screenWidth, Number);
this.screenHeight = this.clean(x.screenHeight, Number);
this.screenColorDepth = this.clean(x.screenColorDepth, Number);
this.screenPixelDepth = this.clean(x.screenPixelDepth, Number);
this.isLandscape = this.clean(x.isLandscape, Boolean);
this.url = this.clean(x.url, String);
this.referrer = this.clean(x.referrer, String);
this.isOnline = this.clean(x.isOnline, Boolean);
this.language = this.clean(x.language, String);
this.userAgent = this.clean(x.userAgent, String);
}
}
exports.ClientInfo = ClientInfo;

@@ -13,1 +13,7 @@ /**

export declare type epochDateTime = number;
/**
* Alias to avoid explaining the type for each variable.
*
* It's a date time in epoch format (reference date) stored in ISO string.
*/
export declare type epochISOString = string;
import { Resource } from './resource.model';
import { epochDateTime } from './epoch';
import { ClientInfo } from './clientInfo.model';
import { ClientError } from './clientError.model';
import { epochISOString } from './epoch';
/**

@@ -10,18 +9,38 @@ * Table: `idea_projects_errorsReports`.

/**
* Project / product key.
* Project/product key.
*/
project: string;
/**
* The timestamp of creation (server).
* The version of the project/product.
*/
createdAt: epochDateTime;
version: string;
/**
* Expiration time, in seconds.
* The stage currently set (dev/prod/etc.).
*/
stage: string;
/**
* The language currently set.
*/
language: string;
/**
* The timestamp of creation (backend).
*/
createdAt: epochISOString;
/**
* Timestamp of when the report should expire, expressed in seconds.
*/
expiresAt: number;
/**
* The details of the error.
* The type of the error.
*/
error: ClientError;
type: string;
/**
* The error message.
*/
error: string;
/**
* The error stack (stringified).
*/
stack: string;
/**
* The details of the client at the time of the error.

@@ -31,3 +50,2 @@ */

load(x: any): void;
safeLoad(newData: any, safeData: any): void;
}

@@ -6,4 +6,2 @@ "use strict";

const clientInfo_model_1 = require("./clientInfo.model");
const clientError_model_1 = require("./clientError.model");
const EXPIRES_AT_DEFAULT_MARING_SEC = 5184000; // 60 days
/**

@@ -16,14 +14,13 @@ * Table: `idea_projects_errorsReports`.

this.project = this.clean(x.project, String);
this.createdAt = this.clean(x.createdAt, a => new Date(a), Date.now());
this.expiresAt = Math.round(new Date(this.createdAt).getTime() / 1000 + EXPIRES_AT_DEFAULT_MARING_SEC);
this.error = new clientError_model_1.ClientError(x.error);
this.version = this.clean(x.version, String);
this.stage = this.clean(x.stage, String);
this.language = this.clean(x.language, String);
this.createdAt = this.clean(x.createdAt, t => new Date(t).toISOString());
this.expiresAt = this.clean(x.expiresAt, Number);
this.type = this.clean(x.type, String);
this.error = this.clean(x.error, String);
this.stack = this.clean(x.stack, String);
this.client = new clientInfo_model_1.ClientInfo(x.client);
}
safeLoad(newData, safeData) {
this.safeLoad(newData, safeData);
this.project = safeData.project;
this.createdAt = safeData.createdAt;
this.expiresAt = Math.round(safeData.createdAt / 1000 + EXPIRES_AT_DEFAULT_MARING_SEC);
}
}
exports.ErrorReport = ErrorReport;

@@ -13,3 +13,2 @@ export * from './address.model';

export * from './clientInfo.model';
export * from './clientError.model';
export * from './contactRequest.model';

@@ -27,2 +26,3 @@ export * from './contacts.model';

export * from './errorReport.model';
export * from './errorWhitelisted.model';
export * from './invitation.model';

@@ -29,0 +29,0 @@ export * from './ionicons.enum';

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

__exportStar(require("./clientInfo.model"), exports);
__exportStar(require("./clientError.model"), exports);
__exportStar(require("./contactRequest.model"), exports);

@@ -39,2 +38,3 @@ __exportStar(require("./contacts.model"), exports);

__exportStar(require("./errorReport.model"), exports);
__exportStar(require("./errorWhitelisted.model"), exports);
__exportStar(require("./invitation.model"), exports);

@@ -41,0 +41,0 @@ __exportStar(require("./ionicons.enum"), exports);

{
"name": "idea-toolbox",
"version": "6.2.13",
"version": "6.2.14",
"description": "IDEA's utility functions",

@@ -5,0 +5,0 @@ "engines": {

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