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 1.3.5 to 1.4.0-alpha.1

1

dist/src/index.d.ts
import { Schema } from '@contember/schema';
import * as Typesafe from '@contember/typesafe';
export * from './definition-generator';
export * from './SchemaDatabaseMetadata';
export * from './lax';

@@ -6,0 +5,0 @@ export * from './model';

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

__exportStar(require("./definition-generator"), exports);
__exportStar(require("./SchemaDatabaseMetadata"), exports);
__exportStar(require("./lax"), exports);

@@ -38,0 +37,0 @@ __exportStar(require("./model"), exports);

5

dist/src/type-schema/model.d.ts

@@ -13,6 +13,3 @@ import * as Typesafe from '@contember/typesafe';

};
readonly unique: readonly {
readonly fields: readonly string[];
readonly name?: string | undefined;
}[];
readonly unique: Model.UniqueConstraints;
readonly indexes: Model.Indexes;

@@ -19,0 +16,0 @@ readonly eventLog: {

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

const indexesSchema = Typesafe.coalesce(Typesafe.preprocess(Typesafe.array(indexLike), it => (it === null || it === void 0 ? void 0 : it.constructor) === Object ? Object.values(it) : it), []);
const uniqueConstraint = Typesafe.intersection(indexLike, Typesafe.partial({
timing: Typesafe.enumeration('deferrable', 'deferred'),
}));
const uniqueConstraintCheck = true;
const entitySchema = Typesafe.intersection(Typesafe.object({

@@ -141,3 +145,3 @@ name: Typesafe.string,

fields: Typesafe.record(Typesafe.string, fieldSchema),
unique: Typesafe.preprocess(Typesafe.array(indexLike), it => (it === null || it === void 0 ? void 0 : it.constructor) === Object ? Object.values(it) : it),
unique: Typesafe.preprocess(Typesafe.array(uniqueConstraint), it => (it === null || it === void 0 ? void 0 : it.constructor) === Object ? Object.values(it) : it),
indexes: indexesSchema,

@@ -144,0 +148,0 @@ eventLog: eventLogSchema,

@@ -8,2 +8,6 @@ import * as Typesafe from '@contember/typesafe';

} | undefined;
readonly content?: {
readonly useExistsInHasManyFilter?: boolean | undefined;
readonly shortDateResponse?: boolean | undefined;
} | undefined;
};

@@ -20,4 +24,14 @@ inner: {

};
content: {
(input: unknown, path?: PropertyKey[] | undefined): {
readonly useExistsInHasManyFilter?: boolean | undefined;
readonly shortDateResponse?: boolean | undefined;
};
inner: {
useExistsInHasManyFilter: Typesafe.Type<boolean>;
shortDateResponse: Typesafe.Type<boolean>;
};
};
};
};
//# sourceMappingURL=settings.d.ts.map

@@ -33,4 +33,8 @@ "use strict";

}),
content: Typesafe.partial({
useExistsInHasManyFilter: Typesafe.boolean,
shortDateResponse: Typesafe.boolean,
}),
});
const settingSchemaCheck = true;
//# sourceMappingURL=settings.js.map
{
"name": "@contember/schema-utils",
"version": "1.3.5",
"version": "1.4.0-alpha.1",
"license": "Apache-2.0",

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

"dependencies": {
"@contember/schema": "1.3.5",
"@contember/typesafe": "1.3.5"
"@contember/schema": "1.4.0-alpha.1",
"@contember/typesafe": "1.4.0-alpha.1"
},
"devDependencies": {
"@contember/schema-definition": "1.3.5",
"@contember/schema-definition": "1.4.0-alpha.1",
"@types/node": "^18"
}
}

@@ -8,3 +8,2 @@ import { Schema } from '@contember/schema'

export * from './definition-generator'
export * from './SchemaDatabaseMetadata'
export * from './lax'

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

@@ -173,2 +173,10 @@ import * as Typesafe from '@contember/typesafe'

const uniqueConstraint = Typesafe.intersection(
indexLike,
Typesafe.partial({
timing: Typesafe.enumeration('deferrable', 'deferred'),
}),
)
const uniqueConstraintCheck: Typesafe.Equals<Model.UniqueConstraint, ReturnType<typeof uniqueConstraint>> = true
const entitySchema = Typesafe.intersection(

@@ -181,4 +189,4 @@ Typesafe.object({

fields: Typesafe.record(Typesafe.string, fieldSchema),
unique: Typesafe.preprocess(
Typesafe.array(indexLike),
unique: Typesafe.preprocess<Model.UniqueConstraints>(
Typesafe.array(uniqueConstraint),
it => it?.constructor === Object ? Object.values(it) : it,

@@ -185,0 +193,0 @@ ),

@@ -6,7 +6,12 @@ import * as Typesafe from '@contember/typesafe'

useExistsInHasManyFilter: Typesafe.boolean,
tenant: Typesafe.partial({
inviteExpirationMinutes: Typesafe.integer,
}),
content: Typesafe.partial({
useExistsInHasManyFilter: Typesafe.boolean,
shortDateResponse: Typesafe.boolean,
}),
})
const settingSchemaCheck: Typesafe.Equals<Settings.Schema, ReturnType<typeof settingsSchema>> = true

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