@contember/schema-utils
Advanced tools
Comparing version 1.3.5 to 1.4.0-alpha.1
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); |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
606355
280
8455
2
+ Added@contember/schema@1.4.0-alpha.1(transitive)
+ Added@contember/typesafe@1.4.0-alpha.1(transitive)
- Removed@contember/schema@1.3.5(transitive)
- Removed@contember/typesafe@1.3.5(transitive)