@teambit/refactoring 1.0.186 → 1.0.188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2314 +0,0 @@
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": "ClassSchema",
18
- "location": {
19
- "filePath": "refactoring.main.runtime.ts",
20
- "line": 31,
21
- "character": 1
22
- },
23
- "signature": "class RefactoringMain",
24
- "name": "RefactoringMain",
25
- "members": [
26
- {
27
- "__schema": "ConstructorSchema",
28
- "location": {
29
- "filePath": "refactoring.main.runtime.ts",
30
- "line": 32,
31
- "character": 3
32
- },
33
- "signature": "constructor RefactoringMain(componentMain: ComponentMain, pkg: PkgMain, envs: EnvsMain, prettierMain: PrettierMain): RefactoringMain",
34
- "name": "constructor",
35
- "params": [
36
- {
37
- "__schema": "ParameterSchema",
38
- "location": {
39
- "filePath": "refactoring.main.runtime.ts",
40
- "line": 33,
41
- "character": 5
42
- },
43
- "name": "componentMain",
44
- "type": {
45
- "__schema": "TypeRefSchema",
46
- "location": {
47
- "filePath": "refactoring.main.runtime.ts",
48
- "line": 33,
49
- "character": 28
50
- },
51
- "name": "ComponentMain"
52
- },
53
- "isOptional": false,
54
- "isSpread": false
55
- },
56
- {
57
- "__schema": "ParameterSchema",
58
- "location": {
59
- "filePath": "refactoring.main.runtime.ts",
60
- "line": 34,
61
- "character": 5
62
- },
63
- "name": "pkg",
64
- "type": {
65
- "__schema": "TypeRefSchema",
66
- "location": {
67
- "filePath": "refactoring.main.runtime.ts",
68
- "line": 34,
69
- "character": 18
70
- },
71
- "name": "PkgMain"
72
- },
73
- "isOptional": false,
74
- "isSpread": false
75
- },
76
- {
77
- "__schema": "ParameterSchema",
78
- "location": {
79
- "filePath": "refactoring.main.runtime.ts",
80
- "line": 35,
81
- "character": 5
82
- },
83
- "name": "envs",
84
- "type": {
85
- "__schema": "TypeRefSchema",
86
- "location": {
87
- "filePath": "refactoring.main.runtime.ts",
88
- "line": 35,
89
- "character": 19
90
- },
91
- "name": "EnvsMain"
92
- },
93
- "isOptional": false,
94
- "isSpread": false
95
- },
96
- {
97
- "__schema": "ParameterSchema",
98
- "location": {
99
- "filePath": "refactoring.main.runtime.ts",
100
- "line": 36,
101
- "character": 5
102
- },
103
- "name": "prettierMain",
104
- "type": {
105
- "__schema": "TypeRefSchema",
106
- "location": {
107
- "filePath": "refactoring.main.runtime.ts",
108
- "line": 36,
109
- "character": 27
110
- },
111
- "name": "PrettierMain"
112
- },
113
- "isOptional": false,
114
- "isSpread": false
115
- }
116
- ],
117
- "returnType": {
118
- "__schema": "ThisTypeSchema",
119
- "location": {
120
- "filePath": "refactoring.main.runtime.ts",
121
- "line": 31,
122
- "character": 1
123
- },
124
- "name": "RefactoringMain"
125
- },
126
- "modifiers": []
127
- },
128
- {
129
- "__schema": "FunctionLikeSchema",
130
- "location": {
131
- "filePath": "refactoring.main.runtime.ts",
132
- "line": 44,
133
- "character": 3
134
- },
135
- "doc": {
136
- "__schema": "DocSchema",
137
- "location": {
138
- "filePath": "refactoring.main.runtime.ts",
139
- "line": 39,
140
- "character": 3
141
- },
142
- "raw": "/**\n * refactor the dependency name of a component.\n * oldId and newId can be either a component-id or a package-name.\n * this method changes the source code of the component, but doesn't write to the filesystem.\n */",
143
- "comment": "refactor the dependency name of a component.\noldId and newId can be either a component-id or a package-name.\nthis method changes the source code of the component, but doesn't write to the filesystem."
144
- },
145
- "signature": "(method) RefactoringMain.refactorDependencyName(components: Component[], oldId: ComponentID | string, newId: ComponentID | string): Promise<{\n oldPackageName: string;\n newPackageName: string;\n changedComponents: Component[];\n}>",
146
- "name": "refactorDependencyName",
147
- "params": [
148
- {
149
- "__schema": "ParameterSchema",
150
- "location": {
151
- "filePath": "refactoring.main.runtime.ts",
152
- "line": 45,
153
- "character": 5
154
- },
155
- "name": "components",
156
- "type": {
157
- "__schema": "TypeArraySchema",
158
- "location": {
159
- "filePath": "refactoring.main.runtime.ts",
160
- "line": 45,
161
- "character": 17
162
- },
163
- "type": {
164
- "__schema": "TypeRefSchema",
165
- "location": {
166
- "filePath": "refactoring.main.runtime.ts",
167
- "line": 45,
168
- "character": 17
169
- },
170
- "name": "Component"
171
- }
172
- },
173
- "isOptional": false,
174
- "isSpread": false
175
- },
176
- {
177
- "__schema": "ParameterSchema",
178
- "location": {
179
- "filePath": "refactoring.main.runtime.ts",
180
- "line": 46,
181
- "character": 5
182
- },
183
- "name": "oldId",
184
- "type": {
185
- "__schema": "TypeUnionSchema",
186
- "location": {
187
- "filePath": "refactoring.main.runtime.ts",
188
- "line": 46,
189
- "character": 12
190
- },
191
- "types": [
192
- {
193
- "__schema": "TypeRefSchema",
194
- "location": {
195
- "filePath": "refactoring.main.runtime.ts",
196
- "line": 46,
197
- "character": 12
198
- },
199
- "name": "ComponentID"
200
- },
201
- {
202
- "__schema": "KeywordTypeSchema",
203
- "location": {
204
- "filePath": "refactoring.main.runtime.ts",
205
- "line": 46,
206
- "character": 26
207
- },
208
- "name": "string"
209
- }
210
- ]
211
- },
212
- "isOptional": false,
213
- "isSpread": false
214
- },
215
- {
216
- "__schema": "ParameterSchema",
217
- "location": {
218
- "filePath": "refactoring.main.runtime.ts",
219
- "line": 47,
220
- "character": 5
221
- },
222
- "name": "newId",
223
- "type": {
224
- "__schema": "TypeUnionSchema",
225
- "location": {
226
- "filePath": "refactoring.main.runtime.ts",
227
- "line": 47,
228
- "character": 12
229
- },
230
- "types": [
231
- {
232
- "__schema": "TypeRefSchema",
233
- "location": {
234
- "filePath": "refactoring.main.runtime.ts",
235
- "line": 47,
236
- "character": 12
237
- },
238
- "name": "ComponentID"
239
- },
240
- {
241
- "__schema": "KeywordTypeSchema",
242
- "location": {
243
- "filePath": "refactoring.main.runtime.ts",
244
- "line": 47,
245
- "character": 26
246
- },
247
- "name": "string"
248
- }
249
- ]
250
- },
251
- "isOptional": false,
252
- "isSpread": false
253
- }
254
- ],
255
- "returnType": {
256
- "__schema": "TypeRefSchema",
257
- "location": {
258
- "filePath": "refactoring.main.runtime.ts",
259
- "line": 48,
260
- "character": 6
261
- },
262
- "name": "Promise",
263
- "typeArgs": [
264
- {
265
- "__schema": "TypeLiteralSchema",
266
- "location": {
267
- "filePath": "refactoring.main.runtime.ts",
268
- "line": 48,
269
- "character": 14
270
- },
271
- "members": [
272
- {
273
- "__schema": "VariableLikeSchema",
274
- "location": {
275
- "filePath": "refactoring.main.runtime.ts",
276
- "line": 48,
277
- "character": 16
278
- },
279
- "signature": "(property) oldPackageName: string",
280
- "name": "oldPackageName",
281
- "type": {
282
- "__schema": "KeywordTypeSchema",
283
- "location": {
284
- "filePath": "refactoring.main.runtime.ts",
285
- "line": 48,
286
- "character": 32
287
- },
288
- "name": "string"
289
- },
290
- "isOptional": false
291
- },
292
- {
293
- "__schema": "VariableLikeSchema",
294
- "location": {
295
- "filePath": "refactoring.main.runtime.ts",
296
- "line": 48,
297
- "character": 40
298
- },
299
- "signature": "(property) newPackageName: string",
300
- "name": "newPackageName",
301
- "type": {
302
- "__schema": "KeywordTypeSchema",
303
- "location": {
304
- "filePath": "refactoring.main.runtime.ts",
305
- "line": 48,
306
- "character": 56
307
- },
308
- "name": "string"
309
- },
310
- "isOptional": false
311
- },
312
- {
313
- "__schema": "VariableLikeSchema",
314
- "location": {
315
- "filePath": "refactoring.main.runtime.ts",
316
- "line": 48,
317
- "character": 64
318
- },
319
- "signature": "(property) changedComponents: Component[]",
320
- "name": "changedComponents",
321
- "type": {
322
- "__schema": "TypeArraySchema",
323
- "location": {
324
- "filePath": "refactoring.main.runtime.ts",
325
- "line": 48,
326
- "character": 83
327
- },
328
- "type": {
329
- "__schema": "TypeRefSchema",
330
- "location": {
331
- "filePath": "refactoring.main.runtime.ts",
332
- "line": 48,
333
- "character": 83
334
- },
335
- "name": "Component"
336
- }
337
- },
338
- "isOptional": false
339
- }
340
- ]
341
- }
342
- ]
343
- },
344
- "modifiers": [
345
- "async"
346
- ]
347
- },
348
- {
349
- "__schema": "FunctionLikeSchema",
350
- "location": {
351
- "filePath": "refactoring.main.runtime.ts",
352
- "line": 67,
353
- "character": 3
354
- },
355
- "doc": {
356
- "__schema": "DocSchema",
357
- "location": {
358
- "filePath": "refactoring.main.runtime.ts",
359
- "line": 63,
360
- "character": 3
361
- },
362
- "raw": "/**\n * replaces the old-name inside the source code of the given component with the new name.\n * helpful when renaming/forking an aspect/env where the component-name is used as the class-name and variable-name.\n */",
363
- "comment": "replaces the old-name inside the source code of the given component with the new name.\nhelpful when renaming/forking an aspect/env where the component-name is used as the class-name and variable-name."
364
- },
365
- "signature": "(method) RefactoringMain.refactorVariableAndClasses(component: Component, sourceId: ComponentID, targetId: ComponentID, options?: {\n ast?: boolean;\n}): Promise<void>",
366
- "name": "refactorVariableAndClasses",
367
- "params": [
368
- {
369
- "__schema": "ParameterSchema",
370
- "location": {
371
- "filePath": "refactoring.main.runtime.ts",
372
- "line": 68,
373
- "character": 5
374
- },
375
- "name": "component",
376
- "type": {
377
- "__schema": "TypeRefSchema",
378
- "location": {
379
- "filePath": "refactoring.main.runtime.ts",
380
- "line": 68,
381
- "character": 16
382
- },
383
- "name": "Component"
384
- },
385
- "isOptional": false,
386
- "isSpread": false
387
- },
388
- {
389
- "__schema": "ParameterSchema",
390
- "location": {
391
- "filePath": "refactoring.main.runtime.ts",
392
- "line": 69,
393
- "character": 5
394
- },
395
- "name": "sourceId",
396
- "type": {
397
- "__schema": "TypeRefSchema",
398
- "location": {
399
- "filePath": "refactoring.main.runtime.ts",
400
- "line": 69,
401
- "character": 15
402
- },
403
- "name": "ComponentID"
404
- },
405
- "isOptional": false,
406
- "isSpread": false
407
- },
408
- {
409
- "__schema": "ParameterSchema",
410
- "location": {
411
- "filePath": "refactoring.main.runtime.ts",
412
- "line": 70,
413
- "character": 5
414
- },
415
- "name": "targetId",
416
- "type": {
417
- "__schema": "TypeRefSchema",
418
- "location": {
419
- "filePath": "refactoring.main.runtime.ts",
420
- "line": 70,
421
- "character": 15
422
- },
423
- "name": "ComponentID"
424
- },
425
- "isOptional": false,
426
- "isSpread": false
427
- },
428
- {
429
- "__schema": "ParameterSchema",
430
- "location": {
431
- "filePath": "refactoring.main.runtime.ts",
432
- "line": 71,
433
- "character": 5
434
- },
435
- "name": "options",
436
- "type": {
437
- "__schema": "TypeLiteralSchema",
438
- "location": {
439
- "filePath": "refactoring.main.runtime.ts",
440
- "line": 71,
441
- "character": 15
442
- },
443
- "members": [
444
- {
445
- "__schema": "VariableLikeSchema",
446
- "location": {
447
- "filePath": "refactoring.main.runtime.ts",
448
- "line": 71,
449
- "character": 17
450
- },
451
- "signature": "(property) ast?: boolean | undefined",
452
- "name": "ast",
453
- "type": {
454
- "__schema": "KeywordTypeSchema",
455
- "location": {
456
- "filePath": "refactoring.main.runtime.ts",
457
- "line": 71,
458
- "character": 23
459
- },
460
- "name": "boolean"
461
- },
462
- "isOptional": true
463
- }
464
- ]
465
- },
466
- "isOptional": true,
467
- "isSpread": false
468
- }
469
- ],
470
- "returnType": {
471
- "__schema": "InferenceTypeSchema",
472
- "location": {
473
- "filePath": "refactoring.main.runtime.ts",
474
- "line": 67,
475
- "character": 3
476
- },
477
- "type": "Promise<void>"
478
- },
479
- "modifiers": [
480
- "async"
481
- ]
482
- },
483
- {
484
- "__schema": "FunctionLikeSchema",
485
- "location": {
486
- "filePath": "refactoring.main.runtime.ts",
487
- "line": 83,
488
- "character": 3
489
- },
490
- "signature": "(method) RefactoringMain.getStringReplacementsForVariablesAndClasses(sourceId: ComponentID, targetId: ComponentID): MultipleStringsReplacement",
491
- "name": "getStringReplacementsForVariablesAndClasses",
492
- "params": [
493
- {
494
- "__schema": "ParameterSchema",
495
- "location": {
496
- "filePath": "refactoring.main.runtime.ts",
497
- "line": 84,
498
- "character": 5
499
- },
500
- "name": "sourceId",
501
- "type": {
502
- "__schema": "TypeRefSchema",
503
- "location": {
504
- "filePath": "refactoring.main.runtime.ts",
505
- "line": 84,
506
- "character": 15
507
- },
508
- "name": "ComponentID"
509
- },
510
- "isOptional": false,
511
- "isSpread": false
512
- },
513
- {
514
- "__schema": "ParameterSchema",
515
- "location": {
516
- "filePath": "refactoring.main.runtime.ts",
517
- "line": 85,
518
- "character": 5
519
- },
520
- "name": "targetId",
521
- "type": {
522
- "__schema": "TypeRefSchema",
523
- "location": {
524
- "filePath": "refactoring.main.runtime.ts",
525
- "line": 85,
526
- "character": 15
527
- },
528
- "name": "ComponentID"
529
- },
530
- "isOptional": false,
531
- "isSpread": false
532
- }
533
- ],
534
- "returnType": {
535
- "__schema": "TypeRefSchema",
536
- "location": {
537
- "filePath": "refactoring.main.runtime.ts",
538
- "line": 83,
539
- "character": 3
540
- },
541
- "name": "MultipleStringsReplacement"
542
- },
543
- "modifiers": []
544
- },
545
- {
546
- "__schema": "FunctionLikeSchema",
547
- "location": {
548
- "filePath": "refactoring.main.runtime.ts",
549
- "line": 103,
550
- "character": 3
551
- },
552
- "signature": "(method) RefactoringMain.refactorVariableAndClassesUsingAST(component: Component, sourceId: ComponentID, targetId: ComponentID): Promise<void>",
553
- "name": "refactorVariableAndClassesUsingAST",
554
- "params": [
555
- {
556
- "__schema": "ParameterSchema",
557
- "location": {
558
- "filePath": "refactoring.main.runtime.ts",
559
- "line": 103,
560
- "character": 44
561
- },
562
- "name": "component",
563
- "type": {
564
- "__schema": "TypeRefSchema",
565
- "location": {
566
- "filePath": "refactoring.main.runtime.ts",
567
- "line": 103,
568
- "character": 55
569
- },
570
- "name": "Component"
571
- },
572
- "isOptional": false,
573
- "isSpread": false
574
- },
575
- {
576
- "__schema": "ParameterSchema",
577
- "location": {
578
- "filePath": "refactoring.main.runtime.ts",
579
- "line": 103,
580
- "character": 66
581
- },
582
- "name": "sourceId",
583
- "type": {
584
- "__schema": "TypeRefSchema",
585
- "location": {
586
- "filePath": "refactoring.main.runtime.ts",
587
- "line": 103,
588
- "character": 76
589
- },
590
- "name": "ComponentID"
591
- },
592
- "isOptional": false,
593
- "isSpread": false
594
- },
595
- {
596
- "__schema": "ParameterSchema",
597
- "location": {
598
- "filePath": "refactoring.main.runtime.ts",
599
- "line": 103,
600
- "character": 89
601
- },
602
- "name": "targetId",
603
- "type": {
604
- "__schema": "TypeRefSchema",
605
- "location": {
606
- "filePath": "refactoring.main.runtime.ts",
607
- "line": 103,
608
- "character": 99
609
- },
610
- "name": "ComponentID"
611
- },
612
- "isOptional": false,
613
- "isSpread": false
614
- }
615
- ],
616
- "returnType": {
617
- "__schema": "InferenceTypeSchema",
618
- "location": {
619
- "filePath": "refactoring.main.runtime.ts",
620
- "line": 103,
621
- "character": 3
622
- },
623
- "type": "Promise<void>"
624
- },
625
- "modifiers": [
626
- "async"
627
- ]
628
- },
629
- {
630
- "__schema": "FunctionLikeSchema",
631
- "location": {
632
- "filePath": "refactoring.main.runtime.ts",
633
- "line": 157,
634
- "character": 3
635
- },
636
- "signature": "(method) RefactoringMain.refactorFilenames(component: Component, sourceId: ComponentID, targetId: ComponentID): void",
637
- "name": "refactorFilenames",
638
- "params": [
639
- {
640
- "__schema": "ParameterSchema",
641
- "location": {
642
- "filePath": "refactoring.main.runtime.ts",
643
- "line": 157,
644
- "character": 21
645
- },
646
- "name": "component",
647
- "type": {
648
- "__schema": "TypeRefSchema",
649
- "location": {
650
- "filePath": "refactoring.main.runtime.ts",
651
- "line": 157,
652
- "character": 32
653
- },
654
- "name": "Component"
655
- },
656
- "isOptional": false,
657
- "isSpread": false
658
- },
659
- {
660
- "__schema": "ParameterSchema",
661
- "location": {
662
- "filePath": "refactoring.main.runtime.ts",
663
- "line": 157,
664
- "character": 43
665
- },
666
- "name": "sourceId",
667
- "type": {
668
- "__schema": "TypeRefSchema",
669
- "location": {
670
- "filePath": "refactoring.main.runtime.ts",
671
- "line": 157,
672
- "character": 53
673
- },
674
- "name": "ComponentID"
675
- },
676
- "isOptional": false,
677
- "isSpread": false
678
- },
679
- {
680
- "__schema": "ParameterSchema",
681
- "location": {
682
- "filePath": "refactoring.main.runtime.ts",
683
- "line": 157,
684
- "character": 66
685
- },
686
- "name": "targetId",
687
- "type": {
688
- "__schema": "TypeRefSchema",
689
- "location": {
690
- "filePath": "refactoring.main.runtime.ts",
691
- "line": 157,
692
- "character": 76
693
- },
694
- "name": "ComponentID"
695
- },
696
- "isOptional": false,
697
- "isSpread": false
698
- }
699
- ],
700
- "returnType": {
701
- "__schema": "InferenceTypeSchema",
702
- "location": {
703
- "filePath": "refactoring.main.runtime.ts",
704
- "line": 157,
705
- "character": 3
706
- },
707
- "type": "void"
708
- },
709
- "modifiers": []
710
- },
711
- {
712
- "__schema": "FunctionLikeSchema",
713
- "location": {
714
- "filePath": "refactoring.main.runtime.ts",
715
- "line": 169,
716
- "character": 3
717
- },
718
- "doc": {
719
- "__schema": "DocSchema",
720
- "location": {
721
- "filePath": "refactoring.main.runtime.ts",
722
- "line": 165,
723
- "character": 3
724
- },
725
- "raw": "/**\n * rename multiple packages dependencies.\n * this method changes the source code of the component, but doesn't write to the filesystem.\n */",
726
- "comment": "rename multiple packages dependencies.\nthis method changes the source code of the component, but doesn't write to the filesystem."
727
- },
728
- "signature": "(method) RefactoringMain.replaceMultipleStrings(components: Component[], stringsToReplace?: MultipleStringsReplacement, transformers?: SourceFileTransformer[], shouldAvoidPackageNames?: boolean): Promise<{\n changedComponents: Component[];\n}>",
729
- "name": "replaceMultipleStrings",
730
- "params": [
731
- {
732
- "__schema": "ParameterSchema",
733
- "location": {
734
- "filePath": "refactoring.main.runtime.ts",
735
- "line": 170,
736
- "character": 5
737
- },
738
- "name": "components",
739
- "type": {
740
- "__schema": "TypeArraySchema",
741
- "location": {
742
- "filePath": "refactoring.main.runtime.ts",
743
- "line": 170,
744
- "character": 17
745
- },
746
- "type": {
747
- "__schema": "TypeRefSchema",
748
- "location": {
749
- "filePath": "refactoring.main.runtime.ts",
750
- "line": 170,
751
- "character": 17
752
- },
753
- "name": "Component"
754
- }
755
- },
756
- "isOptional": false,
757
- "isSpread": false
758
- },
759
- {
760
- "__schema": "ParameterSchema",
761
- "location": {
762
- "filePath": "refactoring.main.runtime.ts",
763
- "line": 171,
764
- "character": 5
765
- },
766
- "name": "stringsToReplace",
767
- "type": {
768
- "__schema": "TypeRefSchema",
769
- "location": {
770
- "filePath": "refactoring.main.runtime.ts",
771
- "line": 171,
772
- "character": 23
773
- },
774
- "name": "MultipleStringsReplacement"
775
- },
776
- "isOptional": true,
777
- "defaultValue": "[]",
778
- "isSpread": false
779
- },
780
- {
781
- "__schema": "ParameterSchema",
782
- "location": {
783
- "filePath": "refactoring.main.runtime.ts",
784
- "line": 172,
785
- "character": 5
786
- },
787
- "name": "transformers",
788
- "type": {
789
- "__schema": "TypeArraySchema",
790
- "location": {
791
- "filePath": "refactoring.main.runtime.ts",
792
- "line": 172,
793
- "character": 20
794
- },
795
- "type": {
796
- "__schema": "TypeRefSchema",
797
- "location": {
798
- "filePath": "refactoring.main.runtime.ts",
799
- "line": 172,
800
- "character": 20
801
- },
802
- "name": "SourceFileTransformer"
803
- }
804
- },
805
- "isOptional": true,
806
- "isSpread": false
807
- },
808
- {
809
- "__schema": "ParameterSchema",
810
- "location": {
811
- "filePath": "refactoring.main.runtime.ts",
812
- "line": 173,
813
- "character": 5
814
- },
815
- "name": "shouldAvoidPackageNames",
816
- "type": {
817
- "__schema": "InferenceTypeSchema",
818
- "location": {
819
- "filePath": "refactoring.main.runtime.ts",
820
- "line": 173,
821
- "character": 5
822
- },
823
- "type": "boolean"
824
- },
825
- "isOptional": true,
826
- "defaultValue": "false",
827
- "isSpread": false
828
- }
829
- ],
830
- "returnType": {
831
- "__schema": "TypeRefSchema",
832
- "location": {
833
- "filePath": "refactoring.main.runtime.ts",
834
- "line": 174,
835
- "character": 6
836
- },
837
- "name": "Promise",
838
- "typeArgs": [
839
- {
840
- "__schema": "TypeLiteralSchema",
841
- "location": {
842
- "filePath": "refactoring.main.runtime.ts",
843
- "line": 174,
844
- "character": 14
845
- },
846
- "members": [
847
- {
848
- "__schema": "VariableLikeSchema",
849
- "location": {
850
- "filePath": "refactoring.main.runtime.ts",
851
- "line": 175,
852
- "character": 5
853
- },
854
- "signature": "(property) changedComponents: Component[]",
855
- "name": "changedComponents",
856
- "type": {
857
- "__schema": "TypeArraySchema",
858
- "location": {
859
- "filePath": "refactoring.main.runtime.ts",
860
- "line": 175,
861
- "character": 24
862
- },
863
- "type": {
864
- "__schema": "TypeRefSchema",
865
- "location": {
866
- "filePath": "refactoring.main.runtime.ts",
867
- "line": 175,
868
- "character": 24
869
- },
870
- "name": "Component"
871
- }
872
- },
873
- "isOptional": false
874
- }
875
- ]
876
- }
877
- ]
878
- },
879
- "modifiers": [
880
- "async"
881
- ]
882
- },
883
- {
884
- "__schema": "VariableLikeSchema",
885
- "location": {
886
- "filePath": "refactoring.main.runtime.ts",
887
- "line": 334,
888
- "character": 3
889
- },
890
- "signature": "(property) RefactoringMain.slots: never[]",
891
- "name": "slots",
892
- "type": {
893
- "__schema": "InferenceTypeSchema",
894
- "location": {
895
- "filePath": "refactoring.main.runtime.ts",
896
- "line": 334,
897
- "character": 3
898
- },
899
- "type": "never[]"
900
- },
901
- "isOptional": true,
902
- "defaultValue": "[]"
903
- },
904
- {
905
- "__schema": "VariableLikeSchema",
906
- "location": {
907
- "filePath": "refactoring.main.runtime.ts",
908
- "line": 335,
909
- "character": 3
910
- },
911
- "signature": "(property) RefactoringMain.dependencies: Aspect[]",
912
- "name": "dependencies",
913
- "type": {
914
- "__schema": "InferenceTypeSchema",
915
- "location": {
916
- "filePath": "refactoring.main.runtime.ts",
917
- "line": 335,
918
- "character": 3
919
- },
920
- "type": "Aspect[]"
921
- },
922
- "isOptional": true,
923
- "defaultValue": "[ComponentAspect, PkgAspect, CLIAspect, EnvsAspect, PrettierAspect]"
924
- },
925
- {
926
- "__schema": "VariableLikeSchema",
927
- "location": {
928
- "filePath": "refactoring.main.runtime.ts",
929
- "line": 336,
930
- "character": 3
931
- },
932
- "signature": "(property) RefactoringMain.runtime: RuntimeDefinition",
933
- "name": "runtime",
934
- "type": {
935
- "__schema": "InferenceTypeSchema",
936
- "location": {
937
- "filePath": "refactoring.main.runtime.ts",
938
- "line": 336,
939
- "character": 3
940
- },
941
- "type": "RuntimeDefinition"
942
- },
943
- "isOptional": true,
944
- "defaultValue": "MainRuntime"
945
- },
946
- {
947
- "__schema": "FunctionLikeSchema",
948
- "location": {
949
- "filePath": "refactoring.main.runtime.ts",
950
- "line": 337,
951
- "character": 3
952
- },
953
- "signature": "(method) RefactoringMain.provider([componentMain, pkg, cli, envMain, prettierMain]: [\n ComponentMain,\n PkgMain,\n CLIMain,\n EnvsMain,\n PrettierMain\n]): Promise<RefactoringMain>",
954
- "name": "provider",
955
- "params": [
956
- {
957
- "__schema": "ParameterSchema",
958
- "location": {
959
- "filePath": "refactoring.main.runtime.ts",
960
- "line": 337,
961
- "character": 25
962
- },
963
- "name": "[ componentMain, pkg, cli, envMain, prettierMain ]",
964
- "type": {
965
- "__schema": "TupleTypeSchema",
966
- "location": {
967
- "filePath": "refactoring.main.runtime.ts",
968
- "line": 337,
969
- "character": 75
970
- },
971
- "elements": [
972
- {
973
- "__schema": "TypeRefSchema",
974
- "location": {
975
- "filePath": "refactoring.main.runtime.ts",
976
- "line": 338,
977
- "character": 5
978
- },
979
- "name": "ComponentMain"
980
- },
981
- {
982
- "__schema": "TypeRefSchema",
983
- "location": {
984
- "filePath": "refactoring.main.runtime.ts",
985
- "line": 339,
986
- "character": 5
987
- },
988
- "name": "PkgMain"
989
- },
990
- {
991
- "__schema": "TypeRefSchema",
992
- "location": {
993
- "filePath": "refactoring.main.runtime.ts",
994
- "line": 340,
995
- "character": 5
996
- },
997
- "name": "CLIMain"
998
- },
999
- {
1000
- "__schema": "TypeRefSchema",
1001
- "location": {
1002
- "filePath": "refactoring.main.runtime.ts",
1003
- "line": 341,
1004
- "character": 5
1005
- },
1006
- "name": "EnvsMain"
1007
- },
1008
- {
1009
- "__schema": "TypeRefSchema",
1010
- "location": {
1011
- "filePath": "refactoring.main.runtime.ts",
1012
- "line": 342,
1013
- "character": 5
1014
- },
1015
- "name": "PrettierMain"
1016
- }
1017
- ]
1018
- },
1019
- "isOptional": false,
1020
- "isSpread": false
1021
- }
1022
- ],
1023
- "returnType": {
1024
- "__schema": "InferenceTypeSchema",
1025
- "location": {
1026
- "filePath": "refactoring.main.runtime.ts",
1027
- "line": 337,
1028
- "character": 3
1029
- },
1030
- "type": "Promise<RefactoringMain>"
1031
- },
1032
- "modifiers": [
1033
- "static",
1034
- "async"
1035
- ]
1036
- }
1037
- ],
1038
- "extendsNodes": [],
1039
- "implementNodes": []
1040
- },
1041
- {
1042
- "__schema": "TypeSchema",
1043
- "location": {
1044
- "filePath": "refactoring.main.runtime.ts",
1045
- "line": 29,
1046
- "character": 1
1047
- },
1048
- "signature": "type MultipleStringsReplacement = {\n oldStr: string;\n newStr: string;\n}[]",
1049
- "name": "MultipleStringsReplacement",
1050
- "type": {
1051
- "__schema": "TypeRefSchema",
1052
- "location": {
1053
- "filePath": "refactoring.main.runtime.ts",
1054
- "line": 29,
1055
- "character": 42
1056
- },
1057
- "name": "Array",
1058
- "typeArgs": [
1059
- {
1060
- "__schema": "TypeLiteralSchema",
1061
- "location": {
1062
- "filePath": "refactoring.main.runtime.ts",
1063
- "line": 29,
1064
- "character": 48
1065
- },
1066
- "members": [
1067
- {
1068
- "__schema": "VariableLikeSchema",
1069
- "location": {
1070
- "filePath": "refactoring.main.runtime.ts",
1071
- "line": 29,
1072
- "character": 50
1073
- },
1074
- "signature": "(property) oldStr: string",
1075
- "name": "oldStr",
1076
- "type": {
1077
- "__schema": "KeywordTypeSchema",
1078
- "location": {
1079
- "filePath": "refactoring.main.runtime.ts",
1080
- "line": 29,
1081
- "character": 58
1082
- },
1083
- "name": "string"
1084
- },
1085
- "isOptional": false
1086
- },
1087
- {
1088
- "__schema": "VariableLikeSchema",
1089
- "location": {
1090
- "filePath": "refactoring.main.runtime.ts",
1091
- "line": 29,
1092
- "character": 66
1093
- },
1094
- "signature": "(property) newStr: string",
1095
- "name": "newStr",
1096
- "type": {
1097
- "__schema": "KeywordTypeSchema",
1098
- "location": {
1099
- "filePath": "refactoring.main.runtime.ts",
1100
- "line": 29,
1101
- "character": 74
1102
- },
1103
- "name": "string"
1104
- },
1105
- "isOptional": false
1106
- }
1107
- ]
1108
- }
1109
- ]
1110
- }
1111
- },
1112
- {
1113
- "__schema": "UnImplementedSchema",
1114
- "location": {
1115
- "filePath": "index.ts",
1116
- "line": 4,
1117
- "character": 16
1118
- },
1119
- "name": "RefactoringAspect",
1120
- "type": "Identifier"
1121
- },
1122
- {
1123
- "__schema": "VariableLikeSchema",
1124
- "location": {
1125
- "filePath": "refactoring.aspect.ts",
1126
- "line": 3,
1127
- "character": 14
1128
- },
1129
- "signature": "const RefactoringAspect: Aspect",
1130
- "name": "RefactoringAspect",
1131
- "type": {
1132
- "__schema": "TypeRefSchema",
1133
- "location": {
1134
- "filePath": "refactoring.aspect.ts",
1135
- "line": 3,
1136
- "character": 14
1137
- },
1138
- "name": "Aspect",
1139
- "componentId": {
1140
- "scope": "teambit.harmony",
1141
- "name": "harmony",
1142
- "version": "0.4.6"
1143
- }
1144
- },
1145
- "isOptional": false,
1146
- "defaultValue": "Aspect.create({\n id: 'teambit.component/refactoring',\n})"
1147
- }
1148
- ],
1149
- "internals": []
1150
- },
1151
- "internals": [
1152
- {
1153
- "__schema": "ModuleSchema",
1154
- "location": {
1155
- "filePath": "refactoring.main.runtime.ts",
1156
- "line": 1,
1157
- "character": 1
1158
- },
1159
- "exports": [
1160
- {
1161
- "__schema": "TypeSchema",
1162
- "location": {
1163
- "filePath": "refactoring.main.runtime.ts",
1164
- "line": 29,
1165
- "character": 1
1166
- },
1167
- "signature": "type MultipleStringsReplacement = {\n oldStr: string;\n newStr: string;\n}[]",
1168
- "name": "MultipleStringsReplacement",
1169
- "type": {
1170
- "__schema": "TypeRefSchema",
1171
- "location": {
1172
- "filePath": "refactoring.main.runtime.ts",
1173
- "line": 29,
1174
- "character": 42
1175
- },
1176
- "name": "Array",
1177
- "typeArgs": [
1178
- {
1179
- "__schema": "TypeLiteralSchema",
1180
- "location": {
1181
- "filePath": "refactoring.main.runtime.ts",
1182
- "line": 29,
1183
- "character": 48
1184
- },
1185
- "members": [
1186
- {
1187
- "__schema": "VariableLikeSchema",
1188
- "location": {
1189
- "filePath": "refactoring.main.runtime.ts",
1190
- "line": 29,
1191
- "character": 50
1192
- },
1193
- "signature": "(property) oldStr: string",
1194
- "name": "oldStr",
1195
- "type": {
1196
- "__schema": "KeywordTypeSchema",
1197
- "location": {
1198
- "filePath": "refactoring.main.runtime.ts",
1199
- "line": 29,
1200
- "character": 58
1201
- },
1202
- "name": "string"
1203
- },
1204
- "isOptional": false
1205
- },
1206
- {
1207
- "__schema": "VariableLikeSchema",
1208
- "location": {
1209
- "filePath": "refactoring.main.runtime.ts",
1210
- "line": 29,
1211
- "character": 66
1212
- },
1213
- "signature": "(property) newStr: string",
1214
- "name": "newStr",
1215
- "type": {
1216
- "__schema": "KeywordTypeSchema",
1217
- "location": {
1218
- "filePath": "refactoring.main.runtime.ts",
1219
- "line": 29,
1220
- "character": 74
1221
- },
1222
- "name": "string"
1223
- },
1224
- "isOptional": false
1225
- }
1226
- ]
1227
- }
1228
- ]
1229
- }
1230
- },
1231
- {
1232
- "__schema": "ClassSchema",
1233
- "location": {
1234
- "filePath": "refactoring.main.runtime.ts",
1235
- "line": 31,
1236
- "character": 1
1237
- },
1238
- "signature": "class RefactoringMain",
1239
- "name": "RefactoringMain",
1240
- "members": [
1241
- {
1242
- "__schema": "ConstructorSchema",
1243
- "location": {
1244
- "filePath": "refactoring.main.runtime.ts",
1245
- "line": 32,
1246
- "character": 3
1247
- },
1248
- "signature": "constructor RefactoringMain(componentMain: ComponentMain, pkg: PkgMain, envs: EnvsMain, prettierMain: PrettierMain): RefactoringMain",
1249
- "name": "constructor",
1250
- "params": [
1251
- {
1252
- "__schema": "ParameterSchema",
1253
- "location": {
1254
- "filePath": "refactoring.main.runtime.ts",
1255
- "line": 33,
1256
- "character": 5
1257
- },
1258
- "name": "componentMain",
1259
- "type": {
1260
- "__schema": "TypeRefSchema",
1261
- "location": {
1262
- "filePath": "refactoring.main.runtime.ts",
1263
- "line": 33,
1264
- "character": 28
1265
- },
1266
- "name": "ComponentMain"
1267
- },
1268
- "isOptional": false,
1269
- "isSpread": false
1270
- },
1271
- {
1272
- "__schema": "ParameterSchema",
1273
- "location": {
1274
- "filePath": "refactoring.main.runtime.ts",
1275
- "line": 34,
1276
- "character": 5
1277
- },
1278
- "name": "pkg",
1279
- "type": {
1280
- "__schema": "TypeRefSchema",
1281
- "location": {
1282
- "filePath": "refactoring.main.runtime.ts",
1283
- "line": 34,
1284
- "character": 18
1285
- },
1286
- "name": "PkgMain"
1287
- },
1288
- "isOptional": false,
1289
- "isSpread": false
1290
- },
1291
- {
1292
- "__schema": "ParameterSchema",
1293
- "location": {
1294
- "filePath": "refactoring.main.runtime.ts",
1295
- "line": 35,
1296
- "character": 5
1297
- },
1298
- "name": "envs",
1299
- "type": {
1300
- "__schema": "TypeRefSchema",
1301
- "location": {
1302
- "filePath": "refactoring.main.runtime.ts",
1303
- "line": 35,
1304
- "character": 19
1305
- },
1306
- "name": "EnvsMain"
1307
- },
1308
- "isOptional": false,
1309
- "isSpread": false
1310
- },
1311
- {
1312
- "__schema": "ParameterSchema",
1313
- "location": {
1314
- "filePath": "refactoring.main.runtime.ts",
1315
- "line": 36,
1316
- "character": 5
1317
- },
1318
- "name": "prettierMain",
1319
- "type": {
1320
- "__schema": "TypeRefSchema",
1321
- "location": {
1322
- "filePath": "refactoring.main.runtime.ts",
1323
- "line": 36,
1324
- "character": 27
1325
- },
1326
- "name": "PrettierMain"
1327
- },
1328
- "isOptional": false,
1329
- "isSpread": false
1330
- }
1331
- ],
1332
- "returnType": {
1333
- "__schema": "ThisTypeSchema",
1334
- "location": {
1335
- "filePath": "refactoring.main.runtime.ts",
1336
- "line": 31,
1337
- "character": 1
1338
- },
1339
- "name": "RefactoringMain"
1340
- },
1341
- "modifiers": []
1342
- },
1343
- {
1344
- "__schema": "FunctionLikeSchema",
1345
- "location": {
1346
- "filePath": "refactoring.main.runtime.ts",
1347
- "line": 44,
1348
- "character": 3
1349
- },
1350
- "doc": {
1351
- "__schema": "DocSchema",
1352
- "location": {
1353
- "filePath": "refactoring.main.runtime.ts",
1354
- "line": 39,
1355
- "character": 3
1356
- },
1357
- "raw": "/**\n * refactor the dependency name of a component.\n * oldId and newId can be either a component-id or a package-name.\n * this method changes the source code of the component, but doesn't write to the filesystem.\n */",
1358
- "comment": "refactor the dependency name of a component.\noldId and newId can be either a component-id or a package-name.\nthis method changes the source code of the component, but doesn't write to the filesystem."
1359
- },
1360
- "signature": "(method) RefactoringMain.refactorDependencyName(components: Component[], oldId: ComponentID | string, newId: ComponentID | string): Promise<{\n oldPackageName: string;\n newPackageName: string;\n changedComponents: Component[];\n}>",
1361
- "name": "refactorDependencyName",
1362
- "params": [
1363
- {
1364
- "__schema": "ParameterSchema",
1365
- "location": {
1366
- "filePath": "refactoring.main.runtime.ts",
1367
- "line": 45,
1368
- "character": 5
1369
- },
1370
- "name": "components",
1371
- "type": {
1372
- "__schema": "TypeArraySchema",
1373
- "location": {
1374
- "filePath": "refactoring.main.runtime.ts",
1375
- "line": 45,
1376
- "character": 17
1377
- },
1378
- "type": {
1379
- "__schema": "TypeRefSchema",
1380
- "location": {
1381
- "filePath": "refactoring.main.runtime.ts",
1382
- "line": 45,
1383
- "character": 17
1384
- },
1385
- "name": "Component"
1386
- }
1387
- },
1388
- "isOptional": false,
1389
- "isSpread": false
1390
- },
1391
- {
1392
- "__schema": "ParameterSchema",
1393
- "location": {
1394
- "filePath": "refactoring.main.runtime.ts",
1395
- "line": 46,
1396
- "character": 5
1397
- },
1398
- "name": "oldId",
1399
- "type": {
1400
- "__schema": "TypeUnionSchema",
1401
- "location": {
1402
- "filePath": "refactoring.main.runtime.ts",
1403
- "line": 46,
1404
- "character": 12
1405
- },
1406
- "types": [
1407
- {
1408
- "__schema": "TypeRefSchema",
1409
- "location": {
1410
- "filePath": "refactoring.main.runtime.ts",
1411
- "line": 46,
1412
- "character": 12
1413
- },
1414
- "name": "ComponentID"
1415
- },
1416
- {
1417
- "__schema": "KeywordTypeSchema",
1418
- "location": {
1419
- "filePath": "refactoring.main.runtime.ts",
1420
- "line": 46,
1421
- "character": 26
1422
- },
1423
- "name": "string"
1424
- }
1425
- ]
1426
- },
1427
- "isOptional": false,
1428
- "isSpread": false
1429
- },
1430
- {
1431
- "__schema": "ParameterSchema",
1432
- "location": {
1433
- "filePath": "refactoring.main.runtime.ts",
1434
- "line": 47,
1435
- "character": 5
1436
- },
1437
- "name": "newId",
1438
- "type": {
1439
- "__schema": "TypeUnionSchema",
1440
- "location": {
1441
- "filePath": "refactoring.main.runtime.ts",
1442
- "line": 47,
1443
- "character": 12
1444
- },
1445
- "types": [
1446
- {
1447
- "__schema": "TypeRefSchema",
1448
- "location": {
1449
- "filePath": "refactoring.main.runtime.ts",
1450
- "line": 47,
1451
- "character": 12
1452
- },
1453
- "name": "ComponentID"
1454
- },
1455
- {
1456
- "__schema": "KeywordTypeSchema",
1457
- "location": {
1458
- "filePath": "refactoring.main.runtime.ts",
1459
- "line": 47,
1460
- "character": 26
1461
- },
1462
- "name": "string"
1463
- }
1464
- ]
1465
- },
1466
- "isOptional": false,
1467
- "isSpread": false
1468
- }
1469
- ],
1470
- "returnType": {
1471
- "__schema": "TypeRefSchema",
1472
- "location": {
1473
- "filePath": "refactoring.main.runtime.ts",
1474
- "line": 48,
1475
- "character": 6
1476
- },
1477
- "name": "Promise",
1478
- "typeArgs": [
1479
- {
1480
- "__schema": "TypeLiteralSchema",
1481
- "location": {
1482
- "filePath": "refactoring.main.runtime.ts",
1483
- "line": 48,
1484
- "character": 14
1485
- },
1486
- "members": [
1487
- {
1488
- "__schema": "VariableLikeSchema",
1489
- "location": {
1490
- "filePath": "refactoring.main.runtime.ts",
1491
- "line": 48,
1492
- "character": 16
1493
- },
1494
- "signature": "(property) oldPackageName: string",
1495
- "name": "oldPackageName",
1496
- "type": {
1497
- "__schema": "KeywordTypeSchema",
1498
- "location": {
1499
- "filePath": "refactoring.main.runtime.ts",
1500
- "line": 48,
1501
- "character": 32
1502
- },
1503
- "name": "string"
1504
- },
1505
- "isOptional": false
1506
- },
1507
- {
1508
- "__schema": "VariableLikeSchema",
1509
- "location": {
1510
- "filePath": "refactoring.main.runtime.ts",
1511
- "line": 48,
1512
- "character": 40
1513
- },
1514
- "signature": "(property) newPackageName: string",
1515
- "name": "newPackageName",
1516
- "type": {
1517
- "__schema": "KeywordTypeSchema",
1518
- "location": {
1519
- "filePath": "refactoring.main.runtime.ts",
1520
- "line": 48,
1521
- "character": 56
1522
- },
1523
- "name": "string"
1524
- },
1525
- "isOptional": false
1526
- },
1527
- {
1528
- "__schema": "VariableLikeSchema",
1529
- "location": {
1530
- "filePath": "refactoring.main.runtime.ts",
1531
- "line": 48,
1532
- "character": 64
1533
- },
1534
- "signature": "(property) changedComponents: Component[]",
1535
- "name": "changedComponents",
1536
- "type": {
1537
- "__schema": "TypeArraySchema",
1538
- "location": {
1539
- "filePath": "refactoring.main.runtime.ts",
1540
- "line": 48,
1541
- "character": 83
1542
- },
1543
- "type": {
1544
- "__schema": "TypeRefSchema",
1545
- "location": {
1546
- "filePath": "refactoring.main.runtime.ts",
1547
- "line": 48,
1548
- "character": 83
1549
- },
1550
- "name": "Component"
1551
- }
1552
- },
1553
- "isOptional": false
1554
- }
1555
- ]
1556
- }
1557
- ]
1558
- },
1559
- "modifiers": [
1560
- "async"
1561
- ]
1562
- },
1563
- {
1564
- "__schema": "FunctionLikeSchema",
1565
- "location": {
1566
- "filePath": "refactoring.main.runtime.ts",
1567
- "line": 67,
1568
- "character": 3
1569
- },
1570
- "doc": {
1571
- "__schema": "DocSchema",
1572
- "location": {
1573
- "filePath": "refactoring.main.runtime.ts",
1574
- "line": 63,
1575
- "character": 3
1576
- },
1577
- "raw": "/**\n * replaces the old-name inside the source code of the given component with the new name.\n * helpful when renaming/forking an aspect/env where the component-name is used as the class-name and variable-name.\n */",
1578
- "comment": "replaces the old-name inside the source code of the given component with the new name.\nhelpful when renaming/forking an aspect/env where the component-name is used as the class-name and variable-name."
1579
- },
1580
- "signature": "(method) RefactoringMain.refactorVariableAndClasses(component: Component, sourceId: ComponentID, targetId: ComponentID, options?: {\n ast?: boolean;\n}): Promise<void>",
1581
- "name": "refactorVariableAndClasses",
1582
- "params": [
1583
- {
1584
- "__schema": "ParameterSchema",
1585
- "location": {
1586
- "filePath": "refactoring.main.runtime.ts",
1587
- "line": 68,
1588
- "character": 5
1589
- },
1590
- "name": "component",
1591
- "type": {
1592
- "__schema": "TypeRefSchema",
1593
- "location": {
1594
- "filePath": "refactoring.main.runtime.ts",
1595
- "line": 68,
1596
- "character": 16
1597
- },
1598
- "name": "Component"
1599
- },
1600
- "isOptional": false,
1601
- "isSpread": false
1602
- },
1603
- {
1604
- "__schema": "ParameterSchema",
1605
- "location": {
1606
- "filePath": "refactoring.main.runtime.ts",
1607
- "line": 69,
1608
- "character": 5
1609
- },
1610
- "name": "sourceId",
1611
- "type": {
1612
- "__schema": "TypeRefSchema",
1613
- "location": {
1614
- "filePath": "refactoring.main.runtime.ts",
1615
- "line": 69,
1616
- "character": 15
1617
- },
1618
- "name": "ComponentID"
1619
- },
1620
- "isOptional": false,
1621
- "isSpread": false
1622
- },
1623
- {
1624
- "__schema": "ParameterSchema",
1625
- "location": {
1626
- "filePath": "refactoring.main.runtime.ts",
1627
- "line": 70,
1628
- "character": 5
1629
- },
1630
- "name": "targetId",
1631
- "type": {
1632
- "__schema": "TypeRefSchema",
1633
- "location": {
1634
- "filePath": "refactoring.main.runtime.ts",
1635
- "line": 70,
1636
- "character": 15
1637
- },
1638
- "name": "ComponentID"
1639
- },
1640
- "isOptional": false,
1641
- "isSpread": false
1642
- },
1643
- {
1644
- "__schema": "ParameterSchema",
1645
- "location": {
1646
- "filePath": "refactoring.main.runtime.ts",
1647
- "line": 71,
1648
- "character": 5
1649
- },
1650
- "name": "options",
1651
- "type": {
1652
- "__schema": "TypeLiteralSchema",
1653
- "location": {
1654
- "filePath": "refactoring.main.runtime.ts",
1655
- "line": 71,
1656
- "character": 15
1657
- },
1658
- "members": [
1659
- {
1660
- "__schema": "VariableLikeSchema",
1661
- "location": {
1662
- "filePath": "refactoring.main.runtime.ts",
1663
- "line": 71,
1664
- "character": 17
1665
- },
1666
- "signature": "(property) ast?: boolean | undefined",
1667
- "name": "ast",
1668
- "type": {
1669
- "__schema": "KeywordTypeSchema",
1670
- "location": {
1671
- "filePath": "refactoring.main.runtime.ts",
1672
- "line": 71,
1673
- "character": 23
1674
- },
1675
- "name": "boolean"
1676
- },
1677
- "isOptional": true
1678
- }
1679
- ]
1680
- },
1681
- "isOptional": true,
1682
- "isSpread": false
1683
- }
1684
- ],
1685
- "returnType": {
1686
- "__schema": "InferenceTypeSchema",
1687
- "location": {
1688
- "filePath": "refactoring.main.runtime.ts",
1689
- "line": 67,
1690
- "character": 3
1691
- },
1692
- "type": "Promise<void>"
1693
- },
1694
- "modifiers": [
1695
- "async"
1696
- ]
1697
- },
1698
- {
1699
- "__schema": "FunctionLikeSchema",
1700
- "location": {
1701
- "filePath": "refactoring.main.runtime.ts",
1702
- "line": 83,
1703
- "character": 3
1704
- },
1705
- "signature": "(method) RefactoringMain.getStringReplacementsForVariablesAndClasses(sourceId: ComponentID, targetId: ComponentID): MultipleStringsReplacement",
1706
- "name": "getStringReplacementsForVariablesAndClasses",
1707
- "params": [
1708
- {
1709
- "__schema": "ParameterSchema",
1710
- "location": {
1711
- "filePath": "refactoring.main.runtime.ts",
1712
- "line": 84,
1713
- "character": 5
1714
- },
1715
- "name": "sourceId",
1716
- "type": {
1717
- "__schema": "TypeRefSchema",
1718
- "location": {
1719
- "filePath": "refactoring.main.runtime.ts",
1720
- "line": 84,
1721
- "character": 15
1722
- },
1723
- "name": "ComponentID"
1724
- },
1725
- "isOptional": false,
1726
- "isSpread": false
1727
- },
1728
- {
1729
- "__schema": "ParameterSchema",
1730
- "location": {
1731
- "filePath": "refactoring.main.runtime.ts",
1732
- "line": 85,
1733
- "character": 5
1734
- },
1735
- "name": "targetId",
1736
- "type": {
1737
- "__schema": "TypeRefSchema",
1738
- "location": {
1739
- "filePath": "refactoring.main.runtime.ts",
1740
- "line": 85,
1741
- "character": 15
1742
- },
1743
- "name": "ComponentID"
1744
- },
1745
- "isOptional": false,
1746
- "isSpread": false
1747
- }
1748
- ],
1749
- "returnType": {
1750
- "__schema": "TypeRefSchema",
1751
- "location": {
1752
- "filePath": "refactoring.main.runtime.ts",
1753
- "line": 83,
1754
- "character": 3
1755
- },
1756
- "name": "MultipleStringsReplacement"
1757
- },
1758
- "modifiers": []
1759
- },
1760
- {
1761
- "__schema": "FunctionLikeSchema",
1762
- "location": {
1763
- "filePath": "refactoring.main.runtime.ts",
1764
- "line": 103,
1765
- "character": 3
1766
- },
1767
- "signature": "(method) RefactoringMain.refactorVariableAndClassesUsingAST(component: Component, sourceId: ComponentID, targetId: ComponentID): Promise<void>",
1768
- "name": "refactorVariableAndClassesUsingAST",
1769
- "params": [
1770
- {
1771
- "__schema": "ParameterSchema",
1772
- "location": {
1773
- "filePath": "refactoring.main.runtime.ts",
1774
- "line": 103,
1775
- "character": 44
1776
- },
1777
- "name": "component",
1778
- "type": {
1779
- "__schema": "TypeRefSchema",
1780
- "location": {
1781
- "filePath": "refactoring.main.runtime.ts",
1782
- "line": 103,
1783
- "character": 55
1784
- },
1785
- "name": "Component"
1786
- },
1787
- "isOptional": false,
1788
- "isSpread": false
1789
- },
1790
- {
1791
- "__schema": "ParameterSchema",
1792
- "location": {
1793
- "filePath": "refactoring.main.runtime.ts",
1794
- "line": 103,
1795
- "character": 66
1796
- },
1797
- "name": "sourceId",
1798
- "type": {
1799
- "__schema": "TypeRefSchema",
1800
- "location": {
1801
- "filePath": "refactoring.main.runtime.ts",
1802
- "line": 103,
1803
- "character": 76
1804
- },
1805
- "name": "ComponentID"
1806
- },
1807
- "isOptional": false,
1808
- "isSpread": false
1809
- },
1810
- {
1811
- "__schema": "ParameterSchema",
1812
- "location": {
1813
- "filePath": "refactoring.main.runtime.ts",
1814
- "line": 103,
1815
- "character": 89
1816
- },
1817
- "name": "targetId",
1818
- "type": {
1819
- "__schema": "TypeRefSchema",
1820
- "location": {
1821
- "filePath": "refactoring.main.runtime.ts",
1822
- "line": 103,
1823
- "character": 99
1824
- },
1825
- "name": "ComponentID"
1826
- },
1827
- "isOptional": false,
1828
- "isSpread": false
1829
- }
1830
- ],
1831
- "returnType": {
1832
- "__schema": "InferenceTypeSchema",
1833
- "location": {
1834
- "filePath": "refactoring.main.runtime.ts",
1835
- "line": 103,
1836
- "character": 3
1837
- },
1838
- "type": "Promise<void>"
1839
- },
1840
- "modifiers": [
1841
- "async"
1842
- ]
1843
- },
1844
- {
1845
- "__schema": "FunctionLikeSchema",
1846
- "location": {
1847
- "filePath": "refactoring.main.runtime.ts",
1848
- "line": 157,
1849
- "character": 3
1850
- },
1851
- "signature": "(method) RefactoringMain.refactorFilenames(component: Component, sourceId: ComponentID, targetId: ComponentID): void",
1852
- "name": "refactorFilenames",
1853
- "params": [
1854
- {
1855
- "__schema": "ParameterSchema",
1856
- "location": {
1857
- "filePath": "refactoring.main.runtime.ts",
1858
- "line": 157,
1859
- "character": 21
1860
- },
1861
- "name": "component",
1862
- "type": {
1863
- "__schema": "TypeRefSchema",
1864
- "location": {
1865
- "filePath": "refactoring.main.runtime.ts",
1866
- "line": 157,
1867
- "character": 32
1868
- },
1869
- "name": "Component"
1870
- },
1871
- "isOptional": false,
1872
- "isSpread": false
1873
- },
1874
- {
1875
- "__schema": "ParameterSchema",
1876
- "location": {
1877
- "filePath": "refactoring.main.runtime.ts",
1878
- "line": 157,
1879
- "character": 43
1880
- },
1881
- "name": "sourceId",
1882
- "type": {
1883
- "__schema": "TypeRefSchema",
1884
- "location": {
1885
- "filePath": "refactoring.main.runtime.ts",
1886
- "line": 157,
1887
- "character": 53
1888
- },
1889
- "name": "ComponentID"
1890
- },
1891
- "isOptional": false,
1892
- "isSpread": false
1893
- },
1894
- {
1895
- "__schema": "ParameterSchema",
1896
- "location": {
1897
- "filePath": "refactoring.main.runtime.ts",
1898
- "line": 157,
1899
- "character": 66
1900
- },
1901
- "name": "targetId",
1902
- "type": {
1903
- "__schema": "TypeRefSchema",
1904
- "location": {
1905
- "filePath": "refactoring.main.runtime.ts",
1906
- "line": 157,
1907
- "character": 76
1908
- },
1909
- "name": "ComponentID"
1910
- },
1911
- "isOptional": false,
1912
- "isSpread": false
1913
- }
1914
- ],
1915
- "returnType": {
1916
- "__schema": "InferenceTypeSchema",
1917
- "location": {
1918
- "filePath": "refactoring.main.runtime.ts",
1919
- "line": 157,
1920
- "character": 3
1921
- },
1922
- "type": "void"
1923
- },
1924
- "modifiers": []
1925
- },
1926
- {
1927
- "__schema": "FunctionLikeSchema",
1928
- "location": {
1929
- "filePath": "refactoring.main.runtime.ts",
1930
- "line": 169,
1931
- "character": 3
1932
- },
1933
- "doc": {
1934
- "__schema": "DocSchema",
1935
- "location": {
1936
- "filePath": "refactoring.main.runtime.ts",
1937
- "line": 165,
1938
- "character": 3
1939
- },
1940
- "raw": "/**\n * rename multiple packages dependencies.\n * this method changes the source code of the component, but doesn't write to the filesystem.\n */",
1941
- "comment": "rename multiple packages dependencies.\nthis method changes the source code of the component, but doesn't write to the filesystem."
1942
- },
1943
- "signature": "(method) RefactoringMain.replaceMultipleStrings(components: Component[], stringsToReplace?: MultipleStringsReplacement, transformers?: SourceFileTransformer[], shouldAvoidPackageNames?: boolean): Promise<{\n changedComponents: Component[];\n}>",
1944
- "name": "replaceMultipleStrings",
1945
- "params": [
1946
- {
1947
- "__schema": "ParameterSchema",
1948
- "location": {
1949
- "filePath": "refactoring.main.runtime.ts",
1950
- "line": 170,
1951
- "character": 5
1952
- },
1953
- "name": "components",
1954
- "type": {
1955
- "__schema": "TypeArraySchema",
1956
- "location": {
1957
- "filePath": "refactoring.main.runtime.ts",
1958
- "line": 170,
1959
- "character": 17
1960
- },
1961
- "type": {
1962
- "__schema": "TypeRefSchema",
1963
- "location": {
1964
- "filePath": "refactoring.main.runtime.ts",
1965
- "line": 170,
1966
- "character": 17
1967
- },
1968
- "name": "Component"
1969
- }
1970
- },
1971
- "isOptional": false,
1972
- "isSpread": false
1973
- },
1974
- {
1975
- "__schema": "ParameterSchema",
1976
- "location": {
1977
- "filePath": "refactoring.main.runtime.ts",
1978
- "line": 171,
1979
- "character": 5
1980
- },
1981
- "name": "stringsToReplace",
1982
- "type": {
1983
- "__schema": "TypeRefSchema",
1984
- "location": {
1985
- "filePath": "refactoring.main.runtime.ts",
1986
- "line": 171,
1987
- "character": 23
1988
- },
1989
- "name": "MultipleStringsReplacement"
1990
- },
1991
- "isOptional": true,
1992
- "defaultValue": "[]",
1993
- "isSpread": false
1994
- },
1995
- {
1996
- "__schema": "ParameterSchema",
1997
- "location": {
1998
- "filePath": "refactoring.main.runtime.ts",
1999
- "line": 172,
2000
- "character": 5
2001
- },
2002
- "name": "transformers",
2003
- "type": {
2004
- "__schema": "TypeArraySchema",
2005
- "location": {
2006
- "filePath": "refactoring.main.runtime.ts",
2007
- "line": 172,
2008
- "character": 20
2009
- },
2010
- "type": {
2011
- "__schema": "TypeRefSchema",
2012
- "location": {
2013
- "filePath": "refactoring.main.runtime.ts",
2014
- "line": 172,
2015
- "character": 20
2016
- },
2017
- "name": "SourceFileTransformer"
2018
- }
2019
- },
2020
- "isOptional": true,
2021
- "isSpread": false
2022
- },
2023
- {
2024
- "__schema": "ParameterSchema",
2025
- "location": {
2026
- "filePath": "refactoring.main.runtime.ts",
2027
- "line": 173,
2028
- "character": 5
2029
- },
2030
- "name": "shouldAvoidPackageNames",
2031
- "type": {
2032
- "__schema": "InferenceTypeSchema",
2033
- "location": {
2034
- "filePath": "refactoring.main.runtime.ts",
2035
- "line": 173,
2036
- "character": 5
2037
- },
2038
- "type": "boolean"
2039
- },
2040
- "isOptional": true,
2041
- "defaultValue": "false",
2042
- "isSpread": false
2043
- }
2044
- ],
2045
- "returnType": {
2046
- "__schema": "TypeRefSchema",
2047
- "location": {
2048
- "filePath": "refactoring.main.runtime.ts",
2049
- "line": 174,
2050
- "character": 6
2051
- },
2052
- "name": "Promise",
2053
- "typeArgs": [
2054
- {
2055
- "__schema": "TypeLiteralSchema",
2056
- "location": {
2057
- "filePath": "refactoring.main.runtime.ts",
2058
- "line": 174,
2059
- "character": 14
2060
- },
2061
- "members": [
2062
- {
2063
- "__schema": "VariableLikeSchema",
2064
- "location": {
2065
- "filePath": "refactoring.main.runtime.ts",
2066
- "line": 175,
2067
- "character": 5
2068
- },
2069
- "signature": "(property) changedComponents: Component[]",
2070
- "name": "changedComponents",
2071
- "type": {
2072
- "__schema": "TypeArraySchema",
2073
- "location": {
2074
- "filePath": "refactoring.main.runtime.ts",
2075
- "line": 175,
2076
- "character": 24
2077
- },
2078
- "type": {
2079
- "__schema": "TypeRefSchema",
2080
- "location": {
2081
- "filePath": "refactoring.main.runtime.ts",
2082
- "line": 175,
2083
- "character": 24
2084
- },
2085
- "name": "Component"
2086
- }
2087
- },
2088
- "isOptional": false
2089
- }
2090
- ]
2091
- }
2092
- ]
2093
- },
2094
- "modifiers": [
2095
- "async"
2096
- ]
2097
- },
2098
- {
2099
- "__schema": "VariableLikeSchema",
2100
- "location": {
2101
- "filePath": "refactoring.main.runtime.ts",
2102
- "line": 334,
2103
- "character": 3
2104
- },
2105
- "signature": "(property) RefactoringMain.slots: never[]",
2106
- "name": "slots",
2107
- "type": {
2108
- "__schema": "InferenceTypeSchema",
2109
- "location": {
2110
- "filePath": "refactoring.main.runtime.ts",
2111
- "line": 334,
2112
- "character": 3
2113
- },
2114
- "type": "never[]"
2115
- },
2116
- "isOptional": true,
2117
- "defaultValue": "[]"
2118
- },
2119
- {
2120
- "__schema": "VariableLikeSchema",
2121
- "location": {
2122
- "filePath": "refactoring.main.runtime.ts",
2123
- "line": 335,
2124
- "character": 3
2125
- },
2126
- "signature": "(property) RefactoringMain.dependencies: Aspect[]",
2127
- "name": "dependencies",
2128
- "type": {
2129
- "__schema": "InferenceTypeSchema",
2130
- "location": {
2131
- "filePath": "refactoring.main.runtime.ts",
2132
- "line": 335,
2133
- "character": 3
2134
- },
2135
- "type": "Aspect[]"
2136
- },
2137
- "isOptional": true,
2138
- "defaultValue": "[ComponentAspect, PkgAspect, CLIAspect, EnvsAspect, PrettierAspect]"
2139
- },
2140
- {
2141
- "__schema": "VariableLikeSchema",
2142
- "location": {
2143
- "filePath": "refactoring.main.runtime.ts",
2144
- "line": 336,
2145
- "character": 3
2146
- },
2147
- "signature": "(property) RefactoringMain.runtime: RuntimeDefinition",
2148
- "name": "runtime",
2149
- "type": {
2150
- "__schema": "InferenceTypeSchema",
2151
- "location": {
2152
- "filePath": "refactoring.main.runtime.ts",
2153
- "line": 336,
2154
- "character": 3
2155
- },
2156
- "type": "RuntimeDefinition"
2157
- },
2158
- "isOptional": true,
2159
- "defaultValue": "MainRuntime"
2160
- },
2161
- {
2162
- "__schema": "FunctionLikeSchema",
2163
- "location": {
2164
- "filePath": "refactoring.main.runtime.ts",
2165
- "line": 337,
2166
- "character": 3
2167
- },
2168
- "signature": "(method) RefactoringMain.provider([componentMain, pkg, cli, envMain, prettierMain]: [\n ComponentMain,\n PkgMain,\n CLIMain,\n EnvsMain,\n PrettierMain\n]): Promise<RefactoringMain>",
2169
- "name": "provider",
2170
- "params": [
2171
- {
2172
- "__schema": "ParameterSchema",
2173
- "location": {
2174
- "filePath": "refactoring.main.runtime.ts",
2175
- "line": 337,
2176
- "character": 25
2177
- },
2178
- "name": "[ componentMain, pkg, cli, envMain, prettierMain ]",
2179
- "type": {
2180
- "__schema": "TupleTypeSchema",
2181
- "location": {
2182
- "filePath": "refactoring.main.runtime.ts",
2183
- "line": 337,
2184
- "character": 75
2185
- },
2186
- "elements": [
2187
- {
2188
- "__schema": "TypeRefSchema",
2189
- "location": {
2190
- "filePath": "refactoring.main.runtime.ts",
2191
- "line": 338,
2192
- "character": 5
2193
- },
2194
- "name": "ComponentMain"
2195
- },
2196
- {
2197
- "__schema": "TypeRefSchema",
2198
- "location": {
2199
- "filePath": "refactoring.main.runtime.ts",
2200
- "line": 339,
2201
- "character": 5
2202
- },
2203
- "name": "PkgMain"
2204
- },
2205
- {
2206
- "__schema": "TypeRefSchema",
2207
- "location": {
2208
- "filePath": "refactoring.main.runtime.ts",
2209
- "line": 340,
2210
- "character": 5
2211
- },
2212
- "name": "CLIMain"
2213
- },
2214
- {
2215
- "__schema": "TypeRefSchema",
2216
- "location": {
2217
- "filePath": "refactoring.main.runtime.ts",
2218
- "line": 341,
2219
- "character": 5
2220
- },
2221
- "name": "EnvsMain"
2222
- },
2223
- {
2224
- "__schema": "TypeRefSchema",
2225
- "location": {
2226
- "filePath": "refactoring.main.runtime.ts",
2227
- "line": 342,
2228
- "character": 5
2229
- },
2230
- "name": "PrettierMain"
2231
- }
2232
- ]
2233
- },
2234
- "isOptional": false,
2235
- "isSpread": false
2236
- }
2237
- ],
2238
- "returnType": {
2239
- "__schema": "InferenceTypeSchema",
2240
- "location": {
2241
- "filePath": "refactoring.main.runtime.ts",
2242
- "line": 337,
2243
- "character": 3
2244
- },
2245
- "type": "Promise<RefactoringMain>"
2246
- },
2247
- "modifiers": [
2248
- "static",
2249
- "async"
2250
- ]
2251
- }
2252
- ],
2253
- "extendsNodes": [],
2254
- "implementNodes": []
2255
- }
2256
- ],
2257
- "internals": [
2258
- {
2259
- "__schema": "UnImplementedSchema",
2260
- "location": {
2261
- "filePath": "refactoring.main.runtime.ts",
2262
- "line": 353,
2263
- "character": 1
2264
- },
2265
- "name": "RefactoringAspect.addRuntime(RefactoringMain);",
2266
- "type": "ExpressionStatement"
2267
- }
2268
- ]
2269
- },
2270
- {
2271
- "__schema": "ModuleSchema",
2272
- "location": {
2273
- "filePath": "refactoring.aspect.ts",
2274
- "line": 1,
2275
- "character": 1
2276
- },
2277
- "exports": [
2278
- {
2279
- "__schema": "VariableLikeSchema",
2280
- "location": {
2281
- "filePath": "refactoring.aspect.ts",
2282
- "line": 3,
2283
- "character": 14
2284
- },
2285
- "signature": "const RefactoringAspect: Aspect",
2286
- "name": "RefactoringAspect",
2287
- "type": {
2288
- "__schema": "TypeRefSchema",
2289
- "location": {
2290
- "filePath": "refactoring.aspect.ts",
2291
- "line": 3,
2292
- "character": 14
2293
- },
2294
- "name": "Aspect",
2295
- "componentId": {
2296
- "scope": "teambit.harmony",
2297
- "name": "harmony",
2298
- "version": "0.4.6"
2299
- }
2300
- },
2301
- "isOptional": false,
2302
- "defaultValue": "Aspect.create({\n id: 'teambit.component/refactoring',\n})"
2303
- }
2304
- ],
2305
- "internals": []
2306
- }
2307
- ],
2308
- "componentId": {
2309
- "scope": "teambit.component",
2310
- "name": "refactoring",
2311
- "version": "1.0.186"
2312
- },
2313
- "taggedModuleExports": []
2314
- }