@teambit/component-log 1.0.173 → 1.0.175

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.173" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.component/component-log@1.0.175" 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={74088:(e,t,o)=>{var n={id:"teambit.component/component-log@1.0.173",homepage:"https://bit.cloud/teambit/component/component-log",exported:!0};function r(){const e=i(o(6376));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},6376: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(74088);o(6376);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={32059:(e,t,o)=>{var n={id:"teambit.component/component-log@1.0.175",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(32059);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})()));
@@ -101,7 +101,7 @@
101
101
  "raw": "/**\n * get component log sorted by the timestamp in ascending order (from the earliest to the latest)\n */",
102
102
  "comment": "get component log sorted by the timestamp in ascending order (from the earliest to the latest)"
103
103
  },
104
- "signature": "(method) ComponentLogMain.getLogs(id: string, isRemote?: boolean, shortHash?: boolean): Promise<ComponentLog[]>",
104
+ "signature": "(method) ComponentLogMain.getLogs(id: string, isRemote?: boolean, shortHash?: boolean, shortMessage?: boolean): Promise<ComponentLog[]>",
105
105
  "name": "getLogs",
106
106
  "params": [
107
107
  {
@@ -164,6 +164,27 @@
164
164
  "isOptional": true,
165
165
  "defaultValue": "false",
166
166
  "isSpread": false
167
+ },
168
+ {
169
+ "__schema": "ParameterSchema",
170
+ "location": {
171
+ "filePath": "component-log.main.runtime.ts",
172
+ "line": 45,
173
+ "character": 68
174
+ },
175
+ "name": "shortMessage",
176
+ "type": {
177
+ "__schema": "InferenceTypeSchema",
178
+ "location": {
179
+ "filePath": "component-log.main.runtime.ts",
180
+ "line": 45,
181
+ "character": 68
182
+ },
183
+ "type": "boolean"
184
+ },
185
+ "isOptional": true,
186
+ "defaultValue": "false",
187
+ "isSpread": false
167
188
  }
168
189
  ],
169
190
  "returnType": {
@@ -171,7 +192,7 @@
171
192
  "location": {
172
193
  "filePath": "component-log.main.runtime.ts",
173
194
  "line": 45,
174
- "character": 69
195
+ "character": 91
175
196
  },
176
197
  "name": "Promise",
177
198
  "typeArgs": [
@@ -180,14 +201,14 @@
180
201
  "location": {
181
202
  "filePath": "component-log.main.runtime.ts",
182
203
  "line": 45,
183
- "character": 77
204
+ "character": 99
184
205
  },
185
206
  "type": {
186
207
  "__schema": "TypeRefSchema",
187
208
  "location": {
188
209
  "filePath": "component-log.main.runtime.ts",
189
210
  "line": 45,
190
- "character": 77
211
+ "character": 99
191
212
  },
192
213
  "name": "ComponentLog"
193
214
  }
@@ -202,17 +223,17 @@
202
223
  "__schema": "FunctionLikeSchema",
203
224
  "location": {
204
225
  "filePath": "component-log.main.runtime.ts",
205
- "line": 61,
226
+ "line": 62,
206
227
  "character": 3
207
228
  },
208
- "signature": "(method) ComponentLogMain.getLogsWithParents(id: string, fullHash?: boolean): Promise<string[]>",
229
+ "signature": "(method) ComponentLogMain.getLogsWithParents(id: string, fullHash?: boolean, fullMessage?: boolean): Promise<string[]>",
209
230
  "name": "getLogsWithParents",
210
231
  "params": [
211
232
  {
212
233
  "__schema": "ParameterSchema",
213
234
  "location": {
214
235
  "filePath": "component-log.main.runtime.ts",
215
- "line": 61,
236
+ "line": 62,
216
237
  "character": 28
217
238
  },
218
239
  "name": "id",
@@ -220,7 +241,7 @@
220
241
  "__schema": "KeywordTypeSchema",
221
242
  "location": {
222
243
  "filePath": "component-log.main.runtime.ts",
223
- "line": 61,
244
+ "line": 62,
224
245
  "character": 32
225
246
  },
226
247
  "name": "string"
@@ -232,7 +253,7 @@
232
253
  "__schema": "ParameterSchema",
233
254
  "location": {
234
255
  "filePath": "component-log.main.runtime.ts",
235
- "line": 61,
256
+ "line": 62,
236
257
  "character": 40
237
258
  },
238
259
  "name": "fullHash",
@@ -240,7 +261,7 @@
240
261
  "__schema": "InferenceTypeSchema",
241
262
  "location": {
242
263
  "filePath": "component-log.main.runtime.ts",
243
- "line": 61,
264
+ "line": 62,
244
265
  "character": 40
245
266
  },
246
267
  "type": "boolean"
@@ -248,13 +269,34 @@
248
269
  "isOptional": true,
249
270
  "defaultValue": "false",
250
271
  "isSpread": false
272
+ },
273
+ {
274
+ "__schema": "ParameterSchema",
275
+ "location": {
276
+ "filePath": "component-log.main.runtime.ts",
277
+ "line": 62,
278
+ "character": 58
279
+ },
280
+ "name": "fullMessage",
281
+ "type": {
282
+ "__schema": "InferenceTypeSchema",
283
+ "location": {
284
+ "filePath": "component-log.main.runtime.ts",
285
+ "line": 62,
286
+ "character": 58
287
+ },
288
+ "type": "boolean"
289
+ },
290
+ "isOptional": true,
291
+ "defaultValue": "false",
292
+ "isSpread": false
251
293
  }
252
294
  ],
253
295
  "returnType": {
254
296
  "__schema": "InferenceTypeSchema",
255
297
  "location": {
256
298
  "filePath": "component-log.main.runtime.ts",
257
- "line": 61,
299
+ "line": 62,
258
300
  "character": 3
259
301
  },
260
302
  "type": "Promise<string[]>"
@@ -267,7 +309,7 @@
267
309
  "__schema": "FunctionLikeSchema",
268
310
  "location": {
269
311
  "filePath": "component-log.main.runtime.ts",
270
- "line": 68,
312
+ "line": 69,
271
313
  "character": 3
272
314
  },
273
315
  "signature": "(method) ComponentLogMain.getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>",
@@ -277,7 +319,7 @@
277
319
  "__schema": "ParameterSchema",
278
320
  "location": {
279
321
  "filePath": "component-log.main.runtime.ts",
280
- "line": 68,
322
+ "line": 69,
281
323
  "character": 35
282
324
  },
283
325
  "name": "id",
@@ -285,7 +327,7 @@
285
327
  "__schema": "KeywordTypeSchema",
286
328
  "location": {
287
329
  "filePath": "component-log.main.runtime.ts",
288
- "line": 68,
330
+ "line": 69,
289
331
  "character": 39
290
332
  },
291
333
  "name": "string"
@@ -298,7 +340,7 @@
298
340
  "__schema": "TypeRefSchema",
299
341
  "location": {
300
342
  "filePath": "component-log.main.runtime.ts",
301
- "line": 68,
343
+ "line": 69,
302
344
  "character": 48
303
345
  },
304
346
  "name": "Promise",
@@ -307,14 +349,14 @@
307
349
  "__schema": "TypeArraySchema",
308
350
  "location": {
309
351
  "filePath": "component-log.main.runtime.ts",
310
- "line": 68,
352
+ "line": 69,
311
353
  "character": 56
312
354
  },
313
355
  "type": {
314
356
  "__schema": "TypeRefSchema",
315
357
  "location": {
316
358
  "filePath": "component-log.main.runtime.ts",
317
- "line": 68,
359
+ "line": 69,
318
360
  "character": 56
319
361
  },
320
362
  "name": "FileHashDiffFromParent"
@@ -330,7 +372,7 @@
330
372
  "__schema": "FunctionLikeSchema",
331
373
  "location": {
332
374
  "filePath": "component-log.main.runtime.ts",
333
- "line": 108,
375
+ "line": 109,
334
376
  "character": 3
335
377
  },
336
378
  "signature": "(method) ComponentLogMain.getFileHistoryHashes(filePath: string): Promise<FileLog[]>",
@@ -340,7 +382,7 @@
340
382
  "__schema": "ParameterSchema",
341
383
  "location": {
342
384
  "filePath": "component-log.main.runtime.ts",
343
- "line": 108,
385
+ "line": 109,
344
386
  "character": 30
345
387
  },
346
388
  "name": "filePath",
@@ -348,7 +390,7 @@
348
390
  "__schema": "KeywordTypeSchema",
349
391
  "location": {
350
392
  "filePath": "component-log.main.runtime.ts",
351
- "line": 108,
393
+ "line": 109,
352
394
  "character": 40
353
395
  },
354
396
  "name": "string"
@@ -361,7 +403,7 @@
361
403
  "__schema": "TypeRefSchema",
362
404
  "location": {
363
405
  "filePath": "component-log.main.runtime.ts",
364
- "line": 108,
406
+ "line": 109,
365
407
  "character": 49
366
408
  },
367
409
  "name": "Promise",
@@ -370,14 +412,14 @@
370
412
  "__schema": "TypeArraySchema",
371
413
  "location": {
372
414
  "filePath": "component-log.main.runtime.ts",
373
- "line": 108,
415
+ "line": 109,
374
416
  "character": 57
375
417
  },
376
418
  "type": {
377
419
  "__schema": "TypeRefSchema",
378
420
  "location": {
379
421
  "filePath": "component-log.main.runtime.ts",
380
- "line": 108,
422
+ "line": 109,
381
423
  "character": 57
382
424
  },
383
425
  "name": "FileLog"
@@ -393,7 +435,7 @@
393
435
  "__schema": "FunctionLikeSchema",
394
436
  "location": {
395
437
  "filePath": "component-log.main.runtime.ts",
396
- "line": 174,
438
+ "line": 175,
397
439
  "character": 3
398
440
  },
399
441
  "signature": "(method) ComponentLogMain.getFileLog(filePath: string): Promise<FileLog[]>",
@@ -403,7 +445,7 @@
403
445
  "__schema": "ParameterSchema",
404
446
  "location": {
405
447
  "filePath": "component-log.main.runtime.ts",
406
- "line": 174,
448
+ "line": 175,
407
449
  "character": 20
408
450
  },
409
451
  "name": "filePath",
@@ -411,7 +453,7 @@
411
453
  "__schema": "KeywordTypeSchema",
412
454
  "location": {
413
455
  "filePath": "component-log.main.runtime.ts",
414
- "line": 174,
456
+ "line": 175,
415
457
  "character": 30
416
458
  },
417
459
  "name": "string"
@@ -424,7 +466,7 @@
424
466
  "__schema": "InferenceTypeSchema",
425
467
  "location": {
426
468
  "filePath": "component-log.main.runtime.ts",
427
- "line": 174,
469
+ "line": 175,
428
470
  "character": 3
429
471
  },
430
472
  "type": "Promise<FileLog[]>"
@@ -437,7 +479,7 @@
437
479
  "__schema": "VariableLikeSchema",
438
480
  "location": {
439
481
  "filePath": "component-log.main.runtime.ts",
440
- "line": 231,
482
+ "line": 232,
441
483
  "character": 3
442
484
  },
443
485
  "signature": "(property) ComponentLogMain.slots: never[]",
@@ -446,7 +488,7 @@
446
488
  "__schema": "InferenceTypeSchema",
447
489
  "location": {
448
490
  "filePath": "component-log.main.runtime.ts",
449
- "line": 231,
491
+ "line": 232,
450
492
  "character": 3
451
493
  },
452
494
  "type": "never[]"
@@ -458,7 +500,7 @@
458
500
  "__schema": "VariableLikeSchema",
459
501
  "location": {
460
502
  "filePath": "component-log.main.runtime.ts",
461
- "line": 232,
503
+ "line": 233,
462
504
  "character": 3
463
505
  },
464
506
  "signature": "(property) ComponentLogMain.dependencies: Aspect[]",
@@ -467,7 +509,7 @@
467
509
  "__schema": "InferenceTypeSchema",
468
510
  "location": {
469
511
  "filePath": "component-log.main.runtime.ts",
470
- "line": 232,
512
+ "line": 233,
471
513
  "character": 3
472
514
  },
473
515
  "type": "Aspect[]"
@@ -479,7 +521,7 @@
479
521
  "__schema": "VariableLikeSchema",
480
522
  "location": {
481
523
  "filePath": "component-log.main.runtime.ts",
482
- "line": 233,
524
+ "line": 234,
483
525
  "character": 3
484
526
  },
485
527
  "signature": "(property) ComponentLogMain.runtime: RuntimeDefinition",
@@ -488,7 +530,7 @@
488
530
  "__schema": "InferenceTypeSchema",
489
531
  "location": {
490
532
  "filePath": "component-log.main.runtime.ts",
491
- "line": 233,
533
+ "line": 234,
492
534
  "character": 3
493
535
  },
494
536
  "type": "RuntimeDefinition"
@@ -500,7 +542,7 @@
500
542
  "__schema": "FunctionLikeSchema",
501
543
  "location": {
502
544
  "filePath": "component-log.main.runtime.ts",
503
- "line": 234,
545
+ "line": 235,
504
546
  "character": 3
505
547
  },
506
548
  "signature": "(method) ComponentLogMain.provider([cli, workspace]: [CLIMain, Workspace]): Promise<ComponentLogMain>",
@@ -510,7 +552,7 @@
510
552
  "__schema": "ParameterSchema",
511
553
  "location": {
512
554
  "filePath": "component-log.main.runtime.ts",
513
- "line": 234,
555
+ "line": 235,
514
556
  "character": 25
515
557
  },
516
558
  "name": "[ cli, workspace ]",
@@ -518,7 +560,7 @@
518
560
  "__schema": "TupleTypeSchema",
519
561
  "location": {
520
562
  "filePath": "component-log.main.runtime.ts",
521
- "line": 234,
563
+ "line": 235,
522
564
  "character": 43
523
565
  },
524
566
  "elements": [
@@ -526,7 +568,7 @@
526
568
  "__schema": "TypeRefSchema",
527
569
  "location": {
528
570
  "filePath": "component-log.main.runtime.ts",
529
- "line": 234,
571
+ "line": 235,
530
572
  "character": 44
531
573
  },
532
574
  "name": "CLIMain"
@@ -535,7 +577,7 @@
535
577
  "__schema": "TypeRefSchema",
536
578
  "location": {
537
579
  "filePath": "component-log.main.runtime.ts",
538
- "line": 234,
580
+ "line": 235,
539
581
  "character": 53
540
582
  },
541
583
  "name": "Workspace"
@@ -550,7 +592,7 @@
550
592
  "__schema": "InferenceTypeSchema",
551
593
  "location": {
552
594
  "filePath": "component-log.main.runtime.ts",
553
- "line": 234,
595
+ "line": 235,
554
596
  "character": 3
555
597
  },
556
598
  "type": "Promise<ComponentLogMain>"
@@ -1060,7 +1102,7 @@
1060
1102
  "raw": "/**\n * get component log sorted by the timestamp in ascending order (from the earliest to the latest)\n */",
1061
1103
  "comment": "get component log sorted by the timestamp in ascending order (from the earliest to the latest)"
1062
1104
  },
1063
- "signature": "(method) ComponentLogMain.getLogs(id: string, isRemote?: boolean, shortHash?: boolean): Promise<ComponentLog[]>",
1105
+ "signature": "(method) ComponentLogMain.getLogs(id: string, isRemote?: boolean, shortHash?: boolean, shortMessage?: boolean): Promise<ComponentLog[]>",
1064
1106
  "name": "getLogs",
1065
1107
  "params": [
1066
1108
  {
@@ -1123,6 +1165,27 @@
1123
1165
  "isOptional": true,
1124
1166
  "defaultValue": "false",
1125
1167
  "isSpread": false
1168
+ },
1169
+ {
1170
+ "__schema": "ParameterSchema",
1171
+ "location": {
1172
+ "filePath": "component-log.main.runtime.ts",
1173
+ "line": 45,
1174
+ "character": 68
1175
+ },
1176
+ "name": "shortMessage",
1177
+ "type": {
1178
+ "__schema": "InferenceTypeSchema",
1179
+ "location": {
1180
+ "filePath": "component-log.main.runtime.ts",
1181
+ "line": 45,
1182
+ "character": 68
1183
+ },
1184
+ "type": "boolean"
1185
+ },
1186
+ "isOptional": true,
1187
+ "defaultValue": "false",
1188
+ "isSpread": false
1126
1189
  }
1127
1190
  ],
1128
1191
  "returnType": {
@@ -1130,7 +1193,7 @@
1130
1193
  "location": {
1131
1194
  "filePath": "component-log.main.runtime.ts",
1132
1195
  "line": 45,
1133
- "character": 69
1196
+ "character": 91
1134
1197
  },
1135
1198
  "name": "Promise",
1136
1199
  "typeArgs": [
@@ -1139,14 +1202,14 @@
1139
1202
  "location": {
1140
1203
  "filePath": "component-log.main.runtime.ts",
1141
1204
  "line": 45,
1142
- "character": 77
1205
+ "character": 99
1143
1206
  },
1144
1207
  "type": {
1145
1208
  "__schema": "TypeRefSchema",
1146
1209
  "location": {
1147
1210
  "filePath": "component-log.main.runtime.ts",
1148
1211
  "line": 45,
1149
- "character": 77
1212
+ "character": 99
1150
1213
  },
1151
1214
  "name": "ComponentLog"
1152
1215
  }
@@ -1161,17 +1224,17 @@
1161
1224
  "__schema": "FunctionLikeSchema",
1162
1225
  "location": {
1163
1226
  "filePath": "component-log.main.runtime.ts",
1164
- "line": 61,
1227
+ "line": 62,
1165
1228
  "character": 3
1166
1229
  },
1167
- "signature": "(method) ComponentLogMain.getLogsWithParents(id: string, fullHash?: boolean): Promise<string[]>",
1230
+ "signature": "(method) ComponentLogMain.getLogsWithParents(id: string, fullHash?: boolean, fullMessage?: boolean): Promise<string[]>",
1168
1231
  "name": "getLogsWithParents",
1169
1232
  "params": [
1170
1233
  {
1171
1234
  "__schema": "ParameterSchema",
1172
1235
  "location": {
1173
1236
  "filePath": "component-log.main.runtime.ts",
1174
- "line": 61,
1237
+ "line": 62,
1175
1238
  "character": 28
1176
1239
  },
1177
1240
  "name": "id",
@@ -1179,7 +1242,7 @@
1179
1242
  "__schema": "KeywordTypeSchema",
1180
1243
  "location": {
1181
1244
  "filePath": "component-log.main.runtime.ts",
1182
- "line": 61,
1245
+ "line": 62,
1183
1246
  "character": 32
1184
1247
  },
1185
1248
  "name": "string"
@@ -1191,7 +1254,7 @@
1191
1254
  "__schema": "ParameterSchema",
1192
1255
  "location": {
1193
1256
  "filePath": "component-log.main.runtime.ts",
1194
- "line": 61,
1257
+ "line": 62,
1195
1258
  "character": 40
1196
1259
  },
1197
1260
  "name": "fullHash",
@@ -1199,7 +1262,7 @@
1199
1262
  "__schema": "InferenceTypeSchema",
1200
1263
  "location": {
1201
1264
  "filePath": "component-log.main.runtime.ts",
1202
- "line": 61,
1265
+ "line": 62,
1203
1266
  "character": 40
1204
1267
  },
1205
1268
  "type": "boolean"
@@ -1207,13 +1270,34 @@
1207
1270
  "isOptional": true,
1208
1271
  "defaultValue": "false",
1209
1272
  "isSpread": false
1273
+ },
1274
+ {
1275
+ "__schema": "ParameterSchema",
1276
+ "location": {
1277
+ "filePath": "component-log.main.runtime.ts",
1278
+ "line": 62,
1279
+ "character": 58
1280
+ },
1281
+ "name": "fullMessage",
1282
+ "type": {
1283
+ "__schema": "InferenceTypeSchema",
1284
+ "location": {
1285
+ "filePath": "component-log.main.runtime.ts",
1286
+ "line": 62,
1287
+ "character": 58
1288
+ },
1289
+ "type": "boolean"
1290
+ },
1291
+ "isOptional": true,
1292
+ "defaultValue": "false",
1293
+ "isSpread": false
1210
1294
  }
1211
1295
  ],
1212
1296
  "returnType": {
1213
1297
  "__schema": "InferenceTypeSchema",
1214
1298
  "location": {
1215
1299
  "filePath": "component-log.main.runtime.ts",
1216
- "line": 61,
1300
+ "line": 62,
1217
1301
  "character": 3
1218
1302
  },
1219
1303
  "type": "Promise<string[]>"
@@ -1226,7 +1310,7 @@
1226
1310
  "__schema": "FunctionLikeSchema",
1227
1311
  "location": {
1228
1312
  "filePath": "component-log.main.runtime.ts",
1229
- "line": 68,
1313
+ "line": 69,
1230
1314
  "character": 3
1231
1315
  },
1232
1316
  "signature": "(method) ComponentLogMain.getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>",
@@ -1236,7 +1320,7 @@
1236
1320
  "__schema": "ParameterSchema",
1237
1321
  "location": {
1238
1322
  "filePath": "component-log.main.runtime.ts",
1239
- "line": 68,
1323
+ "line": 69,
1240
1324
  "character": 35
1241
1325
  },
1242
1326
  "name": "id",
@@ -1244,7 +1328,7 @@
1244
1328
  "__schema": "KeywordTypeSchema",
1245
1329
  "location": {
1246
1330
  "filePath": "component-log.main.runtime.ts",
1247
- "line": 68,
1331
+ "line": 69,
1248
1332
  "character": 39
1249
1333
  },
1250
1334
  "name": "string"
@@ -1257,7 +1341,7 @@
1257
1341
  "__schema": "TypeRefSchema",
1258
1342
  "location": {
1259
1343
  "filePath": "component-log.main.runtime.ts",
1260
- "line": 68,
1344
+ "line": 69,
1261
1345
  "character": 48
1262
1346
  },
1263
1347
  "name": "Promise",
@@ -1266,14 +1350,14 @@
1266
1350
  "__schema": "TypeArraySchema",
1267
1351
  "location": {
1268
1352
  "filePath": "component-log.main.runtime.ts",
1269
- "line": 68,
1353
+ "line": 69,
1270
1354
  "character": 56
1271
1355
  },
1272
1356
  "type": {
1273
1357
  "__schema": "TypeRefSchema",
1274
1358
  "location": {
1275
1359
  "filePath": "component-log.main.runtime.ts",
1276
- "line": 68,
1360
+ "line": 69,
1277
1361
  "character": 56
1278
1362
  },
1279
1363
  "name": "FileHashDiffFromParent"
@@ -1289,7 +1373,7 @@
1289
1373
  "__schema": "FunctionLikeSchema",
1290
1374
  "location": {
1291
1375
  "filePath": "component-log.main.runtime.ts",
1292
- "line": 108,
1376
+ "line": 109,
1293
1377
  "character": 3
1294
1378
  },
1295
1379
  "signature": "(method) ComponentLogMain.getFileHistoryHashes(filePath: string): Promise<FileLog[]>",
@@ -1299,7 +1383,7 @@
1299
1383
  "__schema": "ParameterSchema",
1300
1384
  "location": {
1301
1385
  "filePath": "component-log.main.runtime.ts",
1302
- "line": 108,
1386
+ "line": 109,
1303
1387
  "character": 30
1304
1388
  },
1305
1389
  "name": "filePath",
@@ -1307,7 +1391,7 @@
1307
1391
  "__schema": "KeywordTypeSchema",
1308
1392
  "location": {
1309
1393
  "filePath": "component-log.main.runtime.ts",
1310
- "line": 108,
1394
+ "line": 109,
1311
1395
  "character": 40
1312
1396
  },
1313
1397
  "name": "string"
@@ -1320,7 +1404,7 @@
1320
1404
  "__schema": "TypeRefSchema",
1321
1405
  "location": {
1322
1406
  "filePath": "component-log.main.runtime.ts",
1323
- "line": 108,
1407
+ "line": 109,
1324
1408
  "character": 49
1325
1409
  },
1326
1410
  "name": "Promise",
@@ -1329,14 +1413,14 @@
1329
1413
  "__schema": "TypeArraySchema",
1330
1414
  "location": {
1331
1415
  "filePath": "component-log.main.runtime.ts",
1332
- "line": 108,
1416
+ "line": 109,
1333
1417
  "character": 57
1334
1418
  },
1335
1419
  "type": {
1336
1420
  "__schema": "TypeRefSchema",
1337
1421
  "location": {
1338
1422
  "filePath": "component-log.main.runtime.ts",
1339
- "line": 108,
1423
+ "line": 109,
1340
1424
  "character": 57
1341
1425
  },
1342
1426
  "name": "FileLog"
@@ -1352,7 +1436,7 @@
1352
1436
  "__schema": "FunctionLikeSchema",
1353
1437
  "location": {
1354
1438
  "filePath": "component-log.main.runtime.ts",
1355
- "line": 174,
1439
+ "line": 175,
1356
1440
  "character": 3
1357
1441
  },
1358
1442
  "signature": "(method) ComponentLogMain.getFileLog(filePath: string): Promise<FileLog[]>",
@@ -1362,7 +1446,7 @@
1362
1446
  "__schema": "ParameterSchema",
1363
1447
  "location": {
1364
1448
  "filePath": "component-log.main.runtime.ts",
1365
- "line": 174,
1449
+ "line": 175,
1366
1450
  "character": 20
1367
1451
  },
1368
1452
  "name": "filePath",
@@ -1370,7 +1454,7 @@
1370
1454
  "__schema": "KeywordTypeSchema",
1371
1455
  "location": {
1372
1456
  "filePath": "component-log.main.runtime.ts",
1373
- "line": 174,
1457
+ "line": 175,
1374
1458
  "character": 30
1375
1459
  },
1376
1460
  "name": "string"
@@ -1383,7 +1467,7 @@
1383
1467
  "__schema": "InferenceTypeSchema",
1384
1468
  "location": {
1385
1469
  "filePath": "component-log.main.runtime.ts",
1386
- "line": 174,
1470
+ "line": 175,
1387
1471
  "character": 3
1388
1472
  },
1389
1473
  "type": "Promise<FileLog[]>"
@@ -1396,7 +1480,7 @@
1396
1480
  "__schema": "VariableLikeSchema",
1397
1481
  "location": {
1398
1482
  "filePath": "component-log.main.runtime.ts",
1399
- "line": 231,
1483
+ "line": 232,
1400
1484
  "character": 3
1401
1485
  },
1402
1486
  "signature": "(property) ComponentLogMain.slots: never[]",
@@ -1405,7 +1489,7 @@
1405
1489
  "__schema": "InferenceTypeSchema",
1406
1490
  "location": {
1407
1491
  "filePath": "component-log.main.runtime.ts",
1408
- "line": 231,
1492
+ "line": 232,
1409
1493
  "character": 3
1410
1494
  },
1411
1495
  "type": "never[]"
@@ -1417,7 +1501,7 @@
1417
1501
  "__schema": "VariableLikeSchema",
1418
1502
  "location": {
1419
1503
  "filePath": "component-log.main.runtime.ts",
1420
- "line": 232,
1504
+ "line": 233,
1421
1505
  "character": 3
1422
1506
  },
1423
1507
  "signature": "(property) ComponentLogMain.dependencies: Aspect[]",
@@ -1426,7 +1510,7 @@
1426
1510
  "__schema": "InferenceTypeSchema",
1427
1511
  "location": {
1428
1512
  "filePath": "component-log.main.runtime.ts",
1429
- "line": 232,
1513
+ "line": 233,
1430
1514
  "character": 3
1431
1515
  },
1432
1516
  "type": "Aspect[]"
@@ -1438,7 +1522,7 @@
1438
1522
  "__schema": "VariableLikeSchema",
1439
1523
  "location": {
1440
1524
  "filePath": "component-log.main.runtime.ts",
1441
- "line": 233,
1525
+ "line": 234,
1442
1526
  "character": 3
1443
1527
  },
1444
1528
  "signature": "(property) ComponentLogMain.runtime: RuntimeDefinition",
@@ -1447,7 +1531,7 @@
1447
1531
  "__schema": "InferenceTypeSchema",
1448
1532
  "location": {
1449
1533
  "filePath": "component-log.main.runtime.ts",
1450
- "line": 233,
1534
+ "line": 234,
1451
1535
  "character": 3
1452
1536
  },
1453
1537
  "type": "RuntimeDefinition"
@@ -1459,7 +1543,7 @@
1459
1543
  "__schema": "FunctionLikeSchema",
1460
1544
  "location": {
1461
1545
  "filePath": "component-log.main.runtime.ts",
1462
- "line": 234,
1546
+ "line": 235,
1463
1547
  "character": 3
1464
1548
  },
1465
1549
  "signature": "(method) ComponentLogMain.provider([cli, workspace]: [CLIMain, Workspace]): Promise<ComponentLogMain>",
@@ -1469,7 +1553,7 @@
1469
1553
  "__schema": "ParameterSchema",
1470
1554
  "location": {
1471
1555
  "filePath": "component-log.main.runtime.ts",
1472
- "line": 234,
1556
+ "line": 235,
1473
1557
  "character": 25
1474
1558
  },
1475
1559
  "name": "[ cli, workspace ]",
@@ -1477,7 +1561,7 @@
1477
1561
  "__schema": "TupleTypeSchema",
1478
1562
  "location": {
1479
1563
  "filePath": "component-log.main.runtime.ts",
1480
- "line": 234,
1564
+ "line": 235,
1481
1565
  "character": 43
1482
1566
  },
1483
1567
  "elements": [
@@ -1485,7 +1569,7 @@
1485
1569
  "__schema": "TypeRefSchema",
1486
1570
  "location": {
1487
1571
  "filePath": "component-log.main.runtime.ts",
1488
- "line": 234,
1572
+ "line": 235,
1489
1573
  "character": 44
1490
1574
  },
1491
1575
  "name": "CLIMain"
@@ -1494,7 +1578,7 @@
1494
1578
  "__schema": "TypeRefSchema",
1495
1579
  "location": {
1496
1580
  "filePath": "component-log.main.runtime.ts",
1497
- "line": 234,
1581
+ "line": 235,
1498
1582
  "character": 53
1499
1583
  },
1500
1584
  "name": "Workspace"
@@ -1509,7 +1593,7 @@
1509
1593
  "__schema": "InferenceTypeSchema",
1510
1594
  "location": {
1511
1595
  "filePath": "component-log.main.runtime.ts",
1512
- "line": 234,
1596
+ "line": 235,
1513
1597
  "character": 3
1514
1598
  },
1515
1599
  "type": "Promise<ComponentLogMain>"
@@ -1527,7 +1611,7 @@
1527
1611
  "__schema": "TypeSchema",
1528
1612
  "location": {
1529
1613
  "filePath": "component-log.main.runtime.ts",
1530
- "line": 243,
1614
+ "line": 244,
1531
1615
  "character": 1
1532
1616
  },
1533
1617
  "signature": "type ComponentLogInfo = {\n hash: string;\n message: string;\n onLane?: boolean | undefined;\n parents: string[];\n username?: string | undefined;\n email?: string | undefined;\n date?: string | undefined;\n tag?: string | undefined;\n}",
@@ -1536,7 +1620,7 @@
1536
1620
  "__schema": "TypeLiteralSchema",
1537
1621
  "location": {
1538
1622
  "filePath": "component-log.main.runtime.ts",
1539
- "line": 243,
1623
+ "line": 244,
1540
1624
  "character": 32
1541
1625
  },
1542
1626
  "members": [
@@ -1544,7 +1628,7 @@
1544
1628
  "__schema": "VariableLikeSchema",
1545
1629
  "location": {
1546
1630
  "filePath": "component-log.main.runtime.ts",
1547
- "line": 244,
1631
+ "line": 245,
1548
1632
  "character": 3
1549
1633
  },
1550
1634
  "signature": "(property) hash: string",
@@ -1553,7 +1637,7 @@
1553
1637
  "__schema": "KeywordTypeSchema",
1554
1638
  "location": {
1555
1639
  "filePath": "component-log.main.runtime.ts",
1556
- "line": 244,
1640
+ "line": 245,
1557
1641
  "character": 9
1558
1642
  },
1559
1643
  "name": "string"
@@ -1564,7 +1648,7 @@
1564
1648
  "__schema": "VariableLikeSchema",
1565
1649
  "location": {
1566
1650
  "filePath": "component-log.main.runtime.ts",
1567
- "line": 245,
1651
+ "line": 246,
1568
1652
  "character": 3
1569
1653
  },
1570
1654
  "signature": "(property) message: string",
@@ -1573,7 +1657,7 @@
1573
1657
  "__schema": "KeywordTypeSchema",
1574
1658
  "location": {
1575
1659
  "filePath": "component-log.main.runtime.ts",
1576
- "line": 245,
1660
+ "line": 246,
1577
1661
  "character": 12
1578
1662
  },
1579
1663
  "name": "string"
@@ -1584,7 +1668,7 @@
1584
1668
  "__schema": "VariableLikeSchema",
1585
1669
  "location": {
1586
1670
  "filePath": "component-log.main.runtime.ts",
1587
- "line": 246,
1671
+ "line": 247,
1588
1672
  "character": 3
1589
1673
  },
1590
1674
  "signature": "(property) onLane?: boolean | undefined",
@@ -1593,7 +1677,7 @@
1593
1677
  "__schema": "KeywordTypeSchema",
1594
1678
  "location": {
1595
1679
  "filePath": "component-log.main.runtime.ts",
1596
- "line": 246,
1680
+ "line": 247,
1597
1681
  "character": 12
1598
1682
  },
1599
1683
  "name": "boolean"
@@ -1604,7 +1688,7 @@
1604
1688
  "__schema": "VariableLikeSchema",
1605
1689
  "location": {
1606
1690
  "filePath": "component-log.main.runtime.ts",
1607
- "line": 247,
1691
+ "line": 248,
1608
1692
  "character": 3
1609
1693
  },
1610
1694
  "signature": "(property) parents: string[]",
@@ -1613,14 +1697,14 @@
1613
1697
  "__schema": "TypeArraySchema",
1614
1698
  "location": {
1615
1699
  "filePath": "component-log.main.runtime.ts",
1616
- "line": 247,
1700
+ "line": 248,
1617
1701
  "character": 12
1618
1702
  },
1619
1703
  "type": {
1620
1704
  "__schema": "KeywordTypeSchema",
1621
1705
  "location": {
1622
1706
  "filePath": "component-log.main.runtime.ts",
1623
- "line": 247,
1707
+ "line": 248,
1624
1708
  "character": 12
1625
1709
  },
1626
1710
  "name": "string"
@@ -1632,7 +1716,7 @@
1632
1716
  "__schema": "VariableLikeSchema",
1633
1717
  "location": {
1634
1718
  "filePath": "component-log.main.runtime.ts",
1635
- "line": 248,
1719
+ "line": 249,
1636
1720
  "character": 3
1637
1721
  },
1638
1722
  "signature": "(property) username?: string | undefined",
@@ -1641,7 +1725,7 @@
1641
1725
  "__schema": "KeywordTypeSchema",
1642
1726
  "location": {
1643
1727
  "filePath": "component-log.main.runtime.ts",
1644
- "line": 248,
1728
+ "line": 249,
1645
1729
  "character": 14
1646
1730
  },
1647
1731
  "name": "string"
@@ -1652,7 +1736,7 @@
1652
1736
  "__schema": "VariableLikeSchema",
1653
1737
  "location": {
1654
1738
  "filePath": "component-log.main.runtime.ts",
1655
- "line": 249,
1739
+ "line": 250,
1656
1740
  "character": 3
1657
1741
  },
1658
1742
  "signature": "(property) email?: string | undefined",
@@ -1661,7 +1745,7 @@
1661
1745
  "__schema": "KeywordTypeSchema",
1662
1746
  "location": {
1663
1747
  "filePath": "component-log.main.runtime.ts",
1664
- "line": 249,
1748
+ "line": 250,
1665
1749
  "character": 11
1666
1750
  },
1667
1751
  "name": "string"
@@ -1672,7 +1756,7 @@
1672
1756
  "__schema": "VariableLikeSchema",
1673
1757
  "location": {
1674
1758
  "filePath": "component-log.main.runtime.ts",
1675
- "line": 250,
1759
+ "line": 251,
1676
1760
  "character": 3
1677
1761
  },
1678
1762
  "signature": "(property) date?: string | undefined",
@@ -1681,7 +1765,7 @@
1681
1765
  "__schema": "KeywordTypeSchema",
1682
1766
  "location": {
1683
1767
  "filePath": "component-log.main.runtime.ts",
1684
- "line": 250,
1768
+ "line": 251,
1685
1769
  "character": 10
1686
1770
  },
1687
1771
  "name": "string"
@@ -1692,7 +1776,7 @@
1692
1776
  "__schema": "VariableLikeSchema",
1693
1777
  "location": {
1694
1778
  "filePath": "component-log.main.runtime.ts",
1695
- "line": 251,
1779
+ "line": 252,
1696
1780
  "character": 3
1697
1781
  },
1698
1782
  "signature": "(property) tag?: string | undefined",
@@ -1701,7 +1785,7 @@
1701
1785
  "__schema": "KeywordTypeSchema",
1702
1786
  "location": {
1703
1787
  "filePath": "component-log.main.runtime.ts",
1704
- "line": 251,
1788
+ "line": 252,
1705
1789
  "character": 9
1706
1790
  },
1707
1791
  "name": "string"
@@ -1717,7 +1801,7 @@
1717
1801
  "__schema": "UnImplementedSchema",
1718
1802
  "location": {
1719
1803
  "filePath": "component-log.main.runtime.ts",
1720
- "line": 241,
1804
+ "line": 242,
1721
1805
  "character": 1
1722
1806
  },
1723
1807
  "name": "ComponentLogAspect.addRuntime(ComponentLogMain);",
@@ -1766,7 +1850,7 @@
1766
1850
  "componentId": {
1767
1851
  "scope": "teambit.component",
1768
1852
  "name": "component-log",
1769
- "version": "1.0.173"
1853
+ "version": "1.0.175"
1770
1854
  },
1771
1855
  "taggedModuleExports": []
1772
1856
  }
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const Logo: () => JSX.Element;
@@ -23,8 +23,8 @@ export declare class ComponentLogMain {
23
23
  /**
24
24
  * get component log sorted by the timestamp in ascending order (from the earliest to the latest)
25
25
  */
26
- getLogs(id: string, isRemote?: boolean, shortHash?: boolean): Promise<ComponentLog[]>;
27
- getLogsWithParents(id: string, fullHash?: boolean): Promise<string[]>;
26
+ getLogs(id: string, isRemote?: boolean, shortHash?: boolean, shortMessage?: boolean): Promise<ComponentLog[]>;
27
+ getLogsWithParents(id: string, fullHash?: boolean, fullMessage?: boolean): Promise<string[]>;
28
28
  getChangedFilesFromParent(id: string): Promise<FileHashDiffFromParent[]>;
29
29
  getFileHistoryHashes(filePath: string): Promise<FileLog[]>;
30
30
  getFileLog(filePath: string): Promise<FileLog[]>;
@@ -128,7 +128,7 @@ class ComponentLogMain {
128
128
  /**
129
129
  * get component log sorted by the timestamp in ascending order (from the earliest to the latest)
130
130
  */
131
- async getLogs(id, isRemote, shortHash = false) {
131
+ async getLogs(id, isRemote, shortHash = false, shortMessage = false) {
132
132
  if (isRemote) {
133
133
  const consumer = this.workspace?.consumer;
134
134
  const bitId = _componentId().ComponentID.fromString(id);
@@ -140,11 +140,12 @@ class ComponentLogMain {
140
140
  const logs = await this.workspace.scope.getLogs(componentId, shortHash);
141
141
  logs.forEach(log => {
142
142
  log.date = log.date ? (0, _moment().default)(new Date(parseInt(log.date))).format('YYYY-MM-DD HH:mm:ss') : undefined;
143
+ log.message = shortMessage ? log.message.split('\n')[0] : log.message;
143
144
  });
144
145
  return logs;
145
146
  }
146
- async getLogsWithParents(id, fullHash = false) {
147
- const logs = await this.getLogs(id, false, !fullHash);
147
+ async getLogsWithParents(id, fullHash = false, fullMessage = false) {
148
+ const logs = await this.getLogs(id, false, !fullHash, !fullMessage);
148
149
  const graph = (0, _snapGraph().buildSnapGraph)(logs);
149
150
  const sorted = graph.toposort();
150
151
  return sorted.map(node => this.stringifyLogInfoOneLine(node.attr));
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_path2","_componentsDiff","_chalk","_getRemoteByName","_componentLog","_logCmd","_snapGraph","_logFileCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ComponentLogMain","constructor","workspace","getLogs","id","isRemote","shortHash","consumer","bitId","ComponentID","fromString","remote","getRemoteByName","scope","log","OutsideWorkspaceError","componentId","resolveComponentId","logs","forEach","date","moment","Date","parseInt","format","undefined","getLogsWithParents","fullHash","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","message","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/dist/consumer/component-ops/components-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): 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 });\n return logs;\n }\n\n async getLogsWithParents(id: string, fullHash = false) {\n const logs = await this.getLogs(id, false, !fullHash);\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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,EAAE;IACzD,MAAMjE,OAAO,GAAGiE,OAAO,CAACjE,OAAO,CAACsB,MAAM,GAAI,cAAa2C,OAAO,CAACjE,OAAO,CAACiB,IAAI,CAAC,IAAI,CAAE,EAAC,GAAG,OAAO;IAC7F,OAAQ,GAAEiD,gBAAK,CAACC,MAAM,CAACF,OAAO,CAAC/C,IAAI,CAAE,IAAG+C,OAAO,CAACrB,QAAQ,IAAI,EAAG,IAAGqB,OAAO,CAACxF,IAAI,IAAI,EAAG,IACnFwF,OAAO,CAACnB,OACT,KAAI9C,OAAQ,EAAC;EAChB;EAKA,aAAaoE,QAAQA,CAAC,CAACC,GAAG,EAAE9G,SAAS,CAAuB,EAAE;IAC5D,MAAM+G,YAAY,GAAG,IAAIjH,gBAAgB,CAACE,SAAS,CAAC;IACpD8G,GAAG,CAACE,QAAQ,CAAC,KAAIC,iBAAM,EAACF,YAAY,CAAC,EAAE,KAAIG,wBAAU,EAACH,YAAY,CAAC,CAAC;IACpE,OAAOA,YAAY;EACrB;AACF;AAACI,OAAA,CAAArH,gBAAA,GAAAA,gBAAA;AAAApB,eAAA,CAxMYoB,gBAAgB,WAgMZ,EAAE;AAAApB,eAAA,CAhMNoB,gBAAgB,kBAiML,CAACsH,gBAAS,EAAEC,4BAAe,CAAC;AAAA3I,eAAA,CAjMvCoB,gBAAgB,aAkMVwH,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAAC1H,gBAAgB,CAAC"}
1
+ {"version":3,"names":["_cli","data","require","_componentId","_path","_interopRequireDefault","_moment","_pMap","_workspace","_lodash","_pMapSeries","_path2","_componentsDiff","_chalk","_getRemoteByName","_componentLog","_logCmd","_snapGraph","_logFileCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","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/dist/consumer/component-ops/components-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,SA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AAEgD,gBAAK,CAACC,MAAM,CAACF,OAAO,CAAC9C,IAAI,CAAE,IAAG8C,OAAO,CAACpB,QAAQ,IAAI,EAAG,IAAGoB,OAAO,CAAC1F,IAAI,IAAI,EAAG,IACnF0F,OAAO,CAACpF,OACT,KAAIoB,OAAQ,EAAC;EAChB;EAKA,aAAamE,QAAQA,CAAC,CAACC,GAAG,EAAEjH,SAAS,CAAuB,EAAE;IAC5D,MAAMkH,YAAY,GAAG,IAAIpH,gBAAgB,CAACE,SAAS,CAAC;IACpDiH,GAAG,CAACE,QAAQ,CAAC,KAAIC,iBAAM,EAACF,YAAY,CAAC,EAAE,KAAIG,wBAAU,EAACH,YAAY,CAAC,CAAC;IACpE,OAAOA,YAAY;EACrB;AACF;AAACI,OAAA,CAAAxH,gBAAA,GAAAA,gBAAA;AAAApB,eAAA,CAzMYoB,gBAAgB,WAiMZ,EAAE;AAAApB,eAAA,CAjMNoB,gBAAgB,kBAkML,CAACyH,gBAAS,EAAEC,4BAAe,CAAC;AAAA9I,eAAA,CAlMvCoB,gBAAgB,aAmMV2H,kBAAW;AAQ9BC,kCAAkB,CAACC,UAAU,CAAC7H,gBAAgB,CAAC"}
package/dist/log-cmd.d.ts CHANGED
@@ -18,11 +18,12 @@ export default class LogCmd implements Command {
18
18
  description: string;
19
19
  }[];
20
20
  constructor(componentLog: ComponentLogMain);
21
- report([id]: [string], { remote, parents, oneLine, fullHash, }: {
21
+ report([id]: [string], { remote, parents, oneLine, fullHash, fullMessage, }: {
22
22
  remote: boolean;
23
23
  parents: boolean;
24
24
  oneLine?: boolean;
25
25
  fullHash?: boolean;
26
+ fullMessage?: boolean;
26
27
  }): Promise<string>;
27
28
  json([id]: [string], { remote, parents }: {
28
29
  remote: boolean;
package/dist/log-cmd.js CHANGED
@@ -33,7 +33,7 @@ class LogCmd {
33
33
  _defineProperty(this, "extendedDescription", void 0);
34
34
  _defineProperty(this, "group", 'info');
35
35
  _defineProperty(this, "alias", '');
36
- _defineProperty(this, "options", [['r', 'remote', 'show log of a remote component'], ['', 'parents', 'show parents and lanes data'], ['o', 'one-line', 'show each log entry in one line'], ['f', 'full-hash', 'show full hash of the snap (default to the first 9 characters for --one-line/--parents flags)'], ['j', 'json', 'json format']]);
36
+ _defineProperty(this, "options", [['r', 'remote', 'show log of a remote component'], ['', 'parents', 'show parents and lanes data'], ['o', 'one-line', 'show each log entry in one line'], ['f', 'full-hash', 'show full hash of the snap (default to the first 9 characters for --one-line/--parents flags)'], ['m', 'full-message', 'show full message of the snap (default to the first line for --one-line/--parents flags)'], ['j', 'json', 'json format']]);
37
37
  _defineProperty(this, "remoteOp", true);
38
38
  // should support log against remote
39
39
  _defineProperty(this, "skipWorkspace", true);
@@ -46,14 +46,18 @@ class LogCmd {
46
46
  remote = false,
47
47
  parents = false,
48
48
  oneLine = false,
49
- fullHash = false
49
+ fullHash = false,
50
+ fullMessage
50
51
  }) {
51
- if (!parents && !oneLine) fullHash = true;
52
+ if (!parents && !oneLine) {
53
+ fullHash = true;
54
+ fullMessage = true;
55
+ }
52
56
  if (parents) {
53
- const logs = await this.componentLog.getLogsWithParents(id, fullHash);
57
+ const logs = await this.componentLog.getLogsWithParents(id, fullHash, fullMessage);
54
58
  return logs.join('\n');
55
59
  }
56
- const logs = await this.componentLog.getLogs(id, remote, !fullHash);
60
+ const logs = await this.componentLog.getLogs(id, remote, !fullHash, !fullMessage);
57
61
  if (oneLine) {
58
62
  return logOneLine(logs.reverse());
59
63
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cliTable","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","LogCmd","constructor","componentLog","name","description","report","id","remote","parents","oneLine","fullHash","logs","getLogsWithParents","join","getLogs","logOneLine","reverse","map","paintLog","json","exports","paintAuthor","email","username","c","white","log","message","date","tag","hash","title","yellow","getEmptyTableWithoutStyle","Table","chars","top","bottom","left","mid","right","middle","style","table","push","toString"],"sources":["log-cmd.ts"],"sourcesContent":["import c from 'chalk';\nimport Table from 'cli-table';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport { ComponentLogMain } from './component-log.main.runtime';\n\nexport default class LogCmd implements Command {\n name = 'log <id>';\n description = 'show components(s) version history';\n helpUrl = 'reference/components/navigating-history';\n extendedDescription: string;\n group = 'info';\n alias = '';\n options = [\n ['r', 'remote', 'show log of a remote component'],\n ['', 'parents', 'show parents and lanes data'],\n ['o', 'one-line', 'show each log entry in one line'],\n ['f', 'full-hash', 'show full hash of the snap (default to the first 9 characters for --one-line/--parents flags)'],\n ['j', 'json', 'json format'],\n ] as CommandOptions;\n remoteOp = true; // should support log against remote\n skipWorkspace = true;\n arguments = [{ name: 'id', description: 'component-id or component-name' }];\n\n constructor(private componentLog: ComponentLogMain) {}\n\n async report(\n [id]: [string],\n {\n remote = false,\n parents = false,\n oneLine = false,\n fullHash = false,\n }: { remote: boolean; parents: boolean; oneLine?: boolean; fullHash?: boolean }\n ) {\n if (!parents && !oneLine) fullHash = true;\n if (parents) {\n const logs = await this.componentLog.getLogsWithParents(id, fullHash);\n return logs.join('\\n');\n }\n const logs = await this.componentLog.getLogs(id, remote, !fullHash);\n if (oneLine) {\n return logOneLine(logs.reverse());\n }\n // reverse to show from the latest to earliest\n return logs.reverse().map(paintLog).join('\\n');\n }\n\n async json([id]: [string], { remote = false, parents = false }: { remote: boolean; parents: boolean }) {\n if (parents) {\n return this.componentLog.getLogsWithParents(id);\n }\n return this.componentLog.getLogs(id, remote);\n }\n}\n\nexport function paintAuthor(email: string | null | undefined, username: string | null | undefined) {\n if (email && username) {\n return c.white(`author: ${username} <${email}>\\n`);\n }\n if (email && !username) {\n return c.white(`author: <${email}>\\n`);\n }\n if (!email && username) {\n return c.white(`author: ${username}\\n`);\n }\n\n return '';\n}\n\nfunction paintLog(log: LegacyComponentLog): string {\n const { message, date, tag, hash, username, email } = log;\n const title = tag ? `tag ${tag} (${hash})\\n` : `snap ${hash}\\n`;\n return (\n c.yellow(title) +\n paintAuthor(email, username) +\n (date ? c.white(`date: ${date}\\n`) : '') +\n (message ? c.white(`\\n ${message}\\n`) : '')\n );\n}\n\n/**\n * table with no style and no borders, just to align the columns.\n */\nexport function getEmptyTableWithoutStyle() {\n return new Table({\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 0, 'padding-right': 0 },\n });\n}\n\nfunction logOneLine(logs: LegacyComponentLog[]) {\n const table = getEmptyTableWithoutStyle();\n\n logs.map(({ hash, tag, username, date, message }) =>\n table.push([hash, tag || '', username || '', date || '', message || ''])\n );\n\n return table.toString();\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8B,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,U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c,EAAE,CAAC;MAAE,eAAe,EAAE;IAAE;EACjD,CAAC,CAAC;AACJ;AAEA,SAAS3B,UAAUA,CAACJ,IAA0B,EAAE;EAC9C,MAAMgC,KAAK,GAAGV,yBAAyB,CAAC,CAAC;EAEzCtB,IAAI,CAACM,GAAG,CAAC,CAAC;IAAEa,IAAI;IAAED,GAAG;IAAEN,QAAQ;IAAEK,IAAI;IAAED;EAAQ,CAAC,KAC9CgB,KAAK,CAACC,IAAI,CAAC,CAACd,IAAI,EAAED,GAAG,IAAI,EAAE,EAAEN,QAAQ,IAAI,EAAE,EAAEK,IAAI,IAAI,EAAE,EAAED,OAAO,IAAI,EAAE,CAAC,CACzE,CAAC;EAED,OAAOgB,KAAK,CAACE,QAAQ,CAAC,CAAC;AACzB"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cliTable","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","LogCmd","constructor","componentLog","name","description","report","id","remote","parents","oneLine","fullHash","fullMessage","logs","getLogsWithParents","join","getLogs","logOneLine","reverse","map","paintLog","json","exports","paintAuthor","email","username","c","white","log","message","date","tag","hash","title","yellow","getEmptyTableWithoutStyle","Table","chars","top","bottom","left","mid","right","middle","style","table","push","toString"],"sources":["log-cmd.ts"],"sourcesContent":["import c from 'chalk';\nimport Table from 'cli-table';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { LegacyComponentLog } from '@teambit/legacy-component-log';\nimport { ComponentLogMain } from './component-log.main.runtime';\n\nexport default class LogCmd implements Command {\n name = 'log <id>';\n description = 'show components(s) version history';\n helpUrl = 'reference/components/navigating-history';\n extendedDescription: string;\n group = 'info';\n alias = '';\n options = [\n ['r', 'remote', 'show log of a remote component'],\n ['', 'parents', 'show parents and lanes data'],\n ['o', 'one-line', 'show each log entry in one line'],\n ['f', 'full-hash', 'show full hash of the snap (default to the first 9 characters for --one-line/--parents flags)'],\n ['m', 'full-message', 'show full message of the snap (default to the first line for --one-line/--parents flags)'],\n ['j', 'json', 'json format'],\n ] as CommandOptions;\n remoteOp = true; // should support log against remote\n skipWorkspace = true;\n arguments = [{ name: 'id', description: 'component-id or component-name' }];\n\n constructor(private componentLog: ComponentLogMain) {}\n\n async report(\n [id]: [string],\n {\n remote = false,\n parents = false,\n oneLine = false,\n fullHash = false,\n fullMessage,\n }: { remote: boolean; parents: boolean; oneLine?: boolean; fullHash?: boolean; fullMessage?: boolean }\n ) {\n if (!parents && !oneLine) {\n fullHash = true;\n fullMessage = true;\n }\n if (parents) {\n const logs = await this.componentLog.getLogsWithParents(id, fullHash, fullMessage);\n return logs.join('\\n');\n }\n const logs = await this.componentLog.getLogs(id, remote, !fullHash, !fullMessage);\n if (oneLine) {\n return logOneLine(logs.reverse());\n }\n // reverse to show from the latest to earliest\n return logs.reverse().map(paintLog).join('\\n');\n }\n\n async json([id]: [string], { remote = false, parents = false }: { remote: boolean; parents: boolean }) {\n if (parents) {\n return this.componentLog.getLogsWithParents(id);\n }\n return this.componentLog.getLogs(id, remote);\n }\n}\n\nexport function paintAuthor(email: string | null | undefined, username: string | null | undefined) {\n if (email && username) {\n return c.white(`author: ${username} <${email}>\\n`);\n }\n if (email && !username) {\n return c.white(`author: <${email}>\\n`);\n }\n if (!email && username) {\n return c.white(`author: ${username}\\n`);\n }\n\n return '';\n}\n\nfunction paintLog(log: LegacyComponentLog): string {\n const { message, date, tag, hash, username, email } = log;\n const title = tag ? `tag ${tag} (${hash})\\n` : `snap ${hash}\\n`;\n return (\n c.yellow(title) +\n paintAuthor(email, username) +\n (date ? c.white(`date: ${date}\\n`) : '') +\n (message ? c.white(`\\n ${message}\\n`) : '')\n );\n}\n\n/**\n * table with no style and no borders, just to align the columns.\n */\nexport function getEmptyTableWithoutStyle() {\n return new Table({\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 0, 'padding-right': 0 },\n });\n}\n\nfunction logOneLine(logs: LegacyComponentLog[]) {\n const table = getEmptyTableWithoutStyle();\n\n logs.map(({ hash, tag, username, date, message }) =>\n table.push([hash, tag || '', username || '', date || '', message || ''])\n );\n\n return table.toString();\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8B,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH,GAAA,EAAAI,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAJ,GAAA,IAAAO,MAAA,CAAAC,cAAA,CAAAR,GAAA,EAAAI,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAX,GAAA,CAAAI,GAAA,IAAAC,KAAA,WAAAL,GAAA;AAAA,SAAAM,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAA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AAEa,IAAI;IAAED,GAAG;IAAEN,QAAQ;IAAEK,IAAI;IAAED;EAAQ,CAAC,KAC9CgB,KAAK,CAACC,IAAI,CAAC,CAACd,IAAI,EAAED,GAAG,IAAI,EAAE,EAAEN,QAAQ,IAAI,EAAE,EAAEK,IAAI,IAAI,EAAE,EAAED,OAAO,IAAI,EAAE,CAAC,CACzE,CAAC;EAED,OAAOgB,KAAK,CAACE,QAAQ,CAAC,CAAC;AACzB"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.173/dist/component-log.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.173/dist/component-log.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.175/dist/component-log.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-log@1.0.175/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.173",
3
+ "version": "1.0.175",
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.173"
9
+ "version": "1.0.175"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -20,7 +20,7 @@
20
20
  "@teambit/legacy-component-log": "0.0.402",
21
21
  "@teambit/graph.cleargraph": "0.0.8",
22
22
  "@teambit/cli": "0.0.851",
23
- "@teambit/workspace": "1.0.173"
23
+ "@teambit/workspace": "1.0.175"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/lodash": "4.14.165",