@har-analyzer/components 0.0.20 → 0.0.21
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/dist/chunks/collapsible-key-value-list.js +41 -10
- package/dist/chunks/collapsible-section.js +1 -1
- package/dist/chunks/common.js +10 -0
- package/dist/chunks/content-type.js +15 -21
- package/dist/chunks/har-entry-response-status.js +14 -0
- package/dist/chunks/har.js +47 -20
- package/dist/chunks/horizontal-padding.js +8 -0
- package/dist/chunks/index.js +589 -891
- package/dist/chunks/index2.js +271 -49
- package/dist/chunks/list-har-entries.js +30 -0
- package/dist/chunks/request-headers.js +34 -0
- package/dist/chunks/request-payload.js +25 -0
- package/dist/chunks/response-headers.js +19 -0
- package/dist/chunks/response-payload.js +10 -0
- package/dist/components/collapsible-key-value-list.d.ts +7 -2
- package/dist/components/collapsible-section.d.ts +2 -1
- package/dist/components/enhanced-board/i18n.d.ts +26 -0
- package/dist/components/enhanced-board/index.d.ts +15 -0
- package/dist/components/{enhanced-table.d.ts → enhanced-table/index.d.ts} +9 -15
- package/dist/components/enhanced-table/preferences.d.ts +13 -0
- package/dist/components/har-entry-response-status.d.ts +4 -0
- package/dist/components/space-between.d.ts +2 -0
- package/dist/features/har-analyzer/components/app-layout.d.ts +3 -2
- package/dist/features/har-analyzer/components/top-navigation.d.ts +3 -2
- package/dist/features/har-analyzer/index.d.ts +2 -1
- package/dist/features/har-entries-viewer/components/har-entries-viewer-action-stripe/har-entry-header-picker.d.ts +6 -0
- package/dist/features/har-entries-viewer/components/har-entries-viewer-action-stripe/index.d.ts +8 -0
- package/dist/features/har-entries-viewer/components/har-entries-viewer-provider.d.ts +2 -0
- package/dist/features/har-entries-viewer/components/view-har-entry-header.d.ts +7 -0
- package/dist/features/har-entries-viewer/context/preferences.d.ts +2 -0
- package/dist/features/har-entries-viewer/index.d.ts +1 -1
- package/dist/features/list-har-entries/components/list-har-entries-provider.d.ts +2 -0
- package/dist/features/list-har-entries/components/list-har-entries-table-header/index.d.ts +6 -0
- package/dist/features/list-har-entries/components/list-har-entries-table.d.ts +8 -0
- package/dist/features/list-har-entries/components/list-har-entries.d.ts +5 -0
- package/dist/features/list-har-entries/context/preferences.d.ts +1 -3
- package/dist/features/list-har-entries/hooks/filter-har-entries.d.ts +2 -0
- package/dist/features/list-har-entries/index.d.ts +8 -4
- package/dist/features/view-har-entry/components/request-headers.d.ts +4 -0
- package/dist/features/view-har-entry/components/request-payload.d.ts +6 -0
- package/dist/features/view-har-entry/components/response-headers.d.ts +4 -0
- package/dist/features/view-har-entry/components/response-payload.d.ts +6 -0
- package/dist/features/view-har-entry/index.d.ts +1 -1
- package/dist/har-analyzer.js +16 -15
- package/dist/har-entries-viewer.js +271 -630
- package/dist/index.d.ts +1 -1
- package/dist/index.js +25 -17
- package/dist/list-har-entries.js +6 -3
- package/dist/utils/array.d.ts +7 -0
- package/dist/utils/har.d.ts +12 -1
- package/dist/view-har-entry.js +58 -6
- package/package.json +2 -2
- package/dist/assets/har-entries-viewer.css +0 -1
- package/dist/chunks/headers-viewer.js +0 -32
- package/dist/chunks/payload-viewer.js +0 -15
- package/dist/chunks/response-viewer.js +0 -10
- package/dist/components/r2-layout/fgl.d.ts +0 -10
- package/dist/components/r2-layout/index.d.ts +0 -22
- package/dist/features/list-har-entries/components/har-entries-table.d.ts +0 -8
- package/dist/features/view-har-entry/components/headers-viewer.d.ts +0 -6
- package/dist/features/view-har-entry/components/payload-viewer.d.ts +0 -6
- package/dist/features/view-har-entry/components/response-viewer.d.ts +0 -6
- /package/dist/features/{list-har-entries/components → har-entries-viewer/components/har-entries-viewer-action-stripe}/compare-mode-switcher.d.ts +0 -0
- /package/dist/features/list-har-entries/components/{content-type-filter.d.ts → list-har-entries-table-header/content-type-filter.d.ts} +0 -0
- /package/dist/features/list-har-entries/components/{errors-filter.d.ts → list-har-entries-table-header/errors-filter.d.ts} +0 -0
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import p from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
function u(
|
|
7
|
-
const { textToCopy:
|
|
2
|
+
import c from "@cloudscape-design/components/box";
|
|
3
|
+
import { C as p } from "./collapsible-section.js";
|
|
4
|
+
import { E as s } from "./index2.js";
|
|
5
|
+
import m from "@cloudscape-design/components/copy-to-clipboard";
|
|
6
|
+
function u(t) {
|
|
7
|
+
const { textToCopy: i, textToDisplay: r } = t;
|
|
8
8
|
return /* @__PURE__ */ o(
|
|
9
|
-
|
|
9
|
+
m,
|
|
10
10
|
{
|
|
11
11
|
variant: "inline",
|
|
12
|
-
textToCopy:
|
|
12
|
+
textToCopy: i,
|
|
13
13
|
textToDisplay: r,
|
|
14
14
|
copyErrorText: "Failed to copy",
|
|
15
15
|
copySuccessText: "Copied!"
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
function x(
|
|
20
|
-
|
|
19
|
+
function x(t) {
|
|
20
|
+
const {
|
|
21
|
+
items: i,
|
|
22
|
+
sectionTitle: r,
|
|
23
|
+
keyTitle: l = "Name",
|
|
24
|
+
valueTitle: a = "Value"
|
|
25
|
+
} = t;
|
|
26
|
+
return /* @__PURE__ */ o(p, { variant: "footer", title: r, children: /* @__PURE__ */ o(
|
|
27
|
+
s,
|
|
28
|
+
{
|
|
29
|
+
contentDensity: "compact",
|
|
30
|
+
items: i,
|
|
31
|
+
getRowId: ({ id: e }) => e,
|
|
32
|
+
columnsDefinition: {
|
|
33
|
+
key: {
|
|
34
|
+
header: l,
|
|
35
|
+
cell: ({ name: e }) => ({
|
|
36
|
+
value: e
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
value: {
|
|
40
|
+
header: a,
|
|
41
|
+
cell: ({ value: e, content: n }) => e ? {
|
|
42
|
+
value: e,
|
|
43
|
+
content: n ?? /* @__PURE__ */ o(u, { textToCopy: e })
|
|
44
|
+
} : {
|
|
45
|
+
value: "-",
|
|
46
|
+
content: n ?? /* @__PURE__ */ o(c, { variant: "span", children: "-" })
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
) });
|
|
21
52
|
}
|
|
22
53
|
export {
|
|
23
54
|
x as C
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import a from "@cloudscape-design/code-view/highlight/css";
|
|
2
|
+
import m from "@cloudscape-design/code-view/highlight/html";
|
|
3
|
+
import r from "@cloudscape-design/code-view/highlight/javascript";
|
|
4
4
|
import g from "@cloudscape-design/code-view/highlight/json";
|
|
5
5
|
import h from "@cloudscape-design/code-view/highlight/xml";
|
|
6
|
-
|
|
7
|
-
return Object.keys(t);
|
|
8
|
-
}
|
|
9
|
-
function c(t) {
|
|
10
|
-
return Object.entries(t);
|
|
11
|
-
}
|
|
6
|
+
import { o as p, a as y } from "./common.js";
|
|
12
7
|
const e = {
|
|
13
8
|
JSON: {
|
|
14
9
|
mimeTypeContains: ["json"],
|
|
@@ -20,15 +15,15 @@ const e = {
|
|
|
20
15
|
},
|
|
21
16
|
JS: {
|
|
22
17
|
mimeTypeContains: ["javascript", "ecmascript"],
|
|
23
|
-
syntaxHighlight:
|
|
18
|
+
syntaxHighlight: r
|
|
24
19
|
},
|
|
25
20
|
CSS: {
|
|
26
21
|
mimeTypeContains: ["text/css"],
|
|
27
|
-
syntaxHighlight:
|
|
22
|
+
syntaxHighlight: a
|
|
28
23
|
},
|
|
29
24
|
HTML: {
|
|
30
25
|
mimeTypeContains: ["html"],
|
|
31
|
-
syntaxHighlight:
|
|
26
|
+
syntaxHighlight: m
|
|
32
27
|
},
|
|
33
28
|
Doc: {
|
|
34
29
|
mimeTypeContains: ["text/"]
|
|
@@ -42,26 +37,25 @@ const e = {
|
|
|
42
37
|
Media: {
|
|
43
38
|
mimeTypeContains: ["audio/", "video/"]
|
|
44
39
|
}
|
|
45
|
-
},
|
|
46
|
-
function
|
|
40
|
+
}, S = [...p(e), "Other"];
|
|
41
|
+
function T(t) {
|
|
47
42
|
if (!t)
|
|
48
43
|
return "Other";
|
|
49
44
|
const i = t.toLowerCase();
|
|
50
|
-
for (const [n, { mimeTypeContains: o }] of
|
|
45
|
+
for (const [n, { mimeTypeContains: o }] of y(e))
|
|
51
46
|
if (o.some((s) => i.includes(s)))
|
|
52
47
|
return n;
|
|
53
48
|
return "Other";
|
|
54
49
|
}
|
|
55
|
-
function
|
|
56
|
-
const i =
|
|
50
|
+
function u(t) {
|
|
51
|
+
const i = T(t);
|
|
57
52
|
if (i === "Other")
|
|
58
53
|
return;
|
|
59
54
|
const { syntaxHighlight: n } = e[i];
|
|
60
55
|
return n;
|
|
61
56
|
}
|
|
62
57
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
c as o
|
|
58
|
+
S as C,
|
|
59
|
+
u as a,
|
|
60
|
+
T as g
|
|
67
61
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import e from "@cloudscape-design/components/status-indicator";
|
|
3
|
+
import { i as p } from "./har.js";
|
|
4
|
+
function a({ harEntry: s }) {
|
|
5
|
+
const r = s.response.status, t = s.response._error, o = /* @__PURE__ */ i(e, { type: "error", children: [
|
|
6
|
+
r,
|
|
7
|
+
" ",
|
|
8
|
+
t && `(${t})`
|
|
9
|
+
] });
|
|
10
|
+
return p(s) ? o : r >= 300 ? /* @__PURE__ */ n(e, { type: "warning", children: r }) : r >= 200 ? /* @__PURE__ */ n(e, { type: "success", children: r }) : o;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
a as H
|
|
14
|
+
};
|
package/dist/chunks/har.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
function
|
|
1
|
+
import { g as i } from "./content-type.js";
|
|
2
|
+
function T(e) {
|
|
3
3
|
if (typeof e != "string")
|
|
4
4
|
throw new TypeError("File contents are invalid. Expected contents to be a stringified JSON.");
|
|
5
5
|
try {
|
|
@@ -9,35 +9,62 @@ function u(e) {
|
|
|
9
9
|
throw new Error(r, { cause: t });
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return t.length ? e.filter((
|
|
14
|
-
const s =
|
|
15
|
-
return t.includes(
|
|
12
|
+
function m(e, t) {
|
|
13
|
+
return t.length ? e.filter((o) => {
|
|
14
|
+
const s = o.response.content.mimeType, n = i(s);
|
|
15
|
+
return t.includes(n);
|
|
16
16
|
}) : e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function c(e) {
|
|
19
19
|
const t = e.response.status;
|
|
20
20
|
return t < 200 || t >= 400;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return e.filter((t) =>
|
|
22
|
+
function A(e) {
|
|
23
|
+
return e.filter((t) => c(t));
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
const d = ["request", "response"];
|
|
26
|
+
function p(e, t) {
|
|
26
27
|
const r = /* @__PURE__ */ new Set();
|
|
27
|
-
return e.forEach((
|
|
28
|
-
|
|
29
|
-
r.add(
|
|
28
|
+
return e.forEach((o) => {
|
|
29
|
+
o[t].headers.forEach((n) => {
|
|
30
|
+
r.add(n.name);
|
|
30
31
|
});
|
|
31
32
|
}), Array.from(r);
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
const l = {
|
|
35
|
+
"request.shortUrl": (e) => {
|
|
36
|
+
const { url: t } = e.request;
|
|
37
|
+
return t.split("/").at(-1) || t;
|
|
38
|
+
},
|
|
39
|
+
"request.url": (e) => e.request.url,
|
|
40
|
+
"request.method": (e) => e.request.method,
|
|
41
|
+
"response.status": (e) => e.response.status
|
|
42
|
+
};
|
|
43
|
+
function f(e) {
|
|
44
|
+
return d.reduce((t, r) => (p(e, r).forEach((s) => {
|
|
45
|
+
const n = `${r}.headers.${s}`;
|
|
46
|
+
t[n] = (u) => u[r].headers.filter(({ name: a }) => a === s).map(({ value: a }) => a);
|
|
47
|
+
}), t), {});
|
|
48
|
+
}
|
|
49
|
+
function H(e) {
|
|
50
|
+
const t = f(e);
|
|
51
|
+
return {
|
|
52
|
+
...l,
|
|
53
|
+
...t
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function g(e) {
|
|
34
57
|
return `${e.startedDateTime}_${e.time}_${e.request.url}`;
|
|
35
58
|
}
|
|
36
59
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
60
|
+
l as D,
|
|
61
|
+
d as H,
|
|
62
|
+
m as a,
|
|
63
|
+
A as b,
|
|
64
|
+
p as c,
|
|
65
|
+
f as d,
|
|
66
|
+
H as e,
|
|
67
|
+
g as f,
|
|
68
|
+
T as g,
|
|
69
|
+
c as i
|
|
43
70
|
};
|