@teambit/ipc-events 1.0.226 → 1.0.227
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/schema.json +21 -70
- package/package.json +6 -6
- package/tsconfig.json +13 -1
- package/dist/index.d.ts +0 -4
- package/dist/ipc-events.aspect.d.ts +0 -2
- package/dist/ipc-events.main.runtime.d.ts +0 -44
- /package/dist/{preview-1712632644937.js → preview-1712719054377.js} +0 -0
|
@@ -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.
|
|
3
|
+
<testsuite name="teambit.harmony/ipc-events@1.0.227" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -58,11 +58,7 @@
|
|
|
58
58
|
"line": 33,
|
|
59
59
|
"character": 30
|
|
60
60
|
},
|
|
61
|
-
"name": "ScopeMain"
|
|
62
|
-
"componentId": {
|
|
63
|
-
"scope": "teambit.scope",
|
|
64
|
-
"name": "scope"
|
|
65
|
-
}
|
|
61
|
+
"name": "ScopeMain"
|
|
66
62
|
},
|
|
67
63
|
"isOptional": false,
|
|
68
64
|
"isSpread": false
|
|
@@ -82,8 +78,7 @@
|
|
|
82
78
|
"line": 33,
|
|
83
79
|
"character": 63
|
|
84
80
|
},
|
|
85
|
-
"name": "GotEventSlot"
|
|
86
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
81
|
+
"name": "GotEventSlot"
|
|
87
82
|
},
|
|
88
83
|
"isOptional": false,
|
|
89
84
|
"isSpread": false
|
|
@@ -103,11 +98,7 @@
|
|
|
103
98
|
"line": 33,
|
|
104
99
|
"character": 93
|
|
105
100
|
},
|
|
106
|
-
"name": "Logger"
|
|
107
|
-
"componentId": {
|
|
108
|
-
"scope": "teambit.harmony",
|
|
109
|
-
"name": "logger"
|
|
110
|
-
}
|
|
101
|
+
"name": "Logger"
|
|
111
102
|
},
|
|
112
103
|
"isOptional": false,
|
|
113
104
|
"isSpread": false
|
|
@@ -149,8 +140,7 @@
|
|
|
149
140
|
"line": 35,
|
|
150
141
|
"character": 28
|
|
151
142
|
},
|
|
152
|
-
"name": "GotEvent"
|
|
153
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
143
|
+
"name": "GotEvent"
|
|
154
144
|
},
|
|
155
145
|
"isOptional": false,
|
|
156
146
|
"isSpread": false
|
|
@@ -202,8 +192,7 @@
|
|
|
202
192
|
"line": 43,
|
|
203
193
|
"character": 36
|
|
204
194
|
},
|
|
205
|
-
"name": "EventName"
|
|
206
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
195
|
+
"name": "EventName"
|
|
207
196
|
},
|
|
208
197
|
"isOptional": false,
|
|
209
198
|
"isSpread": false
|
|
@@ -257,8 +246,7 @@
|
|
|
257
246
|
"line": 52,
|
|
258
247
|
"character": 36
|
|
259
248
|
},
|
|
260
|
-
"name": "EventName"
|
|
261
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
249
|
+
"name": "EventName"
|
|
262
250
|
},
|
|
263
251
|
"isOptional": false,
|
|
264
252
|
"isSpread": false
|
|
@@ -432,11 +420,7 @@
|
|
|
432
420
|
"line": 66,
|
|
433
421
|
"character": 47
|
|
434
422
|
},
|
|
435
|
-
"name": "ScopeMain"
|
|
436
|
-
"componentId": {
|
|
437
|
-
"scope": "teambit.scope",
|
|
438
|
-
"name": "scope"
|
|
439
|
-
}
|
|
423
|
+
"name": "ScopeMain"
|
|
440
424
|
},
|
|
441
425
|
{
|
|
442
426
|
"__schema": "TypeRefSchema",
|
|
@@ -445,11 +429,7 @@
|
|
|
445
429
|
"line": 66,
|
|
446
430
|
"character": 58
|
|
447
431
|
},
|
|
448
|
-
"name": "LoggerMain"
|
|
449
|
-
"componentId": {
|
|
450
|
-
"scope": "teambit.harmony",
|
|
451
|
-
"name": "logger"
|
|
452
|
-
}
|
|
432
|
+
"name": "LoggerMain"
|
|
453
433
|
}
|
|
454
434
|
]
|
|
455
435
|
},
|
|
@@ -499,8 +479,7 @@
|
|
|
499
479
|
"line": 66,
|
|
500
480
|
"character": 91
|
|
501
481
|
},
|
|
502
|
-
"name": "GotEventSlot"
|
|
503
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
482
|
+
"name": "GotEventSlot"
|
|
504
483
|
}
|
|
505
484
|
]
|
|
506
485
|
},
|
|
@@ -619,11 +598,7 @@
|
|
|
619
598
|
"line": 33,
|
|
620
599
|
"character": 30
|
|
621
600
|
},
|
|
622
|
-
"name": "ScopeMain"
|
|
623
|
-
"componentId": {
|
|
624
|
-
"scope": "teambit.scope",
|
|
625
|
-
"name": "scope"
|
|
626
|
-
}
|
|
601
|
+
"name": "ScopeMain"
|
|
627
602
|
},
|
|
628
603
|
"isOptional": false,
|
|
629
604
|
"isSpread": false
|
|
@@ -643,8 +618,7 @@
|
|
|
643
618
|
"line": 33,
|
|
644
619
|
"character": 63
|
|
645
620
|
},
|
|
646
|
-
"name": "GotEventSlot"
|
|
647
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
621
|
+
"name": "GotEventSlot"
|
|
648
622
|
},
|
|
649
623
|
"isOptional": false,
|
|
650
624
|
"isSpread": false
|
|
@@ -664,11 +638,7 @@
|
|
|
664
638
|
"line": 33,
|
|
665
639
|
"character": 93
|
|
666
640
|
},
|
|
667
|
-
"name": "Logger"
|
|
668
|
-
"componentId": {
|
|
669
|
-
"scope": "teambit.harmony",
|
|
670
|
-
"name": "logger"
|
|
671
|
-
}
|
|
641
|
+
"name": "Logger"
|
|
672
642
|
},
|
|
673
643
|
"isOptional": false,
|
|
674
644
|
"isSpread": false
|
|
@@ -710,8 +680,7 @@
|
|
|
710
680
|
"line": 35,
|
|
711
681
|
"character": 28
|
|
712
682
|
},
|
|
713
|
-
"name": "GotEvent"
|
|
714
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
683
|
+
"name": "GotEvent"
|
|
715
684
|
},
|
|
716
685
|
"isOptional": false,
|
|
717
686
|
"isSpread": false
|
|
@@ -763,8 +732,7 @@
|
|
|
763
732
|
"line": 43,
|
|
764
733
|
"character": 36
|
|
765
734
|
},
|
|
766
|
-
"name": "EventName"
|
|
767
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
735
|
+
"name": "EventName"
|
|
768
736
|
},
|
|
769
737
|
"isOptional": false,
|
|
770
738
|
"isSpread": false
|
|
@@ -818,8 +786,7 @@
|
|
|
818
786
|
"line": 52,
|
|
819
787
|
"character": 36
|
|
820
788
|
},
|
|
821
|
-
"name": "EventName"
|
|
822
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
789
|
+
"name": "EventName"
|
|
823
790
|
},
|
|
824
791
|
"isOptional": false,
|
|
825
792
|
"isSpread": false
|
|
@@ -993,11 +960,7 @@
|
|
|
993
960
|
"line": 66,
|
|
994
961
|
"character": 47
|
|
995
962
|
},
|
|
996
|
-
"name": "ScopeMain"
|
|
997
|
-
"componentId": {
|
|
998
|
-
"scope": "teambit.scope",
|
|
999
|
-
"name": "scope"
|
|
1000
|
-
}
|
|
963
|
+
"name": "ScopeMain"
|
|
1001
964
|
},
|
|
1002
965
|
{
|
|
1003
966
|
"__schema": "TypeRefSchema",
|
|
@@ -1006,11 +969,7 @@
|
|
|
1006
969
|
"line": 66,
|
|
1007
970
|
"character": 58
|
|
1008
971
|
},
|
|
1009
|
-
"name": "LoggerMain"
|
|
1010
|
-
"componentId": {
|
|
1011
|
-
"scope": "teambit.harmony",
|
|
1012
|
-
"name": "logger"
|
|
1013
|
-
}
|
|
972
|
+
"name": "LoggerMain"
|
|
1014
973
|
}
|
|
1015
974
|
]
|
|
1016
975
|
},
|
|
@@ -1060,8 +1019,7 @@
|
|
|
1060
1019
|
"line": 66,
|
|
1061
1020
|
"character": 91
|
|
1062
1021
|
},
|
|
1063
|
-
"name": "GotEventSlot"
|
|
1064
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
1022
|
+
"name": "GotEventSlot"
|
|
1065
1023
|
}
|
|
1066
1024
|
]
|
|
1067
1025
|
},
|
|
@@ -1171,8 +1129,7 @@
|
|
|
1171
1129
|
"line": 12,
|
|
1172
1130
|
"character": 29
|
|
1173
1131
|
},
|
|
1174
|
-
"name": "EventName"
|
|
1175
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
1132
|
+
"name": "EventName"
|
|
1176
1133
|
},
|
|
1177
1134
|
"isOptional": false,
|
|
1178
1135
|
"isSpread": false
|
|
@@ -1218,11 +1175,6 @@
|
|
|
1218
1175
|
"character": 21
|
|
1219
1176
|
},
|
|
1220
1177
|
"name": "SlotRegistry",
|
|
1221
|
-
"componentId": {
|
|
1222
|
-
"scope": "teambit.harmony",
|
|
1223
|
-
"name": "harmony",
|
|
1224
|
-
"version": "0.4.6"
|
|
1225
|
-
},
|
|
1226
1178
|
"typeArgs": [
|
|
1227
1179
|
{
|
|
1228
1180
|
"__schema": "TypeRefSchema",
|
|
@@ -1231,8 +1183,7 @@
|
|
|
1231
1183
|
"line": 13,
|
|
1232
1184
|
"character": 34
|
|
1233
1185
|
},
|
|
1234
|
-
"name": "GotEvent"
|
|
1235
|
-
"internalFilePath": "ipc-events.main.runtime.ts"
|
|
1186
|
+
"name": "GotEvent"
|
|
1236
1187
|
}
|
|
1237
1188
|
]
|
|
1238
1189
|
}
|
|
@@ -1322,7 +1273,7 @@
|
|
|
1322
1273
|
"componentId": {
|
|
1323
1274
|
"scope": "teambit.harmony",
|
|
1324
1275
|
"name": "ipc-events",
|
|
1325
|
-
"version": "1.0.
|
|
1276
|
+
"version": "1.0.227"
|
|
1326
1277
|
},
|
|
1327
1278
|
"taggedModuleExports": []
|
|
1328
1279
|
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/ipc-events",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.227",
|
|
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.
|
|
9
|
+
"version": "1.0.227"
|
|
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.
|
|
16
|
-
"@teambit/logger": "0.0.
|
|
17
|
-
"@teambit/scope": "1.0.
|
|
15
|
+
"@teambit/cli": "0.0.860",
|
|
16
|
+
"@teambit/logger": "0.0.953",
|
|
17
|
+
"@teambit/scope": "1.0.227"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/fs-extra": "9.0.7",
|
|
21
21
|
"@types/mocha": "9.1.0",
|
|
22
22
|
"chai": "4.3.0",
|
|
23
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
23
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@teambit/legacy": "1.0.624"
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,16 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.227"
|
|
49
|
+
}
|
|
38
50
|
]
|
|
39
51
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ScopeMain } from '@teambit/scope';
|
|
2
|
-
import { SlotRegistry } from '@teambit/harmony';
|
|
3
|
-
import { Logger, LoggerMain } from '@teambit/logger';
|
|
4
|
-
type EventName = 'onPostInstall' | 'onPostObjectsPersist';
|
|
5
|
-
type GotEvent = (eventName: EventName) => Promise<void>;
|
|
6
|
-
type GotEventSlot = SlotRegistry<GotEvent>;
|
|
7
|
-
/**
|
|
8
|
-
* imagine you have multiple processes running in the background, such as `bit watch`, `bit start`, `bit server`.
|
|
9
|
-
* the user is running `bit install` from the cli, how do you let these processes know that the installation is complete?
|
|
10
|
-
* `bit start` for instance could use ths info to clear the "component issues" of the components that were missing packages.
|
|
11
|
-
*
|
|
12
|
-
* this class provides a mechanism to achieve this by writing the event into the filesystem (`.bit/events/event-name`),
|
|
13
|
-
* while each one of the processes has a watcher in the background watch this file. once they got the data from the watcher,
|
|
14
|
-
* they can act upon it.
|
|
15
|
-
*
|
|
16
|
-
* in the previous example, when the user is running `bit install`, the install aspect runs `this.publishIpcEvent` to
|
|
17
|
-
* write `.bit/events/onPostInstall` to the filesystem. then, the watcher of `bit start` process got a notification
|
|
18
|
-
* that this file has changed/added and it runs `triggerGotEvent` to run all aspects registered to its gotEventSlot.
|
|
19
|
-
* the installer in turn is registered to this slot and once its function is triggered, it check whether the eventName
|
|
20
|
-
* is onPostInstall and then triggers its own OnPostInstall slot.
|
|
21
|
-
*/
|
|
22
|
-
export declare class IpcEventsMain {
|
|
23
|
-
private scope;
|
|
24
|
-
private gotEventSlot;
|
|
25
|
-
private logger;
|
|
26
|
-
constructor(scope: ScopeMain, gotEventSlot: GotEventSlot, logger: Logger);
|
|
27
|
-
registerGotEventSlot(fn: GotEvent): void;
|
|
28
|
-
/**
|
|
29
|
-
* this gets called from the watcher only.
|
|
30
|
-
* as soon as the watcher finds out that a new event has been written to the filesystem, it triggers this function
|
|
31
|
-
*/
|
|
32
|
-
triggerGotEvent(eventName: EventName): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* write event data into the filesystem, so then other processes, such as "bit start", "bit watch", could use the
|
|
35
|
-
* watcher to get the event data.
|
|
36
|
-
*/
|
|
37
|
-
publishIpcEvent(eventName: EventName, data?: Record<string, any>): Promise<void>;
|
|
38
|
-
get eventsDir(): string;
|
|
39
|
-
static slots: ((registerFn: () => string) => SlotRegistry<GotEventSlot>)[];
|
|
40
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
41
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
42
|
-
static provider([scope, loggerMain]: [ScopeMain, LoggerMain], _: any, [gotEventSlot]: [GotEventSlot]): Promise<IpcEventsMain>;
|
|
43
|
-
}
|
|
44
|
-
export default IpcEventsMain;
|
|
File without changes
|