@rozenite/network-activity-plugin 1.9.0 → 1.11.0
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.
- package/CHANGELOG.md +60 -0
- package/dist/devtools/App.html +2 -2
- package/dist/devtools/assets/{App-hSoryVpJ.js → App-CEESZAW_.js} +7520 -937
- package/dist/devtools/assets/{App-m6xge0az.css → App-xppYUJvX.css} +246 -2
- package/dist/react-native/chunks/boot-recording.cjs +138 -14
- package/dist/react-native/chunks/boot-recording.js +138 -14
- package/dist/react-native/chunks/get-nitro-module.cjs +4 -1
- package/dist/react-native/chunks/get-nitro-module.js +4 -1
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +20 -1
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +20 -1
- package/dist/react-native/index.d.ts +37 -1
- package/dist/rozenite.json +1 -1
- package/dist/sdk/index.d.ts +37 -1
- package/package.json +12 -7
- package/src/react-native/agent/use-network-activity-agent-tools.ts +22 -4
- package/src/react-native/http/__tests__/http-utils.test.ts +228 -0
- package/src/react-native/http/http-utils.ts +208 -25
- package/src/react-native/network-inspector.ts +2 -2
- package/src/react-native/nitro-fetch/get-nitro-module.ts +5 -1
- package/src/react-native/nitro-fetch/nitro-network-inspector.ts +8 -2
- package/src/shared/http-events.ts +40 -1
- package/src/ui/components/CodeBlock.tsx +45 -1
- package/src/ui/components/FilterBar.tsx +337 -61
- package/src/ui/components/HexView.tsx +54 -0
- package/src/ui/components/MetadataCard.tsx +95 -0
- package/src/ui/components/NetworkTimeline.tsx +422 -0
- package/src/ui/components/RequestList.tsx +19 -40
- package/src/ui/components/SidePanel.tsx +42 -1
- package/src/ui/components/Toolbar.tsx +13 -1
- package/src/ui/components/ViewToggle.tsx +44 -0
- package/src/ui/components/XmlTree.tsx +160 -0
- package/src/ui/components/__tests__/CodeBlock.test.tsx +89 -0
- package/src/ui/components/__tests__/HexView.test.tsx +41 -0
- package/src/ui/components/__tests__/MetadataCard.test.tsx +107 -0
- package/src/ui/components/__tests__/ViewToggle.test.tsx +80 -0
- package/src/ui/components/__tests__/XmlTree.test.tsx +149 -0
- package/src/ui/hooks/useNetworkActivitySessionExport.ts +39 -0
- package/src/ui/response-renderers/__tests__/binary-too-large.test.tsx +56 -0
- package/src/ui/response-renderers/__tests__/binary.test.tsx +96 -0
- package/src/ui/response-renderers/__tests__/dispatch.test.ts +124 -0
- package/src/ui/response-renderers/__tests__/html.test.tsx +101 -0
- package/src/ui/response-renderers/__tests__/image.test.tsx +73 -0
- package/src/ui/response-renderers/__tests__/json.test.tsx +95 -0
- package/src/ui/response-renderers/__tests__/svg.test.tsx +46 -0
- package/src/ui/response-renderers/__tests__/xml.test.tsx +100 -0
- package/src/ui/response-renderers/binary-too-large.tsx +36 -0
- package/src/ui/response-renderers/binary.tsx +31 -0
- package/src/ui/response-renderers/empty.tsx +14 -0
- package/src/ui/response-renderers/html.tsx +36 -0
- package/src/ui/response-renderers/image.tsx +37 -0
- package/src/ui/response-renderers/index.ts +55 -0
- package/src/ui/response-renderers/json.tsx +40 -0
- package/src/ui/response-renderers/svg.tsx +27 -0
- package/src/ui/response-renderers/text-fallback.tsx +14 -0
- package/src/ui/response-renderers/types.ts +38 -0
- package/src/ui/response-renderers/unknown.tsx +18 -0
- package/src/ui/response-renderers/xml.tsx +46 -0
- package/src/ui/state/__tests__/store.test.ts +77 -0
- package/src/ui/state/derived.ts +14 -0
- package/src/ui/state/filter.ts +49 -0
- package/src/ui/state/hooks.ts +2 -2
- package/src/ui/state/model.ts +7 -1
- package/src/ui/state/store.ts +63 -4
- package/src/ui/tabs/InitiatorTab.tsx +230 -0
- package/src/ui/tabs/ResponseTab.tsx +80 -97
- package/src/ui/tabs/__tests__/ResponseTab.test.tsx +102 -0
- package/src/ui/utils/__tests__/download.test.ts +115 -0
- package/src/ui/utils/__tests__/hex.test.ts +84 -0
- package/src/ui/utils/__tests__/requestFilters.test.ts +32 -0
- package/src/ui/utils/__tests__/sessionExport.test.ts +174 -0
- package/src/ui/utils/__tests__/symbolication.test.ts +207 -0
- package/src/ui/utils/__tests__/timelineModel.test.ts +170 -0
- package/src/ui/utils/download.ts +161 -0
- package/src/ui/utils/hex.ts +59 -0
- package/src/ui/utils/initiator.ts +136 -0
- package/src/ui/utils/requestFilters.ts +183 -0
- package/src/ui/utils/sessionExport.ts +185 -0
- package/src/ui/utils/symbolication.ts +248 -0
- package/src/ui/utils/timelineModel.ts +352 -0
- package/src/ui/views/InspectorView.tsx +43 -8
- package/src/utils/__tests__/getContentTypeMimeType.test.ts +34 -0
- package/src/utils/getContentTypeMimeType.ts +14 -0
- package/vite.config.ts +5 -1
- package/vitest.setup.ts +31 -0
|
@@ -541,6 +541,48 @@ video {
|
|
|
541
541
|
background-color: hsl(var(--background));
|
|
542
542
|
color: hsl(var(--foreground));
|
|
543
543
|
}
|
|
544
|
+
.container {
|
|
545
|
+
width: 100%;
|
|
546
|
+
}
|
|
547
|
+
@media (min-width: 640px) {
|
|
548
|
+
|
|
549
|
+
.container {
|
|
550
|
+
max-width: 640px;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
@media (min-width: 768px) {
|
|
554
|
+
|
|
555
|
+
.container {
|
|
556
|
+
max-width: 768px;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
@media (min-width: 1024px) {
|
|
560
|
+
|
|
561
|
+
.container {
|
|
562
|
+
max-width: 1024px;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
@media (min-width: 1280px) {
|
|
566
|
+
|
|
567
|
+
.container {
|
|
568
|
+
max-width: 1280px;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
@media (min-width: 1536px) {
|
|
572
|
+
|
|
573
|
+
.container {
|
|
574
|
+
max-width: 1536px;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
.pointer-events-none {
|
|
578
|
+
pointer-events: none;
|
|
579
|
+
}
|
|
580
|
+
.visible {
|
|
581
|
+
visibility: visible;
|
|
582
|
+
}
|
|
583
|
+
.collapse {
|
|
584
|
+
visibility: collapse;
|
|
585
|
+
}
|
|
544
586
|
.absolute {
|
|
545
587
|
position: absolute;
|
|
546
588
|
}
|
|
@@ -550,12 +592,38 @@ video {
|
|
|
550
592
|
.sticky {
|
|
551
593
|
position: sticky;
|
|
552
594
|
}
|
|
595
|
+
.inset-0 {
|
|
596
|
+
inset: 0px;
|
|
597
|
+
}
|
|
598
|
+
.inset-x-0 {
|
|
599
|
+
left: 0px;
|
|
600
|
+
right: 0px;
|
|
601
|
+
}
|
|
602
|
+
.inset-y-0 {
|
|
603
|
+
top: 0px;
|
|
604
|
+
bottom: 0px;
|
|
605
|
+
}
|
|
606
|
+
.bottom-0 {
|
|
607
|
+
bottom: 0px;
|
|
608
|
+
}
|
|
609
|
+
.bottom-1 {
|
|
610
|
+
bottom: 0.25rem;
|
|
611
|
+
}
|
|
612
|
+
.left-1 {
|
|
613
|
+
left: 0.25rem;
|
|
614
|
+
}
|
|
553
615
|
.left-2 {
|
|
554
616
|
left: 0.5rem;
|
|
555
617
|
}
|
|
618
|
+
.right-1 {
|
|
619
|
+
right: 0.25rem;
|
|
620
|
+
}
|
|
556
621
|
.top-0 {
|
|
557
622
|
top: 0px;
|
|
558
623
|
}
|
|
624
|
+
.top-1 {
|
|
625
|
+
top: 0.25rem;
|
|
626
|
+
}
|
|
559
627
|
.z-10 {
|
|
560
628
|
z-index: 10;
|
|
561
629
|
}
|
|
@@ -579,6 +647,9 @@ video {
|
|
|
579
647
|
margin-top: 0.25rem;
|
|
580
648
|
margin-bottom: 0.25rem;
|
|
581
649
|
}
|
|
650
|
+
.-ml-5 {
|
|
651
|
+
margin-left: -1.25rem;
|
|
652
|
+
}
|
|
582
653
|
.mb-2 {
|
|
583
654
|
margin-bottom: 0.5rem;
|
|
584
655
|
}
|
|
@@ -609,15 +680,24 @@ video {
|
|
|
609
680
|
.ms-2 {
|
|
610
681
|
margin-inline-start: 0.5rem;
|
|
611
682
|
}
|
|
683
|
+
.mt-0\.5 {
|
|
684
|
+
margin-top: 0.125rem;
|
|
685
|
+
}
|
|
612
686
|
.mt-1 {
|
|
613
687
|
margin-top: 0.25rem;
|
|
614
688
|
}
|
|
615
689
|
.mt-2 {
|
|
616
690
|
margin-top: 0.5rem;
|
|
617
691
|
}
|
|
692
|
+
.block {
|
|
693
|
+
display: block;
|
|
694
|
+
}
|
|
618
695
|
.inline-block {
|
|
619
696
|
display: inline-block;
|
|
620
697
|
}
|
|
698
|
+
.inline {
|
|
699
|
+
display: inline;
|
|
700
|
+
}
|
|
621
701
|
.flex {
|
|
622
702
|
display: flex;
|
|
623
703
|
}
|
|
@@ -630,6 +710,9 @@ video {
|
|
|
630
710
|
.grid {
|
|
631
711
|
display: grid;
|
|
632
712
|
}
|
|
713
|
+
.hidden {
|
|
714
|
+
display: none;
|
|
715
|
+
}
|
|
633
716
|
.h-10 {
|
|
634
717
|
height: 2.5rem;
|
|
635
718
|
}
|
|
@@ -669,6 +752,9 @@ video {
|
|
|
669
752
|
.h-\[1px\] {
|
|
670
753
|
height: 1px;
|
|
671
754
|
}
|
|
755
|
+
.h-\[500px\] {
|
|
756
|
+
height: 500px;
|
|
757
|
+
}
|
|
672
758
|
.h-full {
|
|
673
759
|
height: 100%;
|
|
674
760
|
}
|
|
@@ -681,6 +767,9 @@ video {
|
|
|
681
767
|
.max-h-96 {
|
|
682
768
|
max-height: 24rem;
|
|
683
769
|
}
|
|
770
|
+
.max-h-\[400px\] {
|
|
771
|
+
max-height: 400px;
|
|
772
|
+
}
|
|
684
773
|
.min-h-0 {
|
|
685
774
|
min-height: 0px;
|
|
686
775
|
}
|
|
@@ -714,6 +803,9 @@ video {
|
|
|
714
803
|
.w-8 {
|
|
715
804
|
width: 2rem;
|
|
716
805
|
}
|
|
806
|
+
.w-80 {
|
|
807
|
+
width: 20rem;
|
|
808
|
+
}
|
|
717
809
|
.w-\[1px\] {
|
|
718
810
|
width: 1px;
|
|
719
811
|
}
|
|
@@ -729,6 +821,9 @@ video {
|
|
|
729
821
|
.max-w-24 {
|
|
730
822
|
max-width: 6rem;
|
|
731
823
|
}
|
|
824
|
+
.max-w-full {
|
|
825
|
+
max-width: 100%;
|
|
826
|
+
}
|
|
732
827
|
.max-w-xs {
|
|
733
828
|
max-width: 20rem;
|
|
734
829
|
}
|
|
@@ -772,11 +867,17 @@ video {
|
|
|
772
867
|
-moz-user-select: none;
|
|
773
868
|
user-select: none;
|
|
774
869
|
}
|
|
870
|
+
.grid-cols-1 {
|
|
871
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
872
|
+
}
|
|
775
873
|
.grid-cols-2 {
|
|
776
874
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
777
875
|
}
|
|
778
|
-
.grid-cols-
|
|
779
|
-
grid-template-columns: repeat(
|
|
876
|
+
.grid-cols-4 {
|
|
877
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
878
|
+
}
|
|
879
|
+
.grid-cols-6 {
|
|
880
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
780
881
|
}
|
|
781
882
|
.grid-cols-\[minmax\(7rem\2c 25\%\)_minmax\(3rem\2c 1fr\)\] {
|
|
782
883
|
grid-template-columns: minmax(7rem,25%) minmax(3rem,1fr);
|
|
@@ -784,6 +885,9 @@ video {
|
|
|
784
885
|
.flex-col {
|
|
785
886
|
flex-direction: column;
|
|
786
887
|
}
|
|
888
|
+
.items-start {
|
|
889
|
+
align-items: flex-start;
|
|
890
|
+
}
|
|
787
891
|
.items-center {
|
|
788
892
|
align-items: center;
|
|
789
893
|
}
|
|
@@ -799,6 +903,9 @@ video {
|
|
|
799
903
|
.gap-2 {
|
|
800
904
|
gap: 0.5rem;
|
|
801
905
|
}
|
|
906
|
+
.gap-3 {
|
|
907
|
+
gap: 0.75rem;
|
|
908
|
+
}
|
|
802
909
|
.gap-4 {
|
|
803
910
|
gap: 1rem;
|
|
804
911
|
}
|
|
@@ -846,6 +953,9 @@ video {
|
|
|
846
953
|
.overflow-y-auto {
|
|
847
954
|
overflow-y: auto;
|
|
848
955
|
}
|
|
956
|
+
.overscroll-contain {
|
|
957
|
+
overscroll-behavior: contain;
|
|
958
|
+
}
|
|
849
959
|
.truncate {
|
|
850
960
|
overflow: hidden;
|
|
851
961
|
text-overflow: ellipsis;
|
|
@@ -884,6 +994,10 @@ video {
|
|
|
884
994
|
.border {
|
|
885
995
|
border-width: 1px;
|
|
886
996
|
}
|
|
997
|
+
.border-x {
|
|
998
|
+
border-left-width: 1px;
|
|
999
|
+
border-right-width: 1px;
|
|
1000
|
+
}
|
|
887
1001
|
.border-b {
|
|
888
1002
|
border-bottom-width: 1px;
|
|
889
1003
|
}
|
|
@@ -896,6 +1010,9 @@ video {
|
|
|
896
1010
|
.border-t {
|
|
897
1011
|
border-top-width: 1px;
|
|
898
1012
|
}
|
|
1013
|
+
.border-blue-300\/70 {
|
|
1014
|
+
border-color: rgb(147 197 253 / 0.7);
|
|
1015
|
+
}
|
|
899
1016
|
.border-blue-500\/50 {
|
|
900
1017
|
border-color: rgb(59 130 246 / 0.5);
|
|
901
1018
|
}
|
|
@@ -921,9 +1038,16 @@ video {
|
|
|
921
1038
|
--tw-border-opacity: 1;
|
|
922
1039
|
border-color: rgb(192 132 252 / var(--tw-border-opacity, 1));
|
|
923
1040
|
}
|
|
1041
|
+
.border-red-900\/70 {
|
|
1042
|
+
border-color: rgb(127 29 29 / 0.7);
|
|
1043
|
+
}
|
|
924
1044
|
.border-transparent {
|
|
925
1045
|
border-color: transparent;
|
|
926
1046
|
}
|
|
1047
|
+
.border-violet-500 {
|
|
1048
|
+
--tw-border-opacity: 1;
|
|
1049
|
+
border-color: rgb(139 92 246 / var(--tw-border-opacity, 1));
|
|
1050
|
+
}
|
|
927
1051
|
.border-yellow-400 {
|
|
928
1052
|
--tw-border-opacity: 1;
|
|
929
1053
|
border-color: rgb(250 204 21 / var(--tw-border-opacity, 1));
|
|
@@ -937,6 +1061,15 @@ video {
|
|
|
937
1061
|
.bg-background {
|
|
938
1062
|
background-color: hsl(var(--background));
|
|
939
1063
|
}
|
|
1064
|
+
.bg-blue-400\/10 {
|
|
1065
|
+
background-color: rgb(96 165 250 / 0.1);
|
|
1066
|
+
}
|
|
1067
|
+
.bg-blue-400\/15 {
|
|
1068
|
+
background-color: rgb(96 165 250 / 0.15);
|
|
1069
|
+
}
|
|
1070
|
+
.bg-blue-500\/30 {
|
|
1071
|
+
background-color: rgb(59 130 246 / 0.3);
|
|
1072
|
+
}
|
|
940
1073
|
.bg-blue-600 {
|
|
941
1074
|
--tw-bg-opacity: 1;
|
|
942
1075
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
@@ -953,6 +1086,18 @@ video {
|
|
|
953
1086
|
.bg-destructive {
|
|
954
1087
|
background-color: hsl(var(--destructive));
|
|
955
1088
|
}
|
|
1089
|
+
.bg-gray-200 {
|
|
1090
|
+
--tw-bg-opacity: 1;
|
|
1091
|
+
background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
|
|
1092
|
+
}
|
|
1093
|
+
.bg-gray-400 {
|
|
1094
|
+
--tw-bg-opacity: 1;
|
|
1095
|
+
background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1));
|
|
1096
|
+
}
|
|
1097
|
+
.bg-gray-500 {
|
|
1098
|
+
--tw-bg-opacity: 1;
|
|
1099
|
+
background-color: rgb(107 114 128 / var(--tw-bg-opacity, 1));
|
|
1100
|
+
}
|
|
956
1101
|
.bg-gray-600 {
|
|
957
1102
|
--tw-bg-opacity: 1;
|
|
958
1103
|
background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1));
|
|
@@ -965,10 +1110,20 @@ video {
|
|
|
965
1110
|
--tw-bg-opacity: 1;
|
|
966
1111
|
background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
|
|
967
1112
|
}
|
|
1113
|
+
.bg-gray-800\/60 {
|
|
1114
|
+
background-color: rgb(31 41 55 / 0.6);
|
|
1115
|
+
}
|
|
968
1116
|
.bg-gray-900 {
|
|
969
1117
|
--tw-bg-opacity: 1;
|
|
970
1118
|
background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
|
|
971
1119
|
}
|
|
1120
|
+
.bg-gray-900\/95 {
|
|
1121
|
+
background-color: rgb(17 24 39 / 0.95);
|
|
1122
|
+
}
|
|
1123
|
+
.bg-gray-950 {
|
|
1124
|
+
--tw-bg-opacity: 1;
|
|
1125
|
+
background-color: rgb(3 7 18 / var(--tw-bg-opacity, 1));
|
|
1126
|
+
}
|
|
972
1127
|
.bg-green-600 {
|
|
973
1128
|
--tw-bg-opacity: 1;
|
|
974
1129
|
background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1));
|
|
@@ -991,6 +1146,13 @@ video {
|
|
|
991
1146
|
--tw-bg-opacity: 1;
|
|
992
1147
|
background-color: rgb(147 51 234 / var(--tw-bg-opacity, 1));
|
|
993
1148
|
}
|
|
1149
|
+
.bg-red-400 {
|
|
1150
|
+
--tw-bg-opacity: 1;
|
|
1151
|
+
background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1));
|
|
1152
|
+
}
|
|
1153
|
+
.bg-red-950\/30 {
|
|
1154
|
+
background-color: rgb(69 10 10 / 0.3);
|
|
1155
|
+
}
|
|
994
1156
|
.bg-secondary {
|
|
995
1157
|
background-color: hsl(var(--secondary));
|
|
996
1158
|
}
|
|
@@ -998,6 +1160,10 @@ video {
|
|
|
998
1160
|
--tw-bg-opacity: 1;
|
|
999
1161
|
background-color: rgb(196 181 253 / var(--tw-bg-opacity, 1));
|
|
1000
1162
|
}
|
|
1163
|
+
.bg-white {
|
|
1164
|
+
--tw-bg-opacity: 1;
|
|
1165
|
+
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
1166
|
+
}
|
|
1001
1167
|
.bg-yellow-600 {
|
|
1002
1168
|
--tw-bg-opacity: 1;
|
|
1003
1169
|
background-color: rgb(202 138 4 / var(--tw-bg-opacity, 1));
|
|
@@ -1005,12 +1171,22 @@ video {
|
|
|
1005
1171
|
.fill-current {
|
|
1006
1172
|
fill: currentColor;
|
|
1007
1173
|
}
|
|
1174
|
+
.object-contain {
|
|
1175
|
+
-o-object-fit: contain;
|
|
1176
|
+
object-fit: contain;
|
|
1177
|
+
}
|
|
1008
1178
|
.p-0 {
|
|
1009
1179
|
padding: 0px;
|
|
1010
1180
|
}
|
|
1181
|
+
.p-0\.5 {
|
|
1182
|
+
padding: 0.125rem;
|
|
1183
|
+
}
|
|
1011
1184
|
.p-1 {
|
|
1012
1185
|
padding: 0.25rem;
|
|
1013
1186
|
}
|
|
1187
|
+
.p-1\.5 {
|
|
1188
|
+
padding: 0.375rem;
|
|
1189
|
+
}
|
|
1014
1190
|
.p-2 {
|
|
1015
1191
|
padding: 0.5rem;
|
|
1016
1192
|
}
|
|
@@ -1023,6 +1199,10 @@ video {
|
|
|
1023
1199
|
.p-\[1px\] {
|
|
1024
1200
|
padding: 1px;
|
|
1025
1201
|
}
|
|
1202
|
+
.px-1 {
|
|
1203
|
+
padding-left: 0.25rem;
|
|
1204
|
+
padding-right: 0.25rem;
|
|
1205
|
+
}
|
|
1026
1206
|
.px-1\.5 {
|
|
1027
1207
|
padding-left: 0.375rem;
|
|
1028
1208
|
padding-right: 0.375rem;
|
|
@@ -1115,12 +1295,27 @@ video {
|
|
|
1115
1295
|
.italic {
|
|
1116
1296
|
font-style: italic;
|
|
1117
1297
|
}
|
|
1298
|
+
.tabular-nums {
|
|
1299
|
+
--tw-numeric-spacing: tabular-nums;
|
|
1300
|
+
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
|
|
1301
|
+
}
|
|
1302
|
+
.leading-snug {
|
|
1303
|
+
line-height: 1.375;
|
|
1304
|
+
}
|
|
1118
1305
|
.tracking-wide {
|
|
1119
1306
|
letter-spacing: 0.025em;
|
|
1120
1307
|
}
|
|
1121
1308
|
.tracking-widest {
|
|
1122
1309
|
letter-spacing: 0.1em;
|
|
1123
1310
|
}
|
|
1311
|
+
.text-amber-400 {
|
|
1312
|
+
--tw-text-opacity: 1;
|
|
1313
|
+
color: rgb(251 191 36 / var(--tw-text-opacity, 1));
|
|
1314
|
+
}
|
|
1315
|
+
.text-blue-100 {
|
|
1316
|
+
--tw-text-opacity: 1;
|
|
1317
|
+
color: rgb(219 234 254 / var(--tw-text-opacity, 1));
|
|
1318
|
+
}
|
|
1124
1319
|
.text-blue-300 {
|
|
1125
1320
|
--tw-text-opacity: 1;
|
|
1126
1321
|
color: rgb(147 197 253 / var(--tw-text-opacity, 1));
|
|
@@ -1196,6 +1391,14 @@ video {
|
|
|
1196
1391
|
--tw-text-opacity: 1;
|
|
1197
1392
|
color: rgb(168 85 247 / var(--tw-text-opacity, 1));
|
|
1198
1393
|
}
|
|
1394
|
+
.text-red-200 {
|
|
1395
|
+
--tw-text-opacity: 1;
|
|
1396
|
+
color: rgb(254 202 202 / var(--tw-text-opacity, 1));
|
|
1397
|
+
}
|
|
1398
|
+
.text-red-300 {
|
|
1399
|
+
--tw-text-opacity: 1;
|
|
1400
|
+
color: rgb(252 165 165 / var(--tw-text-opacity, 1));
|
|
1401
|
+
}
|
|
1199
1402
|
.text-red-400 {
|
|
1200
1403
|
--tw-text-opacity: 1;
|
|
1201
1404
|
color: rgb(248 113 113 / var(--tw-text-opacity, 1));
|
|
@@ -1207,6 +1410,10 @@ video {
|
|
|
1207
1410
|
.text-secondary-foreground {
|
|
1208
1411
|
color: hsl(var(--secondary-foreground));
|
|
1209
1412
|
}
|
|
1413
|
+
.text-violet-200 {
|
|
1414
|
+
--tw-text-opacity: 1;
|
|
1415
|
+
color: rgb(221 214 254 / var(--tw-text-opacity, 1));
|
|
1416
|
+
}
|
|
1210
1417
|
.text-violet-300 {
|
|
1211
1418
|
--tw-text-opacity: 1;
|
|
1212
1419
|
color: rgb(196 181 253 / var(--tw-text-opacity, 1));
|
|
@@ -1241,12 +1448,27 @@ video {
|
|
|
1241
1448
|
.outline {
|
|
1242
1449
|
outline-style: solid;
|
|
1243
1450
|
}
|
|
1451
|
+
.ring-1 {
|
|
1452
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
1453
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
1454
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
1455
|
+
}
|
|
1456
|
+
.ring-blue-300 {
|
|
1457
|
+
--tw-ring-opacity: 1;
|
|
1458
|
+
--tw-ring-color: rgb(147 197 253 / var(--tw-ring-opacity, 1));
|
|
1459
|
+
}
|
|
1460
|
+
.ring-offset-1 {
|
|
1461
|
+
--tw-ring-offset-width: 1px;
|
|
1462
|
+
}
|
|
1244
1463
|
.ring-offset-background {
|
|
1245
1464
|
--tw-ring-offset-color: hsl(var(--background));
|
|
1246
1465
|
}
|
|
1247
1466
|
.ring-offset-blue-500 {
|
|
1248
1467
|
--tw-ring-offset-color: #3b82f6;
|
|
1249
1468
|
}
|
|
1469
|
+
.ring-offset-gray-950 {
|
|
1470
|
+
--tw-ring-offset-color: #030712;
|
|
1471
|
+
}
|
|
1250
1472
|
.\!filter {
|
|
1251
1473
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;
|
|
1252
1474
|
}
|
|
@@ -1263,6 +1485,11 @@ video {
|
|
|
1263
1485
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1264
1486
|
transition-duration: 150ms;
|
|
1265
1487
|
}
|
|
1488
|
+
.transition-opacity {
|
|
1489
|
+
transition-property: opacity;
|
|
1490
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1491
|
+
transition-duration: 150ms;
|
|
1492
|
+
}
|
|
1266
1493
|
@keyframes enter {
|
|
1267
1494
|
|
|
1268
1495
|
from {
|
|
@@ -1304,6 +1531,14 @@ video {
|
|
|
1304
1531
|
--tw-text-opacity: 1;
|
|
1305
1532
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
1306
1533
|
}
|
|
1534
|
+
.placeholder\:text-gray-500::-moz-placeholder {
|
|
1535
|
+
--tw-text-opacity: 1;
|
|
1536
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
1537
|
+
}
|
|
1538
|
+
.placeholder\:text-gray-500::placeholder {
|
|
1539
|
+
--tw-text-opacity: 1;
|
|
1540
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
1541
|
+
}
|
|
1307
1542
|
.placeholder\:text-muted-foreground::-moz-placeholder {
|
|
1308
1543
|
color: hsl(var(--muted-foreground));
|
|
1309
1544
|
}
|
|
@@ -1339,6 +1574,9 @@ video {
|
|
|
1339
1574
|
.hover\:bg-secondary\/80:hover {
|
|
1340
1575
|
background-color: hsl(var(--secondary) / 0.8);
|
|
1341
1576
|
}
|
|
1577
|
+
.hover\:bg-violet-900\/40:hover {
|
|
1578
|
+
background-color: rgb(76 29 149 / 0.4);
|
|
1579
|
+
}
|
|
1342
1580
|
.hover\:text-accent-foreground:hover {
|
|
1343
1581
|
color: hsl(var(--accent-foreground));
|
|
1344
1582
|
}
|
|
@@ -1369,6 +1607,9 @@ video {
|
|
|
1369
1607
|
.hover\:underline:hover {
|
|
1370
1608
|
text-decoration-line: underline;
|
|
1371
1609
|
}
|
|
1610
|
+
.hover\:opacity-80:hover {
|
|
1611
|
+
opacity: 0.8;
|
|
1612
|
+
}
|
|
1372
1613
|
.focus\:bg-gray-700:focus {
|
|
1373
1614
|
--tw-bg-opacity: 1;
|
|
1374
1615
|
background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1));
|
|
@@ -1416,6 +1657,9 @@ video {
|
|
|
1416
1657
|
.disabled\:opacity-50:disabled {
|
|
1417
1658
|
opacity: 0.5;
|
|
1418
1659
|
}
|
|
1660
|
+
.disabled\:hover\:bg-transparent:hover:disabled {
|
|
1661
|
+
background-color: transparent;
|
|
1662
|
+
}
|
|
1419
1663
|
.group:hover .group-hover\:opacity-100 {
|
|
1420
1664
|
opacity: 1;
|
|
1421
1665
|
}
|
|
@@ -213,6 +213,13 @@ function isJsonContentType(contentType) {
|
|
|
213
213
|
const mimeType = normalizeContentType(contentType);
|
|
214
214
|
return mimeType === "application/json" || mimeType.endsWith("+json");
|
|
215
215
|
}
|
|
216
|
+
function isXmlContentType(contentType) {
|
|
217
|
+
if (!contentType) {
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
const mimeType = normalizeContentType(contentType);
|
|
221
|
+
return mimeType === "application/xml" || mimeType === "text/xml" || mimeType.endsWith("+xml");
|
|
222
|
+
}
|
|
216
223
|
const isBlob = (value) => value instanceof Blob;
|
|
217
224
|
const isArrayBuffer = (value) => value instanceof ArrayBuffer || ArrayBuffer.isView(value);
|
|
218
225
|
const isFormData = (value) => value instanceof FormData;
|
|
@@ -327,6 +334,30 @@ const getResponseSize = (request) => {
|
|
|
327
334
|
return null;
|
|
328
335
|
}
|
|
329
336
|
};
|
|
337
|
+
const BINARY_CAPTURE_SIZE_CAP = 5 * 1024 * 1024;
|
|
338
|
+
const readBlobAsText = (blob) => new Promise((resolve) => {
|
|
339
|
+
const reader = new FileReader();
|
|
340
|
+
reader.onload = () => resolve(reader.result);
|
|
341
|
+
reader.readAsText(blob);
|
|
342
|
+
});
|
|
343
|
+
const readBlobAsBase64 = (blob) => new Promise((resolve) => {
|
|
344
|
+
const reader = new FileReader();
|
|
345
|
+
reader.onload = () => {
|
|
346
|
+
const dataUrl = reader.result;
|
|
347
|
+
resolve(dataUrl.substring(dataUrl.indexOf(",") + 1));
|
|
348
|
+
};
|
|
349
|
+
reader.readAsDataURL(blob);
|
|
350
|
+
});
|
|
351
|
+
const ARRAY_BUFFER_BASE64_CHUNK = 32768;
|
|
352
|
+
const arrayBufferToBase64 = (buffer) => {
|
|
353
|
+
const bytes = new Uint8Array(buffer);
|
|
354
|
+
let binary = "";
|
|
355
|
+
for (let i = 0; i < bytes.length; i += ARRAY_BUFFER_BASE64_CHUNK) {
|
|
356
|
+
const chunk = bytes.subarray(i, i + ARRAY_BUFFER_BASE64_CHUNK);
|
|
357
|
+
binary += String.fromCharCode.apply(null, chunk);
|
|
358
|
+
}
|
|
359
|
+
return btoa(binary);
|
|
360
|
+
};
|
|
330
361
|
const getResponseBody = async (request) => {
|
|
331
362
|
const responseType = request.responseType;
|
|
332
363
|
if (responseType === "" || responseType === "text") {
|
|
@@ -334,35 +365,128 @@ const getResponseBody = async (request) => {
|
|
|
334
365
|
}
|
|
335
366
|
if (responseType === "blob") {
|
|
336
367
|
const contentType = request.getResponseHeader("Content-Type") || "";
|
|
337
|
-
if (contentType.startsWith("text/") || isJsonContentType(contentType)) {
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
368
|
+
if (contentType.startsWith("text/") || isJsonContentType(contentType) || isXmlContentType(contentType)) {
|
|
369
|
+
return readBlobAsText(request.response);
|
|
370
|
+
}
|
|
371
|
+
const blob = request.response;
|
|
372
|
+
if (blob.size > BINARY_CAPTURE_SIZE_CAP) {
|
|
373
|
+
return { kind: "binary-too-large", size: blob.size };
|
|
374
|
+
}
|
|
375
|
+
return { kind: "binary", base64: await readBlobAsBase64(blob) };
|
|
376
|
+
}
|
|
377
|
+
if (responseType === "arraybuffer") {
|
|
378
|
+
const buffer = request.response;
|
|
379
|
+
if (!buffer || buffer.byteLength === 0) {
|
|
380
|
+
return null;
|
|
345
381
|
}
|
|
382
|
+
if (buffer.byteLength > BINARY_CAPTURE_SIZE_CAP) {
|
|
383
|
+
return { kind: "binary-too-large", size: buffer.byteLength };
|
|
384
|
+
}
|
|
385
|
+
return { kind: "binary", base64: arrayBufferToBase64(buffer) };
|
|
346
386
|
}
|
|
347
387
|
if (responseType === "json") {
|
|
348
388
|
return safeStringify(request.response);
|
|
349
389
|
}
|
|
350
390
|
return null;
|
|
351
391
|
};
|
|
392
|
+
const STACK_PREVIEW_FRAME_LIMIT = 8;
|
|
393
|
+
const INITIATOR_STACK_FRAME_OFFSET = 3;
|
|
394
|
+
const parseStackLocation = (location) => {
|
|
395
|
+
const match = location.match(/^(.*):(\d+):(\d+)$/);
|
|
396
|
+
if (!match) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
return {
|
|
400
|
+
url: match[1],
|
|
401
|
+
lineNumber: Number.parseInt(match[2], 10),
|
|
402
|
+
columnNumber: Number.parseInt(match[3], 10)
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
const normalizeFunctionName = (functionName) => {
|
|
406
|
+
const trimmedFunctionName = functionName?.trim();
|
|
407
|
+
return trimmedFunctionName && trimmedFunctionName !== "<anonymous>" && trimmedFunctionName !== "anonymous" && trimmedFunctionName !== "<unknown>" ? trimmedFunctionName : void 0;
|
|
408
|
+
};
|
|
409
|
+
const parseStackFrame = (line) => {
|
|
410
|
+
const trimmedLine = line.trim();
|
|
411
|
+
if (!trimmedLine) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
let functionName;
|
|
415
|
+
let location;
|
|
416
|
+
const v8FunctionFrame = trimmedLine.match(/^at\s+(.*?)\s+\((.*)\)$/);
|
|
417
|
+
if (v8FunctionFrame) {
|
|
418
|
+
functionName = v8FunctionFrame[1];
|
|
419
|
+
location = v8FunctionFrame[2];
|
|
420
|
+
} else {
|
|
421
|
+
const v8LocationFrame = trimmedLine.match(/^at\s+(.*)$/);
|
|
422
|
+
const jscFrame = trimmedLine.match(/^(.*?)@(.*)$/);
|
|
423
|
+
if (v8LocationFrame) {
|
|
424
|
+
location = v8LocationFrame[1];
|
|
425
|
+
} else if (jscFrame) {
|
|
426
|
+
functionName = jscFrame[1];
|
|
427
|
+
location = jscFrame[2];
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
if (!location) {
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
const parsedLocation = parseStackLocation(location);
|
|
434
|
+
if (!parsedLocation) {
|
|
435
|
+
return null;
|
|
436
|
+
}
|
|
437
|
+
return {
|
|
438
|
+
functionName: normalizeFunctionName(functionName),
|
|
439
|
+
...parsedLocation
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
const toGeneratedStackFrame = (frame) => ({
|
|
443
|
+
functionName: frame.functionName,
|
|
444
|
+
generatedUrl: frame.url,
|
|
445
|
+
generatedLineNumber: frame.lineNumber,
|
|
446
|
+
generatedColumnNumber: frame.columnNumber
|
|
447
|
+
});
|
|
448
|
+
const getGeneratedFrameLocation = (frame) => ({
|
|
449
|
+
url: frame.generatedUrl ?? frame.url,
|
|
450
|
+
lineNumber: frame.generatedLineNumber ?? frame.lineNumber,
|
|
451
|
+
columnNumber: frame.generatedColumnNumber ?? frame.columnNumber
|
|
452
|
+
});
|
|
453
|
+
const canSymbolicateStack = (stack) => stack?.some(
|
|
454
|
+
(frame) => getGeneratedFrameLocation(frame).url?.startsWith("http")
|
|
455
|
+
) ?? false;
|
|
456
|
+
const getStackPreview = (frames) => {
|
|
457
|
+
const callerFrames = frames.slice(INITIATOR_STACK_FRAME_OFFSET);
|
|
458
|
+
return (callerFrames.length > 0 ? callerFrames : frames).slice(
|
|
459
|
+
0,
|
|
460
|
+
STACK_PREVIEW_FRAME_LIMIT
|
|
461
|
+
);
|
|
462
|
+
};
|
|
352
463
|
const getInitiatorFromStack = () => {
|
|
353
464
|
try {
|
|
354
465
|
const stack = new Error().stack;
|
|
355
466
|
if (!stack) {
|
|
356
467
|
return { type: "other" };
|
|
357
468
|
}
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
|
|
469
|
+
const parsedFrames = stack.split("\n").map(parseStackFrame).filter((frame) => frame !== null);
|
|
470
|
+
const stackPreview = getStackPreview(parsedFrames);
|
|
471
|
+
const initiatorFrame = stackPreview[0];
|
|
472
|
+
const generatedStackPreview = stackPreview.map(toGeneratedStackFrame);
|
|
473
|
+
if (initiatorFrame?.url) {
|
|
361
474
|
return {
|
|
362
475
|
type: "script",
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
476
|
+
functionName: initiatorFrame.functionName,
|
|
477
|
+
generatedUrl: initiatorFrame.url,
|
|
478
|
+
generatedLineNumber: initiatorFrame.lineNumber,
|
|
479
|
+
generatedColumnNumber: initiatorFrame.columnNumber,
|
|
480
|
+
stack: generatedStackPreview,
|
|
481
|
+
symbolicationStatus: canSymbolicateStack(generatedStackPreview) ? "pending" : "unavailable"
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
if (parsedFrames.length > 0) {
|
|
485
|
+
const fallbackStack = stackPreview.map(toGeneratedStackFrame);
|
|
486
|
+
return {
|
|
487
|
+
type: "other",
|
|
488
|
+
stack: fallbackStack,
|
|
489
|
+
symbolicationStatus: canSymbolicateStack(fallbackStack) ? "pending" : "unavailable"
|
|
366
490
|
};
|
|
367
491
|
}
|
|
368
492
|
} catch {
|