@cwqt/refract
Advanced tools
Comparing version 1.3.3 to 1.3.4
import * as Types from '../types'; | ||
declare type Model = { | ||
Mixin: (mixin: Types.Mixin) => Model; | ||
Mixin: (...mixins: Types.Mixin[]) => Model; | ||
Raw: (value: string) => Model; | ||
@@ -15,3 +15,3 @@ Relation: <T extends Types.Fields.Relation>(name: string, type: Types.Fields.Field<T>, comment?: string) => Model; | ||
constructor(name: string, comment?: string); | ||
Mixin(mixin: Types.Mixin): this; | ||
Mixin(...mixins: Types.Mixin[]): this; | ||
Raw(value: string): this; | ||
@@ -18,0 +18,0 @@ Relation<T extends Types.Fields.Relation>(name: string, type: Types.Fields.Field<T>, comment?: string): this; |
@@ -20,4 +20,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
Mixin(mixin) { | ||
this.columns.push(...mixin.columns); | ||
Mixin(...mixins) { | ||
mixins.forEach(mixin => this.columns.push(...mixin.columns)); | ||
return this; | ||
@@ -24,0 +24,0 @@ } |
@@ -9,8 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
if (config.datasource.referentialIntegrity) { | ||
if (!config.generators.some(g => g.previewFeatures.includes('referentialIntegrity'))) | ||
if (!config.generators.some(g => g.previewFeatures?.includes('referentialIntegrity'))) | ||
throw new Error("Must have a generator with the 'referentialIntegrity' preview feature enabled to use referential integrity in the datasource"); | ||
} | ||
if (config.datasource.provider == 'mysql') { | ||
if (config.generators.some(g => g.previewFeatures.includes('fullTextSearch') && | ||
!g.previewFeatures.includes('fullTextIndex'))) | ||
if (config.generators.some(g => g.previewFeatures?.includes('fullTextSearch') && | ||
!g.previewFeatures?.includes('fullTextIndex'))) | ||
throw new Error('MySQL Users must include both fullTextSearch & fullTextIndex in the preview features.'); | ||
@@ -17,0 +17,0 @@ } |
{ | ||
"name": "@cwqt/refract", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "Generate Prisma from TypeScript", | ||
@@ -5,0 +5,0 @@ "author": "cwqt", |
130045