@teambit/checkout 1.0.65 → 1.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkout-version.d.ts +1 -0
- package/dist/checkout-version.js.map +1 -1
- package/dist/esm.d.mts +9 -0
- package/dist/esm.mjs +13 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +0 -24
- package/dist/index.js.map +1 -1
- package/esm.mjs +13 -0
- package/package.json +10 -10
- /package/dist/{preview-1700997544567.js → preview-1701141530916.js} +0 -0
|
@@ -34,6 +34,7 @@ export declare type ComponentStatus = ComponentStatusBase & {
|
|
|
34
34
|
export declare type ApplyVersionWithComps = {
|
|
35
35
|
applyVersionResult: ApplyVersionResult;
|
|
36
36
|
component?: ConsumerComponent;
|
|
37
|
+
legacyCompToWrite?: ConsumerComponent;
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* 1) when the files are modified with conflicts and the strategy is "ours", leave the FS as is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["path","data","_interopRequireWildcard","require","_generalError","_interopRequireDefault","_path2","_dataToPersist","_removePath","_mergeVersion","_bitError","_chalk","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","GeneralError","updateFileStatus","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","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","BitError"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport Version from '@teambit/legacy/dist/scope/models/version';\nimport { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy/dist/utils/path';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { MergeResultsThreeWay } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\n\nexport type CheckoutProps = {\n version?: string; // if reset is true, the version is undefined\n ids?: ComponentID[];\n latestVersion?: boolean;\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy | null;\n verbose?: boolean;\n skipNpmInstall?: boolean;\n ignorePackageJson?: boolean;\n writeConfig?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n all?: boolean; // checkout all ids\n ignoreDist?: boolean;\n isLane?: boolean;\n};\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 = { applyVersionResult: ApplyVersionResult; component?: ConsumerComponent };\n\n/**\n * 1) when the files are modified with conflicts and the strategy is \"ours\", leave the FS as is\n * and update only bitmap id version. (not the componentMap object).\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", write the component\n * according to id.version.\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 * 4) when --reset flag is used, write the component according to the bitmap version\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 } = checkoutProps;\n let filesStatus = {};\n if (mergeResults && mergeResults.hasConflicts && mergeStrategy === MergeOptions.ours) {\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 GeneralError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, 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 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 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(filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n if (!componentFromFS) 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 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 GeneralError(`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 GeneralError(`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 GeneralError(`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 GeneralError(`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;AAGA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IA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AACvC;AAEO,SAAS6C,gBAAgBA,CAACC,mBAA0C,EAAE;EAC3E,MAAMC,gBAAgB,GAAGD,mBAAmB,CAACxG,MAAM,CAAE0G,CAAC,IAAKA,CAAC,CAACC,gBAAgB,IAAI,CAACD,CAAC,CAACE,qBAAqB,CAAC;EAC1G,IAAIH,gBAAgB,CAACnG,MAAM,EAAE;IAC3B,MAAMuG,WAAW,GAAGJ,gBAAgB,CACjC5B,GAAG,CACDiC,eAAe,IACb,GAAEC,gBAAK,CAACC,IAAI,CAACF,eAAe,CAAChF,EAAE,CAACM,QAAQ,CAAC,CAAC,CAAE,MAAK2E,gBAAK,CAACE,GAAG,CAACH,eAAe,CAACH,gBAA0B,CAAE,EAC5G,CAAC,CACAO,IAAI,CAAC,IAAI,CAAC;IACb,MAAM,KAAIC,oBAAQ,EAAE,qDAAoDN,WAAY,EAAC,CAAC;EACxF;AACF"}
|
|
1
|
+
{"version":3,"names":["path","data","_interopRequireWildcard","require","_generalError","_interopRequireDefault","_path2","_dataToPersist","_removePath","_mergeVersion","_bitError","_chalk","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","applyVersion","consumer","id","componentFromFS","mergeResults","checkoutProps","isLane","Error","toString","mergeStrategy","filesStatus","hasConflicts","MergeOptions","ours","files","file","pathNormalizeToLinux","relative","FileStatus","unchanged","bitMap","updateComponentId","applyVersionResult","component","loadComponentFromModelImportIfNeeded","componentMap","GeneralError","updateFileStatus","removeFilesIfNeeded","modifiedStatus","modifiedFiles","applyModifiedVersion","fileFromFs","find","f","areFilesEqual","Buffer","compare","contents","updated","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","BitError"],"sources":["checkout-version.ts"],"sourcesContent":["import * as path from 'path';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { ComponentID } from '@teambit/component-id';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport Version from '@teambit/legacy/dist/scope/models/version';\nimport { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';\nimport { pathNormalizeToLinux, PathOsBased } from '@teambit/legacy/dist/utils/path';\nimport DataToPersist from '@teambit/legacy/dist/consumer/component/sources/data-to-persist';\nimport RemovePath from '@teambit/legacy/dist/consumer/component/sources/remove-path';\nimport {\n ApplyVersionResult,\n FilesStatus,\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version';\nimport { MergeResultsThreeWay } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { BitError } from '@teambit/bit-error';\nimport chalk from 'chalk';\n\nexport type CheckoutProps = {\n version?: string; // if reset is true, the version is undefined\n ids?: ComponentID[];\n latestVersion?: boolean;\n promptMergeOptions?: boolean;\n mergeStrategy?: MergeStrategy | null;\n verbose?: boolean;\n skipNpmInstall?: boolean;\n ignorePackageJson?: boolean;\n writeConfig?: boolean;\n reset?: boolean; // remove local changes. if set, the version is undefined.\n all?: boolean; // checkout all ids\n ignoreDist?: boolean;\n isLane?: boolean;\n};\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 * 1) when the files are modified with conflicts and the strategy is \"ours\", leave the FS as is\n * and update only bitmap id version. (not the componentMap object).\n *\n * 2) when the files are modified with conflicts and the strategy is \"theirs\", write the component\n * according to id.version.\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 * 4) when --reset flag is used, write the component according to the bitmap version\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 } = checkoutProps;\n let filesStatus = {};\n if (mergeResults && mergeResults.hasConflicts && mergeStrategy === MergeOptions.ours) {\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 GeneralError('applyVersion: componentMap was not found');\n\n const files = component.files;\n updateFileStatus(files, filesStatus, componentFromFS || undefined);\n\n await removeFilesIfNeeded(filesStatus, 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 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 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(filesStatus: FilesStatus, componentFromFS?: ConsumerComponent) {\n if (!componentFromFS) 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 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 GeneralError(`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 GeneralError(`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 GeneralError(`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 GeneralError(`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;AAGA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;E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,SAAS6C,gBAAgBA,CAACC,mBAA0C,EAAE;EAC3E,MAAMC,gBAAgB,GAAGD,mBAAmB,CAACxG,MAAM,CAAE0G,CAAC,IAAKA,CAAC,CAACC,gBAAgB,IAAI,CAACD,CAAC,CAACE,qBAAqB,CAAC;EAC1G,IAAIH,gBAAgB,CAACnG,MAAM,EAAE;IAC3B,MAAMuG,WAAW,GAAGJ,gBAAgB,CACjC5B,GAAG,CACDiC,eAAe,IACb,GAAEC,gBAAK,CAACC,IAAI,CAACF,eAAe,CAAChF,EAAE,CAACM,QAAQ,CAAC,CAAC,CAAE,MAAK2E,gBAAK,CAACE,GAAG,CAACH,eAAe,CAACH,gBAA0B,CAAE,EAC5G,CAAC,CACAO,IAAI,CAAC,IAAI,CAAC;IACb,MAAM,KAAIC,oBAAQ,EAAE,qDAAoDN,WAAY,EAAC,CAAC;EACxF;AACF"}
|
package/dist/esm.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const CheckoutAspect: any;
|
|
2
|
+
export const applyModifiedVersion: any;
|
|
3
|
+
export const applyVersion: any;
|
|
4
|
+
export const removeFilesIfNeeded: any;
|
|
5
|
+
export const updateFileStatus: any;
|
|
6
|
+
export const throwForFailures: any;
|
|
7
|
+
export const checkoutOutput: any;
|
|
8
|
+
export default cjsModule;
|
|
9
|
+
import cjsModule from "./index.js";
|
package/dist/esm.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-unresolved
|
|
2
|
+
import cjsModule from './index.js';
|
|
3
|
+
|
|
4
|
+
export const CheckoutAspect = cjsModule.CheckoutAspect;
|
|
5
|
+
export const applyModifiedVersion = cjsModule.applyModifiedVersion;
|
|
6
|
+
export const applyVersion = cjsModule.applyVersion;
|
|
7
|
+
export const removeFilesIfNeeded = cjsModule.removeFilesIfNeeded;
|
|
8
|
+
export const updateFileStatus = cjsModule.updateFileStatus;
|
|
9
|
+
export const throwForFailures = cjsModule.throwForFailures;
|
|
10
|
+
export const checkoutOutput = cjsModule.checkoutOutput;
|
|
11
|
+
|
|
12
|
+
export default cjsModule;
|
|
13
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import { CheckoutAspect } from './checkout.aspect';
|
|
|
2
2
|
export type { CheckoutMain, CheckoutProps } from './checkout.main.runtime';
|
|
3
3
|
export default CheckoutAspect;
|
|
4
4
|
export { CheckoutAspect };
|
|
5
|
-
export {
|
|
5
|
+
export { applyModifiedVersion, applyVersion, removeFilesIfNeeded, updateFileStatus, throwForFailures, } from './checkout-version';
|
|
6
|
+
export type { CheckoutProps as CheckoutPropsLegacy, ComponentStatus, ComponentStatusBase, ApplyVersionWithComps, } from './checkout-version';
|
|
6
7
|
export { checkoutOutput } from './checkout-cmd';
|
package/dist/index.js
CHANGED
|
@@ -3,36 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "ApplyVersionWithComps", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _checkoutVersion().ApplyVersionWithComps;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "CheckoutAspect", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function () {
|
|
15
9
|
return _checkout().CheckoutAspect;
|
|
16
10
|
}
|
|
17
11
|
});
|
|
18
|
-
Object.defineProperty(exports, "CheckoutPropsLegacy", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _checkoutVersion().CheckoutProps;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "ComponentStatus", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _checkoutVersion().ComponentStatus;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "ComponentStatusBase", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _checkoutVersion().ComponentStatusBase;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
12
|
Object.defineProperty(exports, "applyModifiedVersion", {
|
|
37
13
|
enumerable: true,
|
|
38
14
|
get: function () {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_checkout","data","require","_checkoutVersion","_checkoutCmd","_default","exports","default","CheckoutAspect"],"sources":["index.ts"],"sourcesContent":["import { CheckoutAspect } from './checkout.aspect';\n\nexport type { CheckoutMain, CheckoutProps } from './checkout.main.runtime';\nexport default CheckoutAspect;\nexport { CheckoutAspect };\n\nexport {\n
|
|
1
|
+
{"version":3,"names":["_checkout","data","require","_checkoutVersion","_checkoutCmd","_default","exports","default","CheckoutAspect"],"sources":["index.ts"],"sourcesContent":["import { CheckoutAspect } from './checkout.aspect';\n\nexport type { CheckoutMain, CheckoutProps } from './checkout.main.runtime';\nexport default CheckoutAspect;\nexport { CheckoutAspect };\n\nexport {\n applyModifiedVersion,\n applyVersion,\n removeFilesIfNeeded,\n updateFileStatus,\n throwForFailures,\n} from './checkout-version';\n\nexport type {\n CheckoutProps as CheckoutPropsLegacy,\n ComponentStatus,\n ComponentStatusBase,\n ApplyVersionWithComps,\n} from './checkout-version';\nexport { checkoutOutput } from './checkout-cmd';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAcA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAjBjCC,0BAAc"}
|
package/esm.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-unresolved
|
|
2
|
+
import cjsModule from './index.js';
|
|
3
|
+
|
|
4
|
+
export const CheckoutAspect = cjsModule.CheckoutAspect;
|
|
5
|
+
export const applyModifiedVersion = cjsModule.applyModifiedVersion;
|
|
6
|
+
export const applyVersion = cjsModule.applyVersion;
|
|
7
|
+
export const removeFilesIfNeeded = cjsModule.removeFilesIfNeeded;
|
|
8
|
+
export const updateFileStatus = cjsModule.updateFileStatus;
|
|
9
|
+
export const throwForFailures = cjsModule.throwForFailures;
|
|
10
|
+
export const checkoutOutput = cjsModule.checkoutOutput;
|
|
11
|
+
|
|
12
|
+
export default cjsModule;
|
|
13
|
+
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/checkout",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
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.66"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"@teambit/bit-error": "0.0.404",
|
|
18
18
|
"@teambit/component-id": "1.2.0",
|
|
19
19
|
"@teambit/harmony": "0.4.6",
|
|
20
|
-
"@teambit/cli": "0.0.
|
|
21
|
-
"@teambit/merging": "1.0.
|
|
22
|
-
"@teambit/component-writer": "1.0.
|
|
23
|
-
"@teambit/importer": "1.0.
|
|
24
|
-
"@teambit/logger": "0.0.
|
|
25
|
-
"@teambit/remove": "1.0.
|
|
26
|
-
"@teambit/workspace": "1.0.
|
|
20
|
+
"@teambit/cli": "0.0.823",
|
|
21
|
+
"@teambit/merging": "1.0.66",
|
|
22
|
+
"@teambit/component-writer": "1.0.66",
|
|
23
|
+
"@teambit/importer": "1.0.66",
|
|
24
|
+
"@teambit/logger": "0.0.916",
|
|
25
|
+
"@teambit/remove": "1.0.66",
|
|
26
|
+
"@teambit/workspace": "1.0.66"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/lodash": "4.14.165",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@teambit/legacy": "1.0.
|
|
38
|
+
"@teambit/legacy": "1.0.606",
|
|
39
39
|
"react": "^16.8.0 || ^17.0.0",
|
|
40
40
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
41
41
|
},
|
|
File without changes
|