@teambit/component-log 1.0.1040 → 1.0.1041
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.
|
@@ -44,15 +44,6 @@ export declare class ComponentLogMain {
|
|
|
44
44
|
* get component log sorted by the timestamp in ascending order (from the earliest to the latest)
|
|
45
45
|
*/
|
|
46
46
|
getLogs(id: string, options?: LogOpts): Promise<ComponentLog[]>;
|
|
47
|
-
/**
|
|
48
|
-
* reflect the not-yet-snapped (staged) deprecation in the log.
|
|
49
|
-
* `bit deprecate` only writes the deprecation config to the workspace `.bitmap`; it's baked into a
|
|
50
|
-
* Version object on the next tag/snap. `collectLogs()` (which produces the `deprecated` field) reads
|
|
51
|
-
* that config from the committed head Version, so without this overlay `bit log` wouldn't show a
|
|
52
|
-
* range-deprecation until the next tag/snap. We mirror collectLogs' range logic here so the staged
|
|
53
|
-
* state (including a staged `bit undeprecate` that clears the range) matches the post-snap output.
|
|
54
|
-
*/
|
|
55
|
-
private applyStagedDeprecation;
|
|
56
47
|
getLogsWithParents(id: string, options: LogOpts): Promise<string[]>;
|
|
57
48
|
getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>;
|
|
58
49
|
getFileHistoryHashes(filePath: PathOsBasedAbsolute): Promise<FileLog[]>;
|
|
@@ -32,13 +32,6 @@ function _moment() {
|
|
|
32
32
|
};
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
|
-
function _semver() {
|
|
36
|
-
const data = _interopRequireDefault(require("semver"));
|
|
37
|
-
_semver = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
35
|
function _pMap() {
|
|
43
36
|
const data = _interopRequireDefault(require("p-map"));
|
|
44
37
|
_pMap = function () {
|
|
@@ -46,13 +39,6 @@ function _pMap() {
|
|
|
46
39
|
};
|
|
47
40
|
return data;
|
|
48
41
|
}
|
|
49
|
-
function _legacy() {
|
|
50
|
-
const data = require("@teambit/legacy.constants");
|
|
51
|
-
_legacy = function () {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
return data;
|
|
55
|
-
}
|
|
56
42
|
function _workspace() {
|
|
57
43
|
const data = require("@teambit/workspace");
|
|
58
44
|
_workspace = function () {
|
|
@@ -88,9 +74,9 @@ function _toolboxPath() {
|
|
|
88
74
|
};
|
|
89
75
|
return data;
|
|
90
76
|
}
|
|
91
|
-
function
|
|
77
|
+
function _legacy() {
|
|
92
78
|
const data = require("@teambit/legacy.component-diff");
|
|
93
|
-
|
|
79
|
+
_legacy = function () {
|
|
94
80
|
return data;
|
|
95
81
|
};
|
|
96
82
|
return data;
|
|
@@ -183,34 +169,15 @@ class ComponentLogMain {
|
|
|
183
169
|
return []; // component is new
|
|
184
170
|
}
|
|
185
171
|
}
|
|
186
|
-
|
|
172
|
+
// route through workspace.getLogs (not scope.getLogs) so the staged (not-yet-snapped) deprecation
|
|
173
|
+
// overlay is applied consistently for both this CLI path and the workspace UI version-history.
|
|
174
|
+
const logs = await this.workspace.getLogs(componentId, shortHash, undefined, true);
|
|
187
175
|
logs.forEach(log => {
|
|
188
176
|
log.date = log.date ? (0, _moment().default)(new Date(parseInt(log.date))).format('YYYY-MM-DD HH:mm:ss') : undefined;
|
|
189
177
|
log.message = shortMessage ? log.message.split('\n')[0] : log.message;
|
|
190
178
|
});
|
|
191
|
-
this.applyStagedDeprecation(componentId, logs);
|
|
192
179
|
return options.showHidden ? logs : logs.filter(l => !l.hidden);
|
|
193
180
|
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* reflect the not-yet-snapped (staged) deprecation in the log.
|
|
197
|
-
* `bit deprecate` only writes the deprecation config to the workspace `.bitmap`; it's baked into a
|
|
198
|
-
* Version object on the next tag/snap. `collectLogs()` (which produces the `deprecated` field) reads
|
|
199
|
-
* that config from the committed head Version, so without this overlay `bit log` wouldn't show a
|
|
200
|
-
* range-deprecation until the next tag/snap. We mirror collectLogs' range logic here so the staged
|
|
201
|
-
* state (including a staged `bit undeprecate` that clears the range) matches the post-snap output.
|
|
202
|
-
*/
|
|
203
|
-
applyStagedDeprecation(componentId, logs) {
|
|
204
|
-
const bitmapEntry = this.workspace?.bitMap.getBitmapEntryIfExist(componentId, {
|
|
205
|
-
ignoreVersion: true
|
|
206
|
-
});
|
|
207
|
-
const stagedConfig = bitmapEntry?.config?.[_legacy().Extensions.deprecation];
|
|
208
|
-
if (!stagedConfig || stagedConfig === '-') return;
|
|
209
|
-
const range = stagedConfig.range;
|
|
210
|
-
logs.forEach(log => {
|
|
211
|
-
log.deprecated = Boolean(range && log.tag && _semver().default.satisfies(log.tag, range));
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
181
|
async getLogsWithParents(id, options) {
|
|
215
182
|
const logs = await this.getLogs(id, options);
|
|
216
183
|
const graph = (0, _snapGraph().buildSnapGraph)(logs);
|
|
@@ -428,7 +395,7 @@ class ComponentLogMain {
|
|
|
428
395
|
if (fileHash === lastHash) return;
|
|
429
396
|
let diff;
|
|
430
397
|
if (lastFile && fileInComp) {
|
|
431
|
-
diff = await (0,
|
|
398
|
+
diff = await (0, _legacy().getFilesDiff)([lastFile], [fileInComp], logItem.hash, lastResult.hash, undefined);
|
|
432
399
|
}
|
|
433
400
|
lastFile = fileInComp;
|
|
434
401
|
results.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_semver","_pMap","_legacy","_workspace","_lodash","_pMapSeries","_objects","_toolboxPath","_legacy2","_chalk","_scope","_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","options","isRemote","shortHash","shortMessage","consumer","bitId","ComponentID","fromString","remote","getRemoteByName","scope","log","OutsideWorkspaceError","componentId","resolveComponentId","hasVersion","inWs","getIdIfExist","logs","undefined","forEach","date","moment","Date","parseInt","format","message","split","applyStagedDeprecation","showHidden","filter","l","hidden","bitmapEntry","bitMap","getBitmapEntryIfExist","ignoreVersion","stagedConfig","config","Extensions","deprecation","range","deprecated","Boolean","tag","semver","satisfies","getLogsWithParents","graph","buildSnapGraph","sorted","toposort","map","node","stringifyLogInfoOneLine","attr","getChangedFilesFromParent","modelComp","getBitObjectModelComponent","versionObj","getBitObjectVersion","version","firstParent","parents","parentObj","toString","compDir","componentDir","results","compact","files","file","parentFile","find","f","relativePath","isEqual","filePath","path","join","hash","parentHash","filesOnParentOnly","length","push","getFileHistoryHashes","getComponentIdByPath","rootDir","filePathAsLinux","pathNormalizeToLinux","filePathRelativeInComponent","replace","pMap","logItem","fileInComp","fileHash","getFileHashFromParent","parent","parentFileInComp","fileHashesFromParent","Promise","all","getParentFileHash","includes","username","email","parentFileHash","parentHashes","p","concurrency","result","onlyParent","parentResult","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 type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport type { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';\nimport path from 'path';\nimport moment from 'moment';\nimport semver from 'semver';\nimport pMap from 'p-map';\nimport { Extensions } from '@teambit/legacy.constants';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport type { Source, Version } from '@teambit/objects';\nimport { Ref } from '@teambit/objects';\nimport type { PathOsBased, PathOsBasedAbsolute } from '@teambit/toolbox.path.path';\nimport { pathNormalizeToLinux } from '@teambit/toolbox.path.path';\nimport { getFilesDiff } from '@teambit/legacy.component-diff';\nimport chalk from 'chalk';\nimport { getRemoteByName } from '@teambit/scope.remotes';\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 hidden?: boolean;\n parentHashes?: 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 LogOpts = {\n isRemote?: boolean;\n shortHash?: boolean;\n shortMessage?: boolean;\n showHidden?: boolean;\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, options: LogOpts = {}): Promise<ComponentLog[]> {\n const { isRemote = false, shortHash = false, shortMessage = false } = options;\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 if (!componentId.hasVersion()) {\n const inWs = this.workspace.getIdIfExist(componentId);\n if (inWs && !inWs.hasVersion()) {\n return []; // component is new\n }\n }\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 this.applyStagedDeprecation(componentId, logs);\n return options.showHidden ? logs : logs.filter((l) => !l.hidden);\n }\n\n /**\n * reflect the not-yet-snapped (staged) deprecation in the log.\n * `bit deprecate` only writes the deprecation config to the workspace `.bitmap`; it's baked into a\n * Version object on the next tag/snap. `collectLogs()` (which produces the `deprecated` field) reads\n * that config from the committed head Version, so without this overlay `bit log` wouldn't show a\n * range-deprecation until the next tag/snap. We mirror collectLogs' range logic here so the staged\n * state (including a staged `bit undeprecate` that clears the range) matches the post-snap output.\n */\n private applyStagedDeprecation(componentId: ComponentID, logs: ComponentLog[]) {\n const bitmapEntry = this.workspace?.bitMap.getBitmapEntryIfExist(componentId, { ignoreVersion: true });\n const stagedConfig = bitmapEntry?.config?.[Extensions.deprecation];\n if (!stagedConfig || stagedConfig === '-') return;\n const range = (stagedConfig as { range?: string }).range;\n logs.forEach((log) => {\n log.deprecated = Boolean(range && log.tag && semver.satisfies(log.tag, range));\n });\n }\n\n async getLogsWithParents(id: string, options: LogOpts) {\n const logs = await this.getLogs(id, options);\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(), { showHidden: true });\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 hidden: logItem.hidden,\n parentHashes: versionObj?.parents.map((p) => p.toString()),\n });\n },\n { concurrency: 100 }\n );\n\n // remove entries that their fileHash is the same as their parent.\n // however, if their parent is hidden, because they're going to be removed, use their parents.\n results.forEach((result) => {\n const parents = result.parentHashes || [];\n if (parents.length !== 1) return;\n const onlyParent = parents[0];\n const parentResult = results.find((r) => r.hash === onlyParent);\n if (parentResult && parentResult.hidden) {\n result.parentFileHash = parentResult.parentFileHash;\n }\n });\n return results.filter((r) => !r.hidden).filter((r) => r.fileHash !== r.parentFileHash);\n }\n\n async blame(filePath: PathOsBased): 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 if (!reversedLogs.length) return [];\n // reverse order so it'll be from newer to older\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":";;;;;;AACA,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,QAAA;EAAA,MAAAN,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAK,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,MAAA;EAAA,MAAAP,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAM,KAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,QAAA;EAAA,MAAAR,IAAA,GA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B,EAAE;IAC5D,MAAMsL,YAAY,GAAG,IAAIxL,gBAAgB,CAACE,SAAS,CAAC;IACpDqL,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,CAAA7L,gBAAA,GAAAA,gBAAA;AAAAlB,eAAA,CA9UYkB,gBAAgB,WAsUZ,EAAE;AAAAlB,eAAA,CAtUNkB,gBAAgB,kBAuUL,CAAC8L,gBAAS,EAAEC,4BAAe,CAAC;AAAAjN,eAAA,CAvUvCkB,gBAAgB,aAwUVgM,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAAClM,gBAAgB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_objects","_toolboxPath","_legacy","_chalk","_scope","_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","options","isRemote","shortHash","shortMessage","consumer","bitId","ComponentID","fromString","remote","getRemoteByName","scope","log","OutsideWorkspaceError","componentId","resolveComponentId","hasVersion","inWs","getIdIfExist","logs","undefined","forEach","date","moment","Date","parseInt","format","message","split","showHidden","filter","l","hidden","getLogsWithParents","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","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","parentHashes","p","concurrency","result","onlyParent","parentResult","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 type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { ComponentID } from '@teambit/component-id';\nimport type { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';\nimport path from 'path';\nimport moment from 'moment';\nimport pMap from 'p-map';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect, OutsideWorkspaceError } from '@teambit/workspace';\nimport { compact } from 'lodash';\nimport pMapSeries from 'p-map-series';\nimport type { Source, Version } from '@teambit/objects';\nimport { Ref } from '@teambit/objects';\nimport type { PathOsBased, PathOsBasedAbsolute } from '@teambit/toolbox.path.path';\nimport { pathNormalizeToLinux } from '@teambit/toolbox.path.path';\nimport { getFilesDiff } from '@teambit/legacy.component-diff';\nimport chalk from 'chalk';\nimport { getRemoteByName } from '@teambit/scope.remotes';\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 hidden?: boolean;\n parentHashes?: 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 LogOpts = {\n isRemote?: boolean;\n shortHash?: boolean;\n shortMessage?: boolean;\n showHidden?: boolean;\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, options: LogOpts = {}): Promise<ComponentLog[]> {\n const { isRemote = false, shortHash = false, shortMessage = false } = options;\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 if (!componentId.hasVersion()) {\n const inWs = this.workspace.getIdIfExist(componentId);\n if (inWs && !inWs.hasVersion()) {\n return []; // component is new\n }\n }\n // route through workspace.getLogs (not scope.getLogs) so the staged (not-yet-snapped) deprecation\n // overlay is applied consistently for both this CLI path and the workspace UI version-history.\n const logs = await this.workspace.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 options.showHidden ? logs : logs.filter((l) => !l.hidden);\n }\n\n async getLogsWithParents(id: string, options: LogOpts) {\n const logs = await this.getLogs(id, options);\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(), { showHidden: true });\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 hidden: logItem.hidden,\n parentHashes: versionObj?.parents.map((p) => p.toString()),\n });\n },\n { concurrency: 100 }\n );\n\n // remove entries that their fileHash is the same as their parent.\n // however, if their parent is hidden, because they're going to be removed, use their parents.\n results.forEach((result) => {\n const parents = result.parentHashes || [];\n if (parents.length !== 1) return;\n const onlyParent = parents[0];\n const parentResult = results.find((r) => r.hash === onlyParent);\n if (parentResult && parentResult.hidden) {\n result.parentFileHash = parentResult.parentFileHash;\n }\n });\n return results.filter((r) => !r.hidden).filter((r) => r.fileHash !== r.parentFileHash);\n }\n\n async blame(filePath: PathOsBased): 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 if (!reversedLogs.length) return [];\n // reverse order so it'll be from newer to older\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":";;;;;;AACA,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,MAA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AC,CAAC,CAAC+B,UAAU,GAAG7I,SAAS;QACvD8D;MACF,CAAC,CAAC;IACJ,CAAC,CAAC;IACF,OAAO3B,OAAO;EAChB;EAEQf,uBAAuBA,CAAC0H,OAAyB,EAAE;IACzD,MAAMjH,OAAO,GAAGiH,OAAO,CAACjH,OAAO,CAACqB,MAAM,GAAG,cAAc4F,OAAO,CAACjH,OAAO,CAACiB,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO;IAC7F,OAAO,GAAGiG,gBAAK,CAACC,MAAM,CAACF,OAAO,CAAC/F,IAAI,CAAC,IAAI+F,OAAO,CAACtE,QAAQ,IAAI,EAAE,IAAIsE,OAAO,CAAC5I,IAAI,IAAI,EAAE,IAClF4I,OAAO,CAACvI,OAAO,KACZsB,OAAO,EAAE;EAChB;EAKA,aAAaoH,QAAQA,CAAC,CAACC,GAAG,EAAExK,SAAS,CAAuB,EAAE;IAC5D,MAAMyK,YAAY,GAAG,IAAI3K,gBAAgB,CAACE,SAAS,CAAC;IACpDwK,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,CAAAhL,gBAAA,GAAAA,gBAAA;AAAAlB,eAAA,CA7TYkB,gBAAgB,WAqTZ,EAAE;AAAAlB,eAAA,CArTNkB,gBAAgB,kBAsTL,CAACiL,gBAAS,EAAEC,4BAAe,CAAC;AAAApM,eAAA,CAtTvCkB,gBAAgB,aAuTVmL,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAACrL,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.1041/dist/component-log.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.component_component-log@1.0.1041/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.1041",
|
|
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.1041"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
@@ -15,24 +15,21 @@
|
|
|
15
15
|
"moment": "2.29.4",
|
|
16
16
|
"p-map-series": "2.1.0",
|
|
17
17
|
"p-map": "4.0.0",
|
|
18
|
-
"semver": "7.7.1",
|
|
19
18
|
"cli-table": "0.3.6",
|
|
20
19
|
"@teambit/cli": "0.0.1344",
|
|
21
20
|
"@teambit/harmony": "0.4.11",
|
|
22
21
|
"@teambit/component-id": "1.2.4",
|
|
23
22
|
"@teambit/legacy-component-log": "0.0.419",
|
|
24
23
|
"@teambit/legacy.component-diff": "0.0.186",
|
|
25
|
-
"@teambit/legacy.constants": "0.0.31",
|
|
26
24
|
"@teambit/scope.remotes": "0.0.130",
|
|
27
25
|
"@teambit/toolbox.path.path": "0.0.17",
|
|
28
26
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
29
|
-
"@teambit/objects": "0.0.
|
|
30
|
-
"@teambit/workspace": "1.0.
|
|
27
|
+
"@teambit/objects": "0.0.548",
|
|
28
|
+
"@teambit/workspace": "1.0.1041"
|
|
31
29
|
},
|
|
32
30
|
"devDependencies": {
|
|
33
31
|
"@types/diff": "^5.2.3",
|
|
34
32
|
"@types/lodash": "4.14.165",
|
|
35
|
-
"@types/semver": "7.5.8",
|
|
36
33
|
"@types/cli-table": "^0.3.0",
|
|
37
34
|
"@types/mocha": "9.1.0",
|
|
38
35
|
"@teambit/harmony.envs.core-aspect-env": "0.1.7"
|