@teambit/component-writer 1.0.227 → 1.0.229
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.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/schema.json +135 -29
- package/dist/component-writer.aspect.d.ts +2 -0
- package/dist/component-writer.d.ts +56 -0
- package/dist/component-writer.main.runtime.d.ts +72 -0
- package/dist/index.d.ts +5 -0
- package/package.json +10 -10
- package/tsconfig.json +1 -25
- /package/dist/{preview-1712719054377.js → preview-1712822929999.js} +0 -0
|
@@ -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.
|
|
3
|
+
<testsuite name="teambit.component/component-writer@1.0.229" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
package/artifacts/schema.json
CHANGED
|
@@ -48,7 +48,11 @@
|
|
|
48
48
|
"line": 45,
|
|
49
49
|
"character": 24
|
|
50
50
|
},
|
|
51
|
-
"name": "InstallMain"
|
|
51
|
+
"name": "InstallMain",
|
|
52
|
+
"componentId": {
|
|
53
|
+
"scope": "teambit.workspace",
|
|
54
|
+
"name": "install"
|
|
55
|
+
}
|
|
52
56
|
},
|
|
53
57
|
"isOptional": false,
|
|
54
58
|
"isSpread": false
|
|
@@ -68,7 +72,11 @@
|
|
|
68
72
|
"line": 46,
|
|
69
73
|
"character": 23
|
|
70
74
|
},
|
|
71
|
-
"name": "CompilerMain"
|
|
75
|
+
"name": "CompilerMain",
|
|
76
|
+
"componentId": {
|
|
77
|
+
"scope": "teambit.compilation",
|
|
78
|
+
"name": "compiler"
|
|
79
|
+
}
|
|
72
80
|
},
|
|
73
81
|
"isOptional": false,
|
|
74
82
|
"isSpread": false
|
|
@@ -88,7 +96,11 @@
|
|
|
88
96
|
"line": 47,
|
|
89
97
|
"character": 24
|
|
90
98
|
},
|
|
91
|
-
"name": "Workspace"
|
|
99
|
+
"name": "Workspace",
|
|
100
|
+
"componentId": {
|
|
101
|
+
"scope": "teambit.workspace",
|
|
102
|
+
"name": "workspace"
|
|
103
|
+
}
|
|
92
104
|
},
|
|
93
105
|
"isOptional": false,
|
|
94
106
|
"isSpread": false
|
|
@@ -108,7 +120,11 @@
|
|
|
108
120
|
"line": 48,
|
|
109
121
|
"character": 21
|
|
110
122
|
},
|
|
111
|
-
"name": "Logger"
|
|
123
|
+
"name": "Logger",
|
|
124
|
+
"componentId": {
|
|
125
|
+
"scope": "teambit.harmony",
|
|
126
|
+
"name": "logger"
|
|
127
|
+
}
|
|
112
128
|
},
|
|
113
129
|
"isOptional": false,
|
|
114
130
|
"isSpread": false
|
|
@@ -128,7 +144,11 @@
|
|
|
128
144
|
"line": 49,
|
|
129
145
|
"character": 20
|
|
130
146
|
},
|
|
131
|
-
"name": "MoverMain"
|
|
147
|
+
"name": "MoverMain",
|
|
148
|
+
"componentId": {
|
|
149
|
+
"scope": "teambit.component",
|
|
150
|
+
"name": "mover"
|
|
151
|
+
}
|
|
132
152
|
},
|
|
133
153
|
"isOptional": false,
|
|
134
154
|
"isSpread": false
|
|
@@ -148,7 +168,11 @@
|
|
|
148
168
|
"line": 50,
|
|
149
169
|
"character": 26
|
|
150
170
|
},
|
|
151
|
-
"name": "ConfigMergerMain"
|
|
171
|
+
"name": "ConfigMergerMain",
|
|
172
|
+
"componentId": {
|
|
173
|
+
"scope": "teambit.workspace",
|
|
174
|
+
"name": "config-merger"
|
|
175
|
+
}
|
|
152
176
|
},
|
|
153
177
|
"isOptional": false,
|
|
154
178
|
"isSpread": false
|
|
@@ -336,7 +360,11 @@
|
|
|
336
360
|
"line": 292,
|
|
337
361
|
"character": 5
|
|
338
362
|
},
|
|
339
|
-
"name": "InstallMain"
|
|
363
|
+
"name": "InstallMain",
|
|
364
|
+
"componentId": {
|
|
365
|
+
"scope": "teambit.workspace",
|
|
366
|
+
"name": "install"
|
|
367
|
+
}
|
|
340
368
|
},
|
|
341
369
|
{
|
|
342
370
|
"__schema": "TypeRefSchema",
|
|
@@ -345,7 +373,11 @@
|
|
|
345
373
|
"line": 293,
|
|
346
374
|
"character": 5
|
|
347
375
|
},
|
|
348
|
-
"name": "CompilerMain"
|
|
376
|
+
"name": "CompilerMain",
|
|
377
|
+
"componentId": {
|
|
378
|
+
"scope": "teambit.compilation",
|
|
379
|
+
"name": "compiler"
|
|
380
|
+
}
|
|
349
381
|
},
|
|
350
382
|
{
|
|
351
383
|
"__schema": "TypeRefSchema",
|
|
@@ -354,7 +386,11 @@
|
|
|
354
386
|
"line": 294,
|
|
355
387
|
"character": 5
|
|
356
388
|
},
|
|
357
|
-
"name": "LoggerMain"
|
|
389
|
+
"name": "LoggerMain",
|
|
390
|
+
"componentId": {
|
|
391
|
+
"scope": "teambit.harmony",
|
|
392
|
+
"name": "logger"
|
|
393
|
+
}
|
|
358
394
|
},
|
|
359
395
|
{
|
|
360
396
|
"__schema": "TypeRefSchema",
|
|
@@ -363,7 +399,11 @@
|
|
|
363
399
|
"line": 295,
|
|
364
400
|
"character": 5
|
|
365
401
|
},
|
|
366
|
-
"name": "Workspace"
|
|
402
|
+
"name": "Workspace",
|
|
403
|
+
"componentId": {
|
|
404
|
+
"scope": "teambit.workspace",
|
|
405
|
+
"name": "workspace"
|
|
406
|
+
}
|
|
367
407
|
},
|
|
368
408
|
{
|
|
369
409
|
"__schema": "TypeRefSchema",
|
|
@@ -372,7 +412,11 @@
|
|
|
372
412
|
"line": 296,
|
|
373
413
|
"character": 5
|
|
374
414
|
},
|
|
375
|
-
"name": "MoverMain"
|
|
415
|
+
"name": "MoverMain",
|
|
416
|
+
"componentId": {
|
|
417
|
+
"scope": "teambit.component",
|
|
418
|
+
"name": "mover"
|
|
419
|
+
}
|
|
376
420
|
},
|
|
377
421
|
{
|
|
378
422
|
"__schema": "TypeRefSchema",
|
|
@@ -381,7 +425,11 @@
|
|
|
381
425
|
"line": 297,
|
|
382
426
|
"character": 5
|
|
383
427
|
},
|
|
384
|
-
"name": "ConfigMergerMain"
|
|
428
|
+
"name": "ConfigMergerMain",
|
|
429
|
+
"componentId": {
|
|
430
|
+
"scope": "teambit.workspace",
|
|
431
|
+
"name": "config-merger"
|
|
432
|
+
}
|
|
385
433
|
}
|
|
386
434
|
]
|
|
387
435
|
},
|
|
@@ -480,7 +528,11 @@
|
|
|
480
528
|
"line": 40,
|
|
481
529
|
"character": 33
|
|
482
530
|
},
|
|
483
|
-
"name": "WorkspaceConfigUpdateResult"
|
|
531
|
+
"name": "WorkspaceConfigUpdateResult",
|
|
532
|
+
"componentId": {
|
|
533
|
+
"scope": "teambit.workspace",
|
|
534
|
+
"name": "config-merger"
|
|
535
|
+
}
|
|
484
536
|
},
|
|
485
537
|
"isOptional": true
|
|
486
538
|
}
|
|
@@ -520,7 +572,8 @@
|
|
|
520
572
|
"line": 23,
|
|
521
573
|
"character": 15
|
|
522
574
|
},
|
|
523
|
-
"name": "ConsumerComponent"
|
|
575
|
+
"name": "ConsumerComponent",
|
|
576
|
+
"packageName": "@teambit/legacy/dist/consumer/component"
|
|
524
577
|
}
|
|
525
578
|
},
|
|
526
579
|
"isOptional": false
|
|
@@ -901,7 +954,8 @@
|
|
|
901
954
|
"line": 23,
|
|
902
955
|
"character": 15
|
|
903
956
|
},
|
|
904
|
-
"name": "ConsumerComponent"
|
|
957
|
+
"name": "ConsumerComponent",
|
|
958
|
+
"packageName": "@teambit/legacy/dist/consumer/component"
|
|
905
959
|
}
|
|
906
960
|
},
|
|
907
961
|
"isOptional": false
|
|
@@ -1202,7 +1256,11 @@
|
|
|
1202
1256
|
"line": 40,
|
|
1203
1257
|
"character": 33
|
|
1204
1258
|
},
|
|
1205
|
-
"name": "WorkspaceConfigUpdateResult"
|
|
1259
|
+
"name": "WorkspaceConfigUpdateResult",
|
|
1260
|
+
"componentId": {
|
|
1261
|
+
"scope": "teambit.workspace",
|
|
1262
|
+
"name": "config-merger"
|
|
1263
|
+
}
|
|
1206
1264
|
},
|
|
1207
1265
|
"isOptional": true
|
|
1208
1266
|
}
|
|
@@ -1244,7 +1302,11 @@
|
|
|
1244
1302
|
"line": 45,
|
|
1245
1303
|
"character": 24
|
|
1246
1304
|
},
|
|
1247
|
-
"name": "InstallMain"
|
|
1305
|
+
"name": "InstallMain",
|
|
1306
|
+
"componentId": {
|
|
1307
|
+
"scope": "teambit.workspace",
|
|
1308
|
+
"name": "install"
|
|
1309
|
+
}
|
|
1248
1310
|
},
|
|
1249
1311
|
"isOptional": false,
|
|
1250
1312
|
"isSpread": false
|
|
@@ -1264,7 +1326,11 @@
|
|
|
1264
1326
|
"line": 46,
|
|
1265
1327
|
"character": 23
|
|
1266
1328
|
},
|
|
1267
|
-
"name": "CompilerMain"
|
|
1329
|
+
"name": "CompilerMain",
|
|
1330
|
+
"componentId": {
|
|
1331
|
+
"scope": "teambit.compilation",
|
|
1332
|
+
"name": "compiler"
|
|
1333
|
+
}
|
|
1268
1334
|
},
|
|
1269
1335
|
"isOptional": false,
|
|
1270
1336
|
"isSpread": false
|
|
@@ -1284,7 +1350,11 @@
|
|
|
1284
1350
|
"line": 47,
|
|
1285
1351
|
"character": 24
|
|
1286
1352
|
},
|
|
1287
|
-
"name": "Workspace"
|
|
1353
|
+
"name": "Workspace",
|
|
1354
|
+
"componentId": {
|
|
1355
|
+
"scope": "teambit.workspace",
|
|
1356
|
+
"name": "workspace"
|
|
1357
|
+
}
|
|
1288
1358
|
},
|
|
1289
1359
|
"isOptional": false,
|
|
1290
1360
|
"isSpread": false
|
|
@@ -1304,7 +1374,11 @@
|
|
|
1304
1374
|
"line": 48,
|
|
1305
1375
|
"character": 21
|
|
1306
1376
|
},
|
|
1307
|
-
"name": "Logger"
|
|
1377
|
+
"name": "Logger",
|
|
1378
|
+
"componentId": {
|
|
1379
|
+
"scope": "teambit.harmony",
|
|
1380
|
+
"name": "logger"
|
|
1381
|
+
}
|
|
1308
1382
|
},
|
|
1309
1383
|
"isOptional": false,
|
|
1310
1384
|
"isSpread": false
|
|
@@ -1324,7 +1398,11 @@
|
|
|
1324
1398
|
"line": 49,
|
|
1325
1399
|
"character": 20
|
|
1326
1400
|
},
|
|
1327
|
-
"name": "MoverMain"
|
|
1401
|
+
"name": "MoverMain",
|
|
1402
|
+
"componentId": {
|
|
1403
|
+
"scope": "teambit.component",
|
|
1404
|
+
"name": "mover"
|
|
1405
|
+
}
|
|
1328
1406
|
},
|
|
1329
1407
|
"isOptional": false,
|
|
1330
1408
|
"isSpread": false
|
|
@@ -1344,7 +1422,11 @@
|
|
|
1344
1422
|
"line": 50,
|
|
1345
1423
|
"character": 26
|
|
1346
1424
|
},
|
|
1347
|
-
"name": "ConfigMergerMain"
|
|
1425
|
+
"name": "ConfigMergerMain",
|
|
1426
|
+
"componentId": {
|
|
1427
|
+
"scope": "teambit.workspace",
|
|
1428
|
+
"name": "config-merger"
|
|
1429
|
+
}
|
|
1348
1430
|
},
|
|
1349
1431
|
"isOptional": false,
|
|
1350
1432
|
"isSpread": false
|
|
@@ -1532,7 +1614,11 @@
|
|
|
1532
1614
|
"line": 292,
|
|
1533
1615
|
"character": 5
|
|
1534
1616
|
},
|
|
1535
|
-
"name": "InstallMain"
|
|
1617
|
+
"name": "InstallMain",
|
|
1618
|
+
"componentId": {
|
|
1619
|
+
"scope": "teambit.workspace",
|
|
1620
|
+
"name": "install"
|
|
1621
|
+
}
|
|
1536
1622
|
},
|
|
1537
1623
|
{
|
|
1538
1624
|
"__schema": "TypeRefSchema",
|
|
@@ -1541,7 +1627,11 @@
|
|
|
1541
1627
|
"line": 293,
|
|
1542
1628
|
"character": 5
|
|
1543
1629
|
},
|
|
1544
|
-
"name": "CompilerMain"
|
|
1630
|
+
"name": "CompilerMain",
|
|
1631
|
+
"componentId": {
|
|
1632
|
+
"scope": "teambit.compilation",
|
|
1633
|
+
"name": "compiler"
|
|
1634
|
+
}
|
|
1545
1635
|
},
|
|
1546
1636
|
{
|
|
1547
1637
|
"__schema": "TypeRefSchema",
|
|
@@ -1550,7 +1640,11 @@
|
|
|
1550
1640
|
"line": 294,
|
|
1551
1641
|
"character": 5
|
|
1552
1642
|
},
|
|
1553
|
-
"name": "LoggerMain"
|
|
1643
|
+
"name": "LoggerMain",
|
|
1644
|
+
"componentId": {
|
|
1645
|
+
"scope": "teambit.harmony",
|
|
1646
|
+
"name": "logger"
|
|
1647
|
+
}
|
|
1554
1648
|
},
|
|
1555
1649
|
{
|
|
1556
1650
|
"__schema": "TypeRefSchema",
|
|
@@ -1559,7 +1653,11 @@
|
|
|
1559
1653
|
"line": 295,
|
|
1560
1654
|
"character": 5
|
|
1561
1655
|
},
|
|
1562
|
-
"name": "Workspace"
|
|
1656
|
+
"name": "Workspace",
|
|
1657
|
+
"componentId": {
|
|
1658
|
+
"scope": "teambit.workspace",
|
|
1659
|
+
"name": "workspace"
|
|
1660
|
+
}
|
|
1563
1661
|
},
|
|
1564
1662
|
{
|
|
1565
1663
|
"__schema": "TypeRefSchema",
|
|
@@ -1568,7 +1666,11 @@
|
|
|
1568
1666
|
"line": 296,
|
|
1569
1667
|
"character": 5
|
|
1570
1668
|
},
|
|
1571
|
-
"name": "MoverMain"
|
|
1669
|
+
"name": "MoverMain",
|
|
1670
|
+
"componentId": {
|
|
1671
|
+
"scope": "teambit.component",
|
|
1672
|
+
"name": "mover"
|
|
1673
|
+
}
|
|
1572
1674
|
},
|
|
1573
1675
|
{
|
|
1574
1676
|
"__schema": "TypeRefSchema",
|
|
@@ -1577,7 +1679,11 @@
|
|
|
1577
1679
|
"line": 297,
|
|
1578
1680
|
"character": 5
|
|
1579
1681
|
},
|
|
1580
|
-
"name": "ConfigMergerMain"
|
|
1682
|
+
"name": "ConfigMergerMain",
|
|
1683
|
+
"componentId": {
|
|
1684
|
+
"scope": "teambit.workspace",
|
|
1685
|
+
"name": "config-merger"
|
|
1686
|
+
}
|
|
1581
1687
|
}
|
|
1582
1688
|
]
|
|
1583
1689
|
},
|
|
@@ -1740,7 +1846,7 @@
|
|
|
1740
1846
|
"componentId": {
|
|
1741
1847
|
"scope": "teambit.component",
|
|
1742
1848
|
"name": "component-writer",
|
|
1743
|
-
"version": "1.0.
|
|
1849
|
+
"version": "1.0.229"
|
|
1744
1850
|
},
|
|
1745
1851
|
"taggedModuleExports": []
|
|
1746
1852
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ComponentIdList } from '@teambit/component-id';
|
|
2
|
+
import { Scope } from '@teambit/legacy/dist/scope';
|
|
3
|
+
import { PathLinuxRelative } from '@teambit/legacy/dist/utils/path';
|
|
4
|
+
import BitMap from '@teambit/legacy/dist/consumer/bit-map/bit-map';
|
|
5
|
+
import ComponentMap from '@teambit/legacy/dist/consumer/bit-map/component-map';
|
|
6
|
+
import Component from '@teambit/legacy/dist/consumer/component/consumer-component';
|
|
7
|
+
import Consumer from '@teambit/legacy/dist/consumer/consumer';
|
|
8
|
+
import { Workspace } from '@teambit/workspace';
|
|
9
|
+
export type ComponentWriterProps = {
|
|
10
|
+
component: Component;
|
|
11
|
+
writeToPath: PathLinuxRelative;
|
|
12
|
+
writeConfig?: boolean;
|
|
13
|
+
writePackageJson?: boolean;
|
|
14
|
+
override?: boolean;
|
|
15
|
+
isolated?: boolean;
|
|
16
|
+
workspace: Workspace;
|
|
17
|
+
scope?: Scope | undefined;
|
|
18
|
+
bitMap: BitMap;
|
|
19
|
+
ignoreBitDependencies?: boolean | ComponentIdList;
|
|
20
|
+
deleteBitDirContent?: boolean;
|
|
21
|
+
existingComponentMap?: ComponentMap;
|
|
22
|
+
skipUpdatingBitMap?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export default class ComponentWriter {
|
|
25
|
+
component: Component;
|
|
26
|
+
writeToPath: PathLinuxRelative;
|
|
27
|
+
writeConfig?: boolean;
|
|
28
|
+
writePackageJson?: boolean;
|
|
29
|
+
override: boolean;
|
|
30
|
+
isolated?: boolean;
|
|
31
|
+
consumer: Consumer | undefined;
|
|
32
|
+
workspace: Workspace;
|
|
33
|
+
scope?: Scope | undefined;
|
|
34
|
+
bitMap: BitMap;
|
|
35
|
+
ignoreBitDependencies: boolean | ComponentIdList;
|
|
36
|
+
deleteBitDirContent: boolean | undefined;
|
|
37
|
+
existingComponentMap: ComponentMap | undefined;
|
|
38
|
+
skipUpdatingBitMap?: boolean;
|
|
39
|
+
constructor({ component, writeToPath, writeConfig, writePackageJson, override, isolated, workspace, scope, bitMap, ignoreBitDependencies, deleteBitDirContent, existingComponentMap, skipUpdatingBitMap, }: ComponentWriterProps);
|
|
40
|
+
/**
|
|
41
|
+
* write the component to the filesystem and update .bitmap with the details.
|
|
42
|
+
*
|
|
43
|
+
* bitMap gets updated before writing the files to the filesystem, because as part of writing the
|
|
44
|
+
* package-json file, the componentMap is needed to be stored with the updated version.
|
|
45
|
+
*
|
|
46
|
+
* when a component is not new, write the files according to the paths in .bitmap.
|
|
47
|
+
*/
|
|
48
|
+
write(): Promise<Component>;
|
|
49
|
+
populateComponentsFilesToWrite(): Promise<Component>;
|
|
50
|
+
private throwForImportingLegacyIntoHarmony;
|
|
51
|
+
populateFilesToWriteToComponentDir(): Promise<void>;
|
|
52
|
+
addComponentToBitMap(rootDir: string): Promise<ComponentMap>;
|
|
53
|
+
private replaceSnapWithTagIfNeeded;
|
|
54
|
+
_updateComponentRootPathAccordingToBitMap(): void;
|
|
55
|
+
_updateFilesBasePaths(): void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CompilerMain } from '@teambit/compiler';
|
|
2
|
+
import { InstallMain } from '@teambit/install';
|
|
3
|
+
import { Logger, LoggerMain } from '@teambit/logger';
|
|
4
|
+
import { Workspace } from '@teambit/workspace';
|
|
5
|
+
import { MoverMain } from '@teambit/mover';
|
|
6
|
+
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
|
|
7
|
+
import { ConfigMergerMain, WorkspaceConfigUpdateResult } from '@teambit/config-merger';
|
|
8
|
+
import Consumer from '@teambit/legacy/dist/consumer/consumer';
|
|
9
|
+
export interface ManyComponentsWriterParams {
|
|
10
|
+
components: ConsumerComponent[];
|
|
11
|
+
writeToPath?: string;
|
|
12
|
+
throwForExistingDir?: boolean;
|
|
13
|
+
writeConfig?: boolean;
|
|
14
|
+
skipDependencyInstallation?: boolean;
|
|
15
|
+
verbose?: boolean;
|
|
16
|
+
resetConfig?: boolean;
|
|
17
|
+
skipWritingToFs?: boolean;
|
|
18
|
+
skipUpdatingBitMap?: boolean;
|
|
19
|
+
skipWriteConfigFiles?: boolean;
|
|
20
|
+
reasonForBitmapChange?: string;
|
|
21
|
+
shouldUpdateWorkspaceConfig?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export type ComponentWriterResults = {
|
|
24
|
+
installationError?: Error;
|
|
25
|
+
compilationError?: Error;
|
|
26
|
+
workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;
|
|
27
|
+
};
|
|
28
|
+
export declare class ComponentWriterMain {
|
|
29
|
+
private installer;
|
|
30
|
+
private compiler;
|
|
31
|
+
private workspace;
|
|
32
|
+
private logger;
|
|
33
|
+
private mover;
|
|
34
|
+
private configMerge;
|
|
35
|
+
constructor(installer: InstallMain, compiler: CompilerMain, workspace: Workspace, logger: Logger, mover: MoverMain, configMerge: ConfigMergerMain);
|
|
36
|
+
get consumer(): Consumer;
|
|
37
|
+
writeMany(opts: ManyComponentsWriterParams): Promise<ComponentWriterResults>;
|
|
38
|
+
private installPackagesGracefully;
|
|
39
|
+
private compileGracefully;
|
|
40
|
+
private persistComponentsData;
|
|
41
|
+
private populateComponentsFilesToWrite;
|
|
42
|
+
/**
|
|
43
|
+
* this started to be an issue once same-name different-scope is supported.
|
|
44
|
+
* by default, the component-dir consist of the scope-name part of the scope-id, without the owner part.
|
|
45
|
+
* as a result, it's possible that multiple components have the same name, same scope-name but different owner.
|
|
46
|
+
* e.g. org1.ui/button and org2.ui/button. the component-dir for both is "ui/button".
|
|
47
|
+
* in this case, we try to prefix the component-dir with the owner-name and if not possible, just increment it (ui/button_1)
|
|
48
|
+
*/
|
|
49
|
+
private fixDirsIfEqual;
|
|
50
|
+
/**
|
|
51
|
+
* e.g. [bar, bar/foo] => [bar_1, bar/foo]
|
|
52
|
+
* otherwise, the bar/foo component will be saved inside "bar" component.
|
|
53
|
+
* in case bar_1 is taken, increment to bar_2 until the name is available.
|
|
54
|
+
*/
|
|
55
|
+
private fixDirsIfNested;
|
|
56
|
+
private getWriteParamsOfOneComponent;
|
|
57
|
+
private moveComponentsIfNeeded;
|
|
58
|
+
private throwErrorWhenDirectoryNotEmpty;
|
|
59
|
+
static slots: never[];
|
|
60
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
61
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
62
|
+
static provider([install, compiler, loggerMain, workspace, mover, configMerger]: [
|
|
63
|
+
InstallMain,
|
|
64
|
+
CompilerMain,
|
|
65
|
+
LoggerMain,
|
|
66
|
+
Workspace,
|
|
67
|
+
MoverMain,
|
|
68
|
+
ConfigMergerMain
|
|
69
|
+
]): Promise<ComponentWriterMain>;
|
|
70
|
+
}
|
|
71
|
+
export default ComponentWriterMain;
|
|
72
|
+
export declare function incrementPathRecursively(p: string, allPaths: string[]): string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentWriterAspect } from './component-writer.aspect';
|
|
2
|
+
export type { ComponentWriterMain, ComponentWriterResults, ManyComponentsWriterParams, } from './component-writer.main.runtime';
|
|
3
|
+
export { incrementPathRecursively } from './component-writer.main.runtime';
|
|
4
|
+
export default ComponentWriterAspect;
|
|
5
|
+
export { ComponentWriterAspect };
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-writer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.229",
|
|
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.
|
|
9
|
+
"version": "1.0.229"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
"@teambit/bit-error": "0.0.404",
|
|
17
17
|
"@teambit/component-id": "1.2.0",
|
|
18
18
|
"@teambit/component-version": "1.0.3",
|
|
19
|
-
"@teambit/cli": "0.0.
|
|
20
|
-
"@teambit/compiler": "1.0.
|
|
21
|
-
"@teambit/config-merger": "0.0.
|
|
22
|
-
"@teambit/install": "1.0.
|
|
23
|
-
"@teambit/logger": "0.0.
|
|
24
|
-
"@teambit/mover": "1.0.
|
|
25
|
-
"@teambit/workspace": "1.0.
|
|
19
|
+
"@teambit/cli": "0.0.862",
|
|
20
|
+
"@teambit/compiler": "1.0.229",
|
|
21
|
+
"@teambit/config-merger": "0.0.96",
|
|
22
|
+
"@teambit/install": "1.0.229",
|
|
23
|
+
"@teambit/logger": "0.0.955",
|
|
24
|
+
"@teambit/mover": "1.0.229",
|
|
25
|
+
"@teambit/workspace": "1.0.229"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/fs-extra": "9.0.7",
|
|
29
29
|
"@types/lodash": "4.14.165",
|
|
30
30
|
"@types/mocha": "9.1.0",
|
|
31
31
|
"chai": "4.3.0",
|
|
32
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
32
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@teambit/legacy": "1.0.624"
|
package/tsconfig.json
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
24
|
-
"composite": true
|
|
23
|
+
"noImplicitAny": false
|
|
25
24
|
},
|
|
26
25
|
"exclude": [
|
|
27
26
|
"artifacts",
|
|
@@ -36,28 +35,5 @@
|
|
|
36
35
|
"include": [
|
|
37
36
|
"**/*",
|
|
38
37
|
"**/*.json"
|
|
39
|
-
],
|
|
40
|
-
"references": [
|
|
41
|
-
{
|
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_compiler@1.0.227"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_config-merger@0.0.94"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_install@1.0.227"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_mover@1.0.227"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
61
|
-
}
|
|
62
38
|
]
|
|
63
39
|
}
|
|
File without changes
|