@teambit/component-writer 1.0.504 → 1.0.506

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/component-writer@1.0.504" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/component-writer@1.0.506" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -194,7 +194,7 @@
194
194
  "componentId": {
195
195
  "scope": "teambit.legacy",
196
196
  "name": "consumer",
197
- "version": "0.0.11"
197
+ "version": "0.0.13"
198
198
  }
199
199
  }
200
200
  },
@@ -257,7 +257,7 @@
257
257
  "__schema": "VariableLikeSchema",
258
258
  "location": {
259
259
  "filePath": "component-writer.main.runtime.ts",
260
- "line": 314,
260
+ "line": 323,
261
261
  "character": 3
262
262
  },
263
263
  "signature": "(property) ComponentWriterMain.slots: never[]",
@@ -266,7 +266,7 @@
266
266
  "__schema": "InferenceTypeSchema",
267
267
  "location": {
268
268
  "filePath": "component-writer.main.runtime.ts",
269
- "line": 314,
269
+ "line": 323,
270
270
  "character": 3
271
271
  },
272
272
  "type": "never[]"
@@ -278,7 +278,7 @@
278
278
  "__schema": "VariableLikeSchema",
279
279
  "location": {
280
280
  "filePath": "component-writer.main.runtime.ts",
281
- "line": 315,
281
+ "line": 324,
282
282
  "character": 3
283
283
  },
284
284
  "signature": "(property) ComponentWriterMain.dependencies: Aspect[]",
@@ -287,7 +287,7 @@
287
287
  "__schema": "InferenceTypeSchema",
288
288
  "location": {
289
289
  "filePath": "component-writer.main.runtime.ts",
290
- "line": 315,
290
+ "line": 324,
291
291
  "character": 3
292
292
  },
293
293
  "type": "Aspect[]"
@@ -299,7 +299,7 @@
299
299
  "__schema": "VariableLikeSchema",
300
300
  "location": {
301
301
  "filePath": "component-writer.main.runtime.ts",
302
- "line": 316,
302
+ "line": 325,
303
303
  "character": 3
304
304
  },
305
305
  "signature": "(property) ComponentWriterMain.runtime: RuntimeDefinition",
@@ -308,7 +308,7 @@
308
308
  "__schema": "InferenceTypeSchema",
309
309
  "location": {
310
310
  "filePath": "component-writer.main.runtime.ts",
311
- "line": 316,
311
+ "line": 325,
312
312
  "character": 3
313
313
  },
314
314
  "type": "RuntimeDefinition"
@@ -320,7 +320,7 @@
320
320
  "__schema": "FunctionLikeSchema",
321
321
  "location": {
322
322
  "filePath": "component-writer.main.runtime.ts",
323
- "line": 317,
323
+ "line": 326,
324
324
  "character": 3
325
325
  },
326
326
  "signature": "(method) ComponentWriterMain.provider([install, compiler, loggerMain, workspace, mover, configMerger]: [\n InstallMain,\n CompilerMain,\n LoggerMain,\n Workspace,\n MoverMain,\n ConfigMergerMain\n]): Promise<ComponentWriterMain>",
@@ -330,7 +330,7 @@
330
330
  "__schema": "ParameterSchema",
331
331
  "location": {
332
332
  "filePath": "component-writer.main.runtime.ts",
333
- "line": 317,
333
+ "line": 326,
334
334
  "character": 25
335
335
  },
336
336
  "name": "[ install, compiler, loggerMain, workspace, mover, configMerger ]",
@@ -338,7 +338,7 @@
338
338
  "__schema": "TupleTypeSchema",
339
339
  "location": {
340
340
  "filePath": "component-writer.main.runtime.ts",
341
- "line": 317,
341
+ "line": 326,
342
342
  "character": 90
343
343
  },
344
344
  "elements": [
@@ -346,7 +346,7 @@
346
346
  "__schema": "TypeRefSchema",
347
347
  "location": {
348
348
  "filePath": "component-writer.main.runtime.ts",
349
- "line": 318,
349
+ "line": 327,
350
350
  "character": 5
351
351
  },
352
352
  "name": "InstallMain"
@@ -355,7 +355,7 @@
355
355
  "__schema": "TypeRefSchema",
356
356
  "location": {
357
357
  "filePath": "component-writer.main.runtime.ts",
358
- "line": 319,
358
+ "line": 328,
359
359
  "character": 5
360
360
  },
361
361
  "name": "CompilerMain"
@@ -364,7 +364,7 @@
364
364
  "__schema": "TypeRefSchema",
365
365
  "location": {
366
366
  "filePath": "component-writer.main.runtime.ts",
367
- "line": 320,
367
+ "line": 329,
368
368
  "character": 5
369
369
  },
370
370
  "name": "LoggerMain"
@@ -373,7 +373,7 @@
373
373
  "__schema": "TypeRefSchema",
374
374
  "location": {
375
375
  "filePath": "component-writer.main.runtime.ts",
376
- "line": 321,
376
+ "line": 330,
377
377
  "character": 5
378
378
  },
379
379
  "name": "Workspace"
@@ -382,7 +382,7 @@
382
382
  "__schema": "TypeRefSchema",
383
383
  "location": {
384
384
  "filePath": "component-writer.main.runtime.ts",
385
- "line": 322,
385
+ "line": 331,
386
386
  "character": 5
387
387
  },
388
388
  "name": "MoverMain"
@@ -391,7 +391,7 @@
391
391
  "__schema": "TypeRefSchema",
392
392
  "location": {
393
393
  "filePath": "component-writer.main.runtime.ts",
394
- "line": 323,
394
+ "line": 332,
395
395
  "character": 5
396
396
  },
397
397
  "name": "ConfigMergerMain"
@@ -406,7 +406,7 @@
406
406
  "__schema": "InferenceTypeSchema",
407
407
  "location": {
408
408
  "filePath": "component-writer.main.runtime.ts",
409
- "line": 317,
409
+ "line": 326,
410
410
  "character": 3
411
411
  },
412
412
  "type": "Promise<ComponentWriterMain>"
@@ -785,7 +785,7 @@
785
785
  "line": 43,
786
786
  "character": 3
787
787
  },
788
- "signature": "(property) ManyComponentsWriterParams.mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined",
788
+ "signature": "(property) ManyComponentsWriterParams.mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined",
789
789
  "name": "mergeStrategy",
790
790
  "type": {
791
791
  "__schema": "TypeRefSchema",
@@ -815,7 +815,7 @@
815
815
  "__schema": "FunctionLikeSchema",
816
816
  "location": {
817
817
  "filePath": "component-writer.main.runtime.ts",
818
- "line": 334,
818
+ "line": 343,
819
819
  "character": 1
820
820
  },
821
821
  "signature": "function incrementPathRecursively(p: string, allPaths: string[]): string",
@@ -825,7 +825,7 @@
825
825
  "__schema": "ParameterSchema",
826
826
  "location": {
827
827
  "filePath": "component-writer.main.runtime.ts",
828
- "line": 334,
828
+ "line": 343,
829
829
  "character": 42
830
830
  },
831
831
  "name": "p",
@@ -833,7 +833,7 @@
833
833
  "__schema": "KeywordTypeSchema",
834
834
  "location": {
835
835
  "filePath": "component-writer.main.runtime.ts",
836
- "line": 334,
836
+ "line": 343,
837
837
  "character": 45
838
838
  },
839
839
  "name": "string"
@@ -845,7 +845,7 @@
845
845
  "__schema": "ParameterSchema",
846
846
  "location": {
847
847
  "filePath": "component-writer.main.runtime.ts",
848
- "line": 334,
848
+ "line": 343,
849
849
  "character": 53
850
850
  },
851
851
  "name": "allPaths",
@@ -853,14 +853,14 @@
853
853
  "__schema": "TypeArraySchema",
854
854
  "location": {
855
855
  "filePath": "component-writer.main.runtime.ts",
856
- "line": 334,
856
+ "line": 343,
857
857
  "character": 63
858
858
  },
859
859
  "type": {
860
860
  "__schema": "KeywordTypeSchema",
861
861
  "location": {
862
862
  "filePath": "component-writer.main.runtime.ts",
863
- "line": 334,
863
+ "line": 343,
864
864
  "character": 63
865
865
  },
866
866
  "name": "string"
@@ -874,7 +874,7 @@
874
874
  "__schema": "InferenceTypeSchema",
875
875
  "location": {
876
876
  "filePath": "component-writer.main.runtime.ts",
877
- "line": 334,
877
+ "line": 343,
878
878
  "character": 1
879
879
  },
880
880
  "type": "string"
@@ -1207,7 +1207,7 @@
1207
1207
  "line": 43,
1208
1208
  "character": 3
1209
1209
  },
1210
- "signature": "(property) ManyComponentsWriterParams.mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined",
1210
+ "signature": "(property) ManyComponentsWriterParams.mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined",
1211
1211
  "name": "mergeStrategy",
1212
1212
  "type": {
1213
1213
  "__schema": "TypeRefSchema",
@@ -1475,7 +1475,7 @@
1475
1475
  "componentId": {
1476
1476
  "scope": "teambit.legacy",
1477
1477
  "name": "consumer",
1478
- "version": "0.0.11"
1478
+ "version": "0.0.13"
1479
1479
  }
1480
1480
  }
1481
1481
  },
@@ -1538,7 +1538,7 @@
1538
1538
  "__schema": "VariableLikeSchema",
1539
1539
  "location": {
1540
1540
  "filePath": "component-writer.main.runtime.ts",
1541
- "line": 314,
1541
+ "line": 323,
1542
1542
  "character": 3
1543
1543
  },
1544
1544
  "signature": "(property) ComponentWriterMain.slots: never[]",
@@ -1547,7 +1547,7 @@
1547
1547
  "__schema": "InferenceTypeSchema",
1548
1548
  "location": {
1549
1549
  "filePath": "component-writer.main.runtime.ts",
1550
- "line": 314,
1550
+ "line": 323,
1551
1551
  "character": 3
1552
1552
  },
1553
1553
  "type": "never[]"
@@ -1559,7 +1559,7 @@
1559
1559
  "__schema": "VariableLikeSchema",
1560
1560
  "location": {
1561
1561
  "filePath": "component-writer.main.runtime.ts",
1562
- "line": 315,
1562
+ "line": 324,
1563
1563
  "character": 3
1564
1564
  },
1565
1565
  "signature": "(property) ComponentWriterMain.dependencies: Aspect[]",
@@ -1568,7 +1568,7 @@
1568
1568
  "__schema": "InferenceTypeSchema",
1569
1569
  "location": {
1570
1570
  "filePath": "component-writer.main.runtime.ts",
1571
- "line": 315,
1571
+ "line": 324,
1572
1572
  "character": 3
1573
1573
  },
1574
1574
  "type": "Aspect[]"
@@ -1580,7 +1580,7 @@
1580
1580
  "__schema": "VariableLikeSchema",
1581
1581
  "location": {
1582
1582
  "filePath": "component-writer.main.runtime.ts",
1583
- "line": 316,
1583
+ "line": 325,
1584
1584
  "character": 3
1585
1585
  },
1586
1586
  "signature": "(property) ComponentWriterMain.runtime: RuntimeDefinition",
@@ -1589,7 +1589,7 @@
1589
1589
  "__schema": "InferenceTypeSchema",
1590
1590
  "location": {
1591
1591
  "filePath": "component-writer.main.runtime.ts",
1592
- "line": 316,
1592
+ "line": 325,
1593
1593
  "character": 3
1594
1594
  },
1595
1595
  "type": "RuntimeDefinition"
@@ -1601,7 +1601,7 @@
1601
1601
  "__schema": "FunctionLikeSchema",
1602
1602
  "location": {
1603
1603
  "filePath": "component-writer.main.runtime.ts",
1604
- "line": 317,
1604
+ "line": 326,
1605
1605
  "character": 3
1606
1606
  },
1607
1607
  "signature": "(method) ComponentWriterMain.provider([install, compiler, loggerMain, workspace, mover, configMerger]: [\n InstallMain,\n CompilerMain,\n LoggerMain,\n Workspace,\n MoverMain,\n ConfigMergerMain\n]): Promise<ComponentWriterMain>",
@@ -1611,7 +1611,7 @@
1611
1611
  "__schema": "ParameterSchema",
1612
1612
  "location": {
1613
1613
  "filePath": "component-writer.main.runtime.ts",
1614
- "line": 317,
1614
+ "line": 326,
1615
1615
  "character": 25
1616
1616
  },
1617
1617
  "name": "[ install, compiler, loggerMain, workspace, mover, configMerger ]",
@@ -1619,7 +1619,7 @@
1619
1619
  "__schema": "TupleTypeSchema",
1620
1620
  "location": {
1621
1621
  "filePath": "component-writer.main.runtime.ts",
1622
- "line": 317,
1622
+ "line": 326,
1623
1623
  "character": 90
1624
1624
  },
1625
1625
  "elements": [
@@ -1627,7 +1627,7 @@
1627
1627
  "__schema": "TypeRefSchema",
1628
1628
  "location": {
1629
1629
  "filePath": "component-writer.main.runtime.ts",
1630
- "line": 318,
1630
+ "line": 327,
1631
1631
  "character": 5
1632
1632
  },
1633
1633
  "name": "InstallMain"
@@ -1636,7 +1636,7 @@
1636
1636
  "__schema": "TypeRefSchema",
1637
1637
  "location": {
1638
1638
  "filePath": "component-writer.main.runtime.ts",
1639
- "line": 319,
1639
+ "line": 328,
1640
1640
  "character": 5
1641
1641
  },
1642
1642
  "name": "CompilerMain"
@@ -1645,7 +1645,7 @@
1645
1645
  "__schema": "TypeRefSchema",
1646
1646
  "location": {
1647
1647
  "filePath": "component-writer.main.runtime.ts",
1648
- "line": 320,
1648
+ "line": 329,
1649
1649
  "character": 5
1650
1650
  },
1651
1651
  "name": "LoggerMain"
@@ -1654,7 +1654,7 @@
1654
1654
  "__schema": "TypeRefSchema",
1655
1655
  "location": {
1656
1656
  "filePath": "component-writer.main.runtime.ts",
1657
- "line": 321,
1657
+ "line": 330,
1658
1658
  "character": 5
1659
1659
  },
1660
1660
  "name": "Workspace"
@@ -1663,7 +1663,7 @@
1663
1663
  "__schema": "TypeRefSchema",
1664
1664
  "location": {
1665
1665
  "filePath": "component-writer.main.runtime.ts",
1666
- "line": 322,
1666
+ "line": 331,
1667
1667
  "character": 5
1668
1668
  },
1669
1669
  "name": "MoverMain"
@@ -1672,7 +1672,7 @@
1672
1672
  "__schema": "TypeRefSchema",
1673
1673
  "location": {
1674
1674
  "filePath": "component-writer.main.runtime.ts",
1675
- "line": 323,
1675
+ "line": 332,
1676
1676
  "character": 5
1677
1677
  },
1678
1678
  "name": "ConfigMergerMain"
@@ -1687,7 +1687,7 @@
1687
1687
  "__schema": "InferenceTypeSchema",
1688
1688
  "location": {
1689
1689
  "filePath": "component-writer.main.runtime.ts",
1690
- "line": 317,
1690
+ "line": 326,
1691
1691
  "character": 3
1692
1692
  },
1693
1693
  "type": "Promise<ComponentWriterMain>"
@@ -1705,7 +1705,7 @@
1705
1705
  "__schema": "UnImplementedSchema",
1706
1706
  "location": {
1707
1707
  "filePath": "component-writer.main.runtime.ts",
1708
- "line": 332,
1708
+ "line": 341,
1709
1709
  "character": 16
1710
1710
  },
1711
1711
  "name": "ComponentWriterMain",
@@ -1715,7 +1715,7 @@
1715
1715
  "__schema": "FunctionLikeSchema",
1716
1716
  "location": {
1717
1717
  "filePath": "component-writer.main.runtime.ts",
1718
- "line": 334,
1718
+ "line": 343,
1719
1719
  "character": 1
1720
1720
  },
1721
1721
  "signature": "function incrementPathRecursively(p: string, allPaths: string[]): string",
@@ -1725,7 +1725,7 @@
1725
1725
  "__schema": "ParameterSchema",
1726
1726
  "location": {
1727
1727
  "filePath": "component-writer.main.runtime.ts",
1728
- "line": 334,
1728
+ "line": 343,
1729
1729
  "character": 42
1730
1730
  },
1731
1731
  "name": "p",
@@ -1733,7 +1733,7 @@
1733
1733
  "__schema": "KeywordTypeSchema",
1734
1734
  "location": {
1735
1735
  "filePath": "component-writer.main.runtime.ts",
1736
- "line": 334,
1736
+ "line": 343,
1737
1737
  "character": 45
1738
1738
  },
1739
1739
  "name": "string"
@@ -1745,7 +1745,7 @@
1745
1745
  "__schema": "ParameterSchema",
1746
1746
  "location": {
1747
1747
  "filePath": "component-writer.main.runtime.ts",
1748
- "line": 334,
1748
+ "line": 343,
1749
1749
  "character": 53
1750
1750
  },
1751
1751
  "name": "allPaths",
@@ -1753,14 +1753,14 @@
1753
1753
  "__schema": "TypeArraySchema",
1754
1754
  "location": {
1755
1755
  "filePath": "component-writer.main.runtime.ts",
1756
- "line": 334,
1756
+ "line": 343,
1757
1757
  "character": 63
1758
1758
  },
1759
1759
  "type": {
1760
1760
  "__schema": "KeywordTypeSchema",
1761
1761
  "location": {
1762
1762
  "filePath": "component-writer.main.runtime.ts",
1763
- "line": 334,
1763
+ "line": 343,
1764
1764
  "character": 63
1765
1765
  },
1766
1766
  "name": "string"
@@ -1774,7 +1774,7 @@
1774
1774
  "__schema": "InferenceTypeSchema",
1775
1775
  "location": {
1776
1776
  "filePath": "component-writer.main.runtime.ts",
1777
- "line": 334,
1777
+ "line": 343,
1778
1778
  "character": 1
1779
1779
  },
1780
1780
  "type": "string"
@@ -1789,7 +1789,7 @@
1789
1789
  "__schema": "UnImplementedSchema",
1790
1790
  "location": {
1791
1791
  "filePath": "component-writer.main.runtime.ts",
1792
- "line": 330,
1792
+ "line": 339,
1793
1793
  "character": 1
1794
1794
  },
1795
1795
  "name": "ComponentWriterAspect.addRuntime(ComponentWriterMain);",
@@ -1838,7 +1838,7 @@
1838
1838
  "componentId": {
1839
1839
  "scope": "teambit.component",
1840
1840
  "name": "component-writer",
1841
- "version": "1.0.504"
1841
+ "version": "1.0.506"
1842
1842
  },
1843
1843
  "taggedModuleExports": []
1844
1844
  }
@@ -309,7 +309,7 @@ class ComponentWriterMain {
309
309
  const componentMap = this.consumer.bitMap.getComponentIfExist(component.id, {
310
310
  ignoreVersion: true
311
311
  });
312
- this.throwErrorWhenDirectoryNotEmpty(this.consumer.toAbsolutePath(componentRootDir), componentMap, opts);
312
+ this.throwErrorWhenDirectoryNotEmpty(componentRootDir, componentMap, opts);
313
313
  return {
314
314
  existingComponentMap: componentMap
315
315
  };
@@ -343,21 +343,28 @@ to move all component files to a different directory, run bit remove and then bi
343
343
  });
344
344
  }
345
345
  }
346
- throwErrorWhenDirectoryNotEmpty(componentDir, componentMap, opts) {
346
+ throwErrorWhenDirectoryNotEmpty(componentDirRelative, componentMap, opts) {
347
347
  if (opts.skipWritingToFs) return;
348
348
  // if not writeToPath specified, it goes to the default directory. When componentMap exists, the
349
349
  // component is not new, and it's ok to override the existing directory.
350
350
  if (!opts.writeToPath && componentMap) return;
351
351
  // if writeToPath specified and that directory is already used for that component, it's ok to override
352
352
  if (opts.writeToPath && componentMap && componentMap.rootDir && componentMap.rootDir === opts.writeToPath) return;
353
- if (_fsExtra().default.pathExistsSync(componentDir)) {
354
- if (!(0, _legacy().isDir)(componentDir)) {
355
- throw new (_bitError().BitError)(`unable to import to ${componentDir} because it's a file`);
356
- }
357
- if (!(0, _legacy().isDirEmptySync)(componentDir) && opts.throwForExistingDir) {
358
- throw new (_bitError().BitError)(`unable to import to ${componentDir}, the directory is not empty. use --override flag to delete the directory and then import`);
353
+ const componentDir = this.consumer.toAbsolutePath(componentDirRelative);
354
+ if (!_fsExtra().default.pathExistsSync(componentDir)) return;
355
+ if (!componentMap) {
356
+ const compInTheSameDir = this.consumer.bitMap.getComponentIdByRootPath(componentDirRelative);
357
+ if (compInTheSameDir) {
358
+ throw new (_bitError().BitError)(`unable to import to ${componentDir}, the directory is already used by ${compInTheSameDir.toString()}.
359
+ either use --path to specify a different directory or modify "defaultDirectory" prop in the workspace.jsonc file to "{scopeId}/{name}"`);
359
360
  }
360
361
  }
362
+ if (!(0, _legacy().isDir)(componentDir)) {
363
+ throw new (_bitError().BitError)(`unable to import to ${componentDir} because it's a file`);
364
+ }
365
+ if (!(0, _legacy().isDirEmptySync)(componentDir) && opts.throwForExistingDir) {
366
+ throw new (_bitError().BitError)(`unable to import to ${componentDir}, the directory is not empty. use --override flag to delete the directory and then import`);
367
+ }
361
368
  }
362
369
  static async provider([install, compiler, loggerMain, workspace, mover, configMerger]) {
363
370
  const logger = loggerMain.createLogger(_componentWriter2().ComponentWriterAspect.id);
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_compiler","_install","_logger","_workspace","_bitError","_fsExtra","_interopRequireDefault","_lodash","_pMapSeries","path","_interopRequireWildcard","_mover","_legacy","_legacy2","_component","_configMerger","_componentWriter","_componentWriter2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","ComponentWriterMain","constructor","installer","compiler","workspace","logger","mover","configMerge","consumer","writeMany","opts","components","debug","populateComponentsFilesToWrite","moveComponentsIfNeeded","persistComponentsData","skipUpdatingBitMap","writeBitMap","reasonForBitmapChange","installationError","compilationError","workspaceConfigUpdateResult","shouldUpdateWorkspaceConfig","updateDepsInWorkspaceConfig","mergeStrategy","skipDependencyInstallation","installPackagesGracefully","map","id","skipWriteConfigFiles","compileGracefully","componentIds","installOpts","dedupe","updateExisting","import","writeConfigFiles","dependenciesGraph","scope","getDependenciesGraphByComponentIds","install","undefined","err","consoleFailure","message","error","compileOnWorkspace","skipWritingToFs","dataToPersist","DataToPersist","component","merge","addBasePath","getPath","persistAllToFS","writeComponentsParams","getWriteParamsOfOneComponent","componentWriterInstances","writeParams","ComponentWriter","fixDirsIfEqual","fixDirsIfNested","Promise","all","componentWriter","existingComponentMap","addComponentToBitMap","writeToPath","componentConfigPath","join","rootDir","COMPONENT_CONFIG_FILE_NAME","componentConfigExist","fs","pathExists","writeConfig","resetConfig","config","mapSeries","allDirs","c","duplicatedDirs","dir","d","uniqDuplicates","uniq","compDir","hasDuplication","compWriter","ownerName","includes","split","startsWith","incrementPathRecursively","parentsOfOthersComps","find","existingRootDirs","bitMap","getAllRootDirs","parentsOfOthersCompsDirs","allPaths","newPath","existingParent","existingChildren","replace","componentRootDir","pathNormalizeToLinux","getPathRelativeToConsumer","resolve","composeRelativeComponentPath","getParams","componentMap","getComponentIfExist","ignoreVersion","throwErrorWhenDirectoryNotEmpty","toAbsolutePath","BitError","relativeWrittenPath","writtenPath","absoluteWrittenPath","absoluteWriteToPath","moveExistingComponent","componentDir","pathExistsSync","isDir","isDirEmptySync","throwForExistingDir","provider","loggerMain","configMerger","createLogger","ComponentWriterAspect","exports","InstallAspect","CompilerAspect","LoggerAspect","WorkspaceAspect","MoverAspect","ConfigMergerAspect","MainRuntime","addRuntime","_default","p","incrementPath","str","number","num"],"sources":["component-writer.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport fs from 'fs-extra';\nimport { uniq } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport * as path from 'path';\nimport { MoverAspect, MoverMain } from '@teambit/mover';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport {\n isDir,\n isDirEmptySync,\n PathLinuxRelative,\n pathNormalizeToLinux,\n PathOsBasedAbsolute,\n} from '@teambit/legacy.utils';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\nimport { COMPONENT_CONFIG_FILE_NAME } from '@teambit/legacy.constants';\nimport { DataToPersist } from '@teambit/component.sources';\nimport { ConfigMergerAspect, ConfigMergerMain, WorkspaceConfigUpdateResult } from '@teambit/config-merger';\nimport { MergeStrategy } from '@teambit/merging';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport ComponentWriter, { ComponentWriterProps } from './component-writer';\nimport { ComponentWriterAspect } from './component-writer.aspect';\n\nexport interface ManyComponentsWriterParams {\n components: ConsumerComponent[];\n writeToPath?: string;\n throwForExistingDir?: boolean;\n writeConfig?: boolean;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n resetConfig?: boolean;\n skipWritingToFs?: boolean;\n skipUpdatingBitMap?: boolean;\n skipWriteConfigFiles?: boolean;\n reasonForBitmapChange?: string; // optional. will be written in the bitmap-history-metadata\n shouldUpdateWorkspaceConfig?: boolean; // whether it should update dependencies policy (or leave conflicts) in workspace.jsonc\n mergeStrategy?: MergeStrategy; // needed for workspace.jsonc conflicts\n}\n\nexport type ComponentWriterResults = {\n installationError?: Error;\n compilationError?: Error;\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n};\n\nexport class ComponentWriterMain {\n constructor(\n private installer: InstallMain,\n private compiler: CompilerMain,\n private workspace: Workspace,\n private logger: Logger,\n private mover: MoverMain,\n private configMerge: ConfigMergerMain\n ) {}\n\n get consumer(): Consumer {\n return this.workspace.consumer;\n }\n\n async writeMany(opts: ManyComponentsWriterParams): Promise<ComponentWriterResults> {\n if (!opts.components.length) return {};\n this.logger.debug('writeMany, started');\n await this.populateComponentsFilesToWrite(opts);\n this.moveComponentsIfNeeded(opts);\n await this.persistComponentsData(opts);\n if (!opts.skipUpdatingBitMap) await this.consumer.writeBitMap(opts.reasonForBitmapChange);\n let installationError: Error | undefined;\n let compilationError: Error | undefined;\n let workspaceConfigUpdateResult: WorkspaceConfigUpdateResult | undefined;\n if (opts.shouldUpdateWorkspaceConfig) {\n workspaceConfigUpdateResult = await this.configMerge.updateDepsInWorkspaceConfig(\n opts.components,\n opts.mergeStrategy\n );\n }\n if (!opts.skipDependencyInstallation) {\n installationError = await this.installPackagesGracefully(\n opts.components.map(({ id }) => id),\n opts.skipWriteConfigFiles\n );\n // no point to compile if the installation is not running. the environment is not ready.\n compilationError = await this.compileGracefully();\n }\n this.logger.debug('writeMany, completed!');\n return { installationError, compilationError, workspaceConfigUpdateResult };\n }\n\n private async installPackagesGracefully(\n componentIds: ComponentID[],\n skipWriteConfigFiles = false\n ): Promise<Error | undefined> {\n this.logger.debug('installPackagesGracefully, start installing packages');\n try {\n const installOpts = {\n dedupe: true,\n updateExisting: false,\n import: false,\n writeConfigFiles: !skipWriteConfigFiles,\n dependenciesGraph: await this.workspace.scope.getDependenciesGraphByComponentIds(componentIds),\n };\n await this.installer.install(undefined, installOpts);\n this.logger.debug('installPackagesGracefully, completed installing packages successfully');\n return undefined;\n } catch (err: any) {\n this.logger.consoleFailure(`installation failed with the following error: ${err.message}`);\n this.logger.error('installPackagesGracefully, package-installer found an error', err);\n return err;\n }\n }\n private async compileGracefully(): Promise<Error | undefined> {\n try {\n await this.compiler.compileOnWorkspace();\n return undefined;\n } catch (err: any) {\n this.logger.consoleFailure(`compilation failed with the following error: ${err.message}`);\n this.logger.error('compileGracefully, compiler found an error', err);\n return err;\n }\n }\n private async persistComponentsData(opts: ManyComponentsWriterParams) {\n if (opts.skipWritingToFs) return;\n const dataToPersist = new DataToPersist();\n opts.components.forEach((component) => dataToPersist.merge(component.dataToPersist));\n dataToPersist.addBasePath(this.consumer.getPath());\n await dataToPersist.persistAllToFS();\n }\n private async populateComponentsFilesToWrite(opts: ManyComponentsWriterParams) {\n const writeComponentsParams = opts.components.map((component) =>\n this.getWriteParamsOfOneComponent(component, opts)\n );\n const componentWriterInstances = writeComponentsParams.map((writeParams) => new ComponentWriter(writeParams));\n this.fixDirsIfEqual(componentWriterInstances);\n this.fixDirsIfNested(componentWriterInstances);\n // add componentMap entries into .bitmap before starting the process because steps like writing package-json\n // rely on .bitmap to determine whether a dependency exists and what's its origin\n await Promise.all(\n componentWriterInstances.map(async (componentWriter: ComponentWriter) => {\n componentWriter.existingComponentMap =\n componentWriter.existingComponentMap ||\n (await componentWriter.addComponentToBitMap(componentWriter.writeToPath));\n const componentConfigPath = path.join(\n this.workspace.path,\n componentWriter.existingComponentMap.rootDir,\n COMPONENT_CONFIG_FILE_NAME\n );\n const componentConfigExist = await fs.pathExists(componentConfigPath);\n componentWriter.writeConfig = componentWriter.writeConfig || componentConfigExist;\n })\n );\n if (opts.resetConfig) {\n componentWriterInstances.forEach((componentWriter: ComponentWriter) => {\n delete componentWriter.existingComponentMap?.config;\n });\n }\n await mapSeries(componentWriterInstances, (componentWriter: ComponentWriter) =>\n componentWriter.populateComponentsFilesToWrite()\n );\n }\n\n /**\n * this started to be an issue once same-name different-scope is supported.\n * by default, the component-dir consist of the scope-name part of the scope-id, without the owner part.\n * as a result, it's possible that multiple components have the same name, same scope-name but different owner.\n * e.g. org1.ui/button and org2.ui/button. the component-dir for both is \"ui/button\".\n * in this case, we try to prefix the component-dir with the owner-name and if not possible, just increment it (ui/button_1)\n */\n private fixDirsIfEqual(componentWriterInstances: ComponentWriter[]) {\n const allDirs = componentWriterInstances.map((c) => c.writeToPath);\n const duplicatedDirs = allDirs.filter((dir) => allDirs.filter((d) => d === dir).length > 1);\n if (!duplicatedDirs.length) return;\n const uniqDuplicates = uniq(duplicatedDirs);\n uniqDuplicates.forEach((compDir) => {\n const hasDuplication = componentWriterInstances.filter((compWriter) => compWriter.writeToPath === compDir);\n hasDuplication.forEach((compWriter) => {\n const ownerName = compWriter.component.id.scope?.includes('.')\n ? compWriter.component.id.scope.split('.')[0]\n : undefined;\n if (ownerName && !compDir.startsWith(ownerName) && !allDirs.includes(`${ownerName}/${compDir}`)) {\n compWriter.writeToPath = `${ownerName}/${compDir}`;\n } else {\n compWriter.writeToPath = incrementPathRecursively(compWriter.writeToPath, allDirs);\n }\n allDirs.push(compWriter.writeToPath);\n });\n });\n }\n\n /**\n * e.g. [bar, bar/foo] => [bar_1, bar/foo]\n * otherwise, the bar/foo component will be saved inside \"bar\" component.\n * in case bar_1 is taken, increment to bar_2 until the name is available.\n */\n private fixDirsIfNested(componentWriterInstances: ComponentWriter[]) {\n const allDirs = componentWriterInstances.map((c) => c.writeToPath);\n\n // get all components that their root-dir is a parent of other components root-dir.\n const parentsOfOthersComps = componentWriterInstances.filter(({ writeToPath }) =>\n allDirs.find((d) => d.startsWith(`${writeToPath}/`))\n );\n const existingRootDirs = this.workspace.bitMap.getAllRootDirs();\n const parentsOfOthersCompsDirs = parentsOfOthersComps.map((c) => c.writeToPath);\n const allPaths: PathLinuxRelative[] = [...existingRootDirs, ...parentsOfOthersCompsDirs];\n\n // this is when writing multiple components and some of them are parents of the others.\n // change the paths of all these parents root-dir to not collide with the children root-dir\n parentsOfOthersComps.forEach((componentWriter) => {\n if (existingRootDirs.includes(componentWriter.writeToPath)) return; // component already exists.\n const newPath = incrementPathRecursively(componentWriter.writeToPath, allPaths);\n componentWriter.writeToPath = newPath;\n });\n\n // this part is when a component's rootDir we about to write is a children of an existing rootDir.\n // e.g. we're now writing \"foo\", when an existing component has \"foo/bar\" as the rootDir.\n // in this case, we change \"foo\" to be \"foo_1\".\n componentWriterInstances.forEach((componentWriter) => {\n const existingParent = existingRootDirs.find((d) => d.startsWith(`${componentWriter.writeToPath}/`));\n if (!existingParent) return;\n if (existingRootDirs.includes(componentWriter.writeToPath)) return; // component already exists.\n const newPath = incrementPathRecursively(componentWriter.writeToPath, allPaths);\n componentWriter.writeToPath = newPath;\n });\n\n // this part if when for example an existing rootDir is \"comp1\" and currently written component is \"comp1/foo\".\n // obviously we don't want to change existing dirs. we change the \"comp1/foo\" to be \"comp1_1/foo\".\n componentWriterInstances.forEach((componentWriter) => {\n const existingChildren = existingRootDirs.find((d) => componentWriter.writeToPath.startsWith(`${d}/`));\n if (!existingChildren) return;\n // we increment the existing one, because it is used to replace the base-path of the current component\n const newPath = incrementPathRecursively(existingChildren, allPaths);\n componentWriter.writeToPath = componentWriter.writeToPath.replace(existingChildren, newPath);\n });\n }\n\n private getWriteParamsOfOneComponent(\n component: ConsumerComponent,\n opts: ManyComponentsWriterParams\n ): ComponentWriterProps {\n const componentRootDir: PathLinuxRelative = opts.writeToPath\n ? pathNormalizeToLinux(this.consumer.getPathRelativeToConsumer(path.resolve(opts.writeToPath)))\n : this.consumer.composeRelativeComponentPath(component.id);\n const getParams = () => {\n if (!this.consumer) {\n return {};\n }\n // components can't be saved with multiple versions, so we can ignore the version to find the component in bit.map\n const componentMap = this.consumer.bitMap.getComponentIfExist(component.id, {\n ignoreVersion: true,\n });\n this.throwErrorWhenDirectoryNotEmpty(this.consumer.toAbsolutePath(componentRootDir), componentMap, opts);\n return {\n existingComponentMap: componentMap,\n };\n };\n return {\n workspace: this.workspace,\n bitMap: this.consumer.bitMap,\n component,\n writeToPath: componentRootDir,\n writeConfig: opts.writeConfig,\n skipUpdatingBitMap: opts.skipUpdatingBitMap,\n ...getParams(),\n };\n }\n private moveComponentsIfNeeded(opts: ManyComponentsWriterParams) {\n if (opts.writeToPath && this.consumer) {\n opts.components.forEach((component) => {\n const componentMap = component.componentMap as ComponentMap;\n if (!componentMap.rootDir) {\n throw new BitError(`unable to use \"--path\" flag.\nto move individual files, use bit move.\nto move all component files to a different directory, run bit remove and then bit import --path`);\n }\n const relativeWrittenPath = component.writtenPath;\n // @ts-ignore relativeWrittenPath is set at this point\n const absoluteWrittenPath = this.consumer.toAbsolutePath(relativeWrittenPath);\n // @ts-ignore this.writeToPath is set at this point\n const absoluteWriteToPath = path.resolve(opts.writeToPath); // don't use consumer.toAbsolutePath, it might be an inner dir\n if (relativeWrittenPath && absoluteWrittenPath !== absoluteWriteToPath) {\n this.mover.moveExistingComponent(component, absoluteWrittenPath, absoluteWriteToPath);\n }\n });\n }\n }\n private throwErrorWhenDirectoryNotEmpty(\n componentDir: PathOsBasedAbsolute,\n componentMap: ComponentMap | null | undefined,\n opts: ManyComponentsWriterParams\n ) {\n if (opts.skipWritingToFs) return;\n // if not writeToPath specified, it goes to the default directory. When componentMap exists, the\n // component is not new, and it's ok to override the existing directory.\n if (!opts.writeToPath && componentMap) return;\n // if writeToPath specified and that directory is already used for that component, it's ok to override\n if (opts.writeToPath && componentMap && componentMap.rootDir && componentMap.rootDir === opts.writeToPath) return;\n\n if (fs.pathExistsSync(componentDir)) {\n if (!isDir(componentDir)) {\n throw new BitError(`unable to import to ${componentDir} because it's a file`);\n }\n if (!isDirEmptySync(componentDir) && opts.throwForExistingDir) {\n throw new BitError(\n `unable to import to ${componentDir}, the directory is not empty. use --override flag to delete the directory and then import`\n );\n }\n }\n }\n\n static slots = [];\n static dependencies = [InstallAspect, CompilerAspect, LoggerAspect, WorkspaceAspect, MoverAspect, ConfigMergerAspect];\n static runtime = MainRuntime;\n static async provider([install, compiler, loggerMain, workspace, mover, configMerger]: [\n InstallMain,\n CompilerMain,\n LoggerMain,\n Workspace,\n MoverMain,\n ConfigMergerMain,\n ]) {\n const logger = loggerMain.createLogger(ComponentWriterAspect.id);\n return new ComponentWriterMain(install, compiler, workspace, logger, mover, configMerger);\n }\n}\n\nComponentWriterAspect.addRuntime(ComponentWriterMain);\n\nexport default ComponentWriterMain;\n\nexport function incrementPathRecursively(p: string, allPaths: string[]) {\n const incrementPath = (str: string, number: number) => `${str}_${number}`;\n let num = 1;\n let newPath = incrementPath(p, num);\n while (allPaths.includes(newPath)) {\n newPath = incrementPath(p, (num += 1));\n }\n return newPath;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IA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AAE,CAAC;IAChE,OAAO,IAAI5B,mBAAmB,CAACwC,OAAO,EAAErC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAE2H,YAAY,CAAC;EAC3F;AACF;AAACG,OAAA,CAAApI,mBAAA,GAAAA,mBAAA;AAAAb,eAAA,CApRYa,mBAAmB,WAsQf,EAAE;AAAAb,eAAA,CAtQNa,mBAAmB,kBAuQR,CAACqI,wBAAa,EAAEC,0BAAc,EAAEC,sBAAY,EAAEC,4BAAe,EAAEC,oBAAW,EAAEC,kCAAkB,CAAC;AAAAvJ,eAAA,CAvQ1Ga,mBAAmB,aAwQb2I,kBAAW;AAc9BR,yCAAqB,CAACS,UAAU,CAAC5I,mBAAmB,CAAC;AAAC,IAAA6I,QAAA,GAAAT,OAAA,CAAA3K,OAAA,GAEvCuC,mBAAmB;AAE3B,SAAS6F,wBAAwBA,CAACiD,CAAS,EAAE1C,QAAkB,EAAE;EACtE,MAAM2C,aAAa,GAAGA,CAACC,GAAW,EAAEC,MAAc,KAAK,GAAGD,GAAG,IAAIC,MAAM,EAAE;EACzE,IAAIC,GAAG,GAAG,CAAC;EACX,IAAI7C,OAAO,GAAG0C,aAAa,CAACD,CAAC,EAAEI,GAAG,CAAC;EACnC,OAAO9C,QAAQ,CAACV,QAAQ,CAACW,OAAO,CAAC,EAAE;IACjCA,OAAO,GAAG0C,aAAa,CAACD,CAAC,EAAGI,GAAG,IAAI,CAAE,CAAC;EACxC;EACA,OAAO7C,OAAO;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_compiler","_install","_logger","_workspace","_bitError","_fsExtra","_interopRequireDefault","_lodash","_pMapSeries","path","_interopRequireWildcard","_mover","_legacy","_legacy2","_component","_configMerger","_componentWriter","_componentWriter2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","ComponentWriterMain","constructor","installer","compiler","workspace","logger","mover","configMerge","consumer","writeMany","opts","components","debug","populateComponentsFilesToWrite","moveComponentsIfNeeded","persistComponentsData","skipUpdatingBitMap","writeBitMap","reasonForBitmapChange","installationError","compilationError","workspaceConfigUpdateResult","shouldUpdateWorkspaceConfig","updateDepsInWorkspaceConfig","mergeStrategy","skipDependencyInstallation","installPackagesGracefully","map","id","skipWriteConfigFiles","compileGracefully","componentIds","installOpts","dedupe","updateExisting","import","writeConfigFiles","dependenciesGraph","scope","getDependenciesGraphByComponentIds","install","undefined","err","consoleFailure","message","error","compileOnWorkspace","skipWritingToFs","dataToPersist","DataToPersist","component","merge","addBasePath","getPath","persistAllToFS","writeComponentsParams","getWriteParamsOfOneComponent","componentWriterInstances","writeParams","ComponentWriter","fixDirsIfEqual","fixDirsIfNested","Promise","all","componentWriter","existingComponentMap","addComponentToBitMap","writeToPath","componentConfigPath","join","rootDir","COMPONENT_CONFIG_FILE_NAME","componentConfigExist","fs","pathExists","writeConfig","resetConfig","config","mapSeries","allDirs","c","duplicatedDirs","dir","d","uniqDuplicates","uniq","compDir","hasDuplication","compWriter","ownerName","includes","split","startsWith","incrementPathRecursively","parentsOfOthersComps","find","existingRootDirs","bitMap","getAllRootDirs","parentsOfOthersCompsDirs","allPaths","newPath","existingParent","existingChildren","replace","componentRootDir","pathNormalizeToLinux","getPathRelativeToConsumer","resolve","composeRelativeComponentPath","getParams","componentMap","getComponentIfExist","ignoreVersion","throwErrorWhenDirectoryNotEmpty","BitError","relativeWrittenPath","writtenPath","absoluteWrittenPath","toAbsolutePath","absoluteWriteToPath","moveExistingComponent","componentDirRelative","componentDir","pathExistsSync","compInTheSameDir","getComponentIdByRootPath","toString","isDir","isDirEmptySync","throwForExistingDir","provider","loggerMain","configMerger","createLogger","ComponentWriterAspect","exports","InstallAspect","CompilerAspect","LoggerAspect","WorkspaceAspect","MoverAspect","ConfigMergerAspect","MainRuntime","addRuntime","_default","p","incrementPath","str","number","num"],"sources":["component-writer.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport fs from 'fs-extra';\nimport { uniq } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport * as path from 'path';\nimport { MoverAspect, MoverMain } from '@teambit/mover';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport {\n isDir,\n isDirEmptySync,\n PathLinuxRelative,\n pathNormalizeToLinux,\n PathOsBasedAbsolute,\n} from '@teambit/legacy.utils';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\nimport { COMPONENT_CONFIG_FILE_NAME } from '@teambit/legacy.constants';\nimport { DataToPersist } from '@teambit/component.sources';\nimport { ConfigMergerAspect, ConfigMergerMain, WorkspaceConfigUpdateResult } from '@teambit/config-merger';\nimport { MergeStrategy } from '@teambit/merging';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport ComponentWriter, { ComponentWriterProps } from './component-writer';\nimport { ComponentWriterAspect } from './component-writer.aspect';\n\nexport interface ManyComponentsWriterParams {\n components: ConsumerComponent[];\n writeToPath?: string;\n throwForExistingDir?: boolean;\n writeConfig?: boolean;\n skipDependencyInstallation?: boolean;\n verbose?: boolean;\n resetConfig?: boolean;\n skipWritingToFs?: boolean;\n skipUpdatingBitMap?: boolean;\n skipWriteConfigFiles?: boolean;\n reasonForBitmapChange?: string; // optional. will be written in the bitmap-history-metadata\n shouldUpdateWorkspaceConfig?: boolean; // whether it should update dependencies policy (or leave conflicts) in workspace.jsonc\n mergeStrategy?: MergeStrategy; // needed for workspace.jsonc conflicts\n}\n\nexport type ComponentWriterResults = {\n installationError?: Error;\n compilationError?: Error;\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n};\n\nexport class ComponentWriterMain {\n constructor(\n private installer: InstallMain,\n private compiler: CompilerMain,\n private workspace: Workspace,\n private logger: Logger,\n private mover: MoverMain,\n private configMerge: ConfigMergerMain\n ) {}\n\n get consumer(): Consumer {\n return this.workspace.consumer;\n }\n\n async writeMany(opts: ManyComponentsWriterParams): Promise<ComponentWriterResults> {\n if (!opts.components.length) return {};\n this.logger.debug('writeMany, started');\n await this.populateComponentsFilesToWrite(opts);\n this.moveComponentsIfNeeded(opts);\n await this.persistComponentsData(opts);\n if (!opts.skipUpdatingBitMap) await this.consumer.writeBitMap(opts.reasonForBitmapChange);\n let installationError: Error | undefined;\n let compilationError: Error | undefined;\n let workspaceConfigUpdateResult: WorkspaceConfigUpdateResult | undefined;\n if (opts.shouldUpdateWorkspaceConfig) {\n workspaceConfigUpdateResult = await this.configMerge.updateDepsInWorkspaceConfig(\n opts.components,\n opts.mergeStrategy\n );\n }\n if (!opts.skipDependencyInstallation) {\n installationError = await this.installPackagesGracefully(\n opts.components.map(({ id }) => id),\n opts.skipWriteConfigFiles\n );\n // no point to compile if the installation is not running. the environment is not ready.\n compilationError = await this.compileGracefully();\n }\n this.logger.debug('writeMany, completed!');\n return { installationError, compilationError, workspaceConfigUpdateResult };\n }\n\n private async installPackagesGracefully(\n componentIds: ComponentID[],\n skipWriteConfigFiles = false\n ): Promise<Error | undefined> {\n this.logger.debug('installPackagesGracefully, start installing packages');\n try {\n const installOpts = {\n dedupe: true,\n updateExisting: false,\n import: false,\n writeConfigFiles: !skipWriteConfigFiles,\n dependenciesGraph: await this.workspace.scope.getDependenciesGraphByComponentIds(componentIds),\n };\n await this.installer.install(undefined, installOpts);\n this.logger.debug('installPackagesGracefully, completed installing packages successfully');\n return undefined;\n } catch (err: any) {\n this.logger.consoleFailure(`installation failed with the following error: ${err.message}`);\n this.logger.error('installPackagesGracefully, package-installer found an error', err);\n return err;\n }\n }\n private async compileGracefully(): Promise<Error | undefined> {\n try {\n await this.compiler.compileOnWorkspace();\n return undefined;\n } catch (err: any) {\n this.logger.consoleFailure(`compilation failed with the following error: ${err.message}`);\n this.logger.error('compileGracefully, compiler found an error', err);\n return err;\n }\n }\n private async persistComponentsData(opts: ManyComponentsWriterParams) {\n if (opts.skipWritingToFs) return;\n const dataToPersist = new DataToPersist();\n opts.components.forEach((component) => dataToPersist.merge(component.dataToPersist));\n dataToPersist.addBasePath(this.consumer.getPath());\n await dataToPersist.persistAllToFS();\n }\n private async populateComponentsFilesToWrite(opts: ManyComponentsWriterParams) {\n const writeComponentsParams = opts.components.map((component) =>\n this.getWriteParamsOfOneComponent(component, opts)\n );\n const componentWriterInstances = writeComponentsParams.map((writeParams) => new ComponentWriter(writeParams));\n this.fixDirsIfEqual(componentWriterInstances);\n this.fixDirsIfNested(componentWriterInstances);\n // add componentMap entries into .bitmap before starting the process because steps like writing package-json\n // rely on .bitmap to determine whether a dependency exists and what's its origin\n await Promise.all(\n componentWriterInstances.map(async (componentWriter: ComponentWriter) => {\n componentWriter.existingComponentMap =\n componentWriter.existingComponentMap ||\n (await componentWriter.addComponentToBitMap(componentWriter.writeToPath));\n const componentConfigPath = path.join(\n this.workspace.path,\n componentWriter.existingComponentMap.rootDir,\n COMPONENT_CONFIG_FILE_NAME\n );\n const componentConfigExist = await fs.pathExists(componentConfigPath);\n componentWriter.writeConfig = componentWriter.writeConfig || componentConfigExist;\n })\n );\n if (opts.resetConfig) {\n componentWriterInstances.forEach((componentWriter: ComponentWriter) => {\n delete componentWriter.existingComponentMap?.config;\n });\n }\n await mapSeries(componentWriterInstances, (componentWriter: ComponentWriter) =>\n componentWriter.populateComponentsFilesToWrite()\n );\n }\n\n /**\n * this started to be an issue once same-name different-scope is supported.\n * by default, the component-dir consist of the scope-name part of the scope-id, without the owner part.\n * as a result, it's possible that multiple components have the same name, same scope-name but different owner.\n * e.g. org1.ui/button and org2.ui/button. the component-dir for both is \"ui/button\".\n * in this case, we try to prefix the component-dir with the owner-name and if not possible, just increment it (ui/button_1)\n */\n private fixDirsIfEqual(componentWriterInstances: ComponentWriter[]) {\n const allDirs = componentWriterInstances.map((c) => c.writeToPath);\n const duplicatedDirs = allDirs.filter((dir) => allDirs.filter((d) => d === dir).length > 1);\n if (!duplicatedDirs.length) return;\n const uniqDuplicates = uniq(duplicatedDirs);\n uniqDuplicates.forEach((compDir) => {\n const hasDuplication = componentWriterInstances.filter((compWriter) => compWriter.writeToPath === compDir);\n hasDuplication.forEach((compWriter) => {\n const ownerName = compWriter.component.id.scope?.includes('.')\n ? compWriter.component.id.scope.split('.')[0]\n : undefined;\n if (ownerName && !compDir.startsWith(ownerName) && !allDirs.includes(`${ownerName}/${compDir}`)) {\n compWriter.writeToPath = `${ownerName}/${compDir}`;\n } else {\n compWriter.writeToPath = incrementPathRecursively(compWriter.writeToPath, allDirs);\n }\n allDirs.push(compWriter.writeToPath);\n });\n });\n }\n\n /**\n * e.g. [bar, bar/foo] => [bar_1, bar/foo]\n * otherwise, the bar/foo component will be saved inside \"bar\" component.\n * in case bar_1 is taken, increment to bar_2 until the name is available.\n */\n private fixDirsIfNested(componentWriterInstances: ComponentWriter[]) {\n const allDirs = componentWriterInstances.map((c) => c.writeToPath);\n\n // get all components that their root-dir is a parent of other components root-dir.\n const parentsOfOthersComps = componentWriterInstances.filter(({ writeToPath }) =>\n allDirs.find((d) => d.startsWith(`${writeToPath}/`))\n );\n const existingRootDirs = this.workspace.bitMap.getAllRootDirs();\n const parentsOfOthersCompsDirs = parentsOfOthersComps.map((c) => c.writeToPath);\n const allPaths: PathLinuxRelative[] = [...existingRootDirs, ...parentsOfOthersCompsDirs];\n\n // this is when writing multiple components and some of them are parents of the others.\n // change the paths of all these parents root-dir to not collide with the children root-dir\n parentsOfOthersComps.forEach((componentWriter) => {\n if (existingRootDirs.includes(componentWriter.writeToPath)) return; // component already exists.\n const newPath = incrementPathRecursively(componentWriter.writeToPath, allPaths);\n componentWriter.writeToPath = newPath;\n });\n\n // this part is when a component's rootDir we about to write is a children of an existing rootDir.\n // e.g. we're now writing \"foo\", when an existing component has \"foo/bar\" as the rootDir.\n // in this case, we change \"foo\" to be \"foo_1\".\n componentWriterInstances.forEach((componentWriter) => {\n const existingParent = existingRootDirs.find((d) => d.startsWith(`${componentWriter.writeToPath}/`));\n if (!existingParent) return;\n if (existingRootDirs.includes(componentWriter.writeToPath)) return; // component already exists.\n const newPath = incrementPathRecursively(componentWriter.writeToPath, allPaths);\n componentWriter.writeToPath = newPath;\n });\n\n // this part if when for example an existing rootDir is \"comp1\" and currently written component is \"comp1/foo\".\n // obviously we don't want to change existing dirs. we change the \"comp1/foo\" to be \"comp1_1/foo\".\n componentWriterInstances.forEach((componentWriter) => {\n const existingChildren = existingRootDirs.find((d) => componentWriter.writeToPath.startsWith(`${d}/`));\n if (!existingChildren) return;\n // we increment the existing one, because it is used to replace the base-path of the current component\n const newPath = incrementPathRecursively(existingChildren, allPaths);\n componentWriter.writeToPath = componentWriter.writeToPath.replace(existingChildren, newPath);\n });\n }\n\n private getWriteParamsOfOneComponent(\n component: ConsumerComponent,\n opts: ManyComponentsWriterParams\n ): ComponentWriterProps {\n const componentRootDir: PathLinuxRelative = opts.writeToPath\n ? pathNormalizeToLinux(this.consumer.getPathRelativeToConsumer(path.resolve(opts.writeToPath)))\n : this.consumer.composeRelativeComponentPath(component.id);\n const getParams = () => {\n if (!this.consumer) {\n return {};\n }\n // components can't be saved with multiple versions, so we can ignore the version to find the component in bit.map\n const componentMap = this.consumer.bitMap.getComponentIfExist(component.id, {\n ignoreVersion: true,\n });\n this.throwErrorWhenDirectoryNotEmpty(componentRootDir, componentMap, opts);\n return {\n existingComponentMap: componentMap,\n };\n };\n return {\n workspace: this.workspace,\n bitMap: this.consumer.bitMap,\n component,\n writeToPath: componentRootDir,\n writeConfig: opts.writeConfig,\n skipUpdatingBitMap: opts.skipUpdatingBitMap,\n ...getParams(),\n };\n }\n private moveComponentsIfNeeded(opts: ManyComponentsWriterParams) {\n if (opts.writeToPath && this.consumer) {\n opts.components.forEach((component) => {\n const componentMap = component.componentMap as ComponentMap;\n if (!componentMap.rootDir) {\n throw new BitError(`unable to use \"--path\" flag.\nto move individual files, use bit move.\nto move all component files to a different directory, run bit remove and then bit import --path`);\n }\n const relativeWrittenPath = component.writtenPath;\n // @ts-ignore relativeWrittenPath is set at this point\n const absoluteWrittenPath = this.consumer.toAbsolutePath(relativeWrittenPath);\n // @ts-ignore this.writeToPath is set at this point\n const absoluteWriteToPath = path.resolve(opts.writeToPath); // don't use consumer.toAbsolutePath, it might be an inner dir\n if (relativeWrittenPath && absoluteWrittenPath !== absoluteWriteToPath) {\n this.mover.moveExistingComponent(component, absoluteWrittenPath, absoluteWriteToPath);\n }\n });\n }\n }\n private throwErrorWhenDirectoryNotEmpty(\n componentDirRelative: PathOsBasedAbsolute,\n componentMap: ComponentMap | null | undefined,\n opts: ManyComponentsWriterParams\n ) {\n if (opts.skipWritingToFs) return;\n // if not writeToPath specified, it goes to the default directory. When componentMap exists, the\n // component is not new, and it's ok to override the existing directory.\n if (!opts.writeToPath && componentMap) return;\n // if writeToPath specified and that directory is already used for that component, it's ok to override\n if (opts.writeToPath && componentMap && componentMap.rootDir && componentMap.rootDir === opts.writeToPath) return;\n\n const componentDir = this.consumer.toAbsolutePath(componentDirRelative);\n if (!fs.pathExistsSync(componentDir)) return;\n if (!componentMap) {\n const compInTheSameDir = this.consumer.bitMap.getComponentIdByRootPath(componentDirRelative);\n if (compInTheSameDir) {\n throw new BitError(\n `unable to import to ${componentDir}, the directory is already used by ${compInTheSameDir.toString()}.\neither use --path to specify a different directory or modify \"defaultDirectory\" prop in the workspace.jsonc file to \"{scopeId}/{name}\"`\n );\n }\n }\n if (!isDir(componentDir)) {\n throw new BitError(`unable to import to ${componentDir} because it's a file`);\n }\n if (!isDirEmptySync(componentDir) && opts.throwForExistingDir) {\n throw new BitError(\n `unable to import to ${componentDir}, the directory is not empty. use --override flag to delete the directory and then import`\n );\n }\n }\n\n static slots = [];\n static dependencies = [InstallAspect, CompilerAspect, LoggerAspect, WorkspaceAspect, MoverAspect, ConfigMergerAspect];\n static runtime = MainRuntime;\n static async provider([install, compiler, loggerMain, workspace, mover, configMerger]: [\n InstallMain,\n CompilerMain,\n LoggerMain,\n Workspace,\n MoverMain,\n ConfigMergerMain,\n ]) {\n const logger = loggerMain.createLogger(ComponentWriterAspect.id);\n return new ComponentWriterMain(install, compiler, workspace, logger, mover, configMerger);\n }\n}\n\nComponentWriterAspect.addRuntime(ComponentWriterMain);\n\nexport default ComponentWriterMain;\n\nexport function incrementPathRecursively(p: string, allPaths: string[]) {\n const incrementPath = (str: string, number: number) => `${str}_${number}`;\n let num = 1;\n let newPath = incrementPath(p, num);\n while (allPaths.includes(newPath)) {\n newPath = incrementPath(p, (num += 1));\n }\n return newPath;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAA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UAAU,EAAEhI,SAAS,EAAEE,KAAK,EAAE+H,YAAY,CAOnF,EAAE;IACD,MAAMhI,MAAM,GAAG+H,UAAU,CAACE,YAAY,CAACC,yCAAqB,CAAC3G,EAAE,CAAC;IAChE,OAAO,IAAI5B,mBAAmB,CAACwC,OAAO,EAAErC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAE+H,YAAY,CAAC;EAC3F;AACF;AAACG,OAAA,CAAAxI,mBAAA,GAAAA,mBAAA;AAAAb,eAAA,CA7RYa,mBAAmB,WA+Qf,EAAE;AAAAb,eAAA,CA/QNa,mBAAmB,kBAgRR,CAACyI,wBAAa,EAAEC,0BAAc,EAAEC,sBAAY,EAAEC,4BAAe,EAAEC,oBAAW,EAAEC,kCAAkB,CAAC;AAAA3J,eAAA,CAhR1Ga,mBAAmB,aAiRb+I,kBAAW;AAc9BR,yCAAqB,CAACS,UAAU,CAAChJ,mBAAmB,CAAC;AAAC,IAAAiJ,QAAA,GAAAT,OAAA,CAAA/K,OAAA,GAEvCuC,mBAAmB;AAE3B,SAAS6F,wBAAwBA,CAACqD,CAAS,EAAE9C,QAAkB,EAAE;EACtE,MAAM+C,aAAa,GAAGA,CAACC,GAAW,EAAEC,MAAc,KAAK,GAAGD,GAAG,IAAIC,MAAM,EAAE;EACzE,IAAIC,GAAG,GAAG,CAAC;EACX,IAAIjD,OAAO,GAAG8C,aAAa,CAACD,CAAC,EAAEI,GAAG,CAAC;EACnC,OAAOlD,QAAQ,CAACV,QAAQ,CAACW,OAAO,CAAC,EAAE;IACjCA,OAAO,GAAG8C,aAAa,CAACD,CAAC,EAAGI,GAAG,IAAI,CAAE,CAAC;EACxC;EACA,OAAOjD,OAAO;AAChB","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-writer",
3
- "version": "1.0.504",
3
+ "version": "1.0.506",
4
4
  "homepage": "https://bit.cloud/teambit/component/component-writer",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component-writer",
9
- "version": "1.0.504"
9
+ "version": "1.0.506"
10
10
  },
11
11
  "dependencies": {
12
12
  "fs-extra": "10.0.0",
@@ -16,22 +16,22 @@
16
16
  "@teambit/bit-error": "0.0.404",
17
17
  "@teambit/component-id": "1.2.2",
18
18
  "@teambit/component-version": "1.0.3",
19
- "@teambit/cli": "0.0.1081",
20
- "@teambit/compiler": "1.0.504",
21
- "@teambit/component.sources": "0.0.63",
22
- "@teambit/config-merger": "0.0.371",
23
- "@teambit/install": "1.0.504",
24
- "@teambit/legacy.bit-map": "0.0.68",
19
+ "@teambit/cli": "0.0.1083",
20
+ "@teambit/compiler": "1.0.506",
21
+ "@teambit/component.sources": "0.0.65",
22
+ "@teambit/config-merger": "0.0.373",
23
+ "@teambit/install": "1.0.506",
24
+ "@teambit/legacy.bit-map": "0.0.70",
25
25
  "@teambit/legacy.constants": "0.0.4",
26
- "@teambit/legacy.consumer-component": "0.0.12",
27
- "@teambit/legacy.consumer": "0.0.11",
26
+ "@teambit/legacy.consumer-component": "0.0.14",
27
+ "@teambit/legacy.consumer": "0.0.13",
28
28
  "@teambit/legacy.utils": "0.0.12",
29
- "@teambit/logger": "0.0.1174",
30
- "@teambit/merging": "1.0.504",
31
- "@teambit/mover": "1.0.504",
32
- "@teambit/workspace": "1.0.504",
33
- "@teambit/legacy.scope": "0.0.11",
34
- "@teambit/scope.objects": "0.0.11"
29
+ "@teambit/logger": "0.0.1176",
30
+ "@teambit/merging": "1.0.506",
31
+ "@teambit/mover": "1.0.506",
32
+ "@teambit/workspace": "1.0.506",
33
+ "@teambit/legacy.scope": "0.0.13",
34
+ "@teambit/scope.objects": "0.0.13"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/fs-extra": "9.0.7",