@teambit/formatter 1.0.258 → 1.0.259

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