@teambit/component-log 1.0.227 → 1.0.229

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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.227" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/component-log@1.0.229" 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={325:(e,t,o)=>{var n={id:"teambit.component/component-log@1.0.227",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 p=()=>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"}));p.__bit_component=n,t.Logo=p},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={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>m,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(325);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c.apply(this,arguments)}var a={},s="wrapper";function l(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,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,r.mdx)(s,c({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
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={49094:(e,t,o)=>{var n={id:"teambit.component/component-log@1.0.229",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 p=()=>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"}));p.__bit_component=n,t.Logo=p},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={};return(()=>{o.r(n),o.d(n,{compositions:()=>d,compositions_metadata:()=>m,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(49094);o(41594);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},c.apply(this,arguments)}var a={},s="wrapper";function l(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,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,r.mdx)(s,c({},a,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],m={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -56,7 +56,11 @@
56
56
  "line": 40,
57
57
  "character": 34
58
58
  },
59
- "name": "Workspace"
59
+ "name": "Workspace",
60
+ "componentId": {
61
+ "scope": "teambit.workspace",
62
+ "name": "workspace"
63
+ }
60
64
  },
61
65
  {
62
66
  "__schema": "KeywordTypeSchema",
@@ -422,7 +426,8 @@
422
426
  "line": 109,
423
427
  "character": 57
424
428
  },
425
- "name": "FileLog"
429
+ "name": "FileLog",
430
+ "internalFilePath": "component-log.main.runtime.ts"
426
431
  }
427
432
  }
428
433
  ]
@@ -571,7 +576,11 @@
571
576
  "line": 235,
572
577
  "character": 44
573
578
  },
574
- "name": "CLIMain"
579
+ "name": "CLIMain",
580
+ "componentId": {
581
+ "scope": "teambit.harmony",
582
+ "name": "cli"
583
+ }
575
584
  },
576
585
  {
577
586
  "__schema": "TypeRefSchema",
@@ -580,7 +589,11 @@
580
589
  "line": 235,
581
590
  "character": 53
582
591
  },
583
- "name": "Workspace"
592
+ "name": "Workspace",
593
+ "componentId": {
594
+ "scope": "teambit.workspace",
595
+ "name": "workspace"
596
+ }
584
597
  }
585
598
  ]
586
599
  },
@@ -1057,7 +1070,11 @@
1057
1070
  "line": 40,
1058
1071
  "character": 34
1059
1072
  },
1060
- "name": "Workspace"
1073
+ "name": "Workspace",
1074
+ "componentId": {
1075
+ "scope": "teambit.workspace",
1076
+ "name": "workspace"
1077
+ }
1061
1078
  },
1062
1079
  {
1063
1080
  "__schema": "KeywordTypeSchema",
@@ -1423,7 +1440,8 @@
1423
1440
  "line": 109,
1424
1441
  "character": 57
1425
1442
  },
1426
- "name": "FileLog"
1443
+ "name": "FileLog",
1444
+ "internalFilePath": "component-log.main.runtime.ts"
1427
1445
  }
1428
1446
  }
1429
1447
  ]
@@ -1572,7 +1590,11 @@
1572
1590
  "line": 235,
1573
1591
  "character": 44
1574
1592
  },
1575
- "name": "CLIMain"
1593
+ "name": "CLIMain",
1594
+ "componentId": {
1595
+ "scope": "teambit.harmony",
1596
+ "name": "cli"
1597
+ }
1576
1598
  },
1577
1599
  {
1578
1600
  "__schema": "TypeRefSchema",
@@ -1581,7 +1603,11 @@
1581
1603
  "line": 235,
1582
1604
  "character": 53
1583
1605
  },
1584
- "name": "Workspace"
1606
+ "name": "Workspace",
1607
+ "componentId": {
1608
+ "scope": "teambit.workspace",
1609
+ "name": "workspace"
1610
+ }
1585
1611
  }
1586
1612
  ]
1587
1613
  },
@@ -1850,7 +1876,7 @@
1850
1876
  "componentId": {
1851
1877
  "scope": "teambit.component",
1852
1878
  "name": "component-log",
1853
- "version": "1.0.227"
1879
+ "version": "1.0.229"
1854
1880
  },
1855
1881
  "taggedModuleExports": []
1856
1882
  }
@@ -0,0 +1,2 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const ComponentLogAspect: Aspect;
@@ -0,0 +1 @@
1
+ export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { CLIMain } from '@teambit/cli';
2
+ import { LegacyComponentLog as ComponentLog } from '@teambit/legacy-component-log';
3
+ import { Workspace } from '@teambit/workspace';
4
+ export type FileLog = {
5
+ hash: string;
6
+ tag?: string;
7
+ username?: string;
8
+ email?: string;
9
+ date: string;
10
+ message: string;
11
+ fileHash: string;
12
+ parentFileHash?: string;
13
+ fileDiff?: string;
14
+ };
15
+ export type FileHashDiffFromParent = {
16
+ filePath: string;
17
+ hash?: string;
18
+ parentHash?: string;
19
+ };
20
+ export declare class ComponentLogMain {
21
+ private workspace;
22
+ constructor(workspace: Workspace | undefined);
23
+ /**
24
+ * get component log sorted by the timestamp in ascending order (from the earliest to the latest)
25
+ */
26
+ getLogs(id: string, isRemote?: boolean, shortHash?: boolean, shortMessage?: boolean): Promise<ComponentLog[]>;
27
+ getLogsWithParents(id: string, fullHash?: boolean, fullMessage?: boolean): Promise<string[]>;
28
+ getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>;
29
+ getFileHistoryHashes(filePath: string): Promise<FileLog[]>;
30
+ getFileLog(filePath: string): Promise<FileLog[]>;
31
+ private stringifyLogInfoOneLine;
32
+ static slots: never[];
33
+ static dependencies: import("@teambit/harmony").Aspect[];
34
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
35
+ static provider([cli, workspace]: [CLIMain, Workspace]): Promise<ComponentLogMain>;
36
+ }
37
+ export type ComponentLogInfo = {
38
+ hash: string;
39
+ message: string;
40
+ onLane?: boolean;
41
+ parents: string[];
42
+ username?: string;
43
+ email?: string;
44
+ date?: string;
45
+ tag?: string;
46
+ };
@@ -0,0 +1,4 @@
1
+ import { ComponentLogAspect } from './component-log.aspect';
2
+ export type { ComponentLogMain, FileHashDiffFromParent } from './component-log.main.runtime';
3
+ export default ComponentLogAspect;
4
+ export { ComponentLogAspect };
@@ -0,0 +1,41 @@
1
+ import Table from 'cli-table';
2
+ import { Command, CommandOptions } from '@teambit/cli';
3
+ import { LegacyComponentLog } from '@teambit/legacy-component-log';
4
+ import { ComponentLogMain } from './component-log.main.runtime';
5
+ export default class LogCmd implements Command {
6
+ private componentLog;
7
+ name: string;
8
+ description: string;
9
+ helpUrl: string;
10
+ extendedDescription: string;
11
+ group: string;
12
+ alias: string;
13
+ options: CommandOptions;
14
+ remoteOp: boolean;
15
+ skipWorkspace: boolean;
16
+ arguments: {
17
+ name: string;
18
+ description: string;
19
+ }[];
20
+ constructor(componentLog: ComponentLogMain);
21
+ report([id]: [string], { remote, parents, oneLine, fullHash, fullMessage, }: {
22
+ remote: boolean;
23
+ parents: boolean;
24
+ oneLine?: boolean;
25
+ fullHash?: boolean;
26
+ fullMessage?: boolean;
27
+ }): Promise<string>;
28
+ json([id]: [string], { remote, parents }: {
29
+ remote: boolean;
30
+ parents: boolean;
31
+ }): Promise<string[] | LegacyComponentLog[]>;
32
+ }
33
+ export declare function paintAuthor(email: string | null | undefined, username: string | null | undefined): string;
34
+ /**
35
+ * table with no style and no borders, just to align the columns.
36
+ */
37
+ export declare function getEmptyTableWithoutStyle(): Table<string[] | {
38
+ [x: string]: string;
39
+ } | {
40
+ [x: string]: string[];
41
+ }>;
@@ -0,0 +1,18 @@
1
+ import { Command, CommandOptions } from '@teambit/cli';
2
+ import { ComponentLogMain } from './component-log.main.runtime';
3
+ export declare class LogFileCmd 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], { oneLine }: {
16
+ oneLine?: boolean;
17
+ }): Promise<string>;
18
+ }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.227/dist/component-log.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.227/dist/component-log.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.229/dist/component-log.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.229/dist/component-log.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -0,0 +1,3 @@
1
+ import { Graph } from '@teambit/graph.cleargraph';
2
+ import { ComponentLogInfo } from './component-log.main.runtime';
3
+ export declare function buildSnapGraph(componentLog: ComponentLogInfo[]): Graph<ComponentLogInfo, string>;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/component-log",
3
- "version": "1.0.227",
3
+ "version": "1.0.229",
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.227"
9
+ "version": "1.0.229"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -19,15 +19,15 @@
19
19
  "@teambit/component-id": "1.2.0",
20
20
  "@teambit/legacy-component-log": "0.0.402",
21
21
  "@teambit/graph.cleargraph": "0.0.8",
22
- "@teambit/cli": "0.0.860",
23
- "@teambit/workspace": "1.0.227"
22
+ "@teambit/cli": "0.0.862",
23
+ "@teambit/workspace": "1.0.229"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/lodash": "4.14.165",
27
27
  "@types/cli-table": "^0.3.0",
28
28
  "@types/mocha": "9.1.0",
29
29
  "chai": "4.3.0",
30
- "@teambit/harmony.envs.core-aspect-env": "0.0.30"
30
+ "@teambit/harmony.envs.core-aspect-env": "0.0.33"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": "^17.0.0 || ^18.0.0",
package/tsconfig.json CHANGED
@@ -20,8 +20,7 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false,
24
- "composite": true
23
+ "noImplicitAny": false
25
24
  },
26
25
  "exclude": [
27
26
  "artifacts",
@@ -36,13 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": [
41
- {
42
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
43
- },
44
- {
45
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
46
- }
47
38
  ]
48
39
  }