@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
  /**
11
12
  * Dynamically imports the 'chalk' library for terminal string styling.
@@ -764,62 +765,261 @@ function generatePieChart(data, chartWidth = 300, chartHeight = 300) {
764
765
  * @param {number} [dashboardHeight=600] The height of the dashboard.
765
766
  * @returns {string} The HTML string for the environment dashboard.
766
767
  */
767
- function generateEnvironmentDashboard(environment, dashboardHeight = 600) {
768
- // Format memory for display
769
- const formattedMemory = environment.memory.replace(/(\d+\.\d{2})GB/, "$1 GB");
768
+ function generateEnvironmentSection(environmentData) {
769
+ if (!environmentData) {
770
+ return '<div class="no-data">Environment data not available.</div>';
771
+ }
770
772
 
771
- // Generate a unique ID for the dashboard
772
- const dashboardId = `envDashboard-${Date.now()}-${Math.random()
773
- .toString(36)
774
- .substring(2, 7)}`;
773
+ if (Array.isArray(environmentData)) {
774
+ return `
775
+ <div class="sharded-env-section">
776
+ <div class="sharded-env-header">
777
+ <div class="sharded-env-title-row">
778
+ <div>
779
+ <div class="sharded-env-title">
780
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
781
+ <rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect>
782
+ <rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect>
783
+ <line x1="6" x2="6.01" y1="6" y2="6"></line>
784
+ <line x1="6" x2="6.01" y1="18" y2="18"></line>
785
+ </svg>
786
+ System Information
787
+ </div>
788
+ <div class="sharded-env-subtitle">Test execution environment details - ${environmentData.length} shard${environmentData.length > 1 ? "s" : ""}</div>
789
+ </div>
790
+ <div class="env-icon-badge">
791
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
792
+ <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>
793
+ </svg>
794
+ </div>
795
+ </div>
796
+ </div>
797
+ <div class="sharded-environments-container">
798
+ <div class="sharded-environments-wrapper">
799
+ ${environmentData
800
+ .map(
801
+ (env, index) => `
802
+ <div class="env-card-wrapper">
803
+ <div class="env-card-badge">Shard ${index + 1}</div>
804
+ ${generateEnvironmentDashboard(env, true)}
805
+ </div>
806
+ `,
807
+ )
808
+ .join("")}
809
+ </div>
810
+ </div>
811
+ </div>
812
+ <style>
813
+ .sharded-env-section {
814
+ border: 1px solid var(--border-light);
815
+ border-radius: 12px;
816
+ background: var(--bg-secondary);
817
+ overflow: hidden;
818
+ }
819
+ .sharded-env-header {
820
+ position: sticky;
821
+ top: 0;
822
+ z-index: 20;
823
+ background: linear-gradient(to bottom right, var(--bg-primary) 0%, var(--bg-secondary) 100%);
824
+ border-bottom: 1px solid var(--border-light);
825
+ padding: 24px 24px 16px;
826
+ }
827
+ .sharded-env-title-row {
828
+ display: flex;
829
+ justify-content: space-between;
830
+ align-items: center;
831
+ }
832
+ .sharded-env-title {
833
+ display: flex;
834
+ align-items: center;
835
+ font-size: 18px;
836
+ font-weight: 600;
837
+ color: var(--text-primary);
838
+ }
839
+ .sharded-env-title svg {
840
+ width: 18px;
841
+ height: 18px;
842
+ margin-right: 8px;
843
+ stroke: currentColor;
844
+ fill: none;
845
+ }
846
+ .sharded-env-subtitle {
847
+ font-size: 13px;
848
+ color: var(--text-secondary);
849
+ margin-top: 4px;
850
+ }
851
+ .sharded-environments-container {
852
+ max-height: 520px;
853
+ overflow-y: auto;
854
+ overflow-x: hidden;
855
+ padding: 16px;
856
+ }
857
+ .sharded-environments-container::-webkit-scrollbar {
858
+ width: 8px;
859
+ }
860
+ .sharded-environments-container::-webkit-scrollbar-track {
861
+ background: var(--bg-tertiary);
862
+ border-radius: 4px;
863
+ }
864
+ .sharded-environments-container::-webkit-scrollbar-thumb {
865
+ background: var(--border-medium);
866
+ border-radius: 4px;
867
+ }
868
+ .sharded-environments-container::-webkit-scrollbar-thumb:hover {
869
+ background: var(--border-color);
870
+ }
871
+ .sharded-environments-wrapper {
872
+ display: grid;
873
+ grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
874
+ gap: 24px;
875
+ }
876
+ @media (max-width: 768px) {
877
+ .sharded-environments-wrapper {
878
+ grid-template-columns: 1fr;
879
+ }
880
+ }
881
+ .env-card-wrapper {
882
+ position: relative;
883
+ }
884
+ .env-card-badge {
885
+ position: absolute;
886
+ top: -10px;
887
+ right: 16px;
888
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
889
+ color: white;
890
+ padding: 6px 14px;
891
+ border-radius: 20px;
892
+ font-size: 0.75em;
893
+ font-weight: 700;
894
+ text-transform: uppercase;
895
+ letter-spacing: 0.5px;
896
+ z-index: 10;
897
+ box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
898
+ }
899
+ </style>
900
+ `;
901
+ }
775
902
 
776
- const cardHeight = Math.floor(dashboardHeight * 0.44);
777
- const cardContentPadding = 16; // px
903
+ return generateEnvironmentDashboard(environmentData);
904
+ }
778
905
 
779
- // Logic for Run Context
780
- const runContext = process.env.CI ? "CI" : "Local Test";
906
+ function generateEnvironmentDashboard(environment, hideHeader = false) {
907
+ const cpuInfo = `model: ${environment.cpu.model}, cores: ${environment.cpu.cores}`;
781
908
 
782
909
  return `
783
- <div class="environment-dashboard-wrapper" id="${dashboardId}">
910
+ <div class="env-modern-card${hideHeader ? " no-header" : ""}">
784
911
  <style>
785
- .environment-dashboard-wrapper *,
786
- .environment-dashboard-wrapper *::before,
787
- .environment-dashboard-wrapper *::after {
788
- box-sizing: border-box;
789
- }
790
-
791
- .environment-dashboard-wrapper {
792
- --primary-color: var(--primary-dark, #6366f1);
793
- --success-color: var(--success-dark, #10b981);
794
- --warning-color: var(--warning-dark, #f59e0b);
795
-
796
- background-color: var(--bg-tertiary);
797
- padding: 48px;
798
- border-bottom: 1px solid var(--border-light);
912
+ .env-modern-card {
913
+ background: linear-gradient(to bottom right, var(--bg-primary) 0%, var(--bg-secondary) 100%);
914
+ border: 0;
915
+ border-radius: 12px;
916
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
917
+ margin-top: 24px;
918
+ transition: all 0.3s ease;
799
919
  font-family: var(--font-family);
920
+ overflow: hidden;
921
+ }
922
+ .env-modern-card:hover {
923
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
924
+ }
925
+ .env-modern-card {
926
+ margin-bottom: 0;
927
+ }
928
+ .env-card-header {
929
+ display: flex;
930
+ flex-direction: column;
931
+ padding: 24px 24px 12px;
932
+ }
933
+ .env-modern-card.no-header .env-card-header {
934
+ display: none;
935
+ }
936
+ .env-modern-card.no-header {
937
+ margin-top: 0;
938
+ }
939
+ .env-modern-card.no-header .env-card-content {
940
+ padding-top: 24px;
941
+ }
942
+ .env-card-title-row {
943
+ display: flex;
944
+ justify-content: space-between;
945
+ align-items: center;
946
+ }
947
+ .env-card-title {
948
+ display: flex;
949
+ align-items: center;
950
+ font-size: 16px;
951
+ font-weight: 600;
800
952
  color: var(--text-primary);
953
+ transition: color 0.3s;
954
+ }
955
+ .env-modern-card:hover .env-card-title {
956
+ color: var(--primary-dark, #6366f1);
957
+ }
958
+ .env-card-title svg {
959
+ width: 16px;
960
+ height: 16px;
961
+ margin-right: 8px;
962
+ stroke: currentColor;
963
+ fill: none;
964
+ }
965
+ .env-card-subtitle {
966
+ font-size: 12px;
967
+ color: var(--text-secondary);
968
+ margin-top: 4px;
969
+ }
970
+ .env-card-content {
971
+ padding: 0 24px 24px;
972
+ }
973
+ .env-items-grid {
801
974
  display: grid;
802
975
  grid-template-columns: repeat(2, 1fr);
803
- gap: 32px;
804
- font-size: 15px;
805
- transform: translateZ(0);
976
+ gap: 10px;
806
977
  }
807
-
808
- @media (max-width: 768px) {
809
- .environment-dashboard-wrapper {
810
- grid-template-columns: 1fr;
811
- padding: 32px 24px;
812
- }
978
+ @media (min-width: 768px) {
979
+ .env-items-grid {
980
+ grid-template-columns: repeat(4, 1fr);
981
+ }
813
982
  }
814
- @media (max-width: 480px) {
815
- .environment-dashboard-wrapper {
816
- padding: 24px;
817
- }
983
+ .env-item {
984
+ display: flex;
985
+ align-items: flex-start;
986
+ gap: 8px;
987
+ padding: 8px;
988
+ border-radius: 8px;
989
+ transition: background-color 0.2s;
990
+ min-height: 48px;
818
991
  }
819
-
820
- .env-dashboard-header {
821
- grid-column: 1 / -1;
822
- margin-bottom: 24px;
992
+ .env-item:hover {
993
+ background-color: var(--bg-hover);
994
+ }
995
+ .env-item-icon {
996
+ flex-shrink: 0;
997
+ }
998
+ .env-item-icon svg {
999
+ width: 16px;
1000
+ height: 16px;
1001
+ stroke: var(--primary-dark, #6366f1);
1002
+ fill: none;
1003
+ }
1004
+ .env-item-content {
1005
+ flex-grow: 1;
1006
+ min-width: 0;
1007
+ }
1008
+ .env-item-label {
1009
+ font-size: 12px;
1010
+ font-weight: 500;
1011
+ color: var(--text-secondary);
1012
+ white-space: nowrap;
1013
+ overflow: hidden;
1014
+ text-overflow: ellipsis;
1015
+ }
1016
+ .env-item-value {
1017
+ font-size: 12px;
1018
+ font-weight: 600;
1019
+ color: var(--text-primary);
1020
+ word-wrap: break-word;
1021
+ overflow-wrap: break-word;
1022
+ line-height: 1.4;
823
1023
  }
824
1024
 
825
1025
  .env-dashboard-title {
@@ -951,133 +1151,151 @@ function generateEnvironmentDashboard(environment, dashboardHeight = 600) {
951
1151
  }
952
1152
  </style>
953
1153
 
954
- <div class="env-dashboard-header">
955
- <div>
956
- <h3 class="env-dashboard-title">System Environment</h3>
957
- <p class="env-dashboard-subtitle">Snapshot of the execution environment</p>
958
- </div>
959
- <span class="env-chip env-chip-primary">${environment.host}</span>
960
- </div>
961
-
962
- <div class="env-card">
963
- <div class="env-card-header">
964
- <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>
965
- Hardware
966
- </div>
967
- <div class="env-card-content">
968
- <div class="env-detail-row">
969
- <span class="env-detail-label">CPU Model</span>
970
- <span class="env-detail-value">${environment.cpu.model}</span>
971
- </div>
972
- <div class="env-detail-row">
973
- <span class="env-detail-label">CPU Cores</span>
974
- <span class="env-detail-value">
975
- <div class="env-cpu-cores">
976
- <span>${environment.cpu.cores || "N/A"} core${environment.cpu.cores !== 1 ? "s" : ""}</span>
977
- </div>
978
- </span>
979
- </div>
980
- <div class="env-detail-row">
981
- <span class="env-detail-label">Memory</span>
982
- <span class="env-detail-value">${formattedMemory}</span>
1154
+ <div class="env-card-header">
1155
+ <div class="env-card-title-row">
1156
+ <div>
1157
+ <div class="env-card-title">
1158
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1159
+ <rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect>
1160
+ <rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect>
1161
+ <line x1="6" x2="6.01" y1="6" y2="6"></line>
1162
+ <line x1="6" x2="6.01" y1="18" y2="18"></line>
1163
+ </svg>
1164
+ System Information
1165
+ </div>
1166
+ <div class="env-card-subtitle">Test execution environment details</div>
983
1167
  </div>
984
1168
  </div>
985
1169
  </div>
986
1170
 
987
- <div class="env-card">
988
- <div class="env-card-header">
989
- <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>
990
- Operating System
991
- </div>
992
- <div class="env-card-content">
993
- <div class="env-detail-row">
994
- <span class="env-detail-label">OS Type</span>
995
- <span class="env-detail-value">${
996
- environment.os.split(" ")[0] === "darwin"
997
- ? "darwin (macOS)"
998
- : environment.os.split(" ")[0] || "Unknown"
999
- }</span>
1000
- </div>
1001
- <div class="env-detail-row">
1002
- <span class="env-detail-label">OS Version</span>
1003
- <span class="env-detail-value">${
1004
- environment.os.split(" ")[1] || "N/A"
1005
- }</span>
1006
- </div>
1007
- <div class="env-detail-row">
1008
- <span class="env-detail-label">Hostname</span>
1009
- <span class="env-detail-value" title="${environment.host}">${
1010
- environment.host
1011
- }</span>
1171
+ <div class="env-card-content">
1172
+ <div class="env-items-grid">
1173
+ <div class="env-item">
1174
+ <div class="env-item-icon">
1175
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1176
+ <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>
1177
+ </svg>
1178
+ </div>
1179
+ <div class="env-item-content">
1180
+ <p class="env-item-label">Host</p>
1181
+ <div class="env-item-value" title="${environment.host}">${environment.host}</div>
1182
+ </div>
1012
1183
  </div>
1013
- </div>
1014
- </div>
1015
-
1016
- <div class="env-card">
1017
- <div class="env-card-header">
1018
- <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>
1019
- Node.js Runtime
1020
- </div>
1021
- <div class="env-card-content">
1022
- <div class="env-detail-row">
1023
- <span class="env-detail-label">Node Version</span>
1024
- <span class="env-detail-value">${environment.node}</span>
1184
+
1185
+ <div class="env-item">
1186
+ <div class="env-item-icon">
1187
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1188
+ <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>
1189
+ </svg>
1190
+ </div>
1191
+ <div class="env-item-content">
1192
+ <p class="env-item-label">Os</p>
1193
+ <div class="env-item-value" title="${environment.os}">${environment.os}</div>
1194
+ </div>
1025
1195
  </div>
1026
- <div class="env-detail-row">
1027
- <span class="env-detail-label">V8 Engine</span>
1028
- <span class="env-detail-value">${environment.v8}</span>
1196
+
1197
+ <div class="env-item">
1198
+ <div class="env-item-icon">
1199
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1200
+ <rect width="16" height="16" x="4" y="4" rx="2"></rect>
1201
+ <rect width="6" height="6" x="9" y="9" rx="1"></rect>
1202
+ <path d="M15 2v2"></path>
1203
+ <path d="M15 20v2"></path>
1204
+ <path d="M2 15h2"></path>
1205
+ <path d="M2 9h2"></path>
1206
+ <path d="M20 15h2"></path>
1207
+ <path d="M20 9h2"></path>
1208
+ <path d="M9 2v2"></path>
1209
+ <path d="M9 20v2"></path>
1210
+ </svg>
1211
+ </div>
1212
+ <div class="env-item-content">
1213
+ <p class="env-item-label">Cpu</p>
1214
+ <div class="env-item-value" title='${JSON.stringify(environment.cpu)}'>${cpuInfo}</div>
1215
+ </div>
1029
1216
  </div>
1030
- <div class="env-detail-row">
1031
- <span class="env-detail-label">Working Dir</span>
1032
- <span class="env-detail-value" title="${environment.cwd}">${
1033
- environment.cwd.length > 25
1034
- ? "..." + environment.cwd.slice(-22)
1035
- : environment.cwd
1036
- }</span>
1217
+
1218
+ <div class="env-item">
1219
+ <div class="env-item-icon">
1220
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1221
+ <path d="M6 19v-3"></path>
1222
+ <path d="M10 19v-3"></path>
1223
+ <path d="M14 19v-3"></path>
1224
+ <path d="M18 19v-3"></path>
1225
+ <path d="M8 11V9"></path>
1226
+ <path d="M16 11V9"></path>
1227
+ <path d="M12 11V9"></path>
1228
+ <path d="M2 15h20"></path>
1229
+ <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>
1230
+ </svg>
1231
+ </div>
1232
+ <div class="env-item-content">
1233
+ <p class="env-item-label">Memory</p>
1234
+ <div class="env-item-value" title="${environment.memory}">${environment.memory}</div>
1235
+ </div>
1037
1236
  </div>
1038
- </div>
1039
- </div>
1040
-
1041
- <div class="env-card">
1042
- <div class="env-card-header">
1043
- <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>
1044
- System Summary
1045
- </div>
1046
- <div class="env-card-content">
1047
- <div class="env-detail-row">
1048
- <span class="env-detail-label">Platform Arch</span>
1049
- <span class="env-detail-value">
1050
- <span class="env-chip ${
1051
- environment.os.includes("darwin") &&
1052
- environment.cpu.model.toLowerCase().includes("apple")
1053
- ? "env-chip-success"
1054
- : "env-chip-warning"
1055
- }">
1056
- ${
1057
- environment.os.includes("darwin") &&
1058
- environment.cpu.model.toLowerCase().includes("apple")
1059
- ? "Apple Silicon"
1060
- : environment.cpu.model.toLowerCase().includes("arm") ||
1061
- environment.cpu.model.toLowerCase().includes("aarch64")
1062
- ? "ARM-based"
1063
- : "x86/Other"
1064
- }
1065
- </span>
1066
- </span>
1237
+
1238
+ <div class="env-item">
1239
+ <div class="env-item-icon">
1240
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1241
+ <path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"></path>
1242
+ <path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
1243
+ <path d="M12 2v2"></path>
1244
+ <path d="M12 22v-2"></path>
1245
+ <path d="m17 20.66-1-1.73"></path>
1246
+ <path d="M11 10.27 7 3.34"></path>
1247
+ <path d="m20.66 17-1.73-1"></path>
1248
+ <path d="m3.34 7 1.73 1"></path>
1249
+ <path d="M14 12h8"></path>
1250
+ <path d="M2 12h2"></path>
1251
+ <path d="m20.66 7-1.73 1"></path>
1252
+ <path d="m3.34 17 1.73-1"></path>
1253
+ <path d="m17 3.34-1 1.73"></path>
1254
+ <path d="m11 13.73-4 6.93"></path>
1255
+ </svg>
1256
+ </div>
1257
+ <div class="env-item-content">
1258
+ <p class="env-item-label">Node</p>
1259
+ <div class="env-item-value" title="${environment.node}">${environment.node}</div>
1260
+ </div>
1067
1261
  </div>
1068
- <div class="env-detail-row">
1069
- <span class="env-detail-label">Memory per Core</span>
1070
- <span class="env-detail-value">${
1071
- environment.cpu.cores > 0
1072
- ? (
1073
- parseFloat(environment.memory) / environment.cpu.cores
1074
- ).toFixed(2) + " GB"
1075
- : "N/A"
1076
- }</span>
1262
+
1263
+ <div class="env-item">
1264
+ <div class="env-item-icon">
1265
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1266
+ <path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"></path>
1267
+ <path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
1268
+ <path d="M12 2v2"></path>
1269
+ <path d="M12 22v-2"></path>
1270
+ <path d="m17 20.66-1-1.73"></path>
1271
+ <path d="M11 10.27 7 3.34"></path>
1272
+ <path d="m20.66 17-1.73-1"></path>
1273
+ <path d="m3.34 7 1.73 1"></path>
1274
+ <path d="M14 12h8"></path>
1275
+ <path d="M2 12h2"></path>
1276
+ <path d="m20.66 7-1.73 1"></path>
1277
+ <path d="m3.34 17 1.73-1"></path>
1278
+ <path d="m17 3.34-1 1.73"></path>
1279
+ <path d="m11 13.73-4 6.93"></path>
1280
+ </svg>
1281
+ </div>
1282
+ <div class="env-item-content">
1283
+ <p class="env-item-label">V8</p>
1284
+ <div class="env-item-value" title="${environment.v8}">${environment.v8}</div>
1285
+ </div>
1077
1286
  </div>
1078
- <div class="env-detail-row">
1079
- <span class="env-detail-label">Run Context</span>
1080
- <span class="env-detail-value">${runContext}</span>
1287
+
1288
+ <div class="env-item">
1289
+ <div class="env-item-icon">
1290
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1291
+ <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
1292
+ <polyline points="9 22 9 12 15 12 15 22"></polyline>
1293
+ </svg>
1294
+ </div>
1295
+ <div class="env-item-content">
1296
+ <p class="env-item-label">Working Dir</p>
1297
+ <div class="env-item-value" title="${environment.cwd}">${environment.cwd.length > 30 ? "..." + environment.cwd.slice(-27) : environment.cwd}</div>
1298
+ </div>
1081
1299
  </div>
1082
1300
  </div>
1083
1301
  </div>
@@ -2311,6 +2529,13 @@ function generateHTML(reportData, trendData = null) {
2311
2529
  )}</div>`
2312
2530
  : ""
2313
2531
  }
2532
+ ${
2533
+ step.codeSnippet
2534
+ ? `<div class="code-snippet-section"><pre class="code-snippet">${sanitizeHTML(
2535
+ step.codeSnippet,
2536
+ )}</pre></div>`
2537
+ : ""
2538
+ }
2314
2539
  ${
2315
2540
  step.errorMessage
2316
2541
  ? `<div class="test-error-summary">
@@ -2896,57 +3121,7 @@ function generateHTML(reportData, trendData = null) {
2896
3121
  padding: 10px !important;
2897
3122
  border-radius: 6px !important;
2898
3123
  }
2899
- .env-dashboard {
2900
- background: var(--gradient-card);
2901
- border: 1px solid var(--border-light);
2902
- border-radius: 12px;
2903
- padding: 24px;
2904
- margin-top: 20px;
2905
- box-shadow: var(--shadow-md);
2906
- }
2907
- .env-dashboard-title {
2908
- font-size: 1.2em;
2909
- font-weight: 700;
2910
- color: #f9fafb;
2911
- margin-bottom: 8px;
2912
- }
2913
- .env-dashboard-subtitle {
2914
- font-size: 0.9em;
2915
- color: #9ca3af;
2916
- margin-bottom: 16px;
2917
- }
2918
- .env-grid {
2919
- display: grid;
2920
- grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
2921
- gap: 12px;
2922
- }
2923
- .env-card {
2924
- background: var(--bg-secondary);
2925
- border: 1px solid var(--border-light);
2926
- border-radius: 8px;
2927
- padding: 14px;
2928
- transition: all 0.3s ease;
2929
- }
2930
- .env-card:hover {
2931
- transform: translateY(-3px);
2932
- border-color: var(--primary-color);
2933
- box-shadow: var(--shadow-lg), var(--glow-primary);
2934
- background: var(--bg-card);
2935
- }
2936
- .env-card-header {
2937
- font-size: 0.85em;
2938
- color: #9ca3af;
2939
- margin-bottom: 6px;
2940
- text-transform: uppercase;
2941
- letter-spacing: 0.5px;
2942
- font-weight: 600;
2943
- }
2944
- .env-card-value {
2945
- font-size: 1.1em;
2946
- color: #f9fafb;
2947
- font-weight: 700;
2948
- word-break: break-word;
2949
- }
3124
+
2950
3125
  .suites-widget {
2951
3126
  background: var(--bg-card);
2952
3127
  border: 1px solid var(--border-light);
@@ -3779,6 +3954,22 @@ function generateHTML(reportData, trendData = null) {
3779
3954
  font-size: 0.85em;
3780
3955
  font-weight: 600;
3781
3956
  }
3957
+ .code-snippet-section {
3958
+ margin: 12px 0;
3959
+ }
3960
+ .code-snippet {
3961
+ background-color: #f8f9fa;
3962
+ border: 1px solid #e1e4e8;
3963
+ border-radius: 6px;
3964
+ padding: 12px;
3965
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
3966
+ font-size: 0.9em;
3967
+ line-height: 1.5;
3968
+ overflow-x: auto;
3969
+ color: #24292e;
3970
+ margin: 0;
3971
+ white-space: pre;
3972
+ }
3782
3973
  .nested-steps {
3783
3974
  margin-top: 12px;
3784
3975
  }
@@ -5695,12 +5886,7 @@ function generateHTML(reportData, trendData = null) {
5695
5886
  400,
5696
5887
  390,
5697
5888
  )}
5698
- ${
5699
- runSummary.environment &&
5700
- Object.keys(runSummary.environment).length > 0
5701
- ? generateEnvironmentDashboard(runSummary.environment)
5702
- : '<div class="no-data">Environment data not available.</div>'
5703
- }
5889
+ ${generateEnvironmentSection(runSummary.environment)}
5704
5890
  </div>
5705
5891
  <div style="display: flex; flex-direction: column; gap: 28px;">
5706
5892
  ${generateSuitesWidget(suitesData)}
@@ -6458,6 +6644,8 @@ async function runScript(scriptPath, args = []) {
6458
6644
  * prepares the data, and then generates and writes the final HTML report file.
6459
6645
  */
6460
6646
  async function main() {
6647
+ await animate();
6648
+
6461
6649
  const __filename = fileURLToPath(import.meta.url);
6462
6650
  const __dirname = path.dirname(__filename);
6463
6651
 
@@ -6652,7 +6840,7 @@ async function main() {
6652
6840
  await fs.writeFile(reportHtmlPath, htmlContent, "utf-8");
6653
6841
  console.log(
6654
6842
  chalk.green.bold(
6655
- `🎉 Pulse report generated successfully at: ${reportHtmlPath}`,
6843
+ `Pulse report generated successfully at: ${reportHtmlPath}`,
6656
6844
  ),
6657
6845
  );
6658
6846
  console.log(chalk.gray(`(You can open this file in your browser)`));