@teambit/checkout 1.0.510 → 1.0.512
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/artifacts/__bit_junit.xml +3 -3
- package/dist/checkout-version.d.ts +1 -1
- package/dist/checkout-version.js.map +1 -1
- package/dist/checkout.main.runtime.d.ts +1 -1
- package/dist/checkout.main.runtime.js +4 -4
- package/dist/checkout.main.runtime.js.map +1 -1
- package/package.json +22 -22
- package/artifacts/schema.json +0 -5552
- /package/dist/{preview-1736705249371.js → preview-1736824735631.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="3" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.component/checkout@1.0.
|
|
3
|
+
<testsuite name="teambit.component/checkout@1.0.512" tests="3" failures="0" errors="0" skipped="0">
|
|
4
4
|
<testcase classname="dist/checkout.spec.js" name="should bring the files back"/>
|
|
5
|
-
<testcase classname="dist/checkout.spec.js" name="the workspace should get the component as a valid component" time="
|
|
6
|
-
<testcase classname="dist/checkout.spec.js" name="should checkout according to the number of generations specified" time="0.
|
|
5
|
+
<testcase classname="dist/checkout.spec.js" name="the workspace should get the component as a valid component" time="1.036"/>
|
|
6
|
+
<testcase classname="dist/checkout.spec.js" name="should checkout according to the number of generations specified" time="0.012"/>
|
|
7
7
|
</testsuite>
|
|
8
8
|
</testsuites>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Consumer } from '@teambit/legacy.consumer';
|
|
2
2
|
import { ComponentID } from '@teambit/component-id';
|
|
3
|
-
import { Version } from '@teambit/
|
|
3
|
+
import { Version } from '@teambit/objects';
|
|
4
4
|
import { SourceFile } from '@teambit/component.sources';
|
|
5
5
|
import { ConsumerComponent } from '@teambit/legacy.consumer-component';
|
|
6
6
|
import { ApplyVersionResult, FilesStatus, MergeStrategy, MergeResultsThreeWay } from '@teambit/merging';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["path","data","_interopRequireWildcard","require","_component","_legacy","_bitError","_chalk","_interopRequireDefault","_merging","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","forceOurs","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","BitError","updateFileStatus","undefined","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","isExistOnFs","getComponentIdIfExist","ignoreVersion","filePathsFromFS","dataToPersist","DataToPersist","filename","removed","removePath","RemovePath","persistAllToFS","componentFiles","map","clone","manual","filePath","normalize","foundFile","componentFile","conflict","from","output","merged","isBinaryConflict","fsFile","binaryConflict","addFiles","m","added","deletedConflictFiles","removeFiles","remainDeletedFiles","remainDeleted","deletedConflict","overrideFiles","overridden","updatedFiles","content","throwForFailures","allComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","failedComponent","chalk","bold","red","join"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport { Version } from '@teambit/scope.objects';\nimport { SourceFile, RemovePath, DataToPersist } from '@teambit/component.sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy.utils';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n MergeResultsThreeWay,\n} from '@teambit/merging';\nimport { CheckoutProps } from './checkout.main.runtime';\n\nexport type ComponentStatusBase = {\n currentComponent?: ConsumerComponent;\n componentFromModel?: Version;\n id: ComponentID;\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n unchangedMessage?: string; // this gets populated either upon skip or failure.\n unchangedLegitimately?: boolean; // true for skipped legitimately (e.g. already up to date). false for failure.\n};\n\nexport type ComponentStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null | undefined;\n};\n\nexport type ApplyVersionWithComps = {\n applyVersionResult: ApplyVersionResult;\n component?: ConsumerComponent;\n // in case the component needs to be written to the filesystem, this is the component to write.\n legacyCompToWrite?: ConsumerComponent;\n};\n\n/**\n * This function optionally returns \"component\" object. If it returns, it means it needs to be written to the filesystem.\n * Otherwise, it means the component is already up to date and no need to write it.\n *\n * If no need to change anything (ours), then don't return the component object.\n * Otherwise, either return the component object as is (if no conflicts or \"theirs\"), or change the files in this\n * component object. Later, this component object is written to the filesystem.\n *\n * 1) when the files are modified with conflicts and the strategy is \"ours\", or forceOurs was used, leave the FS as is.\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", or forceTheirs was used, write the\n * component according to \"component\" object\n *\n * 3) when files are modified with no conflict or files are modified with conflicts and the\n * strategy is manual, load the component according to id.version and update component.files.\n * applyModifiedVersion() docs explains what files are updated/added.\n *\n * Side note:\n * Deleted file => if files are in used version but not in the modified one, no need to delete it. (similar to git).\n * Added file => if files are not in used version but in the modified one, they'll be under mergeResults.addFiles\n */\nexport async function applyVersion(\n consumer: Consumer,\n id: ComponentID,\n componentFromFS: ConsumerComponent | null | undefined, // it can be null only when isLanes is true\n mergeResults: MergeResultsThreeWay | null | undefined,\n checkoutProps: CheckoutProps\n): Promise<ApplyVersionWithComps> {\n if (!checkoutProps.isLane && !componentFromFS)\n throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n const { mergeStrategy, forceOurs } = checkoutProps;\n let filesStatus = {};\n if ((mergeResults?.hasConflicts && mergeStrategy === MergeOptions.ours) || forceOurs) {\n // even when isLane is true, the mergeResults is possible only when the component is on the filesystem\n // otherwise it's impossible to have conflicts\n if (!componentFromFS) throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n componentFromFS.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n consumer.bitMap.updateComponentId(id);\n return { applyVersionResult: { id, filesStatus } };\n }\n const component = await consumer.loadComponentFromModelImportIfNeeded(id);\n const componentMap = componentFromFS && componentFromFS.componentMap;\n if (componentFromFS && !componentMap) throw new BitError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, consumer, componentFromFS || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n filesStatus = { ...filesStatus, ...modifiedStatus };\n component.files = modifiedFiles;\n }\n\n // in case of forceTheirs, the mergeResults is undefined, the \"component\" object is according to \"theirs\", so it'll work\n // expected. (later, it writes the component object).\n\n return {\n applyVersionResult: { id, filesStatus },\n component,\n };\n}\n\nexport function updateFileStatus(files: SourceFile[], filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n files.forEach((file) => {\n const fileFromFs = componentFromFS?.files.find((f) => f.relative === file.relative);\n // @ts-ignore should be fixed after upgrading @types/node from '12.20.4' to > 20\n const areFilesEqual = fileFromFs && Buffer.compare(fileFromFs.contents, file.contents) === 0;\n // @ts-ignore\n filesStatus[pathNormalizeToLinux(file.relative)] = areFilesEqual ? FileStatus.unchanged : FileStatus.updated;\n });\n}\n\n/**\n * when files exist on the filesystem but not on the checked out versions, they need to be deleted.\n * without this function, these files would be left on the filesystem. (we don't delete the comp-dir before writing).\n * this needs to be done *before* the component is written to the filesystem, otherwise, it won't work when a file\n * has a case change. e.g. from uppercase to lowercase. (see merge-lane.e2e 'renaming files from uppercase to lowercase').\n */\nexport async function removeFilesIfNeeded(\n filesStatus: FilesStatus,\n consumer: Consumer,\n componentFromFS?: ConsumerComponent\n) {\n if (!componentFromFS) return;\n // @todo: if the component is not in the FS, it should be passed as undefined here.\n // in the case this is coming from merge-lane, it's sometimes populated from the scope.\n const isExistOnFs = consumer.bitMap.getComponentIdIfExist(componentFromFS.id, { ignoreVersion: true });\n if (!isExistOnFs) return;\n const filePathsFromFS = componentFromFS.files || [];\n const dataToPersist = new DataToPersist();\n filePathsFromFS.forEach((file) => {\n const filename = pathNormalizeToLinux(file.relative);\n if (!filesStatus[filename]) {\n // @ts-ignore todo: typescript has a good point here. it should be the string \"removed\", not chalk.green(removed).\n filesStatus[filename] = FileStatus.removed;\n }\n if (filesStatus[filename] === FileStatus.removed) {\n dataToPersist.removePath(new RemovePath(file.path));\n }\n });\n await dataToPersist.persistAllToFS();\n}\n\n/**\n * relevant only when\n * 1) there is no conflict => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.output.\n * 2) there is conflict and mergeStrategy is manual => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.conflict.\n *\n * this function only updates the files content, it doesn't write the files\n */\nexport function applyModifiedVersion(\n componentFiles: SourceFile[],\n mergeResults: MergeResultsThreeWay,\n mergeStrategy: MergeStrategy | null | undefined\n): { filesStatus: Record<string, any>; modifiedFiles: SourceFile[] } {\n let modifiedFiles = componentFiles.map((file) => file.clone());\n const filesStatus = {};\n if (mergeResults.hasConflicts && mergeStrategy !== MergeOptions.manual) {\n return { filesStatus, modifiedFiles };\n }\n mergeResults.modifiedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n if (file.conflict) {\n foundFile.contents = Buffer.from(file.conflict);\n filesStatus[file.filePath] = FileStatus.manual;\n } else if (typeof file.output === 'string') {\n foundFile.contents = Buffer.from(file.output);\n filesStatus[file.filePath] = FileStatus.merged;\n } else if (file.isBinaryConflict) {\n // leave the file as is and notify the user later about it.\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.binaryConflict;\n } else {\n throw new BitError(`file ${filePath} does not have output nor conflict`);\n }\n });\n\n mergeResults.addFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n if (!file.fsFile) return;\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.removeFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n filesStatus[file.filePath] = FileStatus.removed;\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n });\n mergeResults.remainDeletedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n filesStatus[file.filePath] = FileStatus.remainDeleted;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n filesStatus[file.filePath] = FileStatus.deletedConflict;\n });\n\n mergeResults.overrideFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.overridden;\n });\n mergeResults.updatedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.content;\n filesStatus[file.filePath] = FileStatus.updated;\n });\n\n return { filesStatus, modifiedFiles };\n}\n\nexport function throwForFailures(allComponentsStatus: ComponentStatusBase[]) {\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to proceed due to the following failures:\\n${failureMsgs}`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAO,sBAAA,CAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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":3,"names":["path","data","_interopRequireWildcard","require","_component","_legacy","_bitError","_chalk","_interopRequireDefault","_merging","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","forceOurs","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","BitError","updateFileStatus","undefined","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","isExistOnFs","getComponentIdIfExist","ignoreVersion","filePathsFromFS","dataToPersist","DataToPersist","filename","removed","removePath","RemovePath","persistAllToFS","componentFiles","map","clone","manual","filePath","normalize","foundFile","componentFile","conflict","from","output","merged","isBinaryConflict","fsFile","binaryConflict","addFiles","m","added","deletedConflictFiles","removeFiles","remainDeletedFiles","remainDeleted","deletedConflict","overrideFiles","overridden","updatedFiles","content","throwForFailures","allComponentsStatus","failedComponents","c","unchangedMessage","unchangedLegitimately","failureMsgs","failedComponent","chalk","bold","red","join"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy.consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport { Version } from '@teambit/objects';\nimport { SourceFile, RemovePath, DataToPersist } from '@teambit/component.sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy.utils';\nimport { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n MergeResultsThreeWay,\n} from '@teambit/merging';\nimport { CheckoutProps } from './checkout.main.runtime';\n\nexport type ComponentStatusBase = {\n currentComponent?: ConsumerComponent;\n componentFromModel?: Version;\n id: ComponentID;\n shouldBeRemoved?: boolean; // in case the component is soft-removed, it should be removed from the workspace\n unchangedMessage?: string; // this gets populated either upon skip or failure.\n unchangedLegitimately?: boolean; // true for skipped legitimately (e.g. already up to date). false for failure.\n};\n\nexport type ComponentStatus = ComponentStatusBase & {\n mergeResults?: MergeResultsThreeWay | null | undefined;\n};\n\nexport type ApplyVersionWithComps = {\n applyVersionResult: ApplyVersionResult;\n component?: ConsumerComponent;\n // in case the component needs to be written to the filesystem, this is the component to write.\n legacyCompToWrite?: ConsumerComponent;\n};\n\n/**\n * This function optionally returns \"component\" object. If it returns, it means it needs to be written to the filesystem.\n * Otherwise, it means the component is already up to date and no need to write it.\n *\n * If no need to change anything (ours), then don't return the component object.\n * Otherwise, either return the component object as is (if no conflicts or \"theirs\"), or change the files in this\n * component object. Later, this component object is written to the filesystem.\n *\n * 1) when the files are modified with conflicts and the strategy is \"ours\", or forceOurs was used, leave the FS as is.\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", or forceTheirs was used, write the\n * component according to \"component\" object\n *\n * 3) when files are modified with no conflict or files are modified with conflicts and the\n * strategy is manual, load the component according to id.version and update component.files.\n * applyModifiedVersion() docs explains what files are updated/added.\n *\n * Side note:\n * Deleted file => if files are in used version but not in the modified one, no need to delete it. (similar to git).\n * Added file => if files are not in used version but in the modified one, they'll be under mergeResults.addFiles\n */\nexport async function applyVersion(\n consumer: Consumer,\n id: ComponentID,\n componentFromFS: ConsumerComponent | null | undefined, // it can be null only when isLanes is true\n mergeResults: MergeResultsThreeWay | null | undefined,\n checkoutProps: CheckoutProps\n): Promise<ApplyVersionWithComps> {\n if (!checkoutProps.isLane && !componentFromFS)\n throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n const { mergeStrategy, forceOurs } = checkoutProps;\n let filesStatus = {};\n if ((mergeResults?.hasConflicts && mergeStrategy === MergeOptions.ours) || forceOurs) {\n // even when isLane is true, the mergeResults is possible only when the component is on the filesystem\n // otherwise it's impossible to have conflicts\n if (!componentFromFS) throw new Error(`applyVersion expect to get componentFromFS for ${id.toString()}`);\n componentFromFS.files.forEach((file) => {\n filesStatus[pathNormalizeToLinux(file.relative)] = FileStatus.unchanged;\n });\n consumer.bitMap.updateComponentId(id);\n return { applyVersionResult: { id, filesStatus } };\n }\n const component = await consumer.loadComponentFromModelImportIfNeeded(id);\n const componentMap = componentFromFS && componentFromFS.componentMap;\n if (componentFromFS && !componentMap) throw new BitError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, consumer, componentFromFS || undefined);\n\n if (mergeResults) {\n // update files according to the merge results\n const { filesStatus: modifiedStatus, modifiedFiles } = applyModifiedVersion(files, mergeResults, mergeStrategy);\n filesStatus = { ...filesStatus, ...modifiedStatus };\n component.files = modifiedFiles;\n }\n\n // in case of forceTheirs, the mergeResults is undefined, the \"component\" object is according to \"theirs\", so it'll work\n // expected. (later, it writes the component object).\n\n return {\n applyVersionResult: { id, filesStatus },\n component,\n };\n}\n\nexport function updateFileStatus(files: SourceFile[], filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n files.forEach((file) => {\n const fileFromFs = componentFromFS?.files.find((f) => f.relative === file.relative);\n // @ts-ignore should be fixed after upgrading @types/node from '12.20.4' to > 20\n const areFilesEqual = fileFromFs && Buffer.compare(fileFromFs.contents, file.contents) === 0;\n // @ts-ignore\n filesStatus[pathNormalizeToLinux(file.relative)] = areFilesEqual ? FileStatus.unchanged : FileStatus.updated;\n });\n}\n\n/**\n * when files exist on the filesystem but not on the checked out versions, they need to be deleted.\n * without this function, these files would be left on the filesystem. (we don't delete the comp-dir before writing).\n * this needs to be done *before* the component is written to the filesystem, otherwise, it won't work when a file\n * has a case change. e.g. from uppercase to lowercase. (see merge-lane.e2e 'renaming files from uppercase to lowercase').\n */\nexport async function removeFilesIfNeeded(\n filesStatus: FilesStatus,\n consumer: Consumer,\n componentFromFS?: ConsumerComponent\n) {\n if (!componentFromFS) return;\n // @todo: if the component is not in the FS, it should be passed as undefined here.\n // in the case this is coming from merge-lane, it's sometimes populated from the scope.\n const isExistOnFs = consumer.bitMap.getComponentIdIfExist(componentFromFS.id, { ignoreVersion: true });\n if (!isExistOnFs) return;\n const filePathsFromFS = componentFromFS.files || [];\n const dataToPersist = new DataToPersist();\n filePathsFromFS.forEach((file) => {\n const filename = pathNormalizeToLinux(file.relative);\n if (!filesStatus[filename]) {\n // @ts-ignore todo: typescript has a good point here. it should be the string \"removed\", not chalk.green(removed).\n filesStatus[filename] = FileStatus.removed;\n }\n if (filesStatus[filename] === FileStatus.removed) {\n dataToPersist.removePath(new RemovePath(file.path));\n }\n });\n await dataToPersist.persistAllToFS();\n}\n\n/**\n * relevant only when\n * 1) there is no conflict => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.output.\n * 2) there is conflict and mergeStrategy is manual => add files from mergeResults: addFiles, overrideFiles and modifiedFiles.conflict.\n *\n * this function only updates the files content, it doesn't write the files\n */\nexport function applyModifiedVersion(\n componentFiles: SourceFile[],\n mergeResults: MergeResultsThreeWay,\n mergeStrategy: MergeStrategy | null | undefined\n): { filesStatus: Record<string, any>; modifiedFiles: SourceFile[] } {\n let modifiedFiles = componentFiles.map((file) => file.clone());\n const filesStatus = {};\n if (mergeResults.hasConflicts && mergeStrategy !== MergeOptions.manual) {\n return { filesStatus, modifiedFiles };\n }\n mergeResults.modifiedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n if (file.conflict) {\n foundFile.contents = Buffer.from(file.conflict);\n filesStatus[file.filePath] = FileStatus.manual;\n } else if (typeof file.output === 'string') {\n foundFile.contents = Buffer.from(file.output);\n filesStatus[file.filePath] = FileStatus.merged;\n } else if (file.isBinaryConflict) {\n // leave the file as is and notify the user later about it.\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.binaryConflict;\n } else {\n throw new BitError(`file ${filePath} does not have output nor conflict`);\n }\n });\n\n mergeResults.addFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n if (!file.fsFile) return;\n const filePath: PathOsBased = path.normalize(file.filePath);\n if (modifiedFiles.find((m) => m.relative === filePath)) return;\n modifiedFiles.push(file.fsFile);\n filesStatus[file.filePath] = FileStatus.added;\n });\n mergeResults.removeFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n filesStatus[file.filePath] = FileStatus.removed;\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n });\n mergeResults.remainDeletedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n modifiedFiles = modifiedFiles.filter((f) => f.relative !== filePath);\n filesStatus[file.filePath] = FileStatus.remainDeleted;\n });\n mergeResults.deletedConflictFiles.forEach((file) => {\n filesStatus[file.filePath] = FileStatus.deletedConflict;\n });\n\n mergeResults.overrideFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.fsFile.contents;\n filesStatus[file.filePath] = FileStatus.overridden;\n });\n mergeResults.updatedFiles.forEach((file) => {\n const filePath: PathOsBased = path.normalize(file.filePath);\n const foundFile = modifiedFiles.find((componentFile) => componentFile.relative === filePath);\n if (!foundFile) throw new BitError(`file ${filePath} not found`);\n foundFile.contents = file.content;\n filesStatus[file.filePath] = FileStatus.updated;\n });\n\n return { filesStatus, modifiedFiles };\n}\n\nexport function throwForFailures(allComponentsStatus: ComponentStatusBase[]) {\n const failedComponents = allComponentsStatus.filter((c) => c.unchangedMessage && !c.unchangedLegitimately);\n if (failedComponents.length) {\n const failureMsgs = failedComponents\n .map(\n (failedComponent) =>\n `${chalk.bold(failedComponent.id.toString())} - ${chalk.red(failedComponent.unchangedMessage as string)}`\n )\n .join('\\n');\n throw new BitError(`unable to proceed due to the following failures:\\n${failureMsgs}`);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAO,sBAAA,CAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAO0B,SAAAO,uBAAAE,CAAA,WAAAA,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ambit/merging';
|
|
|
6
6
|
import { ImporterMain } from '@teambit/importer';
|
|
7
7
|
import { ComponentWriterMain } from '@teambit/component-writer';
|
|
8
8
|
import { ComponentID } from '@teambit/component-id';
|
|
9
|
-
import { ModelComponent, Lane } from '@teambit/
|
|
9
|
+
import { ModelComponent, Lane } from '@teambit/objects';
|
|
10
10
|
import { ComponentStatusBase } from './checkout-version';
|
|
11
11
|
import { ComponentMap } from '@teambit/legacy.bit-map';
|
|
12
12
|
export type CheckoutProps = {
|
|
@@ -88,9 +88,9 @@ function _componentId() {
|
|
|
88
88
|
};
|
|
89
89
|
return data;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const data = require("@teambit/
|
|
93
|
-
|
|
91
|
+
function _objects() {
|
|
92
|
+
const data = require("@teambit/objects");
|
|
93
|
+
_objects = function () {
|
|
94
94
|
return data;
|
|
95
95
|
};
|
|
96
96
|
return data;
|
|
@@ -309,7 +309,7 @@ class CheckoutMain {
|
|
|
309
309
|
ignoreVersion: true
|
|
310
310
|
});
|
|
311
311
|
if (existingId) return;
|
|
312
|
-
const modelComponent =
|
|
312
|
+
const modelComponent = _objects().ModelComponent.fromBitId(id);
|
|
313
313
|
const repo = this.workspace.scope.legacyScope.objects;
|
|
314
314
|
const consumerComp = await modelComponent.toConsumerComponent(id.version, id.scope, repo);
|
|
315
315
|
const newCompId = _componentId().ComponentID.fromObject({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_logger","_workspace","_bitError","_lodash","_remove","_merging","_importer","_legacy","_componentWriter","_pMapSeries","_interopRequireDefault","_componentId","_scope","_legacy2","_legacy3","_checkoutCmd","_checkout","_checkoutVersion","_revertCmd","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","CheckoutMain","constructor","workspace","logger","componentWriter","importer","remove","checkout","checkoutProps","inInstallContext","consumer","version","ids","promptMergeOptions","syncNewComponents","addedComponents","restoreMissingComponents","newComponents","addNewComponents","bitIds","ComponentIdList","fromArray","map","id","allComponentStatusBeforeMerge","mapSeries","getComponentStatusBeforeMergeAttempt","compsNeedMerge","c","propsForMerge","compsNotNeedMerge","toImport","compStatus","idsToImport","changeVersion","currentlyUsedVersion","flat","scope","legacyScope","scopeImporter","importWithoutDeps","cache","lane","getComponentsStatusOfMergeNeeded","tmp","Tmp","afterMergeAttempt","Promise","all","getMergeStatus","clear","err","compStatusMergeNeeded","allComponentsStatus","componentWithConflict","find","component","mergeResults","hasConflicts","mergeStrategy","BitError","toStringWithoutVersion","getMergeStrategyInteractive","throwForFailures","failedComponents","componentStatus","unchangedMessage","shouldBeRemoved","unchangedLegitimately","succeededComponents","checkoutPropsLegacy","componentsResults","currentComponent","applyVersion","componentsLegacy","compact","newFromLane","newFromLaneAdded","head","getNewComponentsFromLane","workspaceOnly","compsNewFromLane","loadComponentFromModelImportIfNeeded","leftUnresolvedConflicts","componentWriterResults","manyComponentsWriterOpts","components","skipDependencyInstallation","skipNpmInstall","verbose","resetConfig","reset","skipUpdatingBitMap","skipUpdatingBitmap","revert","shouldUpdateWorkspaceConfig","reasonForBitmapChange","writeMany","appliedVersionComponents","applyVersionResult","componentIdsToRemove","undefined","removeLocallyByIds","force","reasonForRemoval","removedComponents","n","toString","workspaceConfigUpdateResult","installationError","compilationError","missing","bitMapEntry","bitMap","getBitmapEntry","ignoreVersion","noFilesError","ComponentNotFoundInPath","comps","getMany","state","_consumer","stashedBitmapEntries","newBitmapEntries","entry","defaultScope","newComps","bitmapEntry","existingId","getBitmapEntryIfExist","modelComponent","ModelComponent","fromBitId","repo","objects","consumerComp","toConsumerComponent","newCompId","ComponentID","fromObject","name","fullName","writeToPath","rootDir","addComponent","componentId","files","f","basename","relativePath","relative","test","mainFile","config","triggerOnComponentAdd","compile","write","checkoutByCLIValues","componentPattern","setStatusLine","OutsideWorkspaceError","importCurrentObjects","makeLaneComponentsAvailableOnMain","parseValues","checkoutResults","onDestroy","notExported","isExported","changeScope","scopeComponentsImporter","toVersionLatest","reason","includeUnexported","error","unavailableOnMain","getUnavailableOnMainComponents","makeComponentsAvailableOnMain","console","HEAD","latest","LATEST","includeLocallyDeleted","getIds","idsByPattern","includeDeleted","listIdsIncludeRemoved","listIds","idsOnWorkspace","currentLane","getCurrentLaneObject","currentLaneIds","toComponentIds","hasWithoutVersion","laneBitIds","newComponentIds","bitId","isEqualWithoutVersion","nonRemovedNewIds","isRemoved","isComponentRemoved","headVersion","ancestor","main","latestVersion","versionPerId","forceOurs","forceTheirs","loadStash","existingBitMapId","getComponentIdIfExist","getComponent","results","loadComponents","allowAddingComponentsFromScope","componentModel","getModelComponentIfExist","returnFailure","msg","unmerged","unmergedComponents","getEntry","getNewVersion","headIncludeRemote","previousParent","getRefOfAncestor","getTagOfRefIfExists","latestVersionIfExist","newVersion","hasVersion","divergeDataForMergePending","getDivergeDataForMergePending","isMergePending","isDiverged","isModified","currentVersionObject","loadVersion","isComponentModified","versionRef","getRef","Error","componentVersion","getObject","hash","newId","componentFromModel","componentFromFS","baseVersion","baseComponent","otherComponent","parents","parent","threeWayMerge","otherLabel","currentLabel","provider","cli","loggerMain","compWriter","createLogger","CheckoutAspect","checkoutMain","register","CheckoutCmd","RevertCmd","exports","CLIAspect","WorkspaceAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","RemoveAspect","MainRuntime","addRuntime","_default"],"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 { BitError } from '@teambit/bit-error';\nimport { compact } from 'lodash';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport {\n ApplyVersionResults,\n FailedComponents,\n threeWayMerge,\n getMergeStrategyInteractive,\n MergeStrategy,\n} from '@teambit/merging';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { HEAD, LATEST } from '@teambit/legacy.constants';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport mapSeries from 'p-map-series';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Version, ModelComponent, Lane } from '@teambit/scope.objects';\nimport { Tmp } from '@teambit/legacy.scope';\nimport { ComponentNotFoundInPath } from '@teambit/legacy.consumer-component';\nimport { CheckoutCmd } from './checkout-cmd';\nimport { CheckoutAspect } from './checkout.aspect';\nimport { applyVersion, ComponentStatus, ComponentStatusBase, throwForFailures } from './checkout-version';\nimport { RevertCmd } from './revert-cmd';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\n\nexport type CheckoutProps = {\n version?: string; // if reset/head/latest is true, the version is undefined\n ids?: ComponentID[];\n head?: boolean;\n ancestor?: number; // how many generations to go backward\n latest?: boolean;\n main?: boolean; // relevant for \"revert\" only\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy; // strategy to use in case of conflicts\n forceOurs?: boolean; // regardless of conflicts, use ours\n forceTheirs?: boolean; // regardless of conflicts, use theirs\n verbose?: boolean;\n skipNpmInstall?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n revert?: boolean; // change the files according to the given version, but don't change the bitmap version and don't try to merge\n all?: boolean; // checkout all ids\n isLane?: boolean;\n lane?: Lane; // currently needed for \"bit switch\" to tell the \"fetch\" where to fetch from\n workspaceOnly?: boolean;\n versionPerId?: ComponentID[]; // if given, the ComponentID.version is the version to checkout to.\n skipUpdatingBitmap?: boolean; // needed for stash\n loadStash?: boolean;\n stashedBitmapEntries?: Array<Partial<ComponentMap>>;\n restoreMissingComponents?: boolean; // in case .bitmap has a component and it's missing from the workspace, restore it (from model)\n allowAddingComponentsFromScope?: boolean; // in case the id doesn't exist in .bitmap, add it from the scope (relevant for switch)\n includeLocallyDeleted?: boolean; // include components that were deleted locally. currently enabled for \"bit checkout reset\" only.\n};\n\nexport type ComponentStatusBeforeMergeAttempt = ComponentStatusBase & {\n propsForMerge?: {\n currentlyUsedVersion: string;\n componentModel: ModelComponent;\n };\n};\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 this.workspace.inInstallContext = true;\n const consumer = this.workspace.consumer;\n const { version, ids, promptMergeOptions } = checkoutProps;\n await this.syncNewComponents(checkoutProps);\n const addedComponents = await this.restoreMissingComponents(checkoutProps);\n const newComponents = await this.addNewComponents(checkoutProps);\n const bitIds = ComponentIdList.fromArray(ids?.map((id) => id) || []);\n // don't use Promise.all, it loads the components and this operation must be in sequence.\n const allComponentStatusBeforeMerge = await mapSeries(bitIds, (id) =>\n this.getComponentStatusBeforeMergeAttempt(id, 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\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(toImport), {\n cache: true,\n lane: checkoutProps.lane,\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, checkoutProps)));\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 BitError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--auto-merge-resolve\" with 'manual', 'ours' or 'theirs' to resolve the conflict/s`\n );\n }\n if (!checkoutProps.mergeStrategy) checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n\n throwForFailures(allComponentsStatus);\n\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.unchangedMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n unchangedMessage: componentStatus.unchangedMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.unchangedMessage);\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) };\n const componentsResults = await mapSeries(succeededComponents, ({ id, currentComponent, mergeResults }) => {\n return applyVersion(consumer, id, currentComponent, mergeResults, checkoutPropsLegacy);\n });\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))\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 || checkoutProps.revert,\n shouldUpdateWorkspaceConfig: true,\n reasonForBitmapChange: 'checkout',\n mergeStrategy: checkoutProps.mergeStrategy,\n };\n componentWriterResults = await this.componentWriter.writeMany(manyComponentsWriterOpts);\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, reasonForRemoval: 'checkout' });\n }\n\n return {\n components: appliedVersionComponents,\n removedComponents: componentIdsToRemove,\n addedComponents,\n newComponents,\n version,\n failedComponents,\n leftUnresolvedConflicts,\n newFromLane: newFromLane?.map((n) => n.toString()),\n newFromLaneAdded,\n workspaceConfigUpdateResult: componentWriterResults?.workspaceConfigUpdateResult,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n };\n }\n\n /**\n * if .bitmap entry exists but the rootDir is missing from the filesystem, find the component in the scope and restore it.\n * returns the restored component ids.\n */\n async restoreMissingComponents(checkoutProps: CheckoutProps): Promise<ComponentID[] | undefined> {\n if (checkoutProps.reset) {\n checkoutProps.restoreMissingComponents = true;\n }\n if (!checkoutProps.restoreMissingComponents) return undefined;\n const ids = checkoutProps.ids || [];\n const missing: ComponentID[] = [];\n await Promise.all(\n ids.map(async (id) => {\n const bitMapEntry = this.workspace.bitMap.getBitmapEntry(id, { ignoreVersion: true });\n if (bitMapEntry.noFilesError && bitMapEntry.noFilesError instanceof ComponentNotFoundInPath) {\n delete bitMapEntry.noFilesError;\n missing.push(id);\n }\n })\n );\n if (!missing.length) return undefined;\n const comps = await this.workspace.scope.getMany(missing);\n await this.componentWriter.writeMany({\n components: comps.map((c) => c.state._consumer),\n skipDependencyInstallation: true,\n skipUpdatingBitMap: true,\n });\n\n return missing;\n }\n\n async addNewComponents(checkoutProps: CheckoutProps): Promise<undefined | ComponentID[]> {\n const stashedBitmapEntries = checkoutProps.stashedBitmapEntries;\n if (!stashedBitmapEntries) return;\n const newBitmapEntries = stashedBitmapEntries.filter((entry) => entry.defaultScope);\n if (!newBitmapEntries.length) return;\n const newComps = await mapSeries(newBitmapEntries, async (bitmapEntry) => {\n const id = bitmapEntry.id!;\n const existingId = this.workspace.bitMap.getBitmapEntryIfExist(id, { ignoreVersion: true });\n if (existingId) return;\n const modelComponent = ModelComponent.fromBitId(id);\n const repo = this.workspace.scope.legacyScope.objects;\n const consumerComp = await modelComponent.toConsumerComponent(id.version, id.scope, repo);\n const newCompId = ComponentID.fromObject({ name: id.fullName }, bitmapEntry.defaultScope!);\n await this.componentWriter.writeMany({\n components: [consumerComp],\n skipDependencyInstallation: true,\n writeToPath: bitmapEntry.rootDir,\n skipUpdatingBitMap: true,\n });\n\n this.workspace.consumer.bitMap.addComponent({\n componentId: newCompId,\n files: consumerComp.files.map((f) => ({\n name: f.basename,\n relativePath: f.relative,\n test: f.test,\n })),\n mainFile: bitmapEntry.mainFile!,\n config: bitmapEntry.config,\n defaultScope: bitmapEntry.defaultScope,\n });\n await this.workspace.triggerOnComponentAdd(newCompId, { compile: true });\n return newCompId;\n });\n await this.workspace.bitMap.write();\n return compact(newComps);\n }\n\n async checkoutByCLIValues(componentPattern: string, checkoutProps: CheckoutProps): Promise<ApplyVersionResults> {\n const { revert, head } = checkoutProps;\n this.logger.setStatusLine(revert ? 'reverting components...' : 'switching component version...');\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 (head) await this.makeLaneComponentsAvailableOnMain();\n await this.parseValues(componentPattern, checkoutProps);\n const checkoutResults = await this.checkout(checkoutProps);\n await consumer.onDestroy(`checkout (${componentPattern})`);\n return checkoutResults;\n }\n\n private async syncNewComponents({ ids, head }: CheckoutProps) {\n if (!head) return;\n const notExported = ids?.filter((id) => !this.workspace.isExported(id)).map((id) => id.changeScope(id.scope));\n const scopeComponentsImporter = this.workspace.consumer.scope.scopeImporter;\n try {\n await scopeComponentsImporter.importWithoutDeps(ComponentIdList.fromArray(notExported || []).toVersionLatest(), {\n cache: false,\n reason: 'for making sure the new components are really new and are not out-of-sync',\n includeUnexported: 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(componentPattern: string, checkoutProps: CheckoutProps) {\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 BitError('please specify either [component-pattern] or --all, not both');\n }\n if (!componentPattern && !checkoutProps.all) {\n throw new BitError('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 if (checkoutProps.reset || checkoutProps.head) {\n checkoutProps.includeLocallyDeleted = true;\n }\n\n const getIds = async () => {\n if (componentPattern) {\n return this.workspace.idsByPattern(componentPattern, true, {\n includeDeleted: checkoutProps.includeLocallyDeleted,\n });\n }\n return checkoutProps.includeLocallyDeleted ? this.workspace.listIdsIncludeRemoved() : this.workspace.listIds();\n };\n\n const idsOnWorkspace = await getIds();\n\n const currentLane = await this.workspace.consumer.getCurrentLaneObject();\n const currentLaneIds = currentLane?.toComponentIds();\n // when no ids were given and the user is on a lane, return lane-ids only.\n // it's relevant for cases like \"bit checkout head\" when on a lane to not checkout main components. (see https://github.com/teambit/bit/pull/6853)\n const ids =\n currentLaneIds && !componentPattern\n ? idsOnWorkspace.filter((id) => currentLaneIds.hasWithoutVersion(id))\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.toComponentIds();\n const newComponentIds = laneBitIds.filter((bitId) => !ids.find((id) => id.isEqualWithoutVersion(bitId)));\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 // eslint-disable-next-line complexity\n private async getComponentStatusBeforeMergeAttempt(\n id: ComponentID,\n checkoutProps: CheckoutProps\n ): Promise<ComponentStatusBeforeMergeAttempt> {\n const consumer = this.workspace.consumer;\n const {\n version,\n head: headVersion,\n ancestor,\n reset,\n revert,\n main,\n latest: latestVersion,\n versionPerId,\n forceOurs,\n forceTheirs,\n loadStash,\n } = checkoutProps;\n const repo = consumer.scope.objects;\n\n let existingBitMapId = consumer.bitMap.getComponentIdIfExist(id, { ignoreVersion: true });\n const getComponent = async () => {\n try {\n const results = await consumer.loadComponents(ComponentIdList.fromArray([id]));\n if (results.components[0]) return results.components[0];\n if (checkoutProps.includeLocallyDeleted && results.removedComponents[0]) {\n return results.removedComponents[0];\n }\n } catch (err) {\n if (checkoutProps.allowAddingComponentsFromScope && !existingBitMapId) return undefined;\n throw err;\n }\n return undefined;\n };\n const component = await getComponent();\n if (component) {\n // the component might fix an out-of-sync issue and as a result, the id has changed\n id = component.id;\n existingBitMapId = consumer.bitMap.getComponentIdIfExist(id, { ignoreVersion: true });\n }\n\n const componentModel = await consumer.scope.getModelComponentIfExist(id);\n const componentStatus: ComponentStatusBeforeMergeAttempt = { id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.unchangedMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n if (!componentModel) {\n return returnFailure(`component ${id.toString()} is new, no version to checkout`, true);\n }\n if (main && !componentModel.head) {\n return returnFailure(`component ${id.toString()} is not available on main`);\n }\n const unmerged = repo.unmergedComponents.getEntry(id);\n if (!reset && unmerged) {\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`\n );\n }\n\n const getNewVersion = async (): Promise<string> => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (reset) return component!.id.version as string;\n if (headVersion) return componentModel.headIncludeRemote(repo);\n if (ancestor) {\n const previousParent = await componentModel.getRefOfAncestor(repo, ancestor);\n return componentModel.getTagOfRefIfExists(previousParent)?.toString() || previousParent.toString();\n }\n // we verified previously that head exists in case of \"main\"\n if (main) return componentModel.head?.toString() as string;\n if (latestVersion) {\n const latest = componentModel.latestVersionIfExist();\n return latest || componentModel.headIncludeRemote(repo);\n }\n if (versionPerId) {\n return versionPerId.find((bitId) => bitId.isEqualWithoutVersion(id))?.version as string;\n }\n\n // if all above are false, the version is defined\n return version as string;\n };\n const newVersion = await getNewVersion();\n if (version && !headVersion) {\n const hasVersion = await componentModel.hasVersion(version, repo);\n if (!hasVersion) return returnFailure(`component ${id.toStringWithoutVersion()} doesn't have version ${version}`);\n }\n const currentlyUsedVersion = existingBitMapId?.version;\n if (existingBitMapId && !currentlyUsedVersion) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is new`);\n }\n\n if ((version && currentlyUsedVersion === version) || (versionPerId && currentlyUsedVersion === newVersion)) {\n // it won't be relevant for 'reset' as it doesn't have a version/versionPerId\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is already at version ${version || newVersion}`,\n true\n );\n }\n if ((headVersion || latestVersion) && currentlyUsedVersion === newVersion) {\n return returnFailure(\n `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 let isModified = false;\n if (currentlyUsedVersion) {\n const currentVersionObject: Version = await componentModel.loadVersion(currentlyUsedVersion, repo);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n isModified = await consumer.isComponentModified(currentVersionObject, component!);\n const isRemoved = component && component.isRemoved();\n if (!isModified && !isRemoved && reset) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is not modified`, true);\n }\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()) {\n if (existingBitMapId) componentStatus.shouldBeRemoved = true;\n return returnFailure(`component has been removed`, true);\n }\n\n const newId = id.changeVersion(newVersion);\n\n if (reset || (!isModified && !loadStash) || revert || !currentlyUsedVersion || forceTheirs || forceOurs) {\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 // in case of \"loadStash\", we want to merge the stashed modifications regardless whether it's modified currently.\n\n // if !currentlyUsedVersion it only exists in the model, so just write it. (happening during bit-switch/bit-lane-import)\n return { currentComponent: component, componentFromModel: componentVersion, id: newId };\n }\n\n const propsForMerge = {\n currentlyUsedVersion,\n componentModel,\n };\n\n return { currentComponent: component, componentFromModel: componentVersion, id: newId, propsForMerge };\n }\n\n private async getMergeStatus(\n { currentComponent: componentFromFS, componentFromModel, id, propsForMerge }: ComponentStatusBeforeMergeAttempt,\n checkoutProps: CheckoutProps\n ): 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 let baseVersion = currentlyUsedVersion;\n const newVersion = id.version as string;\n let baseComponent: Version = await componentModel.loadVersion(baseVersion, repo);\n const otherComponent: Version = await componentModel.loadVersion(newVersion, repo);\n const { loadStash } = checkoutProps;\n if (loadStash && otherComponent.parents.length) {\n // for stash, we want the stashed modifications to be added on top of the current version.\n // for this to happen, the \"base\" must be the parent of the stashed version.\n const parent = otherComponent.parents[0];\n baseVersion = parent.toString();\n baseComponent = await componentModel.loadVersion(baseVersion, repo);\n }\n\n const mergeResults = await threeWayMerge({\n scope: consumer.scope,\n otherComponent,\n otherLabel: loadStash ? 'stash' : newVersion,\n currentComponent: componentFromFS,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n\n return { currentComponent: 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), new RevertCmd(checkoutMain));\n return checkoutMain;\n }\n}\n\nCheckoutAspect.addRuntime(CheckoutMain);\n\nexport default CheckoutMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN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,KAAIG,sBAAS,EAACH,YAAY,CAAC,CAAC;IACxE,OAAOA,YAAY;EACrB;AACF;AAACI,OAAA,CAAAxQ,YAAA,GAAAA,YAAA;AAAAhB,eAAA,CA7gBYgB,YAAY,WA2fR,EAAE;AAAAhB,eAAA,CA3fNgB,YAAY,kBA4fD,CAACyQ,gBAAS,EAAEC,4BAAe,EAAEC,sBAAY,EAAEC,wCAAqB,EAAEC,0BAAc,EAAEC,sBAAY,CAAC;AAAA9R,eAAA,CA5f1GgB,YAAY,aA8fN+Q,kBAAW;AAiB9BZ,0BAAc,CAACa,UAAU,CAAChR,YAAY,CAAC;AAAC,IAAAiR,QAAA,GAAAT,OAAA,CAAAzS,OAAA,GAEzBiC,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_logger","_workspace","_bitError","_lodash","_remove","_merging","_importer","_legacy","_componentWriter","_pMapSeries","_interopRequireDefault","_componentId","_objects","_legacy2","_legacy3","_checkoutCmd","_checkout","_checkoutVersion","_revertCmd","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","CheckoutMain","constructor","workspace","logger","componentWriter","importer","remove","checkout","checkoutProps","inInstallContext","consumer","version","ids","promptMergeOptions","syncNewComponents","addedComponents","restoreMissingComponents","newComponents","addNewComponents","bitIds","ComponentIdList","fromArray","map","id","allComponentStatusBeforeMerge","mapSeries","getComponentStatusBeforeMergeAttempt","compsNeedMerge","c","propsForMerge","compsNotNeedMerge","toImport","compStatus","idsToImport","changeVersion","currentlyUsedVersion","flat","scope","legacyScope","scopeImporter","importWithoutDeps","cache","lane","getComponentsStatusOfMergeNeeded","tmp","Tmp","afterMergeAttempt","Promise","all","getMergeStatus","clear","err","compStatusMergeNeeded","allComponentsStatus","componentWithConflict","find","component","mergeResults","hasConflicts","mergeStrategy","BitError","toStringWithoutVersion","getMergeStrategyInteractive","throwForFailures","failedComponents","componentStatus","unchangedMessage","shouldBeRemoved","unchangedLegitimately","succeededComponents","checkoutPropsLegacy","componentsResults","currentComponent","applyVersion","componentsLegacy","compact","newFromLane","newFromLaneAdded","head","getNewComponentsFromLane","workspaceOnly","compsNewFromLane","loadComponentFromModelImportIfNeeded","leftUnresolvedConflicts","componentWriterResults","manyComponentsWriterOpts","components","skipDependencyInstallation","skipNpmInstall","verbose","resetConfig","reset","skipUpdatingBitMap","skipUpdatingBitmap","revert","shouldUpdateWorkspaceConfig","reasonForBitmapChange","writeMany","appliedVersionComponents","applyVersionResult","componentIdsToRemove","undefined","removeLocallyByIds","force","reasonForRemoval","removedComponents","n","toString","workspaceConfigUpdateResult","installationError","compilationError","missing","bitMapEntry","bitMap","getBitmapEntry","ignoreVersion","noFilesError","ComponentNotFoundInPath","comps","getMany","state","_consumer","stashedBitmapEntries","newBitmapEntries","entry","defaultScope","newComps","bitmapEntry","existingId","getBitmapEntryIfExist","modelComponent","ModelComponent","fromBitId","repo","objects","consumerComp","toConsumerComponent","newCompId","ComponentID","fromObject","name","fullName","writeToPath","rootDir","addComponent","componentId","files","f","basename","relativePath","relative","test","mainFile","config","triggerOnComponentAdd","compile","write","checkoutByCLIValues","componentPattern","setStatusLine","OutsideWorkspaceError","importCurrentObjects","makeLaneComponentsAvailableOnMain","parseValues","checkoutResults","onDestroy","notExported","isExported","changeScope","scopeComponentsImporter","toVersionLatest","reason","includeUnexported","error","unavailableOnMain","getUnavailableOnMainComponents","makeComponentsAvailableOnMain","console","HEAD","latest","LATEST","includeLocallyDeleted","getIds","idsByPattern","includeDeleted","listIdsIncludeRemoved","listIds","idsOnWorkspace","currentLane","getCurrentLaneObject","currentLaneIds","toComponentIds","hasWithoutVersion","laneBitIds","newComponentIds","bitId","isEqualWithoutVersion","nonRemovedNewIds","isRemoved","isComponentRemoved","headVersion","ancestor","main","latestVersion","versionPerId","forceOurs","forceTheirs","loadStash","existingBitMapId","getComponentIdIfExist","getComponent","results","loadComponents","allowAddingComponentsFromScope","componentModel","getModelComponentIfExist","returnFailure","msg","unmerged","unmergedComponents","getEntry","getNewVersion","headIncludeRemote","previousParent","getRefOfAncestor","getTagOfRefIfExists","latestVersionIfExist","newVersion","hasVersion","divergeDataForMergePending","getDivergeDataForMergePending","isMergePending","isDiverged","isModified","currentVersionObject","loadVersion","isComponentModified","versionRef","getRef","Error","componentVersion","getObject","hash","newId","componentFromModel","componentFromFS","baseVersion","baseComponent","otherComponent","parents","parent","threeWayMerge","otherLabel","currentLabel","provider","cli","loggerMain","compWriter","createLogger","CheckoutAspect","checkoutMain","register","CheckoutCmd","RevertCmd","exports","CLIAspect","WorkspaceAspect","LoggerAspect","ComponentWriterAspect","ImporterAspect","RemoveAspect","MainRuntime","addRuntime","_default"],"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 { BitError } from '@teambit/bit-error';\nimport { compact } from 'lodash';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport {\n ApplyVersionResults,\n FailedComponents,\n threeWayMerge,\n getMergeStrategyInteractive,\n MergeStrategy,\n} from '@teambit/merging';\nimport { ImporterAspect, ImporterMain } from '@teambit/importer';\nimport { HEAD, LATEST } from '@teambit/legacy.constants';\nimport { ComponentWriterAspect, ComponentWriterMain } from '@teambit/component-writer';\nimport mapSeries from 'p-map-series';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { Version, ModelComponent, Lane } from '@teambit/objects';\nimport { Tmp } from '@teambit/legacy.scope';\nimport { ComponentNotFoundInPath } from '@teambit/legacy.consumer-component';\nimport { CheckoutCmd } from './checkout-cmd';\nimport { CheckoutAspect } from './checkout.aspect';\nimport { applyVersion, ComponentStatus, ComponentStatusBase, throwForFailures } from './checkout-version';\nimport { RevertCmd } from './revert-cmd';\nimport { ComponentMap } from '@teambit/legacy.bit-map';\n\nexport type CheckoutProps = {\n version?: string; // if reset/head/latest is true, the version is undefined\n ids?: ComponentID[];\n head?: boolean;\n ancestor?: number; // how many generations to go backward\n latest?: boolean;\n main?: boolean; // relevant for \"revert\" only\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy; // strategy to use in case of conflicts\n forceOurs?: boolean; // regardless of conflicts, use ours\n forceTheirs?: boolean; // regardless of conflicts, use theirs\n verbose?: boolean;\n skipNpmInstall?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n revert?: boolean; // change the files according to the given version, but don't change the bitmap version and don't try to merge\n all?: boolean; // checkout all ids\n isLane?: boolean;\n lane?: Lane; // currently needed for \"bit switch\" to tell the \"fetch\" where to fetch from\n workspaceOnly?: boolean;\n versionPerId?: ComponentID[]; // if given, the ComponentID.version is the version to checkout to.\n skipUpdatingBitmap?: boolean; // needed for stash\n loadStash?: boolean;\n stashedBitmapEntries?: Array<Partial<ComponentMap>>;\n restoreMissingComponents?: boolean; // in case .bitmap has a component and it's missing from the workspace, restore it (from model)\n allowAddingComponentsFromScope?: boolean; // in case the id doesn't exist in .bitmap, add it from the scope (relevant for switch)\n includeLocallyDeleted?: boolean; // include components that were deleted locally. currently enabled for \"bit checkout reset\" only.\n};\n\nexport type ComponentStatusBeforeMergeAttempt = ComponentStatusBase & {\n propsForMerge?: {\n currentlyUsedVersion: string;\n componentModel: ModelComponent;\n };\n};\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 this.workspace.inInstallContext = true;\n const consumer = this.workspace.consumer;\n const { version, ids, promptMergeOptions } = checkoutProps;\n await this.syncNewComponents(checkoutProps);\n const addedComponents = await this.restoreMissingComponents(checkoutProps);\n const newComponents = await this.addNewComponents(checkoutProps);\n const bitIds = ComponentIdList.fromArray(ids?.map((id) => id) || []);\n // don't use Promise.all, it loads the components and this operation must be in sequence.\n const allComponentStatusBeforeMerge = await mapSeries(bitIds, (id) =>\n this.getComponentStatusBeforeMergeAttempt(id, 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\n await this.workspace.scope.legacyScope.scopeImporter.importWithoutDeps(ComponentIdList.fromArray(toImport), {\n cache: true,\n lane: checkoutProps.lane,\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, checkoutProps)));\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 BitError(\n `automatic merge has failed for component ${componentWithConflict.id.toStringWithoutVersion()}.\\nplease use \"--auto-merge-resolve\" with 'manual', 'ours' or 'theirs' to resolve the conflict/s`\n );\n }\n if (!checkoutProps.mergeStrategy) checkoutProps.mergeStrategy = await getMergeStrategyInteractive();\n }\n\n throwForFailures(allComponentsStatus);\n\n const failedComponents: FailedComponents[] = allComponentsStatus\n .filter((componentStatus) => componentStatus.unchangedMessage)\n .filter((componentStatus) => !componentStatus.shouldBeRemoved)\n .map((componentStatus) => ({\n id: componentStatus.id,\n unchangedMessage: componentStatus.unchangedMessage as string,\n unchangedLegitimately: componentStatus.unchangedLegitimately,\n }));\n\n const succeededComponents = allComponentsStatus.filter((componentStatus) => !componentStatus.unchangedMessage);\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) };\n const componentsResults = await mapSeries(succeededComponents, ({ id, currentComponent, mergeResults }) => {\n return applyVersion(consumer, id, currentComponent, mergeResults, checkoutPropsLegacy);\n });\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))\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 || checkoutProps.revert,\n shouldUpdateWorkspaceConfig: true,\n reasonForBitmapChange: 'checkout',\n mergeStrategy: checkoutProps.mergeStrategy,\n };\n componentWriterResults = await this.componentWriter.writeMany(manyComponentsWriterOpts);\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, reasonForRemoval: 'checkout' });\n }\n\n return {\n components: appliedVersionComponents,\n removedComponents: componentIdsToRemove,\n addedComponents,\n newComponents,\n version,\n failedComponents,\n leftUnresolvedConflicts,\n newFromLane: newFromLane?.map((n) => n.toString()),\n newFromLaneAdded,\n workspaceConfigUpdateResult: componentWriterResults?.workspaceConfigUpdateResult,\n installationError: componentWriterResults?.installationError,\n compilationError: componentWriterResults?.compilationError,\n };\n }\n\n /**\n * if .bitmap entry exists but the rootDir is missing from the filesystem, find the component in the scope and restore it.\n * returns the restored component ids.\n */\n async restoreMissingComponents(checkoutProps: CheckoutProps): Promise<ComponentID[] | undefined> {\n if (checkoutProps.reset) {\n checkoutProps.restoreMissingComponents = true;\n }\n if (!checkoutProps.restoreMissingComponents) return undefined;\n const ids = checkoutProps.ids || [];\n const missing: ComponentID[] = [];\n await Promise.all(\n ids.map(async (id) => {\n const bitMapEntry = this.workspace.bitMap.getBitmapEntry(id, { ignoreVersion: true });\n if (bitMapEntry.noFilesError && bitMapEntry.noFilesError instanceof ComponentNotFoundInPath) {\n delete bitMapEntry.noFilesError;\n missing.push(id);\n }\n })\n );\n if (!missing.length) return undefined;\n const comps = await this.workspace.scope.getMany(missing);\n await this.componentWriter.writeMany({\n components: comps.map((c) => c.state._consumer),\n skipDependencyInstallation: true,\n skipUpdatingBitMap: true,\n });\n\n return missing;\n }\n\n async addNewComponents(checkoutProps: CheckoutProps): Promise<undefined | ComponentID[]> {\n const stashedBitmapEntries = checkoutProps.stashedBitmapEntries;\n if (!stashedBitmapEntries) return;\n const newBitmapEntries = stashedBitmapEntries.filter((entry) => entry.defaultScope);\n if (!newBitmapEntries.length) return;\n const newComps = await mapSeries(newBitmapEntries, async (bitmapEntry) => {\n const id = bitmapEntry.id!;\n const existingId = this.workspace.bitMap.getBitmapEntryIfExist(id, { ignoreVersion: true });\n if (existingId) return;\n const modelComponent = ModelComponent.fromBitId(id);\n const repo = this.workspace.scope.legacyScope.objects;\n const consumerComp = await modelComponent.toConsumerComponent(id.version, id.scope, repo);\n const newCompId = ComponentID.fromObject({ name: id.fullName }, bitmapEntry.defaultScope!);\n await this.componentWriter.writeMany({\n components: [consumerComp],\n skipDependencyInstallation: true,\n writeToPath: bitmapEntry.rootDir,\n skipUpdatingBitMap: true,\n });\n\n this.workspace.consumer.bitMap.addComponent({\n componentId: newCompId,\n files: consumerComp.files.map((f) => ({\n name: f.basename,\n relativePath: f.relative,\n test: f.test,\n })),\n mainFile: bitmapEntry.mainFile!,\n config: bitmapEntry.config,\n defaultScope: bitmapEntry.defaultScope,\n });\n await this.workspace.triggerOnComponentAdd(newCompId, { compile: true });\n return newCompId;\n });\n await this.workspace.bitMap.write();\n return compact(newComps);\n }\n\n async checkoutByCLIValues(componentPattern: string, checkoutProps: CheckoutProps): Promise<ApplyVersionResults> {\n const { revert, head } = checkoutProps;\n this.logger.setStatusLine(revert ? 'reverting components...' : 'switching component version...');\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 (head) await this.makeLaneComponentsAvailableOnMain();\n await this.parseValues(componentPattern, checkoutProps);\n const checkoutResults = await this.checkout(checkoutProps);\n await consumer.onDestroy(`checkout (${componentPattern})`);\n return checkoutResults;\n }\n\n private async syncNewComponents({ ids, head }: CheckoutProps) {\n if (!head) return;\n const notExported = ids?.filter((id) => !this.workspace.isExported(id)).map((id) => id.changeScope(id.scope));\n const scopeComponentsImporter = this.workspace.consumer.scope.scopeImporter;\n try {\n await scopeComponentsImporter.importWithoutDeps(ComponentIdList.fromArray(notExported || []).toVersionLatest(), {\n cache: false,\n reason: 'for making sure the new components are really new and are not out-of-sync',\n includeUnexported: 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(componentPattern: string, checkoutProps: CheckoutProps) {\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 BitError('please specify either [component-pattern] or --all, not both');\n }\n if (!componentPattern && !checkoutProps.all) {\n throw new BitError('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 if (checkoutProps.reset || checkoutProps.head) {\n checkoutProps.includeLocallyDeleted = true;\n }\n\n const getIds = async () => {\n if (componentPattern) {\n return this.workspace.idsByPattern(componentPattern, true, {\n includeDeleted: checkoutProps.includeLocallyDeleted,\n });\n }\n return checkoutProps.includeLocallyDeleted ? this.workspace.listIdsIncludeRemoved() : this.workspace.listIds();\n };\n\n const idsOnWorkspace = await getIds();\n\n const currentLane = await this.workspace.consumer.getCurrentLaneObject();\n const currentLaneIds = currentLane?.toComponentIds();\n // when no ids were given and the user is on a lane, return lane-ids only.\n // it's relevant for cases like \"bit checkout head\" when on a lane to not checkout main components. (see https://github.com/teambit/bit/pull/6853)\n const ids =\n currentLaneIds && !componentPattern\n ? idsOnWorkspace.filter((id) => currentLaneIds.hasWithoutVersion(id))\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.toComponentIds();\n const newComponentIds = laneBitIds.filter((bitId) => !ids.find((id) => id.isEqualWithoutVersion(bitId)));\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 // eslint-disable-next-line complexity\n private async getComponentStatusBeforeMergeAttempt(\n id: ComponentID,\n checkoutProps: CheckoutProps\n ): Promise<ComponentStatusBeforeMergeAttempt> {\n const consumer = this.workspace.consumer;\n const {\n version,\n head: headVersion,\n ancestor,\n reset,\n revert,\n main,\n latest: latestVersion,\n versionPerId,\n forceOurs,\n forceTheirs,\n loadStash,\n } = checkoutProps;\n const repo = consumer.scope.objects;\n\n let existingBitMapId = consumer.bitMap.getComponentIdIfExist(id, { ignoreVersion: true });\n const getComponent = async () => {\n try {\n const results = await consumer.loadComponents(ComponentIdList.fromArray([id]));\n if (results.components[0]) return results.components[0];\n if (checkoutProps.includeLocallyDeleted && results.removedComponents[0]) {\n return results.removedComponents[0];\n }\n } catch (err) {\n if (checkoutProps.allowAddingComponentsFromScope && !existingBitMapId) return undefined;\n throw err;\n }\n return undefined;\n };\n const component = await getComponent();\n if (component) {\n // the component might fix an out-of-sync issue and as a result, the id has changed\n id = component.id;\n existingBitMapId = consumer.bitMap.getComponentIdIfExist(id, { ignoreVersion: true });\n }\n\n const componentModel = await consumer.scope.getModelComponentIfExist(id);\n const componentStatus: ComponentStatusBeforeMergeAttempt = { id };\n const returnFailure = (msg: string, unchangedLegitimately = false) => {\n componentStatus.unchangedMessage = msg;\n componentStatus.unchangedLegitimately = unchangedLegitimately;\n return componentStatus;\n };\n if (!componentModel) {\n return returnFailure(`component ${id.toString()} is new, no version to checkout`, true);\n }\n if (main && !componentModel.head) {\n return returnFailure(`component ${id.toString()} is not available on main`);\n }\n const unmerged = repo.unmergedComponents.getEntry(id);\n if (!reset && unmerged) {\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is in during-merge state, please snap/tag it first (or use bit merge --resolve/--abort)`\n );\n }\n\n const getNewVersion = async (): Promise<string> => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (reset) return component!.id.version as string;\n if (headVersion) return componentModel.headIncludeRemote(repo);\n if (ancestor) {\n const previousParent = await componentModel.getRefOfAncestor(repo, ancestor);\n return componentModel.getTagOfRefIfExists(previousParent)?.toString() || previousParent.toString();\n }\n // we verified previously that head exists in case of \"main\"\n if (main) return componentModel.head?.toString() as string;\n if (latestVersion) {\n const latest = componentModel.latestVersionIfExist();\n return latest || componentModel.headIncludeRemote(repo);\n }\n if (versionPerId) {\n return versionPerId.find((bitId) => bitId.isEqualWithoutVersion(id))?.version as string;\n }\n\n // if all above are false, the version is defined\n return version as string;\n };\n const newVersion = await getNewVersion();\n if (version && !headVersion) {\n const hasVersion = await componentModel.hasVersion(version, repo);\n if (!hasVersion) return returnFailure(`component ${id.toStringWithoutVersion()} doesn't have version ${version}`);\n }\n const currentlyUsedVersion = existingBitMapId?.version;\n if (existingBitMapId && !currentlyUsedVersion) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is new`);\n }\n\n if ((version && currentlyUsedVersion === version) || (versionPerId && currentlyUsedVersion === newVersion)) {\n // it won't be relevant for 'reset' as it doesn't have a version/versionPerId\n return returnFailure(\n `component ${id.toStringWithoutVersion()} is already at version ${version || newVersion}`,\n true\n );\n }\n if ((headVersion || latestVersion) && currentlyUsedVersion === newVersion) {\n return returnFailure(\n `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 let isModified = false;\n if (currentlyUsedVersion) {\n const currentVersionObject: Version = await componentModel.loadVersion(currentlyUsedVersion, repo);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n isModified = await consumer.isComponentModified(currentVersionObject, component!);\n const isRemoved = component && component.isRemoved();\n if (!isModified && !isRemoved && reset) {\n return returnFailure(`component ${id.toStringWithoutVersion()} is not modified`, true);\n }\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()) {\n if (existingBitMapId) componentStatus.shouldBeRemoved = true;\n return returnFailure(`component has been removed`, true);\n }\n\n const newId = id.changeVersion(newVersion);\n\n if (reset || (!isModified && !loadStash) || revert || !currentlyUsedVersion || forceTheirs || forceOurs) {\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 // in case of \"loadStash\", we want to merge the stashed modifications regardless whether it's modified currently.\n\n // if !currentlyUsedVersion it only exists in the model, so just write it. (happening during bit-switch/bit-lane-import)\n return { currentComponent: component, componentFromModel: componentVersion, id: newId };\n }\n\n const propsForMerge = {\n currentlyUsedVersion,\n componentModel,\n };\n\n return { currentComponent: component, componentFromModel: componentVersion, id: newId, propsForMerge };\n }\n\n private async getMergeStatus(\n { currentComponent: componentFromFS, componentFromModel, id, propsForMerge }: ComponentStatusBeforeMergeAttempt,\n checkoutProps: CheckoutProps\n ): 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 let baseVersion = currentlyUsedVersion;\n const newVersion = id.version as string;\n let baseComponent: Version = await componentModel.loadVersion(baseVersion, repo);\n const otherComponent: Version = await componentModel.loadVersion(newVersion, repo);\n const { loadStash } = checkoutProps;\n if (loadStash && otherComponent.parents.length) {\n // for stash, we want the stashed modifications to be added on top of the current version.\n // for this to happen, the \"base\" must be the parent of the stashed version.\n const parent = otherComponent.parents[0];\n baseVersion = parent.toString();\n baseComponent = await componentModel.loadVersion(baseVersion, repo);\n }\n\n const mergeResults = await threeWayMerge({\n scope: consumer.scope,\n otherComponent,\n otherLabel: loadStash ? 'stash' : newVersion,\n currentComponent: componentFromFS,\n currentLabel: `${currentlyUsedVersion} modified`,\n baseComponent,\n });\n\n return { currentComponent: 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);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zS,OAAA,GAEzBiC,YAAY","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/checkout",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.512",
|
|
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": "1.0.
|
|
9
|
+
"version": "1.0.512"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
"@teambit/bit-error": "0.0.404",
|
|
16
16
|
"@teambit/component-id": "1.2.2",
|
|
17
17
|
"@teambit/harmony": "0.4.6",
|
|
18
|
-
"@teambit/cli": "0.0.
|
|
19
|
-
"@teambit/legacy.constants": "0.0.
|
|
20
|
-
"@teambit/merging": "1.0.
|
|
21
|
-
"@teambit/component.sources": "0.0.
|
|
22
|
-
"@teambit/legacy.consumer-component": "0.0.
|
|
23
|
-
"@teambit/legacy.consumer": "0.0.
|
|
24
|
-
"@teambit/legacy.utils": "0.0.
|
|
25
|
-
"@teambit/
|
|
26
|
-
"@teambit/component-writer": "1.0.
|
|
27
|
-
"@teambit/importer": "1.0.
|
|
28
|
-
"@teambit/legacy.bit-map": "0.0.
|
|
29
|
-
"@teambit/legacy.scope": "0.0.
|
|
30
|
-
"@teambit/logger": "0.0.
|
|
31
|
-
"@teambit/remove": "1.0.
|
|
32
|
-
"@teambit/workspace": "1.0.
|
|
18
|
+
"@teambit/cli": "0.0.1089",
|
|
19
|
+
"@teambit/legacy.constants": "0.0.5",
|
|
20
|
+
"@teambit/merging": "1.0.512",
|
|
21
|
+
"@teambit/component.sources": "0.0.71",
|
|
22
|
+
"@teambit/legacy.consumer-component": "0.0.20",
|
|
23
|
+
"@teambit/legacy.consumer": "0.0.19",
|
|
24
|
+
"@teambit/legacy.utils": "0.0.13",
|
|
25
|
+
"@teambit/objects": "0.0.19",
|
|
26
|
+
"@teambit/component-writer": "1.0.512",
|
|
27
|
+
"@teambit/importer": "1.0.512",
|
|
28
|
+
"@teambit/legacy.bit-map": "0.0.76",
|
|
29
|
+
"@teambit/legacy.scope": "0.0.19",
|
|
30
|
+
"@teambit/logger": "0.0.1182",
|
|
31
|
+
"@teambit/remove": "1.0.512",
|
|
32
|
+
"@teambit/workspace": "1.0.512"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/lodash": "4.14.165",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"fs-extra": "10.0.0",
|
|
40
40
|
"@types/mocha": "9.1.0",
|
|
41
41
|
"@teambit/harmony.envs.core-aspect-env": "0.0.65",
|
|
42
|
-
"@teambit/component.testing.mock-components": "0.0.
|
|
43
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
|
44
|
-
"@teambit/lister": "1.0.
|
|
45
|
-
"@teambit/snapping": "1.0.
|
|
46
|
-
"@teambit/workspace.testing.mock-workspace": "0.0.
|
|
42
|
+
"@teambit/component.testing.mock-components": "0.0.279",
|
|
43
|
+
"@teambit/harmony.testing.load-aspect": "0.0.274",
|
|
44
|
+
"@teambit/lister": "1.0.512",
|
|
45
|
+
"@teambit/snapping": "1.0.512",
|
|
46
|
+
"@teambit/workspace.testing.mock-workspace": "0.0.46"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@types/chai-fs": "2.0.5",
|