@teambit/eject 0.0.603 → 0.0.605

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.
@@ -8,6 +8,7 @@ export declare class EjectCmd implements Command {
8
8
  private install;
9
9
  name: string;
10
10
  description: string;
11
+ extendedDescription: string;
11
12
  helpUrl: string;
12
13
  arguments: {
13
14
  name: string;
package/dist/eject-cmd.js CHANGED
@@ -28,6 +28,13 @@ function _ejectTemplate() {
28
28
  };
29
29
  return data;
30
30
  }
31
+ function _constants() {
32
+ const data = require("@teambit/legacy/dist/constants");
33
+ _constants = function () {
34
+ return data;
35
+ };
36
+ return data;
37
+ }
31
38
  function _componentsEjector() {
32
39
  const data = require("./components-ejector");
33
40
  _componentsEjector = function () {
@@ -41,14 +48,15 @@ class EjectCmd {
41
48
  this.logger = logger;
42
49
  this.install = install;
43
50
  (0, _defineProperty2().default)(this, "name", 'eject <component-pattern>');
44
- (0, _defineProperty2().default)(this, "description", 'replace components maintained in the workspace with their corresponding packages');
45
- (0, _defineProperty2().default)(this, "helpUrl", 'docs/components/exporting-components#ejecting-components');
51
+ (0, _defineProperty2().default)(this, "description", 'remove component from the workspace and install it instead as a regular npm package.');
52
+ (0, _defineProperty2().default)(this, "extendedDescription", 'By default the component files will be removed from the workspace');
53
+ (0, _defineProperty2().default)(this, "helpUrl", 'reference/components/exporting-components#ejecting-components');
46
54
  (0, _defineProperty2().default)(this, "arguments", [{
47
55
  name: 'component-pattern',
48
- description: 'component name, component id, or component pattern.\nuse component pattern to select multiple components. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button"\nwrap the pattern with quotes'
56
+ description: _constants().COMPONENT_PATTERN_HELP
49
57
  }]);
50
58
  (0, _defineProperty2().default)(this, "alias", 'E');
51
- (0, _defineProperty2().default)(this, "options", [['f', 'force', 'ignore local version. remove the components even when they are staged or modified'], ['j', 'json', 'print the results in JSON format'], ['', 'keep-files', 'keep the component files in the workspace intact']]);
59
+ (0, _defineProperty2().default)(this, "options", [['f', 'force', 'ignore local changes/versions. eject component/s even when they are staged or modified. Note: unexported tags/snaps will be lost'], ['j', 'json', 'print the results in JSON format'], ['', 'keep-files', 'keep the component files in the workspace intact']]);
52
60
  (0, _defineProperty2().default)(this, "loader", true);
53
61
  (0, _defineProperty2().default)(this, "migration", true);
54
62
  (0, _defineProperty2().default)(this, "group", 'development');
@@ -1 +1 @@
1
- {"version":3,"names":["_workspace","data","require","_ejectTemplate","_interopRequireDefault","_componentsEjector","EjectCmd","constructor","workspace","logger","install","_defineProperty2","default","name","description","report","pattern","force","json","keepFiles","OutsideWorkspaceError","componentIds","idsByPattern","componentEjector","ComponentsEjector","ejectResults","eject","JSON","stringify","ejectTemplate","exports"],"sources":["eject-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport ejectTemplate from '@teambit/legacy/dist/cli/templates/eject-template';\nimport { Logger } from '@teambit/logger';\nimport { InstallMain } from '@teambit/install';\nimport { ComponentsEjector } from './components-ejector';\n\nexport class EjectCmd implements Command {\n name = 'eject <component-pattern>';\n description = 'replace components maintained in the workspace with their corresponding packages';\n helpUrl = 'docs/components/exporting-components#ejecting-components';\n arguments = [\n {\n name: 'component-pattern',\n description:\n 'component name, component id, or component pattern.\\nuse component pattern to select multiple components. use comma to separate patterns and \"!\" to exclude. e.g. \"ui/**, !ui/button\"\\nwrap the pattern with quotes',\n },\n ];\n alias = 'E';\n options = [\n ['f', 'force', 'ignore local version. remove the components even when they are staged or modified'],\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 migration = true;\n group = 'development';\n\n constructor(private workspace: Workspace, private logger: Logger, private install: InstallMain) {}\n\n async report(\n [pattern]: [string],\n { force = false, json = false, keepFiles = false }: { force: boolean; json: boolean; keepFiles: boolean }\n ): Promise<string> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentIds = await this.workspace.idsByPattern(pattern);\n const componentEjector = new ComponentsEjector(this.workspace, this.install, this.logger, componentIds, {\n force,\n keepFiles,\n });\n const ejectResults = await componentEjector.eject();\n if (json) return JSON.stringify(ejectResults, null, 2);\n return ejectTemplate(ejectResults);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,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,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,mBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,kBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMK,QAAQ,CAAoB;EAqBvCC,WAAWA,CAASC,SAAoB,EAAUC,MAAc,EAAUC,OAAoB,EAAE;IAAA,KAA5EF,SAAoB,GAApBA,SAAoB;IAAA,KAAUC,MAAc,GAAdA,MAAc;IAAA,KAAUC,OAAoB,GAApBA,OAAoB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBApBvF,2BAA2B;IAAA,IAAAD,gBAAA,GAAAC,OAAA,uBACpB,kFAAkF;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACtF,0DAA0D;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACxD,CACV;MACEC,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EACT;IACJ,CAAC,CACF;IAAA,IAAAH,gBAAA,GAAAC,OAAA,iBACO,GAAG;IAAA,IAAAD,gBAAA,GAAAC,OAAA,mBACD,CACR,CAAC,GAAG,EAAE,OAAO,EAAE,mFAAmF,CAAC,EACnG,CAAC,GAAG,EAAE,MAAM,EAAE,kCAAkC,CAAC,EACjD,CAAC,EAAE,EAAE,YAAY,EAAE,kDAAkD,CAAC,CACvE;IAAA,IAAAD,gBAAA,GAAAC,OAAA,kBACQ,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,qBACD,IAAI;IAAA,IAAAD,gBAAA,GAAAC,OAAA,iBACR,aAAa;EAE4E;EAEjG,MAAMG,MAAMA,CACV,CAACC,OAAO,CAAW,EACnB;IAAEC,KAAK,GAAG,KAAK;IAAEC,IAAI,GAAG,KAAK;IAAEC,SAAS,GAAG;EAA6D,CAAC,EACxF;IACjB,IAAI,CAAC,IAAI,CAACX,SAAS,EAAE,MAAM,KAAIY,kCAAqB,EAAC,CAAC;IACtD,MAAMC,YAAY,GAAG,MAAM,IAAI,CAACb,SAAS,CAACc,YAAY,CAACN,OAAO,CAAC;IAC/D,MAAMO,gBAAgB,GAAG,KAAIC,sCAAiB,EAAC,IAAI,CAAChB,SAAS,EAAE,IAAI,CAACE,OAAO,EAAE,IAAI,CAACD,MAAM,EAAEY,YAAY,EAAE;MACtGJ,KAAK;MACLE;IACF,CAAC,CAAC;IACF,MAAMM,YAAY,GAAG,MAAMF,gBAAgB,CAACG,KAAK,CAAC,CAAC;IACnD,IAAIR,IAAI,EAAE,OAAOS,IAAI,CAACC,SAAS,CAACH,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,OAAO,IAAAI,wBAAa,EAACJ,YAAY,CAAC;EACpC;AACF;AAACK,OAAA,CAAAxB,QAAA,GAAAA,QAAA"}
1
+ {"version":3,"names":["_workspace","data","require","_ejectTemplate","_interopRequireDefault","_constants","_componentsEjector","EjectCmd","constructor","workspace","logger","install","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","report","pattern","force","json","keepFiles","OutsideWorkspaceError","componentIds","idsByPattern","componentEjector","ComponentsEjector","ejectResults","eject","JSON","stringify","ejectTemplate","exports"],"sources":["eject-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport ejectTemplate from '@teambit/legacy/dist/cli/templates/eject-template';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Logger } from '@teambit/logger';\nimport { InstallMain } from '@teambit/install';\nimport { ComponentsEjector } from './components-ejector';\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 ['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 migration = true;\n group = 'development';\n\n constructor(private workspace: Workspace, private logger: Logger, private install: InstallMain) {}\n\n async report(\n [pattern]: [string],\n { force = false, json = false, keepFiles = false }: { force: boolean; json: boolean; keepFiles: boolean }\n ): Promise<string> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentIds = await this.workspace.idsByPattern(pattern);\n const componentEjector = new ComponentsEjector(this.workspace, this.install, this.logger, componentIds, {\n force,\n keepFiles,\n });\n const ejectResults = await componentEjector.eject();\n if (json) return JSON.stringify(ejectResults, null, 2);\n return ejectTemplate(ejectResults);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,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,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAA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AK;IAAEC,IAAI,GAAG,KAAK;IAAEC,SAAS,GAAG;EAA6D,CAAC,EACxF;IACjB,IAAI,CAAC,IAAI,CAACZ,SAAS,EAAE,MAAM,KAAIa,kCAAqB,EAAC,CAAC;IACtD,MAAMC,YAAY,GAAG,MAAM,IAAI,CAACd,SAAS,CAACe,YAAY,CAACN,OAAO,CAAC;IAC/D,MAAMO,gBAAgB,GAAG,KAAIC,sCAAiB,EAAC,IAAI,CAACjB,SAAS,EAAE,IAAI,CAACE,OAAO,EAAE,IAAI,CAACD,MAAM,EAAEa,YAAY,EAAE;MACtGJ,KAAK;MACLE;IACF,CAAC,CAAC;IACF,MAAMM,YAAY,GAAG,MAAMF,gBAAgB,CAACG,KAAK,CAAC,CAAC;IACnD,IAAIR,IAAI,EAAE,OAAOS,IAAI,CAACC,SAAS,CAACH,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,OAAO,IAAAI,wBAAa,EAACJ,YAAY,CAAC;EACpC;AACF;AAACK,OAAA,CAAAzB,QAAA,GAAAA,QAAA"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@0.0.603/dist/eject.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@0.0.603/dist/eject.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@0.0.605/dist/eject.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_eject@0.0.605/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,22 +1,22 @@
1
1
  {
2
2
  "name": "@teambit/eject",
3
- "version": "0.0.603",
3
+ "version": "0.0.605",
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": "0.0.603"
9
+ "version": "0.0.605"
10
10
  },
11
11
  "dependencies": {
12
12
  "core-js": "^3.0.0",
13
13
  "@babel/runtime": "7.20.0",
14
14
  "@teambit/component-id": "0.0.427",
15
15
  "@teambit/harmony": "0.4.6",
16
- "@teambit/install": "0.0.216",
17
- "@teambit/logger": "0.0.851",
18
- "@teambit/workspace": "0.0.1132",
19
- "@teambit/cli": "0.0.758"
16
+ "@teambit/install": "0.0.218",
17
+ "@teambit/logger": "0.0.853",
18
+ "@teambit/workspace": "0.0.1134",
19
+ "@teambit/cli": "0.0.760"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/react": "^17.0.8",
@@ -27,7 +27,7 @@
27
27
  "@types/testing-library__jest-dom": "5.9.5"
28
28
  },
29
29
  "peerDependencies": {
30
- "@teambit/legacy": "1.0.541",
30
+ "@teambit/legacy": "1.0.544",
31
31
  "react": "^16.8.0 || ^17.0.0",
32
32
  "react-dom": "^16.8.0 || ^17.0.0"
33
33
  },