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

@contember/schema-definition

Package Overview
Dependencies
Maintainers
5
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/schema-definition - npm Package Compare versions

Comparing version 1.2.0-beta.1 to 1.2.0-beta.2

2

dist/src/model/builder/internal/ColumnProcessor.d.ts
import FieldProcessor from './FieldProcessor';
import ColumnBuilder from '../ColumnBuilder';
import { NamingConventions } from '../../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
export default class ColumnProcessor implements FieldProcessor<ColumnBuilder.Options> {

@@ -5,0 +5,0 @@ private conventions;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const schema_1 = require("@contember/schema");
const getColumnType_1 = require("../../utils/getColumnType");
const schema_utils_1 = require("@contember/schema-utils");
class ColumnProcessor {

@@ -26,3 +26,3 @@ constructor(conventions) {

type,
columnType: (0, getColumnType_1.getColumnType)(type),
columnType: (0, schema_utils_1.resolveDefaultColumnType)(type),
...(options.typeAlias !== undefined ? { typeAlias: options.typeAlias } : {}),

@@ -29,0 +29,0 @@ };

import FieldProcessor from './FieldProcessor';
import ManyHasManyBuilder from '../ManyHasManyBuilder';
import { NamingConventions } from '../../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
export default class ManyHasManyProcessor implements FieldProcessor<ManyHasManyBuilder.Options> {

@@ -5,0 +5,0 @@ private conventions;

import FieldProcessor from './FieldProcessor';
import ManyHasOneBuilder from '../ManyHasOneBuilder';
import { NamingConventions } from '../../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
export default class ManyHasOneProcessor implements FieldProcessor<ManyHasOneBuilder.Options> {

@@ -5,0 +5,0 @@ private conventions;

import FieldProcessor from './FieldProcessor';
import OneHasManyBuilder from '../OneHasManyBuilder';
import { NamingConventions } from '../../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
export default class OneHasManyProcessor implements FieldProcessor<OneHasManyBuilder.Options> {

@@ -5,0 +5,0 @@ private conventions;

import OneHasOneBuilder from '../OneHasOneBuilder';
import FieldProcessor from './FieldProcessor';
import { NamingConventions } from '../../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
export default class OneHasOneProcessor implements FieldProcessor<OneHasOneBuilder.Options> {

@@ -5,0 +5,0 @@ private conventions;

import { Model } from '@contember/schema';
import { NamingConventions } from '../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
import { EntityConfigurator } from './types';

@@ -4,0 +4,0 @@ export default class SchemaBuilder {

@@ -18,6 +18,6 @@ "use strict";

const EntityBuilder_1 = require("./EntityBuilder");
const NamingConventions_1 = require("../definition/NamingConventions");
const schema_utils_1 = require("@contember/schema-utils");
const SchemaBuilderInternal_1 = require("./SchemaBuilderInternal");
class SchemaBuilder {
constructor(conventions = new NamingConventions_1.DefaultNamingConventions()) {
constructor(conventions = new schema_utils_1.DefaultNamingConventions()) {
this.conventions = conventions;

@@ -24,0 +24,0 @@ this.entities = {};

import { Model } from '@contember/schema';
import EntityBuilder from './EntityBuilder';
import { NamingConventions } from './../definition/NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
import FieldBuilder from './FieldBuilder';

@@ -5,0 +5,0 @@ export default class SchemaBuilderInternal {

import { Model } from '@contember/schema';
import { DecoratorFunction, EntityConstructor, FieldsDefinition } from './types';
import { EntityRegistry, EnumRegistry } from './internal';
import { NamingConventions } from './NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
interface EntityExtensionArgs {

@@ -6,0 +6,0 @@ entity: Model.Entity;

@@ -6,3 +6,3 @@ "use strict";

const FieldDefinition_1 = require("./FieldDefinition");
const utils_1 = require("../../utils");
const schema_utils_1 = require("@contember/schema-utils");
class ColumnDefinition extends FieldDefinition_1.FieldDefinition {

@@ -72,3 +72,3 @@ constructor() {

type: type,
columnType: columnType || (0, utils_1.getColumnType)(type),
columnType: columnType || (0, schema_utils_1.resolveDefaultColumnType)(type),
...(typeAlias !== undefined ? { typeAlias } : {}),

@@ -75,0 +75,0 @@ };

import { Model } from '@contember/schema';
import { NamingConventions } from '../NamingConventions';
import { NamingConventions } from '@contember/schema-utils';
import { EntityRegistry, EnumRegistry } from '../internal';

@@ -4,0 +4,0 @@ export declare abstract class FieldDefinition<O> {

@@ -22,5 +22,5 @@ "use strict";

const internal_1 = require("./internal");
const NamingConventions_1 = require("./NamingConventions");
require("reflect-metadata");
const utils_1 = require("../../utils");
const schema_utils_1 = require("@contember/schema-utils");
__exportStar(require("./fieldDefinitions"), exports);

@@ -38,3 +38,3 @@ __exportStar(require("./EventLogDefinition"), exports);

function createModel(definitions) {
const schemaBuilder = new internal_1.SchemaBuilder(new NamingConventions_1.DefaultNamingConventions());
const schemaBuilder = new internal_1.SchemaBuilder(new schema_utils_1.DefaultNamingConventions());
for (const [name, definition] of Object.entries(definitions)) {

@@ -41,0 +41,0 @@ if (definition instanceof EnumDefinition_1.EnumDefinition) {

import { Model } from '@contember/schema';
import { NamingConventions } from '@contember/schema-utils';
import 'reflect-metadata';
import { EntityConstructor } from '../types';
import { NamingConventions } from '../NamingConventions';
import { EnumDefinition } from '../EnumDefinition';

@@ -6,0 +6,0 @@ export declare class SchemaBuilder {

{
"name": "@contember/schema-definition",
"version": "1.2.0-beta.1",
"version": "1.2.0-beta.2",
"license": "Apache-2.0",

@@ -11,4 +11,4 @@ "main": "dist/src/index.js",

"dependencies": {
"@contember/schema": "^1.2.0-beta.1",
"@contember/schema-utils": "^1.2.0-beta.1",
"@contember/schema": "^1.2.0-beta.2",
"@contember/schema-utils": "^1.2.0-beta.2",
"reflect-metadata": "^0.1.13"

@@ -15,0 +15,0 @@ },

import FieldProcessor from './FieldProcessor'
import ColumnBuilder from '../ColumnBuilder'
import { NamingConventions } from '../../definition/NamingConventions'
import { Model } from '@contember/schema'
import { getColumnType } from '../../utils/getColumnType'
import { NamingConventions, resolveDefaultColumnType } from '@contember/schema-utils'

@@ -37,3 +36,3 @@ export default class ColumnProcessor implements FieldProcessor<ColumnBuilder.Options> {

type,
columnType: getColumnType(type),
columnType: resolveDefaultColumnType(type),
...(options.typeAlias !== undefined ? { typeAlias: options.typeAlias } : {}),

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

import FieldProcessor from './FieldProcessor'
import ManyHasManyBuilder from '../ManyHasManyBuilder'
import { Model } from '@contember/schema'
import { NamingConventions } from '../../definition/NamingConventions'
import { NamingConventions } from '@contember/schema-utils'

@@ -6,0 +6,0 @@ export default class ManyHasManyProcessor implements FieldProcessor<ManyHasManyBuilder.Options> {

import FieldProcessor from './FieldProcessor'
import { Model } from '@contember/schema'
import ManyHasOneBuilder from '../ManyHasOneBuilder'
import { NamingConventions } from '../../definition/NamingConventions'
import { NamingConventions } from '@contember/schema-utils'

@@ -6,0 +6,0 @@ export default class ManyHasOneProcessor implements FieldProcessor<ManyHasOneBuilder.Options> {

import FieldProcessor from './FieldProcessor'
import OneHasManyBuilder from '../OneHasManyBuilder'
import { Model } from '@contember/schema'
import { NamingConventions } from '../../definition/NamingConventions'
import { NamingConventions } from '@contember/schema-utils'

@@ -6,0 +6,0 @@ export default class OneHasManyProcessor implements FieldProcessor<OneHasManyBuilder.Options> {

import OneHasOneBuilder from '../OneHasOneBuilder'
import FieldProcessor from './FieldProcessor'
import { Model } from '@contember/schema'
import { NamingConventions } from '../../definition/NamingConventions'
import { NamingConventions } from '@contember/schema-utils'

@@ -6,0 +6,0 @@ export default class OneHasOneProcessor implements FieldProcessor<OneHasOneBuilder.Options> {

import { Model } from '@contember/schema'
import EntityBuilder from './EntityBuilder'
import { DefaultNamingConventions, NamingConventions } from '../definition/NamingConventions'
import { DefaultNamingConventions, NamingConventions } from '@contember/schema-utils'
import SchemaBuilderInternal from './SchemaBuilderInternal'

@@ -5,0 +5,0 @@ import { EntityConfigurator } from './types'

@@ -11,3 +11,3 @@ import { Model, Writable } from '@contember/schema'

import ManyHasOneProcessor from './internal/ManyHasOneProcessor'
import { NamingConventions } from './../definition/NamingConventions'
import { NamingConventions } from '@contember/schema-utils'
import FieldBuilder from './FieldBuilder'

@@ -14,0 +14,0 @@

import { Model } from '@contember/schema'
import { DecoratorFunction, EntityConstructor, FieldsDefinition } from './types'
import { EntityRegistry, EnumRegistry } from './internal'
import { NamingConventions } from './NamingConventions'
import { NamingConventions } from '@contember/schema-utils'

@@ -6,0 +6,0 @@ interface EntityExtensionArgs {

@@ -5,3 +5,3 @@ import { Model } from '@contember/schema'

import { EnumDefinition } from '../EnumDefinition'
import { getColumnType } from '../../utils'
import { resolveDefaultColumnType } from '@contember/schema-utils'

@@ -83,3 +83,3 @@ export class ColumnDefinition extends FieldDefinition<ColumnDefinitionOptions> {

type: type,
columnType: columnType || getColumnType(type),
columnType: columnType || resolveDefaultColumnType(type),
...(typeAlias !== undefined ? { typeAlias } : {}),

@@ -86,0 +86,0 @@ }

import { Model } from '@contember/schema'
import { NamingConventions } from '../NamingConventions'
import { NamingConventions } from '@contember/schema-utils'
import { EntityRegistry, EnumRegistry } from '../internal'

@@ -4,0 +4,0 @@

@@ -5,6 +5,6 @@ import { EntityConstructor, Interface } from './types'

import { SchemaBuilder } from './internal'
import { DefaultNamingConventions } from './NamingConventions'
import 'reflect-metadata'
import { FieldDefinition } from './fieldDefinitions'
import { isEntityConstructor } from '../../utils'
import { DefaultNamingConventions } from '@contember/schema-utils'

@@ -11,0 +11,0 @@ export * from './fieldDefinitions'

import { Model, Writable } from '@contember/schema'
import { NamingHelper } from '@contember/schema-utils'
import { NamingConventions, NamingHelper } from '@contember/schema-utils'
import 'reflect-metadata'
import { tuple } from '../../../utils'
import { EntityConstructor, FieldsDefinition } from '../types'
import { NamingConventions } from '../NamingConventions'
import { EnumDefinition } from '../EnumDefinition'

@@ -8,0 +7,0 @@ import { EntityRegistry } from './EntityRegistry'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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