@teambit/component-log 1.0.330 → 1.0.332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_component_component_log-preview.js +1 -1
- package/artifacts/schema.json +9 -35
- package/dist/component-log.main.runtime.js +5 -5
- package/dist/component-log.main.runtime.js.map +1 -1
- package/dist/{preview-1720513025675.js → preview-1720690103747.js} +2 -2
- package/package.json +7 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.component/component-log@1.0.
|
|
3
|
+
<testsuite name="teambit.component/component-log@1.0.332" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-log-preview"]=t():e["teambit.component/component-log-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.component/component-log-preview"]=t():e["teambit.component/component-log-preview"]=t()}(self,(()=>(()=>{"use strict";var e={73237:(e,t,o)=>{var n={id:"teambit.component/component-log@1.0.332",homepage:"https://bit.cloud/teambit/component/component-log",exported:!0};function r(){const e=i(o(41594));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const c=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/component-log.svg"}));c.__bit_component=n,t.Logo=c},41594:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{compositions:()=>f,compositions_metadata:()=>v,overview:()=>m});var r={};o.r(r),o.d(r,{default:()=>d});var i=o(73237);o(41594);const c=MdxJsReact,p=TeambitMdxUiMdxScopeContext;var a=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},s.apply(null,arguments)}var l={},u="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,a);return(0,c.mdx)(u,s({},l,o,{components:t,mdxType:"MDXLayout"}),(0,c.mdx)(p.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const f=[i],m=[r],v={compositions:[{displayName:"Logo",identifier:"Logo"}]};return n})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -64,11 +64,7 @@
|
|
|
64
64
|
"line": 40,
|
|
65
65
|
"character": 34
|
|
66
66
|
},
|
|
67
|
-
"name": "Workspace"
|
|
68
|
-
"componentId": {
|
|
69
|
-
"scope": "teambit.workspace",
|
|
70
|
-
"name": "workspace"
|
|
71
|
-
}
|
|
67
|
+
"name": "Workspace"
|
|
72
68
|
},
|
|
73
69
|
{
|
|
74
70
|
"__schema": "KeywordTypeSchema",
|
|
@@ -435,8 +431,7 @@
|
|
|
435
431
|
"line": 109,
|
|
436
432
|
"character": 57
|
|
437
433
|
},
|
|
438
|
-
"name": "FileLog"
|
|
439
|
-
"internalFilePath": "component-log.main.runtime.ts"
|
|
434
|
+
"name": "FileLog"
|
|
440
435
|
}
|
|
441
436
|
}
|
|
442
437
|
]
|
|
@@ -585,11 +580,7 @@
|
|
|
585
580
|
"line": 235,
|
|
586
581
|
"character": 44
|
|
587
582
|
},
|
|
588
|
-
"name": "CLIMain"
|
|
589
|
-
"componentId": {
|
|
590
|
-
"scope": "teambit.harmony",
|
|
591
|
-
"name": "cli"
|
|
592
|
-
}
|
|
583
|
+
"name": "CLIMain"
|
|
593
584
|
},
|
|
594
585
|
{
|
|
595
586
|
"__schema": "TypeRefSchema",
|
|
@@ -598,11 +589,7 @@
|
|
|
598
589
|
"line": 235,
|
|
599
590
|
"character": 53
|
|
600
591
|
},
|
|
601
|
-
"name": "Workspace"
|
|
602
|
-
"componentId": {
|
|
603
|
-
"scope": "teambit.workspace",
|
|
604
|
-
"name": "workspace"
|
|
605
|
-
}
|
|
592
|
+
"name": "Workspace"
|
|
606
593
|
}
|
|
607
594
|
]
|
|
608
595
|
},
|
|
@@ -1098,11 +1085,7 @@
|
|
|
1098
1085
|
"line": 40,
|
|
1099
1086
|
"character": 34
|
|
1100
1087
|
},
|
|
1101
|
-
"name": "Workspace"
|
|
1102
|
-
"componentId": {
|
|
1103
|
-
"scope": "teambit.workspace",
|
|
1104
|
-
"name": "workspace"
|
|
1105
|
-
}
|
|
1088
|
+
"name": "Workspace"
|
|
1106
1089
|
},
|
|
1107
1090
|
{
|
|
1108
1091
|
"__schema": "KeywordTypeSchema",
|
|
@@ -1469,8 +1452,7 @@
|
|
|
1469
1452
|
"line": 109,
|
|
1470
1453
|
"character": 57
|
|
1471
1454
|
},
|
|
1472
|
-
"name": "FileLog"
|
|
1473
|
-
"internalFilePath": "component-log.main.runtime.ts"
|
|
1455
|
+
"name": "FileLog"
|
|
1474
1456
|
}
|
|
1475
1457
|
}
|
|
1476
1458
|
]
|
|
@@ -1619,11 +1601,7 @@
|
|
|
1619
1601
|
"line": 235,
|
|
1620
1602
|
"character": 44
|
|
1621
1603
|
},
|
|
1622
|
-
"name": "CLIMain"
|
|
1623
|
-
"componentId": {
|
|
1624
|
-
"scope": "teambit.harmony",
|
|
1625
|
-
"name": "cli"
|
|
1626
|
-
}
|
|
1604
|
+
"name": "CLIMain"
|
|
1627
1605
|
},
|
|
1628
1606
|
{
|
|
1629
1607
|
"__schema": "TypeRefSchema",
|
|
@@ -1632,11 +1610,7 @@
|
|
|
1632
1610
|
"line": 235,
|
|
1633
1611
|
"character": 53
|
|
1634
1612
|
},
|
|
1635
|
-
"name": "Workspace"
|
|
1636
|
-
"componentId": {
|
|
1637
|
-
"scope": "teambit.workspace",
|
|
1638
|
-
"name": "workspace"
|
|
1639
|
-
}
|
|
1613
|
+
"name": "Workspace"
|
|
1640
1614
|
}
|
|
1641
1615
|
]
|
|
1642
1616
|
},
|
|
@@ -1905,7 +1879,7 @@
|
|
|
1905
1879
|
"componentId": {
|
|
1906
1880
|
"scope": "teambit.component",
|
|
1907
1881
|
"name": "component-log",
|
|
1908
|
-
"version": "1.0.
|
|
1882
|
+
"version": "1.0.332"
|
|
1909
1883
|
},
|
|
1910
1884
|
"taggedModuleExports": []
|
|
1911
1885
|
}
|
|
@@ -60,9 +60,9 @@ function _pMapSeries() {
|
|
|
60
60
|
};
|
|
61
61
|
return data;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const data = require("@teambit/
|
|
65
|
-
|
|
63
|
+
function _toolboxPath() {
|
|
64
|
+
const data = require("@teambit/toolbox.path.path");
|
|
65
|
+
_toolboxPath = function () {
|
|
66
66
|
return data;
|
|
67
67
|
};
|
|
68
68
|
return data;
|
|
@@ -193,7 +193,7 @@ class ComponentLogMain {
|
|
|
193
193
|
}
|
|
194
194
|
const rootDir = workspace.componentDir(componentId, undefined);
|
|
195
195
|
const logs = await this.getLogs(componentId.toString());
|
|
196
|
-
const filePathAsLinux = (0,
|
|
196
|
+
const filePathAsLinux = (0, _toolboxPath().pathNormalizeToLinux)(filePath);
|
|
197
197
|
const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');
|
|
198
198
|
const modelComp = await workspace.scope.getBitObjectModelComponent(componentId);
|
|
199
199
|
if (!modelComp) return []; // probably a new component
|
|
@@ -243,7 +243,7 @@ class ComponentLogMain {
|
|
|
243
243
|
relative: true
|
|
244
244
|
});
|
|
245
245
|
const logs = await this.getLogs(componentId.toString());
|
|
246
|
-
const filePathAsLinux = (0,
|
|
246
|
+
const filePathAsLinux = (0, _toolboxPath().pathNormalizeToLinux)(filePath);
|
|
247
247
|
const filePathRelativeInComponent = filePathAsLinux.replace(`${rootDir}/`, '');
|
|
248
248
|
const results = [];
|
|
249
249
|
let lastFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_path2","_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","forEach","date","moment","Date","parseInt","format","undefined","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/legacy/dist/utils/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);\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,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;AAAA;AACA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OA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,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","_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","forEach","date","moment","Date","parseInt","format","undefined","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);\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,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;AAAA;AACA,SAAAO,WAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,UAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,QAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,OAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,YAAA;EAAA,M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AOA,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,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.332/dist/component-log.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.332/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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-log",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.332",
|
|
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.
|
|
9
|
+
"version": "1.0.332"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -18,17 +18,18 @@
|
|
|
18
18
|
"@teambit/harmony": "0.4.6",
|
|
19
19
|
"@teambit/component-id": "1.2.0",
|
|
20
20
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
21
|
-
"@teambit/cli": "0.0.
|
|
21
|
+
"@teambit/cli": "0.0.909",
|
|
22
22
|
"@teambit/legacy-component-log": "0.0.403",
|
|
23
|
-
"@teambit/legacy.component-diff": "0.0.
|
|
24
|
-
"@teambit/
|
|
23
|
+
"@teambit/legacy.component-diff": "0.0.2",
|
|
24
|
+
"@teambit/toolbox.path.path": "0.0.2",
|
|
25
|
+
"@teambit/workspace": "1.0.332"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@types/lodash": "4.14.165",
|
|
28
29
|
"@types/cli-table": "^0.3.0",
|
|
29
30
|
"@types/mocha": "9.1.0",
|
|
30
31
|
"chai": "4.3.0",
|
|
31
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
32
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.42"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"react": "^17.0.0 || ^18.0.0",
|