@teambit/component-writer 1.0.491 → 1.0.493

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.491" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/component-writer@1.0.493" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -218,7 +218,7 @@
218
218
  "componentId": {
219
219
  "scope": "teambit.legacy",
220
220
  "name": "consumer",
221
- "version": "0.0.3"
221
+ "version": "0.0.5"
222
222
  }
223
223
  }
224
224
  },
@@ -281,7 +281,7 @@
281
281
  "__schema": "VariableLikeSchema",
282
282
  "location": {
283
283
  "filePath": "component-writer.main.runtime.ts",
284
- "line": 315,
284
+ "line": 314,
285
285
  "character": 3
286
286
  },
287
287
  "signature": "(property) ComponentWriterMain.slots: never[]",
@@ -290,7 +290,7 @@
290
290
  "__schema": "InferenceTypeSchema",
291
291
  "location": {
292
292
  "filePath": "component-writer.main.runtime.ts",
293
- "line": 315,
293
+ "line": 314,
294
294
  "character": 3
295
295
  },
296
296
  "type": "never[]"
@@ -302,7 +302,7 @@
302
302
  "__schema": "VariableLikeSchema",
303
303
  "location": {
304
304
  "filePath": "component-writer.main.runtime.ts",
305
- "line": 316,
305
+ "line": 315,
306
306
  "character": 3
307
307
  },
308
308
  "signature": "(property) ComponentWriterMain.dependencies: Aspect[]",
@@ -311,7 +311,7 @@
311
311
  "__schema": "InferenceTypeSchema",
312
312
  "location": {
313
313
  "filePath": "component-writer.main.runtime.ts",
314
- "line": 316,
314
+ "line": 315,
315
315
  "character": 3
316
316
  },
317
317
  "type": "Aspect[]"
@@ -323,7 +323,7 @@
323
323
  "__schema": "VariableLikeSchema",
324
324
  "location": {
325
325
  "filePath": "component-writer.main.runtime.ts",
326
- "line": 317,
326
+ "line": 316,
327
327
  "character": 3
328
328
  },
329
329
  "signature": "(property) ComponentWriterMain.runtime: RuntimeDefinition",
@@ -332,7 +332,7 @@
332
332
  "__schema": "InferenceTypeSchema",
333
333
  "location": {
334
334
  "filePath": "component-writer.main.runtime.ts",
335
- "line": 317,
335
+ "line": 316,
336
336
  "character": 3
337
337
  },
338
338
  "type": "RuntimeDefinition"
@@ -344,7 +344,7 @@
344
344
  "__schema": "FunctionLikeSchema",
345
345
  "location": {
346
346
  "filePath": "component-writer.main.runtime.ts",
347
- "line": 318,
347
+ "line": 317,
348
348
  "character": 3
349
349
  },
350
350
  "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>",
@@ -354,7 +354,7 @@
354
354
  "__schema": "ParameterSchema",
355
355
  "location": {
356
356
  "filePath": "component-writer.main.runtime.ts",
357
- "line": 318,
357
+ "line": 317,
358
358
  "character": 25
359
359
  },
360
360
  "name": "[ install, compiler, loggerMain, workspace, mover, configMerger ]",
@@ -362,7 +362,7 @@
362
362
  "__schema": "TupleTypeSchema",
363
363
  "location": {
364
364
  "filePath": "component-writer.main.runtime.ts",
365
- "line": 318,
365
+ "line": 317,
366
366
  "character": 90
367
367
  },
368
368
  "elements": [
@@ -370,7 +370,7 @@
370
370
  "__schema": "TypeRefSchema",
371
371
  "location": {
372
372
  "filePath": "component-writer.main.runtime.ts",
373
- "line": 319,
373
+ "line": 318,
374
374
  "character": 5
375
375
  },
376
376
  "name": "InstallMain",
@@ -383,7 +383,7 @@
383
383
  "__schema": "TypeRefSchema",
384
384
  "location": {
385
385
  "filePath": "component-writer.main.runtime.ts",
386
- "line": 320,
386
+ "line": 319,
387
387
  "character": 5
388
388
  },
389
389
  "name": "CompilerMain",
@@ -396,7 +396,7 @@
396
396
  "__schema": "TypeRefSchema",
397
397
  "location": {
398
398
  "filePath": "component-writer.main.runtime.ts",
399
- "line": 321,
399
+ "line": 320,
400
400
  "character": 5
401
401
  },
402
402
  "name": "LoggerMain",
@@ -409,7 +409,7 @@
409
409
  "__schema": "TypeRefSchema",
410
410
  "location": {
411
411
  "filePath": "component-writer.main.runtime.ts",
412
- "line": 322,
412
+ "line": 321,
413
413
  "character": 5
414
414
  },
415
415
  "name": "Workspace",
@@ -422,7 +422,7 @@
422
422
  "__schema": "TypeRefSchema",
423
423
  "location": {
424
424
  "filePath": "component-writer.main.runtime.ts",
425
- "line": 323,
425
+ "line": 322,
426
426
  "character": 5
427
427
  },
428
428
  "name": "MoverMain",
@@ -435,7 +435,7 @@
435
435
  "__schema": "TypeRefSchema",
436
436
  "location": {
437
437
  "filePath": "component-writer.main.runtime.ts",
438
- "line": 324,
438
+ "line": 323,
439
439
  "character": 5
440
440
  },
441
441
  "name": "ConfigMergerMain",
@@ -454,7 +454,7 @@
454
454
  "__schema": "InferenceTypeSchema",
455
455
  "location": {
456
456
  "filePath": "component-writer.main.runtime.ts",
457
- "line": 318,
457
+ "line": 317,
458
458
  "character": 3
459
459
  },
460
460
  "type": "Promise<ComponentWriterMain>"
@@ -609,7 +609,7 @@
609
609
  "componentId": {
610
610
  "scope": "teambit.legacy",
611
611
  "name": "consumer-component",
612
- "version": "0.0.4"
612
+ "version": "0.0.6"
613
613
  }
614
614
  }
615
615
  },
@@ -876,7 +876,7 @@
876
876
  "__schema": "FunctionLikeSchema",
877
877
  "location": {
878
878
  "filePath": "component-writer.main.runtime.ts",
879
- "line": 335,
879
+ "line": 334,
880
880
  "character": 1
881
881
  },
882
882
  "signature": "function incrementPathRecursively(p: string, allPaths: string[]): string",
@@ -886,7 +886,7 @@
886
886
  "__schema": "ParameterSchema",
887
887
  "location": {
888
888
  "filePath": "component-writer.main.runtime.ts",
889
- "line": 335,
889
+ "line": 334,
890
890
  "character": 42
891
891
  },
892
892
  "name": "p",
@@ -894,7 +894,7 @@
894
894
  "__schema": "KeywordTypeSchema",
895
895
  "location": {
896
896
  "filePath": "component-writer.main.runtime.ts",
897
- "line": 335,
897
+ "line": 334,
898
898
  "character": 45
899
899
  },
900
900
  "name": "string"
@@ -906,7 +906,7 @@
906
906
  "__schema": "ParameterSchema",
907
907
  "location": {
908
908
  "filePath": "component-writer.main.runtime.ts",
909
- "line": 335,
909
+ "line": 334,
910
910
  "character": 53
911
911
  },
912
912
  "name": "allPaths",
@@ -914,14 +914,14 @@
914
914
  "__schema": "TypeArraySchema",
915
915
  "location": {
916
916
  "filePath": "component-writer.main.runtime.ts",
917
- "line": 335,
917
+ "line": 334,
918
918
  "character": 63
919
919
  },
920
920
  "type": {
921
921
  "__schema": "KeywordTypeSchema",
922
922
  "location": {
923
923
  "filePath": "component-writer.main.runtime.ts",
924
- "line": 335,
924
+ "line": 334,
925
925
  "character": 63
926
926
  },
927
927
  "name": "string"
@@ -935,7 +935,7 @@
935
935
  "__schema": "InferenceTypeSchema",
936
936
  "location": {
937
937
  "filePath": "component-writer.main.runtime.ts",
938
- "line": 335,
938
+ "line": 334,
939
939
  "character": 1
940
940
  },
941
941
  "type": "string"
@@ -1040,7 +1040,7 @@
1040
1040
  "componentId": {
1041
1041
  "scope": "teambit.legacy",
1042
1042
  "name": "consumer-component",
1043
- "version": "0.0.4"
1043
+ "version": "0.0.6"
1044
1044
  }
1045
1045
  }
1046
1046
  },
@@ -1573,7 +1573,7 @@
1573
1573
  "componentId": {
1574
1574
  "scope": "teambit.legacy",
1575
1575
  "name": "consumer",
1576
- "version": "0.0.3"
1576
+ "version": "0.0.5"
1577
1577
  }
1578
1578
  }
1579
1579
  },
@@ -1636,7 +1636,7 @@
1636
1636
  "__schema": "VariableLikeSchema",
1637
1637
  "location": {
1638
1638
  "filePath": "component-writer.main.runtime.ts",
1639
- "line": 315,
1639
+ "line": 314,
1640
1640
  "character": 3
1641
1641
  },
1642
1642
  "signature": "(property) ComponentWriterMain.slots: never[]",
@@ -1645,7 +1645,7 @@
1645
1645
  "__schema": "InferenceTypeSchema",
1646
1646
  "location": {
1647
1647
  "filePath": "component-writer.main.runtime.ts",
1648
- "line": 315,
1648
+ "line": 314,
1649
1649
  "character": 3
1650
1650
  },
1651
1651
  "type": "never[]"
@@ -1657,7 +1657,7 @@
1657
1657
  "__schema": "VariableLikeSchema",
1658
1658
  "location": {
1659
1659
  "filePath": "component-writer.main.runtime.ts",
1660
- "line": 316,
1660
+ "line": 315,
1661
1661
  "character": 3
1662
1662
  },
1663
1663
  "signature": "(property) ComponentWriterMain.dependencies: Aspect[]",
@@ -1666,7 +1666,7 @@
1666
1666
  "__schema": "InferenceTypeSchema",
1667
1667
  "location": {
1668
1668
  "filePath": "component-writer.main.runtime.ts",
1669
- "line": 316,
1669
+ "line": 315,
1670
1670
  "character": 3
1671
1671
  },
1672
1672
  "type": "Aspect[]"
@@ -1678,7 +1678,7 @@
1678
1678
  "__schema": "VariableLikeSchema",
1679
1679
  "location": {
1680
1680
  "filePath": "component-writer.main.runtime.ts",
1681
- "line": 317,
1681
+ "line": 316,
1682
1682
  "character": 3
1683
1683
  },
1684
1684
  "signature": "(property) ComponentWriterMain.runtime: RuntimeDefinition",
@@ -1687,7 +1687,7 @@
1687
1687
  "__schema": "InferenceTypeSchema",
1688
1688
  "location": {
1689
1689
  "filePath": "component-writer.main.runtime.ts",
1690
- "line": 317,
1690
+ "line": 316,
1691
1691
  "character": 3
1692
1692
  },
1693
1693
  "type": "RuntimeDefinition"
@@ -1699,7 +1699,7 @@
1699
1699
  "__schema": "FunctionLikeSchema",
1700
1700
  "location": {
1701
1701
  "filePath": "component-writer.main.runtime.ts",
1702
- "line": 318,
1702
+ "line": 317,
1703
1703
  "character": 3
1704
1704
  },
1705
1705
  "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>",
@@ -1709,7 +1709,7 @@
1709
1709
  "__schema": "ParameterSchema",
1710
1710
  "location": {
1711
1711
  "filePath": "component-writer.main.runtime.ts",
1712
- "line": 318,
1712
+ "line": 317,
1713
1713
  "character": 25
1714
1714
  },
1715
1715
  "name": "[ install, compiler, loggerMain, workspace, mover, configMerger ]",
@@ -1717,7 +1717,7 @@
1717
1717
  "__schema": "TupleTypeSchema",
1718
1718
  "location": {
1719
1719
  "filePath": "component-writer.main.runtime.ts",
1720
- "line": 318,
1720
+ "line": 317,
1721
1721
  "character": 90
1722
1722
  },
1723
1723
  "elements": [
@@ -1725,7 +1725,7 @@
1725
1725
  "__schema": "TypeRefSchema",
1726
1726
  "location": {
1727
1727
  "filePath": "component-writer.main.runtime.ts",
1728
- "line": 319,
1728
+ "line": 318,
1729
1729
  "character": 5
1730
1730
  },
1731
1731
  "name": "InstallMain",
@@ -1738,7 +1738,7 @@
1738
1738
  "__schema": "TypeRefSchema",
1739
1739
  "location": {
1740
1740
  "filePath": "component-writer.main.runtime.ts",
1741
- "line": 320,
1741
+ "line": 319,
1742
1742
  "character": 5
1743
1743
  },
1744
1744
  "name": "CompilerMain",
@@ -1751,7 +1751,7 @@
1751
1751
  "__schema": "TypeRefSchema",
1752
1752
  "location": {
1753
1753
  "filePath": "component-writer.main.runtime.ts",
1754
- "line": 321,
1754
+ "line": 320,
1755
1755
  "character": 5
1756
1756
  },
1757
1757
  "name": "LoggerMain",
@@ -1764,7 +1764,7 @@
1764
1764
  "__schema": "TypeRefSchema",
1765
1765
  "location": {
1766
1766
  "filePath": "component-writer.main.runtime.ts",
1767
- "line": 322,
1767
+ "line": 321,
1768
1768
  "character": 5
1769
1769
  },
1770
1770
  "name": "Workspace",
@@ -1777,7 +1777,7 @@
1777
1777
  "__schema": "TypeRefSchema",
1778
1778
  "location": {
1779
1779
  "filePath": "component-writer.main.runtime.ts",
1780
- "line": 323,
1780
+ "line": 322,
1781
1781
  "character": 5
1782
1782
  },
1783
1783
  "name": "MoverMain",
@@ -1790,7 +1790,7 @@
1790
1790
  "__schema": "TypeRefSchema",
1791
1791
  "location": {
1792
1792
  "filePath": "component-writer.main.runtime.ts",
1793
- "line": 324,
1793
+ "line": 323,
1794
1794
  "character": 5
1795
1795
  },
1796
1796
  "name": "ConfigMergerMain",
@@ -1809,7 +1809,7 @@
1809
1809
  "__schema": "InferenceTypeSchema",
1810
1810
  "location": {
1811
1811
  "filePath": "component-writer.main.runtime.ts",
1812
- "line": 318,
1812
+ "line": 317,
1813
1813
  "character": 3
1814
1814
  },
1815
1815
  "type": "Promise<ComponentWriterMain>"
@@ -1827,7 +1827,7 @@
1827
1827
  "__schema": "UnImplementedSchema",
1828
1828
  "location": {
1829
1829
  "filePath": "component-writer.main.runtime.ts",
1830
- "line": 333,
1830
+ "line": 332,
1831
1831
  "character": 16
1832
1832
  },
1833
1833
  "name": "ComponentWriterMain",
@@ -1837,7 +1837,7 @@
1837
1837
  "__schema": "FunctionLikeSchema",
1838
1838
  "location": {
1839
1839
  "filePath": "component-writer.main.runtime.ts",
1840
- "line": 335,
1840
+ "line": 334,
1841
1841
  "character": 1
1842
1842
  },
1843
1843
  "signature": "function incrementPathRecursively(p: string, allPaths: string[]): string",
@@ -1847,7 +1847,7 @@
1847
1847
  "__schema": "ParameterSchema",
1848
1848
  "location": {
1849
1849
  "filePath": "component-writer.main.runtime.ts",
1850
- "line": 335,
1850
+ "line": 334,
1851
1851
  "character": 42
1852
1852
  },
1853
1853
  "name": "p",
@@ -1855,7 +1855,7 @@
1855
1855
  "__schema": "KeywordTypeSchema",
1856
1856
  "location": {
1857
1857
  "filePath": "component-writer.main.runtime.ts",
1858
- "line": 335,
1858
+ "line": 334,
1859
1859
  "character": 45
1860
1860
  },
1861
1861
  "name": "string"
@@ -1867,7 +1867,7 @@
1867
1867
  "__schema": "ParameterSchema",
1868
1868
  "location": {
1869
1869
  "filePath": "component-writer.main.runtime.ts",
1870
- "line": 335,
1870
+ "line": 334,
1871
1871
  "character": 53
1872
1872
  },
1873
1873
  "name": "allPaths",
@@ -1875,14 +1875,14 @@
1875
1875
  "__schema": "TypeArraySchema",
1876
1876
  "location": {
1877
1877
  "filePath": "component-writer.main.runtime.ts",
1878
- "line": 335,
1878
+ "line": 334,
1879
1879
  "character": 63
1880
1880
  },
1881
1881
  "type": {
1882
1882
  "__schema": "KeywordTypeSchema",
1883
1883
  "location": {
1884
1884
  "filePath": "component-writer.main.runtime.ts",
1885
- "line": 335,
1885
+ "line": 334,
1886
1886
  "character": 63
1887
1887
  },
1888
1888
  "name": "string"
@@ -1896,7 +1896,7 @@
1896
1896
  "__schema": "InferenceTypeSchema",
1897
1897
  "location": {
1898
1898
  "filePath": "component-writer.main.runtime.ts",
1899
- "line": 335,
1899
+ "line": 334,
1900
1900
  "character": 1
1901
1901
  },
1902
1902
  "type": "string"
@@ -1911,7 +1911,7 @@
1911
1911
  "__schema": "UnImplementedSchema",
1912
1912
  "location": {
1913
1913
  "filePath": "component-writer.main.runtime.ts",
1914
- "line": 331,
1914
+ "line": 330,
1915
1915
  "character": 1
1916
1916
  },
1917
1917
  "name": "ComponentWriterAspect.addRuntime(ComponentWriterMain);",
@@ -1960,7 +1960,7 @@
1960
1960
  "componentId": {
1961
1961
  "scope": "teambit.component",
1962
1962
  "name": "component-writer",
1963
- "version": "1.0.491"
1963
+ "version": "1.0.493"
1964
1964
  },
1965
1965
  "taggedModuleExports": []
1966
1966
  }
@@ -316,7 +316,6 @@ class ComponentWriterMain {
316
316
  };
317
317
  return _objectSpread({
318
318
  workspace: this.workspace,
319
- // @ts-ignore todo: remove after deleting teambit.legacy
320
319
  bitMap: this.consumer.bitMap,
321
320
  component,
322
321
  writeToPath: componentRootDir,
@@ -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 // @ts-ignore todo: remove after deleting teambit.legacy\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,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;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAA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AAAAvJ,eAAA,CAxQ1Ga,mBAAmB,aAyQb2I,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","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,KA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AAE;IACjCA,OAAO,GAAG0C,aAAa,CAACD,CAAC,EAAGI,GAAG,IAAI,CAAE,CAAC;EACxC;EACA,OAAO7C,OAAO;AAChB","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-writer",
3
- "version": "1.0.491",
3
+ "version": "1.0.493",
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.491"
9
+ "version": "1.0.493"
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.1068",
20
- "@teambit/compiler": "1.0.491",
21
- "@teambit/component.sources": "0.0.55",
22
- "@teambit/config-merger": "0.0.358",
23
- "@teambit/install": "1.0.491",
24
- "@teambit/legacy.bit-map": "0.0.60",
25
- "@teambit/legacy.constants": "0.0.2",
26
- "@teambit/legacy.consumer-component": "0.0.4",
27
- "@teambit/legacy.consumer": "0.0.3",
28
- "@teambit/legacy.utils": "0.0.9",
29
- "@teambit/logger": "0.0.1161",
30
- "@teambit/merging": "1.0.491",
31
- "@teambit/mover": "1.0.491",
32
- "@teambit/workspace": "1.0.491",
33
- "@teambit/legacy.scope": "0.0.3",
34
- "@teambit/scope.objects": "0.0.3"
19
+ "@teambit/cli": "0.0.1070",
20
+ "@teambit/compiler": "1.0.493",
21
+ "@teambit/component.sources": "0.0.57",
22
+ "@teambit/config-merger": "0.0.360",
23
+ "@teambit/install": "1.0.493",
24
+ "@teambit/legacy.bit-map": "0.0.62",
25
+ "@teambit/legacy.constants": "0.0.3",
26
+ "@teambit/legacy.consumer-component": "0.0.6",
27
+ "@teambit/legacy.consumer": "0.0.5",
28
+ "@teambit/legacy.utils": "0.0.11",
29
+ "@teambit/logger": "0.0.1163",
30
+ "@teambit/merging": "1.0.493",
31
+ "@teambit/mover": "1.0.493",
32
+ "@teambit/workspace": "1.0.493",
33
+ "@teambit/legacy.scope": "0.0.5",
34
+ "@teambit/scope.objects": "0.0.5"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/fs-extra": "9.0.7",