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 3.1.0-rc.4 to 3.1.0-rc.5

6

package.json
{
"name": "@travetto/schema",
"version": "3.1.0-rc.4",
"version": "3.1.0-rc.5",
"description": "Data type registry for runtime validation, reflection and binding.",

@@ -30,6 +30,6 @@ "keywords": [

"dependencies": {
"@travetto/registry": "^3.1.0-rc.2"
"@travetto/registry": "^3.1.0-rc.3"
},
"peerDependencies": {
"@travetto/transformer": "^3.1.0-rc.2"
"@travetto/transformer": "^3.1.0-rc.3"
},

@@ -36,0 +36,0 @@ "peerDependenciesMeta": {

@@ -84,2 +84,4 @@ <!-- This file was generated by @travetto/doc and should not be modified directly -->

* [@Writeonly](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L52) defines a that field should not be exported in serialization, but that it can be bound to
* [@Secret](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L64) marks a field as being sensitive. This is used by certain logging activities to ensure sensitive information is not logged out.
* [@Specifier](https://github.com/travetto/travetto/tree/main/module/schema/src/decorator/field.ts#L206) attributes additional specifiers to a field, allowing for more specification beyond just the field's type.
Additionally, schemas can be nested to form more complex data structures that are able to bound and validated.

@@ -86,0 +88,0 @@

@@ -48,8 +48,2 @@ import { ClassInstance } from '@travetto/base';

/**
* Specifier for the field
* @param specifier The specifier for a field
* @augments `@travetto/schema:Field`
*/
export function Specifier(specifier: string): PropType<unknown> { return prop({ specifier }); }
/**
* Mark a field as writeonly

@@ -93,3 +87,3 @@ * @param active This determines if this field is readonly or not.

*/
export function Text(): PropType<string | string[]> { return prop({ specifier: 'text' }); }
export function Text(): PropType<string | string[]> { return prop({ specifiers: ['text'] }); }
/**

@@ -99,3 +93,3 @@ * Mark the field to indicate it's for long form text

*/
export function LongText(): PropType<string | string[]> { return prop({ specifier: 'text-long' }); }
export function LongText(): PropType<string | string[]> { return prop({ specifiers: ['text', 'long'] }); }

@@ -209,1 +203,8 @@ /**

}
/**
* Specifier for the field
* @param specifiers The specifiers for a field
* @augments `@travetto/schema:Field`
*/
export function Specifier(...specifiers: string[]): PropType<unknown> { return prop({ specifiers }); }

@@ -256,2 +256,10 @@ import { Class, AppError, ObjectUtil, ClassInstance, ConcreteClass } from '@travetto/base';

const params = (methods[method] ??= []);
if (config.aliases) {
config.aliases = [...params[idx]?.aliases ?? [], ...config.aliases];
}
if (config.specifiers) {
config.specifiers = [...params[idx]?.specifiers ?? [], ...config.specifiers];
}
params[idx] = {

@@ -283,2 +291,8 @@ // @ts-expect-error

}
if (config.aliases) {
config.aliases = [...allViewConf.schema[prop].aliases ?? [], ...config.aliases];
}
if (config.specifiers) {
config.specifiers = [...allViewConf.schema[prop].specifiers ?? [], ...config.specifiers];
}

@@ -285,0 +299,0 @@ Object.assign(allViewConf.schema[prop], config);

@@ -118,3 +118,3 @@ import { Primitive, Class } from '@travetto/base';

*/
specifier?: string;
specifiers?: string[];
/**

@@ -121,0 +121,0 @@ * The numeric precision

@@ -151,3 +151,3 @@ import ts from 'typescript';

}
params.push(state.extendObjectLiteral(state.factory.createObjectLiteralExpression(attrs)));
params.push(state.factory.createObjectLiteralExpression(attrs));
if (args.length > 1) {

@@ -154,0 +154,0 @@ params.push(...args.slice(1));

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