tnp-helpers 16.5.16 → 16.5.19

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 (130) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/esm2022/lib/base/base-feature-for-project.mjs +8 -0
  3. package/browser/esm2022/lib/base/base-project-resolver.mjs +204 -0
  4. package/browser/esm2022/lib/base/base-project.mjs +1007 -0
  5. package/browser/esm2022/lib/base/commit-data.mjs +145 -0
  6. package/browser/esm2022/lib/base/index.mjs +11 -0
  7. package/browser/esm2022/lib/base/translate.mjs +42 -0
  8. package/browser/esm2022/lib/helpers.mjs +6 -3
  9. package/browser/esm2022/lib/index.mjs +2 -3
  10. package/browser/esm2022/lib/models.mjs +1 -1
  11. package/browser/fesm2022/tnp-helpers.mjs +860 -84
  12. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  13. package/browser/lib/base/base-feature-for-project.d.ts +6 -0
  14. package/{client/lib → browser/lib/base}/base-project-resolver.d.ts +4 -7
  15. package/browser/lib/base/base-project.d.ts +287 -0
  16. package/browser/lib/base/commit-data.d.ts +31 -0
  17. package/browser/lib/base/index.d.ts +5 -0
  18. package/browser/lib/base/translate.d.ts +2 -0
  19. package/browser/lib/index.d.ts +2 -3
  20. package/browser/lib/models.d.ts +1 -1
  21. package/client/esm2022/lib/base/base-feature-for-project.mjs +8 -0
  22. package/client/esm2022/lib/base/base-project-resolver.mjs +204 -0
  23. package/client/esm2022/lib/base/base-project.mjs +1007 -0
  24. package/client/esm2022/lib/base/commit-data.mjs +145 -0
  25. package/client/esm2022/lib/base/index.mjs +11 -0
  26. package/client/esm2022/lib/base/translate.mjs +42 -0
  27. package/client/esm2022/lib/helpers.mjs +6 -3
  28. package/client/esm2022/lib/index.mjs +2 -3
  29. package/client/esm2022/lib/models.mjs +1 -1
  30. package/client/fesm2022/tnp-helpers.mjs +860 -84
  31. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  32. package/client/lib/base/base-feature-for-project.d.ts +6 -0
  33. package/{browser/lib → client/lib/base}/base-project-resolver.d.ts +4 -7
  34. package/client/lib/base/base-project.d.ts +287 -0
  35. package/client/lib/base/commit-data.d.ts +31 -0
  36. package/client/lib/base/index.d.ts +5 -0
  37. package/client/lib/base/translate.d.ts +2 -0
  38. package/client/lib/index.d.ts +2 -3
  39. package/client/lib/models.d.ts +1 -1
  40. package/client/package.json +37 -34
  41. package/lib/base/base-command-line.backend.d.ts +79 -0
  42. package/lib/base/base-command-line.backend.js +674 -0
  43. package/lib/base/base-command-line.backend.js.map +1 -0
  44. package/lib/base/base-feature-for-project.d.ts +5 -0
  45. package/lib/base/base-feature-for-project.js +11 -0
  46. package/lib/base/base-feature-for-project.js.map +1 -0
  47. package/lib/{base-project-resolver.d.ts → base/base-project-resolver.d.ts} +4 -7
  48. package/lib/{base-project-resolver.js → base/base-project-resolver.js} +33 -28
  49. package/lib/base/base-project-resolver.js.map +1 -0
  50. package/lib/base/base-project.d.ts +297 -0
  51. package/lib/base/base-project.js +1451 -0
  52. package/lib/base/base-project.js.map +1 -0
  53. package/lib/base/base-start-config.backend.d.ts +35 -0
  54. package/lib/base/base-start-config.backend.js +126 -0
  55. package/lib/base/base-start-config.backend.js.map +1 -0
  56. package/lib/base/command-line-feature.backend.d.ts +32 -0
  57. package/lib/base/command-line-feature.backend.js +89 -0
  58. package/lib/base/command-line-feature.backend.js.map +1 -0
  59. package/lib/base/commit-data.d.ts +30 -0
  60. package/lib/base/commit-data.js +200 -0
  61. package/lib/base/commit-data.js.map +1 -0
  62. package/lib/base/index.d.ts +7 -0
  63. package/lib/base/index.js +13 -0
  64. package/lib/base/index.js.map +1 -0
  65. package/lib/base/translate.d.ts +1 -0
  66. package/lib/base/translate.js +80 -0
  67. package/lib/base/translate.js.map +1 -0
  68. package/lib/for-backend/helpers-cli-tool.backend.d.ts +42 -22
  69. package/lib/for-backend/helpers-cli-tool.backend.js +129 -180
  70. package/lib/for-backend/helpers-cli-tool.backend.js.map +1 -1
  71. package/lib/for-backend/helpers-file-folders.backend.d.ts +2 -8
  72. package/lib/for-backend/helpers-file-folders.backend.js +4 -14
  73. package/lib/for-backend/helpers-file-folders.backend.js.map +1 -1
  74. package/lib/for-backend/helpers-git.backend.d.ts +48 -12
  75. package/lib/for-backend/helpers-git.backend.js +227 -142
  76. package/lib/for-backend/helpers-git.backend.js.map +1 -1
  77. package/lib/for-backend/helpers-process.backend.d.ts +5 -11
  78. package/lib/for-backend/helpers-process.backend.js +77 -39
  79. package/lib/for-backend/helpers-process.backend.js.map +1 -1
  80. package/lib/for-backend/helpers-vscode.backend.d.ts +3 -3
  81. package/lib/for-backend/helpers-vscode.backend.js.map +1 -1
  82. package/lib/for-browser/angular.helper.js +3 -3
  83. package/lib/helpers.d.ts +2 -3
  84. package/lib/helpers.js +5 -2
  85. package/lib/helpers.js.map +1 -1
  86. package/lib/index.d.ts +2 -3
  87. package/lib/index.js +1 -2
  88. package/lib/index.js.map +1 -1
  89. package/lib/models.d.ts +1 -1
  90. package/lib/old/base-component.js +3 -3
  91. package/lib/old/base-formly-component.js +3 -3
  92. package/lib/old/dual-component-ctrl.js +3 -3
  93. package/package.json +8 -5
  94. package/package.json_tnp.json5 +4 -1
  95. package/tmp-environment.json +41 -45
  96. package/websql/esm2022/lib/base/base-feature-for-project.mjs +8 -0
  97. package/websql/esm2022/lib/base/base-project-resolver.mjs +203 -0
  98. package/websql/esm2022/lib/base/base-project.mjs +994 -0
  99. package/websql/esm2022/lib/base/commit-data.mjs +145 -0
  100. package/websql/esm2022/lib/base/index.mjs +11 -0
  101. package/websql/esm2022/lib/base/translate.mjs +42 -0
  102. package/websql/esm2022/lib/helpers.mjs +6 -3
  103. package/websql/esm2022/lib/index.mjs +2 -3
  104. package/websql/esm2022/lib/models.mjs +1 -1
  105. package/websql/fesm2022/tnp-helpers.mjs +861 -85
  106. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  107. package/websql/lib/base/base-feature-for-project.d.ts +6 -0
  108. package/websql/lib/{base-project-resolver.d.ts → base/base-project-resolver.d.ts} +4 -7
  109. package/websql/lib/base/base-project.d.ts +287 -0
  110. package/websql/lib/base/commit-data.d.ts +31 -0
  111. package/websql/lib/base/index.d.ts +5 -0
  112. package/websql/lib/base/translate.d.ts +2 -0
  113. package/websql/lib/index.d.ts +2 -3
  114. package/websql/lib/models.d.ts +1 -1
  115. package/browser/esm2022/lib/base-project-resolver.mjs +0 -223
  116. package/browser/esm2022/lib/base-project.mjs +0 -374
  117. package/browser/lib/base-project.d.ts +0 -94
  118. package/client/esm2022/lib/base-project-resolver.mjs +0 -223
  119. package/client/esm2022/lib/base-project.mjs +0 -374
  120. package/client/lib/base-project.d.ts +0 -94
  121. package/lib/base-project-resolver.js.map +0 -1
  122. package/lib/base-project.d.ts +0 -103
  123. package/lib/base-project.js +0 -482
  124. package/lib/base-project.js.map +0 -1
  125. package/lib/git-project.d.ts +0 -57
  126. package/lib/git-project.js +0 -224
  127. package/lib/git-project.js.map +0 -1
  128. package/websql/esm2022/lib/base-project-resolver.mjs +0 -222
  129. package/websql/esm2022/lib/base-project.mjs +0 -361
  130. package/websql/lib/base-project.d.ts +0 -94
@@ -808,7 +808,10 @@ class HelpersFiredev extends CoreHelpers {
808
808
  /* */
809
809
  async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
810
810
  var start = new Date();
811
- await Helpers.runSyncOrAsync(functionToExecute, ...functionArguments);
811
+ await Helpers.runSyncOrAsync({
812
+ functionFn: functionToExecute,
813
+ arrayOfParams: functionArguments
814
+ });
812
815
  //@ts-ignore
813
816
  var end = new Date() - start;
814
817
  if (Helpers.isBrowser) {
@@ -832,7 +835,7 @@ class HelpersFiredev extends CoreHelpers {
832
835
  }
833
836
  waitForCondition(conditionFn, howOfftenCheckInMs = 1000) {
834
837
  return new Promise(async (resolve, reject) => {
835
- const result = await Helpers.runSyncOrAsync(conditionFn);
838
+ const result = await Helpers.runSyncOrAsync({ functionFn: conditionFn });
836
839
  if (result) {
837
840
  resolve(void 0);
838
841
  }
@@ -887,6 +890,9 @@ applyMixins(HelpersFiredev, [
887
890
  ;
888
891
  ({}); // @--end-of-file-for-module=tnp-helpers lib/helpers.ts
889
892
 
893
+ ;
894
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/models.ts
895
+
890
896
  class BaseProjectResolver {
891
897
  constructor(classFn) {
892
898
  this.classFn = classFn;
@@ -904,6 +910,9 @@ class BaseProjectResolver {
904
910
  /* */
905
911
  return (void 0);
906
912
  }
913
+ /**
914
+ * project from process.cwd()
915
+ */
907
916
  get Current() {
908
917
  /* */
909
918
  /* */
@@ -921,7 +930,11 @@ class BaseProjectResolver {
921
930
  /**
922
931
  * override this
923
932
  */
924
- typeFrom(location) {
933
+ typeFrom(location, recrusiveCall = false) {
934
+ /* */
935
+ /* */
936
+ /* */
937
+ /* */
925
938
  /* */
926
939
  /* */
927
940
  /* */
@@ -1080,42 +1093,10 @@ class BaseProjectResolver {
1080
1093
  /* */
1081
1094
  return (void 0);
1082
1095
  }
1083
- /**
1084
- * Resolve child project when accessing from parent container etc...
1085
- * @param args string or string[] from cli args
1086
- * @param CurrentProject project from process.cwd()
1087
- */
1088
- resolveChildProject(args) {
1089
- /* */
1090
- /* */
1091
- /* */
1092
- /* */
1093
- /* */
1094
- /* */
1095
- /* */
1096
- /* */
1097
- /* */
1098
- /* */
1099
- /* */
1100
- /* */
1101
- /* */
1102
- /* */
1103
- /* */
1104
- /* */
1105
- /* */
1106
- /* */
1107
- return (void 0);
1108
- }
1109
1096
  }
1110
1097
  ;
1111
- ({}); // @--end-of-file-for-module=tnp-helpers lib/base-project-resolver.ts
1098
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-project-resolver.ts
1112
1099
 
1113
- /* */
1114
- /* */
1115
- /* */
1116
- /* */
1117
- /* */
1118
- const Helpers$1 = HelpersFiredev.Instance;
1119
1100
  const takenPorts = [];
1120
1101
  class BaseProject {
1121
1102
  static { this.ins = new BaseProjectResolver(BaseProject); }
@@ -1125,7 +1106,7 @@ class BaseProject {
1125
1106
  const result = [];
1126
1107
  const visit = (project) => {
1127
1108
  if (stack[projNameToCompare(project)]) {
1128
- Helpers$1.error(`Circular dependency detected involving project: ${projNameToCompare(project)}`);
1109
+ Helpers.error(`Circular dependency detected involving project: ${projNameToCompare(project)}`);
1129
1110
  }
1130
1111
  if (!visited[projNameToCompare(project)]) {
1131
1112
  visited[projNameToCompare(project)] = true;
@@ -1147,26 +1128,76 @@ class BaseProject {
1147
1128
  return result;
1148
1129
  }
1149
1130
  // @ts-ignore
1150
- constructor(location) {
1131
+ constructor(
1132
+ /**
1133
+ * doesn't need to be real path -> can be link
1134
+ */
1135
+ location) {
1151
1136
  this.location = location;
1152
1137
  this.cache = {};
1138
+ this.type = 'unknow';
1139
+ this.toString = () => {
1140
+ return `${this.name}=>${this.location}`;
1141
+ };
1142
+ }
1143
+ setType(type) {
1144
+ // @ts-ignore
1145
+ this.type = type;
1146
+ }
1147
+ typeIs(...types) {
1148
+ return this.type && types.includes(this.type);
1149
+ }
1150
+ typeIsNot(...types) {
1151
+ return !this.typeIs(...types);
1153
1152
  }
1154
1153
  /**
1155
- * doesn't need to be real path -> can be link
1154
+ * project folder basename
1156
1155
  */
1157
1156
  get basename() {
1158
1157
  /* */
1159
1158
  /* */
1160
1159
  return (void 0);
1161
1160
  }
1161
+ /**
1162
+ * name from package.json
1163
+ */
1162
1164
  get name() {
1163
1165
  return this.packageJSON?.name;
1164
1166
  }
1167
+ /**
1168
+ * version from package.json -> property version
1169
+ */
1165
1170
  get version() {
1166
1171
  return this.packageJSON?.version;
1167
1172
  }
1168
1173
  /**
1169
- * npm dependencies
1174
+ * Major Version from package.json
1175
+ */
1176
+ // @ts-ignore
1177
+ get majorVersion() {
1178
+ /* */
1179
+ /* */
1180
+ return (void 0);
1181
+ }
1182
+ /**
1183
+ * Minor Version from package.json
1184
+ */
1185
+ // @ts-ignore
1186
+ get minorVersion() {
1187
+ /* */
1188
+ /* */
1189
+ /* */
1190
+ return (void 0);
1191
+ }
1192
+ get versionPathAsNumber() {
1193
+ /* */
1194
+ /* */
1195
+ /* */
1196
+ /* */
1197
+ return (void 0);
1198
+ }
1199
+ /**
1200
+ * npm dependencies from package.json
1170
1201
  */
1171
1202
  get dependencies() {
1172
1203
  return (this.packageJSON ? this.packageJSON.dependencies : {}) || {};
@@ -1200,11 +1231,39 @@ class BaseProject {
1200
1231
  ...this.resolutions
1201
1232
  });
1202
1233
  }
1203
- get tnp() {
1204
- return this.packageJSON?.tnp;
1234
+ getFoldersForPossibleProjectChildren() {
1235
+ /* */
1236
+ /* */
1237
+ /* */
1238
+ /* */
1239
+ /* */
1240
+ /* */
1241
+ /* */
1242
+ /* */
1243
+ /* */
1244
+ /* */
1245
+ /* */
1246
+ /* */
1247
+ /* */
1248
+ /* */
1249
+ /* */
1250
+ /* */
1251
+ /* */
1252
+ /* */
1253
+ /* */
1254
+ return (void 0);
1205
1255
  }
1206
- get firedev() {
1207
- return this.packageJSON?.firedev;
1256
+ getAllChildren() {
1257
+ /* */
1258
+ /* */
1259
+ /* */
1260
+ /* */
1261
+ /* */
1262
+ /* */
1263
+ /* */
1264
+ /* */
1265
+ /* */
1266
+ return (void 0);
1208
1267
  }
1209
1268
  /**
1210
1269
  * alias to getAllChildren
@@ -1214,7 +1273,7 @@ class BaseProject {
1214
1273
  /* */
1215
1274
  return (void 0);
1216
1275
  }
1217
- child(nameOrBasename, errors = true) {
1276
+ getChildBy(nameOrBasename, errors = true) {
1218
1277
  /* */
1219
1278
  /* */
1220
1279
  /* */
@@ -1255,24 +1314,6 @@ class BaseProject {
1255
1314
  /* */
1256
1315
  return (void 0);
1257
1316
  }
1258
- /**
1259
- * try run but continue when it fails
1260
- * @param command
1261
- * @param options
1262
- * @returns
1263
- */
1264
- tryRunSync(command
1265
- /* */
1266
- /* */
1267
- ) {
1268
- /* */
1269
- /* */
1270
- /* */
1271
- /* */
1272
- /* */
1273
- /* */
1274
- return (void 0);
1275
- }
1276
1317
  /**
1277
1318
  * same has project.hasFile();
1278
1319
  */
@@ -1283,7 +1324,7 @@ class BaseProject {
1283
1324
  * same as project.pathExists();
1284
1325
  */
1285
1326
  hasFile(relativePath) {
1286
- return Helpers$1.exists(this.pathFor(relativePath));
1327
+ return Helpers.exists(this.pathFor(relativePath));
1287
1328
  }
1288
1329
  /**
1289
1330
  * same as project.pathhasFileExists();
@@ -1291,7 +1332,7 @@ class BaseProject {
1291
1332
  */
1292
1333
  containsFile(fileRelativeToProjectPath) {
1293
1334
  const fullPath = path.resolve(path.join(this.location, fileRelativeToProjectPath));
1294
- return Helpers$1.exists(fullPath);
1335
+ return Helpers.exists(fullPath);
1295
1336
  }
1296
1337
  /**
1297
1338
  * absolute path:
@@ -1316,7 +1357,53 @@ class BaseProject {
1316
1357
  /* */
1317
1358
  return (void 0);
1318
1359
  }
1319
- run(command
1360
+ /**
1361
+ * @deprecated us execute instead
1362
+ * use output from or more preciese crafted api
1363
+ */
1364
+ run(command, options) {
1365
+ /* */
1366
+ /* */
1367
+ /* */
1368
+ /* */
1369
+ /* */
1370
+ /* */
1371
+ /* */
1372
+ /* */
1373
+ /* */
1374
+ /* */
1375
+ /* */
1376
+ /* */
1377
+ /* */
1378
+ /* */
1379
+ /* */
1380
+ return (void 0);
1381
+ }
1382
+ /**
1383
+ * same as run but async
1384
+ */
1385
+ async execute(command, options) {
1386
+ /* */
1387
+ /* */
1388
+ /* */
1389
+ /* */
1390
+ /* */
1391
+ /* */
1392
+ /* */
1393
+ /* */
1394
+ /* */
1395
+ /* */
1396
+ /* */
1397
+ /* */
1398
+ return (void 0);
1399
+ }
1400
+ /**
1401
+ * try run but continue when it fails
1402
+ * @param command
1403
+ * @param options
1404
+ * @returns
1405
+ */
1406
+ tryRunSync(command
1320
1407
  /* */
1321
1408
  /* */
1322
1409
  ) {
@@ -1325,6 +1412,7 @@ class BaseProject {
1325
1412
  /* */
1326
1413
  /* */
1327
1414
  /* */
1415
+ /* */
1328
1416
  return (void 0);
1329
1417
  }
1330
1418
  outputFrom(command
@@ -1344,7 +1432,14 @@ class BaseProject {
1344
1432
  remove(relativePath, exactPath = true) {
1345
1433
  /* */
1346
1434
  /* */
1347
- return (void 0);
1435
+ /* */
1436
+ }
1437
+ removeFolderByRelativePath(relativePathToFolder) {
1438
+ /* */
1439
+ /* */
1440
+ /* */
1441
+ /* */
1442
+ /* */
1348
1443
  }
1349
1444
  linkNodeModulesTo(proj) {
1350
1445
  /* */
@@ -1394,23 +1489,74 @@ class BaseProject {
1394
1489
  /* */
1395
1490
  return (void 0);
1396
1491
  }
1397
- filterOnlyCopy(basePathFoldersOnlyToInclude) {
1492
+ removeItself() {
1493
+ /* */
1494
+ /* */
1495
+ }
1496
+ /**
1497
+ * Purpose: not initializing all classes at the beginning
1498
+ * Only for BaseFeatureForProject class
1499
+ */
1500
+ defineProperty(variableName, classFn, options) {
1501
+ /* */
1502
+ /* */
1503
+ /* */
1504
+ /* */
1505
+ /* */
1506
+ /* */
1507
+ /* */
1508
+ /* */
1509
+ /* */
1510
+ /* */
1511
+ /* */
1512
+ /* */
1513
+ /* */
1514
+ /* */
1515
+ /* */
1516
+ /* */
1517
+ /* */
1518
+ /* */
1519
+ /* */
1520
+ /* */
1521
+ /* */
1522
+ /* */
1523
+ /* */
1524
+ /* */
1525
+ /* */
1398
1526
  /* */
1399
1527
  /* */
1400
1528
  /* */
1401
1529
  return (void 0);
1402
1530
  }
1403
- removeItself() {
1531
+ /**
1532
+ * fs.copy option filter function for copying only selected folders from project
1533
+ */
1534
+ filterOnlyCopy(basePathFoldersOnlyToInclude) {
1404
1535
  /* */
1405
1536
  /* */
1537
+ return (void 0);
1406
1538
  }
1539
+ /**
1540
+ * fs.copy option filter function for copying only not selected folders from project
1541
+ */
1407
1542
  filterDontCopy(basePathFoldersTosSkip) {
1408
- /* */
1409
1543
  /* */
1410
1544
  /* */
1411
1545
  return (void 0);
1412
1546
  }
1413
- defineProperty(variableName, classFn) {
1547
+ getDefaultDevelopmentBranch() {
1548
+ return 'develop';
1549
+ }
1550
+ /**
1551
+ * main/default hardcoded branches
1552
+ */
1553
+ getMainBranches() {
1554
+ return ['master', 'develop', 'stage', 'prod', 'test'];
1555
+ }
1556
+ isUnsingActionCommit() {
1557
+ return false;
1558
+ }
1559
+ async resetProcess(overrideBranch) {
1414
1560
  /* */
1415
1561
  /* */
1416
1562
  /* */
@@ -1436,12 +1582,23 @@ class BaseProject {
1436
1582
  /* */
1437
1583
  /* */
1438
1584
  /* */
1585
+ }
1586
+ async pullProcess() {
1587
+ /* */
1588
+ /* */
1589
+ /* */
1590
+ /* */
1591
+ /* */
1592
+ /* */
1593
+ /* */
1594
+ /* */
1595
+ /* */
1596
+ /* */
1597
+ /* */
1598
+ /* */
1439
1599
  /* */
1440
1600
  /* */
1441
1601
  /* */
1442
- return (void 0);
1443
- }
1444
- getAllChildren() {
1445
1602
  /* */
1446
1603
  /* */
1447
1604
  /* */
@@ -1453,7 +1610,7 @@ class BaseProject {
1453
1610
  /* */
1454
1611
  return (void 0);
1455
1612
  }
1456
- getFoldersForPossibleProjectChildren() {
1613
+ async pushProcess(options = {}) {
1457
1614
  /* */
1458
1615
  /* */
1459
1616
  /* */
@@ -1473,14 +1630,633 @@ class BaseProject {
1473
1630
  /* */
1474
1631
  /* */
1475
1632
  /* */
1476
- return (void 0);
1477
- }
1478
- }
1479
- ;
1480
- ({}); // @--end-of-file-for-module=tnp-helpers lib/base-project.ts
1481
-
1482
- ;
1483
- ({}); // @--end-of-file-for-module=tnp-helpers lib/models.ts
1633
+ /* */
1634
+ /* */
1635
+ /* */
1636
+ /* */
1637
+ /* */
1638
+ /* */
1639
+ /* */
1640
+ /* */
1641
+ /* */
1642
+ /* */
1643
+ /* */
1644
+ /* */
1645
+ /* */
1646
+ /* */
1647
+ /* */
1648
+ /* */
1649
+ /* */
1650
+ /* */
1651
+ /* */
1652
+ /* */
1653
+ /* */
1654
+ /* */
1655
+ /* */
1656
+ /* */
1657
+ /* */
1658
+ /* */
1659
+ /* */
1660
+ /* */
1661
+ /* */
1662
+ /* */
1663
+ /* */
1664
+ /* */
1665
+ /* */
1666
+ /* */
1667
+ /* */
1668
+ /* */
1669
+ /* */
1670
+ /* */
1671
+ /* */
1672
+ /* */
1673
+ /* */
1674
+ /* */
1675
+ /* */
1676
+ /* */
1677
+ /* */
1678
+ /* */
1679
+ return (void 0);
1680
+ }
1681
+ _beforeAnyActionOnGitRoot() {
1682
+ /* */
1683
+ /* */
1684
+ /* */
1685
+ /* */
1686
+ /* */
1687
+ /* */
1688
+ /* */
1689
+ /* */
1690
+ /* */
1691
+ return (void 0);
1692
+ }
1693
+ async _beforePushProcessAction() {
1694
+ /* */
1695
+ /* */
1696
+ /* */
1697
+ /* */
1698
+ /* */
1699
+ /* */
1700
+ /* */
1701
+ /* */
1702
+ /* */
1703
+ /* */
1704
+ /* */
1705
+ return (void 0);
1706
+ }
1707
+ async _beforePullProcessAction() {
1708
+ /* */
1709
+ /* */
1710
+ return (void 0);
1711
+ }
1712
+ async _getCommitMessage(typeofCommit, args, commitMessageRequired) {
1713
+ /* */
1714
+ /* */
1715
+ /* */
1716
+ /* */
1717
+ /* */
1718
+ /* */
1719
+ /* */
1720
+ /* */
1721
+ /* */
1722
+ /* */
1723
+ /* */
1724
+ /* */
1725
+ /* */
1726
+ /* */
1727
+ /* */
1728
+ /* */
1729
+ /* */
1730
+ /* */
1731
+ /* */
1732
+ /* */
1733
+ /* */
1734
+ /* */
1735
+ /* */
1736
+ /* */
1737
+ /* */
1738
+ /* */
1739
+ /* */
1740
+ /* */
1741
+ /* */
1742
+ /* */
1743
+ /* */
1744
+ /* */
1745
+ /* */
1746
+ /* */
1747
+ return (void 0);
1748
+ }
1749
+ linkTo(destPackageLocation) {
1750
+ /* */
1751
+ /* */
1752
+ }
1753
+ writeFile(relativePath, content) {
1754
+ /* */
1755
+ /* */
1756
+ }
1757
+ runCommandGetString(command) {
1758
+ /* */
1759
+ /* */
1760
+ return (void 0);
1761
+ }
1762
+ get git() {
1763
+ const self = this;
1764
+ return {
1765
+ revertFileChanges(fileReletivePath) {
1766
+ /* */
1767
+ /* */
1768
+ return (void 0);
1769
+ },
1770
+ clone(url, destinationFolderName = '') {
1771
+ /* */
1772
+ /* */
1773
+ return (void 0);
1774
+ },
1775
+ restoreLastVersion(localFilePath) {
1776
+ /* */
1777
+ /* */
1778
+ return (void 0);
1779
+ },
1780
+ stageAllFiles() {
1781
+ /* */
1782
+ /* */
1783
+ return (void 0);
1784
+ },
1785
+ stash(optinos) {
1786
+ /* */
1787
+ /* */
1788
+ return (void 0);
1789
+ },
1790
+ stashApply() {
1791
+ /* */
1792
+ /* */
1793
+ return (void 0);
1794
+ },
1795
+ fetch() {
1796
+ /* */
1797
+ /* */
1798
+ return (void 0);
1799
+ },
1800
+ resetFiles(...relativePathes) {
1801
+ /* */
1802
+ /* */
1803
+ return (void 0);
1804
+ },
1805
+ get isGitRepo() {
1806
+ /* */
1807
+ /* */
1808
+ return (void 0);
1809
+ },
1810
+ get isGitRoot() {
1811
+ /* */
1812
+ /* */
1813
+ return (void 0);
1814
+ },
1815
+ get originURL() {
1816
+ /* */
1817
+ /* */
1818
+ return (void 0);
1819
+ },
1820
+ commit(commitMessage) {
1821
+ /* */
1822
+ /* */
1823
+ return (void 0);
1824
+ },
1825
+ /**
1826
+ * alias to stage all and commit
1827
+ */
1828
+ addAndCommit(commitMessage) {
1829
+ /* */
1830
+ /* */
1831
+ return (void 0);
1832
+ },
1833
+ stageAllAndCommit(commitMessage) {
1834
+ /* */
1835
+ /* */
1836
+ return (void 0);
1837
+ },
1838
+ async pushCurrentBranch(options) {
1839
+ /* */
1840
+ /* */
1841
+ return (void 0);
1842
+ },
1843
+ get allOrigins() {
1844
+ /* */
1845
+ /* */
1846
+ return (void 0);
1847
+ },
1848
+ get thereAreSomeUncommitedChange() {
1849
+ /* */
1850
+ /* */
1851
+ return (void 0);
1852
+ },
1853
+ thereAreSomeUncommitedChangeExcept(filesList = []) {
1854
+ /* */
1855
+ /* */
1856
+ return (void 0);
1857
+ },
1858
+ meltActionCommits(soft = false) {
1859
+ /* */
1860
+ /* */
1861
+ },
1862
+ async pullCurrentBranch(options) {
1863
+ /* */
1864
+ /* */
1865
+ return (void 0);
1866
+ },
1867
+ get currentBranchName() {
1868
+ /* */
1869
+ /* */
1870
+ return (void 0);
1871
+ },
1872
+ getBranchesNamesBy(pattern) {
1873
+ /* */
1874
+ /* */
1875
+ return (void 0);
1876
+ },
1877
+ resetSoftHEAD(HEAD = 1) {
1878
+ /* */
1879
+ /* */
1880
+ return (void 0);
1881
+ },
1882
+ resetHard(options) {
1883
+ /* */
1884
+ /* */
1885
+ return (void 0);
1886
+ },
1887
+ countComits() {
1888
+ /* */
1889
+ /* */
1890
+ return (void 0);
1891
+ },
1892
+ hasAnyCommits() {
1893
+ /* */
1894
+ /* */
1895
+ return (void 0);
1896
+ },
1897
+ get isInMergeProcess() {
1898
+ /* */
1899
+ /* */
1900
+ return (void 0);
1901
+ },
1902
+ lastCommitDate() {
1903
+ /* */
1904
+ /* */
1905
+ return (void 0);
1906
+ },
1907
+ lastCommitHash() {
1908
+ /* */
1909
+ /* */
1910
+ return (void 0);
1911
+ },
1912
+ lastCommitMessage() {
1913
+ /* */
1914
+ /* */
1915
+ return (void 0);
1916
+ },
1917
+ penultimageCommitHash() {
1918
+ /* */
1919
+ /* */
1920
+ return (void 0);
1921
+ },
1922
+ checkTagExists(tag) {
1923
+ /* */
1924
+ /* */
1925
+ return (void 0);
1926
+ },
1927
+ checkout(branchName, options) {
1928
+ /* */
1929
+ /* */
1930
+ return (void 0);
1931
+ },
1932
+ checkoutFromTo(checkoutFromBranch, branch, origin = 'origin') {
1933
+ /* */
1934
+ /* */
1935
+ return (void 0);
1936
+ },
1937
+ /**
1938
+ *
1939
+ * @param majorVersion example: v1, v2 etc.
1940
+ * @returns tag name
1941
+ */
1942
+ lastTagNameForMajorVersion(majorVersion) {
1943
+ /* */
1944
+ /* */
1945
+ return (void 0);
1946
+ },
1947
+ lastTagHash() {
1948
+ /* */
1949
+ /* */
1950
+ return (void 0);
1951
+ },
1952
+ get remoteOriginUrl() {
1953
+ /* */
1954
+ /* */
1955
+ return (void 0);
1956
+ },
1957
+ get lastTagVersionName() {
1958
+ /* */
1959
+ /* */
1960
+ return (void 0);
1961
+ },
1962
+ get stagedFiles() {
1963
+ /* */
1964
+ /* */
1965
+ return (void 0);
1966
+ },
1967
+ /**
1968
+ * TODO does this make any sense
1969
+ */
1970
+ renameOrigin(newNameOrUlr) {
1971
+ /* */
1972
+ /* */
1973
+ /* */
1974
+ /* */
1975
+ /* */
1976
+ /* */
1977
+ /* */
1978
+ /* */
1979
+ /* */
1980
+ /* */
1981
+ /* */
1982
+ /* */
1983
+ /* */
1984
+ /* */
1985
+ /* */
1986
+ /* */
1987
+ /* */
1988
+ /* */
1989
+ /* */
1990
+ /* */
1991
+ /* */
1992
+ /* */
1993
+ return (void 0);
1994
+ },
1995
+ };
1996
+ }
1997
+ checkIfLogginInToNpm() {
1998
+ /* */
1999
+ /* */
2000
+ /* */
2001
+ /* */
2002
+ /* */
2003
+ /* */
2004
+ /* */
2005
+ /* */
2006
+ /* */
2007
+ return (void 0);
2008
+ }
2009
+ get parentsNames() {
2010
+ /* */
2011
+ /* */
2012
+ return (void 0);
2013
+ }
2014
+ findParentsNames(project, parent, result = []) {
2015
+ /* */
2016
+ /* */
2017
+ /* */
2018
+ /* */
2019
+ /* */
2020
+ /* */
2021
+ /* */
2022
+ /* */
2023
+ /* */
2024
+ /* */
2025
+ /* */
2026
+ return (void 0);
2027
+ }
2028
+ /**
2029
+ * init project files structure and depedencies
2030
+ */
2031
+ async init(initOptions) {
2032
+ throw (new Error('TODO IMPLEMENT'));
2033
+ }
2034
+ /**
2035
+ * globally link npm as package
2036
+ */
2037
+ async link() {
2038
+ throw (new Error('TODO IMPLEMENT'));
2039
+ }
2040
+ /**
2041
+ * init project files structure without depedencies
2042
+ */
2043
+ async struct(initOptions) {
2044
+ throw (new Error('TODO IMPLEMENT'));
2045
+ }
2046
+ /**
2047
+ * init and build() project
2048
+ */
2049
+ async build(buildOptions) {
2050
+ throw (new Error('TODO IMPLEMENT'));
2051
+ }
2052
+ /**
2053
+ * lint porject
2054
+ */
2055
+ async lint(lintOptions) {
2056
+ throw (new Error('TODO IMPLEMENT'));
2057
+ }
2058
+ /**
2059
+ * get info about porject
2060
+ */
2061
+ async info() {
2062
+ const proj = this;
2063
+ Helpers.info(`
2064
+
2065
+ name: ${proj?.name}
2066
+ type: ${proj?.type}
2067
+ children (${proj?.children.length}): ${(!proj || !proj.children.length) ? '< none >' : ''}
2068
+ ${proj?.children.map(c => '+' + c.genericName).join('\n')}
2069
+
2070
+
2071
+ `);
2072
+ }
2073
+ /**
2074
+ * By default no translation of commit
2075
+ */
2076
+ transalteGitCommitFromArgs() {
2077
+ return { from: void 0, to: void 0 };
2078
+ }
2079
+ /**
2080
+ * By defult true.. when commit branches will not function.
2081
+ * (false is better for simple projects)
2082
+ */
2083
+ useGitBranchesWhenCommitingAndPushing() {
2084
+ return true;
2085
+ }
2086
+ /**
2087
+ * usefull when pushing in project with childrens as git repos
2088
+ */
2089
+ automaticallyAddAllChnagesWhenPushingToGit() {
2090
+ return false;
2091
+ }
2092
+ /**
2093
+ * usefull when pushing in project with childrens as git repos
2094
+ */
2095
+ useGitBranchesAsMetadataForCommits() {
2096
+ return true;
2097
+ }
2098
+ }
2099
+ ;
2100
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-project.ts
2101
+
2102
+ class BaseFeatureForProject {
2103
+ constructor(project) {
2104
+ this.project = project;
2105
+ }
2106
+ }
2107
+ ;
2108
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-feature-for-project.ts
2109
+
2110
+ class CommitData {
2111
+ /**
2112
+ *
2113
+ * @returns jiras (from oldest to newset)
2114
+ */
2115
+ static extractAndOrderJiraNumbers(commitOrBranchName) {
2116
+ /* */
2117
+ /* */
2118
+ /* */
2119
+ /* */
2120
+ /* */
2121
+ /* */
2122
+ /* */
2123
+ /* */
2124
+ /* */
2125
+ return (void 0);
2126
+ }
2127
+ static cleanHttpFromCommitMessage(commitMsg) {
2128
+ if (!commitMsg) {
2129
+ return commitMsg;
2130
+ }
2131
+ commitMsg = commitMsg.replace('https://', '');
2132
+ commitMsg = commitMsg.replace('http://', '');
2133
+ return commitMsg;
2134
+ }
2135
+ static async getFromArgs(args, typeOfCommit) {
2136
+ /* */
2137
+ /* */
2138
+ /* */
2139
+ /* */
2140
+ /* */
2141
+ /* */
2142
+ /* */
2143
+ /* */
2144
+ /* */
2145
+ /* */
2146
+ /* */
2147
+ /* */
2148
+ /* */
2149
+ /* */
2150
+ /* */
2151
+ /* */
2152
+ /* */
2153
+ /* */
2154
+ /* */
2155
+ /* */
2156
+ /* */
2157
+ /* */
2158
+ /* */
2159
+ /* */
2160
+ /* */
2161
+ /* */
2162
+ /* */
2163
+ /* */
2164
+ return (void 0);
2165
+ }
2166
+ static async getFromBranch(currentBranchName) {
2167
+ /* */
2168
+ /* */
2169
+ /* */
2170
+ /* */
2171
+ /* */
2172
+ /* */
2173
+ /* */
2174
+ /* */
2175
+ /* */
2176
+ /* */
2177
+ /* */
2178
+ /* */
2179
+ /* */
2180
+ /* */
2181
+ /* */
2182
+ /* */
2183
+ /* */
2184
+ /* */
2185
+ /* */
2186
+ /* */
2187
+ /* */
2188
+ /* */
2189
+ /* */
2190
+ /* */
2191
+ /* */
2192
+ /* */
2193
+ return (void 0);
2194
+ }
2195
+ static from(options) {
2196
+ options = (options ? options : {});
2197
+ const opt = _.merge(new CommitData(), _.cloneDeep(options));
2198
+ return opt;
2199
+ }
2200
+ /**
2201
+ * pure message what was done (without jira or prefixes)
2202
+ * => is included in this.commitMessage
2203
+ */
2204
+ get message() {
2205
+ return this._message;
2206
+ }
2207
+ set message(message) {
2208
+ for (const jira of (this.jiraNumbers || [])) {
2209
+ message = message.replace(jira, ' ');
2210
+ message = message.replace(jira.toLowerCase(), ' ');
2211
+ message = message.replace(jira.toLowerCase().replace('-', ''), ' ');
2212
+ }
2213
+ this._message = message;
2214
+ }
2215
+ get branchPrefix() {
2216
+ /* */
2217
+ /* */
2218
+ /* */
2219
+ /* */
2220
+ /* */
2221
+ /* */
2222
+ /* */
2223
+ /* */
2224
+ /* */
2225
+ /* */
2226
+ return (void 0);
2227
+ }
2228
+ get commitMessage() {
2229
+ /* */
2230
+ /* */
2231
+ /* */
2232
+ /* */
2233
+ /* */
2234
+ /* */
2235
+ /* */
2236
+ /* */
2237
+ /* */
2238
+ return (void 0);
2239
+ }
2240
+ get branchName() {
2241
+ /* */
2242
+ /* */
2243
+ return (void 0);
2244
+ }
2245
+ get isActionCommit() {
2246
+ /* */
2247
+ /* */
2248
+ return (void 0);
2249
+ }
2250
+ }
2251
+ ;
2252
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/commit-data.ts
2253
+
2254
+ /* */
2255
+ /* */
2256
+ /* */
2257
+ /* */
2258
+ ;
2259
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/index.ts
1484
2260
 
1485
2261
  /**
1486
2262
  * Firedev helpers
@@ -1493,5 +2269,5 @@ const Helpers = HelpersFiredev.Instance;
1493
2269
  * Generated bundle index. Do not edit.
1494
2270
  */
1495
2271
 
1496
- export { BaseProject, BaseProjectResolver, Helpers, HelpersAngular, Validators };
2272
+ export { BaseFeatureForProject, BaseProject, BaseProjectResolver, CommitData, Helpers, HelpersAngular, Validators };
1497
2273
  //# sourceMappingURL=tnp-helpers.mjs.map