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

@contember/schema-utils

Package Overview
Dependencies
Maintainers
5
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/schema-utils - npm Package Compare versions

Comparing version 0.8.0-alpha.2 to 0.8.0-alpha.3

1

dist/src/acl/AllowAllPermissionFactory.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AllowAllPermissionFactory = void 0;
const schema_1 = require("@contember/schema");

@@ -4,0 +5,0 @@ class AllowAllPermissionFactory {

17

dist/src/acl/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./AllowAllPermissionFactory"));
__export(require("./PredicateDefinitionProcessor"));
__exportStar(require("./AllowAllPermissionFactory"), exports);
__exportStar(require("./PredicateDefinitionProcessor"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PredicateDefinitionProcessor = void 0;
const model_1 = require("../model");

@@ -4,0 +5,0 @@ class PredicateDefinitionProcessor {

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

import { Model, Value } from '@contember/schema';
import { Input, Model, Value } from '@contember/schema';
export interface Providers {

@@ -6,11 +6,11 @@ uuid: () => string;

}
export declare const resolveDefaultValue: (column: Model.Column<Model.ColumnType>, providers: Pick<Providers, "now">) => string | number | boolean | null;
export declare const resolvePrimaryGenerator: (column: Model.Column<Model.ColumnType>, providers: Providers) => () => string | number;
export declare const resolveDefaultValue: (column: Model.AnyColumn, providers: Pick<Providers, 'now'>) => string | number | boolean | null;
export declare const resolvePrimaryGenerator: (column: Model.AnyColumn, providers: Providers) => (() => Input.PrimaryValue);
export declare const resolveColumnValue: ({ entity, column, input, }: {
entity: Model.Entity;
column: Model.Column<Model.ColumnType>;
input: string | number | boolean | Value.Object<never> | Value.List<never> | null | undefined;
}, providers: Providers) => string | number | boolean | null;
column: Model.AnyColumn;
input: Input.ColumnValue | undefined;
}, providers: Providers) => Value.AtomicValue;
export declare class NoDataError extends Error {
}
//# sourceMappingURL=dataUtils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NoDataError = exports.resolveColumnValue = exports.resolvePrimaryGenerator = exports.resolveDefaultValue = void 0;
const schema_1 = require("@contember/schema");

@@ -4,0 +5,0 @@ exports.resolveDefaultValue = (column, providers) => {

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.emptySchema = void 0;
const model_1 = require("./model");
__export(require("./model"));
__export(require("./acl"));
__export(require("./dataUtils"));
__export(require("./validation"));
__export(require("./schemaNormalizer"));
__export(require("./schemaFilter"));
__exportStar(require("./model"), exports);
__exportStar(require("./acl"), exports);
__exportStar(require("./dataUtils"), exports);
__exportStar(require("./validation"), exports);
__exportStar(require("./schemaNormalizer"), exports);
__exportStar(require("./schemaFilter"), exports);
exports.emptySchema = {

@@ -14,0 +22,0 @@ model: model_1.emptyModelSchema,

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./modelUtils"));
__export(require("./NamingHelper"));
__exportStar(require("./modelUtils"), exports);
__exportStar(require("./NamingHelper"), exports);
//# sourceMappingURL=index.js.map

@@ -10,31 +10,7 @@ import { Model } from '@contember/schema';

};
export declare const acceptFieldVisitor: <T>(schema: Model.Schema, entity: string | Model.Entity, field: string | (Model.Field<Model.ColumnType> & Model.UuidColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.StringColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.IntColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.DoubleColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.BoolColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.EnumColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.DateTimeColumnDefinition & {
name: string;
columnName: string;
}) | (Model.Field<Model.ColumnType> & Model.DateColumnDefinition & {
name: string;
columnName: string;
}) | Model.OneHasManyRelation | Model.OneHasOneInversedRelation | Model.ManyHasManyInversedRelation | Model.ManyHasOneRelation | Model.OneHasOneOwnerRelation | Model.ManyHasManyOwnerRelation, visitor: Model.FieldVisitor<T>) => T;
export declare const acceptRelationTypeVisitor: <T>(schema: Model.Schema, entity: string | Model.Entity, relation: string | Model.OneHasManyRelation | Model.OneHasOneInversedRelation | Model.ManyHasManyInversedRelation | Model.ManyHasOneRelation | Model.OneHasOneOwnerRelation | Model.ManyHasManyOwnerRelation, visitor: Model.RelationByTypeVisitor<T>) => T;
export declare const isInversedRelation: (relation: Model.Relation<Model.RelationType>) => relation is Model.InversedRelation;
export declare const isOwnerRelation: (relation: Model.Relation<Model.RelationType>) => relation is Model.OwnerRelation;
export declare const acceptFieldVisitor: <T>(schema: Model.Schema, entity: string | Model.Entity, field: string | Model.AnyField, visitor: Model.FieldVisitor<T>) => T;
export declare const acceptRelationTypeVisitor: <T>(schema: Model.Schema, entity: string | Model.Entity, relation: string | Model.AnyRelation, visitor: Model.RelationByTypeVisitor<T>) => T;
export declare const isInversedRelation: (relation: Model.Relation) => relation is Model.InversedRelation;
export declare const isOwnerRelation: (relation: Model.Relation) => relation is Model.OwnerRelation;
export declare const emptyModelSchema: Model.Schema;
//# sourceMappingURL=modelUtils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.emptyModelSchema = exports.isOwnerRelation = exports.isInversedRelation = exports.acceptRelationTypeVisitor = exports.acceptFieldVisitor = exports.acceptEveryFieldVisitor = exports.getUniqueConstraints = exports.getTargetEntity = exports.getColumnType = exports.getColumnName = exports.getEntity = void 0;
const utils_1 = require("../utils");

@@ -4,0 +5,0 @@ const schema_1 = require("@contember/schema");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.NamingHelper = void 0;
const crypto_1 = __importDefault(require("crypto"));

@@ -8,0 +9,0 @@ class NamingHelper {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterSchemaByStage = void 0;
exports.filterSchemaByStage = (schema, stageSlug) => {

@@ -4,0 +5,0 @@ const roles = Object.entries(schema.acl.roles)

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeSchema = void 0;
const schema_1 = require("@contember/schema");

@@ -4,0 +5,0 @@ const acl_1 = require("./acl");

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./isIt"));
__exportStar(require("./isIt"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isIt = void 0;
exports.isIt = (val, property, value) => {

@@ -4,0 +5,0 @@ if (value !== undefined) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AclValidator = void 0;
const schema_1 = require("@contember/schema");

@@ -4,0 +5,0 @@ const utils_1 = require("./utils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorBuilder = void 0;
class ErrorBuilder {

@@ -4,0 +5,0 @@ constructor(errors, path = []) {

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./AclValidator"));
__export(require("./errors"));
__export(require("./SchemaValidator"));
__exportStar(require("./AclValidator"), exports);
__exportStar(require("./errors"), exports);
__exportStar(require("./SchemaValidator"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModelValidator = void 0;
const schema_1 = require("@contember/schema");

@@ -4,0 +5,0 @@ const errors_1 = require("./errors");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SchemaValidator = void 0;
const AclValidator_1 = require("./AclValidator");

@@ -4,0 +5,0 @@ const ModelValidator_1 = require("./ModelValidator");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkExtraProperties = exports.everyIs = exports.hasArrayProperty = exports.hasNumberProperty = exports.hasStringProperty = exports.isObject = void 0;
function isObject(input) {

@@ -4,0 +5,0 @@ return typeof input === 'object' && input !== null;

{
"name": "@contember/schema-utils",
"version": "0.8.0-alpha.2",
"version": "0.8.0-alpha.3",
"license": "Apache-2.0",

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

"dependencies": {
"@contember/schema": "^0.8.0-alpha.2"
"@contember/schema": "^0.8.0-alpha.3"
},
"devDependencies": {
"@types/node": "^13.11.1",
"typescript": "^3.7.4"
"typescript": "^3.9.5"
},
"gitHead": "dfc666f11f4d24a67b260bf57f62b420657d51c2"
"gitHead": "8c72aa88a27d3120a52e6968fe0e188490005b39"
}

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

}
return field as Model.AnyColumn
return (field as unknown) as Model.AnyColumn
}

@@ -189,0 +189,0 @@

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

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