tnp-helpers 16.5.29 → 16.100.1

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 (47) hide show
  1. package/assets/shared/shared_folder_info.txt +1 -1
  2. package/browser/esm2022/lib/base/base-project.mjs +213 -1
  3. package/browser/esm2022/lib/base/commit-data.mjs +46 -3
  4. package/browser/esm2022/lib/helpers.mjs +140 -111
  5. package/browser/fesm2022/tnp-helpers.mjs +396 -112
  6. package/browser/fesm2022/tnp-helpers.mjs.map +1 -1
  7. package/browser/lib/base/base-project.d.ts +30 -0
  8. package/browser/lib/base/commit-data.d.ts +3 -1
  9. package/browser/lib/helpers.d.ts +25 -2
  10. package/client/esm2022/lib/base/base-project.mjs +213 -1
  11. package/client/esm2022/lib/base/commit-data.mjs +46 -3
  12. package/client/esm2022/lib/helpers.mjs +140 -111
  13. package/client/fesm2022/tnp-helpers.mjs +396 -112
  14. package/client/fesm2022/tnp-helpers.mjs.map +1 -1
  15. package/client/lib/base/base-project.d.ts +30 -0
  16. package/client/lib/base/commit-data.d.ts +3 -1
  17. package/client/lib/helpers.d.ts +25 -2
  18. package/client/package.json +123 -174
  19. package/lib/base/base-project.d.ts +31 -1
  20. package/lib/base/base-project.js +312 -0
  21. package/lib/base/base-project.js.map +1 -1
  22. package/lib/base/commit-data.d.ts +3 -1
  23. package/lib/base/commit-data.js +62 -21
  24. package/lib/base/commit-data.js.map +1 -1
  25. package/lib/for-backend/helpers-file-folders.backend.d.ts +1 -1
  26. package/lib/for-backend/helpers-git.backend.js +4 -4
  27. package/lib/for-backend/helpers-git.backend.js.map +1 -1
  28. package/lib/for-backend/helpers-process.backend.d.ts +0 -3
  29. package/lib/for-backend/helpers-process.backend.js +2 -44
  30. package/lib/for-backend/helpers-process.backend.js.map +1 -1
  31. package/lib/for-browser/angular.helper.js +3 -3
  32. package/lib/helpers.d.ts +15 -3
  33. package/lib/helpers.js +87 -14
  34. package/lib/helpers.js.map +1 -1
  35. package/lib/old/base-component.js +3 -3
  36. package/lib/old/base-formly-component.js +3 -3
  37. package/lib/old/dual-component-ctrl.js +3 -3
  38. package/package.json +4 -5
  39. package/tmp-environment.json +127 -178
  40. package/websql/esm2022/lib/base/base-project.mjs +213 -1
  41. package/websql/esm2022/lib/base/commit-data.mjs +46 -3
  42. package/websql/esm2022/lib/helpers.mjs +140 -111
  43. package/websql/fesm2022/tnp-helpers.mjs +396 -112
  44. package/websql/fesm2022/tnp-helpers.mjs.map +1 -1
  45. package/websql/lib/base/base-project.d.ts +30 -0
  46. package/websql/lib/base/commit-data.d.ts +3 -1
  47. package/websql/lib/helpers.d.ts +25 -2
@@ -658,84 +658,6 @@ class HelpersFiredev extends CoreHelpers {
658
658
  this.numbers = numbers;
659
659
  this.browser = browser;
660
660
  this.ng = ng;
661
- /* */
662
- /* */
663
- /* */
664
- /* */
665
- /* */
666
- /* */
667
- /* */
668
- /* */
669
- /* */
670
- /* */
671
- /* */
672
- /* */
673
- /* */
674
- /* */
675
- /* */
676
- /* */
677
- /* */
678
- /* */
679
- /* */
680
- /* */
681
- /* */
682
- /* */
683
- /* */
684
- /* */
685
- /* */
686
- /* */
687
- /* */
688
- /* */
689
- /* */
690
- /* */
691
- /* */
692
- /* */
693
- /* */
694
- /* */
695
- /* */
696
- /* */
697
- /* */
698
- /* */
699
- /* */
700
- /* */
701
- /* */
702
- /* */
703
- /* */
704
- /* */
705
- /* */
706
- /* */
707
- /* */
708
- /* */
709
- /* */
710
- /* */
711
- /* */
712
- /* */
713
- /* */
714
- /* */
715
- /* */
716
- /* */
717
- /* */
718
- /* */
719
- /* */
720
- /* */
721
- /* */
722
- /* */
723
- /* */
724
- /* */
725
- /* */
726
- /* */
727
- /* */
728
- /* */
729
- /* */
730
- /* */
731
- /* */
732
- /* */
733
- /* */
734
- /* */
735
- /* */
736
- /* */
737
- /* */
738
- /* */
739
661
  this.applyMixins = applyMixins;
740
662
  this.isValidIp = Validators.network.isValidIp;
741
663
  this.isValidGitRepuUrl = Validators.git.isValidRepoUrl;
@@ -809,40 +731,66 @@ class HelpersFiredev extends CoreHelpers {
809
731
  }
810
732
  return url;
811
733
  }
812
- /* */
813
- /* */
814
- /* */
815
- /* */
734
+ slash(pathFromWindowsOrUnixType) {
735
+ /* */
736
+ /* */
737
+ return (void 0);
738
+ }
816
739
  async isElevated() {
817
740
  /* */
818
741
  /* */
819
742
  /* */
820
743
  /* */
821
744
  }
822
- /* */
823
- /* */
824
- /* */
825
- /* */
826
- /* */
827
- /* */
828
- /* */
829
- /* */
830
- /* */
831
- /* */
832
- /* */
833
- /* */
834
- /* */
835
- /* */
836
- /* */
837
- /* */
838
- /* */
839
- /* */
840
- /* */
841
- /* */
842
- /* */
843
- /* */
844
- /* */
845
- /* */
745
+ /**
746
+ * TODO fix this methods
747
+ */
748
+ async localIpAddress() {
749
+ /* */
750
+ /* */
751
+ /* */
752
+ /* */
753
+ /* */
754
+ /* */
755
+ /* */
756
+ /* */
757
+ /* */
758
+ /* */
759
+ /* */
760
+ /* */
761
+ /* */
762
+ /* */
763
+ /* */
764
+ /* */
765
+ /* */
766
+ /* */
767
+ /* */
768
+ /* */
769
+ /* */
770
+ /* */
771
+ return (void 0);
772
+ }
773
+ allLocalIpAddresses() {
774
+ /* */
775
+ /* */
776
+ /* */
777
+ /* */
778
+ /* */
779
+ /* */
780
+ /* */
781
+ /* */
782
+ /* */
783
+ /* */
784
+ /* */
785
+ /* */
786
+ /* */
787
+ /* */
788
+ /* */
789
+ /* */
790
+ /* */
791
+ /* */
792
+ return (void 0);
793
+ }
846
794
  async mesureExectionInMs(description, functionToExecute, ...functionArguments) {
847
795
  var start = new Date();
848
796
  await Helpers.runSyncOrAsync({
@@ -885,6 +833,9 @@ class HelpersFiredev extends CoreHelpers {
885
833
  }
886
834
  });
887
835
  }
836
+ /**
837
+ * @deprecated
838
+ */
888
839
  getBrowserVerPath(moduleName, websql = false) {
889
840
  /* */
890
841
  /* */
@@ -892,22 +843,25 @@ class HelpersFiredev extends CoreHelpers {
892
843
  /* */
893
844
  /* */
894
845
  }
895
- getMethodName(obj, method) {
846
+ getMethodName(classObject, method) {
896
847
  var methodName = null;
897
- Object.getOwnPropertyNames(obj).forEach(prop => {
898
- if (obj[prop] === method) {
848
+ Object.getOwnPropertyNames(classObject).forEach(prop => {
849
+ if (classObject[prop] === method) {
899
850
  methodName = prop;
900
851
  }
901
852
  });
902
853
  if (methodName !== null) {
903
854
  return methodName;
904
855
  }
905
- var proto = Object.getPrototypeOf(obj);
856
+ var proto = Object.getPrototypeOf(classObject);
906
857
  if (proto) {
907
858
  return Helpers.getMethodName(proto, method);
908
859
  }
909
860
  return null;
910
861
  }
862
+ /**
863
+ * @deprecated
864
+ */
911
865
  fixWebpackEnv(env) {
912
866
  _.forIn(env, (v, k) => {
913
867
  const value = v;
@@ -917,6 +871,81 @@ class HelpersFiredev extends CoreHelpers {
917
871
  env[k] = false;
918
872
  });
919
873
  }
874
+ /**
875
+ * @deprecated
876
+ */
877
+ async workerCalculateArray(dataToSplit, operation, options) {
878
+ /* */
879
+ /* */
880
+ /* */
881
+ /* */
882
+ /* */
883
+ /* */
884
+ /* */
885
+ /* */
886
+ /* */
887
+ /* */
888
+ /* */
889
+ /* */
890
+ /* */
891
+ /* */
892
+ /* */
893
+ /* */
894
+ /* */
895
+ /* */
896
+ /* */
897
+ /* */
898
+ /* */
899
+ /* */
900
+ /* */
901
+ /* */
902
+ /* */
903
+ /* */
904
+ /* */
905
+ /* */
906
+ /* */
907
+ /* */
908
+ /* */
909
+ /* */
910
+ /* */
911
+ /* */
912
+ /* */
913
+ /* */
914
+ /* */
915
+ /* */
916
+ /* */
917
+ /* */
918
+ /* */
919
+ /* */
920
+ /* */
921
+ /* */
922
+ /* */
923
+ /* */
924
+ /* */
925
+ /* */
926
+ /* */
927
+ /* */
928
+ /* */
929
+ /* */
930
+ /* */
931
+ /* */
932
+ /* */
933
+ /* */
934
+ /* */
935
+ /* */
936
+ /* */
937
+ /* */
938
+ /* */
939
+ /* */
940
+ /* */
941
+ /* */
942
+ /* */
943
+ }
944
+ checkEnvironment(deps) {
945
+ /* */
946
+ /* */
947
+ return (void 0);
948
+ }
920
949
  }
921
950
  applyMixins(HelpersFiredev, [
922
951
  HelpersStringsRegexes,
@@ -2149,6 +2178,218 @@ ${proj?.children.map(c => '+' + c.genericName).join('\n')}
2149
2178
  useGitBranchesAsMetadataForCommits() {
2150
2179
  return true;
2151
2180
  }
2181
+ /**
2182
+ * angular libraries from angular.json
2183
+ */
2184
+ get libraries() {
2185
+ /* */
2186
+ /* */
2187
+ /* */
2188
+ /* */
2189
+ /* */
2190
+ /* */
2191
+ /* */
2192
+ /* */
2193
+ /* */
2194
+ return (void 0);
2195
+ }
2196
+ get sortedLibrariesByDeps() {
2197
+ /* */
2198
+ /* */
2199
+ /* */
2200
+ /* */
2201
+ /* */
2202
+ /* */
2203
+ /* */
2204
+ /* */
2205
+ /* */
2206
+ /* */
2207
+ /* */
2208
+ /* */
2209
+ /* */
2210
+ /* */
2211
+ /* */
2212
+ /* */
2213
+ /* */
2214
+ /* */
2215
+ /* */
2216
+ /* */
2217
+ /* */
2218
+ /* */
2219
+ /* */
2220
+ /* */
2221
+ /* */
2222
+ /* */
2223
+ /* */
2224
+ /* */
2225
+ /* */
2226
+ /* */
2227
+ return (void 0);
2228
+ }
2229
+ async getSortedLibrariesByDepsForBuild() {
2230
+ /* */
2231
+ /* */
2232
+ /* */
2233
+ /* */
2234
+ /* */
2235
+ /* */
2236
+ /* */
2237
+ /* */
2238
+ /* */
2239
+ /* */
2240
+ /* */
2241
+ /* */
2242
+ /* */
2243
+ /* */
2244
+ /* */
2245
+ /* */
2246
+ /* */
2247
+ /* */
2248
+ /* */
2249
+ /* */
2250
+ /* */
2251
+ /* */
2252
+ /* */
2253
+ /* */
2254
+ /* */
2255
+ /* */
2256
+ /* */
2257
+ /* */
2258
+ /* */
2259
+ /* */
2260
+ /* */
2261
+ /* */
2262
+ /* */
2263
+ /* */
2264
+ /* */
2265
+ /* */
2266
+ /* */
2267
+ /* */
2268
+ /* */
2269
+ /* */
2270
+ /* */
2271
+ /* */
2272
+ /* */
2273
+ /* */
2274
+ /* */
2275
+ /* */
2276
+ return (void 0);
2277
+ }
2278
+ get getLibraryBuildSuccessComamnd() {
2279
+ /* */
2280
+ /* */
2281
+ /* */
2282
+ /* */
2283
+ /* */
2284
+ /* */
2285
+ /* */
2286
+ return (void 0);
2287
+ }
2288
+ async buildLibraries({ rebuild = false, watch = false, strategy } = {}) {
2289
+ /* */
2290
+ /* */
2291
+ /* */
2292
+ /* */
2293
+ /* */
2294
+ /* */
2295
+ /* */
2296
+ /* */
2297
+ /* */
2298
+ /* */
2299
+ /* */
2300
+ /* */
2301
+ /* */
2302
+ /* */
2303
+ /* */
2304
+ /* */
2305
+ /* */
2306
+ /* */
2307
+ /* */
2308
+ /* */
2309
+ /* */
2310
+ /* */
2311
+ /* */
2312
+ /* */
2313
+ /* */
2314
+ /* */
2315
+ /* */
2316
+ /* */
2317
+ /* */
2318
+ /* */
2319
+ /* */
2320
+ /* */
2321
+ /* */
2322
+ /* */
2323
+ /* */
2324
+ /* */
2325
+ /* */
2326
+ /* */
2327
+ /* */
2328
+ /* */
2329
+ /* */
2330
+ /* */
2331
+ /* */
2332
+ /* */
2333
+ /* */
2334
+ /* */
2335
+ /* */
2336
+ /* */
2337
+ /* */
2338
+ /* */
2339
+ /* */
2340
+ /* */
2341
+ /* */
2342
+ /* */
2343
+ /* */
2344
+ /* */
2345
+ /* */
2346
+ /* */
2347
+ /* */
2348
+ /* */
2349
+ /* */
2350
+ /* */
2351
+ /* */
2352
+ /* */
2353
+ /* */
2354
+ /* */
2355
+ /* */
2356
+ /* */
2357
+ /* */
2358
+ /* */
2359
+ /* */
2360
+ /* */
2361
+ /* */
2362
+ /* */
2363
+ /* */
2364
+ /* */
2365
+ /* */
2366
+ /* */
2367
+ /* */
2368
+ /* */
2369
+ /* */
2370
+ /* */
2371
+ /* */
2372
+ /* */
2373
+ /* */
2374
+ /* */
2375
+ /* */
2376
+ /* */
2377
+ /* */
2378
+ /* */
2379
+ /* */
2380
+ }
2381
+ getLibraryBuildComamnd(options) {
2382
+ /* */
2383
+ /* */
2384
+ /* */
2385
+ /* */
2386
+ /* */
2387
+ /* */
2388
+ /* */
2389
+ /* */
2390
+ /* */
2391
+ return (void 0);
2392
+ }
2152
2393
  }
2153
2394
  ;
2154
2395
  ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-project.ts
@@ -2161,6 +2402,7 @@ class BaseFeatureForProject {
2161
2402
  ;
2162
2403
  ({}); // @--end-of-file-for-module=tnp-helpers lib/base/base-feature-for-project.ts
2163
2404
 
2405
+ const regexTeamsID = /[A-Z0-9]+\#/;
2164
2406
  const regexCommitModuleInArgs = /\[[a-z|\-]+\]/;
2165
2407
  const regexCommitModuleInBranch = /\-\-[a-z|\-]+\-\-/;
2166
2408
  class CommitData {
@@ -2188,6 +2430,15 @@ class CommitData {
2188
2430
  commitMsg = commitMsg.replace('http://', '');
2189
2431
  return commitMsg;
2190
2432
  }
2433
+ static getTeamsIdFrom(commitMsg) {
2434
+ let teamID = _.first(commitMsg.match(regexTeamsID));
2435
+ if (teamID) {
2436
+ commitMsg = commitMsg.replace(teamID, '');
2437
+ }
2438
+ return {
2439
+ commitMsgOrBranchName: commitMsg, teamID
2440
+ };
2441
+ }
2191
2442
  static getModuleNameFrom(commitMsg) {
2192
2443
  let commitModuleName = _.first(commitMsg.match(regexCommitModuleInArgs));
2193
2444
  if (commitModuleName) {
@@ -2200,9 +2451,13 @@ class CommitData {
2200
2451
  static getModuleNameFromBranch(branchName) {
2201
2452
  let commitModuleName = _.first(branchName.match(regexCommitModuleInBranch));
2202
2453
  if (commitModuleName) {
2203
- branchName = branchName.replace(commitModuleName, '-');
2454
+ branchName = branchName.replace(commitModuleName, '');
2455
+ commitModuleName = commitModuleName?.replace(/^\-\-/, '')?.replace(/\-\-$/, '');
2456
+ if (commitModuleName.startsWith('-')) {
2457
+ commitModuleName = commitModuleName.replace(/^\-/, '');
2458
+ }
2204
2459
  }
2205
- return { commitMsg: branchName, commitModuleName: commitModuleName?.replace(/\-/g, '') };
2460
+ return { commitModuleName: commitModuleName?.replace(/^\-\-/, '')?.replace(/\-\-$/, '') };
2206
2461
  }
2207
2462
  static async getFromArgs(args, typeOfCommit) {
2208
2463
  /* */
@@ -2238,6 +2493,10 @@ class CommitData {
2238
2493
  /* */
2239
2494
  /* */
2240
2495
  /* */
2496
+ /* */
2497
+ /* */
2498
+ /* */
2499
+ /* */
2241
2500
  return (void 0);
2242
2501
  }
2243
2502
  static async getFromBranch(currentBranchName) {
@@ -2273,6 +2532,7 @@ class CommitData {
2273
2532
  /* */
2274
2533
  /* */
2275
2534
  /* */
2535
+ /* */
2276
2536
  return (void 0);
2277
2537
  }
2278
2538
  static from(options) {
@@ -2281,6 +2541,10 @@ class CommitData {
2281
2541
  return opt;
2282
2542
  }
2283
2543
  clearMessage(message) {
2544
+ if (this.teamID && _.isString(this.teamID)) {
2545
+ message = message.replace(this.teamID.toLowerCase().replace('-', ' '), ' ');
2546
+ message = message.replace(this.teamID.toUpperCase().replace('-', ' '), ' ');
2547
+ }
2284
2548
  for (const jira of (this.jiraNumbers || [])) {
2285
2549
  message = message.replace(jira.toLowerCase().replace('-', ' '), ' ');
2286
2550
  message = message.replace(jira.toUpperCase().replace('-', ' '), ' ');
@@ -2290,6 +2554,12 @@ class CommitData {
2290
2554
  message = message.replace(regexCommitModuleInBranch, ' ');
2291
2555
  message = message.replace(/\ \ /g, ' ');
2292
2556
  }
2557
+ if (this.teamID && _.isString(this.teamID)) {
2558
+ message = message.replace(/\_/g, ' ');
2559
+ }
2560
+ if (this.commitModuleName) {
2561
+ message = message.replace(this.commitModuleName.replace(/\-/g, ' '), ' ');
2562
+ }
2293
2563
  return message;
2294
2564
  }
2295
2565
  /**
@@ -2332,9 +2602,23 @@ class CommitData {
2332
2602
  /* */
2333
2603
  /* */
2334
2604
  /* */
2605
+ /* */
2606
+ /* */
2607
+ /* */
2608
+ /* */
2609
+ /* */
2610
+ /* */
2611
+ /* */
2335
2612
  return (void 0);
2336
2613
  }
2337
2614
  get branchName() {
2615
+ /* */
2616
+ /* */
2617
+ /* */
2618
+ /* */
2619
+ /* */
2620
+ /* */
2621
+ /* */
2338
2622
  /* */
2339
2623
  /* */
2340
2624
  /* */