@teambit/eject 1.0.187 → 1.0.189

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.187" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.workspace/eject@1.0.189" 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={3608:(e,t,o)=>{var n={id:"teambit.workspace/eject@1.0.187",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(3608);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})()));
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={8614:(e,t,o)=>{var n={id:"teambit.workspace/eject@1.0.189",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(8614);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})()));
@@ -48,7 +48,11 @@
48
48
  "line": 11,
49
49
  "character": 34
50
50
  },
51
- "name": "Workspace"
51
+ "name": "Workspace",
52
+ "componentId": {
53
+ "scope": "teambit.workspace",
54
+ "name": "workspace"
55
+ }
52
56
  },
53
57
  "isOptional": false,
54
58
  "isSpread": false
@@ -68,7 +72,11 @@
68
72
  "line": 11,
69
73
  "character": 62
70
74
  },
71
- "name": "InstallMain"
75
+ "name": "InstallMain",
76
+ "componentId": {
77
+ "scope": "teambit.workspace",
78
+ "name": "install"
79
+ }
72
80
  },
73
81
  "isOptional": false,
74
82
  "isSpread": false
@@ -88,7 +96,11 @@
88
96
  "line": 11,
89
97
  "character": 91
90
98
  },
91
- "name": "Logger"
99
+ "name": "Logger",
100
+ "componentId": {
101
+ "scope": "teambit.harmony",
102
+ "name": "logger"
103
+ }
92
104
  },
93
105
  "isOptional": false,
94
106
  "isSpread": false
@@ -137,7 +149,12 @@
137
149
  "line": 12,
138
150
  "character": 29
139
151
  },
140
- "name": "ComponentID"
152
+ "name": "ComponentID",
153
+ "componentId": {
154
+ "scope": "teambit.component",
155
+ "name": "component-id",
156
+ "version": "1.2.0"
157
+ }
141
158
  }
142
159
  },
143
160
  "isOptional": false,
@@ -158,7 +175,8 @@
158
175
  "line": 12,
159
176
  "character": 58
160
177
  },
161
- "name": "EjectOptions"
178
+ "name": "EjectOptions",
179
+ "internalFilePath": "components-ejector.ts"
162
180
  },
163
181
  "isOptional": true,
164
182
  "defaultValue": "{}",
@@ -264,7 +282,11 @@
264
282
  "line": 28,
265
283
  "character": 65
266
284
  },
267
- "name": "CLIMain"
285
+ "name": "CLIMain",
286
+ "componentId": {
287
+ "scope": "teambit.harmony",
288
+ "name": "cli"
289
+ }
268
290
  },
269
291
  {
270
292
  "__schema": "TypeRefSchema",
@@ -273,7 +295,11 @@
273
295
  "line": 28,
274
296
  "character": 74
275
297
  },
276
- "name": "Workspace"
298
+ "name": "Workspace",
299
+ "componentId": {
300
+ "scope": "teambit.workspace",
301
+ "name": "workspace"
302
+ }
277
303
  },
278
304
  {
279
305
  "__schema": "TypeRefSchema",
@@ -282,7 +308,11 @@
282
308
  "line": 28,
283
309
  "character": 85
284
310
  },
285
- "name": "LoggerMain"
311
+ "name": "LoggerMain",
312
+ "componentId": {
313
+ "scope": "teambit.harmony",
314
+ "name": "logger"
315
+ }
286
316
  },
287
317
  {
288
318
  "__schema": "TypeRefSchema",
@@ -291,7 +321,11 @@
291
321
  "line": 28,
292
322
  "character": 97
293
323
  },
294
- "name": "InstallMain"
324
+ "name": "InstallMain",
325
+ "componentId": {
326
+ "scope": "teambit.workspace",
327
+ "name": "install"
328
+ }
295
329
  }
296
330
  ]
297
331
  },
@@ -521,7 +555,11 @@
521
555
  "line": 11,
522
556
  "character": 34
523
557
  },
524
- "name": "Workspace"
558
+ "name": "Workspace",
559
+ "componentId": {
560
+ "scope": "teambit.workspace",
561
+ "name": "workspace"
562
+ }
525
563
  },
526
564
  "isOptional": false,
527
565
  "isSpread": false
@@ -541,7 +579,11 @@
541
579
  "line": 11,
542
580
  "character": 62
543
581
  },
544
- "name": "InstallMain"
582
+ "name": "InstallMain",
583
+ "componentId": {
584
+ "scope": "teambit.workspace",
585
+ "name": "install"
586
+ }
545
587
  },
546
588
  "isOptional": false,
547
589
  "isSpread": false
@@ -561,7 +603,11 @@
561
603
  "line": 11,
562
604
  "character": 91
563
605
  },
564
- "name": "Logger"
606
+ "name": "Logger",
607
+ "componentId": {
608
+ "scope": "teambit.harmony",
609
+ "name": "logger"
610
+ }
565
611
  },
566
612
  "isOptional": false,
567
613
  "isSpread": false
@@ -610,7 +656,12 @@
610
656
  "line": 12,
611
657
  "character": 29
612
658
  },
613
- "name": "ComponentID"
659
+ "name": "ComponentID",
660
+ "componentId": {
661
+ "scope": "teambit.component",
662
+ "name": "component-id",
663
+ "version": "1.2.0"
664
+ }
614
665
  }
615
666
  },
616
667
  "isOptional": false,
@@ -631,7 +682,8 @@
631
682
  "line": 12,
632
683
  "character": 58
633
684
  },
634
- "name": "EjectOptions"
685
+ "name": "EjectOptions",
686
+ "internalFilePath": "components-ejector.ts"
635
687
  },
636
688
  "isOptional": true,
637
689
  "defaultValue": "{}",
@@ -737,7 +789,11 @@
737
789
  "line": 28,
738
790
  "character": 65
739
791
  },
740
- "name": "CLIMain"
792
+ "name": "CLIMain",
793
+ "componentId": {
794
+ "scope": "teambit.harmony",
795
+ "name": "cli"
796
+ }
741
797
  },
742
798
  {
743
799
  "__schema": "TypeRefSchema",
@@ -746,7 +802,11 @@
746
802
  "line": 28,
747
803
  "character": 74
748
804
  },
749
- "name": "Workspace"
805
+ "name": "Workspace",
806
+ "componentId": {
807
+ "scope": "teambit.workspace",
808
+ "name": "workspace"
809
+ }
750
810
  },
751
811
  {
752
812
  "__schema": "TypeRefSchema",
@@ -755,7 +815,11 @@
755
815
  "line": 28,
756
816
  "character": 85
757
817
  },
758
- "name": "LoggerMain"
818
+ "name": "LoggerMain",
819
+ "componentId": {
820
+ "scope": "teambit.harmony",
821
+ "name": "logger"
822
+ }
759
823
  },
760
824
  {
761
825
  "__schema": "TypeRefSchema",
@@ -764,7 +828,11 @@
764
828
  "line": 28,
765
829
  "character": 97
766
830
  },
767
- "name": "InstallMain"
831
+ "name": "InstallMain",
832
+ "componentId": {
833
+ "scope": "teambit.workspace",
834
+ "name": "install"
835
+ }
768
836
  }
769
837
  ]
770
838
  },
@@ -1037,7 +1105,8 @@
1037
1105
  "line": 45,
1038
1106
  "character": 22
1039
1107
  },
1040
- "name": "Component"
1108
+ "name": "Component",
1109
+ "packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
1041
1110
  }
1042
1111
  },
1043
1112
  "isOptional": true,
@@ -1113,7 +1182,8 @@
1113
1182
  "line": 47,
1114
1183
  "character": 76
1115
1184
  },
1116
- "name": "Component"
1185
+ "name": "Component",
1186
+ "packageName": "@teambit/legacy/dist/consumer/component/consumer-component"
1117
1187
  }
1118
1188
  },
1119
1189
  "isOptional": false
@@ -1168,7 +1238,8 @@
1168
1238
  "line": 50,
1169
1239
  "character": 34
1170
1240
  },
1171
- "name": "PackageJsonFile"
1241
+ "name": "PackageJsonFile",
1242
+ "packageName": "@teambit/legacy/dist/consumer/component/package-json-file"
1172
1243
  }
1173
1244
  },
1174
1245
  "isOptional": false
@@ -1198,7 +1269,11 @@
1198
1269
  "line": 52,
1199
1270
  "character": 24
1200
1271
  },
1201
- "name": "Workspace"
1272
+ "name": "Workspace",
1273
+ "componentId": {
1274
+ "scope": "teambit.workspace",
1275
+ "name": "workspace"
1276
+ }
1202
1277
  },
1203
1278
  "isOptional": false,
1204
1279
  "isSpread": false
@@ -1218,7 +1293,11 @@
1218
1293
  "line": 53,
1219
1294
  "character": 22
1220
1295
  },
1221
- "name": "InstallMain"
1296
+ "name": "InstallMain",
1297
+ "componentId": {
1298
+ "scope": "teambit.workspace",
1299
+ "name": "install"
1300
+ }
1222
1301
  },
1223
1302
  "isOptional": false,
1224
1303
  "isSpread": false
@@ -1238,7 +1317,11 @@
1238
1317
  "line": 54,
1239
1318
  "character": 21
1240
1319
  },
1241
- "name": "Logger"
1320
+ "name": "Logger",
1321
+ "componentId": {
1322
+ "scope": "teambit.harmony",
1323
+ "name": "logger"
1324
+ }
1242
1325
  },
1243
1326
  "isOptional": false,
1244
1327
  "isSpread": false
@@ -1265,7 +1348,12 @@
1265
1348
  "line": 55,
1266
1349
  "character": 28
1267
1350
  },
1268
- "name": "ComponentID"
1351
+ "name": "ComponentID",
1352
+ "componentId": {
1353
+ "scope": "teambit.component",
1354
+ "name": "component-id",
1355
+ "version": "1.2.0"
1356
+ }
1269
1357
  }
1270
1358
  },
1271
1359
  "isOptional": false,
@@ -1286,7 +1374,8 @@
1286
1374
  "line": 56,
1287
1375
  "character": 27
1288
1376
  },
1289
- "name": "EjectOptions"
1377
+ "name": "EjectOptions",
1378
+ "internalFilePath": "components-ejector.ts"
1290
1379
  },
1291
1380
  "isOptional": false,
1292
1381
  "isSpread": false
@@ -1763,7 +1852,7 @@
1763
1852
  "componentId": {
1764
1853
  "scope": "teambit.workspace",
1765
1854
  "name": "eject",
1766
- "version": "1.0.187"
1855
+ "version": "1.0.189"
1767
1856
  },
1768
1857
  "taggedModuleExports": []
1769
1858
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_componentId","data","require","_defaultErrorHandler","_interopRequireDefault","_scopeRemotes","_componentIdToPackageName","packageJsonUtils","_interopRequireWildcard","_dataToPersist","_removePath","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","ComponentsEjector","constructor","workspace","install","logger","componentsIds","ejectOptions","consumer","idsToEject","ComponentIdList","failedComponents","modifiedComponents","stagedComponents","notExportedComponents","selfHostedExportedComponents","eject","decideWhichComponentsToEject","debug","length","loadComponentsToEject","_validateIdsHaveScopesAndVersions","removeComponentsFromNodeModules","untrackComponents","installPackages","removeComponentsFiles","writeBitMap","ejectedComponents","setStatusLine","remotes","getScopeRemotes","scope","hubExportedComponents","forEach","componentId","bitId","isExported","push","isHub","force","Promise","all","map","id","componentStatus","getComponentStatusById","modified","staged","err","throwEjectError","toString","consoleSuccess","components","loadComponents","componentsToEject","action","skipDependencyInstallation","packages","getPackagesToInstall","c","componentIdToPackageName","_buildExceptionMessageWithRollbackData","keepFiles","dataToPersist","DataToPersist","component","componentMap","Error","rootDir","removePath","RemovePath","addBasePath","getPath","persistAllToFS","cleanFromBitMap","message","originalError","originalErrorMessage","defaultErrorHandler","error","hasScope","hasVersion","exports"],"sources":["components-ejector.ts"],"sourcesContent":["/**\n * a classic use case of eject is when a user imports a component using `bit import` to update it,\n * but the user has no intention to have the code as part of the project source code.\n * the eject provides the option to delete the component locally and install it via the NPM client.\n *\n * an implementation note, the entire process is done with rollback in mind.\n * since installing the component via NPM client is an error prone process, we do it first, before\n * removing the component files, so then it's easier to rollback.\n */\nimport { Workspace } from '@teambit/workspace';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport defaultErrorHandler from '@teambit/legacy/dist/cli/default-error-handler';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport PackageJsonFile from '@teambit/legacy/dist/consumer/component/package-json-file';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { Logger } from '@teambit/logger';\nimport { InstallMain } from '@teambit/install';\n\nexport type EjectResults = {\n ejectedComponents: ComponentIdList;\n failedComponents: FailedComponents;\n};\n\nexport type EjectOptions = {\n force?: boolean; // eject although a component is modified/staged\n keepFiles?: boolean; // keep component files on the workspace\n skipDependencyInstallation?: boolean; // skip installing the dependencies\n};\n\ntype FailedComponents = {\n modifiedComponents: ComponentIdList;\n stagedComponents: ComponentIdList;\n notExportedComponents: ComponentIdList;\n selfHostedExportedComponents: ComponentIdList;\n};\n\nexport class ComponentsEjector {\n consumer: Consumer;\n idsToEject: ComponentIdList;\n componentsToEject: Component[] = [];\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n notEjectedDependents: Array<{ dependent: Component; ejectedDependencies: Component[] }>;\n failedComponents: FailedComponents;\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n packageJsonFilesBeforeChanges: PackageJsonFile[]; // for rollback in case of errors\n constructor(\n private workspace: Workspace,\n private install: InstallMain,\n private logger: Logger,\n private componentsIds: ComponentID[],\n private ejectOptions: EjectOptions\n ) {\n this.consumer = this.workspace.consumer;\n this.idsToEject = new ComponentIdList();\n this.failedComponents = {\n modifiedComponents: new ComponentIdList(),\n stagedComponents: new ComponentIdList(),\n notExportedComponents: new ComponentIdList(),\n selfHostedExportedComponents: new ComponentIdList(),\n };\n }\n\n async eject(): Promise<EjectResults> {\n await this.decideWhichComponentsToEject();\n this.logger.debug(`${this.idsToEject.length} to eject`);\n await this.loadComponentsToEject();\n if (this.idsToEject.length) {\n this._validateIdsHaveScopesAndVersions();\n await this.removeComponentsFromNodeModules();\n await this.untrackComponents();\n await this.installPackages();\n await this.removeComponentsFiles();\n await this.consumer.writeBitMap();\n }\n this.logger.debug('eject: completed successfully');\n return {\n ejectedComponents: this.idsToEject,\n failedComponents: this.failedComponents,\n };\n }\n\n async decideWhichComponentsToEject(): Promise<void> {\n this.logger.setStatusLine('Eject: getting the components status');\n if (!this.componentsIds.length) return;\n const remotes = await getScopeRemotes(this.consumer.scope);\n const hubExportedComponents = new ComponentIdList();\n this.componentsIds.forEach((componentId) => {\n const bitId = componentId;\n if (!this.workspace.isExported(bitId)) this.failedComponents.notExportedComponents.push(bitId);\n else if (remotes.isHub(bitId.scope as string)) hubExportedComponents.push(bitId);\n else this.failedComponents.selfHostedExportedComponents.push(bitId);\n });\n if (this.ejectOptions.force) {\n this.idsToEject = hubExportedComponents;\n } else {\n await Promise.all(\n hubExportedComponents.map(async (id) => {\n try {\n const componentStatus = await this.workspace.getComponentStatusById(id);\n if (componentStatus.modified) this.failedComponents.modifiedComponents.push(id);\n else if (componentStatus.staged) this.failedComponents.stagedComponents.push(id);\n else this.idsToEject.push(id);\n } catch (err: any) {\n this.throwEjectError(\n `eject operation failed getting the status of ${id.toString()}, no action has been done.\n please fix the issue to continue.`,\n err\n );\n }\n })\n );\n }\n this.logger.consoleSuccess();\n }\n\n async loadComponentsToEject() {\n const { components } = await this.consumer.loadComponents(this.idsToEject);\n this.componentsToEject = components;\n }\n\n async removeComponentsFromNodeModules() {\n const action = 'Eject: removing the existing components from node_modules';\n this.logger.setStatusLine(action);\n this.logger.debug(action);\n await packageJsonUtils.removeComponentsFromNodeModules(this.consumer, this.componentsToEject);\n this.logger.consoleSuccess(action);\n }\n\n async installPackages() {\n if (this.ejectOptions.skipDependencyInstallation) return;\n this.logger.setStatusLine('Eject: installing packages using the package-manager');\n const packages = this.getPackagesToInstall();\n await this.install.install(packages);\n }\n\n getPackagesToInstall(): string[] {\n return this.componentsToEject.map((c) => componentIdToPackageName(c));\n }\n\n _buildExceptionMessageWithRollbackData(action: string): string {\n return `eject failed ${action}.\nyour package.json (if existed) has been restored, however, some bit generated data may have been deleted, please run \"bit link\" to restore them.`;\n }\n\n /**\n * as part of the 'eject' operation, a component is removed locally. as opposed to the remove\n * command, in this case, no need to remove the objects from the scope, only remove from the\n * filesystem, which means, delete the component files, untrack from .bitmap and clean\n * package.json and bit.json traces.\n */\n private async removeComponentsFiles() {\n if (this.ejectOptions.keepFiles) {\n return;\n }\n this.logger.setStatusLine('Eject: removing the components files from the filesystem');\n const dataToPersist = new DataToPersist();\n this.componentsToEject.forEach((component) => {\n const componentMap = component.componentMap;\n if (!componentMap) {\n throw new Error('ComponentEjector.removeComponentsFiles expect a component to have componentMap prop');\n }\n const rootDir = componentMap.rootDir;\n if (!rootDir) {\n throw new Error('ComponentEjector.removeComponentsFiles expect a componentMap to have rootDir');\n }\n dataToPersist.removePath(new RemovePath(rootDir, true));\n });\n dataToPersist.addBasePath(this.consumer.getPath());\n await dataToPersist.persistAllToFS();\n this.logger.consoleSuccess();\n }\n\n private async untrackComponents() {\n this.logger.debug('eject: removing the components from the .bitmap');\n await this.consumer.cleanFromBitMap(this.idsToEject);\n }\n\n throwEjectError(message: string, originalError: Error) {\n const { message: originalErrorMessage } = defaultErrorHandler(originalError);\n this.logger.error(`eject has stopped due to an error ${originalErrorMessage}`, originalError);\n throw new Error(`${message}\n\ngot the following error: ${originalErrorMessage}`);\n }\n\n _validateIdsHaveScopesAndVersions() {\n this.idsToEject.forEach((id) => {\n if (!id.hasScope() || !id.hasVersion()) {\n throw new TypeError(`EjectComponents expects ids with scope and version, got ${id.toString()}`);\n }\n });\n }\n}\n"],"mappings":";;;;;;AAWA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,qBAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,oBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,0BAAA;EAAA,MAAAL,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAI,yBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAO,uBAAA,CAAAN,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,eAAA;EAAA,MAAAR,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAO,cAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,YAAA;EAAA,MAAAT,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAQ,WAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqF,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CA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AC9B,IAAI,CAACA,EAAE,CAACqC,QAAQ,CAAC,CAAC,IAAI,CAACrC,EAAE,CAACsC,UAAU,CAAC,CAAC,EAAE;QACtC,MAAM,IAAIlF,SAAS,CAAE,2DAA0D4C,EAAE,CAACO,QAAQ,CAAC,CAAE,EAAC,CAAC;MACjG;IACF,CAAC,CAAC;EACJ;AACF;AAACgC,OAAA,CAAAjF,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"names":["_componentId","data","require","_defaultErrorHandler","_interopRequireDefault","_scopeRemotes","_componentIdToPackageName","packageJsonUtils","_interopRequireWildcard","_dataToPersist","_removePath","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_defineProperty","key","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","ComponentsEjector","constructor","workspace","install","logger","componentsIds","ejectOptions","consumer","idsToEject","ComponentIdList","failedComponents","modifiedComponents","stagedComponents","notExportedComponents","selfHostedExportedComponents","eject","decideWhichComponentsToEject","debug","length","loadComponentsToEject","_validateIdsHaveScopesAndVersions","removeComponentsFromNodeModules","untrackComponents","installPackages","removeComponentsFiles","writeBitMap","ejectedComponents","setStatusLine","remotes","getScopeRemotes","scope","hubExportedComponents","forEach","componentId","bitId","isExported","push","isHub","force","Promise","all","map","id","componentStatus","getComponentStatusById","modified","staged","err","throwEjectError","toString","consoleSuccess","components","loadComponents","componentsToEject","action","skipDependencyInstallation","packages","getPackagesToInstall","c","componentIdToPackageName","_buildExceptionMessageWithRollbackData","keepFiles","dataToPersist","DataToPersist","component","componentMap","Error","rootDir","removePath","RemovePath","addBasePath","getPath","persistAllToFS","cleanFromBitMap","message","originalError","originalErrorMessage","defaultErrorHandler","error","hasScope","hasVersion","exports"],"sources":["components-ejector.ts"],"sourcesContent":["/**\n * a classic use case of eject is when a user imports a component using `bit import` to update it,\n * but the user has no intention to have the code as part of the project source code.\n * the eject provides the option to delete the component locally and install it via the NPM client.\n *\n * an implementation note, the entire process is done with rollback in mind.\n * since installing the component via NPM client is an error prone process, we do it first, before\n * removing the component files, so then it's easier to rollback.\n */\nimport { Workspace } from '@teambit/workspace';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport defaultErrorHandler from '@teambit/legacy/dist/cli/default-error-handler';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport componentIdToPackageName from '@teambit/legacy/dist/utils/bit/component-id-to-package-name';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport PackageJsonFile from '@teambit/legacy/dist/consumer/component/package-json-file';\nimport * as packageJsonUtils from '@teambit/legacy/dist/consumer/component/package-json-utils';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport { Logger } from '@teambit/logger';\nimport { InstallMain } from '@teambit/install';\n\nexport type EjectResults = {\n ejectedComponents: ComponentIdList;\n failedComponents: FailedComponents;\n};\n\nexport type EjectOptions = {\n force?: boolean; // eject although a component is modified/staged\n keepFiles?: boolean; // keep component files on the workspace\n skipDependencyInstallation?: boolean; // skip installing the dependencies\n};\n\ntype FailedComponents = {\n modifiedComponents: ComponentIdList;\n stagedComponents: ComponentIdList;\n notExportedComponents: ComponentIdList;\n selfHostedExportedComponents: ComponentIdList;\n};\n\nexport class ComponentsEjector {\n consumer: Consumer;\n idsToEject: ComponentIdList;\n componentsToEject: Component[] = [];\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n notEjectedDependents: Array<{ dependent: Component; ejectedDependencies: Component[] }>;\n failedComponents: FailedComponents;\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n packageJsonFilesBeforeChanges: PackageJsonFile[]; // for rollback in case of errors\n constructor(\n private workspace: Workspace,\n private install: InstallMain,\n private logger: Logger,\n private componentsIds: ComponentID[],\n private ejectOptions: EjectOptions\n ) {\n this.consumer = this.workspace.consumer;\n this.idsToEject = new ComponentIdList();\n this.failedComponents = {\n modifiedComponents: new ComponentIdList(),\n stagedComponents: new ComponentIdList(),\n notExportedComponents: new ComponentIdList(),\n selfHostedExportedComponents: new ComponentIdList(),\n };\n }\n\n async eject(): Promise<EjectResults> {\n await this.decideWhichComponentsToEject();\n this.logger.debug(`${this.idsToEject.length} to eject`);\n await this.loadComponentsToEject();\n if (this.idsToEject.length) {\n this._validateIdsHaveScopesAndVersions();\n await this.removeComponentsFromNodeModules();\n await this.untrackComponents();\n await this.installPackages();\n await this.removeComponentsFiles();\n await this.consumer.writeBitMap();\n }\n this.logger.debug('eject: completed successfully');\n return {\n ejectedComponents: this.idsToEject,\n failedComponents: this.failedComponents,\n };\n }\n\n async decideWhichComponentsToEject(): Promise<void> {\n this.logger.setStatusLine('Eject: getting the components status');\n if (!this.componentsIds.length) return;\n const remotes = await getScopeRemotes(this.consumer.scope);\n const hubExportedComponents = new ComponentIdList();\n this.componentsIds.forEach((componentId) => {\n const bitId = componentId;\n if (!this.workspace.isExported(bitId)) this.failedComponents.notExportedComponents.push(bitId);\n else if (remotes.isHub(bitId.scope as string)) hubExportedComponents.push(bitId);\n else this.failedComponents.selfHostedExportedComponents.push(bitId);\n });\n if (this.ejectOptions.force) {\n this.idsToEject = hubExportedComponents;\n } else {\n await Promise.all(\n hubExportedComponents.map(async (id) => {\n try {\n const componentStatus = await this.workspace.getComponentStatusById(id);\n if (componentStatus.modified) this.failedComponents.modifiedComponents.push(id);\n else if (componentStatus.staged) this.failedComponents.stagedComponents.push(id);\n else this.idsToEject.push(id);\n } catch (err: any) {\n this.throwEjectError(\n `eject operation failed getting the status of ${id.toString()}, no action has been done.\n please fix the issue to continue.`,\n err\n );\n }\n })\n );\n }\n this.logger.consoleSuccess();\n }\n\n async loadComponentsToEject() {\n const { components } = await this.consumer.loadComponents(this.idsToEject);\n this.componentsToEject = components;\n }\n\n async removeComponentsFromNodeModules() {\n const action = 'Eject: removing the existing components from node_modules';\n this.logger.setStatusLine(action);\n this.logger.debug(action);\n await packageJsonUtils.removeComponentsFromNodeModules(this.consumer, this.componentsToEject);\n this.logger.consoleSuccess(action);\n }\n\n async installPackages() {\n if (this.ejectOptions.skipDependencyInstallation) return;\n this.logger.setStatusLine('Eject: installing packages using the package-manager');\n const packages = this.getPackagesToInstall();\n await this.install.install(packages);\n }\n\n getPackagesToInstall(): string[] {\n return this.componentsToEject.map((c) => componentIdToPackageName(c));\n }\n\n _buildExceptionMessageWithRollbackData(action: string): string {\n return `eject failed ${action}.\nyour package.json (if existed) has been restored, however, some bit generated data may have been deleted, please run \"bit link\" to restore them.`;\n }\n\n /**\n * as part of the 'eject' operation, a component is removed locally. as opposed to the remove\n * command, in this case, no need to remove the objects from the scope, only remove from the\n * filesystem, which means, delete the component files, untrack from .bitmap and clean\n * package.json and bit.json traces.\n */\n private async removeComponentsFiles() {\n if (this.ejectOptions.keepFiles) {\n return;\n }\n this.logger.setStatusLine('Eject: removing the components files from the filesystem');\n const dataToPersist = new DataToPersist();\n this.componentsToEject.forEach((component) => {\n const componentMap = component.componentMap;\n if (!componentMap) {\n throw new Error('ComponentEjector.removeComponentsFiles expect a component to have componentMap prop');\n }\n const rootDir = componentMap.rootDir;\n if (!rootDir) {\n throw new Error('ComponentEjector.removeComponentsFiles expect a componentMap to have rootDir');\n }\n dataToPersist.removePath(new RemovePath(rootDir, true));\n });\n dataToPersist.addBasePath(this.consumer.getPath());\n await dataToPersist.persistAllToFS();\n this.logger.consoleSuccess();\n }\n\n private async untrackComponents() {\n this.logger.debug('eject: removing the components from the .bitmap');\n await this.consumer.cleanFromBitMap(this.idsToEject);\n }\n\n throwEjectError(message: string, originalError: Error) {\n const { message: originalErrorMessage } = defaultErrorHandler(originalError);\n this.logger.error(`eject has stopped due to an error ${originalErrorMessage}`, originalError);\n throw new Error(`${message}\n\ngot the following error: ${originalErrorMessage}`);\n }\n\n _validateIdsHaveScopesAndVersions() {\n this.idsToEject.forEach((id) => {\n if (!id.hasScope() || !id.hasVersion()) {\n throw new TypeError(`EjectComponents expects ids with scope and version, got ${id.toString()}`);\n }\n });\n }\n}\n"],"mappings":";;;;;;AAWA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,qBAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,oBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,0BAAA;EAAA,MAAAL,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAI,yBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAO,uBAAA,CAAAN,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,eAAA;EAAA,MAAAR,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAO,cAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,YAAA;EAAA,MAAAT,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAQ,WAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqF,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAA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,IAAI,CAACZ,UAAU,CAACwB,OAAO,CAAEU,EAAE,IAAK;MAC9B,IAAI,CAACA,EAAE,CAACqC,QAAQ,CAAC,CAAC,IAAI,CAACrC,EAAE,CAACsC,UAAU,CAAC,CAAC,EAAE;QACtC,MAAM,IAAIlF,SAAS,CAAE,2DAA0D4C,EAAE,CAACO,QAAQ,CAAC,CAAE,EAAC,CAAC;MACjG;IACF,CAAC,CAAC;EACJ;AACF;AAACgC,OAAA,CAAAjF,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","data","require","_ejectTemplate","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","EjectCmd","constructor","ejectMain","workspace","name","description","COMPONENT_PATTERN_HELP","report","pattern","force","json","keepFiles","skipDependencyInstallation","componentIds","idsByPattern","ejectResults","eject","JSON","stringify","ejectTemplate","exports"],"sources":["eject-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { ejectTemplate } from './eject-template';\nimport { EjectMain } from './eject.main.runtime';\n\nexport class EjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = 'remove component from the workspace and install it instead as a regular npm package.';\n extendedDescription = 'By default the component files will be removed from the workspace';\n helpUrl = 'reference/components/exporting-components#ejecting-components';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = 'E';\n options = [\n [\n 'f',\n 'force',\n 'ignore local changes/versions. eject component/s even when they are staged or modified. Note: unexported tags/snaps will be lost',\n ],\n ['x', 'skip-dependency-installation', 'do not auto-install dependencies'],\n ['j', 'json', 'print the results in JSON format'],\n ['', 'keep-files', 'keep the component files in the workspace intact'],\n ] as CommandOptions;\n loader = true;\n group = 'development';\n\n constructor(private ejectMain: EjectMain, private workspace: Workspace) {}\n\n async report(\n [pattern]: [string],\n {\n force = false,\n json = false,\n keepFiles = false,\n skipDependencyInstallation,\n }: {\n force: boolean;\n json: boolean;\n keepFiles: boolean;\n skipDependencyInstallation?: boolean;\n }\n ): Promise<string> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n const ejectResults = await this.ejectMain.eject(componentIds, { force, keepFiles, skipDependencyInstallation });\n if (json) return JSON.stringify(ejectResults, null, 2);\n return ejectTemplate(ejectResults);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,eAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,SAAAG,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH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I,8BAAa,EAACJ,YAAY,CAAC;EACpC;AACF;AAACK,OAAA,CAAApB,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_constants","data","require","_ejectTemplate","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","EjectCmd","constructor","ejectMain","workspace","name","description","COMPONENT_PATTERN_HELP","report","pattern","force","json","keepFiles","skipDependencyInstallation","componentIds","idsByPattern","ejectResults","eject","JSON","stringify","ejectTemplate","exports"],"sources":["eject-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Workspace } from '@teambit/workspace';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { ejectTemplate } from './eject-template';\nimport { EjectMain } from './eject.main.runtime';\n\nexport class EjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = 'remove component from the workspace and install it instead as a regular npm package.';\n extendedDescription = 'By default the component files will be removed from the workspace';\n helpUrl = 'reference/components/exporting-components#ejecting-components';\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = 'E';\n options = [\n [\n 'f',\n 'force',\n 'ignore local changes/versions. eject component/s even when they are staged or modified. Note: unexported tags/snaps will be lost',\n ],\n ['x', 'skip-dependency-installation', 'do not auto-install dependencies'],\n ['j', 'json', 'print the results in JSON format'],\n ['', 'keep-files', 'keep the component files in the workspace intact'],\n ] as CommandOptions;\n loader = true;\n group = 'development';\n\n constructor(private ejectMain: EjectMain, private workspace: Workspace) {}\n\n async report(\n [pattern]: [string],\n {\n force = false,\n json = false,\n keepFiles = false,\n skipDependencyInstallation,\n }: {\n force: boolean;\n json: boolean;\n keepFiles: boolean;\n skipDependencyInstallation?: boolean;\n }\n ): Promise<string> {\n const componentIds = await this.workspace.idsByPattern(pattern);\n const ejectResults = await this.ejectMain.eject(componentIds, { force, keepFiles, skipDependencyInstallation });\n if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AA2B;IAAAA,eAAA,sBACpB,sFAAsF;IAAAA,eAAA,8BAC9E,mEAAmE;IAAAA,eAAA,kBAC/E,+DAA+D;IAAAA,eAAA,oBAC7D,CACV;MACEyB,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAEC;IACf,CAAC,CACF;IAAA3B,eAAA,gBACO,GAAG;IAAAA,eAAA,kBACD,CACR,CACE,GAAG,EACH,OAAO,EACP,kIAAkI,CACnI,EACD,CAAC,GAAG,EAAE,8BAA8B,EAAE,kCAAkC,CAAC,EACzE,CAAC,GAAG,EAAE,MAAM,EAAE,kCAAkC,CAAC,EACjD,CAAC,EAAE,EAAE,YAAY,EAAE,kDAAkD,CAAC,CACvE;IAAAA,eAAA,iBACQ,IAAI;IAAAA,eAAA,gBACL,aAAa;EAEoD;EAEzE,MAAM4B,MAAMA,CACV,CAACC,OAAO,CAAW,EACnB;IACEC,KAAK,GAAG,KAAK;IACbC,IAAI,GAAG,KAAK;IACZC,SAAS,GAAG,KAAK;IACjBC;EAMF,CAAC,EACgB;IACjB,MAAMC,YAAY,GAAG,MAAM,IAAI,CAACV,SAAS,CAACW,YAAY,CAACN,OAAO,CAAC;IAC/D,MAAMO,YAAY,GAAG,MAAM,IAAI,CAACb,SAAS,CAACc,KAAK,CAACH,YAAY,EAAE;MAAEJ,KAAK;MAAEE,SAAS;MAAEC;IAA2B,CAAC,CAAC;IAC/G,IAAIF,IAAI,EAAE,OAAOO,IAAI,CAACC,SAAS,CAACH,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,OAAO,IAAAI,8BAAa,EAACJ,YAAY,CAAC;EACpC;AACF;AAACK,OAAA,CAAApB,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_constants","obj","__esModule","default","successEjectMessage","exports","failureEjectMessage","ejectTemplate","ejectResults","getEjectedOutput","ejectedComponents","length","chalk","green","bold","toString","getFailureOutput","failures","failedComponents","title","red","modified","modifiedComponents","staged","stagedComponents","notExported","notExportedComponents","selfHosted","selfHostedExportedComponents","getCloudDomain","body","underline"],"sources":["eject-template.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { getCloudDomain } from '@teambit/legacy/dist/constants';\nimport { EjectResults } from './components-ejector';\n\nexport const successEjectMessage = 'successfully ejected the following components';\nexport const failureEjectMessage = 'failed to eject the following components';\n\nexport function ejectTemplate(ejectResults: EjectResults): string {\n const getEjectedOutput = () => {\n if (!ejectResults.ejectedComponents.length) return '';\n return chalk.green(`${successEjectMessage} ${chalk.bold(ejectResults.ejectedComponents.toString())}\\n`);\n };\n const getFailureOutput = () => {\n const failures = ejectResults.failedComponents;\n const title = chalk.red(`${failureEjectMessage}\\n`);\n const modified = failures.modifiedComponents.length\n ? `stopped the eject process for the following components because they have local changes.\n${chalk.bold(failures.modifiedComponents.toString())}\nejecting modified components discards all local, unstaged, changes.\nuse 'bit diff <component id>' to see the changes and decide if to 'bit tag' them or not.\nuse the '--force' flag to discard local modifications and proceed with the eject process.\\n`\n : '';\n const staged = failures.stagedComponents.length\n ? `components with local versions (use --force to ignore): ${failures.stagedComponents.toString()}\\n`\n : '';\n const notExported = failures.notExportedComponents.length\n ? `local components that were not exported yet: ${failures.notExportedComponents.toString()}\\n`\n : '';\n const selfHosted = failures.selfHostedExportedComponents.length\n ? `components that were exported to a self hosted scope (not ${getCloudDomain()}): ${failures.selfHostedExportedComponents.toString()}\\n`\n : '';\n const body = modified + staged + notExported + selfHosted;\n if (body) return chalk.underline(title) + chalk.red(body);\n return '';\n };\n return getEjectedOutput() + getFailureOutput();\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,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AAE,IAAG,GAC7F,EAAE;IACN,MAAMY,UAAU,GAAGV,QAAQ,CAACW,4BAA4B,CAACjB,MAAM,GAC1D,6DAA4D,IAAAkB,2BAAc,EAAC,CAAE,MAAKZ,QAAQ,CAACW,4BAA4B,CAACb,QAAQ,CAAC,CAAE,IAAG,GACvI,EAAE;IACN,MAAMe,IAAI,GAAGT,QAAQ,GAAGE,MAAM,GAAGE,WAAW,GAAGE,UAAU;IACzD,IAAIG,IAAI,EAAE,OAAOlB,gBAAK,CAACmB,SAAS,CAACZ,KAAK,CAAC,GAAGP,gBAAK,CAACQ,GAAG,CAACU,IAAI,CAAC;IACzD,OAAO,EAAE;EACX,CAAC;EACD,OAAOrB,gBAAgB,CAAC,CAAC,GAAGO,gBAAgB,CAAC,CAAC;AAChD"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_constants","obj","__esModule","default","successEjectMessage","exports","failureEjectMessage","ejectTemplate","ejectResults","getEjectedOutput","ejectedComponents","length","chalk","green","bold","toString","getFailureOutput","failures","failedComponents","title","red","modified","modifiedComponents","staged","stagedComponents","notExported","notExportedComponents","selfHosted","selfHostedExportedComponents","getCloudDomain","body","underline"],"sources":["eject-template.ts"],"sourcesContent":["import chalk from 'chalk';\n\nimport { getCloudDomain } from '@teambit/legacy/dist/constants';\nimport { EjectResults } from './components-ejector';\n\nexport const successEjectMessage = 'successfully ejected the following components';\nexport const failureEjectMessage = 'failed to eject the following components';\n\nexport function ejectTemplate(ejectResults: EjectResults): string {\n const getEjectedOutput = () => {\n if (!ejectResults.ejectedComponents.length) return '';\n return chalk.green(`${successEjectMessage} ${chalk.bold(ejectResults.ejectedComponents.toString())}\\n`);\n };\n const getFailureOutput = () => {\n const failures = ejectResults.failedComponents;\n const title = chalk.red(`${failureEjectMessage}\\n`);\n const modified = failures.modifiedComponents.length\n ? `stopped the eject process for the following components because they have local changes.\n${chalk.bold(failures.modifiedComponents.toString())}\nejecting modified components discards all local, unstaged, changes.\nuse 'bit diff <component id>' to see the changes and decide if to 'bit tag' them or not.\nuse the '--force' flag to discard local modifications and proceed with the eject process.\\n`\n : '';\n const staged = failures.stagedComponents.length\n ? `components with local versions (use --force to ignore): ${failures.stagedComponents.toString()}\\n`\n : '';\n const notExported = failures.notExportedComponents.length\n ? `local components that were not exported yet: ${failures.notExportedComponents.toString()}\\n`\n : '';\n const selfHosted = failures.selfHostedExportedComponents.length\n ? `components that were exported to a self hosted scope (not ${getCloudDomain()}): ${failures.selfHostedExportedComponents.toString()}\\n`\n : '';\n const body = modified + staged + notExported + selfHosted;\n if (body) return chalk.underline(title) + chalk.red(body);\n return '';\n };\n return getEjectedOutput() + getFailureOutput();\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgE,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGzD,MAAMG,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,+CAA+C;AAC3E,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,0CAA0C;AAEtE,SAASC,aAAaA,CAACC,YAA0B,EAAU;EAChE,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;IAC7B,IAAI,CAACD,YAAY,CAACE,iBAAiB,CAACC,MAAM,EAAE,OAAO,EAAE;IACrD,OAAOC,gBAAK,CAACC,KAAK,CAAE,GAAET,mBAAoB,IAAGQ,gBAAK,CAACE,IAAI,CAACN,YAAY,CAACE,iBAAiB,CAACK,QAAQ,CAAC,CAAC,CAAE,IAAG,CAAC;EACzG,CAAC;EACD,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;IAC7B,MAAMC,QAAQ,GAAGT,YAAY,CAACU,gBAAgB;IAC9C,MAAMC,KAAK,GAAGP,gBAAK,CAACQ,GAAG,CAAE,GAAEd,mBAAoB,IAAG,CAAC;IACnD,MAAMe,QAAQ,GAAGJ,QAAQ,CAACK,kBAAkB,CAACX,MAAM,GAC9C;AACT,EAAEC,gBAAK,CAACE,IAAI,CAACG,QAAQ,CAACK,kBAAkB,CAACP,QAAQ,CAAC,CAAC,CAAE;AACrD;AACA;AACA,4FAA4F,GACpF,EAAE;IACN,MAAMQ,MAAM,GAAGN,QAAQ,CAACO,gBAAgB,CAACb,MAAM,GAC1C,2DAA0DM,QAAQ,CAACO,gBAAgB,CAACT,QAAQ,CAAC,CAAE,IAAG,GACnG,EAAE;IACN,MAAMU,WAAW,GAAGR,QAAQ,CAACS,qBAAqB,CAACf,MAAM,GACpD,gDAA+CM,QAAQ,CAACS,qBAAqB,CAACX,QAAQ,CAAC,CAAE,IAAG,GAC7F,EAAE;IACN,MAAMY,UAAU,GAAGV,QAAQ,CAACW,4BAA4B,CAACjB,MAAM,GAC1D,6DAA4D,IAAAkB,2BAAc,EAAC,CAAE,MAAKZ,QAAQ,CAACW,4BAA4B,CAACb,QAAQ,CAAC,CAAE,IAAG,GACvI,EAAE;IACN,MAAMe,IAAI,GAAGT,QAAQ,GAAGE,MAAM,GAAGE,WAAW,GAAGE,UAAU;IACzD,IAAIG,IAAI,EAAE,OAAOlB,gBAAK,CAACmB,SAAS,CAACZ,KAAK,CAAC,GAAGP,gBAAK,CAACQ,GAAG,CAACU,IAAI,CAAC;IACzD,OAAO,EAAE;EACX,CAAC;EACD,OAAOrB,gBAAgB,CAAC,CAAC,GAAGO,gBAAgB,CAAC,CAAC;AAChD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","EjectAspect","exports","Aspect","create","id"],"sources":["eject.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const EjectAspect = Aspect.create({\n id: 'teambit.workspace/eject',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAE;AACN,CAAC,CAAC"}
1
+ {"version":3,"names":["_harmony","data","require","EjectAspect","exports","Aspect","create","id"],"sources":["eject.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const EjectAspect = Aspect.create({\n id: 'teambit.workspace/eject',\n});\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACvCC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["eject.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/eject.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAmD,CAAE,CACjF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["eject.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/eject.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAAmD,CAAE,CACjF,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_logger","_workspace","_install","_ejectCmd","_eject","_componentsEjector","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","EjectMain","constructor","workspace","install","logger","eject","componentIds","ejectOptions","OutsideWorkspaceError","componentEjector","ComponentsEjector","provider","cli","loggerMain","createLogger","EjectAspect","id","ejectMain","register","EjectCmd","exports","MainRuntime","CLIAspect","WorkspaceAspect","LoggerAspect","InstallAspect","addRuntime"],"sources":["eject.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { EjectCmd } from './eject-cmd';\nimport { EjectAspect } from './eject.aspect';\nimport { ComponentsEjector, EjectOptions, EjectResults } from './components-ejector';\n\nexport class EjectMain {\n constructor(private workspace: Workspace, private install: InstallMain, private logger: Logger) {}\n async eject(componentIds: ComponentID[], ejectOptions: EjectOptions = {}): Promise<EjectResults> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentEjector = new ComponentsEjector(\n this.workspace,\n this.install,\n this.logger,\n componentIds,\n ejectOptions\n );\n return componentEjector.eject();\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, InstallAspect];\n\n static async provider([cli, workspace, loggerMain, install]: [CLIMain, Workspace, LoggerMain, InstallMain]) {\n const logger = loggerMain.createLogger(EjectAspect.id);\n const ejectMain = new EjectMain(workspace, install, logger);\n cli.register(new EjectCmd(ejectMain, workspace));\n\n return ejectMain;\n }\n}\n\nEjectAspect.addRuntime(E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,CAACM,QAAQ,CAAC,KAAIC,oBAAQ,EAACF,SAAS,EAAEf,SAAS,CAAC,CAAC;IAEhD,OAAOe,SAAS;EAClB;AACF;AAACG,OAAA,CAAApB,SAAA,GAAAA,SAAA;AAAArB,eAAA,CAzBYqB,SAAS,aAcHqB,kBAAW;AAAA1C,eAAA,CAdjBqB,SAAS,kBAgBE,CAACsB,gBAAS,EAAEC,4BAAe,EAAEC,sBAAY,EAAEC,wBAAa,CAAC;AAWjFV,oBAAW,CAACW,UAAU,CAAC1B,SAAS,CAAC"}
1
+ {"version":3,"names":["_cli","data","require","_logger","_workspace","_install","_ejectCmd","_eject","_componentsEjector","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","EjectMain","constructor","workspace","install","logger","eject","componentIds","ejectOptions","OutsideWorkspaceError","componentEjector","ComponentsEjector","provider","cli","loggerMain","createLogger","EjectAspect","id","ejectMain","register","EjectCmd","exports","MainRuntime","CLIAspect","WorkspaceAspect","LoggerAspect","InstallAspect","addRuntime"],"sources":["eject.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport { EjectCmd } from './eject-cmd';\nimport { EjectAspect } from './eject.aspect';\nimport { ComponentsEjector, EjectOptions, EjectResults } from './components-ejector';\n\nexport class EjectMain {\n constructor(private workspace: Workspace, private install: InstallMain, private logger: Logger) {}\n async eject(componentIds: ComponentID[], ejectOptions: EjectOptions = {}): Promise<EjectResults> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentEjector = new ComponentsEjector(\n this.workspace,\n this.install,\n this.logger,\n componentIds,\n ejectOptions\n );\n return componentEjector.eject();\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, InstallAspect];\n\n static async provider([cli, workspace, loggerMain, install]: [CLIMain, Workspace, LoggerMain, InstallMain]) {\n const logger = loggerMain.createLogger(EjectAspect.id);\n const ejectMain = new EjectMain(workspace, install, logger);\n cli.register(new EjectCmd(ejectMain, workspace));\n\n return ejectMain;\n }\n}\n\nEjectAspect.addRuntime(EjectMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,mBAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,kBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAqF,SAAAQ,gBAAAC,GAAA,EAAAC,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jC;EAMA,aAAaM,QAAQA,CAAC,CAACC,GAAG,EAAEV,SAAS,EAAEW,UAAU,EAAEV,OAAO,CAAgD,EAAE;IAC1G,MAAMC,MAAM,GAAGS,UAAU,CAACC,YAAY,CAACC,oBAAW,CAACC,EAAE,CAAC;IACtD,MAAMC,SAAS,GAAG,IAAIjB,SAAS,CAACE,SAAS,EAAEC,OAAO,EAAEC,MAAM,CAAC;IAC3DQ,GAAG,CAACM,QAAQ,CAAC,KAAIC,oBAAQ,EAACF,SAAS,EAAEf,SAAS,CAAC,CAAC;IAEhD,OAAOe,SAAS;EAClB;AACF;AAACG,OAAA,CAAApB,SAAA,GAAAA,SAAA;AAAArB,eAAA,CAzBYqB,SAAS,aAcHqB,kBAAW;AAAA1C,eAAA,CAdjBqB,SAAS,kBAgBE,CAACsB,gBAAS,EAAEC,4BAAe,EAAEC,sBAAY,EAAEC,wBAAa,CAAC;AAWjFV,oBAAW,CAACW,UAAU,CAAC1B,SAAS,CAAC","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_ejectTemplate","data","require","_eject"],"sources":["index.ts"],"sourcesContent":["export type { EjectMain } from './eject.main.runtime';\nexport type { EjectResults } from './components-ejector';\nexport { successEjectMessage, ejectTemplate } from './eject-template';\nexport { EjectAspect } from './eject.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_ejectTemplate","data","require","_eject"],"sources":["index.ts"],"sourcesContent":["export type { EjectMain } from './eject.main.runtime';\nexport type { EjectResults } from './components-ejector';\nexport { successEjectMessage, ejectTemplate } from './eject-template';\nexport { EjectAspect } from './eject.aspect';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAAA,eAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,cAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.workspace_eject@1.0.189/dist/eject.composition.js';
2
+ import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.workspace_eject@1.0.189/dist/eject.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@teambit/eject",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
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.187"
9
+ "version": "1.0.189"
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.187",
16
- "@teambit/logger": "0.0.948",
17
- "@teambit/workspace": "1.0.187",
18
- "@teambit/cli": "0.0.855"
15
+ "@teambit/install": "1.0.189",
16
+ "@teambit/logger": "0.0.949",
17
+ "@teambit/workspace": "1.0.189",
18
+ "@teambit/cli": "0.0.856"
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.25"
23
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^17.0.0 || ^18.0.0",
@@ -1,7 +0,0 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.187/dist/eject.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@1.0.187/dist/eject.docs.mdx';
3
-
4
- export const compositions = [compositions_0];
5
- export const overview = [overview_0];
6
-
7
- export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};