@teambit/ipc-events 1.0.512 → 1.0.513

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/ipc-events@1.0.512" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/ipc-events@1.0.513" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -0,0 +1,1305 @@
1
+ {
2
+ "__schema": "APISchema",
3
+ "location": {
4
+ "filePath": "index.ts",
5
+ "line": 1,
6
+ "character": 1
7
+ },
8
+ "module": {
9
+ "__schema": "ModuleSchema",
10
+ "location": {
11
+ "filePath": "index.ts",
12
+ "line": 1,
13
+ "character": 1
14
+ },
15
+ "exports": [
16
+ {
17
+ "__schema": "ExportSchema",
18
+ "location": {
19
+ "filePath": "index.ts",
20
+ "line": 3,
21
+ "character": 15
22
+ },
23
+ "signature": "class IpcEventsMain",
24
+ "name": "IpcEventsMain",
25
+ "exportNode": {
26
+ "__schema": "ClassSchema",
27
+ "location": {
28
+ "filePath": "ipc-events.main.runtime.ts",
29
+ "line": 32,
30
+ "character": 1
31
+ },
32
+ "doc": {
33
+ "__schema": "DocSchema",
34
+ "location": {
35
+ "filePath": "ipc-events.main.runtime.ts",
36
+ "line": 17,
37
+ "character": 1
38
+ },
39
+ "raw": "/**\n * imagine you have multiple processes running in the background, such as `bit watch`, `bit start`, `bit server`.\n * the user is running `bit install` from the cli, how do you let these processes know that the installation is complete?\n * `bit start` for instance could use ths info to clear the \"component issues\" of the components that were missing packages.\n *\n * this class provides a mechanism to achieve this by writing the event into the filesystem (`.bit/events/event-name`),\n * while each one of the processes has a watcher in the background watch this file. once they got the data from the watcher,\n * they can act upon it.\n *\n * in the previous example, when the user is running `bit install`, the install aspect runs `this.publishIpcEvent` to\n * write `.bit/events/onPostInstall` to the filesystem. then, the watcher of `bit start` process got a notification\n * that this file has changed/added and it runs `triggerGotEvent` to run all aspects registered to its gotEventSlot.\n * the installer in turn is registered to this slot and once its function is triggered, it check whether the eventName\n * is onPostInstall and then triggers its own OnPostInstall slot.\n */",
40
+ "comment": "imagine you have multiple processes running in the background, such as `bit watch`, `bit start`, `bit server`.\nthe user is running `bit install` from the cli, how do you let these processes know that the installation is complete?\n`bit start` for instance could use ths info to clear the \"component issues\" of the components that were missing packages.\n\nthis class provides a mechanism to achieve this by writing the event into the filesystem (`.bit/events/event-name`),\nwhile each one of the processes has a watcher in the background watch this file. once they got the data from the watcher,\nthey can act upon it.\n\nin the previous example, when the user is running `bit install`, the install aspect runs `this.publishIpcEvent` to\nwrite `.bit/events/onPostInstall` to the filesystem. then, the watcher of `bit start` process got a notification\nthat this file has changed/added and it runs `triggerGotEvent` to run all aspects registered to its gotEventSlot.\nthe installer in turn is registered to this slot and once its function is triggered, it check whether the eventName\nis onPostInstall and then triggers its own OnPostInstall slot.",
41
+ "tags": []
42
+ },
43
+ "signature": "class IpcEventsMain",
44
+ "name": "IpcEventsMain",
45
+ "members": [
46
+ {
47
+ "__schema": "ConstructorSchema",
48
+ "location": {
49
+ "filePath": "ipc-events.main.runtime.ts",
50
+ "line": 33,
51
+ "character": 3
52
+ },
53
+ "signature": "constructor IpcEventsMain(scope: ScopeMain, gotEventSlot: GotEventSlot, logger: Logger): IpcEventsMain",
54
+ "name": "constructor",
55
+ "params": [
56
+ {
57
+ "__schema": "ParameterSchema",
58
+ "location": {
59
+ "filePath": "ipc-events.main.runtime.ts",
60
+ "line": 34,
61
+ "character": 5
62
+ },
63
+ "name": "scope",
64
+ "type": {
65
+ "__schema": "TypeRefSchema",
66
+ "location": {
67
+ "filePath": "ipc-events.main.runtime.ts",
68
+ "line": 34,
69
+ "character": 20
70
+ },
71
+ "name": "ScopeMain"
72
+ },
73
+ "isOptional": false,
74
+ "isSpread": false
75
+ },
76
+ {
77
+ "__schema": "ParameterSchema",
78
+ "location": {
79
+ "filePath": "ipc-events.main.runtime.ts",
80
+ "line": 35,
81
+ "character": 5
82
+ },
83
+ "name": "gotEventSlot",
84
+ "type": {
85
+ "__schema": "TypeRefSchema",
86
+ "location": {
87
+ "filePath": "ipc-events.main.runtime.ts",
88
+ "line": 35,
89
+ "character": 27
90
+ },
91
+ "name": "GotEventSlot"
92
+ },
93
+ "isOptional": false,
94
+ "isSpread": false
95
+ },
96
+ {
97
+ "__schema": "ParameterSchema",
98
+ "location": {
99
+ "filePath": "ipc-events.main.runtime.ts",
100
+ "line": 36,
101
+ "character": 5
102
+ },
103
+ "name": "logger",
104
+ "type": {
105
+ "__schema": "TypeRefSchema",
106
+ "location": {
107
+ "filePath": "ipc-events.main.runtime.ts",
108
+ "line": 36,
109
+ "character": 21
110
+ },
111
+ "name": "Logger"
112
+ },
113
+ "isOptional": false,
114
+ "isSpread": false
115
+ }
116
+ ],
117
+ "returnType": {
118
+ "__schema": "ThisTypeSchema",
119
+ "location": {
120
+ "filePath": "ipc-events.main.runtime.ts",
121
+ "line": 32,
122
+ "character": 1
123
+ },
124
+ "name": "IpcEventsMain"
125
+ },
126
+ "modifiers": []
127
+ },
128
+ {
129
+ "__schema": "FunctionLikeSchema",
130
+ "location": {
131
+ "filePath": "ipc-events.main.runtime.ts",
132
+ "line": 39,
133
+ "character": 3
134
+ },
135
+ "signature": "(method) IpcEventsMain.registerGotEventSlot(fn: GotEvent): void",
136
+ "name": "registerGotEventSlot",
137
+ "params": [
138
+ {
139
+ "__schema": "ParameterSchema",
140
+ "location": {
141
+ "filePath": "ipc-events.main.runtime.ts",
142
+ "line": 39,
143
+ "character": 24
144
+ },
145
+ "name": "fn",
146
+ "type": {
147
+ "__schema": "TypeRefSchema",
148
+ "location": {
149
+ "filePath": "ipc-events.main.runtime.ts",
150
+ "line": 39,
151
+ "character": 28
152
+ },
153
+ "name": "GotEvent"
154
+ },
155
+ "isOptional": false,
156
+ "isSpread": false
157
+ }
158
+ ],
159
+ "returnType": {
160
+ "__schema": "InferenceTypeSchema",
161
+ "location": {
162
+ "filePath": "ipc-events.main.runtime.ts",
163
+ "line": 39,
164
+ "character": 3
165
+ },
166
+ "type": "void"
167
+ },
168
+ "modifiers": []
169
+ },
170
+ {
171
+ "__schema": "FunctionLikeSchema",
172
+ "location": {
173
+ "filePath": "ipc-events.main.runtime.ts",
174
+ "line": 47,
175
+ "character": 3
176
+ },
177
+ "doc": {
178
+ "__schema": "DocSchema",
179
+ "location": {
180
+ "filePath": "ipc-events.main.runtime.ts",
181
+ "line": 43,
182
+ "character": 3
183
+ },
184
+ "raw": "/**\n * this gets called from the watcher only.\n * as soon as the watcher finds out that a new event has been written to the filesystem, it triggers this function\n */",
185
+ "comment": "this gets called from the watcher only.\nas soon as the watcher finds out that a new event has been written to the filesystem, it triggers this function",
186
+ "tags": []
187
+ },
188
+ "signature": "(method) IpcEventsMain.triggerGotEvent(eventName: EventName): Promise<void>",
189
+ "name": "triggerGotEvent",
190
+ "params": [
191
+ {
192
+ "__schema": "ParameterSchema",
193
+ "location": {
194
+ "filePath": "ipc-events.main.runtime.ts",
195
+ "line": 47,
196
+ "character": 25
197
+ },
198
+ "name": "eventName",
199
+ "type": {
200
+ "__schema": "TypeRefSchema",
201
+ "location": {
202
+ "filePath": "ipc-events.main.runtime.ts",
203
+ "line": 47,
204
+ "character": 36
205
+ },
206
+ "name": "EventName"
207
+ },
208
+ "isOptional": false,
209
+ "isSpread": false
210
+ }
211
+ ],
212
+ "returnType": {
213
+ "__schema": "InferenceTypeSchema",
214
+ "location": {
215
+ "filePath": "ipc-events.main.runtime.ts",
216
+ "line": 47,
217
+ "character": 3
218
+ },
219
+ "type": "Promise<void>"
220
+ },
221
+ "modifiers": [
222
+ "async"
223
+ ]
224
+ },
225
+ {
226
+ "__schema": "FunctionLikeSchema",
227
+ "location": {
228
+ "filePath": "ipc-events.main.runtime.ts",
229
+ "line": 56,
230
+ "character": 3
231
+ },
232
+ "doc": {
233
+ "__schema": "DocSchema",
234
+ "location": {
235
+ "filePath": "ipc-events.main.runtime.ts",
236
+ "line": 52,
237
+ "character": 3
238
+ },
239
+ "raw": "/**\n * write event data into the filesystem, so then other processes, such as \"bit start\", \"bit watch\", could use the\n * watcher to get the event data.\n */",
240
+ "comment": "write event data into the filesystem, so then other processes, such as \"bit start\", \"bit watch\", could use the\nwatcher to get the event data.",
241
+ "tags": []
242
+ },
243
+ "signature": "(method) IpcEventsMain.publishIpcEvent(eventName: EventName, data?: Record<string, any>): Promise<void>",
244
+ "name": "publishIpcEvent",
245
+ "params": [
246
+ {
247
+ "__schema": "ParameterSchema",
248
+ "location": {
249
+ "filePath": "ipc-events.main.runtime.ts",
250
+ "line": 56,
251
+ "character": 25
252
+ },
253
+ "name": "eventName",
254
+ "type": {
255
+ "__schema": "TypeRefSchema",
256
+ "location": {
257
+ "filePath": "ipc-events.main.runtime.ts",
258
+ "line": 56,
259
+ "character": 36
260
+ },
261
+ "name": "EventName"
262
+ },
263
+ "isOptional": false,
264
+ "isSpread": false
265
+ },
266
+ {
267
+ "__schema": "ParameterSchema",
268
+ "location": {
269
+ "filePath": "ipc-events.main.runtime.ts",
270
+ "line": 56,
271
+ "character": 47
272
+ },
273
+ "name": "data",
274
+ "type": {
275
+ "__schema": "TypeRefSchema",
276
+ "location": {
277
+ "filePath": "ipc-events.main.runtime.ts",
278
+ "line": 56,
279
+ "character": 54
280
+ },
281
+ "name": "Record",
282
+ "typeArgs": [
283
+ {
284
+ "__schema": "KeywordTypeSchema",
285
+ "location": {
286
+ "filePath": "ipc-events.main.runtime.ts",
287
+ "line": 56,
288
+ "character": 61
289
+ },
290
+ "name": "string"
291
+ },
292
+ {
293
+ "__schema": "KeywordTypeSchema",
294
+ "location": {
295
+ "filePath": "ipc-events.main.runtime.ts",
296
+ "line": 56,
297
+ "character": 69
298
+ },
299
+ "name": "any"
300
+ }
301
+ ]
302
+ },
303
+ "isOptional": true,
304
+ "isSpread": false
305
+ }
306
+ ],
307
+ "returnType": {
308
+ "__schema": "InferenceTypeSchema",
309
+ "location": {
310
+ "filePath": "ipc-events.main.runtime.ts",
311
+ "line": 56,
312
+ "character": 3
313
+ },
314
+ "type": "Promise<void>"
315
+ },
316
+ "modifiers": [
317
+ "async"
318
+ ]
319
+ },
320
+ {
321
+ "__schema": "GetAccessorSchema",
322
+ "location": {
323
+ "filePath": "ipc-events.main.runtime.ts",
324
+ "line": 62,
325
+ "character": 3
326
+ },
327
+ "signature": "(getter) IpcEventsMain.eventsDir: string",
328
+ "name": "eventsDir",
329
+ "type": {
330
+ "__schema": "InferenceTypeSchema",
331
+ "location": {
332
+ "filePath": "ipc-events.main.runtime.ts",
333
+ "line": 62,
334
+ "character": 3
335
+ },
336
+ "type": "string"
337
+ }
338
+ },
339
+ {
340
+ "__schema": "VariableLikeSchema",
341
+ "location": {
342
+ "filePath": "ipc-events.main.runtime.ts",
343
+ "line": 66,
344
+ "character": 3
345
+ },
346
+ "signature": "(property) IpcEventsMain.slots: ((registerFn: () => string) => SlotRegistry<GotEventSlot>)[]",
347
+ "name": "slots",
348
+ "type": {
349
+ "__schema": "InferenceTypeSchema",
350
+ "location": {
351
+ "filePath": "ipc-events.main.runtime.ts",
352
+ "line": 66,
353
+ "character": 3
354
+ },
355
+ "type": "((registerFn: () => string) => SlotRegistry<GotEventSlot>)[]"
356
+ },
357
+ "isOptional": true,
358
+ "defaultValue": "[Slot.withType<GotEventSlot>()]"
359
+ },
360
+ {
361
+ "__schema": "VariableLikeSchema",
362
+ "location": {
363
+ "filePath": "ipc-events.main.runtime.ts",
364
+ "line": 67,
365
+ "character": 3
366
+ },
367
+ "signature": "(property) IpcEventsMain.dependencies: Aspect[]",
368
+ "name": "dependencies",
369
+ "type": {
370
+ "__schema": "InferenceTypeSchema",
371
+ "location": {
372
+ "filePath": "ipc-events.main.runtime.ts",
373
+ "line": 67,
374
+ "character": 3
375
+ },
376
+ "type": "Aspect[]"
377
+ },
378
+ "isOptional": true,
379
+ "defaultValue": "[ScopeAspect, LoggerAspect]"
380
+ },
381
+ {
382
+ "__schema": "VariableLikeSchema",
383
+ "location": {
384
+ "filePath": "ipc-events.main.runtime.ts",
385
+ "line": 68,
386
+ "character": 3
387
+ },
388
+ "signature": "(property) IpcEventsMain.runtime: RuntimeDefinition",
389
+ "name": "runtime",
390
+ "type": {
391
+ "__schema": "InferenceTypeSchema",
392
+ "location": {
393
+ "filePath": "ipc-events.main.runtime.ts",
394
+ "line": 68,
395
+ "character": 3
396
+ },
397
+ "type": "RuntimeDefinition"
398
+ },
399
+ "isOptional": true,
400
+ "defaultValue": "MainRuntime"
401
+ },
402
+ {
403
+ "__schema": "FunctionLikeSchema",
404
+ "location": {
405
+ "filePath": "ipc-events.main.runtime.ts",
406
+ "line": 70,
407
+ "character": 3
408
+ },
409
+ "signature": "(method) IpcEventsMain.provider([scope, loggerMain]: [ScopeMain, LoggerMain], _: any, [gotEventSlot]: [GotEventSlot]): Promise<IpcEventsMain>",
410
+ "name": "provider",
411
+ "params": [
412
+ {
413
+ "__schema": "ParameterSchema",
414
+ "location": {
415
+ "filePath": "ipc-events.main.runtime.ts",
416
+ "line": 70,
417
+ "character": 25
418
+ },
419
+ "name": "[ scope, loggerMain ]",
420
+ "type": {
421
+ "__schema": "TupleTypeSchema",
422
+ "location": {
423
+ "filePath": "ipc-events.main.runtime.ts",
424
+ "line": 70,
425
+ "character": 46
426
+ },
427
+ "elements": [
428
+ {
429
+ "__schema": "TypeRefSchema",
430
+ "location": {
431
+ "filePath": "ipc-events.main.runtime.ts",
432
+ "line": 70,
433
+ "character": 47
434
+ },
435
+ "name": "ScopeMain"
436
+ },
437
+ {
438
+ "__schema": "TypeRefSchema",
439
+ "location": {
440
+ "filePath": "ipc-events.main.runtime.ts",
441
+ "line": 70,
442
+ "character": 58
443
+ },
444
+ "name": "LoggerMain"
445
+ }
446
+ ]
447
+ },
448
+ "isOptional": false,
449
+ "isSpread": false
450
+ },
451
+ {
452
+ "__schema": "ParameterSchema",
453
+ "location": {
454
+ "filePath": "ipc-events.main.runtime.ts",
455
+ "line": 70,
456
+ "character": 71
457
+ },
458
+ "name": "_",
459
+ "type": {
460
+ "__schema": "InferenceTypeSchema",
461
+ "location": {
462
+ "filePath": "ipc-events.main.runtime.ts",
463
+ "line": 70,
464
+ "character": 71
465
+ },
466
+ "type": "any"
467
+ },
468
+ "isOptional": false,
469
+ "isSpread": false
470
+ },
471
+ {
472
+ "__schema": "ParameterSchema",
473
+ "location": {
474
+ "filePath": "ipc-events.main.runtime.ts",
475
+ "line": 70,
476
+ "character": 74
477
+ },
478
+ "name": "[ gotEventSlot ]",
479
+ "type": {
480
+ "__schema": "TupleTypeSchema",
481
+ "location": {
482
+ "filePath": "ipc-events.main.runtime.ts",
483
+ "line": 70,
484
+ "character": 90
485
+ },
486
+ "elements": [
487
+ {
488
+ "__schema": "TypeRefSchema",
489
+ "location": {
490
+ "filePath": "ipc-events.main.runtime.ts",
491
+ "line": 70,
492
+ "character": 91
493
+ },
494
+ "name": "GotEventSlot"
495
+ }
496
+ ]
497
+ },
498
+ "isOptional": false,
499
+ "isSpread": false
500
+ }
501
+ ],
502
+ "returnType": {
503
+ "__schema": "InferenceTypeSchema",
504
+ "location": {
505
+ "filePath": "ipc-events.main.runtime.ts",
506
+ "line": 70,
507
+ "character": 3
508
+ },
509
+ "type": "Promise<IpcEventsMain>"
510
+ },
511
+ "modifiers": [
512
+ "static",
513
+ "async"
514
+ ]
515
+ }
516
+ ],
517
+ "extendsNodes": [],
518
+ "implementNodes": []
519
+ }
520
+ },
521
+ {
522
+ "__schema": "UnImplementedSchema",
523
+ "location": {
524
+ "filePath": "index.ts",
525
+ "line": 4,
526
+ "character": 16
527
+ },
528
+ "name": "IpcEventsAspect",
529
+ "type": "Identifier"
530
+ },
531
+ {
532
+ "__schema": "ExportSchema",
533
+ "location": {
534
+ "filePath": "index.ts",
535
+ "line": 5,
536
+ "character": 10
537
+ },
538
+ "signature": "const IpcEventsAspect: Aspect",
539
+ "name": "IpcEventsAspect",
540
+ "exportNode": {
541
+ "__schema": "VariableLikeSchema",
542
+ "location": {
543
+ "filePath": "ipc-events.aspect.ts",
544
+ "line": 3,
545
+ "character": 14
546
+ },
547
+ "signature": "const IpcEventsAspect: Aspect",
548
+ "name": "IpcEventsAspect",
549
+ "type": {
550
+ "__schema": "TypeRefSchema",
551
+ "location": {
552
+ "filePath": "ipc-events.aspect.ts",
553
+ "line": 3,
554
+ "character": 14
555
+ },
556
+ "name": "Aspect",
557
+ "componentId": {
558
+ "scope": "teambit.harmony",
559
+ "name": "harmony",
560
+ "version": "0.4.6"
561
+ }
562
+ },
563
+ "isOptional": false,
564
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/ipc-events',\n})"
565
+ }
566
+ }
567
+ ],
568
+ "internals": []
569
+ },
570
+ "internals": [
571
+ {
572
+ "__schema": "ModuleSchema",
573
+ "location": {
574
+ "filePath": "ipc-events.main.runtime.ts",
575
+ "line": 1,
576
+ "character": 1
577
+ },
578
+ "exports": [
579
+ {
580
+ "__schema": "ClassSchema",
581
+ "location": {
582
+ "filePath": "ipc-events.main.runtime.ts",
583
+ "line": 32,
584
+ "character": 1
585
+ },
586
+ "doc": {
587
+ "__schema": "DocSchema",
588
+ "location": {
589
+ "filePath": "ipc-events.main.runtime.ts",
590
+ "line": 17,
591
+ "character": 1
592
+ },
593
+ "raw": "/**\n * imagine you have multiple processes running in the background, such as `bit watch`, `bit start`, `bit server`.\n * the user is running `bit install` from the cli, how do you let these processes know that the installation is complete?\n * `bit start` for instance could use ths info to clear the \"component issues\" of the components that were missing packages.\n *\n * this class provides a mechanism to achieve this by writing the event into the filesystem (`.bit/events/event-name`),\n * while each one of the processes has a watcher in the background watch this file. once they got the data from the watcher,\n * they can act upon it.\n *\n * in the previous example, when the user is running `bit install`, the install aspect runs `this.publishIpcEvent` to\n * write `.bit/events/onPostInstall` to the filesystem. then, the watcher of `bit start` process got a notification\n * that this file has changed/added and it runs `triggerGotEvent` to run all aspects registered to its gotEventSlot.\n * the installer in turn is registered to this slot and once its function is triggered, it check whether the eventName\n * is onPostInstall and then triggers its own OnPostInstall slot.\n */",
594
+ "comment": "imagine you have multiple processes running in the background, such as `bit watch`, `bit start`, `bit server`.\nthe user is running `bit install` from the cli, how do you let these processes know that the installation is complete?\n`bit start` for instance could use ths info to clear the \"component issues\" of the components that were missing packages.\n\nthis class provides a mechanism to achieve this by writing the event into the filesystem (`.bit/events/event-name`),\nwhile each one of the processes has a watcher in the background watch this file. once they got the data from the watcher,\nthey can act upon it.\n\nin the previous example, when the user is running `bit install`, the install aspect runs `this.publishIpcEvent` to\nwrite `.bit/events/onPostInstall` to the filesystem. then, the watcher of `bit start` process got a notification\nthat this file has changed/added and it runs `triggerGotEvent` to run all aspects registered to its gotEventSlot.\nthe installer in turn is registered to this slot and once its function is triggered, it check whether the eventName\nis onPostInstall and then triggers its own OnPostInstall slot.",
595
+ "tags": []
596
+ },
597
+ "signature": "class IpcEventsMain",
598
+ "name": "IpcEventsMain",
599
+ "members": [
600
+ {
601
+ "__schema": "ConstructorSchema",
602
+ "location": {
603
+ "filePath": "ipc-events.main.runtime.ts",
604
+ "line": 33,
605
+ "character": 3
606
+ },
607
+ "signature": "constructor IpcEventsMain(scope: ScopeMain, gotEventSlot: GotEventSlot, logger: Logger): IpcEventsMain",
608
+ "name": "constructor",
609
+ "params": [
610
+ {
611
+ "__schema": "ParameterSchema",
612
+ "location": {
613
+ "filePath": "ipc-events.main.runtime.ts",
614
+ "line": 34,
615
+ "character": 5
616
+ },
617
+ "name": "scope",
618
+ "type": {
619
+ "__schema": "TypeRefSchema",
620
+ "location": {
621
+ "filePath": "ipc-events.main.runtime.ts",
622
+ "line": 34,
623
+ "character": 20
624
+ },
625
+ "name": "ScopeMain"
626
+ },
627
+ "isOptional": false,
628
+ "isSpread": false
629
+ },
630
+ {
631
+ "__schema": "ParameterSchema",
632
+ "location": {
633
+ "filePath": "ipc-events.main.runtime.ts",
634
+ "line": 35,
635
+ "character": 5
636
+ },
637
+ "name": "gotEventSlot",
638
+ "type": {
639
+ "__schema": "TypeRefSchema",
640
+ "location": {
641
+ "filePath": "ipc-events.main.runtime.ts",
642
+ "line": 35,
643
+ "character": 27
644
+ },
645
+ "name": "GotEventSlot"
646
+ },
647
+ "isOptional": false,
648
+ "isSpread": false
649
+ },
650
+ {
651
+ "__schema": "ParameterSchema",
652
+ "location": {
653
+ "filePath": "ipc-events.main.runtime.ts",
654
+ "line": 36,
655
+ "character": 5
656
+ },
657
+ "name": "logger",
658
+ "type": {
659
+ "__schema": "TypeRefSchema",
660
+ "location": {
661
+ "filePath": "ipc-events.main.runtime.ts",
662
+ "line": 36,
663
+ "character": 21
664
+ },
665
+ "name": "Logger"
666
+ },
667
+ "isOptional": false,
668
+ "isSpread": false
669
+ }
670
+ ],
671
+ "returnType": {
672
+ "__schema": "ThisTypeSchema",
673
+ "location": {
674
+ "filePath": "ipc-events.main.runtime.ts",
675
+ "line": 32,
676
+ "character": 1
677
+ },
678
+ "name": "IpcEventsMain"
679
+ },
680
+ "modifiers": []
681
+ },
682
+ {
683
+ "__schema": "FunctionLikeSchema",
684
+ "location": {
685
+ "filePath": "ipc-events.main.runtime.ts",
686
+ "line": 39,
687
+ "character": 3
688
+ },
689
+ "signature": "(method) IpcEventsMain.registerGotEventSlot(fn: GotEvent): void",
690
+ "name": "registerGotEventSlot",
691
+ "params": [
692
+ {
693
+ "__schema": "ParameterSchema",
694
+ "location": {
695
+ "filePath": "ipc-events.main.runtime.ts",
696
+ "line": 39,
697
+ "character": 24
698
+ },
699
+ "name": "fn",
700
+ "type": {
701
+ "__schema": "TypeRefSchema",
702
+ "location": {
703
+ "filePath": "ipc-events.main.runtime.ts",
704
+ "line": 39,
705
+ "character": 28
706
+ },
707
+ "name": "GotEvent"
708
+ },
709
+ "isOptional": false,
710
+ "isSpread": false
711
+ }
712
+ ],
713
+ "returnType": {
714
+ "__schema": "InferenceTypeSchema",
715
+ "location": {
716
+ "filePath": "ipc-events.main.runtime.ts",
717
+ "line": 39,
718
+ "character": 3
719
+ },
720
+ "type": "void"
721
+ },
722
+ "modifiers": []
723
+ },
724
+ {
725
+ "__schema": "FunctionLikeSchema",
726
+ "location": {
727
+ "filePath": "ipc-events.main.runtime.ts",
728
+ "line": 47,
729
+ "character": 3
730
+ },
731
+ "doc": {
732
+ "__schema": "DocSchema",
733
+ "location": {
734
+ "filePath": "ipc-events.main.runtime.ts",
735
+ "line": 43,
736
+ "character": 3
737
+ },
738
+ "raw": "/**\n * this gets called from the watcher only.\n * as soon as the watcher finds out that a new event has been written to the filesystem, it triggers this function\n */",
739
+ "comment": "this gets called from the watcher only.\nas soon as the watcher finds out that a new event has been written to the filesystem, it triggers this function",
740
+ "tags": []
741
+ },
742
+ "signature": "(method) IpcEventsMain.triggerGotEvent(eventName: EventName): Promise<void>",
743
+ "name": "triggerGotEvent",
744
+ "params": [
745
+ {
746
+ "__schema": "ParameterSchema",
747
+ "location": {
748
+ "filePath": "ipc-events.main.runtime.ts",
749
+ "line": 47,
750
+ "character": 25
751
+ },
752
+ "name": "eventName",
753
+ "type": {
754
+ "__schema": "TypeRefSchema",
755
+ "location": {
756
+ "filePath": "ipc-events.main.runtime.ts",
757
+ "line": 47,
758
+ "character": 36
759
+ },
760
+ "name": "EventName"
761
+ },
762
+ "isOptional": false,
763
+ "isSpread": false
764
+ }
765
+ ],
766
+ "returnType": {
767
+ "__schema": "InferenceTypeSchema",
768
+ "location": {
769
+ "filePath": "ipc-events.main.runtime.ts",
770
+ "line": 47,
771
+ "character": 3
772
+ },
773
+ "type": "Promise<void>"
774
+ },
775
+ "modifiers": [
776
+ "async"
777
+ ]
778
+ },
779
+ {
780
+ "__schema": "FunctionLikeSchema",
781
+ "location": {
782
+ "filePath": "ipc-events.main.runtime.ts",
783
+ "line": 56,
784
+ "character": 3
785
+ },
786
+ "doc": {
787
+ "__schema": "DocSchema",
788
+ "location": {
789
+ "filePath": "ipc-events.main.runtime.ts",
790
+ "line": 52,
791
+ "character": 3
792
+ },
793
+ "raw": "/**\n * write event data into the filesystem, so then other processes, such as \"bit start\", \"bit watch\", could use the\n * watcher to get the event data.\n */",
794
+ "comment": "write event data into the filesystem, so then other processes, such as \"bit start\", \"bit watch\", could use the\nwatcher to get the event data.",
795
+ "tags": []
796
+ },
797
+ "signature": "(method) IpcEventsMain.publishIpcEvent(eventName: EventName, data?: Record<string, any>): Promise<void>",
798
+ "name": "publishIpcEvent",
799
+ "params": [
800
+ {
801
+ "__schema": "ParameterSchema",
802
+ "location": {
803
+ "filePath": "ipc-events.main.runtime.ts",
804
+ "line": 56,
805
+ "character": 25
806
+ },
807
+ "name": "eventName",
808
+ "type": {
809
+ "__schema": "TypeRefSchema",
810
+ "location": {
811
+ "filePath": "ipc-events.main.runtime.ts",
812
+ "line": 56,
813
+ "character": 36
814
+ },
815
+ "name": "EventName"
816
+ },
817
+ "isOptional": false,
818
+ "isSpread": false
819
+ },
820
+ {
821
+ "__schema": "ParameterSchema",
822
+ "location": {
823
+ "filePath": "ipc-events.main.runtime.ts",
824
+ "line": 56,
825
+ "character": 47
826
+ },
827
+ "name": "data",
828
+ "type": {
829
+ "__schema": "TypeRefSchema",
830
+ "location": {
831
+ "filePath": "ipc-events.main.runtime.ts",
832
+ "line": 56,
833
+ "character": 54
834
+ },
835
+ "name": "Record",
836
+ "typeArgs": [
837
+ {
838
+ "__schema": "KeywordTypeSchema",
839
+ "location": {
840
+ "filePath": "ipc-events.main.runtime.ts",
841
+ "line": 56,
842
+ "character": 61
843
+ },
844
+ "name": "string"
845
+ },
846
+ {
847
+ "__schema": "KeywordTypeSchema",
848
+ "location": {
849
+ "filePath": "ipc-events.main.runtime.ts",
850
+ "line": 56,
851
+ "character": 69
852
+ },
853
+ "name": "any"
854
+ }
855
+ ]
856
+ },
857
+ "isOptional": true,
858
+ "isSpread": false
859
+ }
860
+ ],
861
+ "returnType": {
862
+ "__schema": "InferenceTypeSchema",
863
+ "location": {
864
+ "filePath": "ipc-events.main.runtime.ts",
865
+ "line": 56,
866
+ "character": 3
867
+ },
868
+ "type": "Promise<void>"
869
+ },
870
+ "modifiers": [
871
+ "async"
872
+ ]
873
+ },
874
+ {
875
+ "__schema": "GetAccessorSchema",
876
+ "location": {
877
+ "filePath": "ipc-events.main.runtime.ts",
878
+ "line": 62,
879
+ "character": 3
880
+ },
881
+ "signature": "(getter) IpcEventsMain.eventsDir: string",
882
+ "name": "eventsDir",
883
+ "type": {
884
+ "__schema": "InferenceTypeSchema",
885
+ "location": {
886
+ "filePath": "ipc-events.main.runtime.ts",
887
+ "line": 62,
888
+ "character": 3
889
+ },
890
+ "type": "string"
891
+ }
892
+ },
893
+ {
894
+ "__schema": "VariableLikeSchema",
895
+ "location": {
896
+ "filePath": "ipc-events.main.runtime.ts",
897
+ "line": 66,
898
+ "character": 3
899
+ },
900
+ "signature": "(property) IpcEventsMain.slots: ((registerFn: () => string) => SlotRegistry<GotEventSlot>)[]",
901
+ "name": "slots",
902
+ "type": {
903
+ "__schema": "InferenceTypeSchema",
904
+ "location": {
905
+ "filePath": "ipc-events.main.runtime.ts",
906
+ "line": 66,
907
+ "character": 3
908
+ },
909
+ "type": "((registerFn: () => string) => SlotRegistry<GotEventSlot>)[]"
910
+ },
911
+ "isOptional": true,
912
+ "defaultValue": "[Slot.withType<GotEventSlot>()]"
913
+ },
914
+ {
915
+ "__schema": "VariableLikeSchema",
916
+ "location": {
917
+ "filePath": "ipc-events.main.runtime.ts",
918
+ "line": 67,
919
+ "character": 3
920
+ },
921
+ "signature": "(property) IpcEventsMain.dependencies: Aspect[]",
922
+ "name": "dependencies",
923
+ "type": {
924
+ "__schema": "InferenceTypeSchema",
925
+ "location": {
926
+ "filePath": "ipc-events.main.runtime.ts",
927
+ "line": 67,
928
+ "character": 3
929
+ },
930
+ "type": "Aspect[]"
931
+ },
932
+ "isOptional": true,
933
+ "defaultValue": "[ScopeAspect, LoggerAspect]"
934
+ },
935
+ {
936
+ "__schema": "VariableLikeSchema",
937
+ "location": {
938
+ "filePath": "ipc-events.main.runtime.ts",
939
+ "line": 68,
940
+ "character": 3
941
+ },
942
+ "signature": "(property) IpcEventsMain.runtime: RuntimeDefinition",
943
+ "name": "runtime",
944
+ "type": {
945
+ "__schema": "InferenceTypeSchema",
946
+ "location": {
947
+ "filePath": "ipc-events.main.runtime.ts",
948
+ "line": 68,
949
+ "character": 3
950
+ },
951
+ "type": "RuntimeDefinition"
952
+ },
953
+ "isOptional": true,
954
+ "defaultValue": "MainRuntime"
955
+ },
956
+ {
957
+ "__schema": "FunctionLikeSchema",
958
+ "location": {
959
+ "filePath": "ipc-events.main.runtime.ts",
960
+ "line": 70,
961
+ "character": 3
962
+ },
963
+ "signature": "(method) IpcEventsMain.provider([scope, loggerMain]: [ScopeMain, LoggerMain], _: any, [gotEventSlot]: [GotEventSlot]): Promise<IpcEventsMain>",
964
+ "name": "provider",
965
+ "params": [
966
+ {
967
+ "__schema": "ParameterSchema",
968
+ "location": {
969
+ "filePath": "ipc-events.main.runtime.ts",
970
+ "line": 70,
971
+ "character": 25
972
+ },
973
+ "name": "[ scope, loggerMain ]",
974
+ "type": {
975
+ "__schema": "TupleTypeSchema",
976
+ "location": {
977
+ "filePath": "ipc-events.main.runtime.ts",
978
+ "line": 70,
979
+ "character": 46
980
+ },
981
+ "elements": [
982
+ {
983
+ "__schema": "TypeRefSchema",
984
+ "location": {
985
+ "filePath": "ipc-events.main.runtime.ts",
986
+ "line": 70,
987
+ "character": 47
988
+ },
989
+ "name": "ScopeMain"
990
+ },
991
+ {
992
+ "__schema": "TypeRefSchema",
993
+ "location": {
994
+ "filePath": "ipc-events.main.runtime.ts",
995
+ "line": 70,
996
+ "character": 58
997
+ },
998
+ "name": "LoggerMain"
999
+ }
1000
+ ]
1001
+ },
1002
+ "isOptional": false,
1003
+ "isSpread": false
1004
+ },
1005
+ {
1006
+ "__schema": "ParameterSchema",
1007
+ "location": {
1008
+ "filePath": "ipc-events.main.runtime.ts",
1009
+ "line": 70,
1010
+ "character": 71
1011
+ },
1012
+ "name": "_",
1013
+ "type": {
1014
+ "__schema": "InferenceTypeSchema",
1015
+ "location": {
1016
+ "filePath": "ipc-events.main.runtime.ts",
1017
+ "line": 70,
1018
+ "character": 71
1019
+ },
1020
+ "type": "any"
1021
+ },
1022
+ "isOptional": false,
1023
+ "isSpread": false
1024
+ },
1025
+ {
1026
+ "__schema": "ParameterSchema",
1027
+ "location": {
1028
+ "filePath": "ipc-events.main.runtime.ts",
1029
+ "line": 70,
1030
+ "character": 74
1031
+ },
1032
+ "name": "[ gotEventSlot ]",
1033
+ "type": {
1034
+ "__schema": "TupleTypeSchema",
1035
+ "location": {
1036
+ "filePath": "ipc-events.main.runtime.ts",
1037
+ "line": 70,
1038
+ "character": 90
1039
+ },
1040
+ "elements": [
1041
+ {
1042
+ "__schema": "TypeRefSchema",
1043
+ "location": {
1044
+ "filePath": "ipc-events.main.runtime.ts",
1045
+ "line": 70,
1046
+ "character": 91
1047
+ },
1048
+ "name": "GotEventSlot"
1049
+ }
1050
+ ]
1051
+ },
1052
+ "isOptional": false,
1053
+ "isSpread": false
1054
+ }
1055
+ ],
1056
+ "returnType": {
1057
+ "__schema": "InferenceTypeSchema",
1058
+ "location": {
1059
+ "filePath": "ipc-events.main.runtime.ts",
1060
+ "line": 70,
1061
+ "character": 3
1062
+ },
1063
+ "type": "Promise<IpcEventsMain>"
1064
+ },
1065
+ "modifiers": [
1066
+ "static",
1067
+ "async"
1068
+ ]
1069
+ }
1070
+ ],
1071
+ "extendsNodes": [],
1072
+ "implementNodes": []
1073
+ },
1074
+ {
1075
+ "__schema": "UnImplementedSchema",
1076
+ "location": {
1077
+ "filePath": "ipc-events.main.runtime.ts",
1078
+ "line": 95,
1079
+ "character": 16
1080
+ },
1081
+ "name": "IpcEventsMain",
1082
+ "type": "Identifier"
1083
+ }
1084
+ ],
1085
+ "internals": [
1086
+ {
1087
+ "__schema": "TypeSchema",
1088
+ "location": {
1089
+ "filePath": "ipc-events.main.runtime.ts",
1090
+ "line": 10,
1091
+ "character": 1
1092
+ },
1093
+ "signature": "type EventName = \"onPostInstall\" | \"onPostObjectsPersist\"",
1094
+ "name": "EventName",
1095
+ "type": {
1096
+ "__schema": "TypeUnionSchema",
1097
+ "location": {
1098
+ "filePath": "ipc-events.main.runtime.ts",
1099
+ "line": 10,
1100
+ "character": 18
1101
+ },
1102
+ "types": [
1103
+ {
1104
+ "__schema": "LiteralTypeSchema",
1105
+ "location": {
1106
+ "filePath": "ipc-events.main.runtime.ts",
1107
+ "line": 10,
1108
+ "character": 18
1109
+ },
1110
+ "name": "'onPostInstall'"
1111
+ },
1112
+ {
1113
+ "__schema": "LiteralTypeSchema",
1114
+ "location": {
1115
+ "filePath": "ipc-events.main.runtime.ts",
1116
+ "line": 10,
1117
+ "character": 36
1118
+ },
1119
+ "name": "'onPostObjectsPersist'"
1120
+ }
1121
+ ]
1122
+ }
1123
+ },
1124
+ {
1125
+ "__schema": "TypeSchema",
1126
+ "location": {
1127
+ "filePath": "ipc-events.main.runtime.ts",
1128
+ "line": 12,
1129
+ "character": 1
1130
+ },
1131
+ "signature": "type GotEvent = (eventName: EventName) => Promise<void>",
1132
+ "name": "GotEvent",
1133
+ "type": {
1134
+ "__schema": "FunctionLikeSchema",
1135
+ "location": {
1136
+ "filePath": "ipc-events.main.runtime.ts",
1137
+ "line": 12,
1138
+ "character": 17
1139
+ },
1140
+ "signature": "(eventName: EventName): Promise<void>",
1141
+ "name": "",
1142
+ "params": [
1143
+ {
1144
+ "__schema": "ParameterSchema",
1145
+ "location": {
1146
+ "filePath": "ipc-events.main.runtime.ts",
1147
+ "line": 12,
1148
+ "character": 18
1149
+ },
1150
+ "name": "eventName",
1151
+ "type": {
1152
+ "__schema": "TypeRefSchema",
1153
+ "location": {
1154
+ "filePath": "ipc-events.main.runtime.ts",
1155
+ "line": 12,
1156
+ "character": 29
1157
+ },
1158
+ "name": "EventName"
1159
+ },
1160
+ "isOptional": false,
1161
+ "isSpread": false
1162
+ }
1163
+ ],
1164
+ "returnType": {
1165
+ "__schema": "TypeRefSchema",
1166
+ "location": {
1167
+ "filePath": "ipc-events.main.runtime.ts",
1168
+ "line": 12,
1169
+ "character": 43
1170
+ },
1171
+ "name": "Promise",
1172
+ "typeArgs": [
1173
+ {
1174
+ "__schema": "KeywordTypeSchema",
1175
+ "location": {
1176
+ "filePath": "ipc-events.main.runtime.ts",
1177
+ "line": 12,
1178
+ "character": 51
1179
+ },
1180
+ "name": "void"
1181
+ }
1182
+ ]
1183
+ },
1184
+ "modifiers": []
1185
+ }
1186
+ },
1187
+ {
1188
+ "__schema": "TypeSchema",
1189
+ "location": {
1190
+ "filePath": "ipc-events.main.runtime.ts",
1191
+ "line": 13,
1192
+ "character": 1
1193
+ },
1194
+ "signature": "type GotEventSlot = SlotRegistry<GotEvent>",
1195
+ "name": "GotEventSlot",
1196
+ "type": {
1197
+ "__schema": "TypeRefSchema",
1198
+ "location": {
1199
+ "filePath": "ipc-events.main.runtime.ts",
1200
+ "line": 13,
1201
+ "character": 21
1202
+ },
1203
+ "name": "SlotRegistry",
1204
+ "typeArgs": [
1205
+ {
1206
+ "__schema": "TypeRefSchema",
1207
+ "location": {
1208
+ "filePath": "ipc-events.main.runtime.ts",
1209
+ "line": 13,
1210
+ "character": 34
1211
+ },
1212
+ "name": "GotEvent"
1213
+ }
1214
+ ]
1215
+ }
1216
+ },
1217
+ {
1218
+ "__schema": "ModuleSchema",
1219
+ "location": {
1220
+ "filePath": "ipc-events.main.runtime.ts",
1221
+ "line": 15,
1222
+ "character": 1
1223
+ },
1224
+ "exports": [
1225
+ {
1226
+ "__schema": "VariableLikeSchema",
1227
+ "location": {
1228
+ "filePath": "ipc-events.main.runtime.ts",
1229
+ "line": 15,
1230
+ "character": 7
1231
+ },
1232
+ "signature": "const EVENTS_DIR: \"events\"",
1233
+ "name": "EVENTS_DIR",
1234
+ "type": {
1235
+ "__schema": "InferenceTypeSchema",
1236
+ "location": {
1237
+ "filePath": "ipc-events.main.runtime.ts",
1238
+ "line": 15,
1239
+ "character": 7
1240
+ },
1241
+ "type": "\"events\""
1242
+ },
1243
+ "isOptional": false,
1244
+ "defaultValue": "'events'"
1245
+ }
1246
+ ],
1247
+ "internals": []
1248
+ },
1249
+ {
1250
+ "__schema": "UnImplementedSchema",
1251
+ "location": {
1252
+ "filePath": "ipc-events.main.runtime.ts",
1253
+ "line": 93,
1254
+ "character": 1
1255
+ },
1256
+ "name": "IpcEventsAspect.addRuntime(IpcEventsMain);",
1257
+ "type": "ExpressionStatement"
1258
+ }
1259
+ ]
1260
+ },
1261
+ {
1262
+ "__schema": "ModuleSchema",
1263
+ "location": {
1264
+ "filePath": "ipc-events.aspect.ts",
1265
+ "line": 1,
1266
+ "character": 1
1267
+ },
1268
+ "exports": [
1269
+ {
1270
+ "__schema": "VariableLikeSchema",
1271
+ "location": {
1272
+ "filePath": "ipc-events.aspect.ts",
1273
+ "line": 3,
1274
+ "character": 14
1275
+ },
1276
+ "signature": "const IpcEventsAspect: Aspect",
1277
+ "name": "IpcEventsAspect",
1278
+ "type": {
1279
+ "__schema": "TypeRefSchema",
1280
+ "location": {
1281
+ "filePath": "ipc-events.aspect.ts",
1282
+ "line": 3,
1283
+ "character": 14
1284
+ },
1285
+ "name": "Aspect",
1286
+ "componentId": {
1287
+ "scope": "teambit.harmony",
1288
+ "name": "harmony",
1289
+ "version": "0.4.6"
1290
+ }
1291
+ },
1292
+ "isOptional": false,
1293
+ "defaultValue": "Aspect.create({\n id: 'teambit.harmony/ipc-events',\n})"
1294
+ }
1295
+ ],
1296
+ "internals": []
1297
+ }
1298
+ ],
1299
+ "componentId": {
1300
+ "scope": "teambit.harmony",
1301
+ "name": "ipc-events",
1302
+ "version": "1.0.513"
1303
+ },
1304
+ "taggedModuleExports": []
1305
+ }
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@teambit/ipc-events",
3
- "version": "1.0.512",
3
+ "version": "1.0.513",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/ipc-events",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "ipc-events",
9
- "version": "1.0.512"
9
+ "version": "1.0.513"
10
10
  },
11
11
  "dependencies": {
12
12
  "fs-extra": "10.0.0",
13
13
  "p-map-series": "2.1.0",
14
14
  "@teambit/harmony": "0.4.6",
15
- "@teambit/cli": "0.0.1089",
16
- "@teambit/logger": "0.0.1182",
17
- "@teambit/scope": "1.0.512"
15
+ "@teambit/cli": "0.0.1090",
16
+ "@teambit/logger": "0.0.1183",
17
+ "@teambit/scope": "1.0.513"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/fs-extra": "9.0.7",