@teambit/component-compare 1.0.927 → 1.0.928

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.
@@ -1,42 +1,3 @@
1
- import type { ComponentCompareMain, ComponentCompareResult } from './component-compare.main.runtime';
2
- export declare function componentCompareSchema(componentCompareMain: ComponentCompareMain): {
3
- typeDefs: import("graphql").DocumentNode;
4
- resolvers: {
5
- ComponentHost: {
6
- compareComponent: (_: any, { baseId, compareId }: {
7
- baseId: string;
8
- compareId: string;
9
- }) => Promise<ComponentCompareResult>;
10
- };
11
- ComponentCompareResult: {
12
- id: (result: ComponentCompareResult) => string;
13
- code: (result: ComponentCompareResult, { fileName }: {
14
- fileName?: string;
15
- }) => {
16
- fileName: string;
17
- baseContent: string;
18
- compareContent: string;
19
- filePath: string;
20
- diffOutput: string;
21
- status: import("@teambit/legacy.component-diff/dist/components-diff").DiffStatus;
22
- fromContent: string;
23
- toContent: string;
24
- }[];
25
- tests: (result: ComponentCompareResult, { fileName }: {
26
- fileName?: string;
27
- }) => {
28
- fileName: string;
29
- baseContent: string;
30
- compareContent: string;
31
- filePath: string;
32
- diffOutput: string;
33
- status: import("@teambit/legacy.component-diff/dist/components-diff").DiffStatus;
34
- fromContent: string;
35
- toContent: string;
36
- }[];
37
- aspects: (result: ComponentCompareResult, { fieldName }: {
38
- fieldName?: string;
39
- }) => import("@teambit/legacy.component-diff").FieldsDiff[];
40
- };
41
- };
42
- };
1
+ import type { Schema } from '@teambit/graphql';
2
+ import type { ComponentCompareMain } from './component-compare.main.runtime';
3
+ export declare function componentCompareSchema(componentCompareMain: ComponentCompareMain): Schema;
@@ -38,6 +38,7 @@ function componentCompareSchema(componentCompareMain) {
38
38
  code(fileName: String): [FileCompareResult!]!
39
39
  aspects(aspectName: String): [FieldCompareResult!]!
40
40
  tests(fileName: String): [FileCompareResult!]
41
+ api: APIDiffResult
41
42
  }
42
43
 
43
44
  extend type ComponentHost {
@@ -94,6 +95,9 @@ function componentCompareSchema(componentCompareMain) {
94
95
  return result.fields.filter(field => field.fieldName === fieldName);
95
96
  }
96
97
  return result.fields;
98
+ },
99
+ api: async result => {
100
+ return (await componentCompareMain.getAPIDiff(result.baseId, result.compareId)) ?? null;
97
101
  }
98
102
  }
99
103
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_graphqlTag","data","require","ownKeys","e","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","componentCompareSchema","componentCompareMain","typeDefs","gql","resolvers","ComponentHost","compareComponent","_","baseId","compareId","compare","ComponentCompareResult","id","result","code","fileName","codeFile","filePath","map","c","baseContent","fromContent","compareContent","toContent","tests","testFile","aspects","fieldName","fields","field"],"sources":["component-compare.graphql.ts"],"sourcesContent":["import { gql } from 'graphql-tag';\nimport type { ComponentCompareMain, ComponentCompareResult } from './component-compare.main.runtime';\n\nexport function componentCompareSchema(componentCompareMain: ComponentCompareMain) {\n return {\n typeDefs: gql`\n type FileCompareResult {\n fileName: String!\n baseContent: String!\n compareContent: String!\n status: String\n diffOutput: String\n }\n\n type FieldCompareResult {\n fieldName: String!\n diffOutput: String\n }\n\n type ComponentCompareResult {\n # unique id for graphql - baseId + compareId\n id: String!\n code(fileName: String): [FileCompareResult!]!\n aspects(aspectName: String): [FieldCompareResult!]!\n tests(fileName: String): [FileCompareResult!]\n }\n\n extend type ComponentHost {\n compareComponent(baseId: String!, compareId: String!): ComponentCompareResult\n }\n `,\n resolvers: {\n ComponentHost: {\n compareComponent: async (_, { baseId, compareId }: { baseId: string; compareId: string }) => {\n return componentCompareMain.compare(baseId, compareId);\n },\n },\n ComponentCompareResult: {\n id: (result: ComponentCompareResult) => result.id,\n code: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.code\n .filter((codeFile) => codeFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.code.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n tests: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.tests\n .filter((testFile) => testFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.tests.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n aspects: (result: ComponentCompareResult, { fieldName }: { fieldName?: string }) => {\n if (fieldName) {\n return result.fields.filter((field) => field.fieldName === fieldName);\n }\n return result.fields;\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkC,SAAAE,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CA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AEkD,QAAQ,IAAKA,QAAQ,CAACR,QAAQ,KAAKF,QAAQ,CAAC,CACpDG,GAAG,CAAEC,CAAC,IAAAvC,aAAA,CAAAA,aAAA,KAAWuC,CAAC;cAAEJ,QAAQ,EAAEI,CAAC,CAACF,QAAQ;cAAEG,WAAW,EAAED,CAAC,CAACE,WAAW;cAAEC,cAAc,EAAEH,CAAC,CAACI;YAAS,EAAG,CAAC;UAC1G;UAEA,OAAOV,MAAM,CAACW,KAAK,CAACN,GAAG,CAAEC,CAAC,IAAAvC,aAAA,CAAAA,aAAA,KACrBuC,CAAC;YACJJ,QAAQ,EAAEI,CAAC,CAACF,QAAQ;YACpBG,WAAW,EAAED,CAAC,CAACE,WAAW;YAC1BC,cAAc,EAAEH,CAAC,CAACI;UAAS,EAC3B,CAAC;QACL,CAAC;QACDG,OAAO,EAAEA,CAACb,MAA8B,EAAE;UAAEc;QAAkC,CAAC,KAAK;UAClF,IAAIA,SAAS,EAAE;YACb,OAAOd,MAAM,CAACe,MAAM,CAACrD,MAAM,CAAEsD,KAAK,IAAKA,KAAK,CAACF,SAAS,KAAKA,SAAS,CAAC;UACvE;UACA,OAAOd,MAAM,CAACe,MAAM;QACtB;MACF;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_graphqlTag","data","require","ownKeys","e","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","componentCompareSchema","componentCompareMain","typeDefs","gql","resolvers","ComponentHost","compareComponent","_","baseId","compareId","compare","ComponentCompareResult","id","result","code","fileName","codeFile","filePath","map","c","baseContent","fromContent","compareContent","toContent","tests","testFile","aspects","fieldName","fields","field","api","getAPIDiff"],"sources":["component-compare.graphql.ts"],"sourcesContent":["import { gql } from 'graphql-tag';\nimport type { Schema } from '@teambit/graphql';\nimport type { ComponentCompareMain, ComponentCompareResult } from './component-compare.main.runtime';\n\nexport function componentCompareSchema(componentCompareMain: ComponentCompareMain): Schema {\n return {\n typeDefs: gql`\n type FileCompareResult {\n fileName: String!\n baseContent: String!\n compareContent: String!\n status: String\n diffOutput: String\n }\n\n type FieldCompareResult {\n fieldName: String!\n diffOutput: String\n }\n\n type ComponentCompareResult {\n # unique id for graphql - baseId + compareId\n id: String!\n code(fileName: String): [FileCompareResult!]!\n aspects(aspectName: String): [FieldCompareResult!]!\n tests(fileName: String): [FileCompareResult!]\n api: APIDiffResult\n }\n\n extend type ComponentHost {\n compareComponent(baseId: String!, compareId: String!): ComponentCompareResult\n }\n `,\n resolvers: {\n ComponentHost: {\n compareComponent: async (_, { baseId, compareId }: { baseId: string; compareId: string }) => {\n return componentCompareMain.compare(baseId, compareId);\n },\n },\n ComponentCompareResult: {\n id: (result: ComponentCompareResult) => result.id,\n code: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.code\n .filter((codeFile) => codeFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.code.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n tests: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.tests\n .filter((testFile) => testFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.tests.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n aspects: (result: ComponentCompareResult, { fieldName }: { fieldName?: string }) => {\n if (fieldName) {\n return result.fields.filter((field) => field.fieldName === fieldName);\n }\n return result.fields;\n },\n api: async (result: ComponentCompareResult) => {\n return (await componentCompareMain.getAPIDiff(result.baseId, result.compareId)) ?? null;\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G,OAAO,EAAEA,CAACb,MAA8B,EAAE;UAAEc;QAAkC,CAAC,KAAK;UAClF,IAAIA,SAAS,EAAE;YACb,OAAOd,MAAM,CAACe,MAAM,CAACrD,MAAM,CAAEsD,KAAK,IAAKA,KAAK,CAACF,SAAS,KAAKA,SAAS,CAAC;UACvE;UACA,OAAOd,MAAM,CAACe,MAAM;QACtB,CAAC;QACDE,GAAG,EAAE,MAAOjB,MAA8B,IAAK;UAC7C,OAAO,CAAC,MAAMZ,oBAAoB,CAAC8B,UAAU,CAAClB,MAAM,CAACL,MAAM,EAAEK,MAAM,CAACJ,SAAS,CAAC,KAAK,IAAI;QACzF;MACF;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -9,9 +9,12 @@ import type { LoggerMain, Logger } from '@teambit/logger';
9
9
  import type { DiffOptions, DiffResults, FieldsDiff, FileDiff } from '@teambit/legacy.component-diff';
10
10
  import type { TesterMain } from '@teambit/tester';
11
11
  import type { Component, ComponentMain } from '@teambit/component';
12
+ import type { SchemaMain } from '@teambit/schema';
12
13
  import type { ImporterMain } from '@teambit/importer';
13
14
  export type ComponentCompareResult = {
14
15
  id: string;
16
+ baseId: string;
17
+ compareId: string;
15
18
  code: FileDiff[];
16
19
  fields: FieldsDiff[];
17
20
  tests: FileDiff[];
@@ -28,9 +31,11 @@ export declare class ComponentCompareMain {
28
31
  private tester;
29
32
  private depResolver;
30
33
  private importer;
34
+ private schema;
31
35
  private workspace?;
32
- constructor(componentAspect: ComponentMain, scope: ScopeMain, logger: Logger, tester: TesterMain, depResolver: DependencyResolverMain, importer: ImporterMain, workspace?: Workspace | undefined);
36
+ constructor(componentAspect: ComponentMain, scope: ScopeMain, logger: Logger, tester: TesterMain, depResolver: DependencyResolverMain, importer: ImporterMain, schema: SchemaMain, workspace?: Workspace | undefined);
33
37
  compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult>;
38
+ getAPIDiff(baseIdStr: string, compareIdStr: string): Promise<Record<string, any> | null>;
34
39
  diffByCLIValues(pattern?: string, version?: string, toVersion?: string, { verbose, table, parent }?: {
35
40
  verbose?: boolean;
36
41
  table?: boolean;
@@ -53,7 +58,7 @@ export declare class ComponentCompareMain {
53
58
  static slots: never[];
54
59
  static dependencies: import("@teambit/harmony").Aspect[];
55
60
  static runtime: import("@teambit/harmony").RuntimeDefinition;
56
- static provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [
61
+ static provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer, schema,]: [
57
62
  GraphqlMain,
58
63
  ComponentMain,
59
64
  ScopeMain,
@@ -62,7 +67,8 @@ export declare class ComponentCompareMain {
62
67
  Workspace,
63
68
  TesterMain,
64
69
  DependencyResolverMain,
65
- ImporterMain
70
+ ImporterMain,
71
+ SchemaMain
66
72
  ]): Promise<ComponentCompareMain>;
67
73
  }
68
74
  export default ComponentCompareMain;
@@ -95,6 +95,13 @@ function _component() {
95
95
  };
96
96
  return data;
97
97
  }
98
+ function _schema() {
99
+ const data = require("@teambit/schema");
100
+ _schema = function () {
101
+ return data;
102
+ };
103
+ return data;
104
+ }
98
105
  function _componentCompare() {
99
106
  const data = require("./component-compare.graphql");
100
107
  _componentCompare = function () {
@@ -127,13 +134,14 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
127
134
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
128
135
  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); }
129
136
  class ComponentCompareMain {
130
- constructor(componentAspect, scope, logger, tester, depResolver, importer, workspace) {
137
+ constructor(componentAspect, scope, logger, tester, depResolver, importer, schema, workspace) {
131
138
  this.componentAspect = componentAspect;
132
139
  this.scope = scope;
133
140
  this.logger = logger;
134
141
  this.tester = tester;
135
142
  this.depResolver = depResolver;
136
143
  this.importer = importer;
144
+ this.schema = schema;
137
145
  this.workspace = workspace;
138
146
  }
139
147
  async compare(baseIdStr, compareIdStr) {
@@ -163,13 +171,26 @@ class ComponentCompareMain {
163
171
  const compareTestFiles = compareComponent && (await this.tester.getTestFiles(compareComponent).map(file => file.relative)) || [];
164
172
  const allTestFiles = [...baseTestFiles, ...compareTestFiles];
165
173
  const testFilesDiff = (diff.filesDiff || []).filter(fileDiff => allTestFiles.includes(fileDiff.filePath) && fileDiff.status !== 'UNCHANGED');
166
- const compareResult = {
174
+ return {
167
175
  id: `${baseCompId}-${compareCompId}`,
176
+ baseId: baseIdStr,
177
+ compareId: compareIdStr,
168
178
  code: diff.filesDiff || [],
169
179
  fields: diff.fieldsDiff || [],
170
180
  tests: testFilesDiff
171
181
  };
172
- return compareResult;
182
+ }
183
+ async getAPIDiff(baseIdStr, compareIdStr) {
184
+ const host = this.componentAspect.getHost();
185
+ const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);
186
+ await this.importer.importObjectsFromMainIfExist([baseCompId, compareCompId], {
187
+ cache: true
188
+ });
189
+ const components = await host.getMany([baseCompId, compareCompId]);
190
+ const baseComponent = components?.[0];
191
+ const compareComponent = components?.[1];
192
+ if (!baseComponent || !compareComponent) return null;
193
+ return this.schema.computeAPIDiff(baseComponent, compareComponent);
173
194
  }
174
195
  async diffByCLIValues(pattern, version, toVersion, {
175
196
  verbose,
@@ -308,9 +329,9 @@ class ComponentCompareMain {
308
329
  await updateFieldsDiff(fromVersionComponent, toVersionComponent, diffResult, diffOpts);
309
330
  return diffResult;
310
331
  }
311
- static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]) {
332
+ static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer, schema]) {
312
333
  const logger = loggerMain.createLogger(_componentCompare2().ComponentCompareAspect.id);
313
- const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, importer, workspace);
334
+ const componentCompareMain = new ComponentCompareMain(component, scope, logger, tester, depResolver, importer, schema, workspace);
314
335
  cli.register(new (_diffCmd().DiffCmd)(componentCompareMain));
315
336
  graphql.register(() => (0, _componentCompare().componentCompareSchema)(componentCompareMain));
316
337
  return componentCompareMain;
@@ -318,7 +339,7 @@ class ComponentCompareMain {
318
339
  }
319
340
  exports.ComponentCompareMain = ComponentCompareMain;
320
341
  _defineProperty(ComponentCompareMain, "slots", []);
321
- _defineProperty(ComponentCompareMain, "dependencies", [_graphql().GraphqlAspect, _component().ComponentAspect, _scope().ScopeAspect, _logger().LoggerAspect, _cli().CLIAspect, _workspace().WorkspaceAspect, _tester().TesterAspect, _dependencyResolver().DependencyResolverAspect, _importer().ImporterAspect]);
342
+ _defineProperty(ComponentCompareMain, "dependencies", [_graphql().GraphqlAspect, _component().ComponentAspect, _scope().ScopeAspect, _logger().LoggerAspect, _cli().CLIAspect, _workspace().WorkspaceAspect, _tester().TesterAspect, _dependencyResolver().DependencyResolverAspect, _importer().ImporterAspect, _schema().SchemaAspect]);
322
343
  _defineProperty(ComponentCompareMain, "runtime", _cli().MainRuntime);
323
344
  function hasDiff(diffResult) {
324
345
  return !!(diffResult.filesDiff && diffResult.filesDiff.find(file => file.diffOutput) || diffResult.fieldsDiff);
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_lodash","_bitError","_workspace","_componentId","_scope","_graphql","_builder","_dependencyResolver","_logger","_legacy","_tester","_component","_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","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","compareResult","id","code","fields","tests","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","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 { 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 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 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 const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n fields: diff.fieldsDiff || [],\n tests: testFilesDiff,\n };\n\n return compareResult;\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 ];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope, loggerMain, cli, workspace, tester, depResolver, importer]: [\n GraphqlMain,\n ComponentMain,\n ScopeMain,\n LoggerMain,\n CLIMain,\n Workspace,\n TesterMain,\n DependencyResolverMain,\n ImporterMain,\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 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;AAA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1C;AAEA8C,2CAAsB,CAACoB,UAAU,CAACrL,oBAAoB,CAAC;AAAC,IAAAsL,QAAA,GAAAhB,OAAA,CAAAiB,OAAA,GAEzCvL,oBAAoB","ignoreList":[]}
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,I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,OAAOA,oBAAoB;EAC7B;AACF;AAACI,OAAA,CAAA1K,oBAAA,GAAAA,oBAAA;AAAAnB,eAAA,CAjUYmB,oBAAoB,WA6QhB,EAAE;AAAAnB,eAAA,CA7QNmB,oBAAoB,kBA8QT,CACpB2K,wBAAa,EACbC,4BAAe,EACfC,oBAAW,EACXC,sBAAY,EACZC,gBAAS,EACTC,4BAAe,EACfC,sBAAY,EACZrE,8CAAwB,EACxBsE,0BAAc,EACdC,sBAAY,CACb;AAAAtM,eAAA,CAzRUmB,oBAAoB,aA0RdoL,kBAAW;AAyC9B,SAAS5D,OAAOA,CAACD,UAAuB,EAAW;EACjD,OAAO,CAAC,EAAGA,UAAU,CAAChF,SAAS,IAAIgF,UAAU,CAAChF,SAAS,CAAC8I,IAAI,CAAEzI,IAAI,IAAKA,IAAI,CAAC0I,UAAU,CAAC,IAAK/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,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.927/dist/component-compare.compositions.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.927/dist/component-compare.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.928/dist/component-compare.compositions.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-compare@1.0.928/dist/component-compare.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-compare",
3
- "version": "1.0.927",
3
+ "version": "1.0.928",
4
4
  "homepage": "https://bit.cloud/teambit/component/component-compare",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component-compare",
9
- "version": "1.0.927"
9
+ "version": "1.0.928"
10
10
  },
11
11
  "dependencies": {
12
12
  "graphql-tag": "2.12.1",
@@ -24,20 +24,21 @@
24
24
  "@teambit/legacy.consumer-component": "0.0.104",
25
25
  "@teambit/logger": "0.0.1400",
26
26
  "@teambit/component.ui.component-compare.changelog": "0.0.235",
27
- "@teambit/component.ui.component-compare.component-compare": "0.0.253",
28
27
  "@teambit/ui-foundation.ui.react-router.slot-router": "0.0.522",
29
28
  "@teambit/component.ui.component-compare.compare-aspects.compare-aspects": "0.0.152",
30
29
  "@teambit/legacy.constants": "0.0.24",
31
- "@teambit/component": "1.0.927",
32
- "@teambit/builder": "1.0.927",
33
- "@teambit/dependency-resolver": "1.0.927",
34
- "@teambit/graphql": "1.0.927",
35
- "@teambit/importer": "1.0.927",
36
- "@teambit/objects": "0.0.434",
37
- "@teambit/scope": "1.0.927",
38
- "@teambit/tester": "1.0.927",
39
- "@teambit/workspace": "1.0.927",
40
- "@teambit/ui": "1.0.927"
30
+ "@teambit/component": "1.0.928",
31
+ "@teambit/graphql": "1.0.928",
32
+ "@teambit/builder": "1.0.928",
33
+ "@teambit/dependency-resolver": "1.0.928",
34
+ "@teambit/importer": "1.0.928",
35
+ "@teambit/objects": "0.0.435",
36
+ "@teambit/schema": "1.0.928",
37
+ "@teambit/scope": "1.0.928",
38
+ "@teambit/tester": "1.0.928",
39
+ "@teambit/workspace": "1.0.928",
40
+ "@teambit/component.ui.component-compare.component-compare": "0.0.254",
41
+ "@teambit/ui": "1.0.928"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/lodash": "4.14.165",