@casl/prisma
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@casl/ability");var r=require("./runtime");const t=r.createAbilityFactory();const u=r.createAccessibleByFactory();class PrismaAbility extends e.PureAbility{constructor(t,u){super(t,Object.assign({conditionsMatcher:r.prismaQuery,fieldMatcher:e.fieldPatternMatcher},u))}}Object.defineProperty(exports,"Model",{enumerable:true,get:function(){return r.Model}});Object.defineProperty(exports,"ParsingQueryError",{enumerable:true,get:function(){return r.ParsingQueryError}});Object.defineProperty(exports,"Subjects",{enumerable:true,get:function(){return r.Subjects}});Object.defineProperty(exports,"prismaQuery",{enumerable:true,get:function(){return r.prismaQuery}});exports.PrismaAbility=PrismaAbility;exports.accessibleBy=u;exports.createPrismaAbility=t; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@casl/ability");var r=require("./runtime");const t=r.createAbilityFactory();const s=r.createAccessibleByFactory();class PrismaAbility extends e.PureAbility{constructor(t,s){super(t,Object.assign({conditionsMatcher:r.prismaQuery,fieldMatcher:e.fieldPatternMatcher},s))}}Object.defineProperty(exports,"ParsingQueryError",{enumerable:true,get:function(){return r.ParsingQueryError}});Object.defineProperty(exports,"prismaQuery",{enumerable:true,get:function(){return r.prismaQuery}});exports.PrismaAbility=PrismaAbility;exports.accessibleBy=s;exports.createPrismaAbility=t; | ||
//# sourceMappingURL=index.js.map |
import { AbilityOptions, AbilityTuple, PureAbility, RawRuleFrom } from '@casl/ability'; | ||
import { WhereInputPerModel, ModelName, PrismaQuery } from './prismaClientBoundTypes'; | ||
export type { PrismaQuery } from './prismaClientBoundTypes'; | ||
export { prismaQuery, Model, Subjects, ParsingQueryError } from './runtime'; | ||
export type { Model, Subjects } from './runtime'; | ||
export { prismaQuery, ParsingQueryError } from './runtime'; | ||
declare const createPrismaAbility: { | ||
@@ -11,4 +12,7 @@ <T extends PureAbility<any, PrismaQuery<Record<string, any> & import("@casl/ability").ForcedSubject<string>>>>(rules?: (import("@casl/ability/dist/types/types").ToAbilityTypes<T[typeof import("@casl/ability/dist/types/RuleIndex").ɵabilities]> extends infer T_1 ? T_1 extends import("@casl/ability/dist/types/types").ToAbilityTypes<T[typeof import("@casl/ability/dist/types/RuleIndex").ɵabilities]> ? T_1 extends import("@casl/ability/dist/types/types").AbilityTupleType<string, import("@casl/ability").SubjectType> ? import("@casl/ability").SubjectRawRule<T_1[0], T_1[1], T[typeof import("@casl/ability/dist/types/RuleIndex").ɵconditions]> : import("@casl/ability").ClaimRawRule<Extract<import("@casl/ability/dist/types/types").ToAbilityTypes<T[typeof import("@casl/ability/dist/types/RuleIndex").ɵabilities]>, string>> : never : never)[] | undefined, options?: import("@casl/ability").AbilityOptionsOf<T> | undefined): T; | ||
export { createPrismaAbility, accessibleBy, }; | ||
declare type ExtendedAbilityTuple<T extends AbilityTuple> = [T[0], 'all' | T[1]]; | ||
/** | ||
* Uses conditional type to support union distribution | ||
*/ | ||
declare type ExtendedAbilityTuple<T extends AbilityTuple> = T extends AbilityTuple ? [T[0], 'all' | T[1]] : never; | ||
/** | ||
* @deprecated use createPrismaAbility instead | ||
@@ -15,0 +19,0 @@ */ |
{ | ||
"name": "@casl/prisma", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Allows to query accessible records using Prisma client based on CASL rules", | ||
@@ -5,0 +5,0 @@ "main": "dist/es6c/index.js", |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
77692
150