@teambit/eject 1.0.226 → 1.0.227
Sign up to get free protection for your applications and to get access to all the features.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_workspace_eject-preview.js +1 -1
- package/artifacts/schema.json +27 -116
- package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
- package/package.json +7 -7
- package/tsconfig.json +16 -1
- package/dist/components-ejector.d.ts +0 -66
- package/dist/eject-cmd.d.ts +0 -26
- package/dist/eject-template.d.ts +0 -4
- package/dist/eject.aspect.d.ts +0 -2
- package/dist/eject.composition.d.ts +0 -1
- package/dist/eject.main.runtime.d.ts +0 -16
- package/dist/index.d.ts +0 -4
@@ -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.workspace/eject@1.0.
|
3
|
+
<testsuite name="teambit.workspace/eject@1.0.227" tests="0" failures="0" errors="0" skipped="0"/>
|
4
4
|
</testsuites>
|
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.workspace/eject-preview"]=t():e["teambit.workspace/eject-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.workspace/eject-preview"]=t():e["teambit.workspace/eject-preview"]=t()}(self,(()=>(()=>{"use strict";var e={51129:(e,t,o)=>{var n={id:"teambit.workspace/eject@1.0.227",homepage:"https://bit.cloud/teambit/workspace/eject",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/eject.svg"}));a.__bit_component=n,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>m,compositions_metadata:()=>u,overview:()=>l});var e={};o.r(e),o.d(e,{default:()=>s});var t=o(51129);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},d="wrapper";function s(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,a);return(0,r.mdx)(d,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,r.mdx)("p",null,"One of the common scenarios of using ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit eject")," is to make a quick change to an external (component) dependency. The component needs to be imported first and once it's changed and exported, there is no need to keep it in the current workspace. Without ",(0,r.mdx)("inlineCode",{parentName:"p"},"eject"),", the next steps would be: 1) remove the component from the workspace by ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit remove")," and 2) installing the component by ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit install"),"."),(0,r.mdx)("p",null,(0,r.mdx)("inlineCode",{parentName:"p"},"bit eject")," combines the commands above to one command."),(0,r.mdx)("h2",null,"Eject process"),(0,r.mdx)("p",null,"The following steps are done during the ",(0,r.mdx)("inlineCode",{parentName:"p"},"eject")," process."),(0,r.mdx)("ol",null,(0,r.mdx)("li",{parentName:"ol"},"remove the component's data from node-modules so then it won't interfere with the package installation."),(0,r.mdx)("li",{parentName:"ol"},"remove the component from the .bitmap file."),(0,r.mdx)("li",{parentName:"ol"},"install the component as a package by the package manager and add the package to the ",(0,r.mdx)("inlineCode",{parentName:"li"},"workspace.json")," file."),(0,r.mdx)("li",{parentName:"ol"},"depends on the ",(0,r.mdx)("inlineCode",{parentName:"li"},"--keep-files")," flag, deletes the component files from the workspace."))))}s.isMDXComponent=!0;const m=[t],l=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
|
package/artifacts/schema.json
CHANGED
@@ -48,11 +48,7 @@
|
|
48
48
|
"line": 11,
|
49
49
|
"character": 34
|
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": 11,
|
73
69
|
"character": 62
|
74
70
|
},
|
75
|
-
"name": "InstallMain"
|
76
|
-
"componentId": {
|
77
|
-
"scope": "teambit.workspace",
|
78
|
-
"name": "install"
|
79
|
-
}
|
71
|
+
"name": "InstallMain"
|
80
72
|
},
|
81
73
|
"isOptional": false,
|
82
74
|
"isSpread": false
|
@@ -96,11 +88,7 @@
|
|
96
88
|
"line": 11,
|
97
89
|
"character": 91
|
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
|
@@ -149,12 +137,7 @@
|
|
149
137
|
"line": 12,
|
150
138
|
"character": 29
|
151
139
|
},
|
152
|
-
"name": "ComponentID"
|
153
|
-
"componentId": {
|
154
|
-
"scope": "teambit.component",
|
155
|
-
"name": "component-id",
|
156
|
-
"version": "1.2.0"
|
157
|
-
}
|
140
|
+
"name": "ComponentID"
|
158
141
|
}
|
159
142
|
},
|
160
143
|
"isOptional": false,
|
@@ -175,8 +158,7 @@
|
|
175
158
|
"line": 12,
|
176
159
|
"character": 58
|
177
160
|
},
|
178
|
-
"name": "EjectOptions"
|
179
|
-
"internalFilePath": "components-ejector.ts"
|
161
|
+
"name": "EjectOptions"
|
180
162
|
},
|
181
163
|
"isOptional": true,
|
182
164
|
"defaultValue": "{}",
|
@@ -282,11 +264,7 @@
|
|
282
264
|
"line": 28,
|
283
265
|
"character": 65
|
284
266
|
},
|
285
|
-
"name": "CLIMain"
|
286
|
-
"componentId": {
|
287
|
-
"scope": "teambit.harmony",
|
288
|
-
"name": "cli"
|
289
|
-
}
|
267
|
+
"name": "CLIMain"
|
290
268
|
},
|
291
269
|
{
|
292
270
|
"__schema": "TypeRefSchema",
|
@@ -295,11 +273,7 @@
|
|
295
273
|
"line": 28,
|
296
274
|
"character": 74
|
297
275
|
},
|
298
|
-
"name": "Workspace"
|
299
|
-
"componentId": {
|
300
|
-
"scope": "teambit.workspace",
|
301
|
-
"name": "workspace"
|
302
|
-
}
|
276
|
+
"name": "Workspace"
|
303
277
|
},
|
304
278
|
{
|
305
279
|
"__schema": "TypeRefSchema",
|
@@ -308,11 +282,7 @@
|
|
308
282
|
"line": 28,
|
309
283
|
"character": 85
|
310
284
|
},
|
311
|
-
"name": "LoggerMain"
|
312
|
-
"componentId": {
|
313
|
-
"scope": "teambit.harmony",
|
314
|
-
"name": "logger"
|
315
|
-
}
|
285
|
+
"name": "LoggerMain"
|
316
286
|
},
|
317
287
|
{
|
318
288
|
"__schema": "TypeRefSchema",
|
@@ -321,11 +291,7 @@
|
|
321
291
|
"line": 28,
|
322
292
|
"character": 97
|
323
293
|
},
|
324
|
-
"name": "InstallMain"
|
325
|
-
"componentId": {
|
326
|
-
"scope": "teambit.workspace",
|
327
|
-
"name": "install"
|
328
|
-
}
|
294
|
+
"name": "InstallMain"
|
329
295
|
}
|
330
296
|
]
|
331
297
|
},
|
@@ -555,11 +521,7 @@
|
|
555
521
|
"line": 11,
|
556
522
|
"character": 34
|
557
523
|
},
|
558
|
-
"name": "Workspace"
|
559
|
-
"componentId": {
|
560
|
-
"scope": "teambit.workspace",
|
561
|
-
"name": "workspace"
|
562
|
-
}
|
524
|
+
"name": "Workspace"
|
563
525
|
},
|
564
526
|
"isOptional": false,
|
565
527
|
"isSpread": false
|
@@ -579,11 +541,7 @@
|
|
579
541
|
"line": 11,
|
580
542
|
"character": 62
|
581
543
|
},
|
582
|
-
"name": "InstallMain"
|
583
|
-
"componentId": {
|
584
|
-
"scope": "teambit.workspace",
|
585
|
-
"name": "install"
|
586
|
-
}
|
544
|
+
"name": "InstallMain"
|
587
545
|
},
|
588
546
|
"isOptional": false,
|
589
547
|
"isSpread": false
|
@@ -603,11 +561,7 @@
|
|
603
561
|
"line": 11,
|
604
562
|
"character": 91
|
605
563
|
},
|
606
|
-
"name": "Logger"
|
607
|
-
"componentId": {
|
608
|
-
"scope": "teambit.harmony",
|
609
|
-
"name": "logger"
|
610
|
-
}
|
564
|
+
"name": "Logger"
|
611
565
|
},
|
612
566
|
"isOptional": false,
|
613
567
|
"isSpread": false
|
@@ -656,12 +610,7 @@
|
|
656
610
|
"line": 12,
|
657
611
|
"character": 29
|
658
612
|
},
|
659
|
-
"name": "ComponentID"
|
660
|
-
"componentId": {
|
661
|
-
"scope": "teambit.component",
|
662
|
-
"name": "component-id",
|
663
|
-
"version": "1.2.0"
|
664
|
-
}
|
613
|
+
"name": "ComponentID"
|
665
614
|
}
|
666
615
|
},
|
667
616
|
"isOptional": false,
|
@@ -682,8 +631,7 @@
|
|
682
631
|
"line": 12,
|
683
632
|
"character": 58
|
684
633
|
},
|
685
|
-
"name": "EjectOptions"
|
686
|
-
"internalFilePath": "components-ejector.ts"
|
634
|
+
"name": "EjectOptions"
|
687
635
|
},
|
688
636
|
"isOptional": true,
|
689
637
|
"defaultValue": "{}",
|
@@ -789,11 +737,7 @@
|
|
789
737
|
"line": 28,
|
790
738
|
"character": 65
|
791
739
|
},
|
792
|
-
"name": "CLIMain"
|
793
|
-
"componentId": {
|
794
|
-
"scope": "teambit.harmony",
|
795
|
-
"name": "cli"
|
796
|
-
}
|
740
|
+
"name": "CLIMain"
|
797
741
|
},
|
798
742
|
{
|
799
743
|
"__schema": "TypeRefSchema",
|
@@ -802,11 +746,7 @@
|
|
802
746
|
"line": 28,
|
803
747
|
"character": 74
|
804
748
|
},
|
805
|
-
"name": "Workspace"
|
806
|
-
"componentId": {
|
807
|
-
"scope": "teambit.workspace",
|
808
|
-
"name": "workspace"
|
809
|
-
}
|
749
|
+
"name": "Workspace"
|
810
750
|
},
|
811
751
|
{
|
812
752
|
"__schema": "TypeRefSchema",
|
@@ -815,11 +755,7 @@
|
|
815
755
|
"line": 28,
|
816
756
|
"character": 85
|
817
757
|
},
|
818
|
-
"name": "LoggerMain"
|
819
|
-
"componentId": {
|
820
|
-
"scope": "teambit.harmony",
|
821
|
-
"name": "logger"
|
822
|
-
}
|
758
|
+
"name": "LoggerMain"
|
823
759
|
},
|
824
760
|
{
|
825
761
|
"__schema": "TypeRefSchema",
|
@@ -828,11 +764,7 @@
|
|
828
764
|
"line": 28,
|
829
765
|
"character": 97
|
830
766
|
},
|
831
|
-
"name": "InstallMain"
|
832
|
-
"componentId": {
|
833
|
-
"scope": "teambit.workspace",
|
834
|
-
"name": "install"
|
835
|
-
}
|
767
|
+
"name": "InstallMain"
|
836
768
|
}
|
837
769
|
]
|
838
770
|
},
|
@@ -1105,8 +1037,7 @@
|
|
1105
1037
|
"line": 45,
|
1106
1038
|
"character": 22
|
1107
1039
|
},
|
1108
|
-
"name": "Component"
|
1109
|
-
"packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
|
1040
|
+
"name": "Component"
|
1110
1041
|
}
|
1111
1042
|
},
|
1112
1043
|
"isOptional": true,
|
@@ -1182,8 +1113,7 @@
|
|
1182
1113
|
"line": 47,
|
1183
1114
|
"character": 76
|
1184
1115
|
},
|
1185
|
-
"name": "Component"
|
1186
|
-
"packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
|
1116
|
+
"name": "Component"
|
1187
1117
|
}
|
1188
1118
|
},
|
1189
1119
|
"isOptional": false
|
@@ -1238,8 +1168,7 @@
|
|
1238
1168
|
"line": 50,
|
1239
1169
|
"character": 34
|
1240
1170
|
},
|
1241
|
-
"name": "PackageJsonFile"
|
1242
|
-
"packageName": "@teambit/legacy/dist/consumer/component/package-json-file"
|
1171
|
+
"name": "PackageJsonFile"
|
1243
1172
|
}
|
1244
1173
|
},
|
1245
1174
|
"isOptional": false
|
@@ -1269,11 +1198,7 @@
|
|
1269
1198
|
"line": 52,
|
1270
1199
|
"character": 24
|
1271
1200
|
},
|
1272
|
-
"name": "Workspace"
|
1273
|
-
"componentId": {
|
1274
|
-
"scope": "teambit.workspace",
|
1275
|
-
"name": "workspace"
|
1276
|
-
}
|
1201
|
+
"name": "Workspace"
|
1277
1202
|
},
|
1278
1203
|
"isOptional": false,
|
1279
1204
|
"isSpread": false
|
@@ -1293,11 +1218,7 @@
|
|
1293
1218
|
"line": 53,
|
1294
1219
|
"character": 22
|
1295
1220
|
},
|
1296
|
-
"name": "InstallMain"
|
1297
|
-
"componentId": {
|
1298
|
-
"scope": "teambit.workspace",
|
1299
|
-
"name": "install"
|
1300
|
-
}
|
1221
|
+
"name": "InstallMain"
|
1301
1222
|
},
|
1302
1223
|
"isOptional": false,
|
1303
1224
|
"isSpread": false
|
@@ -1317,11 +1238,7 @@
|
|
1317
1238
|
"line": 54,
|
1318
1239
|
"character": 21
|
1319
1240
|
},
|
1320
|
-
"name": "Logger"
|
1321
|
-
"componentId": {
|
1322
|
-
"scope": "teambit.harmony",
|
1323
|
-
"name": "logger"
|
1324
|
-
}
|
1241
|
+
"name": "Logger"
|
1325
1242
|
},
|
1326
1243
|
"isOptional": false,
|
1327
1244
|
"isSpread": false
|
@@ -1348,12 +1265,7 @@
|
|
1348
1265
|
"line": 55,
|
1349
1266
|
"character": 28
|
1350
1267
|
},
|
1351
|
-
"name": "ComponentID"
|
1352
|
-
"componentId": {
|
1353
|
-
"scope": "teambit.component",
|
1354
|
-
"name": "component-id",
|
1355
|
-
"version": "1.2.0"
|
1356
|
-
}
|
1268
|
+
"name": "ComponentID"
|
1357
1269
|
}
|
1358
1270
|
},
|
1359
1271
|
"isOptional": false,
|
@@ -1374,8 +1286,7 @@
|
|
1374
1286
|
"line": 56,
|
1375
1287
|
"character": 27
|
1376
1288
|
},
|
1377
|
-
"name": "EjectOptions"
|
1378
|
-
"internalFilePath": "components-ejector.ts"
|
1289
|
+
"name": "EjectOptions"
|
1379
1290
|
},
|
1380
1291
|
"isOptional": false,
|
1381
1292
|
"isSpread": false
|
@@ -1852,7 +1763,7 @@
|
|
1852
1763
|
"componentId": {
|
1853
1764
|
"scope": "teambit.workspace",
|
1854
1765
|
"name": "eject",
|
1855
|
-
"version": "1.0.
|
1766
|
+
"version": "1.0.227"
|
1856
1767
|
},
|
1857
1768
|
"taggedModuleExports": []
|
1858
1769
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.227/dist/eject.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.227/dist/eject.docs.mdx';
|
3
3
|
|
4
4
|
export const compositions = [compositions_0];
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/eject",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.227",
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/eject",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.workspace",
|
8
8
|
"name": "eject",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.227"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
13
13
|
"@teambit/component-id": "1.2.0",
|
14
14
|
"@teambit/harmony": "0.4.6",
|
15
|
-
"@teambit/install": "1.0.
|
16
|
-
"@teambit/logger": "0.0.
|
17
|
-
"@teambit/workspace": "1.0.
|
18
|
-
"@teambit/cli": "0.0.
|
15
|
+
"@teambit/install": "1.0.227",
|
16
|
+
"@teambit/logger": "0.0.953",
|
17
|
+
"@teambit/workspace": "1.0.227",
|
18
|
+
"@teambit/cli": "0.0.860"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
21
|
"@types/mocha": "9.1.0",
|
22
22
|
"chai": "4.3.0",
|
23
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
23
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
26
|
"react": "^17.0.0 || ^18.0.0",
|
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.workspace_install@1.0.227"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
52
|
+
}
|
38
53
|
]
|
39
54
|
}
|
@@ -1,66 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* a classic use case of eject is when a user imports a component using `bit import` to update it,
|
3
|
-
* but the user has no intention to have the code as part of the project source code.
|
4
|
-
* the eject provides the option to delete the component locally and install it via the NPM client.
|
5
|
-
*
|
6
|
-
* an implementation note, the entire process is done with rollback in mind.
|
7
|
-
* since installing the component via NPM client is an error prone process, we do it first, before
|
8
|
-
* removing the component files, so then it's easier to rollback.
|
9
|
-
*/
|
10
|
-
import { Workspace } from '@teambit/workspace';
|
11
|
-
import { Consumer } from '@teambit/legacy/dist/consumer';
|
12
|
-
import { ComponentIdList, ComponentID } from '@teambit/component-id';
|
13
|
-
import Component from '@teambit/legacy/dist/consumer/component/consumer-component';
|
14
|
-
import PackageJsonFile from '@teambit/legacy/dist/consumer/component/package-json-file';
|
15
|
-
import { Logger } from '@teambit/logger';
|
16
|
-
import { InstallMain } from '@teambit/install';
|
17
|
-
export type EjectResults = {
|
18
|
-
ejectedComponents: ComponentIdList;
|
19
|
-
failedComponents: FailedComponents;
|
20
|
-
};
|
21
|
-
export type EjectOptions = {
|
22
|
-
force?: boolean;
|
23
|
-
keepFiles?: boolean;
|
24
|
-
skipDependencyInstallation?: boolean;
|
25
|
-
};
|
26
|
-
type FailedComponents = {
|
27
|
-
modifiedComponents: ComponentIdList;
|
28
|
-
stagedComponents: ComponentIdList;
|
29
|
-
notExportedComponents: ComponentIdList;
|
30
|
-
selfHostedExportedComponents: ComponentIdList;
|
31
|
-
};
|
32
|
-
export declare class ComponentsEjector {
|
33
|
-
private workspace;
|
34
|
-
private install;
|
35
|
-
private logger;
|
36
|
-
private componentsIds;
|
37
|
-
private ejectOptions;
|
38
|
-
consumer: Consumer;
|
39
|
-
idsToEject: ComponentIdList;
|
40
|
-
componentsToEject: Component[];
|
41
|
-
notEjectedDependents: Array<{
|
42
|
-
dependent: Component;
|
43
|
-
ejectedDependencies: Component[];
|
44
|
-
}>;
|
45
|
-
failedComponents: FailedComponents;
|
46
|
-
packageJsonFilesBeforeChanges: PackageJsonFile[];
|
47
|
-
constructor(workspace: Workspace, install: InstallMain, logger: Logger, componentsIds: ComponentID[], ejectOptions: EjectOptions);
|
48
|
-
eject(): Promise<EjectResults>;
|
49
|
-
decideWhichComponentsToEject(): Promise<void>;
|
50
|
-
loadComponentsToEject(): Promise<void>;
|
51
|
-
removeComponentsFromNodeModules(): Promise<void>;
|
52
|
-
installPackages(): Promise<void>;
|
53
|
-
getPackagesToInstall(): string[];
|
54
|
-
_buildExceptionMessageWithRollbackData(action: string): string;
|
55
|
-
/**
|
56
|
-
* as part of the 'eject' operation, a component is removed locally. as opposed to the remove
|
57
|
-
* command, in this case, no need to remove the objects from the scope, only remove from the
|
58
|
-
* filesystem, which means, delete the component files, untrack from .bitmap and clean
|
59
|
-
* package.json and bit.json traces.
|
60
|
-
*/
|
61
|
-
private removeComponentsFiles;
|
62
|
-
private untrackComponents;
|
63
|
-
throwEjectError(message: string, originalError: Error): void;
|
64
|
-
_validateIdsHaveScopesAndVersions(): void;
|
65
|
-
}
|
66
|
-
export {};
|
package/dist/eject-cmd.d.ts
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
2
|
-
import { Workspace } from '@teambit/workspace';
|
3
|
-
import { EjectMain } from './eject.main.runtime';
|
4
|
-
export declare class EjectCmd implements Command {
|
5
|
-
private ejectMain;
|
6
|
-
private workspace;
|
7
|
-
name: string;
|
8
|
-
description: string;
|
9
|
-
extendedDescription: string;
|
10
|
-
helpUrl: string;
|
11
|
-
arguments: {
|
12
|
-
name: string;
|
13
|
-
description: string;
|
14
|
-
}[];
|
15
|
-
alias: string;
|
16
|
-
options: CommandOptions;
|
17
|
-
loader: boolean;
|
18
|
-
group: string;
|
19
|
-
constructor(ejectMain: EjectMain, workspace: Workspace);
|
20
|
-
report([pattern]: [string], { force, json, keepFiles, skipDependencyInstallation, }: {
|
21
|
-
force: boolean;
|
22
|
-
json: boolean;
|
23
|
-
keepFiles: boolean;
|
24
|
-
skipDependencyInstallation?: boolean;
|
25
|
-
}): Promise<string>;
|
26
|
-
}
|
package/dist/eject-template.d.ts
DELETED
@@ -1,4 +0,0 @@
|
|
1
|
-
import { EjectResults } from './components-ejector';
|
2
|
-
export declare const successEjectMessage = "successfully ejected the following components";
|
3
|
-
export declare const failureEjectMessage = "failed to eject the following components";
|
4
|
-
export declare function ejectTemplate(ejectResults: EjectResults): string;
|
package/dist/eject.aspect.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { CLIMain } from '@teambit/cli';
|
2
|
-
import { ComponentID } from '@teambit/component-id';
|
3
|
-
import { Logger, LoggerMain } from '@teambit/logger';
|
4
|
-
import { Workspace } from '@teambit/workspace';
|
5
|
-
import { InstallMain } from '@teambit/install';
|
6
|
-
import { EjectOptions, EjectResults } from './components-ejector';
|
7
|
-
export declare class EjectMain {
|
8
|
-
private workspace;
|
9
|
-
private install;
|
10
|
-
private logger;
|
11
|
-
constructor(workspace: Workspace, install: InstallMain, logger: Logger);
|
12
|
-
eject(componentIds: ComponentID[], ejectOptions?: EjectOptions): Promise<EjectResults>;
|
13
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
14
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
15
|
-
static provider([cli, workspace, loggerMain, install]: [CLIMain, Workspace, LoggerMain, InstallMain]): Promise<EjectMain>;
|
16
|
-
}
|
package/dist/index.d.ts
DELETED