tnp-helpers 19.0.5 → 19.0.7

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 (197) hide show
  1. package/browser/fesm2022/tnp-helpers.mjs +2399 -234
  2. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  3. package/browser/lib/base/linked-project.d.ts +4 -1
  4. package/browser/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
  5. package/browser/lib/build-info._auto-generated_.d.ts +2 -1
  6. package/browser/lib/helpers/helpers.d.ts +1 -0
  7. package/browser/lib/index.d.ts +3 -1
  8. package/browser/lib/old/execute-command.d.ts +12 -0
  9. package/browser/lib/old/helpers.d.ts +62 -0
  10. package/browser/lib/old/models.d.ts +81 -0
  11. package/browser/lib/utils.d.ts +42 -21
  12. package/browser/package.json +1 -1
  13. package/client/fesm2022/tnp-helpers.mjs +2399 -234
  14. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  15. package/client/lib/base/linked-project.d.ts +4 -1
  16. package/client/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
  17. package/client/lib/build-info._auto-generated_.d.ts +2 -1
  18. package/client/lib/helpers/helpers.d.ts +1 -0
  19. package/client/lib/index.d.ts +3 -1
  20. package/client/lib/old/execute-command.d.ts +12 -0
  21. package/client/lib/old/helpers.d.ts +62 -0
  22. package/client/lib/old/models.d.ts +81 -0
  23. package/client/lib/utils.d.ts +42 -21
  24. package/client/package.json +1 -1
  25. package/lib/base/classes/base-bower-json.js +2 -2
  26. package/lib/base/classes/base-bower-json.js.map +1 -1
  27. package/lib/base/classes/base-cli-worker/base-cli-worker-config.js +2 -2
  28. package/lib/base/classes/base-cli-worker/base-cli-worker-config.js.map +1 -1
  29. package/lib/base/classes/base-cli-worker/base-cli-worker-controller.d.ts +1 -1
  30. package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js +14 -14
  31. package/lib/base/classes/base-cli-worker/base-cli-worker-controller.js.map +1 -1
  32. package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js +10 -10
  33. package/lib/base/classes/base-cli-worker/base-cli-worker-terminal-ui.js.map +1 -1
  34. package/lib/base/classes/base-cli-worker/base-cli-worker.d.ts +1 -1
  35. package/lib/base/classes/base-cli-worker/base-cli-worker.js +18 -18
  36. package/lib/base/classes/base-cli-worker/base-cli-worker.js.map +1 -1
  37. package/lib/base/classes/base-command-line-feature.backend.js +10 -10
  38. package/lib/base/classes/base-command-line-feature.backend.js.map +1 -1
  39. package/lib/base/classes/base-compiler-for-project.d.ts +1 -1
  40. package/lib/base/classes/base-compiler-for-project.js +13 -13
  41. package/lib/base/classes/base-compiler-for-project.js.map +1 -1
  42. package/lib/base/classes/base-db.js +7 -7
  43. package/lib/base/classes/base-db.js.map +1 -1
  44. package/lib/base/classes/base-debounce-compiler-for-project.d.ts +1 -1
  45. package/lib/base/classes/base-debounce-compiler-for-project.js +5 -5
  46. package/lib/base/classes/base-debounce-compiler-for-project.js.map +1 -1
  47. package/lib/base/classes/base-git.js +26 -25
  48. package/lib/base/classes/base-git.js.map +1 -1
  49. package/lib/base/classes/base-global-command-line.backend.d.ts +3 -1
  50. package/lib/base/classes/base-global-command-line.backend.js +60 -49
  51. package/lib/base/classes/base-global-command-line.backend.js.map +1 -1
  52. package/lib/base/classes/base-ignore-hide.js +2 -2
  53. package/lib/base/classes/base-ignore-hide.js.map +1 -1
  54. package/lib/base/classes/base-json-file-reader.js +24 -24
  55. package/lib/base/classes/base-json-file-reader.js.map +1 -1
  56. package/lib/base/classes/base-library-build.js +52 -52
  57. package/lib/base/classes/base-library-build.js.map +1 -1
  58. package/lib/base/classes/base-linked-projects.js +23 -23
  59. package/lib/base/classes/base-linked-projects.js.map +1 -1
  60. package/lib/base/classes/base-node-modules.js +37 -37
  61. package/lib/base/classes/base-node-modules.js.map +1 -1
  62. package/lib/base/classes/base-npm-helpers.d.ts +1 -1
  63. package/lib/base/classes/base-npm-helpers.js +14 -14
  64. package/lib/base/classes/base-npm-helpers.js.map +1 -1
  65. package/lib/base/classes/base-package-json.d.ts +1 -1
  66. package/lib/base/classes/base-package-json.js +27 -27
  67. package/lib/base/classes/base-package-json.js.map +1 -1
  68. package/lib/base/classes/base-powershell.js +7 -2
  69. package/lib/base/classes/base-powershell.js.map +1 -1
  70. package/lib/base/classes/base-process-manager.js +8 -8
  71. package/lib/base/classes/base-process-manager.js.map +1 -1
  72. package/lib/base/classes/base-project-resolver.js +34 -33
  73. package/lib/base/classes/base-project-resolver.js.map +1 -1
  74. package/lib/base/classes/base-project.d.ts +1 -1
  75. package/lib/base/classes/base-project.js +62 -62
  76. package/lib/base/classes/base-project.js.map +1 -1
  77. package/lib/base/classes/base-quick-fixes.js +9 -9
  78. package/lib/base/classes/base-quick-fixes.js.map +1 -1
  79. package/lib/base/classes/base-release-process.d.ts +1 -1
  80. package/lib/base/classes/base-release-process.js +19 -19
  81. package/lib/base/classes/base-release-process.js.map +1 -1
  82. package/lib/base/classes/base-start-config.backend.js +13 -13
  83. package/lib/base/classes/base-start-config.backend.js.map +1 -1
  84. package/lib/base/classes/base-static-pages.js +6 -6
  85. package/lib/base/classes/base-static-pages.js.map +1 -1
  86. package/lib/base/classes/base-vscode.js +31 -24
  87. package/lib/base/classes/base-vscode.js.map +1 -1
  88. package/lib/base/commit-data.js +25 -25
  89. package/lib/base/commit-data.js.map +1 -1
  90. package/lib/base/core-project.d.ts +1 -1
  91. package/lib/base/core-project.js +9 -9
  92. package/lib/base/core-project.js.map +1 -1
  93. package/lib/base/gh-temp-code.js +6 -6
  94. package/lib/base/gh-temp-code.js.map +1 -1
  95. package/lib/base/index-rebuilder.backend.js +1 -1
  96. package/lib/base/index-rebuilder.backend.js.map +1 -1
  97. package/lib/base/linked-project.d.ts +4 -1
  98. package/lib/base/linked-project.js +18 -9
  99. package/lib/base/linked-project.js.map +1 -1
  100. package/lib/base/tcp-udp-ports/not-assignable-port.entity.js +2 -2
  101. package/lib/base/tcp-udp-ports/ports.controller.d.ts +1 -1
  102. package/lib/base/tcp-udp-ports/ports.controller.js +21 -21
  103. package/lib/base/tcp-udp-ports/ports.controller.js.map +1 -1
  104. package/lib/base/tcp-udp-ports/ports.entity.d.ts +1 -1
  105. package/lib/base/tcp-udp-ports/ports.entity.js +10 -10
  106. package/lib/base/tcp-udp-ports/ports.entity.js.map +1 -1
  107. package/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +9 -9
  108. package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js +9 -9
  109. package/lib/base/tcp-udp-ports/tcp-udp-ports.context.js.map +1 -1
  110. package/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js +18 -18
  111. package/lib/base/tcp-udp-ports/tcp-upd-ports-terminal-ui.js.map +1 -1
  112. package/lib/build-info._auto-generated_.d.ts +2 -1
  113. package/lib/build-info._auto-generated_.js +3 -2
  114. package/lib/build-info._auto-generated_.js.map +1 -1
  115. package/lib/helpers/for-backend/helpers-cli-tool.backend.js +40 -40
  116. package/lib/helpers/for-backend/helpers-cli-tool.backend.js.map +1 -1
  117. package/lib/helpers/for-backend/helpers-console-gui.js +2 -2
  118. package/lib/helpers/for-backend/helpers-console-gui.js.map +1 -1
  119. package/lib/helpers/for-backend/helpers-dependencies.backend.js +2 -2
  120. package/lib/helpers/for-backend/helpers-dependencies.backend.js.map +1 -1
  121. package/lib/helpers/for-backend/helpers-file-folders.js +131 -131
  122. package/lib/helpers/for-backend/helpers-file-folders.js.map +1 -1
  123. package/lib/helpers/for-backend/helpers-git.backend.js +120 -106
  124. package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
  125. package/lib/helpers/for-backend/helpers-network.backend.js +2 -3
  126. package/lib/helpers/for-backend/helpers-network.backend.js.map +1 -1
  127. package/lib/helpers/for-backend/helpers-npm.backend.js +2 -2
  128. package/lib/helpers/for-backend/helpers-npm.backend.js.map +1 -1
  129. package/lib/helpers/for-backend/helpers-path.backend.js +6 -6
  130. package/lib/helpers/for-backend/helpers-path.backend.js.map +1 -1
  131. package/lib/helpers/for-backend/helpers-process.d.ts +1 -1
  132. package/lib/helpers/for-backend/helpers-process.js +41 -41
  133. package/lib/helpers/for-backend/helpers-process.js.map +1 -1
  134. package/lib/helpers/for-backend/helpers-system-terminal.backend.js +2 -2
  135. package/lib/helpers/for-backend/helpers-system-terminal.backend.js.map +1 -1
  136. package/lib/helpers/for-backend/helpers-vscode.backend.d.ts +1 -1
  137. package/lib/helpers/for-backend/helpers-vscode.backend.js +2 -2
  138. package/lib/helpers/for-backend/helpers-vscode.backend.js.map +1 -1
  139. package/lib/helpers/for-browser/angular.helper.js +2 -2
  140. package/lib/helpers/helpers-array-obj.js +10 -10
  141. package/lib/helpers/helpers-array-obj.js.map +1 -1
  142. package/lib/helpers/helpers-json5.backend.js +6 -6
  143. package/lib/helpers/helpers-json5.backend.js.map +1 -1
  144. package/lib/helpers/helpers-numbers.js.map +1 -1
  145. package/lib/helpers/helpers-strings-regexes.js +5 -5
  146. package/lib/helpers/helpers-strings-regexes.js.map +1 -1
  147. package/lib/helpers/helpers-strings.js +3 -3
  148. package/lib/helpers/helpers-strings.js.map +1 -1
  149. package/lib/helpers/helpers.d.ts +1 -0
  150. package/lib/helpers/helpers.js +42 -30
  151. package/lib/helpers/helpers.js.map +1 -1
  152. package/lib/index.js +0 -2
  153. package/lib/index.js.map +1 -1
  154. package/lib/lowdb/adapters/node/TextFile.js +2 -2
  155. package/lib/lowdb/adapters/node/TextFile.js.map +1 -1
  156. package/lib/models.d.ts +1 -1
  157. package/lib/models.js +8 -8
  158. package/lib/models.js.map +1 -1
  159. package/lib/old/base-component.js +2 -2
  160. package/lib/old/base-formly-component.js +2 -2
  161. package/lib/old/dual-component-ctrl.js +2 -2
  162. package/lib/old/execute-command.js +20 -8
  163. package/lib/old/execute-command.js.map +1 -1
  164. package/lib/old/helpers.js +2 -2
  165. package/lib/old/helpers.js.map +1 -1
  166. package/lib/old/models.d.ts +1 -1
  167. package/lib/utils.d.ts +42 -21
  168. package/lib/utils.js +340 -54
  169. package/lib/utils.js.map +1 -1
  170. package/lib/validators/validators-firedev.js +6 -6
  171. package/lib/validators/validators-firedev.js.map +1 -1
  172. package/lib/validators/validators-git.js.map +1 -1
  173. package/lib/validators/validators-network.js +2 -2
  174. package/lib/validators/validators-network.js.map +1 -1
  175. package/migrations/1736198527297_init.d.ts +1 -1
  176. package/migrations/1736198527297_init.js +5 -5
  177. package/migrations/1736198527297_init.js.map +1 -1
  178. package/migrations/1736199486472_addingNotAssignablePorts.d.ts +1 -1
  179. package/migrations/1736199486472_addingNotAssignablePorts.js +8 -8
  180. package/migrations/1736199486472_addingNotAssignablePorts.js.map +1 -1
  181. package/migrations/1736454437350_addFreePorts.d.ts +1 -1
  182. package/migrations/1736454437350_addFreePorts.js +11 -11
  183. package/migrations/1736454437350_addFreePorts.js.map +1 -1
  184. package/package.json +1 -1
  185. package/tmp-environment.json +4 -4
  186. package/websql/fesm2022/tnp-helpers.mjs +2436 -238
  187. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  188. package/websql/lib/base/linked-project.d.ts +4 -1
  189. package/websql/lib/base/tcp-udp-ports/tcp-udp-ports.context.d.ts +6 -6
  190. package/websql/lib/build-info._auto-generated_.d.ts +2 -1
  191. package/websql/lib/helpers/helpers.d.ts +1 -0
  192. package/websql/lib/index.d.ts +3 -1
  193. package/websql/lib/old/execute-command.d.ts +12 -0
  194. package/websql/lib/old/helpers.d.ts +62 -0
  195. package/websql/lib/old/models.d.ts +81 -0
  196. package/websql/lib/utils.d.ts +42 -21
  197. package/websql/package.json +1 -1
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HelpersFileFolders = void 0;
4
4
  const crypto = require("crypto");
5
5
  const glob = require("glob");
6
- const tnp_config_1 = require("tnp-config");
7
- const tnp_core_1 = require("tnp-core");
6
+ const lib_1 = require("tnp-config/lib");
7
+ const lib_2 = require("tnp-core/lib");
8
8
  const underscore = require("underscore");
9
9
  const index_1 = require("../../index");
10
10
  class HelpersFileFolders {
@@ -13,7 +13,7 @@ class HelpersFileFolders {
13
13
  */
14
14
  checksum(absolutePathToFileOrContent, algorithm) {
15
15
  //#region @backendFunc
16
- const fileContent = tnp_core_1.path.isAbsolute(absolutePathToFileOrContent)
16
+ const fileContent = lib_2.path.isAbsolute(absolutePathToFileOrContent)
17
17
  ? index_1.Helpers.readFile(absolutePathToFileOrContent)
18
18
  : absolutePathToFileOrContent;
19
19
  return crypto
@@ -24,20 +24,20 @@ class HelpersFileFolders {
24
24
  }
25
25
  getValueFromJSON(filepath, lodashGetPath, defaultValue = void 0) {
26
26
  //#region @backendFunc
27
- if (!tnp_core_1.fse.existsSync(filepath)) {
27
+ if (!lib_2.fse.existsSync(filepath)) {
28
28
  return defaultValue;
29
29
  }
30
30
  const json = index_1.Helpers.readJson(filepath);
31
- return tnp_core_1._.get(json, lodashGetPath, defaultValue);
31
+ return lib_2._.get(json, lodashGetPath, defaultValue);
32
32
  //#endregion
33
33
  }
34
34
  getValueFromJSONC(filepath, lodashGetPath, defaultValue = void 0) {
35
35
  //#region @backendFunc
36
- if (!tnp_core_1.fse.existsSync(filepath)) {
36
+ if (!lib_2.fse.existsSync(filepath)) {
37
37
  return defaultValue;
38
38
  }
39
39
  const json = index_1.Helpers.readJson5(filepath);
40
- return tnp_core_1._.get(json, lodashGetPath, defaultValue);
40
+ return lib_2._.get(json, lodashGetPath, defaultValue);
41
41
  //#endregion
42
42
  }
43
43
  readValueFromJson(filepath, lodashGetPath, defaultValue = void 0) {
@@ -52,26 +52,26 @@ class HelpersFileFolders {
52
52
  }
53
53
  setValueToJSON(filepath, lodashGetPath, value) {
54
54
  //#region @backendFunc
55
- if (tnp_core_1._.isArray(filepath)) {
56
- filepath = (0, tnp_core_1.crossPlatformPath)(filepath);
55
+ if (lib_2._.isArray(filepath)) {
56
+ filepath = (0, lib_2.crossPlatformPath)(filepath);
57
57
  }
58
- if (!tnp_core_1.fse.existsSync(filepath)) {
58
+ if (!lib_2.fse.existsSync(filepath)) {
59
59
  index_1.Helpers.warn(`Recreating unexised json file: ${filepath}`);
60
60
  index_1.Helpers.writeFile(filepath, '{}');
61
61
  }
62
62
  const json = index_1.Helpers.readJson(filepath);
63
- tnp_core_1._.set(json, lodashGetPath, value);
63
+ lib_2._.set(json, lodashGetPath, value);
64
64
  index_1.Helpers.writeJson(filepath, json);
65
65
  //#endregion
66
66
  }
67
67
  setValueToJSONC(filepath, lodashGetPath, value) {
68
68
  //#region @backendFunc
69
- if (!tnp_core_1.fse.existsSync(filepath)) {
69
+ if (!lib_2.fse.existsSync(filepath)) {
70
70
  index_1.Helpers.warn(`Recreating unexised json file: ${filepath}`);
71
71
  index_1.Helpers.writeFile(filepath, '{}');
72
72
  }
73
73
  const json = index_1.Helpers.readJsonC(filepath);
74
- tnp_core_1._.set(json, lodashGetPath, value);
74
+ lib_2._.set(json, lodashGetPath, value);
75
75
  index_1.Helpers.writeJsonC(filepath, json);
76
76
  //#endregion
77
77
  }
@@ -83,12 +83,12 @@ class HelpersFileFolders {
83
83
  if (!index_1.Helpers.exists(filePath) || index_1.Helpers.isFolder(filePath)) {
84
84
  return null;
85
85
  }
86
- return tnp_core_1.fse.lstatSync(filePath).size;
86
+ return lib_2.fse.lstatSync(filePath).size;
87
87
  //#endregion
88
88
  }
89
89
  pathFromLink(filePath) {
90
90
  //#region @backendFunc
91
- return tnp_core_1.fse.readlinkSync(filePath);
91
+ return lib_2.fse.readlinkSync(filePath);
92
92
  //#endregion
93
93
  }
94
94
  // renameFolder(from: string, to: string, cwd?: string) {
@@ -112,15 +112,15 @@ class HelpersFileFolders {
112
112
  try {
113
113
  const directoryPath = cwd || '.';
114
114
  // Read all files in the directory
115
- const files = tnp_core_1.fse.readdirSync(directoryPath);
115
+ const files = lib_2.fse.readdirSync(directoryPath);
116
116
  files.forEach(file => {
117
117
  // Check if the file name includes the 'from' pattern
118
118
  if (file.includes(from)) {
119
119
  const newFileName = file.replace(from, to);
120
- const currentPath = tnp_core_1.path.join(directoryPath, file);
121
- const newPath = tnp_core_1.path.join(directoryPath, newFileName);
120
+ const currentPath = lib_2.path.join(directoryPath, file);
121
+ const newPath = lib_2.path.join(directoryPath, newFileName);
122
122
  // Rename the file
123
- tnp_core_1.fse.renameSync(currentPath, newPath);
123
+ lib_2.fse.renameSync(currentPath, newPath);
124
124
  console.log(`Renamed file from ${currentPath} to ${newPath}`);
125
125
  }
126
126
  });
@@ -137,7 +137,7 @@ class HelpersFileFolders {
137
137
  tmp = '/private/tmp';
138
138
  }
139
139
  if (process.platform === 'win32') {
140
- tmp = (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.join((0, tnp_core_1.crossPlatformPath)(tnp_core_1.os.homedir()), '/AppData/Local/Temp'));
140
+ tmp = (0, lib_2.crossPlatformPath)(lib_2.path.join((0, lib_2.crossPlatformPath)(lib_2.os.homedir()), '/AppData/Local/Temp'));
141
141
  }
142
142
  if (!index_1.Helpers.exists(tmp)) {
143
143
  index_1.Helpers.mkdirp(tmp);
@@ -217,13 +217,13 @@ class HelpersFileFolders {
217
217
  require(jsFilePath) {
218
218
  //#region @backendFunc
219
219
  const orgPath = jsFilePath;
220
- if (!tnp_core_1.fse.existsSync(jsFilePath)) {
220
+ if (!lib_2.fse.existsSync(jsFilePath)) {
221
221
  jsFilePath = `${jsFilePath}.js`;
222
222
  }
223
- if (!tnp_core_1.fse.existsSync(jsFilePath)) {
223
+ if (!lib_2.fse.existsSync(jsFilePath)) {
224
224
  index_1.Helpers.error(`Not able to find path: ${orgPath}`);
225
225
  }
226
- let fileContent = tnp_core_1.fse.readFileSync(jsFilePath).toLocaleString();
226
+ let fileContent = lib_2.fse.readFileSync(jsFilePath).toLocaleString();
227
227
  (() => {
228
228
  const stringForRegex = `require\\(("|')\\.\\/([a-zA-Z0-9]|\\/|\\-|\\_|\\+|\\.)*("|')\\)`;
229
229
  index_1.Helpers.log(`[taon-helpre][require][${jsFilePath}] stringForRegex: ${stringForRegex}`, 1);
@@ -233,10 +233,10 @@ class HelpersFileFolders {
233
233
  const matches = line.match(new RegExp(stringForRegex));
234
234
  if (matches !== null) {
235
235
  // console.log('matched', matches)
236
- const rep = tnp_core_1._.first(matches);
236
+ const rep = lib_2._.first(matches);
237
237
  if (rep) {
238
- const newFilename = (0, tnp_core_1.crossPlatformPath)([
239
- tnp_core_1.path.dirname(jsFilePath),
238
+ const newFilename = (0, lib_2.crossPlatformPath)([
239
+ lib_2.path.dirname(jsFilePath),
240
240
  rep.split('(')[1].replace(/("|'|\))/g, ''),
241
241
  ]);
242
242
  line = line.replace(rep, `require('${newFilename}')`);
@@ -258,14 +258,14 @@ class HelpersFileFolders {
258
258
  const matches = line.match(new RegExp(stringForRegex));
259
259
  if (matches !== null) {
260
260
  // console.log('matched', matches)
261
- const rep = tnp_core_1._.first(matches);
261
+ const rep = lib_2._.first(matches);
262
262
  if (rep) {
263
263
  const relativePart = rep.split('(')[1].replace(/("|'|\))/g, '');
264
264
  // console.log(`RELATIVE PART: "${relativePart}"`)
265
265
  if (relativePart.search('/') !== -1 &&
266
266
  !relativePart.startsWith('/')) {
267
- const newFilename = (0, tnp_core_1.crossPlatformPath)([
268
- tnp_core_1.path.dirname(jsFilePath),
267
+ const newFilename = (0, lib_2.crossPlatformPath)([
268
+ lib_2.path.dirname(jsFilePath),
269
269
  'node_modules',
270
270
  relativePart,
271
271
  ]);
@@ -300,27 +300,27 @@ class HelpersFileFolders {
300
300
  tryCopyFrom(source, destination, options = {}) {
301
301
  //#region @backendFunc
302
302
  index_1.Helpers.log(`Trying to copy from: ${source} to ${destination}`);
303
- destination = (0, tnp_core_1.crossPlatformPath)(destination);
304
- source = (0, tnp_core_1.crossPlatformPath)(source);
303
+ destination = (0, lib_2.crossPlatformPath)(destination);
304
+ source = (0, lib_2.crossPlatformPath)(source);
305
305
  if (source === destination) {
306
306
  index_1.Helpers.warn('[taon-helpers] Probably error... trying to copy the same folder...');
307
307
  return;
308
308
  }
309
- if (tnp_core_1.fse.existsSync(source) && !tnp_core_1.fse.lstatSync(source).isDirectory()) {
309
+ if (lib_2.fse.existsSync(source) && !lib_2.fse.lstatSync(source).isDirectory()) {
310
310
  // Helpers.warn(`[tryCopyFrom] This source is not directory: ${source} to ${destination}`);
311
311
  index_1.Helpers.copyFile(source, destination);
312
312
  return;
313
313
  }
314
- if (tnp_core_1.fse.existsSync(destination.replace(/\/$/, ''))) {
314
+ if (lib_2.fse.existsSync(destination.replace(/\/$/, ''))) {
315
315
  const destMaybe = destination.replace(/\/$/, '');
316
- const stats = tnp_core_1.fse.lstatSync(destMaybe);
316
+ const stats = lib_2.fse.lstatSync(destMaybe);
317
317
  const isNotDirectory = !stats.isDirectory();
318
318
  const isSymbolicLink = stats.isSymbolicLink();
319
319
  if (isNotDirectory || isSymbolicLink) {
320
- tnp_core_1.rimraf.sync(destMaybe);
320
+ lib_2.rimraf.sync(destMaybe);
321
321
  }
322
322
  }
323
- options = tnp_core_1._.merge({
323
+ options = lib_2._.merge({
324
324
  overwrite: true,
325
325
  recursive: true,
326
326
  }, options);
@@ -329,11 +329,11 @@ class HelpersFileFolders {
329
329
  options['dereference'] = true;
330
330
  }
331
331
  try {
332
- tnp_core_1.fse.copySync(source, destination, options);
332
+ lib_2.fse.copySync(source, destination, options);
333
333
  }
334
334
  catch (error) {
335
- tnp_core_1.rimraf.sync(destination);
336
- tnp_core_1.fse.copySync(source, destination, options);
335
+ lib_2.rimraf.sync(destination);
336
+ lib_2.fse.copySync(source, destination, options);
337
337
  }
338
338
  //#endregion
339
339
  }
@@ -352,23 +352,23 @@ class HelpersFileFolders {
352
352
  // };
353
353
  move(from, to) {
354
354
  //#region @backendFunc
355
- if (!tnp_core_1.fse.existsSync(from)) {
355
+ if (!lib_2.fse.existsSync(from)) {
356
356
  index_1.Helpers.warn(`[move] File or folder doesnt not exists: ${from}`);
357
357
  return;
358
358
  }
359
- if (!tnp_core_1.path.isAbsolute(from)) {
359
+ if (!lib_2.path.isAbsolute(from)) {
360
360
  index_1.Helpers.warn(`[move] Source path is not absolute: ${from}`);
361
361
  return;
362
362
  }
363
- if (!tnp_core_1.path.isAbsolute(to)) {
363
+ if (!lib_2.path.isAbsolute(to)) {
364
364
  index_1.Helpers.warn(`[move] Destination path is not absolute: ${to}`);
365
365
  return;
366
366
  }
367
367
  if (index_1.Helpers.isUnexistedLink(to)) {
368
368
  index_1.Helpers.remove(to);
369
369
  }
370
- if (index_1.Helpers.isUnexistedLink(tnp_core_1.path.dirname(to))) {
371
- index_1.Helpers.remove(tnp_core_1.path.dirname(to));
370
+ if (index_1.Helpers.isUnexistedLink(lib_2.path.dirname(to))) {
371
+ index_1.Helpers.remove(lib_2.path.dirname(to));
372
372
  }
373
373
  // if (!Helpers.exists(path.dirname(to))) {
374
374
  // if (Helpers.isUnexistedLink(path.dirname(to))) {
@@ -386,7 +386,7 @@ class HelpersFileFolders {
386
386
  // }
387
387
  while (true) {
388
388
  try {
389
- tnp_core_1.fse.moveSync(from, to, {
389
+ lib_2.fse.moveSync(from, to, {
390
390
  overwrite: true,
391
391
  });
392
392
  break;
@@ -394,7 +394,7 @@ class HelpersFileFolders {
394
394
  catch (error) {
395
395
  if (global['tnpNonInteractive']) {
396
396
  console.log(error);
397
- index_1.Helpers.error(`[${tnp_config_1.config.frameworkName}-helpers] Not able to move files
397
+ index_1.Helpers.error(`[${lib_1.config.frameworkName}-helpers] Not able to move files
398
398
 
399
399
  from: ${from}
400
400
  to: ${to}
@@ -416,9 +416,9 @@ to: ${to}
416
416
  findChildren(location, createFn, options) {
417
417
  //#region @backendFunc
418
418
  const { allowAllNames } = options || {};
419
- let folders = index_1.Helpers.values(tnp_config_1.config.folder);
419
+ let folders = index_1.Helpers.values(lib_1.config.folder);
420
420
  folders = folders.filter(f => ![
421
- tnp_config_1.config.folder.shared,
421
+ lib_1.config.folder.shared,
422
422
  // TODO add something more here ?
423
423
  ].includes(f));
424
424
  const notAllowed = [
@@ -442,16 +442,16 @@ to: ${to}
442
442
  ]),
443
443
  ]
444
444
  .filter(f => {
445
- return ![tnp_config_1.config.folder.external].includes(f) && tnp_core_1._.isString(f);
445
+ return ![lib_1.config.folder.external].includes(f) && lib_2._.isString(f);
446
446
  })
447
447
  .map(s => new RegExp(`^${index_1.Helpers.escapeStringForRegEx(s)}$`));
448
- const isDirectory = (source) => tnp_core_1.fse.lstatSync(source).isDirectory();
449
- const getDirectories = (source) => tnp_core_1.fse
448
+ const isDirectory = (source) => lib_2.fse.lstatSync(source).isDirectory();
449
+ const getDirectories = (source) => lib_2.fse
450
450
  .readdirSync(source)
451
- .map(name => tnp_core_1.path.join(source, name))
451
+ .map(name => lib_2.path.join(source, name))
452
452
  .filter(isDirectory);
453
453
  let subdirectories = getDirectories(location).filter(f => {
454
- const folderNam = tnp_core_1.path.basename(f);
454
+ const folderNam = lib_2.path.basename(f);
455
455
  const allowed = notAllowed.filter(p => p.test(folderNam)).length === 0;
456
456
  return allowed;
457
457
  });
@@ -469,13 +469,13 @@ to: ${to}
469
469
  */
470
470
  findChildrenNavi(location, createFn) {
471
471
  //#region @backendFunc
472
- if (!tnp_core_1.fse.existsSync(location)) {
472
+ if (!lib_2.fse.existsSync(location)) {
473
473
  return [];
474
474
  }
475
475
  const notAllowed = [
476
476
  '.vscode',
477
477
  'node_modules',
478
- ...index_1.Helpers.values(tnp_config_1.config.folder),
478
+ ...index_1.Helpers.values(lib_1.config.folder),
479
479
  'e2e',
480
480
  'tmp.*',
481
481
  'dist.*',
@@ -489,13 +489,13 @@ to: ${to}
489
489
  'bin',
490
490
  'custom',
491
491
  ].map(s => new RegExp(s));
492
- const isDirectory = source => tnp_core_1.fse.lstatSync(source).isDirectory();
493
- const getDirectories = source => tnp_core_1.fse
492
+ const isDirectory = source => lib_2.fse.lstatSync(source).isDirectory();
493
+ const getDirectories = source => lib_2.fse
494
494
  .readdirSync(source)
495
- .map(name => tnp_core_1.path.join(source, name))
495
+ .map(name => lib_2.path.join(source, name))
496
496
  .filter(isDirectory);
497
497
  let subdirectories = getDirectories(location).filter(f => {
498
- const folderName = tnp_core_1.path.basename(f);
498
+ const folderName = lib_2.path.basename(f);
499
499
  if (/.*es\-.*/.test(folderName)) {
500
500
  return true;
501
501
  }
@@ -517,16 +517,16 @@ to: ${to}
517
517
  options = options ? options : {};
518
518
  // const withNameOnly = options.withNameOnly;
519
519
  let files = [];
520
- const readedFilesAndFolders = tnp_core_1.fse.existsSync(dir)
521
- ? tnp_core_1.fse.readdirSync(dir)
520
+ const readedFilesAndFolders = lib_2.fse.existsSync(dir)
521
+ ? lib_2.fse.readdirSync(dir)
522
522
  : [];
523
523
  const readed = readedFilesAndFolders
524
524
  .map(relativePathToFile => {
525
- const fullPath = (0, tnp_core_1.crossPlatformPath)([dir, relativePathToFile]);
525
+ const fullPath = (0, lib_2.crossPlatformPath)([dir, relativePathToFile]);
526
526
  // console.log(`is direcotry ${fse.lstatSync(fullPath).isDirectory()} `, fullPath)
527
- if (tnp_core_1.fse.lstatSync(fullPath).isDirectory()) {
528
- if (ommitFolders.includes(tnp_core_1.path.basename(fullPath)) ||
529
- ommitFolders.includes(tnp_core_1.path.basename(tnp_core_1.path.dirname(fullPath)))) {
527
+ if (lib_2.fse.lstatSync(fullPath).isDirectory()) {
528
+ if (ommitFolders.includes(lib_2.path.basename(fullPath)) ||
529
+ ommitFolders.includes(lib_2.path.basename(lib_2.path.dirname(fullPath)))) {
530
530
  // Helpers.log(`Omitting: ${fullPath}`)
531
531
  }
532
532
  else {
@@ -548,7 +548,7 @@ to: ${to}
548
548
  const notAllowed = [
549
549
  '^.vscode$',
550
550
  '^node_modules$',
551
- ...index_1.Helpers.values(tnp_config_1.config.tempFolders).map(v => `^${v}$`),
551
+ ...index_1.Helpers.values(lib_1.config.tempFolders).map(v => `^${v}$`),
552
552
  '^e2e$',
553
553
  '^tmp.*',
554
554
  '^dist.*',
@@ -568,7 +568,7 @@ to: ${to}
568
568
  getLinesFromFiles(filename, lineCount) {
569
569
  //#region @backendFunc
570
570
  return new Promise((resolve, reject) => {
571
- let stream = tnp_core_1.fse.createReadStream(filename, {
571
+ let stream = lib_2.fse.createReadStream(filename, {
572
572
  flags: 'r',
573
573
  encoding: 'utf-8',
574
574
  fd: null,
@@ -610,7 +610,7 @@ to: ${to}
610
610
  // ctime = creation time is used
611
611
  // replace with mtime for modification time
612
612
  // console.log( `${fse.statSync(f).mtimeMs} for ${f}` )
613
- return tnp_core_1.fse.statSync(f).mtimeMs;
613
+ return lib_2.fse.statSync(f).mtimeMs;
614
614
  });
615
615
  //#endregion
616
616
  }
@@ -618,60 +618,60 @@ to: ${to}
618
618
  //#region @backendFunc
619
619
  const allFiles = index_1.Helpers.getRecrusiveFilesFrom(dir);
620
620
  const mrf = index_1.Helpers.getMostRecentFileName(dir);
621
- const mfrMtime = tnp_core_1.fse.lstatSync(mrf).mtimeMs;
621
+ const mfrMtime = lib_2.fse.lstatSync(mrf).mtimeMs;
622
622
  return allFiles.filter(f => {
623
- const info = tnp_core_1.fse.lstatSync(f);
623
+ const info = lib_2.fse.lstatSync(f);
624
624
  return info.mtimeMs === mfrMtime && !info.isDirectory();
625
625
  });
626
626
  //#endregion
627
627
  }
628
628
  removeExcept(fromPath, exceptFolderAndFiles) {
629
629
  //#region @backendFunc
630
- tnp_core_1.fse
630
+ lib_2.fse
631
631
  .readdirSync(fromPath)
632
632
  .filter(f => {
633
633
  return !exceptFolderAndFiles.includes(f);
634
634
  })
635
- .map(f => tnp_core_1.path.join(fromPath, f))
635
+ .map(f => lib_2.path.join(fromPath, f))
636
636
  .forEach(af => index_1.Helpers.removeFolderIfExists(af));
637
637
  glob
638
638
  .sync(`${fromPath}/*.*`)
639
639
  .filter(f => {
640
- return !exceptFolderAndFiles.includes(tnp_core_1.path.basename(f));
640
+ return !exceptFolderAndFiles.includes(lib_2.path.basename(f));
641
641
  })
642
642
  .forEach(af => index_1.Helpers.removeFileIfExists(af));
643
643
  //#endregion
644
644
  }
645
645
  copy(sourceDir, destinationDir, options) {
646
646
  //#region @backendFunc
647
- if (tnp_core_1._.isArray(sourceDir)) {
648
- sourceDir = (0, tnp_core_1.crossPlatformPath)(sourceDir);
647
+ if (lib_2._.isArray(sourceDir)) {
648
+ sourceDir = (0, lib_2.crossPlatformPath)(sourceDir);
649
649
  }
650
- if (tnp_core_1._.isArray(destinationDir)) {
651
- destinationDir = (0, tnp_core_1.crossPlatformPath)(destinationDir);
650
+ if (lib_2._.isArray(destinationDir)) {
651
+ destinationDir = (0, lib_2.crossPlatformPath)(destinationDir);
652
652
  }
653
653
  // sourceDir = sourceDir ? (sourceDir.replace(/\/$/, '')) : sourceDir;
654
654
  // destinationDir = destinationDir ? (destinationDir.replace(/\/$/, '')) : destinationDir;
655
- if (!tnp_core_1.fse.existsSync(sourceDir)) {
655
+ if (!lib_2.fse.existsSync(sourceDir)) {
656
656
  index_1.Helpers.warn(`[taon-helper][copy] Source dir doesnt exist: ${sourceDir} for destination: ${destinationDir}`);
657
657
  return;
658
658
  }
659
- if (!tnp_core_1.fse.existsSync(tnp_core_1.path.dirname(destinationDir))) {
660
- if (index_1.Helpers.isUnexistedLink(tnp_core_1.path.dirname(destinationDir))) {
661
- index_1.Helpers.removeFileIfExists(tnp_core_1.path.dirname(destinationDir));
659
+ if (!lib_2.fse.existsSync(lib_2.path.dirname(destinationDir))) {
660
+ if (index_1.Helpers.isUnexistedLink(lib_2.path.dirname(destinationDir))) {
661
+ index_1.Helpers.removeFileIfExists(lib_2.path.dirname(destinationDir));
662
662
  }
663
- index_1.Helpers.mkdirp(tnp_core_1.path.dirname(destinationDir));
663
+ index_1.Helpers.mkdirp(lib_2.path.dirname(destinationDir));
664
664
  }
665
665
  if (!options) {
666
666
  options = {};
667
667
  }
668
- if (tnp_core_1._.isUndefined(options.overwrite)) {
668
+ if (lib_2._.isUndefined(options.overwrite)) {
669
669
  options.overwrite = true;
670
670
  }
671
- if (tnp_core_1._.isUndefined(options.recursive)) {
671
+ if (lib_2._.isUndefined(options.recursive)) {
672
672
  options.recursive = true;
673
673
  }
674
- if (tnp_core_1._.isUndefined(options.useTempFolder)) {
674
+ if (lib_2._.isUndefined(options.useTempFolder)) {
675
675
  options.useTempFolder = false;
676
676
  }
677
677
  if (options.copySymlinksAsFiles) {
@@ -694,11 +694,11 @@ to: ${to}
694
694
  // `);
695
695
  // return;
696
696
  // }
697
- if (tnp_core_1._.isArray(options.omitFolders) &&
697
+ if (lib_2._.isArray(options.omitFolders) &&
698
698
  options.omitFolders.length >= 1 &&
699
- tnp_core_1._.isNil(options.filter) &&
700
- tnp_core_1._.isString(options.omitFoldersBaseFolder) &&
701
- tnp_core_1.path.isAbsolute(options.omitFoldersBaseFolder)) {
699
+ lib_2._.isNil(options.filter) &&
700
+ lib_2._.isString(options.omitFoldersBaseFolder) &&
701
+ lib_2.path.isAbsolute(options.omitFoldersBaseFolder)) {
702
702
  options.filter = index_1.Helpers.filterDontCopy(options.omitFolders, options.omitFoldersBaseFolder);
703
703
  }
704
704
  if (options.copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst) {
@@ -710,9 +710,9 @@ to: ${to}
710
710
  }
711
711
  }
712
712
  }
713
- if ((0, tnp_core_1.crossPlatformPath)(sourceDir) === (0, tnp_core_1.crossPlatformPath)(destinationDir) ||
714
- (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.resolve(sourceDir)) ===
715
- (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.resolve(destinationDir))) {
713
+ if ((0, lib_2.crossPlatformPath)(sourceDir) === (0, lib_2.crossPlatformPath)(destinationDir) ||
714
+ (0, lib_2.crossPlatformPath)(lib_2.path.resolve(sourceDir)) ===
715
+ (0, lib_2.crossPlatformPath)(lib_2.path.resolve(destinationDir))) {
716
716
  index_1.Helpers.warn(`[taon-helper][copy] Trying to copy same source and destination
717
717
  from: ${sourceDir}
718
718
  to: ${destinationDir}
@@ -725,16 +725,16 @@ to: ${to}
725
725
  // Helpers.log(JSON.stringify(options))
726
726
  // try {
727
727
  if (options.useTempFolder) {
728
- let tempDestination = `${tnp_core_1.os.platform() === 'darwin' ? '/private/tmp' : '/tmp'}/${tnp_core_1._.camelCase(destinationDir)}`;
728
+ let tempDestination = `${lib_2.os.platform() === 'darwin' ? '/private/tmp' : '/tmp'}/${lib_2._.camelCase(destinationDir)}`;
729
729
  index_1.Helpers.removeFolderIfExists(tempDestination);
730
- tnp_core_1.fse.copySync(sourceDir, tempDestination, options);
731
- tnp_core_1.fse.copySync(tempDestination, destinationDir, options);
730
+ lib_2.fse.copySync(sourceDir, tempDestination, options);
731
+ lib_2.fse.copySync(tempDestination, destinationDir, options);
732
732
  }
733
733
  else {
734
- if ((0, tnp_core_1.crossPlatformPath)(sourceDir) ===
735
- (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.resolve(sourceDir)) &&
734
+ if ((0, lib_2.crossPlatformPath)(sourceDir) ===
735
+ (0, lib_2.crossPlatformPath)(lib_2.path.resolve(sourceDir)) &&
736
736
  index_1.Helpers.isExistedSymlink(sourceDir) &&
737
- !index_1.Helpers.exists(tnp_core_1.fse.readlinkSync(sourceDir))) {
737
+ !index_1.Helpers.exists(lib_2.fse.readlinkSync(sourceDir))) {
738
738
  index_1.Helpers.warn(`[taon-helpers] Not copying empty link from: ${sourceDir}
739
739
  `);
740
740
  }
@@ -748,8 +748,8 @@ to: ${to}
748
748
  const from = files[index];
749
749
  const to = from.replace(sourceDir, destinationDir);
750
750
  if (index_1.Helpers.isFolder(from)) {
751
- if (options.omitFolders.includes(tnp_core_1.path.basename(tnp_core_1.path.dirname(from))) ||
752
- options.omitFolders.includes(tnp_core_1.path.basename(from))) {
751
+ if (options.omitFolders.includes(lib_2.path.basename(lib_2.path.dirname(from))) ||
752
+ options.omitFolders.includes(lib_2.path.basename(from))) {
753
753
  continue;
754
754
  }
755
755
  else {
@@ -781,7 +781,7 @@ to: ${to}
781
781
  copyRecFn(sourceDir);
782
782
  }
783
783
  else {
784
- tnp_core_1.fse.copySync(sourceDir, destinationDir, options);
784
+ lib_2.fse.copySync(sourceDir, destinationDir, options);
785
785
  }
786
786
  }
787
787
  catch (error) {
@@ -789,9 +789,9 @@ to: ${to}
789
789
  index_1.Helpers.log(error);
790
790
  if (!options.dontAskOnError) {
791
791
  index_1.Helpers.error(`[taon-helper] Not able to copy folder:
792
- from: ${(0, tnp_core_1.crossPlatformPath)(sourceDir)}
793
- to: ${(0, tnp_core_1.crossPlatformPath)(destinationDir)}
794
- options: ${tnp_core_1.json5.stringify(options)}
792
+ from: ${(0, lib_2.crossPlatformPath)(sourceDir)}
793
+ to: ${(0, lib_2.crossPlatformPath)(destinationDir)}
794
+ options: ${lib_2.json5.stringify(options)}
795
795
  error: ${error?.message}
796
796
  `, !exitOnError);
797
797
  index_1.Helpers.pressKeyAndContinue(`Press any key to repeat copy action...`);
@@ -828,16 +828,16 @@ to: ${to}
828
828
  //#region @backendFunc
829
829
  return (src, dest) => {
830
830
  // console.log('src', src)
831
- src = (0, tnp_core_1.crossPlatformPath)(src);
832
- const baseFolder = tnp_core_1._.first((0, tnp_core_1.crossPlatformPath)(src)
833
- .replace((0, tnp_core_1.crossPlatformPath)(projectOrBasepath), '')
831
+ src = (0, lib_2.crossPlatformPath)(src);
832
+ const baseFolder = lib_2._.first((0, lib_2.crossPlatformPath)(src)
833
+ .replace((0, lib_2.crossPlatformPath)(projectOrBasepath), '')
834
834
  .replace(/^\//, '')
835
835
  .split('/'));
836
836
  // console.log('baseFolder', baseFolder)
837
837
  if (!baseFolder || baseFolder.trim() === '') {
838
838
  return true;
839
839
  }
840
- const isAllowed = tnp_core_1._.isUndefined(basePathFoldersTosSkip.find(f => baseFolder.startsWith((0, tnp_core_1.crossPlatformPath)(f))));
840
+ const isAllowed = lib_2._.isUndefined(basePathFoldersTosSkip.find(f => baseFolder.startsWith((0, lib_2.crossPlatformPath)(f))));
841
841
  // console.log('isAllowed', isAllowed)
842
842
  return isAllowed;
843
843
  };
@@ -846,42 +846,42 @@ to: ${to}
846
846
  filterOnlyCopy(basePathFoldersOnlyToInclude, projectOrBasepath) {
847
847
  //#region @backendFunc
848
848
  return (src, dest) => {
849
- src = (0, tnp_core_1.crossPlatformPath)(src);
850
- const baseFolder = tnp_core_1._.first((0, tnp_core_1.crossPlatformPath)(src)
851
- .replace((0, tnp_core_1.crossPlatformPath)(projectOrBasepath), '')
849
+ src = (0, lib_2.crossPlatformPath)(src);
850
+ const baseFolder = lib_2._.first((0, lib_2.crossPlatformPath)(src)
851
+ .replace((0, lib_2.crossPlatformPath)(projectOrBasepath), '')
852
852
  .replace(/^\//, '')
853
853
  .split('/'));
854
854
  if (!baseFolder || baseFolder.trim() === '') {
855
855
  return true;
856
856
  }
857
- const isAllowed = !tnp_core_1._.isUndefined(basePathFoldersOnlyToInclude.find(f => baseFolder.startsWith((0, tnp_core_1.crossPlatformPath)(f))));
857
+ const isAllowed = !lib_2._.isUndefined(basePathFoldersOnlyToInclude.find(f => baseFolder.startsWith((0, lib_2.crossPlatformPath)(f))));
858
858
  return isAllowed;
859
859
  };
860
860
  //#endregion
861
861
  }
862
862
  copyFile(sourcePath, destinationPath, options) {
863
863
  //#region @backendFunc
864
- if (tnp_core_1._.isUndefined(options)) {
864
+ if (lib_2._.isUndefined(options)) {
865
865
  options = {};
866
866
  }
867
- if (tnp_core_1._.isUndefined(options.debugMode)) {
867
+ if (lib_2._.isUndefined(options.debugMode)) {
868
868
  options.debugMode = false;
869
869
  }
870
- if (tnp_core_1._.isUndefined(options.debugMode)) {
870
+ if (lib_2._.isUndefined(options.debugMode)) {
871
871
  options.fast = true;
872
872
  }
873
- if (tnp_core_1._.isUndefined(options.dontCopySameContent)) {
873
+ if (lib_2._.isUndefined(options.dontCopySameContent)) {
874
874
  options.dontCopySameContent = true;
875
875
  }
876
876
  const { debugMode, fast, transformTextFn, dontCopySameContent } = options;
877
- if (tnp_core_1._.isFunction(transformTextFn) && fast) {
877
+ if (lib_2._.isFunction(transformTextFn) && fast) {
878
878
  index_1.Helpers.error(`[taon-helpers][copyFile] You cannot use transformTextFn in fast mode`);
879
879
  }
880
- if (!tnp_core_1.fse.existsSync(sourcePath)) {
880
+ if (!lib_2.fse.existsSync(sourcePath)) {
881
881
  index_1.Helpers.logWarn(`[taon-helpers][copyFile] No able to find source of ${sourcePath}`);
882
882
  return false;
883
883
  }
884
- if (tnp_core_1.fse.lstatSync(sourcePath).isDirectory()) {
884
+ if (lib_2.fse.lstatSync(sourcePath).isDirectory()) {
885
885
  index_1.Helpers.warn(`[taon-helpers][copyFile] Trying to copy directory as file: ${sourcePath}`, false);
886
886
  return false;
887
887
  }
@@ -889,25 +889,25 @@ to: ${to}
889
889
  index_1.Helpers.warn(`[taon-helpers][copyFile] Trying to copy same file ${sourcePath}`);
890
890
  return false;
891
891
  }
892
- let destDirPath = tnp_core_1.path.dirname(destinationPath);
892
+ let destDirPath = lib_2.path.dirname(destinationPath);
893
893
  if (index_1.Helpers.isFolder(destinationPath)) {
894
894
  index_1.Helpers.removeFolderIfExists(destinationPath);
895
895
  }
896
896
  if (!index_1.Helpers.isSymlinkFileExitedOrUnexisted(destDirPath) &&
897
- !tnp_core_1.fse.existsSync(destDirPath)) {
897
+ !lib_2.fse.existsSync(destDirPath)) {
898
898
  index_1.Helpers.mkdirp(destDirPath);
899
899
  }
900
900
  //#region it is good code
901
901
  if (index_1.Helpers.isExistedSymlink(destDirPath)) {
902
- destDirPath = tnp_core_1.fse.realpathSync(destDirPath);
903
- const newDestinationPath = (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.join(destDirPath, tnp_core_1.path.basename(destinationPath)));
902
+ destDirPath = lib_2.fse.realpathSync(destDirPath);
903
+ const newDestinationPath = (0, lib_2.crossPlatformPath)(lib_2.path.join(destDirPath, lib_2.path.basename(destinationPath)));
904
904
  if (index_1.Helpers.isFolder(newDestinationPath)) {
905
905
  index_1.Helpers.removeFolderIfExists(newDestinationPath);
906
906
  }
907
907
  destinationPath = newDestinationPath;
908
908
  }
909
909
  //#endregion
910
- if (dontCopySameContent && tnp_core_1.fse.existsSync(destinationPath)) {
910
+ if (dontCopySameContent && lib_2.fse.existsSync(destinationPath)) {
911
911
  const destinationContent = index_1.Helpers.readFile(destinationPath);
912
912
  const sourceContent = index_1.Helpers.readFile(sourcePath).toString();
913
913
  if (destinationContent === sourceContent) {
@@ -917,13 +917,13 @@ to: ${to}
917
917
  }
918
918
  }
919
919
  debugMode &&
920
- index_1.Helpers.log(`path.extname(sourcePath) ${tnp_core_1.path.extname(sourcePath)}`);
921
- if (fast || !tnp_config_1.extAllowedToReplace.includes(tnp_core_1.path.extname(sourcePath))) {
922
- tnp_core_1.fse.copyFileSync(sourcePath, destinationPath);
920
+ index_1.Helpers.log(`path.extname(sourcePath) ${lib_2.path.extname(sourcePath)}`);
921
+ if (fast || !lib_1.extAllowedToReplace.includes(lib_2.path.extname(sourcePath))) {
922
+ lib_2.fse.copyFileSync(sourcePath, destinationPath);
923
923
  }
924
924
  else {
925
925
  let sourceData = index_1.Helpers.readFile(sourcePath).toString();
926
- if (tnp_core_1._.isFunction(transformTextFn)) {
926
+ if (lib_2._.isFunction(transformTextFn)) {
927
927
  sourceData = transformTextFn(sourceData);
928
928
  }
929
929
  debugMode &&
@@ -944,12 +944,12 @@ ${sourceData}
944
944
  resolve(fileOrFolderPath) {
945
945
  //#region @backendFunc
946
946
  if (fileOrFolderPath.startsWith('~')) {
947
- fileOrFolderPath = (0, tnp_core_1.crossPlatformPath)([
948
- tnp_core_1.os.homedir(),
947
+ fileOrFolderPath = (0, lib_2.crossPlatformPath)([
948
+ lib_2.os.homedir(),
949
949
  fileOrFolderPath.replace(`~/`, ''),
950
950
  ]);
951
951
  }
952
- return (0, tnp_core_1.crossPlatformPath)(tnp_core_1.path.resolve(fileOrFolderPath));
952
+ return (0, lib_2.crossPlatformPath)(lib_2.path.resolve(fileOrFolderPath));
953
953
  //#endregion
954
954
  }
955
955
  }