@teambit/importer 1.0.332 → 1.0.334

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,6 +95,13 @@ function _dependentsGetter() {
95
95
  };
96
96
  return data;
97
97
  }
98
+ function _lister() {
99
+ const data = require("@teambit/lister");
100
+ _lister = function () {
101
+ return data;
102
+ };
103
+ return data;
104
+ }
98
105
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
99
106
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
100
107
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
@@ -361,14 +368,24 @@ if you just want to get a quick look into this snap, create a new workspace and
361
368
  const bitIds = [];
362
369
  await Promise.all(this.options.ids.map(async idStr => {
363
370
  if ((0, _legacy().hasWildcard)(idStr)) {
364
- const ids = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);
365
- this.logger.setStatusLine(_loaderMessages().BEFORE_IMPORT_ACTION); // it stops the previous loader of BEFORE_REMOTE_LIST
371
+ let ids = [];
372
+ try {
373
+ ids = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);
374
+ } catch (err) {
375
+ if (err instanceof _lister().NoIdMatchWildcard) {
376
+ this.logger.consoleWarning(err.message);
377
+ } else {
378
+ throw err;
379
+ }
380
+ }
366
381
  bitIds.push(...ids);
367
382
  } else {
368
383
  const id = await this.getIdFromStr(idStr);
369
384
  bitIds.push(id);
370
385
  }
371
386
  }));
387
+ this.logger.setStatusLine(_loaderMessages().BEFORE_IMPORT_ACTION); // it stops the previous loader of BEFORE_REMOTE_LIST
388
+
372
389
  return bitIds;
373
390
  }
374
391
  async getBitIds() {
@@ -1 +1 @@
1
- {"version":3,"names":["_bitError","data","require","_pMapSeries","_interopRequireDefault","_componentId","_loaderMessages","_legacy","_checkout","_merging","_componentsPendingMerge","_scopeComponentsImporter","_versionDependencies","_componentVersion","_lodash","_dependentsGetter","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImportComponents","constructor","workspace","graph","componentWriter","envs","logger","lister","options","consumer","scope","remoteLane","lanes","importComponents","result","setStatusLine","BEFORE_IMPORT_ACTION","startTime","process","hrtime","ids","length","importObjectsOnLane","consoleSuccess","importSpecificComponents","importAccordingToBitMap","objectsOnly","Error","lane","bitIds","getBitIds","debug","id","toString","beforeImportVersions","_getCurrentVersions","versionDependenciesArr","_importComponentsObjects","mergeAndSaveLaneObject","returnCompleteResults","writtenComponents","componentWriterResults","importDetails","_getImportDetails","missingIds","keys","importedComps","map","c","component","toStringWithoutVersion","forEach","compIdStr","found","includes","push","importedIds","v","flat","importedDeps","allDependenciesIds","installationError","compilationError","workspaceConfigUpdateResult","join","_throwForPotentialIssues","components","multipleVersionDependenciesToConsumer","objects","_fetchDivergeData","_throwForDivergedHistory","throwForComponentsFromAnotherLane","filteredComponents","_filterComponentsByFilters","_writeToFileSystem","_saveLaneDataIfNeeded","mergeLaneResults","sources","mergeLane","mergedLane","isRemoteLaneEqualsToMergedLane","isEqual","saveLane","saveLaneHistory","laneHistoryMsg","filterEnvs","filteredP","currentEnv","calculateEnvIdFromExtensions","extensions","currentEnvWithoutVersion","split","undefined","filtered","compact","Promise","all","modelComponent","getModelComponent","setDivergeData","divergeData","merge","divergedComponents","filter","getDivergeData","isDiverged","snapsLocal","snapsOnSourceOnly","snapsRemote","snapsOnTargetOnly","ComponentsPendingMerge","currentLaneId","getCurrentLaneId","currentRemoteLane","toLaneId","currentLane","getCurrentLaneObject","idsFromAnotherLane","bitId","isOnCurrentLane","isPartOfLaneHistory","isPartOfMainHistory","isIdOnMain","BitError","fromOriginalScope","ignoreMissingHead","scopeComponentsImporter","ScopeComponentsImporter","getInstance","importWithoutDeps","toVersionLatest","cache","includeVersionHistory","fetchHeadIfLocalIsBehind","allHistory","collectParents","includeUnexported","isLaneFromRemote","reason","results","importManyFromOriginalScopes","importMany","preferDependencyGraph","fetchDeps","reFetchUnBuiltVersion","throwForSeederNotFound","getBitIdsForLanes","remoteLaneIds","toComponentIds","ComponentIdList","bitMapIds","bitMap","getAllBitIds","bitMapIdsToImport","hasScope","has","idsWithWildcard","hasWildcard","idsWithoutWildcard","idsWithoutWildcardPreferFromLane","idStr","getIdFromStr","fromLane","searchWithoutVersion","hasVersion","pMapSeries","existingOnLanes","filterIdsFromPoolIdsByPattern","idsFromRemote","getRemoteCompIdsByWildcards","includeDeprecated","startsWith","resolveComponentIdFromPackageName","ComponentID","fromString","getBitIdsForNonLanes","shouldImportDependents","importDependents","dependentsVia","dependentsAll","shouldImportDependencies","importDependenciesDirectly","importHeadDependenciesDirectly","dependenciesIds","getFlattenedDepsUnique","dependentsGetter","DependentsGetter","dependents","getDependents","uniqFromArray","remoteComps","scopeImporter","getManyRemoteComponents","versions","getVersions","getFlattened","flattenedDependencies","flattenedDeps","flattened","uniqWithoutVersions","removeMultipleVersionsKeepLatest","latest","grouped","toGroupByIdWithoutVersion","latestVersions","key","getLatestVersionNumber","changeVersion","LATEST_VERSION","err","message","override","componentsIdsToImport","getIdsToImportFromBitmap","emptyResult","_throwForModifiedOrNewComponents","flagUsed","allIds","getAllBitIdsFromAllLanes","fromArray","versionsP","getModelComponentIfExist","listVersions","fromPairs","currentVersions","detailsP","afterImportVersions","versionDifference","difference","getStatus","filesStatus","mergeStatus","deprecated","Boolean","isDeprecated","version","removed","isRemoved","latestVersion","getHeadRegardlessOfLaneAsTagOrHash","status","missingDeps","getMissingDependencies","_throwForDifferentComponentWithSameName","trackOnly","componentsStatuses","getManyComponentsStatuses","modifiedComponents","modified","newlyCreated","existingId","getParsedIdIfExist","_getMergeStatus","componentStatus","getComponentStatusById","mergeResults","componentModel","existingBitMapBitId","getComponentId","ignoreVersion","fsComponent","loadComponent","currentlyUsedVersion","baseComponent","loadVersion","otherComponent","threeWayMerge","otherLabel","currentComponent","currentLabel","_updateComponentFilesPerMergeStrategy","componentMergeStatus","files","hasConflicts","mergeStrategy","MergeOptions","ours","file","pathNormalizeToLinux","relative","FileStatus","unchanged","updateComponentId","hasChanged","theirs","updated","modifiedFiles","applyModifiedVersion","updateAllComponentsAccordingToMergeStrategy","componentsStatusP","componentsStatus","componentWithConflict","find","getMergeStrategyInteractive","componentsToWrite","unchangedFiles","_shouldSaveLaneData","isOnLane","idsFromRemoteLanes","comp","existOnRemoteLane","saveInLane","setOnLanesOnly","ref","getRef","addComponent","head","manyComponentsWriterOpts","writeToPath","writeConfig","skipDependencyInstallation","installNpmPackages","skipWriteConfigFiles","writeConfigFiles","verbose","throwForExistingDir","skipWritingToFs","shouldUpdateWorkspaceConfig","reasonForBitmapChange","writeMany","exports"],"sources":["import-components.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport pMapSeries from 'p-map-series';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BEFORE_IMPORT_ACTION } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { Lane, ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport { getLatestVersionNumber, pathNormalizeToLinux, hasWildcard } from '@teambit/legacy.utils';\nimport Component from '@teambit/legacy/dist/consumer/component';\nimport { applyModifiedVersion } from '@teambit/checkout';\nimport {\n FileStatus,\n getMergeStrategyInteractive,\n MergeOptions,\n threeWayMerge,\n MergeStrategy,\n MergeResultsThreeWay,\n FilesStatus,\n} from '@teambit/merging';\nimport ComponentsPendingMerge from '@teambit/legacy/dist/consumer/exceptions/components-pending-merge';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport VersionDependencies, {\n multipleVersionDependenciesToConsumer,\n} from '@teambit/legacy/dist/scope/version-dependencies';\nimport { GraphMain } from '@teambit/graph';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentWriterMain, ComponentWriterResults, ManyComponentsWriterParams } from '@teambit/component-writer';\nimport { LATEST_VERSION } from '@teambit/component-version';\nimport { EnvsMain } from '@teambit/envs';\nimport { compact, difference, fromPairs } from 'lodash';\nimport { WorkspaceConfigUpdateResult } from '@teambit/config-merger';\nimport { Logger } from '@teambit/logger';\nimport { DependentsGetter } from './dependents-getter';\nimport { ListerMain } from '@teambit/lister';\n\nexport type ImportOptions = {\n ids: string[]; // array might be empty\n verbose?: boolean;\n merge?: boolean;\n mergeStrategy?: MergeStrategy;\n filterEnvs?: string[];\n writeToPath?: string;\n writeConfig?: boolean;\n override?: boolean;\n installNpmPackages: boolean; // default: true\n writeConfigFiles: boolean; // default: true\n objectsOnly?: boolean;\n importDependenciesDirectly?: boolean; // default: false, normally it imports them as packages, not as imported\n importHeadDependenciesDirectly?: boolean; // default: false, similar to importDependenciesDirectly, but it checks out to their head\n importDependents?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean; // don't show prompt for --dependents flag\n fromOriginalScope?: boolean; // default: false, otherwise, it fetches flattened dependencies from their dependents\n saveInLane?: boolean; // save the imported component on the current lane (won't be available on main)\n lanes?: {\n laneId: LaneId;\n remoteLane?: Lane; // it can be an empty array when a lane is a local lane and doesn't exist on the remote\n };\n allHistory?: boolean;\n fetchDeps?: boolean; // by default, if a component was tagged with > 0.0.900, it has the flattened-deps-graph in the object\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n isLaneFromRemote?: boolean; // whether the `lanes.lane` object is coming directly from the remote.\n};\ntype ComponentMergeStatus = {\n component: Component;\n mergeResults: MergeResultsThreeWay | null | undefined;\n};\ntype ImportedVersions = { [id: string]: string[] };\nexport type ImportStatus = 'added' | 'updated' | 'up to date';\nexport type ImportDetails = {\n id: string;\n versions: string[];\n latestVersion: string | null;\n status: ImportStatus;\n filesStatus: FilesStatus | null | undefined;\n missingDeps: ComponentID[];\n deprecated: boolean;\n removed?: boolean;\n};\nexport type ImportResult = {\n importedIds: ComponentID[];\n importedDeps: ComponentID[];\n writtenComponents?: Component[];\n importDetails: ImportDetails[];\n cancellationMessage?: string;\n installationError?: Error;\n compilationError?: Error;\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n missingIds?: string[]; // in case the import is configured to not throw when missing\n lane?: Lane;\n};\n\nexport default class ImportComponents {\n consumer: Consumer;\n scope: Scope;\n mergeStatus: { [id: string]: FilesStatus };\n private remoteLane: Lane | undefined;\n private divergeData: Array<ModelComponent> = [];\n constructor(\n private workspace: Workspace,\n private graph: GraphMain,\n private componentWriter: ComponentWriterMain,\n private envs: EnvsMain,\n private logger: Logger,\n private lister: ListerMain,\n public options: ImportOptions\n ) {\n this.consumer = this.workspace.consumer;\n this.scope = this.consumer.scope;\n this.remoteLane = this.options.lanes?.remoteLane;\n }\n\n async importComponents(): Promise<ImportResult> {\n let result;\n this.logger.setStatusLine(BEFORE_IMPORT_ACTION);\n const startTime = process.hrtime();\n if (this.options.lanes && !this.options.ids.length) {\n result = await this.importObjectsOnLane();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n if (this.options.ids.length) {\n result = await this.importSpecificComponents();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n result = await this.importAccordingToBitMap();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n\n async importObjectsOnLane(): Promise<ImportResult> {\n if (!this.options.objectsOnly) {\n throw new Error(`importObjectsOnLane should have objectsOnly=true`);\n }\n const lane = this.remoteLane;\n const bitIds: ComponentIdList = await this.getBitIds();\n lane\n ? this.logger.debug(`importObjectsOnLane, Lane: ${lane.id()}, Ids: ${bitIds.toString()}`)\n : this.logger.debug(\n `importObjectsOnLane, the lane does not exist on the remote. importing only the main components`\n );\n const beforeImportVersions = await this._getCurrentVersions(bitIds);\n const versionDependenciesArr = await this._importComponentsObjects(bitIds, {\n lane,\n });\n\n if (lane) {\n await this.mergeAndSaveLaneObject(lane);\n }\n\n return this.returnCompleteResults(beforeImportVersions, versionDependenciesArr);\n }\n\n private async returnCompleteResults(\n beforeImportVersions: ImportedVersions,\n versionDependenciesArr: VersionDependencies[],\n writtenComponents?: Component[],\n componentWriterResults?: ComponentWriterResults\n ): Promise<ImportResult> {\n const importDetails = await this._getImportDetails(beforeImportVersions, versionDependenciesArr);\n const missingIds: string[] = [];\n if (Object.keys(beforeImportVersions).length > versionDependenciesArr.length) {\n const importedComps = versionDependenciesArr.map((c) => c.component.id.toStringWithoutVersion());\n Object.keys(beforeImportVersions).forEach((compIdStr) => {\n const found = importedComps.includes(compIdStr);\n if (!found) missingIds.push(compIdStr);\n });\n }\n\n return {\n importedIds: versionDependenciesArr.map((v) => v.component.id).flat(),\n importedDeps: versionDependenciesArr.map((v) => v.allDependenciesIds).flat(),\n writtenComponents,\n importDetails,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n workspaceConfigUpdateResult: componentWriterResults?.workspaceConfigUpdateResult,\n missingIds,\n lane: this.remoteLane,\n };\n }\n\n async importSpecificComponents(): Promise<ImportResult> {\n this.logger.debug(`importSpecificComponents, Ids: ${this.options.ids.join(', ')}`);\n const bitIds: ComponentIdList = await this.getBitIds();\n const beforeImportVersions = await this._getCurrentVersions(bitIds);\n await this._throwForPotentialIssues(bitIds);\n const versionDependenciesArr = await this._importComponentsObjects(bitIds, {\n lane: this.remoteLane,\n });\n if (this.remoteLane && this.options.objectsOnly) {\n await this.mergeAndSaveLaneObject(this.remoteLane);\n }\n let writtenComponents: Component[] = [];\n let componentWriterResults: ComponentWriterResults | undefined;\n if (!this.options.objectsOnly) {\n const components = await multipleVersionDependenciesToConsumer(versionDependenciesArr, this.scope.objects);\n await this._fetchDivergeData(components);\n this._throwForDivergedHistory();\n await this.throwForComponentsFromAnotherLane(components.map((c) => c.id));\n const filteredComponents = await this._filterComponentsByFilters(components);\n componentWriterResults = await this._writeToFileSystem(filteredComponents);\n await this._saveLaneDataIfNeeded(filteredComponents);\n writtenComponents = filteredComponents;\n }\n\n return this.returnCompleteResults(\n beforeImportVersions,\n versionDependenciesArr,\n writtenComponents,\n componentWriterResults\n );\n }\n\n private async mergeAndSaveLaneObject(lane: Lane) {\n const mergeLaneResults = await this.scope.sources.mergeLane(lane, true);\n const mergedLane = mergeLaneResults.mergeLane;\n const isRemoteLaneEqualsToMergedLane = lane.isEqual(mergedLane);\n await this.scope.lanes.saveLane(mergedLane, {\n saveLaneHistory: !isRemoteLaneEqualsToMergedLane,\n laneHistoryMsg: 'import (merge from remote)',\n });\n }\n\n private async _filterComponentsByFilters(components: Component[]): Promise<Component[]> {\n if (!this.options.filterEnvs) return components;\n const filteredP = components.map(async (component) => {\n // If the id was requested explicitly, we don't want to filter it out\n if (this.options.ids) {\n if (\n this.options.ids.includes(component.id.toStringWithoutVersion()) ||\n this.options.ids.includes(component.id.toString())\n ) {\n return component;\n }\n }\n const currentEnv = await this.envs.calculateEnvIdFromExtensions(component.extensions);\n const currentEnvWithoutVersion = currentEnv.split('@')[0];\n if (\n this.options.filterEnvs?.includes(currentEnv) ||\n this.options.filterEnvs?.includes(currentEnvWithoutVersion)\n ) {\n return component;\n }\n return undefined;\n });\n const filtered = compact(await Promise.all(filteredP));\n return filtered;\n }\n\n async _fetchDivergeData(components: Component[]) {\n if (this.options.objectsOnly) {\n // no need for it when importing objects only. if it's enabled, in case when on a lane and a non-lane\n // component is in bitmap using an older version, it throws \"getDivergeData: unable to find Version X of Y\"\n return;\n }\n await Promise.all(\n components.map(async (component) => {\n const modelComponent = await this.scope.getModelComponent(component.id);\n await modelComponent.setDivergeData(this.scope.objects, undefined, false);\n this.divergeData.push(modelComponent);\n })\n );\n }\n\n _throwForDivergedHistory() {\n if (this.options.merge || this.options.objectsOnly) return;\n const divergedComponents = this.divergeData.filter((modelComponent) =>\n modelComponent.getDivergeData().isDiverged()\n );\n if (divergedComponents.length) {\n const divergeData = divergedComponents.map((modelComponent) => ({\n id: modelComponent.id(),\n snapsLocal: modelComponent.getDivergeData().snapsOnSourceOnly.length,\n snapsRemote: modelComponent.getDivergeData().snapsOnTargetOnly.length,\n }));\n throw new ComponentsPendingMerge(divergeData);\n }\n }\n\n private async throwForComponentsFromAnotherLane(bitIds: ComponentID[]) {\n if (this.options.objectsOnly) return;\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentRemoteLane = this.remoteLane?.toLaneId().isEqual(currentLaneId) ? this.remoteLane : undefined;\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idsFromAnotherLane: ComponentID[] = [];\n if (currentRemoteLane) {\n await Promise.all(\n bitIds.map(async (bitId) => {\n const isOnCurrentLane =\n (await this.scope.isPartOfLaneHistory(bitId, currentRemoteLane)) ||\n (currentLane && (await this.scope.isPartOfLaneHistory(bitId, currentLane))) ||\n (await this.scope.isPartOfMainHistory(bitId));\n if (!isOnCurrentLane) idsFromAnotherLane.push(bitId);\n })\n );\n } else {\n await Promise.all(\n bitIds.map(async (bitId) => {\n const isIdOnMain = await this.scope.isPartOfMainHistory(bitId);\n if (!isIdOnMain) idsFromAnotherLane.push(bitId);\n })\n );\n }\n if (idsFromAnotherLane.length) {\n throw new BitError(`unable to import the following component(s) as they belong to other lane(s):\n${idsFromAnotherLane.map((id) => id.toString()).join(', ')}\nif you need this specific snap, find the lane this snap is belong to, then run \"bit lane merge <lane-id> [component-id]\" to merge this component from the lane.\nif you just want to get a quick look into this snap, create a new workspace and import it by running \"bit lane import <lane-id> --pattern <component-id>\"`);\n }\n }\n\n private async _importComponentsObjects(\n ids: ComponentIdList,\n {\n fromOriginalScope = false,\n lane,\n ignoreMissingHead = false,\n }: {\n fromOriginalScope?: boolean;\n lane?: Lane;\n ignoreMissingHead?: boolean;\n }\n ): Promise<VersionDependencies[]> {\n const scopeComponentsImporter = ScopeComponentsImporter.getInstance(this.scope);\n await scopeComponentsImporter.importWithoutDeps(ids.toVersionLatest(), {\n cache: false,\n lane,\n includeVersionHistory: true,\n fetchHeadIfLocalIsBehind: !this.options.allHistory,\n collectParents: this.options.allHistory,\n // in case a user is merging a lane into a new workspace, then, locally main has head, but remotely the head is\n // empty, until it's exported. going to the remote and asking this component will throw an error if ignoreMissingHead is false\n ignoreMissingHead: true,\n includeUnexported: this.options.isLaneFromRemote,\n reason: `of their latest on ${lane ? `lane ${lane.id()}` : 'main'}`,\n });\n\n this.logger.setStatusLine(`import ${ids.length} components with their dependencies (if missing)`);\n const results = fromOriginalScope\n ? await scopeComponentsImporter.importManyFromOriginalScopes(ids)\n : await scopeComponentsImporter.importMany({\n ids,\n ignoreMissingHead,\n lane,\n preferDependencyGraph: !this.options.fetchDeps,\n // when user is running \"bit import\", we want to re-fetch if it wasn't built. todo: check if this can be disabled when not needed\n reFetchUnBuiltVersion: true,\n // it's possible that .bitmap is not in sync and has local tags that don't exist on the remote. later, we\n // add them to \"missingIds\" of \"importResult\" and show them to the user\n throwForSeederNotFound: false,\n reason: this.options.fetchDeps\n ? 'for getting all dependencies'\n : `for getting dependencies of components that don't have dependency-graph`,\n });\n\n return results;\n }\n\n /**\n * consider the following use cases:\n * 1) no ids were provided. it should import all the lanes components objects AND main components objects\n * (otherwise, if main components are not imported and are missing, then bit-status complains about it)\n * 2) ids are provided with wildcards. we assume the user wants only the ids that are available on the lane.\n * because a user may entered \"bit import scope/*\" and this scope has many component on the lane and many not on the lane.\n * we want to bring only the components on the lane.\n * 3) ids are provided without wildcards. here, the user knows exactly what's needed and it's ok to get the ids from\n * main if not found on the lane.\n */\n private async getBitIdsForLanes(): Promise<ComponentID[]> {\n if (!this.options.lanes) {\n throw new Error(`getBitIdsForLanes: this.options.lanes must be set`);\n }\n const remoteLaneIds = this.remoteLane?.toComponentIds() || new ComponentIdList();\n\n if (!this.options.ids.length) {\n const bitMapIds = this.consumer.bitMap.getAllBitIds();\n const bitMapIdsToImport = bitMapIds.filter((id) => id.hasScope() && !remoteLaneIds.has(id));\n remoteLaneIds.push(...bitMapIdsToImport);\n\n return remoteLaneIds;\n }\n\n const idsWithWildcard = this.options.ids.filter((id) => hasWildcard(id));\n const idsWithoutWildcard = this.options.ids.filter((id) => !hasWildcard(id));\n const idsWithoutWildcardPreferFromLane = await Promise.all(\n idsWithoutWildcard.map(async (idStr) => {\n const id = await this.getIdFromStr(idStr);\n const fromLane = remoteLaneIds.searchWithoutVersion(id);\n return fromLane && !id.hasVersion() ? fromLane : id;\n })\n );\n\n const bitIds: ComponentID[] = [...idsWithoutWildcardPreferFromLane];\n\n if (!idsWithWildcard) {\n return bitIds;\n }\n\n await pMapSeries(idsWithWildcard, async (idStr: string) => {\n const existingOnLanes = await this.workspace.filterIdsFromPoolIdsByPattern(idStr, remoteLaneIds, false);\n // in case the wildcard contains components from the lane, the user wants to import only them. not from main.\n // otherwise, if the wildcard translates to main components only, it's ok to import from main.\n if (existingOnLanes.length) {\n bitIds.push(...existingOnLanes);\n } else {\n const idsFromRemote = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);\n bitIds.push(...idsFromRemote);\n }\n });\n\n return bitIds;\n }\n\n private async getIdFromStr(id: string): Promise<ComponentID> {\n if (id.startsWith('@')) return this.workspace.resolveComponentIdFromPackageName(id);\n return ComponentID.fromString(id); // we don't support importing without a scope name\n }\n\n private async getBitIdsForNonLanes() {\n const bitIds: ComponentID[] = [];\n await Promise.all(\n this.options.ids.map(async (idStr: string) => {\n if (hasWildcard(idStr)) {\n const ids = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);\n this.logger.setStatusLine(BEFORE_IMPORT_ACTION); // it stops the previous loader of BEFORE_REMOTE_LIST\n bitIds.push(...ids);\n } else {\n const id = await this.getIdFromStr(idStr);\n bitIds.push(id);\n }\n })\n );\n\n return bitIds;\n }\n\n private async getBitIds(): Promise<ComponentIdList> {\n const bitIds: ComponentID[] = this.options.lanes\n ? await this.getBitIdsForLanes()\n : await this.getBitIdsForNonLanes();\n const shouldImportDependents =\n this.options.importDependents || this.options.dependentsVia || this.options.dependentsAll;\n const shouldImportDependencies =\n this.options.importDependenciesDirectly || this.options.importHeadDependenciesDirectly;\n if (shouldImportDependencies || shouldImportDependents) {\n if (shouldImportDependencies) {\n const dependenciesIds = await this.getFlattenedDepsUnique(bitIds);\n bitIds.push(...dependenciesIds);\n }\n if (shouldImportDependents) {\n const dependentsGetter = new DependentsGetter(this.logger, this.workspace, this.graph, this.options);\n const dependents = await dependentsGetter.getDependents(bitIds);\n bitIds.push(...dependents);\n }\n }\n return ComponentIdList.uniqFromArray(bitIds);\n }\n\n private async getFlattenedDepsUnique(bitIds: ComponentID[]): Promise<ComponentID[]> {\n const remoteComps = await this.scope.scopeImporter.getManyRemoteComponents(bitIds);\n const versions = remoteComps.getVersions();\n const getFlattened = (): ComponentIdList => {\n if (versions.length === 1) return versions[0].flattenedDependencies;\n const flattenedDeps = versions.map((v) => v.flattenedDependencies).flat();\n return ComponentIdList.uniqFromArray(flattenedDeps);\n };\n const flattened = getFlattened();\n return this.options.importHeadDependenciesDirectly\n ? this.uniqWithoutVersions(flattened)\n : this.removeMultipleVersionsKeepLatest(flattened);\n }\n\n private uniqWithoutVersions(flattened: ComponentIdList) {\n const latest = flattened.toVersionLatest();\n return ComponentIdList.uniqFromArray(latest);\n }\n\n private removeMultipleVersionsKeepLatest(flattened: ComponentIdList): ComponentID[] {\n const grouped = flattened.toGroupByIdWithoutVersion();\n const latestVersions = Object.keys(grouped).map((key) => {\n const ids = grouped[key];\n if (ids.length === 1) return ids[0];\n try {\n const latest = getLatestVersionNumber(ids, ids[0].changeVersion(LATEST_VERSION));\n return latest;\n } catch (err: any) {\n throw new Error(`a dependency \"${key}\" was found with multiple versions, unable to find which one of them is newer.\nerror: ${err.message}\nconsider running with \"--dependencies-head\" flag instead, which checks out to the head of the dependencies`);\n }\n });\n\n return latestVersions;\n }\n\n async importAccordingToBitMap(): Promise<ImportResult> {\n this.options.objectsOnly = !this.options.merge && !this.options.override;\n const componentsIdsToImport = this.getIdsToImportFromBitmap();\n const emptyResult = {\n importedIds: [],\n importedDeps: [],\n importDetails: [],\n };\n if (!componentsIdsToImport.length) {\n return emptyResult;\n }\n await this._throwForModifiedOrNewComponents(componentsIdsToImport);\n const beforeImportVersions = await this._getCurrentVersions(componentsIdsToImport);\n if (!componentsIdsToImport.length) {\n return emptyResult;\n }\n if (!this.options.objectsOnly) {\n const flagUsed = this.options.merge ? '--merge' : '--override';\n throw new Error(`bit import with no ids and ${flagUsed} flag is not supported.\nto write the components from .bitmap file according to the their remote, please use \"bit checkout reset --all\"`);\n }\n const versionDependenciesArr = await this._importComponentsObjects(componentsIdsToImport, {\n fromOriginalScope: this.options.fromOriginalScope,\n });\n let writtenComponents: Component[] = [];\n let componentWriterResults: ComponentWriterResults | undefined;\n if (!this.options.objectsOnly) {\n const components = await multipleVersionDependenciesToConsumer(versionDependenciesArr, this.scope.objects);\n componentWriterResults = await this._writeToFileSystem(components);\n writtenComponents = components;\n }\n\n return this.returnCompleteResults(\n beforeImportVersions,\n versionDependenciesArr,\n writtenComponents,\n componentWriterResults\n );\n }\n\n private getIdsToImportFromBitmap() {\n const allIds = this.consumer.bitMap.getAllBitIdsFromAllLanes();\n return ComponentIdList.fromArray(allIds.filter((id) => id.hasScope()));\n }\n\n async _getCurrentVersions(ids: ComponentIdList): Promise<ImportedVersions> {\n const versionsP = ids.map(async (id) => {\n const modelComponent = await this.consumer.scope.getModelComponentIfExist(id.changeVersion(undefined));\n const idStr = id.toStringWithoutVersion();\n if (!modelComponent) return [idStr, []];\n return [idStr, modelComponent.listVersions()];\n });\n const versions = await Promise.all(versionsP);\n return fromPairs(versions);\n }\n\n /**\n * get import details, includes the diff between the versions array before import and after import\n */\n async _getImportDetails(\n currentVersions: ImportedVersions,\n components: VersionDependencies[]\n ): Promise<ImportDetails[]> {\n const detailsP = components.map(async (component) => {\n const id = component.component.id;\n const idStr = id.toStringWithoutVersion();\n const beforeImportVersions = currentVersions[idStr];\n if (!beforeImportVersions) {\n throw new Error(\n `_getImportDetails failed finding ${idStr} in currentVersions, which has ${Object.keys(currentVersions).join(\n ', '\n )}`\n );\n }\n const modelComponent = await this.consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) throw new BitError(`imported component ${idStr} was not found in the model`);\n const afterImportVersions = modelComponent.listVersions();\n const versionDifference: string[] = difference(afterImportVersions, beforeImportVersions);\n const getStatus = (): ImportStatus => {\n if (!versionDifference.length) return 'up to date';\n if (!beforeImportVersions.length) return 'added';\n return 'updated';\n };\n const filesStatus = this.mergeStatus && this.mergeStatus[idStr] ? this.mergeStatus[idStr] : null;\n const deprecated = Boolean(await modelComponent.isDeprecated(this.scope.objects, id.version));\n const removed = Boolean(await component.component.component.isRemoved(this.scope.objects, id.version));\n const latestVersion = modelComponent.getHeadRegardlessOfLaneAsTagOrHash(true);\n return {\n id: idStr,\n versions: versionDifference,\n latestVersion: versionDifference.includes(latestVersion) ? latestVersion : null,\n status: getStatus(),\n filesStatus,\n missingDeps: this.options.fetchDeps ? component.getMissingDependencies() : [],\n deprecated,\n removed,\n };\n });\n const importDetails: ImportDetails[] = await Promise.all(detailsP);\n\n return importDetails;\n }\n\n async _throwForPotentialIssues(ids: ComponentIdList): Promise<void> {\n await this._throwForModifiedOrNewComponents(ids);\n this._throwForDifferentComponentWithSameName(ids);\n }\n\n async _throwForModifiedOrNewComponents(ids: ComponentIdList): Promise<void> {\n // the typical objectsOnly option is when a user cloned a project with components tagged to the source code, but\n // doesn't have the model objects. in that case, calling getComponentStatusById() may return an error as it relies\n // on the model objects when there are dependencies\n if (this.options.override || this.options.objectsOnly || this.options.merge || this.options.trackOnly) return;\n const componentsStatuses = await this.workspace.getManyComponentsStatuses(ids);\n const modifiedComponents = componentsStatuses\n .filter(({ status }) => status.modified || status.newlyCreated)\n .map((c) => c.id);\n if (modifiedComponents.length) {\n throw new BitError(\n `unable to import the following components due to local changes, use --merge flag to merge your local changes or --override to override them\\n${modifiedComponents.join(\n '\\n'\n )} `\n );\n }\n }\n\n /**\n * Model Component id() calculation uses id.toString() for the hash.\n * If an imported component has scopereadonly name equals to a local name, both will have the exact same\n * hash and they'll override each other.\n */\n _throwForDifferentComponentWithSameName(ids: ComponentIdList): void {\n ids.forEach((id: ComponentID) => {\n const existingId = this.consumer.getParsedIdIfExist(id.toStringWithoutVersion());\n if (existingId && !existingId.hasScope()) {\n throw new BitError(`unable to import ${id.toString()}. the component name conflicted with your local (new/staged) component with the same name.\nit's fine to have components with the same name as long as their scope names are different.\nif the component was created by mistake, remove it and import the remote one.\notherwise, if tagged/snapped, \"bit reset\" it, then bit rename it.`);\n }\n });\n }\n\n async _getMergeStatus(component: Component): Promise<ComponentMergeStatus> {\n const componentStatus = await this.workspace.getComponentStatusById(component.id);\n const mergeStatus: ComponentMergeStatus = { component, mergeResults: null };\n if (!componentStatus.modified) return mergeStatus;\n const componentModel = await this.consumer.scope.getModelComponent(component.id);\n const existingBitMapBitId = this.consumer.bitMap.getComponentId(component.id, { ignoreVersion: true });\n const fsComponent = await this.consumer.loadComponent(existingBitMapBitId);\n const currentlyUsedVersion = existingBitMapBitId.version;\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const baseComponent: Version = await componentModel.loadVersion(currentlyUsedVersion, this.consumer.scope.objects);\n const otherComponent: Version = await componentModel.loadVersion(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n component.id.version,\n this.consumer.scope.objects\n );\n const mergeResults = await threeWayMerge({\n scope: this.consumer.scope,\n otherComponent,\n otherLabel: component.id.version as string,\n currentComponent: fsComponent,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n mergeStatus.mergeResults = mergeResults;\n return mergeStatus;\n }\n\n /**\n * 1) when there are conflicts and the strategy is \"ours\", don't write the imported component to\n * the filesystem, only update bitmap.\n *\n * 2) when there are conflicts and the strategy is \"theirs\", override the local changes by the\n * imported component. (similar to --override)\n *\n * 3) when there is no conflict or there are conflicts and the strategy is manual, write the files\n * according to the merge result. (done by applyModifiedVersion())\n */\n _updateComponentFilesPerMergeStrategy(componentMergeStatus: ComponentMergeStatus): FilesStatus | null | undefined {\n const mergeResults = componentMergeStatus.mergeResults;\n if (!mergeResults) return null;\n const component = componentMergeStatus.component;\n const files = component.files;\n\n if (mergeResults.hasConflicts && this.options.mergeStrategy === MergeOptions.ours) {\n const filesStatus = {};\n // don't write the files to the filesystem, only bump the bitmap version.\n files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n this.consumer.bitMap.updateComponentId(component.id);\n this.consumer.bitMap.hasChanged = true;\n return filesStatus;\n }\n if (mergeResults.hasConflicts && this.options.mergeStrategy === MergeOptions.theirs) {\n const filesStatus = {};\n // the local changes will be overridden (as if the user entered --override flag for this component)\n files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.updated;\n });\n return filesStatus;\n }\n const { filesStatus, modifiedFiles } = applyModifiedVersion(\n component.files,\n mergeResults,\n this.options.mergeStrategy\n );\n component.files = modifiedFiles;\n\n return filesStatus;\n }\n\n /**\n * update the component files if they are modified and there is a merge strategy.\n * returns only the components that need to be written to the filesystem\n */\n async updateAllComponentsAccordingToMergeStrategy(components: Component[]): Promise<Component[]> {\n if (!this.options.merge) return components;\n const componentsStatusP = components.map((component: Component) => {\n return this._getMergeStatus(component);\n });\n const componentsStatus = await Promise.all(componentsStatusP);\n const componentWithConflict = componentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict && !this.options.mergeStrategy) {\n this.options.mergeStrategy = await getMergeStrategyInteractive();\n }\n this.mergeStatus = {};\n\n const componentsToWrite = componentsStatus.map((componentStatus) => {\n const filesStatus: FilesStatus | null | undefined = this._updateComponentFilesPerMergeStrategy(componentStatus);\n const component = componentStatus.component;\n if (!filesStatus) return component;\n this.mergeStatus[component.id.toStringWithoutVersion()] = filesStatus;\n const unchangedFiles = Object.keys(filesStatus).filter((file) => filesStatus[file] === FileStatus.unchanged);\n if (unchangedFiles.length === Object.keys(filesStatus).length) {\n // all files are unchanged\n return null;\n }\n return component;\n });\n return compact(componentsToWrite);\n }\n\n _shouldSaveLaneData(): boolean {\n if (this.options.objectsOnly) {\n return false;\n }\n return this.consumer.isOnLane();\n }\n\n async _saveLaneDataIfNeeded(components: Component[]): Promise<void> {\n if (!this._shouldSaveLaneData()) {\n return;\n }\n const currentLane = await this.consumer.getCurrentLaneObject();\n if (!currentLane) {\n return; // user on main\n }\n const idsFromRemoteLanes = this.remoteLane?.toComponentIds() || new ComponentIdList();\n await Promise.all(\n components.map(async (comp) => {\n const existOnRemoteLane = idsFromRemoteLanes.has(comp.id);\n if (!existOnRemoteLane && !this.options.saveInLane) {\n this.consumer.bitMap.setOnLanesOnly(comp.id, false);\n return;\n }\n const modelComponent = await this.scope.getModelComponent(comp.id);\n const ref = modelComponent.getRef(comp.id.version as string);\n if (!ref) throw new Error(`_saveLaneDataIfNeeded unable to get ref for ${comp.id.toString()}`);\n currentLane.addComponent({ id: comp.id, head: ref });\n })\n );\n await this.scope.lanes.saveLane(currentLane, { laneHistoryMsg: 'import components' });\n }\n\n async _writeToFileSystem(components: Component[]): Promise<ComponentWriterResults> {\n const componentsToWrite = await this.updateAllComponentsAccordingToMergeStrategy(components);\n const manyComponentsWriterOpts: ManyComponentsWriterParams = {\n components: componentsToWrite,\n writeToPath: this.options.writeToPath,\n writeConfig: this.options.writeConfig,\n skipDependencyInstallation: !this.options.installNpmPackages,\n skipWriteConfigFiles: !this.options.writeConfigFiles,\n verbose: this.options.verbose,\n throwForExistingDir: !this.options.override,\n skipWritingToFs: this.options.trackOnly,\n shouldUpdateWorkspaceConfig: true,\n reasonForBitmapChange: 'import',\n };\n return this.componentWriter.writeMany(manyComponentsWriterOpts);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAA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E,IAAI,CAAC7S,OAAO,CAAC6S,WAAW;MACrCC,0BAA0B,EAAE,CAAC,IAAI,CAAC9S,OAAO,CAAC+S,kBAAkB;MAC5DC,oBAAoB,EAAE,CAAC,IAAI,CAAChT,OAAO,CAACiT,gBAAgB;MACpDC,OAAO,EAAE,IAAI,CAAClT,OAAO,CAACkT,OAAO;MAC7BC,mBAAmB,EAAE,CAAC,IAAI,CAACnT,OAAO,CAAC2M,QAAQ;MAC3CyG,eAAe,EAAE,IAAI,CAACpT,OAAO,CAAC4O,SAAS;MACvCyE,2BAA2B,EAAE,IAAI;MACjCC,qBAAqB,EAAE;IACzB,CAAC;IACD,OAAO,IAAI,CAAC1T,eAAe,CAAC2T,SAAS,CAACZ,wBAAwB,CAAC;EACjE;AACF;AAACa,OAAA,CAAAnV,OAAA,GAAAmB,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_bitError","data","require","_pMapSeries","_interopRequireDefault","_componentId","_loaderMessages","_legacy","_checkout","_merging","_componentsPendingMerge","_scopeComponentsImporter","_versionDependencies","_componentVersion","_lodash","_dependentsGetter","_lister","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImportComponents","constructor","workspace","graph","componentWriter","envs","logger","lister","options","consumer","scope","remoteLane","lanes","importComponents","result","setStatusLine","BEFORE_IMPORT_ACTION","startTime","process","hrtime","ids","length","importObjectsOnLane","consoleSuccess","importSpecificComponents","importAccordingToBitMap","objectsOnly","Error","lane","bitIds","getBitIds","debug","id","toString","beforeImportVersions","_getCurrentVersions","versionDependenciesArr","_importComponentsObjects","mergeAndSaveLaneObject","returnCompleteResults","writtenComponents","componentWriterResults","importDetails","_getImportDetails","missingIds","keys","importedComps","map","c","component","toStringWithoutVersion","forEach","compIdStr","found","includes","push","importedIds","v","flat","importedDeps","allDependenciesIds","installationError","compilationError","workspaceConfigUpdateResult","join","_throwForPotentialIssues","components","multipleVersionDependenciesToConsumer","objects","_fetchDivergeData","_throwForDivergedHistory","throwForComponentsFromAnotherLane","filteredComponents","_filterComponentsByFilters","_writeToFileSystem","_saveLaneDataIfNeeded","mergeLaneResults","sources","mergeLane","mergedLane","isRemoteLaneEqualsToMergedLane","isEqual","saveLane","saveLaneHistory","laneHistoryMsg","filterEnvs","filteredP","currentEnv","calculateEnvIdFromExtensions","extensions","currentEnvWithoutVersion","split","undefined","filtered","compact","Promise","all","modelComponent","getModelComponent","setDivergeData","divergeData","merge","divergedComponents","filter","getDivergeData","isDiverged","snapsLocal","snapsOnSourceOnly","snapsRemote","snapsOnTargetOnly","ComponentsPendingMerge","currentLaneId","getCurrentLaneId","currentRemoteLane","toLaneId","currentLane","getCurrentLaneObject","idsFromAnotherLane","bitId","isOnCurrentLane","isPartOfLaneHistory","isPartOfMainHistory","isIdOnMain","BitError","fromOriginalScope","ignoreMissingHead","scopeComponentsImporter","ScopeComponentsImporter","getInstance","importWithoutDeps","toVersionLatest","cache","includeVersionHistory","fetchHeadIfLocalIsBehind","allHistory","collectParents","includeUnexported","isLaneFromRemote","reason","results","importManyFromOriginalScopes","importMany","preferDependencyGraph","fetchDeps","reFetchUnBuiltVersion","throwForSeederNotFound","getBitIdsForLanes","remoteLaneIds","toComponentIds","ComponentIdList","bitMapIds","bitMap","getAllBitIds","bitMapIdsToImport","hasScope","has","idsWithWildcard","hasWildcard","idsWithoutWildcard","idsWithoutWildcardPreferFromLane","idStr","getIdFromStr","fromLane","searchWithoutVersion","hasVersion","pMapSeries","existingOnLanes","filterIdsFromPoolIdsByPattern","idsFromRemote","getRemoteCompIdsByWildcards","includeDeprecated","startsWith","resolveComponentIdFromPackageName","ComponentID","fromString","getBitIdsForNonLanes","err","NoIdMatchWildcard","consoleWarning","message","shouldImportDependents","importDependents","dependentsVia","dependentsAll","shouldImportDependencies","importDependenciesDirectly","importHeadDependenciesDirectly","dependenciesIds","getFlattenedDepsUnique","dependentsGetter","DependentsGetter","dependents","getDependents","uniqFromArray","remoteComps","scopeImporter","getManyRemoteComponents","versions","getVersions","getFlattened","flattenedDependencies","flattenedDeps","flattened","uniqWithoutVersions","removeMultipleVersionsKeepLatest","latest","grouped","toGroupByIdWithoutVersion","latestVersions","key","getLatestVersionNumber","changeVersion","LATEST_VERSION","override","componentsIdsToImport","getIdsToImportFromBitmap","emptyResult","_throwForModifiedOrNewComponents","flagUsed","allIds","getAllBitIdsFromAllLanes","fromArray","versionsP","getModelComponentIfExist","listVersions","fromPairs","currentVersions","detailsP","afterImportVersions","versionDifference","difference","getStatus","filesStatus","mergeStatus","deprecated","Boolean","isDeprecated","version","removed","isRemoved","latestVersion","getHeadRegardlessOfLaneAsTagOrHash","status","missingDeps","getMissingDependencies","_throwForDifferentComponentWithSameName","trackOnly","componentsStatuses","getManyComponentsStatuses","modifiedComponents","modified","newlyCreated","existingId","getParsedIdIfExist","_getMergeStatus","componentStatus","getComponentStatusById","mergeResults","componentModel","existingBitMapBitId","getComponentId","ignoreVersion","fsComponent","loadComponent","currentlyUsedVersion","baseComponent","loadVersion","otherComponent","threeWayMerge","otherLabel","currentComponent","currentLabel","_updateComponentFilesPerMergeStrategy","componentMergeStatus","files","hasConflicts","mergeStrategy","MergeOptions","ours","file","pathNormalizeToLinux","relative","FileStatus","unchanged","updateComponentId","hasChanged","theirs","updated","modifiedFiles","applyModifiedVersion","updateAllComponentsAccordingToMergeStrategy","componentsStatusP","componentsStatus","componentWithConflict","find","getMergeStrategyInteractive","componentsToWrite","unchangedFiles","_shouldSaveLaneData","isOnLane","idsFromRemoteLanes","comp","existOnRemoteLane","saveInLane","setOnLanesOnly","ref","getRef","addComponent","head","manyComponentsWriterOpts","writeToPath","writeConfig","skipDependencyInstallation","installNpmPackages","skipWriteConfigFiles","writeConfigFiles","verbose","throwForExistingDir","skipWritingToFs","shouldUpdateWorkspaceConfig","reasonForBitmapChange","writeMany","exports"],"sources":["import-components.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\nimport pMapSeries from 'p-map-series';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BEFORE_IMPORT_ACTION } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { Lane, ModelComponent, Version } from '@teambit/legacy/dist/scope/models';\nimport { getLatestVersionNumber, pathNormalizeToLinux, hasWildcard } from '@teambit/legacy.utils';\nimport Component from '@teambit/legacy/dist/consumer/component';\nimport { applyModifiedVersion } from '@teambit/checkout';\nimport {\n FileStatus,\n getMergeStrategyInteractive,\n MergeOptions,\n threeWayMerge,\n MergeStrategy,\n MergeResultsThreeWay,\n FilesStatus,\n} from '@teambit/merging';\nimport ComponentsPendingMerge from '@teambit/legacy/dist/consumer/exceptions/components-pending-merge';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport VersionDependencies, {\n multipleVersionDependenciesToConsumer,\n} from '@teambit/legacy/dist/scope/version-dependencies';\nimport { GraphMain } from '@teambit/graph';\nimport { Workspace } from '@teambit/workspace';\nimport { ComponentWriterMain, ComponentWriterResults, ManyComponentsWriterParams } from '@teambit/component-writer';\nimport { LATEST_VERSION } from '@teambit/component-version';\nimport { EnvsMain } from '@teambit/envs';\nimport { compact, difference, fromPairs } from 'lodash';\nimport { WorkspaceConfigUpdateResult } from '@teambit/config-merger';\nimport { Logger } from '@teambit/logger';\nimport { DependentsGetter } from './dependents-getter';\nimport { ListerMain, NoIdMatchWildcard } from '@teambit/lister';\n\nexport type ImportOptions = {\n ids: string[]; // array might be empty\n verbose?: boolean;\n merge?: boolean;\n mergeStrategy?: MergeStrategy;\n filterEnvs?: string[];\n writeToPath?: string;\n writeConfig?: boolean;\n override?: boolean;\n installNpmPackages: boolean; // default: true\n writeConfigFiles: boolean; // default: true\n objectsOnly?: boolean;\n importDependenciesDirectly?: boolean; // default: false, normally it imports them as packages, not as imported\n importHeadDependenciesDirectly?: boolean; // default: false, similar to importDependenciesDirectly, but it checks out to their head\n importDependents?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean; // don't show prompt for --dependents flag\n fromOriginalScope?: boolean; // default: false, otherwise, it fetches flattened dependencies from their dependents\n saveInLane?: boolean; // save the imported component on the current lane (won't be available on main)\n lanes?: {\n laneId: LaneId;\n remoteLane?: Lane; // it can be an empty array when a lane is a local lane and doesn't exist on the remote\n };\n allHistory?: boolean;\n fetchDeps?: boolean; // by default, if a component was tagged with > 0.0.900, it has the flattened-deps-graph in the object\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n isLaneFromRemote?: boolean; // whether the `lanes.lane` object is coming directly from the remote.\n};\ntype ComponentMergeStatus = {\n component: Component;\n mergeResults: MergeResultsThreeWay | null | undefined;\n};\ntype ImportedVersions = { [id: string]: string[] };\nexport type ImportStatus = 'added' | 'updated' | 'up to date';\nexport type ImportDetails = {\n id: string;\n versions: string[];\n latestVersion: string | null;\n status: ImportStatus;\n filesStatus: FilesStatus | null | undefined;\n missingDeps: ComponentID[];\n deprecated: boolean;\n removed?: boolean;\n};\nexport type ImportResult = {\n importedIds: ComponentID[];\n importedDeps: ComponentID[];\n writtenComponents?: Component[];\n importDetails: ImportDetails[];\n cancellationMessage?: string;\n installationError?: Error;\n compilationError?: Error;\n workspaceConfigUpdateResult?: WorkspaceConfigUpdateResult;\n missingIds?: string[]; // in case the import is configured to not throw when missing\n lane?: Lane;\n};\n\nexport default class ImportComponents {\n consumer: Consumer;\n scope: Scope;\n mergeStatus: { [id: string]: FilesStatus };\n private remoteLane: Lane | undefined;\n private divergeData: Array<ModelComponent> = [];\n constructor(\n private workspace: Workspace,\n private graph: GraphMain,\n private componentWriter: ComponentWriterMain,\n private envs: EnvsMain,\n private logger: Logger,\n private lister: ListerMain,\n public options: ImportOptions\n ) {\n this.consumer = this.workspace.consumer;\n this.scope = this.consumer.scope;\n this.remoteLane = this.options.lanes?.remoteLane;\n }\n\n async importComponents(): Promise<ImportResult> {\n let result;\n this.logger.setStatusLine(BEFORE_IMPORT_ACTION);\n const startTime = process.hrtime();\n if (this.options.lanes && !this.options.ids.length) {\n result = await this.importObjectsOnLane();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n if (this.options.ids.length) {\n result = await this.importSpecificComponents();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n result = await this.importAccordingToBitMap();\n this.logger.consoleSuccess(BEFORE_IMPORT_ACTION, startTime);\n return result;\n }\n\n async importObjectsOnLane(): Promise<ImportResult> {\n if (!this.options.objectsOnly) {\n throw new Error(`importObjectsOnLane should have objectsOnly=true`);\n }\n const lane = this.remoteLane;\n const bitIds: ComponentIdList = await this.getBitIds();\n lane\n ? this.logger.debug(`importObjectsOnLane, Lane: ${lane.id()}, Ids: ${bitIds.toString()}`)\n : this.logger.debug(\n `importObjectsOnLane, the lane does not exist on the remote. importing only the main components`\n );\n const beforeImportVersions = await this._getCurrentVersions(bitIds);\n const versionDependenciesArr = await this._importComponentsObjects(bitIds, {\n lane,\n });\n\n if (lane) {\n await this.mergeAndSaveLaneObject(lane);\n }\n\n return this.returnCompleteResults(beforeImportVersions, versionDependenciesArr);\n }\n\n private async returnCompleteResults(\n beforeImportVersions: ImportedVersions,\n versionDependenciesArr: VersionDependencies[],\n writtenComponents?: Component[],\n componentWriterResults?: ComponentWriterResults\n ): Promise<ImportResult> {\n const importDetails = await this._getImportDetails(beforeImportVersions, versionDependenciesArr);\n const missingIds: string[] = [];\n if (Object.keys(beforeImportVersions).length > versionDependenciesArr.length) {\n const importedComps = versionDependenciesArr.map((c) => c.component.id.toStringWithoutVersion());\n Object.keys(beforeImportVersions).forEach((compIdStr) => {\n const found = importedComps.includes(compIdStr);\n if (!found) missingIds.push(compIdStr);\n });\n }\n\n return {\n importedIds: versionDependenciesArr.map((v) => v.component.id).flat(),\n importedDeps: versionDependenciesArr.map((v) => v.allDependenciesIds).flat(),\n writtenComponents,\n importDetails,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n workspaceConfigUpdateResult: componentWriterResults?.workspaceConfigUpdateResult,\n missingIds,\n lane: this.remoteLane,\n };\n }\n\n async importSpecificComponents(): Promise<ImportResult> {\n this.logger.debug(`importSpecificComponents, Ids: ${this.options.ids.join(', ')}`);\n const bitIds: ComponentIdList = await this.getBitIds();\n const beforeImportVersions = await this._getCurrentVersions(bitIds);\n await this._throwForPotentialIssues(bitIds);\n const versionDependenciesArr = await this._importComponentsObjects(bitIds, {\n lane: this.remoteLane,\n });\n if (this.remoteLane && this.options.objectsOnly) {\n await this.mergeAndSaveLaneObject(this.remoteLane);\n }\n let writtenComponents: Component[] = [];\n let componentWriterResults: ComponentWriterResults | undefined;\n if (!this.options.objectsOnly) {\n const components = await multipleVersionDependenciesToConsumer(versionDependenciesArr, this.scope.objects);\n await this._fetchDivergeData(components);\n this._throwForDivergedHistory();\n await this.throwForComponentsFromAnotherLane(components.map((c) => c.id));\n const filteredComponents = await this._filterComponentsByFilters(components);\n componentWriterResults = await this._writeToFileSystem(filteredComponents);\n await this._saveLaneDataIfNeeded(filteredComponents);\n writtenComponents = filteredComponents;\n }\n\n return this.returnCompleteResults(\n beforeImportVersions,\n versionDependenciesArr,\n writtenComponents,\n componentWriterResults\n );\n }\n\n private async mergeAndSaveLaneObject(lane: Lane) {\n const mergeLaneResults = await this.scope.sources.mergeLane(lane, true);\n const mergedLane = mergeLaneResults.mergeLane;\n const isRemoteLaneEqualsToMergedLane = lane.isEqual(mergedLane);\n await this.scope.lanes.saveLane(mergedLane, {\n saveLaneHistory: !isRemoteLaneEqualsToMergedLane,\n laneHistoryMsg: 'import (merge from remote)',\n });\n }\n\n private async _filterComponentsByFilters(components: Component[]): Promise<Component[]> {\n if (!this.options.filterEnvs) return components;\n const filteredP = components.map(async (component) => {\n // If the id was requested explicitly, we don't want to filter it out\n if (this.options.ids) {\n if (\n this.options.ids.includes(component.id.toStringWithoutVersion()) ||\n this.options.ids.includes(component.id.toString())\n ) {\n return component;\n }\n }\n const currentEnv = await this.envs.calculateEnvIdFromExtensions(component.extensions);\n const currentEnvWithoutVersion = currentEnv.split('@')[0];\n if (\n this.options.filterEnvs?.includes(currentEnv) ||\n this.options.filterEnvs?.includes(currentEnvWithoutVersion)\n ) {\n return component;\n }\n return undefined;\n });\n const filtered = compact(await Promise.all(filteredP));\n return filtered;\n }\n\n async _fetchDivergeData(components: Component[]) {\n if (this.options.objectsOnly) {\n // no need for it when importing objects only. if it's enabled, in case when on a lane and a non-lane\n // component is in bitmap using an older version, it throws \"getDivergeData: unable to find Version X of Y\"\n return;\n }\n await Promise.all(\n components.map(async (component) => {\n const modelComponent = await this.scope.getModelComponent(component.id);\n await modelComponent.setDivergeData(this.scope.objects, undefined, false);\n this.divergeData.push(modelComponent);\n })\n );\n }\n\n _throwForDivergedHistory() {\n if (this.options.merge || this.options.objectsOnly) return;\n const divergedComponents = this.divergeData.filter((modelComponent) =>\n modelComponent.getDivergeData().isDiverged()\n );\n if (divergedComponents.length) {\n const divergeData = divergedComponents.map((modelComponent) => ({\n id: modelComponent.id(),\n snapsLocal: modelComponent.getDivergeData().snapsOnSourceOnly.length,\n snapsRemote: modelComponent.getDivergeData().snapsOnTargetOnly.length,\n }));\n throw new ComponentsPendingMerge(divergeData);\n }\n }\n\n private async throwForComponentsFromAnotherLane(bitIds: ComponentID[]) {\n if (this.options.objectsOnly) return;\n const currentLaneId = this.workspace.getCurrentLaneId();\n const currentRemoteLane = this.remoteLane?.toLaneId().isEqual(currentLaneId) ? this.remoteLane : undefined;\n const currentLane = await this.workspace.getCurrentLaneObject();\n const idsFromAnotherLane: ComponentID[] = [];\n if (currentRemoteLane) {\n await Promise.all(\n bitIds.map(async (bitId) => {\n const isOnCurrentLane =\n (await this.scope.isPartOfLaneHistory(bitId, currentRemoteLane)) ||\n (currentLane && (await this.scope.isPartOfLaneHistory(bitId, currentLane))) ||\n (await this.scope.isPartOfMainHistory(bitId));\n if (!isOnCurrentLane) idsFromAnotherLane.push(bitId);\n })\n );\n } else {\n await Promise.all(\n bitIds.map(async (bitId) => {\n const isIdOnMain = await this.scope.isPartOfMainHistory(bitId);\n if (!isIdOnMain) idsFromAnotherLane.push(bitId);\n })\n );\n }\n if (idsFromAnotherLane.length) {\n throw new BitError(`unable to import the following component(s) as they belong to other lane(s):\n${idsFromAnotherLane.map((id) => id.toString()).join(', ')}\nif you need this specific snap, find the lane this snap is belong to, then run \"bit lane merge <lane-id> [component-id]\" to merge this component from the lane.\nif you just want to get a quick look into this snap, create a new workspace and import it by running \"bit lane import <lane-id> --pattern <component-id>\"`);\n }\n }\n\n private async _importComponentsObjects(\n ids: ComponentIdList,\n {\n fromOriginalScope = false,\n lane,\n ignoreMissingHead = false,\n }: {\n fromOriginalScope?: boolean;\n lane?: Lane;\n ignoreMissingHead?: boolean;\n }\n ): Promise<VersionDependencies[]> {\n const scopeComponentsImporter = ScopeComponentsImporter.getInstance(this.scope);\n await scopeComponentsImporter.importWithoutDeps(ids.toVersionLatest(), {\n cache: false,\n lane,\n includeVersionHistory: true,\n fetchHeadIfLocalIsBehind: !this.options.allHistory,\n collectParents: this.options.allHistory,\n // in case a user is merging a lane into a new workspace, then, locally main has head, but remotely the head is\n // empty, until it's exported. going to the remote and asking this component will throw an error if ignoreMissingHead is false\n ignoreMissingHead: true,\n includeUnexported: this.options.isLaneFromRemote,\n reason: `of their latest on ${lane ? `lane ${lane.id()}` : 'main'}`,\n });\n\n this.logger.setStatusLine(`import ${ids.length} components with their dependencies (if missing)`);\n const results = fromOriginalScope\n ? await scopeComponentsImporter.importManyFromOriginalScopes(ids)\n : await scopeComponentsImporter.importMany({\n ids,\n ignoreMissingHead,\n lane,\n preferDependencyGraph: !this.options.fetchDeps,\n // when user is running \"bit import\", we want to re-fetch if it wasn't built. todo: check if this can be disabled when not needed\n reFetchUnBuiltVersion: true,\n // it's possible that .bitmap is not in sync and has local tags that don't exist on the remote. later, we\n // add them to \"missingIds\" of \"importResult\" and show them to the user\n throwForSeederNotFound: false,\n reason: this.options.fetchDeps\n ? 'for getting all dependencies'\n : `for getting dependencies of components that don't have dependency-graph`,\n });\n\n return results;\n }\n\n /**\n * consider the following use cases:\n * 1) no ids were provided. it should import all the lanes components objects AND main components objects\n * (otherwise, if main components are not imported and are missing, then bit-status complains about it)\n * 2) ids are provided with wildcards. we assume the user wants only the ids that are available on the lane.\n * because a user may entered \"bit import scope/*\" and this scope has many component on the lane and many not on the lane.\n * we want to bring only the components on the lane.\n * 3) ids are provided without wildcards. here, the user knows exactly what's needed and it's ok to get the ids from\n * main if not found on the lane.\n */\n private async getBitIdsForLanes(): Promise<ComponentID[]> {\n if (!this.options.lanes) {\n throw new Error(`getBitIdsForLanes: this.options.lanes must be set`);\n }\n const remoteLaneIds = this.remoteLane?.toComponentIds() || new ComponentIdList();\n\n if (!this.options.ids.length) {\n const bitMapIds = this.consumer.bitMap.getAllBitIds();\n const bitMapIdsToImport = bitMapIds.filter((id) => id.hasScope() && !remoteLaneIds.has(id));\n remoteLaneIds.push(...bitMapIdsToImport);\n\n return remoteLaneIds;\n }\n\n const idsWithWildcard = this.options.ids.filter((id) => hasWildcard(id));\n const idsWithoutWildcard = this.options.ids.filter((id) => !hasWildcard(id));\n const idsWithoutWildcardPreferFromLane = await Promise.all(\n idsWithoutWildcard.map(async (idStr) => {\n const id = await this.getIdFromStr(idStr);\n const fromLane = remoteLaneIds.searchWithoutVersion(id);\n return fromLane && !id.hasVersion() ? fromLane : id;\n })\n );\n\n const bitIds: ComponentID[] = [...idsWithoutWildcardPreferFromLane];\n\n if (!idsWithWildcard) {\n return bitIds;\n }\n\n await pMapSeries(idsWithWildcard, async (idStr: string) => {\n const existingOnLanes = await this.workspace.filterIdsFromPoolIdsByPattern(idStr, remoteLaneIds, false);\n // in case the wildcard contains components from the lane, the user wants to import only them. not from main.\n // otherwise, if the wildcard translates to main components only, it's ok to import from main.\n if (existingOnLanes.length) {\n bitIds.push(...existingOnLanes);\n } else {\n const idsFromRemote = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);\n bitIds.push(...idsFromRemote);\n }\n });\n\n return bitIds;\n }\n\n private async getIdFromStr(id: string): Promise<ComponentID> {\n if (id.startsWith('@')) return this.workspace.resolveComponentIdFromPackageName(id);\n return ComponentID.fromString(id); // we don't support importing without a scope name\n }\n\n private async getBitIdsForNonLanes() {\n const bitIds: ComponentID[] = [];\n await Promise.all(\n this.options.ids.map(async (idStr: string) => {\n if (hasWildcard(idStr)) {\n let ids: ComponentID[] = [];\n try {\n ids = await this.lister.getRemoteCompIdsByWildcards(idStr, this.options.includeDeprecated);\n } catch (err: any) {\n if (err instanceof NoIdMatchWildcard) {\n this.logger.consoleWarning(err.message);\n } else {\n throw err;\n }\n }\n bitIds.push(...ids);\n } else {\n const id = await this.getIdFromStr(idStr);\n bitIds.push(id);\n }\n })\n );\n\n this.logger.setStatusLine(BEFORE_IMPORT_ACTION); // it stops the previous loader of BEFORE_REMOTE_LIST\n\n return bitIds;\n }\n\n private async getBitIds(): Promise<ComponentIdList> {\n const bitIds: ComponentID[] = this.options.lanes\n ? await this.getBitIdsForLanes()\n : await this.getBitIdsForNonLanes();\n const shouldImportDependents =\n this.options.importDependents || this.options.dependentsVia || this.options.dependentsAll;\n const shouldImportDependencies =\n this.options.importDependenciesDirectly || this.options.importHeadDependenciesDirectly;\n if (shouldImportDependencies || shouldImportDependents) {\n if (shouldImportDependencies) {\n const dependenciesIds = await this.getFlattenedDepsUnique(bitIds);\n bitIds.push(...dependenciesIds);\n }\n if (shouldImportDependents) {\n const dependentsGetter = new DependentsGetter(this.logger, this.workspace, this.graph, this.options);\n const dependents = await dependentsGetter.getDependents(bitIds);\n bitIds.push(...dependents);\n }\n }\n return ComponentIdList.uniqFromArray(bitIds);\n }\n\n private async getFlattenedDepsUnique(bitIds: ComponentID[]): Promise<ComponentID[]> {\n const remoteComps = await this.scope.scopeImporter.getManyRemoteComponents(bitIds);\n const versions = remoteComps.getVersions();\n const getFlattened = (): ComponentIdList => {\n if (versions.length === 1) return versions[0].flattenedDependencies;\n const flattenedDeps = versions.map((v) => v.flattenedDependencies).flat();\n return ComponentIdList.uniqFromArray(flattenedDeps);\n };\n const flattened = getFlattened();\n return this.options.importHeadDependenciesDirectly\n ? this.uniqWithoutVersions(flattened)\n : this.removeMultipleVersionsKeepLatest(flattened);\n }\n\n private uniqWithoutVersions(flattened: ComponentIdList) {\n const latest = flattened.toVersionLatest();\n return ComponentIdList.uniqFromArray(latest);\n }\n\n private removeMultipleVersionsKeepLatest(flattened: ComponentIdList): ComponentID[] {\n const grouped = flattened.toGroupByIdWithoutVersion();\n const latestVersions = Object.keys(grouped).map((key) => {\n const ids = grouped[key];\n if (ids.length === 1) return ids[0];\n try {\n const latest = getLatestVersionNumber(ids, ids[0].changeVersion(LATEST_VERSION));\n return latest;\n } catch (err: any) {\n throw new Error(`a dependency \"${key}\" was found with multiple versions, unable to find which one of them is newer.\nerror: ${err.message}\nconsider running with \"--dependencies-head\" flag instead, which checks out to the head of the dependencies`);\n }\n });\n\n return latestVersions;\n }\n\n async importAccordingToBitMap(): Promise<ImportResult> {\n this.options.objectsOnly = !this.options.merge && !this.options.override;\n const componentsIdsToImport = this.getIdsToImportFromBitmap();\n const emptyResult = {\n importedIds: [],\n importedDeps: [],\n importDetails: [],\n };\n if (!componentsIdsToImport.length) {\n return emptyResult;\n }\n await this._throwForModifiedOrNewComponents(componentsIdsToImport);\n const beforeImportVersions = await this._getCurrentVersions(componentsIdsToImport);\n if (!componentsIdsToImport.length) {\n return emptyResult;\n }\n if (!this.options.objectsOnly) {\n const flagUsed = this.options.merge ? '--merge' : '--override';\n throw new Error(`bit import with no ids and ${flagUsed} flag is not supported.\nto write the components from .bitmap file according to the their remote, please use \"bit checkout reset --all\"`);\n }\n const versionDependenciesArr = await this._importComponentsObjects(componentsIdsToImport, {\n fromOriginalScope: this.options.fromOriginalScope,\n });\n let writtenComponents: Component[] = [];\n let componentWriterResults: ComponentWriterResults | undefined;\n if (!this.options.objectsOnly) {\n const components = await multipleVersionDependenciesToConsumer(versionDependenciesArr, this.scope.objects);\n componentWriterResults = await this._writeToFileSystem(components);\n writtenComponents = components;\n }\n\n return this.returnCompleteResults(\n beforeImportVersions,\n versionDependenciesArr,\n writtenComponents,\n componentWriterResults\n );\n }\n\n private getIdsToImportFromBitmap() {\n const allIds = this.consumer.bitMap.getAllBitIdsFromAllLanes();\n return ComponentIdList.fromArray(allIds.filter((id) => id.hasScope()));\n }\n\n async _getCurrentVersions(ids: ComponentIdList): Promise<ImportedVersions> {\n const versionsP = ids.map(async (id) => {\n const modelComponent = await this.consumer.scope.getModelComponentIfExist(id.changeVersion(undefined));\n const idStr = id.toStringWithoutVersion();\n if (!modelComponent) return [idStr, []];\n return [idStr, modelComponent.listVersions()];\n });\n const versions = await Promise.all(versionsP);\n return fromPairs(versions);\n }\n\n /**\n * get import details, includes the diff between the versions array before import and after import\n */\n async _getImportDetails(\n currentVersions: ImportedVersions,\n components: VersionDependencies[]\n ): Promise<ImportDetails[]> {\n const detailsP = components.map(async (component) => {\n const id = component.component.id;\n const idStr = id.toStringWithoutVersion();\n const beforeImportVersions = currentVersions[idStr];\n if (!beforeImportVersions) {\n throw new Error(\n `_getImportDetails failed finding ${idStr} in currentVersions, which has ${Object.keys(currentVersions).join(\n ', '\n )}`\n );\n }\n const modelComponent = await this.consumer.scope.getModelComponentIfExist(id);\n if (!modelComponent) throw new BitError(`imported component ${idStr} was not found in the model`);\n const afterImportVersions = modelComponent.listVersions();\n const versionDifference: string[] = difference(afterImportVersions, beforeImportVersions);\n const getStatus = (): ImportStatus => {\n if (!versionDifference.length) return 'up to date';\n if (!beforeImportVersions.length) return 'added';\n return 'updated';\n };\n const filesStatus = this.mergeStatus && this.mergeStatus[idStr] ? this.mergeStatus[idStr] : null;\n const deprecated = Boolean(await modelComponent.isDeprecated(this.scope.objects, id.version));\n const removed = Boolean(await component.component.component.isRemoved(this.scope.objects, id.version));\n const latestVersion = modelComponent.getHeadRegardlessOfLaneAsTagOrHash(true);\n return {\n id: idStr,\n versions: versionDifference,\n latestVersion: versionDifference.includes(latestVersion) ? latestVersion : null,\n status: getStatus(),\n filesStatus,\n missingDeps: this.options.fetchDeps ? component.getMissingDependencies() : [],\n deprecated,\n removed,\n };\n });\n const importDetails: ImportDetails[] = await Promise.all(detailsP);\n\n return importDetails;\n }\n\n async _throwForPotentialIssues(ids: ComponentIdList): Promise<void> {\n await this._throwForModifiedOrNewComponents(ids);\n this._throwForDifferentComponentWithSameName(ids);\n }\n\n async _throwForModifiedOrNewComponents(ids: ComponentIdList): Promise<void> {\n // the typical objectsOnly option is when a user cloned a project with components tagged to the source code, but\n // doesn't have the model objects. in that case, calling getComponentStatusById() may return an error as it relies\n // on the model objects when there are dependencies\n if (this.options.override || this.options.objectsOnly || this.options.merge || this.options.trackOnly) return;\n const componentsStatuses = await this.workspace.getManyComponentsStatuses(ids);\n const modifiedComponents = componentsStatuses\n .filter(({ status }) => status.modified || status.newlyCreated)\n .map((c) => c.id);\n if (modifiedComponents.length) {\n throw new BitError(\n `unable to import the following components due to local changes, use --merge flag to merge your local changes or --override to override them\\n${modifiedComponents.join(\n '\\n'\n )} `\n );\n }\n }\n\n /**\n * Model Component id() calculation uses id.toString() for the hash.\n * If an imported component has scopereadonly name equals to a local name, both will have the exact same\n * hash and they'll override each other.\n */\n _throwForDifferentComponentWithSameName(ids: ComponentIdList): void {\n ids.forEach((id: ComponentID) => {\n const existingId = this.consumer.getParsedIdIfExist(id.toStringWithoutVersion());\n if (existingId && !existingId.hasScope()) {\n throw new BitError(`unable to import ${id.toString()}. the component name conflicted with your local (new/staged) component with the same name.\nit's fine to have components with the same name as long as their scope names are different.\nif the component was created by mistake, remove it and import the remote one.\notherwise, if tagged/snapped, \"bit reset\" it, then bit rename it.`);\n }\n });\n }\n\n async _getMergeStatus(component: Component): Promise<ComponentMergeStatus> {\n const componentStatus = await this.workspace.getComponentStatusById(component.id);\n const mergeStatus: ComponentMergeStatus = { component, mergeResults: null };\n if (!componentStatus.modified) return mergeStatus;\n const componentModel = await this.consumer.scope.getModelComponent(component.id);\n const existingBitMapBitId = this.consumer.bitMap.getComponentId(component.id, { ignoreVersion: true });\n const fsComponent = await this.consumer.loadComponent(existingBitMapBitId);\n const currentlyUsedVersion = existingBitMapBitId.version;\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const baseComponent: Version = await componentModel.loadVersion(currentlyUsedVersion, this.consumer.scope.objects);\n const otherComponent: Version = await componentModel.loadVersion(\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n component.id.version,\n this.consumer.scope.objects\n );\n const mergeResults = await threeWayMerge({\n scope: this.consumer.scope,\n otherComponent,\n otherLabel: component.id.version as string,\n currentComponent: fsComponent,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n mergeStatus.mergeResults = mergeResults;\n return mergeStatus;\n }\n\n /**\n * 1) when there are conflicts and the strategy is \"ours\", don't write the imported component to\n * the filesystem, only update bitmap.\n *\n * 2) when there are conflicts and the strategy is \"theirs\", override the local changes by the\n * imported component. (similar to --override)\n *\n * 3) when there is no conflict or there are conflicts and the strategy is manual, write the files\n * according to the merge result. (done by applyModifiedVersion())\n */\n _updateComponentFilesPerMergeStrategy(componentMergeStatus: ComponentMergeStatus): FilesStatus | null | undefined {\n const mergeResults = componentMergeStatus.mergeResults;\n if (!mergeResults) return null;\n const component = componentMergeStatus.component;\n const files = component.files;\n\n if (mergeResults.hasConflicts && this.options.mergeStrategy === MergeOptions.ours) {\n const filesStatus = {};\n // don't write the files to the filesystem, only bump the bitmap version.\n files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n this.consumer.bitMap.updateComponentId(component.id);\n this.consumer.bitMap.hasChanged = true;\n return filesStatus;\n }\n if (mergeResults.hasConflicts && this.options.mergeStrategy === MergeOptions.theirs) {\n const filesStatus = {};\n // the local changes will be overridden (as if the user entered --override flag for this component)\n files.forEach((file) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.updated;\n });\n return filesStatus;\n }\n const { filesStatus, modifiedFiles } = applyModifiedVersion(\n component.files,\n mergeResults,\n this.options.mergeStrategy\n );\n component.files = modifiedFiles;\n\n return filesStatus;\n }\n\n /**\n * update the component files if they are modified and there is a merge strategy.\n * returns only the components that need to be written to the filesystem\n */\n async updateAllComponentsAccordingToMergeStrategy(components: Component[]): Promise<Component[]> {\n if (!this.options.merge) return components;\n const componentsStatusP = components.map((component: Component) => {\n return this._getMergeStatus(component);\n });\n const componentsStatus = await Promise.all(componentsStatusP);\n const componentWithConflict = componentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict && !this.options.mergeStrategy) {\n this.options.mergeStrategy = await getMergeStrategyInteractive();\n }\n this.mergeStatus = {};\n\n const componentsToWrite = componentsStatus.map((componentStatus) => {\n const filesStatus: FilesStatus | null | undefined = this._updateComponentFilesPerMergeStrategy(componentStatus);\n const component = componentStatus.component;\n if (!filesStatus) return component;\n this.mergeStatus[component.id.toStringWithoutVersion()] = filesStatus;\n const unchangedFiles = Object.keys(filesStatus).filter((file) => filesStatus[file] === FileStatus.unchanged);\n if (unchangedFiles.length === Object.keys(filesStatus).length) {\n // all files are unchanged\n return null;\n }\n return component;\n });\n return compact(componentsToWrite);\n }\n\n _shouldSaveLaneData(): boolean {\n if (this.options.objectsOnly) {\n return false;\n }\n return this.consumer.isOnLane();\n }\n\n async _saveLaneDataIfNeeded(components: Component[]): Promise<void> {\n if (!this._shouldSaveLaneData()) {\n return;\n }\n const currentLane = await this.consumer.getCurrentLaneObject();\n if (!currentLane) {\n return; // user on main\n }\n const idsFromRemoteLanes = this.remoteLane?.toComponentIds() || new ComponentIdList();\n await Promise.all(\n components.map(async (comp) => {\n const existOnRemoteLane = idsFromRemoteLanes.has(comp.id);\n if (!existOnRemoteLane && !this.options.saveInLane) {\n this.consumer.bitMap.setOnLanesOnly(comp.id, false);\n return;\n }\n const modelComponent = await this.scope.getModelComponent(comp.id);\n const ref = modelComponent.getRef(comp.id.version as string);\n if (!ref) throw new Error(`_saveLaneDataIfNeeded unable to get ref for ${comp.id.toString()}`);\n currentLane.addComponent({ id: comp.id, head: ref });\n })\n );\n await this.scope.lanes.saveLane(currentLane, { laneHistoryMsg: 'import components' });\n }\n\n async _writeToFileSystem(components: Component[]): Promise<ComponentWriterResults> {\n const componentsToWrite = await this.updateAllComponentsAccordingToMergeStrategy(components);\n const manyComponentsWriterOpts: ManyComponentsWriterParams = {\n components: componentsToWrite,\n writeToPath: this.options.writeToPath,\n writeConfig: this.options.writeConfig,\n skipDependencyInstallation: !this.options.installNpmPackages,\n skipWriteConfigFiles: !this.options.writeConfigFiles,\n verbose: this.options.verbose,\n throwForExistingDir: !this.options.override,\n skipWritingToFs: this.options.trackOnly,\n shouldUpdateWorkspaceConfig: true,\n reasonForBitmapChange: 'import',\n };\n return this.componentWriter.writeMany(manyComponentsWriterOpts);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,gBAAA;EAAA,MAAAL,IAAA,GAAA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AO,CAACiT,kBAAkB;MAC5DC,oBAAoB,EAAE,CAAC,IAAI,CAAClT,OAAO,CAACmT,gBAAgB;MACpDC,OAAO,EAAE,IAAI,CAACpT,OAAO,CAACoT,OAAO;MAC7BC,mBAAmB,EAAE,CAAC,IAAI,CAACrT,OAAO,CAAC6M,QAAQ;MAC3CyG,eAAe,EAAE,IAAI,CAACtT,OAAO,CAAC8O,SAAS;MACvCyE,2BAA2B,EAAE,IAAI;MACjCC,qBAAqB,EAAE;IACzB,CAAC;IACD,OAAO,IAAI,CAAC5T,eAAe,CAAC6T,SAAS,CAACZ,wBAAwB,CAAC;EACjE;AACF;AAACa,OAAA,CAAArV,OAAA,GAAAmB,gBAAA","ignoreList":[]}
@@ -95,9 +95,9 @@ function _scopeComponentsImporter() {
95
95
  };
96
96
  return data;
97
97
  }
98
- function _artifactFiles() {
99
- const data = require("@teambit/legacy/dist/consumer/component/sources/artifact-files");
100
- _artifactFiles = function () {
98
+ function _component() {
99
+ const data = require("@teambit/component.sources");
100
+ _component = function () {
101
101
  return data;
102
102
  };
103
103
  return data;
@@ -259,7 +259,7 @@ class ImporterMain {
259
259
  async importHeadArtifactsFromLane(lane, ids = lane.toComponentIds(), throwIfMissing = false) {
260
260
  const laneComps = await this.scope.legacyScope.getManyConsumerComponents(ids);
261
261
  try {
262
- await (0, _artifactFiles().importAllArtifactsFromLane)(this.scope.legacyScope, laneComps, lane);
262
+ await (0, _component().importAllArtifactsFromLane)(this.scope.legacyScope, laneComps, lane);
263
263
  } catch (err) {
264
264
  this.logger.error(`failed fetching artifacts for lane ${lane.id.toString()}`, err);
265
265
  if (throwIfMissing) throw err;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_dependencyResolver","_workspace","_legacy","_pkgModules","_legacyBitId","_pMapSeries","_interopRequireDefault","_envs","_componentWriter","_logger","_scope","_laneId","_scopeComponentsImporter","_artifactFiles","_install","_loader","_componentId","_scopeNotFoundOrDenied","_graph","_legacy2","_bitError","_import","_importer","_fetchCmd","_importComponents","_lister","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImporterMain","constructor","workspace","depResolver","graph","scope","componentWriter","envs","logger","lister","import","importOptions","packageManagerArgs","OutsideWorkspaceError","consumer","ids","objectsOnly","isOnLane","currentRemoteLane","getCurrentRemoteLane","lanes","laneId","toLaneId","remoteLane","currentLaneId","getCurrentLaneId","importComponents","createImportComponents","results","Analytics","setExtraData","importedIds","writtenComponents","removeFromWorkspaceConfig","onDestroy","importObjects","options","installNpmPackages","writeConfigFiles","importHeadArtifactsFromLane","lane","toComponentIds","throwIfMissing","laneComps","legacyScope","getManyConsumerComponents","importAllArtifactsFromLane","err","error","id","toString","importCurrentObjects","importObjectsFromMainIfExist","cache","scopeImporter","importWithoutDeps","ComponentIdList","fromArray","includeVersionHistory","ignoreMissingHead","fetchLaneComponents","includeUpdateDependents","toComponentIdsIncludeUpdateDependents","importMany","reason","mergeLane","sources","isRemoteLaneEqualsToMergedLane","isEqual","saveLane","saveLaneHistory","laneHistoryMsg","fetch","components","fromOriginalScope","allHistory","BitError","loader","start","lanesToFetch","getLanes","shouldFetchFromMain","includes","DEFAULT_LANE","fetchLanes","verbose","writeConfig","override","importDetails","remoteLaneIds","map","trackLane","getRemoteTrackedDataByLocalLane","LaneId","from","remoteScope","parse","objects","remoteLanes","getAllRemoteLaneIds","scopeComponentImporter","ScopeComponentsImporter","getInstance","importLanes","InvalidScopeName","ScopeNotFoundOrDenied","LaneNotFound","InvalidScopeNameFromRemote","stop","console","message","ImportComponents","resultFromMain","importedDeps","resultsPerLane","pMapSeries","setStatusLine","name","isLaneFromRemote","consoleSuccess","reduce","acc","curr","importLaneObject","persistIfNotExists","includeLaneHistory","laneObject","exists","loadLane","hasChanged","importObjectsByHashes","hashes","groupByScope","importManyObjects","component","importedPackageNames","getImportedPackagesNames","isRemoved","removeFromRootPolicy","persistConfig","componentIdToPackageName","provider","cli","install","loggerMain","createLogger","ImporterAspect","importerMain","registerPreInstall","opts","registerPreLink","fetchObject","register","ImportCmd","FetchCmd","exports","CLIAspect","WorkspaceAspect","DependencyResolverAspect","GraphAspect","ScopeAspect","ComponentWriterAspect","InstallAspect","EnvsAspect","LoggerAspect","ListerAspect","MainRuntime","addRuntime"],"sources":["importer.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport { InvalidScopeName, InvalidScopeNameFromRemote } from '@teambit/legacy-bit-id';\nimport pMapSeries from 'p-map-series';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { importAllArtifactsFromLane } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { ScopeNotFoundOrDenied } from '@teambit/legacy/dist/remotes/exceptions/scope-not-found-or-denied';\nimport { GraphAspect, GraphMain } from '@teambit/graph';\nimport { LaneNotFound } from '@teambit/legacy.scope-api';\nimport { BitError } from '@teambit/bit-error';\nimport { ImportCmd } from './import.cmd';\nimport { ImporterAspect } from './importer.aspect';\nimport { FetchCmd } from './fetch-cmd';\nimport ImportComponents, { ImportOptions, ImportResult } from './import-components';\nimport { ListerAspect, ListerMain } from '@teambit/lister';\n\nexport class ImporterMain {\n constructor(\n private workspace: Workspace,\n private depResolver: DependencyResolverMain,\n private graph: GraphMain,\n private scope: ScopeMain,\n private componentWriter: ComponentWriterMain,\n private envs: EnvsMain,\n readonly logger: Logger,\n private lister: ListerMain\n ) {}\n\n async import(importOptions: ImportOptions, packageManagerArgs: string[] = []): Promise<ImportResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n consumer.packageManagerArgs = packageManagerArgs;\n if (!importOptions.ids.length) {\n importOptions.objectsOnly = true;\n }\n if (this.workspace.consumer.isOnLane()) {\n const currentRemoteLane = await this.workspace.getCurrentRemoteLane();\n if (currentRemoteLane) {\n importOptions.lanes = { laneId: currentRemoteLane.toLaneId(), remoteLane: currentRemoteLane };\n } else if (!importOptions.ids.length) {\n // this is probably a local lane that was never exported.\n // although no need to fetch from the lane, still, the import is needed for main (which are available on this\n // local lane)\n const currentLaneId = this.workspace.getCurrentLaneId();\n importOptions.lanes = { laneId: currentLaneId };\n }\n }\n const importComponents = this.createImportComponents(importOptions);\n const results = await importComponents.importComponents();\n Analytics.setExtraData('num_components', results.importedIds.length);\n if (results.writtenComponents && results.writtenComponents.length) {\n await this.removeFromWorkspaceConfig(results.writtenComponents);\n }\n await consumer.onDestroy('import');\n return results;\n }\n\n /**\n * fetch objects according to the criteria set by `options` param.\n * to fetch current objects according to the current lane or main, use `this.importCurrentObjects()`.\n */\n async importObjects(options: Partial<ImportOptions> = {}): Promise<ImportResult> {\n const importOptions: ImportOptions = {\n ...options,\n objectsOnly: true,\n ids: options.ids || [],\n installNpmPackages: false,\n writeConfigFiles: false,\n };\n const importComponents = this.createImportComponents(importOptions);\n return importComponents.importComponents();\n }\n\n /**\n * given a lane object, load all components by their head on the lane, find the artifacts refs and import them from\n * the lane scope\n */\n async importHeadArtifactsFromLane(lane: Lane, ids: ComponentID[] = lane.toComponentIds(), throwIfMissing = false) {\n const laneComps = await this.scope.legacyScope.getManyConsumerComponents(ids);\n try {\n await importAllArtifactsFromLane(this.scope.legacyScope, laneComps, lane);\n } catch (err) {\n this.logger.error(`failed fetching artifacts for lane ${lane.id.toString()}`, err);\n if (throwIfMissing) throw err;\n }\n }\n\n /**\n * if on main, fetch main objects, if on lane, fetch lane objects.\n */\n async importCurrentObjects(): Promise<ImportResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const importOptions: ImportOptions = {\n ids: [],\n objectsOnly: true,\n installNpmPackages: false,\n writeConfigFiles: false,\n };\n const currentRemoteLane = await this.workspace.getCurrentRemoteLane();\n if (currentRemoteLane) {\n importOptions.lanes = { laneId: currentRemoteLane.toLaneId(), remoteLane: currentRemoteLane };\n }\n const importComponents = this.createImportComponents(importOptions);\n return importComponents.importComponents();\n }\n\n async importObjectsFromMainIfExist(ids: ComponentID[], { cache } = { cache: false }) {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(ids), {\n cache,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n });\n }\n\n /**\n * fetch lane's components and save them in the local scope.\n * once done, merge the lane object and save it as well.\n */\n async fetchLaneComponents(lane: Lane, includeUpdateDependents = false) {\n const ids = includeUpdateDependents ? lane.toComponentIdsIncludeUpdateDependents() : lane.toComponentIds();\n await this.scope.legacyScope.scopeImporter.importMany({\n ids,\n lane,\n reason: `for fetching lane ${lane.id()}`,\n });\n const { mergeLane } = await this.scope.legacyScope.sources.mergeLane(lane, true);\n const isRemoteLaneEqualsToMergedLane = lane.isEqual(mergeLane);\n await this.scope.legacyScope.lanes.saveLane(mergeLane, {\n saveLaneHistory: !isRemoteLaneEqualsToMergedLane,\n laneHistoryMsg: 'fetch (merge from remote)',\n });\n }\n\n async fetch(ids: string[], lanes: boolean, components: boolean, fromOriginalScope: boolean, allHistory = false) {\n if (!lanes && !components) {\n throw new BitError(\n `please provide the type of objects you would like to pull, the options are --components and --lanes`\n );\n }\n loader.start('fetching objects...');\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n\n if (lanes) {\n const lanesToFetch = await getLanes(this.logger);\n const shouldFetchFromMain = !ids.length || ids.includes(DEFAULT_LANE);\n return this.fetchLanes(lanesToFetch, shouldFetchFromMain, { allHistory });\n }\n\n const importOptions: ImportOptions = {\n ids,\n objectsOnly: true,\n allHistory,\n verbose: false,\n writeConfig: false,\n override: false,\n installNpmPackages: false,\n writeConfigFiles: false,\n fromOriginalScope,\n };\n\n const importComponents = this.createImportComponents(importOptions);\n const { importedIds, importDetails } = await importComponents.importComponents();\n Analytics.setExtraData('num_components', importedIds.length);\n await consumer.onDestroy('import');\n return { importedIds, importDetails };\n\n async function getLanes(logger: Logger): Promise<Lane[]> {\n let remoteLaneIds: LaneId[] = [];\n if (ids.length) {\n remoteLaneIds = ids\n .filter((id) => id !== DEFAULT_LANE)\n .map((id) => {\n const trackLane = consumer.scope.lanes.getRemoteTrackedDataByLocalLane(id);\n if (trackLane) return LaneId.from(trackLane.remoteLane, trackLane.remoteScope);\n return LaneId.parse(id);\n });\n } else {\n remoteLaneIds = await consumer.scope.objects.remoteLanes.getAllRemoteLaneIds();\n }\n const scopeComponentImporter = ScopeComponentsImporter.getInstance(consumer.scope);\n try {\n return await scopeComponentImporter.importLanes(remoteLaneIds);\n } catch (err: any) {\n if (\n err instanceof InvalidScopeName ||\n err instanceof ScopeNotFoundOrDenied ||\n err instanceof LaneNotFound ||\n err instanceof InvalidScopeNameFromRemote\n ) {\n // the lane could be a local lane so no need to throw an error in such case\n loader.stop();\n logger.console(`unable to get lane's data from a remote due to an error:\\n${err.message}`, 'warn', 'yellow');\n } else {\n throw err;\n }\n }\n\n return [];\n }\n }\n\n private createImportComponents(importOptions: ImportOptions) {\n return new ImportComponents(\n this.workspace,\n this.graph,\n this.componentWriter,\n this.envs,\n this.logger,\n this.lister,\n importOptions\n );\n }\n\n async fetchLanes(\n lanes: Lane[],\n shouldFetchFromMain?: boolean,\n options: Partial<ImportOptions> = {}\n ): Promise<ImportResult> {\n const resultFromMain = shouldFetchFromMain\n ? await this.importObjects(options)\n : { importedIds: [], importDetails: [], importedDeps: [] };\n const resultsPerLane = await pMapSeries(lanes, async (lane) => {\n this.logger.setStatusLine(`fetching lane ${lane.name}`);\n options.lanes = { laneId: lane.toLaneId(), remoteLane: lane };\n options.isLaneFromRemote = true;\n const results = await this.importObjects(options);\n this.logger.consoleSuccess();\n return results;\n });\n resultsPerLane.push(resultFromMain);\n const results = resultsPerLane.reduce((acc, curr) => {\n acc.importedIds.push(...curr.importedIds);\n acc.importDetails.push(...curr.importDetails);\n return acc;\n });\n return results;\n }\n\n /**\n * get a Lane object from the remote.\n * `persistIfNotExists` saves the object in the local scope only if the lane is not there yet.\n * otherwise, it needs some merging mechanism, which is done differently whether it's export or import.\n * see `sources.mergeLane()` for export and `import-components._saveLaneDataIfNeeded()` for import.\n * in this case, because we only bring the lane object and not the components, it's not easy to do the merge.\n */\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n const legacyScope = this.scope.legacyScope;\n const results = await legacyScope.scopeImporter.importLanes([laneId], includeLaneHistory);\n const laneObject = results[0];\n if (!laneObject) throw new LaneNotFound(laneId.scope, laneId.name);\n\n if (persistIfNotExists) {\n const exists = await legacyScope.loadLane(laneId);\n if (!exists) {\n laneObject.hasChanged = true;\n await legacyScope.lanes.saveLane(laneObject, { saveLaneHistory: false });\n }\n }\n\n return laneObject;\n }\n\n async importObjectsByHashes(hashes: string[], scope: string, reason?: string) {\n const groupByScope = { [scope]: hashes };\n const results = await this.scope.legacyScope.scopeImporter.importManyObjects(groupByScope, reason);\n return results;\n }\n\n private async removeFromWorkspaceConfig(component: ConsumerComponent[]) {\n const importedPackageNames = this.getImportedPackagesNames(component);\n const isRemoved = this.depResolver.removeFromRootPolicy(importedPackageNames);\n if (isRemoved) await this.depResolver.persistConfig('import (remove package)');\n }\n\n private getImportedPackagesNames(components: ConsumerComponent[]): string[] {\n return components.map((component) => componentIdToPackageName(component));\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DependencyResolverAspect,\n GraphAspect,\n ScopeAspect,\n ComponentWriterAspect,\n InstallAspect,\n EnvsAspect,\n LoggerAspect,\n ListerAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n depResolver,\n graph,\n scope,\n componentWriter,\n install,\n envs,\n loggerMain,\n lister,\n ]: [\n CLIMain,\n Workspace,\n DependencyResolverMain,\n GraphMain,\n ScopeMain,\n ComponentWriterMain,\n InstallMain,\n EnvsMain,\n LoggerMain,\n ListerMain\n ]) {\n const logger = loggerMain.createLogger(ImporterAspect.id);\n const importerMain = new ImporterMain(workspace, depResolver, graph, scope, componentWriter, envs, logger, lister);\n install.registerPreInstall(async (opts) => {\n if (!opts?.import) return;\n logger.setStatusLine('importing missing objects');\n await importerMain.importCurrentObjects();\n // logger.consoleSuccess();\n });\n install.registerPreLink(async (opts) => {\n if (opts?.fetchObject) await importerMain.importCurrentObjects();\n });\n cli.register(new ImportCmd(importerMain), new FetchCmd(importerMain));\n return importerMain;\n }\n}\n\nImporterAspect.addRuntime(ImporterMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,oBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,mBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA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version":3,"names":["_cli","data","require","_dependencyResolver","_workspace","_legacy","_pkgModules","_legacyBitId","_pMapSeries","_interopRequireDefault","_envs","_componentWriter","_logger","_scope","_laneId","_scopeComponentsImporter","_component","_install","_loader","_componentId","_scopeNotFoundOrDenied","_graph","_legacy2","_bitError","_import","_importer","_fetchCmd","_importComponents","_lister","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ImporterMain","constructor","workspace","depResolver","graph","scope","componentWriter","envs","logger","lister","import","importOptions","packageManagerArgs","OutsideWorkspaceError","consumer","ids","objectsOnly","isOnLane","currentRemoteLane","getCurrentRemoteLane","lanes","laneId","toLaneId","remoteLane","currentLaneId","getCurrentLaneId","importComponents","createImportComponents","results","Analytics","setExtraData","importedIds","writtenComponents","removeFromWorkspaceConfig","onDestroy","importObjects","options","installNpmPackages","writeConfigFiles","importHeadArtifactsFromLane","lane","toComponentIds","throwIfMissing","laneComps","legacyScope","getManyConsumerComponents","importAllArtifactsFromLane","err","error","id","toString","importCurrentObjects","importObjectsFromMainIfExist","cache","scopeImporter","importWithoutDeps","ComponentIdList","fromArray","includeVersionHistory","ignoreMissingHead","fetchLaneComponents","includeUpdateDependents","toComponentIdsIncludeUpdateDependents","importMany","reason","mergeLane","sources","isRemoteLaneEqualsToMergedLane","isEqual","saveLane","saveLaneHistory","laneHistoryMsg","fetch","components","fromOriginalScope","allHistory","BitError","loader","start","lanesToFetch","getLanes","shouldFetchFromMain","includes","DEFAULT_LANE","fetchLanes","verbose","writeConfig","override","importDetails","remoteLaneIds","map","trackLane","getRemoteTrackedDataByLocalLane","LaneId","from","remoteScope","parse","objects","remoteLanes","getAllRemoteLaneIds","scopeComponentImporter","ScopeComponentsImporter","getInstance","importLanes","InvalidScopeName","ScopeNotFoundOrDenied","LaneNotFound","InvalidScopeNameFromRemote","stop","console","message","ImportComponents","resultFromMain","importedDeps","resultsPerLane","pMapSeries","setStatusLine","name","isLaneFromRemote","consoleSuccess","reduce","acc","curr","importLaneObject","persistIfNotExists","includeLaneHistory","laneObject","exists","loadLane","hasChanged","importObjectsByHashes","hashes","groupByScope","importManyObjects","component","importedPackageNames","getImportedPackagesNames","isRemoved","removeFromRootPolicy","persistConfig","componentIdToPackageName","provider","cli","install","loggerMain","createLogger","ImporterAspect","importerMain","registerPreInstall","opts","registerPreLink","fetchObject","register","ImportCmd","FetchCmd","exports","CLIAspect","WorkspaceAspect","DependencyResolverAspect","GraphAspect","ScopeAspect","ComponentWriterAspect","InstallAspect","EnvsAspect","LoggerAspect","ListerAspect","MainRuntime","addRuntime"],"sources":["importer.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport { InvalidScopeName, InvalidScopeNameFromRemote } from '@teambit/legacy-bit-id';\nimport pMapSeries from 'p-map-series';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { DEFAULT_LANE, LaneId } from '@teambit/lane-id';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport { importAllArtifactsFromLane } from '@teambit/component.sources';\nimport { InstallAspect, InstallMain } from '@teambit/install';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { ScopeNotFoundOrDenied } from '@teambit/legacy/dist/remotes/exceptions/scope-not-found-or-denied';\nimport { GraphAspect, GraphMain } from '@teambit/graph';\nimport { LaneNotFound } from '@teambit/legacy.scope-api';\nimport { BitError } from '@teambit/bit-error';\nimport { ImportCmd } from './import.cmd';\nimport { ImporterAspect } from './importer.aspect';\nimport { FetchCmd } from './fetch-cmd';\nimport ImportComponents, { ImportOptions, ImportResult } from './import-components';\nimport { ListerAspect, ListerMain } from '@teambit/lister';\n\nexport class ImporterMain {\n constructor(\n private workspace: Workspace,\n private depResolver: DependencyResolverMain,\n private graph: GraphMain,\n private scope: ScopeMain,\n private componentWriter: ComponentWriterMain,\n private envs: EnvsMain,\n readonly logger: Logger,\n private lister: ListerMain\n ) {}\n\n async import(importOptions: ImportOptions, packageManagerArgs: string[] = []): Promise<ImportResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n consumer.packageManagerArgs = packageManagerArgs;\n if (!importOptions.ids.length) {\n importOptions.objectsOnly = true;\n }\n if (this.workspace.consumer.isOnLane()) {\n const currentRemoteLane = await this.workspace.getCurrentRemoteLane();\n if (currentRemoteLane) {\n importOptions.lanes = { laneId: currentRemoteLane.toLaneId(), remoteLane: currentRemoteLane };\n } else if (!importOptions.ids.length) {\n // this is probably a local lane that was never exported.\n // although no need to fetch from the lane, still, the import is needed for main (which are available on this\n // local lane)\n const currentLaneId = this.workspace.getCurrentLaneId();\n importOptions.lanes = { laneId: currentLaneId };\n }\n }\n const importComponents = this.createImportComponents(importOptions);\n const results = await importComponents.importComponents();\n Analytics.setExtraData('num_components', results.importedIds.length);\n if (results.writtenComponents && results.writtenComponents.length) {\n await this.removeFromWorkspaceConfig(results.writtenComponents);\n }\n await consumer.onDestroy('import');\n return results;\n }\n\n /**\n * fetch objects according to the criteria set by `options` param.\n * to fetch current objects according to the current lane or main, use `this.importCurrentObjects()`.\n */\n async importObjects(options: Partial<ImportOptions> = {}): Promise<ImportResult> {\n const importOptions: ImportOptions = {\n ...options,\n objectsOnly: true,\n ids: options.ids || [],\n installNpmPackages: false,\n writeConfigFiles: false,\n };\n const importComponents = this.createImportComponents(importOptions);\n return importComponents.importComponents();\n }\n\n /**\n * given a lane object, load all components by their head on the lane, find the artifacts refs and import them from\n * the lane scope\n */\n async importHeadArtifactsFromLane(lane: Lane, ids: ComponentID[] = lane.toComponentIds(), throwIfMissing = false) {\n const laneComps = await this.scope.legacyScope.getManyConsumerComponents(ids);\n try {\n await importAllArtifactsFromLane(this.scope.legacyScope, laneComps, lane);\n } catch (err) {\n this.logger.error(`failed fetching artifacts for lane ${lane.id.toString()}`, err);\n if (throwIfMissing) throw err;\n }\n }\n\n /**\n * if on main, fetch main objects, if on lane, fetch lane objects.\n */\n async importCurrentObjects(): Promise<ImportResult> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const importOptions: ImportOptions = {\n ids: [],\n objectsOnly: true,\n installNpmPackages: false,\n writeConfigFiles: false,\n };\n const currentRemoteLane = await this.workspace.getCurrentRemoteLane();\n if (currentRemoteLane) {\n importOptions.lanes = { laneId: currentRemoteLane.toLaneId(), remoteLane: currentRemoteLane };\n }\n const importComponents = this.createImportComponents(importOptions);\n return importComponents.importComponents();\n }\n\n async importObjectsFromMainIfExist(ids: ComponentID[], { cache } = { cache: false }) {\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(ids), {\n cache,\n includeVersionHistory: true,\n ignoreMissingHead: true,\n });\n }\n\n /**\n * fetch lane's components and save them in the local scope.\n * once done, merge the lane object and save it as well.\n */\n async fetchLaneComponents(lane: Lane, includeUpdateDependents = false) {\n const ids = includeUpdateDependents ? lane.toComponentIdsIncludeUpdateDependents() : lane.toComponentIds();\n await this.scope.legacyScope.scopeImporter.importMany({\n ids,\n lane,\n reason: `for fetching lane ${lane.id()}`,\n });\n const { mergeLane } = await this.scope.legacyScope.sources.mergeLane(lane, true);\n const isRemoteLaneEqualsToMergedLane = lane.isEqual(mergeLane);\n await this.scope.legacyScope.lanes.saveLane(mergeLane, {\n saveLaneHistory: !isRemoteLaneEqualsToMergedLane,\n laneHistoryMsg: 'fetch (merge from remote)',\n });\n }\n\n async fetch(ids: string[], lanes: boolean, components: boolean, fromOriginalScope: boolean, allHistory = false) {\n if (!lanes && !components) {\n throw new BitError(\n `please provide the type of objects you would like to pull, the options are --components and --lanes`\n );\n }\n loader.start('fetching objects...');\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n\n if (lanes) {\n const lanesToFetch = await getLanes(this.logger);\n const shouldFetchFromMain = !ids.length || ids.includes(DEFAULT_LANE);\n return this.fetchLanes(lanesToFetch, shouldFetchFromMain, { allHistory });\n }\n\n const importOptions: ImportOptions = {\n ids,\n objectsOnly: true,\n allHistory,\n verbose: false,\n writeConfig: false,\n override: false,\n installNpmPackages: false,\n writeConfigFiles: false,\n fromOriginalScope,\n };\n\n const importComponents = this.createImportComponents(importOptions);\n const { importedIds, importDetails } = await importComponents.importComponents();\n Analytics.setExtraData('num_components', importedIds.length);\n await consumer.onDestroy('import');\n return { importedIds, importDetails };\n\n async function getLanes(logger: Logger): Promise<Lane[]> {\n let remoteLaneIds: LaneId[] = [];\n if (ids.length) {\n remoteLaneIds = ids\n .filter((id) => id !== DEFAULT_LANE)\n .map((id) => {\n const trackLane = consumer.scope.lanes.getRemoteTrackedDataByLocalLane(id);\n if (trackLane) return LaneId.from(trackLane.remoteLane, trackLane.remoteScope);\n return LaneId.parse(id);\n });\n } else {\n remoteLaneIds = await consumer.scope.objects.remoteLanes.getAllRemoteLaneIds();\n }\n const scopeComponentImporter = ScopeComponentsImporter.getInstance(consumer.scope);\n try {\n return await scopeComponentImporter.importLanes(remoteLaneIds);\n } catch (err: any) {\n if (\n err instanceof InvalidScopeName ||\n err instanceof ScopeNotFoundOrDenied ||\n err instanceof LaneNotFound ||\n err instanceof InvalidScopeNameFromRemote\n ) {\n // the lane could be a local lane so no need to throw an error in such case\n loader.stop();\n logger.console(`unable to get lane's data from a remote due to an error:\\n${err.message}`, 'warn', 'yellow');\n } else {\n throw err;\n }\n }\n\n return [];\n }\n }\n\n private createImportComponents(importOptions: ImportOptions) {\n return new ImportComponents(\n this.workspace,\n this.graph,\n this.componentWriter,\n this.envs,\n this.logger,\n this.lister,\n importOptions\n );\n }\n\n async fetchLanes(\n lanes: Lane[],\n shouldFetchFromMain?: boolean,\n options: Partial<ImportOptions> = {}\n ): Promise<ImportResult> {\n const resultFromMain = shouldFetchFromMain\n ? await this.importObjects(options)\n : { importedIds: [], importDetails: [], importedDeps: [] };\n const resultsPerLane = await pMapSeries(lanes, async (lane) => {\n this.logger.setStatusLine(`fetching lane ${lane.name}`);\n options.lanes = { laneId: lane.toLaneId(), remoteLane: lane };\n options.isLaneFromRemote = true;\n const results = await this.importObjects(options);\n this.logger.consoleSuccess();\n return results;\n });\n resultsPerLane.push(resultFromMain);\n const results = resultsPerLane.reduce((acc, curr) => {\n acc.importedIds.push(...curr.importedIds);\n acc.importDetails.push(...curr.importDetails);\n return acc;\n });\n return results;\n }\n\n /**\n * get a Lane object from the remote.\n * `persistIfNotExists` saves the object in the local scope only if the lane is not there yet.\n * otherwise, it needs some merging mechanism, which is done differently whether it's export or import.\n * see `sources.mergeLane()` for export and `import-components._saveLaneDataIfNeeded()` for import.\n * in this case, because we only bring the lane object and not the components, it's not easy to do the merge.\n */\n async importLaneObject(laneId: LaneId, persistIfNotExists = true, includeLaneHistory = false): Promise<Lane> {\n const legacyScope = this.scope.legacyScope;\n const results = await legacyScope.scopeImporter.importLanes([laneId], includeLaneHistory);\n const laneObject = results[0];\n if (!laneObject) throw new LaneNotFound(laneId.scope, laneId.name);\n\n if (persistIfNotExists) {\n const exists = await legacyScope.loadLane(laneId);\n if (!exists) {\n laneObject.hasChanged = true;\n await legacyScope.lanes.saveLane(laneObject, { saveLaneHistory: false });\n }\n }\n\n return laneObject;\n }\n\n async importObjectsByHashes(hashes: string[], scope: string, reason?: string) {\n const groupByScope = { [scope]: hashes };\n const results = await this.scope.legacyScope.scopeImporter.importManyObjects(groupByScope, reason);\n return results;\n }\n\n private async removeFromWorkspaceConfig(component: ConsumerComponent[]) {\n const importedPackageNames = this.getImportedPackagesNames(component);\n const isRemoved = this.depResolver.removeFromRootPolicy(importedPackageNames);\n if (isRemoved) await this.depResolver.persistConfig('import (remove package)');\n }\n\n private getImportedPackagesNames(components: ConsumerComponent[]): string[] {\n return components.map((component) => componentIdToPackageName(component));\n }\n\n static slots = [];\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n DependencyResolverAspect,\n GraphAspect,\n ScopeAspect,\n ComponentWriterAspect,\n InstallAspect,\n EnvsAspect,\n LoggerAspect,\n ListerAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n cli,\n workspace,\n depResolver,\n graph,\n scope,\n componentWriter,\n install,\n envs,\n loggerMain,\n lister,\n ]: [\n CLIMain,\n Workspace,\n DependencyResolverMain,\n GraphMain,\n ScopeMain,\n ComponentWriterMain,\n InstallMain,\n EnvsMain,\n LoggerMain,\n ListerMain\n ]) {\n const logger = loggerMain.createLogger(ImporterAspect.id);\n const importerMain = new ImporterMain(workspace, depResolver, graph, scope, componentWriter, envs, logger, lister);\n install.registerPreInstall(async (opts) => {\n if (!opts?.import) return;\n logger.setStatusLine('importing missing objects');\n await importerMain.importCurrentObjects();\n // logger.consoleSuccess();\n });\n install.registerPreLink(async (opts) => {\n if (opts?.fetchObject) await importerMain.importCurrentObjects();\n });\n cli.register(new ImportCmd(importerMain), new FetchCmd(importerMain));\n return importerMain;\n }\n}\n\nImporterAspect.addRuntime(ImporterMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,oBAAA;EAAA,MAAAF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,wBAAa,EACbC,kBAAU,EACVC,sBAAY,EACZC,sBAAY,CACb;AAAArL,eAAA,CAnRUgB,YAAY,aAoRNsK,kBAAW;AAwC9BpB,0BAAc,CAACqB,UAAU,CAACvK,YAAY,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.332/dist/importer.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.332/dist/importer.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.334/dist/importer.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_importer@1.0.334/dist/importer.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];