Skip to content

Commit

Permalink
Release 0.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dennemark committed Aug 9, 2024
1 parent 16f783f commit 32bd698
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 27 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


## [0.5.4](https://github.com/dennemark/prisma-extension-casl/compare/0.5.3...0.5.4) (2024-08-09)


### Bug Fixes

* :bug: use prisma version 5.14.0 ([16f783f](https://github.com/dennemark/prisma-extension-casl/commit/16f783f35259014d210c7f45a54b130384e570c3))

## [0.5.3](https://github.com/dennemark/prisma-extension-casl/compare/0.5.2...0.5.3) (2024-08-09)


Expand Down
16 changes: 3 additions & 13 deletions dist/index.d.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
import { DynamicClientExtensionThis, InternalArgs } from '@prisma/client/runtime/library';
import { PureAbility, AbilityTuple, AbilityBuilder } from '@casl/ability';
import { PrismaQuery } from '@casl/prisma';
import { Prisma } from '@prisma/client';
import { DynamicClientExtensionThis, InternalArgs } from '@prisma/client/runtime/library';

type PrismaCaslOperation = 'create' | 'createMany' | 'createManyAndReturn' | 'upsert' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'findUnique' | 'findUniqueOrThrow' | 'aggregate' | 'count' | 'groupBy' | 'update' | 'updateMany' | 'delete' | 'deleteMany';

Expand All @@ -22,17 +23,6 @@ declare function applyCaslToQuery(operation: PrismaCaslOperation, args: any, abi
mask: undefined;
};

type CaslExtensionType = DynamicClientExtensionThis<Prisma.TypeMap<InternalArgs & {
result: {};
model: {};
query: {};
client: {};
}>, Prisma.TypeMapCb, {
result: {};
model: {};
query: {};
client: {};
}, {}>;
/**
* enrich a prisma client to check for CASL abilities even in nested queries
*
Expand All @@ -52,7 +42,7 @@ declare function useCaslAbilities(getAbilityFactory: () => AbilityBuilder<PureAb
model: {};
query: {};
client: {
$casl: () => (extendFactory: (factory: AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => CaslExtensionType;
$casl: () => (extendFactory: (factory: AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => DynamicClientExtensionThis<Prisma.TypeMap<InternalArgs & _prisma_client_runtime_library.DefaultArgs, Prisma.PrismaClientOptions>, Prisma.TypeMapCb, _prisma_client_runtime_library.DefaultArgs, {}>;
};
};
};
Expand Down
16 changes: 3 additions & 13 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
import { DynamicClientExtensionThis, InternalArgs } from '@prisma/client/runtime/library';
import { PureAbility, AbilityTuple, AbilityBuilder } from '@casl/ability';
import { PrismaQuery } from '@casl/prisma';
import { Prisma } from '@prisma/client';
import { DynamicClientExtensionThis, InternalArgs } from '@prisma/client/runtime/library';

type PrismaCaslOperation = 'create' | 'createMany' | 'createManyAndReturn' | 'upsert' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'findUnique' | 'findUniqueOrThrow' | 'aggregate' | 'count' | 'groupBy' | 'update' | 'updateMany' | 'delete' | 'deleteMany';

Expand All @@ -22,17 +23,6 @@ declare function applyCaslToQuery(operation: PrismaCaslOperation, args: any, abi
mask: undefined;
};

type CaslExtensionType = DynamicClientExtensionThis<Prisma.TypeMap<InternalArgs & {
result: {};
model: {};
query: {};
client: {};
}>, Prisma.TypeMapCb, {
result: {};
model: {};
query: {};
client: {};
}, {}>;
/**
* enrich a prisma client to check for CASL abilities even in nested queries
*
Expand All @@ -52,7 +42,7 @@ declare function useCaslAbilities(getAbilityFactory: () => AbilityBuilder<PureAb
model: {};
query: {};
client: {
$casl: () => (extendFactory: (factory: AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => CaslExtensionType;
$casl: () => (extendFactory: (factory: AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => AbilityBuilder<PureAbility<AbilityTuple, PrismaQuery>>) => DynamicClientExtensionThis<Prisma.TypeMap<InternalArgs & _prisma_client_runtime_library.DefaultArgs, Prisma.PrismaClientOptions>, Prisma.TypeMapCb, _prisma_client_runtime_library.DefaultArgs, {}>;
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prisma-extension-casl",
"version": "0.5.3",
"version": "0.5.4",
"description": "Enforce casl abilities on prisma client ",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 32bd698

Please sign in to comment.