tnp-helpers 16.100.8 → 16.100.10

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 (105) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/README.md +24 -24
  3. package/browser/esm2022/lib/base/base-db.mjs +48 -0
  4. package/browser/esm2022/lib/base/base-project-resolver.mjs +9 -27
  5. package/browser/esm2022/lib/base/base-project.mjs +73 -13
  6. package/browser/esm2022/lib/base/commit-data.mjs +22 -5
  7. package/browser/esm2022/lib/base/config-database.mjs +42 -0
  8. package/browser/esm2022/lib/base/linked-project.mjs +2 -1
  9. package/browser/esm2022/lib/base/project-database.mjs +18 -0
  10. package/browser/esm2022/lib/helpers/helpers-array-obj.mjs +1 -1
  11. package/browser/esm2022/lib/lowdb/adapters/Memory.mjs +26 -0
  12. package/browser/esm2022/lib/lowdb/core/Low.mjs +49 -0
  13. package/browser/esm2022/lib/lowdb/index.mjs +4 -0
  14. package/browser/fesm2022/tnp-helpers.mjs +190 -26
  15. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  16. package/browser/lib/base/base-db.d.ts +12 -0
  17. package/browser/lib/base/base-project-resolver.d.ts +9 -14
  18. package/browser/lib/base/base-project.d.ts +5 -4
  19. package/browser/lib/base/config-database.d.ts +15 -0
  20. package/browser/lib/base/project-database.d.ts +13 -0
  21. package/browser/lib/lowdb/adapters/Memory.d.ts +12 -0
  22. package/browser/lib/lowdb/core/Low.d.ts +25 -0
  23. package/browser/lib/lowdb/index.d.ts +3 -0
  24. package/client/README.md +24 -24
  25. package/client/esm2022/lib/base/base-db.mjs +48 -0
  26. package/client/esm2022/lib/base/base-project-resolver.mjs +9 -27
  27. package/client/esm2022/lib/base/base-project.mjs +73 -13
  28. package/client/esm2022/lib/base/commit-data.mjs +22 -5
  29. package/client/esm2022/lib/base/config-database.mjs +42 -0
  30. package/client/esm2022/lib/base/linked-project.mjs +2 -1
  31. package/client/esm2022/lib/base/project-database.mjs +18 -0
  32. package/client/esm2022/lib/helpers/helpers-array-obj.mjs +1 -1
  33. package/client/esm2022/lib/lowdb/adapters/Memory.mjs +26 -0
  34. package/client/esm2022/lib/lowdb/core/Low.mjs +49 -0
  35. package/client/esm2022/lib/lowdb/index.mjs +4 -0
  36. package/client/fesm2022/tnp-helpers.mjs +190 -26
  37. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  38. package/client/lib/base/base-db.d.ts +12 -0
  39. package/client/lib/base/base-project-resolver.d.ts +9 -14
  40. package/client/lib/base/base-project.d.ts +5 -4
  41. package/client/lib/base/config-database.d.ts +15 -0
  42. package/client/lib/base/project-database.d.ts +13 -0
  43. package/client/lib/lowdb/adapters/Memory.d.ts +12 -0
  44. package/client/lib/lowdb/core/Low.d.ts +25 -0
  45. package/client/lib/lowdb/index.d.ts +3 -0
  46. package/client/package.json +30 -30
  47. package/firedev.jsonc +61 -61
  48. package/lib/base/base-command-line.backend.d.ts +4 -0
  49. package/lib/base/base-command-line.backend.js +129 -20
  50. package/lib/base/base-command-line.backend.js.map +1 -1
  51. package/lib/base/base-db.d.ts +12 -0
  52. package/lib/base/base-db.js +74 -0
  53. package/lib/base/base-db.js.map +1 -0
  54. package/lib/base/base-project-resolver.d.ts +8 -12
  55. package/lib/base/base-project-resolver.js +8 -50
  56. package/lib/base/base-project-resolver.js.map +1 -1
  57. package/lib/base/base-project.d.ts +9 -6
  58. package/lib/base/base-project.js +283 -216
  59. package/lib/base/base-project.js.map +1 -1
  60. package/lib/base/base-start-config.backend.js +1 -1
  61. package/lib/base/base-start-config.backend.js.map +1 -1
  62. package/lib/base/command-line-feature.backend.d.ts +3 -1
  63. package/lib/base/command-line-feature.backend.js +2 -1
  64. package/lib/base/command-line-feature.backend.js.map +1 -1
  65. package/lib/base/commit-data.js +46 -24
  66. package/lib/base/commit-data.js.map +1 -1
  67. package/lib/base/config-database.d.ts +14 -0
  68. package/lib/base/config-database.js +74 -0
  69. package/lib/base/config-database.js.map +1 -0
  70. package/lib/base/linked-project.js.map +1 -1
  71. package/lib/base/project-database.d.ts +14 -0
  72. package/lib/base/project-database.js +31 -0
  73. package/lib/base/project-database.js.map +1 -0
  74. package/lib/helpers/for-backend/helpers-git.backend.js +1 -1
  75. package/lib/helpers/for-backend/helpers-git.backend.js.map +1 -1
  76. package/lib/helpers/for-browser/angular.helper.js +3 -3
  77. package/lib/helpers/helpers-array-obj.js +1 -0
  78. package/lib/helpers/helpers-array-obj.js.map +1 -1
  79. package/lib/old/base-component.js +3 -3
  80. package/lib/old/base-formly-component.js +3 -3
  81. package/lib/old/dual-component-ctrl.js +3 -3
  82. package/package.json +4 -4
  83. package/tmp-environment.json +34 -34
  84. package/websql/README.md +24 -24
  85. package/websql/esm2022/lib/base/base-db.mjs +48 -0
  86. package/websql/esm2022/lib/base/base-project-resolver.mjs +9 -27
  87. package/websql/esm2022/lib/base/base-project.mjs +73 -13
  88. package/websql/esm2022/lib/base/commit-data.mjs +22 -5
  89. package/websql/esm2022/lib/base/config-database.mjs +42 -0
  90. package/websql/esm2022/lib/base/linked-project.mjs +2 -1
  91. package/websql/esm2022/lib/base/project-database.mjs +18 -0
  92. package/websql/esm2022/lib/helpers/helpers-array-obj.mjs +1 -1
  93. package/websql/esm2022/lib/lowdb/adapters/Memory.mjs +26 -0
  94. package/websql/esm2022/lib/lowdb/core/Low.mjs +49 -0
  95. package/websql/esm2022/lib/lowdb/index.mjs +4 -0
  96. package/websql/fesm2022/tnp-helpers.mjs +192 -28
  97. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  98. package/websql/lib/base/base-db.d.ts +12 -0
  99. package/websql/lib/base/base-project-resolver.d.ts +9 -14
  100. package/websql/lib/base/base-project.d.ts +5 -4
  101. package/websql/lib/base/config-database.d.ts +15 -0
  102. package/websql/lib/base/project-database.d.ts +13 -0
  103. package/websql/lib/lowdb/adapters/Memory.d.ts +12 -0
  104. package/websql/lib/lowdb/core/Low.d.ts +25 -0
  105. package/websql/lib/lowdb/index.d.ts +3 -0
@@ -33,10 +33,6 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
33
33
  //#region fields
34
34
  this.cache = {};
35
35
  this.type = 'unknow';
36
- /**
37
- * general name for project company
38
- */
39
- this.orgName = 'firedev';
40
36
  //#endregion
41
37
  //#region getters & methods / to string
42
38
  this.toString = function () {
@@ -75,7 +71,33 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
75
71
  return result;
76
72
  // return result.reverse(); // Reverse the result to get the correct order
77
73
  };
78
- //#endregion
74
+ Object.defineProperty(BaseProject.prototype, "embeddedProject", {
75
+ //#endregion
76
+ get: function () {
77
+ var _this = this;
78
+ var nearsetProj = this.ins.nearestTo((0, tnp_core_1.crossPlatformPath)([this.location, '..']));
79
+ var linkedPorj = nearsetProj.linkedProjects.find(function (l) {
80
+ return _this.location === (0, tnp_core_1.crossPlatformPath)([nearsetProj.location, l.relativeClonePath]);
81
+ });
82
+ if (!linkedPorj) {
83
+ return;
84
+ }
85
+ var pathToEmbededProj = (0, tnp_core_1.crossPlatformPath)([nearsetProj.location, linkedPorj.relativeClonePath, linkedPorj.internalRealtiveProjectPath || '']);
86
+ var embdedresult = this.ins.From(pathToEmbededProj);
87
+ return embdedresult;
88
+ },
89
+ enumerable: false,
90
+ configurable: true
91
+ });
92
+ Object.defineProperty(BaseProject.prototype, "projectsDbLocation", {
93
+ get: function () {
94
+ //#region @backendFunc
95
+ return this.ins.projectsDb.projectsDbLocation;
96
+ //#endregion
97
+ },
98
+ enumerable: false,
99
+ configurable: true
100
+ });
79
101
  //#region static / save location to db
80
102
  BaseProject.prototype.saveLocationToDB = function () {
81
103
  return tslib_1.__awaiter(this, void 0, void 0, function () {
@@ -83,10 +105,9 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
83
105
  var _this = this;
84
106
  return tslib_1.__generator(this, function (_a) {
85
107
  switch (_a.label) {
86
- case 0: return [4 /*yield*/, this.ins.useDB(tnp_core_2._.kebabCase(this.orgName))];
108
+ case 0: return [4 /*yield*/, this.ins.projectsDb.useDB()];
87
109
  case 1:
88
110
  db = _a.sent();
89
- debugger;
90
111
  existed = db.data.projects.find(function (f) { return f.location === _this.location; });
91
112
  if (!!existed) return [3 /*break*/, 5];
92
113
  _a.label = 2;
@@ -96,7 +117,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
96
117
  if (data.projects.length > 50) {
97
118
  data.projects.shift();
98
119
  }
99
- return data.projects.push({
120
+ data.projects.push({
100
121
  location: _this.location,
101
122
  });
102
123
  })];
@@ -112,18 +133,74 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
112
133
  });
113
134
  });
114
135
  };
136
+ //#endregion
137
+ //#region methods & getters
138
+ BaseProject.prototype.saveAllLinkedProjectsToDB = function () {
139
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
140
+ var proj, _a, _b, link, linkedPorj, e_1_1;
141
+ var e_1, _c;
142
+ return tslib_1.__generator(this, function (_d) {
143
+ switch (_d.label) {
144
+ case 0:
145
+ proj = this;
146
+ return [4 /*yield*/, proj.saveLocationToDB()];
147
+ case 1:
148
+ _d.sent();
149
+ _d.label = 2;
150
+ case 2:
151
+ _d.trys.push([2, 8, 9, 10]);
152
+ _a = tslib_1.__values(proj.linkedProjects), _b = _a.next();
153
+ _d.label = 3;
154
+ case 3:
155
+ if (!!_b.done) return [3 /*break*/, 7];
156
+ link = _b.value;
157
+ linkedPorj = this.ins.From([proj.location, link.relativeClonePath, link.internalRealtiveProjectPath || '']);
158
+ if (!linkedPorj) return [3 /*break*/, 5];
159
+ return [4 /*yield*/, linkedPorj.saveLocationToDB()];
160
+ case 4:
161
+ _d.sent();
162
+ return [3 /*break*/, 6];
163
+ case 5:
164
+ index_1.Helpers.warn("Folder ".concat(link.relativeClonePath, " is missing projects..."));
165
+ _d.label = 6;
166
+ case 6:
167
+ _b = _a.next();
168
+ return [3 /*break*/, 3];
169
+ case 7: return [3 /*break*/, 10];
170
+ case 8:
171
+ e_1_1 = _d.sent();
172
+ e_1 = { error: e_1_1 };
173
+ return [3 /*break*/, 10];
174
+ case 9:
175
+ try {
176
+ if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
177
+ }
178
+ finally { if (e_1) throw e_1.error; }
179
+ return [7 /*endfinally*/];
180
+ case 10: return [2 /*return*/];
181
+ }
182
+ });
183
+ });
184
+ };
185
+ Object.defineProperty(BaseProject.prototype, "isMonorepo", {
186
+ //#region methods & getters / is monorepo
187
+ get: function () {
188
+ return false;
189
+ },
190
+ enumerable: false,
191
+ configurable: true
192
+ });
115
193
  Object.defineProperty(BaseProject.prototype, "core", {
116
194
  //#endregion
117
- //#region methods & getters
118
195
  //#region getters & methods / core
119
196
  get: function () {
120
197
  var _this = this;
121
198
  if (this.cache['core']) {
122
199
  return this.cache['core'];
123
200
  }
124
- var proj = index_1.CoreProject.coreProjects.find(function (p) { return p.recognizedFn(_this); });
125
- this.cache['core'] = proj;
126
- return proj;
201
+ var coreProject = index_1.CoreProject.coreProjects.find(function (p) { return p.recognizedFn(_this); });
202
+ this.cache['core'] = coreProject;
203
+ return coreProject;
127
204
  },
128
205
  enumerable: false,
129
206
  configurable: true
@@ -141,7 +218,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
141
218
  //#endregion
142
219
  //#region methods & getters / add linked projects
143
220
  BaseProject.prototype.addLinkedProjects = function (linkedProjs) {
144
- var e_1, _a;
221
+ var e_2, _a;
145
222
  try {
146
223
  //#region @backendFunc
147
224
  for (var linkedProjs_1 = tslib_1.__values(linkedProjs), linkedProjs_1_1 = linkedProjs_1.next(); !linkedProjs_1_1.done; linkedProjs_1_1 = linkedProjs_1.next()) {
@@ -149,12 +226,12 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
149
226
  this.addLinkedProject(linkedProj);
150
227
  }
151
228
  }
152
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
229
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
153
230
  finally {
154
231
  try {
155
232
  if (linkedProjs_1_1 && !linkedProjs_1_1.done && (_a = linkedProjs_1.return)) _a.call(linkedProjs_1);
156
233
  }
157
- finally { if (e_1) throw e_1.error; }
234
+ finally { if (e_2) throw e_2.error; }
158
235
  }
159
236
  //#endregion
160
237
  };
@@ -268,112 +345,78 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
268
345
  configurable: true
269
346
  });
270
347
  //#endregion
348
+ //#region getters & methods / reset linked projects only to core branches
349
+ BaseProject.prototype.resetLinkedProjectsOnlyToCoreBranches = function () {
350
+ return false;
351
+ };
352
+ //#endregion
271
353
  //#region getters & methods / get unexisted projects
272
354
  BaseProject.prototype.cloneUnexistedLinkedProjects = function (actionType, cloneChildren) {
273
355
  if (cloneChildren === void 0) { cloneChildren = false; }
274
356
  return tslib_1.__awaiter(this, void 0, void 0, function () {
275
- var detectedLinkedProjects, _loop_1, this_1, detectedLinkedProjects_1, detectedLinkedProjects_1_1, detectedLinkedProject, e_2_1, projectsThatShouldBeLinked, _a, projectsThatShouldBeLinked_1, projectsThatShouldBeLinked_1_1, linkedProj, e_3_1;
276
- var e_2, _b, e_3, _c;
277
- return tslib_1.__generator(this, function (_d) {
278
- switch (_d.label) {
357
+ var detectedLinkedProjects, projectsThatShouldBeLinked, _a, projectsThatShouldBeLinked_1, projectsThatShouldBeLinked_1_1, linkedProj, childProjLocaiton, childProj, e_3_1;
358
+ var e_3, _b;
359
+ return tslib_1.__generator(this, function (_c) {
360
+ switch (_c.label) {
279
361
  case 0:
280
362
  //#region @backendFunc
281
363
  if (actionType === 'push' && this.automaticallyAddAllChnagesWhenPushingToGit()) {
282
364
  return [2 /*return*/];
283
365
  }
284
- index_1.Helpers.taskStarted("Checking linked projects in ".concat(this.genericName));
285
366
  detectedLinkedProjects = this.detectedLinkedProjects;
286
- _loop_1 = function (detectedLinkedProject) {
287
- return tslib_1.__generator(this, function (_e) {
288
- switch (_e.label) {
289
- case 0:
290
- if (this_1.linkedProjects.find(function (f) { return f.relativeClonePath === detectedLinkedProject.relativeClonePath; })) {
291
- return [2 /*return*/, "continue"];
292
- }
293
- return [4 /*yield*/, index_1.Helpers.questionYesNo("Do you want to remove unexisted linked project ".concat(detectedLinkedProject.relativeClonePath, " ?"))];
294
- case 1:
295
- if (_e.sent()) {
296
- index_1.Helpers.taskStarted("Removing unexisted project ".concat(detectedLinkedProject.relativeClonePath));
297
- index_1.Helpers.removeFolderIfExists(this_1.pathFor(detectedLinkedProject.relativeClonePath));
298
- index_1.Helpers.taskDone("Removed unexisted project ".concat(detectedLinkedProject.relativeClonePath));
299
- }
300
- return [2 /*return*/];
301
- }
302
- });
303
- };
304
- this_1 = this;
305
- _d.label = 1;
306
- case 1:
307
- _d.trys.push([1, 6, 7, 8]);
308
- detectedLinkedProjects_1 = tslib_1.__values(detectedLinkedProjects), detectedLinkedProjects_1_1 = detectedLinkedProjects_1.next();
309
- _d.label = 2;
310
- case 2:
311
- if (!!detectedLinkedProjects_1_1.done) return [3 /*break*/, 5];
312
- detectedLinkedProject = detectedLinkedProjects_1_1.value;
313
- return [5 /*yield**/, _loop_1(detectedLinkedProject)];
314
- case 3:
315
- _d.sent();
316
- _d.label = 4;
317
- case 4:
318
- detectedLinkedProjects_1_1 = detectedLinkedProjects_1.next();
319
- return [3 /*break*/, 2];
320
- case 5: return [3 /*break*/, 8];
321
- case 6:
322
- e_2_1 = _d.sent();
323
- e_2 = { error: e_2_1 };
324
- return [3 /*break*/, 8];
325
- case 7:
326
- try {
327
- if (detectedLinkedProjects_1_1 && !detectedLinkedProjects_1_1.done && (_b = detectedLinkedProjects_1.return)) _b.call(detectedLinkedProjects_1);
328
- }
329
- finally { if (e_2) throw e_2.error; }
330
- return [7 /*endfinally*/];
331
- case 8:
332
- index_1.Helpers.taskDone("Checking linked projects done in ".concat(this.genericName));
333
367
  projectsThatShouldBeLinked = this.linkedProjects
334
368
  .map(function (linkedProj) {
335
369
  return detectedLinkedProjects.find(function (f) { return f.relativeClonePath === linkedProj.relativeClonePath; }) ? void 0 : linkedProj;
336
- }).filter(function (f) { return !!f; });
337
- if (!(projectsThatShouldBeLinked.length > 0)) return [3 /*break*/, 18];
370
+ })
371
+ .filter(function (f) { return !!f; });
372
+ if (!(projectsThatShouldBeLinked.length > 0)) return [3 /*break*/, 11];
338
373
  index_1.Helpers.info("\n\n".concat(projectsThatShouldBeLinked.map(function (p, index) {
339
374
  return "- ".concat(index + 1, ". ").concat(tnp_core_3.chalk.bold(p.relativeClonePath), " ").concat(p.remoteUrl(), " {").concat(p.purpose ? " purpose: ".concat(p.purpose, " }") : '');
340
375
  }).join('\n'), "\n\n "));
376
+ if (!!this.isMonorepo) return [3 /*break*/, 11];
341
377
  _a = cloneChildren;
342
- if (_a) return [3 /*break*/, 10];
378
+ if (_a) return [3 /*break*/, 2];
343
379
  return [4 /*yield*/, index_1.Helpers.questionYesNo("Do you want to clone above (missing) linked projects ?")];
344
- case 9:
345
- _a = (_d.sent());
346
- _d.label = 10;
347
- case 10:
348
- if (!_a) return [3 /*break*/, 18];
349
- _d.label = 11;
350
- case 11:
351
- _d.trys.push([11, 16, 17, 18]);
380
+ case 1:
381
+ _a = (_c.sent());
382
+ _c.label = 2;
383
+ case 2:
384
+ if (!_a) return [3 /*break*/, 11];
385
+ _c.label = 3;
386
+ case 3:
387
+ _c.trys.push([3, 9, 10, 11]);
352
388
  projectsThatShouldBeLinked_1 = tslib_1.__values(projectsThatShouldBeLinked), projectsThatShouldBeLinked_1_1 = projectsThatShouldBeLinked_1.next();
353
- _d.label = 12;
354
- case 12:
355
- if (!!projectsThatShouldBeLinked_1_1.done) return [3 /*break*/, 15];
389
+ _c.label = 4;
390
+ case 4:
391
+ if (!!projectsThatShouldBeLinked_1_1.done) return [3 /*break*/, 8];
356
392
  linkedProj = projectsThatShouldBeLinked_1_1.value;
393
+ // console.log({linkedProj})
357
394
  index_1.Helpers.info("Cloning unexisted project from url ".concat(tnp_core_3.chalk.bold(linkedProj.remoteUrl()), " to ").concat(linkedProj.relativeClonePath));
358
395
  return [4 /*yield*/, this.git.clone(linkedProj.remoteUrl(), linkedProj.relativeClonePath, linkedProj.deafultBranch)];
359
- case 13:
360
- _d.sent();
361
- _d.label = 14;
362
- case 14:
396
+ case 5:
397
+ _c.sent();
398
+ childProjLocaiton = this.pathFor([linkedProj.relativeClonePath, linkedProj.internalRealtiveProjectPath]);
399
+ childProj = this.ins.From(childProjLocaiton);
400
+ if (!childProj) return [3 /*break*/, 7];
401
+ return [4 /*yield*/, childProj.saveLocationToDB()];
402
+ case 6:
403
+ _c.sent();
404
+ _c.label = 7;
405
+ case 7:
363
406
  projectsThatShouldBeLinked_1_1 = projectsThatShouldBeLinked_1.next();
364
- return [3 /*break*/, 12];
365
- case 15: return [3 /*break*/, 18];
366
- case 16:
367
- e_3_1 = _d.sent();
407
+ return [3 /*break*/, 4];
408
+ case 8: return [3 /*break*/, 11];
409
+ case 9:
410
+ e_3_1 = _c.sent();
368
411
  e_3 = { error: e_3_1 };
369
- return [3 /*break*/, 18];
370
- case 17:
412
+ return [3 /*break*/, 11];
413
+ case 10:
371
414
  try {
372
- if (projectsThatShouldBeLinked_1_1 && !projectsThatShouldBeLinked_1_1.done && (_c = projectsThatShouldBeLinked_1.return)) _c.call(projectsThatShouldBeLinked_1);
415
+ if (projectsThatShouldBeLinked_1_1 && !projectsThatShouldBeLinked_1_1.done && (_b = projectsThatShouldBeLinked_1.return)) _b.call(projectsThatShouldBeLinked_1);
373
416
  }
374
417
  finally { if (e_3) throw e_3.error; }
375
418
  return [7 /*endfinally*/];
376
- case 18: return [2 /*return*/];
419
+ case 11: return [2 /*return*/];
377
420
  }
378
421
  });
379
422
  });
@@ -651,7 +694,8 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
651
694
  parent ? parent.basename : tnp_core_1.path.basename(this.location),
652
695
  this.basename,
653
696
  //#region @backend
654
- "(".concat(tnp_cli_1.CLI.chalk.bold(this.name), ")"),
697
+ "(".concat(tnp_cli_1.CLI.chalk.bold.underline(this.name), ")"),
698
+ "(type=".concat(tnp_cli_1.CLI.chalk.italic.bold(this.type), ")"),
655
699
  //#endregion
656
700
  ]
657
701
  .filter(function (f) { return !!f; })
@@ -995,57 +1039,63 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
995
1039
  //#endregion
996
1040
  //#region methods & getters / reset process
997
1041
  BaseProject.prototype.resetProcess = function (overrideBranch, recrusive) {
1042
+ var _a;
998
1043
  if (recrusive === void 0) { recrusive = false; }
999
1044
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1000
- var defaultBranch, childrenRepos, childrenRepos_1, childrenRepos_1_1, child, e_4_1;
1001
- var e_4, _a;
1002
- return tslib_1.__generator(this, function (_b) {
1003
- switch (_b.label) {
1045
+ var branchToReset, _b, _c, linked, child, e_4_1;
1046
+ var e_4, _d;
1047
+ return tslib_1.__generator(this, function (_e) {
1048
+ switch (_e.label) {
1004
1049
  case 0:
1005
1050
  //#region @backend
1051
+ // console.log(`CORE PROJECT BRANCH ${this.name}: ${this.core?.branch}, overrideBranch: ${overrideBranch}`)
1006
1052
  index_1.Helpers.taskStarted("Starting reset process for ".concat(this.genericName));
1007
1053
  this._beforeAnyActionOnGitRoot();
1008
- defaultBranch = overrideBranch
1054
+ branchToReset = overrideBranch
1009
1055
  ? overrideBranch : this.getDefaultDevelopmentBranch();
1056
+ if (this.resetLinkedProjectsOnlyToCoreBranches() && ((_a = this.core) === null || _a === void 0 ? void 0 : _a.branch)) {
1057
+ branchToReset = this.core.branch;
1058
+ }
1010
1059
  index_1.Helpers.info("fetch data in ".concat(this.genericName));
1011
1060
  this.git.fetch();
1012
1061
  index_1.Helpers.logInfo("reseting hard in ".concat(this.genericName));
1013
1062
  this.git.resetHard();
1014
- index_1.Helpers.logInfo("checking out branch \"".concat(defaultBranch, "\" in ").concat(this.genericName));
1015
- this.git.checkout(defaultBranch);
1063
+ index_1.Helpers.logInfo("checking out branch \"".concat(branchToReset, "\" in ").concat(this.genericName));
1064
+ this.git.checkout(branchToReset);
1016
1065
  index_1.Helpers.logInfo("pulling current branch in ".concat(this.genericName));
1017
1066
  return [4 /*yield*/, this.git.pullCurrentBranch({ askToRetry: true })];
1018
1067
  case 1:
1019
- _b.sent();
1068
+ _e.sent();
1020
1069
  index_1.Helpers.logInfo("initing (struct) in ".concat(this.genericName));
1021
1070
  return [4 /*yield*/, this.struct()];
1022
1071
  case 2:
1023
- _b.sent();
1024
- index_1.Helpers.taskDone("RESET DONE BRANCH: ".concat(tnp_core_3.chalk.bold(defaultBranch), " in ").concat(this.genericName));
1025
- childrenRepos = this.children.filter(function (f) { return f.git.isInsideGitRepo && f.git.isGitRoot; });
1026
- _b.label = 3;
1072
+ _e.sent();
1073
+ index_1.Helpers.taskDone("RESET DONE BRANCH: ".concat(tnp_core_3.chalk.bold(branchToReset), " in ").concat(this.genericName));
1074
+ _e.label = 3;
1027
1075
  case 3:
1028
- _b.trys.push([3, 8, 9, 10]);
1029
- childrenRepos_1 = tslib_1.__values(childrenRepos), childrenRepos_1_1 = childrenRepos_1.next();
1030
- _b.label = 4;
1076
+ _e.trys.push([3, 8, 9, 10]);
1077
+ _b = tslib_1.__values(this.linkedProjects), _c = _b.next();
1078
+ _e.label = 4;
1031
1079
  case 4:
1032
- if (!!childrenRepos_1_1.done) return [3 /*break*/, 7];
1033
- child = childrenRepos_1_1.value;
1034
- return [4 /*yield*/, child.resetProcess(overrideBranch, true)];
1080
+ if (!!_c.done) return [3 /*break*/, 7];
1081
+ linked = _c.value;
1082
+ child = this.ins.From(this.pathFor([linked.relativeClonePath]));
1083
+ if (!child) return [3 /*break*/, 6];
1084
+ return [4 /*yield*/, child.resetProcess(child.resetLinkedProjectsOnlyToCoreBranches() ? void 0 : branchToReset, true)];
1035
1085
  case 5:
1036
- _b.sent();
1037
- _b.label = 6;
1086
+ _e.sent();
1087
+ _e.label = 6;
1038
1088
  case 6:
1039
- childrenRepos_1_1 = childrenRepos_1.next();
1089
+ _c = _b.next();
1040
1090
  return [3 /*break*/, 4];
1041
1091
  case 7: return [3 /*break*/, 10];
1042
1092
  case 8:
1043
- e_4_1 = _b.sent();
1093
+ e_4_1 = _e.sent();
1044
1094
  e_4 = { error: e_4_1 };
1045
1095
  return [3 /*break*/, 10];
1046
1096
  case 9:
1047
1097
  try {
1048
- if (childrenRepos_1_1 && !childrenRepos_1_1.done && (_a = childrenRepos_1.return)) _a.call(childrenRepos_1);
1098
+ if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
1049
1099
  }
1050
1100
  finally { if (e_4) throw e_4.error; }
1051
1101
  return [7 /*endfinally*/];
@@ -1059,7 +1109,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1059
1109
  BaseProject.prototype.pullProcess = function (cloneChildren) {
1060
1110
  if (cloneChildren === void 0) { cloneChildren = false; }
1061
1111
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1062
- var uncommitedChanges, location, childrenRepos, childrenRepos_2, childrenRepos_2_1, child, e_5_1;
1112
+ var uncommitedChanges, location, childrenRepos, childrenRepos_1, childrenRepos_1_1, child, e_5_1;
1063
1113
  var e_5, _a;
1064
1114
  return tslib_1.__generator(this, function (_b) {
1065
1115
  switch (_b.label) {
@@ -1088,35 +1138,41 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1088
1138
  location = this.location;
1089
1139
  this.ins.unload(this);
1090
1140
  this.ins.add(this.ins.From(location));
1091
- if (!(this.automaticallyAddAllChnagesWhenPushingToGit() || cloneChildren)) return [3 /*break*/, 10];
1092
- childrenRepos = this.children.filter(function (f) { return f.git.isInsideGitRepo && f.git.isGitRoot; });
1093
- _b.label = 3;
1141
+ return [4 /*yield*/, this.saveLocationToDB()];
1094
1142
  case 3:
1095
- _b.trys.push([3, 8, 9, 10]);
1096
- childrenRepos_2 = tslib_1.__values(childrenRepos), childrenRepos_2_1 = childrenRepos_2.next();
1143
+ _b.sent();
1144
+ if (!(this.automaticallyAddAllChnagesWhenPushingToGit() || cloneChildren)) return [3 /*break*/, 11];
1145
+ childrenRepos = this.children.filter(function (f) { return f.git.isInsideGitRepo && f.git.isGitRoot; });
1097
1146
  _b.label = 4;
1098
1147
  case 4:
1099
- if (!!childrenRepos_2_1.done) return [3 /*break*/, 7];
1100
- child = childrenRepos_2_1.value;
1101
- return [4 /*yield*/, child.pullProcess()];
1148
+ _b.trys.push([4, 9, 10, 11]);
1149
+ childrenRepos_1 = tslib_1.__values(childrenRepos), childrenRepos_1_1 = childrenRepos_1.next();
1150
+ _b.label = 5;
1102
1151
  case 5:
1103
- _b.sent();
1104
- _b.label = 6;
1152
+ if (!!childrenRepos_1_1.done) return [3 /*break*/, 8];
1153
+ child = childrenRepos_1_1.value;
1154
+ return [4 /*yield*/, child.pullProcess()];
1105
1155
  case 6:
1106
- childrenRepos_2_1 = childrenRepos_2.next();
1107
- return [3 /*break*/, 4];
1108
- case 7: return [3 /*break*/, 10];
1109
- case 8:
1156
+ _b.sent();
1157
+ _b.label = 7;
1158
+ case 7:
1159
+ childrenRepos_1_1 = childrenRepos_1.next();
1160
+ return [3 /*break*/, 5];
1161
+ case 8: return [3 /*break*/, 11];
1162
+ case 9:
1110
1163
  e_5_1 = _b.sent();
1111
1164
  e_5 = { error: e_5_1 };
1112
- return [3 /*break*/, 10];
1113
- case 9:
1165
+ return [3 /*break*/, 11];
1166
+ case 10:
1114
1167
  try {
1115
- if (childrenRepos_2_1 && !childrenRepos_2_1.done && (_a = childrenRepos_2.return)) _a.call(childrenRepos_2);
1168
+ if (childrenRepos_1_1 && !childrenRepos_1_1.done && (_a = childrenRepos_1.return)) _a.call(childrenRepos_1);
1116
1169
  }
1117
1170
  finally { if (e_5) throw e_5.error; }
1118
1171
  return [7 /*endfinally*/];
1119
- case 10: return [2 /*return*/];
1172
+ case 11: return [4 /*yield*/, this.saveAllLinkedProjectsToDB()];
1173
+ case 12:
1174
+ _b.sent();
1175
+ return [2 /*return*/];
1120
1176
  }
1121
1177
  });
1122
1178
  });
@@ -1127,7 +1183,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1127
1183
  var _a;
1128
1184
  if (options === void 0) { options = {}; }
1129
1185
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1130
- var force, typeofCommit, forcePushNoQuestion, origin, exitCallBack, args, commitMessageRequired, commitData, error_2, childrenRepos, childrenRepos_3, childrenRepos_3_1, child, e_6_1;
1186
+ var force, typeofCommit, forcePushNoQuestion, origin, exitCallBack, args, commitMessageRequired, commitData, error_2, childrenRepos, childrenRepos_2, childrenRepos_2_1, child, e_6_1;
1131
1187
  var _b, _c, _d, e_6, _e;
1132
1188
  return tslib_1.__generator(this, function (_f) {
1133
1189
  switch (_f.label) {
@@ -1136,46 +1192,49 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1136
1192
  return [4 /*yield*/, this._beforePushProcessAction()];
1137
1193
  case 1:
1138
1194
  _f.sent();
1139
- return [4 /*yield*/, this._getCommitMessage(typeofCommit, args, commitMessageRequired)];
1195
+ return [4 /*yield*/, this.saveLocationToDB()];
1140
1196
  case 2:
1141
- commitData = _f.sent();
1142
- _f.label = 3;
1197
+ _f.sent();
1198
+ return [4 /*yield*/, this._getCommitMessage(typeofCommit, args, commitMessageRequired)];
1143
1199
  case 3:
1144
- if (!true) return [3 /*break*/, 9];
1200
+ commitData = _f.sent();
1145
1201
  _f.label = 4;
1146
1202
  case 4:
1147
- _f.trys.push([4, 6, , 8]);
1148
- return [4 /*yield*/, this.lint()];
1203
+ if (!true) return [3 /*break*/, 10];
1204
+ _f.label = 5;
1149
1205
  case 5:
1150
- _f.sent();
1151
- return [3 /*break*/, 9];
1206
+ _f.trys.push([5, 7, , 9]);
1207
+ return [4 /*yield*/, this.lint()];
1152
1208
  case 6:
1209
+ _f.sent();
1210
+ return [3 /*break*/, 10];
1211
+ case 7:
1153
1212
  error_2 = _f.sent();
1154
1213
  index_1.Helpers.warn('Fix your code...');
1155
1214
  return [4 /*yield*/, index_1.Helpers.consoleGui.question.yesNo('Try again lint ? .. (or just skip it)')];
1156
- case 7:
1215
+ case 8:
1157
1216
  if (!(_f.sent())) {
1158
- return [3 /*break*/, 9];
1217
+ return [3 /*break*/, 10];
1159
1218
  }
1160
- return [3 /*break*/, 8];
1161
- case 8: return [3 /*break*/, 3];
1162
- case 9:
1163
- if (!!commitData.isActionCommit) return [3 /*break*/, 13];
1219
+ return [3 /*break*/, 9];
1220
+ case 9: return [3 /*break*/, 4];
1221
+ case 10:
1222
+ if (!!commitData.isActionCommit) return [3 /*break*/, 14];
1164
1223
  index_1.Helpers.info("Current commit:\n - message to include {".concat(commitData.commitMessage, "}\n - branch to checkout {").concat(commitData.branchName, "}\n "));
1165
- if (!(this.git.lastCommitMessage() === commitData.commitMessage)) return [3 /*break*/, 11];
1224
+ if (!(this.git.lastCommitMessage() === commitData.commitMessage)) return [3 /*break*/, 12];
1166
1225
  return [4 /*yield*/, index_1.Helpers.questionYesNo('Soft reset last commit with same message ?')];
1167
- case 10:
1226
+ case 11:
1168
1227
  if (_f.sent()) {
1169
1228
  this.git.resetSoftHEAD(1);
1170
1229
  }
1171
- _f.label = 11;
1172
- case 11: return [4 /*yield*/, index_1.Helpers.questionYesNo('Commit and push this ?')];
1173
- case 12:
1230
+ _f.label = 12;
1231
+ case 12: return [4 /*yield*/, index_1.Helpers.questionYesNo('Commit and push this ?')];
1232
+ case 13:
1174
1233
  if (!(_f.sent())) {
1175
1234
  exitCallBack();
1176
1235
  }
1177
- _f.label = 13;
1178
- case 13:
1236
+ _f.label = 14;
1237
+ case 14:
1179
1238
  if (this.automaticallyAddAllChnagesWhenPushingToGit()) { // my project
1180
1239
  this.git.stageAllFiles();
1181
1240
  }
@@ -1197,41 +1256,44 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1197
1256
  index_1.Helpers.warn("Not commiting anything... ");
1198
1257
  }
1199
1258
  return [4 /*yield*/, this.git.pushCurrentBranch({ force: force, origin: origin, forcePushNoQuestion: forcePushNoQuestion, askToRetry: true })];
1200
- case 14:
1259
+ case 15:
1201
1260
  _f.sent();
1202
- if (!this.automaticallyAddAllChnagesWhenPushingToGit()) return [3 /*break*/, 22];
1261
+ if (!this.automaticallyAddAllChnagesWhenPushingToGit()) return [3 /*break*/, 23];
1203
1262
  if (this.getLinkedProjectsConfig().skipRecrusivePush) {
1204
1263
  index_1.Helpers.warn("Skipping recrusive (children) push for ".concat(this.genericName));
1205
1264
  return [2 /*return*/];
1206
1265
  }
1207
1266
  childrenRepos = this.children.filter(function (f) { return f.git.isInsideGitRepo && f.git.isGitRoot; });
1208
- _f.label = 15;
1209
- case 15:
1210
- _f.trys.push([15, 20, 21, 22]);
1211
- childrenRepos_3 = tslib_1.__values(childrenRepos), childrenRepos_3_1 = childrenRepos_3.next();
1212
1267
  _f.label = 16;
1213
1268
  case 16:
1214
- if (!!childrenRepos_3_1.done) return [3 /*break*/, 19];
1215
- child = childrenRepos_3_1.value;
1216
- return [4 /*yield*/, child.pushProcess(options)];
1269
+ _f.trys.push([16, 21, 22, 23]);
1270
+ childrenRepos_2 = tslib_1.__values(childrenRepos), childrenRepos_2_1 = childrenRepos_2.next();
1271
+ _f.label = 17;
1217
1272
  case 17:
1218
- _f.sent();
1219
- _f.label = 18;
1273
+ if (!!childrenRepos_2_1.done) return [3 /*break*/, 20];
1274
+ child = childrenRepos_2_1.value;
1275
+ return [4 /*yield*/, child.pushProcess(options)];
1220
1276
  case 18:
1221
- childrenRepos_3_1 = childrenRepos_3.next();
1222
- return [3 /*break*/, 16];
1223
- case 19: return [3 /*break*/, 22];
1224
- case 20:
1277
+ _f.sent();
1278
+ _f.label = 19;
1279
+ case 19:
1280
+ childrenRepos_2_1 = childrenRepos_2.next();
1281
+ return [3 /*break*/, 17];
1282
+ case 20: return [3 /*break*/, 23];
1283
+ case 21:
1225
1284
  e_6_1 = _f.sent();
1226
1285
  e_6 = { error: e_6_1 };
1227
- return [3 /*break*/, 22];
1228
- case 21:
1286
+ return [3 /*break*/, 23];
1287
+ case 22:
1229
1288
  try {
1230
- if (childrenRepos_3_1 && !childrenRepos_3_1.done && (_e = childrenRepos_3.return)) _e.call(childrenRepos_3);
1289
+ if (childrenRepos_2_1 && !childrenRepos_2_1.done && (_e = childrenRepos_2.return)) _e.call(childrenRepos_2);
1231
1290
  }
1232
1291
  finally { if (e_6) throw e_6.error; }
1233
1292
  return [7 /*endfinally*/];
1234
- case 22: return [2 /*return*/];
1293
+ case 23: return [4 /*yield*/, this.saveAllLinkedProjectsToDB()];
1294
+ case 24:
1295
+ _f.sent();
1296
+ return [2 /*return*/];
1235
1297
  }
1236
1298
  });
1237
1299
  });
@@ -1400,7 +1462,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1400
1462
  case 3:
1401
1463
  error_3 = _a.sent();
1402
1464
  return [3 /*break*/, 4];
1403
- case 4: return [2 /*return*/];
1465
+ case 4: return [2 /*return*/, (0, tnp_core_1.crossPlatformPath)([clondeFolderpath, destinationFolderName || '']).replace(/\/$/g, '')];
1404
1466
  }
1405
1467
  });
1406
1468
  });
@@ -1798,12 +1860,13 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1798
1860
  * get info about porject
1799
1861
  */
1800
1862
  BaseProject.prototype.info = function () {
1801
- var _a, _b;
1863
+ var _a;
1802
1864
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1803
1865
  var proj;
1804
- return tslib_1.__generator(this, function (_c) {
1866
+ return tslib_1.__generator(this, function (_b) {
1805
1867
  proj = this;
1806
- index_1.Helpers.info("\n\n name: ".concat(proj === null || proj === void 0 ? void 0 : proj.name, "\n type: ").concat(proj === null || proj === void 0 ? void 0 : proj.type, "\n children (").concat(proj === null || proj === void 0 ? void 0 : proj.children.length, "): ").concat((!proj || !proj.children.length) ? '< none >' : '', "\n").concat(proj === null || proj === void 0 ? void 0 : proj.children.map(function (c) { return '+' + c.genericName; }).join('\n'), "\n\nlinked porject prefix: \"").concat(this.linkedProjectsPrefix, "\"\n\nlinked projects from json (").concat(((_a = this.linkedProjects) === null || _a === void 0 ? void 0 : _a.length) || 0, "):\n").concat((this.linkedProjects || []).map(function (c) { return '- ' + c.relativeClonePath; }).join('\n'), "\n\nlinked projects detected (").concat(((_b = this.detectedLinkedProjects) === null || _b === void 0 ? void 0 : _b.length) || 0, "):\n").concat((this.detectedLinkedProjects || []).map(function (c) { return '- ' + c.relativeClonePath; }).join('\n'), "\n\n "));
1868
+ index_1.Helpers.info("\n\n name: ".concat(proj === null || proj === void 0 ? void 0 : proj.name, "\n type: ").concat(proj === null || proj === void 0 ? void 0 : proj.type, "\n children (").concat(proj === null || proj === void 0 ? void 0 : proj.children.length, "): ").concat((!proj || !proj.children.length) ? '< none >' : '', "\n").concat(proj === null || proj === void 0 ? void 0 : proj.children.map(function (c) { return '+' + c.genericName; }).join('\n'), "\n") +
1869
+ "\nlinked porject prefix: \"".concat(this.linkedProjectsPrefix, "\"\n\nlinked projects from json (").concat(((_a = this.linkedProjects) === null || _a === void 0 ? void 0 : _a.length) || 0, "):\n").concat((this.linkedProjects || []).map(function (c) { return '- ' + c.relativeClonePath; }).join('\n'), "\n\n "));
1807
1870
  return [2 /*return*/];
1808
1871
  });
1809
1872
  });
@@ -1851,10 +1914,10 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1851
1914
  var _this = this;
1852
1915
  var _a;
1853
1916
  //#region @backendFunc
1854
- if (!this.pathExists('angular.json')) {
1917
+ if (!this.pathExists(tnp_config_1.config.file.angular_json)) {
1855
1918
  return [];
1856
1919
  }
1857
- var projects = Object.values((_a = index_1.Helpers.readJson(this.pathFor('angular.json'))) === null || _a === void 0 ? void 0 : _a.projects)
1920
+ var projects = Object.values((_a = index_1.Helpers.readJson(this.pathFor(tnp_config_1.config.file.angular_json))) === null || _a === void 0 ? void 0 : _a.projects)
1858
1921
  .filter(function (f) { return f.projectType === 'library'; });
1859
1922
  var libraries = projects.map(function (c) { return _this.ins.From(tnp_core_1.path.join(_this.location, c.root)); });
1860
1923
  return libraries;
@@ -1978,23 +2041,27 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
1978
2041
  BaseProject.prototype.buildLibraries = function (_a) {
1979
2042
  var _b = _a === void 0 ? {} : _a, _c = _b.rebuild, rebuild = _c === void 0 ? false : _c, _d = _b.watch, watch = _d === void 0 ? false : _d, strategy = _b.strategy;
1980
2043
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1981
- var libsToWatch, locationsForNodeModules, libs, _loop_2, this_2, _e, _f, _g, index, lib, _loop_3, _h, _j, _k, index, lib, e_7_1;
2044
+ var libsToWatch, locationsForNodeModules, libs, _loop_1, this_1, _e, _f, _g, index, lib, _loop_2, _h, _j, _k, index, lib, e_7_1;
1982
2045
  var e_8, _l, e_7, _m;
1983
2046
  var _this = this;
1984
2047
  return tslib_1.__generator(this, function (_o) {
1985
2048
  switch (_o.label) {
1986
- case 0:
2049
+ case 0:
2050
+ //#region @backend
2051
+ return [4 /*yield*/, this.saveAllLinkedProjectsToDB()];
2052
+ case 1:
1987
2053
  //#region @backend
2054
+ _o.sent();
1988
2055
  if (!strategy) {
1989
2056
  strategy = 'link';
1990
2057
  }
1991
2058
  libsToWatch = [];
1992
- if (!watch) return [3 /*break*/, 2];
2059
+ if (!watch) return [3 /*break*/, 3];
1993
2060
  return [4 /*yield*/, this.getSortedLibrariesByDepsForBuild()];
1994
- case 1:
1995
- libsToWatch = (_o.sent());
1996
- _o.label = 2;
1997
2061
  case 2:
2062
+ libsToWatch = (_o.sent());
2063
+ _o.label = 3;
2064
+ case 3:
1998
2065
  locationsForNodeModules = [
1999
2066
  this.location,
2000
2067
  // this.parent.location,
@@ -2004,7 +2071,7 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
2004
2071
  this.run('yarn install', { output: true }).sync();
2005
2072
  }
2006
2073
  libs = this.libraries;
2007
- _loop_2 = function (index, lib) {
2074
+ _loop_1 = function (index, lib) {
2008
2075
  index_1.Helpers.info("Building (".concat(index + 1, "/").concat(libs.length, ") ").concat(lib.basename, " (").concat(tnp_core_3.chalk.bold(lib.name), ")"));
2009
2076
  if (strategy === 'link') {
2010
2077
  (function () {
@@ -2045,11 +2112,11 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
2045
2112
  })();
2046
2113
  }
2047
2114
  else if (strategy === 'copy') {
2048
- var sourceDist = this_2.pathFor([tnp_config_1.config.folder.dist, lib.basename]);
2049
- var dest = this_2.pathFor([tnp_config_1.config.folder.node_modules, lib.name]);
2115
+ var sourceDist = this_1.pathFor([tnp_config_1.config.folder.dist, lib.basename]);
2116
+ var dest = this_1.pathFor([tnp_config_1.config.folder.node_modules, lib.name]);
2050
2117
  if (rebuild || !index_1.Helpers.exists(sourceDist)) {
2051
2118
  index_1.Helpers.info("Compiling ".concat(lib.name, " ..."));
2052
- this_2.run(lib.getLibraryBuildComamnd({ watch: false }), { output: true }).sync();
2119
+ this_1.run(lib.getLibraryBuildComamnd({ watch: false }), { output: true }).sync();
2053
2120
  }
2054
2121
  if (index_1.Helpers.isSymlinkFileExitedOrUnexisted(dest)) {
2055
2122
  index_1.Helpers.remove(dest);
@@ -2057,11 +2124,11 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
2057
2124
  index_1.Helpers.copy(sourceDist, dest);
2058
2125
  }
2059
2126
  };
2060
- this_2 = this;
2127
+ this_1 = this;
2061
2128
  try {
2062
2129
  for (_e = tslib_1.__values(this.sortedLibrariesByDeps.entries()), _f = _e.next(); !_f.done; _f = _e.next()) {
2063
2130
  _g = tslib_1.__read(_f.value, 2), index = _g[0], lib = _g[1];
2064
- _loop_2(index, lib);
2131
+ _loop_1(index, lib);
2065
2132
  }
2066
2133
  }
2067
2134
  catch (e_8_1) { e_8 = { error: e_8_1 }; }
@@ -2071,8 +2138,8 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
2071
2138
  }
2072
2139
  finally { if (e_8) throw e_8.error; }
2073
2140
  }
2074
- if (!watch) return [3 /*break*/, 11];
2075
- _loop_3 = function (index, lib) {
2141
+ if (!watch) return [3 /*break*/, 12];
2142
+ _loop_2 = function (index, lib) {
2076
2143
  return tslib_1.__generator(this, function (_p) {
2077
2144
  switch (_p.label) {
2078
2145
  case 0:
@@ -2100,41 +2167,41 @@ var BaseProject = exports.BaseProject = /** @class */ (function () {
2100
2167
  }
2101
2168
  });
2102
2169
  };
2103
- _o.label = 3;
2104
- case 3:
2105
- _o.trys.push([3, 8, 9, 10]);
2106
- _h = tslib_1.__values(libsToWatch.entries()), _j = _h.next();
2107
2170
  _o.label = 4;
2108
2171
  case 4:
2109
- if (!!_j.done) return [3 /*break*/, 7];
2110
- _k = tslib_1.__read(_j.value, 2), index = _k[0], lib = _k[1];
2111
- return [5 /*yield**/, _loop_3(index, lib)];
2172
+ _o.trys.push([4, 9, 10, 11]);
2173
+ _h = tslib_1.__values(libsToWatch.entries()), _j = _h.next();
2174
+ _o.label = 5;
2112
2175
  case 5:
2113
- _o.sent();
2114
- _o.label = 6;
2176
+ if (!!_j.done) return [3 /*break*/, 8];
2177
+ _k = tslib_1.__read(_j.value, 2), index = _k[0], lib = _k[1];
2178
+ return [5 /*yield**/, _loop_2(index, lib)];
2115
2179
  case 6:
2180
+ _o.sent();
2181
+ _o.label = 7;
2182
+ case 7:
2116
2183
  _j = _h.next();
2117
- return [3 /*break*/, 4];
2118
- case 7: return [3 /*break*/, 10];
2119
- case 8:
2184
+ return [3 /*break*/, 5];
2185
+ case 8: return [3 /*break*/, 11];
2186
+ case 9:
2120
2187
  e_7_1 = _o.sent();
2121
2188
  e_7 = { error: e_7_1 };
2122
- return [3 /*break*/, 10];
2123
- case 9:
2189
+ return [3 /*break*/, 11];
2190
+ case 10:
2124
2191
  try {
2125
2192
  if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
2126
2193
  }
2127
2194
  finally { if (e_7) throw e_7.error; }
2128
2195
  return [7 /*endfinally*/];
2129
- case 10:
2196
+ case 11:
2130
2197
  // await this.__indexRebuilder.startAndWatch({ taskName: 'index rebuild watch' });
2131
2198
  index_1.Helpers.success('BUILD DONE.. watching..');
2132
- return [3 /*break*/, 12];
2133
- case 11:
2199
+ return [3 /*break*/, 13];
2200
+ case 12:
2134
2201
  // await this.__indexRebuilder.start({ taskName: 'index rebuild watch' });
2135
2202
  index_1.Helpers.success('BUILD DONE');
2136
- _o.label = 12;
2137
- case 12: return [2 /*return*/];
2203
+ _o.label = 13;
2204
+ case 13: return [2 /*return*/];
2138
2205
  }
2139
2206
  });
2140
2207
  });