@teambit/importer 0.0.530 → 0.0.532

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.
@@ -1,6 +1,25 @@
1
1
  import { Command, CommandOptions } from '@teambit/cli';
2
2
  import { MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';
3
3
  import { ImporterMain } from './importer.main.runtime';
4
+ import { ImportDetails } from './import-components';
5
+ declare type ImportFlags = {
6
+ path?: string;
7
+ objects?: boolean;
8
+ displayDependencies?: boolean;
9
+ override?: boolean;
10
+ verbose?: boolean;
11
+ json?: boolean;
12
+ conf?: string;
13
+ skipDependencyInstallation?: boolean;
14
+ merge?: MergeStrategy;
15
+ saveInLane?: boolean;
16
+ dependencies?: boolean;
17
+ dependents?: boolean;
18
+ allHistory?: boolean;
19
+ fetchDeps?: boolean;
20
+ trackOnly?: boolean;
21
+ includeDeprecated?: boolean;
22
+ };
4
23
  export declare class ImportCmd implements Command {
5
24
  private importer;
6
25
  name: string;
@@ -19,22 +38,11 @@ export declare class ImportCmd implements Command {
19
38
  remoteOp: boolean;
20
39
  _packageManagerArgs: string[];
21
40
  constructor(importer: ImporterMain);
22
- report([ids]: [string[]], { path, objects, displayDependencies, override, verbose, json, conf, skipDependencyInstallation, merge, saveInLane, dependencies, dependents, allHistory, fetchDeps, trackOnly, includeDeprecated, }: {
23
- path?: string;
24
- objects?: boolean;
25
- displayDependencies?: boolean;
26
- override?: boolean;
27
- verbose?: boolean;
28
- json?: boolean;
29
- conf?: string;
30
- skipDependencyInstallation?: boolean;
31
- merge?: MergeStrategy;
32
- saveInLane?: boolean;
33
- dependencies?: boolean;
34
- dependents?: boolean;
35
- allHistory?: boolean;
36
- fetchDeps?: boolean;
37
- trackOnly?: boolean;
38
- includeDeprecated?: boolean;
39
- }): Promise<any>;
41
+ report([ids]: [string[]], importFlags: ImportFlags): Promise<any>;
42
+ json([ids]: [string[]], importFlags: ImportFlags): Promise<{
43
+ importDetails: ImportDetails[];
44
+ installationError: Error | undefined;
45
+ }>;
46
+ private getImportResults;
40
47
  }
48
+ export {};
@@ -93,13 +93,51 @@ class ImportCmd {
93
93
  (0, _defineProperty2().default)(this, "remoteOp", true);
94
94
  (0, _defineProperty2().default)(this, "_packageManagerArgs", void 0);
95
95
  }
96
- async report([ids = []], {
96
+ async report([ids = []], importFlags) {
97
+ const {
98
+ importDetails,
99
+ importedIds,
100
+ importedDeps,
101
+ installationError,
102
+ compilationError,
103
+ missingIds,
104
+ cancellationMessage
105
+ } = await this.getImportResults(ids, importFlags);
106
+ if (!importedIds.length && !(missingIds !== null && missingIds !== void 0 && missingIds.length)) {
107
+ return _chalk().default.yellow(cancellationMessage || 'nothing to import');
108
+ }
109
+ const summaryPrefix = importedIds.length === 1 ? 'successfully imported one component' : `successfully imported ${importedIds.length} components`;
110
+ let upToDateCount = 0;
111
+ const importedComponents = importedIds.map(bitId => {
112
+ const details = importDetails.find(c => c.id === bitId.toStringWithoutVersion());
113
+ if (!details) throw new Error(`missing details of component ${bitId.toString()}`);
114
+ if (details.status === 'up to date') {
115
+ upToDateCount += 1;
116
+ }
117
+ return formatPlainComponentItemWithVersions(bitId, details);
118
+ });
119
+ const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date`;
120
+ const summary = `${summaryPrefix}${upToDateStr}`;
121
+ const importOutput = [...(0, _lodash().compact)(importedComponents), _chalk().default.green(summary)].join('\n');
122
+ const importedDepsOutput = importFlags.displayDependencies && importedDeps.length ? (0, _utils().immutableUnshift)(_ramda().default.uniq(importedDeps.map(_chalkBox().formatPlainComponentItem)), _chalk().default.green(`\n\nsuccessfully imported ${importedDeps.length} component dependencies`)).join('\n') : '';
123
+ const output = importOutput + importedDepsOutput + formatMissingComponents(missingIds) + (0, _merging().installationErrorOutput)(installationError) + (0, _merging().compilationErrorOutput)(compilationError);
124
+ return output;
125
+ }
126
+ async json([ids], importFlags) {
127
+ const {
128
+ importDetails,
129
+ installationError
130
+ } = await this.getImportResults(ids, importFlags);
131
+ return {
132
+ importDetails,
133
+ installationError
134
+ };
135
+ }
136
+ async getImportResults(ids, {
97
137
  path,
98
138
  objects = false,
99
- displayDependencies = false,
100
139
  override = false,
101
140
  verbose = false,
102
- json = false,
103
141
  conf,
104
142
  skipDependencyInstallation = false,
105
143
  merge,
@@ -152,40 +190,7 @@ class ImportCmd {
152
190
  trackOnly,
153
191
  includeDeprecated
154
192
  };
155
- const importResults = await this.importer.import(importOptions, this._packageManagerArgs);
156
- const {
157
- importDetails,
158
- importedIds,
159
- importedDeps,
160
- installationError,
161
- compilationError,
162
- missingIds
163
- } = importResults;
164
- if (json) {
165
- return JSON.stringify({
166
- importDetails,
167
- installationError
168
- }, null, 4);
169
- }
170
- if (!importedIds.length && !(missingIds !== null && missingIds !== void 0 && missingIds.length)) {
171
- return _chalk().default.yellow(importResults.cancellationMessage || 'nothing to import');
172
- }
173
- const summaryPrefix = importedIds.length === 1 ? 'successfully imported one component' : `successfully imported ${importedIds.length} components`;
174
- let upToDateCount = 0;
175
- const importedComponents = importedIds.map(bitId => {
176
- const details = importDetails.find(c => c.id === bitId.toStringWithoutVersion());
177
- if (!details) throw new Error(`missing details of component ${bitId.toString()}`);
178
- if (details.status === 'up to date') {
179
- upToDateCount += 1;
180
- }
181
- return formatPlainComponentItemWithVersions(bitId, details);
182
- });
183
- const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date`;
184
- const summary = `${summaryPrefix}${upToDateStr}`;
185
- const importOutput = [...(0, _lodash().compact)(importedComponents), _chalk().default.green(summary)].join('\n');
186
- const importedDepsOutput = displayDependencies && importedDeps.length ? (0, _utils().immutableUnshift)(_ramda().default.uniq(importedDeps.map(_chalkBox().formatPlainComponentItem)), _chalk().default.green(`\n\nsuccessfully imported ${importedDeps.length} component dependencies`)).join('\n') : '';
187
- const output = importOutput + importedDepsOutput + formatMissingComponents(missingIds) + (0, _merging().installationErrorOutput)(installationError) + (0, _merging().compilationErrorOutput)(compilationError);
188
- return output;
193
+ return this.importer.import(importOptions, this._packageManagerArgs);
189
194
  }
190
195
  }
191
196
  exports.ImportCmd = ImportCmd;
@@ -1 +1 @@
1
- {"version":3,"names":["ImportCmd","constructor","importer","name","description","report","ids","path","objects","displayDependencies","override","verbose","json","conf","skipDependencyInstallation","merge","saveInLane","dependencies","dependents","allHistory","fetchDeps","trackOnly","includeDeprecated","GeneralError","length","mergeStrategy","R","is","String","options","Object","keys","MergeOptions","includes","join","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","importDependenciesDirectly","importDependents","importResults","import","_packageManagerArgs","importDetails","importedIds","importedDeps","installationError","compilationError","missingIds","JSON","stringify","chalk","yellow","cancellationMessage","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","upToDateStr","summary","importOutput","compact","green","importedDepsOutput","immutableUnshift","uniq","formatPlainComponentItem","output","formatMissingComponents","installationErrorOutput","compilationErrorOutput","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 } from './import-components';\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(\n [ids = []]: [string[]],\n {\n path,\n objects = false,\n displayDependencies = false,\n override = false,\n verbose = false,\n json = 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 }: {\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 ): Promise<any> {\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 const importResults = await this.importer.import(importOptions, this._packageManagerArgs);\n const { importDetails, importedIds, importedDeps, installationError, compilationError, missingIds } = importResults;\n\n if (json) {\n return JSON.stringify({ importDetails, installationError }, null, 4);\n }\n\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(importResults.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 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\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 )} ${versions}${usedVersion} ${conflictMessage}${deprecated}${removed} ${missingDeps}`\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;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;AAMA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIO,MAAMA,SAAS,CAAoB;EAuDT;;EAE/BC,WAAW,CAASC,QAAsB,EAAE;IAAA,KAAxBA,QAAsB,GAAtBA,QAAsB;IAAA,8CAxDnC,gCAAgC;IAAA,qDACzB,mEAAmE;IAAA,iDACvE,sCAAsC;IAAA,mDACpC,CACV;MACEC,IAAI,EAAE,uBAAuB;MAC7BC,WAAW,EACT;IACJ,CAAC,CACF;IAAA;IAAA,+CAEO,aAAa;IAAA,+CACb,EAAE;IAAA,iDACA,CACR,CAAC,GAAG,EAAE,aAAa,EAAE,gFAAgF,CAAC,EACtG,CACE,GAAG,EACH,SAAS,EACT,oKAAoK,CACrK,EACD,CAAC,GAAG,EAAE,sBAA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AO,GAAGnD,gBAAK,CAACmC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE;EACjE,MAAMiB,WAAW,GAAG5D,aAAa,CAAC4D,WAAW,CAAClF,MAAM,GAChD8B,gBAAK,CAACmC,GAAG,CAAE,yBAAwB3C,aAAa,CAAC4D,WAAW,CAAC9C,GAAG,CAAE+C,CAAC,IAAKA,CAAC,CAACvC,QAAQ,EAAE,CAAC,CAAClC,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC,GACnG,EAAE;EACN,IAAImC,MAAM,KAAK,YAAY,IAAI,CAACqC,WAAW,IAAI,CAACF,UAAU,IAAI,CAACD,eAAe,IAAI,CAACE,OAAO,EAAE;IAC1F,OAAOG,SAAS;EAClB;EACA,OAAOtD,gBAAK,CAACuD,GAAG,CACb,KAAIvD,gBAAK,CAACqB,KAAK,CAACN,MAAM,CAAE,IAAGf,gBAAK,CAACwD,IAAI,CACpC7C,EAAE,CACF,IAAG0B,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EAAC,CACvF;AACH"}
1
+ {"version":3,"names":["ImportCmd","constructor","importer","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","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 } = await this.getImportResults(ids, importFlags);\n\n return { importDetails, installationError };\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 )} ${versions}${usedVersion} ${conflictMessage}${deprecated}${removed} ${missingDeps}`\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;A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AAI,CAACD,eAAe,IAAI,CAACE,OAAO,EAAE;IAC1F,OAAOG,SAAS;EAClB;EACA,OAAO1F,gBAAK,CAAC2F,GAAG,CACb,KAAI3F,gBAAK,CAACoB,KAAK,CAACN,MAAM,CAAE,IAAGd,gBAAK,CAAC4F,IAAI,CACpClF,EAAE,CACF,IAAG+D,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EAAC,CACvF;AACH"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.530/dist/importer.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.530/dist/importer.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.532/dist/importer.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@0.0.532/dist/importer.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/importer",
3
- "version": "0.0.530",
3
+ "version": "0.0.532",
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.530"
9
+ "version": "0.0.532"
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": "0.0.423",
19
19
  "@teambit/harmony": "0.4.6",
20
- "@teambit/cli": "0.0.738",
20
+ "@teambit/cli": "0.0.739",
21
21
  "@teambit/bit-error": "0.0.402",
22
- "@teambit/checkout": "0.0.270",
23
- "@teambit/component-writer": "0.0.137",
24
- "@teambit/graph": "0.0.1101",
25
- "@teambit/lane-id": "0.0.255",
26
- "@teambit/workspace": "0.0.1101",
27
- "@teambit/merging": "0.0.416",
28
- "@teambit/dependency-resolver": "0.0.1101",
29
- "@teambit/install": "0.0.196",
30
- "@teambit/logger": "0.0.831",
31
- "@teambit/scope": "0.0.1101"
22
+ "@teambit/checkout": "0.0.272",
23
+ "@teambit/component-writer": "0.0.139",
24
+ "@teambit/graph": "0.0.1103",
25
+ "@teambit/lane-id": "0.0.256",
26
+ "@teambit/workspace": "0.0.1103",
27
+ "@teambit/merging": "0.0.418",
28
+ "@teambit/dependency-resolver": "0.0.1103",
29
+ "@teambit/install": "0.0.198",
30
+ "@teambit/logger": "0.0.832",
31
+ "@teambit/scope": "0.0.1103"
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.519",
43
+ "@teambit/legacy": "1.0.520",
44
44
  "react": "^16.8.0 || ^17.0.0",
45
45
  "react-dom": "^16.8.0 || ^17.0.0"
46
46
  },