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

@travetto/schema

Package Overview
Dependencies
Maintainers
1
Versions
329
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/schema - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

6

extension/rest.ts

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

import { ControllerRegistry, AppError, ParamConfig, Filter, EndpointDecorator, Response, Request } from '@travetto/rest';
import { ControllerRegistry, RestError, ParamConfig, Filter, EndpointDecorator, Response, Request } from '@travetto/rest';
import { Util } from '@travetto/base';

@@ -23,3 +23,3 @@ import { Class } from '@travetto/registry';

} catch (e) {
throw new AppError(`Supplied data is incompatible with ${cls.__id}: ${e.message}`);
throw new RestError(`Supplied data is incompatible with ${cls.__id}: ${e.message}`);
}

@@ -37,3 +37,3 @@ }

} else {
throw new AppError(`Body is missing or wrong type: ${req.body}`, 503);
throw new RestError(`Body is missing or wrong type: ${req.body}`, 503);
}

@@ -40,0 +40,0 @@ }

@@ -7,8 +7,8 @@ {

"dependencies": {
"@travetto/config": "^0.5.2",
"@travetto/registry": "^0.5.3"
"@travetto/config": "^0.5.3",
"@travetto/registry": "^0.5.4"
},
"description": "Data type registry for runtime validation, reflection and binding. ",
"devDependencies": {
"@travetto/test": "^0.5.5"
"@travetto/test": "^0.5.6"
},

@@ -32,2 +32,8 @@ "optionalExtensionDependencies": {

"main": "index.ts",
"files": [
"index.ts",
"src",
"extension",
"support"
],
"name": "@travetto/schema",

@@ -37,4 +43,4 @@ "repository": {

},
"version": "0.5.4",
"gitHead": "a6b165a87702eb29efcadfd1f27450b7daba2782"
"version": "0.5.5",
"gitHead": "c966f7a6d0670d9ee4237576e7d5443285940bfc"
}

@@ -49,3 +49,3 @@ import { MetadataRegistry, RootRegistry, Class, ChangeEvent } from '@travetto/registry';

computeSchemaDependencies(cls: Class, curr: Class = cls, path: string[] = []) {
trackSchemaDependencies(cls: Class, curr: Class = cls, path: string[] = []) {
const config = this.get(curr);

@@ -59,3 +59,3 @@

if (this.has(view.schema[k].type)) {
this.computeSchemaDependencies(cls, view.schema[k].type, [...path, k]);
this.trackSchemaDependencies(cls, view.schema[k].type, [...path, k]);
}

@@ -189,3 +189,3 @@ }

if (Env.watch && this.has(cls)) {
this.computeSchemaDependencies(cls);
this.trackSchemaDependencies(cls);
}

@@ -192,0 +192,0 @@ }

import { Class } from '@travetto/registry';
import { BaseError } from '@travetto/base';
import { AppError } from '@travetto/base';

@@ -10,3 +10,3 @@ import { FieldConfig, SchemaConfig } from '../types';

export class ValidationErrors extends BaseError {
export class ValidationErrors extends AppError {
constructor(public errors: ValidationError[]) {

@@ -13,0 +13,0 @@ super('Errors have occurred');

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