@teambit/component-log 1.0.444 → 1.0.446

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.
@@ -0,0 +1,18 @@
1
+ import { Command, CommandOptions } from '@teambit/cli';
2
+ import { ComponentLogMain } from './component-log.main.runtime';
3
+ export declare class BlameCmd implements Command {
4
+ private componentLog;
5
+ name: string;
6
+ description: string;
7
+ group: string;
8
+ alias: string;
9
+ options: CommandOptions;
10
+ arguments: {
11
+ name: string;
12
+ description: string;
13
+ }[];
14
+ constructor(componentLog: ComponentLogMain);
15
+ report([filePath]: [string], { includeMessage }: {
16
+ includeMessage?: boolean;
17
+ }): Promise<string>;
18
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BlameCmd = void 0;
7
+ function _logCmd() {
8
+ const data = require("./log-cmd");
9
+ _logCmd = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ 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; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
+ 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); }
17
+ class BlameCmd {
18
+ constructor(componentLog) {
19
+ this.componentLog = componentLog;
20
+ _defineProperty(this, "name", 'blame <filepath>');
21
+ _defineProperty(this, "description", 'EXPERIMENTAL. per line, show who and when was the last to modify it');
22
+ _defineProperty(this, "group", 'info');
23
+ _defineProperty(this, "alias", '');
24
+ _defineProperty(this, "options", [['m', 'include-message', 'show the commit message']]);
25
+ _defineProperty(this, "arguments", [{
26
+ name: 'filepath',
27
+ description: 'file path relative to the workspace'
28
+ }]);
29
+ }
30
+ async report([filePath], {
31
+ includeMessage = false
32
+ }) {
33
+ const results = await this.componentLog.blame(filePath);
34
+ const table = (0, _logCmd().getEmptyTableWithoutStyle)();
35
+ results.forEach(({
36
+ hash,
37
+ tag,
38
+ username,
39
+ date,
40
+ message,
41
+ lineNumber,
42
+ lineContent
43
+ }) => {
44
+ const shortHash = hash.substring(0, 9);
45
+ const shortMessage = includeMessage ? message.split('\n')[0] : '';
46
+ table.push([shortHash, tag || '', username, date, shortMessage, `${lineNumber})`, lineContent]);
47
+ });
48
+ return table.toString();
49
+ }
50
+ }
51
+ exports.BlameCmd = BlameCmd;
52
+
53
+ //# sourceMappingURL=blame-cmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_logCmd","data","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","BlameCmd","constructor","componentLog","name","description","report","filePath","includeMessage","results","blame","table","getEmptyTableWithoutStyle","forEach","hash","tag","username","date","message","lineNumber","lineContent","shortHash","substring","shortMessage","split","push","toString","exports"],"sources":["blame-cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { ComponentLogMain } from './component-log.main.runtime';\nimport { getEmptyTableWithoutStyle } from './log-cmd';\n\nexport class BlameCmd implements Command {\n name = 'blame <filepath>';\n description = 'EXPERIMENTAL. per line, show who and when was the last to modify it';\n group = 'info';\n alias = '';\n options = [['m', 'include-message', 'show the commit message']] as CommandOptions;\n arguments = [{ name: 'filepath', description: 'file path relative to the workspace' }];\n\n constructor(private componentLog: ComponentLogMain) {}\n\n async report([filePath]: [string], { includeMessage = false }: { includeMessage?: boolean }) {\n const results = await this.componentLog.blame(filePath);\n const table = getEmptyTableWithoutStyle();\n results.forEach(({ hash, tag, username, date, message, lineNumber, lineContent }) => {\n const shortHash = hash.substring(0, 9);\n const shortMessage = includeMessage ? message.split('\\n')[0] : '';\n table.push([shortHash, tag || '', username, date, shortMessage, `${lineNumber})`, lineContent]);\n });\n return table.toString();\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAsD,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAE/C,MAAMgB,QAAQ,CAAoB;EAQvCC,WAAWA,CAASC,YAA8B,EAAE;IAAA,KAAhCA,YAA8B,GAA9BA,YAA8B;IAAArB,eAAA,eAP3C,kBAAkB;IAAAA,eAAA,sBACX,qEAAqE;IAAAA,eAAA,gBAC3E,MAAM;IAAAA,eAAA,gBACN,EAAE;IAAAA,eAAA,kBACA,CAAC,CAAC,GAAG,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;IAAAA,eAAA,oBACnD,CAAC;MAAEsB,IAAI,EAAE,UAAU;MAAEC,WAAW,EAAE;IAAsC,CAAC,CAAC;EAEjC;EAErD,MAAMC,MAAMA,CAAC,CAACC,QAAQ,CAAW,EAAE;IAAEC,cAAc,GAAG;EAAoC,CAAC,EAAE;IAC3F,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACN,YAAY,CAACO,KAAK,CAACH,QAAQ,CAAC;IACvD,MAAMI,KAAK,GAAG,IAAAC,mCAAyB,EAAC,CAAC;IACzCH,OAAO,CAACI,OAAO,CAAC,CAAC;MAAEC,IAAI;MAAEC,GAAG;MAAEC,QAAQ;MAAEC,IAAI;MAAEC,OAAO;MAAEC,UAAU;MAAEC;IAAY,CAAC,KAAK;MACnF,MAAMC,SAAS,GAAGP,IAAI,CAACQ,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;MACtC,MAAMC,YAAY,GAAGf,cAAc,GAAGU,OAAO,CAACM,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;MACjEb,KAAK,CAACc,IAAI,CAAC,CAACJ,SAAS,EAAEN,GAAG,IAAI,EAAE,EAAEC,QAAQ,EAAEC,IAAI,EAAEM,YAAY,EAAE,GAAGJ,UAAU,GAAG,EAAEC,WAAW,CAAC,CAAC;IACjG,CAAC,CAAC;IACF,OAAOT,KAAK,CAACe,QAAQ,CAAC,CAAC;EACzB;AACF;AAACC,OAAA,CAAA1B,QAAA,GAAAA,QAAA","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import { CLIMain } from '@teambit/cli';
2
2
  import { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';
3
3
  import { Workspace } from '@teambit/workspace';
4
+ import { PathOsBasedAbsolute } from '@teambit/toolbox.path.path';
4
5
  export type FileLog = {
5
6
  hash: string;
6
7
  tag?: string;
@@ -12,6 +13,17 @@ export type FileLog = {
12
13
  parentFileHash?: string;
13
14
  fileDiff?: string;
14
15
  };
16
+ export type BlameLineInfo = {
17
+ lineNumber: number;
18
+ lineContent: string;
19
+ previousLineContent?: string;
20
+ username: string;
21
+ email?: string;
22
+ date: string;
23
+ message: string;
24
+ hash: string;
25
+ tag?: string;
26
+ };
15
27
  export type FileHashDiffFromParent = {
16
28
  filePath: string;
17
29
  hash?: string;
@@ -26,7 +38,8 @@ export declare class ComponentLogMain {
26
38
  getLogs(id: string, isRemote?: boolean, shortHash?: boolean, shortMessage?: boolean): Promise<ComponentLog[]>;
27
39
  getLogsWithParents(id: string, fullHash?: boolean, fullMessage?: boolean): Promise<string[]>;
28
40
  getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>;
29
- getFileHistoryHashes(filePath: string): Promise<FileLog[]>;
41
+ getFileHistoryHashes(filePath: PathOsBasedAbsolute): Promise<FileLog[]>;
42
+ blame(filePath: string): Promise<BlameLineInfo[]>;
30
43
  getFileLog(filePath: string): Promise<FileLog[]>;
31
44
  private stringifyLogInfoOneLine;
32
45
  static slots: never[];
@@ -67,6 +67,13 @@ function _toolboxPath() {
67
67
  };
68
68
  return data;
69
69
  }
70
+ function _objects() {
71
+ const data = require("@teambit/legacy/dist/scope/objects");
72
+ _objects = function () {
73
+ return data;
74
+ };
75
+ return data;
76
+ }
70
77
  function _legacy() {
71
78
  const data = require("@teambit/legacy.component-diff");
72
79
  _legacy = function () {
@@ -88,6 +95,13 @@ function _getRemoteByName() {
88
95
  };
89
96
  return data;
90
97
  }
98
+ function _diff() {
99
+ const data = require("diff");
100
+ _diff = function () {
101
+ return data;
102
+ };
103
+ return data;
104
+ }
91
105
  function _componentLog() {
92
106
  const data = require("./component-log.aspect");
93
107
  _componentLog = function () {
@@ -116,6 +130,13 @@ function _logFileCmd() {
116
130
  };
117
131
  return data;
118
132
  }
133
+ function _blameCmd() {
134
+ const data = require("./blame-cmd");
135
+ _blameCmd = function () {
136
+ return data;
137
+ };
138
+ return data;
139
+ }
119
140
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
120
141
  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; }
121
142
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
@@ -234,6 +255,89 @@ class ComponentLogMain {
234
255
  // remove entries that their fileHash is the same as their parent.
235
256
  return results.filter(r => r.fileHash !== r.parentFileHash);
236
257
  }
258
+ async blame(filePath) {
259
+ const workspace = this.workspace;
260
+ if (!workspace) throw new (_workspace().OutsideWorkspaceError)();
261
+ const absPath = _path().default.isAbsolute(filePath) ? filePath : workspace.consumer.toAbsolutePath(filePath);
262
+ const reversedLogs = await this.getFileHistoryHashes(absPath);
263
+ const logs = reversedLogs.reverse();
264
+ const getFileContent = async hash => {
265
+ const source = await workspace.scope.legacyScope.objects.load(_objects().Ref.from(hash), true);
266
+ return source.contents.toString();
267
+ };
268
+
269
+ // Initialize the blame array with the current file content
270
+ const currentLog = logs[0];
271
+ let currentContentStr = await getFileContent(currentLog.fileHash);
272
+ const currentContentLines = currentContentStr.split('\n');
273
+ const blameArray = currentContentLines.map((lineContent, index) => ({
274
+ lineNumber: index + 1,
275
+ lineContent
276
+ }));
277
+ const populateBlameArray = (lineNumber, log) => {
278
+ blameArray[lineNumber].username = log.username;
279
+ blameArray[lineNumber].email = log.email;
280
+ blameArray[lineNumber].date = log.date;
281
+ blameArray[lineNumber].message = log.message;
282
+ blameArray[lineNumber].hash = log.hash;
283
+ blameArray[lineNumber].tag = log.tag;
284
+ };
285
+
286
+ // Keep track of unassigned lines
287
+ const unblamedLineIndices = new Set(blameArray.map((_, index) => index));
288
+ await (0, _pMapSeries().default)(logs, async logItem => {
289
+ if (unblamedLineIndices.size === 0) return; // All lines have been assigned
290
+
291
+ const currentHash = logItem.fileHash;
292
+ const parentHash = logItem.parentFileHash;
293
+
294
+ // Skip if there is no parent to compare with
295
+ if (!parentHash) return;
296
+ currentContentStr = await getFileContent(currentHash);
297
+ const parentContentStr = await getFileContent(parentHash);
298
+ const diff = (0, _diff().diffLines)(parentContentStr, currentContentStr);
299
+ const removedLines = {};
300
+ const addedLines = [];
301
+ let currentLineNum = 0;
302
+ diff.forEach(part => {
303
+ const lines = part.value.split('\n');
304
+ // Remove the last empty line if the string ends with a newline
305
+ if (lines[lines.length - 1] === '') lines.pop();
306
+ if (part.added) {
307
+ // Lines added in the current version
308
+ lines.forEach(() => {
309
+ if (unblamedLineIndices.has(currentLineNum)) {
310
+ populateBlameArray(currentLineNum, logItem);
311
+ addedLines.push(currentLineNum);
312
+ unblamedLineIndices.delete(currentLineNum);
313
+ }
314
+ currentLineNum++;
315
+ });
316
+ } else if (part.removed) {
317
+ lines.forEach((line, index) => {
318
+ removedLines[currentLineNum + index] = line;
319
+ });
320
+ // Lines removed from parent version; do not advance currentLineNum
321
+ // Since these lines are not in the current version, we ignore them
322
+ } else {
323
+ // Unchanged lines
324
+ currentLineNum += lines.length;
325
+ }
326
+ });
327
+ Object.keys(removedLines).forEach(lineNum => {
328
+ if (addedLines.includes(parseInt(lineNum))) {
329
+ blameArray[parseInt(lineNum)].previousLineContent = removedLines[parseInt(lineNum)];
330
+ }
331
+ });
332
+ });
333
+
334
+ // Assign the oldest log info to any remaining unblamed lines
335
+ const oldestLog = logs[logs.length - 1];
336
+ unblamedLineIndices.forEach(lineIdx => {
337
+ populateBlameArray(lineIdx, oldestLog);
338
+ });
339
+ return blameArray;
340
+ }
237
341
  async getFileLog(filePath) {
238
342
  const workspace = this.workspace;
239
343
  if (!workspace) throw new (_workspace().OutsideWorkspaceError)();
@@ -284,7 +388,7 @@ class ComponentLogMain {
284
388
  }
285
389
  static async provider([cli, workspace]) {
286
390
  const componentLog = new ComponentLogMain(workspace);
287
- cli.register(new (_logCmd().default)(componentLog), new (_logFileCmd().LogFileCmd)(componentLog));
391
+ cli.register(new (_logCmd().default)(componentLog), new (_logFileCmd().LogFileCmd)(componentLog), new (_blameCmd().BlameCmd)(componentLog));
288
392
  return componentLog;
289
393
  }
290
394
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_toolboxPath","_legacy","_chalk","_getRemoteByName","_componentLog","_logCmd","_snapGraph","_logFileCmd","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentLogMain","constructor","workspace","getLogs","id","isRemote","shortHash","shortMessage","consumer","bitId","ComponentID","fromString","remote","getRemoteByName","scope","log","OutsideWorkspaceError","componentId","resolveComponentId","logs","undefined","forEach","date","moment","Date","parseInt","format","message","split","getLogsWithParents","fullHash","fullMessage","graph","buildSnapGraph","sorted","toposort","map","node","stringifyLogInfoOneLine","attr","getChangedFilesFromParent","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","version","firstParent","parents","parentObj","toString","compDir","componentDir","ignoreVersion","results","compact","files","file","parentFile","find","f","relativePath","isEqual","filePath","path","join","hash","parentHash","filesOnParentOnly","filter","length","push","getFileHistoryHashes","getComponentIdByPath","rootDir","filePathAsLinux","pathNormalizeToLinux","filePathRelativeInComponent","replace","pMap","logItem","fileInComp","fileHash","getFileHashFromParent","parent","parentFileInComp","fileHashesFromParent","Promise","all","getParentFileHash","includes","tag","username","email","parentFileHash","concurrency","getFileLog","Error","relative","lastFile","pMapSeries","component","get","changeVersion","filesystem","lastResult","lastHash","toSourceAsLinuxEOL","diff","getFilesDiff","fileDiff","diffOutput","logInfo","chalk","yellow","provider","cli","componentLog","register","LogCmd","LogFileCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","ComponentLogAspect","addRuntime"],"sources":["component-log.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';\nimport path from 'path';\nimport moment from 'moment';\nimport pMap from 'p-map';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport { Version } from '@teambit/legacy/dist/scope/models';\nimport { pathNormalizeToLinux } from '@teambit/toolbox.path.path';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { getFilesDiff } from '@teambit/legacy.component-diff';\nimport chalk from 'chalk';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { ComponentLogAspect } from './component-log.aspect';\nimport LogCmd from './log-cmd';\nimport { buildSnapGraph } from './snap-graph';\nimport { LogFileCmd } from './log-file-cmd';\n\nexport type FileLog = {\n hash: string;\n tag?: string;\n username?: string;\n email?: string;\n date: string;\n message: string;\n fileHash: string;\n parentFileHash?: string;\n fileDiff?: string;\n};\n\nexport type FileHashDiffFromParent = {\n filePath: string; // path OS absolute\n hash?: string; // if undefined, the file was deleted in this snap\n parentHash?: string; // if undefined, the file was added in this snap\n};\n\nexport class ComponentLogMain {\n constructor(private workspace: Workspace | undefined) {}\n\n /**\n * get component log sorted by the timestamp in ascending order (from the earliest to the latest)\n */\n async getLogs(id: string, isRemote?: boolean, shortHash = false, shortMessage = false): Promise<ComponentLog[]> {\n if (isRemote) {\n const consumer = this.workspace?.consumer;\n const bitId = ComponentID.fromString(id);\n const remote = await getRemoteByName(bitId.scope as string, consumer);\n return remote.log(bitId);\n }\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentId = await this.workspace.resolveComponentId(id);\n const logs = await this.workspace.scope.getLogs(componentId, shortHash, undefined, true);\n logs.forEach((log) => {\n log.date = log.date ? moment(new Date(parseInt(log.date))).format('YYYY-MM-DD HH:mm:ss') : undefined;\n log.message = shortMessage ? log.message.split('\\n')[0] : log.message;\n });\n return logs;\n }\n\n async getLogsWithParents(id: string, fullHash = false, fullMessage = false) {\n const logs = await this.getLogs(id, false, !fullHash, !fullMessage);\n const graph = buildSnapGraph(logs);\n const sorted = graph.toposort();\n return sorted.map((node) => this.stringifyLogInfoOneLine(node.attr));\n }\n\n async getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const modelComp = await workspace.scope.getBitObjectModelComponent(componentId, true);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const versionObj = (await workspace.scope.getBitObjectVersion(modelComp!, componentId.version!, true)) as Version;\n const firstParent = versionObj.parents[0];\n const parentObj = firstParent\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n ((await workspace.scope.getBitObjectVersion(modelComp!, firstParent.toString(), true)) as Version)\n : null;\n const compDir = workspace.componentDir(componentId, { ignoreVersion: true });\n const results: FileHashDiffFromParent[] = compact(\n versionObj.files.map((file) => {\n const parentFile = parentObj?.files.find((f) => f.relativePath === file.relativePath);\n if (parentFile?.file.isEqual(file.file)) return null;\n return {\n filePath: path.join(compDir, file.relativePath),\n hash: file.file.toString(),\n parentHash: parentFile?.file.toString(),\n };\n })\n );\n const filesOnParentOnly = (parentObj?.files || []).filter(\n (parentFile) => !versionObj.files.find((file) => file.relativePath === parentFile.relativePath)\n );\n if (filesOnParentOnly.length) {\n results.push(\n ...filesOnParentOnly.map((file) => ({\n filePath: file.relativePath,\n hash: undefined,\n parentHash: file.file.toString(),\n }))\n );\n }\n\n return results;\n }\n\n async getFileHistoryHashes(filePath: string): Promise<FileLog[]> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.getComponentIdByPath(filePath);\n if (!componentId) {\n // filePath could be from the component dir but the file is not part of the bit-component (such as component.json)\n return [];\n }\n\n const rootDir = workspace.componentDir(componentId, undefined);\n\n const logs = await this.getLogs(componentId.toString());\n\n const filePathAsLinux = pathNormalizeToLinux(filePath);\n const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');\n\n const modelComp = await workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return []; // probably a new component\n const results: FileLog[] = [];\n await pMap(\n logs,\n async (logItem) => {\n const versionObj = await workspace.scope.getBitObjectVersion(modelComp, logItem.hash, true);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const fileInComp = versionObj!.files.find((f) => f.relativePath === filePathRelativeInComponent);\n if (!fileInComp) return;\n const fileHash = fileInComp.file.toString();\n const getFileHashFromParent = async (parent: Ref) => {\n const parentObj = parent\n ? await workspace.scope.getBitObjectVersion(modelComp, parent.toString(), true)\n : undefined;\n\n const parentFileInComp = parentObj\n ? parentObj.files.find((f) => f.relativePath === filePathRelativeInComponent)\n : undefined;\n\n return parentFileInComp?.file.toString();\n };\n const fileHashesFromParent = versionObj ? await Promise.all(versionObj.parents.map(getFileHashFromParent)) : [];\n\n const getParentFileHash = () => {\n if (fileHashesFromParent.length === 0) return undefined;\n if (fileHashesFromParent.length === 1) return fileHashesFromParent[0];\n // if one parent has it, it means that this merge-snap didn't change the file.\n if (fileHashesFromParent.includes(fileHash)) return fileHash;\n return fileHashesFromParent[0];\n };\n\n results.push({\n hash: logItem.hash,\n tag: logItem.tag,\n username: logItem.username,\n email: logItem.email,\n date: logItem.date || '<N/A>',\n message: logItem.message,\n fileHash,\n parentFileHash: getParentFileHash(),\n });\n },\n { concurrency: 100 }\n );\n\n // remove entries that their fileHash is the same as their parent.\n return results.filter((r) => r.fileHash !== r.parentFileHash);\n }\n\n async getFileLog(filePath: string) {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.getComponentIdByPath(filePath);\n if (!componentId) throw new Error(`unable to find component for file ${filePath}`);\n\n const rootDir = workspace.componentDir(componentId, undefined, { relative: true });\n\n const logs = await this.getLogs(componentId.toString());\n\n const filePathAsLinux = pathNormalizeToLinux(filePath);\n const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');\n\n const results: FileLog[] = [];\n let lastFile;\n await pMapSeries(logs, async (logItem) => {\n const component = await workspace.get(componentId.changeVersion(logItem.tag || logItem.hash));\n const fileInComp = component.filesystem.files.find((f) => f.relative === filePathRelativeInComponent);\n const lastResult = results[results.length - 1];\n const lastHash = lastResult?.fileHash;\n let fileHash: string;\n if (!fileInComp) {\n if (!lastHash) return;\n fileHash = '<REMOVED>';\n } else {\n fileHash = fileInComp.toSourceAsLinuxEOL().hash().toString();\n }\n if (fileHash === lastHash) return;\n\n let diff;\n if (lastFile && fileInComp) {\n diff = await getFilesDiff([lastFile], [fileInComp], logItem.hash, lastResult.hash, undefined);\n }\n\n lastFile = fileInComp;\n\n results.push({\n hash: logItem.hash,\n tag: logItem.tag,\n username: logItem.username,\n email: logItem.email,\n date: logItem.date || '<N/A>',\n message: logItem.message,\n fileDiff: diff?.length ? diff[0].diffOutput : undefined,\n fileHash,\n });\n });\n return results;\n }\n\n private stringifyLogInfoOneLine(logInfo: ComponentLogInfo) {\n const parents = logInfo.parents.length ? `Parent(s): ${logInfo.parents.join(', ')}` : '<N/A>';\n return `${chalk.yellow(logInfo.hash)} ${logInfo.username || ''} ${logInfo.date || ''} ${\n logInfo.message\n }, ${parents}`;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const componentLog = new ComponentLogMain(workspace);\n cli.register(new LogCmd(componentLog), new LogFileCmd(componentLog));\n return componentLog;\n }\n}\n\nComponentLogAspect.addRuntime(ComponentLogMain);\n\nexport type ComponentLogInfo = {\n hash: string;\n message: string;\n onLane?: boolean;\n parents: string[];\n username?: string;\n email?: string;\n date?: string;\n tag?: string;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAA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ACpD,OAAO;QACxBkF,QAAQ,EAAEF,IAAI,EAAEtC,MAAM,GAAGsC,IAAI,CAAC,CAAC,CAAC,CAACG,UAAU,GAAG1F,SAAS;QACvD6D;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;IACF,OAAO5B,OAAO;EAChB;EAEQf,uBAAuBA,CAACyE,OAAyB,EAAE;IACzD,MAAMhE,OAAO,GAAGgE,OAAO,CAAChE,OAAO,CAACsB,MAAM,GAAG,cAAc0C,OAAO,CAAChE,OAAO,CAACiB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO;IAC7F,OAAO,GAAGgD,gBAAK,CAACC,MAAM,CAACF,OAAO,CAAC9C,IAAI,CAAC,IAAI8C,OAAO,CAACpB,QAAQ,IAAI,EAAE,IAAIoB,OAAO,CAACzF,IAAI,IAAI,EAAE,IAClFyF,OAAO,CAACpF,OAAO,KACZoB,OAAO,EAAE;EAChB;EAKA,aAAamE,QAAQA,CAAC,CAACC,GAAG,EAAEjH,SAAS,CAAuB,EAAE;IAC5D,MAAMkH,YAAY,GAAG,IAAIpH,gBAAgB,CAACE,SAAS,CAAC;IACpDiH,GAAG,CAACE,QAAQ,CAAC,KAAIC,iBAAM,EAACF,YAAY,CAAC,EAAE,KAAIG,wBAAU,EAACH,YAAY,CAAC,CAAC;IACpE,OAAOA,YAAY;EACrB;AACF;AAACI,OAAA,CAAAxH,gBAAA,GAAAA,gBAAA;AAAAlB,eAAA,CAzMYkB,gBAAgB,WAiMZ,EAAE;AAAAlB,eAAA,CAjMNkB,gBAAgB,kBAkML,CAACyH,gBAAS,EAAEC,4BAAe,CAAC;AAAA5I,eAAA,CAlMvCkB,gBAAgB,aAmMV2H,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAAC7H,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_toolboxPath","_objects","_legacy","_chalk","_getRemoteByName","_diff","_componentLog","_logCmd","_snapGraph","_logFileCmd","_blameCmd","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentLogMain","constructor","workspace","getLogs","id","isRemote","shortHash","shortMessage","consumer","bitId","ComponentID","fromString","remote","getRemoteByName","scope","log","OutsideWorkspaceError","componentId","resolveComponentId","logs","undefined","forEach","date","moment","Date","parseInt","format","message","split","getLogsWithParents","fullHash","fullMessage","graph","buildSnapGraph","sorted","toposort","map","node","stringifyLogInfoOneLine","attr","getChangedFilesFromParent","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","version","firstParent","parents","parentObj","toString","compDir","componentDir","ignoreVersion","results","compact","files","file","parentFile","find","f","relativePath","isEqual","filePath","path","join","hash","parentHash","filesOnParentOnly","filter","length","push","getFileHistoryHashes","getComponentIdByPath","rootDir","filePathAsLinux","pathNormalizeToLinux","filePathRelativeInComponent","replace","pMap","logItem","fileInComp","fileHash","getFileHashFromParent","parent","parentFileInComp","fileHashesFromParent","Promise","all","getParentFileHash","includes","tag","username","email","parentFileHash","concurrency","blame","absPath","isAbsolute","toAbsolutePath","reversedLogs","reverse","getFileContent","source","legacyScope","objects","load","Ref","from","contents","currentLog","currentContentStr","currentContentLines","blameArray","lineContent","index","lineNumber","populateBlameArray","unblamedLineIndices","Set","_","pMapSeries","size","currentHash","parentContentStr","diff","diffLines","removedLines","addedLines","currentLineNum","part","lines","pop","added","has","delete","removed","line","keys","lineNum","previousLineContent","oldestLog","lineIdx","getFileLog","Error","relative","lastFile","component","get","changeVersion","filesystem","lastResult","lastHash","toSourceAsLinuxEOL","getFilesDiff","fileDiff","diffOutput","logInfo","chalk","yellow","provider","cli","componentLog","register","LogCmd","LogFileCmd","BlameCmd","exports","CLIAspect","WorkspaceAspect","MainRuntime","ComponentLogAspect","addRuntime"],"sources":["component-log.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';\nimport path from 'path';\nimport moment from 'moment';\nimport pMap from 'p-map';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport { Source, Version } from '@teambit/legacy/dist/scope/models';\nimport { pathNormalizeToLinux, PathOsBasedAbsolute } from '@teambit/toolbox.path.path';\nimport { Ref } from '@teambit/legacy/dist/scope/objects';\nimport { getFilesDiff } from '@teambit/legacy.component-diff';\nimport chalk from 'chalk';\nimport getRemoteByName from '@teambit/legacy/dist/remotes/get-remote-by-name';\nimport { diffLines } from 'diff';\nimport { ComponentLogAspect } from './component-log.aspect';\nimport LogCmd from './log-cmd';\nimport { buildSnapGraph } from './snap-graph';\nimport { LogFileCmd } from './log-file-cmd';\nimport { BlameCmd } from './blame-cmd';\n\nexport type FileLog = {\n hash: string;\n tag?: string;\n username?: string;\n email?: string;\n date: string;\n message: string;\n fileHash: string;\n parentFileHash?: string;\n fileDiff?: string;\n};\n\nexport type BlameLineInfo = {\n lineNumber: number;\n lineContent: string;\n previousLineContent?: string;\n username: string;\n email?: string;\n date: string;\n message: string;\n hash: string;\n tag?: string;\n};\n\nexport type FileHashDiffFromParent = {\n filePath: string; // path OS absolute\n hash?: string; // if undefined, the file was deleted in this snap\n parentHash?: string; // if undefined, the file was added in this snap\n};\n\nexport class ComponentLogMain {\n constructor(private workspace: Workspace | undefined) {}\n\n /**\n * get component log sorted by the timestamp in ascending order (from the earliest to the latest)\n */\n async getLogs(id: string, isRemote?: boolean, shortHash = false, shortMessage = false): Promise<ComponentLog[]> {\n if (isRemote) {\n const consumer = this.workspace?.consumer;\n const bitId = ComponentID.fromString(id);\n const remote = await getRemoteByName(bitId.scope as string, consumer);\n return remote.log(bitId);\n }\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentId = await this.workspace.resolveComponentId(id);\n const logs = await this.workspace.scope.getLogs(componentId, shortHash, undefined, true);\n logs.forEach((log) => {\n log.date = log.date ? moment(new Date(parseInt(log.date))).format('YYYY-MM-DD HH:mm:ss') : undefined;\n log.message = shortMessage ? log.message.split('\\n')[0] : log.message;\n });\n return logs;\n }\n\n async getLogsWithParents(id: string, fullHash = false, fullMessage = false) {\n const logs = await this.getLogs(id, false, !fullHash, !fullMessage);\n const graph = buildSnapGraph(logs);\n const sorted = graph.toposort();\n return sorted.map((node) => this.stringifyLogInfoOneLine(node.attr));\n }\n\n async getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.resolveComponentId(id);\n const modelComp = await workspace.scope.getBitObjectModelComponent(componentId, true);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const versionObj = (await workspace.scope.getBitObjectVersion(modelComp!, componentId.version!, true)) as Version;\n const firstParent = versionObj.parents[0];\n const parentObj = firstParent\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n ((await workspace.scope.getBitObjectVersion(modelComp!, firstParent.toString(), true)) as Version)\n : null;\n const compDir = workspace.componentDir(componentId, { ignoreVersion: true });\n const results: FileHashDiffFromParent[] = compact(\n versionObj.files.map((file) => {\n const parentFile = parentObj?.files.find((f) => f.relativePath === file.relativePath);\n if (parentFile?.file.isEqual(file.file)) return null;\n return {\n filePath: path.join(compDir, file.relativePath),\n hash: file.file.toString(),\n parentHash: parentFile?.file.toString(),\n };\n })\n );\n const filesOnParentOnly = (parentObj?.files || []).filter(\n (parentFile) => !versionObj.files.find((file) => file.relativePath === parentFile.relativePath)\n );\n if (filesOnParentOnly.length) {\n results.push(\n ...filesOnParentOnly.map((file) => ({\n filePath: file.relativePath,\n hash: undefined,\n parentHash: file.file.toString(),\n }))\n );\n }\n\n return results;\n }\n\n async getFileHistoryHashes(filePath: PathOsBasedAbsolute): Promise<FileLog[]> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.getComponentIdByPath(filePath);\n if (!componentId) {\n // filePath could be from the component dir but the file is not part of the bit-component (such as component.json)\n return [];\n }\n\n const rootDir = workspace.componentDir(componentId, undefined);\n\n const logs = await this.getLogs(componentId.toString());\n\n const filePathAsLinux = pathNormalizeToLinux(filePath);\n const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');\n\n const modelComp = await workspace.scope.getBitObjectModelComponent(componentId);\n if (!modelComp) return []; // probably a new component\n const results: FileLog[] = [];\n await pMap(\n logs,\n async (logItem) => {\n const versionObj = await workspace.scope.getBitObjectVersion(modelComp, logItem.hash, true);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const fileInComp = versionObj!.files.find((f) => f.relativePath === filePathRelativeInComponent);\n if (!fileInComp) return;\n const fileHash = fileInComp.file.toString();\n const getFileHashFromParent = async (parent: Ref) => {\n const parentObj = parent\n ? await workspace.scope.getBitObjectVersion(modelComp, parent.toString(), true)\n : undefined;\n\n const parentFileInComp = parentObj\n ? parentObj.files.find((f) => f.relativePath === filePathRelativeInComponent)\n : undefined;\n\n return parentFileInComp?.file.toString();\n };\n const fileHashesFromParent = versionObj ? await Promise.all(versionObj.parents.map(getFileHashFromParent)) : [];\n\n const getParentFileHash = () => {\n if (fileHashesFromParent.length === 0) return undefined;\n if (fileHashesFromParent.length === 1) return fileHashesFromParent[0];\n // if one parent has it, it means that this merge-snap didn't change the file.\n if (fileHashesFromParent.includes(fileHash)) return fileHash;\n return fileHashesFromParent[0];\n };\n\n results.push({\n hash: logItem.hash,\n tag: logItem.tag,\n username: logItem.username,\n email: logItem.email,\n date: logItem.date || '<N/A>',\n message: logItem.message,\n fileHash,\n parentFileHash: getParentFileHash(),\n });\n },\n { concurrency: 100 }\n );\n\n // remove entries that their fileHash is the same as their parent.\n return results.filter((r) => r.fileHash !== r.parentFileHash);\n }\n\n async blame(filePath: string): Promise<BlameLineInfo[]> {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const absPath = path.isAbsolute(filePath) ? filePath : workspace.consumer.toAbsolutePath(filePath);\n const reversedLogs = await this.getFileHistoryHashes(absPath);\n const logs = reversedLogs.reverse();\n\n const getFileContent = async (hash: string) => {\n const source = (await workspace.scope.legacyScope.objects.load(Ref.from(hash), true)) as Source;\n return source.contents.toString();\n };\n\n // Initialize the blame array with the current file content\n const currentLog = logs[0];\n let currentContentStr = await getFileContent(currentLog.fileHash);\n const currentContentLines = currentContentStr.split('\\n');\n const blameArray: Partial<BlameLineInfo>[] = currentContentLines.map((lineContent, index) => ({\n lineNumber: index + 1,\n lineContent,\n }));\n const populateBlameArray = (lineNumber: number, log: FileLog) => {\n blameArray[lineNumber].username = log.username;\n blameArray[lineNumber].email = log.email;\n blameArray[lineNumber].date = log.date;\n blameArray[lineNumber].message = log.message;\n blameArray[lineNumber].hash = log.hash;\n blameArray[lineNumber].tag = log.tag;\n };\n\n // Keep track of unassigned lines\n const unblamedLineIndices = new Set(blameArray.map((_, index) => index));\n\n await pMapSeries(logs, async (logItem) => {\n if (unblamedLineIndices.size === 0) return; // All lines have been assigned\n\n const currentHash = logItem.fileHash;\n const parentHash = logItem.parentFileHash;\n\n // Skip if there is no parent to compare with\n if (!parentHash) return;\n\n currentContentStr = await getFileContent(currentHash);\n const parentContentStr = await getFileContent(parentHash);\n\n const diff = diffLines(parentContentStr, currentContentStr);\n\n const removedLines: Record<number, string> = {};\n const addedLines: number[] = [];\n\n let currentLineNum = 0;\n\n diff.forEach((part) => {\n const lines = part.value.split('\\n');\n // Remove the last empty line if the string ends with a newline\n if (lines[lines.length - 1] === '') lines.pop();\n\n if (part.added) {\n // Lines added in the current version\n lines.forEach(() => {\n if (unblamedLineIndices.has(currentLineNum)) {\n populateBlameArray(currentLineNum, logItem);\n addedLines.push(currentLineNum);\n unblamedLineIndices.delete(currentLineNum);\n }\n currentLineNum++;\n });\n } else if (part.removed) {\n lines.forEach((line, index) => {\n removedLines[currentLineNum + index] = line;\n });\n // Lines removed from parent version; do not advance currentLineNum\n // Since these lines are not in the current version, we ignore them\n } else {\n // Unchanged lines\n currentLineNum += lines.length;\n }\n });\n Object.keys(removedLines).forEach((lineNum) => {\n if (addedLines.includes(parseInt(lineNum))) {\n blameArray[parseInt(lineNum)].previousLineContent = removedLines[parseInt(lineNum)];\n }\n });\n });\n\n // Assign the oldest log info to any remaining unblamed lines\n const oldestLog = logs[logs.length - 1];\n unblamedLineIndices.forEach((lineIdx) => {\n populateBlameArray(lineIdx, oldestLog);\n });\n\n return blameArray as BlameLineInfo[];\n }\n\n async getFileLog(filePath: string) {\n const workspace = this.workspace;\n if (!workspace) throw new OutsideWorkspaceError();\n const componentId = await workspace.getComponentIdByPath(filePath);\n if (!componentId) throw new Error(`unable to find component for file ${filePath}`);\n\n const rootDir = workspace.componentDir(componentId, undefined, { relative: true });\n\n const logs = await this.getLogs(componentId.toString());\n\n const filePathAsLinux = pathNormalizeToLinux(filePath);\n const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');\n\n const results: FileLog[] = [];\n let lastFile;\n await pMapSeries(logs, async (logItem) => {\n const component = await workspace.get(componentId.changeVersion(logItem.tag || logItem.hash));\n const fileInComp = component.filesystem.files.find((f) => f.relative === filePathRelativeInComponent);\n const lastResult = results[results.length - 1];\n const lastHash = lastResult?.fileHash;\n let fileHash: string;\n if (!fileInComp) {\n if (!lastHash) return;\n fileHash = '<REMOVED>';\n } else {\n fileHash = fileInComp.toSourceAsLinuxEOL().hash().toString();\n }\n if (fileHash === lastHash) return;\n\n let diff;\n if (lastFile && fileInComp) {\n diff = await getFilesDiff([lastFile], [fileInComp], logItem.hash, lastResult.hash, undefined);\n }\n\n lastFile = fileInComp;\n\n results.push({\n hash: logItem.hash,\n tag: logItem.tag,\n username: logItem.username,\n email: logItem.email,\n date: logItem.date || '<N/A>',\n message: logItem.message,\n fileDiff: diff?.length ? diff[0].diffOutput : undefined,\n fileHash,\n });\n });\n return results;\n }\n\n private stringifyLogInfoOneLine(logInfo: ComponentLogInfo) {\n const parents = logInfo.parents.length ? `Parent(s): ${logInfo.parents.join(', ')}` : '<N/A>';\n return `${chalk.yellow(logInfo.hash)} ${logInfo.username || ''} ${logInfo.date || ''} ${\n logInfo.message\n }, ${parents}`;\n }\n\n static slots = [];\n static dependencies = [CLIAspect, WorkspaceAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace]: [CLIMain, Workspace]) {\n const componentLog = new ComponentLogMain(workspace);\n cli.register(new LogCmd(componentLog), new LogFileCmd(componentLog), new BlameCmd(componentLog));\n return componentLog;\n }\n}\n\nComponentLogAspect.addRuntime(ComponentLogMain);\n\nexport type ComponentLogInfo = {\n hash: string;\n message: string;\n onLane?: boolean;\n parents: string[];\n username?: string;\n email?: string;\n date?: string;\n tag?: string;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,aAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAK,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAA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B,UAAU,GAAGvI,SAAS;QACvD6D;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;IACF,OAAO5B,OAAO;EAChB;EAEQf,uBAAuBA,CAACsH,OAAyB,EAAE;IACzD,MAAM7G,OAAO,GAAG6G,OAAO,CAAC7G,OAAO,CAACsB,MAAM,GAAG,cAAcuF,OAAO,CAAC7G,OAAO,CAACiB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO;IAC7F,OAAO,GAAG6F,gBAAK,CAACC,MAAM,CAACF,OAAO,CAAC3F,IAAI,CAAC,IAAI2F,OAAO,CAACjE,QAAQ,IAAI,EAAE,IAAIiE,OAAO,CAACtI,IAAI,IAAI,EAAE,IAClFsI,OAAO,CAACjI,OAAO,KACZoB,OAAO,EAAE;EAChB;EAKA,aAAagH,QAAQA,CAAC,CAACC,GAAG,EAAE9J,SAAS,CAAuB,EAAE;IAC5D,MAAM+J,YAAY,GAAG,IAAIjK,gBAAgB,CAACE,SAAS,CAAC;IACpD8J,GAAG,CAACE,QAAQ,CAAC,KAAIC,iBAAM,EAACF,YAAY,CAAC,EAAE,KAAIG,wBAAU,EAACH,YAAY,CAAC,EAAE,KAAII,oBAAQ,EAACJ,YAAY,CAAC,CAAC;IAChG,OAAOA,YAAY;EACrB;AACF;AAACK,OAAA,CAAAtK,gBAAA,GAAAA,gBAAA;AAAAlB,eAAA,CAtSYkB,gBAAgB,WA8RZ,EAAE;AAAAlB,eAAA,CA9RNkB,gBAAgB,kBA+RL,CAACuK,gBAAS,EAAEC,4BAAe,CAAC;AAAA1L,eAAA,CA/RvCkB,gBAAgB,aAgSVyK,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAAC3K,gBAAgB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.444/dist/component-log.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.444/dist/component-log.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.446/dist/component-log.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.446/dist/component-log.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@teambit/component-log",
3
- "version": "1.0.444",
3
+ "version": "1.0.446",
4
4
  "homepage": "https://bit.cloud/teambit/component/component-log",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.component",
8
8
  "name": "component-log",
9
- "version": "1.0.444"
9
+ "version": "1.0.446"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
13
+ "diff": "^7.0.0",
13
14
  "lodash": "4.17.21",
14
15
  "moment": "2.29.4",
15
16
  "p-map-series": "2.1.0",
@@ -18,13 +19,14 @@
18
19
  "@teambit/harmony": "0.4.6",
19
20
  "@teambit/component-id": "1.2.2",
20
21
  "@teambit/graph.cleargraph": "0.0.11",
21
- "@teambit/cli": "0.0.1021",
22
+ "@teambit/cli": "0.0.1023",
22
23
  "@teambit/legacy-component-log": "0.0.403",
23
- "@teambit/legacy.component-diff": "0.0.40",
24
+ "@teambit/legacy.component-diff": "0.0.41",
24
25
  "@teambit/toolbox.path.path": "0.0.4",
25
- "@teambit/workspace": "1.0.444"
26
+ "@teambit/workspace": "1.0.446"
26
27
  },
27
28
  "devDependencies": {
29
+ "@types/diff": "^5.2.3",
28
30
  "@types/lodash": "4.14.165",
29
31
  "@types/cli-table": "^0.3.0",
30
32
  "@types/mocha": "9.1.0",