@teambit/mover 1.0.188 → 1.0.190

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.component/mover@1.0.188" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/mover@1.0.190" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -0,0 +1,1100 @@
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": "mover.main.runtime.ts",
20
+ "line": 16,
21
+ "character": 1
22
+ },
23
+ "signature": "class MoverMain",
24
+ "name": "MoverMain",
25
+ "members": [
26
+ {
27
+ "__schema": "ConstructorSchema",
28
+ "location": {
29
+ "filePath": "mover.main.runtime.ts",
30
+ "line": 17,
31
+ "character": 3
32
+ },
33
+ "signature": "constructor MoverMain(workspace: Workspace): MoverMain",
34
+ "name": "constructor",
35
+ "params": [
36
+ {
37
+ "__schema": "ParameterSchema",
38
+ "location": {
39
+ "filePath": "mover.main.runtime.ts",
40
+ "line": 17,
41
+ "character": 15
42
+ },
43
+ "name": "workspace",
44
+ "type": {
45
+ "__schema": "TypeRefSchema",
46
+ "location": {
47
+ "filePath": "mover.main.runtime.ts",
48
+ "line": 17,
49
+ "character": 34
50
+ },
51
+ "name": "Workspace",
52
+ "componentId": {
53
+ "scope": "teambit.workspace",
54
+ "name": "workspace"
55
+ }
56
+ },
57
+ "isOptional": false,
58
+ "isSpread": false
59
+ }
60
+ ],
61
+ "returnType": {
62
+ "__schema": "ThisTypeSchema",
63
+ "location": {
64
+ "filePath": "mover.main.runtime.ts",
65
+ "line": 16,
66
+ "character": 1
67
+ },
68
+ "name": "MoverMain"
69
+ },
70
+ "modifiers": []
71
+ },
72
+ {
73
+ "__schema": "FunctionLikeSchema",
74
+ "location": {
75
+ "filePath": "mover.main.runtime.ts",
76
+ "line": 19,
77
+ "character": 3
78
+ },
79
+ "signature": "(method) MoverMain.movePaths({ from, to }: {\n from: PathOsBasedRelative;\n to: PathOsBasedRelative;\n}): Promise<PathChangeResult[]>",
80
+ "name": "movePaths",
81
+ "params": [
82
+ {
83
+ "__schema": "ParameterSchema",
84
+ "location": {
85
+ "filePath": "mover.main.runtime.ts",
86
+ "line": 19,
87
+ "character": 19
88
+ },
89
+ "name": "{ from, to }",
90
+ "type": {
91
+ "__schema": "TypeLiteralSchema",
92
+ "location": {
93
+ "filePath": "mover.main.runtime.ts",
94
+ "line": 19,
95
+ "character": 33
96
+ },
97
+ "members": [
98
+ {
99
+ "__schema": "VariableLikeSchema",
100
+ "location": {
101
+ "filePath": "mover.main.runtime.ts",
102
+ "line": 19,
103
+ "character": 35
104
+ },
105
+ "signature": "(property) from: string",
106
+ "name": "from",
107
+ "type": {
108
+ "__schema": "TypeRefSchema",
109
+ "location": {
110
+ "filePath": "mover.main.runtime.ts",
111
+ "line": 19,
112
+ "character": 41
113
+ },
114
+ "name": "PathOsBasedRelative",
115
+ "packageName": "@teambit/legacy/dist/utils/path"
116
+ },
117
+ "isOptional": false
118
+ },
119
+ {
120
+ "__schema": "VariableLikeSchema",
121
+ "location": {
122
+ "filePath": "mover.main.runtime.ts",
123
+ "line": 19,
124
+ "character": 62
125
+ },
126
+ "signature": "(property) to: string",
127
+ "name": "to",
128
+ "type": {
129
+ "__schema": "TypeRefSchema",
130
+ "location": {
131
+ "filePath": "mover.main.runtime.ts",
132
+ "line": 19,
133
+ "character": 66
134
+ },
135
+ "name": "PathOsBasedRelative",
136
+ "packageName": "@teambit/legacy/dist/utils/path"
137
+ },
138
+ "isOptional": false
139
+ }
140
+ ]
141
+ },
142
+ "isOptional": false,
143
+ "objectBindingNodes": [
144
+ {
145
+ "__schema": "VariableLikeSchema",
146
+ "location": {
147
+ "filePath": "mover.main.runtime.ts",
148
+ "line": 19,
149
+ "character": 35
150
+ },
151
+ "signature": "(property) from: string",
152
+ "name": "from",
153
+ "type": {
154
+ "__schema": "TypeRefSchema",
155
+ "location": {
156
+ "filePath": "mover.main.runtime.ts",
157
+ "line": 19,
158
+ "character": 41
159
+ },
160
+ "name": "PathOsBasedRelative",
161
+ "packageName": "@teambit/legacy/dist/utils/path"
162
+ },
163
+ "isOptional": false
164
+ },
165
+ {
166
+ "__schema": "VariableLikeSchema",
167
+ "location": {
168
+ "filePath": "mover.main.runtime.ts",
169
+ "line": 19,
170
+ "character": 62
171
+ },
172
+ "signature": "(property) to: string",
173
+ "name": "to",
174
+ "type": {
175
+ "__schema": "TypeRefSchema",
176
+ "location": {
177
+ "filePath": "mover.main.runtime.ts",
178
+ "line": 19,
179
+ "character": 66
180
+ },
181
+ "name": "PathOsBasedRelative",
182
+ "packageName": "@teambit/legacy/dist/utils/path"
183
+ },
184
+ "isOptional": false
185
+ }
186
+ ],
187
+ "isSpread": false
188
+ }
189
+ ],
190
+ "returnType": {
191
+ "__schema": "TypeRefSchema",
192
+ "location": {
193
+ "filePath": "mover.main.runtime.ts",
194
+ "line": 19,
195
+ "character": 90
196
+ },
197
+ "name": "Promise",
198
+ "typeArgs": [
199
+ {
200
+ "__schema": "TypeArraySchema",
201
+ "location": {
202
+ "filePath": "mover.main.runtime.ts",
203
+ "line": 19,
204
+ "character": 98
205
+ },
206
+ "type": {
207
+ "__schema": "TypeRefSchema",
208
+ "location": {
209
+ "filePath": "mover.main.runtime.ts",
210
+ "line": 19,
211
+ "character": 98
212
+ },
213
+ "name": "PathChangeResult",
214
+ "packageName": "@teambit/legacy/dist/consumer/bit-map/bit-map"
215
+ }
216
+ }
217
+ ]
218
+ },
219
+ "modifiers": [
220
+ "async"
221
+ ]
222
+ },
223
+ {
224
+ "__schema": "FunctionLikeSchema",
225
+ "location": {
226
+ "filePath": "mover.main.runtime.ts",
227
+ "line": 52,
228
+ "character": 3
229
+ },
230
+ "signature": "(method) MoverMain.moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute): void",
231
+ "name": "moveExistingComponent",
232
+ "params": [
233
+ {
234
+ "__schema": "ParameterSchema",
235
+ "location": {
236
+ "filePath": "mover.main.runtime.ts",
237
+ "line": 52,
238
+ "character": 25
239
+ },
240
+ "name": "component",
241
+ "type": {
242
+ "__schema": "TypeRefSchema",
243
+ "location": {
244
+ "filePath": "mover.main.runtime.ts",
245
+ "line": 52,
246
+ "character": 36
247
+ },
248
+ "name": "Component",
249
+ "packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
250
+ },
251
+ "isOptional": false,
252
+ "isSpread": false
253
+ },
254
+ {
255
+ "__schema": "ParameterSchema",
256
+ "location": {
257
+ "filePath": "mover.main.runtime.ts",
258
+ "line": 52,
259
+ "character": 47
260
+ },
261
+ "name": "oldPath",
262
+ "type": {
263
+ "__schema": "TypeRefSchema",
264
+ "location": {
265
+ "filePath": "mover.main.runtime.ts",
266
+ "line": 52,
267
+ "character": 56
268
+ },
269
+ "name": "PathOsBasedAbsolute",
270
+ "packageName": "@teambit/legacy/dist/utils/path"
271
+ },
272
+ "isOptional": false,
273
+ "isSpread": false
274
+ },
275
+ {
276
+ "__schema": "ParameterSchema",
277
+ "location": {
278
+ "filePath": "mover.main.runtime.ts",
279
+ "line": 52,
280
+ "character": 77
281
+ },
282
+ "name": "newPath",
283
+ "type": {
284
+ "__schema": "TypeRefSchema",
285
+ "location": {
286
+ "filePath": "mover.main.runtime.ts",
287
+ "line": 52,
288
+ "character": 86
289
+ },
290
+ "name": "PathOsBasedAbsolute",
291
+ "packageName": "@teambit/legacy/dist/utils/path"
292
+ },
293
+ "isOptional": false,
294
+ "isSpread": false
295
+ }
296
+ ],
297
+ "returnType": {
298
+ "__schema": "InferenceTypeSchema",
299
+ "location": {
300
+ "filePath": "mover.main.runtime.ts",
301
+ "line": 52,
302
+ "character": 3
303
+ },
304
+ "type": "void"
305
+ },
306
+ "modifiers": []
307
+ },
308
+ {
309
+ "__schema": "VariableLikeSchema",
310
+ "location": {
311
+ "filePath": "mover.main.runtime.ts",
312
+ "line": 73,
313
+ "character": 3
314
+ },
315
+ "signature": "(property) MoverMain.slots: never[]",
316
+ "name": "slots",
317
+ "type": {
318
+ "__schema": "InferenceTypeSchema",
319
+ "location": {
320
+ "filePath": "mover.main.runtime.ts",
321
+ "line": 73,
322
+ "character": 3
323
+ },
324
+ "type": "never[]"
325
+ },
326
+ "isOptional": true,
327
+ "defaultValue": "[]"
328
+ },
329
+ {
330
+ "__schema": "VariableLikeSchema",
331
+ "location": {
332
+ "filePath": "mover.main.runtime.ts",
333
+ "line": 74,
334
+ "character": 3
335
+ },
336
+ "signature": "(property) MoverMain.dependencies: Aspect[]",
337
+ "name": "dependencies",
338
+ "type": {
339
+ "__schema": "InferenceTypeSchema",
340
+ "location": {
341
+ "filePath": "mover.main.runtime.ts",
342
+ "line": 74,
343
+ "character": 3
344
+ },
345
+ "type": "Aspect[]"
346
+ },
347
+ "isOptional": true,
348
+ "defaultValue": "[CLIAspect, WorkspaceAspect]"
349
+ },
350
+ {
351
+ "__schema": "VariableLikeSchema",
352
+ "location": {
353
+ "filePath": "mover.main.runtime.ts",
354
+ "line": 75,
355
+ "character": 3
356
+ },
357
+ "signature": "(property) MoverMain.runtime: RuntimeDefinition",
358
+ "name": "runtime",
359
+ "type": {
360
+ "__schema": "InferenceTypeSchema",
361
+ "location": {
362
+ "filePath": "mover.main.runtime.ts",
363
+ "line": 75,
364
+ "character": 3
365
+ },
366
+ "type": "RuntimeDefinition"
367
+ },
368
+ "isOptional": true,
369
+ "defaultValue": "MainRuntime"
370
+ },
371
+ {
372
+ "__schema": "FunctionLikeSchema",
373
+ "location": {
374
+ "filePath": "mover.main.runtime.ts",
375
+ "line": 77,
376
+ "character": 3
377
+ },
378
+ "signature": "(method) MoverMain.provider([cli, workspace]: [CLIMain, Workspace]): Promise<MoverMain>",
379
+ "name": "provider",
380
+ "params": [
381
+ {
382
+ "__schema": "ParameterSchema",
383
+ "location": {
384
+ "filePath": "mover.main.runtime.ts",
385
+ "line": 77,
386
+ "character": 25
387
+ },
388
+ "name": "[ cli, workspace ]",
389
+ "type": {
390
+ "__schema": "TupleTypeSchema",
391
+ "location": {
392
+ "filePath": "mover.main.runtime.ts",
393
+ "line": 77,
394
+ "character": 43
395
+ },
396
+ "elements": [
397
+ {
398
+ "__schema": "TypeRefSchema",
399
+ "location": {
400
+ "filePath": "mover.main.runtime.ts",
401
+ "line": 77,
402
+ "character": 44
403
+ },
404
+ "name": "CLIMain",
405
+ "componentId": {
406
+ "scope": "teambit.harmony",
407
+ "name": "cli"
408
+ }
409
+ },
410
+ {
411
+ "__schema": "TypeRefSchema",
412
+ "location": {
413
+ "filePath": "mover.main.runtime.ts",
414
+ "line": 77,
415
+ "character": 53
416
+ },
417
+ "name": "Workspace",
418
+ "componentId": {
419
+ "scope": "teambit.workspace",
420
+ "name": "workspace"
421
+ }
422
+ }
423
+ ]
424
+ },
425
+ "isOptional": false,
426
+ "isSpread": false
427
+ }
428
+ ],
429
+ "returnType": {
430
+ "__schema": "InferenceTypeSchema",
431
+ "location": {
432
+ "filePath": "mover.main.runtime.ts",
433
+ "line": 77,
434
+ "character": 3
435
+ },
436
+ "type": "Promise<MoverMain>"
437
+ },
438
+ "modifiers": [
439
+ "static",
440
+ "async"
441
+ ]
442
+ }
443
+ ],
444
+ "extendsNodes": [],
445
+ "implementNodes": []
446
+ },
447
+ {
448
+ "__schema": "UnImplementedSchema",
449
+ "location": {
450
+ "filePath": "index.ts",
451
+ "line": 4,
452
+ "character": 16
453
+ },
454
+ "name": "MoverAspect",
455
+ "type": "Identifier"
456
+ },
457
+ {
458
+ "__schema": "VariableLikeSchema",
459
+ "location": {
460
+ "filePath": "mover.aspect.ts",
461
+ "line": 3,
462
+ "character": 14
463
+ },
464
+ "signature": "const MoverAspect: Aspect",
465
+ "name": "MoverAspect",
466
+ "type": {
467
+ "__schema": "TypeRefSchema",
468
+ "location": {
469
+ "filePath": "mover.aspect.ts",
470
+ "line": 3,
471
+ "character": 14
472
+ },
473
+ "name": "Aspect",
474
+ "componentId": {
475
+ "scope": "teambit.harmony",
476
+ "name": "harmony",
477
+ "version": "0.4.6"
478
+ }
479
+ },
480
+ "isOptional": false,
481
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/mover',\n})"
482
+ }
483
+ ],
484
+ "internals": []
485
+ },
486
+ "internals": [
487
+ {
488
+ "__schema": "ModuleSchema",
489
+ "location": {
490
+ "filePath": "mover.main.runtime.ts",
491
+ "line": 1,
492
+ "character": 1
493
+ },
494
+ "exports": [
495
+ {
496
+ "__schema": "ClassSchema",
497
+ "location": {
498
+ "filePath": "mover.main.runtime.ts",
499
+ "line": 16,
500
+ "character": 1
501
+ },
502
+ "signature": "class MoverMain",
503
+ "name": "MoverMain",
504
+ "members": [
505
+ {
506
+ "__schema": "ConstructorSchema",
507
+ "location": {
508
+ "filePath": "mover.main.runtime.ts",
509
+ "line": 17,
510
+ "character": 3
511
+ },
512
+ "signature": "constructor MoverMain(workspace: Workspace): MoverMain",
513
+ "name": "constructor",
514
+ "params": [
515
+ {
516
+ "__schema": "ParameterSchema",
517
+ "location": {
518
+ "filePath": "mover.main.runtime.ts",
519
+ "line": 17,
520
+ "character": 15
521
+ },
522
+ "name": "workspace",
523
+ "type": {
524
+ "__schema": "TypeRefSchema",
525
+ "location": {
526
+ "filePath": "mover.main.runtime.ts",
527
+ "line": 17,
528
+ "character": 34
529
+ },
530
+ "name": "Workspace",
531
+ "componentId": {
532
+ "scope": "teambit.workspace",
533
+ "name": "workspace"
534
+ }
535
+ },
536
+ "isOptional": false,
537
+ "isSpread": false
538
+ }
539
+ ],
540
+ "returnType": {
541
+ "__schema": "ThisTypeSchema",
542
+ "location": {
543
+ "filePath": "mover.main.runtime.ts",
544
+ "line": 16,
545
+ "character": 1
546
+ },
547
+ "name": "MoverMain"
548
+ },
549
+ "modifiers": []
550
+ },
551
+ {
552
+ "__schema": "FunctionLikeSchema",
553
+ "location": {
554
+ "filePath": "mover.main.runtime.ts",
555
+ "line": 19,
556
+ "character": 3
557
+ },
558
+ "signature": "(method) MoverMain.movePaths({ from, to }: {\n from: PathOsBasedRelative;\n to: PathOsBasedRelative;\n}): Promise<PathChangeResult[]>",
559
+ "name": "movePaths",
560
+ "params": [
561
+ {
562
+ "__schema": "ParameterSchema",
563
+ "location": {
564
+ "filePath": "mover.main.runtime.ts",
565
+ "line": 19,
566
+ "character": 19
567
+ },
568
+ "name": "{ from, to }",
569
+ "type": {
570
+ "__schema": "TypeLiteralSchema",
571
+ "location": {
572
+ "filePath": "mover.main.runtime.ts",
573
+ "line": 19,
574
+ "character": 33
575
+ },
576
+ "members": [
577
+ {
578
+ "__schema": "VariableLikeSchema",
579
+ "location": {
580
+ "filePath": "mover.main.runtime.ts",
581
+ "line": 19,
582
+ "character": 35
583
+ },
584
+ "signature": "(property) from: string",
585
+ "name": "from",
586
+ "type": {
587
+ "__schema": "TypeRefSchema",
588
+ "location": {
589
+ "filePath": "mover.main.runtime.ts",
590
+ "line": 19,
591
+ "character": 41
592
+ },
593
+ "name": "PathOsBasedRelative",
594
+ "packageName": "@teambit/legacy/dist/utils/path"
595
+ },
596
+ "isOptional": false
597
+ },
598
+ {
599
+ "__schema": "VariableLikeSchema",
600
+ "location": {
601
+ "filePath": "mover.main.runtime.ts",
602
+ "line": 19,
603
+ "character": 62
604
+ },
605
+ "signature": "(property) to: string",
606
+ "name": "to",
607
+ "type": {
608
+ "__schema": "TypeRefSchema",
609
+ "location": {
610
+ "filePath": "mover.main.runtime.ts",
611
+ "line": 19,
612
+ "character": 66
613
+ },
614
+ "name": "PathOsBasedRelative",
615
+ "packageName": "@teambit/legacy/dist/utils/path"
616
+ },
617
+ "isOptional": false
618
+ }
619
+ ]
620
+ },
621
+ "isOptional": false,
622
+ "objectBindingNodes": [
623
+ {
624
+ "__schema": "VariableLikeSchema",
625
+ "location": {
626
+ "filePath": "mover.main.runtime.ts",
627
+ "line": 19,
628
+ "character": 35
629
+ },
630
+ "signature": "(property) from: string",
631
+ "name": "from",
632
+ "type": {
633
+ "__schema": "TypeRefSchema",
634
+ "location": {
635
+ "filePath": "mover.main.runtime.ts",
636
+ "line": 19,
637
+ "character": 41
638
+ },
639
+ "name": "PathOsBasedRelative",
640
+ "packageName": "@teambit/legacy/dist/utils/path"
641
+ },
642
+ "isOptional": false
643
+ },
644
+ {
645
+ "__schema": "VariableLikeSchema",
646
+ "location": {
647
+ "filePath": "mover.main.runtime.ts",
648
+ "line": 19,
649
+ "character": 62
650
+ },
651
+ "signature": "(property) to: string",
652
+ "name": "to",
653
+ "type": {
654
+ "__schema": "TypeRefSchema",
655
+ "location": {
656
+ "filePath": "mover.main.runtime.ts",
657
+ "line": 19,
658
+ "character": 66
659
+ },
660
+ "name": "PathOsBasedRelative",
661
+ "packageName": "@teambit/legacy/dist/utils/path"
662
+ },
663
+ "isOptional": false
664
+ }
665
+ ],
666
+ "isSpread": false
667
+ }
668
+ ],
669
+ "returnType": {
670
+ "__schema": "TypeRefSchema",
671
+ "location": {
672
+ "filePath": "mover.main.runtime.ts",
673
+ "line": 19,
674
+ "character": 90
675
+ },
676
+ "name": "Promise",
677
+ "typeArgs": [
678
+ {
679
+ "__schema": "TypeArraySchema",
680
+ "location": {
681
+ "filePath": "mover.main.runtime.ts",
682
+ "line": 19,
683
+ "character": 98
684
+ },
685
+ "type": {
686
+ "__schema": "TypeRefSchema",
687
+ "location": {
688
+ "filePath": "mover.main.runtime.ts",
689
+ "line": 19,
690
+ "character": 98
691
+ },
692
+ "name": "PathChangeResult",
693
+ "packageName": "@teambit/legacy/dist/consumer/bit-map/bit-map"
694
+ }
695
+ }
696
+ ]
697
+ },
698
+ "modifiers": [
699
+ "async"
700
+ ]
701
+ },
702
+ {
703
+ "__schema": "FunctionLikeSchema",
704
+ "location": {
705
+ "filePath": "mover.main.runtime.ts",
706
+ "line": 52,
707
+ "character": 3
708
+ },
709
+ "signature": "(method) MoverMain.moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute): void",
710
+ "name": "moveExistingComponent",
711
+ "params": [
712
+ {
713
+ "__schema": "ParameterSchema",
714
+ "location": {
715
+ "filePath": "mover.main.runtime.ts",
716
+ "line": 52,
717
+ "character": 25
718
+ },
719
+ "name": "component",
720
+ "type": {
721
+ "__schema": "TypeRefSchema",
722
+ "location": {
723
+ "filePath": "mover.main.runtime.ts",
724
+ "line": 52,
725
+ "character": 36
726
+ },
727
+ "name": "Component",
728
+ "packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
729
+ },
730
+ "isOptional": false,
731
+ "isSpread": false
732
+ },
733
+ {
734
+ "__schema": "ParameterSchema",
735
+ "location": {
736
+ "filePath": "mover.main.runtime.ts",
737
+ "line": 52,
738
+ "character": 47
739
+ },
740
+ "name": "oldPath",
741
+ "type": {
742
+ "__schema": "TypeRefSchema",
743
+ "location": {
744
+ "filePath": "mover.main.runtime.ts",
745
+ "line": 52,
746
+ "character": 56
747
+ },
748
+ "name": "PathOsBasedAbsolute",
749
+ "packageName": "@teambit/legacy/dist/utils/path"
750
+ },
751
+ "isOptional": false,
752
+ "isSpread": false
753
+ },
754
+ {
755
+ "__schema": "ParameterSchema",
756
+ "location": {
757
+ "filePath": "mover.main.runtime.ts",
758
+ "line": 52,
759
+ "character": 77
760
+ },
761
+ "name": "newPath",
762
+ "type": {
763
+ "__schema": "TypeRefSchema",
764
+ "location": {
765
+ "filePath": "mover.main.runtime.ts",
766
+ "line": 52,
767
+ "character": 86
768
+ },
769
+ "name": "PathOsBasedAbsolute",
770
+ "packageName": "@teambit/legacy/dist/utils/path"
771
+ },
772
+ "isOptional": false,
773
+ "isSpread": false
774
+ }
775
+ ],
776
+ "returnType": {
777
+ "__schema": "InferenceTypeSchema",
778
+ "location": {
779
+ "filePath": "mover.main.runtime.ts",
780
+ "line": 52,
781
+ "character": 3
782
+ },
783
+ "type": "void"
784
+ },
785
+ "modifiers": []
786
+ },
787
+ {
788
+ "__schema": "VariableLikeSchema",
789
+ "location": {
790
+ "filePath": "mover.main.runtime.ts",
791
+ "line": 73,
792
+ "character": 3
793
+ },
794
+ "signature": "(property) MoverMain.slots: never[]",
795
+ "name": "slots",
796
+ "type": {
797
+ "__schema": "InferenceTypeSchema",
798
+ "location": {
799
+ "filePath": "mover.main.runtime.ts",
800
+ "line": 73,
801
+ "character": 3
802
+ },
803
+ "type": "never[]"
804
+ },
805
+ "isOptional": true,
806
+ "defaultValue": "[]"
807
+ },
808
+ {
809
+ "__schema": "VariableLikeSchema",
810
+ "location": {
811
+ "filePath": "mover.main.runtime.ts",
812
+ "line": 74,
813
+ "character": 3
814
+ },
815
+ "signature": "(property) MoverMain.dependencies: Aspect[]",
816
+ "name": "dependencies",
817
+ "type": {
818
+ "__schema": "InferenceTypeSchema",
819
+ "location": {
820
+ "filePath": "mover.main.runtime.ts",
821
+ "line": 74,
822
+ "character": 3
823
+ },
824
+ "type": "Aspect[]"
825
+ },
826
+ "isOptional": true,
827
+ "defaultValue": "[CLIAspect, WorkspaceAspect]"
828
+ },
829
+ {
830
+ "__schema": "VariableLikeSchema",
831
+ "location": {
832
+ "filePath": "mover.main.runtime.ts",
833
+ "line": 75,
834
+ "character": 3
835
+ },
836
+ "signature": "(property) MoverMain.runtime: RuntimeDefinition",
837
+ "name": "runtime",
838
+ "type": {
839
+ "__schema": "InferenceTypeSchema",
840
+ "location": {
841
+ "filePath": "mover.main.runtime.ts",
842
+ "line": 75,
843
+ "character": 3
844
+ },
845
+ "type": "RuntimeDefinition"
846
+ },
847
+ "isOptional": true,
848
+ "defaultValue": "MainRuntime"
849
+ },
850
+ {
851
+ "__schema": "FunctionLikeSchema",
852
+ "location": {
853
+ "filePath": "mover.main.runtime.ts",
854
+ "line": 77,
855
+ "character": 3
856
+ },
857
+ "signature": "(method) MoverMain.provider([cli, workspace]: [CLIMain, Workspace]): Promise<MoverMain>",
858
+ "name": "provider",
859
+ "params": [
860
+ {
861
+ "__schema": "ParameterSchema",
862
+ "location": {
863
+ "filePath": "mover.main.runtime.ts",
864
+ "line": 77,
865
+ "character": 25
866
+ },
867
+ "name": "[ cli, workspace ]",
868
+ "type": {
869
+ "__schema": "TupleTypeSchema",
870
+ "location": {
871
+ "filePath": "mover.main.runtime.ts",
872
+ "line": 77,
873
+ "character": 43
874
+ },
875
+ "elements": [
876
+ {
877
+ "__schema": "TypeRefSchema",
878
+ "location": {
879
+ "filePath": "mover.main.runtime.ts",
880
+ "line": 77,
881
+ "character": 44
882
+ },
883
+ "name": "CLIMain",
884
+ "componentId": {
885
+ "scope": "teambit.harmony",
886
+ "name": "cli"
887
+ }
888
+ },
889
+ {
890
+ "__schema": "TypeRefSchema",
891
+ "location": {
892
+ "filePath": "mover.main.runtime.ts",
893
+ "line": 77,
894
+ "character": 53
895
+ },
896
+ "name": "Workspace",
897
+ "componentId": {
898
+ "scope": "teambit.workspace",
899
+ "name": "workspace"
900
+ }
901
+ }
902
+ ]
903
+ },
904
+ "isOptional": false,
905
+ "isSpread": false
906
+ }
907
+ ],
908
+ "returnType": {
909
+ "__schema": "InferenceTypeSchema",
910
+ "location": {
911
+ "filePath": "mover.main.runtime.ts",
912
+ "line": 77,
913
+ "character": 3
914
+ },
915
+ "type": "Promise<MoverMain>"
916
+ },
917
+ "modifiers": [
918
+ "static",
919
+ "async"
920
+ ]
921
+ }
922
+ ],
923
+ "extendsNodes": [],
924
+ "implementNodes": []
925
+ },
926
+ {
927
+ "__schema": "UnImplementedSchema",
928
+ "location": {
929
+ "filePath": "mover.main.runtime.ts",
930
+ "line": 86,
931
+ "character": 16
932
+ },
933
+ "name": "MoverMain",
934
+ "type": "Identifier"
935
+ },
936
+ {
937
+ "__schema": "FunctionLikeSchema",
938
+ "location": {
939
+ "filePath": "mover.main.runtime.ts",
940
+ "line": 88,
941
+ "character": 1
942
+ },
943
+ "signature": "function moveSync(src: PathOsBasedAbsolute, dest: PathOsBasedAbsolute, options?: Record<string, any>): void",
944
+ "name": "moveSync",
945
+ "params": [
946
+ {
947
+ "__schema": "ParameterSchema",
948
+ "location": {
949
+ "filePath": "mover.main.runtime.ts",
950
+ "line": 88,
951
+ "character": 26
952
+ },
953
+ "name": "src",
954
+ "type": {
955
+ "__schema": "TypeRefSchema",
956
+ "location": {
957
+ "filePath": "mover.main.runtime.ts",
958
+ "line": 88,
959
+ "character": 31
960
+ },
961
+ "name": "PathOsBasedAbsolute",
962
+ "packageName": "@teambit/legacy/dist/utils/path"
963
+ },
964
+ "isOptional": false,
965
+ "isSpread": false
966
+ },
967
+ {
968
+ "__schema": "ParameterSchema",
969
+ "location": {
970
+ "filePath": "mover.main.runtime.ts",
971
+ "line": 88,
972
+ "character": 52
973
+ },
974
+ "name": "dest",
975
+ "type": {
976
+ "__schema": "TypeRefSchema",
977
+ "location": {
978
+ "filePath": "mover.main.runtime.ts",
979
+ "line": 88,
980
+ "character": 58
981
+ },
982
+ "name": "PathOsBasedAbsolute",
983
+ "packageName": "@teambit/legacy/dist/utils/path"
984
+ },
985
+ "isOptional": false,
986
+ "isSpread": false
987
+ },
988
+ {
989
+ "__schema": "ParameterSchema",
990
+ "location": {
991
+ "filePath": "mover.main.runtime.ts",
992
+ "line": 88,
993
+ "character": 79
994
+ },
995
+ "name": "options",
996
+ "type": {
997
+ "__schema": "TypeRefSchema",
998
+ "location": {
999
+ "filePath": "mover.main.runtime.ts",
1000
+ "line": 88,
1001
+ "character": 89
1002
+ },
1003
+ "name": "Record",
1004
+ "typeArgs": [
1005
+ {
1006
+ "__schema": "KeywordTypeSchema",
1007
+ "location": {
1008
+ "filePath": "mover.main.runtime.ts",
1009
+ "line": 88,
1010
+ "character": 96
1011
+ },
1012
+ "name": "string"
1013
+ },
1014
+ {
1015
+ "__schema": "KeywordTypeSchema",
1016
+ "location": {
1017
+ "filePath": "mover.main.runtime.ts",
1018
+ "line": 88,
1019
+ "character": 104
1020
+ },
1021
+ "name": "any"
1022
+ }
1023
+ ]
1024
+ },
1025
+ "isOptional": true,
1026
+ "isSpread": false
1027
+ }
1028
+ ],
1029
+ "returnType": {
1030
+ "__schema": "InferenceTypeSchema",
1031
+ "location": {
1032
+ "filePath": "mover.main.runtime.ts",
1033
+ "line": 88,
1034
+ "character": 1
1035
+ },
1036
+ "type": "void"
1037
+ },
1038
+ "modifiers": [
1039
+ "export"
1040
+ ]
1041
+ }
1042
+ ],
1043
+ "internals": [
1044
+ {
1045
+ "__schema": "UnImplementedSchema",
1046
+ "location": {
1047
+ "filePath": "mover.main.runtime.ts",
1048
+ "line": 84,
1049
+ "character": 1
1050
+ },
1051
+ "name": "MoverAspect.addRuntime(MoverMain);",
1052
+ "type": "ExpressionStatement"
1053
+ }
1054
+ ]
1055
+ },
1056
+ {
1057
+ "__schema": "ModuleSchema",
1058
+ "location": {
1059
+ "filePath": "mover.aspect.ts",
1060
+ "line": 1,
1061
+ "character": 1
1062
+ },
1063
+ "exports": [
1064
+ {
1065
+ "__schema": "VariableLikeSchema",
1066
+ "location": {
1067
+ "filePath": "mover.aspect.ts",
1068
+ "line": 3,
1069
+ "character": 14
1070
+ },
1071
+ "signature": "const MoverAspect: Aspect",
1072
+ "name": "MoverAspect",
1073
+ "type": {
1074
+ "__schema": "TypeRefSchema",
1075
+ "location": {
1076
+ "filePath": "mover.aspect.ts",
1077
+ "line": 3,
1078
+ "character": 14
1079
+ },
1080
+ "name": "Aspect",
1081
+ "componentId": {
1082
+ "scope": "teambit.harmony",
1083
+ "name": "harmony",
1084
+ "version": "0.4.6"
1085
+ }
1086
+ },
1087
+ "isOptional": false,
1088
+ "defaultValue": "Aspect.create({\n id: 'teambit.component/mover',\n})"
1089
+ }
1090
+ ],
1091
+ "internals": []
1092
+ }
1093
+ ],
1094
+ "componentId": {
1095
+ "scope": "teambit.component",
1096
+ "name": "mover",
1097
+ "version": "1.0.190"
1098
+ },
1099
+ "taggedModuleExports": []
1100
+ }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_mover","data","require","_default","exports","default","MoverAspect"],"sources":["index.ts"],"sourcesContent":["import { MoverAspect } from './mover.aspect';\n\nexport type { MoverMain } from './mover.main.runtime';\nexport default MoverAspect;\nexport { MoverAspect };\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG9BC,oBAAW"}
1
+ {"version":3,"names":["_mover","data","require","_default","exports","default","MoverAspect"],"sources":["index.ts"],"sourcesContent":["import { MoverAspect } from './mover.aspect';\n\nexport type { MoverMain } from './mover.main.runtime';\nexport default MoverAspect;\nexport { MoverAspect };\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG9BC,oBAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoveCmd","constructor","mover","name","description","report","from","to","componentsChanged","movePaths","output","map","component","title","chalk","green","id","toString","files","changes","file","bold","join","exports"],"sources":["move-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command } from '@teambit/cli';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport { MoverMain } from './mover.main.runtime';\n\nexport class MoveCmd implements Command {\n name = 'move <current-component-dir> <new-component-dir>';\n description =\n \"move a component to a different filesystem path (note: this does NOT affect the component's name or scope, just its location in the workspace)\";\n helpUrl = 'reference/workspace/moving-components';\n arguments = [\n {\n name: 'current-component-dir',\n description: \"the component's current directory (relative to the workspace root)\",\n },\n {\n name: 'new-component-dir',\n description: \"the new directory (relative to the workspace root) to create and move the component's files to\",\n },\n ];\n group = 'development';\n extendedDescription = `move files or directories of component(s)\\n`;\n alias = 'mv';\n loader = true;\n options = [];\n\n constructor(private mover: MoverMain) {}\n\n async report([from, to]: [string, string]) {\n const componentsChanged: PathChangeResult[] = await this.mover.movePaths({ from, to });\n const output = componentsChanged.map((component) => {\n const title = chalk.green(`moved component ${component.id.toString()}:\\n`);\n const files = component.changes\n .map((file) => `from ${chalk.bold(file.from)} to ${chalk.bold(file.to)}`)\n .join('\\n');\n return title + files;\n });\n return output.join('\\n');\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA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N,SAAS,CAACO,OAAO,CAC5BR,GAAG,CAAES,IAAI,IAAM,QAAON,gBAAK,CAACO,IAAI,CAACD,IAAI,CAACd,IAAI,CAAE,OAAMQ,gBAAK,CAACO,IAAI,CAACD,IAAI,CAACb,EAAE,CAAE,EAAC,CAAC,CACxEe,IAAI,CAAC,IAAI,CAAC;MACb,OAAOT,KAAK,GAAGK,KAAK;IACtB,CAAC,CAAC;IACF,OAAOR,MAAM,CAACY,IAAI,CAAC,IAAI,CAAC;EAC1B;AACF;AAACC,OAAA,CAAAvB,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoveCmd","constructor","mover","name","description","report","from","to","componentsChanged","movePaths","output","map","component","title","chalk","green","id","toString","files","changes","file","bold","join","exports"],"sources":["move-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command } from '@teambit/cli';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport { MoverMain } from './mover.main.runtime';\n\nexport class MoveCmd implements Command {\n name = 'move <current-component-dir> <new-component-dir>';\n description =\n \"move a component to a different filesystem path (note: this does NOT affect the component's name or scope, just its location in the workspace)\";\n helpUrl = 'reference/workspace/moving-components';\n arguments = [\n {\n name: 'current-component-dir',\n description: \"the component's current directory (relative to the workspace root)\",\n },\n {\n name: 'new-component-dir',\n description: \"the new directory (relative to the workspace root) to create and move the component's files to\",\n },\n ];\n group = 'development';\n extendedDescription = `move files or directories of component(s)\\n`;\n alias = 'mv';\n loader = true;\n options = [];\n\n constructor(private mover: MoverMain) {}\n\n async report([from, to]: [string, string]) {\n const componentsChanged: PathChangeResult[] = await this.mover.movePaths({ from, to });\n const output = componentsChanged.map((component) => {\n const title = chalk.green(`moved component ${component.id.toString()}:\\n`);\n const files = component.changes\n .map((file) =>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,gJAAgJ;IAAAA,eAAA,kBACxI,uCAAuC;IAAAA,eAAA,oBACrC,CACV;MACEuB,IAAI,EAAE,uBAAuB;MAC7BC,WAAW,EAAE;IACf,CAAC,EACD;MACED,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAE;IACf,CAAC,CACF;IAAAxB,eAAA,gBACO,aAAa;IAAAA,eAAA,8BACE,6CAA4C;IAAAA,eAAA,gBAC3D,IAAI;IAAAA,eAAA,iBACH,IAAI;IAAAA,eAAA,kBACH,EAAE;EAE2B;EAEvC,MAAMyB,MAAMA,CAAC,CAACC,IAAI,EAAEC,EAAE,CAAmB,EAAE;IACzC,MAAMC,iBAAqC,GAAG,MAAM,IAAI,CAACN,KAAK,CAACO,SAAS,CAAC;MAAEH,IAAI;MAAEC;IAAG,CAAC,CAAC;IACtF,MAAMG,MAAM,GAAGF,iBAAiB,CAACG,GAAG,CAAEC,SAAS,IAAK;MAClD,MAAMC,KAAK,GAAGC,gBAAK,CAACC,KAAK,CAAE,mBAAkBH,SAAS,CAACI,EAAE,CAACC,QAAQ,CAAC,CAAE,KAAI,CAAC;MAC1E,MAAMC,KAAK,GAAGN,SAAS,CAACO,OAAO,CAC5BR,GAAG,CAAES,IAAI,IAAM,QAAON,gBAAK,CAACO,IAAI,CAACD,IAAI,CAACd,IAAI,CAAE,OAAMQ,gBAAK,CAACO,IAAI,CAACD,IAAI,CAACb,EAAE,CAAE,EAAC,CAAC,CACxEe,IAAI,CAAC,IAAI,CAAC;MACb,OAAOT,KAAK,GAAGK,KAAK;IACtB,CAAC,CAAC;IACF,OAAOR,MAAM,CAACY,IAAI,CAAC,IAAI,CAAC;EAC1B;AACF;AAACC,OAAA,CAAAvB,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","MoverAspect","exports","Aspect","create","id"],"sources":["mover.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MoverAspect = Aspect.create({\n id: 'teambit.component/mover',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAE;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["_harmony","data","require","MoverAspect","exports","Aspect","create","id"],"sources":["mover.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const MoverAspect = Aspect.create({\n id: 'teambit.component/mover',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_bitError","_cli","_lodash","_workspace","_utils","_workspaceModules","_removePath","_mover","_moveCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoverMain","constructor","workspace","movePaths","from","to","consumer","fromExists","fs","existsSync","toExists","BitError","isDir","fromRelative","getPathRelativeToConsumer","toRelative","fromAbsolute","toAbsolutePath","toAbsolute","changes","bitMap","updatePathLocation","moveSync","isEmpty","componentsIds","map","c","id","linkToNodeModulesByIds","write","moveExistingComponent","component","oldPath","newPath","toString","componentMap","getComponent","oldPathRelative","newPathRelative","updateDirLocation","markAsChanged","dataToPersist","files","forEach","file","newRelative","relative","replace","updatePaths","newBase","removePath","RemovePath","writtenPath","provider","cli","moverMain","register","MoveCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","MoverAspect","addRuntime","_default","src","dest","options","isAbsolute","Error","err","message","includes"],"sources":["mover.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { isAbsolute } from 'path';\nimport { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { isEmpty } from 'lodash';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { isDir } from '@teambit/legacy/dist/utils';\nimport { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { MoverAspect } from './mover.aspect';\nimport { MoveCmd } from './move-cmd';\n\nexport class MoverMain {\n constructor(private workspace: Workspace) {}\n\n async movePaths({ from, to }: { from: PathOsBasedRelative; to: PathOsBasedRelative }): Promise<PathChangeResult[]> {\n const consumer = this.workspace.consumer;\n const fromExists = fs.existsSync(from);\n const toExists = fs.existsSync(to);\n if (fromExists && toExists) {\n throw new BitError(`unable to move because both paths from (${from}) and to (${to}) already exist`);\n }\n if (!fromExists && !toExists) throw new BitError(`both paths from (${from}) and to (${to}) do not exist`);\n if (fromExists && !isDir(from)) {\n throw new BitError(`bit move supports moving directories only, not files.\nfiles withing a component dir are automatically tracked, no action is needed.\nto change the main-file, use \"bit add <component-dir> --main <new-main-file>\"`);\n }\n if (toExists && !isDir(to)) {\n throw new BitError(`unable to move because the destination path (${to}) is a file and not a directory`);\n }\n const fromRelative = consumer.getPathRelativeToConsumer(from);\n const toRelative = consumer.getPathRelativeToConsumer(to);\n const fromAbsolute = consumer.toAbsolutePath(fromRelative);\n const toAbsolute = consumer.toAbsolutePath(toRelative);\n const changes = consumer.bitMap.updatePathLocation(fromRelative, toRelative);\n if (fromExists && !toExists) {\n // user would like to physically move the file. Otherwise (!fromExists and toExists), user would like to only update bit.map\n moveSync(fromAbsolute, toAbsolute);\n }\n if (!isEmpty(changes)) {\n const componentsIds = changes.map((c) => c.id);\n await linkToNodeModulesByIds(this.workspace, componentsIds);\n }\n await this.workspace.bitMap.write('move');\n return changes;\n }\n\n moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute) {\n const consumer = this.workspace.consumer;\n if (fs.existsSync(newPath)) {\n throw new BitError(\n `could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`\n );\n }\n const componentMap = consumer.bitMap.getComponent(component.id);\n const oldPathRelative = consumer.getPathRelativeToConsumer(oldPath);\n const newPathRelative = consumer.getPathRelativeToConsumer(newPath);\n componentMap.updateDirLocation(oldPathRelative, newPathRelative);\n consumer.bitMap.markAsChanged();\n component.dataToPersist.files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const newRelative = file.relative.replace(oldPathRelative, newPathRelative);\n file.updatePaths({ newRelative, newBase: newPathRelative });\n });\n component.dataToPersist.removePath(new RemovePath(oldPathRelative));\n component.writtenPath = newPathRelative;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const moverMain = new MoverMain(workspace);\n cli.register(new MoveCmd(moverMain));\n return moverMain;\n }\n}\n\nMoverAspect.addRuntime(MoverMain);\n\nexport default MoverMain;\n\nexport function moveSync(src: PathOsBasedAbsolute, dest: PathOsBasedAbsolute, options?: Record<string, any>) {\n if (!isAbsolute(src) || !isAbsolute(dest)) {\n throw new Error(`moveSync, src and dest must be absolute. Got src \"${src}\", dest \"${dest}\"`);\n }\n try {\n fs.moveSync(src, dest, options);\n } catch (err: any) {\n if (err.message.includes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M,KAAI7D,oBAAQ,EAAE,mBAAkBsD,GAAI,kBAAiBC,IAAK,GAAE,CAAC;IACrE;IACA,MAAMI,GAAG;EACX;AACF"}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_path","_bitError","_cli","_lodash","_workspace","_utils","_workspaceModules","_removePath","_mover","_moveCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","MoverMain","constructor","workspace","movePaths","from","to","consumer","fromExists","fs","existsSync","toExists","BitError","isDir","fromRelative","getPathRelativeToConsumer","toRelative","fromAbsolute","toAbsolutePath","toAbsolute","changes","bitMap","updatePathLocation","moveSync","isEmpty","componentsIds","map","c","id","linkToNodeModulesByIds","write","moveExistingComponent","component","oldPath","newPath","toString","componentMap","getComponent","oldPathRelative","newPathRelative","updateDirLocation","markAsChanged","dataToPersist","files","forEach","file","newRelative","relative","replace","updatePaths","newBase","removePath","RemovePath","writtenPath","provider","cli","moverMain","register","MoveCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","MoverAspect","addRuntime","_default","src","dest","options","isAbsolute","Error","err","message","includes"],"sources":["mover.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { isAbsolute } from 'path';\nimport { BitError } from '@teambit/bit-error';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { isEmpty } from 'lodash';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { isDir } from '@teambit/legacy/dist/utils';\nimport { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { PathChangeResult } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { MoverAspect } from './mover.aspect';\nimport { MoveCmd } from './move-cmd';\n\nexport class MoverMain {\n constructor(private workspace: Workspace) {}\n\n async movePaths({ from, to }: { from: PathOsBasedRelative; to: PathOsBasedRelative }): Promise<PathChangeResult[]> {\n const consumer = this.workspace.consumer;\n const fromExists = fs.existsSync(from);\n const toExists = fs.existsSync(to);\n if (fromExists && toExists) {\n throw new BitError(`unable to move because both paths from (${from}) and to (${to}) already exist`);\n }\n if (!fromExists && !toExists) throw new BitError(`both paths from (${from}) and to (${to}) do not exist`);\n if (fromExists && !isDir(from)) {\n throw new BitError(`bit move supports moving directories only, not files.\nfiles withing a component dir are automatically tracked, no action is needed.\nto change the main-file, use \"bit add <component-dir> --main <new-main-file>\"`);\n }\n if (toExists && !isDir(to)) {\n throw new BitError(`unable to move because the destination path (${to}) is a file and not a directory`);\n }\n const fromRelative = consumer.getPathRelativeToConsumer(from);\n const toRelative = consumer.getPathRelativeToConsumer(to);\n const fromAbsolute = consumer.toAbsolutePath(fromRelative);\n const toAbsolute = consumer.toAbsolutePath(toRelative);\n const changes = consumer.bitMap.updatePathLocation(fromRelative, toRelative);\n if (fromExists && !toExists) {\n // user would like to physically move the file. Otherwise (!fromExists and toExists), user would like to only update bit.map\n moveSync(fromAbsolute, toAbsolute);\n }\n if (!isEmpty(changes)) {\n const componentsIds = changes.map((c) => c.id);\n await linkToNodeModulesByIds(this.workspace, componentsIds);\n }\n await this.workspace.bitMap.write('move');\n return changes;\n }\n\n moveExistingComponent(component: Component, oldPath: PathOsBasedAbsolute, newPath: PathOsBasedAbsolute) {\n const consumer = this.workspace.consumer;\n if (fs.existsSync(newPath)) {\n throw new BitError(\n `could not move the component ${component.id.toString()} from ${oldPath} to ${newPath} as the destination path already exists`\n );\n }\n const componentMap = consumer.bitMap.getComponent(component.id);\n const oldPathRelative = consumer.getPathRelativeToConsumer(oldPath);\n const newPathRelative = consumer.getPathRelativeToConsumer(newPath);\n componentMap.updateDirLocation(oldPathRelative, newPathRelative);\n consumer.bitMap.markAsChanged();\n component.dataToPersist.files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const newRelative = file.relative.replace(oldPathRelative, newPathRelative);\n file.updatePaths({ newRelative, newBase: newPathRelative });\n });\n component.dataToPersist.removePath(new RemovePath(oldPathRelative));\n component.writtenPath = newPathRelative;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const moverMain = new MoverMain(workspace);\n cli.register(new MoveCmd(moverMain));\n return moverMain;\n }\n}\n\nMoverAspect.addRuntime(MoverMain);\n\nexport default MoverMain;\n\nexport function moveSync(src: PathOsBasedAbsolute, dest: PathOsBasedAbsolute, options?: Record<string, any>) {\n if (!isAbsolute(src) || !isAbsolute(dest)) {\n throw new Error(`moveSync, src and dest must be absolute. Got src \"${src}\", dest \"${dest}\"`);\n }\n try {\n fs.moveSync(src, dest, options);\n } catch (err: any) {\n if (err.message.includes('Cannot move') && err.message.includes('into itself')) {\n throw new BitError(`unable to move '${src}' into itself '${dest}'`);\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,KAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA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AS9BC,oBAAW,CAACC,UAAU,CAAC/D,SAAS,CAAC;AAAC,IAAAgE,QAAA,GAAAN,OAAA,CAAA/E,OAAA,GAEnBqB,SAAS;AAEjB,SAASsB,QAAQA,CAAC2C,GAAwB,EAAEC,IAAyB,EAAEC,OAA6B,EAAE;EAC3G,IAAI,CAAC,IAAAC,kBAAU,EAACH,GAAG,CAAC,IAAI,CAAC,IAAAG,kBAAU,EAACF,IAAI,CAAC,EAAE;IACzC,MAAM,IAAIG,KAAK,CAAE,qDAAoDJ,GAAI,YAAWC,IAAK,GAAE,CAAC;EAC9F;EACA,IAAI;IACF1D,kBAAE,CAACc,QAAQ,CAAC2C,GAAG,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACjC,CAAC,CAAC,OAAOG,GAAQ,EAAE;IACjB,IAAIA,GAAG,CAACC,OAAO,CAACC,QAAQ,CAAC,aAAa,CAAC,IAAIF,GAAG,CAACC,OAAO,CAACC,QAAQ,CAAC,aAAa,CAAC,EAAE;MAC9E,MAAM,KAAI7D,oBAAQ,EAAE,mBAAkBsD,GAAI,kBAAiBC,IAAK,GAAE,CAAC;IACrE;IACA,MAAMI,GAAG;EACX;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/mover",
3
- "version": "1.0.188",
3
+ "version": "1.0.190",
4
4
  "homepage": "https://bit.cloud/teambit/component/mover",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "mover",
9
- "version": "1.0.188"
9
+ "version": "1.0.190"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -14,16 +14,16 @@
14
14
  "lodash": "4.17.21",
15
15
  "@teambit/harmony": "0.4.6",
16
16
  "@teambit/bit-error": "0.0.404",
17
- "@teambit/cli": "0.0.855",
17
+ "@teambit/cli": "0.0.857",
18
18
  "@teambit/workspace.modules.node-modules-linker": "0.0.165",
19
- "@teambit/workspace": "1.0.188"
19
+ "@teambit/workspace": "1.0.190"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/fs-extra": "9.0.7",
23
23
  "@types/lodash": "4.14.165",
24
24
  "@types/mocha": "9.1.0",
25
25
  "chai": "4.3.0",
26
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
26
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@teambit/legacy": "1.0.624"