@teambit/formatter 1.0.188 → 1.0.190

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.
@@ -0,0 +1,2913 @@
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": "VariableLikeSchema",
18
+ "location": {
19
+ "filePath": "formatter.aspect.ts",
20
+ "line": 3,
21
+ "character": 14
22
+ },
23
+ "signature": "const FormatterAspect: Aspect",
24
+ "name": "FormatterAspect",
25
+ "type": {
26
+ "__schema": "TypeRefSchema",
27
+ "location": {
28
+ "filePath": "formatter.aspect.ts",
29
+ "line": 3,
30
+ "character": 14
31
+ },
32
+ "name": "Aspect",
33
+ "componentId": {
34
+ "scope": "teambit.harmony",
35
+ "name": "harmony",
36
+ "version": "0.4.6"
37
+ }
38
+ },
39
+ "isOptional": false,
40
+ "defaultValue": "Aspect.create({\n id: 'teambit.defender/formatter',\n})"
41
+ },
42
+ {
43
+ "__schema": "ClassSchema",
44
+ "location": {
45
+ "filePath": "formatter.main.runtime.ts",
46
+ "line": 14,
47
+ "character": 1
48
+ },
49
+ "signature": "class FormatterMain",
50
+ "name": "FormatterMain",
51
+ "members": [
52
+ {
53
+ "__schema": "VariableLikeSchema",
54
+ "location": {
55
+ "filePath": "formatter.main.runtime.ts",
56
+ "line": 15,
57
+ "character": 3
58
+ },
59
+ "signature": "(property) FormatterMain.runtime: RuntimeDefinition",
60
+ "name": "runtime",
61
+ "type": {
62
+ "__schema": "InferenceTypeSchema",
63
+ "location": {
64
+ "filePath": "formatter.main.runtime.ts",
65
+ "line": 15,
66
+ "character": 3
67
+ },
68
+ "type": "RuntimeDefinition"
69
+ },
70
+ "isOptional": true,
71
+ "defaultValue": "MainRuntime"
72
+ },
73
+ {
74
+ "__schema": "ConstructorSchema",
75
+ "location": {
76
+ "filePath": "formatter.main.runtime.ts",
77
+ "line": 17,
78
+ "character": 3
79
+ },
80
+ "signature": "constructor FormatterMain(envs: EnvsMain, formatterService: FormatterService): FormatterMain",
81
+ "name": "constructor",
82
+ "params": [
83
+ {
84
+ "__schema": "ParameterSchema",
85
+ "location": {
86
+ "filePath": "formatter.main.runtime.ts",
87
+ "line": 17,
88
+ "character": 15
89
+ },
90
+ "name": "envs",
91
+ "type": {
92
+ "__schema": "TypeRefSchema",
93
+ "location": {
94
+ "filePath": "formatter.main.runtime.ts",
95
+ "line": 17,
96
+ "character": 29
97
+ },
98
+ "name": "EnvsMain",
99
+ "componentId": {
100
+ "scope": "teambit.envs",
101
+ "name": "envs"
102
+ }
103
+ },
104
+ "isOptional": false,
105
+ "isSpread": false
106
+ },
107
+ {
108
+ "__schema": "ParameterSchema",
109
+ "location": {
110
+ "filePath": "formatter.main.runtime.ts",
111
+ "line": 17,
112
+ "character": 39
113
+ },
114
+ "name": "formatterService",
115
+ "type": {
116
+ "__schema": "TypeRefSchema",
117
+ "location": {
118
+ "filePath": "formatter.main.runtime.ts",
119
+ "line": 17,
120
+ "character": 65
121
+ },
122
+ "name": "FormatterService",
123
+ "internalFilePath": "formatter.service.ts"
124
+ },
125
+ "isOptional": false,
126
+ "isSpread": false
127
+ }
128
+ ],
129
+ "returnType": {
130
+ "__schema": "ThisTypeSchema",
131
+ "location": {
132
+ "filePath": "formatter.main.runtime.ts",
133
+ "line": 14,
134
+ "character": 1
135
+ },
136
+ "name": "FormatterMain"
137
+ },
138
+ "modifiers": []
139
+ },
140
+ {
141
+ "__schema": "FunctionLikeSchema",
142
+ "location": {
143
+ "filePath": "formatter.main.runtime.ts",
144
+ "line": 22,
145
+ "character": 3
146
+ },
147
+ "doc": {
148
+ "__schema": "DocSchema",
149
+ "location": {
150
+ "filePath": "formatter.main.runtime.ts",
151
+ "line": 19,
152
+ "character": 3
153
+ },
154
+ "raw": "/**\n * format an array of components.\n */",
155
+ "comment": "format an array of components."
156
+ },
157
+ "signature": "(method) FormatterMain.format(components: Component[], opts: FormatterOptions): Promise<EnvsExecutionResult<FormatResults>>",
158
+ "name": "format",
159
+ "params": [
160
+ {
161
+ "__schema": "ParameterSchema",
162
+ "location": {
163
+ "filePath": "formatter.main.runtime.ts",
164
+ "line": 22,
165
+ "character": 16
166
+ },
167
+ "name": "components",
168
+ "type": {
169
+ "__schema": "TypeArraySchema",
170
+ "location": {
171
+ "filePath": "formatter.main.runtime.ts",
172
+ "line": 22,
173
+ "character": 28
174
+ },
175
+ "type": {
176
+ "__schema": "TypeRefSchema",
177
+ "location": {
178
+ "filePath": "formatter.main.runtime.ts",
179
+ "line": 22,
180
+ "character": 28
181
+ },
182
+ "name": "Component",
183
+ "componentId": {
184
+ "scope": "teambit.component",
185
+ "name": "component"
186
+ }
187
+ }
188
+ },
189
+ "isOptional": false,
190
+ "isSpread": false
191
+ },
192
+ {
193
+ "__schema": "ParameterSchema",
194
+ "location": {
195
+ "filePath": "formatter.main.runtime.ts",
196
+ "line": 22,
197
+ "character": 41
198
+ },
199
+ "name": "opts",
200
+ "type": {
201
+ "__schema": "TypeRefSchema",
202
+ "location": {
203
+ "filePath": "formatter.main.runtime.ts",
204
+ "line": 22,
205
+ "character": 47
206
+ },
207
+ "name": "FormatterOptions"
208
+ },
209
+ "isOptional": false,
210
+ "isSpread": false
211
+ }
212
+ ],
213
+ "returnType": {
214
+ "__schema": "InferenceTypeSchema",
215
+ "location": {
216
+ "filePath": "formatter.main.runtime.ts",
217
+ "line": 22,
218
+ "character": 3
219
+ },
220
+ "type": "Promise<EnvsExecutionResult<FormatResults>>"
221
+ },
222
+ "modifiers": [
223
+ "async"
224
+ ]
225
+ },
226
+ {
227
+ "__schema": "FunctionLikeSchema",
228
+ "location": {
229
+ "filePath": "formatter.main.runtime.ts",
230
+ "line": 31,
231
+ "character": 3
232
+ },
233
+ "doc": {
234
+ "__schema": "DocSchema",
235
+ "location": {
236
+ "filePath": "formatter.main.runtime.ts",
237
+ "line": 28,
238
+ "character": 3
239
+ },
240
+ "raw": "/**\n * check format an array of components.\n */",
241
+ "comment": "check format an array of components."
242
+ },
243
+ "signature": "(method) FormatterMain.check(components: Component[], opts: FormatterOptions): Promise<EnvsExecutionResult<FormatResults>>",
244
+ "name": "check",
245
+ "params": [
246
+ {
247
+ "__schema": "ParameterSchema",
248
+ "location": {
249
+ "filePath": "formatter.main.runtime.ts",
250
+ "line": 31,
251
+ "character": 15
252
+ },
253
+ "name": "components",
254
+ "type": {
255
+ "__schema": "TypeArraySchema",
256
+ "location": {
257
+ "filePath": "formatter.main.runtime.ts",
258
+ "line": 31,
259
+ "character": 27
260
+ },
261
+ "type": {
262
+ "__schema": "TypeRefSchema",
263
+ "location": {
264
+ "filePath": "formatter.main.runtime.ts",
265
+ "line": 31,
266
+ "character": 27
267
+ },
268
+ "name": "Component",
269
+ "componentId": {
270
+ "scope": "teambit.component",
271
+ "name": "component"
272
+ }
273
+ }
274
+ },
275
+ "isOptional": false,
276
+ "isSpread": false
277
+ },
278
+ {
279
+ "__schema": "ParameterSchema",
280
+ "location": {
281
+ "filePath": "formatter.main.runtime.ts",
282
+ "line": 31,
283
+ "character": 40
284
+ },
285
+ "name": "opts",
286
+ "type": {
287
+ "__schema": "TypeRefSchema",
288
+ "location": {
289
+ "filePath": "formatter.main.runtime.ts",
290
+ "line": 31,
291
+ "character": 46
292
+ },
293
+ "name": "FormatterOptions"
294
+ },
295
+ "isOptional": false,
296
+ "isSpread": false
297
+ }
298
+ ],
299
+ "returnType": {
300
+ "__schema": "InferenceTypeSchema",
301
+ "location": {
302
+ "filePath": "formatter.main.runtime.ts",
303
+ "line": 31,
304
+ "character": 3
305
+ },
306
+ "type": "Promise<EnvsExecutionResult<FormatResults>>"
307
+ },
308
+ "modifiers": [
309
+ "async"
310
+ ]
311
+ },
312
+ {
313
+ "__schema": "FunctionLikeSchema",
314
+ "location": {
315
+ "filePath": "formatter.main.runtime.ts",
316
+ "line": 37,
317
+ "character": 3
318
+ },
319
+ "signature": "(method) FormatterMain.getFormatter(context: ExecutionContext, options: FormatterOptions): Formatter",
320
+ "name": "getFormatter",
321
+ "params": [
322
+ {
323
+ "__schema": "ParameterSchema",
324
+ "location": {
325
+ "filePath": "formatter.main.runtime.ts",
326
+ "line": 37,
327
+ "character": 16
328
+ },
329
+ "name": "context",
330
+ "type": {
331
+ "__schema": "TypeRefSchema",
332
+ "location": {
333
+ "filePath": "formatter.main.runtime.ts",
334
+ "line": 37,
335
+ "character": 25
336
+ },
337
+ "name": "ExecutionContext",
338
+ "componentId": {
339
+ "scope": "teambit.envs",
340
+ "name": "envs"
341
+ }
342
+ },
343
+ "isOptional": false,
344
+ "isSpread": false
345
+ },
346
+ {
347
+ "__schema": "ParameterSchema",
348
+ "location": {
349
+ "filePath": "formatter.main.runtime.ts",
350
+ "line": 37,
351
+ "character": 43
352
+ },
353
+ "name": "options",
354
+ "type": {
355
+ "__schema": "TypeRefSchema",
356
+ "location": {
357
+ "filePath": "formatter.main.runtime.ts",
358
+ "line": 37,
359
+ "character": 52
360
+ },
361
+ "name": "FormatterOptions"
362
+ },
363
+ "isOptional": false,
364
+ "isSpread": false
365
+ }
366
+ ],
367
+ "returnType": {
368
+ "__schema": "TypeRefSchema",
369
+ "location": {
370
+ "filePath": "formatter.main.runtime.ts",
371
+ "line": 37,
372
+ "character": 3
373
+ },
374
+ "name": "Formatter"
375
+ },
376
+ "modifiers": []
377
+ },
378
+ {
379
+ "__schema": "FunctionLikeSchema",
380
+ "location": {
381
+ "filePath": "formatter.main.runtime.ts",
382
+ "line": 52,
383
+ "character": 3
384
+ },
385
+ "doc": {
386
+ "__schema": "DocSchema",
387
+ "location": {
388
+ "filePath": "formatter.main.runtime.ts",
389
+ "line": 48,
390
+ "character": 3
391
+ },
392
+ "raw": "/**\n * create a format task for build pipelines.\n * @param name name of the task.\n */",
393
+ "comment": "create a format task for build pipelines.",
394
+ "tags": [
395
+ {
396
+ "__schema": "PropertyLikeTagSchema",
397
+ "location": {
398
+ "filePath": "formatter.main.runtime.ts",
399
+ "line": 50,
400
+ "character": 6
401
+ },
402
+ "name": "name",
403
+ "tagName": "parameter",
404
+ "comment": "name of the task."
405
+ }
406
+ ]
407
+ },
408
+ "signature": "(method) FormatterMain.createTask(name?: string): FormatTask",
409
+ "name": "createTask",
410
+ "params": [
411
+ {
412
+ "__schema": "ParameterSchema",
413
+ "location": {
414
+ "filePath": "formatter.main.runtime.ts",
415
+ "line": 52,
416
+ "character": 14
417
+ },
418
+ "name": "name",
419
+ "type": {
420
+ "__schema": "KeywordTypeSchema",
421
+ "location": {
422
+ "filePath": "formatter.main.runtime.ts",
423
+ "line": 52,
424
+ "character": 21
425
+ },
426
+ "name": "string"
427
+ },
428
+ "isOptional": true,
429
+ "isSpread": false
430
+ }
431
+ ],
432
+ "returnType": {
433
+ "__schema": "TypeRefSchema",
434
+ "location": {
435
+ "filePath": "formatter.main.runtime.ts",
436
+ "line": 52,
437
+ "character": 3
438
+ },
439
+ "name": "FormatTask"
440
+ },
441
+ "modifiers": []
442
+ },
443
+ {
444
+ "__schema": "VariableLikeSchema",
445
+ "location": {
446
+ "filePath": "formatter.main.runtime.ts",
447
+ "line": 56,
448
+ "character": 3
449
+ },
450
+ "signature": "(property) FormatterMain.dependencies: Aspect[]",
451
+ "name": "dependencies",
452
+ "type": {
453
+ "__schema": "InferenceTypeSchema",
454
+ "location": {
455
+ "filePath": "formatter.main.runtime.ts",
456
+ "line": 56,
457
+ "character": 3
458
+ },
459
+ "type": "Aspect[]"
460
+ },
461
+ "isOptional": true,
462
+ "defaultValue": "[EnvsAspect, CLIAspect, ComponentAspect, LoggerAspect, WorkspaceAspect]"
463
+ },
464
+ {
465
+ "__schema": "VariableLikeSchema",
466
+ "location": {
467
+ "filePath": "formatter.main.runtime.ts",
468
+ "line": 58,
469
+ "character": 3
470
+ },
471
+ "signature": "(property) FormatterMain.defaultConfig: FormatterConfig",
472
+ "name": "defaultConfig",
473
+ "type": {
474
+ "__schema": "TypeRefSchema",
475
+ "location": {
476
+ "filePath": "formatter.main.runtime.ts",
477
+ "line": 58,
478
+ "character": 3
479
+ },
480
+ "name": "FormatterConfig"
481
+ },
482
+ "isOptional": true,
483
+ "defaultValue": "{}"
484
+ },
485
+ {
486
+ "__schema": "FunctionLikeSchema",
487
+ "location": {
488
+ "filePath": "formatter.main.runtime.ts",
489
+ "line": 60,
490
+ "character": 3
491
+ },
492
+ "signature": "(method) FormatterMain.provider([envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace], config: FormatterConfig): Promise<FormatterMain>",
493
+ "name": "provider",
494
+ "params": [
495
+ {
496
+ "__schema": "ParameterSchema",
497
+ "location": {
498
+ "filePath": "formatter.main.runtime.ts",
499
+ "line": 61,
500
+ "character": 5
501
+ },
502
+ "name": "[ envs, cli, component, loggerAspect, workspace ]",
503
+ "type": {
504
+ "__schema": "TupleTypeSchema",
505
+ "location": {
506
+ "filePath": "formatter.main.runtime.ts",
507
+ "line": 61,
508
+ "character": 54
509
+ },
510
+ "elements": [
511
+ {
512
+ "__schema": "TypeRefSchema",
513
+ "location": {
514
+ "filePath": "formatter.main.runtime.ts",
515
+ "line": 61,
516
+ "character": 55
517
+ },
518
+ "name": "EnvsMain",
519
+ "componentId": {
520
+ "scope": "teambit.envs",
521
+ "name": "envs"
522
+ }
523
+ },
524
+ {
525
+ "__schema": "TypeRefSchema",
526
+ "location": {
527
+ "filePath": "formatter.main.runtime.ts",
528
+ "line": 61,
529
+ "character": 65
530
+ },
531
+ "name": "CLIMain",
532
+ "componentId": {
533
+ "scope": "teambit.harmony",
534
+ "name": "cli"
535
+ }
536
+ },
537
+ {
538
+ "__schema": "TypeRefSchema",
539
+ "location": {
540
+ "filePath": "formatter.main.runtime.ts",
541
+ "line": 61,
542
+ "character": 74
543
+ },
544
+ "name": "ComponentMain",
545
+ "componentId": {
546
+ "scope": "teambit.component",
547
+ "name": "component"
548
+ }
549
+ },
550
+ {
551
+ "__schema": "TypeRefSchema",
552
+ "location": {
553
+ "filePath": "formatter.main.runtime.ts",
554
+ "line": 61,
555
+ "character": 89
556
+ },
557
+ "name": "LoggerMain",
558
+ "componentId": {
559
+ "scope": "teambit.harmony",
560
+ "name": "logger"
561
+ }
562
+ },
563
+ {
564
+ "__schema": "TypeRefSchema",
565
+ "location": {
566
+ "filePath": "formatter.main.runtime.ts",
567
+ "line": 61,
568
+ "character": 101
569
+ },
570
+ "name": "Workspace",
571
+ "componentId": {
572
+ "scope": "teambit.workspace",
573
+ "name": "workspace"
574
+ }
575
+ }
576
+ ]
577
+ },
578
+ "isOptional": false,
579
+ "isSpread": false
580
+ },
581
+ {
582
+ "__schema": "ParameterSchema",
583
+ "location": {
584
+ "filePath": "formatter.main.runtime.ts",
585
+ "line": 62,
586
+ "character": 5
587
+ },
588
+ "name": "config",
589
+ "type": {
590
+ "__schema": "TypeRefSchema",
591
+ "location": {
592
+ "filePath": "formatter.main.runtime.ts",
593
+ "line": 62,
594
+ "character": 13
595
+ },
596
+ "name": "FormatterConfig"
597
+ },
598
+ "isOptional": false,
599
+ "isSpread": false
600
+ }
601
+ ],
602
+ "returnType": {
603
+ "__schema": "InferenceTypeSchema",
604
+ "location": {
605
+ "filePath": "formatter.main.runtime.ts",
606
+ "line": 60,
607
+ "character": 3
608
+ },
609
+ "type": "Promise<FormatterMain>"
610
+ },
611
+ "modifiers": [
612
+ "static",
613
+ "async"
614
+ ]
615
+ }
616
+ ],
617
+ "extendsNodes": [],
618
+ "implementNodes": []
619
+ },
620
+ {
621
+ "__schema": "TypeSchema",
622
+ "location": {
623
+ "filePath": "formatter.main.runtime.ts",
624
+ "line": 13,
625
+ "character": 1
626
+ },
627
+ "signature": "type FormatterConfig = {}",
628
+ "name": "FormatterConfig",
629
+ "type": {
630
+ "__schema": "TypeLiteralSchema",
631
+ "location": {
632
+ "filePath": "formatter.main.runtime.ts",
633
+ "line": 13,
634
+ "character": 31
635
+ },
636
+ "members": []
637
+ }
638
+ },
639
+ {
640
+ "__schema": "TypeSchema",
641
+ "location": {
642
+ "filePath": "formatter.ts",
643
+ "line": 33,
644
+ "character": 1
645
+ },
646
+ "signature": "type FormatResults = {\n results: ComponentFormatResult[];\n errors: Error[];\n}",
647
+ "name": "FormatResults",
648
+ "type": {
649
+ "__schema": "TypeLiteralSchema",
650
+ "location": {
651
+ "filePath": "formatter.ts",
652
+ "line": 33,
653
+ "character": 29
654
+ },
655
+ "members": [
656
+ {
657
+ "__schema": "VariableLikeSchema",
658
+ "location": {
659
+ "filePath": "formatter.ts",
660
+ "line": 34,
661
+ "character": 3
662
+ },
663
+ "signature": "(property) results: ComponentFormatResult[]",
664
+ "name": "results",
665
+ "type": {
666
+ "__schema": "TypeArraySchema",
667
+ "location": {
668
+ "filePath": "formatter.ts",
669
+ "line": 34,
670
+ "character": 12
671
+ },
672
+ "type": {
673
+ "__schema": "TypeRefSchema",
674
+ "location": {
675
+ "filePath": "formatter.ts",
676
+ "line": 34,
677
+ "character": 12
678
+ },
679
+ "name": "ComponentFormatResult"
680
+ }
681
+ },
682
+ "isOptional": false
683
+ },
684
+ {
685
+ "__schema": "VariableLikeSchema",
686
+ "location": {
687
+ "filePath": "formatter.ts",
688
+ "line": 35,
689
+ "character": 3
690
+ },
691
+ "signature": "(property) errors: Error[]",
692
+ "name": "errors",
693
+ "type": {
694
+ "__schema": "TypeArraySchema",
695
+ "location": {
696
+ "filePath": "formatter.ts",
697
+ "line": 35,
698
+ "character": 11
699
+ },
700
+ "type": {
701
+ "__schema": "TypeRefSchema",
702
+ "location": {
703
+ "filePath": "formatter.ts",
704
+ "line": 35,
705
+ "character": 11
706
+ },
707
+ "name": "Error"
708
+ }
709
+ },
710
+ "isOptional": false
711
+ }
712
+ ]
713
+ }
714
+ },
715
+ {
716
+ "__schema": "InterfaceSchema",
717
+ "location": {
718
+ "filePath": "formatter.ts",
719
+ "line": 38,
720
+ "character": 1
721
+ },
722
+ "signature": "interface Formatter",
723
+ "name": "Formatter",
724
+ "members": [
725
+ {
726
+ "__schema": "VariableLikeSchema",
727
+ "location": {
728
+ "filePath": "formatter.ts",
729
+ "line": 39,
730
+ "character": 3
731
+ },
732
+ "signature": "(property) Formatter.id: string",
733
+ "name": "id",
734
+ "type": {
735
+ "__schema": "KeywordTypeSchema",
736
+ "location": {
737
+ "filePath": "formatter.ts",
738
+ "line": 39,
739
+ "character": 7
740
+ },
741
+ "name": "string"
742
+ },
743
+ "isOptional": false
744
+ },
745
+ {
746
+ "__schema": "FunctionLikeSchema",
747
+ "location": {
748
+ "filePath": "formatter.ts",
749
+ "line": 40,
750
+ "character": 3
751
+ },
752
+ "signature": "(method) Formatter.format(context: FormatterContext): Promise<FormatResults>",
753
+ "name": "format",
754
+ "params": [
755
+ {
756
+ "__schema": "ParameterSchema",
757
+ "location": {
758
+ "filePath": "formatter.ts",
759
+ "line": 40,
760
+ "character": 10
761
+ },
762
+ "name": "context",
763
+ "type": {
764
+ "__schema": "TypeRefSchema",
765
+ "location": {
766
+ "filePath": "formatter.ts",
767
+ "line": 40,
768
+ "character": 19
769
+ },
770
+ "name": "FormatterContext"
771
+ },
772
+ "isOptional": false,
773
+ "isSpread": false
774
+ }
775
+ ],
776
+ "returnType": {
777
+ "__schema": "TypeRefSchema",
778
+ "location": {
779
+ "filePath": "formatter.ts",
780
+ "line": 40,
781
+ "character": 38
782
+ },
783
+ "name": "Promise",
784
+ "typeArgs": [
785
+ {
786
+ "__schema": "TypeRefSchema",
787
+ "location": {
788
+ "filePath": "formatter.ts",
789
+ "line": 40,
790
+ "character": 46
791
+ },
792
+ "name": "FormatResults"
793
+ }
794
+ ]
795
+ },
796
+ "modifiers": []
797
+ },
798
+ {
799
+ "__schema": "FunctionLikeSchema",
800
+ "location": {
801
+ "filePath": "formatter.ts",
802
+ "line": 41,
803
+ "character": 3
804
+ },
805
+ "signature": "(method) Formatter.formatSnippet(snippet: string, filepath?: string): Promise<string>",
806
+ "name": "formatSnippet",
807
+ "params": [
808
+ {
809
+ "__schema": "ParameterSchema",
810
+ "location": {
811
+ "filePath": "formatter.ts",
812
+ "line": 41,
813
+ "character": 17
814
+ },
815
+ "name": "snippet",
816
+ "type": {
817
+ "__schema": "KeywordTypeSchema",
818
+ "location": {
819
+ "filePath": "formatter.ts",
820
+ "line": 41,
821
+ "character": 26
822
+ },
823
+ "name": "string"
824
+ },
825
+ "isOptional": false,
826
+ "isSpread": false
827
+ },
828
+ {
829
+ "__schema": "ParameterSchema",
830
+ "location": {
831
+ "filePath": "formatter.ts",
832
+ "line": 41,
833
+ "character": 34
834
+ },
835
+ "name": "filepath",
836
+ "type": {
837
+ "__schema": "KeywordTypeSchema",
838
+ "location": {
839
+ "filePath": "formatter.ts",
840
+ "line": 41,
841
+ "character": 45
842
+ },
843
+ "name": "string"
844
+ },
845
+ "isOptional": true,
846
+ "isSpread": false
847
+ }
848
+ ],
849
+ "returnType": {
850
+ "__schema": "TypeRefSchema",
851
+ "location": {
852
+ "filePath": "formatter.ts",
853
+ "line": 41,
854
+ "character": 54
855
+ },
856
+ "name": "Promise",
857
+ "typeArgs": [
858
+ {
859
+ "__schema": "KeywordTypeSchema",
860
+ "location": {
861
+ "filePath": "formatter.ts",
862
+ "line": 41,
863
+ "character": 62
864
+ },
865
+ "name": "string"
866
+ }
867
+ ]
868
+ },
869
+ "modifiers": []
870
+ },
871
+ {
872
+ "__schema": "FunctionLikeSchema",
873
+ "location": {
874
+ "filePath": "formatter.ts",
875
+ "line": 42,
876
+ "character": 3
877
+ },
878
+ "signature": "(method) Formatter.check(context: FormatterContext): Promise<FormatResults>",
879
+ "name": "check",
880
+ "params": [
881
+ {
882
+ "__schema": "ParameterSchema",
883
+ "location": {
884
+ "filePath": "formatter.ts",
885
+ "line": 42,
886
+ "character": 9
887
+ },
888
+ "name": "context",
889
+ "type": {
890
+ "__schema": "TypeRefSchema",
891
+ "location": {
892
+ "filePath": "formatter.ts",
893
+ "line": 42,
894
+ "character": 18
895
+ },
896
+ "name": "FormatterContext"
897
+ },
898
+ "isOptional": false,
899
+ "isSpread": false
900
+ }
901
+ ],
902
+ "returnType": {
903
+ "__schema": "TypeRefSchema",
904
+ "location": {
905
+ "filePath": "formatter.ts",
906
+ "line": 42,
907
+ "character": 37
908
+ },
909
+ "name": "Promise",
910
+ "typeArgs": [
911
+ {
912
+ "__schema": "TypeRefSchema",
913
+ "location": {
914
+ "filePath": "formatter.ts",
915
+ "line": 42,
916
+ "character": 45
917
+ },
918
+ "name": "FormatResults"
919
+ }
920
+ ]
921
+ },
922
+ "modifiers": []
923
+ }
924
+ ],
925
+ "extendsNodes": []
926
+ },
927
+ {
928
+ "__schema": "TypeSchema",
929
+ "location": {
930
+ "filePath": "formatter.ts",
931
+ "line": 16,
932
+ "character": 1
933
+ },
934
+ "signature": "type FileFormatResult = {\n filePath: string;\n hasIssues: boolean;\n newContent?: string | undefined;\n}",
935
+ "name": "FileFormatResult",
936
+ "type": {
937
+ "__schema": "TypeLiteralSchema",
938
+ "location": {
939
+ "filePath": "formatter.ts",
940
+ "line": 16,
941
+ "character": 32
942
+ },
943
+ "members": [
944
+ {
945
+ "__schema": "VariableLikeSchema",
946
+ "location": {
947
+ "filePath": "formatter.ts",
948
+ "line": 20,
949
+ "character": 3
950
+ },
951
+ "doc": {
952
+ "__schema": "DocSchema",
953
+ "location": {
954
+ "filePath": "formatter.ts",
955
+ "line": 17,
956
+ "character": 3
957
+ },
958
+ "raw": "/**\n * path of the formatted file.\n */",
959
+ "comment": "path of the formatted file."
960
+ },
961
+ "signature": "(property) filePath: string",
962
+ "name": "filePath",
963
+ "type": {
964
+ "__schema": "KeywordTypeSchema",
965
+ "location": {
966
+ "filePath": "formatter.ts",
967
+ "line": 20,
968
+ "character": 13
969
+ },
970
+ "name": "string"
971
+ },
972
+ "isOptional": false
973
+ },
974
+ {
975
+ "__schema": "VariableLikeSchema",
976
+ "location": {
977
+ "filePath": "formatter.ts",
978
+ "line": 25,
979
+ "character": 3
980
+ },
981
+ "doc": {
982
+ "__schema": "DocSchema",
983
+ "location": {
984
+ "filePath": "formatter.ts",
985
+ "line": 22,
986
+ "character": 3
987
+ },
988
+ "raw": "/**\n * Does the file has formatting issues (needs format)\n */",
989
+ "comment": "Does the file has formatting issues (needs format)"
990
+ },
991
+ "signature": "(property) hasIssues: boolean",
992
+ "name": "hasIssues",
993
+ "type": {
994
+ "__schema": "KeywordTypeSchema",
995
+ "location": {
996
+ "filePath": "formatter.ts",
997
+ "line": 25,
998
+ "character": 14
999
+ },
1000
+ "name": "boolean"
1001
+ },
1002
+ "isOptional": false
1003
+ },
1004
+ {
1005
+ "__schema": "VariableLikeSchema",
1006
+ "location": {
1007
+ "filePath": "formatter.ts",
1008
+ "line": 30,
1009
+ "character": 3
1010
+ },
1011
+ "doc": {
1012
+ "__schema": "DocSchema",
1013
+ "location": {
1014
+ "filePath": "formatter.ts",
1015
+ "line": 27,
1016
+ "character": 3
1017
+ },
1018
+ "raw": "/**\n * The new file content after the formatting\n */",
1019
+ "comment": "The new file content after the formatting"
1020
+ },
1021
+ "signature": "(property) newContent?: string | undefined",
1022
+ "name": "newContent",
1023
+ "type": {
1024
+ "__schema": "KeywordTypeSchema",
1025
+ "location": {
1026
+ "filePath": "formatter.ts",
1027
+ "line": 30,
1028
+ "character": 16
1029
+ },
1030
+ "name": "string"
1031
+ },
1032
+ "isOptional": true
1033
+ }
1034
+ ]
1035
+ }
1036
+ },
1037
+ {
1038
+ "__schema": "TypeSchema",
1039
+ "location": {
1040
+ "filePath": "formatter.ts",
1041
+ "line": 4,
1042
+ "character": 1
1043
+ },
1044
+ "signature": "type ComponentFormatResult = {\n component: Component;\n results: FileFormatResult[];\n}",
1045
+ "name": "ComponentFormatResult",
1046
+ "type": {
1047
+ "__schema": "TypeLiteralSchema",
1048
+ "location": {
1049
+ "filePath": "formatter.ts",
1050
+ "line": 4,
1051
+ "character": 37
1052
+ },
1053
+ "members": [
1054
+ {
1055
+ "__schema": "VariableLikeSchema",
1056
+ "location": {
1057
+ "filePath": "formatter.ts",
1058
+ "line": 8,
1059
+ "character": 3
1060
+ },
1061
+ "doc": {
1062
+ "__schema": "DocSchema",
1063
+ "location": {
1064
+ "filePath": "formatter.ts",
1065
+ "line": 5,
1066
+ "character": 3
1067
+ },
1068
+ "raw": "/**\n * the formatted component.\n */",
1069
+ "comment": "the formatted component."
1070
+ },
1071
+ "signature": "(property) component: Component",
1072
+ "name": "component",
1073
+ "type": {
1074
+ "__schema": "TypeRefSchema",
1075
+ "location": {
1076
+ "filePath": "formatter.ts",
1077
+ "line": 8,
1078
+ "character": 3
1079
+ },
1080
+ "name": "Component",
1081
+ "componentId": {
1082
+ "scope": "teambit.component",
1083
+ "name": "component"
1084
+ }
1085
+ },
1086
+ "isOptional": false
1087
+ },
1088
+ {
1089
+ "__schema": "VariableLikeSchema",
1090
+ "location": {
1091
+ "filePath": "formatter.ts",
1092
+ "line": 13,
1093
+ "character": 3
1094
+ },
1095
+ "doc": {
1096
+ "__schema": "DocSchema",
1097
+ "location": {
1098
+ "filePath": "formatter.ts",
1099
+ "line": 10,
1100
+ "character": 3
1101
+ },
1102
+ "raw": "/**\n * format results for each file of the component.\n */",
1103
+ "comment": "format results for each file of the component."
1104
+ },
1105
+ "signature": "(property) results: FileFormatResult[]",
1106
+ "name": "results",
1107
+ "type": {
1108
+ "__schema": "TypeArraySchema",
1109
+ "location": {
1110
+ "filePath": "formatter.ts",
1111
+ "line": 13,
1112
+ "character": 12
1113
+ },
1114
+ "type": {
1115
+ "__schema": "TypeRefSchema",
1116
+ "location": {
1117
+ "filePath": "formatter.ts",
1118
+ "line": 13,
1119
+ "character": 12
1120
+ },
1121
+ "name": "FileFormatResult"
1122
+ }
1123
+ },
1124
+ "isOptional": false
1125
+ }
1126
+ ]
1127
+ }
1128
+ },
1129
+ {
1130
+ "__schema": "ClassSchema",
1131
+ "location": {
1132
+ "filePath": "format.task.ts",
1133
+ "line": 4,
1134
+ "character": 1
1135
+ },
1136
+ "signature": "class FormatTask",
1137
+ "name": "FormatTask",
1138
+ "members": [
1139
+ {
1140
+ "__schema": "ConstructorSchema",
1141
+ "location": {
1142
+ "filePath": "format.task.ts",
1143
+ "line": 5,
1144
+ "character": 3
1145
+ },
1146
+ "signature": "constructor FormatTask(aspectId: string, name?: string): FormatTask",
1147
+ "name": "constructor",
1148
+ "params": [
1149
+ {
1150
+ "__schema": "ParameterSchema",
1151
+ "location": {
1152
+ "filePath": "format.task.ts",
1153
+ "line": 5,
1154
+ "character": 15
1155
+ },
1156
+ "name": "aspectId",
1157
+ "type": {
1158
+ "__schema": "KeywordTypeSchema",
1159
+ "location": {
1160
+ "filePath": "format.task.ts",
1161
+ "line": 5,
1162
+ "character": 34
1163
+ },
1164
+ "name": "string"
1165
+ },
1166
+ "isOptional": false,
1167
+ "isSpread": false
1168
+ },
1169
+ {
1170
+ "__schema": "ParameterSchema",
1171
+ "location": {
1172
+ "filePath": "format.task.ts",
1173
+ "line": 5,
1174
+ "character": 42
1175
+ },
1176
+ "name": "name",
1177
+ "type": {
1178
+ "__schema": "InferenceTypeSchema",
1179
+ "location": {
1180
+ "filePath": "format.task.ts",
1181
+ "line": 5,
1182
+ "character": 42
1183
+ },
1184
+ "type": "string"
1185
+ },
1186
+ "isOptional": true,
1187
+ "defaultValue": "'format'",
1188
+ "isSpread": false
1189
+ }
1190
+ ],
1191
+ "returnType": {
1192
+ "__schema": "ThisTypeSchema",
1193
+ "location": {
1194
+ "filePath": "format.task.ts",
1195
+ "line": 4,
1196
+ "character": 1
1197
+ },
1198
+ "name": "FormatTask"
1199
+ },
1200
+ "modifiers": []
1201
+ },
1202
+ {
1203
+ "__schema": "FunctionLikeSchema",
1204
+ "location": {
1205
+ "filePath": "format.task.ts",
1206
+ "line": 7,
1207
+ "character": 3
1208
+ },
1209
+ "signature": "(method) FormatTask.execute(context: BuildContext): Promise<BuiltTaskResult>",
1210
+ "name": "execute",
1211
+ "params": [
1212
+ {
1213
+ "__schema": "ParameterSchema",
1214
+ "location": {
1215
+ "filePath": "format.task.ts",
1216
+ "line": 7,
1217
+ "character": 17
1218
+ },
1219
+ "name": "context",
1220
+ "type": {
1221
+ "__schema": "TypeRefSchema",
1222
+ "location": {
1223
+ "filePath": "format.task.ts",
1224
+ "line": 7,
1225
+ "character": 26
1226
+ },
1227
+ "name": "BuildContext",
1228
+ "componentId": {
1229
+ "scope": "teambit.pipelines",
1230
+ "name": "builder"
1231
+ }
1232
+ },
1233
+ "isOptional": false,
1234
+ "isSpread": false
1235
+ }
1236
+ ],
1237
+ "returnType": {
1238
+ "__schema": "TypeRefSchema",
1239
+ "location": {
1240
+ "filePath": "format.task.ts",
1241
+ "line": 7,
1242
+ "character": 41
1243
+ },
1244
+ "name": "Promise",
1245
+ "typeArgs": [
1246
+ {
1247
+ "__schema": "TypeRefSchema",
1248
+ "location": {
1249
+ "filePath": "format.task.ts",
1250
+ "line": 7,
1251
+ "character": 49
1252
+ },
1253
+ "name": "BuiltTaskResult",
1254
+ "componentId": {
1255
+ "scope": "teambit.pipelines",
1256
+ "name": "builder"
1257
+ }
1258
+ }
1259
+ ]
1260
+ },
1261
+ "modifiers": [
1262
+ "async"
1263
+ ]
1264
+ }
1265
+ ],
1266
+ "extendsNodes": [],
1267
+ "implementNodes": [
1268
+ {
1269
+ "__schema": "ExpressionWithTypeArgumentsSchema",
1270
+ "location": {
1271
+ "filePath": "format.task.ts",
1272
+ "line": 4,
1273
+ "character": 36
1274
+ },
1275
+ "name": "implements BuildTask",
1276
+ "typeArgs": [],
1277
+ "expression": {
1278
+ "__schema": "TypeRefSchema",
1279
+ "location": {
1280
+ "filePath": "format.task.ts",
1281
+ "line": 4,
1282
+ "character": 36
1283
+ },
1284
+ "name": "BuildTask",
1285
+ "componentId": {
1286
+ "_legacy": {
1287
+ "scope": "teambit.defender",
1288
+ "name": "formatter",
1289
+ "version": "1.0.190"
1290
+ },
1291
+ "_scope": "teambit.defender"
1292
+ }
1293
+ }
1294
+ }
1295
+ ]
1296
+ },
1297
+ {
1298
+ "__schema": "InterfaceSchema",
1299
+ "location": {
1300
+ "filePath": "formatter-env-type.ts",
1301
+ "line": 4,
1302
+ "character": 1
1303
+ },
1304
+ "signature": "interface FormatterEnv",
1305
+ "name": "FormatterEnv",
1306
+ "members": [
1307
+ {
1308
+ "__schema": "FunctionLikeSchema",
1309
+ "location": {
1310
+ "filePath": "formatter-env-type.ts",
1311
+ "line": 8,
1312
+ "character": 3
1313
+ },
1314
+ "doc": {
1315
+ "__schema": "DocSchema",
1316
+ "location": {
1317
+ "filePath": "formatter-env-type.ts",
1318
+ "line": 5,
1319
+ "character": 3
1320
+ },
1321
+ "raw": "/**\n * return a Formatter instance.\n */",
1322
+ "comment": "return a Formatter instance."
1323
+ },
1324
+ "signature": "(method) FormatterEnv.formatter(): EnvHandler<Formatter>",
1325
+ "name": "formatter",
1326
+ "params": [],
1327
+ "returnType": {
1328
+ "__schema": "TypeRefSchema",
1329
+ "location": {
1330
+ "filePath": "formatter-env-type.ts",
1331
+ "line": 8,
1332
+ "character": 16
1333
+ },
1334
+ "name": "EnvHandler",
1335
+ "componentId": {
1336
+ "scope": "teambit.envs",
1337
+ "name": "envs"
1338
+ },
1339
+ "typeArgs": [
1340
+ {
1341
+ "__schema": "TypeRefSchema",
1342
+ "location": {
1343
+ "filePath": "formatter-env-type.ts",
1344
+ "line": 8,
1345
+ "character": 27
1346
+ },
1347
+ "name": "Formatter"
1348
+ }
1349
+ ]
1350
+ },
1351
+ "modifiers": []
1352
+ }
1353
+ ],
1354
+ "extendsNodes": []
1355
+ },
1356
+ {
1357
+ "__schema": "InterfaceSchema",
1358
+ "location": {
1359
+ "filePath": "formatter-context.ts",
1360
+ "line": 4,
1361
+ "character": 1
1362
+ },
1363
+ "signature": "interface FormatterContext",
1364
+ "name": "FormatterContext",
1365
+ "members": [],
1366
+ "extendsNodes": [
1367
+ {
1368
+ "__schema": "ExpressionWithTypeArgumentsSchema",
1369
+ "location": {
1370
+ "filePath": "formatter-context.ts",
1371
+ "line": 4,
1372
+ "character": 43
1373
+ },
1374
+ "name": "extends ExecutionContext, FormatterOptions",
1375
+ "typeArgs": [],
1376
+ "expression": {
1377
+ "__schema": "TypeRefSchema",
1378
+ "location": {
1379
+ "filePath": "formatter-context.ts",
1380
+ "line": 4,
1381
+ "character": 43
1382
+ },
1383
+ "name": "ExecutionContext",
1384
+ "componentId": {
1385
+ "_legacy": {
1386
+ "scope": "teambit.defender",
1387
+ "name": "formatter",
1388
+ "version": "1.0.190"
1389
+ },
1390
+ "_scope": "teambit.defender"
1391
+ }
1392
+ }
1393
+ },
1394
+ {
1395
+ "__schema": "ExpressionWithTypeArgumentsSchema",
1396
+ "location": {
1397
+ "filePath": "formatter-context.ts",
1398
+ "line": 4,
1399
+ "character": 61
1400
+ },
1401
+ "name": "extends ExecutionContext, FormatterOptions",
1402
+ "typeArgs": [],
1403
+ "expression": {
1404
+ "__schema": "TypeSchema",
1405
+ "location": {
1406
+ "filePath": "formatter-context.ts",
1407
+ "line": 3,
1408
+ "character": 1
1409
+ },
1410
+ "name": "FormatterOptions",
1411
+ "signature": "type FormatterOptions = {\n check?: boolean | undefined;\n}",
1412
+ "type": {
1413
+ "__schema": "TypeLiteralSchema",
1414
+ "location": {
1415
+ "filePath": "formatter-context.ts",
1416
+ "line": 3,
1417
+ "character": 32
1418
+ },
1419
+ "members": [
1420
+ {
1421
+ "__schema": "VariableLikeSchema",
1422
+ "location": {
1423
+ "filePath": "formatter-context.ts",
1424
+ "line": 3,
1425
+ "character": 34
1426
+ },
1427
+ "name": "check",
1428
+ "signature": "(property) check?: boolean | undefined",
1429
+ "isOptional": true,
1430
+ "type": {
1431
+ "__schema": "KeywordTypeSchema",
1432
+ "location": {
1433
+ "filePath": "formatter-context.ts",
1434
+ "line": 3,
1435
+ "character": 42
1436
+ },
1437
+ "name": "boolean"
1438
+ }
1439
+ }
1440
+ ]
1441
+ }
1442
+ }
1443
+ }
1444
+ ]
1445
+ },
1446
+ {
1447
+ "__schema": "TypeSchema",
1448
+ "location": {
1449
+ "filePath": "formatter-context.ts",
1450
+ "line": 3,
1451
+ "character": 1
1452
+ },
1453
+ "signature": "type FormatterOptions = {\n check?: boolean | undefined;\n}",
1454
+ "name": "FormatterOptions",
1455
+ "type": {
1456
+ "__schema": "TypeLiteralSchema",
1457
+ "location": {
1458
+ "filePath": "formatter-context.ts",
1459
+ "line": 3,
1460
+ "character": 32
1461
+ },
1462
+ "members": [
1463
+ {
1464
+ "__schema": "VariableLikeSchema",
1465
+ "location": {
1466
+ "filePath": "formatter-context.ts",
1467
+ "line": 3,
1468
+ "character": 34
1469
+ },
1470
+ "signature": "(property) check?: boolean | undefined",
1471
+ "name": "check",
1472
+ "type": {
1473
+ "__schema": "KeywordTypeSchema",
1474
+ "location": {
1475
+ "filePath": "formatter-context.ts",
1476
+ "line": 3,
1477
+ "character": 42
1478
+ },
1479
+ "name": "boolean"
1480
+ },
1481
+ "isOptional": true
1482
+ }
1483
+ ]
1484
+ }
1485
+ },
1486
+ {
1487
+ "__schema": "UnImplementedSchema",
1488
+ "location": {
1489
+ "filePath": "index.ts",
1490
+ "line": 9,
1491
+ "character": 16
1492
+ },
1493
+ "name": "FormatterAspect",
1494
+ "type": "Identifier"
1495
+ }
1496
+ ],
1497
+ "internals": []
1498
+ },
1499
+ "internals": [
1500
+ {
1501
+ "__schema": "ModuleSchema",
1502
+ "location": {
1503
+ "filePath": "formatter.aspect.ts",
1504
+ "line": 1,
1505
+ "character": 1
1506
+ },
1507
+ "exports": [
1508
+ {
1509
+ "__schema": "VariableLikeSchema",
1510
+ "location": {
1511
+ "filePath": "formatter.aspect.ts",
1512
+ "line": 3,
1513
+ "character": 14
1514
+ },
1515
+ "signature": "const FormatterAspect: Aspect",
1516
+ "name": "FormatterAspect",
1517
+ "type": {
1518
+ "__schema": "TypeRefSchema",
1519
+ "location": {
1520
+ "filePath": "formatter.aspect.ts",
1521
+ "line": 3,
1522
+ "character": 14
1523
+ },
1524
+ "name": "Aspect",
1525
+ "componentId": {
1526
+ "scope": "teambit.harmony",
1527
+ "name": "harmony",
1528
+ "version": "0.4.6"
1529
+ }
1530
+ },
1531
+ "isOptional": false,
1532
+ "defaultValue": "Aspect.create({\n id: 'teambit.defender/formatter',\n})"
1533
+ }
1534
+ ],
1535
+ "internals": []
1536
+ },
1537
+ {
1538
+ "__schema": "ModuleSchema",
1539
+ "location": {
1540
+ "filePath": "formatter.main.runtime.ts",
1541
+ "line": 1,
1542
+ "character": 1
1543
+ },
1544
+ "exports": [
1545
+ {
1546
+ "__schema": "TypeSchema",
1547
+ "location": {
1548
+ "filePath": "formatter.main.runtime.ts",
1549
+ "line": 13,
1550
+ "character": 1
1551
+ },
1552
+ "signature": "type FormatterConfig = {}",
1553
+ "name": "FormatterConfig",
1554
+ "type": {
1555
+ "__schema": "TypeLiteralSchema",
1556
+ "location": {
1557
+ "filePath": "formatter.main.runtime.ts",
1558
+ "line": 13,
1559
+ "character": 31
1560
+ },
1561
+ "members": []
1562
+ }
1563
+ },
1564
+ {
1565
+ "__schema": "ClassSchema",
1566
+ "location": {
1567
+ "filePath": "formatter.main.runtime.ts",
1568
+ "line": 14,
1569
+ "character": 1
1570
+ },
1571
+ "signature": "class FormatterMain",
1572
+ "name": "FormatterMain",
1573
+ "members": [
1574
+ {
1575
+ "__schema": "VariableLikeSchema",
1576
+ "location": {
1577
+ "filePath": "formatter.main.runtime.ts",
1578
+ "line": 15,
1579
+ "character": 3
1580
+ },
1581
+ "signature": "(property) FormatterMain.runtime: RuntimeDefinition",
1582
+ "name": "runtime",
1583
+ "type": {
1584
+ "__schema": "InferenceTypeSchema",
1585
+ "location": {
1586
+ "filePath": "formatter.main.runtime.ts",
1587
+ "line": 15,
1588
+ "character": 3
1589
+ },
1590
+ "type": "RuntimeDefinition"
1591
+ },
1592
+ "isOptional": true,
1593
+ "defaultValue": "MainRuntime"
1594
+ },
1595
+ {
1596
+ "__schema": "ConstructorSchema",
1597
+ "location": {
1598
+ "filePath": "formatter.main.runtime.ts",
1599
+ "line": 17,
1600
+ "character": 3
1601
+ },
1602
+ "signature": "constructor FormatterMain(envs: EnvsMain, formatterService: FormatterService): FormatterMain",
1603
+ "name": "constructor",
1604
+ "params": [
1605
+ {
1606
+ "__schema": "ParameterSchema",
1607
+ "location": {
1608
+ "filePath": "formatter.main.runtime.ts",
1609
+ "line": 17,
1610
+ "character": 15
1611
+ },
1612
+ "name": "envs",
1613
+ "type": {
1614
+ "__schema": "TypeRefSchema",
1615
+ "location": {
1616
+ "filePath": "formatter.main.runtime.ts",
1617
+ "line": 17,
1618
+ "character": 29
1619
+ },
1620
+ "name": "EnvsMain",
1621
+ "componentId": {
1622
+ "scope": "teambit.envs",
1623
+ "name": "envs"
1624
+ }
1625
+ },
1626
+ "isOptional": false,
1627
+ "isSpread": false
1628
+ },
1629
+ {
1630
+ "__schema": "ParameterSchema",
1631
+ "location": {
1632
+ "filePath": "formatter.main.runtime.ts",
1633
+ "line": 17,
1634
+ "character": 39
1635
+ },
1636
+ "name": "formatterService",
1637
+ "type": {
1638
+ "__schema": "TypeRefSchema",
1639
+ "location": {
1640
+ "filePath": "formatter.main.runtime.ts",
1641
+ "line": 17,
1642
+ "character": 65
1643
+ },
1644
+ "name": "FormatterService",
1645
+ "internalFilePath": "formatter.service.ts"
1646
+ },
1647
+ "isOptional": false,
1648
+ "isSpread": false
1649
+ }
1650
+ ],
1651
+ "returnType": {
1652
+ "__schema": "ThisTypeSchema",
1653
+ "location": {
1654
+ "filePath": "formatter.main.runtime.ts",
1655
+ "line": 14,
1656
+ "character": 1
1657
+ },
1658
+ "name": "FormatterMain"
1659
+ },
1660
+ "modifiers": []
1661
+ },
1662
+ {
1663
+ "__schema": "FunctionLikeSchema",
1664
+ "location": {
1665
+ "filePath": "formatter.main.runtime.ts",
1666
+ "line": 22,
1667
+ "character": 3
1668
+ },
1669
+ "doc": {
1670
+ "__schema": "DocSchema",
1671
+ "location": {
1672
+ "filePath": "formatter.main.runtime.ts",
1673
+ "line": 19,
1674
+ "character": 3
1675
+ },
1676
+ "raw": "/**\n * format an array of components.\n */",
1677
+ "comment": "format an array of components."
1678
+ },
1679
+ "signature": "(method) FormatterMain.format(components: Component[], opts: FormatterOptions): Promise<EnvsExecutionResult<FormatResults>>",
1680
+ "name": "format",
1681
+ "params": [
1682
+ {
1683
+ "__schema": "ParameterSchema",
1684
+ "location": {
1685
+ "filePath": "formatter.main.runtime.ts",
1686
+ "line": 22,
1687
+ "character": 16
1688
+ },
1689
+ "name": "components",
1690
+ "type": {
1691
+ "__schema": "TypeArraySchema",
1692
+ "location": {
1693
+ "filePath": "formatter.main.runtime.ts",
1694
+ "line": 22,
1695
+ "character": 28
1696
+ },
1697
+ "type": {
1698
+ "__schema": "TypeRefSchema",
1699
+ "location": {
1700
+ "filePath": "formatter.main.runtime.ts",
1701
+ "line": 22,
1702
+ "character": 28
1703
+ },
1704
+ "name": "Component",
1705
+ "componentId": {
1706
+ "scope": "teambit.component",
1707
+ "name": "component"
1708
+ }
1709
+ }
1710
+ },
1711
+ "isOptional": false,
1712
+ "isSpread": false
1713
+ },
1714
+ {
1715
+ "__schema": "ParameterSchema",
1716
+ "location": {
1717
+ "filePath": "formatter.main.runtime.ts",
1718
+ "line": 22,
1719
+ "character": 41
1720
+ },
1721
+ "name": "opts",
1722
+ "type": {
1723
+ "__schema": "TypeRefSchema",
1724
+ "location": {
1725
+ "filePath": "formatter.main.runtime.ts",
1726
+ "line": 22,
1727
+ "character": 47
1728
+ },
1729
+ "name": "FormatterOptions"
1730
+ },
1731
+ "isOptional": false,
1732
+ "isSpread": false
1733
+ }
1734
+ ],
1735
+ "returnType": {
1736
+ "__schema": "InferenceTypeSchema",
1737
+ "location": {
1738
+ "filePath": "formatter.main.runtime.ts",
1739
+ "line": 22,
1740
+ "character": 3
1741
+ },
1742
+ "type": "Promise<EnvsExecutionResult<FormatResults>>"
1743
+ },
1744
+ "modifiers": [
1745
+ "async"
1746
+ ]
1747
+ },
1748
+ {
1749
+ "__schema": "FunctionLikeSchema",
1750
+ "location": {
1751
+ "filePath": "formatter.main.runtime.ts",
1752
+ "line": 31,
1753
+ "character": 3
1754
+ },
1755
+ "doc": {
1756
+ "__schema": "DocSchema",
1757
+ "location": {
1758
+ "filePath": "formatter.main.runtime.ts",
1759
+ "line": 28,
1760
+ "character": 3
1761
+ },
1762
+ "raw": "/**\n * check format an array of components.\n */",
1763
+ "comment": "check format an array of components."
1764
+ },
1765
+ "signature": "(method) FormatterMain.check(components: Component[], opts: FormatterOptions): Promise<EnvsExecutionResult<FormatResults>>",
1766
+ "name": "check",
1767
+ "params": [
1768
+ {
1769
+ "__schema": "ParameterSchema",
1770
+ "location": {
1771
+ "filePath": "formatter.main.runtime.ts",
1772
+ "line": 31,
1773
+ "character": 15
1774
+ },
1775
+ "name": "components",
1776
+ "type": {
1777
+ "__schema": "TypeArraySchema",
1778
+ "location": {
1779
+ "filePath": "formatter.main.runtime.ts",
1780
+ "line": 31,
1781
+ "character": 27
1782
+ },
1783
+ "type": {
1784
+ "__schema": "TypeRefSchema",
1785
+ "location": {
1786
+ "filePath": "formatter.main.runtime.ts",
1787
+ "line": 31,
1788
+ "character": 27
1789
+ },
1790
+ "name": "Component",
1791
+ "componentId": {
1792
+ "scope": "teambit.component",
1793
+ "name": "component"
1794
+ }
1795
+ }
1796
+ },
1797
+ "isOptional": false,
1798
+ "isSpread": false
1799
+ },
1800
+ {
1801
+ "__schema": "ParameterSchema",
1802
+ "location": {
1803
+ "filePath": "formatter.main.runtime.ts",
1804
+ "line": 31,
1805
+ "character": 40
1806
+ },
1807
+ "name": "opts",
1808
+ "type": {
1809
+ "__schema": "TypeRefSchema",
1810
+ "location": {
1811
+ "filePath": "formatter.main.runtime.ts",
1812
+ "line": 31,
1813
+ "character": 46
1814
+ },
1815
+ "name": "FormatterOptions"
1816
+ },
1817
+ "isOptional": false,
1818
+ "isSpread": false
1819
+ }
1820
+ ],
1821
+ "returnType": {
1822
+ "__schema": "InferenceTypeSchema",
1823
+ "location": {
1824
+ "filePath": "formatter.main.runtime.ts",
1825
+ "line": 31,
1826
+ "character": 3
1827
+ },
1828
+ "type": "Promise<EnvsExecutionResult<FormatResults>>"
1829
+ },
1830
+ "modifiers": [
1831
+ "async"
1832
+ ]
1833
+ },
1834
+ {
1835
+ "__schema": "FunctionLikeSchema",
1836
+ "location": {
1837
+ "filePath": "formatter.main.runtime.ts",
1838
+ "line": 37,
1839
+ "character": 3
1840
+ },
1841
+ "signature": "(method) FormatterMain.getFormatter(context: ExecutionContext, options: FormatterOptions): Formatter",
1842
+ "name": "getFormatter",
1843
+ "params": [
1844
+ {
1845
+ "__schema": "ParameterSchema",
1846
+ "location": {
1847
+ "filePath": "formatter.main.runtime.ts",
1848
+ "line": 37,
1849
+ "character": 16
1850
+ },
1851
+ "name": "context",
1852
+ "type": {
1853
+ "__schema": "TypeRefSchema",
1854
+ "location": {
1855
+ "filePath": "formatter.main.runtime.ts",
1856
+ "line": 37,
1857
+ "character": 25
1858
+ },
1859
+ "name": "ExecutionContext",
1860
+ "componentId": {
1861
+ "scope": "teambit.envs",
1862
+ "name": "envs"
1863
+ }
1864
+ },
1865
+ "isOptional": false,
1866
+ "isSpread": false
1867
+ },
1868
+ {
1869
+ "__schema": "ParameterSchema",
1870
+ "location": {
1871
+ "filePath": "formatter.main.runtime.ts",
1872
+ "line": 37,
1873
+ "character": 43
1874
+ },
1875
+ "name": "options",
1876
+ "type": {
1877
+ "__schema": "TypeRefSchema",
1878
+ "location": {
1879
+ "filePath": "formatter.main.runtime.ts",
1880
+ "line": 37,
1881
+ "character": 52
1882
+ },
1883
+ "name": "FormatterOptions"
1884
+ },
1885
+ "isOptional": false,
1886
+ "isSpread": false
1887
+ }
1888
+ ],
1889
+ "returnType": {
1890
+ "__schema": "TypeRefSchema",
1891
+ "location": {
1892
+ "filePath": "formatter.main.runtime.ts",
1893
+ "line": 37,
1894
+ "character": 3
1895
+ },
1896
+ "name": "Formatter"
1897
+ },
1898
+ "modifiers": []
1899
+ },
1900
+ {
1901
+ "__schema": "FunctionLikeSchema",
1902
+ "location": {
1903
+ "filePath": "formatter.main.runtime.ts",
1904
+ "line": 52,
1905
+ "character": 3
1906
+ },
1907
+ "doc": {
1908
+ "__schema": "DocSchema",
1909
+ "location": {
1910
+ "filePath": "formatter.main.runtime.ts",
1911
+ "line": 48,
1912
+ "character": 3
1913
+ },
1914
+ "raw": "/**\n * create a format task for build pipelines.\n * @param name name of the task.\n */",
1915
+ "comment": "create a format task for build pipelines.",
1916
+ "tags": [
1917
+ {
1918
+ "__schema": "PropertyLikeTagSchema",
1919
+ "location": {
1920
+ "filePath": "formatter.main.runtime.ts",
1921
+ "line": 50,
1922
+ "character": 6
1923
+ },
1924
+ "name": "name",
1925
+ "tagName": "parameter",
1926
+ "comment": "name of the task."
1927
+ }
1928
+ ]
1929
+ },
1930
+ "signature": "(method) FormatterMain.createTask(name?: string): FormatTask",
1931
+ "name": "createTask",
1932
+ "params": [
1933
+ {
1934
+ "__schema": "ParameterSchema",
1935
+ "location": {
1936
+ "filePath": "formatter.main.runtime.ts",
1937
+ "line": 52,
1938
+ "character": 14
1939
+ },
1940
+ "name": "name",
1941
+ "type": {
1942
+ "__schema": "KeywordTypeSchema",
1943
+ "location": {
1944
+ "filePath": "formatter.main.runtime.ts",
1945
+ "line": 52,
1946
+ "character": 21
1947
+ },
1948
+ "name": "string"
1949
+ },
1950
+ "isOptional": true,
1951
+ "isSpread": false
1952
+ }
1953
+ ],
1954
+ "returnType": {
1955
+ "__schema": "TypeRefSchema",
1956
+ "location": {
1957
+ "filePath": "formatter.main.runtime.ts",
1958
+ "line": 52,
1959
+ "character": 3
1960
+ },
1961
+ "name": "FormatTask"
1962
+ },
1963
+ "modifiers": []
1964
+ },
1965
+ {
1966
+ "__schema": "VariableLikeSchema",
1967
+ "location": {
1968
+ "filePath": "formatter.main.runtime.ts",
1969
+ "line": 56,
1970
+ "character": 3
1971
+ },
1972
+ "signature": "(property) FormatterMain.dependencies: Aspect[]",
1973
+ "name": "dependencies",
1974
+ "type": {
1975
+ "__schema": "InferenceTypeSchema",
1976
+ "location": {
1977
+ "filePath": "formatter.main.runtime.ts",
1978
+ "line": 56,
1979
+ "character": 3
1980
+ },
1981
+ "type": "Aspect[]"
1982
+ },
1983
+ "isOptional": true,
1984
+ "defaultValue": "[EnvsAspect, CLIAspect, ComponentAspect, LoggerAspect, WorkspaceAspect]"
1985
+ },
1986
+ {
1987
+ "__schema": "VariableLikeSchema",
1988
+ "location": {
1989
+ "filePath": "formatter.main.runtime.ts",
1990
+ "line": 58,
1991
+ "character": 3
1992
+ },
1993
+ "signature": "(property) FormatterMain.defaultConfig: FormatterConfig",
1994
+ "name": "defaultConfig",
1995
+ "type": {
1996
+ "__schema": "TypeRefSchema",
1997
+ "location": {
1998
+ "filePath": "formatter.main.runtime.ts",
1999
+ "line": 58,
2000
+ "character": 3
2001
+ },
2002
+ "name": "FormatterConfig"
2003
+ },
2004
+ "isOptional": true,
2005
+ "defaultValue": "{}"
2006
+ },
2007
+ {
2008
+ "__schema": "FunctionLikeSchema",
2009
+ "location": {
2010
+ "filePath": "formatter.main.runtime.ts",
2011
+ "line": 60,
2012
+ "character": 3
2013
+ },
2014
+ "signature": "(method) FormatterMain.provider([envs, cli, component, loggerAspect, workspace]: [EnvsMain, CLIMain, ComponentMain, LoggerMain, Workspace], config: FormatterConfig): Promise<FormatterMain>",
2015
+ "name": "provider",
2016
+ "params": [
2017
+ {
2018
+ "__schema": "ParameterSchema",
2019
+ "location": {
2020
+ "filePath": "formatter.main.runtime.ts",
2021
+ "line": 61,
2022
+ "character": 5
2023
+ },
2024
+ "name": "[ envs, cli, component, loggerAspect, workspace ]",
2025
+ "type": {
2026
+ "__schema": "TupleTypeSchema",
2027
+ "location": {
2028
+ "filePath": "formatter.main.runtime.ts",
2029
+ "line": 61,
2030
+ "character": 54
2031
+ },
2032
+ "elements": [
2033
+ {
2034
+ "__schema": "TypeRefSchema",
2035
+ "location": {
2036
+ "filePath": "formatter.main.runtime.ts",
2037
+ "line": 61,
2038
+ "character": 55
2039
+ },
2040
+ "name": "EnvsMain",
2041
+ "componentId": {
2042
+ "scope": "teambit.envs",
2043
+ "name": "envs"
2044
+ }
2045
+ },
2046
+ {
2047
+ "__schema": "TypeRefSchema",
2048
+ "location": {
2049
+ "filePath": "formatter.main.runtime.ts",
2050
+ "line": 61,
2051
+ "character": 65
2052
+ },
2053
+ "name": "CLIMain",
2054
+ "componentId": {
2055
+ "scope": "teambit.harmony",
2056
+ "name": "cli"
2057
+ }
2058
+ },
2059
+ {
2060
+ "__schema": "TypeRefSchema",
2061
+ "location": {
2062
+ "filePath": "formatter.main.runtime.ts",
2063
+ "line": 61,
2064
+ "character": 74
2065
+ },
2066
+ "name": "ComponentMain",
2067
+ "componentId": {
2068
+ "scope": "teambit.component",
2069
+ "name": "component"
2070
+ }
2071
+ },
2072
+ {
2073
+ "__schema": "TypeRefSchema",
2074
+ "location": {
2075
+ "filePath": "formatter.main.runtime.ts",
2076
+ "line": 61,
2077
+ "character": 89
2078
+ },
2079
+ "name": "LoggerMain",
2080
+ "componentId": {
2081
+ "scope": "teambit.harmony",
2082
+ "name": "logger"
2083
+ }
2084
+ },
2085
+ {
2086
+ "__schema": "TypeRefSchema",
2087
+ "location": {
2088
+ "filePath": "formatter.main.runtime.ts",
2089
+ "line": 61,
2090
+ "character": 101
2091
+ },
2092
+ "name": "Workspace",
2093
+ "componentId": {
2094
+ "scope": "teambit.workspace",
2095
+ "name": "workspace"
2096
+ }
2097
+ }
2098
+ ]
2099
+ },
2100
+ "isOptional": false,
2101
+ "isSpread": false
2102
+ },
2103
+ {
2104
+ "__schema": "ParameterSchema",
2105
+ "location": {
2106
+ "filePath": "formatter.main.runtime.ts",
2107
+ "line": 62,
2108
+ "character": 5
2109
+ },
2110
+ "name": "config",
2111
+ "type": {
2112
+ "__schema": "TypeRefSchema",
2113
+ "location": {
2114
+ "filePath": "formatter.main.runtime.ts",
2115
+ "line": 62,
2116
+ "character": 13
2117
+ },
2118
+ "name": "FormatterConfig"
2119
+ },
2120
+ "isOptional": false,
2121
+ "isSpread": false
2122
+ }
2123
+ ],
2124
+ "returnType": {
2125
+ "__schema": "InferenceTypeSchema",
2126
+ "location": {
2127
+ "filePath": "formatter.main.runtime.ts",
2128
+ "line": 60,
2129
+ "character": 3
2130
+ },
2131
+ "type": "Promise<FormatterMain>"
2132
+ },
2133
+ "modifiers": [
2134
+ "static",
2135
+ "async"
2136
+ ]
2137
+ }
2138
+ ],
2139
+ "extendsNodes": [],
2140
+ "implementNodes": []
2141
+ }
2142
+ ],
2143
+ "internals": [
2144
+ {
2145
+ "__schema": "UnImplementedSchema",
2146
+ "location": {
2147
+ "filePath": "formatter.main.runtime.ts",
2148
+ "line": 75,
2149
+ "character": 1
2150
+ },
2151
+ "name": "FormatterAspect.addRuntime(FormatterMain);",
2152
+ "type": "ExpressionStatement"
2153
+ }
2154
+ ]
2155
+ },
2156
+ {
2157
+ "__schema": "ModuleSchema",
2158
+ "location": {
2159
+ "filePath": "formatter.ts",
2160
+ "line": 1,
2161
+ "character": 1
2162
+ },
2163
+ "exports": [
2164
+ {
2165
+ "__schema": "TypeSchema",
2166
+ "location": {
2167
+ "filePath": "formatter.ts",
2168
+ "line": 4,
2169
+ "character": 1
2170
+ },
2171
+ "signature": "type ComponentFormatResult = {\n component: Component;\n results: FileFormatResult[];\n}",
2172
+ "name": "ComponentFormatResult",
2173
+ "type": {
2174
+ "__schema": "TypeLiteralSchema",
2175
+ "location": {
2176
+ "filePath": "formatter.ts",
2177
+ "line": 4,
2178
+ "character": 37
2179
+ },
2180
+ "members": [
2181
+ {
2182
+ "__schema": "VariableLikeSchema",
2183
+ "location": {
2184
+ "filePath": "formatter.ts",
2185
+ "line": 8,
2186
+ "character": 3
2187
+ },
2188
+ "doc": {
2189
+ "__schema": "DocSchema",
2190
+ "location": {
2191
+ "filePath": "formatter.ts",
2192
+ "line": 5,
2193
+ "character": 3
2194
+ },
2195
+ "raw": "/**\n * the formatted component.\n */",
2196
+ "comment": "the formatted component."
2197
+ },
2198
+ "signature": "(property) component: Component",
2199
+ "name": "component",
2200
+ "type": {
2201
+ "__schema": "TypeRefSchema",
2202
+ "location": {
2203
+ "filePath": "formatter.ts",
2204
+ "line": 8,
2205
+ "character": 3
2206
+ },
2207
+ "name": "Component",
2208
+ "componentId": {
2209
+ "scope": "teambit.component",
2210
+ "name": "component"
2211
+ }
2212
+ },
2213
+ "isOptional": false
2214
+ },
2215
+ {
2216
+ "__schema": "VariableLikeSchema",
2217
+ "location": {
2218
+ "filePath": "formatter.ts",
2219
+ "line": 13,
2220
+ "character": 3
2221
+ },
2222
+ "doc": {
2223
+ "__schema": "DocSchema",
2224
+ "location": {
2225
+ "filePath": "formatter.ts",
2226
+ "line": 10,
2227
+ "character": 3
2228
+ },
2229
+ "raw": "/**\n * format results for each file of the component.\n */",
2230
+ "comment": "format results for each file of the component."
2231
+ },
2232
+ "signature": "(property) results: FileFormatResult[]",
2233
+ "name": "results",
2234
+ "type": {
2235
+ "__schema": "TypeArraySchema",
2236
+ "location": {
2237
+ "filePath": "formatter.ts",
2238
+ "line": 13,
2239
+ "character": 12
2240
+ },
2241
+ "type": {
2242
+ "__schema": "TypeRefSchema",
2243
+ "location": {
2244
+ "filePath": "formatter.ts",
2245
+ "line": 13,
2246
+ "character": 12
2247
+ },
2248
+ "name": "FileFormatResult"
2249
+ }
2250
+ },
2251
+ "isOptional": false
2252
+ }
2253
+ ]
2254
+ }
2255
+ },
2256
+ {
2257
+ "__schema": "TypeSchema",
2258
+ "location": {
2259
+ "filePath": "formatter.ts",
2260
+ "line": 16,
2261
+ "character": 1
2262
+ },
2263
+ "signature": "type FileFormatResult = {\n filePath: string;\n hasIssues: boolean;\n newContent?: string | undefined;\n}",
2264
+ "name": "FileFormatResult",
2265
+ "type": {
2266
+ "__schema": "TypeLiteralSchema",
2267
+ "location": {
2268
+ "filePath": "formatter.ts",
2269
+ "line": 16,
2270
+ "character": 32
2271
+ },
2272
+ "members": [
2273
+ {
2274
+ "__schema": "VariableLikeSchema",
2275
+ "location": {
2276
+ "filePath": "formatter.ts",
2277
+ "line": 20,
2278
+ "character": 3
2279
+ },
2280
+ "doc": {
2281
+ "__schema": "DocSchema",
2282
+ "location": {
2283
+ "filePath": "formatter.ts",
2284
+ "line": 17,
2285
+ "character": 3
2286
+ },
2287
+ "raw": "/**\n * path of the formatted file.\n */",
2288
+ "comment": "path of the formatted file."
2289
+ },
2290
+ "signature": "(property) filePath: string",
2291
+ "name": "filePath",
2292
+ "type": {
2293
+ "__schema": "KeywordTypeSchema",
2294
+ "location": {
2295
+ "filePath": "formatter.ts",
2296
+ "line": 20,
2297
+ "character": 13
2298
+ },
2299
+ "name": "string"
2300
+ },
2301
+ "isOptional": false
2302
+ },
2303
+ {
2304
+ "__schema": "VariableLikeSchema",
2305
+ "location": {
2306
+ "filePath": "formatter.ts",
2307
+ "line": 25,
2308
+ "character": 3
2309
+ },
2310
+ "doc": {
2311
+ "__schema": "DocSchema",
2312
+ "location": {
2313
+ "filePath": "formatter.ts",
2314
+ "line": 22,
2315
+ "character": 3
2316
+ },
2317
+ "raw": "/**\n * Does the file has formatting issues (needs format)\n */",
2318
+ "comment": "Does the file has formatting issues (needs format)"
2319
+ },
2320
+ "signature": "(property) hasIssues: boolean",
2321
+ "name": "hasIssues",
2322
+ "type": {
2323
+ "__schema": "KeywordTypeSchema",
2324
+ "location": {
2325
+ "filePath": "formatter.ts",
2326
+ "line": 25,
2327
+ "character": 14
2328
+ },
2329
+ "name": "boolean"
2330
+ },
2331
+ "isOptional": false
2332
+ },
2333
+ {
2334
+ "__schema": "VariableLikeSchema",
2335
+ "location": {
2336
+ "filePath": "formatter.ts",
2337
+ "line": 30,
2338
+ "character": 3
2339
+ },
2340
+ "doc": {
2341
+ "__schema": "DocSchema",
2342
+ "location": {
2343
+ "filePath": "formatter.ts",
2344
+ "line": 27,
2345
+ "character": 3
2346
+ },
2347
+ "raw": "/**\n * The new file content after the formatting\n */",
2348
+ "comment": "The new file content after the formatting"
2349
+ },
2350
+ "signature": "(property) newContent?: string | undefined",
2351
+ "name": "newContent",
2352
+ "type": {
2353
+ "__schema": "KeywordTypeSchema",
2354
+ "location": {
2355
+ "filePath": "formatter.ts",
2356
+ "line": 30,
2357
+ "character": 16
2358
+ },
2359
+ "name": "string"
2360
+ },
2361
+ "isOptional": true
2362
+ }
2363
+ ]
2364
+ }
2365
+ },
2366
+ {
2367
+ "__schema": "TypeSchema",
2368
+ "location": {
2369
+ "filePath": "formatter.ts",
2370
+ "line": 33,
2371
+ "character": 1
2372
+ },
2373
+ "signature": "type FormatResults = {\n results: ComponentFormatResult[];\n errors: Error[];\n}",
2374
+ "name": "FormatResults",
2375
+ "type": {
2376
+ "__schema": "TypeLiteralSchema",
2377
+ "location": {
2378
+ "filePath": "formatter.ts",
2379
+ "line": 33,
2380
+ "character": 29
2381
+ },
2382
+ "members": [
2383
+ {
2384
+ "__schema": "VariableLikeSchema",
2385
+ "location": {
2386
+ "filePath": "formatter.ts",
2387
+ "line": 34,
2388
+ "character": 3
2389
+ },
2390
+ "signature": "(property) results: ComponentFormatResult[]",
2391
+ "name": "results",
2392
+ "type": {
2393
+ "__schema": "TypeArraySchema",
2394
+ "location": {
2395
+ "filePath": "formatter.ts",
2396
+ "line": 34,
2397
+ "character": 12
2398
+ },
2399
+ "type": {
2400
+ "__schema": "TypeRefSchema",
2401
+ "location": {
2402
+ "filePath": "formatter.ts",
2403
+ "line": 34,
2404
+ "character": 12
2405
+ },
2406
+ "name": "ComponentFormatResult"
2407
+ }
2408
+ },
2409
+ "isOptional": false
2410
+ },
2411
+ {
2412
+ "__schema": "VariableLikeSchema",
2413
+ "location": {
2414
+ "filePath": "formatter.ts",
2415
+ "line": 35,
2416
+ "character": 3
2417
+ },
2418
+ "signature": "(property) errors: Error[]",
2419
+ "name": "errors",
2420
+ "type": {
2421
+ "__schema": "TypeArraySchema",
2422
+ "location": {
2423
+ "filePath": "formatter.ts",
2424
+ "line": 35,
2425
+ "character": 11
2426
+ },
2427
+ "type": {
2428
+ "__schema": "TypeRefSchema",
2429
+ "location": {
2430
+ "filePath": "formatter.ts",
2431
+ "line": 35,
2432
+ "character": 11
2433
+ },
2434
+ "name": "Error"
2435
+ }
2436
+ },
2437
+ "isOptional": false
2438
+ }
2439
+ ]
2440
+ }
2441
+ },
2442
+ {
2443
+ "__schema": "InterfaceSchema",
2444
+ "location": {
2445
+ "filePath": "formatter.ts",
2446
+ "line": 38,
2447
+ "character": 1
2448
+ },
2449
+ "signature": "interface Formatter",
2450
+ "name": "Formatter",
2451
+ "members": [
2452
+ {
2453
+ "__schema": "VariableLikeSchema",
2454
+ "location": {
2455
+ "filePath": "formatter.ts",
2456
+ "line": 39,
2457
+ "character": 3
2458
+ },
2459
+ "signature": "(property) Formatter.id: string",
2460
+ "name": "id",
2461
+ "type": {
2462
+ "__schema": "KeywordTypeSchema",
2463
+ "location": {
2464
+ "filePath": "formatter.ts",
2465
+ "line": 39,
2466
+ "character": 7
2467
+ },
2468
+ "name": "string"
2469
+ },
2470
+ "isOptional": false
2471
+ },
2472
+ {
2473
+ "__schema": "FunctionLikeSchema",
2474
+ "location": {
2475
+ "filePath": "formatter.ts",
2476
+ "line": 40,
2477
+ "character": 3
2478
+ },
2479
+ "signature": "(method) Formatter.format(context: FormatterContext): Promise<FormatResults>",
2480
+ "name": "format",
2481
+ "params": [
2482
+ {
2483
+ "__schema": "ParameterSchema",
2484
+ "location": {
2485
+ "filePath": "formatter.ts",
2486
+ "line": 40,
2487
+ "character": 10
2488
+ },
2489
+ "name": "context",
2490
+ "type": {
2491
+ "__schema": "TypeRefSchema",
2492
+ "location": {
2493
+ "filePath": "formatter.ts",
2494
+ "line": 40,
2495
+ "character": 19
2496
+ },
2497
+ "name": "FormatterContext"
2498
+ },
2499
+ "isOptional": false,
2500
+ "isSpread": false
2501
+ }
2502
+ ],
2503
+ "returnType": {
2504
+ "__schema": "TypeRefSchema",
2505
+ "location": {
2506
+ "filePath": "formatter.ts",
2507
+ "line": 40,
2508
+ "character": 38
2509
+ },
2510
+ "name": "Promise",
2511
+ "typeArgs": [
2512
+ {
2513
+ "__schema": "TypeRefSchema",
2514
+ "location": {
2515
+ "filePath": "formatter.ts",
2516
+ "line": 40,
2517
+ "character": 46
2518
+ },
2519
+ "name": "FormatResults"
2520
+ }
2521
+ ]
2522
+ },
2523
+ "modifiers": []
2524
+ },
2525
+ {
2526
+ "__schema": "FunctionLikeSchema",
2527
+ "location": {
2528
+ "filePath": "formatter.ts",
2529
+ "line": 41,
2530
+ "character": 3
2531
+ },
2532
+ "signature": "(method) Formatter.formatSnippet(snippet: string, filepath?: string): Promise<string>",
2533
+ "name": "formatSnippet",
2534
+ "params": [
2535
+ {
2536
+ "__schema": "ParameterSchema",
2537
+ "location": {
2538
+ "filePath": "formatter.ts",
2539
+ "line": 41,
2540
+ "character": 17
2541
+ },
2542
+ "name": "snippet",
2543
+ "type": {
2544
+ "__schema": "KeywordTypeSchema",
2545
+ "location": {
2546
+ "filePath": "formatter.ts",
2547
+ "line": 41,
2548
+ "character": 26
2549
+ },
2550
+ "name": "string"
2551
+ },
2552
+ "isOptional": false,
2553
+ "isSpread": false
2554
+ },
2555
+ {
2556
+ "__schema": "ParameterSchema",
2557
+ "location": {
2558
+ "filePath": "formatter.ts",
2559
+ "line": 41,
2560
+ "character": 34
2561
+ },
2562
+ "name": "filepath",
2563
+ "type": {
2564
+ "__schema": "KeywordTypeSchema",
2565
+ "location": {
2566
+ "filePath": "formatter.ts",
2567
+ "line": 41,
2568
+ "character": 45
2569
+ },
2570
+ "name": "string"
2571
+ },
2572
+ "isOptional": true,
2573
+ "isSpread": false
2574
+ }
2575
+ ],
2576
+ "returnType": {
2577
+ "__schema": "TypeRefSchema",
2578
+ "location": {
2579
+ "filePath": "formatter.ts",
2580
+ "line": 41,
2581
+ "character": 54
2582
+ },
2583
+ "name": "Promise",
2584
+ "typeArgs": [
2585
+ {
2586
+ "__schema": "KeywordTypeSchema",
2587
+ "location": {
2588
+ "filePath": "formatter.ts",
2589
+ "line": 41,
2590
+ "character": 62
2591
+ },
2592
+ "name": "string"
2593
+ }
2594
+ ]
2595
+ },
2596
+ "modifiers": []
2597
+ },
2598
+ {
2599
+ "__schema": "FunctionLikeSchema",
2600
+ "location": {
2601
+ "filePath": "formatter.ts",
2602
+ "line": 42,
2603
+ "character": 3
2604
+ },
2605
+ "signature": "(method) Formatter.check(context: FormatterContext): Promise<FormatResults>",
2606
+ "name": "check",
2607
+ "params": [
2608
+ {
2609
+ "__schema": "ParameterSchema",
2610
+ "location": {
2611
+ "filePath": "formatter.ts",
2612
+ "line": 42,
2613
+ "character": 9
2614
+ },
2615
+ "name": "context",
2616
+ "type": {
2617
+ "__schema": "TypeRefSchema",
2618
+ "location": {
2619
+ "filePath": "formatter.ts",
2620
+ "line": 42,
2621
+ "character": 18
2622
+ },
2623
+ "name": "FormatterContext"
2624
+ },
2625
+ "isOptional": false,
2626
+ "isSpread": false
2627
+ }
2628
+ ],
2629
+ "returnType": {
2630
+ "__schema": "TypeRefSchema",
2631
+ "location": {
2632
+ "filePath": "formatter.ts",
2633
+ "line": 42,
2634
+ "character": 37
2635
+ },
2636
+ "name": "Promise",
2637
+ "typeArgs": [
2638
+ {
2639
+ "__schema": "TypeRefSchema",
2640
+ "location": {
2641
+ "filePath": "formatter.ts",
2642
+ "line": 42,
2643
+ "character": 45
2644
+ },
2645
+ "name": "FormatResults"
2646
+ }
2647
+ ]
2648
+ },
2649
+ "modifiers": []
2650
+ }
2651
+ ],
2652
+ "extendsNodes": []
2653
+ }
2654
+ ],
2655
+ "internals": []
2656
+ },
2657
+ {
2658
+ "__schema": "ModuleSchema",
2659
+ "location": {
2660
+ "filePath": "format.task.ts",
2661
+ "line": 1,
2662
+ "character": 1
2663
+ },
2664
+ "exports": [
2665
+ {
2666
+ "__schema": "ClassSchema",
2667
+ "location": {
2668
+ "filePath": "format.task.ts",
2669
+ "line": 4,
2670
+ "character": 1
2671
+ },
2672
+ "signature": "class FormatTask",
2673
+ "name": "FormatTask",
2674
+ "members": [
2675
+ {
2676
+ "__schema": "ConstructorSchema",
2677
+ "location": {
2678
+ "filePath": "format.task.ts",
2679
+ "line": 5,
2680
+ "character": 3
2681
+ },
2682
+ "signature": "constructor FormatTask(aspectId: string, name?: string): FormatTask",
2683
+ "name": "constructor",
2684
+ "params": [
2685
+ {
2686
+ "__schema": "ParameterSchema",
2687
+ "location": {
2688
+ "filePath": "format.task.ts",
2689
+ "line": 5,
2690
+ "character": 15
2691
+ },
2692
+ "name": "aspectId",
2693
+ "type": {
2694
+ "__schema": "KeywordTypeSchema",
2695
+ "location": {
2696
+ "filePath": "format.task.ts",
2697
+ "line": 5,
2698
+ "character": 34
2699
+ },
2700
+ "name": "string"
2701
+ },
2702
+ "isOptional": false,
2703
+ "isSpread": false
2704
+ },
2705
+ {
2706
+ "__schema": "ParameterSchema",
2707
+ "location": {
2708
+ "filePath": "format.task.ts",
2709
+ "line": 5,
2710
+ "character": 42
2711
+ },
2712
+ "name": "name",
2713
+ "type": {
2714
+ "__schema": "InferenceTypeSchema",
2715
+ "location": {
2716
+ "filePath": "format.task.ts",
2717
+ "line": 5,
2718
+ "character": 42
2719
+ },
2720
+ "type": "string"
2721
+ },
2722
+ "isOptional": true,
2723
+ "defaultValue": "'format'",
2724
+ "isSpread": false
2725
+ }
2726
+ ],
2727
+ "returnType": {
2728
+ "__schema": "ThisTypeSchema",
2729
+ "location": {
2730
+ "filePath": "format.task.ts",
2731
+ "line": 4,
2732
+ "character": 1
2733
+ },
2734
+ "name": "FormatTask"
2735
+ },
2736
+ "modifiers": []
2737
+ },
2738
+ {
2739
+ "__schema": "FunctionLikeSchema",
2740
+ "location": {
2741
+ "filePath": "format.task.ts",
2742
+ "line": 7,
2743
+ "character": 3
2744
+ },
2745
+ "signature": "(method) FormatTask.execute(context: BuildContext): Promise<BuiltTaskResult>",
2746
+ "name": "execute",
2747
+ "params": [
2748
+ {
2749
+ "__schema": "ParameterSchema",
2750
+ "location": {
2751
+ "filePath": "format.task.ts",
2752
+ "line": 7,
2753
+ "character": 17
2754
+ },
2755
+ "name": "context",
2756
+ "type": {
2757
+ "__schema": "TypeRefSchema",
2758
+ "location": {
2759
+ "filePath": "format.task.ts",
2760
+ "line": 7,
2761
+ "character": 26
2762
+ },
2763
+ "name": "BuildContext",
2764
+ "componentId": {
2765
+ "scope": "teambit.pipelines",
2766
+ "name": "builder"
2767
+ }
2768
+ },
2769
+ "isOptional": false,
2770
+ "isSpread": false
2771
+ }
2772
+ ],
2773
+ "returnType": {
2774
+ "__schema": "TypeRefSchema",
2775
+ "location": {
2776
+ "filePath": "format.task.ts",
2777
+ "line": 7,
2778
+ "character": 41
2779
+ },
2780
+ "name": "Promise",
2781
+ "typeArgs": [
2782
+ {
2783
+ "__schema": "TypeRefSchema",
2784
+ "location": {
2785
+ "filePath": "format.task.ts",
2786
+ "line": 7,
2787
+ "character": 49
2788
+ },
2789
+ "name": "BuiltTaskResult",
2790
+ "componentId": {
2791
+ "scope": "teambit.pipelines",
2792
+ "name": "builder"
2793
+ }
2794
+ }
2795
+ ]
2796
+ },
2797
+ "modifiers": [
2798
+ "async"
2799
+ ]
2800
+ }
2801
+ ],
2802
+ "extendsNodes": [],
2803
+ "implementNodes": [
2804
+ {
2805
+ "__schema": "ExpressionWithTypeArgumentsSchema",
2806
+ "location": {
2807
+ "filePath": "format.task.ts",
2808
+ "line": 4,
2809
+ "character": 36
2810
+ },
2811
+ "name": "implements BuildTask",
2812
+ "typeArgs": [],
2813
+ "expression": {
2814
+ "__schema": "TypeRefSchema",
2815
+ "location": {
2816
+ "filePath": "format.task.ts",
2817
+ "line": 4,
2818
+ "character": 36
2819
+ },
2820
+ "name": "BuildTask",
2821
+ "componentId": {
2822
+ "_legacy": {
2823
+ "scope": "teambit.defender",
2824
+ "name": "formatter",
2825
+ "version": "1.0.190"
2826
+ },
2827
+ "_scope": "teambit.defender"
2828
+ }
2829
+ }
2830
+ }
2831
+ ]
2832
+ }
2833
+ ],
2834
+ "internals": []
2835
+ },
2836
+ {
2837
+ "__schema": "ModuleSchema",
2838
+ "location": {
2839
+ "filePath": "formatter-env-type.ts",
2840
+ "line": 1,
2841
+ "character": 1
2842
+ },
2843
+ "exports": [
2844
+ {
2845
+ "__schema": "InterfaceSchema",
2846
+ "location": {
2847
+ "filePath": "formatter-env-type.ts",
2848
+ "line": 4,
2849
+ "character": 1
2850
+ },
2851
+ "signature": "interface FormatterEnv",
2852
+ "name": "FormatterEnv",
2853
+ "members": [
2854
+ {
2855
+ "__schema": "FunctionLikeSchema",
2856
+ "location": {
2857
+ "filePath": "formatter-env-type.ts",
2858
+ "line": 8,
2859
+ "character": 3
2860
+ },
2861
+ "doc": {
2862
+ "__schema": "DocSchema",
2863
+ "location": {
2864
+ "filePath": "formatter-env-type.ts",
2865
+ "line": 5,
2866
+ "character": 3
2867
+ },
2868
+ "raw": "/**\n * return a Formatter instance.\n */",
2869
+ "comment": "return a Formatter instance."
2870
+ },
2871
+ "signature": "(method) FormatterEnv.formatter(): EnvHandler<Formatter>",
2872
+ "name": "formatter",
2873
+ "params": [],
2874
+ "returnType": {
2875
+ "__schema": "TypeRefSchema",
2876
+ "location": {
2877
+ "filePath": "formatter-env-type.ts",
2878
+ "line": 8,
2879
+ "character": 16
2880
+ },
2881
+ "name": "EnvHandler",
2882
+ "componentId": {
2883
+ "scope": "teambit.envs",
2884
+ "name": "envs"
2885
+ },
2886
+ "typeArgs": [
2887
+ {
2888
+ "__schema": "TypeRefSchema",
2889
+ "location": {
2890
+ "filePath": "formatter-env-type.ts",
2891
+ "line": 8,
2892
+ "character": 27
2893
+ },
2894
+ "name": "Formatter"
2895
+ }
2896
+ ]
2897
+ },
2898
+ "modifiers": []
2899
+ }
2900
+ ],
2901
+ "extendsNodes": []
2902
+ }
2903
+ ],
2904
+ "internals": []
2905
+ }
2906
+ ],
2907
+ "componentId": {
2908
+ "scope": "teambit.defender",
2909
+ "name": "formatter",
2910
+ "version": "1.0.190"
2911
+ },
2912
+ "taggedModuleExports": []
2913
+ }