tnp-helpers 13.1.6 → 13.1.8

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 (158) hide show
  1. package/app.js +3 -3
  2. package/browser/esm2020/lib/base-component.mjs +3 -1
  3. package/browser/esm2020/lib/base-formly-component.mjs +3 -16
  4. package/browser/esm2020/lib/condition-wait.mjs +3 -11
  5. package/browser/esm2020/lib/constants.mjs +2 -1
  6. package/browser/esm2020/lib/dual-component-ctrl.mjs +3 -5
  7. package/browser/esm2020/lib/helpers-array-obj.mjs +3 -1
  8. package/browser/esm2020/lib/helpers-environment.mjs +3 -1
  9. package/browser/esm2020/lib/helpers-numbers.mjs +3 -1
  10. package/browser/esm2020/lib/helpers-strings-regexes.mjs +3 -1
  11. package/browser/esm2020/lib/helpers-strings.mjs +3 -8
  12. package/browser/esm2020/lib/helpers.mjs +3 -1
  13. package/browser/esm2020/lib/index.mjs +3 -4
  14. package/browser/esm2020/lib/long-press.directive.mjs +4 -3
  15. package/browser/esm2020/lib/project.mjs +3 -1
  16. package/browser/esm2020/lib/resize-service.mjs +3 -1
  17. package/browser/fesm2015/tnp-helpers.mjs +30 -40
  18. package/browser/fesm2020/tnp-helpers.mjs +30 -40
  19. package/browser/lib/base-component.d.ts +2 -1
  20. package/browser/lib/base-formly-component.d.ts +2 -1
  21. package/browser/lib/condition-wait.d.ts +2 -1
  22. package/browser/lib/constants.d.ts +2 -1
  23. package/browser/lib/dual-component-ctrl.d.ts +2 -1
  24. package/browser/lib/helpers-array-obj.d.ts +2 -1
  25. package/browser/lib/helpers-environment.d.ts +2 -1
  26. package/browser/lib/helpers-numbers.d.ts +2 -1
  27. package/browser/lib/helpers-strings-regexes.d.ts +2 -1
  28. package/browser/lib/helpers-strings.d.ts +2 -1
  29. package/browser/lib/helpers.d.ts +2 -1
  30. package/browser/lib/index.d.ts +1 -0
  31. package/browser/lib/long-press.directive.d.ts +2 -1
  32. package/browser/lib/project.d.ts +2 -1
  33. package/browser/lib/resize-service.d.ts +2 -1
  34. package/browser/public-api.d.ts +2 -1
  35. package/browser/tnp-helpers.d.ts +2 -1
  36. package/client/esm2020/lib/base-component.mjs +3 -1
  37. package/client/esm2020/lib/base-formly-component.mjs +3 -16
  38. package/client/esm2020/lib/condition-wait.mjs +3 -11
  39. package/client/esm2020/lib/constants.mjs +2 -1
  40. package/client/esm2020/lib/dual-component-ctrl.mjs +3 -5
  41. package/client/esm2020/lib/helpers-array-obj.mjs +3 -1
  42. package/client/esm2020/lib/helpers-environment.mjs +3 -1
  43. package/client/esm2020/lib/helpers-numbers.mjs +3 -1
  44. package/client/esm2020/lib/helpers-strings-regexes.mjs +3 -1
  45. package/client/esm2020/lib/helpers-strings.mjs +3 -8
  46. package/client/esm2020/lib/helpers.mjs +3 -1
  47. package/client/esm2020/lib/index.mjs +3 -4
  48. package/client/esm2020/lib/long-press.directive.mjs +4 -3
  49. package/client/esm2020/lib/project.mjs +3 -1
  50. package/client/esm2020/lib/resize-service.mjs +3 -1
  51. package/client/fesm2015/tnp-helpers.mjs +30 -40
  52. package/client/fesm2020/tnp-helpers.mjs +30 -40
  53. package/client/lib/base-component.d.ts +2 -1
  54. package/client/lib/base-formly-component.d.ts +2 -1
  55. package/client/lib/condition-wait.d.ts +2 -1
  56. package/client/lib/constants.d.ts +2 -1
  57. package/client/lib/dual-component-ctrl.d.ts +2 -1
  58. package/client/lib/helpers-array-obj.d.ts +2 -1
  59. package/client/lib/helpers-environment.d.ts +2 -1
  60. package/client/lib/helpers-numbers.d.ts +2 -1
  61. package/client/lib/helpers-strings-regexes.d.ts +2 -1
  62. package/client/lib/helpers-strings.d.ts +2 -1
  63. package/client/lib/helpers.d.ts +2 -1
  64. package/client/lib/index.d.ts +1 -0
  65. package/client/lib/long-press.directive.d.ts +2 -1
  66. package/client/lib/project.d.ts +2 -1
  67. package/client/lib/resize-service.d.ts +2 -1
  68. package/client/public-api.d.ts +2 -1
  69. package/client/tnp-helpers.d.ts +2 -1
  70. package/lib/base-component.js +3 -3
  71. package/lib/base-formly-component.js +3 -3
  72. package/lib/dual-component-ctrl.js +3 -3
  73. package/lib/git-project.d.ts +1 -0
  74. package/lib/git-project.js +3 -0
  75. package/lib/helpers-file-folders.backend.js +15 -13
  76. package/lib/helpers-git.backend.d.ts +7 -0
  77. package/lib/helpers-git.backend.js +76 -49
  78. package/lib/helpers-process.backend.js +1 -1
  79. package/lib/helpers.js +1 -1
  80. package/lib/long-press.directive.js +1 -1
  81. package/lib/merge-helpers.backend.js +1 -1
  82. package/lib/project.js +9 -9
  83. package/package.json +5 -5
  84. package/tmp-environment.json +163 -161
  85. package/websql/esm2020/lib/base-component.mjs +3 -1
  86. package/websql/esm2020/lib/base-formly-component.mjs +3 -16
  87. package/websql/esm2020/lib/condition-wait.mjs +3 -11
  88. package/websql/esm2020/lib/constants.mjs +2 -1
  89. package/websql/esm2020/lib/dual-component-ctrl.mjs +3 -5
  90. package/websql/esm2020/lib/helpers-array-obj.mjs +3 -1
  91. package/websql/esm2020/lib/helpers-environment.mjs +3 -1
  92. package/websql/esm2020/lib/helpers-numbers.mjs +3 -1
  93. package/websql/esm2020/lib/helpers-strings-regexes.mjs +3 -1
  94. package/websql/esm2020/lib/helpers-strings.mjs +3 -8
  95. package/websql/esm2020/lib/helpers.mjs +3 -1
  96. package/websql/esm2020/lib/index.mjs +3 -4
  97. package/websql/esm2020/lib/long-press.directive.mjs +4 -3
  98. package/websql/esm2020/lib/project.mjs +3 -1
  99. package/websql/esm2020/lib/resize-service.mjs +3 -1
  100. package/websql/fesm2015/tnp-helpers.mjs +30 -40
  101. package/websql/fesm2020/tnp-helpers.mjs +30 -40
  102. package/websql/lib/base-component.d.ts +2 -1
  103. package/websql/lib/base-formly-component.d.ts +2 -1
  104. package/websql/lib/condition-wait.d.ts +2 -1
  105. package/websql/lib/constants.d.ts +2 -1
  106. package/websql/lib/dual-component-ctrl.d.ts +2 -1
  107. package/websql/lib/helpers-array-obj.d.ts +2 -1
  108. package/websql/lib/helpers-environment.d.ts +2 -1
  109. package/websql/lib/helpers-numbers.d.ts +2 -1
  110. package/websql/lib/helpers-strings-regexes.d.ts +2 -1
  111. package/websql/lib/helpers-strings.d.ts +2 -1
  112. package/websql/lib/helpers.d.ts +2 -1
  113. package/websql/lib/index.d.ts +1 -0
  114. package/websql/lib/long-press.directive.d.ts +2 -1
  115. package/websql/lib/project.d.ts +2 -1
  116. package/websql/lib/resize-service.d.ts +2 -1
  117. package/websql/public-api.d.ts +2 -1
  118. package/websql/tnp-helpers.d.ts +2 -1
  119. package/app.js.map +0 -1
  120. package/browser/fesm2015/tnp-helpers.mjs.map +0 -1
  121. package/browser/fesm2020/tnp-helpers.mjs.map +0 -1
  122. package/client/fesm2015/tnp-helpers.mjs.map +0 -1
  123. package/client/fesm2020/tnp-helpers.mjs.map +0 -1
  124. package/index.js.map +0 -1
  125. package/lib/angular.helper.js.map +0 -1
  126. package/lib/base-component.js.map +0 -1
  127. package/lib/base-formly-component.js.map +0 -1
  128. package/lib/condition-wait.js.map +0 -1
  129. package/lib/constants.js.map +0 -1
  130. package/lib/dual-component-ctrl.js.map +0 -1
  131. package/lib/git-project.js.map +0 -1
  132. package/lib/helpers-array-obj.js.map +0 -1
  133. package/lib/helpers-cli-tool.backend.js.map +0 -1
  134. package/lib/helpers-dependencies.backend.js.map +0 -1
  135. package/lib/helpers-environment.js.map +0 -1
  136. package/lib/helpers-file-folders.backend.js.map +0 -1
  137. package/lib/helpers-git.backend.js.map +0 -1
  138. package/lib/helpers-json5.backend.js.map +0 -1
  139. package/lib/helpers-morphi-framework.backend.js.map +0 -1
  140. package/lib/helpers-network.backend.js.map +0 -1
  141. package/lib/helpers-npm.backend.js.map +0 -1
  142. package/lib/helpers-numbers.js.map +0 -1
  143. package/lib/helpers-path.backend.js.map +0 -1
  144. package/lib/helpers-process.backend.js.map +0 -1
  145. package/lib/helpers-strings-regexes.js.map +0 -1
  146. package/lib/helpers-strings.js.map +0 -1
  147. package/lib/helpers-system-terminal.backend.js.map +0 -1
  148. package/lib/helpers.js.map +0 -1
  149. package/lib/index.js.map +0 -1
  150. package/lib/long-press.directive.js.map +0 -1
  151. package/lib/merge-helpers.backend.js.map +0 -1
  152. package/lib/project.js.map +0 -1
  153. package/lib/resize-service.js.map +0 -1
  154. package/lib/ts-code/index.js.map +0 -1
  155. package/lib/ts-code/ts-code-extractor.js.map +0 -1
  156. package/lib/ts-code/ts-code-modifier.backend.js.map +0 -1
  157. package/websql/fesm2015/tnp-helpers.mjs.map +0 -1
  158. package/websql/fesm2020/tnp-helpers.mjs.map +0 -1
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class ResizeService {
3
4
  private resizeDetector;
@@ -6,4 +7,4 @@ export declare class ResizeService {
6
7
  removeResizeEventListener(element: HTMLElement): void;
7
8
  static ɵfac: i0.ɵɵFactoryDeclaration<ResizeService, never>;
8
9
  static ɵprov: i0.ɵɵInjectableDeclaration<ResizeService>;
9
- }
10
+ }
@@ -1 +1,2 @@
1
- export * from './lib';
1
+ // @ts-nocheck
2
+ export * from './lib';
@@ -1,5 +1,6 @@
1
+ // @ts-nocheck
1
2
  /**
2
3
  * Generated bundle index. Do not edit.
3
4
  */
4
5
  /// <amd-module name="tnp-helpers" />
5
- export * from './public-api';
6
+ export * from './public-api';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1670193921798 = void 0;
4
- function dummy1670193921798() { }
5
- exports.dummy1670193921798 = dummy1670193921798;
3
+ exports.dummy1672280309017 = void 0;
4
+ function dummy1672280309017() { }
5
+ exports.dummy1672280309017 = dummy1672280309017;
6
6
  //# sourceMappingURL=base-component.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1670193921803 = void 0;
4
- function dummy1670193921803() { }
5
- exports.dummy1670193921803 = dummy1670193921803;
3
+ exports.dummy1672280309022 = void 0;
4
+ function dummy1672280309022() { }
5
+ exports.dummy1672280309022 = dummy1672280309022;
6
6
  //# sourceMappingURL=base-formly-component.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1670193921813 = void 0;
4
- function dummy1670193921813() { }
5
- exports.dummy1670193921813 = dummy1670193921813;
3
+ exports.dummy1672280309033 = void 0;
4
+ function dummy1672280309033() { }
5
+ exports.dummy1672280309033 = dummy1672280309033;
6
6
  //# sourceMappingURL=dual-component-ctrl.js.map
@@ -30,6 +30,7 @@ export declare abstract class ProjectGit {
30
30
  resetHard(): void;
31
31
  countComits(): number;
32
32
  hasAnyCommits(): boolean;
33
+ readonly isInMergeProcess: boolean;
33
34
  lastCommitDate(): Date;
34
35
  lastCommitHash(): string;
35
36
  lastCommitMessage(): string;
@@ -139,6 +139,9 @@ var ProjectGit = /** @class */ (function () {
139
139
  hasAnyCommits: function () {
140
140
  return Helpers.git.hasAnyCommits(self.location);
141
141
  },
142
+ get isInMergeProcess() {
143
+ return Helpers.git.isInMergeProcess(self.location);
144
+ },
142
145
  lastCommitDate: function () {
143
146
  // console.log('LATS CMD ADDET')
144
147
  return Helpers.git.lastCommitDate(self.location);
@@ -8,7 +8,6 @@ var glob = require("glob");
8
8
  var crypto = require("crypto");
9
9
  var index_1 = require("./index");
10
10
  var tnp_config_1 = require("tnp-config");
11
- var trace = !global.hideLog;
12
11
  var HelpersFileFolders = /** @class */ (function () {
13
12
  function HelpersFileFolders() {
14
13
  }
@@ -201,7 +200,7 @@ var HelpersFileFolders = /** @class */ (function () {
201
200
  destination = (0, tnp_core_1.crossPlatformPath)(destination);
202
201
  source = (0, tnp_core_1.crossPlatformPath)(source);
203
202
  if (source === destination) {
204
- index_1.Helpers.warn('[tnp-helpers] Probably error... trying to copy the same folder...');
203
+ index_1.Helpers.warn('[firedev-helpers] Probably error... trying to copy the same folder...');
205
204
  return;
206
205
  }
207
206
  if (tnp_core_1.fse.existsSync(source) && !tnp_core_1.fse.lstatSync(source).isDirectory()) {
@@ -292,10 +291,10 @@ var HelpersFileFolders = /** @class */ (function () {
292
291
  HelpersFileFolders.prototype.tryRemoveDir = function (dirpath, contentOnly) {
293
292
  if (contentOnly === void 0) { contentOnly = false; }
294
293
  if (!tnp_core_1.fse.existsSync(dirpath)) {
295
- index_1.Helpers.warn("Folder ".concat(tnp_core_1.path.basename(dirpath), " doesn't exist."));
294
+ index_1.Helpers.warn("[firedev-helper][tryRemoveDir] Folder ".concat(tnp_core_1.path.basename(dirpath), " doesn't exist."));
296
295
  return;
297
296
  }
298
- index_1.Helpers.log("[tnp-helpers][tryRemoveDir]: ".concat(dirpath));
297
+ index_1.Helpers.log("[firedev-helpers][tryRemoveDir]: ".concat(dirpath));
299
298
  try {
300
299
  if (contentOnly) {
301
300
  tnp_core_1.rimraf.sync("".concat(dirpath, "/*"));
@@ -334,7 +333,7 @@ var HelpersFileFolders = /** @class */ (function () {
334
333
  if (Array.isArray(fileOrFolderPathOrPatter)) {
335
334
  fileOrFolderPathOrPatter = tnp_core_1.path.join.apply(tnp_core_1.path, tslib_1.__spreadArray([], tslib_1.__read(fileOrFolderPathOrPatter), false));
336
335
  }
337
- index_1.Helpers.log("[tnp-helpers][remove]: ".concat(fileOrFolderPathOrPatter), 1);
336
+ index_1.Helpers.log("[firedev-helpers][remove]: ".concat(fileOrFolderPathOrPatter), 1);
338
337
  if (exactFolder) {
339
338
  tnp_core_1.rimraf.sync(fileOrFolderPathOrPatter, { glob: false, disableGlob: true, });
340
339
  return;
@@ -499,10 +498,13 @@ var HelpersFileFolders = /** @class */ (function () {
499
498
  // sourceDir = sourceDir ? (sourceDir.replace(/\/$/, '')) : sourceDir;
500
499
  // destinationDir = destinationDir ? (destinationDir.replace(/\/$/, '')) : destinationDir;
501
500
  if (!tnp_core_1.fse.existsSync(sourceDir)) {
502
- index_1.Helpers.warn("[tnp-helper][copy] Source dir doesnt exist: ".concat(sourceDir, " for destination: ").concat(destinationDir), trace);
501
+ index_1.Helpers.warn("[tnp-helper][copy] Source dir doesnt exist: ".concat(sourceDir, " for destination: ").concat(destinationDir));
503
502
  return;
504
503
  }
505
504
  if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(destinationDir))) {
505
+ if (index_1.Helpers.isUnexistedLink(tnp_core_1.path.dirname(destinationDir))) {
506
+ index_1.Helpers.removeFileIfExists(tnp_core_1.path.dirname(destinationDir));
507
+ }
506
508
  index_1.Helpers.mkdirp(tnp_core_1.path.dirname(destinationDir));
507
509
  }
508
510
  if (!options) {
@@ -561,7 +563,7 @@ var HelpersFileFolders = /** @class */ (function () {
561
563
  if ((sourceDir === tnp_core_1.path.resolve(sourceDir))
562
564
  && index_1.Helpers.isExistedSymlink(sourceDir)
563
565
  && !index_1.Helpers.exists(tnp_core_1.fse.readlinkSync(sourceDir))) {
564
- index_1.Helpers.warn("[tnp-helpers] Not copying empty link from: ".concat(sourceDir, "\n "));
566
+ index_1.Helpers.warn("[firedev-helpers] Not copying empty link from: ".concat(sourceDir, "\n "));
565
567
  }
566
568
  else {
567
569
  var copyFn_1 = function () {
@@ -617,7 +619,7 @@ var HelpersFileFolders = /** @class */ (function () {
617
619
  catch (error) {
618
620
  var exitOnError = global['tnpNonInteractive'];
619
621
  index_1.Helpers.log(error);
620
- index_1.Helpers.error("[tnp-helper] Not able to copy folder:\n from: ".concat(sourceDir, "\n to: ").concat(destinationDir, "\n options: ").concat(tnp_core_1.json5.stringify(options), "\n error: ").concat(error === null || error === void 0 ? void 0 : error.message, "\n "), !exitOnError, !trace);
622
+ index_1.Helpers.error("[tnp-helper] Not able to copy folder:\n from: ".concat(sourceDir, "\n to: ").concat(destinationDir, "\n options: ").concat(tnp_core_1.json5.stringify(options), "\n error: ").concat(error === null || error === void 0 ? void 0 : error.message, "\n "), !exitOnError);
621
623
  index_1.Helpers.pressKeyAndContinue("Press any key to repeat copy action...");
622
624
  copyFn_1();
623
625
  }
@@ -677,18 +679,18 @@ var HelpersFileFolders = /** @class */ (function () {
677
679
  }
678
680
  var debugMode = options.debugMode, fast = options.fast, transformTextFn = options.transformTextFn, dontCopySameContent = options.dontCopySameContent, modifiedFiles = options.modifiedFiles;
679
681
  if (tnp_core_1._.isFunction(transformTextFn) && fast) {
680
- index_1.Helpers.error("[copyFile] You cannot use transformTextFn in fast mode");
682
+ index_1.Helpers.error("[firedev-helpers][copyFile] You cannot use transformTextFn in fast mode");
681
683
  }
682
684
  if (!tnp_core_1.fse.existsSync(sourcePath)) {
683
- index_1.Helpers.warn("[copyFile] No able to find source of ".concat(sourcePath));
685
+ index_1.Helpers.warn("[firedev-helpers][copyFile] No able to find source of ".concat(sourcePath));
684
686
  return false;
685
687
  }
686
688
  if (tnp_core_1.fse.lstatSync(sourcePath).isDirectory()) {
687
- index_1.Helpers.warn("[copyFile] Trying to copy directory as file: ".concat(sourcePath), false);
689
+ index_1.Helpers.warn("[firedev-helpers][copyFile] Trying to copy directory as file: ".concat(sourcePath), false);
688
690
  return false;
689
691
  }
690
692
  if (sourcePath === destinationPath) {
691
- index_1.Helpers.warn("[copyFile] Trying to copy same file ".concat(sourcePath));
693
+ index_1.Helpers.warn("[firedev-helpers][copyFile] Trying to copy same file ".concat(sourcePath));
692
694
  return false;
693
695
  }
694
696
  var destDirPath = tnp_core_1.path.dirname(destinationPath);
@@ -726,7 +728,7 @@ var HelpersFileFolders = /** @class */ (function () {
726
728
  if (tnp_core_1._.isFunction(transformTextFn)) {
727
729
  sourceData = transformTextFn(sourceData);
728
730
  }
729
- debugMode && index_1.Helpers.log("\n[copyFile] Write to: ".concat(destinationPath, " file:\n============================================================================================\n").concat(sourceData, "\n============================================================================================\n "));
731
+ debugMode && index_1.Helpers.log("\n [firedev-helpers][copyFile] Write to: ".concat(destinationPath, " file:\n============================================================================================\n").concat(sourceData, "\n============================================================================================\n "));
730
732
  index_1.Helpers.writeFile(destinationPath, sourceData);
731
733
  }
732
734
  if (modifiedFiles && tnp_core_1._.isArray(modifiedFiles.modifiedFiles)) {
@@ -9,10 +9,17 @@ export declare class HelpersGit {
9
9
  lastCommitMessage(cwd: any): string;
10
10
  countCommits(cwd: string): number;
11
11
  hasAnyCommits(cwd: string): boolean;
12
+ isInMergeProcess(cwd: string): boolean;
12
13
  getBranchesNames(cwd: string, pattern?: string | RegExp): string[];
13
14
  currentBranchName(cwd: any): string;
14
15
  commitWhatIs(cwd: string, customMessage?: string): void;
15
16
  commit(cwd: string, ProjectClass: typeof Project, args?: string): void;
17
+ /**
18
+ * example: https://github.com/darekf77/tnp-helpers.git
19
+ *
20
+ * Note: address ends with .git always
21
+ *
22
+ */
16
23
  getOriginURL(cwd: string, differentOriginName?: string): string;
17
24
  isGitRoot(cwd: string): boolean;
18
25
  isGitRepo(cwd: string): boolean;
@@ -13,14 +13,14 @@ var HelpersGit = /** @class */ (function () {
13
13
  }
14
14
  //#region get last commit hash
15
15
  HelpersGit.prototype.lastCommitHash = function (cwd) {
16
- index_1.Helpers.log('[lastcommithash] ' + cwd, 1);
16
+ index_1.Helpers.log('[firedev-helpers][lastcommithash] ' + cwd, 1);
17
17
  try {
18
18
  var hash = this.isGitRepo(cwd) && tnp_core_1.child_process.execSync("git log -1 --format=\"%H\"", { cwd: cwd }).toString().trim();
19
19
  return hash;
20
20
  }
21
21
  catch (e) {
22
22
  index_1.Helpers.log(e, 1);
23
- index_1.Helpers.log("[lastCommitHash] Not able to get last commit hash for repository in ".concat(cwd), 1);
23
+ index_1.Helpers.log("[firedev-helpers][lastCommitHash] Not able to get last commit hash for repository in ".concat(cwd), 1);
24
24
  return null;
25
25
  }
26
26
  };
@@ -74,7 +74,7 @@ var HelpersGit = /** @class */ (function () {
74
74
  };
75
75
  //#region get last tag hash
76
76
  HelpersGit.prototype.lastTagHash = function (cwd) {
77
- index_1.Helpers.log('[lastTagHash] ' + cwd, 1);
77
+ index_1.Helpers.log('[firedev-helpers][lastTagHash] ' + cwd, 1);
78
78
  try {
79
79
  var tag = index_1.Helpers.git.lastTagVersionName(cwd);
80
80
  if (!tag) {
@@ -85,14 +85,14 @@ var HelpersGit = /** @class */ (function () {
85
85
  }
86
86
  catch (e) {
87
87
  index_1.Helpers.log(e, 1);
88
- index_1.Helpers.log("[lastCommitHash] Not able to get last commit hash for repository in ".concat(cwd), 1);
88
+ index_1.Helpers.log("[firedev-helpers][lastCommitHash] Not able to get last commit hash for repository in ".concat(cwd), 1);
89
89
  return null;
90
90
  }
91
91
  };
92
92
  //#endregion
93
93
  //#region get last commit date
94
94
  HelpersGit.prototype.lastCommitDate = function (cwd) {
95
- index_1.Helpers.log('[lastCommitDate] ' + cwd, 1);
95
+ index_1.Helpers.log('[firedev-helpers][lastCommitDate] ' + cwd, 1);
96
96
  try {
97
97
  var unixTimestamp = this.isGitRepo(cwd)
98
98
  && tnp_core_1.child_process
@@ -103,33 +103,33 @@ var HelpersGit = /** @class */ (function () {
103
103
  }
104
104
  catch (e) {
105
105
  index_1.Helpers.log(e, 1);
106
- index_1.Helpers.log("[lastCommitDate] Cannot counts commits in branch in: ".concat(cwd), 1);
106
+ index_1.Helpers.log("[firedev-helpers][lastCommitDate] Cannot counts commits in branch in: ".concat(cwd), 1);
107
107
  return null;
108
108
  }
109
109
  };
110
110
  //#endregion
111
111
  //#region get last commit date
112
112
  HelpersGit.prototype.lastCommitMessage = function (cwd) {
113
- index_1.Helpers.log('[lastCommitMessage] ' + cwd, 1);
113
+ index_1.Helpers.log('[firedev-helpers][lastCommitMessage] ' + cwd, 1);
114
114
  try {
115
115
  var unixTimestamp = tnp_core_1.child_process.execSync("git log -1 --pretty=%B", { cwd: cwd }).toString().trim();
116
116
  return unixTimestamp;
117
117
  }
118
118
  catch (e) {
119
119
  index_1.Helpers.log(e, 1);
120
- index_1.Helpers.log("[lastCommitMessage] Cannot display last commit message in branch in: ".concat(cwd), 1);
120
+ index_1.Helpers.log("[firedev-helpers]lastCommitMessage] Cannot display last commit message in branch in: ".concat(cwd), 1);
121
121
  return null;
122
122
  }
123
123
  };
124
124
  //#endregion
125
125
  //#region get number of commit in repository
126
126
  HelpersGit.prototype.countCommits = function (cwd) {
127
- index_1.Helpers.log('[countCommits] ' + cwd, 1);
127
+ index_1.Helpers.log('[firedev-helpers][countCommits] ' + cwd, 1);
128
128
  if (!index_1.Helpers.git.hasAnyCommits(cwd)) {
129
129
  return 0;
130
130
  }
131
131
  try {
132
- index_1.Helpers.log('RUNNING COUNT COMMITS');
132
+ index_1.Helpers.log('[firedev-helpers] RUNNING COUNT COMMITS');
133
133
  // git rev-parse HEAD &> /dev/null check if any commits
134
134
  var currentLocalBranch = this.currentBranchName(cwd);
135
135
  var value = Number(this.isGitRepo(cwd) && index_1.Helpers
@@ -138,16 +138,21 @@ var HelpersGit = /** @class */ (function () {
138
138
  }
139
139
  catch (e) {
140
140
  index_1.Helpers.log(e, 1);
141
- index_1.Helpers.log("[countCommits] Cannot counts commits in branch in: ".concat(cwd), 1);
141
+ index_1.Helpers.log("[firedev-helpers][countCommits] Cannot counts commits in branch in: ".concat(cwd), 1);
142
142
  return 0;
143
143
  }
144
144
  };
145
145
  //#endregion
146
146
  //#region get number of commit in repository
147
147
  HelpersGit.prototype.hasAnyCommits = function (cwd) {
148
- index_1.Helpers.log('[hasAnyCommits] ' + cwd, 1);
148
+ index_1.Helpers.log('[firedev-helpers][hasAnyCommits] ' + cwd, 1);
149
149
  try {
150
- tnp_core_1.child_process.execSync('git rev-parse HEAD &> /dev/null', { cwd: cwd }).toString().trim();
150
+ if (process.platform === 'win32') {
151
+ tnp_core_1.child_process.execSync('git rev-parse HEAD', { cwd: cwd }).toString().trim();
152
+ }
153
+ else {
154
+ tnp_core_1.child_process.execSync('git rev-parse HEAD &> /dev/null', { cwd: cwd }).toString().trim();
155
+ }
151
156
  return true;
152
157
  }
153
158
  catch (e) {
@@ -155,9 +160,21 @@ var HelpersGit = /** @class */ (function () {
155
160
  }
156
161
  };
157
162
  //#endregion
163
+ //#region get number of commit in repository
164
+ HelpersGit.prototype.isInMergeProcess = function (cwd) {
165
+ index_1.Helpers.log('[firedev-helpers][hasAnyCommits] ' + cwd, 1);
166
+ try {
167
+ var message = (tnp_core_1.child_process.execSync("git status", { cwd: cwd }) || '').toString().trim();
168
+ return message.search('Unmerged paths:') !== -1;
169
+ }
170
+ catch (e) {
171
+ return false;
172
+ }
173
+ };
174
+ //#endregion
158
175
  //#region get branches names
159
176
  HelpersGit.prototype.getBranchesNames = function (cwd, pattern) {
160
- index_1.Helpers.log('[getBranchesNames] ' + cwd, 1);
177
+ index_1.Helpers.log('[firedev-helpers][getBranchesNames] ' + cwd, 1);
161
178
  try {
162
179
  var branchPattern_1 = pattern;
163
180
  if (tnp_core_1._.isString(pattern)) {
@@ -187,13 +204,14 @@ var HelpersGit = /** @class */ (function () {
187
204
  }
188
205
  catch (e) {
189
206
  index_1.Helpers.log(e);
207
+ index_1.Helpers.log('[firedev-helpers][getBranchesNames] not able to get branches names');
190
208
  return [];
191
209
  }
192
210
  };
193
211
  //#endregion
194
212
  //#region get current branch name
195
213
  HelpersGit.prototype.currentBranchName = function (cwd) {
196
- index_1.Helpers.log('[currentBranchName] ' + cwd, 1);
214
+ index_1.Helpers.log('[firedev-helpers][currentBranchName] ' + cwd, 1);
197
215
  try {
198
216
  var branchName = tnp_core_1.child_process.execSync("git branch | sed -n '/* /s///p'", { cwd: cwd }).toString().trim();
199
217
  return branchName;
@@ -206,7 +224,7 @@ var HelpersGit = /** @class */ (function () {
206
224
  //#region commit "what is"
207
225
  HelpersGit.prototype.commitWhatIs = function (cwd, customMessage) {
208
226
  if (customMessage === void 0) { customMessage = 'changes'; }
209
- index_1.Helpers.log('[commitWhatIs]');
227
+ index_1.Helpers.log('[firedev-helpers][commitWhatIs]');
210
228
  try {
211
229
  index_1.Helpers.run("git add --all . ", { cwd: cwd }).sync();
212
230
  }
@@ -217,24 +235,24 @@ var HelpersGit = /** @class */ (function () {
217
235
  index_1.Helpers.run("git commit -m \"".concat(customMessage, "\""), { cwd: cwd }).sync();
218
236
  }
219
237
  catch (error) {
220
- index_1.Helpers.warn("Failed to git commit -m \"".concat(customMessage, "\""));
238
+ index_1.Helpers.warn("[firedev-helpers][git][commitWhatIs] Failed to git commit -m \"".concat(customMessage, "\""));
221
239
  }
222
240
  };
223
241
  //#endregion
224
242
  //#region commit
225
243
  HelpersGit.prototype.commit = function (cwd, ProjectClass, args) {
226
- index_1.Helpers.log('[commit] ' + cwd, 1);
244
+ index_1.Helpers.log('[firedev-helpers][commit] ' + cwd, 1);
227
245
  if (!tnp_core_1._.isString(args)) {
228
246
  args = 'update';
229
247
  }
230
248
  var gitRootProject = ProjectClass.nearestTo(cwd, { findGitRoot: true });
231
249
  try {
232
- index_1.Helpers.info("[git][commit] Adding current git changes in git root:\n ".concat(gitRootProject.location, "\n "));
250
+ index_1.Helpers.info("[firedev-helpers][git][commit] Adding current git changes in git root:\n ".concat(gitRootProject.location, "\n "));
233
251
  gitRootProject.run("git add --all . ").sync();
234
252
  }
235
253
  catch (error) {
236
254
  index_1.Helpers.log(error);
237
- index_1.Helpers.warn("Failed to 'git add --all .' in:\n ".concat(gitRootProject.location));
255
+ index_1.Helpers.warn("[firedev-helpers][commit] Failed to 'git add --all .' in:\n ".concat(gitRootProject.location));
238
256
  }
239
257
  if (args.search('-m') === -1 && args.search('-msg') === -1) {
240
258
  var addBrackets = !((args.startsWith('\'') ||
@@ -244,20 +262,26 @@ var HelpersGit = /** @class */ (function () {
244
262
  args = "-m ".concat(addBrackets ? "\"".concat(args, "\"") : args);
245
263
  }
246
264
  try {
247
- index_1.Helpers.info("[git][commit] trying to commit what it with argument:\n \"".concat(args, "\"\n location: ").concat(cwd, "\n "));
265
+ index_1.Helpers.info("[firedev-helpers][git][commit] trying to commit what it with argument:\n \"".concat(args, "\"\n location: ").concat(cwd, "\n "));
248
266
  var cmdddd = "git commit --no-verify ".concat(args);
249
267
  index_1.Helpers.run(cmdddd, { cwd: cwd }).sync();
250
268
  }
251
269
  catch (error) {
252
270
  index_1.Helpers.log(error);
253
- index_1.Helpers.warn("[git][commit] not able to commit what is with command: ".concat(cmdddd));
271
+ index_1.Helpers.warn("[firedev-helpers][git][commit] not able to commit what is with command: ".concat(cmdddd));
254
272
  }
255
273
  };
256
274
  //#endregion
257
275
  //#region get remote origin
276
+ /**
277
+ * example: https://github.com/darekf77/tnp-helpers.git
278
+ *
279
+ * Note: address ends with .git always
280
+ *
281
+ */
258
282
  HelpersGit.prototype.getOriginURL = function (cwd, differentOriginName) {
259
283
  if (differentOriginName === void 0) { differentOriginName = ''; }
260
- index_1.Helpers.log('[getOriginURL] ' + cwd, 1);
284
+ index_1.Helpers.log('[firedev-helpers][getOriginURL] ' + cwd, 1);
261
285
  var url = '';
262
286
  try {
263
287
  // git config --get remote.origin.url
@@ -266,18 +290,21 @@ var HelpersGit = /** @class */ (function () {
266
290
  catch (error) {
267
291
  return '< not able to get origin >';
268
292
  }
293
+ if (!url.endsWith('.git')) {
294
+ return "".concat(url, ".git");
295
+ }
269
296
  return url;
270
297
  };
271
298
  //#endregion
272
299
  //#region is git root
273
300
  HelpersGit.prototype.isGitRoot = function (cwd) {
274
- index_1.Helpers.log('[isGitRoot] ' + cwd, 1);
301
+ index_1.Helpers.log('[firedev-helpers][isGitRoot] ' + cwd, 1);
275
302
  return this.isGitRepo(cwd) && tnp_core_1.fse.existsSync(tnp_core_1.path.join(cwd, '.git'));
276
303
  };
277
304
  //#endregion
278
305
  //#region is git repo
279
306
  HelpersGit.prototype.isGitRepo = function (cwd) {
280
- index_1.Helpers.log('[isGitRepo] ' + cwd, 1);
307
+ index_1.Helpers.log('[firedev-helpers][isGitRepo] ' + cwd, 1);
281
308
  if (!index_1.Helpers.git.hasAnyCommits(cwd)) {
282
309
  return false;
283
310
  }
@@ -297,7 +324,7 @@ var HelpersGit = /** @class */ (function () {
297
324
  HelpersGit.prototype.pull = function (branchName, cwd) {
298
325
  if (branchName === void 0) { branchName = 'master'; }
299
326
  if (cwd === void 0) { cwd = (0, tnp_core_1.crossPlatformPath)(process.cwd()); }
300
- index_1.Helpers.log('[pull] ' + cwd, 1);
327
+ index_1.Helpers.log('[firedev-helpers][pull] ' + cwd, 1);
301
328
  tnp_core_1.child_process.execSync("git pull --tags --rebase origin ".concat(branchName), { cwd: cwd });
302
329
  };
303
330
  //#region pull current branch
@@ -309,23 +336,23 @@ var HelpersGit = /** @class */ (function () {
309
336
  return tslib_1.__generator(this, function (_a) {
310
337
  switch (_a.label) {
311
338
  case 0:
312
- index_1.Helpers.log('[pullBranch] ' + cwd, 1);
339
+ index_1.Helpers.log('[firedev-helpers][pullBranch] ' + cwd, 1);
313
340
  if (this.getOriginURL(cwd) === '') {
314
341
  index_1.Helpers.warn("Not pulling branch without "
315
342
  + "remote origin url.... in folder ".concat(tnp_core_1.path.basename(cwd)));
316
343
  return [2 /*return*/];
317
344
  }
318
- index_1.Helpers.info("Pulling git changes in \"".concat(cwd, "\" , origin=").concat(index_1.Helpers.git.getOriginURL(cwd), " "));
345
+ index_1.Helpers.info("[firedev-helpers] Pulling git changes in \"".concat(cwd, "\" , origin=").concat(index_1.Helpers.git.getOriginURL(cwd), " "));
319
346
  _a.label = 1;
320
347
  case 1:
321
348
  _a.trys.push([1, 2, , 5]);
322
349
  index_1.Helpers.git.pull(branchName, cwd);
323
- index_1.Helpers.info("Branch \"".concat(branchName, "\" updated successfully in ").concat(tnp_core_1.path.basename(cwd)));
350
+ index_1.Helpers.info("[firedev-helpers] Branch \"".concat(branchName, "\" updated successfully in ").concat(tnp_core_1.path.basename(cwd)));
324
351
  return [3 /*break*/, 5];
325
352
  case 2:
326
353
  e_1 = _a.sent();
327
354
  // console.log(e)
328
- index_1.Helpers.error("Cannot update current branch in: ".concat(cwd), askToRetry, true);
355
+ index_1.Helpers.error("[firedev-helpers] Cannot update current branch in: ".concat(cwd), askToRetry, true);
329
356
  if (!askToRetry) return [3 /*break*/, 4];
330
357
  return [4 /*yield*/, index_1.Helpers.questionYesNo("Do you wanna try again ?", function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
331
358
  return tslib_1.__generator(this, function (_a) {
@@ -358,7 +385,7 @@ var HelpersGit = /** @class */ (function () {
358
385
  return tslib_1.__generator(this, function (_a) {
359
386
  switch (_a.label) {
360
387
  case 0:
361
- index_1.Helpers.log('[pullCurrentBranch] ' + cwd, 1);
388
+ index_1.Helpers.log('[firedev-helpers][pullCurrentBranch] ' + cwd, 1);
362
389
  if (global['tnpNonInteractive']) {
363
390
  askToRetry = false;
364
391
  }
@@ -368,18 +395,18 @@ var HelpersGit = /** @class */ (function () {
368
395
  + "remote origin url.... in folder ".concat(tnp_core_1.path.basename(cwd)));
369
396
  return [2 /*return*/];
370
397
  }
371
- index_1.Helpers.info("Pulling git changes in \"".concat(cwd, "\", origin=").concat(index_1.Helpers.git.getOriginURL(cwd), " "));
398
+ index_1.Helpers.info("[firedev-helpers] Pulling git changes in \"".concat(cwd, "\", origin=").concat(index_1.Helpers.git.getOriginURL(cwd), " "));
372
399
  _a.label = 1;
373
400
  case 1:
374
401
  _a.trys.push([1, 2, , 5]);
375
402
  currentLocalBranch = tnp_core_1.child_process.execSync("git branch | sed -n '/* /s///p'", { cwd: cwd }).toString().trim();
376
403
  index_1.Helpers.git.pull(currentLocalBranch, cwd);
377
- index_1.Helpers.info("Branch \"".concat(currentLocalBranch, "\" updated successfully in ").concat(tnp_core_1.path.basename(cwd)));
404
+ index_1.Helpers.info("[firedev-helpers] Branch \"".concat(currentLocalBranch, "\" updated successfully in ").concat(tnp_core_1.path.basename(cwd)));
378
405
  return [3 /*break*/, 5];
379
406
  case 2:
380
407
  e_2 = _a.sent();
381
408
  console.log(e_2);
382
- index_1.Helpers.error("Cannot update current branch in: ".concat(cwd), askToRetry, true);
409
+ index_1.Helpers.error("[firedev-helpers] Cannot update current branch in: ".concat(cwd), askToRetry, true);
383
410
  if (!askToRetry) return [3 /*break*/, 4];
384
411
  return [4 /*yield*/, index_1.Helpers.questionYesNo("Do you wanna try again ?", function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
385
412
  return tslib_1.__generator(this, function (_a) {
@@ -409,7 +436,7 @@ var HelpersGit = /** @class */ (function () {
409
436
  HelpersGit.prototype.pushCurrentBranch = function (cwd, force, origin) {
410
437
  if (force === void 0) { force = false; }
411
438
  if (origin === void 0) { origin = 'origin'; }
412
- index_1.Helpers.log('[pushCurrentBranch] ' + cwd, 1);
439
+ index_1.Helpers.log('[firedev-helpers][pushCurrentBranch] ' + cwd, 1);
413
440
  var currentBranchName = index_1.Helpers.git.currentBranchName(cwd);
414
441
  var taskName = "\n Pushing current branch (remote=".concat(origin, "): ").concat(currentBranchName, "\n ");
415
442
  index_1.Helpers.info(taskName);
@@ -423,7 +450,7 @@ var HelpersGit = /** @class */ (function () {
423
450
  break;
424
451
  }
425
452
  catch (err) {
426
- index_1.Helpers.error("[tnp-helpers] Not able to push branch ".concat(currentBranchName, " in (origin=").concat(origin, "):\n ").concat(cwd), true, true);
453
+ index_1.Helpers.error("[firedev-helpers] Not able to push branch ".concat(currentBranchName, " in (origin=").concat(origin, "):\n ").concat(cwd), true, true);
427
454
  index_1.Helpers.pressKeyAndContinue("Press any key to try again: ");
428
455
  // TODO issue 1: issue with press any key
429
456
  // TODO issue 2: Updates were rejected because the tag already exists in the remote
@@ -464,12 +491,12 @@ var HelpersGit = /** @class */ (function () {
464
491
  // const ALWAYS_HTTPS = true;
465
492
  if (url.split(' ').length > 2) {
466
493
  // const [rUrl, rDest] = url.split(' ');
467
- index_1.Helpers.error("[tnp-helpers]incorrect clone url \"".concat(url, "\""));
494
+ index_1.Helpers.error("[firedev-helpers]incorrect clone url \"".concat(url, "\""));
468
495
  }
469
496
  if (url.split(' ').length === 2) {
470
497
  var _e = tslib_1.__read(url.split(' '), 2), rUrl = _e[0], rDest = _e[1];
471
498
  if (destinationFolderName) {
472
- index_1.Helpers.error("[tnp-helpers] wrong cloning argument\n\n url = \"".concat(url, "\"\n destinationFolderName = \"").concat(destinationFolderName, "\"\n\n cant use both at the same time\n "));
499
+ index_1.Helpers.error("[firedev-helpers] wrong cloning argument\n\n url = \"".concat(url, "\"\n destinationFolderName = \"").concat(destinationFolderName, "\"\n\n cant use both at the same time\n "));
473
500
  }
474
501
  else {
475
502
  destinationFolderName = rDest;
@@ -487,7 +514,7 @@ var HelpersGit = /** @class */ (function () {
487
514
  index_1.Helpers.remove(cloneFolderPath);
488
515
  }
489
516
  else if (index_1.Helpers.exists(cloneFolderPath) && index_1.Helpers.exists(tnp_core_1.path.join(cloneFolderPath, '.git'))) {
490
- index_1.Helpers.warn("Alread cloned ".concat(tnp_core_1.path.basename(cloneFolderPath), "..."));
517
+ index_1.Helpers.warn("[firedev-helpers] Already cloned ".concat(tnp_core_1.path.basename(cloneFolderPath), "..."));
491
518
  return;
492
519
  }
493
520
  var commnad = url.startsWith("https://")
@@ -503,17 +530,17 @@ var HelpersGit = /** @class */ (function () {
503
530
  }
504
531
  catch (error) {
505
532
  if (((_c = (_b = error === null || error === void 0 ? void 0 : error.stderr) === null || _b === void 0 ? void 0 : _b.toString()) === null || _c === void 0 ? void 0 : _c.search('remote: Not Found')) !== -1) {
506
- index_1.Helpers.warn("[tnp-helpers][git] Project not found :".concat(url));
533
+ index_1.Helpers.warn("[firedev-helpers][git] Project not found :".concat(url));
507
534
  }
508
535
  else {
509
- index_1.Helpers.error("Can't clone from url: ".concat(tnp_cli_1.CLI.chalk.bold(url), ".."), false, true);
536
+ index_1.Helpers.error("[firedev-helpers] Can't clone from url: ".concat(tnp_cli_1.CLI.chalk.bold(url), ".."), false, true);
510
537
  }
511
538
  }
512
539
  }
513
540
  var packageJson = tnp_core_1.path.join(cloneFolderPath, tnp_config_1.config.file.package_json);
514
541
  // Helpers.info(packageJson)
515
542
  if (!index_1.Helpers.exists(packageJson)) {
516
- index_1.Helpers.info("Recreating unexited package.json for project ".concat(tnp_core_1.path.basename(cloneFolderPath), ".."));
543
+ index_1.Helpers.info("[firedev-helpers] Recreating unexited package.json for project ".concat(tnp_core_1.path.basename(cloneFolderPath), ".."));
517
544
  try {
518
545
  index_1.Helpers.run("npm init -y", { cwd: cloneFolderPath, output: false }).sync();
519
546
  }
@@ -523,13 +550,13 @@ var HelpersGit = /** @class */ (function () {
523
550
  //#endregion
524
551
  //#region check if there are some uncommited changes
525
552
  HelpersGit.prototype.checkIfthereAreSomeUncommitedChange = function (cwd) {
526
- index_1.Helpers.log('[checkIfthereAreSomeUncommitedChange] ' + cwd, 1);
553
+ index_1.Helpers.log('[firedev-helpers][checkIfthereAreSomeUncommitedChange] ' + cwd, 1);
527
554
  return index_1.Helpers.git.thereAreSomeUncommitedChangeExcept([], cwd);
528
555
  };
529
556
  //#endregion
530
557
  HelpersGit.prototype.thereAreSomeUncommitedChangeExcept = function (filesList, cwd) {
531
558
  if (filesList === void 0) { filesList = []; }
532
- index_1.Helpers.log('[thereAreSomeUncommitedChangeExcept] ' + cwd, 1);
559
+ index_1.Helpers.log('[firedev-helpers][thereAreSomeUncommitedChangeExcept] ' + cwd, 1);
533
560
  filesList = filesList.map(function (f) { return (0, tnp_core_1.crossPlatformPath)(f); });
534
561
  try {
535
562
  var res = index_1.Helpers.run("git ls-files --deleted --modified --others --exclude-standard", { output: false, cwd: cwd }).sync().toString().trim();
@@ -547,13 +574,13 @@ var HelpersGit = /** @class */ (function () {
547
574
  };
548
575
  //#region restore last version
549
576
  HelpersGit.prototype.restoreLastVersion = function (cwd, localFilePath) {
550
- index_1.Helpers.log('[restoreLastVersion] ' + cwd, 1);
577
+ index_1.Helpers.log('[firedev-helpers][restoreLastVersion] ' + cwd, 1);
551
578
  try {
552
- index_1.Helpers.info("[git] restoring last verion of file ".concat(tnp_core_1.path.basename(cwd), "/").concat(localFilePath));
579
+ index_1.Helpers.info("[firedev-helpers][git] restoring last verion of file ".concat(tnp_core_1.path.basename(cwd), "/").concat(localFilePath));
553
580
  index_1.Helpers.run("git checkout -- ".concat(localFilePath), { cwd: cwd }).sync();
554
581
  }
555
582
  catch (error) {
556
- index_1.Helpers.warn("[tnp-git] Not able to resotre last version of file ".concat(localFilePath));
583
+ index_1.Helpers.warn("[firedev-helpers][git] Not able to resotre last version of file ".concat(localFilePath));
557
584
  }
558
585
  };
559
586
  //#endregion
@@ -563,13 +590,13 @@ var HelpersGit = /** @class */ (function () {
563
590
  for (var _i = 1; _i < arguments.length; _i++) {
564
591
  relativePathes[_i - 1] = arguments[_i];
565
592
  }
566
- index_1.Helpers.log('[resetFiles] ' + cwd, 1);
593
+ index_1.Helpers.log('[firedev-helpers][resetFiles] ' + cwd, 1);
567
594
  relativePathes.forEach(function (p) {
568
595
  try {
569
596
  index_1.Helpers.run("git checkout HEAD -- ".concat(p), { cwd: cwd }).sync();
570
597
  }
571
598
  catch (err) {
572
- index_1.Helpers.error("[project.git] Not able to reset files: ".concat(p, " inside project ").concat(tnp_core_1.path.basename(cwd), "."), true, true);
599
+ index_1.Helpers.error("[firedev-helpers][git] Not able to reset files: ".concat(p, " inside project ").concat(tnp_core_1.path.basename(cwd), "."), true, true);
573
600
  }
574
601
  });
575
602
  };
@@ -388,7 +388,7 @@ var HelpersProcess = /** @class */ (function () {
388
388
  org = port;
389
389
  port = Number(port);
390
390
  if (!tnp_core_1._.isNumber(port)) {
391
- index_1.Helpers.warn("[tnp-helpers] Can't kill on port: \"".concat(org, "\""));
391
+ index_1.Helpers.warn("[firedev-helpers] Can't kill on port: \"".concat(org, "\""));
392
392
  return [2 /*return*/];
393
393
  }
394
394
  _a.label = 2;
package/lib/helpers.js CHANGED
@@ -152,7 +152,7 @@ var HelpersTnp = /** @class */ (function (_super) {
152
152
  case 1:
153
153
  //#region @backend
154
154
  if (!(_a.sent())) {
155
- index_1.Helpers.error("[tnp-helpers] Please run this program as sudo (or admin on windows)", false, true);
155
+ index_1.Helpers.error("[firedev-helpers] Please run this program as sudo (or admin on windows)", false, true);
156
156
  }
157
157
  return [2 /*return*/];
158
158
  }