File tree Expand file tree Collapse file tree 6 files changed +23
-9
lines changed
Expand file tree Collapse file tree 6 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -45,3 +45,4 @@ const clientBuildOptions = {
4545await build ( { ...nodeBuildOptions , entryPoints : [ "./src/sh.ts" ] , outfile : "./dist/sh.js" } ) ;
4646await build ( { ...nodeBuildOptions , entryPoints : [ "./src/generator.ts" ] , outfile : "./dist/generator.js" } ) ;
4747await build ( { ...clientBuildOptions , entryPoints : [ "./src/index.ts" ] , outfile : "./dist/index.js" } ) ;
48+ await build ( { ...clientBuildOptions , entryPoints : [ "./src/acl.ts" ] , outfile : "./dist/acl.js" } ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @povio/openapi-codegen-cli" ,
3- "version" : " 2.0.0" ,
3+ "version" : " 2.0.1-rc. 0" ,
44 "main" : " ./dist/index.js" ,
55 "types" : " ./dist/index.d.ts" ,
66 "exports" : {
1313 "types" : " ./dist/generator.d.ts" ,
1414 "import" : " ./dist/generator.js" ,
1515 "require" : " ./dist/generator.js"
16+ },
17+ "./acl" : {
18+ "types" : " ./dist/acl.d.ts" ,
19+ "import" : " ./dist/acl.js" ,
20+ "require" : " ./dist/acl.js"
1621 }
1722 },
1823 "bin" : {
6469 "react" : " ^19.1.0" ,
6570 "zod" : " ^4.1.12"
6671 },
72+ "peerDependenciesMeta" : {
73+ "@casl/ability" : {
74+ "optional" : true
75+ },
76+ "@casl/react" : {
77+ "optional" : true
78+ }
79+ },
6780 "devDependencies" : {
6881 "@apidevtools/swagger-parser" : " ^10.1.0" ,
6982 "@casl/ability" : " ^6.7.3" ,
Original file line number Diff line number Diff line change 1+ // ACL exports - requires @casl/ability and @casl/react peer dependencies
2+ export { AbilityContext } from "./lib/acl/ability.context" ;
3+ export { createAclGuard } from "./lib/acl/AclGuard" ;
4+ export { Can } from "./lib/acl/Can" ;
5+ export type { AppAbilities , AppAbility } from "./lib/acl/appAbility.types" ;
Original file line number Diff line number Diff line change 11import { GenerateFile , Import } from "src/generators/types/generate" ;
2- import { PACKAGE_IMPORT_PATH } from "./package.const" ;
2+ import { ACL_PACKAGE_IMPORT_PATH , PACKAGE_IMPORT_PATH } from "./package.const" ;
33
44export const APP_REST_CLIENT_NAME = "AppRestClient" ;
55export const APP_REST_CLIENT_FILE : GenerateFile = { fileName : "app-rest-client" , extension : "ts" } ;
@@ -23,7 +23,7 @@ export const ERROR_HANDLING_IMPORT: Import = {
2323export const ABILITY_CONTEXT = "AbilityContext" ;
2424export const ABILITY_CONTEXT_IMPORT : Import = {
2525 bindings : [ ABILITY_CONTEXT ] ,
26- from : PACKAGE_IMPORT_PATH ,
26+ from : ACL_PACKAGE_IMPORT_PATH ,
2727} ;
2828export const BUILDERS_UTILS = {
2929 dynamicInputs : "dynamicInputs" ,
Original file line number Diff line number Diff line change 11export const PACKAGE_IMPORT_PATH = "@povio/openapi-codegen-cli" ;
2+ export const ACL_PACKAGE_IMPORT_PATH = "@povio/openapi-codegen-cli/acl" ;
Original file line number Diff line number Diff line change @@ -24,9 +24,3 @@ export { OpenApiQueryConfig } from "./lib/config/queryConfig.context";
2424export { AuthContext } from "./lib/auth/auth.context" ;
2525export { AuthGuard } from "./lib/auth/AuthGuard" ;
2626export type { AuthGuardProps } from "./lib/auth/AuthGuard" ;
27-
28- // ACL
29- export { AbilityContext } from "./lib/acl/ability.context" ;
30- export { createAclGuard } from "./lib/acl/AclGuard" ;
31- export { Can } from "./lib/acl/Can" ;
32- export type { AppAbilities , AppAbility } from "./lib/acl/appAbility.types" ;
You can’t perform that action at this time.
0 commit comments