tnp-helpers 18.0.10 → 18.0.13

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.
Files changed (159) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/esm2022/lib/base/base-compiler-for-project.mjs +48 -0
  3. package/browser/esm2022/lib/base/base-debounce-compiler-for-project.mjs +52 -0
  4. package/browser/esm2022/lib/base/base-git.mjs +126 -3
  5. package/browser/esm2022/lib/base/base-library-build.mjs +88 -2
  6. package/browser/esm2022/lib/base/base-project-resolver.mjs +4 -1
  7. package/browser/esm2022/lib/base/base-project.mjs +114 -26
  8. package/browser/esm2022/lib/base/base-quick-fixes.mjs +24 -0
  9. package/browser/esm2022/lib/base/base-vscode.mjs +31 -4
  10. package/browser/esm2022/lib/base/commit-data.mjs +8 -1
  11. package/browser/esm2022/lib/base/index.mjs +5 -1
  12. package/browser/esm2022/lib/helpers/helpers-array-obj.mjs +31 -25
  13. package/browser/esm2022/lib/helpers/helpers.mjs +5 -11
  14. package/browser/esm2022/lib/models.mjs +1 -1
  15. package/browser/esm2022/lib/utils.mjs +400 -1
  16. package/browser/fesm2022/tnp-helpers.mjs +2784 -1842
  17. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  18. package/browser/lib/base/base-compiler-for-project.d.ts +6 -0
  19. package/browser/lib/base/base-debounce-compiler-for-project.d.ts +25 -0
  20. package/browser/lib/base/base-git.d.ts +5 -26
  21. package/browser/lib/base/base-library-build.d.ts +6 -2
  22. package/browser/lib/base/base-project-resolver.d.ts +1 -1
  23. package/browser/lib/base/base-project.d.ts +24 -9
  24. package/browser/lib/base/base-quick-fixes.d.ts +7 -0
  25. package/browser/lib/base/base-vscode.d.ts +7 -1
  26. package/browser/lib/base/commit-data.d.ts +1 -0
  27. package/browser/lib/base/index.d.ts +4 -0
  28. package/browser/lib/helpers/helpers-array-obj.d.ts +2 -2
  29. package/browser/lib/helpers/helpers.d.ts +4 -0
  30. package/browser/lib/models.d.ts +27 -1
  31. package/browser/lib/utils.d.ts +46 -0
  32. package/client/esm2022/lib/base/base-compiler-for-project.mjs +48 -0
  33. package/client/esm2022/lib/base/base-debounce-compiler-for-project.mjs +52 -0
  34. package/client/esm2022/lib/base/base-git.mjs +126 -3
  35. package/client/esm2022/lib/base/base-library-build.mjs +88 -2
  36. package/client/esm2022/lib/base/base-project-resolver.mjs +4 -1
  37. package/client/esm2022/lib/base/base-project.mjs +114 -26
  38. package/client/esm2022/lib/base/base-quick-fixes.mjs +24 -0
  39. package/client/esm2022/lib/base/base-vscode.mjs +31 -4
  40. package/client/esm2022/lib/base/commit-data.mjs +8 -1
  41. package/client/esm2022/lib/base/index.mjs +5 -1
  42. package/client/esm2022/lib/helpers/helpers-array-obj.mjs +31 -25
  43. package/client/esm2022/lib/helpers/helpers.mjs +5 -11
  44. package/client/esm2022/lib/models.mjs +1 -1
  45. package/client/esm2022/lib/utils.mjs +400 -1
  46. package/client/fesm2022/tnp-helpers.mjs +2784 -1842
  47. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  48. package/client/lib/base/base-compiler-for-project.d.ts +6 -0
  49. package/client/lib/base/base-debounce-compiler-for-project.d.ts +25 -0
  50. package/client/lib/base/base-git.d.ts +5 -26
  51. package/client/lib/base/base-library-build.d.ts +6 -2
  52. package/client/lib/base/base-project-resolver.d.ts +1 -1
  53. package/client/lib/base/base-project.d.ts +24 -9
  54. package/client/lib/base/base-quick-fixes.d.ts +7 -0
  55. package/client/lib/base/base-vscode.d.ts +7 -1
  56. package/client/lib/base/commit-data.d.ts +1 -0
  57. package/client/lib/base/index.d.ts +4 -0
  58. package/client/lib/helpers/helpers-array-obj.d.ts +2 -2
  59. package/client/lib/helpers/helpers.d.ts +4 -0
  60. package/client/lib/models.d.ts +27 -1
  61. package/client/lib/utils.d.ts +46 -0
  62. package/lib/base/base-command-line.backend.d.ts +27 -9
  63. package/lib/base/base-command-line.backend.js +404 -42
  64. package/lib/base/base-command-line.backend.js.map +1 -1
  65. package/lib/base/base-compiler-for-project.d.ts +7 -0
  66. package/lib/base/base-compiler-for-project.js +61 -0
  67. package/lib/base/base-compiler-for-project.js.map +1 -0
  68. package/lib/base/base-debounce-compiler-for-project.d.ts +24 -0
  69. package/lib/base/base-debounce-compiler-for-project.js +78 -0
  70. package/lib/base/base-debounce-compiler-for-project.js.map +1 -0
  71. package/lib/base/base-git.d.ts +5 -26
  72. package/lib/base/base-git.js +224 -103
  73. package/lib/base/base-git.js.map +1 -1
  74. package/lib/base/base-ignore-hide.d.ts +14 -0
  75. package/lib/base/base-ignore-hide.js +55 -0
  76. package/lib/base/base-ignore-hide.js.map +1 -0
  77. package/lib/base/base-library-build.d.ts +6 -2
  78. package/lib/base/base-library-build.js +178 -57
  79. package/lib/base/base-library-build.js.map +1 -1
  80. package/lib/base/base-project-resolver.d.ts +1 -1
  81. package/lib/base/base-project-resolver.js +6 -2
  82. package/lib/base/base-project-resolver.js.map +1 -1
  83. package/lib/base/base-project.d.ts +23 -8
  84. package/lib/base/base-project.js +101 -9
  85. package/lib/base/base-project.js.map +1 -1
  86. package/lib/base/base-quick-fixes.d.ts +6 -0
  87. package/lib/base/base-quick-fixes.js +31 -0
  88. package/lib/base/base-quick-fixes.js.map +1 -0
  89. package/lib/base/base-vscode.d.ts +7 -1
  90. package/lib/base/base-vscode.js +24 -4
  91. package/lib/base/base-vscode.js.map +1 -1
  92. package/lib/base/command-line-feature.backend.d.ts +4 -0
  93. package/lib/base/command-line-feature.backend.js +10 -0
  94. package/lib/base/command-line-feature.backend.js.map +1 -1
  95. package/lib/base/commit-data.d.ts +1 -0
  96. package/lib/base/commit-data.js +13 -8
  97. package/lib/base/commit-data.js.map +1 -1
  98. package/lib/base/gh-temp-code.d.ts +12 -0
  99. package/lib/base/gh-temp-code.js +125 -0
  100. package/lib/base/gh-temp-code.js.map +1 -0
  101. package/lib/base/index-rebuilder.backend.d.ts +0 -0
  102. package/lib/base/index-rebuilder.backend.js +129 -0
  103. package/lib/base/index-rebuilder.backend.js.map +1 -0
  104. package/lib/base/index.d.ts +4 -0
  105. package/lib/base/index.js +4 -0
  106. package/lib/base/index.js.map +1 -1
  107. package/lib/helpers/for-backend/helpers-git.backend.d.ts +2 -1
  108. package/lib/helpers/for-backend/helpers-git.backend.js +92 -12
  109. package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
  110. package/lib/helpers/for-browser/angular.helper.js +2 -2
  111. package/lib/helpers/helpers-array-obj.d.ts +2 -2
  112. package/lib/helpers/helpers-array-obj.js +29 -21
  113. package/lib/helpers/helpers-array-obj.js.map +1 -1
  114. package/lib/helpers/helpers.d.ts +4 -0
  115. package/lib/helpers/helpers.js +9 -13
  116. package/lib/helpers/helpers.js.map +1 -1
  117. package/lib/index._auto-generated_.d.ts +0 -0
  118. package/lib/index._auto-generated_.js +6 -0
  119. package/lib/index._auto-generated_.js.map +1 -0
  120. package/lib/models.d.ts +27 -1
  121. package/lib/old/base-component.js +2 -2
  122. package/lib/old/base-formly-component.js +2 -2
  123. package/lib/old/dual-component-ctrl.js +2 -2
  124. package/lib/utils.d.ts +46 -0
  125. package/lib/utils.js +345 -10
  126. package/lib/utils.js.map +1 -1
  127. package/package.json +10 -6
  128. package/taon.jsonc +1 -0
  129. package/tmp-environment.json +37 -31
  130. package/websql/esm2022/lib/base/base-compiler-for-project.mjs +48 -0
  131. package/websql/esm2022/lib/base/base-debounce-compiler-for-project.mjs +52 -0
  132. package/websql/esm2022/lib/base/base-git.mjs +126 -3
  133. package/websql/esm2022/lib/base/base-library-build.mjs +88 -2
  134. package/websql/esm2022/lib/base/base-project-resolver.mjs +4 -1
  135. package/websql/esm2022/lib/base/base-project.mjs +108 -26
  136. package/websql/esm2022/lib/base/base-quick-fixes.mjs +24 -0
  137. package/websql/esm2022/lib/base/base-vscode.mjs +31 -4
  138. package/websql/esm2022/lib/base/commit-data.mjs +8 -1
  139. package/websql/esm2022/lib/base/index.mjs +5 -1
  140. package/websql/esm2022/lib/helpers/helpers-array-obj.mjs +31 -25
  141. package/websql/esm2022/lib/helpers/helpers.mjs +5 -11
  142. package/websql/esm2022/lib/models.mjs +1 -1
  143. package/websql/esm2022/lib/utils.mjs +400 -1
  144. package/websql/fesm2022/tnp-helpers.mjs +2657 -1721
  145. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  146. package/websql/lib/base/base-compiler-for-project.d.ts +6 -0
  147. package/websql/lib/base/base-debounce-compiler-for-project.d.ts +25 -0
  148. package/websql/lib/base/base-git.d.ts +5 -26
  149. package/websql/lib/base/base-library-build.d.ts +6 -2
  150. package/websql/lib/base/base-project-resolver.d.ts +1 -1
  151. package/websql/lib/base/base-project.d.ts +24 -9
  152. package/websql/lib/base/base-quick-fixes.d.ts +7 -0
  153. package/websql/lib/base/base-vscode.d.ts +7 -1
  154. package/websql/lib/base/commit-data.d.ts +1 -0
  155. package/websql/lib/base/index.d.ts +4 -0
  156. package/websql/lib/helpers/helpers-array-obj.d.ts +2 -2
  157. package/websql/lib/helpers/helpers.d.ts +4 -0
  158. package/websql/lib/models.d.ts +27 -1
  159. package/websql/lib/utils.d.ts +46 -0
@@ -8,6 +8,7 @@ var tnp_core_1 = require("tnp-core");
8
8
  var tnp_config_1 = require("tnp-config");
9
9
  var tnp_config_2 = require("tnp-config");
10
10
  var tnp_core_2 = require("tnp-core");
11
+ var gh_temp_code_1 = require("./gh-temp-code");
11
12
  var BaseCommandLine = /** @class */ (function (_super) {
12
13
  tslib_1.__extends(BaseCommandLine, _super);
13
14
  function BaseCommandLine() {
@@ -16,20 +17,25 @@ var BaseCommandLine = /** @class */ (function (_super) {
16
17
  BaseCommandLine.prototype._ = function () {
17
18
  index_1.Helpers.error('Please select git command');
18
19
  };
20
+ //#region commands / prevent cwd is not project
19
21
  /**
20
22
  * TODO return argument not need for now
21
23
  */
22
- BaseCommandLine.prototype.preventCwdIsNotProject = function () {
24
+ BaseCommandLine.prototype.cwdIsProject = function (options) {
23
25
  return tslib_1.__awaiter(this, void 0, void 0, function () {
24
- var proj, useRoot;
26
+ var requireProjectWithGitRoot, proj, useRoot;
25
27
  return tslib_1.__generator(this, function (_a) {
26
28
  switch (_a.label) {
27
29
  case 0:
28
- if (!(!this.project || !this.project.git.isGitRoot)) return [3 /*break*/, 3];
29
- if (!!this.project.git.isGitRoot) return [3 /*break*/, 2];
30
+ requireProjectWithGitRoot = (options || {}).requireProjectWithGitRoot;
31
+ if (!!this.project && !requireProjectWithGitRoot) {
32
+ return [2 /*return*/, true];
33
+ }
34
+ if (!(requireProjectWithGitRoot &&
35
+ (!this.project || !this.project.git.isGitRoot))) return [3 /*break*/, 3];
30
36
  proj = this.ins.nearestTo(this.cwd, { findGitRoot: true });
31
37
  if (!proj) return [3 /*break*/, 2];
32
- index_1.Helpers.info("\n Current folder (".concat(this.cwd, ")\n is not a git root folder, but nearest project with\n git root has been found in: ").concat(tnp_core_1.chalk.bold(proj.genericName), "\n\n "));
38
+ index_1.Helpers.info("\n Current folder (".concat(this.cwd, ")\n is not a git root folder, but nearest project with\n git root has been found in: ").concat(tnp_core_1.chalk.bold(proj.genericName), "\n\n "));
33
39
  return [4 /*yield*/, index_1.Helpers.questionYesNo('Would you like to use this project ?')];
34
40
  case 1:
35
41
  useRoot = _a.sent();
@@ -38,15 +44,19 @@ var BaseCommandLine = /** @class */ (function (_super) {
38
44
  this.cwd = proj.location;
39
45
  return [2 /*return*/, true];
40
46
  }
41
- _a.label = 2;
47
+ else {
48
+ index_1.Helpers.error("[".concat(tnp_config_2.config.frameworkName, "] This is not git root project folder"), true, true);
49
+ }
50
+ return [3 /*break*/, 3];
42
51
  case 2:
43
- index_1.Helpers.error('This is not a project folder', false, true);
52
+ index_1.Helpers.error("[".concat(tnp_config_2.config.frameworkName, "] This folder is not project folder"), false, true);
44
53
  _a.label = 3;
45
54
  case 3: return [2 /*return*/, true];
46
55
  }
47
56
  });
48
57
  });
49
58
  };
59
+ //#endregion
50
60
  //#region commands / hosts
51
61
  BaseCommandLine.prototype.hosts = function () {
52
62
  index_1.Helpers.run("code ".concat((0, tnp_core_2.crossPlatformPath)(tnp_config_1.HOST_FILE_PATH))).sync();
@@ -110,7 +120,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
110
120
  return tslib_1.__awaiter(this, void 0, void 0, function () {
111
121
  return tslib_1.__generator(this, function (_a) {
112
122
  switch (_a.label) {
113
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
123
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
114
124
  case 1:
115
125
  if (!(_a.sent())) {
116
126
  return [2 /*return*/];
@@ -153,7 +163,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
153
163
  if (noExit === void 0) { noExit = false; }
154
164
  return tslib_1.__generator(this, function (_a) {
155
165
  switch (_a.label) {
156
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
166
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
157
167
  case 1:
158
168
  if (!(_a.sent())) {
159
169
  return [2 /*return*/];
@@ -347,12 +357,46 @@ var BaseCommandLine = /** @class */ (function (_super) {
347
357
  });
348
358
  };
349
359
  //#endregion
360
+ //#region commands / repulll
361
+ BaseCommandLine.prototype.repul = function () {
362
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
363
+ return tslib_1.__generator(this, function (_a) {
364
+ switch (_a.label) {
365
+ case 0: return [4 /*yield*/, this.repull()];
366
+ case 1:
367
+ _a.sent();
368
+ return [2 /*return*/];
369
+ }
370
+ });
371
+ });
372
+ };
373
+ BaseCommandLine.prototype.repull = function () {
374
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
375
+ return tslib_1.__generator(this, function (_a) {
376
+ switch (_a.label) {
377
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
378
+ case 1:
379
+ if (!(_a.sent())) {
380
+ return [2 /*return*/];
381
+ }
382
+ return [4 /*yield*/, this.project.git.resetHard({ HEAD: 10 })];
383
+ case 2:
384
+ _a.sent();
385
+ return [4 /*yield*/, this.pull()];
386
+ case 3:
387
+ _a.sent();
388
+ return [2 /*return*/];
389
+ }
390
+ });
391
+ });
392
+ };
393
+ //#endregion
350
394
  //#region commands / pull
351
395
  BaseCommandLine.prototype.pull = function () {
352
396
  return tslib_1.__awaiter(this, void 0, void 0, function () {
353
397
  return tslib_1.__generator(this, function (_a) {
354
398
  switch (_a.label) {
355
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
399
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
356
400
  case 1:
357
401
  if (!(_a.sent())) {
358
402
  return [2 /*return*/];
@@ -374,7 +418,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
374
418
  return tslib_1.__awaiter(this, void 0, void 0, function () {
375
419
  return tslib_1.__generator(this, function (_a) {
376
420
  switch (_a.label) {
377
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
421
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
378
422
  case 1:
379
423
  if (!(_a.sent())) {
380
424
  return [2 /*return*/];
@@ -400,6 +444,19 @@ var BaseCommandLine = /** @class */ (function (_super) {
400
444
  .join('\n'))
401
445
  : '', "\n "));
402
446
  };
447
+ BaseCommandLine.prototype.fetch = function () {
448
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
449
+ var _a, _b;
450
+ return tslib_1.__generator(this, function (_c) {
451
+ try {
452
+ (_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.git) === null || _b === void 0 ? void 0 : _b.fetch();
453
+ }
454
+ catch (error) { }
455
+ this._exit();
456
+ return [2 /*return*/];
457
+ });
458
+ });
459
+ };
403
460
  BaseCommandLine.prototype.reset = function () {
404
461
  return tslib_1.__awaiter(this, void 0, void 0, function () {
405
462
  var parent, branchFromLinkedProjectConfig, overrideBranchToReset, resetOnlyChildren, branches, resetProject, res;
@@ -407,7 +464,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
407
464
  var _a, _b, _c, _d, _e;
408
465
  return tslib_1.__generator(this, function (_f) {
409
466
  switch (_f.label) {
410
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
467
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
411
468
  case 1:
412
469
  // Helpers.clearConsole();
413
470
  if (!(_f.sent())) {
@@ -433,7 +490,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
433
490
  return [3 /*break*/, 5];
434
491
  case 2:
435
492
  if (!(branches.length > 0)) return [3 /*break*/, 4];
436
- return [4 /*yield*/, this.__selectBrach(branches)];
493
+ return [4 /*yield*/, this.__selectBrach(branches, 'reset')];
437
494
  case 3:
438
495
  overrideBranchToReset = _f.sent();
439
496
  return [3 /*break*/, 5];
@@ -479,7 +536,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
479
536
  return tslib_1.__awaiter(this, void 0, void 0, function () {
480
537
  return tslib_1.__generator(this, function (_a) {
481
538
  switch (_a.label) {
482
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
539
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
483
540
  case 1:
484
541
  // TODO when aciton commit
485
542
  if (!(_a.sent())) {
@@ -499,7 +556,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
499
556
  var currentBranch, safeReset, rebaseBranch, branches, error_3;
500
557
  return tslib_1.__generator(this, function (_a) {
501
558
  switch (_a.label) {
502
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
559
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
503
560
  case 1:
504
561
  if (!(_a.sent())) {
505
562
  return [2 /*return*/];
@@ -509,7 +566,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
509
566
  rebaseBranch = this.firstArg || this.project.getDefaultDevelopmentBranch();
510
567
  branches = this.__filterBranchesByPattern(rebaseBranch);
511
568
  if (!(branches.length > 0)) return [3 /*break*/, 3];
512
- return [4 /*yield*/, this.__selectBrach(branches)];
569
+ return [4 /*yield*/, this.__selectBrach(branches, 'reset')];
513
570
  case 2:
514
571
  rebaseBranch = _a.sent();
515
572
  return [3 /*break*/, 4];
@@ -550,7 +607,9 @@ var BaseCommandLine = /** @class */ (function (_super) {
550
607
  return tslib_1.__awaiter(this, void 0, void 0, function () {
551
608
  return tslib_1.__generator(this, function (_a) {
552
609
  switch (_a.label) {
553
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
610
+ case 0:
611
+ index_1.Helpers.info("Stashing only staged files...");
612
+ return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
554
613
  case 1:
555
614
  if (!(_a.sent())) {
556
615
  return [2 /*return*/];
@@ -571,7 +630,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
571
630
  return tslib_1.__awaiter(this, void 0, void 0, function () {
572
631
  return tslib_1.__generator(this, function (_a) {
573
632
  switch (_a.label) {
574
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
633
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
575
634
  case 1:
576
635
  if (!(_a.sent())) {
577
636
  return [2 /*return*/];
@@ -593,7 +652,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
593
652
  return tslib_1.__awaiter(this, void 0, void 0, function () {
594
653
  return tslib_1.__generator(this, function (_a) {
595
654
  switch (_a.label) {
596
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
655
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
597
656
  case 1:
598
657
  if (!(_a.sent())) {
599
658
  return [2 /*return*/];
@@ -651,7 +710,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
651
710
  if (force === void 0) { force = false; }
652
711
  return tslib_1.__generator(this, function (_b) {
653
712
  switch (_b.label) {
654
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
713
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
655
714
  case 1:
656
715
  if (!(_b.sent())) {
657
716
  return [2 /*return*/];
@@ -716,17 +775,17 @@ var BaseCommandLine = /** @class */ (function (_super) {
716
775
  if (options === void 0) { options = {}; }
717
776
  return tslib_1.__generator(this, function (_a) {
718
777
  switch (_a.label) {
719
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
778
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
720
779
  case 1:
721
780
  if (!(_a.sent())) {
722
781
  return [2 /*return*/];
723
782
  }
724
- return [4 /*yield*/, this.project.git.meltActionCommits(true)];
783
+ return [4 /*yield*/, this.project.git.meltActionCommits()];
725
784
  case 2:
726
785
  _a.sent();
727
786
  return [4 /*yield*/, this.project.git.pushProcess(tslib_1.__assign(tslib_1.__assign({}, options), { forcePushNoQuestion: options.force, args: this.args, exitCallBack: function () {
728
787
  _this._exit();
729
- }, skipChildren: true, setOrigin: this.params['setOrigin'], currentOrigin: this.project.git.originURL }))];
788
+ }, skipChildren: true, overrideCommitMessage: this.args.join(' '), setOrigin: this.params['setOrigin'], currentOrigin: this.project.git.originURL }))];
730
789
  case 3:
731
790
  _a.sent();
732
791
  if (options.noExit) {
@@ -798,13 +857,37 @@ var BaseCommandLine = /** @class */ (function (_super) {
798
857
  });
799
858
  });
800
859
  };
860
+ BaseCommandLine.prototype.qPush = function () {
861
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
862
+ return tslib_1.__generator(this, function (_a) {
863
+ switch (_a.label) {
864
+ case 0: return [4 /*yield*/, this.quickPush()];
865
+ case 1:
866
+ _a.sent();
867
+ return [2 /*return*/];
868
+ }
869
+ });
870
+ });
871
+ };
872
+ BaseCommandLine.prototype.quickPush = function () {
873
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
874
+ return tslib_1.__generator(this, function (_a) {
875
+ switch (_a.label) {
876
+ case 0: return [4 /*yield*/, this.push({ skipLint: true })];
877
+ case 1:
878
+ _a.sent();
879
+ return [2 /*return*/];
880
+ }
881
+ });
882
+ });
883
+ };
801
884
  BaseCommandLine.prototype.push = function () {
802
885
  return tslib_1.__awaiter(this, arguments, void 0, function (options) {
803
886
  var _this = this;
804
887
  if (options === void 0) { options = {}; }
805
888
  return tslib_1.__generator(this, function (_a) {
806
889
  switch (_a.label) {
807
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
890
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
808
891
  case 1:
809
892
  // console.log('args', this.args);
810
893
  // console.log(`argsWithParams "${this.argsWithParams}"` );
@@ -831,12 +914,12 @@ var BaseCommandLine = /** @class */ (function (_super) {
831
914
  });
832
915
  };
833
916
  //#endregion
834
- //#region commands / melt
917
+ //#region commands / melt
835
918
  BaseCommandLine.prototype.melt = function () {
836
919
  return tslib_1.__awaiter(this, void 0, void 0, function () {
837
920
  return tslib_1.__generator(this, function (_a) {
838
921
  switch (_a.label) {
839
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
922
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
840
923
  case 1:
841
924
  if (!(_a.sent())) {
842
925
  return [2 /*return*/];
@@ -851,14 +934,14 @@ var BaseCommandLine = /** @class */ (function (_super) {
851
934
  });
852
935
  };
853
936
  //#endregion
854
- //#region melt updat ecommits
937
+ //#region commands / melt updat ecommits
855
938
  BaseCommandLine.prototype.meltUpdateCommits = function () {
856
939
  return tslib_1.__awaiter(this, arguments, void 0, function (hideInfo) {
857
940
  if (hideInfo === void 0) { hideInfo = false; }
858
941
  return tslib_1.__generator(this, function (_a) {
859
942
  switch (_a.label) {
860
943
  case 0:
861
- if (!(this.project.git.meltActionCommits(true) > 0)) return [3 /*break*/, 2];
944
+ if (!(this.project.git.meltActionCommits() > 0)) return [3 /*break*/, 2];
862
945
  if (!!hideInfo) return [3 /*break*/, 2];
863
946
  this.project.git.stageAllFiles();
864
947
  return [4 /*yield*/, index_1.Helpers.consoleGui.question.yesNo('Update commits has been reset. Continue with changes ?')];
@@ -898,6 +981,18 @@ var BaseCommandLine = /** @class */ (function (_super) {
898
981
  });
899
982
  });
900
983
  };
984
+ BaseCommandLine.prototype.pRelease = function () {
985
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
986
+ return tslib_1.__generator(this, function (_a) {
987
+ switch (_a.label) {
988
+ case 0: return [4 /*yield*/, this.pushRelease()];
989
+ case 1:
990
+ _a.sent();
991
+ return [2 /*return*/];
992
+ }
993
+ });
994
+ });
995
+ };
901
996
  BaseCommandLine.prototype.pushRelease = function () {
902
997
  return tslib_1.__awaiter(this, void 0, void 0, function () {
903
998
  return tslib_1.__generator(this, function (_a) {
@@ -918,6 +1013,97 @@ var BaseCommandLine = /** @class */ (function (_super) {
918
1013
  });
919
1014
  });
920
1015
  };
1016
+ BaseCommandLine.prototype.mPush = function () {
1017
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1018
+ return tslib_1.__generator(this, function (_a) {
1019
+ switch (_a.label) {
1020
+ case 0: return [4 /*yield*/, this.meltPush()];
1021
+ case 1:
1022
+ _a.sent();
1023
+ return [2 /*return*/];
1024
+ }
1025
+ });
1026
+ });
1027
+ };
1028
+ BaseCommandLine.prototype.fmPush = function () {
1029
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1030
+ return tslib_1.__generator(this, function (_a) {
1031
+ switch (_a.label) {
1032
+ case 0: return [4 /*yield*/, this.forceMeltPush()];
1033
+ case 1:
1034
+ _a.sent();
1035
+ return [2 /*return*/];
1036
+ }
1037
+ });
1038
+ });
1039
+ };
1040
+ BaseCommandLine.prototype.mfPush = function () {
1041
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1042
+ return tslib_1.__generator(this, function (_a) {
1043
+ switch (_a.label) {
1044
+ case 0: return [4 /*yield*/, this.forceMeltPush()];
1045
+ case 1:
1046
+ _a.sent();
1047
+ return [2 /*return*/];
1048
+ }
1049
+ });
1050
+ });
1051
+ };
1052
+ BaseCommandLine.prototype.mforcePush = function () {
1053
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1054
+ return tslib_1.__generator(this, function (_a) {
1055
+ switch (_a.label) {
1056
+ case 0: return [4 /*yield*/, this.forceMeltPush()];
1057
+ case 1:
1058
+ _a.sent();
1059
+ return [2 /*return*/];
1060
+ }
1061
+ });
1062
+ });
1063
+ };
1064
+ BaseCommandLine.prototype.meltforcePush = function () {
1065
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1066
+ return tslib_1.__generator(this, function (_a) {
1067
+ switch (_a.label) {
1068
+ case 0: return [4 /*yield*/, this.forceMeltPush()];
1069
+ case 1:
1070
+ _a.sent();
1071
+ return [2 /*return*/];
1072
+ }
1073
+ });
1074
+ });
1075
+ };
1076
+ BaseCommandLine.prototype.forceMeltPush = function () {
1077
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1078
+ return tslib_1.__generator(this, function (_a) {
1079
+ switch (_a.label) {
1080
+ case 0: return [4 /*yield*/, this.meltPush(true)];
1081
+ case 1:
1082
+ _a.sent();
1083
+ return [2 /*return*/];
1084
+ }
1085
+ });
1086
+ });
1087
+ };
1088
+ BaseCommandLine.prototype.meltPush = function () {
1089
+ return tslib_1.__awaiter(this, arguments, void 0, function (force) {
1090
+ if (force === void 0) { force = false; }
1091
+ return tslib_1.__generator(this, function (_a) {
1092
+ switch (_a.label) {
1093
+ case 0: return [4 /*yield*/, this.meltUpdateCommits()];
1094
+ case 1:
1095
+ _a.sent();
1096
+ return [4 /*yield*/, this.push({
1097
+ mergeUpdateCommits: true,
1098
+ force: force,
1099
+ })];
1100
+ case 2:
1101
+ _a.sent();
1102
+ return [2 /*return*/];
1103
+ }
1104
+ });
1105
+ });
1106
+ };
921
1107
  BaseCommandLine.prototype.pushFeature = function () {
922
1108
  return tslib_1.__awaiter(this, void 0, void 0, function () {
923
1109
  return tslib_1.__generator(this, function (_a) {
@@ -1122,6 +1308,30 @@ var BaseCommandLine = /** @class */ (function (_super) {
1122
1308
  });
1123
1309
  });
1124
1310
  };
1311
+ BaseCommandLine.prototype.pTest = function () {
1312
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1313
+ return tslib_1.__generator(this, function (_a) {
1314
+ switch (_a.label) {
1315
+ case 0: return [4 /*yield*/, this.pushTest()];
1316
+ case 1:
1317
+ _a.sent();
1318
+ return [2 /*return*/];
1319
+ }
1320
+ });
1321
+ });
1322
+ };
1323
+ BaseCommandLine.prototype.pTests = function () {
1324
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1325
+ return tslib_1.__generator(this, function (_a) {
1326
+ switch (_a.label) {
1327
+ case 0: return [4 /*yield*/, this.pushTest()];
1328
+ case 1:
1329
+ _a.sent();
1330
+ return [2 /*return*/];
1331
+ }
1332
+ });
1333
+ });
1334
+ };
1125
1335
  //#endregion
1126
1336
  //#region commands / push perf
1127
1337
  BaseCommandLine.prototype.pushPerf = function () {
@@ -1160,6 +1370,39 @@ var BaseCommandLine = /** @class */ (function (_super) {
1160
1370
  });
1161
1371
  };
1162
1372
  //#endregion
1373
+ //#region commands / select branch
1374
+ BaseCommandLine.prototype.branch = function () {
1375
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1376
+ var branchName, branches;
1377
+ return tslib_1.__generator(this, function (_a) {
1378
+ switch (_a.label) {
1379
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1380
+ case 1:
1381
+ if (!(_a.sent())) {
1382
+ return [2 /*return*/];
1383
+ }
1384
+ return [4 /*yield*/, this.project.struct()];
1385
+ case 2:
1386
+ _a.sent();
1387
+ branchName = this.firstArg;
1388
+ branches = this.__filterBranchesByPattern(branchName);
1389
+ if (!(branches.length > 0)) return [3 /*break*/, 4];
1390
+ return [4 /*yield*/, this.__selectBrach(branches, 'checkout')];
1391
+ case 3:
1392
+ branchName = _a.sent();
1393
+ return [3 /*break*/, 5];
1394
+ case 4:
1395
+ index_1.Helpers.error("No branch found by name \"".concat(branchName, "\""), false, true);
1396
+ _a.label = 5;
1397
+ case 5:
1398
+ this.project.git.checkout(branchName);
1399
+ this._exit();
1400
+ return [2 /*return*/];
1401
+ }
1402
+ });
1403
+ });
1404
+ };
1405
+ //#endregion
1163
1406
  //#region commands / push build
1164
1407
  BaseCommandLine.prototype.pushBuild = function () {
1165
1408
  return tslib_1.__awaiter(this, void 0, void 0, function () {
@@ -1183,7 +1426,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1183
1426
  var newOriginNameOrUrl, proj;
1184
1427
  return tslib_1.__generator(this, function (_a) {
1185
1428
  switch (_a.label) {
1186
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1429
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1187
1430
  case 1:
1188
1431
  if (!(_a.sent())) {
1189
1432
  return [2 /*return*/];
@@ -1211,7 +1454,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1211
1454
  var newOriginNameOrUrl, proj;
1212
1455
  return tslib_1.__generator(this, function (_a) {
1213
1456
  switch (_a.label) {
1214
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1457
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1215
1458
  case 1:
1216
1459
  if (!(_a.sent())) {
1217
1460
  return [2 /*return*/];
@@ -1236,7 +1479,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1236
1479
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1237
1480
  return tslib_1.__generator(this, function (_a) {
1238
1481
  switch (_a.label) {
1239
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1482
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1240
1483
  case 1:
1241
1484
  if (!(_a.sent())) {
1242
1485
  return [2 /*return*/];
@@ -1255,7 +1498,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1255
1498
  var proj;
1256
1499
  return tslib_1.__generator(this, function (_a) {
1257
1500
  switch (_a.label) {
1258
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1501
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1259
1502
  case 1:
1260
1503
  if (!(_a.sent())) {
1261
1504
  return [2 /*return*/];
@@ -1283,7 +1526,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1283
1526
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1284
1527
  return tslib_1.__generator(this, function (_a) {
1285
1528
  switch (_a.label) {
1286
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1529
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1287
1530
  case 1:
1288
1531
  if (!(_a.sent())) {
1289
1532
  return [2 /*return*/];
@@ -1305,7 +1548,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1305
1548
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1306
1549
  return tslib_1.__generator(this, function (_a) {
1307
1550
  switch (_a.label) {
1308
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1551
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: false })];
1309
1552
  case 1:
1310
1553
  if (!(_a.sent())) {
1311
1554
  return [2 /*return*/];
@@ -1326,7 +1569,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1326
1569
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1327
1570
  return tslib_1.__generator(this, function (_a) {
1328
1571
  switch (_a.label) {
1329
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1572
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: false })];
1330
1573
  case 1:
1331
1574
  if (!(_a.sent())) {
1332
1575
  return [2 /*return*/];
@@ -1349,7 +1592,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1349
1592
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1350
1593
  return tslib_1.__generator(this, function (_a) {
1351
1594
  switch (_a.label) {
1352
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1595
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: false })];
1353
1596
  case 1:
1354
1597
  if (!(_a.sent())) {
1355
1598
  return [2 /*return*/];
@@ -1372,7 +1615,9 @@ var BaseCommandLine = /** @class */ (function (_super) {
1372
1615
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1373
1616
  return tslib_1.__generator(this, function (_a) {
1374
1617
  switch (_a.label) {
1375
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1618
+ case 0: return [4 /*yield*/, this.cwdIsProject({
1619
+ requireProjectWithGitRoot: false,
1620
+ })];
1376
1621
  case 1:
1377
1622
  if (!(_a.sent())) {
1378
1623
  return [2 /*return*/];
@@ -1397,7 +1642,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1397
1642
  var proj, libs;
1398
1643
  return tslib_1.__generator(this, function (_a) {
1399
1644
  switch (_a.label) {
1400
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1645
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: true })];
1401
1646
  case 1:
1402
1647
  if (!(_a.sent())) {
1403
1648
  return [2 /*return*/];
@@ -1454,6 +1699,54 @@ var BaseCommandLine = /** @class */ (function (_super) {
1454
1699
  });
1455
1700
  };
1456
1701
  //#endregion
1702
+ //#region commands / changes
1703
+ BaseCommandLine.prototype.changes = function () {
1704
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
1705
+ var _a, _b, _c, _d, chil, _e, _f, e_3_1;
1706
+ var e_3, _g;
1707
+ return tslib_1.__generator(this, function (_h) {
1708
+ switch (_h.label) {
1709
+ case 0:
1710
+ _b = (_a = index_1.Helpers).info;
1711
+ return [4 /*yield*/, this.project.git.changesSummary()];
1712
+ case 1:
1713
+ _b.apply(_a, [_h.sent()]);
1714
+ index_1.Helpers.terminalLine();
1715
+ _h.label = 2;
1716
+ case 2:
1717
+ _h.trys.push([2, 7, 8, 9]);
1718
+ _c = tslib_1.__values(this.project.children), _d = _c.next();
1719
+ _h.label = 3;
1720
+ case 3:
1721
+ if (!!_d.done) return [3 /*break*/, 6];
1722
+ chil = _d.value;
1723
+ _f = (_e = index_1.Helpers).info;
1724
+ return [4 /*yield*/, chil.git.changesSummary()];
1725
+ case 4:
1726
+ _f.apply(_e, [_h.sent()]);
1727
+ _h.label = 5;
1728
+ case 5:
1729
+ _d = _c.next();
1730
+ return [3 /*break*/, 3];
1731
+ case 6: return [3 /*break*/, 9];
1732
+ case 7:
1733
+ e_3_1 = _h.sent();
1734
+ e_3 = { error: e_3_1 };
1735
+ return [3 /*break*/, 9];
1736
+ case 8:
1737
+ try {
1738
+ if (_d && !_d.done && (_g = _c.return)) _g.call(_c);
1739
+ }
1740
+ finally { if (e_3) throw e_3.error; }
1741
+ return [7 /*endfinally*/];
1742
+ case 9:
1743
+ this._exit();
1744
+ return [2 /*return*/];
1745
+ }
1746
+ });
1747
+ });
1748
+ };
1749
+ //#endregion
1457
1750
  //#region commands / branch name
1458
1751
  BaseCommandLine.prototype.BRANCH_NAME = function () {
1459
1752
  console.log("current branch name: \"".concat(index_1.Helpers.git.currentBranchName(process.cwd()), "\""));
@@ -1503,7 +1796,23 @@ var BaseCommandLine = /** @class */ (function (_super) {
1503
1796
  });
1504
1797
  });
1505
1798
  };
1799
+ BaseCommandLine.prototype._resolveChildFromArg = function () {
1800
+ var _this = this;
1801
+ var _a = index_1.Helpers.cliTool.resolveItemFromArgsBegin(this.args, function (arg) {
1802
+ return _this.ins.From([_this.cwd, arg]);
1803
+ }), projFromArg = _a.resolved, clearedCommand = _a.clearedCommand;
1804
+ if (!!projFromArg) {
1805
+ this.args = clearedCommand.split(' ');
1806
+ this.cwd = projFromArg.location;
1807
+ this.project = projFromArg;
1808
+ }
1809
+ };
1506
1810
  BaseCommandLine.prototype.origin = function () {
1811
+ this._resolveChildFromArg();
1812
+ console.log(index_1.Helpers.git.getOriginURL(this.cwd));
1813
+ this._exit();
1814
+ };
1815
+ BaseCommandLine.prototype.remote = function () {
1507
1816
  console.log(index_1.Helpers.git.getOriginURL(this.cwd));
1508
1817
  this._exit();
1509
1818
  };
@@ -1652,7 +1961,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1652
1961
  var p, extensions, menuItems, extensionsToInstall, index, extname;
1653
1962
  return tslib_1.__generator(this, function (_a) {
1654
1963
  switch (_a.label) {
1655
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
1964
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: false })];
1656
1965
  case 1:
1657
1966
  if (!(_a.sent())) {
1658
1967
  return [2 /*return*/];
@@ -1704,7 +2013,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1704
2013
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1705
2014
  return tslib_1.__generator(this, function (_a) {
1706
2015
  switch (_a.label) {
1707
- case 0: return [4 /*yield*/, this.preventCwdIsNotProject()];
2016
+ case 0: return [4 /*yield*/, this.cwdIsProject({ requireProjectWithGitRoot: false })];
1708
2017
  case 1:
1709
2018
  if (!(_a.sent())) {
1710
2019
  return [2 /*return*/];
@@ -1727,7 +2036,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1727
2036
  };
1728
2037
  //#endregion
1729
2038
  //#region select branch from list of branches
1730
- BaseCommandLine.prototype.__selectBrach = function (branches) {
2039
+ BaseCommandLine.prototype.__selectBrach = function (branches, task) {
1731
2040
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1732
2041
  var childrenMsg;
1733
2042
  return tslib_1.__generator(this, function (_a) {
@@ -1736,7 +2045,7 @@ var BaseCommandLine = /** @class */ (function (_super) {
1736
2045
  childrenMsg = this.project.children.length == 0
1737
2046
  ? '(no children in project)'
1738
2047
  : '(with children)';
1739
- return [4 /*yield*/, index_1.Helpers.autocompleteAsk("Choose branch to reset in this project ".concat(childrenMsg, ": "), branches.map(function (b) {
2048
+ return [4 /*yield*/, index_1.Helpers.autocompleteAsk("Choose branch to ".concat(task, " in this project ").concat(childrenMsg, ": "), branches.map(function (b) {
1740
2049
  return { name: b, value: b };
1741
2050
  }))];
1742
2051
  case 1: return [2 /*return*/, _a.sent()];
@@ -1744,6 +2053,59 @@ var BaseCommandLine = /** @class */ (function (_super) {
1744
2053
  });
1745
2054
  });
1746
2055
  };
2056
+ //#endregion
2057
+ //#region commands / clone
2058
+ BaseCommandLine.prototype.clone = function () {
2059
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
2060
+ var url, originType;
2061
+ return tslib_1.__generator(this, function (_a) {
2062
+ url = this.firstArg;
2063
+ originType = this.params['setOrigin'];
2064
+ if (originType) {
2065
+ if (originType === 'ssh') {
2066
+ url = index_1.Helpers.git.originHttpToSsh(url);
2067
+ }
2068
+ if (originType === 'http') {
2069
+ url = index_1.Helpers.git.originSshToHttp(url);
2070
+ }
2071
+ }
2072
+ index_1.Helpers.git.clone({
2073
+ url: url,
2074
+ cwd: this.cwd,
2075
+ });
2076
+ this._exit();
2077
+ return [2 /*return*/];
2078
+ });
2079
+ });
2080
+ };
2081
+ //#endregion
2082
+ //#region commands / ghtemp
2083
+ BaseCommandLine.prototype.ghSave = function () {
2084
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
2085
+ return tslib_1.__generator(this, function (_a) {
2086
+ switch (_a.label) {
2087
+ case 0: return [4 /*yield*/, new gh_temp_code_1.GhTempCode(this.cwd, this.project).init().save()];
2088
+ case 1:
2089
+ _a.sent();
2090
+ this._exit();
2091
+ return [2 /*return*/];
2092
+ }
2093
+ });
2094
+ });
2095
+ };
2096
+ BaseCommandLine.prototype.ghRestore = function () {
2097
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
2098
+ return tslib_1.__generator(this, function (_a) {
2099
+ switch (_a.label) {
2100
+ case 0: return [4 /*yield*/, new gh_temp_code_1.GhTempCode(this.cwd, this.project).init().restore()];
2101
+ case 1:
2102
+ _a.sent();
2103
+ this._exit();
2104
+ return [2 /*return*/];
2105
+ }
2106
+ });
2107
+ });
2108
+ };
1747
2109
  return BaseCommandLine;
1748
2110
  }(command_line_feature_backend_1.CommandLineFeature));
1749
2111
  exports.BaseCommandLine = BaseCommandLine;