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

@avst-api/commons

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avst-api/commons - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

9

index.d.ts

@@ -56,5 +56,12 @@ /// <reference types="runtime" />

errors: string[];
field: string;
name: string;
constructor(errors: string[]);
constructor(errors: string[], field: string);
}
export declare class UserNotFoundError extends RequestValidationError {
message: string;
field: string;
name: string;
constructor(message: string, field: string);
}
export declare class UnexpectedError extends Error {

@@ -61,0 +68,0 @@ originalError: any;

@@ -39,8 +39,17 @@ export class HttpError extends Error {

export class RequestValidationError extends Error {
constructor(errors) {
constructor(errors, field) {
super(`Request validation errors: ${errors.join(', ')}`);
this.errors = errors;
this.field = field;
this.name = 'RequestValidationError';
}
}
export class UserNotFoundError extends RequestValidationError {
constructor(message, field) {
super([message], field);
this.message = message;
this.field = field;
this.name = 'UserNotFoundError';
}
}
export class UnexpectedError extends Error {

@@ -219,3 +228,3 @@ constructor(originalError, message) {

}
throw new UnexpectedError(e, `Failed to read body`);
throw new UnexpectedError(e, 'Failed to read body');
}

@@ -222,0 +231,0 @@ }

16

package.json
{
"name": "@avst-api/commons",
"version": "0.2.0",
"version": "0.3.0",
"description": "Commons for Adaptavist Managed APIs",
"main": "index.js",
"repository": "git@bitbucket.org:adaptavistlabs/adaptavist-api-common.git",
"module": "index",
"type": "module",
"scripts": {
"tsc": "node ./node_modules/typescript/bin/tsc",
"build": "node ./node_modules/typescript/bin/tsc --outDir dist && cp package.json dist/package.json && cp readme.md dist/readme.md",
"build": "rm -rf dist && tsc && cp package.json dist/package.json && cp readme.md dist/readme.md",
"release": "sh ./publish.sh",
"release:public": "sh ./publish-public.sh",
"lint": "node ./node_modules/eslint/bin/eslint.js --ext ts ./",
"lint-fix": "node ./node_modules/eslint/bin/eslint.js --fix --ext ts ./"
"lint:fix": "node ./node_modules/eslint/bin/eslint.js --fix --ext ts ./"
},
"repository": {
"type": "git",
"url": "git+ssh://git@bitbucket.org/adaptavistlabs/adaptavist-api-common.git"
},
"author": "Adaptavist",
"license": "UNLICENSED",
"homepage": "https://bitbucket.org/adaptavistlabs/adaptavist-api-common#readme",
"dependencies": {

@@ -21,0 +19,0 @@ "@avst-types/runtime": "^0.13.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