@teambit/workspace-config-files 1.0.225 → 1.0.227
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 +3 -3
- package/artifacts/schema.json +51 -169
- package/dist/{preview-1712546198033.js → preview-1712719054377.js} +1 -1
- package/package.json +7 -7
- package/tsconfig.json +16 -1
- package/dist/config-writer-entry.d.ts +0 -129
- package/dist/config-writer-list.d.ts +0 -41
- package/dist/dedup-paths.d.ts +0 -29
- package/dist/dedup-paths.spec.d.ts +0 -1
- package/dist/exceptions/write-failed.d.ts +0 -4
- package/dist/index.d.ts +0 -8
- package/dist/outputs/format-clean-output.d.ts +0 -2
- package/dist/outputs/format-list-output.d.ts +0 -2
- package/dist/outputs/format-write-output.d.ts +0 -3
- package/dist/outputs/index.d.ts +0 -4
- package/dist/outputs/verbose-format-write-output.d.ts +0 -3
- package/dist/outputs/write-outputs-texts.d.ts +0 -2
- package/dist/workspace-config-env-type.d.ts +0 -7
- package/dist/workspace-config-files.aspect.d.ts +0 -2
- package/dist/workspace-config-files.main.runtime.d.ts +0 -140
- package/dist/workspace-config-files.service.d.ts +0 -18
- package/dist/writers/extending-config-files.d.ts +0 -18
- package/dist/writers/index.d.ts +0 -4
- package/dist/writers/real-config-files.d.ts +0 -14
- package/dist/ws-config.cmd.d.ts +0 -61
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="6" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.workspace/workspace-config-files@1.0.
|
|
4
|
-
<testcase classname="dist/dedup-paths.spec.js" name="should reduce files to minimum necessary" time="0.
|
|
3
|
+
<testsuite name="teambit.workspace/workspace-config-files@1.0.227" tests="6" failures="0" errors="0" skipped="0">
|
|
4
|
+
<testcase classname="dist/dedup-paths.spec.js" name="should reduce files to minimum necessary" time="0.001"/>
|
|
5
5
|
<testcase classname="dist/dedup-paths.spec.js" name="should place files in correct folders"/>
|
|
6
6
|
<testcase classname="dist/dedup-paths.spec.js" name="should reduce files to minimum necessary"/>
|
|
7
|
-
<testcase classname="dist/dedup-paths.spec.js" name="should place files in correct folders"/>
|
|
7
|
+
<testcase classname="dist/dedup-paths.spec.js" name="should place files in correct folders" time="0.001"/>
|
|
8
8
|
<testcase classname="dist/dedup-paths.spec.js" name="should reduce files to minimum necessary"/>
|
|
9
9
|
<testcase classname="dist/dedup-paths.spec.js" name="should place files in correct folders"/>
|
|
10
10
|
</testsuite>
|
package/artifacts/schema.json
CHANGED
|
@@ -48,11 +48,7 @@
|
|
|
48
48
|
"line": 102,
|
|
49
49
|
"character": 24
|
|
50
50
|
},
|
|
51
|
-
"name": "Workspace"
|
|
52
|
-
"componentId": {
|
|
53
|
-
"scope": "teambit.workspace",
|
|
54
|
-
"name": "workspace"
|
|
55
|
-
}
|
|
51
|
+
"name": "Workspace"
|
|
56
52
|
},
|
|
57
53
|
"isOptional": false,
|
|
58
54
|
"isSpread": false
|
|
@@ -72,11 +68,7 @@
|
|
|
72
68
|
"line": 103,
|
|
73
69
|
"character": 19
|
|
74
70
|
},
|
|
75
|
-
"name": "EnvsMain"
|
|
76
|
-
"componentId": {
|
|
77
|
-
"scope": "teambit.envs",
|
|
78
|
-
"name": "envs"
|
|
79
|
-
}
|
|
71
|
+
"name": "EnvsMain"
|
|
80
72
|
},
|
|
81
73
|
"isOptional": false,
|
|
82
74
|
"isSpread": false
|
|
@@ -96,11 +88,7 @@
|
|
|
96
88
|
"line": 104,
|
|
97
89
|
"character": 21
|
|
98
90
|
},
|
|
99
|
-
"name": "Logger"
|
|
100
|
-
"componentId": {
|
|
101
|
-
"scope": "teambit.harmony",
|
|
102
|
-
"name": "logger"
|
|
103
|
-
}
|
|
91
|
+
"name": "Logger"
|
|
104
92
|
},
|
|
105
93
|
"isOptional": false,
|
|
106
94
|
"isSpread": false
|
|
@@ -120,8 +108,7 @@
|
|
|
120
108
|
"line": 105,
|
|
121
109
|
"character": 21
|
|
122
110
|
},
|
|
123
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
124
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
111
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
125
112
|
},
|
|
126
113
|
"isOptional": false,
|
|
127
114
|
"isSpread": false
|
|
@@ -172,8 +159,7 @@
|
|
|
172
159
|
"line": 111,
|
|
173
160
|
"character": 14
|
|
174
161
|
},
|
|
175
|
-
"name": "WriteConfigFilesOptions"
|
|
176
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
162
|
+
"name": "WriteConfigFilesOptions"
|
|
177
163
|
}
|
|
178
164
|
},
|
|
179
165
|
{
|
|
@@ -206,8 +192,7 @@
|
|
|
206
192
|
"line": 120,
|
|
207
193
|
"character": 35
|
|
208
194
|
},
|
|
209
|
-
"name": "WriteConfigFilesOptions"
|
|
210
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
195
|
+
"name": "WriteConfigFilesOptions"
|
|
211
196
|
},
|
|
212
197
|
"isOptional": true,
|
|
213
198
|
"defaultValue": "{}",
|
|
@@ -273,8 +258,7 @@
|
|
|
273
258
|
"line": 171,
|
|
274
259
|
"character": 44
|
|
275
260
|
},
|
|
276
|
-
"name": "WriteConfigFilesOptions"
|
|
277
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
261
|
+
"name": "WriteConfigFilesOptions"
|
|
278
262
|
},
|
|
279
263
|
"isOptional": true,
|
|
280
264
|
"defaultValue": "{}",
|
|
@@ -358,8 +342,7 @@
|
|
|
358
342
|
"line": 180,
|
|
359
343
|
"character": 14
|
|
360
344
|
},
|
|
361
|
-
"name": "CleanConfigFilesOptions"
|
|
362
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
345
|
+
"name": "CleanConfigFilesOptions"
|
|
363
346
|
}
|
|
364
347
|
},
|
|
365
348
|
{
|
|
@@ -392,8 +375,7 @@
|
|
|
392
375
|
"line": 183,
|
|
393
376
|
"character": 35
|
|
394
377
|
},
|
|
395
|
-
"name": "CleanConfigFilesOptions"
|
|
396
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
378
|
+
"name": "CleanConfigFilesOptions"
|
|
397
379
|
},
|
|
398
380
|
"isOptional": true,
|
|
399
381
|
"defaultValue": "{}",
|
|
@@ -523,8 +505,7 @@
|
|
|
523
505
|
"line": 205,
|
|
524
506
|
"character": 38
|
|
525
507
|
},
|
|
526
|
-
"name": "EnvConfigWritersList"
|
|
527
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
508
|
+
"name": "EnvConfigWritersList"
|
|
528
509
|
}
|
|
529
510
|
]
|
|
530
511
|
},
|
|
@@ -599,8 +580,7 @@
|
|
|
599
580
|
"line": 343,
|
|
600
581
|
"character": 44
|
|
601
582
|
},
|
|
602
|
-
"name": "WriteConfigFilesOptions"
|
|
603
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
583
|
+
"name": "WriteConfigFilesOptions"
|
|
604
584
|
},
|
|
605
585
|
"isOptional": false,
|
|
606
586
|
"objectBindingNodes": [
|
|
@@ -782,8 +762,7 @@
|
|
|
782
762
|
"line": 410,
|
|
783
763
|
"character": 33
|
|
784
764
|
},
|
|
785
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
786
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
765
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
787
766
|
}
|
|
788
767
|
]
|
|
789
768
|
},
|
|
@@ -823,11 +802,7 @@
|
|
|
823
802
|
"line": 415,
|
|
824
803
|
"character": 44
|
|
825
804
|
},
|
|
826
|
-
"name": "CLIMain"
|
|
827
|
-
"componentId": {
|
|
828
|
-
"scope": "teambit.harmony",
|
|
829
|
-
"name": "cli"
|
|
830
|
-
}
|
|
805
|
+
"name": "CLIMain"
|
|
831
806
|
},
|
|
832
807
|
{
|
|
833
808
|
"__schema": "TypeRefSchema",
|
|
@@ -836,11 +811,7 @@
|
|
|
836
811
|
"line": 415,
|
|
837
812
|
"character": 53
|
|
838
813
|
},
|
|
839
|
-
"name": "Workspace"
|
|
840
|
-
"componentId": {
|
|
841
|
-
"scope": "teambit.workspace",
|
|
842
|
-
"name": "workspace"
|
|
843
|
-
}
|
|
814
|
+
"name": "Workspace"
|
|
844
815
|
},
|
|
845
816
|
{
|
|
846
817
|
"__schema": "TypeRefSchema",
|
|
@@ -849,11 +820,7 @@
|
|
|
849
820
|
"line": 415,
|
|
850
821
|
"character": 64
|
|
851
822
|
},
|
|
852
|
-
"name": "EnvsMain"
|
|
853
|
-
"componentId": {
|
|
854
|
-
"scope": "teambit.envs",
|
|
855
|
-
"name": "envs"
|
|
856
|
-
}
|
|
823
|
+
"name": "EnvsMain"
|
|
857
824
|
},
|
|
858
825
|
{
|
|
859
826
|
"__schema": "TypeRefSchema",
|
|
@@ -862,11 +829,7 @@
|
|
|
862
829
|
"line": 415,
|
|
863
830
|
"character": 74
|
|
864
831
|
},
|
|
865
|
-
"name": "LoggerMain"
|
|
866
|
-
"componentId": {
|
|
867
|
-
"scope": "teambit.harmony",
|
|
868
|
-
"name": "logger"
|
|
869
|
-
}
|
|
832
|
+
"name": "LoggerMain"
|
|
870
833
|
}
|
|
871
834
|
]
|
|
872
835
|
},
|
|
@@ -888,8 +851,7 @@
|
|
|
888
851
|
"line": 416,
|
|
889
852
|
"character": 13
|
|
890
853
|
},
|
|
891
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
892
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
854
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
893
855
|
},
|
|
894
856
|
"isOptional": false,
|
|
895
857
|
"isSpread": false
|
|
@@ -1545,11 +1507,7 @@
|
|
|
1545
1507
|
"line": 97,
|
|
1546
1508
|
"character": 23
|
|
1547
1509
|
},
|
|
1548
|
-
"name": "ExecutionContext"
|
|
1549
|
-
"componentId": {
|
|
1550
|
-
"scope": "teambit.envs",
|
|
1551
|
-
"name": "envs"
|
|
1552
|
-
}
|
|
1510
|
+
"name": "ExecutionContext"
|
|
1553
1511
|
},
|
|
1554
1512
|
"isOptional": false,
|
|
1555
1513
|
"isSpread": false
|
|
@@ -1569,11 +1527,7 @@
|
|
|
1569
1527
|
"line": 98,
|
|
1570
1528
|
"character": 10
|
|
1571
1529
|
},
|
|
1572
|
-
"name": "Environment"
|
|
1573
|
-
"componentId": {
|
|
1574
|
-
"scope": "teambit.envs",
|
|
1575
|
-
"name": "envs"
|
|
1576
|
-
}
|
|
1530
|
+
"name": "Environment"
|
|
1577
1531
|
},
|
|
1578
1532
|
"isOptional": false,
|
|
1579
1533
|
"isSpread": false
|
|
@@ -1705,8 +1659,7 @@
|
|
|
1705
1659
|
"line": 110,
|
|
1706
1660
|
"character": 22
|
|
1707
1661
|
},
|
|
1708
|
-
"name": "MergeConfigFilesFunc"
|
|
1709
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
1662
|
+
"name": "MergeConfigFilesFunc"
|
|
1710
1663
|
},
|
|
1711
1664
|
"isOptional": true
|
|
1712
1665
|
},
|
|
@@ -1876,8 +1829,7 @@
|
|
|
1876
1829
|
"line": 134,
|
|
1877
1830
|
"character": 29
|
|
1878
1831
|
},
|
|
1879
|
-
"name": "PostProcessExtendingConfigFilesOneFile"
|
|
1880
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
1832
|
+
"name": "PostProcessExtendingConfigFilesOneFile"
|
|
1881
1833
|
}
|
|
1882
1834
|
]
|
|
1883
1835
|
},
|
|
@@ -2066,8 +2018,7 @@
|
|
|
2066
2018
|
"line": 34,
|
|
2067
2019
|
"character": 48
|
|
2068
2020
|
},
|
|
2069
|
-
"name": "ExtendingConfigFileAdditionalProp"
|
|
2070
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
2021
|
+
"name": "ExtendingConfigFileAdditionalProp"
|
|
2071
2022
|
}
|
|
2072
2023
|
]
|
|
2073
2024
|
}
|
|
@@ -2430,8 +2381,7 @@
|
|
|
2430
2381
|
"line": 57,
|
|
2431
2382
|
"character": 23
|
|
2432
2383
|
},
|
|
2433
|
-
"name": "WrittenConfigFile"
|
|
2434
|
-
"internalFilePath": "writers/real-config-files.ts"
|
|
2384
|
+
"name": "WrittenConfigFile"
|
|
2435
2385
|
}
|
|
2436
2386
|
},
|
|
2437
2387
|
"isOptional": false
|
|
@@ -2493,10 +2443,6 @@
|
|
|
2493
2443
|
"character": 12
|
|
2494
2444
|
},
|
|
2495
2445
|
"name": "EnvHandler",
|
|
2496
|
-
"componentId": {
|
|
2497
|
-
"scope": "teambit.envs",
|
|
2498
|
-
"name": "envs"
|
|
2499
|
-
},
|
|
2500
2446
|
"typeArgs": [
|
|
2501
2447
|
{
|
|
2502
2448
|
"__schema": "TypeRefSchema",
|
|
@@ -2955,11 +2901,7 @@
|
|
|
2955
2901
|
"line": 76,
|
|
2956
2902
|
"character": 20
|
|
2957
2903
|
},
|
|
2958
|
-
"name": "EnvContext"
|
|
2959
|
-
"componentId": {
|
|
2960
|
-
"scope": "teambit.envs",
|
|
2961
|
-
"name": "envs"
|
|
2962
|
-
}
|
|
2904
|
+
"name": "EnvContext"
|
|
2963
2905
|
},
|
|
2964
2906
|
"isOptional": false,
|
|
2965
2907
|
"isSpread": false
|
|
@@ -3359,8 +3301,7 @@
|
|
|
3359
3301
|
"line": 53,
|
|
3360
3302
|
"character": 42
|
|
3361
3303
|
},
|
|
3362
|
-
"name": "EnvConfigWriter"
|
|
3363
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
3304
|
+
"name": "EnvConfigWriter"
|
|
3364
3305
|
}
|
|
3365
3306
|
]
|
|
3366
3307
|
}
|
|
@@ -4208,11 +4149,7 @@
|
|
|
4208
4149
|
"line": 102,
|
|
4209
4150
|
"character": 24
|
|
4210
4151
|
},
|
|
4211
|
-
"name": "Workspace"
|
|
4212
|
-
"componentId": {
|
|
4213
|
-
"scope": "teambit.workspace",
|
|
4214
|
-
"name": "workspace"
|
|
4215
|
-
}
|
|
4152
|
+
"name": "Workspace"
|
|
4216
4153
|
},
|
|
4217
4154
|
"isOptional": false,
|
|
4218
4155
|
"isSpread": false
|
|
@@ -4232,11 +4169,7 @@
|
|
|
4232
4169
|
"line": 103,
|
|
4233
4170
|
"character": 19
|
|
4234
4171
|
},
|
|
4235
|
-
"name": "EnvsMain"
|
|
4236
|
-
"componentId": {
|
|
4237
|
-
"scope": "teambit.envs",
|
|
4238
|
-
"name": "envs"
|
|
4239
|
-
}
|
|
4172
|
+
"name": "EnvsMain"
|
|
4240
4173
|
},
|
|
4241
4174
|
"isOptional": false,
|
|
4242
4175
|
"isSpread": false
|
|
@@ -4256,11 +4189,7 @@
|
|
|
4256
4189
|
"line": 104,
|
|
4257
4190
|
"character": 21
|
|
4258
4191
|
},
|
|
4259
|
-
"name": "Logger"
|
|
4260
|
-
"componentId": {
|
|
4261
|
-
"scope": "teambit.harmony",
|
|
4262
|
-
"name": "logger"
|
|
4263
|
-
}
|
|
4192
|
+
"name": "Logger"
|
|
4264
4193
|
},
|
|
4265
4194
|
"isOptional": false,
|
|
4266
4195
|
"isSpread": false
|
|
@@ -4280,8 +4209,7 @@
|
|
|
4280
4209
|
"line": 105,
|
|
4281
4210
|
"character": 21
|
|
4282
4211
|
},
|
|
4283
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
4284
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4212
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
4285
4213
|
},
|
|
4286
4214
|
"isOptional": false,
|
|
4287
4215
|
"isSpread": false
|
|
@@ -4332,8 +4260,7 @@
|
|
|
4332
4260
|
"line": 111,
|
|
4333
4261
|
"character": 14
|
|
4334
4262
|
},
|
|
4335
|
-
"name": "WriteConfigFilesOptions"
|
|
4336
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4263
|
+
"name": "WriteConfigFilesOptions"
|
|
4337
4264
|
}
|
|
4338
4265
|
},
|
|
4339
4266
|
{
|
|
@@ -4366,8 +4293,7 @@
|
|
|
4366
4293
|
"line": 120,
|
|
4367
4294
|
"character": 35
|
|
4368
4295
|
},
|
|
4369
|
-
"name": "WriteConfigFilesOptions"
|
|
4370
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4296
|
+
"name": "WriteConfigFilesOptions"
|
|
4371
4297
|
},
|
|
4372
4298
|
"isOptional": true,
|
|
4373
4299
|
"defaultValue": "{}",
|
|
@@ -4433,8 +4359,7 @@
|
|
|
4433
4359
|
"line": 171,
|
|
4434
4360
|
"character": 44
|
|
4435
4361
|
},
|
|
4436
|
-
"name": "WriteConfigFilesOptions"
|
|
4437
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4362
|
+
"name": "WriteConfigFilesOptions"
|
|
4438
4363
|
},
|
|
4439
4364
|
"isOptional": true,
|
|
4440
4365
|
"defaultValue": "{}",
|
|
@@ -4518,8 +4443,7 @@
|
|
|
4518
4443
|
"line": 180,
|
|
4519
4444
|
"character": 14
|
|
4520
4445
|
},
|
|
4521
|
-
"name": "CleanConfigFilesOptions"
|
|
4522
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4446
|
+
"name": "CleanConfigFilesOptions"
|
|
4523
4447
|
}
|
|
4524
4448
|
},
|
|
4525
4449
|
{
|
|
@@ -4552,8 +4476,7 @@
|
|
|
4552
4476
|
"line": 183,
|
|
4553
4477
|
"character": 35
|
|
4554
4478
|
},
|
|
4555
|
-
"name": "CleanConfigFilesOptions"
|
|
4556
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4479
|
+
"name": "CleanConfigFilesOptions"
|
|
4557
4480
|
},
|
|
4558
4481
|
"isOptional": true,
|
|
4559
4482
|
"defaultValue": "{}",
|
|
@@ -4683,8 +4606,7 @@
|
|
|
4683
4606
|
"line": 205,
|
|
4684
4607
|
"character": 38
|
|
4685
4608
|
},
|
|
4686
|
-
"name": "EnvConfigWritersList"
|
|
4687
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4609
|
+
"name": "EnvConfigWritersList"
|
|
4688
4610
|
}
|
|
4689
4611
|
]
|
|
4690
4612
|
},
|
|
@@ -4759,8 +4681,7 @@
|
|
|
4759
4681
|
"line": 343,
|
|
4760
4682
|
"character": 44
|
|
4761
4683
|
},
|
|
4762
|
-
"name": "WriteConfigFilesOptions"
|
|
4763
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4684
|
+
"name": "WriteConfigFilesOptions"
|
|
4764
4685
|
},
|
|
4765
4686
|
"isOptional": false,
|
|
4766
4687
|
"objectBindingNodes": [
|
|
@@ -4942,8 +4863,7 @@
|
|
|
4942
4863
|
"line": 410,
|
|
4943
4864
|
"character": 33
|
|
4944
4865
|
},
|
|
4945
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
4946
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4866
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
4947
4867
|
}
|
|
4948
4868
|
]
|
|
4949
4869
|
},
|
|
@@ -4983,11 +4903,7 @@
|
|
|
4983
4903
|
"line": 415,
|
|
4984
4904
|
"character": 44
|
|
4985
4905
|
},
|
|
4986
|
-
"name": "CLIMain"
|
|
4987
|
-
"componentId": {
|
|
4988
|
-
"scope": "teambit.harmony",
|
|
4989
|
-
"name": "cli"
|
|
4990
|
-
}
|
|
4906
|
+
"name": "CLIMain"
|
|
4991
4907
|
},
|
|
4992
4908
|
{
|
|
4993
4909
|
"__schema": "TypeRefSchema",
|
|
@@ -4996,11 +4912,7 @@
|
|
|
4996
4912
|
"line": 415,
|
|
4997
4913
|
"character": 53
|
|
4998
4914
|
},
|
|
4999
|
-
"name": "Workspace"
|
|
5000
|
-
"componentId": {
|
|
5001
|
-
"scope": "teambit.workspace",
|
|
5002
|
-
"name": "workspace"
|
|
5003
|
-
}
|
|
4915
|
+
"name": "Workspace"
|
|
5004
4916
|
},
|
|
5005
4917
|
{
|
|
5006
4918
|
"__schema": "TypeRefSchema",
|
|
@@ -5009,11 +4921,7 @@
|
|
|
5009
4921
|
"line": 415,
|
|
5010
4922
|
"character": 64
|
|
5011
4923
|
},
|
|
5012
|
-
"name": "EnvsMain"
|
|
5013
|
-
"componentId": {
|
|
5014
|
-
"scope": "teambit.envs",
|
|
5015
|
-
"name": "envs"
|
|
5016
|
-
}
|
|
4924
|
+
"name": "EnvsMain"
|
|
5017
4925
|
},
|
|
5018
4926
|
{
|
|
5019
4927
|
"__schema": "TypeRefSchema",
|
|
@@ -5022,11 +4930,7 @@
|
|
|
5022
4930
|
"line": 415,
|
|
5023
4931
|
"character": 74
|
|
5024
4932
|
},
|
|
5025
|
-
"name": "LoggerMain"
|
|
5026
|
-
"componentId": {
|
|
5027
|
-
"scope": "teambit.harmony",
|
|
5028
|
-
"name": "logger"
|
|
5029
|
-
}
|
|
4933
|
+
"name": "LoggerMain"
|
|
5030
4934
|
}
|
|
5031
4935
|
]
|
|
5032
4936
|
},
|
|
@@ -5048,8 +4952,7 @@
|
|
|
5048
4952
|
"line": 416,
|
|
5049
4953
|
"character": 13
|
|
5050
4954
|
},
|
|
5051
|
-
"name": "WorkspaceConfigFilesAspectConfig"
|
|
5052
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
4955
|
+
"name": "WorkspaceConfigFilesAspectConfig"
|
|
5053
4956
|
},
|
|
5054
4957
|
"isOptional": false,
|
|
5055
4958
|
"isSpread": false
|
|
@@ -5143,8 +5046,7 @@
|
|
|
5143
5046
|
"line": 50,
|
|
5144
5047
|
"character": 23
|
|
5145
5048
|
},
|
|
5146
|
-
"name": "EnvConfigWriterEntry"
|
|
5147
|
-
"internalFilePath": "workspace-config-files.main.runtime.ts"
|
|
5049
|
+
"name": "EnvConfigWriterEntry"
|
|
5148
5050
|
}
|
|
5149
5051
|
}
|
|
5150
5052
|
}
|
|
@@ -5395,8 +5297,7 @@
|
|
|
5395
5297
|
"line": 34,
|
|
5396
5298
|
"character": 48
|
|
5397
5299
|
},
|
|
5398
|
-
"name": "ExtendingConfigFileAdditionalProp"
|
|
5399
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
5300
|
+
"name": "ExtendingConfigFileAdditionalProp"
|
|
5400
5301
|
}
|
|
5401
5302
|
]
|
|
5402
5303
|
}
|
|
@@ -5649,8 +5550,7 @@
|
|
|
5649
5550
|
"line": 57,
|
|
5650
5551
|
"character": 23
|
|
5651
5552
|
},
|
|
5652
|
-
"name": "WrittenConfigFile"
|
|
5653
|
-
"internalFilePath": "writers/real-config-files.ts"
|
|
5553
|
+
"name": "WrittenConfigFile"
|
|
5654
5554
|
}
|
|
5655
5555
|
},
|
|
5656
5556
|
"isOptional": false
|
|
@@ -5927,11 +5827,7 @@
|
|
|
5927
5827
|
"line": 97,
|
|
5928
5828
|
"character": 23
|
|
5929
5829
|
},
|
|
5930
|
-
"name": "ExecutionContext"
|
|
5931
|
-
"componentId": {
|
|
5932
|
-
"scope": "teambit.envs",
|
|
5933
|
-
"name": "envs"
|
|
5934
|
-
}
|
|
5830
|
+
"name": "ExecutionContext"
|
|
5935
5831
|
},
|
|
5936
5832
|
"isOptional": false,
|
|
5937
5833
|
"isSpread": false
|
|
@@ -5951,11 +5847,7 @@
|
|
|
5951
5847
|
"line": 98,
|
|
5952
5848
|
"character": 10
|
|
5953
5849
|
},
|
|
5954
|
-
"name": "Environment"
|
|
5955
|
-
"componentId": {
|
|
5956
|
-
"scope": "teambit.envs",
|
|
5957
|
-
"name": "envs"
|
|
5958
|
-
}
|
|
5850
|
+
"name": "Environment"
|
|
5959
5851
|
},
|
|
5960
5852
|
"isOptional": false,
|
|
5961
5853
|
"isSpread": false
|
|
@@ -6087,8 +5979,7 @@
|
|
|
6087
5979
|
"line": 110,
|
|
6088
5980
|
"character": 22
|
|
6089
5981
|
},
|
|
6090
|
-
"name": "MergeConfigFilesFunc"
|
|
6091
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
5982
|
+
"name": "MergeConfigFilesFunc"
|
|
6092
5983
|
},
|
|
6093
5984
|
"isOptional": true
|
|
6094
5985
|
},
|
|
@@ -6258,8 +6149,7 @@
|
|
|
6258
6149
|
"line": 134,
|
|
6259
6150
|
"character": 29
|
|
6260
6151
|
},
|
|
6261
|
-
"name": "PostProcessExtendingConfigFilesOneFile"
|
|
6262
|
-
"internalFilePath": "config-writer-entry.ts"
|
|
6152
|
+
"name": "PostProcessExtendingConfigFilesOneFile"
|
|
6263
6153
|
}
|
|
6264
6154
|
]
|
|
6265
6155
|
},
|
|
@@ -6460,10 +6350,6 @@
|
|
|
6460
6350
|
"character": 12
|
|
6461
6351
|
},
|
|
6462
6352
|
"name": "EnvHandler",
|
|
6463
|
-
"componentId": {
|
|
6464
|
-
"scope": "teambit.envs",
|
|
6465
|
-
"name": "envs"
|
|
6466
|
-
},
|
|
6467
6353
|
"typeArgs": [
|
|
6468
6354
|
{
|
|
6469
6355
|
"__schema": "TypeRefSchema",
|
|
@@ -6878,11 +6764,7 @@
|
|
|
6878
6764
|
"line": 76,
|
|
6879
6765
|
"character": 20
|
|
6880
6766
|
},
|
|
6881
|
-
"name": "EnvContext"
|
|
6882
|
-
"componentId": {
|
|
6883
|
-
"scope": "teambit.envs",
|
|
6884
|
-
"name": "envs"
|
|
6885
|
-
}
|
|
6767
|
+
"name": "EnvContext"
|
|
6886
6768
|
},
|
|
6887
6769
|
"isOptional": false,
|
|
6888
6770
|
"isSpread": false
|
|
@@ -7007,7 +6889,7 @@
|
|
|
7007
6889
|
"componentId": {
|
|
7008
6890
|
"scope": "teambit.workspace",
|
|
7009
6891
|
"name": "workspace-config-files",
|
|
7010
|
-
"version": "1.0.
|
|
6892
|
+
"version": "1.0.227"
|
|
7011
6893
|
},
|
|
7012
6894
|
"taggedModuleExports": []
|
|
7013
6895
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
;
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace-config-files@1.0.
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace-config-files@1.0.227/dist/workspace-config-files.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace-config-files",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.227",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace-config-files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace-config-files",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.227"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"string-format": "0.5.0",
|
|
20
20
|
"@teambit/harmony": "0.4.6",
|
|
21
21
|
"@teambit/bit-error": "0.0.404",
|
|
22
|
-
"@teambit/envs": "1.0.
|
|
23
|
-
"@teambit/cli": "0.0.
|
|
24
|
-
"@teambit/logger": "0.0.
|
|
25
|
-
"@teambit/workspace": "1.0.
|
|
22
|
+
"@teambit/envs": "1.0.227",
|
|
23
|
+
"@teambit/cli": "0.0.860",
|
|
24
|
+
"@teambit/logger": "0.0.953",
|
|
25
|
+
"@teambit/workspace": "1.0.227"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/lodash": "4.14.165",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/fs-extra": "9.0.7",
|
|
32
32
|
"@types/normalize-path": "^3.0.0",
|
|
33
33
|
"@types/mocha": "9.1.0",
|
|
34
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
34
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@teambit/legacy": "1.0.624"
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,19 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
52
|
+
}
|
|
38
53
|
]
|
|
39
54
|
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { Environment, ExecutionContext } from '@teambit/envs';
|
|
2
|
-
import { EnvMapValue } from './workspace-config-files.main.runtime';
|
|
3
|
-
import { WrittenConfigFile } from './writers';
|
|
4
|
-
export type ConfigFile = {
|
|
5
|
-
/**
|
|
6
|
-
* Name of the config file.
|
|
7
|
-
* supports also using `{hash}` in the name, which will be replaced by the hash of the config file.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Content of the config file.
|
|
12
|
-
* I.E the content of the tsconfig.json file.
|
|
13
|
-
*/
|
|
14
|
-
content: string;
|
|
15
|
-
/**
|
|
16
|
-
* Hash of the config file.
|
|
17
|
-
*/
|
|
18
|
-
hash?: string;
|
|
19
|
-
};
|
|
20
|
-
export type ExtendingConfigFileAdditionalProp = {
|
|
21
|
-
/**
|
|
22
|
-
* the config file that this config file extends.
|
|
23
|
-
*/
|
|
24
|
-
extendingTarget: WrittenConfigFile;
|
|
25
|
-
/**
|
|
26
|
-
* When replacing the config file name with the actual path of the config file, use absolute paths.
|
|
27
|
-
*/
|
|
28
|
-
useAbsPaths?: boolean;
|
|
29
|
-
};
|
|
30
|
-
export type ExtendingConfigFile = ConfigFile & ExtendingConfigFileAdditionalProp;
|
|
31
|
-
export type PostProcessExtendingConfigFilesArgs = {
|
|
32
|
-
workspaceDir: string;
|
|
33
|
-
configsRootDir: string;
|
|
34
|
-
extendingConfigFile: ExtendingConfigFile;
|
|
35
|
-
/**
|
|
36
|
-
* Paths that the file will be written to.
|
|
37
|
-
*/
|
|
38
|
-
paths: string[];
|
|
39
|
-
envMapValue: EnvMapValue;
|
|
40
|
-
/**
|
|
41
|
-
* This is a flag for backward compatibility
|
|
42
|
-
* We used to return string from the post process, so old versions of bit only knows to handle string results
|
|
43
|
-
* while in new version we support getting array of objects
|
|
44
|
-
* we need to know if bit the user is using support the new format or not
|
|
45
|
-
*/
|
|
46
|
-
supportSpecificPathChange?: boolean;
|
|
47
|
-
};
|
|
48
|
-
export type GenerateExtendingConfigFilesArgs = {
|
|
49
|
-
workspaceDir: string;
|
|
50
|
-
configsRootDir: string;
|
|
51
|
-
writtenConfigFiles: WrittenConfigFile[];
|
|
52
|
-
envMapValue: EnvMapValue;
|
|
53
|
-
};
|
|
54
|
-
export type PostProcessExtendingConfigFilesOneFile = {
|
|
55
|
-
path: string;
|
|
56
|
-
content: string;
|
|
57
|
-
};
|
|
58
|
-
export type MergeConfigFilesFunc = (configFile: ConfigFile, configFile2: ConfigFile) => string;
|
|
59
|
-
export interface ConfigWriterEntry {
|
|
60
|
-
/**
|
|
61
|
-
* Id is used for few things:
|
|
62
|
-
* 1. merge/post process different configs files (from different envs) together.
|
|
63
|
-
* 2. filter the config writer by the cli when using --writers flag.
|
|
64
|
-
*/
|
|
65
|
-
id: string;
|
|
66
|
-
/**
|
|
67
|
-
* Name of the config writer.
|
|
68
|
-
* used for outputs and logging.
|
|
69
|
-
*/
|
|
70
|
-
name: string;
|
|
71
|
-
/**
|
|
72
|
-
* Get's the component env and return the config file content
|
|
73
|
-
* for example the eslint config to tsconfig.
|
|
74
|
-
* This also enable to return a hash of the config file, which will be used to determine if
|
|
75
|
-
* 2 config files are the same.
|
|
76
|
-
* If the hash is not provided, the content will be used as the hash.
|
|
77
|
-
* This enables the specific config type to ignore specific fields when calculating the
|
|
78
|
-
* hash in order to ignore theses fields when determining if 2 config files are the same.
|
|
79
|
-
* The calc function also get the target directory of the config file (calculated by this aspect) as sometime there
|
|
80
|
-
* is a need to change the config file content based on the target directory.
|
|
81
|
-
* for example, change the includes/excludes paths to be relative to the target directory.
|
|
82
|
-
* The calc can return undefined if the config file is not relevant for the component. or not supported by the subscriber.
|
|
83
|
-
* for example if the component uses babel to compile, then tsconfig is not relevant.
|
|
84
|
-
* @param env
|
|
85
|
-
*/
|
|
86
|
-
calcConfigFiles(executionContext: ExecutionContext, env: Environment, dir: string, workspaceDir?: string): ConfigFile[] | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Provide a function that knows how to merge 2 config files together.
|
|
89
|
-
* This is used when 2 different envs generate the same config file hash.
|
|
90
|
-
* sometime we want to merge the 2 config files together.
|
|
91
|
-
* @param configFile
|
|
92
|
-
* @param configFile2
|
|
93
|
-
*/
|
|
94
|
-
mergeConfigFiles?: MergeConfigFilesFunc;
|
|
95
|
-
/**
|
|
96
|
-
* This will be used to generate an extending file content.
|
|
97
|
-
* For example, the tsconfig.json file will extend the real tsconfig.{hash}.json file (that were coming from the env).
|
|
98
|
-
* That way we can avoid writing the same config file multiple times.
|
|
99
|
-
* It also reduces the risk of the user manually change the config file and then the changes will be lost.
|
|
100
|
-
* This function support returning a file with content with a dsl using `{}` to replace the config file name.
|
|
101
|
-
* for example:
|
|
102
|
-
* content = `{
|
|
103
|
-
* "extends": {configFile.name},
|
|
104
|
-
* }`
|
|
105
|
-
*/
|
|
106
|
-
generateExtendingFile(args: GenerateExtendingConfigFilesArgs): ExtendingConfigFile | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* This enables the writer to do some post processing after the extending config files were calculated and deduped.
|
|
109
|
-
* this is important in case when we need to change a config file / extending config file after it was calculated
|
|
110
|
-
* based on all the environments in the ws
|
|
111
|
-
* or based on other config files that were written.
|
|
112
|
-
* @param args
|
|
113
|
-
*/
|
|
114
|
-
postProcessExtendingConfigFiles?(args: PostProcessExtendingConfigFilesArgs): Promise<string | Array<PostProcessExtendingConfigFilesOneFile> | undefined>;
|
|
115
|
-
/**
|
|
116
|
-
* Find all the files that are relevant for the config type.
|
|
117
|
-
* This is used to clean / delete these files
|
|
118
|
-
* This should return an array of glob patterns (that will passed to the globby/minimatch library)
|
|
119
|
-
* @param dir
|
|
120
|
-
*/
|
|
121
|
-
patterns: string[];
|
|
122
|
-
/**
|
|
123
|
-
* A function to determine if a file was generated by bit.
|
|
124
|
-
* This is useful to check if the config file was generated by bit to prevent delete user's file.
|
|
125
|
-
* @param filePath
|
|
126
|
-
* @returns
|
|
127
|
-
*/
|
|
128
|
-
isBitGenerated?: (filePath: string) => boolean;
|
|
129
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { EnvContext, EnvHandler } from '@teambit/envs';
|
|
2
|
-
import { ConfigWriterEntry } from './config-writer-entry';
|
|
3
|
-
export type ConfigWriterHandler = {
|
|
4
|
-
handler: EnvHandler<ConfigWriterEntry>;
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* create and maintain config writer list for component dev environments.
|
|
9
|
-
*/
|
|
10
|
-
export declare class ConfigWriterList {
|
|
11
|
-
private _writers;
|
|
12
|
-
constructor(_writers: ConfigWriterHandler[]);
|
|
13
|
-
/**
|
|
14
|
-
* list all congig writer handlers in the list.
|
|
15
|
-
*/
|
|
16
|
-
get writers(): ConfigWriterHandler[];
|
|
17
|
-
private initiateWriters;
|
|
18
|
-
/**
|
|
19
|
-
* add writers to the list.
|
|
20
|
-
*/
|
|
21
|
-
add(writers: ConfigWriterHandler[]): this;
|
|
22
|
-
/**
|
|
23
|
-
* remove writers from the list.
|
|
24
|
-
*/
|
|
25
|
-
remove(writerNames: string[]): this;
|
|
26
|
-
/**
|
|
27
|
-
* replace writers in the list.
|
|
28
|
-
*/
|
|
29
|
-
replace(writers: ConfigWriterHandler[]): this;
|
|
30
|
-
/**
|
|
31
|
-
* return a new list with the writers from the args added.
|
|
32
|
-
* @param pipeline
|
|
33
|
-
* @returns
|
|
34
|
-
*/
|
|
35
|
-
concat(writerList: ConfigWriterList): ConfigWriterList;
|
|
36
|
-
/**
|
|
37
|
-
* compute the list.
|
|
38
|
-
*/
|
|
39
|
-
compute(context: EnvContext): ConfigWriterEntry[];
|
|
40
|
-
static from(writersHandlers: ConfigWriterHandler[]): ConfigWriterList;
|
|
41
|
-
}
|
package/dist/dedup-paths.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { CompPathExtendingHashMap, EnvCompsDirsMap } from './workspace-config-files.main.runtime';
|
|
2
|
-
import { ExtendingConfigFilesMap } from './writers';
|
|
3
|
-
export type DedupedPaths = Array<{
|
|
4
|
-
fileHash: string;
|
|
5
|
-
paths: string[];
|
|
6
|
-
}>;
|
|
7
|
-
export declare function buildCompPathExtendingHashMap(extendingConfigFilesMap: ExtendingConfigFilesMap, envCompsDirsMap: EnvCompsDirsMap): CompPathExtendingHashMap;
|
|
8
|
-
/**
|
|
9
|
-
* easier to understand by an example:
|
|
10
|
-
* input:
|
|
11
|
-
* [
|
|
12
|
-
* { fileHash: hash1, paths: [ui/button, ui/form] },
|
|
13
|
-
* { fileHash: hash2, paths: [p/a1, p/a2] },
|
|
14
|
-
* { fileHash: hash3, paths: [p/n1] },
|
|
15
|
-
* ]
|
|
16
|
-
*
|
|
17
|
-
* output:
|
|
18
|
-
* [
|
|
19
|
-
* { fileHash: hash1, paths: [ui] },
|
|
20
|
-
* { fileHash: hash2, paths: [p] },
|
|
21
|
-
* { fileHash: hash3, paths: [p/n1] },
|
|
22
|
-
* ]
|
|
23
|
-
*
|
|
24
|
-
* the goal is to minimize the amount of files to write per env if possible.
|
|
25
|
-
* when multiple components of the same env share a root-dir, then, it's enough to write a file in that shared dir.
|
|
26
|
-
* if in a shared-dir, some components using env1 and some env2, it finds the env that has the max number of
|
|
27
|
-
* components, this env will be optimized. other components, will have the files written inside their dirs.
|
|
28
|
-
*/
|
|
29
|
-
export declare function dedupePaths(extendingConfigFilesMap: ExtendingConfigFilesMap, envCompsDirsMap: EnvCompsDirsMap): DedupedPaths;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WorkspaceConfigFilesAspect } from './workspace-config-files.aspect';
|
|
2
|
-
export type { WorkspaceConfigFilesMain, WriteConfigFilesResult, EnvCompsDirsMap, EnvMapValue, OneConfigWriterIdResult, WriteResults, } from './workspace-config-files.main.runtime';
|
|
3
|
-
export type { ConfigWriterEntry, ExtendingConfigFile, ConfigFile, PostProcessExtendingConfigFilesArgs, GenerateExtendingConfigFilesArgs, } from './config-writer-entry';
|
|
4
|
-
export type { ConfigWriterHandler } from './config-writer-list';
|
|
5
|
-
export type { WorkspaceConfigEnv } from './workspace-config-env-type';
|
|
6
|
-
export { ConfigWriterList } from './config-writer-list';
|
|
7
|
-
export default WorkspaceConfigFilesAspect;
|
|
8
|
-
export { WorkspaceConfigFilesAspect };
|
package/dist/outputs/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WriteConfigFilesResult } from '../workspace-config-files.main.runtime';
|
|
2
|
-
import type { WriteConfigCmdFlags } from '../ws-config.cmd';
|
|
3
|
-
export declare function verboseFormatWriteOutput(writeConfigFilesResult: WriteConfigFilesResult, flags: WriteConfigCmdFlags): string;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const WRITE_TITLE: (total: number) => string;
|
|
2
|
-
export declare const SUMMARY = "bit writes configuration files in different nested locations in your workspace to meet the configuration needs of different components.\nIDE is now in-sync with component configuration";
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { CLIMain } from '@teambit/cli';
|
|
2
|
-
import type { Workspace } from '@teambit/workspace';
|
|
3
|
-
import { Environment, ExecutionContext } from '@teambit/envs';
|
|
4
|
-
import type { EnvsMain } from '@teambit/envs';
|
|
5
|
-
import { Logger } from '@teambit/logger';
|
|
6
|
-
import type { LoggerMain } from '@teambit/logger';
|
|
7
|
-
import { ConfigWriterEntry } from './config-writer-entry';
|
|
8
|
-
import { EnvsWrittenExtendingConfigFiles, EnvsWrittenRealConfigFiles } from './writers';
|
|
9
|
-
/**
|
|
10
|
-
* Configs that can be configured in the workspace.jsonc file
|
|
11
|
-
*/
|
|
12
|
-
export type WorkspaceConfigFilesAspectConfig = {
|
|
13
|
-
configsRootDir?: string;
|
|
14
|
-
enableWorkspaceConfigWrite?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type EnvConfigWriter = {
|
|
17
|
-
envId: string;
|
|
18
|
-
executionContext: ExecutionContext;
|
|
19
|
-
configWriters: ConfigWriterEntry[];
|
|
20
|
-
};
|
|
21
|
-
export type EnvConfigWriterEntry = {
|
|
22
|
-
envId: string;
|
|
23
|
-
configWriter: ConfigWriterEntry;
|
|
24
|
-
executionContext: ExecutionContext;
|
|
25
|
-
};
|
|
26
|
-
export type EnvConfigWritersList = Array<EnvConfigWriter>;
|
|
27
|
-
export type CleanConfigFilesOptions = {
|
|
28
|
-
silent?: boolean;
|
|
29
|
-
dryRun?: boolean;
|
|
30
|
-
writers?: string[];
|
|
31
|
-
};
|
|
32
|
-
export type WriteConfigFilesOptions = {
|
|
33
|
-
clean?: boolean;
|
|
34
|
-
silent?: boolean;
|
|
35
|
-
dedupe?: boolean;
|
|
36
|
-
dryRun?: boolean;
|
|
37
|
-
throw?: boolean;
|
|
38
|
-
writers?: string[];
|
|
39
|
-
};
|
|
40
|
-
export type CompPathExtendingHashMap = {
|
|
41
|
-
[compPath: string]: string;
|
|
42
|
-
};
|
|
43
|
-
export type EnvMapValue = {
|
|
44
|
-
env: Environment;
|
|
45
|
-
id: string[];
|
|
46
|
-
paths: string[];
|
|
47
|
-
};
|
|
48
|
-
export type EnvCompsDirsMap = {
|
|
49
|
-
[envId: string]: EnvMapValue;
|
|
50
|
-
};
|
|
51
|
-
export type OneConfigWriterIdResult = {
|
|
52
|
-
writerId: string;
|
|
53
|
-
totalWrittenFiles: number;
|
|
54
|
-
realConfigFiles: EnvsWrittenRealConfigFiles;
|
|
55
|
-
totalRealConfigFiles: number;
|
|
56
|
-
extendingConfigFiles: EnvsWrittenExtendingConfigFiles;
|
|
57
|
-
totalExtendingConfigFiles: number;
|
|
58
|
-
};
|
|
59
|
-
export type WriteResults = {
|
|
60
|
-
writersResult: OneConfigWriterIdResult[];
|
|
61
|
-
totalWrittenFiles: number;
|
|
62
|
-
totalRealConfigFiles: number;
|
|
63
|
-
totalExtendingConfigFiles: number;
|
|
64
|
-
};
|
|
65
|
-
export type WriteConfigFilesResult = {
|
|
66
|
-
cleanResults?: string[];
|
|
67
|
-
writeResults: WriteResults;
|
|
68
|
-
wsDir: string;
|
|
69
|
-
err?: Error;
|
|
70
|
-
};
|
|
71
|
-
export declare class WorkspaceConfigFilesMain {
|
|
72
|
-
private workspace;
|
|
73
|
-
private envs;
|
|
74
|
-
private logger;
|
|
75
|
-
private config;
|
|
76
|
-
private envsNotImplementing;
|
|
77
|
-
constructor(workspace: Workspace, envs: EnvsMain, logger: Logger, config: WorkspaceConfigFilesAspectConfig);
|
|
78
|
-
/**
|
|
79
|
-
* It writes the configuration files for the workspace
|
|
80
|
-
* for example: tsconfig, eslint config and prettier config files.
|
|
81
|
-
* @param {WriteConfigFilesOptions} options - WriteConfigFilesOptions = {}
|
|
82
|
-
* @returns An object with the following properties:
|
|
83
|
-
* - writeResults: An object with the following properties:
|
|
84
|
-
* - aspectsWritersResults: An array of objects with the following properties:
|
|
85
|
-
* - aspect: The aspect that was written
|
|
86
|
-
* - totalWrittenFiles: The number of files that were written
|
|
87
|
-
* - totalWrittenFiles: The total number of files that were written
|
|
88
|
-
* - cleanResults: array of deleted paths
|
|
89
|
-
*/
|
|
90
|
-
writeConfigFiles(options?: WriteConfigFilesOptions): Promise<WriteConfigFilesResult>;
|
|
91
|
-
/**
|
|
92
|
-
* This will check the config.enableWorkspaceConfigWrite before writing the config files.
|
|
93
|
-
*/
|
|
94
|
-
writeConfigFilesIfEnabled(options?: WriteConfigFilesOptions): Promise<WriteConfigFilesResult | undefined>;
|
|
95
|
-
/**
|
|
96
|
-
* It cleans (delete) the config files from the workspace.
|
|
97
|
-
* This will check each file and will only delete it in case it was generated by bit
|
|
98
|
-
* @param {CleanConfigFilesOptions} options - CleanConfigFilesOptions = {}
|
|
99
|
-
* @returns An array of strings.
|
|
100
|
-
*/
|
|
101
|
-
cleanConfigFiles(options?: CleanConfigFilesOptions): Promise<string[]>;
|
|
102
|
-
/**
|
|
103
|
-
* The function checks if the auto writing of workspace configuration is enabled.
|
|
104
|
-
* if it's enabled we will re-generate the configuration files upon bit create
|
|
105
|
-
* @returns the boolean value of `!!this.config.enableWorkspaceConfigWrite`.
|
|
106
|
-
*/
|
|
107
|
-
isWorkspaceConfigWriteEnabled(): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* It returns a list of all the config writers that have been registered with the config writer slot
|
|
110
|
-
* @returns An array of objects with aspectId and configWriter properties.
|
|
111
|
-
*/
|
|
112
|
-
listConfigWriters(): Promise<EnvConfigWritersList>;
|
|
113
|
-
private groupByWriterId;
|
|
114
|
-
private write;
|
|
115
|
-
private handleOneIdWriter;
|
|
116
|
-
private getConfigsRootDir;
|
|
117
|
-
private getCacheDir;
|
|
118
|
-
private getExecContext;
|
|
119
|
-
private getEnvComponentsDirsMap;
|
|
120
|
-
private getConfigWriters;
|
|
121
|
-
private getFlatConfigWriters;
|
|
122
|
-
/**
|
|
123
|
-
* Clean config files written by the config-writers
|
|
124
|
-
* @param envsExecutionContext
|
|
125
|
-
* @param param1
|
|
126
|
-
* @returns Array of paths of deleted config files
|
|
127
|
-
*/
|
|
128
|
-
clean({ dryRun, silent, writers }: WriteConfigFilesOptions): Promise<string[]>;
|
|
129
|
-
private calcPathsToClean;
|
|
130
|
-
private addToEnvsNotImplementing;
|
|
131
|
-
getEnvsNotImplementing(): string[];
|
|
132
|
-
private promptForCleaning;
|
|
133
|
-
private deleteFiles;
|
|
134
|
-
static slots: never[];
|
|
135
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
136
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
137
|
-
static defaultConfig: Partial<WorkspaceConfigFilesAspectConfig>;
|
|
138
|
-
static provider([cli, workspace, envs, loggerAspect]: [CLIMain, Workspace, EnvsMain, LoggerMain], config: WorkspaceConfigFilesAspectConfig): Promise<WorkspaceConfigFilesMain>;
|
|
139
|
-
}
|
|
140
|
-
export default WorkspaceConfigFilesMain;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@teambit/logger';
|
|
2
|
-
import { EnvService, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';
|
|
3
|
-
import { ConfigWriterEntry } from './config-writer-entry';
|
|
4
|
-
export type PkgDescriptor = {
|
|
5
|
-
id: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
config?: string;
|
|
8
|
-
};
|
|
9
|
-
type PkgTransformationMap = ServiceTransformationMap & {
|
|
10
|
-
workspaceConfig: () => ConfigWriterEntry[];
|
|
11
|
-
};
|
|
12
|
-
export declare class WorkspaceConfigFilesService implements EnvService<any> {
|
|
13
|
-
private logger;
|
|
14
|
-
name: string;
|
|
15
|
-
constructor(logger: Logger);
|
|
16
|
-
transform(env: Env, envContext: EnvContext): PkgTransformationMap | undefined;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ExtendingConfigFile } from '../config-writer-entry';
|
|
2
|
-
import { EnvCompsDirsMap, EnvConfigWriterEntry, WriteConfigFilesOptions } from '../workspace-config-files.main.runtime';
|
|
3
|
-
import { WrittenRealConfigFilesByHash } from './real-config-files';
|
|
4
|
-
export type WrittenExtendingConfigFile = ExtendingConfigFile & {
|
|
5
|
-
filePaths: string[];
|
|
6
|
-
};
|
|
7
|
-
export type EnvsWrittenExtendingConfigFile = {
|
|
8
|
-
envIds: string[];
|
|
9
|
-
extendingConfigFile: WrittenExtendingConfigFile;
|
|
10
|
-
};
|
|
11
|
-
export type EnvsWrittenExtendingConfigFiles = Array<EnvsWrittenExtendingConfigFile>;
|
|
12
|
-
export type ExtendingConfigFilesMap = {
|
|
13
|
-
[configFileHash: string]: {
|
|
14
|
-
envIds: string[];
|
|
15
|
-
extendingConfigFile: Required<ExtendingConfigFile>;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare function handleExtendingConfigFiles(envEntries: EnvConfigWriterEntry[], envCompsDirsMap: EnvCompsDirsMap, writtenRealConfigFiles: WrittenRealConfigFilesByHash, configsRootDir: string, workspaceDir: string, opts: WriteConfigFilesOptions): Promise<EnvsWrittenExtendingConfigFiles>;
|
package/dist/writers/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { handleExtendingConfigFiles } from './extending-config-files';
|
|
2
|
-
export { handleRealConfigFiles } from './real-config-files';
|
|
3
|
-
export type { EnvsWrittenRealConfigFiles, EnvsWrittenRealConfigFile, WrittenConfigFile } from './real-config-files';
|
|
4
|
-
export type { EnvsWrittenExtendingConfigFiles, EnvsWrittenExtendingConfigFile, ExtendingConfigFilesMap, } from './extending-config-files';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ConfigFile } from '../config-writer-entry';
|
|
2
|
-
import { EnvCompsDirsMap, EnvConfigWriterEntry, WriteConfigFilesOptions } from '../workspace-config-files.main.runtime';
|
|
3
|
-
export type EnvsWrittenRealConfigFiles = Array<EnvsWrittenRealConfigFile>;
|
|
4
|
-
export type EnvsWrittenRealConfigFile = {
|
|
5
|
-
envIds: string[];
|
|
6
|
-
writtenRealConfigFile: WrittenConfigFile;
|
|
7
|
-
};
|
|
8
|
-
export type WrittenRealConfigFilesByHash = {
|
|
9
|
-
[hash: string]: EnvsWrittenRealConfigFile;
|
|
10
|
-
};
|
|
11
|
-
export type WrittenConfigFile = Required<ConfigFile> & {
|
|
12
|
-
filePath: string;
|
|
13
|
-
};
|
|
14
|
-
export declare function handleRealConfigFiles(envEntries: EnvConfigWriterEntry[], envCompsDirsMap: EnvCompsDirsMap, configsRootDir: string, workspaceDir: string, opts: WriteConfigFilesOptions): Promise<WrittenRealConfigFilesByHash>;
|
package/dist/ws-config.cmd.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { WorkspaceConfigFilesMain } from './workspace-config-files.main.runtime';
|
|
3
|
-
export type CleanConfigCmdFlags = {
|
|
4
|
-
dryRun?: boolean;
|
|
5
|
-
silent?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type WriteConfigCmdFlags = {
|
|
8
|
-
dryRun?: boolean;
|
|
9
|
-
writers?: string;
|
|
10
|
-
noDedupe?: boolean;
|
|
11
|
-
dryRunWithContent?: boolean;
|
|
12
|
-
clean?: boolean;
|
|
13
|
-
silent?: boolean;
|
|
14
|
-
verbose?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare class WsConfigCmd implements Command {
|
|
17
|
-
name: string;
|
|
18
|
-
alias: string;
|
|
19
|
-
description: string;
|
|
20
|
-
options: never[];
|
|
21
|
-
group: string;
|
|
22
|
-
commands: Command[];
|
|
23
|
-
report([unrecognizedSubcommand]: [string]): Promise<string>;
|
|
24
|
-
}
|
|
25
|
-
export declare class WsConfigWriteCmd implements Command {
|
|
26
|
-
private workspaceConfigFilesMain;
|
|
27
|
-
name: string;
|
|
28
|
-
description: string;
|
|
29
|
-
alias: string;
|
|
30
|
-
group: string;
|
|
31
|
-
options: CommandOptions;
|
|
32
|
-
constructor(workspaceConfigFilesMain: WorkspaceConfigFilesMain);
|
|
33
|
-
report(_args: any, flags: WriteConfigCmdFlags): Promise<string>;
|
|
34
|
-
json(_args: any, flags: WriteConfigCmdFlags): Promise<{
|
|
35
|
-
wsDir: string;
|
|
36
|
-
cleanResults: string[] | undefined;
|
|
37
|
-
writeResults: import("./workspace-config-files.main.runtime").WriteResults;
|
|
38
|
-
}>;
|
|
39
|
-
}
|
|
40
|
-
export declare class WsConfigCleanCmd implements Command {
|
|
41
|
-
private workspaceConfigFilesMain;
|
|
42
|
-
name: string;
|
|
43
|
-
description: string;
|
|
44
|
-
alias: string;
|
|
45
|
-
group: string;
|
|
46
|
-
options: CommandOptions;
|
|
47
|
-
constructor(workspaceConfigFilesMain: WorkspaceConfigFilesMain);
|
|
48
|
-
report(_args: any, flags: CleanConfigCmdFlags): Promise<string>;
|
|
49
|
-
json(_args: any, flags: WriteConfigCmdFlags): Promise<string[]>;
|
|
50
|
-
}
|
|
51
|
-
export declare class WsConfigListCmd implements Command {
|
|
52
|
-
private workspaceConfigFilesMain;
|
|
53
|
-
name: string;
|
|
54
|
-
description: string;
|
|
55
|
-
alias: string;
|
|
56
|
-
group: string;
|
|
57
|
-
options: CommandOptions;
|
|
58
|
-
constructor(workspaceConfigFilesMain: WorkspaceConfigFilesMain);
|
|
59
|
-
report(): Promise<string>;
|
|
60
|
-
json(): Promise<import("./workspace-config-files.main.runtime").EnvConfigWritersList>;
|
|
61
|
-
}
|