Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from gRPC to HTTP #1681

Merged
merged 88 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
f5af8ca
Add schema and empty package
zltnDC Aug 11, 2023
9abecbb
Add schema definition, and resolveSchema function
zltnDC Aug 11, 2023
8bcfe72
Add dart generator
zltnDC Aug 11, 2023
a809e5e
Add simple swift message builder
zltnDC Aug 11, 2023
fce81a6
Extend schema
zltnDC Aug 11, 2023
c1ba157
Add NativeAutomator to schema
zltnDC Aug 11, 2023
4b39776
Fix schema and dart generator
zltnDC Aug 11, 2023
051250f
Add simple telegraph generator
zltnDC Aug 11, 2023
0913afb
Add list support in schema
zltnDC Aug 17, 2023
3123f5d
Add json_serializable to patrol. Add script to generate models from s…
zltnDC Aug 17, 2023
64cdc96
Add type mapping to ios generator
zltnDC Aug 17, 2023
25345b7
Add enums to ios output
zltnDC Aug 17, 2023
c6c2bc8
Add telegraph dependency
zltnDC Aug 17, 2023
70161a9
Comment PatrolAppService in contracts.proto
zltnDC Aug 18, 2023
ae36c7f
Add shelf server generator
zltnDC Aug 18, 2023
5a4ec9d
Fix url path
zltnDC Aug 18, 2023
11b6889
Migrate ios generator
zltnDC Aug 21, 2023
26d0840
Fix schema
zltnDC Aug 22, 2023
4a0496a
Migrate swift PatrolAppServiceClient
zltnDC Aug 22, 2023
ab4851f
Print address details
zltnDC Aug 22, 2023
f0359cd
Improve shelf handler
zltnDC Aug 22, 2023
63f50a0
Add dart client generation
zltnDC Aug 22, 2023
fe25e8e
Get rid of grpc on the dart side
zltnDC Aug 22, 2023
a2b671a
Migrate telegraph generator api to new style
zltnDC Aug 22, 2023
9cc9c5d
Remove grpc, migrate to new contracts
zltnDC Aug 23, 2023
3ff0978
Generate telegraph routes and handlers
zltnDC Aug 23, 2023
8b71239
Add telegraph server
zltnDC Aug 24, 2023
ad55462
Fix dart deserialization
zltnDC Aug 24, 2023
f9d4f6f
Fix app crash when using dark mode on iOS simulators
zltnDC Aug 24, 2023
aedf943
Change Swift client address
zltnDC Aug 24, 2023
127a801
Add more logs
zltnDC Aug 24, 2023
7dbfb15
Change shelf config
zltnDC Aug 24, 2023
babd1d2
Throw exception for CI logs
zltnDC Aug 24, 2023
02dce75
Fix macro
zltnDC Aug 25, 2023
c399cb5
Comment using DispatchGroup
zltnDC Aug 25, 2023
4f26b3a
Verify race condition theory
zltnDC Aug 25, 2023
950e875
Change timeouts
zltnDC Aug 25, 2023
97c224e
Downgrade http
zltnDC Aug 25, 2023
b36b435
Change dart client default timeout
zltnDC Aug 25, 2023
0dc056b
Add android contracts generation
zltnDC Aug 28, 2023
c052f9b
Fix ios client generation
zltnDC Aug 28, 2023
1583d53
Remove grpc and protobuf dependencies and contracts
zltnDC Aug 28, 2023
2c6c4e4
Add contracts generator
zltnDC Aug 28, 2023
279e42d
Add http4k server generator
zltnDC Aug 28, 2023
6d12854
Update schema
zltnDC Aug 29, 2023
22d061d
Migrate AutomatorServer and ContractsExtensions
zltnDC Aug 29, 2023
ddf551d
Update schema, migrate automator
zltnDC Aug 29, 2023
5ee8c41
Generate client and setup PatrolServer
zltnDC Aug 29, 2023
41d774e
Remove gradlewrapper
zltnDC Aug 30, 2023
9a3edb5
Fix build and runtimes problems
zltnDC Aug 30, 2023
de94685
Add generator
zltnDC Sep 5, 2023
cdf408c
Update generated client
zltnDC Sep 5, 2023
79d3887
Switch server
zltnDC Sep 5, 2023
6b1cb73
Merge branch 'master' into feature/stop-depending-on-gRPC-code-generator
zltnDC Sep 12, 2023
5689bdf
Fix errors arising from merging master to branch
zltnDC Sep 12, 2023
3c1e1be
Improve timeouts
zltnDC Sep 12, 2023
f2ed04a
Remove comments
zltnDC Sep 12, 2023
7dfea5c
Remove throws from MainActivityTest
zltnDC Sep 12, 2023
9e12135
Change android dependencies
zltnDC Sep 13, 2023
808ef97
Fix klint and swift-format issues
zltnDC Sep 13, 2023
b587fb2
Fix macro
zltnDC Sep 13, 2023
46066ee
Fix klint issues
zltnDC Sep 13, 2023
3d1cb37
Downgrade packages
zltnDC Sep 13, 2023
2f973d4
Downgrade http package
zltnDC Sep 13, 2023
b8b0594
Merge branch 'master' into feature/stop-depending-on-gRPC-code-generator
zltnDC Sep 13, 2023
5db187c
Merge branch 'develop' into feature/stop-depending-on-gRPC-code-gener…
zltnDC Sep 14, 2023
8cc4ff9
Update contracts
zltnDC Sep 14, 2023
5789630
Fix dart tests (Add equatable)
zltnDC Sep 14, 2023
6212a5a
Fix ios
zltnDC Sep 14, 2023
386c199
Fix android build errors
zltnDC Sep 14, 2023
94694dc
Fix tests
zltnDC Sep 14, 2023
ae1f78d
Fix ktlint issues in ContractsExtensions
zltnDC Sep 14, 2023
b889655
Fix dart lint issues
zltnDC Sep 14, 2023
0d0a6eb
Remove task.sleep from runDartTest
zltnDC Sep 14, 2023
98f1122
Revert change
zltnDC Sep 14, 2023
cc40e85
Merge branch 'develop' into feature/stop-depending-on-gRPC-code-gener…
zltnDC Sep 14, 2023
42a52f5
Fix pr issues
zltnDC Sep 14, 2023
e49cc22
Add simple documentation to schema
zltnDC Sep 15, 2023
13fc1f5
Add analysis_options to patrol_gen
zltnDC Sep 15, 2023
4bc2ac9
Add patrol_gen-prepare
zltnDC Sep 15, 2023
e3934e4
Fix prepare
zltnDC Sep 15, 2023
7980197
Merge branch 'develop' into feature/stop-depending-on-gRPC-code-gener…
zltnDC Sep 15, 2023
937da39
Fix swift-format
zltnDC Sep 15, 2023
2d82c88
Apply ktlint format to ContractsExtensions.kt
zltnDC Sep 15, 2023
75ca305
Downgrade dart style
zltnDC Sep 15, 2023
9e6d5d1
Downgrade analyzer
zltnDC Sep 15, 2023
2e2bba2
Revert package versions, change dartsdk
zltnDC Sep 15, 2023
3925324
Fix ktlint manually
zltnDC Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix schema and dart generator
zltnDC committed Aug 11, 2023
commit 4b3977692ea1db99a80424f24d0c8bea00ad479e
7 changes: 5 additions & 2 deletions packages/patrol_gen/lib/src/generators/dart_generator.dart
Original file line number Diff line number Diff line change
@@ -50,14 +50,17 @@ enum ${enumDefinition.name} {
.map((f) => 'final ${f.type}${f.optional ? '?' : ''} ${f.name};')
.join('\n');

final constructorParameters = message.fields
var constructorParameters = message.fields
.map((e) => '${e.optional ? '' : 'required'} this.${e.name}')
.join(',');

constructorParameters =
message.fields.isEmpty ? '' : '{$constructorParameters}';

return '''
@JsonSerializable()
class ${message.name} {
${message.name}({${constructorParameters}});
${message.name}(${constructorParameters});

$fieldsContent

29 changes: 26 additions & 3 deletions schema.dart
Original file line number Diff line number Diff line change
@@ -131,6 +131,29 @@ class PermissionDialogVisibleResponse {
bool? visible;
}

class PermissionDialogVisibleRequest {
int? timeoutMillis;
}

enum HandlePermissionRequestCode {
whileUsing,
onlyThisTime,
denied,
}

class HandlePermissionRequest {
HandlePermissionRequestCode? code;
}

enum SetLocationAccuracyRequestLocationAccuracy {
coarse,
fine,
}

class SetLocationAccuracyRequest {
SetLocationAccuracyRequestLocationAccuracy? locationAccuracy;
}

abstract class NativeAutomator<SwiftServer, DartClient> {
void initialize();
void configure(ConfigureRequest request);
@@ -172,9 +195,9 @@ abstract class NativeAutomator<SwiftServer, DartClient> {

// permissions
PermissionDialogVisibleResponse isPermissionDialogVisible(
PermissionDialogVisibleRequest);
void handlePermissionDialog(HandlePermissionRequest);
void setLocationAccuracy(SetLocationAccuracyRequest);
PermissionDialogVisibleRequest request);
void handlePermissionDialog(HandlePermissionRequest request);
void setLocationAccuracy(SetLocationAccuracyRequest request);

// other
void debug();