@teambit/refactoring 1.0.510 → 1.0.511

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