bb-relay 0.0.23 → 0.0.25

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/api.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as FileContent, b as FileStat, C as CopyArg, F as FolderContent, G as GitFileStatus } from './FileStat-CmS6lR3e.mjs';
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
2
  import { P as Project } from './Project-B7IjpqOJ.mjs';
3
3
  import { C as Commit } from './Commit-PdsjrKSG.mjs';
4
4
  import './PROJECT_CATEGORY-BivLHtB6.mjs';
@@ -63,262 +63,212 @@ type BBEvent = {
63
63
 
64
64
  type FileRequests = {
65
65
  "file:read": {
66
- args: {
66
+ arg: {
67
67
  path: string;
68
68
  type?: FileContent["type"];
69
69
  };
70
70
  response: FileContent;
71
71
  };
72
72
  "file:delete": {
73
- args: {
73
+ arg: {
74
74
  path: string;
75
75
  };
76
76
  response: null;
77
77
  };
78
78
  "file:write": {
79
- args: FileContent;
79
+ arg: FileContent;
80
80
  response: null;
81
81
  };
82
82
  "file:list": {
83
- args: {
83
+ /**
84
+ * Without path, it will return all the files in the project
85
+ */
86
+ arg: {
84
87
  glob?: string;
88
+ path?: string;
85
89
  } | null;
86
90
  response: string[];
87
91
  };
88
92
  "file:stat": {
89
- args: {
93
+ arg: {
90
94
  path: string;
91
95
  };
92
96
  response: FileStat;
93
97
  };
94
98
  "file:copy": {
95
- args: CopyArg;
99
+ arg: CopyArg;
96
100
  response: null;
97
101
  };
98
102
  "file:select": {
99
- args: {
103
+ arg: {
100
104
  path: string;
101
105
  };
102
106
  response: null;
103
107
  };
104
108
  };
105
109
 
106
- type FolderStat = {
107
- name: string;
108
- fullPath: string;
109
- createdAt: string;
110
- modifiedAt: string;
111
- size: number;
112
- fileCount: number;
113
- folderCount: number;
114
- };
115
-
116
110
  type FolderRequest = {
117
111
  "folder:read": {
118
- args: {
112
+ arg: {
119
113
  path: string;
120
114
  };
121
115
  response: FolderContent;
122
116
  };
123
117
  "folder:create": {
124
- args: {
118
+ arg: {
125
119
  path: string;
126
120
  };
127
121
  response: null;
128
122
  };
129
123
  "folder:delete": {
130
- args: {
124
+ arg: {
131
125
  path: string;
132
126
  };
133
127
  response: null;
134
128
  };
135
129
  "folder:stat": {
136
- args: {
130
+ arg: {
137
131
  path: string;
138
132
  };
139
133
  response: FolderStat;
140
134
  };
141
135
  "folder:copy": {
142
- args: CopyArg;
136
+ arg: CopyArg;
143
137
  response: null;
144
138
  };
145
139
  "folder:select": {
146
- args: {
140
+ arg: {
147
141
  path: string;
148
142
  };
149
143
  response: null;
150
144
  };
151
145
  };
152
146
 
153
- type StorageRequests = {
154
- "storage:set-item": {
155
- args: {
156
- key: string;
157
- value: string;
158
- };
159
- response: null;
160
- };
161
- "storage:get-item": {
162
- args: {
163
- key: string;
164
- };
165
- response: string;
166
- };
167
- "storage:remove-item": {
168
- args: {
169
- key: string;
170
- };
171
- response: null;
172
- };
173
- "storage:clear": {
174
- args: null;
175
- response: null;
176
- };
177
- "storage:key": {
178
- args: {
179
- index: number;
180
- };
181
- response: string[];
182
- };
183
- "storage:length": {
184
- args: null;
185
- response: string[];
186
- };
187
- "storage:sync": {
188
- args: {
189
- [key: string]: string;
190
- };
191
- response: {
192
- [key: string]: string;
193
- };
194
- };
195
- "storage:load": {
196
- args: null;
197
- response: {
198
- [key: string]: string;
199
- };
200
- };
201
- };
202
-
203
147
  type ProjectRequest = {
204
148
  "project:update": {
205
- args: Project["update"];
149
+ arg: Project["update"];
206
150
  response: null;
207
151
  };
208
152
  "project:read": {
209
- args: null;
153
+ arg: null;
210
154
  response: Project["doc"];
211
155
  };
212
156
  };
213
157
 
214
158
  type AppRequest = {
215
159
  "app:ping": {
216
- args: null;
217
- response: "pong";
160
+ arg: {
161
+ message: string;
162
+ params: unknown;
163
+ };
164
+ response: unknown;
218
165
  };
166
+ /**
167
+ * To get the supported version of the app (plugin) e.g. if it's in version 2
168
+ */
219
169
  "app:version": {
220
- args: null;
170
+ arg: null;
221
171
  response: string;
222
172
  };
223
173
  "app:language": {
224
- args: null;
174
+ arg: null;
225
175
  response: string[];
226
176
  };
227
177
  "app:icon": {
228
- args: {
178
+ arg: {
229
179
  extensionId: string;
230
180
  isFolder?: boolean;
231
181
  };
232
182
  response: string;
233
183
  };
234
184
  "app:styles": {
235
- args: null;
185
+ arg: null;
236
186
  response: string;
237
187
  };
238
188
  "app:theme": {
239
- args: null;
189
+ arg: null;
240
190
  response: "light" | "dark";
241
191
  };
242
192
  };
243
193
 
244
194
  type GitRequests = {
245
195
  "git:init": {
246
- args: null;
196
+ arg: null;
247
197
  response: null;
248
198
  };
249
199
  "git:stage": {
250
- args: {
200
+ arg: {
251
201
  path: string;
252
202
  };
253
203
  response: null;
254
204
  };
255
205
  "git:unstage": {
256
- args: {
206
+ arg: {
257
207
  path: string;
258
208
  };
259
209
  response: null;
260
210
  };
261
211
  "git:stage-all": {
262
- args: null;
212
+ arg: null;
263
213
  response: null;
264
214
  };
265
215
  "git:unstage-all": {
266
- args: null;
216
+ arg: null;
267
217
  response: null;
268
218
  };
269
219
  "git:commit": {
270
- args: {
220
+ arg: {
271
221
  message: string;
272
222
  };
273
223
  response: null;
274
224
  };
275
225
  "git:checkout": {
276
- args: {
226
+ arg: {
277
227
  ref: string;
278
228
  };
279
229
  response: null;
280
230
  };
281
231
  "git:discard": {
282
- args: {
232
+ arg: {
283
233
  path: string;
284
234
  };
285
235
  response: null;
286
236
  };
287
237
  "git:discard-all": {
288
- args: null;
238
+ arg: null;
289
239
  response: null;
290
240
  };
291
241
  "git:log": {
292
- args: null;
242
+ arg: null;
293
243
  response: Commit[];
294
244
  };
295
245
  "git:diff": {
296
- args: {
246
+ arg: {
297
247
  path: string;
298
248
  };
299
249
  response: null;
300
250
  };
301
251
  "git:push": {
302
- args: null;
252
+ arg: null;
303
253
  response: null;
304
254
  };
305
255
  "git:pull": {
306
- args: null;
256
+ arg: null;
307
257
  response: null;
308
258
  };
309
259
  "git:status": {
310
- args: {
260
+ arg: {
311
261
  path: string;
312
262
  };
313
263
  response: GitFileStatus;
314
264
  };
315
265
  "git:status-list": {
316
- args: null;
266
+ arg: null;
317
267
  response: GitFileStatus[];
318
268
  };
319
269
  };
320
270
 
321
- type BBRequest = FileRequests & FolderRequest & StorageRequests & ProjectRequest & AppRequest & GitRequests;
271
+ type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & FetchRequest;
322
272
 
323
273
  type EventParam<K extends keyof BBEvent> = {
324
274
  id: string;
@@ -336,7 +286,7 @@ interface EventReturn<K extends keyof BBEvent> {
336
286
  type RequestParam<K extends keyof BBRequest> = {
337
287
  id: string;
338
288
  type: K;
339
- arg: BBRequest[K]["args"];
289
+ arg: BBRequest[K]["arg"];
340
290
  source: "request";
341
291
  };
342
292
 
@@ -344,7 +294,6 @@ interface RequestReturn<K extends keyof BBRequest> {
344
294
  id: string;
345
295
  type: K;
346
296
  response: BBRequest[K]["response"] | null;
347
- error: null | string;
348
297
  responseId: string;
349
298
  }
350
299
 
package/dist/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as FileContent, b as FileStat, C as CopyArg, F as FolderContent, G as GitFileStatus } from './FileStat-CmS6lR3e.js';
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
2
  import { P as Project } from './Project-B_Vppjgw.js';
3
3
  import { C as Commit } from './Commit-PdsjrKSG.js';
4
4
  import './PROJECT_CATEGORY-BivLHtB6.js';
@@ -63,262 +63,212 @@ type BBEvent = {
63
63
 
64
64
  type FileRequests = {
65
65
  "file:read": {
66
- args: {
66
+ arg: {
67
67
  path: string;
68
68
  type?: FileContent["type"];
69
69
  };
70
70
  response: FileContent;
71
71
  };
72
72
  "file:delete": {
73
- args: {
73
+ arg: {
74
74
  path: string;
75
75
  };
76
76
  response: null;
77
77
  };
78
78
  "file:write": {
79
- args: FileContent;
79
+ arg: FileContent;
80
80
  response: null;
81
81
  };
82
82
  "file:list": {
83
- args: {
83
+ /**
84
+ * Without path, it will return all the files in the project
85
+ */
86
+ arg: {
84
87
  glob?: string;
88
+ path?: string;
85
89
  } | null;
86
90
  response: string[];
87
91
  };
88
92
  "file:stat": {
89
- args: {
93
+ arg: {
90
94
  path: string;
91
95
  };
92
96
  response: FileStat;
93
97
  };
94
98
  "file:copy": {
95
- args: CopyArg;
99
+ arg: CopyArg;
96
100
  response: null;
97
101
  };
98
102
  "file:select": {
99
- args: {
103
+ arg: {
100
104
  path: string;
101
105
  };
102
106
  response: null;
103
107
  };
104
108
  };
105
109
 
106
- type FolderStat = {
107
- name: string;
108
- fullPath: string;
109
- createdAt: string;
110
- modifiedAt: string;
111
- size: number;
112
- fileCount: number;
113
- folderCount: number;
114
- };
115
-
116
110
  type FolderRequest = {
117
111
  "folder:read": {
118
- args: {
112
+ arg: {
119
113
  path: string;
120
114
  };
121
115
  response: FolderContent;
122
116
  };
123
117
  "folder:create": {
124
- args: {
118
+ arg: {
125
119
  path: string;
126
120
  };
127
121
  response: null;
128
122
  };
129
123
  "folder:delete": {
130
- args: {
124
+ arg: {
131
125
  path: string;
132
126
  };
133
127
  response: null;
134
128
  };
135
129
  "folder:stat": {
136
- args: {
130
+ arg: {
137
131
  path: string;
138
132
  };
139
133
  response: FolderStat;
140
134
  };
141
135
  "folder:copy": {
142
- args: CopyArg;
136
+ arg: CopyArg;
143
137
  response: null;
144
138
  };
145
139
  "folder:select": {
146
- args: {
140
+ arg: {
147
141
  path: string;
148
142
  };
149
143
  response: null;
150
144
  };
151
145
  };
152
146
 
153
- type StorageRequests = {
154
- "storage:set-item": {
155
- args: {
156
- key: string;
157
- value: string;
158
- };
159
- response: null;
160
- };
161
- "storage:get-item": {
162
- args: {
163
- key: string;
164
- };
165
- response: string;
166
- };
167
- "storage:remove-item": {
168
- args: {
169
- key: string;
170
- };
171
- response: null;
172
- };
173
- "storage:clear": {
174
- args: null;
175
- response: null;
176
- };
177
- "storage:key": {
178
- args: {
179
- index: number;
180
- };
181
- response: string[];
182
- };
183
- "storage:length": {
184
- args: null;
185
- response: string[];
186
- };
187
- "storage:sync": {
188
- args: {
189
- [key: string]: string;
190
- };
191
- response: {
192
- [key: string]: string;
193
- };
194
- };
195
- "storage:load": {
196
- args: null;
197
- response: {
198
- [key: string]: string;
199
- };
200
- };
201
- };
202
-
203
147
  type ProjectRequest = {
204
148
  "project:update": {
205
- args: Project["update"];
149
+ arg: Project["update"];
206
150
  response: null;
207
151
  };
208
152
  "project:read": {
209
- args: null;
153
+ arg: null;
210
154
  response: Project["doc"];
211
155
  };
212
156
  };
213
157
 
214
158
  type AppRequest = {
215
159
  "app:ping": {
216
- args: null;
217
- response: "pong";
160
+ arg: {
161
+ message: string;
162
+ params: unknown;
163
+ };
164
+ response: unknown;
218
165
  };
166
+ /**
167
+ * To get the supported version of the app (plugin) e.g. if it's in version 2
168
+ */
219
169
  "app:version": {
220
- args: null;
170
+ arg: null;
221
171
  response: string;
222
172
  };
223
173
  "app:language": {
224
- args: null;
174
+ arg: null;
225
175
  response: string[];
226
176
  };
227
177
  "app:icon": {
228
- args: {
178
+ arg: {
229
179
  extensionId: string;
230
180
  isFolder?: boolean;
231
181
  };
232
182
  response: string;
233
183
  };
234
184
  "app:styles": {
235
- args: null;
185
+ arg: null;
236
186
  response: string;
237
187
  };
238
188
  "app:theme": {
239
- args: null;
189
+ arg: null;
240
190
  response: "light" | "dark";
241
191
  };
242
192
  };
243
193
 
244
194
  type GitRequests = {
245
195
  "git:init": {
246
- args: null;
196
+ arg: null;
247
197
  response: null;
248
198
  };
249
199
  "git:stage": {
250
- args: {
200
+ arg: {
251
201
  path: string;
252
202
  };
253
203
  response: null;
254
204
  };
255
205
  "git:unstage": {
256
- args: {
206
+ arg: {
257
207
  path: string;
258
208
  };
259
209
  response: null;
260
210
  };
261
211
  "git:stage-all": {
262
- args: null;
212
+ arg: null;
263
213
  response: null;
264
214
  };
265
215
  "git:unstage-all": {
266
- args: null;
216
+ arg: null;
267
217
  response: null;
268
218
  };
269
219
  "git:commit": {
270
- args: {
220
+ arg: {
271
221
  message: string;
272
222
  };
273
223
  response: null;
274
224
  };
275
225
  "git:checkout": {
276
- args: {
226
+ arg: {
277
227
  ref: string;
278
228
  };
279
229
  response: null;
280
230
  };
281
231
  "git:discard": {
282
- args: {
232
+ arg: {
283
233
  path: string;
284
234
  };
285
235
  response: null;
286
236
  };
287
237
  "git:discard-all": {
288
- args: null;
238
+ arg: null;
289
239
  response: null;
290
240
  };
291
241
  "git:log": {
292
- args: null;
242
+ arg: null;
293
243
  response: Commit[];
294
244
  };
295
245
  "git:diff": {
296
- args: {
246
+ arg: {
297
247
  path: string;
298
248
  };
299
249
  response: null;
300
250
  };
301
251
  "git:push": {
302
- args: null;
252
+ arg: null;
303
253
  response: null;
304
254
  };
305
255
  "git:pull": {
306
- args: null;
256
+ arg: null;
307
257
  response: null;
308
258
  };
309
259
  "git:status": {
310
- args: {
260
+ arg: {
311
261
  path: string;
312
262
  };
313
263
  response: GitFileStatus;
314
264
  };
315
265
  "git:status-list": {
316
- args: null;
266
+ arg: null;
317
267
  response: GitFileStatus[];
318
268
  };
319
269
  };
320
270
 
321
- type BBRequest = FileRequests & FolderRequest & StorageRequests & ProjectRequest & AppRequest & GitRequests;
271
+ type BBRequest = FileRequests & FolderRequest & ProjectRequest & AppRequest & GitRequests & FetchRequest;
322
272
 
323
273
  type EventParam<K extends keyof BBEvent> = {
324
274
  id: string;
@@ -336,7 +286,7 @@ interface EventReturn<K extends keyof BBEvent> {
336
286
  type RequestParam<K extends keyof BBRequest> = {
337
287
  id: string;
338
288
  type: K;
339
- arg: BBRequest[K]["args"];
289
+ arg: BBRequest[K]["arg"];
340
290
  source: "request";
341
291
  };
342
292
 
@@ -344,7 +294,6 @@ interface RequestReturn<K extends keyof BBRequest> {
344
294
  id: string;
345
295
  type: K;
346
296
  response: BBRequest[K]["response"] | null;
347
- error: null | string;
348
297
  responseId: string;
349
298
  }
350
299
 
package/dist/editor.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { C as Commit } from './Commit-PdsjrKSG.mjs';
2
- export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, G as GitFileStatus } from './FileStat-CmS6lR3e.mjs';
2
+ export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, c as FolderStat, G as GitFileStatus, I as IPCResponse } from './fetch-BFabLq7k.mjs';
3
3
  import { L as Language, a as Locale } from './Locale-WvQQn-Rm.mjs';
4
4
  export { R as Result } from './Result-BLbZLEgX.mjs';
5
5
 
@@ -38,6 +38,6 @@ interface TutorialHeader {
38
38
  body: string;
39
39
  }
40
40
 
41
- type WatchFSEvent = "updated" | "deleted";
41
+ type WatchFSEvent = "updated" | "deleted" | "updated" | "add";
42
42
 
43
43
  export type { IconArg, MenuContent, Nav, Route, Settings, TutorialHeader, WatchFSEvent };
package/dist/editor.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { C as Commit } from './Commit-PdsjrKSG.js';
2
- export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, G as GitFileStatus } from './FileStat-CmS6lR3e.js';
2
+ export { C as CopyArg, a as FileContent, b as FileStat, F as FolderContent, c as FolderStat, G as GitFileStatus, I as IPCResponse } from './fetch-BFabLq7k.js';
3
3
  import { L as Language, a as Locale } from './Locale-WvQQn-Rm.js';
4
4
  export { R as Result } from './Result-BLbZLEgX.js';
5
5
 
@@ -38,6 +38,6 @@ interface TutorialHeader {
38
38
  body: string;
39
39
  }
40
40
 
41
- type WatchFSEvent = "updated" | "deleted";
41
+ type WatchFSEvent = "updated" | "deleted" | "updated" | "add";
42
42
 
43
43
  export type { IconArg, MenuContent, Nav, Route, Settings, TutorialHeader, WatchFSEvent };