-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from permitio/run_command_improvements
Run Command Improvements
- Loading branch information
Showing
3 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
import React from 'react'; | ||
import { AuthProvider } from '../../components/AuthProvider.js'; | ||
import PDPCommand from '../../components/PDPCommand.js'; | ||
import { type infer as zInfer, number, object } from 'zod'; | ||
import { option } from 'pastel'; | ||
|
||
export default function Run() { | ||
export const options = object({ | ||
opa: number() | ||
.optional() | ||
.describe(option({ description: 'Expose OPA port from the PDP' })), | ||
}); | ||
|
||
type Props = { | ||
options: zInfer<typeof options>; | ||
}; | ||
|
||
export default function Run({ options: { opa } }: Props) { | ||
return ( | ||
<AuthProvider> | ||
<PDPCommand /> | ||
<PDPCommand opa={opa} /> | ||
</AuthProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters