New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cwqt/refract

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cwqt/refract - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

dist/public/fields.d.ts

@@ -12,5 +12,5 @@ import * as Types from '../types';

};
export declare const Fields: (...fields: string[]) => {
Refs: (...references: string[]) => (model: Types.Blocks.Model) => Relation;
export declare const Pk: (...fields: string[]) => {
Fk: (...references: string[]) => (model: Types.Blocks.Model) => Relation;
};
export declare const ManyToOne: <M extends Types.Blocks.Model>(model: M, relation: (m: M) => Relation, ...modifiers: Types.Modifier<'ManyToOne'>[]) => Types.Fields.Field<'ManyToOne'>;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ManyToOne = exports.Fields = exports.OneToMany = exports.DateTime = exports.Boolean = exports.Varchar = exports.Int = exports.Enum = void 0;
exports.ManyToOne = exports.Pk = exports.OneToMany = exports.DateTime = exports.Boolean = exports.Varchar = exports.Int = exports.Enum = void 0;
const enum_1 = require("./enum");

@@ -19,5 +19,5 @@ const Enum = (name, keys) => new enum_1.Enum(name, keys);

exports.OneToMany = OneToMany;
const Fields = (...fields) => {
const Pk = (...fields) => {
return {
Refs: (...references) => {
Fk: (...references) => {
return (model) => {

@@ -32,3 +32,3 @@ const missing = fields.filter(r => !model.columns.map(c => c.name).includes(r));

};
exports.Fields = Fields;
exports.Pk = Pk;
const ManyToOne = (model, relation, ...modifiers) => {

@@ -35,0 +35,0 @@ const { fields, references } = relation(model);

import * as Types from '../types';
export declare const Model: (name: string) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: (mixin: Types.Mixin) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: (value: string) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: (name: string, type: Types.Fields.Field<Types.Fields.Primitive>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Field: (name: string, type: Types.Fields.Field<Types.Fields.Primitive>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Raw: (value: string) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: (name: string, type: Types.Fields.Field<Types.Fields.Primitive>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Field: (name: string, type: Types.Fields.Field<Types.Fields.Primitive>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => {
name: string;
type: "model";
columns: Types.Column<keyof Types.TypeData>[];
Mixin: any;
Raw: any;
Field: any;
Relation: any;
};
};
declare type Model = {
Mixin: (mixin: Types.Mixin) => Model;
Raw: (value: string) => Model;
Relation: (name: string, type: Types.Fields.Field<Types.Fields.Relation>) => Model;
Field: (name: string, type: Types.Fields.Field<Types.Fields.Primitive>) => Model;
} & Types.Blocks.Model;
export declare const Model: (name: string) => Model;
export {};
{
"name": "@cwqt/refract",
"version": "1.0.1",
"version": "1.0.2",
"description": "A TypeScript CDK for Prisma",

@@ -5,0 +5,0 @@ "author": "cwqt",

@@ -8,3 +8,4 @@ # refract

// Create refract.ts (see below example)
# First create a refract.ts file (see below example)
# Then to generate the Prisma schema
npx ts-node refract.ts

@@ -28,3 +29,2 @@ ```

// prettier-ignore
User

@@ -38,3 +38,2 @@ .Field("id", Int(Index, Default("autoincrement()")))

// prettier-ignore
Post

@@ -70,3 +69,3 @@ .Field("id", Int(Index, Default("autoincrement()")))

provider: 'prisma-client-js',
previewFeatures: ['interactiveTransactions'],
previewFeatures: ['referentialIntegrity'],
engineType: 'library',

@@ -73,0 +72,0 @@ binaryTargets: ['native'],

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