@teambit/checkout 0.0.234 → 0.0.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkout.main.runtime.js +1 -1
- package/dist/checkout.main.runtime.js.map +1 -1
- package/package-tar/teambit-checkout-0.0.236.tgz +0 -0
- package/package.json +10 -10
- package/package-tar/teambit-checkout-0.0.234.tgz +0 -0
- /package/dist/{preview-1685272045621.js → preview-1685418569798.js} +0 -0
|
@@ -170,7 +170,6 @@ class CheckoutMain {
|
|
|
170
170
|
promptMergeOptions
|
|
171
171
|
} = checkoutProps;
|
|
172
172
|
await this.syncNewComponents(checkoutProps);
|
|
173
|
-
await this.importer.importCurrentObjects(); // important. among others, it fetches the remote lane object and its new components.
|
|
174
173
|
const bitIds = _bitId().BitIds.fromArray((ids === null || ids === void 0 ? void 0 : ids.map(id => id._legacy)) || []);
|
|
175
174
|
const {
|
|
176
175
|
components
|
|
@@ -276,6 +275,7 @@ class CheckoutMain {
|
|
|
276
275
|
this.logger.setStatusLine(_loaderMessages().BEFORE_CHECKOUT);
|
|
277
276
|
if (!this.workspace) throw new (_workspace().OutsideWorkspaceError)();
|
|
278
277
|
const consumer = this.workspace.consumer;
|
|
278
|
+
await this.importer.importCurrentObjects(); // important. among others, it fetches the remote lane object and its new components.
|
|
279
279
|
if (to === 'head') await this.makeLaneComponentsAvailableOnMain();
|
|
280
280
|
await this.parseValues(to, componentPattern, checkoutProps);
|
|
281
281
|
const checkoutResults = await this.checkout(checkoutProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CheckoutMain","constructor","workspace","logger","componentWriter","importer","remove","checkout","checkoutProps","consumer","version","ids","promptMergeOptions","syncNewComponents","importCurrentObjects","bitIds","BitIds","fromArray","map","id","_legacy","components","loadComponents","allComponentStatusBeforeMerge","Promise","all","component","getComponentStatusBeforeMergeAttempt","compsNeedMerge","filter","c","propsForMerge","compsNotNeedMerge","toImport","compStatus","idsToImport","push","changeVersion","currentlyUsedVersion","flat","scope","legacyScope","scopeImporter","importManyIfMissingWithoutDeps","getComponentsStatusOfMergeNeeded","tmp","Tmp","afterMergeAttempt","getMergeStatus","clear","err","compStatusMergeNeeded","allComponentsStatus","componentWithConflict","find","mergeResults","hasConflicts","mergeStrategy","GeneralError","toStringWithoutVersion","getMergeStrategyInteractive","failedComponents","componentStatus","failureMessage","shouldBeRemoved","unchangedLegitimately","succeededComponents","checkoutPropsLegacy","componentsResults","mapSeries","componentFromFS","applyVersion","markFilesToBeRemovedIfNeeded","componentsLegacy","compact","newFromLane","newFromLaneAdded","head","getNewComponentsFromLane","workspaceOnly","compsNewFromLane","loadComponentFromModelImportIfNeeded","leftUnresolvedConflicts","componentWriterResults","length","manyComponentsWriterOpts","skipDependencyInstallation","skipNpmInstall","verbose","resetConfig","reset","skipUpdatingBitMap","skipUpdatingBitmap","writeMany","deleteFilesIfNeeded","appliedVersionComponents","applyVersionResult","componentIdsToRemove","undefined","removeLocallyByIds","force","removedComponents","n","toString","installationError","compilationError","checkoutByCLIValues","to","componentPattern","setStatusLine","BEFORE_CHECKOUT","OutsideWorkspaceError","makeLaneComponentsAvailableOnMain","parseValues","checkoutResults","onDestroy","notExported","hasScope","changeScope","scopeComponentsImporter","importManyDeltaWithoutDeps","fromHead","error","unavailableOnMain","getUnavailableOnMainComponents","bitMap","makeComponentsAvailableOnMain","HEAD","LATEST","latest","BitId","isValidVersion","BitError","console","idsOnWorkspace","idsByPattern","listIds","currentLane","getCurrentLaneObject","currentLaneIds","toBitIds","hasWithoutVersion","lane","laneBitIds","newIds","bitId","isEqualWithoutVersion","newComponentIds","resolveMultipleComponentIds","nonRemovedNewIds","isRemoved","isComponentRemoved","headVersion","latestVersion","versionPerId","repo","objects","componentModel","getModelComponentIfExist","returnFailure","msg","unmerged","unmergedComponents","getEntry","name","getNewVersion","headIncludeRemote","newVersion","hasVersion","existingBitMapId","getBitId","ignoreVersion","divergeDataForMergePending","getDivergeDataForMergePending","isMergePending","isDiverged","currentVersionObject","loadVersion","isModified","isComponentModified","versionRef","getRef","Error","componentVersion","getObject","hash","newId","componentFromModel","baseVersion","baseComponent","otherComponent","threeWayMerge","otherLabel","currentComponent","currentLabel","provider","cli","loggerMain","compWriter","createLogger","CheckoutAspect","checkoutMain","register","CheckoutCmd","CLIAspect","WorkspaceAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","RemoveAspect","MainRuntime","addRuntime"],"sources":["checkout.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitError } from '@teambit/bit-error';\nimport { compact } from 'lodash';\nimport { BEFORE_CHECKOUT } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport RemoveAspect, { RemoveMain } from '@teambit/remove';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { HEAD, LATEST } from '@teambit/legacy/dist/constants';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport {\n FailedComponents,\n getMergeStrategyInteractive,\n MergeStrategy,\n threeWayMerge,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport mapSeries from 'p-map-series';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { Version, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { Tmp } from '@teambit/legacy/dist/scope/repositories';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { ComponentID } from '@teambit/component-id';\nimport { CheckoutCmd } from './checkout-cmd';\nimport { CheckoutAspect } from './checkout.aspect';\nimport { applyVersion, markFilesToBeRemovedIfNeeded, ComponentStatus, deleteFilesIfNeeded } from './checkout-version';\n\nexport type CheckoutProps = {\n version?: string; // if reset/head/latest is true, the version is undefined\n ids?: ComponentID[];\n head?: boolean;\n latest?: boolean;\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy | null;\n verbose?: boolean;\n skipNpmInstall?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n all?: boolean; // checkout all ids\n isLane?: boolean;\n workspaceOnly?: boolean;\n versionPerId?: ComponentID[]; // if given, the ComponentID.version is the version to checkout to.\n skipUpdatingBitmap?: boolean; // needed for stash\n};\n\nexport type ComponentStatusBeforeMergeAttempt = {\n componentFromFS?: ConsumerComponent;\n componentFromModel?: Version;\n id: BitId;\n failureMessage?: string;\n unchangedLegitimately?: boolean; // failed to checkout but for a legitimate reason, such as, up-to-date\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n propsForMerge?: {\n currentlyUsedVersion: string;\n componentModel: ModelComponent;\n };\n};\n\ntype CheckoutTo = 'head' | 'reset' | string;\n\nexport class CheckoutMain {\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private componentWriter: ComponentWriterMain,\n private importer: ImporterMain,\n private remove: RemoveMain\n ) {}\n\n async checkout(checkoutProps: CheckoutProps): Promise<ApplyVersionResults> {\n const consumer = this.workspace.consumer;\n const { version, ids, promptMergeOptions } = checkoutProps;\n await this.syncNewComponents(checkoutProps);\n await this.importer.importCurrentObjects(); // important. among others, it fetches the remote lane object and its new components.\n const bitIds = BitIds.fromArray(ids?.map((id) => id._legacy) || []);\n const { components } = await consumer.loadComponents(bitIds);\n\n const allComponentStatusBeforeMerge = await Promise.all(\n components.map((component) => this.getComponentStatusBeforeMergeAttempt(component, checkoutProps))\n );\n const compsNeedMerge = allComponentStatusBeforeMerge.filter((c) => c.propsForMerge);\n const compsNotNeedMerge = allComponentStatusBeforeMerge.filter((c) => !c.propsForMerge) as ComponentStatus[];\n\n // in case the requested versions to checkout don't exist locally, import them.\n const toImport = allComponentStatusBeforeMerge\n .map((compStatus) => {\n const idsToImport = [compStatus.id];\n if (compStatus.propsForMerge) {\n idsToImport.push(compStatus.id.changeVersion(compStatus.propsForMerge.currentlyUsedVersion));\n }\n return idsToImport;\n })\n .flat();\n await this.workspace.scope.legacyScope.scopeImporter.importManyIfMissingWithoutDeps({\n ids: BitIds.fromArray(toImport),\n });\n\n const getComponentsStatusOfMergeNeeded = async (): Promise<ComponentStatus[]> => {\n const tmp = new Tmp(consumer.scope);\n try {\n const afterMergeAttempt = await Promise.all(compsNeedMerge.map((c) => this.getMergeStatus(c)));\n await tmp.clear();\n return afterMergeAttempt;\n } catch (err: any) {\n await tmp.clear();\n throw err;\n }\n };\n\n const compStatusMergeNeeded = await getComponentsStatusOfMergeNeeded();\n\n const allComponentsStatus: ComponentStatus[] = [...compStatusMergeNeeded, ...compsNotNeedMerge];\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict) {\n if (!promptMergeOptions && !checkoutProps.mergeStrategy) {\n throw new GeneralError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--manual\" to manually merge changes or use \"--theirs / --ours\" to choose one of the conflicted versions`\n );\n }\n if (!checkoutProps.mergeStrategy) checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.failureMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n failureMessage: componentStatus.failureMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.failureMessage);\n // do not use Promise.all for applyVersion. otherwise, it'll write all components in parallel,\n // which can be an issue when some components are also dependencies of others\n const checkoutPropsLegacy = { ...checkoutProps, ids: checkoutProps.ids?.map((id) => id._legacy) };\n const componentsResults = await mapSeries(succeededComponents, ({ id, componentFromFS, mergeResults }) => {\n return applyVersion(consumer, id, componentFromFS, mergeResults, checkoutPropsLegacy);\n });\n\n markFilesToBeRemovedIfNeeded(succeededComponents, componentsResults);\n\n const componentsLegacy = compact(componentsResults.map((c) => c.component));\n\n let newFromLane: ComponentID[] | undefined;\n let newFromLaneAdded = false;\n if (checkoutProps.head) {\n newFromLane = await this.getNewComponentsFromLane(checkoutProps.ids || []);\n if (!checkoutProps.workspaceOnly) {\n const compsNewFromLane = await Promise.all(\n newFromLane.map((id) => consumer.loadComponentFromModelImportIfNeeded(id._legacy))\n );\n componentsLegacy.push(...compsNewFromLane);\n newFromLaneAdded = true;\n }\n }\n\n const leftUnresolvedConflicts = componentWithConflict && checkoutProps.mergeStrategy === 'manual';\n let componentWriterResults;\n if (componentsLegacy.length) {\n const manyComponentsWriterOpts = {\n components: componentsLegacy,\n skipDependencyInstallation: checkoutProps.skipNpmInstall || leftUnresolvedConflicts,\n verbose: checkoutProps.verbose,\n resetConfig: checkoutProps.reset,\n skipUpdatingBitMap: checkoutProps.skipUpdatingBitmap,\n };\n componentWriterResults = await this.componentWriter.writeMany(manyComponentsWriterOpts);\n await deleteFilesIfNeeded(componentsResults, consumer);\n }\n\n const appliedVersionComponents = componentsResults.map((c) => c.applyVersionResult);\n\n const componentIdsToRemove = allComponentsStatus\n .filter((componentStatus) => componentStatus.shouldBeRemoved)\n .map((c) => c.id.changeVersion(undefined));\n\n if (componentIdsToRemove.length) {\n await this.remove.removeLocallyByIds(componentIdsToRemove, { force: true });\n }\n\n return {\n components: appliedVersionComponents,\n removedComponents: componentIdsToRemove,\n version,\n failedComponents,\n leftUnresolvedConflicts,\n newFromLane: newFromLane?.map((n) => n.toString()),\n newFromLaneAdded,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n };\n }\n\n async checkoutByCLIValues(\n to: CheckoutTo,\n componentPattern: string,\n checkoutProps: CheckoutProps\n ): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(BEFORE_CHECKOUT);\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n if (to === 'head') await this.makeLaneComponentsAvailableOnMain();\n await this.parseValues(to, componentPattern, checkoutProps);\n const checkoutResults = await this.checkout(checkoutProps);\n await consumer.onDestroy();\n return checkoutResults;\n }\n\n private async syncNewComponents({ ids, head }: CheckoutProps) {\n if (!head) return;\n const notExported = ids?.filter((id) => !id._legacy.hasScope()).map((id) => id._legacy.changeScope(id.scope));\n const scopeComponentsImporter = this.workspace.consumer.scope.scopeImporter;\n try {\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: BitIds.fromArray(notExported || []),\n fromHead: true,\n });\n } catch (err) {\n // don't stop the process. it's possible that the scope doesn't exist yet because these are new components\n this.logger.error(`unable to sync new components, if these components are really new, ignore the error`, err);\n }\n }\n\n private async makeLaneComponentsAvailableOnMain() {\n const unavailableOnMain = await this.workspace.getUnavailableOnMainComponents();\n if (!unavailableOnMain.length) return;\n this.workspace.bitMap.makeComponentsAvailableOnMain(unavailableOnMain);\n }\n\n private async parseValues(to: CheckoutTo, componentPattern: string, checkoutProps: CheckoutProps) {\n if (to === HEAD) checkoutProps.head = true;\n else if (to === LATEST) checkoutProps.latest = true;\n else if (to === 'reset') checkoutProps.reset = true;\n else {\n if (!BitId.isValidVersion(to)) throw new BitError(`the specified version \"${to}\" is not a valid version`);\n checkoutProps.version = to;\n }\n if (checkoutProps.head && !componentPattern) {\n if (checkoutProps.all) {\n this.logger.console(`\"--all\" is deprecated for \"bit checkout ${HEAD}\", please omit it.`);\n }\n checkoutProps.all = true;\n }\n if (checkoutProps.latest && !componentPattern) {\n if (checkoutProps.all) {\n this.logger.console(`\"--all\" is deprecated for \"bit checkout ${LATEST}\", please omit it.`);\n }\n checkoutProps.all = true;\n }\n if (componentPattern && checkoutProps.all) {\n throw new GeneralError('please specify either [component-pattern] or --all, not both');\n }\n if (!componentPattern && !checkoutProps.all) {\n throw new GeneralError('please specify [component-pattern] or use --all flag');\n }\n if (checkoutProps.workspaceOnly && !checkoutProps.head) {\n throw new BitError(`--workspace-only flag can only be used with \"head\" (bit checkout head --workspace-only)`);\n }\n const idsOnWorkspace = componentPattern\n ? await this.workspace.idsByPattern(componentPattern)\n : await this.workspace.listIds();\n const currentLane = await this.workspace.consumer.getCurrentLaneObject();\n const currentLaneIds = currentLane?.toBitIds();\n const ids = currentLaneIds\n ? idsOnWorkspace.filter((id) => currentLaneIds.hasWithoutVersion(id._legacy))\n : idsOnWorkspace;\n checkoutProps.ids = ids.map((id) => (checkoutProps.head || checkoutProps.latest ? id.changeVersion(LATEST) : id));\n }\n\n private async getNewComponentsFromLane(ids: ComponentID[]): Promise<ComponentID[]> {\n // current lane object is up to date due to the previous `importCurrentObjects()` call\n const lane = await this.workspace.consumer.getCurrentLaneObject();\n if (!lane) {\n return [];\n }\n const laneBitIds = lane.toBitIds();\n const newIds = laneBitIds.filter((bitId) => !ids.find((id) => id._legacy.isEqualWithoutVersion(bitId)));\n const newComponentIds = await this.workspace.resolveMultipleComponentIds(newIds);\n const nonRemovedNewIds: ComponentID[] = [];\n await Promise.all(\n newComponentIds.map(async (id) => {\n const isRemoved = await this.workspace.scope.isComponentRemoved(id);\n if (!isRemoved) nonRemovedNewIds.push(id);\n })\n );\n return nonRemovedNewIds;\n }\n\n private async getComponentStatusBeforeMergeAttempt(\n component: ConsumerComponent,\n checkoutProps: CheckoutProps\n ): Promise<ComponentStatusBeforeMergeAttempt> {\n const consumer = this.workspace.consumer;\n const { version, head: headVersion, reset, latest: latestVersion, versionPerId } = checkoutProps;\n const repo = consumer.scope.objects;\n const componentModel = await consumer.scope.getModelComponentIfExist(component.id);\n const componentStatus: ComponentStatusBeforeMergeAttempt = { id: component.id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.failureMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n if (!componentModel) {\n return returnFailure(`component ${component.id.toString()} is new, no version to checkout`, true);\n }\n const unmerged = repo.unmergedComponents.getEntry(component.name);\n if (!reset && unmerged) {\n return returnFailure(\n `component ${component.id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`\n );\n }\n const getNewVersion = async (): Promise<string> => {\n if (reset) return component.id.version as string;\n\n if (headVersion) return componentModel.headIncludeRemote(repo);\n if (latestVersion) return componentModel.latestVersion();\n if (versionPerId)\n return versionPerId.find((id) => id._legacy.isEqualWithoutVersion(component.id))?.version as string;\n\n // @ts-ignore if !reset the version is defined\n return version;\n };\n const newVersion = await getNewVersion();\n if (version && !headVersion) {\n const hasVersion = await componentModel.hasVersion(version, repo);\n if (!hasVersion)\n return returnFailure(`component ${component.id.toStringWithoutVersion()} doesn't have version ${version}`);\n }\n const existingBitMapId = consumer.bitMap.getBitId(component.id, { ignoreVersion: true });\n const currentlyUsedVersion = existingBitMapId.version;\n if (!currentlyUsedVersion) {\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is new`);\n }\n if (version && currentlyUsedVersion === version) {\n // it won't be relevant for 'reset' as it doesn't have a version\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is already at version ${version}`, true);\n }\n if (headVersion && currentlyUsedVersion === newVersion) {\n return returnFailure(\n `component ${component.id.toStringWithoutVersion()} is already at the latest version, which is ${newVersion}`,\n true\n );\n }\n if (!reset) {\n const divergeDataForMergePending = await componentModel.getDivergeDataForMergePending(repo);\n const isMergePending = divergeDataForMergePending.isDiverged();\n if (isMergePending) {\n return returnFailure(`component is merge-pending and cannot be checked out, run \"bit status\" for more info`);\n }\n }\n const currentVersionObject: Version = await componentModel.loadVersion(currentlyUsedVersion, repo);\n const isModified = await consumer.isComponentModified(currentVersionObject, component);\n if (!isModified && reset) {\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is not modified`, true);\n }\n\n const versionRef = componentModel.getRef(newVersion);\n if (!versionRef) throw new Error(`unable to get ref ${newVersion} from ${componentModel.id()}`);\n const componentVersion = (await consumer.scope.getObject(versionRef.hash)) as Version | undefined;\n if (componentVersion?.isRemoved() && existingBitMapId) {\n componentStatus.shouldBeRemoved = true;\n return returnFailure(`component has been removed`, true);\n }\n\n const newId = component.id.changeVersion(newVersion);\n\n if (reset || !isModified) {\n // if the component is not modified, no need to try merge the files, they will be written later on according to the\n // checked out version. same thing when no version is specified, it'll be reset to the model-version later.\n return { componentFromFS: component, componentFromModel: componentVersion, id: newId };\n }\n\n const propsForMerge = {\n currentlyUsedVersion,\n componentModel,\n };\n\n return { componentFromFS: component, componentFromModel: componentVersion, id: newId, propsForMerge };\n }\n\n private async getMergeStatus({\n componentFromFS,\n componentFromModel,\n id,\n propsForMerge,\n }: ComponentStatusBeforeMergeAttempt): Promise<ComponentStatus> {\n if (!propsForMerge) throw new Error(`propsForMerge is missing for ${id.toString()}`);\n if (!componentFromFS) throw new Error(`componentFromFS is missing for ${id.toString()}`);\n const consumer = this.workspace.consumer;\n const repo = consumer.scope.objects;\n const { currentlyUsedVersion, componentModel } = propsForMerge;\n\n // this is tricky. imagine the user is 0.0.2+modification and wants to checkout to 0.0.1.\n // the base is 0.0.1, as it's the common version for 0.0.1 and 0.0.2. however, if we let git merge-file use the 0.0.1\n // as the base, then, it'll get the changes done since 0.0.1 to 0.0.1, which is nothing, and put them on top of\n // 0.0.2+modification. in other words, it won't make any change.\n // this scenario of checking out while there are modified files, is forbidden in Git. here, we want to simulate a similar\n // experience of \"git stash\", then \"git checkout\", then \"git stash pop\". practically, we want the changes done on 0.0.2\n // to be added to 0.0.1\n // if there is no modification, it doesn't go the threeWayMerge anyway, so it doesn't matter what the base is.\n const baseVersion = currentlyUsedVersion;\n const newVersion = id.version as string;\n const baseComponent: Version = await componentModel.loadVersion(baseVersion, repo);\n const otherComponent: Version = await componentModel.loadVersion(newVersion, repo);\n const mergeResults = await threeWayMerge({\n consumer,\n otherComponent,\n otherLabel: newVersion,\n currentComponent: componentFromFS,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n\n return { componentFromFS, componentFromModel, id, mergeResults };\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, ComponentWriterAspect, ImporterAspect, RemoveAspect];\n\n static runtime = MainRuntime;\n\n static async provider([cli, workspace, loggerMain, compWriter, importer, remove]: [\n CLIMain,\n Workspace,\n LoggerMain,\n ComponentWriterMain,\n ImporterMain,\n RemoveMain\n ]) {\n const logger = loggerMain.createLogger(CheckoutAspect.id);\n const checkoutMain = new CheckoutMain(workspace, logger, compWriter, importer, remove);\n cli.register(new CheckoutCmd(checkoutMain));\n return checkoutMain;\n }\n}\n\nCheckoutAspect.addRuntime(CheckoutMain);\n\nexport default CheckoutMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsH;AAAA;AAAA;AAAA;AAkC/G,M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;IAClF,MAAMpG,YAAY,GAAG,MAAM,IAAAwI,6BAAa,EAAC;MACvCtL,QAAQ;MACRqL,cAAc;MACdE,UAAU,EAAEzB,UAAU;MACtB0B,gBAAgB,EAAE3H,eAAe;MACjC4H,YAAY,EAAG,GAAE5J,oBAAqB,WAAU;MAChDuJ;IACF,CAAC,CAAC;IAEF,OAAO;MAAEvH,eAAe;MAAEqH,kBAAkB;MAAExK,EAAE;MAAEoC;IAAa,CAAC;EAClE;EAOA,aAAa4I,QAAQ,CAAC,CAACC,GAAG,EAAElM,SAAS,EAAEmM,UAAU,EAAEC,UAAU,EAAEjM,QAAQ,EAAEC,MAAM,CAO9E,EAAE;IACD,MAAMH,MAAM,GAAGkM,UAAU,CAACE,YAAY,CAACC,0BAAc,CAACrL,EAAE,CAAC;IACzD,MAAMsL,YAAY,GAAG,IAAIzM,YAAY,CAACE,SAAS,EAAEC,MAAM,EAAEmM,UAAU,EAAEjM,QAAQ,EAAEC,MAAM,CAAC;IACtF8L,GAAG,CAACM,QAAQ,CAAC,KAAIC,0BAAW,EAACF,YAAY,CAAC,CAAC;IAC3C,OAAOA,YAAY;EACrB;AACF;AAAC;AAAA,gCAvXYzM,YAAY,WAqWR,EAAE;AAAA,gCArWNA,YAAY,kBAsWD,CAAC4M,gBAAS,EAAEC,oBAAe,EAAEC,sBAAY,EAAEC,wCAAqB,EAAEC,mBAAc,EAAEC,iBAAY,CAAC;AAAA,gCAtW1GjN,YAAY,aAwWNkN,kBAAW;AAiB9BV,0BAAc,CAACW,UAAU,CAACnN,YAAY,CAAC;AAAC,eAEzBA,YAAY;AAAA"}
|
|
1
|
+
{"version":3,"names":["CheckoutMain","constructor","workspace","logger","componentWriter","importer","remove","checkout","checkoutProps","consumer","version","ids","promptMergeOptions","syncNewComponents","bitIds","BitIds","fromArray","map","id","_legacy","components","loadComponents","allComponentStatusBeforeMerge","Promise","all","component","getComponentStatusBeforeMergeAttempt","compsNeedMerge","filter","c","propsForMerge","compsNotNeedMerge","toImport","compStatus","idsToImport","push","changeVersion","currentlyUsedVersion","flat","scope","legacyScope","scopeImporter","importManyIfMissingWithoutDeps","getComponentsStatusOfMergeNeeded","tmp","Tmp","afterMergeAttempt","getMergeStatus","clear","err","compStatusMergeNeeded","allComponentsStatus","componentWithConflict","find","mergeResults","hasConflicts","mergeStrategy","GeneralError","toStringWithoutVersion","getMergeStrategyInteractive","failedComponents","componentStatus","failureMessage","shouldBeRemoved","unchangedLegitimately","succeededComponents","checkoutPropsLegacy","componentsResults","mapSeries","componentFromFS","applyVersion","markFilesToBeRemovedIfNeeded","componentsLegacy","compact","newFromLane","newFromLaneAdded","head","getNewComponentsFromLane","workspaceOnly","compsNewFromLane","loadComponentFromModelImportIfNeeded","leftUnresolvedConflicts","componentWriterResults","length","manyComponentsWriterOpts","skipDependencyInstallation","skipNpmInstall","verbose","resetConfig","reset","skipUpdatingBitMap","skipUpdatingBitmap","writeMany","deleteFilesIfNeeded","appliedVersionComponents","applyVersionResult","componentIdsToRemove","undefined","removeLocallyByIds","force","removedComponents","n","toString","installationError","compilationError","checkoutByCLIValues","to","componentPattern","setStatusLine","BEFORE_CHECKOUT","OutsideWorkspaceError","importCurrentObjects","makeLaneComponentsAvailableOnMain","parseValues","checkoutResults","onDestroy","notExported","hasScope","changeScope","scopeComponentsImporter","importManyDeltaWithoutDeps","fromHead","error","unavailableOnMain","getUnavailableOnMainComponents","bitMap","makeComponentsAvailableOnMain","HEAD","LATEST","latest","BitId","isValidVersion","BitError","console","idsOnWorkspace","idsByPattern","listIds","currentLane","getCurrentLaneObject","currentLaneIds","toBitIds","hasWithoutVersion","lane","laneBitIds","newIds","bitId","isEqualWithoutVersion","newComponentIds","resolveMultipleComponentIds","nonRemovedNewIds","isRemoved","isComponentRemoved","headVersion","latestVersion","versionPerId","repo","objects","componentModel","getModelComponentIfExist","returnFailure","msg","unmerged","unmergedComponents","getEntry","name","getNewVersion","headIncludeRemote","newVersion","hasVersion","existingBitMapId","getBitId","ignoreVersion","divergeDataForMergePending","getDivergeDataForMergePending","isMergePending","isDiverged","currentVersionObject","loadVersion","isModified","isComponentModified","versionRef","getRef","Error","componentVersion","getObject","hash","newId","componentFromModel","baseVersion","baseComponent","otherComponent","threeWayMerge","otherLabel","currentComponent","currentLabel","provider","cli","loggerMain","compWriter","createLogger","CheckoutAspect","checkoutMain","register","CheckoutCmd","CLIAspect","WorkspaceAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","RemoveAspect","MainRuntime","addRuntime"],"sources":["checkout.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WorkspaceAspect, { OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { BitError } from '@teambit/bit-error';\nimport { compact } from 'lodash';\nimport { BEFORE_CHECKOUT } from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport RemoveAspect, { RemoveMain } from '@teambit/remove';\nimport { ApplyVersionResults } from '@teambit/merging';\nimport ImporterAspect, { ImporterMain } from '@teambit/importer';\nimport { HEAD, LATEST } from '@teambit/legacy/dist/constants';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport {\n FailedComponents,\n getMergeStrategyInteractive,\n MergeStrategy,\n threeWayMerge,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport mapSeries from 'p-map-series';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { Version, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { Tmp } from '@teambit/legacy/dist/scope/repositories';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { ComponentID } from '@teambit/component-id';\nimport { CheckoutCmd } from './checkout-cmd';\nimport { CheckoutAspect } from './checkout.aspect';\nimport { applyVersion, markFilesToBeRemovedIfNeeded, ComponentStatus, deleteFilesIfNeeded } from './checkout-version';\n\nexport type CheckoutProps = {\n version?: string; // if reset/head/latest is true, the version is undefined\n ids?: ComponentID[];\n head?: boolean;\n latest?: boolean;\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy | null;\n verbose?: boolean;\n skipNpmInstall?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n all?: boolean; // checkout all ids\n isLane?: boolean;\n workspaceOnly?: boolean;\n versionPerId?: ComponentID[]; // if given, the ComponentID.version is the version to checkout to.\n skipUpdatingBitmap?: boolean; // needed for stash\n};\n\nexport type ComponentStatusBeforeMergeAttempt = {\n componentFromFS?: ConsumerComponent;\n componentFromModel?: Version;\n id: BitId;\n failureMessage?: string;\n unchangedLegitimately?: boolean; // failed to checkout but for a legitimate reason, such as, up-to-date\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n propsForMerge?: {\n currentlyUsedVersion: string;\n componentModel: ModelComponent;\n };\n};\n\ntype CheckoutTo = 'head' | 'reset' | string;\n\nexport class CheckoutMain {\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private componentWriter: ComponentWriterMain,\n private importer: ImporterMain,\n private remove: RemoveMain\n ) {}\n\n async checkout(checkoutProps: CheckoutProps): Promise<ApplyVersionResults> {\n const consumer = this.workspace.consumer;\n const { version, ids, promptMergeOptions } = checkoutProps;\n await this.syncNewComponents(checkoutProps);\n const bitIds = BitIds.fromArray(ids?.map((id) => id._legacy) || []);\n const { components } = await consumer.loadComponents(bitIds);\n\n const allComponentStatusBeforeMerge = await Promise.all(\n components.map((component) => this.getComponentStatusBeforeMergeAttempt(component, checkoutProps))\n );\n const compsNeedMerge = allComponentStatusBeforeMerge.filter((c) => c.propsForMerge);\n const compsNotNeedMerge = allComponentStatusBeforeMerge.filter((c) => !c.propsForMerge) as ComponentStatus[];\n\n // in case the requested versions to checkout don't exist locally, import them.\n const toImport = allComponentStatusBeforeMerge\n .map((compStatus) => {\n const idsToImport = [compStatus.id];\n if (compStatus.propsForMerge) {\n idsToImport.push(compStatus.id.changeVersion(compStatus.propsForMerge.currentlyUsedVersion));\n }\n return idsToImport;\n })\n .flat();\n await this.workspace.scope.legacyScope.scopeImporter.importManyIfMissingWithoutDeps({\n ids: BitIds.fromArray(toImport),\n });\n\n const getComponentsStatusOfMergeNeeded = async (): Promise<ComponentStatus[]> => {\n const tmp = new Tmp(consumer.scope);\n try {\n const afterMergeAttempt = await Promise.all(compsNeedMerge.map((c) => this.getMergeStatus(c)));\n await tmp.clear();\n return afterMergeAttempt;\n } catch (err: any) {\n await tmp.clear();\n throw err;\n }\n };\n\n const compStatusMergeNeeded = await getComponentsStatusOfMergeNeeded();\n\n const allComponentsStatus: ComponentStatus[] = [...compStatusMergeNeeded, ...compsNotNeedMerge];\n const componentWithConflict = allComponentsStatus.find(\n (component) => component.mergeResults && component.mergeResults.hasConflicts\n );\n if (componentWithConflict) {\n if (!promptMergeOptions && !checkoutProps.mergeStrategy) {\n throw new GeneralError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--manual\" to manually merge changes or use \"--theirs / --ours\" to choose one of the conflicted versions`\n );\n }\n if (!checkoutProps.mergeStrategy) checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.failureMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n failureMessage: componentStatus.failureMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.failureMessage);\n // do not use Promise.all for applyVersion. otherwise, it'll write all components in parallel,\n // which can be an issue when some components are also dependencies of others\n const checkoutPropsLegacy = { ...checkoutProps, ids: checkoutProps.ids?.map((id) => id._legacy) };\n const componentsResults = await mapSeries(succeededComponents, ({ id, componentFromFS, mergeResults }) => {\n return applyVersion(consumer, id, componentFromFS, mergeResults, checkoutPropsLegacy);\n });\n\n markFilesToBeRemovedIfNeeded(succeededComponents, componentsResults);\n\n const componentsLegacy = compact(componentsResults.map((c) => c.component));\n\n let newFromLane: ComponentID[] | undefined;\n let newFromLaneAdded = false;\n if (checkoutProps.head) {\n newFromLane = await this.getNewComponentsFromLane(checkoutProps.ids || []);\n if (!checkoutProps.workspaceOnly) {\n const compsNewFromLane = await Promise.all(\n newFromLane.map((id) => consumer.loadComponentFromModelImportIfNeeded(id._legacy))\n );\n componentsLegacy.push(...compsNewFromLane);\n newFromLaneAdded = true;\n }\n }\n\n const leftUnresolvedConflicts = componentWithConflict && checkoutProps.mergeStrategy === 'manual';\n let componentWriterResults;\n if (componentsLegacy.length) {\n const manyComponentsWriterOpts = {\n components: componentsLegacy,\n skipDependencyInstallation: checkoutProps.skipNpmInstall || leftUnresolvedConflicts,\n verbose: checkoutProps.verbose,\n resetConfig: checkoutProps.reset,\n skipUpdatingBitMap: checkoutProps.skipUpdatingBitmap,\n };\n componentWriterResults = await this.componentWriter.writeMany(manyComponentsWriterOpts);\n await deleteFilesIfNeeded(componentsResults, consumer);\n }\n\n const appliedVersionComponents = componentsResults.map((c) => c.applyVersionResult);\n\n const componentIdsToRemove = allComponentsStatus\n .filter((componentStatus) => componentStatus.shouldBeRemoved)\n .map((c) => c.id.changeVersion(undefined));\n\n if (componentIdsToRemove.length) {\n await this.remove.removeLocallyByIds(componentIdsToRemove, { force: true });\n }\n\n return {\n components: appliedVersionComponents,\n removedComponents: componentIdsToRemove,\n version,\n failedComponents,\n leftUnresolvedConflicts,\n newFromLane: newFromLane?.map((n) => n.toString()),\n newFromLaneAdded,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n };\n }\n\n async checkoutByCLIValues(\n to: CheckoutTo,\n componentPattern: string,\n checkoutProps: CheckoutProps\n ): Promise<ApplyVersionResults> {\n this.logger.setStatusLine(BEFORE_CHECKOUT);\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer = this.workspace.consumer;\n await this.importer.importCurrentObjects(); // important. among others, it fetches the remote lane object and its new components.\n if (to === 'head') await this.makeLaneComponentsAvailableOnMain();\n await this.parseValues(to, componentPattern, checkoutProps);\n const checkoutResults = await this.checkout(checkoutProps);\n await consumer.onDestroy();\n return checkoutResults;\n }\n\n private async syncNewComponents({ ids, head }: CheckoutProps) {\n if (!head) return;\n const notExported = ids?.filter((id) => !id._legacy.hasScope()).map((id) => id._legacy.changeScope(id.scope));\n const scopeComponentsImporter = this.workspace.consumer.scope.scopeImporter;\n try {\n await scopeComponentsImporter.importManyDeltaWithoutDeps({\n ids: BitIds.fromArray(notExported || []),\n fromHead: true,\n });\n } catch (err) {\n // don't stop the process. it's possible that the scope doesn't exist yet because these are new components\n this.logger.error(`unable to sync new components, if these components are really new, ignore the error`, err);\n }\n }\n\n private async makeLaneComponentsAvailableOnMain() {\n const unavailableOnMain = await this.workspace.getUnavailableOnMainComponents();\n if (!unavailableOnMain.length) return;\n this.workspace.bitMap.makeComponentsAvailableOnMain(unavailableOnMain);\n }\n\n private async parseValues(to: CheckoutTo, componentPattern: string, checkoutProps: CheckoutProps) {\n if (to === HEAD) checkoutProps.head = true;\n else if (to === LATEST) checkoutProps.latest = true;\n else if (to === 'reset') checkoutProps.reset = true;\n else {\n if (!BitId.isValidVersion(to)) throw new BitError(`the specified version \"${to}\" is not a valid version`);\n checkoutProps.version = to;\n }\n if (checkoutProps.head && !componentPattern) {\n if (checkoutProps.all) {\n this.logger.console(`\"--all\" is deprecated for \"bit checkout ${HEAD}\", please omit it.`);\n }\n checkoutProps.all = true;\n }\n if (checkoutProps.latest && !componentPattern) {\n if (checkoutProps.all) {\n this.logger.console(`\"--all\" is deprecated for \"bit checkout ${LATEST}\", please omit it.`);\n }\n checkoutProps.all = true;\n }\n if (componentPattern && checkoutProps.all) {\n throw new GeneralError('please specify either [component-pattern] or --all, not both');\n }\n if (!componentPattern && !checkoutProps.all) {\n throw new GeneralError('please specify [component-pattern] or use --all flag');\n }\n if (checkoutProps.workspaceOnly && !checkoutProps.head) {\n throw new BitError(`--workspace-only flag can only be used with \"head\" (bit checkout head --workspace-only)`);\n }\n const idsOnWorkspace = componentPattern\n ? await this.workspace.idsByPattern(componentPattern)\n : await this.workspace.listIds();\n const currentLane = await this.workspace.consumer.getCurrentLaneObject();\n const currentLaneIds = currentLane?.toBitIds();\n const ids = currentLaneIds\n ? idsOnWorkspace.filter((id) => currentLaneIds.hasWithoutVersion(id._legacy))\n : idsOnWorkspace;\n checkoutProps.ids = ids.map((id) => (checkoutProps.head || checkoutProps.latest ? id.changeVersion(LATEST) : id));\n }\n\n private async getNewComponentsFromLane(ids: ComponentID[]): Promise<ComponentID[]> {\n // current lane object is up to date due to the previous `importCurrentObjects()` call\n const lane = await this.workspace.consumer.getCurrentLaneObject();\n if (!lane) {\n return [];\n }\n const laneBitIds = lane.toBitIds();\n const newIds = laneBitIds.filter((bitId) => !ids.find((id) => id._legacy.isEqualWithoutVersion(bitId)));\n const newComponentIds = await this.workspace.resolveMultipleComponentIds(newIds);\n const nonRemovedNewIds: ComponentID[] = [];\n await Promise.all(\n newComponentIds.map(async (id) => {\n const isRemoved = await this.workspace.scope.isComponentRemoved(id);\n if (!isRemoved) nonRemovedNewIds.push(id);\n })\n );\n return nonRemovedNewIds;\n }\n\n private async getComponentStatusBeforeMergeAttempt(\n component: ConsumerComponent,\n checkoutProps: CheckoutProps\n ): Promise<ComponentStatusBeforeMergeAttempt> {\n const consumer = this.workspace.consumer;\n const { version, head: headVersion, reset, latest: latestVersion, versionPerId } = checkoutProps;\n const repo = consumer.scope.objects;\n const componentModel = await consumer.scope.getModelComponentIfExist(component.id);\n const componentStatus: ComponentStatusBeforeMergeAttempt = { id: component.id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.failureMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n if (!componentModel) {\n return returnFailure(`component ${component.id.toString()} is new, no version to checkout`, true);\n }\n const unmerged = repo.unmergedComponents.getEntry(component.name);\n if (!reset && unmerged) {\n return returnFailure(\n `component ${component.id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`\n );\n }\n const getNewVersion = async (): Promise<string> => {\n if (reset) return component.id.version as string;\n\n if (headVersion) return componentModel.headIncludeRemote(repo);\n if (latestVersion) return componentModel.latestVersion();\n if (versionPerId)\n return versionPerId.find((id) => id._legacy.isEqualWithoutVersion(component.id))?.version as string;\n\n // @ts-ignore if !reset the version is defined\n return version;\n };\n const newVersion = await getNewVersion();\n if (version && !headVersion) {\n const hasVersion = await componentModel.hasVersion(version, repo);\n if (!hasVersion)\n return returnFailure(`component ${component.id.toStringWithoutVersion()} doesn't have version ${version}`);\n }\n const existingBitMapId = consumer.bitMap.getBitId(component.id, { ignoreVersion: true });\n const currentlyUsedVersion = existingBitMapId.version;\n if (!currentlyUsedVersion) {\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is new`);\n }\n if (version && currentlyUsedVersion === version) {\n // it won't be relevant for 'reset' as it doesn't have a version\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is already at version ${version}`, true);\n }\n if (headVersion && currentlyUsedVersion === newVersion) {\n return returnFailure(\n `component ${component.id.toStringWithoutVersion()} is already at the latest version, which is ${newVersion}`,\n true\n );\n }\n if (!reset) {\n const divergeDataForMergePending = await componentModel.getDivergeDataForMergePending(repo);\n const isMergePending = divergeDataForMergePending.isDiverged();\n if (isMergePending) {\n return returnFailure(`component is merge-pending and cannot be checked out, run \"bit status\" for more info`);\n }\n }\n const currentVersionObject: Version = await componentModel.loadVersion(currentlyUsedVersion, repo);\n const isModified = await consumer.isComponentModified(currentVersionObject, component);\n if (!isModified && reset) {\n return returnFailure(`component ${component.id.toStringWithoutVersion()} is not modified`, true);\n }\n\n const versionRef = componentModel.getRef(newVersion);\n if (!versionRef) throw new Error(`unable to get ref ${newVersion} from ${componentModel.id()}`);\n const componentVersion = (await consumer.scope.getObject(versionRef.hash)) as Version | undefined;\n if (componentVersion?.isRemoved() && existingBitMapId) {\n componentStatus.shouldBeRemoved = true;\n return returnFailure(`component has been removed`, true);\n }\n\n const newId = component.id.changeVersion(newVersion);\n\n if (reset || !isModified) {\n // if the component is not modified, no need to try merge the files, they will be written later on according to the\n // checked out version. same thing when no version is specified, it'll be reset to the model-version later.\n return { componentFromFS: component, componentFromModel: componentVersion, id: newId };\n }\n\n const propsForMerge = {\n currentlyUsedVersion,\n componentModel,\n };\n\n return { componentFromFS: component, componentFromModel: componentVersion, id: newId, propsForMerge };\n }\n\n private async getMergeStatus({\n componentFromFS,\n componentFromModel,\n id,\n propsForMerge,\n }: ComponentStatusBeforeMergeAttempt): Promise<ComponentStatus> {\n if (!propsForMerge) throw new Error(`propsForMerge is missing for ${id.toString()}`);\n if (!componentFromFS) throw new Error(`componentFromFS is missing for ${id.toString()}`);\n const consumer = this.workspace.consumer;\n const repo = consumer.scope.objects;\n const { currentlyUsedVersion, componentModel } = propsForMerge;\n\n // this is tricky. imagine the user is 0.0.2+modification and wants to checkout to 0.0.1.\n // the base is 0.0.1, as it's the common version for 0.0.1 and 0.0.2. however, if we let git merge-file use the 0.0.1\n // as the base, then, it'll get the changes done since 0.0.1 to 0.0.1, which is nothing, and put them on top of\n // 0.0.2+modification. in other words, it won't make any change.\n // this scenario of checking out while there are modified files, is forbidden in Git. here, we want to simulate a similar\n // experience of \"git stash\", then \"git checkout\", then \"git stash pop\". practically, we want the changes done on 0.0.2\n // to be added to 0.0.1\n // if there is no modification, it doesn't go the threeWayMerge anyway, so it doesn't matter what the base is.\n const baseVersion = currentlyUsedVersion;\n const newVersion = id.version as string;\n const baseComponent: Version = await componentModel.loadVersion(baseVersion, repo);\n const otherComponent: Version = await componentModel.loadVersion(newVersion, repo);\n const mergeResults = await threeWayMerge({\n consumer,\n otherComponent,\n otherLabel: newVersion,\n currentComponent: componentFromFS,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n\n return { componentFromFS, componentFromModel, id, mergeResults };\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, ComponentWriterAspect, ImporterAspect, RemoveAspect];\n\n static runtime = MainRuntime;\n\n static async provider([cli, workspace, loggerMain, compWriter, importer, remove]: [\n CLIMain,\n Workspace,\n LoggerMain,\n ComponentWriterMain,\n ImporterMain,\n RemoveMain\n ]) {\n const logger = loggerMain.createLogger(CheckoutAspect.id);\n const checkoutMain = new CheckoutMain(workspace, logger, compWriter, importer, remove);\n cli.register(new CheckoutCmd(checkoutMain));\n return checkoutMain;\n }\n}\n\nCheckoutAspect.addRuntime(CheckoutMain);\n\nexport default CheckoutMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAMA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsH;A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EAAEZ,IAAI,CAAC;IAClF,MAAMrG,YAAY,GAAG,MAAM,IAAAyI,6BAAa,EAAC;MACvCtL,QAAQ;MACRqL,cAAc;MACdE,UAAU,EAAEzB,UAAU;MACtB0B,gBAAgB,EAAE5H,eAAe;MACjC6H,YAAY,EAAG,GAAE7J,oBAAqB,WAAU;MAChDwJ;IACF,CAAC,CAAC;IAEF,OAAO;MAAExH,eAAe;MAAEsH,kBAAkB;MAAEzK,EAAE;MAAEoC;IAAa,CAAC;EAClE;EAOA,aAAa6I,QAAQ,CAAC,CAACC,GAAG,EAAElM,SAAS,EAAEmM,UAAU,EAAEC,UAAU,EAAEjM,QAAQ,EAAEC,MAAM,CAO9E,EAAE;IACD,MAAMH,MAAM,GAAGkM,UAAU,CAACE,YAAY,CAACC,0BAAc,CAACtL,EAAE,CAAC;IACzD,MAAMuL,YAAY,GAAG,IAAIzM,YAAY,CAACE,SAAS,EAAEC,MAAM,EAAEmM,UAAU,EAAEjM,QAAQ,EAAEC,MAAM,CAAC;IACtF8L,GAAG,CAACM,QAAQ,CAAC,KAAIC,0BAAW,EAACF,YAAY,CAAC,CAAC;IAC3C,OAAOA,YAAY;EACrB;AACF;AAAC;AAAA,gCAvXYzM,YAAY,WAqWR,EAAE;AAAA,gCArWNA,YAAY,kBAsWD,CAAC4M,gBAAS,EAAEC,oBAAe,EAAEC,sBAAY,EAAEC,wCAAqB,EAAEC,mBAAc,EAAEC,iBAAY,CAAC;AAAA,gCAtW1GjN,YAAY,aAwWNkN,kBAAW;AAiB9BV,0BAAc,CAACW,UAAU,CAACnN,YAAY,CAAC;AAAC,eAEzBA,YAAY;AAAA"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/checkout",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.236",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/checkout",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "checkout",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.236"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"@teambit/legacy-bit-id": "0.0.423",
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
19
|
"@teambit/component-id": "0.0.427",
|
|
20
|
-
"@teambit/cli": "0.0.
|
|
21
|
-
"@teambit/merging": "0.0.
|
|
20
|
+
"@teambit/cli": "0.0.720",
|
|
21
|
+
"@teambit/merging": "0.0.382",
|
|
22
22
|
"@teambit/bit-error": "0.0.402",
|
|
23
|
-
"@teambit/component-writer": "0.0.
|
|
24
|
-
"@teambit/importer": "0.0.
|
|
25
|
-
"@teambit/logger": "0.0.
|
|
26
|
-
"@teambit/remove": "0.0.
|
|
27
|
-
"@teambit/workspace": "0.0.
|
|
23
|
+
"@teambit/component-writer": "0.0.103",
|
|
24
|
+
"@teambit/importer": "0.0.496",
|
|
25
|
+
"@teambit/logger": "0.0.813",
|
|
26
|
+
"@teambit/remove": "0.0.244",
|
|
27
|
+
"@teambit/workspace": "0.0.1067"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/lodash": "4.14.165",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@teambit/legacy": "1.0.
|
|
39
|
+
"@teambit/legacy": "1.0.500",
|
|
40
40
|
"react": "^16.8.0 || ^17.0.0",
|
|
41
41
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
42
42
|
},
|
|
Binary file
|
|
File without changes
|