spiral / roadrunner-bridge

🌉 RoadRunner bridge to Spiral Framework
https://spiral.dev/docs/packages-roadrunner-bridge
MIT License
13 stars 6 forks source link

Add generatedPath and servicesBasePath to GRPC config #48

Closed meekstellar closed 1 year ago

meekstellar commented 1 year ago

Add new parameters for GRPC сonfig:

By default path and namespace options are auto in grpc:generate command. Defined values from config will be used in auto mode, by default.

return [
    /**
     * Path, where generated DTO files put.
     * Default: null
     */
    'generatedPath' => directory('root') . '/generated',

    /**
     * Base namespace for generated proto files.
     * Default: null
     */
    'namespace' => '\GRPC',

    /**
     * Root path for all proto files in which imports will be searched.
     * Default: null
     */
    'servicesBasePath' => directory('root') . '/proto',
];
codecov[bot] commented 1 year ago

Codecov Report

Base: 88.42% // Head: 89.14% // Increases project coverage by +0.72% :tada:

Coverage data is based on head (17de674) compared to base (a66341b). Patch coverage: 83.72% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 2.0 #48 +/- ## ============================================ + Coverage 88.42% 89.14% +0.72% - Complexity 223 272 +49 ============================================ Files 45 55 +10 Lines 570 682 +112 ============================================ + Hits 504 608 +104 - Misses 66 74 +8 ``` | [Impacted Files](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral) | Coverage Δ | | |---|---|---| | [src/Bootloader/GRPCBootloader.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0Jvb3Rsb2FkZXIvR1JQQ0Jvb3Rsb2FkZXIucGhw) | `76.19% <ø> (ø)` | | | [src/Console/Command/GRPC/GenerateCommand.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0NvbnNvbGUvQ29tbWFuZC9HUlBDL0dlbmVyYXRlQ29tbWFuZC5waHA=) | `62.79% <54.54%> (-4.78%)` | :arrow_down: | | [src/GRPC/CommandExecutor.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0dSUEMvQ29tbWFuZEV4ZWN1dG9yLnBocA==) | `80.00% <80.00%> (ø)` | | | [src/GRPC/ProtocCommandBuilder.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0dSUEMvUHJvdG9jQ29tbWFuZEJ1aWxkZXIucGhw) | `94.44% <94.44%> (ø)` | | | [src/Config/GRPCConfig.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0NvbmZpZy9HUlBDQ29uZmlnLnBocA==) | `100.00% <100.00%> (ø)` | | | [src/GRPC/ProtoCompiler.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0dSUEMvUHJvdG9Db21waWxlci5waHA=) | `92.30% <100.00%> (+0.20%)` | :arrow_up: | | [src/FailbackDispatcher.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0ZhaWxiYWNrRGlzcGF0Y2hlci5waHA=) | `84.61% <0.00%> (-6.30%)` | :arrow_down: | | [src/RoadRunnerMode.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL1JvYWRSdW5uZXJNb2RlLnBocA==) | `100.00% <0.00%> (ø)` | | | [src/Config/TcpConfig.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0NvbmZpZy9UY3BDb25maWcucGhw) | `100.00% <0.00%> (ø)` | | | [src/Bootloader/CentrifugoBootloader.php](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral#diff-c3JjL0Jvb3Rsb2FkZXIvQ2VudHJpZnVnb0Jvb3Rsb2FkZXIucGhw) | `100.00% <0.00%> (ø)` | | | ... and [7 more](https://codecov.io/gh/spiral/roadrunner-bridge/pull/48/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spiral)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

butschster commented 1 year ago

@kastahov Could you add some description with examples of usage?