@teambit/host-initializer 0.0.224 → 0.0.226
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/host-initializer@0.0.
|
|
3
|
+
<testsuite name="teambit.harmony/host-initializer@0.0.226" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -0,0 +1,1106 @@
|
|
|
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": 10
|
|
22
|
+
},
|
|
23
|
+
"signature": "class HostInitializerMain",
|
|
24
|
+
"name": "HostInitializerMain",
|
|
25
|
+
"exportNode": {
|
|
26
|
+
"__schema": "ClassSchema",
|
|
27
|
+
"location": {
|
|
28
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
29
|
+
"line": 16,
|
|
30
|
+
"character": 1
|
|
31
|
+
},
|
|
32
|
+
"signature": "class HostInitializerMain",
|
|
33
|
+
"name": "HostInitializerMain",
|
|
34
|
+
"members": [
|
|
35
|
+
{
|
|
36
|
+
"__schema": "FunctionLikeSchema",
|
|
37
|
+
"location": {
|
|
38
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
39
|
+
"line": 17,
|
|
40
|
+
"character": 3
|
|
41
|
+
},
|
|
42
|
+
"signature": "(method) HostInitializerMain.init(absPath?: string, noGit?: boolean, noPackageJson?: boolean, reset?: boolean, resetNew?: boolean, resetLaneNew?: boolean, resetHard?: boolean, resetScope?: boolean, force?: boolean, workspaceConfigProps?: WorkspaceExtensionProps, generator?: string): Promise<Consumer>",
|
|
43
|
+
"name": "init",
|
|
44
|
+
"params": [
|
|
45
|
+
{
|
|
46
|
+
"__schema": "ParameterSchema",
|
|
47
|
+
"location": {
|
|
48
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
49
|
+
"line": 18,
|
|
50
|
+
"character": 5
|
|
51
|
+
},
|
|
52
|
+
"name": "absPath",
|
|
53
|
+
"type": {
|
|
54
|
+
"__schema": "KeywordTypeSchema",
|
|
55
|
+
"location": {
|
|
56
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
57
|
+
"line": 18,
|
|
58
|
+
"character": 15
|
|
59
|
+
},
|
|
60
|
+
"name": "string"
|
|
61
|
+
},
|
|
62
|
+
"isOptional": true,
|
|
63
|
+
"isSpread": false
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"__schema": "ParameterSchema",
|
|
67
|
+
"location": {
|
|
68
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
69
|
+
"line": 19,
|
|
70
|
+
"character": 5
|
|
71
|
+
},
|
|
72
|
+
"name": "noGit",
|
|
73
|
+
"type": {
|
|
74
|
+
"__schema": "InferenceTypeSchema",
|
|
75
|
+
"location": {
|
|
76
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
77
|
+
"line": 19,
|
|
78
|
+
"character": 5
|
|
79
|
+
},
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
},
|
|
82
|
+
"isOptional": true,
|
|
83
|
+
"defaultValue": "false",
|
|
84
|
+
"isSpread": false
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"__schema": "ParameterSchema",
|
|
88
|
+
"location": {
|
|
89
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
90
|
+
"line": 20,
|
|
91
|
+
"character": 5
|
|
92
|
+
},
|
|
93
|
+
"name": "noPackageJson",
|
|
94
|
+
"type": {
|
|
95
|
+
"__schema": "InferenceTypeSchema",
|
|
96
|
+
"location": {
|
|
97
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
98
|
+
"line": 20,
|
|
99
|
+
"character": 5
|
|
100
|
+
},
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"isOptional": true,
|
|
104
|
+
"defaultValue": "false",
|
|
105
|
+
"isSpread": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"__schema": "ParameterSchema",
|
|
109
|
+
"location": {
|
|
110
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
111
|
+
"line": 21,
|
|
112
|
+
"character": 5
|
|
113
|
+
},
|
|
114
|
+
"name": "reset",
|
|
115
|
+
"type": {
|
|
116
|
+
"__schema": "InferenceTypeSchema",
|
|
117
|
+
"location": {
|
|
118
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
119
|
+
"line": 21,
|
|
120
|
+
"character": 5
|
|
121
|
+
},
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
},
|
|
124
|
+
"isOptional": true,
|
|
125
|
+
"defaultValue": "false",
|
|
126
|
+
"isSpread": false
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"__schema": "ParameterSchema",
|
|
130
|
+
"location": {
|
|
131
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
132
|
+
"line": 22,
|
|
133
|
+
"character": 5
|
|
134
|
+
},
|
|
135
|
+
"name": "resetNew",
|
|
136
|
+
"type": {
|
|
137
|
+
"__schema": "InferenceTypeSchema",
|
|
138
|
+
"location": {
|
|
139
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
140
|
+
"line": 22,
|
|
141
|
+
"character": 5
|
|
142
|
+
},
|
|
143
|
+
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"isOptional": true,
|
|
146
|
+
"defaultValue": "false",
|
|
147
|
+
"isSpread": false
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"__schema": "ParameterSchema",
|
|
151
|
+
"location": {
|
|
152
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
153
|
+
"line": 23,
|
|
154
|
+
"character": 5
|
|
155
|
+
},
|
|
156
|
+
"name": "resetLaneNew",
|
|
157
|
+
"type": {
|
|
158
|
+
"__schema": "InferenceTypeSchema",
|
|
159
|
+
"location": {
|
|
160
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
161
|
+
"line": 23,
|
|
162
|
+
"character": 5
|
|
163
|
+
},
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"isOptional": true,
|
|
167
|
+
"defaultValue": "false",
|
|
168
|
+
"isSpread": false
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"__schema": "ParameterSchema",
|
|
172
|
+
"location": {
|
|
173
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
174
|
+
"line": 24,
|
|
175
|
+
"character": 5
|
|
176
|
+
},
|
|
177
|
+
"name": "resetHard",
|
|
178
|
+
"type": {
|
|
179
|
+
"__schema": "InferenceTypeSchema",
|
|
180
|
+
"location": {
|
|
181
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
182
|
+
"line": 24,
|
|
183
|
+
"character": 5
|
|
184
|
+
},
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"isOptional": true,
|
|
188
|
+
"defaultValue": "false",
|
|
189
|
+
"isSpread": false
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"__schema": "ParameterSchema",
|
|
193
|
+
"location": {
|
|
194
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
195
|
+
"line": 25,
|
|
196
|
+
"character": 5
|
|
197
|
+
},
|
|
198
|
+
"name": "resetScope",
|
|
199
|
+
"type": {
|
|
200
|
+
"__schema": "InferenceTypeSchema",
|
|
201
|
+
"location": {
|
|
202
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
203
|
+
"line": 25,
|
|
204
|
+
"character": 5
|
|
205
|
+
},
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
"isOptional": true,
|
|
209
|
+
"defaultValue": "false",
|
|
210
|
+
"isSpread": false
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"__schema": "ParameterSchema",
|
|
214
|
+
"location": {
|
|
215
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
216
|
+
"line": 26,
|
|
217
|
+
"character": 5
|
|
218
|
+
},
|
|
219
|
+
"name": "force",
|
|
220
|
+
"type": {
|
|
221
|
+
"__schema": "InferenceTypeSchema",
|
|
222
|
+
"location": {
|
|
223
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
224
|
+
"line": 26,
|
|
225
|
+
"character": 5
|
|
226
|
+
},
|
|
227
|
+
"type": "boolean"
|
|
228
|
+
},
|
|
229
|
+
"isOptional": true,
|
|
230
|
+
"defaultValue": "false",
|
|
231
|
+
"isSpread": false
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"__schema": "ParameterSchema",
|
|
235
|
+
"location": {
|
|
236
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
237
|
+
"line": 27,
|
|
238
|
+
"character": 5
|
|
239
|
+
},
|
|
240
|
+
"name": "workspaceConfigProps",
|
|
241
|
+
"type": {
|
|
242
|
+
"__schema": "TypeRefSchema",
|
|
243
|
+
"location": {
|
|
244
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
245
|
+
"line": 27,
|
|
246
|
+
"character": 27
|
|
247
|
+
},
|
|
248
|
+
"name": "WorkspaceExtensionProps"
|
|
249
|
+
},
|
|
250
|
+
"isOptional": true,
|
|
251
|
+
"defaultValue": "{}",
|
|
252
|
+
"isSpread": false
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"__schema": "ParameterSchema",
|
|
256
|
+
"location": {
|
|
257
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
258
|
+
"line": 28,
|
|
259
|
+
"character": 5
|
|
260
|
+
},
|
|
261
|
+
"name": "generator",
|
|
262
|
+
"type": {
|
|
263
|
+
"__schema": "KeywordTypeSchema",
|
|
264
|
+
"location": {
|
|
265
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
266
|
+
"line": 28,
|
|
267
|
+
"character": 17
|
|
268
|
+
},
|
|
269
|
+
"name": "string"
|
|
270
|
+
},
|
|
271
|
+
"isOptional": true,
|
|
272
|
+
"isSpread": false
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"returnType": {
|
|
276
|
+
"__schema": "TypeRefSchema",
|
|
277
|
+
"location": {
|
|
278
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
279
|
+
"line": 29,
|
|
280
|
+
"character": 6
|
|
281
|
+
},
|
|
282
|
+
"name": "Promise",
|
|
283
|
+
"typeArgs": [
|
|
284
|
+
{
|
|
285
|
+
"__schema": "TypeRefSchema",
|
|
286
|
+
"location": {
|
|
287
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
288
|
+
"line": 29,
|
|
289
|
+
"character": 14
|
|
290
|
+
},
|
|
291
|
+
"name": "Consumer"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"modifiers": [
|
|
296
|
+
"static",
|
|
297
|
+
"async"
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"__schema": "VariableLikeSchema",
|
|
302
|
+
"location": {
|
|
303
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
304
|
+
"line": 83,
|
|
305
|
+
"character": 3
|
|
306
|
+
},
|
|
307
|
+
"signature": "(property) HostInitializerMain.slots: never[]",
|
|
308
|
+
"name": "slots",
|
|
309
|
+
"type": {
|
|
310
|
+
"__schema": "InferenceTypeSchema",
|
|
311
|
+
"location": {
|
|
312
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
313
|
+
"line": 83,
|
|
314
|
+
"character": 3
|
|
315
|
+
},
|
|
316
|
+
"type": "never[]"
|
|
317
|
+
},
|
|
318
|
+
"isOptional": true,
|
|
319
|
+
"defaultValue": "[]"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"__schema": "VariableLikeSchema",
|
|
323
|
+
"location": {
|
|
324
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
325
|
+
"line": 84,
|
|
326
|
+
"character": 3
|
|
327
|
+
},
|
|
328
|
+
"signature": "(property) HostInitializerMain.dependencies: Aspect[]",
|
|
329
|
+
"name": "dependencies",
|
|
330
|
+
"type": {
|
|
331
|
+
"__schema": "InferenceTypeSchema",
|
|
332
|
+
"location": {
|
|
333
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
334
|
+
"line": 84,
|
|
335
|
+
"character": 3
|
|
336
|
+
},
|
|
337
|
+
"type": "Aspect[]"
|
|
338
|
+
},
|
|
339
|
+
"isOptional": true,
|
|
340
|
+
"defaultValue": "[CLIAspect]"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"__schema": "VariableLikeSchema",
|
|
344
|
+
"location": {
|
|
345
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
346
|
+
"line": 85,
|
|
347
|
+
"character": 3
|
|
348
|
+
},
|
|
349
|
+
"signature": "(property) HostInitializerMain.runtime: RuntimeDefinition",
|
|
350
|
+
"name": "runtime",
|
|
351
|
+
"type": {
|
|
352
|
+
"__schema": "InferenceTypeSchema",
|
|
353
|
+
"location": {
|
|
354
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
355
|
+
"line": 85,
|
|
356
|
+
"character": 3
|
|
357
|
+
},
|
|
358
|
+
"type": "RuntimeDefinition"
|
|
359
|
+
},
|
|
360
|
+
"isOptional": true,
|
|
361
|
+
"defaultValue": "MainRuntime"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"__schema": "FunctionLikeSchema",
|
|
365
|
+
"location": {
|
|
366
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
367
|
+
"line": 86,
|
|
368
|
+
"character": 3
|
|
369
|
+
},
|
|
370
|
+
"signature": "(method) HostInitializerMain.provider([cli]: [CLIMain]): Promise<HostInitializerMain>",
|
|
371
|
+
"name": "provider",
|
|
372
|
+
"params": [
|
|
373
|
+
{
|
|
374
|
+
"__schema": "ParameterSchema",
|
|
375
|
+
"location": {
|
|
376
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
377
|
+
"line": 86,
|
|
378
|
+
"character": 25
|
|
379
|
+
},
|
|
380
|
+
"name": "[ cli ]",
|
|
381
|
+
"type": {
|
|
382
|
+
"__schema": "TupleTypeSchema",
|
|
383
|
+
"location": {
|
|
384
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
385
|
+
"line": 86,
|
|
386
|
+
"character": 32
|
|
387
|
+
},
|
|
388
|
+
"elements": [
|
|
389
|
+
{
|
|
390
|
+
"__schema": "TypeRefSchema",
|
|
391
|
+
"location": {
|
|
392
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
393
|
+
"line": 86,
|
|
394
|
+
"character": 33
|
|
395
|
+
},
|
|
396
|
+
"name": "CLIMain"
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"isOptional": false,
|
|
401
|
+
"isSpread": false
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"returnType": {
|
|
405
|
+
"__schema": "InferenceTypeSchema",
|
|
406
|
+
"location": {
|
|
407
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
408
|
+
"line": 86,
|
|
409
|
+
"character": 3
|
|
410
|
+
},
|
|
411
|
+
"type": "Promise<HostInitializerMain>"
|
|
412
|
+
},
|
|
413
|
+
"modifiers": [
|
|
414
|
+
"static",
|
|
415
|
+
"async"
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"extendsNodes": [],
|
|
420
|
+
"implementNodes": []
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"__schema": "ExportSchema",
|
|
425
|
+
"location": {
|
|
426
|
+
"filePath": "index.ts",
|
|
427
|
+
"line": 4,
|
|
428
|
+
"character": 10
|
|
429
|
+
},
|
|
430
|
+
"signature": "class ObjectsWithoutConsumer",
|
|
431
|
+
"name": "ObjectsWithoutConsumer",
|
|
432
|
+
"exportNode": {
|
|
433
|
+
"__schema": "ClassSchema",
|
|
434
|
+
"location": {
|
|
435
|
+
"filePath": "objects-without-consumer.ts",
|
|
436
|
+
"line": 4,
|
|
437
|
+
"character": 1
|
|
438
|
+
},
|
|
439
|
+
"signature": "class ObjectsWithoutConsumer",
|
|
440
|
+
"name": "ObjectsWithoutConsumer",
|
|
441
|
+
"members": [
|
|
442
|
+
{
|
|
443
|
+
"__schema": "ConstructorSchema",
|
|
444
|
+
"location": {
|
|
445
|
+
"filePath": "objects-without-consumer.ts",
|
|
446
|
+
"line": 5,
|
|
447
|
+
"character": 3
|
|
448
|
+
},
|
|
449
|
+
"signature": "constructor ObjectsWithoutConsumer(scopePath: string): ObjectsWithoutConsumer",
|
|
450
|
+
"name": "constructor",
|
|
451
|
+
"params": [
|
|
452
|
+
{
|
|
453
|
+
"__schema": "ParameterSchema",
|
|
454
|
+
"location": {
|
|
455
|
+
"filePath": "objects-without-consumer.ts",
|
|
456
|
+
"line": 5,
|
|
457
|
+
"character": 15
|
|
458
|
+
},
|
|
459
|
+
"name": "scopePath",
|
|
460
|
+
"type": {
|
|
461
|
+
"__schema": "KeywordTypeSchema",
|
|
462
|
+
"location": {
|
|
463
|
+
"filePath": "objects-without-consumer.ts",
|
|
464
|
+
"line": 5,
|
|
465
|
+
"character": 33
|
|
466
|
+
},
|
|
467
|
+
"name": "string"
|
|
468
|
+
},
|
|
469
|
+
"isOptional": false,
|
|
470
|
+
"isSpread": false
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"returnType": {
|
|
474
|
+
"__schema": "ThisTypeSchema",
|
|
475
|
+
"location": {
|
|
476
|
+
"filePath": "objects-without-consumer.ts",
|
|
477
|
+
"line": 4,
|
|
478
|
+
"character": 1
|
|
479
|
+
},
|
|
480
|
+
"name": "ObjectsWithoutConsumer"
|
|
481
|
+
},
|
|
482
|
+
"modifiers": []
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"extendsNodes": [
|
|
486
|
+
{
|
|
487
|
+
"__schema": "ExpressionWithTypeArgumentsSchema",
|
|
488
|
+
"location": {
|
|
489
|
+
"filePath": "objects-without-consumer.ts",
|
|
490
|
+
"line": 4,
|
|
491
|
+
"character": 45
|
|
492
|
+
},
|
|
493
|
+
"name": "extends BitError",
|
|
494
|
+
"typeArgs": [],
|
|
495
|
+
"expression": {
|
|
496
|
+
"__schema": "TypeRefSchema",
|
|
497
|
+
"location": {
|
|
498
|
+
"filePath": "objects-without-consumer.ts",
|
|
499
|
+
"line": 4,
|
|
500
|
+
"character": 45
|
|
501
|
+
},
|
|
502
|
+
"name": "BitError",
|
|
503
|
+
"componentId": {
|
|
504
|
+
"_legacy": {
|
|
505
|
+
"scope": "teambit.harmony",
|
|
506
|
+
"name": "host-initializer",
|
|
507
|
+
"version": "0.0.226"
|
|
508
|
+
},
|
|
509
|
+
"_scope": "teambit.harmony"
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
],
|
|
514
|
+
"implementNodes": []
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"__schema": "UnImplementedSchema",
|
|
519
|
+
"location": {
|
|
520
|
+
"filePath": "index.ts",
|
|
521
|
+
"line": 5,
|
|
522
|
+
"character": 16
|
|
523
|
+
},
|
|
524
|
+
"name": "HostInitializerAspect",
|
|
525
|
+
"type": "Identifier"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"__schema": "ExportSchema",
|
|
529
|
+
"location": {
|
|
530
|
+
"filePath": "index.ts",
|
|
531
|
+
"line": 6,
|
|
532
|
+
"character": 10
|
|
533
|
+
},
|
|
534
|
+
"signature": "const HostInitializerAspect: Aspect",
|
|
535
|
+
"name": "HostInitializerAspect",
|
|
536
|
+
"exportNode": {
|
|
537
|
+
"__schema": "VariableLikeSchema",
|
|
538
|
+
"location": {
|
|
539
|
+
"filePath": "host-initializer.aspect.ts",
|
|
540
|
+
"line": 3,
|
|
541
|
+
"character": 14
|
|
542
|
+
},
|
|
543
|
+
"signature": "const HostInitializerAspect: Aspect",
|
|
544
|
+
"name": "HostInitializerAspect",
|
|
545
|
+
"type": {
|
|
546
|
+
"__schema": "TypeRefSchema",
|
|
547
|
+
"location": {
|
|
548
|
+
"filePath": "host-initializer.aspect.ts",
|
|
549
|
+
"line": 3,
|
|
550
|
+
"character": 14
|
|
551
|
+
},
|
|
552
|
+
"name": "Aspect",
|
|
553
|
+
"componentId": {
|
|
554
|
+
"scope": "teambit.harmony",
|
|
555
|
+
"name": "harmony",
|
|
556
|
+
"version": "0.4.6"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"isOptional": false,
|
|
560
|
+
"defaultValue": "Aspect.create({\n id: 'teambit.harmony/host-initializer',\n})"
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
"internals": []
|
|
565
|
+
},
|
|
566
|
+
"internals": [
|
|
567
|
+
{
|
|
568
|
+
"__schema": "ModuleSchema",
|
|
569
|
+
"location": {
|
|
570
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
571
|
+
"line": 1,
|
|
572
|
+
"character": 1
|
|
573
|
+
},
|
|
574
|
+
"exports": [
|
|
575
|
+
{
|
|
576
|
+
"__schema": "ClassSchema",
|
|
577
|
+
"location": {
|
|
578
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
579
|
+
"line": 16,
|
|
580
|
+
"character": 1
|
|
581
|
+
},
|
|
582
|
+
"signature": "class HostInitializerMain",
|
|
583
|
+
"name": "HostInitializerMain",
|
|
584
|
+
"members": [
|
|
585
|
+
{
|
|
586
|
+
"__schema": "FunctionLikeSchema",
|
|
587
|
+
"location": {
|
|
588
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
589
|
+
"line": 17,
|
|
590
|
+
"character": 3
|
|
591
|
+
},
|
|
592
|
+
"signature": "(method) HostInitializerMain.init(absPath?: string, noGit?: boolean, noPackageJson?: boolean, reset?: boolean, resetNew?: boolean, resetLaneNew?: boolean, resetHard?: boolean, resetScope?: boolean, force?: boolean, workspaceConfigProps?: WorkspaceExtensionProps, generator?: string): Promise<Consumer>",
|
|
593
|
+
"name": "init",
|
|
594
|
+
"params": [
|
|
595
|
+
{
|
|
596
|
+
"__schema": "ParameterSchema",
|
|
597
|
+
"location": {
|
|
598
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
599
|
+
"line": 18,
|
|
600
|
+
"character": 5
|
|
601
|
+
},
|
|
602
|
+
"name": "absPath",
|
|
603
|
+
"type": {
|
|
604
|
+
"__schema": "KeywordTypeSchema",
|
|
605
|
+
"location": {
|
|
606
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
607
|
+
"line": 18,
|
|
608
|
+
"character": 15
|
|
609
|
+
},
|
|
610
|
+
"name": "string"
|
|
611
|
+
},
|
|
612
|
+
"isOptional": true,
|
|
613
|
+
"isSpread": false
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"__schema": "ParameterSchema",
|
|
617
|
+
"location": {
|
|
618
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
619
|
+
"line": 19,
|
|
620
|
+
"character": 5
|
|
621
|
+
},
|
|
622
|
+
"name": "noGit",
|
|
623
|
+
"type": {
|
|
624
|
+
"__schema": "InferenceTypeSchema",
|
|
625
|
+
"location": {
|
|
626
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
627
|
+
"line": 19,
|
|
628
|
+
"character": 5
|
|
629
|
+
},
|
|
630
|
+
"type": "boolean"
|
|
631
|
+
},
|
|
632
|
+
"isOptional": true,
|
|
633
|
+
"defaultValue": "false",
|
|
634
|
+
"isSpread": false
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"__schema": "ParameterSchema",
|
|
638
|
+
"location": {
|
|
639
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
640
|
+
"line": 20,
|
|
641
|
+
"character": 5
|
|
642
|
+
},
|
|
643
|
+
"name": "noPackageJson",
|
|
644
|
+
"type": {
|
|
645
|
+
"__schema": "InferenceTypeSchema",
|
|
646
|
+
"location": {
|
|
647
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
648
|
+
"line": 20,
|
|
649
|
+
"character": 5
|
|
650
|
+
},
|
|
651
|
+
"type": "boolean"
|
|
652
|
+
},
|
|
653
|
+
"isOptional": true,
|
|
654
|
+
"defaultValue": "false",
|
|
655
|
+
"isSpread": false
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"__schema": "ParameterSchema",
|
|
659
|
+
"location": {
|
|
660
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
661
|
+
"line": 21,
|
|
662
|
+
"character": 5
|
|
663
|
+
},
|
|
664
|
+
"name": "reset",
|
|
665
|
+
"type": {
|
|
666
|
+
"__schema": "InferenceTypeSchema",
|
|
667
|
+
"location": {
|
|
668
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
669
|
+
"line": 21,
|
|
670
|
+
"character": 5
|
|
671
|
+
},
|
|
672
|
+
"type": "boolean"
|
|
673
|
+
},
|
|
674
|
+
"isOptional": true,
|
|
675
|
+
"defaultValue": "false",
|
|
676
|
+
"isSpread": false
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"__schema": "ParameterSchema",
|
|
680
|
+
"location": {
|
|
681
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
682
|
+
"line": 22,
|
|
683
|
+
"character": 5
|
|
684
|
+
},
|
|
685
|
+
"name": "resetNew",
|
|
686
|
+
"type": {
|
|
687
|
+
"__schema": "InferenceTypeSchema",
|
|
688
|
+
"location": {
|
|
689
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
690
|
+
"line": 22,
|
|
691
|
+
"character": 5
|
|
692
|
+
},
|
|
693
|
+
"type": "boolean"
|
|
694
|
+
},
|
|
695
|
+
"isOptional": true,
|
|
696
|
+
"defaultValue": "false",
|
|
697
|
+
"isSpread": false
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"__schema": "ParameterSchema",
|
|
701
|
+
"location": {
|
|
702
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
703
|
+
"line": 23,
|
|
704
|
+
"character": 5
|
|
705
|
+
},
|
|
706
|
+
"name": "resetLaneNew",
|
|
707
|
+
"type": {
|
|
708
|
+
"__schema": "InferenceTypeSchema",
|
|
709
|
+
"location": {
|
|
710
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
711
|
+
"line": 23,
|
|
712
|
+
"character": 5
|
|
713
|
+
},
|
|
714
|
+
"type": "boolean"
|
|
715
|
+
},
|
|
716
|
+
"isOptional": true,
|
|
717
|
+
"defaultValue": "false",
|
|
718
|
+
"isSpread": false
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"__schema": "ParameterSchema",
|
|
722
|
+
"location": {
|
|
723
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
724
|
+
"line": 24,
|
|
725
|
+
"character": 5
|
|
726
|
+
},
|
|
727
|
+
"name": "resetHard",
|
|
728
|
+
"type": {
|
|
729
|
+
"__schema": "InferenceTypeSchema",
|
|
730
|
+
"location": {
|
|
731
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
732
|
+
"line": 24,
|
|
733
|
+
"character": 5
|
|
734
|
+
},
|
|
735
|
+
"type": "boolean"
|
|
736
|
+
},
|
|
737
|
+
"isOptional": true,
|
|
738
|
+
"defaultValue": "false",
|
|
739
|
+
"isSpread": false
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"__schema": "ParameterSchema",
|
|
743
|
+
"location": {
|
|
744
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
745
|
+
"line": 25,
|
|
746
|
+
"character": 5
|
|
747
|
+
},
|
|
748
|
+
"name": "resetScope",
|
|
749
|
+
"type": {
|
|
750
|
+
"__schema": "InferenceTypeSchema",
|
|
751
|
+
"location": {
|
|
752
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
753
|
+
"line": 25,
|
|
754
|
+
"character": 5
|
|
755
|
+
},
|
|
756
|
+
"type": "boolean"
|
|
757
|
+
},
|
|
758
|
+
"isOptional": true,
|
|
759
|
+
"defaultValue": "false",
|
|
760
|
+
"isSpread": false
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"__schema": "ParameterSchema",
|
|
764
|
+
"location": {
|
|
765
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
766
|
+
"line": 26,
|
|
767
|
+
"character": 5
|
|
768
|
+
},
|
|
769
|
+
"name": "force",
|
|
770
|
+
"type": {
|
|
771
|
+
"__schema": "InferenceTypeSchema",
|
|
772
|
+
"location": {
|
|
773
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
774
|
+
"line": 26,
|
|
775
|
+
"character": 5
|
|
776
|
+
},
|
|
777
|
+
"type": "boolean"
|
|
778
|
+
},
|
|
779
|
+
"isOptional": true,
|
|
780
|
+
"defaultValue": "false",
|
|
781
|
+
"isSpread": false
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
"__schema": "ParameterSchema",
|
|
785
|
+
"location": {
|
|
786
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
787
|
+
"line": 27,
|
|
788
|
+
"character": 5
|
|
789
|
+
},
|
|
790
|
+
"name": "workspaceConfigProps",
|
|
791
|
+
"type": {
|
|
792
|
+
"__schema": "TypeRefSchema",
|
|
793
|
+
"location": {
|
|
794
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
795
|
+
"line": 27,
|
|
796
|
+
"character": 27
|
|
797
|
+
},
|
|
798
|
+
"name": "WorkspaceExtensionProps"
|
|
799
|
+
},
|
|
800
|
+
"isOptional": true,
|
|
801
|
+
"defaultValue": "{}",
|
|
802
|
+
"isSpread": false
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"__schema": "ParameterSchema",
|
|
806
|
+
"location": {
|
|
807
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
808
|
+
"line": 28,
|
|
809
|
+
"character": 5
|
|
810
|
+
},
|
|
811
|
+
"name": "generator",
|
|
812
|
+
"type": {
|
|
813
|
+
"__schema": "KeywordTypeSchema",
|
|
814
|
+
"location": {
|
|
815
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
816
|
+
"line": 28,
|
|
817
|
+
"character": 17
|
|
818
|
+
},
|
|
819
|
+
"name": "string"
|
|
820
|
+
},
|
|
821
|
+
"isOptional": true,
|
|
822
|
+
"isSpread": false
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"returnType": {
|
|
826
|
+
"__schema": "TypeRefSchema",
|
|
827
|
+
"location": {
|
|
828
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
829
|
+
"line": 29,
|
|
830
|
+
"character": 6
|
|
831
|
+
},
|
|
832
|
+
"name": "Promise",
|
|
833
|
+
"typeArgs": [
|
|
834
|
+
{
|
|
835
|
+
"__schema": "TypeRefSchema",
|
|
836
|
+
"location": {
|
|
837
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
838
|
+
"line": 29,
|
|
839
|
+
"character": 14
|
|
840
|
+
},
|
|
841
|
+
"name": "Consumer"
|
|
842
|
+
}
|
|
843
|
+
]
|
|
844
|
+
},
|
|
845
|
+
"modifiers": [
|
|
846
|
+
"static",
|
|
847
|
+
"async"
|
|
848
|
+
]
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"__schema": "VariableLikeSchema",
|
|
852
|
+
"location": {
|
|
853
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
854
|
+
"line": 83,
|
|
855
|
+
"character": 3
|
|
856
|
+
},
|
|
857
|
+
"signature": "(property) HostInitializerMain.slots: never[]",
|
|
858
|
+
"name": "slots",
|
|
859
|
+
"type": {
|
|
860
|
+
"__schema": "InferenceTypeSchema",
|
|
861
|
+
"location": {
|
|
862
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
863
|
+
"line": 83,
|
|
864
|
+
"character": 3
|
|
865
|
+
},
|
|
866
|
+
"type": "never[]"
|
|
867
|
+
},
|
|
868
|
+
"isOptional": true,
|
|
869
|
+
"defaultValue": "[]"
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"__schema": "VariableLikeSchema",
|
|
873
|
+
"location": {
|
|
874
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
875
|
+
"line": 84,
|
|
876
|
+
"character": 3
|
|
877
|
+
},
|
|
878
|
+
"signature": "(property) HostInitializerMain.dependencies: Aspect[]",
|
|
879
|
+
"name": "dependencies",
|
|
880
|
+
"type": {
|
|
881
|
+
"__schema": "InferenceTypeSchema",
|
|
882
|
+
"location": {
|
|
883
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
884
|
+
"line": 84,
|
|
885
|
+
"character": 3
|
|
886
|
+
},
|
|
887
|
+
"type": "Aspect[]"
|
|
888
|
+
},
|
|
889
|
+
"isOptional": true,
|
|
890
|
+
"defaultValue": "[CLIAspect]"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"__schema": "VariableLikeSchema",
|
|
894
|
+
"location": {
|
|
895
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
896
|
+
"line": 85,
|
|
897
|
+
"character": 3
|
|
898
|
+
},
|
|
899
|
+
"signature": "(property) HostInitializerMain.runtime: RuntimeDefinition",
|
|
900
|
+
"name": "runtime",
|
|
901
|
+
"type": {
|
|
902
|
+
"__schema": "InferenceTypeSchema",
|
|
903
|
+
"location": {
|
|
904
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
905
|
+
"line": 85,
|
|
906
|
+
"character": 3
|
|
907
|
+
},
|
|
908
|
+
"type": "RuntimeDefinition"
|
|
909
|
+
},
|
|
910
|
+
"isOptional": true,
|
|
911
|
+
"defaultValue": "MainRuntime"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"__schema": "FunctionLikeSchema",
|
|
915
|
+
"location": {
|
|
916
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
917
|
+
"line": 86,
|
|
918
|
+
"character": 3
|
|
919
|
+
},
|
|
920
|
+
"signature": "(method) HostInitializerMain.provider([cli]: [CLIMain]): Promise<HostInitializerMain>",
|
|
921
|
+
"name": "provider",
|
|
922
|
+
"params": [
|
|
923
|
+
{
|
|
924
|
+
"__schema": "ParameterSchema",
|
|
925
|
+
"location": {
|
|
926
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
927
|
+
"line": 86,
|
|
928
|
+
"character": 25
|
|
929
|
+
},
|
|
930
|
+
"name": "[ cli ]",
|
|
931
|
+
"type": {
|
|
932
|
+
"__schema": "TupleTypeSchema",
|
|
933
|
+
"location": {
|
|
934
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
935
|
+
"line": 86,
|
|
936
|
+
"character": 32
|
|
937
|
+
},
|
|
938
|
+
"elements": [
|
|
939
|
+
{
|
|
940
|
+
"__schema": "TypeRefSchema",
|
|
941
|
+
"location": {
|
|
942
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
943
|
+
"line": 86,
|
|
944
|
+
"character": 33
|
|
945
|
+
},
|
|
946
|
+
"name": "CLIMain"
|
|
947
|
+
}
|
|
948
|
+
]
|
|
949
|
+
},
|
|
950
|
+
"isOptional": false,
|
|
951
|
+
"isSpread": false
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
"returnType": {
|
|
955
|
+
"__schema": "InferenceTypeSchema",
|
|
956
|
+
"location": {
|
|
957
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
958
|
+
"line": 86,
|
|
959
|
+
"character": 3
|
|
960
|
+
},
|
|
961
|
+
"type": "Promise<HostInitializerMain>"
|
|
962
|
+
},
|
|
963
|
+
"modifiers": [
|
|
964
|
+
"static",
|
|
965
|
+
"async"
|
|
966
|
+
]
|
|
967
|
+
}
|
|
968
|
+
],
|
|
969
|
+
"extendsNodes": [],
|
|
970
|
+
"implementNodes": []
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"__schema": "UnImplementedSchema",
|
|
974
|
+
"location": {
|
|
975
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
976
|
+
"line": 96,
|
|
977
|
+
"character": 16
|
|
978
|
+
},
|
|
979
|
+
"name": "HostInitializerMain",
|
|
980
|
+
"type": "Identifier"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
"internals": [
|
|
984
|
+
{
|
|
985
|
+
"__schema": "UnImplementedSchema",
|
|
986
|
+
"location": {
|
|
987
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
988
|
+
"line": 94,
|
|
989
|
+
"character": 1
|
|
990
|
+
},
|
|
991
|
+
"name": "HostInitializerAspect.addRuntime(HostInitializerMain);",
|
|
992
|
+
"type": "ExpressionStatement"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"__schema": "FunctionLikeSchema",
|
|
996
|
+
"location": {
|
|
997
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
998
|
+
"line": 106,
|
|
999
|
+
"character": 1
|
|
1000
|
+
},
|
|
1001
|
+
"doc": {
|
|
1002
|
+
"__schema": "DocSchema",
|
|
1003
|
+
"location": {
|
|
1004
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
1005
|
+
"line": 98,
|
|
1006
|
+
"character": 1
|
|
1007
|
+
},
|
|
1008
|
+
"raw": "/**\n * throw an error when .bitmap is empty but a scope has objects.\n * a user may got into this state for reasons such as:\n * 1. deleting manually .bitmap hoping to re-start Bit from scratch. (probably unaware of `--reset-hard` flag).\n * 2. switching to a branch where Bit wasn't initialized\n * in which case, it's better to stop and show an error describing what needs to be done.\n * it can always be ignored by entering `--force` flag.\n */",
|
|
1009
|
+
"comment": "throw an error when .bitmap is empty but a scope has objects.\na user may got into this state for reasons such as:\n1. deleting manually .bitmap hoping to re-start Bit from scratch. (probably unaware of `--reset-hard` flag).\n2. switching to a branch where Bit wasn't initialized\nin which case, it's better to stop and show an error describing what needs to be done.\nit can always be ignored by entering `--force` flag.",
|
|
1010
|
+
"tags": []
|
|
1011
|
+
},
|
|
1012
|
+
"signature": "function throwForOutOfSyncScope(consumer: Consumer): Promise<void>",
|
|
1013
|
+
"name": "throwForOutOfSyncScope",
|
|
1014
|
+
"params": [
|
|
1015
|
+
{
|
|
1016
|
+
"__schema": "ParameterSchema",
|
|
1017
|
+
"location": {
|
|
1018
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
1019
|
+
"line": 106,
|
|
1020
|
+
"character": 39
|
|
1021
|
+
},
|
|
1022
|
+
"name": "consumer",
|
|
1023
|
+
"type": {
|
|
1024
|
+
"__schema": "TypeRefSchema",
|
|
1025
|
+
"location": {
|
|
1026
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
1027
|
+
"line": 106,
|
|
1028
|
+
"character": 49
|
|
1029
|
+
},
|
|
1030
|
+
"name": "Consumer"
|
|
1031
|
+
},
|
|
1032
|
+
"isOptional": false,
|
|
1033
|
+
"isSpread": false
|
|
1034
|
+
}
|
|
1035
|
+
],
|
|
1036
|
+
"returnType": {
|
|
1037
|
+
"__schema": "TypeRefSchema",
|
|
1038
|
+
"location": {
|
|
1039
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
1040
|
+
"line": 106,
|
|
1041
|
+
"character": 60
|
|
1042
|
+
},
|
|
1043
|
+
"name": "Promise",
|
|
1044
|
+
"typeArgs": [
|
|
1045
|
+
{
|
|
1046
|
+
"__schema": "KeywordTypeSchema",
|
|
1047
|
+
"location": {
|
|
1048
|
+
"filePath": "host-initializer.main.runtime.ts",
|
|
1049
|
+
"line": 106,
|
|
1050
|
+
"character": 68
|
|
1051
|
+
},
|
|
1052
|
+
"name": "void"
|
|
1053
|
+
}
|
|
1054
|
+
]
|
|
1055
|
+
},
|
|
1056
|
+
"modifiers": [
|
|
1057
|
+
"async"
|
|
1058
|
+
]
|
|
1059
|
+
}
|
|
1060
|
+
]
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"__schema": "ModuleSchema",
|
|
1064
|
+
"location": {
|
|
1065
|
+
"filePath": "host-initializer.aspect.ts",
|
|
1066
|
+
"line": 1,
|
|
1067
|
+
"character": 1
|
|
1068
|
+
},
|
|
1069
|
+
"exports": [
|
|
1070
|
+
{
|
|
1071
|
+
"__schema": "VariableLikeSchema",
|
|
1072
|
+
"location": {
|
|
1073
|
+
"filePath": "host-initializer.aspect.ts",
|
|
1074
|
+
"line": 3,
|
|
1075
|
+
"character": 14
|
|
1076
|
+
},
|
|
1077
|
+
"signature": "const HostInitializerAspect: Aspect",
|
|
1078
|
+
"name": "HostInitializerAspect",
|
|
1079
|
+
"type": {
|
|
1080
|
+
"__schema": "TypeRefSchema",
|
|
1081
|
+
"location": {
|
|
1082
|
+
"filePath": "host-initializer.aspect.ts",
|
|
1083
|
+
"line": 3,
|
|
1084
|
+
"character": 14
|
|
1085
|
+
},
|
|
1086
|
+
"name": "Aspect",
|
|
1087
|
+
"componentId": {
|
|
1088
|
+
"scope": "teambit.harmony",
|
|
1089
|
+
"name": "harmony",
|
|
1090
|
+
"version": "0.4.6"
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
"isOptional": false,
|
|
1094
|
+
"defaultValue": "Aspect.create({\n id: 'teambit.harmony/host-initializer',\n})"
|
|
1095
|
+
}
|
|
1096
|
+
],
|
|
1097
|
+
"internals": []
|
|
1098
|
+
}
|
|
1099
|
+
],
|
|
1100
|
+
"componentId": {
|
|
1101
|
+
"scope": "teambit.harmony",
|
|
1102
|
+
"name": "host-initializer",
|
|
1103
|
+
"version": "0.0.226"
|
|
1104
|
+
},
|
|
1105
|
+
"taggedModuleExports": []
|
|
1106
|
+
}
|
|
@@ -39,9 +39,9 @@ function _legacy() {
|
|
|
39
39
|
};
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const data = require("@teambit/
|
|
44
|
-
|
|
42
|
+
function _objects() {
|
|
43
|
+
const data = require("@teambit/objects");
|
|
44
|
+
_objects = function () {
|
|
45
45
|
return data;
|
|
46
46
|
};
|
|
47
47
|
return data;
|
|
@@ -160,7 +160,7 @@ var _default = exports.default = HostInitializerMain;
|
|
|
160
160
|
async function throwForOutOfSyncScope(consumer) {
|
|
161
161
|
if (!consumer.bitMap.isEmpty()) return;
|
|
162
162
|
const scopePath = consumer.scope.getPath();
|
|
163
|
-
const objectsPath =
|
|
163
|
+
const objectsPath = _objects().Repository.getPathByScopePath(scopePath);
|
|
164
164
|
const dirExist = await _fsExtra().default.pathExists(objectsPath);
|
|
165
165
|
if (!dirExist) return;
|
|
166
166
|
const hasObjects = !(await (0, _toolboxFs().isDirEmpty)(objectsPath));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","path","_interopRequireWildcard","_scopeModules","_workspaceModules","_legacy","_scope","_toolboxFs","_cli","_objectsWithoutConsumer","_hostInitializer","_initCmd","_createConsumer","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","HostInitializerMain","init","absPath","noGit","noPackageJson","reset","resetNew","resetLaneNew","resetHard","resetScope","force","workspaceConfigProps","generator","consumerInfo","getWorkspaceInfo","process","cwd","Error","consumerPath","name","basename","resetConsumer","consumer","createConsumer","scopePath","findScopePath","Scope","throwForOutOfSyncScope","write","provider","cli","hostInitializerMain","initCmd","InitCmd","register","exports","CLIAspect","MainRuntime","HostInitializerAspect","addRuntime","_default","bitMap","isEmpty","scope","getPath","objectsPath","Repository","getPathByScopePath","dirExist","fs","pathExists","hasObjects","isDirEmpty","ObjectsWithoutConsumer"],"sources":["host-initializer.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport * as path from 'path';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { getWorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';\nimport { Scope } from '@teambit/legacy.scope';\nimport { Repository } from '@teambit/scope.objects';\nimport { isDirEmpty } from '@teambit/toolbox.fs.is-dir-empty';\nimport { WorkspaceExtensionProps } from '@teambit/config';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ObjectsWithoutConsumer } from './objects-without-consumer';\nimport { HostInitializerAspect } from './host-initializer.aspect';\nimport { InitCmd } from './init-cmd';\nimport { createConsumer, resetConsumer } from './create-consumer';\n\nexport class HostInitializerMain {\n static async init(\n absPath?: string,\n noGit = false,\n noPackageJson = false,\n reset = false,\n resetNew = false,\n resetLaneNew = false,\n resetHard = false,\n resetScope = false,\n force = false,\n workspaceConfigProps: WorkspaceExtensionProps = {},\n generator?: string\n ): Promise<Consumer> {\n const consumerInfo = await getWorkspaceInfo(absPath || process.cwd());\n // if \"bit init\" was running without any flags, the user is probably trying to init a new workspace but wasn't aware\n // that he's already in a workspace.\n if (\n !absPath &&\n consumerInfo?.path &&\n consumerInfo.path !== process.cwd() &&\n !reset &&\n !resetHard &&\n !resetScope &&\n !resetNew &&\n !resetLaneNew\n ) {\n throw new Error(\n `error: unable to init a new workspace in an inner directory of an existing workspace at \"${consumerInfo.path}\"`\n );\n }\n const consumerPath = consumerInfo?.path || absPath || process.cwd();\n\n workspaceConfigProps = {\n ...workspaceConfigProps,\n name: workspaceConfigProps.name || path.basename(consumerPath),\n };\n\n if (reset || resetHard) {\n await resetConsumer(consumerPath, resetHard, noGit);\n }\n let consumer: Consumer | undefined;\n try {\n consumer = await createConsumer(consumerPath, noGit, noPackageJson, workspaceConfigProps, generator);\n } catch {\n // it's possible that at this stage the consumer fails to load due to scope issues.\n // still we want to load it to include its instance of \"scope.json\", so then later when \"consumer.write()\", we\n // don't lose some scope metadata\n }\n if (resetScope) {\n const scopePath = findScopePath(consumerPath);\n if (!scopePath) throw new Error(`fatal: scope not found in the path: ${consumerPath}`);\n await Scope.reset(scopePath, true);\n }\n if (!consumer) consumer = await createConsumer(consumerPath, noGit, noPackageJson, workspaceConfigProps);\n if (!force && !resetScope) {\n await throwForOutOfSyncScope(consumer);\n }\n if (resetNew) {\n await consumer.resetNew();\n }\n if (resetLaneNew) {\n await consumer.resetLaneNew();\n }\n return consumer.write();\n }\n\n static slots = [];\n static dependencies = [CLIAspect];\n static runtime = MainRuntime;\n static async provider([cli]: [CLIMain]) {\n const hostInitializerMain = new HostInitializerMain();\n const initCmd = new InitCmd(hostInitializerMain);\n cli.register(initCmd);\n return hostInitializerMain;\n }\n}\n\nHostInitializerAspect.addRuntime(HostInitializerMain);\n\nexport default HostInitializerMain;\n\n/**\n * throw an error when .bitmap is empty but a scope has objects.\n * a user may got into this state for reasons such as:\n * 1. deleting manually .bitmap hoping to re-start Bit from scratch. (probably unaware of `--reset-hard` flag).\n * 2. switching to a branch where Bit wasn't initialized\n * in which case, it's better to stop and show an error describing what needs to be done.\n * it can always be ignored by entering `--force` flag.\n */\nasync function throwForOutOfSyncScope(consumer: Consumer): Promise<void> {\n if (!consumer.bitMap.isEmpty()) return;\n const scopePath = consumer.scope.getPath();\n const objectsPath = Repository.getPathByScopePath(scopePath);\n const dirExist = await fs.pathExists(objectsPath);\n if (!dirExist) return;\n const hasObjects = !(await isDirEmpty(objectsPath));\n if (hasObjects) {\n throw new ObjectsWithoutConsumer(scopePath);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,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AAW,CAAC,CAAC;EACnD,IAAIM,UAAU,EAAE;IACd,MAAM,KAAIE,gDAAsB,EAAC7B,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","path","_interopRequireWildcard","_scopeModules","_workspaceModules","_legacy","_objects","_toolboxFs","_cli","_objectsWithoutConsumer","_hostInitializer","_initCmd","_createConsumer","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","HostInitializerMain","init","absPath","noGit","noPackageJson","reset","resetNew","resetLaneNew","resetHard","resetScope","force","workspaceConfigProps","generator","consumerInfo","getWorkspaceInfo","process","cwd","Error","consumerPath","name","basename","resetConsumer","consumer","createConsumer","scopePath","findScopePath","Scope","throwForOutOfSyncScope","write","provider","cli","hostInitializerMain","initCmd","InitCmd","register","exports","CLIAspect","MainRuntime","HostInitializerAspect","addRuntime","_default","bitMap","isEmpty","scope","getPath","objectsPath","Repository","getPathByScopePath","dirExist","fs","pathExists","hasObjects","isDirEmpty","ObjectsWithoutConsumer"],"sources":["host-initializer.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport * as path from 'path';\nimport { findScopePath } from '@teambit/scope.modules.find-scope-path';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { getWorkspaceInfo } from '@teambit/workspace.modules.workspace-locator';\nimport { Scope } from '@teambit/legacy.scope';\nimport { Repository } from '@teambit/objects';\nimport { isDirEmpty } from '@teambit/toolbox.fs.is-dir-empty';\nimport { WorkspaceExtensionProps } from '@teambit/config';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ObjectsWithoutConsumer } from './objects-without-consumer';\nimport { HostInitializerAspect } from './host-initializer.aspect';\nimport { InitCmd } from './init-cmd';\nimport { createConsumer, resetConsumer } from './create-consumer';\n\nexport class HostInitializerMain {\n static async init(\n absPath?: string,\n noGit = false,\n noPackageJson = false,\n reset = false,\n resetNew = false,\n resetLaneNew = false,\n resetHard = false,\n resetScope = false,\n force = false,\n workspaceConfigProps: WorkspaceExtensionProps = {},\n generator?: string\n ): Promise<Consumer> {\n const consumerInfo = await getWorkspaceInfo(absPath || process.cwd());\n // if \"bit init\" was running without any flags, the user is probably trying to init a new workspace but wasn't aware\n // that he's already in a workspace.\n if (\n !absPath &&\n consumerInfo?.path &&\n consumerInfo.path !== process.cwd() &&\n !reset &&\n !resetHard &&\n !resetScope &&\n !resetNew &&\n !resetLaneNew\n ) {\n throw new Error(\n `error: unable to init a new workspace in an inner directory of an existing workspace at \"${consumerInfo.path}\"`\n );\n }\n const consumerPath = consumerInfo?.path || absPath || process.cwd();\n\n workspaceConfigProps = {\n ...workspaceConfigProps,\n name: workspaceConfigProps.name || path.basename(consumerPath),\n };\n\n if (reset || resetHard) {\n await resetConsumer(consumerPath, resetHard, noGit);\n }\n let consumer: Consumer | undefined;\n try {\n consumer = await createConsumer(consumerPath, noGit, noPackageJson, workspaceConfigProps, generator);\n } catch {\n // it's possible that at this stage the consumer fails to load due to scope issues.\n // still we want to load it to include its instance of \"scope.json\", so then later when \"consumer.write()\", we\n // don't lose some scope metadata\n }\n if (resetScope) {\n const scopePath = findScopePath(consumerPath);\n if (!scopePath) throw new Error(`fatal: scope not found in the path: ${consumerPath}`);\n await Scope.reset(scopePath, true);\n }\n if (!consumer) consumer = await createConsumer(consumerPath, noGit, noPackageJson, workspaceConfigProps);\n if (!force && !resetScope) {\n await throwForOutOfSyncScope(consumer);\n }\n if (resetNew) {\n await consumer.resetNew();\n }\n if (resetLaneNew) {\n await consumer.resetLaneNew();\n }\n return consumer.write();\n }\n\n static slots = [];\n static dependencies = [CLIAspect];\n static runtime = MainRuntime;\n static async provider([cli]: [CLIMain]) {\n const hostInitializerMain = new HostInitializerMain();\n const initCmd = new InitCmd(hostInitializerMain);\n cli.register(initCmd);\n return hostInitializerMain;\n }\n}\n\nHostInitializerAspect.addRuntime(HostInitializerMain);\n\nexport default HostInitializerMain;\n\n/**\n * throw an error when .bitmap is empty but a scope has objects.\n * a user may got into this state for reasons such as:\n * 1. deleting manually .bitmap hoping to re-start Bit from scratch. (probably unaware of `--reset-hard` flag).\n * 2. switching to a branch where Bit wasn't initialized\n * in which case, it's better to stop and show an error describing what needs to be done.\n * it can always be ignored by entering `--force` flag.\n */\nasync function throwForOutOfSyncScope(consumer: Consumer): Promise<void> {\n if (!consumer.bitMap.isEmpty()) return;\n const scopePath = consumer.scope.getPath();\n const objectsPath = Repository.getPathByScopePath(scopePath);\n const dirExist = await fs.pathExists(objectsPath);\n if (!dirExist) return;\n const hasObjects = !(await isDirEmpty(objectsPath));\n if (hasObjects) {\n throw new ObjectsWithoutConsumer(scopePath);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAF,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,kBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,iBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA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AAA,mBAAA;AAAAb,eAAA,CA5EYa,mBAAmB,WAmEf,EAAE;AAAAb,eAAA,CAnENa,mBAAmB,kBAoER,CAACoC,gBAAS,CAAC;AAAAjD,eAAA,CApEtBa,mBAAmB,aAqEbqC,kBAAW;AAS9BC,wCAAqB,CAACC,UAAU,CAACvC,mBAAmB,CAAC;AAAC,IAAAwC,QAAA,GAAAL,OAAA,CAAA1E,OAAA,GAEvCuC,mBAAmB;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe2B,sBAAsBA,CAACL,QAAkB,EAAiB;EACvE,IAAI,CAACA,QAAQ,CAACmB,MAAM,CAACC,OAAO,CAAC,CAAC,EAAE;EAChC,MAAMlB,SAAS,GAAGF,QAAQ,CAACqB,KAAK,CAACC,OAAO,CAAC,CAAC;EAC1C,MAAMC,WAAW,GAAGC,qBAAU,CAACC,kBAAkB,CAACvB,SAAS,CAAC;EAC5D,MAAMwB,QAAQ,GAAG,MAAMC,kBAAE,CAACC,UAAU,CAACL,WAAW,CAAC;EACjD,IAAI,CAACG,QAAQ,EAAE;EACf,MAAMG,UAAU,GAAG,EAAE,MAAM,IAAAC,uBAAU,EAACP,WAAW,CAAC,CAAC;EACnD,IAAIM,UAAU,EAAE;IACd,MAAM,KAAIE,gDAAsB,EAAC7B,SAAS,CAAC;EAC7C;AACF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/host-initializer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.226",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/host-initializer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "host-initializer",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.226"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"chalk": "2.4.2",
|
|
15
15
|
"@teambit/harmony": "0.4.6",
|
|
16
16
|
"@teambit/bit-error": "0.0.404",
|
|
17
|
-
"@teambit/component.sources": "0.0.
|
|
18
|
-
"@teambit/config": "0.0.
|
|
19
|
-
"@teambit/legacy.bit-map": "0.0.
|
|
20
|
-
"@teambit/legacy.consumer": "0.0.
|
|
21
|
-
"@teambit/legacy.scope": "0.0.
|
|
17
|
+
"@teambit/component.sources": "0.0.71",
|
|
18
|
+
"@teambit/config": "0.0.1264",
|
|
19
|
+
"@teambit/legacy.bit-map": "0.0.76",
|
|
20
|
+
"@teambit/legacy.consumer": "0.0.19",
|
|
21
|
+
"@teambit/legacy.scope": "0.0.19",
|
|
22
22
|
"@teambit/legacy.utils": "0.0.13",
|
|
23
23
|
"@teambit/toolbox.string.random": "0.0.3",
|
|
24
|
-
"@teambit/cli": "0.0.
|
|
24
|
+
"@teambit/cli": "0.0.1090",
|
|
25
|
+
"@teambit/objects": "0.0.20",
|
|
25
26
|
"@teambit/scope.modules.find-scope-path": "0.0.6",
|
|
26
|
-
"@teambit/scope.objects": "0.0.18",
|
|
27
27
|
"@teambit/toolbox.fs.is-dir-empty": "0.0.3",
|
|
28
28
|
"@teambit/workspace.modules.workspace-locator": "0.0.6",
|
|
29
29
|
"@teambit/legacy.constants": "0.0.5",
|
|
30
30
|
"@teambit/legacy.global-config": "0.0.5",
|
|
31
|
-
"@teambit/legacy.scope-api": "0.0.
|
|
31
|
+
"@teambit/legacy.scope-api": "0.0.74"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/lodash": "4.14.165",
|
|
File without changes
|