@arghajit/dummy 0.3.17 → 0.3.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.
@@ -6,6 +6,7 @@ import path from "path";
6
6
  import { fork } from "child_process";
7
7
  import { fileURLToPath } from "url";
8
8
  import { getOutputDir } from "./config-reader.mjs";
9
+ import { animate } from "./terminal-logo.mjs";
9
10
 
10
11
  // Use dynamic import for chalk as it's ESM only
11
12
  let chalk;
@@ -688,21 +689,173 @@ function generatePieChart(data, chartWidth = 300, chartHeight = 300) {
688
689
  </div>
689
690
  `;
690
691
  }
691
- function generateEnvironmentDashboard(environment) {
692
- // Format memory for display
693
- const formattedMemory = environment.memory.replace(/(\d+\.\d{2})GB/, "$1 GB");
694
-
695
- // Generate a unique ID for the dashboard
696
- const dashboardId = `envDashboard-${Date.now()}-${Math.random()
697
- .toString(36)
698
- .substring(2, 7)}`;
692
+ function generateEnvironmentSection(environmentData) {
693
+ if (!environmentData) {
694
+ return '<div class="no-data">Environment data not available.</div>';
695
+ }
696
+
697
+ if (Array.isArray(environmentData)) {
698
+ return `
699
+ <div class="sharded-env-section">
700
+ <div class="sharded-env-header">
701
+ <div class="sharded-env-title-row">
702
+ <div>
703
+ <div class="sharded-env-title">
704
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
705
+ <rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect>
706
+ <rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect>
707
+ <line x1="6" x2="6.01" y1="6" y2="6"></line>
708
+ <line x1="6" x2="6.01" y1="18" y2="18"></line>
709
+ </svg>
710
+ System Information
711
+ </div>
712
+ <div class="sharded-env-subtitle">Test execution environment details - ${environmentData.length} shard${environmentData.length > 1 ? "s" : ""}</div>
713
+ </div>
714
+ <div class="env-icon-badge">
715
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
716
+ <path d="M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"></path>
717
+ </svg>
718
+ </div>
719
+ </div>
720
+ </div>
721
+ <div class="sharded-environments-container">
722
+ <div class="sharded-environments-wrapper">
723
+ ${environmentData
724
+ .map(
725
+ (env, index) => `
726
+ <div class="env-card-wrapper">
727
+ <div class="env-card-badge">Shard ${index + 1}</div>
728
+ ${generateEnvironmentDashboard(env, true)}
729
+ </div>
730
+ `,
731
+ )
732
+ .join("")}
733
+ </div>
734
+ </div>
735
+ </div>
736
+ <style>
737
+ .sharded-env-section {
738
+ border: 1px solid #e2e8f0;
739
+ border-radius: 12px;
740
+ background: #fafbfc;
741
+ overflow: hidden;
742
+ }
743
+ .sharded-env-header {
744
+ position: sticky;
745
+ top: 0;
746
+ z-index: 20;
747
+ background: linear-gradient(to bottom right, #ffffff 0%, #fafafa 100%);
748
+ border-bottom: 1px solid #e2e8f0;
749
+ padding: 24px 24px 16px;
750
+ }
751
+ .sharded-env-title-row {
752
+ display: flex;
753
+ justify-content: space-between;
754
+ align-items: center;
755
+ }
756
+ .sharded-env-title {
757
+ display: flex;
758
+ align-items: center;
759
+ font-size: 18px;
760
+ font-weight: 600;
761
+ color: #0f172a;
762
+ }
763
+ .sharded-env-title svg {
764
+ width: 18px;
765
+ height: 18px;
766
+ margin-right: 8px;
767
+ stroke: currentColor;
768
+ fill: none;
769
+ }
770
+ .sharded-env-subtitle {
771
+ font-size: 13px;
772
+ color: #64748b;
773
+ margin-top: 4px;
774
+ }
775
+ .sharded-environments-container {
776
+ max-height: 520px;
777
+ overflow-y: auto;
778
+ overflow-x: hidden;
779
+ padding: 16px;
780
+ }
781
+ .sharded-environments-container::-webkit-scrollbar {
782
+ width: 8px;
783
+ }
784
+ .sharded-environments-container::-webkit-scrollbar-track {
785
+ background: #f1f1f1;
786
+ border-radius: 4px;
787
+ }
788
+ .sharded-environments-container::-webkit-scrollbar-thumb {
789
+ background: #cbd5e0;
790
+ border-radius: 4px;
791
+ }
792
+ .sharded-environments-container::-webkit-scrollbar-thumb:hover {
793
+ background: #a0aec0;
794
+ }
795
+ .sharded-environments-wrapper {
796
+ display: grid;
797
+ grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
798
+ gap: 24px;
799
+ }
800
+ @media (max-width: 768px) {
801
+ .sharded-environments-wrapper {
802
+ grid-template-columns: 1fr;
803
+ }
804
+ }
805
+ .env-card-wrapper {
806
+ position: relative;
807
+ }
808
+ .env-card-badge {
809
+ position: absolute;
810
+ top: -10px;
811
+ right: 16px;
812
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
813
+ color: white;
814
+ padding: 6px 14px;
815
+ border-radius: 20px;
816
+ font-size: 0.75em;
817
+ font-weight: 700;
818
+ text-transform: uppercase;
819
+ letter-spacing: 0.5px;
820
+ z-index: 10;
821
+ box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
822
+ }
823
+ </style>
824
+ `;
825
+ }
826
+
827
+ return generateEnvironmentDashboard(environmentData);
828
+ }
699
829
 
700
- // Logic for Run Context
830
+ function generateEnvironmentDashboard(environment, hideHeader = false) {
831
+ const cpuInfo = `model: ${environment.cpu.model}, cores: ${environment.cpu.cores}`;
832
+ const osInfo = environment.os || "N/A";
833
+ const nodeInfo = environment.node || "N/A";
834
+ const v8Info = environment.v8 || "N/A";
835
+ const cwdInfo = environment.cwd || "N/A";
836
+ const formattedMemory = environment.memory || "N/A";
701
837
  const runContext = process.env.CI ? "CI" : "Local Test";
702
838
 
703
839
  return `
704
- <div class="environment-dashboard-wrapper" id="${dashboardId}">
840
+ <div class="env-modern-card${hideHeader ? " no-header" : ""}">
705
841
  <style>
842
+ .env-modern-card {
843
+ background: linear-gradient(to bottom right, #ffffff 0%, #fafafa 100%);
844
+ border: 0;
845
+ border-radius: 12px;
846
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
847
+ margin-top: 24px;
848
+ transition: all 0.3s ease;
849
+ font-family: var(--font-family);
850
+ overflow: hidden;
851
+ }
852
+ .env-modern-card:hover {
853
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
854
+ }
855
+ .env-modern-card {
856
+ margin-bottom: 0;
857
+ }
858
+
706
859
  .environment-dashboard-wrapper *,
707
860
  .environment-dashboard-wrapper *::before,
708
861
  .environment-dashboard-wrapper *::after {
@@ -726,279 +879,269 @@ function generateEnvironmentDashboard(environment) {
726
879
  transform: translateZ(0);
727
880
  }
728
881
 
729
- @media (max-width: 768px) {
730
- .environment-dashboard-wrapper {
731
- grid-template-columns: 1fr;
732
- padding: 32px 24px;
733
- }
882
+ .env-card-header {
883
+ display: flex;
884
+ flex-direction: column;
885
+ padding: 24px 24px 12px;
734
886
  }
735
- @media (max-width: 480px) {
736
- .environment-dashboard-wrapper {
737
- padding: 24px;
738
- }
887
+ .env-modern-card.no-header .env-card-header {
888
+ display: none;
739
889
  }
740
-
741
- .env-dashboard-header {
742
- grid-column: 1 / -1;
743
- margin-bottom: 24px;
890
+ .env-modern-card.no-header {
891
+ margin-top: 0;
744
892
  }
745
-
746
- .env-dashboard-title {
747
- font-size: 2em;
748
- font-weight: 900;
749
- color: #0f172a;
750
- letter-spacing: -0.02em;
751
- margin: 0 0 8px 0;
893
+ .env-modern-card.no-header .env-card-content {
894
+ padding-top: 24px;
752
895
  }
753
-
754
- .env-dashboard-subtitle {
755
- font-size: 1.05em;
756
- color: #64748b;
757
- margin: 0;
758
- font-weight: 400;
896
+ .env-card-title-row {
897
+ display: flex;
898
+ justify-content: space-between;
899
+ align-items: center;
759
900
  }
760
-
761
- .env-card {
762
- background: white;
763
- border: none;
764
- border-left: 4px solid #e2e8f0;
765
- padding: 28px;
901
+ .env-card-title {
766
902
  display: flex;
767
- flex-direction: column;
768
- gap: 20px;
769
- transition: all 0.12s ease;
770
- transform: translateZ(0);
903
+ align-items: center;
904
+ font-size: 16px;
905
+ font-weight: 600;
906
+ color: #0f172a;
907
+ transition: color 0.3s;
771
908
  }
772
-
773
- .env-card:hover {
774
- border-left-color: var(--primary-color);
775
- background: #fafbfc;
909
+ .env-modern-card:hover .env-card-title {
910
+ color: #6366f1;
776
911
  }
777
-
778
- .env-card-header {
779
- font-weight: 700;
780
- font-size: 1.05em;
781
- color: #0f172a;
912
+ .env-card-title svg {
913
+ width: 16px;
914
+ height: 16px;
915
+ margin-right: 8px;
916
+ stroke: currentColor;
917
+ fill: none;
918
+ }
919
+ .env-card-subtitle {
920
+ font-size: 12px;
921
+ color: #64748b;
922
+ margin-top: 4px;
923
+ }
924
+ .env-icon-badge {
925
+ width: 36px;
926
+ height: 36px;
927
+ border-radius: 50%;
928
+ background: linear-gradient(to bottom right, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
782
929
  display: flex;
783
930
  align-items: center;
784
- gap: 10px;
785
- text-transform: uppercase;
786
- letter-spacing: 0.5px;
931
+ justify-content: center;
787
932
  }
788
-
789
- .env-card-header svg {
790
- width: 18px;
791
- height: 18px;
792
- fill: #6366f1;
933
+ .env-icon-badge svg {
934
+ width: 16px;
935
+ height: 16px;
936
+ stroke: #6366f1;
937
+ fill: none;
793
938
  }
794
-
795
939
  .env-card-content {
796
- display: flex;
797
- flex-direction: column;
798
- gap: 16px;
799
- }
800
-
801
- .env-detail-row {
802
- display: flex;
803
- justify-content: space-between;
804
- align-items: flex-start;
805
- gap: 16px;
806
- font-size: 1em;
807
- padding: 8px 0;
940
+ padding: 0 24px 24px;
808
941
  }
809
-
810
- .env-detail-label {
811
- color: #64748b;
812
- font-weight: 600;
813
- font-size: 0.9em;
814
- text-transform: uppercase;
815
- letter-spacing: 0.3px;
816
- flex-shrink: 0;
942
+ .env-items-grid {
943
+ display: grid;
944
+ grid-template-columns: repeat(2, 1fr);
945
+ gap: 10px;
817
946
  }
818
-
819
- .env-detail-value {
820
- color: #0f172a;
821
- font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
822
- font-size: 0.95em;
823
- text-align: right;
824
- word-break: break-word;
825
- margin-left: auto;
947
+ @media (min-width: 768px) {
948
+ .env-items-grid {
949
+ grid-template-columns: repeat(4, 1fr);
950
+ }
826
951
  }
827
-
828
- .env-chip {
829
- display: inline-flex;
830
- align-items: center;
831
- padding: 6px 14px;
832
- border-radius: 6px;
833
- font-size: 0.85em;
834
- font-weight: 700;
835
- text-transform: uppercase;
836
- letter-spacing: 0.5px;
952
+ .env-item {
953
+ display: flex;
954
+ align-items: flex-start;
955
+ gap: 8px;
956
+ padding: 8px;
957
+ border-radius: 8px;
958
+ transition: background-color 0.2s;
959
+ min-height: 48px;
837
960
  }
838
-
839
- .env-chip-primary {
840
- background-color: #ede9fe;
841
- color: #6366f1;
961
+ .env-item:hover {
962
+ background-color: rgba(100, 116, 139, 0.05);
842
963
  }
843
-
844
- .env-chip-success {
845
- background-color: #d1fae5;
846
- color: #10b981;
964
+ .env-item-icon {
965
+ flex-shrink: 0;
847
966
  }
848
-
849
- .env-chip-warning {
850
- background-color: #fef3c7;
851
- color: #f59e0b;
967
+ .env-item-icon svg {
968
+ width: 16px;
969
+ height: 16px;
970
+ stroke: #6366f1;
971
+ fill: none;
852
972
  }
853
-
854
- .env-cpu-cores {
855
- display: flex;
856
- align-items: center;
857
- gap: 6px;
973
+ .env-item-content {
974
+ flex-grow: 1;
975
+ min-width: 0;
858
976
  }
859
-
860
- .env-core-indicator {
861
- width: 12px;
862
- height: 12px;
863
- border-radius: 50%;
864
- background-color: var(--success-color);
865
- border: 1px solid rgba(0,0,0,0.1);
977
+ .env-item-label {
978
+ font-size: 12px;
979
+ font-weight: 500;
980
+ color: #64748b;
981
+ white-space: nowrap;
982
+ overflow: hidden;
983
+ text-overflow: ellipsis;
866
984
  }
867
-
868
- .env-core-indicator.inactive {
869
- background-color: var(--border-light-color);
870
- opacity: 0.7;
871
- border-color: var(--border-color);
985
+ .env-item-value {
986
+ font-size: 12px;
987
+ font-weight: 600;
988
+ color: #0f172a;
989
+ word-wrap: break-word;
990
+ overflow-wrap: break-word;
991
+ line-height: 1.4;
872
992
  }
873
993
  </style>
874
994
 
875
- <div class="env-dashboard-header">
876
- <div>
877
- <h3 class="env-dashboard-title">System Environment</h3>
878
- <p class="env-dashboard-subtitle">Snapshot of the execution environment</p>
879
- </div>
880
- <span class="env-chip env-chip-primary">${environment.host}</span>
881
- </div>
882
-
883
- <div class="env-card">
884
- <div class="env-card-header">
885
- <svg viewBox="0 0 24 24"><path d="M4 6h16V4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h-2v10H4V6zm18-2h-4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2H6a2 2 0 0 0-2 2v2h20V6a2 2 0 0 0-2-2zM8 12h8v2H8v-2zm0 4h8v2H8v-2z"/></svg>
886
- Hardware
887
- </div>
888
- <div class="env-card-content">
889
- <div class="env-detail-row">
890
- <span class="env-detail-label">CPU Model</span>
891
- <span class="env-detail-value">${environment.cpu.model}</span>
892
- </div>
893
- <div class="env-detail-row">
894
- <span class="env-detail-label">CPU Cores</span>
895
- <span class="env-detail-value">
896
- <div class="env-cpu-cores">
897
- <span>${environment.cpu.cores || "N/A"} core${environment.cpu.cores !== 1 ? "s" : ""}</span>
898
- </div>
899
- </span>
995
+ <div class="env-card-header">
996
+ <div class="env-card-title-row">
997
+ <div>
998
+ <div class="env-card-title">
999
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1000
+ <rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect>
1001
+ <rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect>
1002
+ <line x1="6" x2="6.01" y1="6" y2="6"></line>
1003
+ <line x1="6" x2="6.01" y1="18" y2="18"></line>
1004
+ </svg>
1005
+ System Information
1006
+ </div>
1007
+ <div class="env-card-subtitle">Test execution environment details</div>
900
1008
  </div>
901
- <div class="env-detail-row">
902
- <span class="env-detail-label">Memory</span>
903
- <span class="env-detail-value">${formattedMemory}</span>
1009
+ <div class="env-icon-badge">
1010
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1011
+ <path d="M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"></path>
1012
+ </svg>
904
1013
  </div>
905
1014
  </div>
906
1015
  </div>
907
1016
 
908
- <div class="env-card">
909
- <div class="env-card-header">
910
- <svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-0.01 18c-2.76 0-5.26-1.12-7.07-2.93A7.973 7.973 0 0 1 4 12c0-2.21.9-4.21 2.36-5.64A7.994 7.994 0 0 1 11.99 4c4.41 0 8 3.59 8 8 0 2.76-1.12 5.26-2.93 7.07A7.973 7.973 0 0 1 11.99 20zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></svg>
911
- Operating System
912
- </div>
913
- <div class="env-card-content">
914
- <div class="env-detail-row">
915
- <span class="env-detail-label">OS Type</span>
916
- <span class="env-detail-value">${
917
- environment.os.split(" ")[0] === "darwin"
918
- ? "darwin (macOS)"
919
- : environment.os.split(" ")[0] || "Unknown"
920
- }</span>
921
- </div>
922
- <div class="env-detail-row">
923
- <span class="env-detail-label">OS Version</span>
924
- <span class="env-detail-value">${
925
- environment.os.split(" ")[1] || "N/A"
926
- }</span>
927
- </div>
928
- <div class="env-detail-row">
929
- <span class="env-detail-label">Hostname</span>
930
- <span class="env-detail-value" title="${environment.host}">${
931
- environment.host
932
- }</span>
1017
+ <div class="env-card-content">
1018
+ <div class="env-items-grid">
1019
+ <div class="env-item">
1020
+ <div class="env-item-icon">
1021
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1022
+ <path d="M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"></path>
1023
+ </svg>
1024
+ </div>
1025
+ <div class="env-item-content">
1026
+ <p class="env-item-label">Host</p>
1027
+ <div class="env-item-value" title="${environment.host}">${environment.host}</div>
1028
+ </div>
933
1029
  </div>
934
- </div>
935
- </div>
936
-
937
- <div class="env-card">
938
- <div class="env-card-header">
939
- <svg viewBox="0 0 24 24"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/></svg>
940
- Node.js Runtime
941
- </div>
942
- <div class="env-card-content">
943
- <div class="env-detail-row">
944
- <span class="env-detail-label">Node Version</span>
945
- <span class="env-detail-value">${environment.node}</span>
1030
+
1031
+ <div class="env-item">
1032
+ <div class="env-item-icon">
1033
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1034
+ <path d="M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0 1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16"></path>
1035
+ </svg>
1036
+ </div>
1037
+ <div class="env-item-content">
1038
+ <p class="env-item-label">Os</p>
1039
+ <div class="env-item-value" title="${environment.os}">${environment.os}</div>
1040
+ </div>
946
1041
  </div>
947
- <div class="env-detail-row">
948
- <span class="env-detail-label">V8 Engine</span>
949
- <span class="env-detail-value">${environment.v8}</span>
1042
+
1043
+ <div class="env-item">
1044
+ <div class="env-item-icon">
1045
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1046
+ <rect width="16" height="16" x="4" y="4" rx="2"></rect>
1047
+ <rect width="6" height="6" x="9" y="9" rx="1"></rect>
1048
+ <path d="M15 2v2"></path>
1049
+ <path d="M15 20v2"></path>
1050
+ <path d="M2 15h2"></path>
1051
+ <path d="M2 9h2"></path>
1052
+ <path d="M20 15h2"></path>
1053
+ <path d="M20 9h2"></path>
1054
+ <path d="M9 2v2"></path>
1055
+ <path d="M9 20v2"></path>
1056
+ </svg>
1057
+ </div>
1058
+ <div class="env-item-content">
1059
+ <p class="env-item-label">Cpu</p>
1060
+ <div class="env-item-value" title='${JSON.stringify(environment.cpu)}'>${cpuInfo}</div>
1061
+ </div>
950
1062
  </div>
951
- <div class="env-detail-row">
952
- <span class="env-detail-label">Working Dir</span>
953
- <span class="env-detail-value" title="${environment.cwd}">${
954
- environment.cwd.length > 25
955
- ? "..." + environment.cwd.slice(-22)
956
- : environment.cwd
957
- }</span>
1063
+
1064
+ <div class="env-item">
1065
+ <div class="env-item-icon">
1066
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1067
+ <path d="M6 19v-3"></path>
1068
+ <path d="M10 19v-3"></path>
1069
+ <path d="M14 19v-3"></path>
1070
+ <path d="M18 19v-3"></path>
1071
+ <path d="M8 11V9"></path>
1072
+ <path d="M16 11V9"></path>
1073
+ <path d="M12 11V9"></path>
1074
+ <path d="M2 15h20"></path>
1075
+ <path d="M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z"></path>
1076
+ </svg>
1077
+ </div>
1078
+ <div class="env-item-content">
1079
+ <p class="env-item-label">Memory</p>
1080
+ <div class="env-item-value" title="${environment.memory}">${environment.memory}</div>
1081
+ </div>
958
1082
  </div>
959
- </div>
960
- </div>
961
-
962
- <div class="env-card">
963
- <div class="env-card-header">
964
- <svg viewBox="0 0 24 24"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 8.69 9.48 7 12 7c2.76 0 5 2.24 5 5v1h2c1.66 0 3 1.34 3 3s-1.34 3-3 3z"/></svg>
965
- System Summary
966
- </div>
967
- <div class="env-card-content">
968
- <div class="env-detail-row">
969
- <span class="env-detail-label">Platform Arch</span>
970
- <span class="env-detail-value">
971
- <span class="env-chip ${
972
- environment.os.includes("darwin") &&
973
- environment.cpu.model.toLowerCase().includes("apple")
974
- ? "env-chip-success"
975
- : "env-chip-warning"
976
- }">
977
- ${
978
- environment.os.includes("darwin") &&
979
- environment.cpu.model.toLowerCase().includes("apple")
980
- ? "Apple Silicon"
981
- : environment.cpu.model.toLowerCase().includes("arm") ||
982
- environment.cpu.model.toLowerCase().includes("aarch64")
983
- ? "ARM-based"
984
- : "x86/Other"
985
- }
986
- </span>
987
- </span>
1083
+
1084
+ <div class="env-item">
1085
+ <div class="env-item-icon">
1086
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1087
+ <path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"></path>
1088
+ <path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
1089
+ <path d="M12 2v2"></path>
1090
+ <path d="M12 22v-2"></path>
1091
+ <path d="m17 20.66-1-1.73"></path>
1092
+ <path d="M11 10.27 7 3.34"></path>
1093
+ <path d="m20.66 17-1.73-1"></path>
1094
+ <path d="m3.34 7 1.73 1"></path>
1095
+ <path d="M14 12h8"></path>
1096
+ <path d="M2 12h2"></path>
1097
+ <path d="m20.66 7-1.73 1"></path>
1098
+ <path d="m3.34 17 1.73-1"></path>
1099
+ <path d="m17 3.34-1 1.73"></path>
1100
+ <path d="m11 13.73-4 6.93"></path>
1101
+ </svg>
1102
+ </div>
1103
+ <div class="env-item-content">
1104
+ <p class="env-item-label">Node</p>
1105
+ <div class="env-item-value" title="${environment.node}">${environment.node}</div>
1106
+ </div>
988
1107
  </div>
989
- <div class="env-detail-row">
990
- <span class="env-detail-label">Memory per Core</span>
991
- <span class="env-detail-value">${
992
- environment.cpu.cores > 0
993
- ? (
994
- parseFloat(environment.memory) / environment.cpu.cores
995
- ).toFixed(2) + " GB"
996
- : "N/A"
997
- }</span>
1108
+
1109
+ <div class="env-item">
1110
+ <div class="env-item-icon">
1111
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1112
+ <path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"></path>
1113
+ <path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
1114
+ <path d="M12 2v2"></path>
1115
+ <path d="M12 22v-2"></path>
1116
+ <path d="m17 20.66-1-1.73"></path>
1117
+ <path d="M11 10.27 7 3.34"></path>
1118
+ <path d="m20.66 17-1.73-1"></path>
1119
+ <path d="m3.34 7 1.73 1"></path>
1120
+ <path d="M14 12h8"></path>
1121
+ <path d="M2 12h2"></path>
1122
+ <path d="m20.66 7-1.73 1"></path>
1123
+ <path d="m3.34 17 1.73-1"></path>
1124
+ <path d="m17 3.34-1 1.73"></path>
1125
+ <path d="m11 13.73-4 6.93"></path>
1126
+ </svg>
1127
+ </div>
1128
+ <div class="env-item-content">
1129
+ <p class="env-item-label">V8</p>
1130
+ <div class="env-item-value" title="${environment.v8}">${environment.v8}</div>
1131
+ </div>
998
1132
  </div>
999
- <div class="env-detail-row">
1000
- <span class="env-detail-label">Run Context</span>
1001
- <span class="env-detail-value">${runContext}</span>
1133
+
1134
+ <div class="env-item">
1135
+ <div class="env-item-icon">
1136
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1137
+ <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
1138
+ <polyline points="9 22 9 12 15 12 15 22"></polyline>
1139
+ </svg>
1140
+ </div>
1141
+ <div class="env-item-content">
1142
+ <p class="env-item-label">Working Dir</p>
1143
+ <div class="env-item-value" title="${environment.cwd}">${environment.cwd.length > 30 ? "..." + environment.cwd.slice(-27) : environment.cwd}</div>
1144
+ </div>
1002
1145
  </div>
1003
1146
  </div>
1004
1147
  </div>
@@ -2145,6 +2288,13 @@ function generateHTML(reportData, trendData = null) {
2145
2288
  )}</div>`
2146
2289
  : ""
2147
2290
  }
2291
+ ${
2292
+ step.codeSnippet
2293
+ ? `<div class="code-snippet-section"><pre class="code-snippet">${sanitizeHTML(
2294
+ step.codeSnippet,
2295
+ )}</pre></div>`
2296
+ : ""
2297
+ }
2148
2298
  ${
2149
2299
  step.errorMessage
2150
2300
  ? `<div class="test-error-summary">
@@ -3207,8 +3357,9 @@ function generateHTML(reportData, trendData = null) {
3207
3357
  border: none;
3208
3358
  border-left: 4px solid #e2e8f0;
3209
3359
  padding: 24px;
3210
- background: white;
3360
+ background: cornsilk;
3211
3361
  transition: all 0.15s ease;
3362
+ border-radius: 10px;
3212
3363
  }
3213
3364
  .suite-card:hover {
3214
3365
  background: #fafbfc;
@@ -3518,6 +3669,8 @@ function generateHTML(reportData, trendData = null) {
3518
3669
  .step-duration { color: var(--dark-gray-color); font-size: 0.9em; }
3519
3670
  .step-details { display: none; padding: 14px; margin-top: 8px; background: #fdfdfd; border-radius: 6px; font-size: 0.95em; border: 1px solid var(--light-gray-color); }
3520
3671
  .step-info { margin-bottom: 8px; }
3672
+ .code-snippet-section { margin: 12px 0; }
3673
+ .code-snippet { background-color: #f8f9fa; border: 1px solid #e1e4e8; border-radius: 6px; padding: 12px; font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 0.9em; line-height: 1.5; overflow-x: auto; color: #24292e; margin: 0; white-space: pre; }
3521
3674
  .test-error-summary { color: var(--danger-color); margin-top: 12px; padding: 14px; background: rgba(244,67,54,0.05); border-radius: 4px; font-size: 0.95em; border-left: 3px solid var(--danger-color); }
3522
3675
  .test-error-summary pre.stack-trace { margin-top: 10px; padding: 12px; background-color: rgba(0,0,0,0.03); border-radius: 4px; font-size:0.9em; max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }
3523
3676
  .step-hook { background-color: rgba(33,150,243,0.04); border-left: 3px solid var(--info-color) !important; }
@@ -4094,12 +4247,7 @@ function generateHTML(reportData, trendData = null) {
4094
4247
  400,
4095
4248
  390,
4096
4249
  )}
4097
- ${
4098
- runSummary.environment &&
4099
- Object.keys(runSummary.environment).length > 0
4100
- ? generateEnvironmentDashboard(runSummary.environment)
4101
- : '<div class="no-data">Environment data not available.</div>'
4102
- }
4250
+ ${generateEnvironmentSection(runSummary.environment)}
4103
4251
  </div>
4104
4252
 
4105
4253
  <div class="dashboard-column">
@@ -4675,6 +4823,8 @@ async function runScript(scriptPath, args = []) {
4675
4823
  });
4676
4824
  }
4677
4825
  async function main() {
4826
+ await animate();
4827
+
4678
4828
  const __filename = fileURLToPath(import.meta.url);
4679
4829
  const __dirname = path.dirname(__filename);
4680
4830
 
@@ -4866,7 +5016,7 @@ async function main() {
4866
5016
  await fs.writeFile(reportHtmlPath, htmlContent, "utf-8");
4867
5017
  console.log(
4868
5018
  chalk.green.bold(
4869
- `🎉 Pulse report generated successfully at: ${reportHtmlPath}`,
5019
+ `Pulse report generated successfully at: ${reportHtmlPath}`,
4870
5020
  ),
4871
5021
  );
4872
5022
  console.log(chalk.gray(`(You can open this file in your browser)`));