@teambit/importer 0.0.561 → 0.0.563
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/fetch-cmd.js +2 -2
- package/dist/fetch-cmd.js.map +1 -1
- package/dist/import.cmd.js +6 -6
- package/dist/import.cmd.js.map +1 -1
- package/dist/{preview-1692069513137.js → preview-1692297727886.js} +2 -2
- package/package-tar/teambit-importer-0.0.563.tgz +0 -0
- package/package.json +14 -14
- package/package-tar/teambit-importer-0.0.561.tgz +0 -0
package/dist/fetch-cmd.js
CHANGED
|
@@ -36,7 +36,7 @@ class FetchCmd {
|
|
|
36
36
|
(0, _defineProperty2().default)(this, "extendedDescription", `for lanes, use "/" as a separator between the remote and the lane name, e.g. teambit.ui/fix-button`);
|
|
37
37
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
38
38
|
(0, _defineProperty2().default)(this, "private", true);
|
|
39
|
-
(0, _defineProperty2().default)(this, "options", [['l', 'lanes', 'fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs'], ['c', 'components', 'fetch components'], ['', 'all-history', 'for each
|
|
39
|
+
(0, _defineProperty2().default)(this, "options", [['l', 'lanes', 'fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs'], ['c', 'components', 'fetch components'], ['', 'all-history', 'for each component, fetch all its versions. by default, only the latest version is fetched'], ['j', 'json', 'return the output as JSON'], ['', 'from-original-scopes', 'fetch indirect dependencies from their original scope as opposed to from their dependents']]);
|
|
40
40
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
41
41
|
}
|
|
42
42
|
async report([ids = []], {
|
|
@@ -59,7 +59,7 @@ class FetchCmd {
|
|
|
59
59
|
const title = importedIds.length === 1 ? 'successfully fetched one component' : `successfully fetched ${importedIds.length} components`;
|
|
60
60
|
const componentDependencies = importedIds.map(id => {
|
|
61
61
|
const details = importDetails.find(c => c.id === id.toStringWithoutVersion());
|
|
62
|
-
if (!details) throw new Error(`missing details
|
|
62
|
+
if (!details) throw new Error(`missing details for component ${id.toString()}`);
|
|
63
63
|
return formatPlainComponentItemWithVersions(id, details);
|
|
64
64
|
});
|
|
65
65
|
const componentDependenciesOutput = [_chalk().default.green(title)].concat(componentDependencies).join('\n');
|
package/dist/fetch-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_mergeVersion","FetchCmd","constructor","importer","_defineProperty2","default","report","ids","lanes","components","json","fromOriginalScope","allHistory","importedIds","importDetails","fetch","JSON","stringify","length","title","componentDependencies","map","id","details","find","c","toStringWithoutVersion","Error","toString","formatPlainComponentItemWithVersions","componentDependenciesOutput","chalk","green","concat","join","yellow","exports","bitId","status","versions","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","Object","keys","filter","file","FileStatus","manual","bold","deprecated","missingDeps","red","d","cyan"],"sources":["fetch-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { FileStatus } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportDetails, ImportStatus } from './import-components';\n\nexport class FetchCmd implements Command {\n name = 'fetch [ids...]';\n description = `fetch remote objects and store locally`;\n extendedDescription = `for lanes, use \"/\" as a separator between the remote and the lane name, e.g. teambit.ui/fix-button`;\n alias = '';\n private = true;\n options = [\n [\n 'l',\n 'lanes',\n 'fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs',\n ],\n ['c', 'components', 'fetch components'],\n [
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_mergeVersion","FetchCmd","constructor","importer","_defineProperty2","default","report","ids","lanes","components","json","fromOriginalScope","allHistory","importedIds","importDetails","fetch","JSON","stringify","length","title","componentDependencies","map","id","details","find","c","toStringWithoutVersion","Error","toString","formatPlainComponentItemWithVersions","componentDependenciesOutput","chalk","green","concat","join","yellow","exports","bitId","status","versions","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","Object","keys","filter","file","FileStatus","manual","bold","deprecated","missingDeps","red","d","cyan"],"sources":["fetch-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { FileStatus } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportDetails, ImportStatus } from './import-components';\n\nexport class FetchCmd implements Command {\n name = 'fetch [ids...]';\n description = `fetch remote objects and store locally`;\n extendedDescription = `for lanes, use \"/\" as a separator between the remote and the lane name, e.g. teambit.ui/fix-button`;\n alias = '';\n private = true;\n options = [\n [\n 'l',\n 'lanes',\n 'fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs',\n ],\n ['c', 'components', 'fetch components'],\n ['', 'all-history', 'for each component, fetch all its versions. by default, only the latest version is fetched'],\n ['j', 'json', 'return the output as JSON'],\n [\n '',\n 'from-original-scopes',\n 'fetch indirect dependencies from their original scope as opposed to from their dependents',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private importer: ImporterMain) {}\n\n async report(\n [ids = []]: [string[]],\n {\n lanes = false,\n components = false,\n json = false,\n fromOriginalScope = false,\n allHistory = false,\n }: {\n lanes?: boolean;\n components?: boolean;\n json?: boolean;\n fromOriginalScope?: boolean;\n allHistory?: boolean;\n }\n ) {\n const { importedIds, importDetails } = await this.importer.fetch(\n ids,\n lanes,\n components,\n fromOriginalScope,\n allHistory\n );\n if (json) {\n return JSON.stringify({ importDetails }, null, 4);\n }\n if (importedIds.length) {\n const title =\n importedIds.length === 1\n ? 'successfully fetched one component'\n : `successfully fetched ${importedIds.length} components`;\n const componentDependencies = importedIds.map((id) => {\n const details = importDetails.find((c) => c.id === id.toStringWithoutVersion());\n if (!details) throw new Error(`missing details for component ${id.toString()}`);\n return formatPlainComponentItemWithVersions(id, details);\n });\n const componentDependenciesOutput = [chalk.green(title)].concat(componentDependencies).join('\\n');\n\n return componentDependenciesOutput;\n }\n return chalk.yellow('nothing to import');\n }\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: BitId, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n const versions = importDetails.versions.length ? `new versions: ${importDetails.versions.join(', ')}` : '';\n const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus) // $FlowFixMe file is set\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n .filter((file) => importDetails.filesStatus[file] === FileStatus.manual);\n if (!conflictedFiles.length) return '';\n return `(the following files were saved with conflicts ${conflictedFiles\n .map((file) => chalk.bold(file))\n .join(', ')}) `;\n };\n const deprecated = importDetails.deprecated ? chalk.yellow('deprecated') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n return `- ${chalk.green(status)} ${chalk.cyan(\n id\n )} ${versions}${usedVersion} ${getConflictMessage()}${deprecated} ${missingDeps}`;\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;AAGA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIO,MAAMI,QAAQ,CAAoB;EAuBvCC,WAAWA,CAASC,QAAsB,EAAE;IAAA,KAAxBA,QAAsB,GAAtBA,QAAsB;IAAA,IAAAC,gBAAA,GAAAC,OAAA,gBAtBnC,g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a,CAAC6B,WAAW,CAACK,IAAI,CAAC,KAAKC,0BAAU,CAACC,MAAM,CAAC;IAC1E,IAAI,CAACN,eAAe,CAAC1B,MAAM,EAAE,OAAO,EAAE;IACtC,OAAQ,kDAAiD0B,eAAe,CACrEvB,GAAG,CAAE2B,IAAI,IAAKjB,gBAAK,CAACoB,IAAI,CAACH,IAAI,CAAC,CAAC,CAC/Bd,IAAI,CAAC,IAAI,CAAE,IAAG;EACnB,CAAC;EACD,MAAMkB,UAAU,GAAGtC,aAAa,CAACsC,UAAU,GAAGrB,gBAAK,CAACI,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE;EAC7E,MAAMkB,WAAW,GAAGvC,aAAa,CAACuC,WAAW,CAACnC,MAAM,GAChDa,gBAAK,CAACuB,GAAG,CAAE,yBAAwBxC,aAAa,CAACuC,WAAW,CAAChC,GAAG,CAAEkC,CAAC,IAAKA,CAAC,CAAC3B,QAAQ,CAAC,CAAC,CAAC,CAACM,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC,GACnG,EAAE;EACN,OAAQ,KAAIH,gBAAK,CAACC,KAAK,CAACM,MAAM,CAAE,IAAGP,gBAAK,CAACyB,IAAI,CAC3ClC,EACF,CAAE,IAAGiB,QAAS,GAAEC,WAAY,IAAGE,kBAAkB,CAAC,CAAE,GAAEU,UAAW,IAAGC,WAAY,EAAC;AACnF"}
|
package/dist/import.cmd.js
CHANGED
|
@@ -85,9 +85,9 @@ class ImportCmd {
|
|
|
85
85
|
(0, _defineProperty2().default)(this, "extendedDescription", void 0);
|
|
86
86
|
(0, _defineProperty2().default)(this, "group", 'collaborate');
|
|
87
87
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
88
|
-
(0, _defineProperty2().default)(this, "options", [['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'], ['o', 'objects', 'import components objects to the local scope without checkout (without writing them to the file system). This is
|
|
88
|
+
(0, _defineProperty2().default)(this, "options", [['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'], ['o', 'objects', 'import components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argument'], ['O', 'override', 'override local changes'], ['v', 'verbose', 'show verbose output for inspection'], ['j', 'json', 'return the output as JSON'],
|
|
89
89
|
// ['', 'conf', 'write the configuration file (component.json) of the component'], // not working. need to fix once ComponentWriter is moved to Harmony
|
|
90
|
-
['x', 'skip-dependency-installation', 'do not install
|
|
90
|
+
['x', 'skip-dependency-installation', 'do not auto-install dependencies of the imported components'], ['m', 'merge [strategy]', 'merge local changes with the imported version. strategy should be "theirs", "ours" or "manual"'], ['', 'dependencies', 'import all dependencies (bit components only) of imported components and write them to the workspace'], ['', 'dependents', 'import components found while traversing from the imported components upwards to the workspace components'], ['', 'save-in-lane', 'when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main)'], ['', 'all-history', 'relevant for fetching all components objects. avoid optimizations, fetch all history versions, always'], ['', 'fetch-deps', 'fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data'], ['', 'track-only', 'do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmap'], ['', 'include-deprecated', 'when importing with patterns, include deprecated components (default to exclude them)']]);
|
|
91
91
|
(0, _defineProperty2().default)(this, "loader", true);
|
|
92
92
|
(0, _defineProperty2().default)(this, "migration", true);
|
|
93
93
|
(0, _defineProperty2().default)(this, "remoteOp", true);
|
|
@@ -110,7 +110,7 @@ class ImportCmd {
|
|
|
110
110
|
let upToDateCount = 0;
|
|
111
111
|
const importedComponents = importedIds.map(bitId => {
|
|
112
112
|
const details = importDetails.find(c => c.id === bitId.toStringWithoutVersion());
|
|
113
|
-
if (!details) throw new Error(`missing details
|
|
113
|
+
if (!details) throw new Error(`missing details for component ${bitId.toString()}`);
|
|
114
114
|
if (details.status === 'up to date') {
|
|
115
115
|
upToDateCount += 1;
|
|
116
116
|
}
|
|
@@ -152,10 +152,10 @@ class ImportCmd {
|
|
|
152
152
|
includeDeprecated = false
|
|
153
153
|
}) {
|
|
154
154
|
if (objects && merge) {
|
|
155
|
-
throw new (_generalError().default)('
|
|
155
|
+
throw new (_generalError().default)(' --objects and --merge flags cannot be used together');
|
|
156
156
|
}
|
|
157
157
|
if (override && merge) {
|
|
158
|
-
throw new (_generalError().default)('
|
|
158
|
+
throw new (_generalError().default)('--override and --merge cannot be used together');
|
|
159
159
|
}
|
|
160
160
|
if (!ids.length && dependencies) {
|
|
161
161
|
throw new (_generalError().default)('you have to specify ids to use "--dependencies" flag');
|
|
@@ -200,7 +200,7 @@ function formatMissingComponents(missing) {
|
|
|
200
200
|
if (!(missing !== null && missing !== void 0 && missing.length)) return '';
|
|
201
201
|
const title = _chalk().default.underline('Missing Components');
|
|
202
202
|
const subTitle = `The following components are missing from the remote in the requested version, try running "bit status" to re-sync your .bitmap file
|
|
203
|
-
Also,
|
|
203
|
+
Also, check that the requested version exists on main or the checked out lane`;
|
|
204
204
|
const body = _chalk().default.red(missing.join('\n'));
|
|
205
205
|
return `\n\n${title}\n${subTitle}\n${body}`;
|
|
206
206
|
}
|
package/dist/import.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_ramda","_merging","_mergeVersion","_generalError","_utils","_chalkBox","ImportCmd","constructor","importer","_defineProperty2","default","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","missingIds","cancellationMessage","getImportResults","length","chalk","yellow","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","upToDateStr","summary","importOutput","compact","green","join","importedDepsOutput","displayDependencies","immutableUnshift","R","uniq","formatPlainComponentItem","output","formatMissingComponents","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","merge","saveInLane","dependencies","dependents","allHistory","fetchDeps","trackOnly","includeDeprecated","GeneralError","mergeStrategy","is","String","options","Object","keys","MergeOptions","includes","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","importDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","underline","subTitle","body","red","getVersionsOutput","versions","latestVersion","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","deprecated","removed","missingDeps","d","undefined","dim","cyan"],"sources":["import.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact } from 'lodash';\nimport R from 'ramda';\nimport { installationErrorOutput, compilationErrorOutput } from '@teambit/merging';\nimport {\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatPlainComponentItem } from '@teambit/legacy/dist/cli/chalk-box';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportOptions, ImportDetails, ImportStatus, ImportResult } from './import-components';\n\ntype ImportFlags = {\n path?: string;\n objects?: boolean;\n displayDependencies?: boolean;\n override?: boolean;\n verbose?: boolean;\n json?: boolean;\n conf?: string;\n skipDependencyInstallation?: boolean;\n merge?: MergeStrategy;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependents?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n};\n\nexport class ImportCmd implements Command {\n name = 'import [component-patterns...]';\n description = 'import components from their remote scopes to the local workspace';\n helpUrl = 'docs/components/importing-components';\n arguments = [\n {\n name: 'component-patterns...',\n description:\n 'component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., \"utils/*\" (wrap with double quotes)',\n },\n ];\n extendedDescription: string;\n group = 'collaborate';\n alias = '';\n options = [\n ['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'],\n [\n 'o',\n 'objects',\n 'import components objects to the local scope without checkout (without writing them to the file system). This is a default behavior for import with no id argument',\n ],\n ['d', 'display-dependencies', 'display the imported dependencies'],\n ['O', 'override', 'override local changes'],\n ['v', 'verbose', 'show verbose output for inspection'],\n ['j', 'json', 'return the output as JSON'],\n // ['', 'conf', 'write the configuration file (component.json) of the component'], // not working. need to fix once ComponentWriter is moved to Harmony\n ['x', 'skip-dependency-installation', 'do not install packages of the imported components'],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the imported version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n ['', 'dependencies', 'import all dependencies and write them to the workspace'],\n [\n '',\n 'dependents',\n 'import components found while traversing from the given ids upwards to the workspace components',\n ],\n [\n '',\n 'save-in-lane',\n 'when checked out to a lane and the component is not on the remote-lane, save it in the lane (default to save on main)',\n ],\n [\n '',\n 'all-history',\n 'relevant for fetching all components objects. avoid optimizations, fetch all history versions, always',\n ],\n ['', 'fetch-deps', 'fetch dependencies objects'],\n ['', 'track-only', 'do not write any file, just create .bitmap entries of the imported components'],\n ['', 'include-deprecated', 'when importing with patterns, include deprecated components (default to exclude them)'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n _packageManagerArgs: string[]; // gets populated by yargs-adapter.handler().\n\n constructor(private importer: ImporterMain) {}\n\n async report([ids = []]: [string[]], importFlags: ImportFlags): Promise<any> {\n const {\n importDetails,\n importedIds,\n importedDeps,\n installationError,\n compilationError,\n missingIds,\n cancellationMessage,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n\n const summaryPrefix =\n importedIds.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIds.length} components`;\n\n let upToDateCount = 0;\n const importedComponents = importedIds.map((bitId) => {\n const details = importDetails.find((c) => c.id === bitId.toStringWithoutVersion());\n if (!details) throw new Error(`missing details of component ${bitId.toString()}`);\n if (details.status === 'up to date') {\n upToDateCount += 1;\n }\n return formatPlainComponentItemWithVersions(bitId, details);\n });\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = [...compact(importedComponents), chalk.green(summary)].join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n R.uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output =\n importOutput +\n importedDepsOutput +\n formatMissingComponents(missingIds) +\n installationErrorOutput(installationError) +\n compilationErrorOutput(compilationError);\n\n return output;\n }\n\n async json([ids]: [string[]], importFlags: ImportFlags) {\n const { importDetails, installationError, missingIds } = await this.getImportResults(ids, importFlags);\n\n return { importDetails, installationError, missingIds };\n }\n\n private async getImportResults(\n ids: string[],\n {\n path,\n objects = false,\n override = false,\n verbose = false,\n conf,\n skipDependencyInstallation = false,\n merge,\n saveInLane = false,\n dependencies = false,\n dependents = false,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (objects && merge) {\n throw new GeneralError('you cant use --objects and --merge flags combined');\n }\n if (override && merge) {\n throw new GeneralError('you cant use --override and --merge flags combined');\n }\n if (!ids.length && dependencies) {\n throw new GeneralError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependents) {\n throw new GeneralError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new GeneralError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && R.is(String, merge)) {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new GeneralError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importDependents: dependents,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n };\n return this.importer.import(importOptions, this._packageManagerArgs);\n }\n}\n\nfunction formatMissingComponents(missing?: string[]) {\n if (!missing?.length) return '';\n const title = chalk.underline('Missing Components');\n const subTitle = `The following components are missing from the remote in the requested version, try running \"bit status\" to re-sync your .bitmap file\nAlso, make sure the requested version exists on main or the checked out lane`;\n const body = chalk.red(missing.join('\\n'));\n return `\\n\\n${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: BitId, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus)\n // @ts-ignore file is set\n .filter((file) => importDetails.filesStatus[file] === FileStatus.manual);\n if (!conflictedFiles.length) return '';\n return `(the following files were saved with conflicts ${conflictedFiles\n .map((file) => chalk.bold(file))\n .join(', ')}) `;\n };\n const conflictMessage = getConflictMessage();\n const deprecated = importDetails.deprecated && !importDetails.removed ? chalk.yellow('deprecated') : '';\n const removed = importDetails.removed ? chalk.red('removed') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n if (status === 'up to date' && !missingDeps && !deprecated && !conflictMessage && !removed) {\n return undefined;\n }\n return chalk.dim(\n `- ${chalk.green(status)} ${chalk.cyan(\n id\n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AC,GACnG,EAAE;EACN,IAAIP,MAAM,KAAK,YAAY,IAAI,CAAC2E,WAAW,IAAI,CAACF,UAAU,IAAI,CAACD,eAAe,IAAI,CAACE,OAAO,EAAE;IAC1F,OAAOG,SAAS;EAClB;EACA,OAAO3F,gBAAK,CAAC4F,GAAG,CACb,KAAI5F,gBAAK,CAACoB,KAAK,CAACN,MAAM,CAAE,IAAGd,gBAAK,CAAC6F,IAAI,CACpCnF,EACF,CAAE,IAAGgE,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EACvF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_ramda","_merging","_mergeVersion","_generalError","_utils","_chalkBox","ImportCmd","constructor","importer","_defineProperty2","default","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","missingIds","cancellationMessage","getImportResults","length","chalk","yellow","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","upToDateStr","summary","importOutput","compact","green","join","importedDepsOutput","displayDependencies","immutableUnshift","R","uniq","formatPlainComponentItem","output","formatMissingComponents","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","merge","saveInLane","dependencies","dependents","allHistory","fetchDeps","trackOnly","includeDeprecated","GeneralError","mergeStrategy","is","String","options","Object","keys","MergeOptions","includes","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","importDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","underline","subTitle","body","red","getVersionsOutput","versions","latestVersion","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","deprecated","removed","missingDeps","d","undefined","dim","cyan"],"sources":["import.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact } from 'lodash';\nimport R from 'ramda';\nimport { installationErrorOutput, compilationErrorOutput } from '@teambit/merging';\nimport {\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatPlainComponentItem } from '@teambit/legacy/dist/cli/chalk-box';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportOptions, ImportDetails, ImportStatus, ImportResult } from './import-components';\n\ntype ImportFlags = {\n path?: string;\n objects?: boolean;\n displayDependencies?: boolean;\n override?: boolean;\n verbose?: boolean;\n json?: boolean;\n conf?: string;\n skipDependencyInstallation?: boolean;\n merge?: MergeStrategy;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependents?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n};\n\nexport class ImportCmd implements Command {\n name = 'import [component-patterns...]';\n description = 'import components from their remote scopes to the local workspace';\n helpUrl = 'docs/components/importing-components';\n arguments = [\n {\n name: 'component-patterns...',\n description:\n 'component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., \"utils/*\" (wrap with double quotes)',\n },\n ];\n extendedDescription: string;\n group = 'collaborate';\n alias = '';\n options = [\n ['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'],\n [\n 'o',\n 'objects',\n 'import components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argument',\n ],\n ['O', 'override', 'override local changes'],\n ['v', 'verbose', 'show verbose output for inspection'],\n ['j', 'json', 'return the output as JSON'],\n // ['', 'conf', 'write the configuration file (component.json) of the component'], // not working. need to fix once ComponentWriter is moved to Harmony\n ['x', 'skip-dependency-installation', 'do not auto-install dependencies of the imported components'],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the imported version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n [\n '',\n 'dependencies',\n 'import all dependencies (bit components only) of imported components and write them to the workspace',\n ],\n [\n '',\n 'dependents',\n 'import components found while traversing from the imported components upwards to the workspace components',\n ],\n [\n '',\n 'save-in-lane',\n 'when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main)',\n ],\n [\n '',\n 'all-history',\n 'relevant for fetching all components objects. avoid optimizations, fetch all history versions, always',\n ],\n [\n '',\n 'fetch-deps',\n 'fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data',\n ],\n [\n '',\n 'track-only',\n 'do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmap',\n ],\n ['', 'include-deprecated', 'when importing with patterns, include deprecated components (default to exclude them)'],\n ] as CommandOptions;\n loader = true;\n migration = true;\n remoteOp = true;\n _packageManagerArgs: string[]; // gets populated by yargs-adapter.handler().\n\n constructor(private importer: ImporterMain) {}\n\n async report([ids = []]: [string[]], importFlags: ImportFlags): Promise<any> {\n const {\n importDetails,\n importedIds,\n importedDeps,\n installationError,\n compilationError,\n missingIds,\n cancellationMessage,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n\n const summaryPrefix =\n importedIds.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIds.length} components`;\n\n let upToDateCount = 0;\n const importedComponents = importedIds.map((bitId) => {\n const details = importDetails.find((c) => c.id === bitId.toStringWithoutVersion());\n if (!details) throw new Error(`missing details for component ${bitId.toString()}`);\n if (details.status === 'up to date') {\n upToDateCount += 1;\n }\n return formatPlainComponentItemWithVersions(bitId, details);\n });\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = [...compact(importedComponents), chalk.green(summary)].join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n R.uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output =\n importOutput +\n importedDepsOutput +\n formatMissingComponents(missingIds) +\n installationErrorOutput(installationError) +\n compilationErrorOutput(compilationError);\n\n return output;\n }\n\n async json([ids]: [string[]], importFlags: ImportFlags) {\n const { importDetails, installationError, missingIds } = await this.getImportResults(ids, importFlags);\n\n return { importDetails, installationError, missingIds };\n }\n\n private async getImportResults(\n ids: string[],\n {\n path,\n objects = false,\n override = false,\n verbose = false,\n conf,\n skipDependencyInstallation = false,\n merge,\n saveInLane = false,\n dependencies = false,\n dependents = false,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (objects && merge) {\n throw new GeneralError(' --objects and --merge flags cannot be used together');\n }\n if (override && merge) {\n throw new GeneralError('--override and --merge cannot be used together');\n }\n if (!ids.length && dependencies) {\n throw new GeneralError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependents) {\n throw new GeneralError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new GeneralError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && R.is(String, merge)) {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new GeneralError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importDependents: dependents,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n };\n return this.importer.import(importOptions, this._packageManagerArgs);\n }\n}\n\nfunction formatMissingComponents(missing?: string[]) {\n if (!missing?.length) return '';\n const title = chalk.underline('Missing Components');\n const subTitle = `The following components are missing from the remote in the requested version, try running \"bit status\" to re-sync your .bitmap file\nAlso, check that the requested version exists on main or the checked out lane`;\n const body = chalk.red(missing.join('\\n'));\n return `\\n\\n${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: BitId, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus)\n // @ts-ignore file is set\n .filter((file) => importDetails.filesStatus[file] === FileStatus.manual);\n if (!conflictedFiles.length) return '';\n return `(the following files were saved with conflicts ${conflictedFiles\n .map((file) => chalk.bold(file))\n .join(', ')}) `;\n };\n const conflictMessage = getConflictMessage();\n const deprecated = importDetails.deprecated && !importDetails.removed ? chalk.yellow('deprecated') : '';\n const removed = importDetails.removed ? chalk.red('removed') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n if (status === 'up to date' && !missingDeps && !deprecated && !conflictMessage && !removed) {\n return undefined;\n }\n return chalk.dim(\n `- ${chalk.green(status)} ${chalk.cyan(\n id\n )} ${versions}${usedVersion} ${conflictMessage}${deprecated}${removed} ${missingDeps}`\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EACvF,CAAC;AACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.563/dist/importer.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.563/dist/importer.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/importer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.563",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/scope/importer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "importer",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.563"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"@babel/runtime": "7.20.0",
|
|
18
18
|
"@teambit/legacy-bit-id": "1.0.0",
|
|
19
19
|
"@teambit/harmony": "0.4.6",
|
|
20
|
-
"@teambit/cli": "0.0.
|
|
20
|
+
"@teambit/cli": "0.0.760",
|
|
21
21
|
"@teambit/bit-error": "0.0.402",
|
|
22
|
-
"@teambit/checkout": "0.0.
|
|
23
|
-
"@teambit/component-writer": "0.0.
|
|
24
|
-
"@teambit/graph": "0.0.
|
|
25
|
-
"@teambit/lane-id": "0.0.
|
|
26
|
-
"@teambit/workspace": "0.0.
|
|
27
|
-
"@teambit/merging": "0.0.
|
|
28
|
-
"@teambit/dependency-resolver": "0.0.
|
|
29
|
-
"@teambit/install": "0.0.
|
|
30
|
-
"@teambit/logger": "0.0.
|
|
31
|
-
"@teambit/scope": "0.0.
|
|
22
|
+
"@teambit/checkout": "0.0.303",
|
|
23
|
+
"@teambit/component-writer": "0.0.170",
|
|
24
|
+
"@teambit/graph": "0.0.1134",
|
|
25
|
+
"@teambit/lane-id": "0.0.275",
|
|
26
|
+
"@teambit/workspace": "0.0.1134",
|
|
27
|
+
"@teambit/merging": "0.0.449",
|
|
28
|
+
"@teambit/dependency-resolver": "0.0.1134",
|
|
29
|
+
"@teambit/install": "0.0.218",
|
|
30
|
+
"@teambit/logger": "0.0.853",
|
|
31
|
+
"@teambit/scope": "0.0.1134"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/lodash": "4.14.165",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@teambit/legacy": "1.0.
|
|
43
|
+
"@teambit/legacy": "1.0.544",
|
|
44
44
|
"react": "^16.8.0 || ^17.0.0",
|
|
45
45
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
46
46
|
},
|
|
Binary file
|