@teambit/component-compare 1.0.1080 → 1.0.1082
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/component-compare-page.module.scss +124 -0
- package/component-compare-page.tsx +509 -0
- package/component-compare.ui.runtime.tsx +98 -16
- package/dist/compare-component-pairs.d.ts +20 -0
- package/dist/compare-component-pairs.js +36 -0
- package/dist/compare-component-pairs.js.map +1 -0
- package/dist/compare-component-pairs.spec.d.ts +1 -0
- package/dist/compare-component-pairs.spec.js +94 -0
- package/dist/compare-component-pairs.spec.js.map +1 -0
- package/dist/component-compare-page.d.ts +16 -0
- package/dist/component-compare-page.js +504 -0
- package/dist/component-compare-page.js.map +1 -0
- package/dist/component-compare-page.module.scss +124 -0
- package/dist/component-compare.graphql.js +34 -0
- package/dist/component-compare.graphql.js.map +1 -1
- package/dist/component-compare.main.runtime.d.ts +64 -4
- package/dist/component-compare.main.runtime.js +187 -6
- package/dist/component-compare.main.runtime.js.map +1 -1
- package/dist/component-compare.ui.runtime.d.ts +43 -3
- package/dist/component-compare.ui.runtime.js +83 -21
- package/dist/component-compare.ui.runtime.js.map +1 -1
- package/dist/diff-cmd.d.ts +3 -3
- package/dist/{preview-1785267101230.js → preview-1785362864561.js} +2 -2
- package/package.json +35 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_lodash","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_legacy","_tester","_component","_schema","_componentCompare","_componentCompare2","_diffCmd","_importer","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","schema","workspace","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","comparingWithLocalChanges","BitError","toString","importObjectsFromMainIfExist","cache","baseVersion","version","compareVersion","components","getMany","baseComponent","compareComponent","componentWithoutVersion","get","changeVersion","undefined","diff","computeDiff","filesDiff","fieldsDiff","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filter","fileDiff","includes","filePath","status","id","baseId","compareId","code","fields","tests","getAPIDiff","computeAPIDiff","diffByCLIValues","pattern","toVersion","verbose","table","parent","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","compareToParent","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","modifiedIds","depData","getDependencies","modifiedIdsStr","toStringWithoutVersion","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","componentsDiffResults","Promise","all","consumerComponent","_consumer","diffResult","hasDiff","isDeleted","modelFiles","files","getFilesDiff","fsFiles","repository","objects","idsToImport","compact","idList","ComponentIdList","fromArray","scopeImporter","importWithoutDeps","reason","versionObject","loadVersion","parents","getTagOfRefIfExists","fromVersionObject","toVersionObject","fromVersionFiles","modelFilesToSourceFiles","toVersionFiles","fromFiles","componentFromModel","toFiles","fromVersionLabel","toVersionLabel","fromVersionComponent","toConsumerComponent","name","toVersionComponent","updateFieldsDiff","diffBetweenVersionsObjects","fromVersion","toComponentId","color","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","SchemaAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { compact } from 'lodash';\nimport { BitError } from '@teambit/bit-error';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport type { ComponentID } from '@teambit/component-id';\nimport { ComponentIdList } from '@teambit/component-id';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport type { ModelComponent, Version } from '@teambit/objects';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport type { DependencyList, DependencyResolverMain, SerializedDependency } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } from '@teambit/dependency-resolver';\nimport type { LoggerMain, Logger } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { DiffOptions, DiffResults, FieldsDiff, FileDiff } from '@teambit/legacy.component-diff';\nimport { getFilesDiff, diffBetweenComponentsObjects } from '@teambit/legacy.component-diff';\nimport type { TesterMain } from '@teambit/tester';\nimport { TesterAspect } from '@teambit/tester';\nimport type { Component, ComponentMain } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { SchemaMain } from '@teambit/schema';\nimport { SchemaAspect } from '@teambit/schema';\n\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\nimport type { ImporterMain } from '@teambit/importer';\nimport { ImporterAspect } from '@teambit/importer';\n\nexport type ComponentCompareResult = {\n id: string;\n baseId: string;\n compareId: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private importer: ImporterMain,\n private schema: SchemaMain,\n private workspace?: Workspace\n ) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n const comparingWithLocalChanges = this.workspace && baseIdStr === compareIdStr;\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\n });\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const components = await host.getMany([baseCompId, compareCompId]);\n const baseComponent = components?.[0];\n const compareComponent = components?.[1];\n const componentWithoutVersion = await host.get((baseCompId || compareCompId).changeVersion(undefined));\n\n const diff = componentWithoutVersion\n ? await this.computeDiff(\n componentWithoutVersion,\n comparingWithLocalChanges ? undefined : baseVersion,\n comparingWithLocalChanges ? undefined : compareVersion,\n {}\n )\n : {\n filesDiff: [],\n fieldsDiff: [],\n };\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n return {\n id: `${baseCompId}-${compareCompId}`,\n baseId: baseIdStr,\n compareId: compareIdStr,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n }\n\n async getAPIDiff(baseIdStr: string, compareIdStr: string): Promise<Record<string, any> | null> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], { cache: true });\n const components = await host.getMany([baseCompId, compareCompId]);\n const baseComponent = components?.[0];\n const compareComponent = components?.[1];\n if (!baseComponent || !compareComponent) return null;\n return this.schema.computeAPIDiff(baseComponent, compareComponent);\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table, parent }: { verbose?: boolean; table?: boolean; parent?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n compareToParent: parent,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component, modifiedIds?: ComponentID[]) {\n const depData = this.depResolver.getDependencies(component);\n const modifiedIdsStr = modifiedIds?.map((id) => id.toStringWithoutVersion());\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n const version = modifiedIdsStr?.includes(idWithoutVersion) ? `<modified>` : dep.version;\n return `${idWithoutVersion}@${version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | undefined,\n toVersion: string | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n if (toVersion && !version)\n throw new BitError('error: componentsDiff expects to get version when toVersion is entered');\n const componentsDiffResults = await Promise.all(\n components.map((component) => this.computeDiff(component, version, toVersion, diffOpts))\n );\n return componentsDiffResults;\n }\n\n /**\n * this method operates in two modes:\n * 1. workspace mode - the version and toVersion can be undefined.\n * 2. scope mode - the version and toVersion are mandatory.\n */\n private async computeDiff(\n component: Component,\n version: string | undefined,\n toVersion: string | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults> {\n const consumerComponent = component.state._consumer as ConsumerComponent;\n\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent =\n consumerComponent.modelComponent || (await this.scope.legacyScope.getModelComponentIfExist(component.id));\n\n if (this.workspace && component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n if (!modelComponent) {\n if (version || toVersion) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const repository = this.scope.legacyScope.objects;\n const idsToImport = compact([\n version ? component.id.changeVersion(version) : undefined,\n toVersion ? component.id.changeVersion(toVersion) : undefined,\n ]);\n const idList = ComponentIdList.fromArray(idsToImport);\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\n if (diffOpts.compareToParent) {\n if (!version) throw new BitError('--parent flag expects to get version');\n if (toVersion) throw new BitError('--parent flag expects to get only one version');\n const versionObject = await modelComponent.loadVersion(version, repository);\n const parent = versionObject.parents[0];\n toVersion = version;\n version = parent ? modelComponent.getTagOfRefIfExists(parent) : undefined;\n }\n const fromVersionObject = version ? await modelComponent.loadVersion(version, repository) : undefined;\n const toVersionObject = toVersion ? await modelComponent.loadVersion(toVersion, repository) : undefined;\n const fromVersionFiles = await fromVersionObject?.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject?.modelFilesToSourceFiles(repository);\n\n const fromFiles = fromVersionFiles || consumerComponent.componentFromModel?.files;\n if (!fromFiles)\n throw new Error(\n `computeDiff: fromFiles must be defined for ${component.id.toString()}. if on workspace, consumerComponent.componentFromModel must be set. if on scope, fromVersionFiles must be set`\n );\n const toFiles = toVersionFiles || consumerComponent.files;\n const fromVersionLabel = version || component.id.version;\n const toVersionLabel = toVersion || component.id.version;\n\n diffResult.filesDiff = await getFilesDiff(fromFiles!, toFiles, fromVersionLabel, toVersionLabel);\n const fromVersionComponent = version\n ? await modelComponent.toConsumerComponent(version, this.scope.legacyScope.name, repository)\n : consumerComponent.componentFromModel;\n\n const toVersionComponent = toVersion\n ? await modelComponent.toConsumerComponent(toVersion, this.scope.legacyScope.name, repository)\n : consumerComponent;\n\n if (!fromVersionComponent) {\n throw new Error(\n `computeDiff: fromVersionComponent must be defined for ${component.id.toString()}. if on workspace, consumerComponent.componentFromModel must be set. if on scope, \"version\" must be set`\n );\n }\n\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n SchemaAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n graphql,\n component,\n scope,\n loggerMain,\n cli,\n workspace,\n tester,\n depResolver,\n importer,\n schema,\n ]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain,\n SchemaMain,\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n schema,\n workspace\n );\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(() => componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AACA,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,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,QAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAS,oBAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;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K/D,UAAU,CAAC/E,UAAU,CAAC;AACpH;AAEA,eAAekH,gBAAgBA,CAC7B6B,UAA6B,EAC7BC,UAA6B,EAC7BjE,UAAuB,EACvBN,QAAqB,EACrB;EACAM,UAAU,CAAC/E,UAAU,GAAG,MAAM,IAAAiJ,sCAA4B,EAACF,UAAU,EAAEC,UAAU,EAAEvE,QAAQ,CAAC;EAC5FM,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEA8C,2CAAsB,CAACqB,UAAU,CAAC1L,oBAAoB,CAAC;AAAC,IAAA2L,QAAA,GAAAjB,OAAA,CAAAkB,OAAA,GAEzC5L,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_lodash","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_legacy","_tester","_component","_schema","_cache","_componentCompare","_componentCompare2","_diffCmd","_importer","_harmonyModules","_compareComponentPairs","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","PERSISTENT_CACHE_TTL_MS","ComponentCompareMain","constructor","componentAspect","scope","logger","tester","depResolver","importer","schema","cache","workspace","Map","getOrCompute","inflight","cacheKey","compute","cacheable","skipPersistentCache","pending","get","cached","undefined","started","promise","then","result","set","finally","delete","compare","baseIdStr","compareIdStr","compareInflight","computeCompare","isLiveWorkspace","comparesLiveWorkspace","isLiveCheckout","idStr","id","ComponentID","fromString","checkedOut","getIdIfExist","hasVersion","version","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","comparingWithLocalChanges","BitError","toString","importObjectsFromMainIfExist","baseVersion","compareVersion","components","getMany","baseComponent","compareComponent","componentWithoutVersion","changeVersion","checkedOutVersion","compareIsLiveWorkspace","Boolean","effectiveBaseVersion","effectiveCompareVersion","diff","computeDiff","filesDiff","fieldsDiff","baseTestFiles","getTestFiles","map","file","relative","compareTestFiles","allTestFiles","testFilesDiff","filter","fileDiff","includes","filePath","status","baseId","compareId","code","fields","tests","compareComponents","pairs","options","compareComponentPairs","offset","limit","concurrency","concurrentComponentsLimit","onError","pair","err","warn","apiDiffs","getAPIDiff","isApiDiffCacheable","base","live","pendingOrTransient","reason","apiDiffInflight","computeAPIDiff","v","diffByCLIValues","pattern","toVersion","verbose","table","parent","OutsideWorkspaceError","ids","idsByPattern","listTagPendingIds","consumer","length","diffResults","componentsDiff","formatDepsAsTable","compareToParent","onDestroy","getConfigForDiffById","componentId","resolveComponentId","component","Error","getConfigForDiffByCompObject","modifiedIds","depData","getDependencies","modifiedIdsStr","toStringWithoutVersion","serializedToString","dep","idWithoutVersion","__type","split","lifecycle","source","serializeAndSort","deps","serialized","serialize","sort","serializeAspect","comp","aspects","state","withoutEntries","BuilderAspect","DependencyResolverAspect","toLegacy","sortById","toConfigObject","dependencies","diffOpts","componentsDiffResults","Promise","all","consumerComponent","_consumer","diffResult","hasDiff","isDeleted","modelFiles","files","getFilesDiff","fsFiles","repository","objects","idsToImport","compact","idList","ComponentIdList","fromArray","scopeImporter","importWithoutDeps","versionObject","loadVersion","parents","getTagOfRefIfExists","fromVersionObject","toVersionObject","fromVersionFiles","modelFilesToSourceFiles","toVersionFiles","fromFiles","componentFromModel","toFiles","fromVersionLabel","toVersionLabel","fromVersionComponent","toConsumerComponent","name","toVersionComponent","updateFieldsDiff","diffBetweenVersionsObjects","fromVersion","toComponentId","color","hash","provider","graphql","loggerMain","cli","createLogger","ComponentCompareAspect","componentCompareMain","register","DiffCmd","componentCompareSchema","exports","GraphqlAspect","ComponentAspect","ScopeAspect","LoggerAspect","CLIAspect","WorkspaceAspect","TesterAspect","ImporterAspect","SchemaAspect","CacheAspect","MainRuntime","find","diffOutput","componentA","componentB","diffBetweenComponentsObjects","addRuntime","_default","default"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { compact } from 'lodash';\nimport { BitError } from '@teambit/bit-error';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport type { ScopeMain } from '@teambit/scope';\nimport { ScopeAspect } from '@teambit/scope';\nimport type { GraphqlMain } from '@teambit/graphql';\nimport { GraphqlAspect } from '@teambit/graphql';\nimport { BuilderAspect } from '@teambit/builder';\nimport type { ModelComponent, Version } from '@teambit/objects';\nimport type { ConsumerComponent } from '@teambit/legacy.consumer-component';\nimport type { DependencyList, DependencyResolverMain, SerializedDependency } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } from '@teambit/dependency-resolver';\nimport type { LoggerMain, Logger } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { DiffOptions, DiffResults, FieldsDiff, FileDiff } from '@teambit/legacy.component-diff';\nimport { getFilesDiff, diffBetweenComponentsObjects } from '@teambit/legacy.component-diff';\nimport type { TesterMain } from '@teambit/tester';\nimport { TesterAspect } from '@teambit/tester';\nimport type { Component, ComponentMain } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport type { SchemaMain } from '@teambit/schema';\nimport { SchemaAspect } from '@teambit/schema';\nimport type { CacheMain } from '@teambit/cache';\nimport { CacheAspect } from '@teambit/cache';\n\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { DiffCmd } from './diff-cmd';\nimport type { ImporterMain } from '@teambit/importer';\nimport { ImporterAspect } from '@teambit/importer';\nimport { concurrentComponentsLimit } from '@teambit/harmony.modules.concurrency';\nimport { compareComponentPairs } from './compare-component-pairs';\nimport type { ComponentComparePair } from './compare-component-pairs';\n\nexport type ComponentCompareResult = {\n id: string;\n baseId: string;\n compareId: string;\n code: FileDiff[];\n fields: FieldsDiff[];\n tests: FileDiff[];\n /**\n * true when the compare side is the live workspace (on-disk files, incl. uncommitted changes).\n * such a result is inherently mutable, so it must never be persisted to the cross-run cache —\n * only the in-flight single-flight dedupe applies. not exposed via graphql.\n */\n isLiveWorkspace?: boolean;\n};\n\ntype ConfigDiff = {\n version?: string;\n dependencies?: string[];\n aspects?: Record<string, any>;\n};\n\n/**\n * expiry for persisted compare/api-diff results. the results themselves are immutable (keyed on snap\n * hashes), but the payloads are heavy — full per-file contents per pair — so without a TTL the cache\n * directory grows with every pair ever viewed. two weeks comfortably covers a review cycle.\n */\nconst PERSISTENT_CACHE_TTL_MS = 14 * 24 * 60 * 60 * 1000;\n\nexport class ComponentCompareMain {\n constructor(\n private componentAspect: ComponentMain,\n private scope: ScopeMain,\n private logger: Logger,\n private tester: TesterMain,\n private depResolver: DependencyResolverMain,\n private importer: ImporterMain,\n private schema: SchemaMain,\n private cache: CacheMain,\n private workspace?: Workspace\n ) {}\n\n // in-flight `compute` promises, so concurrent callers for the same pair share one computation\n // instead of recomputing (the lane compare UI and lane-diff status hit the same pairs in parallel\n // on a cold load). Persisted results survive restarts via the global `@teambit/cache` aspect.\n private compareInflight = new Map<string, Promise<ComponentCompareResult>>();\n private apiDiffInflight = new Map<string, Promise<Record<string, any> | null>>();\n\n /**\n * Read-through cache with single-flight dedupe: serve a persisted result, else share an in-flight\n * computation, else compute once and persist. Most `(baseId, compareId)` pairs are immutable (keyed\n * on snap hashes), so a cached result never goes stale. `cacheable` gates which results are persisted.\n *\n * `skipPersistentCache` bypasses the persistent cache entirely (neither read nor write) while still\n * sharing the in-flight computation. Callers must set it whenever the result depends on mutable state\n * the key does not capture — e.g. a live-workspace diff against on-disk files — so a previously\n * persisted snap-to-snap result for the same key is never served in its place.\n */\n private async getOrCompute<T>(\n inflight: Map<string, Promise<T>>,\n cacheKey: string,\n compute: () => Promise<T>,\n cacheable: (value: T) => boolean = () => true,\n skipPersistentCache = false\n ): Promise<T> {\n const pending = inflight.get(cacheKey);\n if (pending) return pending;\n if (!skipPersistentCache) {\n const cached = await this.cache.get<T>(cacheKey);\n if (cached !== undefined) return cached;\n // a concurrent caller may have started computing while we awaited the cache read.\n const started = inflight.get(cacheKey);\n if (started) return started;\n }\n const promise = compute()\n .then((result) => {\n // TTL keeps the cache bounded: compare payloads embed full per-file contents for every pair,\n // so without an expiry every pair ever viewed stays on disk forever. entries are cheap to\n // recompute after expiry (sources still cached in the scope), so a stale-eviction is harmless.\n if (!skipPersistentCache && cacheable(result)) void this.cache.set(cacheKey, result, PERSISTENT_CACHE_TTL_MS);\n return result;\n })\n .finally(() => inflight.delete(cacheKey));\n inflight.set(cacheKey, promise);\n return promise;\n }\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n return this.getOrCompute(\n this.compareInflight,\n `component-compare:result:${baseIdStr}|${compareIdStr}`,\n () => this.computeCompare(baseIdStr, compareIdStr),\n // never persist a live-workspace diff: it reflects on-disk files (incl. uncommitted changes),\n // so a cached copy would go stale the moment the user edits a file. the (baseId, compareId)\n // pair is otherwise immutable (keyed on snap hashes), so those stay cacheable.\n (result) => !result.isLiveWorkspace,\n // whether this call *reads* the persistent cache is decided up front from the same signal:\n // a live-workspace compare must skip the cache entirely, otherwise a snap-to-snap result\n // persisted for this key in a prior run (or a non-live context) would mask on-disk changes.\n this.comparesLiveWorkspace(baseIdStr, compareIdStr)\n );\n }\n\n /**\n * cheap, synchronous pre-check mirroring the `comparingWithLocalChanges` / `compareIsLiveWorkspace`\n * logic in `computeCompare`: will this compare diff against live on-disk workspace files rather than\n * two immutable snaps? errs toward `true` (skip the persistent cache) whenever the id cannot be\n * classified, so a stale snap-to-snap result is never served in place of a live one.\n */\n private comparesLiveWorkspace(baseIdStr: string, compareIdStr: string): boolean {\n if (!this.workspace) return false; // scope/remote host: every compare is an immutable snap-to-snap pair\n if (baseIdStr === compareIdStr) return true; // the \"local changes\" view: checked-out snap vs on-disk files\n return this.isLiveCheckout(compareIdStr);\n }\n\n /**\n * whether this id refers to the component version currently checked out on disk — the one case\n * where \"the same versioned id\" can produce different data over time (the user edits files). errs\n * toward `true` when the id cannot be classified, so a stale cached result is never served.\n */\n private isLiveCheckout(idStr: string): boolean {\n if (!this.workspace) return false;\n let id: ComponentID;\n try {\n id = ComponentID.fromString(idStr);\n } catch {\n return true; // unclassifiable id → assume live so a stale cached diff is never returned\n }\n const checkedOut = this.workspace.getIdIfExist(id);\n if (!checkedOut) return false; // not checked out → a stored snap, safe to cache\n // live only when this side is the exact version currently checked out on disk.\n return !id.hasVersion() || checkedOut.version === id.version;\n }\n\n /** The original `compare()` body — moved here so the public method can wrap with memo + single-flight. */\n private async computeCompare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId);\n const comparingWithLocalChanges = this.workspace && baseIdStr === compareIdStr;\n\n if (!modelComponent) {\n throw new BitError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n // import missing components that might be on main\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {\n cache: true,\n });\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const components = await host.getMany([baseCompId, compareCompId]);\n const baseComponent = components?.[0];\n const compareComponent = components?.[1];\n const componentWithoutVersion = await host.get((baseCompId || compareCompId).changeVersion(undefined));\n\n // When the compare side is the component currently checked out in the workspace, diff against the\n // on-disk files rather than a stored snap: passing `undefined` as the compare version makes\n // `computeDiff` fall back to `consumerComponent.files`, so uncommitted local changes are included.\n // This covers two cases with one code path:\n // - base === compare (the classic \"local changes\" view): checked-out model → workspace files.\n // - base = an earlier version: that version's committed changes + any uncommitted changes on top.\n // Without this, the default workspace compare resolves base and compare to the same checked-out\n // snap and reports no changes, collapsing the compare view to only its always-on sections.\n const checkedOutVersion = componentWithoutVersion?.id.version;\n const compareIsLiveWorkspace = Boolean(this.workspace && checkedOutVersion && compareVersion === checkedOutVersion);\n const effectiveBaseVersion = comparingWithLocalChanges ? undefined : baseVersion;\n const effectiveCompareVersion = comparingWithLocalChanges || compareIsLiveWorkspace ? undefined : compareVersion;\n\n const diff = componentWithoutVersion\n ? await this.computeDiff(componentWithoutVersion, effectiveBaseVersion, effectiveCompareVersion, {})\n : {\n filesDiff: [],\n fieldsDiff: [],\n };\n\n const baseTestFiles =\n (baseComponent && (await this.tester.getTestFiles(baseComponent).map((file) => file.relative))) || [];\n const compareTestFiles =\n (compareComponent && (await this.tester.getTestFiles(compareComponent).map((file) => file.relative))) || [];\n\n const allTestFiles = [...baseTestFiles, ...compareTestFiles];\n\n const testFilesDiff = (diff.filesDiff || []).filter(\n (fileDiff: FileDiff) => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED'\n );\n\n return {\n id: `${baseCompId}-${compareCompId}`,\n baseId: baseIdStr,\n compareId: compareIdStr,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n isLiveWorkspace: compareIsLiveWorkspace,\n };\n }\n\n /**\n * compare a paginated slice of component pairs in one call.\n * a pair that fails to compare (e.g. a component without versions) becomes `null` in the\n * returned array rather than failing the whole batch. the array is aligned to the requested\n * slice (`pairs[offset .. offset + limit]`).\n */\n async compareComponents(\n pairs: ComponentComparePair[],\n options?: { offset?: number; limit?: number }\n ): Promise<Array<ComponentCompareResult | null>> {\n return compareComponentPairs(pairs, (baseId, compareId) => this.compare(baseId, compareId), {\n offset: options?.offset,\n limit: options?.limit,\n concurrency: concurrentComponentsLimit(),\n onError: (pair, err) => {\n this.logger.warn(`compareComponents: failed to compare ${pair.baseId} <> ${pair.compareId}`, err);\n },\n });\n }\n\n /**\n * api-diff a paginated slice of component pairs in one call — the bulk counterpart of the single\n * `getAPIDiff`, mirroring `compareComponents`. reuses `getAPIDiff` per pair (so its disk memo +\n * single-flight dedupe still apply), turning a pair whose diff throws into `null` rather than\n * failing the whole batch. the returned array is aligned to the requested slice.\n */\n async apiDiffs(\n pairs: ComponentComparePair[],\n options?: { offset?: number; limit?: number }\n ): Promise<Array<Record<string, any> | null>> {\n return compareComponentPairs(pairs, (baseId, compareId) => this.getAPIDiff(baseId, compareId), {\n offset: options?.offset,\n limit: options?.limit,\n concurrency: concurrentComponentsLimit(),\n onError: (pair, err) => {\n this.logger.warn(`apiDiffs: failed to compute api diff ${pair.baseId} <> ${pair.compareId}`, err);\n },\n });\n }\n\n private static isApiDiffCacheable(result: Record<string, any>): boolean {\n // a live-extracted side reflects the current working tree, not the snap the cache key names —\n // persisting it would serve a stale (possibly degraded) diff for that pair forever.\n if (result.base?.live || result.compare?.live) return false;\n if (result.status === 'COMPUTED') return true;\n // A non-COMPUTED result is only safe to persist (disk cache, keyed on the immutable snap pair, no\n // TTL) when it can never change for that pair. FAILED is transient. NOT_BUILT is *pending*: the snap\n // simply hasn't been built yet, and once CI builds it (same hash) the schema appears — caching the\n // pre-build \"unavailable\" answer would keep the API view blank forever. NO_EXTRACTOR/DISABLED are\n // stable properties of the snap's env, so they stay cacheable.\n const pendingOrTransient = (reason?: string) => reason === 'FAILED' || reason === 'NOT_BUILT';\n return !pendingOrTransient(result.base?.reason) && !pendingOrTransient(result.compare?.reason);\n }\n\n async getAPIDiff(baseIdStr: string, compareIdStr: string): Promise<Record<string, any> | null> {\n // never persist a result that can still change: `null` (snaps couldn't load), FAILED (schema\n // retrieval threw) and NOT_BUILT (snap not yet built) must recompute next call; NO_EXTRACTOR/\n // DISABLED are stable env properties and safe to cache (see `isApiDiffCacheable`).\n // the version namespace invalidates older computed results on engine changes:\n // v2 — availability-aware results; v3 — self-referential-returnType display fix.\n // skip the persistent cache when EITHER side is the live checkout: SchemaMain live-extracts the\n // schema of a modified checkout of the exact same versioned id, so a snap-to-snap result cached\n // under this key in a prior (unmodified) run would mask the user's on-disk API changes. both\n // sides are checked (unlike `compare()`, where only the compare side can be live) because the\n // checked-out version can appear on either side of an API diff pair.\n return this.getOrCompute(\n this.apiDiffInflight,\n `component-compare:api-diff:v3:${baseIdStr}|${compareIdStr}`,\n () => this.computeAPIDiff(baseIdStr, compareIdStr),\n (v) => v !== null && ComponentCompareMain.isApiDiffCacheable(v),\n this.isLiveCheckout(baseIdStr) || this.isLiveCheckout(compareIdStr)\n );\n }\n\n private async computeAPIDiff(baseIdStr: string, compareIdStr: string): Promise<Record<string, any> | null> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], { cache: true });\n const components = await host.getMany([baseCompId, compareCompId]);\n const baseComponent = components?.[0];\n const compareComponent = components?.[1];\n if (!baseComponent || !compareComponent) return null;\n return this.schema.computeAPIDiff(baseComponent, compareComponent);\n }\n\n async diffByCLIValues(\n pattern?: string,\n version?: string,\n toVersion?: string,\n { verbose, table, parent }: { verbose?: boolean; table?: boolean; parent?: boolean } = {}\n ): Promise<any> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const ids = pattern ? await this.workspace.idsByPattern(pattern) : await this.workspace.listTagPendingIds();\n const consumer = this.workspace.consumer;\n if (!ids.length) {\n return [];\n }\n const diffResults = await this.componentsDiff(ids, version, toVersion, {\n verbose,\n formatDepsAsTable: table,\n compareToParent: parent,\n });\n await consumer.onDestroy('diff');\n return diffResults;\n }\n\n async getConfigForDiffById(id: string): Promise<ConfigDiff> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const component = await workspace.scope.get(componentId, false);\n if (!component) throw new Error(`getConfigForDiff: unable to find component ${id} in local scope`);\n return this.getConfigForDiffByCompObject(component);\n }\n\n async getConfigForDiffByCompObject(component: Component, modifiedIds?: ComponentID[]) {\n const depData = this.depResolver.getDependencies(component);\n const modifiedIdsStr = modifiedIds?.map((id) => id.toStringWithoutVersion());\n const serializedToString = (dep: SerializedDependency) => {\n const idWithoutVersion = dep.__type === 'package' ? dep.id : dep.id.split('@')[0];\n const version = modifiedIdsStr?.includes(idWithoutVersion) ? `<modified>` : dep.version;\n return `${idWithoutVersion}@${version} (${dep.lifecycle}) ${dep.source ? `(${dep.source})` : ''}`;\n };\n const serializeAndSort = (deps: DependencyList) => {\n const serialized = deps.serialize().map(serializedToString);\n return serialized.sort();\n };\n const serializeAspect = (comp: Component) => {\n const aspects = comp.state.aspects.withoutEntries([BuilderAspect.id, DependencyResolverAspect.id]);\n // return aspects.serialize();\n return aspects.toLegacy().sortById().toConfigObject();\n };\n return {\n version: component.id.version,\n dependencies: serializeAndSort(depData),\n aspects: serializeAspect(component),\n };\n }\n\n private async componentsDiff(\n ids: ComponentID[],\n version: string | undefined,\n toVersion: string | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const components = await this.workspace.getMany(ids);\n if (!components.length) throw new BitError('failed loading the components');\n if (toVersion && !version)\n throw new BitError('error: componentsDiff expects to get version when toVersion is entered');\n const componentsDiffResults = await Promise.all(\n components.map((component) => this.computeDiff(component, version, toVersion, diffOpts))\n );\n return componentsDiffResults;\n }\n\n /**\n * this method operates in two modes:\n * 1. workspace mode - the version and toVersion can be undefined.\n * 2. scope mode - the version and toVersion are mandatory.\n */\n private async computeDiff(\n component: Component,\n version: string | undefined,\n toVersion: string | undefined,\n diffOpts: DiffOptions\n ): Promise<DiffResults> {\n const consumerComponent = component.state._consumer as ConsumerComponent;\n\n const diffResult: DiffResults = { id: component.id, hasDiff: false };\n const modelComponent =\n consumerComponent.modelComponent || (await this.scope.legacyScope.getModelComponentIfExist(component.id));\n\n if (this.workspace && component.isDeleted()) {\n // component exists in the model but not in the filesystem, show all files as deleted\n const modelFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff(modelFiles, [], component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n if (!modelComponent) {\n if (version || toVersion) {\n throw new BitError(`component ${component.id.toString()} doesn't have any version yet`);\n }\n // it's a new component. not modified. show all files as new.\n const fsFiles = consumerComponent.files;\n diffResult.filesDiff = await getFilesDiff([], fsFiles, component.id.version, component.id.version);\n if (hasDiff(diffResult)) diffResult.hasDiff = true;\n return diffResult;\n }\n const repository = this.scope.legacyScope.objects;\n const idsToImport = compact([\n version ? component.id.changeVersion(version) : undefined,\n toVersion ? component.id.changeVersion(toVersion) : undefined,\n ]);\n const idList = ComponentIdList.fromArray(idsToImport);\n await this.scope.legacyScope.scopeImporter.importWithoutDeps(idList, { cache: true, reason: 'to show diff' });\n if (diffOpts.compareToParent) {\n if (!version) throw new BitError('--parent flag expects to get version');\n if (toVersion) throw new BitError('--parent flag expects to get only one version');\n const versionObject = await modelComponent.loadVersion(version, repository);\n const parent = versionObject.parents[0];\n toVersion = version;\n version = parent ? modelComponent.getTagOfRefIfExists(parent) : undefined;\n }\n const fromVersionObject = version ? await modelComponent.loadVersion(version, repository) : undefined;\n const toVersionObject = toVersion ? await modelComponent.loadVersion(toVersion, repository) : undefined;\n const fromVersionFiles = await fromVersionObject?.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject?.modelFilesToSourceFiles(repository);\n\n const fromFiles = fromVersionFiles || consumerComponent.componentFromModel?.files;\n if (!fromFiles)\n throw new Error(\n `computeDiff: fromFiles must be defined for ${component.id.toString()}. if on workspace, consumerComponent.componentFromModel must be set. if on scope, fromVersionFiles must be set`\n );\n const toFiles = toVersionFiles || consumerComponent.files;\n const fromVersionLabel = version || component.id.version;\n const toVersionLabel = toVersion || component.id.version;\n\n diffResult.filesDiff = await getFilesDiff(fromFiles!, toFiles, fromVersionLabel, toVersionLabel);\n const fromVersionComponent = version\n ? await modelComponent.toConsumerComponent(version, this.scope.legacyScope.name, repository)\n : consumerComponent.componentFromModel;\n\n const toVersionComponent = toVersion\n ? await modelComponent.toConsumerComponent(toVersion, this.scope.legacyScope.name, repository)\n : consumerComponent;\n\n if (!fromVersionComponent) {\n throw new Error(\n `computeDiff: fromVersionComponent must be defined for ${component.id.toString()}. if on workspace, consumerComponent.componentFromModel must be set. if on scope, \"version\" must be set`\n );\n }\n\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n\n return diffResult;\n }\n\n async diffBetweenVersionsObjects(\n modelComponent: ModelComponent,\n fromVersionObject: Version,\n toVersionObject: Version,\n fromVersion: string,\n toVersion: string,\n diffOpts: DiffOptions\n ) {\n const diffResult: DiffResults = { id: modelComponent.toComponentId(), hasDiff: false };\n const scope = this.scope.legacyScope;\n const repository = scope.objects;\n const fromVersionFiles = await fromVersionObject.modelFilesToSourceFiles(repository);\n const toVersionFiles = await toVersionObject.modelFilesToSourceFiles(repository);\n const color = diffOpts.color ?? true;\n diffResult.filesDiff = await getFilesDiff(\n fromVersionFiles,\n toVersionFiles,\n fromVersion,\n toVersion,\n undefined,\n color\n );\n const fromVersionComponent = await modelComponent.toConsumerComponent(\n fromVersionObject.hash().toString(),\n scope.name,\n repository\n );\n const toVersionComponent = await modelComponent.toConsumerComponent(\n toVersionObject.hash().toString(),\n scope.name,\n repository\n );\n await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);\n return diffResult;\n }\n\n static slots = [];\n static dependencies = [\n GraphqlAspect,\n ComponentAspect,\n ScopeAspect,\n LoggerAspect,\n CLIAspect,\n WorkspaceAspect,\n TesterAspect,\n DependencyResolverAspect,\n ImporterAspect,\n SchemaAspect,\n CacheAspect,\n ];\n static runtime = MainRuntime;\n static async provider([\n graphql,\n component,\n scope,\n loggerMain,\n cli,\n workspace,\n tester,\n depResolver,\n importer,\n schema,\n cache,\n ]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain,\n SchemaMain,\n CacheMain,\n ]) {\n const logger = loggerMain.createLogger(ComponentCompareAspect.id);\n const componentCompareMain = new ComponentCompareMain(\n component,\n scope,\n logger,\n tester,\n depResolver,\n importer,\n schema,\n cache,\n workspace\n );\n cli.register(new DiffCmd(componentCompareMain));\n graphql.register(() => componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nfunction hasDiff(diffResult: DiffResults): boolean {\n return !!((diffResult.filesDiff && diffResult.filesDiff.find((file) => file.diffOutput)) || diffResult.fieldsDiff);\n}\n\nasync function updateFieldsDiff(\n componentA: ConsumerComponent,\n componentB: ConsumerComponent,\n diffResult: DiffResults,\n diffOpts: DiffOptions\n) {\n diffResult.fieldsDiff = await diffBetweenComponentsObjects(componentA, componentB, diffOpts);\n diffResult.hasDiff = hasDiff(diffResult);\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;AACA,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,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AA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AAC;IAC/CL,OAAO,CAACM,QAAQ,CAAC,MAAM,IAAAE,0CAAsB,EAACH,oBAAoB,CAAC,CAAC;IACpE,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAA7N,oBAAA,GAAAA,oBAAA;AAAApB,eAAA,CAtfYoB,oBAAoB,WA8bhB,EAAE;AAAApB,eAAA,CA9bNoB,oBAAoB,kBA+bT,CACpB8N,wBAAa,EACbC,4BAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZpE,8CAAwB,EACxBqE,0BAAc,EACdC,sBAAY,EACZC,oBAAW,CACZ;AAAA3P,eAAA,CA3cUoB,oBAAoB,aA4cdwO,kBAAW;AA4C9B,SAAS5D,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAACnG,SAAS,IAAImG,UAAU,CAACnG,SAAS,CAACiK,IAAI,CAAE5J,IAAI,IAAKA,IAAI,CAAC6J,UAAU,CAAC,IAAK/D,UAAU,CAAClG,UAAU,CAAC;AACpH;AAEA,eAAeoI,gBAAgBA,CAC7B8B,UAA6B,EAC7BC,UAA6B,EAC7BjE,UAAuB,EACvBN,QAAqB,EACrB;EACAM,UAAU,CAAClG,UAAU,GAAG,MAAM,IAAAoK,sCAA4B,EAACF,UAAU,EAAEC,UAAU,EAAEvE,QAAQ,CAAC;EAC5FM,UAAU,CAACC,OAAO,GAAGA,OAAO,CAACD,UAAU,CAAC;AAC1C;AAEA6C,2CAAsB,CAACsB,UAAU,CAAC9O,oBAAoB,CAAC;AAAC,IAAA+O,QAAA,GAAAlB,OAAA,CAAAmB,OAAA,GAEzChP,oBAAoB","ignoreList":[]}
|
|
@@ -4,16 +4,21 @@ import type { Harmony, SlotRegistry } from '@teambit/harmony';
|
|
|
4
4
|
import type { ComponentUI } from '@teambit/component';
|
|
5
5
|
import type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
|
|
6
6
|
import type { ComponentCompareProps, TabItem } from '@teambit/component.ui.component-compare.models.component-compare-props';
|
|
7
|
+
import type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';
|
|
7
8
|
export type ComponentCompareNav = Array<TabItem>;
|
|
8
9
|
export type ComponentCompareNavSlot = SlotRegistry<ComponentCompareNav>;
|
|
10
|
+
export type ComponentCompareTabSlot = SlotRegistry<TabItem | TabItem[]>;
|
|
11
|
+
export type ApiDiffInsightSlot = SlotRegistry<ApiDiffInsight | ApiDiffInsight[]>;
|
|
9
12
|
export declare class ComponentCompareUI {
|
|
10
13
|
private host;
|
|
11
14
|
private navSlot;
|
|
12
15
|
private routeSlot;
|
|
16
|
+
private compareTabSlot;
|
|
17
|
+
private apiDiffInsightSlot;
|
|
13
18
|
private compUI;
|
|
14
|
-
constructor(host: string, navSlot: ComponentCompareNavSlot, routeSlot: RouteSlot, compUI: ComponentUI);
|
|
19
|
+
constructor(host: string, navSlot: ComponentCompareNavSlot, routeSlot: RouteSlot, compareTabSlot: ComponentCompareTabSlot, apiDiffInsightSlot: ApiDiffInsightSlot, compUI: ComponentUI);
|
|
15
20
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
16
|
-
static slots: (((registerFn: () => string) => SlotRegistry<ComponentCompareNavSlot>) | ((registerFn: () => string) => SlotRegistry<RouteSlot>))[];
|
|
21
|
+
static slots: (((registerFn: () => string) => SlotRegistry<ComponentCompareNavSlot>) | ((registerFn: () => string) => SlotRegistry<RouteSlot>) | ((registerFn: () => string) => SlotRegistry<ApiDiffInsight | ApiDiffInsight[]>) | ((registerFn: () => string) => SlotRegistry<TabItem[] | TabItem>))[];
|
|
17
22
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
18
23
|
getComponentComparePage: (props?: ComponentCompareProps & {
|
|
19
24
|
pinned?: boolean;
|
|
@@ -22,8 +27,43 @@ export declare class ComponentCompareUI {
|
|
|
22
27
|
getChangelogComparePage: () => React.JSX.Element;
|
|
23
28
|
registerNavigation(nav: TabItem | Array<TabItem>): this;
|
|
24
29
|
registerRoutes(routes: RouteProps[]): this;
|
|
30
|
+
/**
|
|
31
|
+
* Register an inline-compare tab. The tab's `id` should match the new toolbar view-mode ids
|
|
32
|
+
* (`inline-code`, `inline-preview`, `inline-docs`, `inline-deps`, `inline-tests`, `inline-config`).
|
|
33
|
+
* Used by both the single-component compare page and lane-compare.
|
|
34
|
+
*/
|
|
35
|
+
registerCompareTab(tab: TabItem | TabItem[]): this;
|
|
36
|
+
/**
|
|
37
|
+
* contribute intelligence to the API diff view: per-change renderers for migration
|
|
38
|
+
* hints, affected dependents, codemods, etc. rendered in each change block's
|
|
39
|
+
* insights area (lane compare API view and the single-component API tab).
|
|
40
|
+
*/
|
|
41
|
+
registerApiDiffInsight(insight: ApiDiffInsight | ApiDiffInsight[]): this;
|
|
42
|
+
private _resolvedApiDiffInsights?;
|
|
43
|
+
private _resolvedApiDiffInsightsKey?;
|
|
44
|
+
/**
|
|
45
|
+
* Memoized by slot-entry count (mirroring `resolveCompareTabs`) so the returned array keeps a
|
|
46
|
+
* stable identity across renders — `LaneCompare` is React.memo'd, and a fresh array on every
|
|
47
|
+
* call would break its shallow compare and re-render the whole compare tree.
|
|
48
|
+
*/
|
|
49
|
+
getApiDiffInsights(): ApiDiffInsight[];
|
|
50
|
+
private _resolvedCompareTabs?;
|
|
51
|
+
private _resolvedCompareTabsKey?;
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the inline-compare tabs that aspects register via `registerCompareTab` (code →
|
|
54
|
+
* inline-code/deps/tests/config, compositions → inline-preview, docs → inline-docs, …). Dedup by
|
|
55
|
+
* id (first registration wins), sort by order. Memoized by slot-entry count so the resolved list
|
|
56
|
+
* keeps a stable identity across renders. Owning each tab in its aspect keeps component-compare
|
|
57
|
+
* decoupled from code/preview/docs UI; single-component compare and lane-compare both read this.
|
|
58
|
+
*/
|
|
59
|
+
resolveCompareTabs(): TabItem[];
|
|
25
60
|
get routes(): Map<string, RouteProps[] | RouteProps>;
|
|
26
61
|
get navLinks(): Map<string, ComponentCompareNav>;
|
|
27
62
|
get tabs(): TabItem[];
|
|
28
|
-
static provider([componentUi]: [ComponentUI], _: any, [navSlot, routeSlot
|
|
63
|
+
static provider([componentUi]: [ComponentUI], _: any, [navSlot, routeSlot, compareTabSlot, apiDiffInsightSlot]: [
|
|
64
|
+
ComponentCompareNavSlot,
|
|
65
|
+
RouteSlot,
|
|
66
|
+
ComponentCompareTabSlot,
|
|
67
|
+
ApiDiffInsightSlot
|
|
68
|
+
], harmony: Harmony): Promise<ComponentCompareUI>;
|
|
29
69
|
}
|
|
@@ -32,13 +32,6 @@ function _component() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function _componentUiComponentCompare() {
|
|
36
|
-
const data = require("@teambit/component.ui.component-compare.component-compare");
|
|
37
|
-
_componentUiComponentCompare = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
35
|
function _ui() {
|
|
43
36
|
const data = require("@teambit/ui");
|
|
44
37
|
_ui = function () {
|
|
@@ -46,9 +39,9 @@ function _ui() {
|
|
|
46
39
|
};
|
|
47
40
|
return data;
|
|
48
41
|
}
|
|
49
|
-
function
|
|
42
|
+
function _componentUiComponentCompare() {
|
|
50
43
|
const data = require("@teambit/component.ui.component-compare.changelog");
|
|
51
|
-
|
|
44
|
+
_componentUiComponentCompare = function () {
|
|
52
45
|
return data;
|
|
53
46
|
};
|
|
54
47
|
return data;
|
|
@@ -88,29 +81,40 @@ function _componentCompareChangelog() {
|
|
|
88
81
|
};
|
|
89
82
|
return data;
|
|
90
83
|
}
|
|
84
|
+
function _componentComparePage() {
|
|
85
|
+
const data = require("./component-compare-page");
|
|
86
|
+
_componentComparePage = function () {
|
|
87
|
+
return data;
|
|
88
|
+
};
|
|
89
|
+
return data;
|
|
90
|
+
}
|
|
91
91
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
92
92
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
93
93
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
94
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
95
94
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
96
95
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
97
96
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
98
97
|
class ComponentCompareUI {
|
|
99
|
-
constructor(host, navSlot, routeSlot, compUI) {
|
|
98
|
+
constructor(host, navSlot, routeSlot, compareTabSlot, apiDiffInsightSlot, compUI) {
|
|
100
99
|
this.host = host;
|
|
101
100
|
this.navSlot = navSlot;
|
|
102
101
|
this.routeSlot = routeSlot;
|
|
102
|
+
this.compareTabSlot = compareTabSlot;
|
|
103
|
+
this.apiDiffInsightSlot = apiDiffInsightSlot;
|
|
103
104
|
this.compUI = compUI;
|
|
104
105
|
_defineProperty(this, "getComponentComparePage", props => {
|
|
105
|
-
const tabs = props?.tabs || (() =>
|
|
106
|
-
const routes = props?.routes || (() => (0, _lodash().default)(this.routeSlot.values()));
|
|
106
|
+
const tabs = props?.tabs || (() => this.resolveCompareTabs());
|
|
107
107
|
const host = props?.host || this.host;
|
|
108
|
-
|
|
108
|
+
// The API compare tab is contributed by the api-reference aspect via `registerNavigation`
|
|
109
|
+
// (navSlot), which the redesign page's view-mode toolbar doesn't read. Hand it the API element
|
|
110
|
+
// lazily so it's resolved at render time — after every aspect's UI provider has registered,
|
|
111
|
+
// regardless of provider order — and rendered as a page-local `api` view mode.
|
|
112
|
+
const getApiTab = () => this.tabs.find(tab => tab.id === 'api')?.element;
|
|
113
|
+
return /*#__PURE__*/_react().default.createElement(_componentComparePage().ComponentComparePage, {
|
|
109
114
|
tabs: tabs,
|
|
110
|
-
routes: routes,
|
|
111
115
|
host: host,
|
|
112
|
-
|
|
113
|
-
})
|
|
116
|
+
getApiTab: getApiTab
|
|
117
|
+
});
|
|
114
118
|
});
|
|
115
119
|
_defineProperty(this, "getAspectsComparePage", () => {
|
|
116
120
|
return /*#__PURE__*/_react().default.createElement(_componentUiComponentCompareCompareAspects().ComponentCompareAspects, {
|
|
@@ -118,8 +122,12 @@ class ComponentCompareUI {
|
|
|
118
122
|
});
|
|
119
123
|
});
|
|
120
124
|
_defineProperty(this, "getChangelogComparePage", () => {
|
|
121
|
-
return /*#__PURE__*/_react().default.createElement(
|
|
125
|
+
return /*#__PURE__*/_react().default.createElement(_componentUiComponentCompare().ComponentCompareChangelog, null);
|
|
122
126
|
});
|
|
127
|
+
_defineProperty(this, "_resolvedApiDiffInsights", void 0);
|
|
128
|
+
_defineProperty(this, "_resolvedApiDiffInsightsKey", void 0);
|
|
129
|
+
_defineProperty(this, "_resolvedCompareTabs", void 0);
|
|
130
|
+
_defineProperty(this, "_resolvedCompareTabsKey", void 0);
|
|
123
131
|
}
|
|
124
132
|
registerNavigation(nav) {
|
|
125
133
|
if (Array.isArray(nav)) {
|
|
@@ -133,6 +141,60 @@ class ComponentCompareUI {
|
|
|
133
141
|
this.routeSlot.register(routes);
|
|
134
142
|
return this;
|
|
135
143
|
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Register an inline-compare tab. The tab's `id` should match the new toolbar view-mode ids
|
|
147
|
+
* (`inline-code`, `inline-preview`, `inline-docs`, `inline-deps`, `inline-tests`, `inline-config`).
|
|
148
|
+
* Used by both the single-component compare page and lane-compare.
|
|
149
|
+
*/
|
|
150
|
+
registerCompareTab(tab) {
|
|
151
|
+
this.compareTabSlot.register(tab);
|
|
152
|
+
return this;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* contribute intelligence to the API diff view: per-change renderers for migration
|
|
157
|
+
* hints, affected dependents, codemods, etc. rendered in each change block's
|
|
158
|
+
* insights area (lane compare API view and the single-component API tab).
|
|
159
|
+
*/
|
|
160
|
+
registerApiDiffInsight(insight) {
|
|
161
|
+
this.apiDiffInsightSlot.register(insight);
|
|
162
|
+
return this;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Memoized by slot-entry count (mirroring `resolveCompareTabs`) so the returned array keeps a
|
|
166
|
+
* stable identity across renders — `LaneCompare` is React.memo'd, and a fresh array on every
|
|
167
|
+
* call would break its shallow compare and re-render the whole compare tree.
|
|
168
|
+
*/
|
|
169
|
+
getApiDiffInsights() {
|
|
170
|
+
const slotEntries = this.apiDiffInsightSlot.toArray();
|
|
171
|
+
if (this._resolvedApiDiffInsights && this._resolvedApiDiffInsightsKey === slotEntries.length) {
|
|
172
|
+
return this._resolvedApiDiffInsights;
|
|
173
|
+
}
|
|
174
|
+
this._resolvedApiDiffInsights = (0, _lodash().default)(slotEntries.map(([, value]) => value));
|
|
175
|
+
this._resolvedApiDiffInsightsKey = slotEntries.length;
|
|
176
|
+
return this._resolvedApiDiffInsights;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Resolve the inline-compare tabs that aspects register via `registerCompareTab` (code →
|
|
180
|
+
* inline-code/deps/tests/config, compositions → inline-preview, docs → inline-docs, …). Dedup by
|
|
181
|
+
* id (first registration wins), sort by order. Memoized by slot-entry count so the resolved list
|
|
182
|
+
* keeps a stable identity across renders. Owning each tab in its aspect keeps component-compare
|
|
183
|
+
* decoupled from code/preview/docs UI; single-component compare and lane-compare both read this.
|
|
184
|
+
*/
|
|
185
|
+
resolveCompareTabs() {
|
|
186
|
+
const slotEntries = this.compareTabSlot.toArray();
|
|
187
|
+
if (this._resolvedCompareTabs && this._resolvedCompareTabsKey === slotEntries.length) {
|
|
188
|
+
return this._resolvedCompareTabs;
|
|
189
|
+
}
|
|
190
|
+
const registered = (0, _lodash().default)(slotEntries.map(([, value]) => value).filter(Boolean));
|
|
191
|
+
const seen = new Set();
|
|
192
|
+
const deduped = registered.filter(tab => seen.has(tab.id) ? false : (seen.add(tab.id), true));
|
|
193
|
+
const merged = deduped.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
194
|
+
this._resolvedCompareTabs = merged;
|
|
195
|
+
this._resolvedCompareTabsKey = slotEntries.length;
|
|
196
|
+
return merged;
|
|
197
|
+
}
|
|
136
198
|
get routes() {
|
|
137
199
|
return this.routeSlot.map;
|
|
138
200
|
}
|
|
@@ -154,12 +216,12 @@ class ComponentCompareUI {
|
|
|
154
216
|
}));
|
|
155
217
|
}));
|
|
156
218
|
}
|
|
157
|
-
static async provider([componentUi], _, [navSlot, routeSlot], harmony) {
|
|
219
|
+
static async provider([componentUi], _, [navSlot, routeSlot, compareTabSlot, apiDiffInsightSlot], harmony) {
|
|
158
220
|
const {
|
|
159
221
|
config
|
|
160
222
|
} = harmony;
|
|
161
223
|
const host = String(config.get('teambit.harmony/bit'));
|
|
162
|
-
const componentCompareUI = new ComponentCompareUI(host, navSlot, routeSlot, componentUi);
|
|
224
|
+
const componentCompareUI = new ComponentCompareUI(host, navSlot, routeSlot, compareTabSlot, apiDiffInsightSlot, componentUi);
|
|
163
225
|
const componentCompareSection = new (_componentCompare2().ComponentCompareSection)(componentCompareUI, false);
|
|
164
226
|
const pinnedComponentCompareSection = new (_componentCompare2().ComponentCompareSection)(componentCompareUI, true);
|
|
165
227
|
componentUi.registerRoute([componentCompareSection.route]);
|
|
@@ -174,7 +236,7 @@ class ComponentCompareUI {
|
|
|
174
236
|
}
|
|
175
237
|
exports.ComponentCompareUI = ComponentCompareUI;
|
|
176
238
|
_defineProperty(ComponentCompareUI, "runtime", _ui().UIRuntime);
|
|
177
|
-
_defineProperty(ComponentCompareUI, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
239
|
+
_defineProperty(ComponentCompareUI, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType(), _harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
178
240
|
_defineProperty(ComponentCompareUI, "dependencies", [_component().ComponentAspect]);
|
|
179
241
|
_componentCompare().ComponentCompareAspect.addRuntime(ComponentCompareUI);
|
|
180
242
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","data","_interopRequireDefault","require","_lodash","_harmony","_component","_componentUiComponentCompare","_ui","_componentUiComponentCompare2","_componentUiComponentCompareCompareAspects","_componentCompareAspects","_componentCompare","_componentCompare2","_componentCompareChangelog","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_extends","assign","bind","n","hasOwnProperty","call","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","ComponentCompareUI","constructor","host","navSlot","routeSlot","compUI","props","tabs","flatten","values","routes","createElement","ComponentCompare","isFullScreen","ComponentCompareAspects","ComponentCompareChangelog","registerNavigation","nav","Array","isArray","register","registerRoutes","map","navLinks","getElement","routeProps","href","element","undefined","find","route","path","startsWith","toArray","id","navProps","maybeRoutesForId","get","routesForId","navProp","provider","componentUi","_","harmony","config","componentCompareUI","componentCompareSection","ComponentCompareSection","pinnedComponentCompareSection","registerRoute","registerWidget","navigationLink","order","registerPinnedWidget","aspectCompareSection","AspectsCompareSection","compareChangelog","CompareChangelogSection","exports","UIRuntime","Slot","withType","ComponentAspect","ComponentCompareAspect","addRuntime"],"sources":["component-compare.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { RouteProps } from 'react-router-dom';\nimport flatten from 'lodash.flatten';\nimport type { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { ComponentUI } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { ComponentCompare } from '@teambit/component.ui.component-compare.component-compare';\nimport { UIRuntime } from '@teambit/ui';\nimport type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\nimport type {\n ComponentCompareProps,\n TabItem,\n} from '@teambit/component.ui.component-compare.models.component-compare-props';\nimport { ComponentCompareChangelog } from '@teambit/component.ui.component-compare.changelog';\nimport { ComponentCompareAspects } from '@teambit/component.ui.component-compare.compare-aspects.compare-aspects';\nimport { AspectsCompareSection } from './component-compare-aspects.section';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { ComponentCompareSection } from './component-compare.section';\nimport { CompareChangelogSection } from './component-compare-changelog.section';\n\nexport type ComponentCompareNav = Array<TabItem>;\nexport type ComponentCompareNavSlot = SlotRegistry<ComponentCompareNav>;\nexport class ComponentCompareUI {\n constructor(\n private host: string,\n private navSlot: ComponentCompareNavSlot,\n private routeSlot: RouteSlot,\n private compUI: ComponentUI\n ) {}\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<ComponentCompareNavSlot>(), Slot.withType<RouteSlot>()];\n\n static dependencies = [ComponentAspect];\n\n getComponentComparePage = (props?: ComponentCompareProps & { pinned?: boolean }) => {\n const tabs = props?.tabs || (() => flatten(this.navSlot.values()));\n const routes = props?.routes || (() => flatten(this.routeSlot.values()));\n const host = props?.host || this.host;\n\n return (\n <ComponentCompare\n {...(props || {})}\n tabs={tabs}\n routes={routes}\n host={host}\n isFullScreen={props?.isFullScreen ?? true}\n />\n );\n };\n\n getAspectsComparePage = () => {\n return <ComponentCompareAspects host={this.host} />;\n };\n\n getChangelogComparePage = () => {\n return <ComponentCompareChangelog />;\n };\n\n registerNavigation(nav: TabItem | Array<TabItem>) {\n if (Array.isArray(nav)) {\n this.navSlot.register(nav);\n } else {\n this.navSlot.register([nav]);\n }\n return this;\n }\n\n registerRoutes(routes: RouteProps[]) {\n this.routeSlot.register(routes);\n return this;\n }\n\n get routes() {\n return this.routeSlot.map;\n }\n\n get navLinks() {\n return this.navSlot.map;\n }\n\n get tabs(): TabItem[] {\n const getElement = (routeProps: RouteProps[], href?: string) => {\n if (routeProps.length === 1) return routeProps[0].element;\n if (!href) return undefined;\n return routeProps.find((route) => route.path?.startsWith(href))?.element;\n };\n\n return flatten(\n this.navSlot.toArray().map(([id, navProps]) => {\n const maybeRoutesForId = this.routes.get(id);\n const routesForId =\n (maybeRoutesForId && (Array.isArray(maybeRoutesForId) ? [...maybeRoutesForId] : [maybeRoutesForId])) || [];\n\n return navProps.map((navProp) => ({\n ...navProp,\n id: navProp?.id || id,\n element: getElement(routesForId, navProp?.props?.href),\n }));\n })\n );\n }\n\n static async provider(\n [componentUi]: [ComponentUI],\n _,\n [navSlot, routeSlot]: [ComponentCompareNavSlot, RouteSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const componentCompareUI = new ComponentCompareUI(host, navSlot, routeSlot, componentUi);\n const componentCompareSection = new ComponentCompareSection(componentCompareUI, false);\n const pinnedComponentCompareSection = new ComponentCompareSection(componentCompareUI, true);\n componentUi.registerRoute([componentCompareSection.route]);\n componentUi.registerWidget(componentCompareSection.navigationLink, componentCompareSection.order);\n componentUi.registerPinnedWidget(pinnedComponentCompareSection.navigationLink, pinnedComponentCompareSection.order);\n const aspectCompareSection = new AspectsCompareSection(componentCompareUI);\n const compareChangelog = new CompareChangelogSection(componentCompareUI);\n componentCompareUI.registerNavigation([aspectCompareSection, compareChangelog]);\n componentCompareUI.registerRoutes([aspectCompareSection.route, compareChangelog.route]);\n return componentCompareUI;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,6BAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,4BAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,IAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,GAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAQ,8BAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,6BAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,2CAAA;EAAA,MAAAT,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3FJ,WAAW,CAACQ,aAAa,CAAC,CAACH,uBAAuB,CAAChB,KAAK,CAAC,CAAC;IAC1DW,WAAW,CAACS,cAAc,CAACJ,uBAAuB,CAACK,cAAc,EAAEL,uBAAuB,CAACM,KAAK,CAAC;IACjGX,WAAW,CAACY,oBAAoB,CAACL,6BAA6B,CAACG,cAAc,EAAEH,6BAA6B,CAACI,KAAK,CAAC;IACnH,MAAME,oBAAoB,GAAG,KAAIC,gDAAqB,EAACV,kBAAkB,CAAC;IAC1E,MAAMW,gBAAgB,GAAG,KAAIC,oDAAuB,EAACZ,kBAAkB,CAAC;IACxEA,kBAAkB,CAAC7B,kBAAkB,CAAC,CAACsC,oBAAoB,EAAEE,gBAAgB,CAAC,CAAC;IAC/EX,kBAAkB,CAACxB,cAAc,CAAC,CAACiC,oBAAoB,CAACxB,KAAK,EAAE0B,gBAAgB,CAAC1B,KAAK,CAAC,CAAC;IACvF,OAAOe,kBAAkB;EAC3B;AACF;AAACa,OAAA,CAAA1D,kBAAA,GAAAA,kBAAA;AAAArB,eAAA,CAtGYqB,kBAAkB,aAQZ2D,eAAS;AAAAhF,eAAA,CARfqB,kBAAkB,WAUd,CAAC4D,eAAI,CAACC,QAAQ,CAA0B,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAY,CAAC,CAAC;AAAAlF,eAAA,CAV1EqB,kBAAkB,kBAYP,CAAC8D,4BAAe,CAAC;AA4FzCC,0CAAsB,CAACC,UAAU,CAAChE,kBAAkB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","data","_interopRequireDefault","require","_lodash","_harmony","_component","_ui","_componentUiComponentCompare","_componentUiComponentCompareCompareAspects","_componentCompareAspects","_componentCompare","_componentCompare2","_componentCompareChangelog","_componentComparePage","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","ComponentCompareUI","constructor","host","navSlot","routeSlot","compareTabSlot","apiDiffInsightSlot","compUI","props","tabs","resolveCompareTabs","getApiTab","find","tab","id","element","createElement","ComponentComparePage","ComponentCompareAspects","ComponentCompareChangelog","registerNavigation","nav","Array","isArray","register","registerRoutes","routes","registerCompareTab","registerApiDiffInsight","insight","getApiDiffInsights","slotEntries","toArray","_resolvedApiDiffInsights","_resolvedApiDiffInsightsKey","flatten","map","_resolvedCompareTabs","_resolvedCompareTabsKey","registered","Boolean","seen","Set","deduped","has","add","merged","sort","a","b","order","navLinks","getElement","routeProps","href","undefined","route","path","startsWith","navProps","maybeRoutesForId","get","routesForId","navProp","provider","componentUi","_","harmony","config","componentCompareUI","componentCompareSection","ComponentCompareSection","pinnedComponentCompareSection","registerRoute","registerWidget","navigationLink","registerPinnedWidget","aspectCompareSection","AspectsCompareSection","compareChangelog","CompareChangelogSection","exports","UIRuntime","Slot","withType","ComponentAspect","ComponentCompareAspect","addRuntime"],"sources":["component-compare.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { RouteProps } from 'react-router-dom';\nimport flatten from 'lodash.flatten';\nimport type { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { Slot } from '@teambit/harmony';\nimport type { ComponentUI } from '@teambit/component';\nimport { ComponentAspect } from '@teambit/component';\nimport { UIRuntime } from '@teambit/ui';\nimport type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\nimport type {\n ComponentCompareProps,\n TabItem,\n} from '@teambit/component.ui.component-compare.models.component-compare-props';\nimport { ComponentCompareChangelog } from '@teambit/component.ui.component-compare.changelog';\nimport { ComponentCompareAspects } from '@teambit/component.ui.component-compare.compare-aspects.compare-aspects';\nimport type { ApiDiffInsight } from '@teambit/semantics.ui.api-diff-view';\nimport { AspectsCompareSection } from './component-compare-aspects.section';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { ComponentCompareSection } from './component-compare.section';\nimport { CompareChangelogSection } from './component-compare-changelog.section';\nimport { ComponentComparePage } from './component-compare-page';\n\nexport type ComponentCompareNav = Array<TabItem>;\nexport type ComponentCompareNavSlot = SlotRegistry<ComponentCompareNav>;\n\nexport type ComponentCompareTabSlot = SlotRegistry<TabItem | TabItem[]>;\n\nexport type ApiDiffInsightSlot = SlotRegistry<ApiDiffInsight | ApiDiffInsight[]>;\n\nexport class ComponentCompareUI {\n constructor(\n private host: string,\n private navSlot: ComponentCompareNavSlot,\n private routeSlot: RouteSlot,\n private compareTabSlot: ComponentCompareTabSlot,\n private apiDiffInsightSlot: ApiDiffInsightSlot,\n private compUI: ComponentUI\n ) {}\n\n static runtime = UIRuntime;\n\n static slots = [\n Slot.withType<ComponentCompareNavSlot>(),\n Slot.withType<RouteSlot>(),\n Slot.withType<TabItem | TabItem[]>(),\n Slot.withType<ApiDiffInsight | ApiDiffInsight[]>(),\n ];\n\n static dependencies = [ComponentAspect];\n\n getComponentComparePage = (props?: ComponentCompareProps & { pinned?: boolean }) => {\n const tabs = props?.tabs || (() => this.resolveCompareTabs());\n const host = props?.host || this.host;\n // The API compare tab is contributed by the api-reference aspect via `registerNavigation`\n // (navSlot), which the redesign page's view-mode toolbar doesn't read. Hand it the API element\n // lazily so it's resolved at render time — after every aspect's UI provider has registered,\n // regardless of provider order — and rendered as a page-local `api` view mode.\n const getApiTab = () => this.tabs.find((tab) => tab.id === 'api')?.element;\n return <ComponentComparePage tabs={tabs} host={host} getApiTab={getApiTab} />;\n };\n\n getAspectsComparePage = () => {\n return <ComponentCompareAspects host={this.host} />;\n };\n\n getChangelogComparePage = () => {\n return <ComponentCompareChangelog />;\n };\n\n registerNavigation(nav: TabItem | Array<TabItem>) {\n if (Array.isArray(nav)) {\n this.navSlot.register(nav);\n } else {\n this.navSlot.register([nav]);\n }\n return this;\n }\n\n registerRoutes(routes: RouteProps[]) {\n this.routeSlot.register(routes);\n return this;\n }\n\n /**\n * Register an inline-compare tab. The tab's `id` should match the new toolbar view-mode ids\n * (`inline-code`, `inline-preview`, `inline-docs`, `inline-deps`, `inline-tests`, `inline-config`).\n * Used by both the single-component compare page and lane-compare.\n */\n registerCompareTab(tab: TabItem | TabItem[]) {\n this.compareTabSlot.register(tab);\n return this;\n }\n\n /**\n * contribute intelligence to the API diff view: per-change renderers for migration\n * hints, affected dependents, codemods, etc. rendered in each change block's\n * insights area (lane compare API view and the single-component API tab).\n */\n registerApiDiffInsight(insight: ApiDiffInsight | ApiDiffInsight[]) {\n this.apiDiffInsightSlot.register(insight);\n return this;\n }\n\n private _resolvedApiDiffInsights?: ApiDiffInsight[];\n private _resolvedApiDiffInsightsKey?: number;\n /**\n * Memoized by slot-entry count (mirroring `resolveCompareTabs`) so the returned array keeps a\n * stable identity across renders — `LaneCompare` is React.memo'd, and a fresh array on every\n * call would break its shallow compare and re-render the whole compare tree.\n */\n getApiDiffInsights(): ApiDiffInsight[] {\n const slotEntries = this.apiDiffInsightSlot.toArray();\n if (this._resolvedApiDiffInsights && this._resolvedApiDiffInsightsKey === slotEntries.length) {\n return this._resolvedApiDiffInsights;\n }\n this._resolvedApiDiffInsights = flatten(\n slotEntries.map(([, value]) => value) as Array<ApiDiffInsight | ApiDiffInsight[]>\n );\n this._resolvedApiDiffInsightsKey = slotEntries.length;\n return this._resolvedApiDiffInsights;\n }\n\n private _resolvedCompareTabs?: TabItem[];\n private _resolvedCompareTabsKey?: number;\n /**\n * Resolve the inline-compare tabs that aspects register via `registerCompareTab` (code →\n * inline-code/deps/tests/config, compositions → inline-preview, docs → inline-docs, …). Dedup by\n * id (first registration wins), sort by order. Memoized by slot-entry count so the resolved list\n * keeps a stable identity across renders. Owning each tab in its aspect keeps component-compare\n * decoupled from code/preview/docs UI; single-component compare and lane-compare both read this.\n */\n resolveCompareTabs(): TabItem[] {\n const slotEntries = this.compareTabSlot.toArray();\n if (this._resolvedCompareTabs && this._resolvedCompareTabsKey === slotEntries.length) {\n return this._resolvedCompareTabs;\n }\n const registered = flatten(slotEntries.map(([, value]) => value).filter(Boolean) as Array<TabItem | TabItem[]>);\n const seen = new Set<string>();\n const deduped = registered.filter((tab) => (seen.has(tab.id) ? false : (seen.add(tab.id), true)));\n const merged = deduped.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n this._resolvedCompareTabs = merged;\n this._resolvedCompareTabsKey = slotEntries.length;\n return merged;\n }\n\n get routes() {\n return this.routeSlot.map;\n }\n\n get navLinks() {\n return this.navSlot.map;\n }\n\n get tabs(): TabItem[] {\n const getElement = (routeProps: RouteProps[], href?: string) => {\n if (routeProps.length === 1) return routeProps[0].element;\n if (!href) return undefined;\n return routeProps.find((route) => route.path?.startsWith(href))?.element;\n };\n\n return flatten(\n this.navSlot.toArray().map(([id, navProps]) => {\n const maybeRoutesForId = this.routes.get(id);\n const routesForId =\n (maybeRoutesForId && (Array.isArray(maybeRoutesForId) ? [...maybeRoutesForId] : [maybeRoutesForId])) || [];\n\n return navProps.map((navProp) => ({\n ...navProp,\n id: navProp?.id || id,\n element: getElement(routesForId, navProp?.props?.href),\n }));\n })\n );\n }\n\n static async provider(\n [componentUi]: [ComponentUI],\n _,\n [navSlot, routeSlot, compareTabSlot, apiDiffInsightSlot]: [\n ComponentCompareNavSlot,\n RouteSlot,\n ComponentCompareTabSlot,\n ApiDiffInsightSlot,\n ],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const componentCompareUI = new ComponentCompareUI(\n host,\n navSlot,\n routeSlot,\n compareTabSlot,\n apiDiffInsightSlot,\n componentUi\n );\n const componentCompareSection = new ComponentCompareSection(componentCompareUI, false);\n const pinnedComponentCompareSection = new ComponentCompareSection(componentCompareUI, true);\n componentUi.registerRoute([componentCompareSection.route]);\n componentUi.registerWidget(componentCompareSection.navigationLink, componentCompareSection.order);\n componentUi.registerPinnedWidget(pinnedComponentCompareSection.navigationLink, pinnedComponentCompareSection.order);\n const aspectCompareSection = new AspectsCompareSection(componentCompareUI);\n const compareChangelog = new CompareChangelogSection(componentCompareUI);\n componentCompareUI.registerNavigation([aspectCompareSection, compareChangelog]);\n componentCompareUI.registerRoutes([aspectCompareSection.route, compareChangelog.route]);\n return componentCompareUI;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,IAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,GAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAO,6BAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,4BAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,2CAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,0CAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAS,yBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,wBAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EA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Cmd implements Command {
|
|
|
39
39
|
additions: number;
|
|
40
40
|
deletions: number;
|
|
41
41
|
filePath: string;
|
|
42
|
-
status: import("@teambit/legacy.component-diff/dist/components-diff
|
|
42
|
+
status: import("@teambit/legacy.component-diff/dist/components-diff").DiffStatus;
|
|
43
43
|
diffOutput?: undefined;
|
|
44
44
|
} | {
|
|
45
45
|
filePath: string;
|
|
46
|
-
status: import("@teambit/legacy.component-diff/dist/components-diff
|
|
46
|
+
status: import("@teambit/legacy.component-diff/dist/components-diff").DiffStatus;
|
|
47
47
|
diffOutput?: undefined;
|
|
48
48
|
} | {
|
|
49
49
|
filePath: string;
|
|
50
|
-
status: import("@teambit/legacy.component-diff/dist/components-diff
|
|
50
|
+
status: import("@teambit/legacy.component-diff/dist/components-diff").DiffStatus;
|
|
51
51
|
diffOutput: string;
|
|
52
52
|
})[] | undefined;
|
|
53
53
|
fieldsDiff: import("@teambit/legacy.component-diff").FieldsDiff[] | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.1082/dist/component-compare.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.1082/dist/component-compare.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|