@teambit/importer 1.0.750 → 1.0.752
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/import.cmd.js
CHANGED
|
@@ -56,13 +56,15 @@ class ImportCmd {
|
|
|
56
56
|
constructor(importer) {
|
|
57
57
|
this.importer = importer;
|
|
58
58
|
_defineProperty(this, "name", 'import [component-patterns...]');
|
|
59
|
-
_defineProperty(this, "description", '
|
|
59
|
+
_defineProperty(this, "description", 'bring components from remote scopes into your workspace');
|
|
60
60
|
_defineProperty(this, "helpUrl", 'reference/components/importing-components');
|
|
61
61
|
_defineProperty(this, "arguments", [{
|
|
62
62
|
name: 'component-patterns...',
|
|
63
63
|
description: '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)'
|
|
64
64
|
}]);
|
|
65
|
-
_defineProperty(this, "extendedDescription",
|
|
65
|
+
_defineProperty(this, "extendedDescription", `brings component source files from remote scopes into your workspace and installs their dependencies as packages.
|
|
66
|
+
supports pattern matching for bulk imports, merge strategies for handling conflicts, and various optimization options.
|
|
67
|
+
without arguments, fetches all workspace components' latest versions from their remote scopes.`);
|
|
66
68
|
_defineProperty(this, "group", 'collaborate');
|
|
67
69
|
_defineProperty(this, "alias", '');
|
|
68
70
|
_defineProperty(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'],
|
package/dist/import.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_componentModules","_componentId","_bitError","_legacy","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImportCmd","constructor","importer","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","workspaceConfigUpdateResult","missingIds","cancellationMessage","lane","getImportResults","length","chalk","yellow","importedIdsUniqNoVersion","ComponentIdList","fromArray","toVersionLatest","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","getWsConfigUpdateLogs","logs","logsStr","join","underline","upToDateSuffix","upToDateStr","summary","importOutput","compact","importedDepsOutput","displayDependencies","immutableUnshift","uniq","formatPlainComponentItem","green","output","formatMissingComponents","getWorkspaceConfigUpdateOutput","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","skipWriteConfigFiles","merge","filterEnvs","saveInLane","dependencies","dependenciesHead","dependents","dependentsDryRun","silent","dependentsVia","dependentsAll","allHistory","fetchDeps","trackOnly","includeDeprecated","writeDeps","laneOnly","logger","warn","BitError","mergeStrategy","options","keys","MergeOptions","includes","envsToFilter","split","p","trim","undefined","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","writeConfigFiles","importDependenciesDirectly","importHeadDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","subTitle","body","red","scope","version","deprecated","cyan","usingLatest","getVersionsOutput","versions","latestVersion","usedVersion","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","removed","missingDeps","d","statusOutput","idOutput","versionOutput","stateOutput","dim"],"sources":["import.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact, uniq } from 'lodash';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport {\n installationErrorOutput,\n compilationErrorOutput,\n getWorkspaceConfigUpdateOutput,\n FileStatus,\n MergeOptions,\n} from '@teambit/component.modules.merge-helper';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { immutableUnshift } from '@teambit/legacy.utils';\nimport type { ImporterMain } from './importer.main.runtime';\nimport type { 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 skipWriteConfigFiles?: boolean;\n merge?: MergeStrategy;\n filterEnvs?: string;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependenciesHead?: boolean;\n dependents?: boolean;\n dependentsDryRun?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n writeDeps?: 'package.json' | 'workspace.jsonc';\n laneOnly?: 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 = 'reference/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 ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\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 ['', 'dependencies-head', 'same as --dependencies, except it imports the dependencies with their head version'],\n [\n '',\n 'dependents',\n 'import components found while traversing from the imported components upwards to the workspace components',\n ],\n [\n '',\n 'dependents-via <string>',\n 'same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a comma',\n ],\n [\n '',\n 'dependents-all',\n 'same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing',\n ],\n [\n '',\n 'dependents-dry-run',\n 'DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them',\n ],\n ['', 'silent', 'no prompt for --dependents/--dependents-via flags'],\n [\n '',\n 'filter-envs <envs>',\n 'only import components that have the specified environment (e.g., \"teambit.react/react-env\")',\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 'write-deps <workspace.jsonc|package.json>',\n 'write all workspace component dependencies to package.json or workspace.jsonc, resolving conflicts by picking the ranges that match the highest versions',\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 [\n '',\n 'lane-only',\n 'when using wildcards on a lane, only import components that exist on the lane (never from main)',\n ],\n ] as CommandOptions;\n loader = 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 workspaceConfigUpdateResult,\n missingIds,\n cancellationMessage,\n lane,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n const importedIdsUniqNoVersion = ComponentIdList.fromArray(importedIds).toVersionLatest();\n const summaryPrefix =\n importedIdsUniqNoVersion.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIdsUniqNoVersion.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 getWsConfigUpdateLogs = () => {\n const logs = workspaceConfigUpdateResult?.logs;\n if (!logs || !logs.length) return '';\n const logsStr = logs.join('\\n');\n return `${chalk.underline('verbose logs of workspace config update')}\\n${logsStr}`;\n };\n const upToDateSuffix = lane ? ' on the lane' : '';\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date${upToDateSuffix}`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = compact(importedComponents).join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output = compact([\n getWsConfigUpdateLogs(),\n importOutput,\n importedDepsOutput,\n formatMissingComponents(missingIds),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n installationErrorOutput(installationError),\n compilationErrorOutput(compilationError),\n chalk.green(summary),\n ]).join('\\n\\n');\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 skipWriteConfigFiles = false,\n merge,\n filterEnvs,\n saveInLane = false,\n dependencies = false,\n dependenciesHead = false,\n dependents = false,\n dependentsDryRun = false,\n silent,\n dependentsVia,\n dependentsAll,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n writeDeps,\n laneOnly = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (dependentsDryRun) {\n this.importer.logger.warn(`the \"--dependents-dry-run\" flag is deprecated and is now the default behavior`);\n }\n if (objects && merge) {\n throw new BitError(' --objects and --merge flags cannot be used together');\n }\n if (override && merge) {\n throw new BitError('--override and --merge cannot be used together');\n }\n if (!ids.length && dependencies) {\n throw new BitError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependenciesHead) {\n throw new BitError('you have to specify ids to use \"--dependencies-head\" flag');\n }\n if (!ids.length && dependents) {\n throw new BitError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && dependentsVia) {\n throw new BitError('you have to specify ids to use \"--dependents-via\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new BitError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const envsToFilter = filterEnvs ? filterEnvs.split(',').map((p) => p.trim()) : undefined;\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n filterEnvs: envsToFilter,\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n writeConfigFiles: !skipWriteConfigFiles,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importHeadDependenciesDirectly: dependenciesHead,\n importDependents: dependents,\n dependentsVia,\n dependentsAll,\n silent,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n writeDeps,\n laneOnly,\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 `${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItem({ scope, name, version, deprecated }: any) {\n return chalk.cyan(\n `- ${scope ? `${scope}/` : ''}${name}@${version ? version.toString() : 'latest'} ${\n deprecated ? chalk.yellow('[deprecated]') : ''\n }`\n );\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: ComponentID, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n let usingLatest = '';\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n if (importDetails.latestVersion === bitId.version && status === 'added') {\n usingLatest = ' (latest)';\n return '';\n }\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return importDetails.versions.length > 5\n ? `${importDetails.versions.length} new versions`\n : `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `currently used version ${bitId.version}${usingLatest}` : '';\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('deleted') : '';\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\n const statusOutput = `- ${chalk.green(status)}`;\n const idOutput = chalk.cyan(id);\n const versionOutput = compact([versions, usedVersion]).join(', ');\n const stateOutput = `${conflictMessage}${deprecated}${removed}`;\n const output = compact([statusOutput, idOutput, versionOutput, stateOutput, missingDeps]).join(' ');\n return chalk.dim(output);\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;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,SAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,QAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAyD,SAAAC,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,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AAG,CAACrF,MAAM,CAAC;AAC1B","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_componentModules","_componentId","_bitError","_legacy","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImportCmd","constructor","importer","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","workspaceConfigUpdateResult","missingIds","cancellationMessage","lane","getImportResults","length","chalk","yellow","importedIdsUniqNoVersion","ComponentIdList","fromArray","toVersionLatest","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","getWsConfigUpdateLogs","logs","logsStr","join","underline","upToDateSuffix","upToDateStr","summary","importOutput","compact","importedDepsOutput","displayDependencies","immutableUnshift","uniq","formatPlainComponentItem","green","output","formatMissingComponents","getWorkspaceConfigUpdateOutput","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","skipWriteConfigFiles","merge","filterEnvs","saveInLane","dependencies","dependenciesHead","dependents","dependentsDryRun","silent","dependentsVia","dependentsAll","allHistory","fetchDeps","trackOnly","includeDeprecated","writeDeps","laneOnly","logger","warn","BitError","mergeStrategy","options","keys","MergeOptions","includes","envsToFilter","split","p","trim","undefined","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","writeConfigFiles","importDependenciesDirectly","importHeadDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","subTitle","body","red","scope","version","deprecated","cyan","usingLatest","getVersionsOutput","versions","latestVersion","usedVersion","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","removed","missingDeps","d","statusOutput","idOutput","versionOutput","stateOutput","dim"],"sources":["import.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact, uniq } from 'lodash';\nimport type { MergeStrategy } from '@teambit/component.modules.merge-helper';\nimport {\n installationErrorOutput,\n compilationErrorOutput,\n getWorkspaceConfigUpdateOutput,\n FileStatus,\n MergeOptions,\n} from '@teambit/component.modules.merge-helper';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { immutableUnshift } from '@teambit/legacy.utils';\nimport type { ImporterMain } from './importer.main.runtime';\nimport type { 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 skipWriteConfigFiles?: boolean;\n merge?: MergeStrategy;\n filterEnvs?: string;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependenciesHead?: boolean;\n dependents?: boolean;\n dependentsDryRun?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n writeDeps?: 'package.json' | 'workspace.jsonc';\n laneOnly?: boolean;\n};\n\nexport class ImportCmd implements Command {\n name = 'import [component-patterns...]';\n description = 'bring components from remote scopes into your workspace';\n helpUrl = 'reference/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 = `brings component source files from remote scopes into your workspace and installs their dependencies as packages.\nsupports pattern matching for bulk imports, merge strategies for handling conflicts, and various optimization options.\nwithout arguments, fetches all workspace components' latest versions from their remote scopes.`;\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 ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\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 ['', 'dependencies-head', 'same as --dependencies, except it imports the dependencies with their head version'],\n [\n '',\n 'dependents',\n 'import components found while traversing from the imported components upwards to the workspace components',\n ],\n [\n '',\n 'dependents-via <string>',\n 'same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a comma',\n ],\n [\n '',\n 'dependents-all',\n 'same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing',\n ],\n [\n '',\n 'dependents-dry-run',\n 'DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them',\n ],\n ['', 'silent', 'no prompt for --dependents/--dependents-via flags'],\n [\n '',\n 'filter-envs <envs>',\n 'only import components that have the specified environment (e.g., \"teambit.react/react-env\")',\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 'write-deps <workspace.jsonc|package.json>',\n 'write all workspace component dependencies to package.json or workspace.jsonc, resolving conflicts by picking the ranges that match the highest versions',\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 [\n '',\n 'lane-only',\n 'when using wildcards on a lane, only import components that exist on the lane (never from main)',\n ],\n ] as CommandOptions;\n loader = 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 workspaceConfigUpdateResult,\n missingIds,\n cancellationMessage,\n lane,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n const importedIdsUniqNoVersion = ComponentIdList.fromArray(importedIds).toVersionLatest();\n const summaryPrefix =\n importedIdsUniqNoVersion.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIdsUniqNoVersion.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 getWsConfigUpdateLogs = () => {\n const logs = workspaceConfigUpdateResult?.logs;\n if (!logs || !logs.length) return '';\n const logsStr = logs.join('\\n');\n return `${chalk.underline('verbose logs of workspace config update')}\\n${logsStr}`;\n };\n const upToDateSuffix = lane ? ' on the lane' : '';\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date${upToDateSuffix}`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = compact(importedComponents).join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output = compact([\n getWsConfigUpdateLogs(),\n importOutput,\n importedDepsOutput,\n formatMissingComponents(missingIds),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n installationErrorOutput(installationError),\n compilationErrorOutput(compilationError),\n chalk.green(summary),\n ]).join('\\n\\n');\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 skipWriteConfigFiles = false,\n merge,\n filterEnvs,\n saveInLane = false,\n dependencies = false,\n dependenciesHead = false,\n dependents = false,\n dependentsDryRun = false,\n silent,\n dependentsVia,\n dependentsAll,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n writeDeps,\n laneOnly = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (dependentsDryRun) {\n this.importer.logger.warn(`the \"--dependents-dry-run\" flag is deprecated and is now the default behavior`);\n }\n if (objects && merge) {\n throw new BitError(' --objects and --merge flags cannot be used together');\n }\n if (override && merge) {\n throw new BitError('--override and --merge cannot be used together');\n }\n if (!ids.length && dependencies) {\n throw new BitError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependenciesHead) {\n throw new BitError('you have to specify ids to use \"--dependencies-head\" flag');\n }\n if (!ids.length && dependents) {\n throw new BitError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && dependentsVia) {\n throw new BitError('you have to specify ids to use \"--dependents-via\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new BitError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const envsToFilter = filterEnvs ? filterEnvs.split(',').map((p) => p.trim()) : undefined;\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n filterEnvs: envsToFilter,\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n writeConfigFiles: !skipWriteConfigFiles,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importHeadDependenciesDirectly: dependenciesHead,\n importDependents: dependents,\n dependentsVia,\n dependentsAll,\n silent,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n writeDeps,\n laneOnly,\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 `${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItem({ scope, name, version, deprecated }: any) {\n return chalk.cyan(\n `- ${scope ? `${scope}/` : ''}${name}@${version ? version.toString() : 'latest'} ${\n deprecated ? chalk.yellow('[deprecated]') : ''\n }`\n );\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: ComponentID, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n let usingLatest = '';\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n if (importDetails.latestVersion === bitId.version && status === 'added') {\n usingLatest = ' (latest)';\n return '';\n }\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return importDetails.versions.length > 5\n ? `${importDetails.versions.length} new versions`\n : `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `currently used version ${bitId.version}${usingLatest}` : '';\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('deleted') : '';\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\n const statusOutput = `- ${chalk.green(status)}`;\n const idOutput = chalk.cyan(id);\n const versionOutput = compact([versions, usedVersion]).join(', ');\n const stateOutput = `${conflictMessage}${deprecated}${removed}`;\n const output = compact([statusOutput, idOutput, versionOutput, stateOutput, missingDeps]).join(' ');\n return chalk.dim(output);\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;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,kBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,iBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,UAAA;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G,IAAA1F,iBAAO,EAAC,CAACyE,QAAQ,EAAEE,WAAW,CAAC,CAAC,CAACjF,IAAI,CAAC,IAAI,CAAC;EACjE,MAAMiG,WAAW,GAAG,GAAGP,eAAe,GAAGf,UAAU,GAAGgB,OAAO,EAAE;EAC/D,MAAM9E,MAAM,GAAG,IAAAP,iBAAO,EAAC,CAACwF,YAAY,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,WAAW,EAAEL,WAAW,CAAC,CAAC,CAAC5F,IAAI,CAAC,GAAG,CAAC;EACnG,OAAOvB,gBAAK,CAACyH,GAAG,CAACrF,MAAM,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.752/dist/importer.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.752/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": "1.0.
|
|
3
|
+
"version": "1.0.752",
|
|
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": "1.0.
|
|
9
|
+
"version": "1.0.752"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -16,33 +16,33 @@
|
|
|
16
16
|
"p-map-series": "2.1.0",
|
|
17
17
|
"@teambit/bit-error": "0.0.404",
|
|
18
18
|
"@teambit/component-id": "1.2.4",
|
|
19
|
-
"@teambit/logger": "0.0.
|
|
20
|
-
"@teambit/cli": "0.0.
|
|
21
|
-
"@teambit/component.modules.merge-helper": "0.0.
|
|
19
|
+
"@teambit/logger": "0.0.1366",
|
|
20
|
+
"@teambit/cli": "0.0.1273",
|
|
21
|
+
"@teambit/component.modules.merge-helper": "0.0.14",
|
|
22
22
|
"@teambit/component-version": "1.0.4",
|
|
23
23
|
"@teambit/lane-id": "0.0.312",
|
|
24
|
-
"@teambit/legacy.consumer-component": "0.0.
|
|
25
|
-
"@teambit/legacy.consumer": "0.0.
|
|
26
|
-
"@teambit/legacy.scope": "0.0.
|
|
27
|
-
"@teambit/legacy.utils": "0.0.
|
|
24
|
+
"@teambit/legacy.consumer-component": "0.0.75",
|
|
25
|
+
"@teambit/legacy.consumer": "0.0.74",
|
|
26
|
+
"@teambit/legacy.scope": "0.0.74",
|
|
27
|
+
"@teambit/legacy.utils": "0.0.27",
|
|
28
28
|
"@teambit/toolbox.promise.map-pool": "0.0.8",
|
|
29
29
|
"@teambit/harmony": "0.4.7",
|
|
30
|
-
"@teambit/component.sources": "0.0.
|
|
30
|
+
"@teambit/component.sources": "0.0.126",
|
|
31
31
|
"@teambit/legacy-bit-id": "1.1.3",
|
|
32
|
-
"@teambit/legacy.analytics": "0.0.
|
|
33
|
-
"@teambit/legacy.scope-api": "0.0.
|
|
34
|
-
"@teambit/pkg.modules.component-package-name": "0.0.
|
|
35
|
-
"@teambit/scope.remotes": "0.0.
|
|
36
|
-
"@teambit/graph": "1.0.
|
|
37
|
-
"@teambit/workspace": "1.0.
|
|
38
|
-
"@teambit/component-writer": "1.0.
|
|
39
|
-
"@teambit/config-merger": "0.0.
|
|
40
|
-
"@teambit/envs": "1.0.
|
|
41
|
-
"@teambit/lister": "1.0.
|
|
42
|
-
"@teambit/objects": "0.0.
|
|
43
|
-
"@teambit/dependency-resolver": "1.0.
|
|
44
|
-
"@teambit/install": "1.0.
|
|
45
|
-
"@teambit/scope": "1.0.
|
|
32
|
+
"@teambit/legacy.analytics": "0.0.81",
|
|
33
|
+
"@teambit/legacy.scope-api": "0.0.129",
|
|
34
|
+
"@teambit/pkg.modules.component-package-name": "0.0.81",
|
|
35
|
+
"@teambit/scope.remotes": "0.0.74",
|
|
36
|
+
"@teambit/graph": "1.0.752",
|
|
37
|
+
"@teambit/workspace": "1.0.752",
|
|
38
|
+
"@teambit/component-writer": "1.0.752",
|
|
39
|
+
"@teambit/config-merger": "0.0.619",
|
|
40
|
+
"@teambit/envs": "1.0.752",
|
|
41
|
+
"@teambit/lister": "1.0.752",
|
|
42
|
+
"@teambit/objects": "0.0.259",
|
|
43
|
+
"@teambit/dependency-resolver": "1.0.752",
|
|
44
|
+
"@teambit/install": "1.0.752",
|
|
45
|
+
"@teambit/scope": "1.0.752"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/lodash": "4.14.165",
|