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

@naturalcycles/js-lib

Package Overview
Dependencies
Maintainers
3
Versions
525
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naturalcycles/js-lib - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [4.2.0](https://github.com/NaturalCycles/js-lib/compare/v4.1.0...v4.2.0) (2019-03-15)
### Features
* HttpErrorResponse, Admin401ErrorData, Admin403ErrorData ([d159381](https://github.com/NaturalCycles/js-lib/commit/d159381))
# [4.1.0](https://github.com/NaturalCycles/js-lib/compare/v4.0.0...v4.1.0) (2019-03-11)

@@ -2,0 +9,0 @@

12

dist/error/error.model.d.ts

@@ -26,2 +26,11 @@ import { StringMap } from '../types';

}
export interface Admin401ErrorData extends HttpErrorData {
adminAuthRequired: true;
}
export interface Admin403ErrorData extends HttpErrorData {
/**
* Returns non-empty array.
*/
adminPermissionsRequired: string[];
}
/**

@@ -60,5 +69,4 @@ * Portable object that represents Error.

*/
export interface ErrorResponse<DATA_TYPE extends ErrorData = ErrorData> {
export interface HttpErrorResponse<DATA_TYPE extends HttpErrorData = HttpErrorData> {
error: ErrorObject<DATA_TYPE>;
}
export declare type HttpErrorResponse = ErrorResponse<HttpErrorData>;

4

dist/index.d.ts
import { memo } from './decorators/memo.decorator';
import { memoCache } from './decorators/memoCache.decorator';
import { AppError } from './error/app.error';
import { ErrorData, ErrorObject, ErrorResponse, HttpErrorData, HttpErrorResponse } from './error/error.model';
import { Admin401ErrorData, Admin403ErrorData, ErrorData, ErrorObject, HttpErrorData, HttpErrorResponse } from './error/error.model';
import { anyToErrorMessage, anyToErrorObject, appErrorToErrorObject, appErrorToHttpError, errorObjectToAppError, errorObjectToHttpError, errorToErrorObject } from './error/error.util';

@@ -13,2 +13,2 @@ import { HttpError } from './error/http.error';

import { silentConsole } from './util/test.util';
export { memo, memoCache, ErrorData, ErrorObject, HttpErrorData, ErrorResponse, HttpErrorResponse, AppError, HttpError, silentConsole, randomInt, loadScript, StringMap, PromiseMap, ClassType, capitalizeFirstLetter, lowercaseFirstLetter, removeWhitespace, pick, filterFalsyValues, filterEmptyStringValues, filterUndefinedValues, filterValues, transformValues, objectNullValuesToUndefined, deepEquals, deepCopy, isObject, isEmptyObject, mergeDeep, deepTrim, sortObjectDeep, unsetValue, mask, arrayToHash, classToPlain, getKeyByValue, invertObject, invertMap, by, deepFreeze, anyToErrorMessage, anyToErrorObject, errorToErrorObject, errorObjectToAppError, errorObjectToHttpError, appErrorToErrorObject, appErrorToHttpError, };
export { memo, memoCache, ErrorData, ErrorObject, HttpErrorData, HttpErrorResponse, AppError, HttpError, Admin401ErrorData, Admin403ErrorData, silentConsole, randomInt, loadScript, StringMap, PromiseMap, ClassType, capitalizeFirstLetter, lowercaseFirstLetter, removeWhitespace, pick, filterFalsyValues, filterEmptyStringValues, filterUndefinedValues, filterValues, transformValues, objectNullValuesToUndefined, deepEquals, deepCopy, isObject, isEmptyObject, mergeDeep, deepTrim, sortObjectDeep, unsetValue, mask, arrayToHash, classToPlain, getKeyByValue, invertObject, invertMap, by, deepFreeze, anyToErrorMessage, anyToErrorObject, errorToErrorObject, errorObjectToAppError, errorObjectToHttpError, appErrorToErrorObject, appErrorToHttpError, };
{
"name": "@naturalcycles/js-lib",
"version": "4.1.0",
"version": "4.2.0",
"scripts": {

@@ -19,5 +19,5 @@ "build": "del ./dist && tsc",

"@naturalcycles/semantic-release": "^1.0.0",
"@naturalcycles/shared-module": "^3.0.0",
"@naturalcycles/shared-module": "^4.0.3",
"@types/jest": "^24.0.6",
"@types/node": "^10.0.0",
"@types/node": "^11.11.3",
"jest": "^24.1.0",

@@ -24,0 +24,0 @@ "jest-junit": "^6.2.1",

@@ -31,2 +31,13 @@ import { StringMap } from '../types'

export interface Admin401ErrorData extends HttpErrorData {
adminAuthRequired: true
}
export interface Admin403ErrorData extends HttpErrorData {
/**
* Returns non-empty array.
*/
adminPermissionsRequired: string[]
}
/**

@@ -73,6 +84,4 @@ * Portable object that represents Error.

*/
export interface ErrorResponse<DATA_TYPE extends ErrorData = ErrorData> {
export interface HttpErrorResponse<DATA_TYPE extends HttpErrorData = HttpErrorData> {
error: ErrorObject<DATA_TYPE>
}
export type HttpErrorResponse = ErrorResponse<HttpErrorData>

@@ -5,5 +5,6 @@ import { memo } from './decorators/memo.decorator'

import {
Admin401ErrorData,
Admin403ErrorData,
ErrorData,
ErrorObject,
ErrorResponse,
HttpErrorData,

@@ -59,6 +60,7 @@ HttpErrorResponse,

HttpErrorData,
ErrorResponse,
HttpErrorResponse,
AppError,
HttpError,
Admin401ErrorData,
Admin403ErrorData,
silentConsole,

@@ -65,0 +67,0 @@ randomInt,

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