@teambit/export 0.0.752 → 0.0.753
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/export-cmd.d.ts +1 -2
- package/dist/export-cmd.js +3 -7
- package/dist/export-cmd.js.map +1 -1
- package/dist/resume-export-cmd.d.ts +2 -1
- package/dist/resume-export-cmd.js +3 -2
- package/dist/resume-export-cmd.js.map +1 -1
- package/package-tar/teambit-export-0.0.753.tgz +0 -0
- package/package.json +7 -7
- package/{preview-1654399579544.js → preview-1654572446572.js} +2 -2
- package/package-tar/teambit-export-0.0.752.tgz +0 -0
package/dist/export-cmd.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
2
|
export declare class ExportCmd implements Command {
|
|
3
|
-
private docsDomain;
|
|
4
3
|
name: string;
|
|
5
4
|
description: string;
|
|
5
|
+
extendedDescription: string;
|
|
6
6
|
alias: string;
|
|
7
7
|
options: CommandOptions;
|
|
8
8
|
loader: boolean;
|
|
9
9
|
migration: boolean;
|
|
10
10
|
group: string;
|
|
11
|
-
shortDescription: string;
|
|
12
11
|
remoteOp: boolean;
|
|
13
12
|
constructor(docsDomain: string);
|
|
14
13
|
report([remote, ids]: [string, string[]], { eject, includeDependencies, setCurrentScope, all, allVersions, originDirectly, force, rewire, ignoreMissingArtifacts, resume, }: any): Promise<string>;
|
package/dist/export-cmd.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.symbol.description.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.array.iterator.js");
|
|
8
6
|
|
|
9
7
|
require("core-js/modules/es.promise.js");
|
|
@@ -85,18 +83,16 @@ function _lodash() {
|
|
|
85
83
|
|
|
86
84
|
class ExportCmd {
|
|
87
85
|
constructor(docsDomain) {
|
|
88
|
-
this.docsDomain = docsDomain;
|
|
89
86
|
(0, _defineProperty2().default)(this, "name", 'export [remote] [id...]');
|
|
90
|
-
(0, _defineProperty2().default)(this, "description",
|
|
87
|
+
(0, _defineProperty2().default)(this, "description", 'Export components to a remote scope');
|
|
88
|
+
(0, _defineProperty2().default)(this, "extendedDescription", void 0);
|
|
91
89
|
(0, _defineProperty2().default)(this, "alias", 'e');
|
|
92
90
|
(0, _defineProperty2().default)(this, "options", [['e', 'eject', 'replaces the exported components from the local scope with the corresponding packages'], ['a', 'all', 'export all components include non-staged'], ['d', 'include-dependencies', "LEGACY ONLY. include the component's dependencies as part of the export to the remote scope"], ['s', 'set-current-scope', "LEGACY ONLY. ensure the component's remote scope is set according to the target location"], ['r', 'rewire', 'LEGACY ONLY. when exporting to a different or new scope, replace import/require statements in the source code to match the new scope'], ['f', 'force', 'force changing a component remote without asking for a confirmation'], ['', 'all-versions', 'export not only staged versions but all of them'], ['', 'origin-directly', 'HARMONY ONLY. avoid export to the central hub, instead, export directly to the original scopes. not recommended!'], ['', 'resume <string>', 'in case the previous export failed and suggested to resume with an export-id, enter the id'], ['', 'ignore-missing-artifacts', "EXPERIMENTAL. don't throw an error when artifact files are missing. not recommended, unless you're sure the artifacts are in the remote"], ['j', 'json', 'show output in json format']]);
|
|
93
91
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
94
92
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
95
93
|
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
|
96
|
-
(0, _defineProperty2().default)(this, "shortDescription", 'Export components to a remote scope');
|
|
97
94
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
98
|
-
this.
|
|
99
|
-
bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well
|
|
95
|
+
this.extendedDescription = `bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well
|
|
100
96
|
\`bit export [id...]\` => export the given ids to their current scope
|
|
101
97
|
|
|
102
98
|
https://${docsDomain}/components/exporting-components
|
package/dist/export-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExportCmd","constructor","docsDomain","description","WILDCARD_HELP","report","remote","ids","eject","includeDependencies","setCurrentScope","all","allVersions","originDirectly","force","rewire","ignoreMissingArtifacts","resume","currentScope","CURRENT_UPSTREAM","GeneralError","componentsIds","nonExistOnBitMap","missingScope","exportedLanes","ejectResults","exportAction","includeNonStaged","codemod","resumeExportId","isEmpty","chalk","yellow","exportOutput","lanesOutput","length","bold","name","green","join","nonExistOnBitMapOutput","idsStr","map","id","toString","missingScopeOutput","ejectOutput","output","ejectTemplate","json","results"],"sources":["export-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n\nimport { exportAction } from '@teambit/legacy/dist/api/consumer';\nimport ejectTemplate from '@teambit/legacy/dist/cli/templates/eject-template';\nimport { CURRENT_UPSTREAM, WILDCARD_HELP } from '@teambit/legacy/dist/constants';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport chalk from 'chalk';\nimport { isEmpty } from 'lodash';\n\nexport class ExportCmd implements Command {\n name = 'export [remote] [id...]';\n description: string;\n alias = 'e';\n options = [\n ['e', 'eject', 'replaces the exported components from the local scope with the corresponding packages'],\n ['a', 'all', 'export all components include non-staged'],\n [\n 'd',\n 'include-dependencies',\n \"LEGACY ONLY. include the component's dependencies as part of the export to the remote scope\",\n ],\n [\n 's',\n 'set-current-scope',\n \"LEGACY ONLY. ensure the component's remote scope is set according to the target location\",\n ],\n [\n 'r',\n 'rewire',\n 'LEGACY ONLY. when exporting to a different or new scope, replace import/require statements in the source code to match the new scope',\n ],\n ['f', 'force', 'force changing a component remote without asking for a confirmation'],\n ['', 'all-versions', 'export not only staged versions but all of them'],\n [\n '',\n 'origin-directly',\n 'HARMONY ONLY. avoid export to the central hub, instead, export directly to the original scopes. not recommended!',\n ],\n [\n '',\n 'resume <string>',\n 'in case the previous export failed and suggested to resume with an export-id, enter the id',\n ],\n [\n '',\n 'ignore-missing-artifacts',\n \"EXPERIMENTAL. don't throw an error when artifact files are missing. not recommended, unless you're sure the artifacts are in the remote\",\n ],\n ['j', 'json', 'show output in json format'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n shortDescription = 'Export components to a remote scope';\n remoteOp = true;\n\n constructor(private docsDomain: string) {\n this.description = `export components to a remote scope.\nbit export => export all staged components to their current scope, if checked out to a lane, export the lane as well\n\\`bit export [id...]\\` => export the given ids to their current scope\n\nhttps://${docsDomain}/components/exporting-components\n${WILDCARD_HELP('export remote-scope')}`;\n }\n\n async report(\n [remote, ids = []]: [string, string[]],\n {\n eject = false,\n includeDependencies = false,\n setCurrentScope = false,\n all = false,\n allVersions = false,\n originDirectly = false,\n force = false,\n rewire = false,\n ignoreMissingArtifacts = false,\n resume,\n }: any\n ): Promise<string> {\n const currentScope = !remote || remote === CURRENT_UPSTREAM;\n if (currentScope && remote) {\n remote = '';\n }\n if (includeDependencies && !remote) {\n throw new GeneralError(\n 'to use --includeDependencies, please specify a remote (the default remote gets already the dependencies)'\n );\n }\n const { componentsIds, nonExistOnBitMap, missingScope, exportedLanes, ejectResults } = await exportAction({\n ids,\n remote,\n eject,\n includeDependencies,\n setCurrentScope,\n includeNonStaged: all || allVersions,\n allVersions: allVersions || all,\n originDirectly,\n codemod: rewire,\n force,\n resumeExportId: resume,\n ignoreMissingArtifacts,\n });\n if (isEmpty(componentsIds) && isEmpty(nonExistOnBitMap) && isEmpty(missingScope)) {\n return chalk.yellow('nothing to export');\n }\n const exportOutput = () => {\n if (isEmpty(componentsIds)) return '';\n const lanesOutput = exportedLanes.length ? ` from lane ${chalk.bold(exportedLanes[0].name)}` : '';\n if (remote)\n return chalk.green(`exported ${componentsIds.length} components${lanesOutput} to scope ${chalk.bold(remote)}`);\n return chalk.green(\n `exported the following ${componentsIds.length} component(s)${lanesOutput}:\\n${chalk.bold(\n componentsIds.join('\\n')\n )}`\n );\n };\n const nonExistOnBitMapOutput = () => {\n // if includeDependencies is true, the nonExistOnBitMap might be the dependencies\n if (isEmpty(nonExistOnBitMap) || includeDependencies) return '';\n const idsStr = nonExistOnBitMap.map((id) => id.toString()).join(', ');\n return chalk.yellow(\n `${idsStr}\\nexported successfully. bit did not update the workspace as the component files are not tracked. this might happen when a component was tracked in a different git branch. to fix it check if they where tracked in a different git branch, checkout to that branch and resync by running 'bit import'. or stay on your branch and track the components again using 'bit add'.\\n`\n );\n };\n const missingScopeOutput = () => {\n if (isEmpty(missingScope)) return '';\n const idsStr = missingScope.map((id) => id.toString()).join(', ');\n return chalk.yellow(\n `the following component(s) were not exported: ${chalk.bold(\n idsStr\n )}.\\nplease specify <remote> to export them, or set a \"defaultScope\" in your workspace config\\n\\n`\n );\n };\n const ejectOutput = () => {\n if (!ejectResults) return '';\n const output = ejectTemplate(ejectResults);\n return `\\n${output}`;\n };\n\n return nonExistOnBitMapOutput() + missingScopeOutput() + exportOutput() + ejectOutput();\n }\n\n async json(\n [remote, ids = []]: [string, string[]],\n {\n eject = false,\n includeDependencies = false,\n setCurrentScope = false,\n all = false,\n allVersions = false,\n originDirectly = false,\n force = false,\n rewire = false,\n ignoreMissingArtifacts = false,\n resume,\n }: any\n ) {\n const currentScope = !remote || remote === CURRENT_UPSTREAM;\n if (currentScope && remote) {\n remote = '';\n }\n if (includeDependencies && !remote) {\n throw new GeneralError(\n 'to use --includeDependencies, please specify a remote (the default remote gets already the dependencies)'\n );\n }\n const results = await exportAction({\n ids,\n remote,\n eject,\n includeDependencies,\n setCurrentScope,\n includeNonStaged: all || allVersions,\n allVersions: allVersions || all,\n originDirectly,\n codemod: rewire,\n force,\n resumeExportId: resume,\n ignoreMissingArtifacts,\n });\n\n return results;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;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ACA,OAAQ,KAAIsB,MAAO,EAAnB;IACD,CAJD;;IAMA,OAAOP,sBAAsB,KAAKK,kBAAkB,EAA7C,GAAkDZ,YAAY,EAA9D,GAAmEa,WAAW,EAArF;EACD;;EAES,MAAJG,IAAI,CACR,CAAC3C,MAAD,EAASC,GAAG,GAAG,EAAf,CADQ,EAER;IACEC,KAAK,GAAG,KADV;IAEEC,mBAAmB,GAAG,KAFxB;IAGEC,eAAe,GAAG,KAHpB;IAIEC,GAAG,GAAG,KAJR;IAKEC,WAAW,GAAG,KALhB;IAMEC,cAAc,GAAG,KANnB;IAOEC,KAAK,GAAG,KAPV;IAQEC,MAAM,GAAG,KARX;IASEC,sBAAsB,GAAG,KAT3B;IAUEC;EAVF,CAFQ,EAcR;IACA,MAAMC,YAAY,GAAG,CAACZ,MAAD,IAAWA,MAAM,KAAKa,6BAA3C;;IACA,IAAID,YAAY,IAAIZ,MAApB,EAA4B;MAC1BA,MAAM,GAAG,EAAT;IACD;;IACD,IAAIG,mBAAmB,IAAI,CAACH,MAA5B,EAAoC;MAClC,MAAM,KAAIc,uBAAJ,EACJ,0GADI,CAAN;IAGD;;IACD,MAAM8B,OAAO,GAAG,MAAM,IAAAxB,wBAAA,EAAa;MACjCnB,GADiC;MAEjCD,MAFiC;MAGjCE,KAHiC;MAIjCC,mBAJiC;MAKjCC,eALiC;MAMjCiB,gBAAgB,EAAEhB,GAAG,IAAIC,WANQ;MAOjCA,WAAW,EAAEA,WAAW,IAAID,GAPK;MAQjCE,cARiC;MASjCe,OAAO,EAAEb,MATwB;MAUjCD,KAViC;MAWjCe,cAAc,EAAEZ,MAXiB;MAYjCD;IAZiC,CAAb,CAAtB;IAeA,OAAOkC,OAAP;EACD;;AA9KuC"}
|
|
1
|
+
{"version":3,"names":["ExportCmd","constructor","docsDomain","extendedDescription","WILDCARD_HELP","report","remote","ids","eject","includeDependencies","setCurrentScope","all","allVersions","originDirectly","force","rewire","ignoreMissingArtifacts","resume","currentScope","CURRENT_UPSTREAM","GeneralError","componentsIds","nonExistOnBitMap","missingScope","exportedLanes","ejectResults","exportAction","includeNonStaged","codemod","resumeExportId","isEmpty","chalk","yellow","exportOutput","lanesOutput","length","bold","name","green","join","nonExistOnBitMapOutput","idsStr","map","id","toString","missingScopeOutput","ejectOutput","output","ejectTemplate","json","results"],"sources":["export-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n\nimport { exportAction } from '@teambit/legacy/dist/api/consumer';\nimport ejectTemplate from '@teambit/legacy/dist/cli/templates/eject-template';\nimport { CURRENT_UPSTREAM, WILDCARD_HELP } from '@teambit/legacy/dist/constants';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport chalk from 'chalk';\nimport { isEmpty } from 'lodash';\n\nexport class ExportCmd implements Command {\n name = 'export [remote] [id...]';\n description = 'Export components to a remote scope';\n extendedDescription: string;\n alias = 'e';\n options = [\n ['e', 'eject', 'replaces the exported components from the local scope with the corresponding packages'],\n ['a', 'all', 'export all components include non-staged'],\n [\n 'd',\n 'include-dependencies',\n \"LEGACY ONLY. include the component's dependencies as part of the export to the remote scope\",\n ],\n [\n 's',\n 'set-current-scope',\n \"LEGACY ONLY. ensure the component's remote scope is set according to the target location\",\n ],\n [\n 'r',\n 'rewire',\n 'LEGACY ONLY. when exporting to a different or new scope, replace import/require statements in the source code to match the new scope',\n ],\n ['f', 'force', 'force changing a component remote without asking for a confirmation'],\n ['', 'all-versions', 'export not only staged versions but all of them'],\n [\n '',\n 'origin-directly',\n 'HARMONY ONLY. avoid export to the central hub, instead, export directly to the original scopes. not recommended!',\n ],\n [\n '',\n 'resume <string>',\n 'in case the previous export failed and suggested to resume with an export-id, enter the id',\n ],\n [\n '',\n 'ignore-missing-artifacts',\n \"EXPERIMENTAL. don't throw an error when artifact files are missing. not recommended, unless you're sure the artifacts are in the remote\",\n ],\n ['j', 'json', 'show output in json format'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n remoteOp = true;\n\n constructor(docsDomain: string) {\n this.extendedDescription = `bit export => export all staged components to their current scope, if checked out to a lane, export the lane as well\n\\`bit export [id...]\\` => export the given ids to their current scope\n\nhttps://${docsDomain}/components/exporting-components\n${WILDCARD_HELP('export remote-scope')}`;\n }\n\n async report(\n [remote, ids = []]: [string, string[]],\n {\n eject = false,\n includeDependencies = false,\n setCurrentScope = false,\n all = false,\n allVersions = false,\n originDirectly = false,\n force = false,\n rewire = false,\n ignoreMissingArtifacts = false,\n resume,\n }: any\n ): Promise<string> {\n const currentScope = !remote || remote === CURRENT_UPSTREAM;\n if (currentScope && remote) {\n remote = '';\n }\n if (includeDependencies && !remote) {\n throw new GeneralError(\n 'to use --includeDependencies, please specify a remote (the default remote gets already the dependencies)'\n );\n }\n const { componentsIds, nonExistOnBitMap, missingScope, exportedLanes, ejectResults } = await exportAction({\n ids,\n remote,\n eject,\n includeDependencies,\n setCurrentScope,\n includeNonStaged: all || allVersions,\n allVersions: allVersions || all,\n originDirectly,\n codemod: rewire,\n force,\n resumeExportId: resume,\n ignoreMissingArtifacts,\n });\n if (isEmpty(componentsIds) && isEmpty(nonExistOnBitMap) && isEmpty(missingScope)) {\n return chalk.yellow('nothing to export');\n }\n const exportOutput = () => {\n if (isEmpty(componentsIds)) return '';\n const lanesOutput = exportedLanes.length ? ` from lane ${chalk.bold(exportedLanes[0].name)}` : '';\n if (remote)\n return chalk.green(`exported ${componentsIds.length} components${lanesOutput} to scope ${chalk.bold(remote)}`);\n return chalk.green(\n `exported the following ${componentsIds.length} component(s)${lanesOutput}:\\n${chalk.bold(\n componentsIds.join('\\n')\n )}`\n );\n };\n const nonExistOnBitMapOutput = () => {\n // if includeDependencies is true, the nonExistOnBitMap might be the dependencies\n if (isEmpty(nonExistOnBitMap) || includeDependencies) return '';\n const idsStr = nonExistOnBitMap.map((id) => id.toString()).join(', ');\n return chalk.yellow(\n `${idsStr}\\nexported successfully. bit did not update the workspace as the component files are not tracked. this might happen when a component was tracked in a different git branch. to fix it check if they where tracked in a different git branch, checkout to that branch and resync by running 'bit import'. or stay on your branch and track the components again using 'bit add'.\\n`\n );\n };\n const missingScopeOutput = () => {\n if (isEmpty(missingScope)) return '';\n const idsStr = missingScope.map((id) => id.toString()).join(', ');\n return chalk.yellow(\n `the following component(s) were not exported: ${chalk.bold(\n idsStr\n )}.\\nplease specify <remote> to export them, or set a \"defaultScope\" in your workspace config\\n\\n`\n );\n };\n const ejectOutput = () => {\n if (!ejectResults) return '';\n const output = ejectTemplate(ejectResults);\n return `\\n${output}`;\n };\n\n return nonExistOnBitMapOutput() + missingScopeOutput() + exportOutput() + ejectOutput();\n }\n\n async json(\n [remote, ids = []]: [string, string[]],\n {\n eject = false,\n includeDependencies = false,\n setCurrentScope = false,\n all = false,\n allVersions = false,\n originDirectly = false,\n force = false,\n rewire = false,\n ignoreMissingArtifacts = false,\n resume,\n }: any\n ) {\n const currentScope = !remote || remote === CURRENT_UPSTREAM;\n if (currentScope && remote) {\n remote = '';\n }\n if (includeDependencies && !remote) {\n throw new GeneralError(\n 'to use --includeDependencies, please specify a remote (the default remote gets already the dependencies)'\n );\n }\n const results = await exportAction({\n ids,\n remote,\n eject,\n includeDependencies,\n setCurrentScope,\n includeNonStaged: all || allVersions,\n allVersions: allVersions || all,\n originDirectly,\n codemod: rewire,\n force,\n resumeExportId: resume,\n ignoreMissingArtifacts,\n });\n\n return results;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,SAAN,CAAmC;EA+CxCC,WAAW,CAACC,UAAD,EAAqB;IAAA,8CA9CzB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FxB;IAGEC,eAAe,GAAG,KAHpB;IAIEC,GAAG,GAAG,KAJR;IAKEC,WAAW,GAAG,KALhB;IAMEC,cAAc,GAAG,KANnB;IAOEC,KAAK,GAAG,KAPV;IAQEC,MAAM,GAAG,KARX;IASEC,sBAAsB,GAAG,KAT3B;IAUEC;EAVF,CAFQ,EAcR;IACA,MAAMC,YAAY,GAAG,CAACZ,MAAD,IAAWA,MAAM,KAAKa,6BAA3C;;IACA,IAAID,YAAY,IAAIZ,MAApB,EAA4B;MAC1BA,MAAM,GAAG,EAAT;IACD;;IACD,IAAIG,mBAAmB,IAAI,CAACH,MAA5B,EAAoC;MAClC,MAAM,KAAIc,uBAAJ,EACJ,0GADI,CAAN;IAGD;;IACD,MAAM8B,OAAO,GAAG,MAAM,IAAAxB,wBAAA,EAAa;MACjCnB,GADiC;MAEjCD,MAFiC;MAGjCE,KAHiC;MAIjCC,mBAJiC;MAKjCC,eALiC;MAMjCiB,gBAAgB,EAAEhB,GAAG,IAAIC,WANQ;MAOjCA,WAAW,EAAEA,WAAW,IAAID,GAPK;MAQjCE,cARiC;MASjCe,OAAO,EAAEb,MATwB;MAUjCD,KAViC;MAWjCe,cAAc,EAAEZ,MAXiB;MAYjCD;IAZiC,CAAb,CAAtB;IAeA,OAAOkC,OAAP;EACD;;AA7KuC"}
|
|
@@ -3,13 +3,14 @@ import { ScopeMain } from '@teambit/scope';
|
|
|
3
3
|
export declare class ResumeExportCmd implements Command {
|
|
4
4
|
private scope;
|
|
5
5
|
name: string;
|
|
6
|
-
shortDescription: string;
|
|
7
6
|
description: string;
|
|
7
|
+
extendedDescription: string;
|
|
8
8
|
alias: string;
|
|
9
9
|
options: CommandOptions;
|
|
10
10
|
loader: boolean;
|
|
11
11
|
migration: boolean;
|
|
12
12
|
group: string;
|
|
13
|
+
private: boolean;
|
|
13
14
|
remoteOp: boolean;
|
|
14
15
|
constructor(scope: ScopeMain);
|
|
15
16
|
report([exportId, remotes]: [string, string[]]): Promise<string>;
|
|
@@ -35,8 +35,8 @@ class ResumeExportCmd {
|
|
|
35
35
|
constructor(scope) {
|
|
36
36
|
this.scope = scope;
|
|
37
37
|
(0, _defineProperty2().default)(this, "name", 'resume-export <export-id> <remotes...>');
|
|
38
|
-
(0, _defineProperty2().default)(this, "
|
|
39
|
-
(0, _defineProperty2().default)(this, "
|
|
38
|
+
(0, _defineProperty2().default)(this, "description", 'EXPERIMENTAL. resume failed export');
|
|
39
|
+
(0, _defineProperty2().default)(this, "extendedDescription", `resume failed export to persist the pending objects on the given remotes.
|
|
40
40
|
the export-id is the id the client got in the error message during the failure.
|
|
41
41
|
alternatively, exporting to any one of the failed scopes, throws server-is-busy error with the export-id`);
|
|
42
42
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
@@ -44,6 +44,7 @@ alternatively, exporting to any one of the failed scopes, throws server-is-busy
|
|
|
44
44
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
45
45
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
46
46
|
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
|
47
|
+
(0, _defineProperty2().default)(this, "private", true);
|
|
47
48
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
48
49
|
}
|
|
49
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ResumeExportCmd","constructor","scope","report","exportId","remotes","exportedIds","resumeExport","length","chalk","yellow","join"],"sources":["resume-export-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ScopeMain } from '@teambit/scope';\n\nexport class ResumeExportCmd implements Command {\n name = 'resume-export <export-id> <remotes...>';\n
|
|
1
|
+
{"version":3,"names":["ResumeExportCmd","constructor","scope","report","exportId","remotes","exportedIds","resumeExport","length","chalk","yellow","join"],"sources":["resume-export-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { ScopeMain } from '@teambit/scope';\n\nexport class ResumeExportCmd implements Command {\n name = 'resume-export <export-id> <remotes...>';\n description = 'EXPERIMENTAL. resume failed export';\n extendedDescription = `resume failed export to persist the pending objects on the given remotes.\nthe export-id is the id the client got in the error message during the failure.\nalternatively, exporting to any one of the failed scopes, throws server-is-busy error with the export-id`;\n alias = '';\n options = [] as CommandOptions;\n loader = true;\n migration = true;\n group = 'collaborate';\n private = true;\n remoteOp = true;\n\n constructor(private scope: ScopeMain) {}\n\n async report([exportId, remotes]: [string, string[]]): Promise<string> {\n const exportedIds = await this.scope.resumeExport(exportId, remotes);\n if (!exportedIds.length) return chalk.yellow('no components were left to persist for this export-id');\n return `the following components were persisted successfully:\n${exportedIds.join('\\n')}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIO,MAAMA,eAAN,CAAyC;EAc9CC,WAAW,CAASC,KAAT,EAA2B;IAAA,KAAlBA,KAAkB,GAAlBA,KAAkB;IAAA,8CAb/B,wCAa+B;IAAA,qDAZxB,oCAYwB;IAAA,6DAXf;AACzB;AACA,yGASwC;IAAA,+CAR9B,EAQ8B;IAAA,iDAP5B,EAO4B;IAAA,gDAN7B,IAM6B;IAAA,mDAL1B,IAK0B;IAAA,+CAJ9B,aAI8B;IAAA,iDAH5B,IAG4B;IAAA,kDAF3B,IAE2B;EAAE;;EAE5B,MAANC,MAAM,CAAC,CAACC,QAAD,EAAWC,OAAX,CAAD,EAA2D;IACrE,MAAMC,WAAW,GAAG,MAAM,KAAKJ,KAAL,CAAWK,YAAX,CAAwBH,QAAxB,EAAkCC,OAAlC,CAA1B;IACA,IAAI,CAACC,WAAW,CAACE,MAAjB,EAAyB,OAAOC,gBAAA,CAAMC,MAAN,CAAa,uDAAb,CAAP;IACzB,OAAQ;AACZ,EAAEJ,WAAW,CAACK,IAAZ,CAAiB,IAAjB,CAAuB,EADrB;EAED;;AArB6C"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/export",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.753",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/scope/export",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "export",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.753"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"@babel/runtime": "7.12.18",
|
|
15
15
|
"core-js": "^3.0.0",
|
|
16
16
|
"@teambit/harmony": "0.3.3",
|
|
17
|
-
"@teambit/cli": "0.0.
|
|
18
|
-
"@teambit/community": "0.0.
|
|
19
|
-
"@teambit/scope": "0.0.
|
|
17
|
+
"@teambit/cli": "0.0.497",
|
|
18
|
+
"@teambit/community": "0.0.45",
|
|
19
|
+
"@teambit/scope": "0.0.753"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/lodash": "4.14.165",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/node": "12.20.4"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@teambit/legacy": "1.0.
|
|
31
|
+
"@teambit/legacy": "1.0.277",
|
|
32
32
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
33
33
|
"react": "^16.8.0 || ^17.0.0"
|
|
34
34
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react": "-"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@teambit/legacy": "1.0.
|
|
59
|
+
"@teambit/legacy": "1.0.277",
|
|
60
60
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react": "^16.8.0 || ^17.0.0"
|
|
62
62
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_export@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_export@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_export@0.0.753/dist/export.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_export@0.0.753/dist/export.docs.mdx')]
|
|
Binary file
|