blob: 442dd3f8449dd9743545667c5f09c9ff6bdbe2f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
package Api;
smol Loader {
jsx = 1;
js = 2;
ts = 3;
tsx = 4;
css = 5;
file = 6;
json = 7;
}
smol ResolveMode {
disable = 1;
lazy = 2;
dev = 3;
bundle = 4;
}
smol Platform {
browser = 1;
node = 2;
}
smol JSXRuntime {
automatic = 1;
classic = 2;
}
struct JSX {
string factory;
JSXRuntime runtime;
string fragment;
bool development;
// Probably react
string import_source;
bool react_fast_refresh;
}
message TransformOptions {
JSX jsx = 1;
string tsconfig_override = 2;
ResolveMode resolve = 3;
string public_url = 4;
string absolute_working_dir = 5;
string[] define_keys = 6;
string[] define_values = 7;
bool preserve_symlinks = 8;
string[] entry_points = 9;
bool write = 10;
string[] inject = 11;
string output_dir = 12;
string[] external = 13;
string[] loader_keys = 14;
Loader[] loader_values = 15;
string[] main_fields = 16;
Platform platform = 17;
}
struct FileHandle {
string path;
uint size;
uint fd;
}
message Transform {
FileHandle handle = 1;
string path = 2;
byte[] contents = 3;
Loader loader = 4;
TransformOptions options = 5;
}
enum TransformResponseStatus {
success = 1;
fail = 2;
}
struct OutputFile {
byte[] data;
string path;
}
struct TransformResponse {
TransformResponseStatus status;
OutputFile[] files;
Message[] errors;
}
enum MessageKind {
err = 1;
warn =2;
note = 3;
debug = 4;
}
struct Location {
string file;
string namespace;
int32 line;
int32 column;
string line_text;
string suggestion;
uint offset;
}
message MessageData {
string text = 1;
Location location = 2;
}
struct Message {
MessageKind kind;
MessageData data;
MessageData[] notes;
}
struct Log {
uint32 warnings;
uint32 errors;
Message[] msgs;
}
|