bb-relay 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Locale-WvQQn-Rm.d.mts → Locale-D_rGwMX3.d.mts} +4 -0
- package/dist/{Locale-WvQQn-Rm.d.ts → Locale-D_rGwMX3.d.ts} +4 -0
- package/dist/RequestReturn-BgtFhYjb.d.mts +332 -0
- package/dist/RequestReturn-C5NpmrZy.d.ts +332 -0
- package/dist/api.d.mts +6 -285
- package/dist/api.d.ts +6 -285
- package/dist/editor.d.mts +1 -1
- package/dist/editor.d.ts +1 -1
- package/dist/index.d.mts +15 -19
- package/dist/index.d.ts +15 -19
- package/dist/index.js +51 -20
- package/dist/index.mjs +52 -21
- package/dist/locale.d.mts +2 -2
- package/dist/locale.d.ts +2 -2
- package/dist/locale.js +10 -2
- package/dist/locale.mjs +10 -2
- package/package.json +1 -1
- package/src/index.ts +4 -3
- package/src/locales/en-GB.ts +4 -0
- package/src/locales/fr-FR.ts +4 -0
- package/src/relay/index.ts +47 -31
- package/src/relay/postEventResponse.ts +15 -0
- package/src/relay/postRequestResponse.ts +15 -0
- package/src/types/api/BBRequest.ts +3 -1
- package/src/types/api/EventReturn.ts +1 -1
- package/src/types/api/RequestReturn.ts +2 -0
- package/src/types/editor/CopyArg.ts +3 -3
- package/src/types/requests/file/FileContent.ts +9 -9
- package/src/types/requests/folder/FolderContent.ts +4 -4
- package/src/types/requests/storage.ts +34 -0
|
@@ -129,6 +129,10 @@ declare const enGB: {
|
|
|
129
129
|
"plugins.enable.all": string;
|
|
130
130
|
"plugins.disable.all": string;
|
|
131
131
|
"plugins.install.local": string;
|
|
132
|
+
"check.all": string;
|
|
133
|
+
"uncheck.all": string;
|
|
134
|
+
"checkpoint.latest": string;
|
|
135
|
+
errors: string;
|
|
132
136
|
};
|
|
133
137
|
|
|
134
138
|
type Language = keyof typeof enGB;
|
|
@@ -129,6 +129,10 @@ declare const enGB: {
|
|
|
129
129
|
"plugins.enable.all": string;
|
|
130
130
|
"plugins.disable.all": string;
|
|
131
131
|
"plugins.install.local": string;
|
|
132
|
+
"check.all": string;
|
|
133
|
+
"uncheck.all": string;
|
|
134
|
+
"checkpoint.latest": string;
|
|
135
|
+
errors: string;
|
|
132
136
|
};
|
|
133
137
|
|
|
134
138
|
type Language = keyof typeof enGB;
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { a as FileContent, b as FileStat, C as CopyArg, F as FolderContent, c as FolderStat, G as GitFileStatus, d as FetchRequest } from './fetch-BFabLq7k.mjs';
|
|
2
|
+
import { P as Project } from './Project-B7IjpqOJ.mjs';
|
|
3
|
+
import { C as Commit } from './Commit-PdsjrKSG.mjs';
|
|
4
|
+
|
|
5
|
+
type Load = {
|
|
6
|
+
styles: string;
|
|
7
|
+
theme: "light" | "dark";
|
|
8
|
+
languages: string[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type LanguageChange = {
|
|
12
|
+
type: "language";
|
|
13
|
+
languages: string[];
|
|
14
|
+
};
|
|
15
|
+
type ThemeChange = {
|
|
16
|
+
type: "theme";
|
|
17
|
+
theme: "dark" | "light";
|
|
18
|
+
};
|
|
19
|
+
type IconChange = {
|
|
20
|
+
type: "icon";
|
|
21
|
+
};
|
|
22
|
+
type ProjectUpdate = {
|
|
23
|
+
type: "project-update";
|
|
24
|
+
project: Partial<Project["doc"]>;
|
|
25
|
+
};
|
|
26
|
+
type ProjectChange = {
|
|
27
|
+
type: "project-change";
|
|
28
|
+
project: Partial<Project["doc"]>;
|
|
29
|
+
};
|
|
30
|
+
type ProjectEmpty = {
|
|
31
|
+
type: "project-empty";
|
|
32
|
+
};
|
|
33
|
+
type BBEvent = {
|
|
34
|
+
app: {
|
|
35
|
+
response: LanguageChange | ThemeChange | IconChange;
|
|
36
|
+
};
|
|
37
|
+
load: {
|
|
38
|
+
response: Load;
|
|
39
|
+
};
|
|
40
|
+
project: {
|
|
41
|
+
response: ProjectUpdate | ProjectChange | ProjectEmpty;
|
|
42
|
+
};
|
|
43
|
+
selection: {
|
|
44
|
+
response: {
|
|
45
|
+
type: "file" | "folder";
|
|
46
|
+
path: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
token: {
|
|
50
|
+
response: string;
|
|
51
|
+
};
|
|
52
|
+
file: {
|
|
53
|
+
response: string;
|
|
54
|
+
};
|
|
55
|
+
folder: {
|
|
56
|
+
response: string;
|
|
57
|
+
};
|
|
58
|
+
editor: {
|
|
59
|
+
response: FileContent | null;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type FileRequests = {
|
|
64
|
+
"file:read": {
|
|
65
|
+
arg: {
|
|
66
|
+
path: string;
|
|
67
|
+
type?: FileContent["type"];
|
|
68
|
+
};
|
|
69
|
+
response: FileContent;
|
|
70
|
+
};
|
|
71
|
+
"file:delete": {
|
|
72
|
+
arg: {
|
|
73
|
+
path: string;
|
|
74
|
+
};
|
|
75
|
+
response: null;
|
|
76
|
+
};
|
|
77
|
+
"file:write": {
|
|
78
|
+
arg: FileContent;
|
|
79
|
+
response: null;
|
|
80
|
+
};
|
|
81
|
+
"file:list": {
|
|
82
|
+
/**
|
|
83
|
+
* Without path, it will return all the files in the project
|
|
84
|
+
*/
|
|
85
|
+
arg: {
|
|
86
|
+
glob?: string;
|
|
87
|
+
path?: string;
|
|
88
|
+
} | null;
|
|
89
|
+
response: string[];
|
|
90
|
+
};
|
|
91
|
+
"file:stat": {
|
|
92
|
+
arg: {
|
|
93
|
+
path: string;
|
|
94
|
+
};
|
|
95
|
+
response: FileStat;
|
|
96
|
+
};
|
|
97
|
+
"file:copy": {
|
|
98
|
+
arg: CopyArg;
|
|
99
|
+
response: null;
|
|
100
|
+
};
|
|
101
|
+
"file:select": {
|
|
102
|
+
arg: {
|
|
103
|
+
path: string;
|
|
104
|
+
};
|
|
105
|
+
response: null;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
type FolderRequest = {
|
|
110
|
+
"folder:read": {
|
|
111
|
+
arg: {
|
|
112
|
+
path: string;
|
|
113
|
+
};
|
|
114
|
+
response: FolderContent;
|
|
115
|
+
};
|
|
116
|
+
"folder:create": {
|
|
117
|
+
arg: {
|
|
118
|
+
path: string;
|
|
119
|
+
};
|
|
120
|
+
response: null;
|
|
121
|
+
};
|
|
122
|
+
"folder:delete": {
|
|
123
|
+
arg: {
|
|
124
|
+
path: string;
|
|
125
|
+
};
|
|
126
|
+
response: null;
|
|
127
|
+
};
|
|
128
|
+
"folder:stat": {
|
|
129
|
+
arg: {
|
|
130
|
+
path: string;
|
|
131
|
+
};
|
|
132
|
+
response: FolderStat;
|
|
133
|
+
};
|
|
134
|
+
"folder:copy": {
|
|
135
|
+
arg: CopyArg;
|
|
136
|
+
response: null;
|
|
137
|
+
};
|
|
138
|
+
"folder:select": {
|
|
139
|
+
arg: {
|
|
140
|
+
path: string;
|
|
141
|
+
};
|
|
142
|
+
response: null;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type ProjectRequest = {
|
|
147
|
+
"project:update": {
|
|
148
|
+
arg: Project["update"];
|
|
149
|
+
response: null;
|
|
150
|
+
};
|
|
151
|
+
"project:read": {
|
|
152
|
+
arg: null;
|
|
153
|
+
response: Project["doc"];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type AppRequest = {
|
|
158
|
+
"app:ping": {
|
|
159
|
+
arg: {
|
|
160
|
+
message: string;
|
|
161
|
+
params: unknown;
|
|
162
|
+
};
|
|
163
|
+
response: unknown;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* To get the supported version of the app (plugin) e.g. if it's in version 2
|
|
167
|
+
*/
|
|
168
|
+
"app:version": {
|
|
169
|
+
arg: null;
|
|
170
|
+
response: string;
|
|
171
|
+
};
|
|
172
|
+
"app:language": {
|
|
173
|
+
arg: null;
|
|
174
|
+
response: string[];
|
|
175
|
+
};
|
|
176
|
+
"app:icon": {
|
|
177
|
+
arg: {
|
|
178
|
+
extensionId: string;
|
|
179
|
+
isFolder?: boolean;
|
|
180
|
+
};
|
|
181
|
+
response: string;
|
|
182
|
+
};
|
|
183
|
+
"app:styles": {
|
|
184
|
+
arg: null;
|
|
185
|
+
response: string;
|
|
186
|
+
};
|
|
187
|
+
"app:theme": {
|
|
188
|
+
arg: null;
|
|
189
|
+
response: "light" | "dark";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
type GitRequests = {
|
|
194
|
+
"git:init": {
|
|
195
|
+
arg: null;
|
|
196
|
+
response: null;
|
|
197
|
+
};
|
|
198
|
+
"git:stage": {
|
|
199
|
+
arg: {
|
|
200
|
+
path: string;
|
|
201
|
+
};
|
|
202
|
+
response: null;
|
|
203
|
+
};
|
|
204
|
+
"git:unstage": {
|
|
205
|
+
arg: {
|
|
206
|
+
path: string;
|
|
207
|
+
};
|
|
208
|
+
response: null;
|
|
209
|
+
};
|
|
210
|
+
"git:stage-all": {
|
|
211
|
+
arg: null;
|
|
212
|
+
response: null;
|
|
213
|
+
};
|
|
214
|
+
"git:unstage-all": {
|
|
215
|
+
arg: null;
|
|
216
|
+
response: null;
|
|
217
|
+
};
|
|
218
|
+
"git:commit": {
|
|
219
|
+
arg: {
|
|
220
|
+
message: string;
|
|
221
|
+
};
|
|
222
|
+
response: null;
|
|
223
|
+
};
|
|
224
|
+
"git:checkout": {
|
|
225
|
+
arg: {
|
|
226
|
+
ref: string;
|
|
227
|
+
};
|
|
228
|
+
response: null;
|
|
229
|
+
};
|
|
230
|
+
"git:discard": {
|
|
231
|
+
arg: {
|
|
232
|
+
path: string;
|
|
233
|
+
};
|
|
234
|
+
response: null;
|
|
235
|
+
};
|
|
236
|
+
"git:discard-all": {
|
|
237
|
+
arg: null;
|
|
238
|
+
response: null;
|
|
239
|
+
};
|
|
240
|
+
"git:log": {
|
|
241
|
+
arg: null;
|
|
242
|
+
response: Commit[];
|
|
243
|
+
};
|
|
244
|
+
"git:diff": {
|
|
245
|
+
arg: {
|
|
246
|
+
path: string;
|
|
247
|
+
};
|
|
248
|
+
response: null;
|
|
249
|
+
};
|
|
250
|
+
"git:push": {
|
|
251
|
+
arg: null;
|
|
252
|
+
response: null;
|
|
253
|
+
};
|
|
254
|
+
"git:pull": {
|
|
255
|
+
arg: null;
|
|
256
|
+
response: null;
|
|
257
|
+
};
|
|
258
|
+
"git:status": {
|
|
259
|
+
arg: {
|
|
260
|
+
path: string;
|
|
261
|
+
};
|
|
262
|
+
response: GitFileStatus;
|
|
263
|
+
};
|
|
264
|
+
"git:status-list": {
|
|
265
|
+
arg: null;
|
|
266
|
+
response: GitFileStatus[];
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
type StorageRequests = {
|
|
271
|
+
"storage:getItem": {
|
|
272
|
+
arg: {
|
|
273
|
+
key: string;
|
|
274
|
+
};
|
|
275
|
+
response: unknown;
|
|
276
|
+
};
|
|
277
|
+
"storage:setItem": {
|
|
278
|
+
arg: {
|
|
279
|
+
key: string;
|
|
280
|
+
value: string;
|
|
281
|
+
};
|
|
282
|
+
response: null;
|
|
283
|
+
};
|
|
284
|
+
"storage:removeItem": {
|
|
285
|
+
arg: {
|
|
286
|
+
key: string;
|
|
287
|
+
};
|
|
288
|
+
response: null;
|
|
289
|
+
};
|
|
290
|
+
"storage:clear": {
|
|
291
|
+
arg: null;
|
|
292
|
+
response: null;
|
|
293
|
+
};
|
|
294
|
+
"storage:keys": {
|
|
295
|
+
arg: null;
|
|
296
|
+
response: string[];
|
|
297
|
+
};
|
|
298
|
+
"storage:length": {
|
|
299
|
+
arg: null;
|
|
300
|
+
response: number;
|
|
301
|
+
};
|
|
302
|
+
"storage:getAll": {
|
|
303
|
+
arg: null;
|
|
304
|
+
response: Record<string, unknown>;
|
|
305
|
+
};
|
|
306
|
+
"storage:key": {
|
|
307
|
+
arg: {
|
|
308
|
+
index: number;
|
|
309
|
+
};
|
|
310
|
+
response: string;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & FetchRequest & StorageRequests;
|
|
315
|
+
|
|
316
|
+
interface EventReturn<K extends keyof BBEvent> {
|
|
317
|
+
type: K;
|
|
318
|
+
response: BBEvent[K]["response"];
|
|
319
|
+
responseId: string;
|
|
320
|
+
source: "event";
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
interface RequestReturn<K extends keyof BBRequest> {
|
|
324
|
+
id: string;
|
|
325
|
+
type: K;
|
|
326
|
+
response: BBRequest[K]["response"] | null;
|
|
327
|
+
responseId: string;
|
|
328
|
+
source: "request";
|
|
329
|
+
error: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export type { BBEvent as B, EventReturn as E, RequestReturn as R, BBRequest as a };
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { a as FileContent, b as FileStat, C as CopyArg, F as FolderContent, c as FolderStat, G as GitFileStatus, d as FetchRequest } from './fetch-BFabLq7k.js';
|
|
2
|
+
import { P as Project } from './Project-B_Vppjgw.js';
|
|
3
|
+
import { C as Commit } from './Commit-PdsjrKSG.js';
|
|
4
|
+
|
|
5
|
+
type Load = {
|
|
6
|
+
styles: string;
|
|
7
|
+
theme: "light" | "dark";
|
|
8
|
+
languages: string[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type LanguageChange = {
|
|
12
|
+
type: "language";
|
|
13
|
+
languages: string[];
|
|
14
|
+
};
|
|
15
|
+
type ThemeChange = {
|
|
16
|
+
type: "theme";
|
|
17
|
+
theme: "dark" | "light";
|
|
18
|
+
};
|
|
19
|
+
type IconChange = {
|
|
20
|
+
type: "icon";
|
|
21
|
+
};
|
|
22
|
+
type ProjectUpdate = {
|
|
23
|
+
type: "project-update";
|
|
24
|
+
project: Partial<Project["doc"]>;
|
|
25
|
+
};
|
|
26
|
+
type ProjectChange = {
|
|
27
|
+
type: "project-change";
|
|
28
|
+
project: Partial<Project["doc"]>;
|
|
29
|
+
};
|
|
30
|
+
type ProjectEmpty = {
|
|
31
|
+
type: "project-empty";
|
|
32
|
+
};
|
|
33
|
+
type BBEvent = {
|
|
34
|
+
app: {
|
|
35
|
+
response: LanguageChange | ThemeChange | IconChange;
|
|
36
|
+
};
|
|
37
|
+
load: {
|
|
38
|
+
response: Load;
|
|
39
|
+
};
|
|
40
|
+
project: {
|
|
41
|
+
response: ProjectUpdate | ProjectChange | ProjectEmpty;
|
|
42
|
+
};
|
|
43
|
+
selection: {
|
|
44
|
+
response: {
|
|
45
|
+
type: "file" | "folder";
|
|
46
|
+
path: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
token: {
|
|
50
|
+
response: string;
|
|
51
|
+
};
|
|
52
|
+
file: {
|
|
53
|
+
response: string;
|
|
54
|
+
};
|
|
55
|
+
folder: {
|
|
56
|
+
response: string;
|
|
57
|
+
};
|
|
58
|
+
editor: {
|
|
59
|
+
response: FileContent | null;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type FileRequests = {
|
|
64
|
+
"file:read": {
|
|
65
|
+
arg: {
|
|
66
|
+
path: string;
|
|
67
|
+
type?: FileContent["type"];
|
|
68
|
+
};
|
|
69
|
+
response: FileContent;
|
|
70
|
+
};
|
|
71
|
+
"file:delete": {
|
|
72
|
+
arg: {
|
|
73
|
+
path: string;
|
|
74
|
+
};
|
|
75
|
+
response: null;
|
|
76
|
+
};
|
|
77
|
+
"file:write": {
|
|
78
|
+
arg: FileContent;
|
|
79
|
+
response: null;
|
|
80
|
+
};
|
|
81
|
+
"file:list": {
|
|
82
|
+
/**
|
|
83
|
+
* Without path, it will return all the files in the project
|
|
84
|
+
*/
|
|
85
|
+
arg: {
|
|
86
|
+
glob?: string;
|
|
87
|
+
path?: string;
|
|
88
|
+
} | null;
|
|
89
|
+
response: string[];
|
|
90
|
+
};
|
|
91
|
+
"file:stat": {
|
|
92
|
+
arg: {
|
|
93
|
+
path: string;
|
|
94
|
+
};
|
|
95
|
+
response: FileStat;
|
|
96
|
+
};
|
|
97
|
+
"file:copy": {
|
|
98
|
+
arg: CopyArg;
|
|
99
|
+
response: null;
|
|
100
|
+
};
|
|
101
|
+
"file:select": {
|
|
102
|
+
arg: {
|
|
103
|
+
path: string;
|
|
104
|
+
};
|
|
105
|
+
response: null;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
type FolderRequest = {
|
|
110
|
+
"folder:read": {
|
|
111
|
+
arg: {
|
|
112
|
+
path: string;
|
|
113
|
+
};
|
|
114
|
+
response: FolderContent;
|
|
115
|
+
};
|
|
116
|
+
"folder:create": {
|
|
117
|
+
arg: {
|
|
118
|
+
path: string;
|
|
119
|
+
};
|
|
120
|
+
response: null;
|
|
121
|
+
};
|
|
122
|
+
"folder:delete": {
|
|
123
|
+
arg: {
|
|
124
|
+
path: string;
|
|
125
|
+
};
|
|
126
|
+
response: null;
|
|
127
|
+
};
|
|
128
|
+
"folder:stat": {
|
|
129
|
+
arg: {
|
|
130
|
+
path: string;
|
|
131
|
+
};
|
|
132
|
+
response: FolderStat;
|
|
133
|
+
};
|
|
134
|
+
"folder:copy": {
|
|
135
|
+
arg: CopyArg;
|
|
136
|
+
response: null;
|
|
137
|
+
};
|
|
138
|
+
"folder:select": {
|
|
139
|
+
arg: {
|
|
140
|
+
path: string;
|
|
141
|
+
};
|
|
142
|
+
response: null;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
type ProjectRequest = {
|
|
147
|
+
"project:update": {
|
|
148
|
+
arg: Project["update"];
|
|
149
|
+
response: null;
|
|
150
|
+
};
|
|
151
|
+
"project:read": {
|
|
152
|
+
arg: null;
|
|
153
|
+
response: Project["doc"];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type AppRequest = {
|
|
158
|
+
"app:ping": {
|
|
159
|
+
arg: {
|
|
160
|
+
message: string;
|
|
161
|
+
params: unknown;
|
|
162
|
+
};
|
|
163
|
+
response: unknown;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* To get the supported version of the app (plugin) e.g. if it's in version 2
|
|
167
|
+
*/
|
|
168
|
+
"app:version": {
|
|
169
|
+
arg: null;
|
|
170
|
+
response: string;
|
|
171
|
+
};
|
|
172
|
+
"app:language": {
|
|
173
|
+
arg: null;
|
|
174
|
+
response: string[];
|
|
175
|
+
};
|
|
176
|
+
"app:icon": {
|
|
177
|
+
arg: {
|
|
178
|
+
extensionId: string;
|
|
179
|
+
isFolder?: boolean;
|
|
180
|
+
};
|
|
181
|
+
response: string;
|
|
182
|
+
};
|
|
183
|
+
"app:styles": {
|
|
184
|
+
arg: null;
|
|
185
|
+
response: string;
|
|
186
|
+
};
|
|
187
|
+
"app:theme": {
|
|
188
|
+
arg: null;
|
|
189
|
+
response: "light" | "dark";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
type GitRequests = {
|
|
194
|
+
"git:init": {
|
|
195
|
+
arg: null;
|
|
196
|
+
response: null;
|
|
197
|
+
};
|
|
198
|
+
"git:stage": {
|
|
199
|
+
arg: {
|
|
200
|
+
path: string;
|
|
201
|
+
};
|
|
202
|
+
response: null;
|
|
203
|
+
};
|
|
204
|
+
"git:unstage": {
|
|
205
|
+
arg: {
|
|
206
|
+
path: string;
|
|
207
|
+
};
|
|
208
|
+
response: null;
|
|
209
|
+
};
|
|
210
|
+
"git:stage-all": {
|
|
211
|
+
arg: null;
|
|
212
|
+
response: null;
|
|
213
|
+
};
|
|
214
|
+
"git:unstage-all": {
|
|
215
|
+
arg: null;
|
|
216
|
+
response: null;
|
|
217
|
+
};
|
|
218
|
+
"git:commit": {
|
|
219
|
+
arg: {
|
|
220
|
+
message: string;
|
|
221
|
+
};
|
|
222
|
+
response: null;
|
|
223
|
+
};
|
|
224
|
+
"git:checkout": {
|
|
225
|
+
arg: {
|
|
226
|
+
ref: string;
|
|
227
|
+
};
|
|
228
|
+
response: null;
|
|
229
|
+
};
|
|
230
|
+
"git:discard": {
|
|
231
|
+
arg: {
|
|
232
|
+
path: string;
|
|
233
|
+
};
|
|
234
|
+
response: null;
|
|
235
|
+
};
|
|
236
|
+
"git:discard-all": {
|
|
237
|
+
arg: null;
|
|
238
|
+
response: null;
|
|
239
|
+
};
|
|
240
|
+
"git:log": {
|
|
241
|
+
arg: null;
|
|
242
|
+
response: Commit[];
|
|
243
|
+
};
|
|
244
|
+
"git:diff": {
|
|
245
|
+
arg: {
|
|
246
|
+
path: string;
|
|
247
|
+
};
|
|
248
|
+
response: null;
|
|
249
|
+
};
|
|
250
|
+
"git:push": {
|
|
251
|
+
arg: null;
|
|
252
|
+
response: null;
|
|
253
|
+
};
|
|
254
|
+
"git:pull": {
|
|
255
|
+
arg: null;
|
|
256
|
+
response: null;
|
|
257
|
+
};
|
|
258
|
+
"git:status": {
|
|
259
|
+
arg: {
|
|
260
|
+
path: string;
|
|
261
|
+
};
|
|
262
|
+
response: GitFileStatus;
|
|
263
|
+
};
|
|
264
|
+
"git:status-list": {
|
|
265
|
+
arg: null;
|
|
266
|
+
response: GitFileStatus[];
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
type StorageRequests = {
|
|
271
|
+
"storage:getItem": {
|
|
272
|
+
arg: {
|
|
273
|
+
key: string;
|
|
274
|
+
};
|
|
275
|
+
response: unknown;
|
|
276
|
+
};
|
|
277
|
+
"storage:setItem": {
|
|
278
|
+
arg: {
|
|
279
|
+
key: string;
|
|
280
|
+
value: string;
|
|
281
|
+
};
|
|
282
|
+
response: null;
|
|
283
|
+
};
|
|
284
|
+
"storage:removeItem": {
|
|
285
|
+
arg: {
|
|
286
|
+
key: string;
|
|
287
|
+
};
|
|
288
|
+
response: null;
|
|
289
|
+
};
|
|
290
|
+
"storage:clear": {
|
|
291
|
+
arg: null;
|
|
292
|
+
response: null;
|
|
293
|
+
};
|
|
294
|
+
"storage:keys": {
|
|
295
|
+
arg: null;
|
|
296
|
+
response: string[];
|
|
297
|
+
};
|
|
298
|
+
"storage:length": {
|
|
299
|
+
arg: null;
|
|
300
|
+
response: number;
|
|
301
|
+
};
|
|
302
|
+
"storage:getAll": {
|
|
303
|
+
arg: null;
|
|
304
|
+
response: Record<string, unknown>;
|
|
305
|
+
};
|
|
306
|
+
"storage:key": {
|
|
307
|
+
arg: {
|
|
308
|
+
index: number;
|
|
309
|
+
};
|
|
310
|
+
response: string;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & FetchRequest & StorageRequests;
|
|
315
|
+
|
|
316
|
+
interface EventReturn<K extends keyof BBEvent> {
|
|
317
|
+
type: K;
|
|
318
|
+
response: BBEvent[K]["response"];
|
|
319
|
+
responseId: string;
|
|
320
|
+
source: "event";
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
interface RequestReturn<K extends keyof BBRequest> {
|
|
324
|
+
id: string;
|
|
325
|
+
type: K;
|
|
326
|
+
response: BBRequest[K]["response"] | null;
|
|
327
|
+
responseId: string;
|
|
328
|
+
source: "request";
|
|
329
|
+
error: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export type { BBEvent as B, EventReturn as E, RequestReturn as R, BBRequest as a };
|