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
  /* */
891
897
  /* */
892
898
  /* */
@@ -907,6 +913,9 @@ class BaseProjectResolver {
907
913
  get allowedTypes() {
908
914
  return [this.NPM_PROJECT_KEY];
909
915
  }
916
+ /**
917
+ * project from process.cwd()
918
+ */
910
919
  get Current() {
911
920
  /* */
912
921
  /* */
@@ -924,7 +933,11 @@ class BaseProjectResolver {
924
933
  /**
925
934
  * override this
926
935
  */
927
- typeFrom(location) {
936
+ typeFrom(location, recrusiveCall = false) {
937
+ /* */
938
+ /* */
939
+ /* */
940
+ /* */
928
941
  /* */
929
942
  /* */
930
943
  /* */
@@ -1076,42 +1089,10 @@ class BaseProjectResolver {
1076
1089
  /* */
1077
1090
  return (void 0);
1078
1091
  }
1079
- /**
1080
- * Resolve child project when accessing from parent container etc...
1081
- * @param args string or string[] from cli args
1082
- * @param CurrentProject project from process.cwd()
1083
- */
1084
- resolveChildProject(args) {
1085
- /* */
1086
- /* */
1087
- /* */
1088
- /* */
1089
- /* */
1090
- /* */
1091
- /* */
1092
- /* */
1093
- /* */
1094
- /* */
1095
- /* */
1096
- /* */
1097
- /* */
1098
- /* */
1099
- /* */
1100
- /* */
1101
- /* */
1102
- /* */
1103
- return (void 0);
1104
- }
1105
1092
  }
1106
1093
  ;
1107
- ({}); // @--end-of-file-for-module=tnp-helpers lib/base-project-resolver.ts
1094
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-project-resolver.ts
1108
1095
 
1109
- /* */
1110
- /* */
1111
- /* */
1112
- /* */
1113
- /* */
1114
- const Helpers$1 = HelpersFiredev.Instance;
1115
1096
  const takenPorts = [];
1116
1097
  class BaseProject {
1117
1098
  static { this.ins = new BaseProjectResolver(BaseProject); }
@@ -1121,7 +1102,7 @@ class BaseProject {
1121
1102
  const result = [];
1122
1103
  const visit = (project) => {
1123
1104
  if (stack[projNameToCompare(project)]) {
1124
- Helpers$1.error(`Circular dependency detected involving project: ${projNameToCompare(project)}`);
1105
+ Helpers.error(`Circular dependency detected involving project: ${projNameToCompare(project)}`);
1125
1106
  }
1126
1107
  if (!visited[projNameToCompare(project)]) {
1127
1108
  visited[projNameToCompare(project)] = true;
@@ -1143,24 +1124,74 @@ class BaseProject {
1143
1124
  return result;
1144
1125
  }
1145
1126
  // @ts-ignore
1146
- constructor(location) {
1127
+ constructor(
1128
+ /**
1129
+ * doesn't need to be real path -> can be link
1130
+ */
1131
+ location) {
1147
1132
  this.location = location;
1148
1133
  this.cache = {};
1134
+ this.type = 'unknow';
1135
+ this.toString = () => {
1136
+ return `${this.name}=>${this.location}`;
1137
+ };
1138
+ }
1139
+ setType(type) {
1140
+ // @ts-ignore
1141
+ this.type = type;
1142
+ }
1143
+ typeIs(...types) {
1144
+ return this.type && types.includes(this.type);
1145
+ }
1146
+ typeIsNot(...types) {
1147
+ return !this.typeIs(...types);
1149
1148
  }
1150
1149
  /**
1151
- * doesn't need to be real path -> can be link
1150
+ * project folder basename
1152
1151
  */
1153
1152
  get basename() {
1154
1153
  return path.basename(this.location);
1155
1154
  }
1155
+ /**
1156
+ * name from package.json
1157
+ */
1156
1158
  get name() {
1157
1159
  return this.packageJSON?.name;
1158
1160
  }
1161
+ /**
1162
+ * version from package.json -> property version
1163
+ */
1159
1164
  get version() {
1160
1165
  return this.packageJSON?.version;
1161
1166
  }
1162
1167
  /**
1163
- * npm dependencies
1168
+ * Major Version from package.json
1169
+ */
1170
+ // @ts-ignore
1171
+ get majorVersion() {
1172
+ /* */
1173
+ /* */
1174
+ return (void 0);
1175
+ }
1176
+ /**
1177
+ * Minor Version from package.json
1178
+ */
1179
+ // @ts-ignore
1180
+ get minorVersion() {
1181
+ /* */
1182
+ /* */
1183
+ /* */
1184
+ return (void 0);
1185
+ }
1186
+ get versionPathAsNumber() {
1187
+ /* */
1188
+ /* */
1189
+ /* */
1190
+ /* */
1191
+ return (void 0);
1192
+ }
1193
+ /**
1194
+ * npm dependencies from package.json
1164
1195
  */
1165
1196
  get dependencies() {
1166
1197
  return (this.packageJSON ? this.packageJSON.dependencies : {}) || {};
@@ -1194,11 +1225,39 @@ class BaseProject {
1194
1225
  ...this.resolutions
1195
1226
  });
1196
1227
  }
1197
- get tnp() {
1198
- return this.packageJSON?.tnp;
1228
+ getFoldersForPossibleProjectChildren() {
1229
+ /* */
1230
+ /* */
1231
+ /* */
1232
+ /* */
1233
+ /* */
1234
+ /* */
1235
+ /* */
1236
+ /* */
1237
+ /* */
1238
+ /* */
1239
+ /* */
1240
+ /* */
1241
+ /* */
1242
+ /* */
1243
+ /* */
1244
+ /* */
1245
+ /* */
1246
+ /* */
1247
+ /* */
1248
+ return (void 0);
1199
1249
  }
1200
- get firedev() {
1201
- return this.packageJSON?.firedev;
1250
+ getAllChildren() {
1251
+ /* */
1252
+ /* */
1253
+ /* */
1254
+ /* */
1255
+ /* */
1256
+ /* */
1257
+ /* */
1258
+ /* */
1259
+ /* */
1260
+ return (void 0);
1202
1261
  }
1203
1262
  /**
1204
1263
  * alias to getAllChildren
@@ -1206,10 +1265,10 @@ class BaseProject {
1206
1265
  get children() {
1207
1266
  return this.getAllChildren();
1208
1267
  }
1209
- child(nameOrBasename, errors = true) {
1268
+ getChildBy(nameOrBasename, errors = true) {
1210
1269
  const c = this.children.find(c => c.name === nameOrBasename || c.basename === nameOrBasename);
1211
1270
  if (errors && !c) {
1212
- Helpers$1.warn(`Project doesnt contain child with name or basename: ${nameOrBasename}`);
1271
+ Helpers.warn(`Project doesnt contain child with name or basename: ${nameOrBasename}`);
1213
1272
  }
1214
1273
  return c;
1215
1274
  }
@@ -1238,24 +1297,6 @@ class BaseProject {
1238
1297
  .filter(f => !!f)
1239
1298
  .join('/');
1240
1299
  }
1241
- /**
1242
- * try run but continue when it fails
1243
- * @param command
1244
- * @param options
1245
- * @returns
1246
- */
1247
- tryRunSync(command
1248
- /* */
1249
- /* */
1250
- ) {
1251
- /* */
1252
- /* */
1253
- /* */
1254
- /* */
1255
- /* */
1256
- /* */
1257
- return (void 0);
1258
- }
1259
1300
  /**
1260
1301
  * same has project.hasFile();
1261
1302
  */
@@ -1266,7 +1307,7 @@ class BaseProject {
1266
1307
  * same as project.pathExists();
1267
1308
  */
1268
1309
  hasFile(relativePath) {
1269
- return Helpers$1.exists(this.pathFor(relativePath));
1310
+ return Helpers.exists(this.pathFor(relativePath));
1270
1311
  }
1271
1312
  /**
1272
1313
  * same as project.pathhasFileExists();
@@ -1274,7 +1315,7 @@ class BaseProject {
1274
1315
  */
1275
1316
  containsFile(fileRelativeToProjectPath) {
1276
1317
  const fullPath = path.resolve(path.join(this.location, fileRelativeToProjectPath));
1277
- return Helpers$1.exists(fullPath);
1318
+ return Helpers.exists(fullPath);
1278
1319
  }
1279
1320
  /**
1280
1321
  * absolute path:
@@ -1299,7 +1340,53 @@ class BaseProject {
1299
1340
  /* */
1300
1341
  return (void 0);
1301
1342
  }
1302
- run(command
1343
+ /**
1344
+ * @deprecated us execute instead
1345
+ * use output from or more preciese crafted api
1346
+ */
1347
+ run(command, options) {
1348
+ /* */
1349
+ /* */
1350
+ /* */
1351
+ /* */
1352
+ /* */
1353
+ /* */
1354
+ /* */
1355
+ /* */
1356
+ /* */
1357
+ /* */
1358
+ /* */
1359
+ /* */
1360
+ /* */
1361
+ /* */
1362
+ /* */
1363
+ return (void 0);
1364
+ }
1365
+ /**
1366
+ * same as run but async
1367
+ */
1368
+ async execute(command, options) {
1369
+ /* */
1370
+ /* */
1371
+ /* */
1372
+ /* */
1373
+ /* */
1374
+ /* */
1375
+ /* */
1376
+ /* */
1377
+ /* */
1378
+ /* */
1379
+ /* */
1380
+ /* */
1381
+ return (void 0);
1382
+ }
1383
+ /**
1384
+ * try run but continue when it fails
1385
+ * @param command
1386
+ * @param options
1387
+ * @returns
1388
+ */
1389
+ tryRunSync(command
1303
1390
  /* */
1304
1391
  /* */
1305
1392
  ) {
@@ -1308,6 +1395,7 @@ class BaseProject {
1308
1395
  /* */
1309
1396
  /* */
1310
1397
  /* */
1398
+ /* */
1311
1399
  return (void 0);
1312
1400
  }
1313
1401
  outputFrom(command
@@ -1327,7 +1415,14 @@ class BaseProject {
1327
1415
  remove(relativePath, exactPath = true) {
1328
1416
  /* */
1329
1417
  /* */
1330
- return (void 0);
1418
+ /* */
1419
+ }
1420
+ removeFolderByRelativePath(relativePathToFolder) {
1421
+ /* */
1422
+ /* */
1423
+ /* */
1424
+ /* */
1425
+ /* */
1331
1426
  }
1332
1427
  linkNodeModulesTo(proj) {
1333
1428
  /* */
@@ -1377,23 +1472,74 @@ class BaseProject {
1377
1472
  /* */
1378
1473
  return (void 0);
1379
1474
  }
1380
- filterOnlyCopy(basePathFoldersOnlyToInclude) {
1475
+ removeItself() {
1476
+ /* */
1477
+ /* */
1478
+ }
1479
+ /**
1480
+ * Purpose: not initializing all classes at the beginning
1481
+ * Only for BaseFeatureForProject class
1482
+ */
1483
+ defineProperty(variableName, classFn, options) {
1484
+ /* */
1485
+ /* */
1486
+ /* */
1487
+ /* */
1488
+ /* */
1489
+ /* */
1490
+ /* */
1491
+ /* */
1492
+ /* */
1493
+ /* */
1494
+ /* */
1495
+ /* */
1496
+ /* */
1497
+ /* */
1498
+ /* */
1499
+ /* */
1500
+ /* */
1501
+ /* */
1502
+ /* */
1503
+ /* */
1504
+ /* */
1505
+ /* */
1506
+ /* */
1507
+ /* */
1508
+ /* */
1381
1509
  /* */
1382
1510
  /* */
1383
1511
  /* */
1384
1512
  return (void 0);
1385
1513
  }
1386
- removeItself() {
1514
+ /**
1515
+ * fs.copy option filter function for copying only selected folders from project
1516
+ */
1517
+ filterOnlyCopy(basePathFoldersOnlyToInclude) {
1387
1518
  /* */
1388
1519
  /* */
1520
+ return (void 0);
1389
1521
  }
1522
+ /**
1523
+ * fs.copy option filter function for copying only not selected folders from project
1524
+ */
1390
1525
  filterDontCopy(basePathFoldersTosSkip) {
1391
- /* */
1392
1526
  /* */
1393
1527
  /* */
1394
1528
  return (void 0);
1395
1529
  }
1396
- defineProperty(variableName, classFn) {
1530
+ getDefaultDevelopmentBranch() {
1531
+ return 'develop';
1532
+ }
1533
+ /**
1534
+ * main/default hardcoded branches
1535
+ */
1536
+ getMainBranches() {
1537
+ return ['master', 'develop', 'stage', 'prod', 'test'];
1538
+ }
1539
+ isUnsingActionCommit() {
1540
+ return false;
1541
+ }
1542
+ async resetProcess(overrideBranch) {
1397
1543
  /* */
1398
1544
  /* */
1399
1545
  /* */
@@ -1419,12 +1565,23 @@ class BaseProject {
1419
1565
  /* */
1420
1566
  /* */
1421
1567
  /* */
1568
+ }
1569
+ async pullProcess() {
1570
+ /* */
1571
+ /* */
1572
+ /* */
1573
+ /* */
1574
+ /* */
1575
+ /* */
1576
+ /* */
1577
+ /* */
1578
+ /* */
1579
+ /* */
1580
+ /* */
1581
+ /* */
1422
1582
  /* */
1423
1583
  /* */
1424
1584
  /* */
1425
- return (void 0);
1426
- }
1427
- getAllChildren() {
1428
1585
  /* */
1429
1586
  /* */
1430
1587
  /* */
@@ -1436,7 +1593,7 @@ class BaseProject {
1436
1593
  /* */
1437
1594
  return (void 0);
1438
1595
  }
1439
- getFoldersForPossibleProjectChildren() {
1596
+ async pushProcess(options = {}) {
1440
1597
  /* */
1441
1598
  /* */
1442
1599
  /* */
@@ -1456,14 +1613,633 @@ class BaseProject {
1456
1613
  /* */
1457
1614
  /* */
1458
1615
  /* */
1459
- return (void 0);
1460
- }
1461
- }
1462
- ;
1463
- ({}); // @--end-of-file-for-module=tnp-helpers lib/base-project.ts
1464
-
1465
- ;
1466
- ({}); // @--end-of-file-for-module=tnp-helpers lib/models.ts
1616
+ /* */
1617
+ /* */
1618
+ /* */
1619
+ /* */
1620
+ /* */
1621
+ /* */
1622
+ /* */
1623
+ /* */
1624
+ /* */
1625
+ /* */
1626
+ /* */
1627
+ /* */
1628
+ /* */
1629
+ /* */
1630
+ /* */
1631
+ /* */
1632
+ /* */
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
+ return (void 0);
1663
+ }
1664
+ _beforeAnyActionOnGitRoot() {
1665
+ /* */
1666
+ /* */
1667
+ /* */
1668
+ /* */
1669
+ /* */
1670
+ /* */
1671
+ /* */
1672
+ /* */
1673
+ /* */
1674
+ return (void 0);
1675
+ }
1676
+ async _beforePushProcessAction() {
1677
+ /* */
1678
+ /* */
1679
+ /* */
1680
+ /* */
1681
+ /* */
1682
+ /* */
1683
+ /* */
1684
+ /* */
1685
+ /* */
1686
+ /* */
1687
+ /* */
1688
+ return (void 0);
1689
+ }
1690
+ async _beforePullProcessAction() {
1691
+ /* */
1692
+ /* */
1693
+ return (void 0);
1694
+ }
1695
+ async _getCommitMessage(typeofCommit, args, commitMessageRequired) {
1696
+ /* */
1697
+ /* */
1698
+ /* */
1699
+ /* */
1700
+ /* */
1701
+ /* */
1702
+ /* */
1703
+ /* */
1704
+ /* */
1705
+ /* */
1706
+ /* */
1707
+ /* */
1708
+ /* */
1709
+ /* */
1710
+ /* */
1711
+ /* */
1712
+ /* */
1713
+ /* */
1714
+ /* */
1715
+ /* */
1716
+ /* */
1717
+ /* */
1718
+ /* */
1719
+ /* */
1720
+ /* */
1721
+ /* */
1722
+ /* */
1723
+ /* */
1724
+ /* */
1725
+ /* */
1726
+ /* */
1727
+ /* */
1728
+ /* */
1729
+ /* */
1730
+ return (void 0);
1731
+ }
1732
+ linkTo(destPackageLocation) {
1733
+ /* */
1734
+ /* */
1735
+ }
1736
+ writeFile(relativePath, content) {
1737
+ /* */
1738
+ /* */
1739
+ }
1740
+ runCommandGetString(command) {
1741
+ /* */
1742
+ /* */
1743
+ return (void 0);
1744
+ }
1745
+ get git() {
1746
+ const self = this;
1747
+ return {
1748
+ revertFileChanges(fileReletivePath) {
1749
+ /* */
1750
+ /* */
1751
+ return (void 0);
1752
+ },
1753
+ clone(url, destinationFolderName = '') {
1754
+ /* */
1755
+ /* */
1756
+ return (void 0);
1757
+ },
1758
+ restoreLastVersion(localFilePath) {
1759
+ /* */
1760
+ /* */
1761
+ return (void 0);
1762
+ },
1763
+ stageAllFiles() {
1764
+ /* */
1765
+ /* */
1766
+ return (void 0);
1767
+ },
1768
+ stash(optinos) {
1769
+ /* */
1770
+ /* */
1771
+ return (void 0);
1772
+ },
1773
+ stashApply() {
1774
+ /* */
1775
+ /* */
1776
+ return (void 0);
1777
+ },
1778
+ fetch() {
1779
+ /* */
1780
+ /* */
1781
+ return (void 0);
1782
+ },
1783
+ resetFiles(...relativePathes) {
1784
+ /* */
1785
+ /* */
1786
+ return (void 0);
1787
+ },
1788
+ get isGitRepo() {
1789
+ /* */
1790
+ /* */
1791
+ return (void 0);
1792
+ },
1793
+ get isGitRoot() {
1794
+ /* */
1795
+ /* */
1796
+ return (void 0);
1797
+ },
1798
+ get originURL() {
1799
+ /* */
1800
+ /* */
1801
+ return (void 0);
1802
+ },
1803
+ commit(commitMessage) {
1804
+ /* */
1805
+ /* */
1806
+ return (void 0);
1807
+ },
1808
+ /**
1809
+ * alias to stage all and commit
1810
+ */
1811
+ addAndCommit(commitMessage) {
1812
+ /* */
1813
+ /* */
1814
+ return (void 0);
1815
+ },
1816
+ stageAllAndCommit(commitMessage) {
1817
+ /* */
1818
+ /* */
1819
+ return (void 0);
1820
+ },
1821
+ async pushCurrentBranch(options) {
1822
+ /* */
1823
+ /* */
1824
+ return (void 0);
1825
+ },
1826
+ get allOrigins() {
1827
+ /* */
1828
+ /* */
1829
+ return (void 0);
1830
+ },
1831
+ get thereAreSomeUncommitedChange() {
1832
+ /* */
1833
+ /* */
1834
+ return (void 0);
1835
+ },
1836
+ thereAreSomeUncommitedChangeExcept(filesList = []) {
1837
+ /* */
1838
+ /* */
1839
+ return (void 0);
1840
+ },
1841
+ meltActionCommits(soft = false) {
1842
+ /* */
1843
+ /* */
1844
+ },
1845
+ async pullCurrentBranch(options) {
1846
+ /* */
1847
+ /* */
1848
+ return (void 0);
1849
+ },
1850
+ get currentBranchName() {
1851
+ /* */
1852
+ /* */
1853
+ return (void 0);
1854
+ },
1855
+ getBranchesNamesBy(pattern) {
1856
+ /* */
1857
+ /* */
1858
+ return (void 0);
1859
+ },
1860
+ resetSoftHEAD(HEAD = 1) {
1861
+ /* */
1862
+ /* */
1863
+ return (void 0);
1864
+ },
1865
+ resetHard(options) {
1866
+ /* */
1867
+ /* */
1868
+ return (void 0);
1869
+ },
1870
+ countComits() {
1871
+ /* */
1872
+ /* */
1873
+ return (void 0);
1874
+ },
1875
+ hasAnyCommits() {
1876
+ /* */
1877
+ /* */
1878
+ return (void 0);
1879
+ },
1880
+ get isInMergeProcess() {
1881
+ /* */
1882
+ /* */
1883
+ return (void 0);
1884
+ },
1885
+ lastCommitDate() {
1886
+ /* */
1887
+ /* */
1888
+ return (void 0);
1889
+ },
1890
+ lastCommitHash() {
1891
+ /* */
1892
+ /* */
1893
+ return (void 0);
1894
+ },
1895
+ lastCommitMessage() {
1896
+ /* */
1897
+ /* */
1898
+ return (void 0);
1899
+ },
1900
+ penultimageCommitHash() {
1901
+ /* */
1902
+ /* */
1903
+ return (void 0);
1904
+ },
1905
+ checkTagExists(tag) {
1906
+ /* */
1907
+ /* */
1908
+ return (void 0);
1909
+ },
1910
+ checkout(branchName, options) {
1911
+ /* */
1912
+ /* */
1913
+ return (void 0);
1914
+ },
1915
+ checkoutFromTo(checkoutFromBranch, branch, origin = 'origin') {
1916
+ /* */
1917
+ /* */
1918
+ return (void 0);
1919
+ },
1920
+ /**
1921
+ *
1922
+ * @param majorVersion example: v1, v2 etc.
1923
+ * @returns tag name
1924
+ */
1925
+ lastTagNameForMajorVersion(majorVersion) {
1926
+ /* */
1927
+ /* */
1928
+ return (void 0);
1929
+ },
1930
+ lastTagHash() {
1931
+ /* */
1932
+ /* */
1933
+ return (void 0);
1934
+ },
1935
+ get remoteOriginUrl() {
1936
+ /* */
1937
+ /* */
1938
+ return (void 0);
1939
+ },
1940
+ get lastTagVersionName() {
1941
+ /* */
1942
+ /* */
1943
+ return (void 0);
1944
+ },
1945
+ get stagedFiles() {
1946
+ /* */
1947
+ /* */
1948
+ return (void 0);
1949
+ },
1950
+ /**
1951
+ * TODO does this make any sense
1952
+ */
1953
+ renameOrigin(newNameOrUlr) {
1954
+ /* */
1955
+ /* */
1956
+ /* */
1957
+ /* */
1958
+ /* */
1959
+ /* */
1960
+ /* */
1961
+ /* */
1962
+ /* */
1963
+ /* */
1964
+ /* */
1965
+ /* */
1966
+ /* */
1967
+ /* */
1968
+ /* */
1969
+ /* */
1970
+ /* */
1971
+ /* */
1972
+ /* */
1973
+ /* */
1974
+ /* */
1975
+ /* */
1976
+ return (void 0);
1977
+ },
1978
+ };
1979
+ }
1980
+ checkIfLogginInToNpm() {
1981
+ /* */
1982
+ /* */
1983
+ /* */
1984
+ /* */
1985
+ /* */
1986
+ /* */
1987
+ /* */
1988
+ /* */
1989
+ /* */
1990
+ return (void 0);
1991
+ }
1992
+ get parentsNames() {
1993
+ /* */
1994
+ /* */
1995
+ return (void 0);
1996
+ }
1997
+ findParentsNames(project, parent, result = []) {
1998
+ /* */
1999
+ /* */
2000
+ /* */
2001
+ /* */
2002
+ /* */
2003
+ /* */
2004
+ /* */
2005
+ /* */
2006
+ /* */
2007
+ /* */
2008
+ /* */
2009
+ return (void 0);
2010
+ }
2011
+ /**
2012
+ * init project files structure and depedencies
2013
+ */
2014
+ async init(initOptions) {
2015
+ throw (new Error('TODO IMPLEMENT'));
2016
+ }
2017
+ /**
2018
+ * globally link npm as package
2019
+ */
2020
+ async link() {
2021
+ throw (new Error('TODO IMPLEMENT'));
2022
+ }
2023
+ /**
2024
+ * init project files structure without depedencies
2025
+ */
2026
+ async struct(initOptions) {
2027
+ throw (new Error('TODO IMPLEMENT'));
2028
+ }
2029
+ /**
2030
+ * init and build() project
2031
+ */
2032
+ async build(buildOptions) {
2033
+ throw (new Error('TODO IMPLEMENT'));
2034
+ }
2035
+ /**
2036
+ * lint porject
2037
+ */
2038
+ async lint(lintOptions) {
2039
+ throw (new Error('TODO IMPLEMENT'));
2040
+ }
2041
+ /**
2042
+ * get info about porject
2043
+ */
2044
+ async info() {
2045
+ const proj = this;
2046
+ Helpers.info(`
2047
+
2048
+ name: ${proj?.name}
2049
+ type: ${proj?.type}
2050
+ children (${proj?.children.length}): ${(!proj || !proj.children.length) ? '< none >' : ''}
2051
+ ${proj?.children.map(c => '+' + c.genericName).join('\n')}
2052
+
2053
+
2054
+ `);
2055
+ }
2056
+ /**
2057
+ * By default no translation of commit
2058
+ */
2059
+ transalteGitCommitFromArgs() {
2060
+ return { from: void 0, to: void 0 };
2061
+ }
2062
+ /**
2063
+ * By defult true.. when commit branches will not function.
2064
+ * (false is better for simple projects)
2065
+ */
2066
+ useGitBranchesWhenCommitingAndPushing() {
2067
+ return true;
2068
+ }
2069
+ /**
2070
+ * usefull when pushing in project with childrens as git repos
2071
+ */
2072
+ automaticallyAddAllChnagesWhenPushingToGit() {
2073
+ return false;
2074
+ }
2075
+ /**
2076
+ * usefull when pushing in project with childrens as git repos
2077
+ */
2078
+ useGitBranchesAsMetadataForCommits() {
2079
+ return true;
2080
+ }
2081
+ }
2082
+ ;
2083
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-project.ts
2084
+
2085
+ class BaseFeatureForProject {
2086
+ constructor(project) {
2087
+ this.project = project;
2088
+ }
2089
+ }
2090
+ ;
2091
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-feature-for-project.ts
2092
+
2093
+ class CommitData {
2094
+ /**
2095
+ *
2096
+ * @returns jiras (from oldest to newset)
2097
+ */
2098
+ static extractAndOrderJiraNumbers(commitOrBranchName) {
2099
+ /* */
2100
+ /* */
2101
+ /* */
2102
+ /* */
2103
+ /* */
2104
+ /* */
2105
+ /* */
2106
+ /* */
2107
+ /* */
2108
+ return (void 0);
2109
+ }
2110
+ static cleanHttpFromCommitMessage(commitMsg) {
2111
+ if (!commitMsg) {
2112
+ return commitMsg;
2113
+ }
2114
+ commitMsg = commitMsg.replace('https://', '');
2115
+ commitMsg = commitMsg.replace('http://', '');
2116
+ return commitMsg;
2117
+ }
2118
+ static async getFromArgs(args, typeOfCommit) {
2119
+ /* */
2120
+ /* */
2121
+ /* */
2122
+ /* */
2123
+ /* */
2124
+ /* */
2125
+ /* */
2126
+ /* */
2127
+ /* */
2128
+ /* */
2129
+ /* */
2130
+ /* */
2131
+ /* */
2132
+ /* */
2133
+ /* */
2134
+ /* */
2135
+ /* */
2136
+ /* */
2137
+ /* */
2138
+ /* */
2139
+ /* */
2140
+ /* */
2141
+ /* */
2142
+ /* */
2143
+ /* */
2144
+ /* */
2145
+ /* */
2146
+ /* */
2147
+ return (void 0);
2148
+ }
2149
+ static async getFromBranch(currentBranchName) {
2150
+ /* */
2151
+ /* */
2152
+ /* */
2153
+ /* */
2154
+ /* */
2155
+ /* */
2156
+ /* */
2157
+ /* */
2158
+ /* */
2159
+ /* */
2160
+ /* */
2161
+ /* */
2162
+ /* */
2163
+ /* */
2164
+ /* */
2165
+ /* */
2166
+ /* */
2167
+ /* */
2168
+ /* */
2169
+ /* */
2170
+ /* */
2171
+ /* */
2172
+ /* */
2173
+ /* */
2174
+ /* */
2175
+ /* */
2176
+ return (void 0);
2177
+ }
2178
+ static from(options) {
2179
+ options = (options ? options : {});
2180
+ const opt = _.merge(new CommitData(), _.cloneDeep(options));
2181
+ return opt;
2182
+ }
2183
+ /**
2184
+ * pure message what was done (without jira or prefixes)
2185
+ * => is included in this.commitMessage
2186
+ */
2187
+ get message() {
2188
+ return this._message;
2189
+ }
2190
+ set message(message) {
2191
+ for (const jira of (this.jiraNumbers || [])) {
2192
+ message = message.replace(jira, ' ');
2193
+ message = message.replace(jira.toLowerCase(), ' ');
2194
+ message = message.replace(jira.toLowerCase().replace('-', ''), ' ');
2195
+ }
2196
+ this._message = message;
2197
+ }
2198
+ get branchPrefix() {
2199
+ /* */
2200
+ /* */
2201
+ /* */
2202
+ /* */
2203
+ /* */
2204
+ /* */
2205
+ /* */
2206
+ /* */
2207
+ /* */
2208
+ /* */
2209
+ return (void 0);
2210
+ }
2211
+ get commitMessage() {
2212
+ /* */
2213
+ /* */
2214
+ /* */
2215
+ /* */
2216
+ /* */
2217
+ /* */
2218
+ /* */
2219
+ /* */
2220
+ /* */
2221
+ return (void 0);
2222
+ }
2223
+ get branchName() {
2224
+ /* */
2225
+ /* */
2226
+ return (void 0);
2227
+ }
2228
+ get isActionCommit() {
2229
+ /* */
2230
+ /* */
2231
+ return (void 0);
2232
+ }
2233
+ }
2234
+ ;
2235
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/commit-data.ts
2236
+
2237
+ /* */
2238
+ /* */
2239
+ /* */
2240
+ /* */
2241
+ ;
2242
+ ({}); // @--end-of-file-for-module=tnp-helpers lib/base/index.ts
1467
2243
 
1468
2244
  /**
1469
2245
  * Firedev helpers
@@ -1476,5 +2252,5 @@ const Helpers = HelpersFiredev.Instance;
1476
2252
  * Generated bundle index. Do not edit.
1477
2253
  */
1478
2254
 
1479
- export { BaseProject, BaseProjectResolver, Helpers, HelpersAngular, Validators };
2255
+ export { BaseFeatureForProject, BaseProject, BaseProjectResolver, CommitData, Helpers, HelpersAngular, Validators };
1480
2256
  //# sourceMappingURL=tnp-helpers.mjs.map