Skip to content

Commit c3ef80b

Browse files
Update build script for protobuf
1 parent 3fb188d commit c3ef80b

27 files changed

+426
-408
lines changed

application/apps/protocol/binding/proto/Cargo.lock

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

application/apps/protocol/binding/proto/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ fn main() {
1919
})
2020
.collect();
2121
let binding = prost_build::Config::new();
22+
2223
let mut cfg = binding;
2324
cfg.type_attribute(".", r#"#[derive(serde::Serialize, serde::Deserialize)]"#);
2425
for proto in protos.iter() {
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export interface AttachmentInfoList {
2-
elements: AttachmentInfo[];
3-
}
41
export interface AttachmentInfo {
52
uuid: string;
63
filepath: string;
@@ -10,3 +7,6 @@ export interface AttachmentInfo {
107
mime: string;
118
messages: number[];
129
}
10+
export interface AttachmentInfoList {
11+
elements: AttachmentInfo[];
12+
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
export interface Finished {
2+
result: Output | null;
3+
}
14
export interface StringVec {
25
values: string[];
36
}
7+
export interface Cancelled {
8+
}
49
export interface CommandOutcome {
510
outcome_oneof: OutcomeOneof | null;
611
}
7-
export interface OutcomeOneof {
8-
Finished?: Finished;
9-
Cancelled?: Cancelled;
12+
export interface Empty {
13+
}
14+
export interface Output {
15+
output_oneof: OutputOneof | null;
1016
}
1117
export interface OutputOneof {
1218
StringValue?: string;
@@ -16,13 +22,7 @@ export interface OutputOneof {
1622
Int64Value?: number;
1723
EmptyValue?: Empty;
1824
}
19-
export interface Output {
20-
output_oneof: OutputOneof | null;
21-
}
22-
export interface Cancelled {
23-
}
24-
export interface Finished {
25-
result: Output | null;
26-
}
27-
export interface Empty {
25+
export interface OutcomeOneof {
26+
Finished?: Finished;
27+
Cancelled?: Cancelled;
2828
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
export interface RangeInclusive {
2-
start: number;
3-
end: number;
1+
export interface RangeInclusiveList {
2+
elements: RangeInclusive[];
43
}
54
export interface Range {
65
start: number;
76
end: number;
87
}
9-
export interface RangeInclusiveList {
10-
elements: RangeInclusive[];
8+
export interface RangeInclusive {
9+
start: number;
10+
end: number;
1111
}
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
1-
export interface Unsupported {
2-
message: string;
3-
}
4-
export interface NativeError {
5-
severity: number;
6-
kind: number;
7-
message: string;
8-
}
9-
export interface InvalidArgs {
10-
message: string;
11-
}
12-
export interface Protocol {
1+
export interface Aborted {
132
message: string;
143
}
15-
export interface SessionUnavailable {
16-
}
17-
export interface InvalidData {
4+
export interface SessionCreatingFail {
185
}
19-
export interface Sde {
6+
export interface Unsupported {
207
message: string;
218
}
229
export interface SearchError {
2310
search_error_oneof: SearchErrorOneof | null;
2411
}
25-
export interface SearchIoOperation {
26-
message: string;
27-
}
28-
export interface CompCommunication {
29-
message: string;
30-
}
3112
export interface CompErrorOneof {
3213
DestinationPath?: DestinationPath;
3314
SessionCreatingFail?: SessionCreatingFail;
@@ -45,64 +26,73 @@ export interface CompErrorOneof {
4526
Grabbing?: Grabbing;
4627
Sde?: Sde;
4728
}
29+
export interface Interrupted {
30+
}
31+
export interface InvalidArgs {
32+
message: string;
33+
}
4834
import { RangeInclusive } from "./common";
4935
export interface InvalidRange {
5036
range: RangeInclusive | null;
5137
context: string;
5238
}
39+
export interface NotInitialize {
40+
}
41+
export interface SessionUnavailable {
42+
}
43+
export interface Process {
44+
message: string;
45+
}
46+
export interface NativeError {
47+
severity: number;
48+
kind: number;
49+
message: string;
50+
}
51+
export interface Input {
52+
message: string;
53+
}
54+
export interface CompCommunication {
55+
message: string;
56+
}
5357
export interface SearchCommunication {
5458
message: string;
5559
}
56-
export enum NativeErrorKind {
57-
FileNotFound,
58-
UnsupportedFileType,
59-
ComputationFailed,
60-
Configuration,
61-
Interrupted,
62-
OperationSearch,
63-
NotYetImplemented,
64-
ChannelError,
65-
Io,
66-
Grabber,
60+
export interface Sde {
61+
message: string;
6762
}
6863
export enum Severity {
6964
Warning,
7065
Error,
7166
}
72-
export interface Input {
73-
message: string;
67+
export interface DestinationPath {
7468
}
75-
export interface Interrupted {
69+
export interface ComputationError {
70+
comp_error_oneof: CompErrorOneof | null;
7671
}
77-
export interface CompIoOperation {
72+
export interface SearchConfig {
7873
message: string;
7974
}
80-
export interface SearchErrorOneof {
81-
SearchConfig?: SearchConfig;
82-
SearchCommunication?: SearchCommunication;
83-
SearchIoOperation?: SearchIoOperation;
84-
Regex?: Regex;
85-
Input?: Input;
86-
Grab?: Grab;
87-
Aborted?: Aborted;
75+
export interface SearchIoOperation {
76+
message: string;
8877
}
89-
export interface ComputationError {
90-
comp_error_oneof: CompErrorOneof | null;
78+
export interface InvalidData {
9179
}
92-
export interface GrabCommunication {
80+
export interface GrabConfig {
9381
message: string;
9482
}
95-
export interface MultipleInitCall {
83+
export interface Grab {
84+
error: GrabError | null;
9685
}
97-
export interface GrabIoOperation {
86+
export interface CompIoOperation {
9887
message: string;
9988
}
100-
export interface SearchConfig {
89+
export interface GrabIoOperation {
10190
message: string;
10291
}
103-
export interface SessionCreatingFail {
92+
export interface MultipleInitCall {
10493
}
105-
export interface DestinationPath {
94+
export interface GrabCommunication {
95+
message: string;
10696
}
10797
export interface GrabErrorOneof {
10898
GrabConfig?: GrabConfig;
@@ -113,29 +103,39 @@ export interface GrabErrorOneof {
113103
NotInitialize?: NotInitialize;
114104
Unsupported?: Unsupported;
115105
}
116-
export interface OperationNotSupported {
117-
message: string;
118-
}
119-
export interface NotInitialize {
120-
}
121-
export interface Grabbing {
122-
error: GrabError | null;
123-
}
124106
export interface GrabError {
125107
grab_error_oneof: GrabErrorOneof | null;
126108
}
127-
export interface Grab {
128-
error: GrabError | null;
109+
export interface SearchErrorOneof {
110+
SearchConfig?: SearchConfig;
111+
SearchCommunication?: SearchCommunication;
112+
SearchIoOperation?: SearchIoOperation;
113+
Regex?: Regex;
114+
Input?: Input;
115+
Grab?: Grab;
116+
Aborted?: Aborted;
129117
}
130-
export interface Aborted {
118+
export interface Regex {
131119
message: string;
132120
}
133-
export interface Process {
121+
export interface Protocol {
134122
message: string;
135123
}
136-
export interface GrabConfig {
124+
export interface OperationNotSupported {
137125
message: string;
138126
}
139-
export interface Regex {
140-
message: string;
127+
export interface Grabbing {
128+
error: GrabError | null;
129+
}
130+
export enum NativeErrorKind {
131+
FileNotFound,
132+
UnsupportedFileType,
133+
ComputationFailed,
134+
Configuration,
135+
Interrupted,
136+
OperationSearch,
137+
NotYetImplemented,
138+
ChannelError,
139+
Io,
140+
Grabber,
141141
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
export interface ValueRange {
2-
min: number;
3-
max: number;
1+
import { Ticks } from "./progress";
2+
export interface DetailOneof {
3+
Ticks?: Ticks;
4+
Notification?: Notification;
5+
Stopped?: boolean;
46
}
5-
export interface OperationDone {
6-
uuid: string;
7-
result: string;
7+
export interface SearchMapUpdated {
8+
update: string;
89
}
910
import { NativeError } from "./error";
1011
export interface EventOneof {
@@ -23,31 +24,23 @@ export interface EventOneof {
2324
OperationDone?: OperationDone;
2425
SessionDestroyed?: boolean;
2526
}
26-
import { Ticks } from "./progress";
27-
export interface DetailOneof {
28-
Ticks?: Ticks;
29-
Notification?: Notification;
30-
Stopped?: boolean;
31-
}
32-
export interface SearchMapUpdated {
33-
update: string;
27+
export interface IndexedMapUpdated {
28+
len: number;
3429
}
3530
export interface CallbackEvent {
3631
event_oneof: EventOneof | null;
3732
}
38-
export interface SearchValuesUpdated {
39-
values: Map<number, ValueRange>;
40-
}
4133
export interface ProgressDetail {
4234
detail_oneof: DetailOneof | null;
4335
}
36+
export interface OperationDone {
37+
uuid: string;
38+
result: string;
39+
}
4440
export interface OperationError {
4541
uuid: string;
4642
error: NativeError | null;
4743
}
48-
export interface IndexedMapUpdated {
49-
len: number;
50-
}
5144
export interface Notification {
5245
severity: number;
5346
content: string;
@@ -57,12 +50,19 @@ export interface SearchUpdated {
5750
found: number;
5851
stat: Map<string, number>;
5952
}
60-
export interface Progress {
61-
uuid: string;
62-
detail: ProgressDetail | null;
53+
export interface SearchValuesUpdated {
54+
values: Map<number, ValueRange>;
55+
}
56+
export interface ValueRange {
57+
min: number;
58+
max: number;
6359
}
6460
import { AttachmentInfo } from "./attachment";
6561
export interface AttachmentsUpdated {
6662
len: number;
6763
attachment: AttachmentInfo | null;
6864
}
65+
export interface Progress {
66+
uuid: string;
67+
detail: ProgressDetail | null;
68+
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
export interface GrabbedElementList {
2+
elements: GrabbedElement[];
3+
}
14
export interface GrabbedElement {
25
source_id: number;
36
content: string;
47
pos: number;
58
nature: number;
69
}
7-
export interface GrabbedElementList {
8-
elements: GrabbedElement[];
9-
}

application/apps/protocol/binding/proto/output/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export { Range } from "./common";
21
export { RangeInclusive } from "./common";
2+
export { Range } from "./common";
33
export { RangeInclusiveList } from "./common";
44
export { AttachmentInfo } from "./attachment";
55
export { AttachmentInfoList } from "./attachment";

0 commit comments

Comments
 (0)