dev-inspector 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/package.json +3 -2
  2. package/lib/integrations/index.d.ts +0 -2
  3. package/lib/integrations/index.js +0 -7
  4. package/lib/integrations/jira/adf.d.ts +0 -11
  5. package/lib/integrations/jira/adf.js +0 -17
  6. package/lib/integrations/jira/client.d.ts +0 -4
  7. package/lib/integrations/jira/client.js +0 -113
  8. package/lib/integrations/jira/errors.d.ts +0 -10
  9. package/lib/integrations/jira/errors.js +0 -13
  10. package/lib/integrations/jira/index.d.ts +0 -2
  11. package/lib/integrations/jira/index.js +0 -8
  12. package/lib/integrations/types.d.ts +0 -54
  13. package/lib/integrations/types.js +0 -2
  14. package/lib/storage/localStorage.d.ts +0 -30
  15. package/lib/storage/localStorage.js +0 -166
  16. package/lib/ui/logList.d.ts +0 -7
  17. package/lib/ui/logList.js +0 -117
  18. package/lib/ui/panel/integrations/icons.d.ts +0 -1
  19. package/lib/ui/panel/integrations/icons.js +0 -7
  20. package/lib/ui/panel/integrations/index.d.ts +0 -1
  21. package/lib/ui/panel/integrations/index.js +0 -5
  22. package/lib/ui/panel/integrations/jiraDialog.d.ts +0 -6
  23. package/lib/ui/panel/integrations/jiraDialog.js +0 -234
  24. package/lib/ui/panel/integrations/screenshot.d.ts +0 -4
  25. package/lib/ui/panel/integrations/screenshot.js +0 -51
  26. package/lib/ui/panel/localStorage/createLocalStorageView.d.ts +0 -4
  27. package/lib/ui/panel/localStorage/createLocalStorageView.js +0 -108
  28. package/lib/ui/panel/localStorage/index.d.ts +0 -3
  29. package/lib/ui/panel/localStorage/index.js +0 -7
  30. package/lib/ui/panel/localStorage/setupLocalStorageSync.d.ts +0 -9
  31. package/lib/ui/panel/localStorage/setupLocalStorageSync.js +0 -30
  32. package/lib/ui/panel/localStorage/types.d.ts +0 -6
  33. package/lib/ui/panel/localStorage/types.js +0 -2
  34. package/lib/ui/panel.d.ts +0 -15
  35. package/lib/ui/panel.js +0 -375
  36. package/lib/ui/shared/copy.d.ts +0 -2
  37. package/lib/ui/shared/copy.js +0 -101
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-inspector",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "In-page devtools-style logger panel for web apps (console + network).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,8 @@
16
16
  "lint-staged": "lint-staged",
17
17
  "demo": "vite demo --open",
18
18
  "demo:build": "vite build demo",
19
- "build": "tsc -p tsconfig.json",
19
+ "clean": "rm -rf lib",
20
+ "build": "npm run clean && tsc -p tsconfig.json",
20
21
  "lint": "eslint \"src/**/*.{ts,tsx,js}\"",
21
22
  "prepublishOnly": "npm run build"
22
23
  },
@@ -1,2 +0,0 @@
1
- export type { CreateIssueInput, CreateIssueResult, IntegrationContext, IntegrationId, IntegrationsConfig, JiraIntegrationConfig } from "./types";
2
- export { createJiraIssue, fetchJiraIssueTypes, JiraIntegrationError } from "./jira";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JiraIntegrationError = exports.fetchJiraIssueTypes = exports.createJiraIssue = void 0;
4
- var jira_1 = require("./jira");
5
- Object.defineProperty(exports, "createJiraIssue", { enumerable: true, get: function () { return jira_1.createJiraIssue; } });
6
- Object.defineProperty(exports, "fetchJiraIssueTypes", { enumerable: true, get: function () { return jira_1.fetchJiraIssueTypes; } });
7
- Object.defineProperty(exports, "JiraIntegrationError", { enumerable: true, get: function () { return jira_1.JiraIntegrationError; } });
@@ -1,11 +0,0 @@
1
- export declare function textToAdf(text: string): {
2
- type: string;
3
- version: number;
4
- content: {
5
- type: string;
6
- content: {
7
- type: string;
8
- text: string;
9
- }[];
10
- }[];
11
- };
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.textToAdf = textToAdf;
4
- function paragraph(text) {
5
- return {
6
- type: "paragraph",
7
- content: text.length > 0 ? [{ type: "text", text }] : [],
8
- };
9
- }
10
- function textToAdf(text) {
11
- const lines = text.split(/\r?\n/);
12
- return {
13
- type: "doc",
14
- version: 1,
15
- content: lines.map((l) => paragraph(l)),
16
- };
17
- }
@@ -1,4 +0,0 @@
1
- import type { CreateIssueInput, CreateIssueResult, JiraIntegrationConfig } from "../types";
2
- import type { JiraIssueTypeOption } from "../types";
3
- export declare function fetchJiraIssueTypes(config: JiraIntegrationConfig, projectKey?: string): Promise<JiraIssueTypeOption[]>;
4
- export declare function createJiraIssue(input: CreateIssueInput, config: JiraIntegrationConfig): Promise<CreateIssueResult>;
@@ -1,113 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchJiraIssueTypes = fetchJiraIssueTypes;
4
- exports.createJiraIssue = createJiraIssue;
5
- const adf_1 = require("./adf");
6
- const errors_1 = require("./errors");
7
- async function readJsonSafe(res) {
8
- try {
9
- return (await res.json());
10
- }
11
- catch (_a) {
12
- return undefined;
13
- }
14
- }
15
- function mapStatus(status) {
16
- if (status === 400)
17
- return { code: "bad_request", message: "Bad request. Check required fields and Jira configuration." };
18
- if (status === 401)
19
- return { code: "unauthorized", message: "Unauthorized. Check Jira credentials." };
20
- if (status === 403)
21
- return { code: "forbidden", message: "Forbidden. Check Jira permissions." };
22
- if (status === 429)
23
- return { code: "rate_limited", message: "Rate limited by Jira. Try again later." };
24
- if (status >= 500)
25
- return { code: "server_error", message: "Jira server error. Try again later." };
26
- return { code: "unknown", message: "Unexpected Jira error." };
27
- }
28
- function isRecord(value) {
29
- return typeof value === "object" && value !== null;
30
- }
31
- function toQuery(params) {
32
- const sp = new URLSearchParams();
33
- for (const [k, v] of Object.entries(params)) {
34
- if (typeof v === "string" && v.length > 0)
35
- sp.set(k, v);
36
- }
37
- const s = sp.toString();
38
- return s.length > 0 ? `?${s}` : "";
39
- }
40
- async function fetchJiraIssueTypes(config, projectKey) {
41
- var _a;
42
- const proxyUrl = config.proxyUrl;
43
- if (!proxyUrl)
44
- throw new errors_1.JiraIntegrationError("Missing Jira proxyUrl.", "not_configured");
45
- const url = `${proxyUrl}${toQuery({ op: "issueTypes", projectKey: (_a = projectKey !== null && projectKey !== void 0 ? projectKey : config.projectKey) !== null && _a !== void 0 ? _a : "" })}`;
46
- let res;
47
- try {
48
- res = await fetch(url, { method: "GET", headers: { accept: "application/json" } });
49
- }
50
- catch (e) {
51
- throw new errors_1.JiraIntegrationError("Network error while loading Jira issue types.", "network_error", { details: String(e) });
52
- }
53
- const data = await readJsonSafe(res);
54
- if (!res.ok) {
55
- const mapped = mapStatus(res.status);
56
- throw new errors_1.JiraIntegrationError(mapped.message, mapped.code, { status: res.status, details: data });
57
- }
58
- if (!Array.isArray(data))
59
- return [];
60
- const out = [];
61
- for (const it of data) {
62
- if (!isRecord(it))
63
- continue;
64
- const id = typeof it.id === "string" ? it.id : undefined;
65
- const name = typeof it.name === "string" ? it.name : undefined;
66
- if (id && name)
67
- out.push({ id, name });
68
- }
69
- return out;
70
- }
71
- async function createJiraIssue(input, config) {
72
- var _a, _b, _c, _d, _e, _f;
73
- const title = input.title.trim();
74
- if (title.length === 0)
75
- throw new errors_1.JiraIntegrationError("Title is required.", "bad_request");
76
- const projectKey = (_b = (_a = input.jira) === null || _a === void 0 ? void 0 : _a.projectKey) !== null && _b !== void 0 ? _b : config.projectKey;
77
- if (!projectKey)
78
- throw new errors_1.JiraIntegrationError("Missing Jira project key.", "not_configured");
79
- const issueType = (_e = (_d = (_c = input.jira) === null || _c === void 0 ? void 0 : _c.issueType) !== null && _d !== void 0 ? _d : config.issueType) !== null && _e !== void 0 ? _e : {};
80
- if (!issueType.name && !issueType.id)
81
- throw new errors_1.JiraIntegrationError("Missing Jira issue type (name or id).", "not_configured");
82
- const descriptionText = (_f = input.description) !== null && _f !== void 0 ? _f : "";
83
- const adf = (0, adf_1.textToAdf)(descriptionText);
84
- const proxyUrl = config.proxyUrl;
85
- if (!proxyUrl)
86
- throw new errors_1.JiraIntegrationError("Missing Jira proxyUrl.", "not_configured");
87
- const res = await fetch(proxyUrl, {
88
- method: "POST",
89
- headers: { "content-type": "application/json" },
90
- body: JSON.stringify({
91
- provider: "jira",
92
- input: {
93
- title,
94
- descriptionAdf: adf,
95
- context: input.context,
96
- screenshot: input.screenshot,
97
- projectKey,
98
- issueType,
99
- },
100
- }),
101
- });
102
- const data = await readJsonSafe(res);
103
- if (!res.ok) {
104
- const mapped = mapStatus(res.status);
105
- throw new errors_1.JiraIntegrationError(mapped.message, mapped.code, { status: res.status, details: data });
106
- }
107
- const rec = isRecord(data) ? data : {};
108
- return {
109
- id: typeof rec.id === "string" ? rec.id : undefined,
110
- key: typeof rec.key === "string" ? rec.key : undefined,
111
- url: typeof rec.url === "string" ? rec.url : undefined,
112
- };
113
- }
@@ -1,10 +0,0 @@
1
- export type JiraErrorCode = "not_configured" | "bad_request" | "unauthorized" | "forbidden" | "rate_limited" | "server_error" | "network_error" | "unknown";
2
- export declare class JiraIntegrationError extends Error {
3
- code: JiraErrorCode;
4
- status?: number;
5
- details?: unknown;
6
- constructor(message: string, code: JiraErrorCode, options?: {
7
- status?: number;
8
- details?: unknown;
9
- });
10
- }
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JiraIntegrationError = void 0;
4
- class JiraIntegrationError extends Error {
5
- constructor(message, code, options) {
6
- super(message);
7
- this.name = "JiraIntegrationError";
8
- this.code = code;
9
- this.status = options === null || options === void 0 ? void 0 : options.status;
10
- this.details = options === null || options === void 0 ? void 0 : options.details;
11
- }
12
- }
13
- exports.JiraIntegrationError = JiraIntegrationError;
@@ -1,2 +0,0 @@
1
- export { createJiraIssue, fetchJiraIssueTypes } from "./client";
2
- export { JiraIntegrationError } from "./errors";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JiraIntegrationError = exports.fetchJiraIssueTypes = exports.createJiraIssue = void 0;
4
- var client_1 = require("./client");
5
- Object.defineProperty(exports, "createJiraIssue", { enumerable: true, get: function () { return client_1.createJiraIssue; } });
6
- Object.defineProperty(exports, "fetchJiraIssueTypes", { enumerable: true, get: function () { return client_1.fetchJiraIssueTypes; } });
7
- var errors_1 = require("./errors");
8
- Object.defineProperty(exports, "JiraIntegrationError", { enumerable: true, get: function () { return errors_1.JiraIntegrationError; } });
@@ -1,54 +0,0 @@
1
- export type IntegrationId = "jira";
2
- export type JiraIssueType = {
3
- name?: string;
4
- id?: string;
5
- };
6
- export type JiraIssueTypeOption = {
7
- id: string;
8
- name: string;
9
- };
10
- export type JiraIntegrationConfig = {
11
- proxyUrl?: string;
12
- projectKey?: string;
13
- issueType?: JiraIssueType;
14
- screenshot?: {
15
- enabled?: boolean;
16
- mode?: "displayMedia" | "none";
17
- };
18
- user?: {
19
- id?: string;
20
- email?: string;
21
- name?: string;
22
- };
23
- };
24
- export type IntegrationsConfig = {
25
- jira?: JiraIntegrationConfig;
26
- };
27
- export type IntegrationContext = {
28
- url?: string;
29
- userAgent?: string;
30
- timestamp?: string;
31
- user?: {
32
- id?: string;
33
- email?: string;
34
- name?: string;
35
- };
36
- };
37
- export type CreateIssueInput = {
38
- title: string;
39
- description?: string;
40
- context?: IntegrationContext;
41
- screenshot?: {
42
- dataUrl: string;
43
- filename: string;
44
- };
45
- jira?: {
46
- projectKey?: string;
47
- issueType?: JiraIssueType;
48
- };
49
- };
50
- export type CreateIssueResult = {
51
- id?: string;
52
- key?: string;
53
- url?: string;
54
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,30 +0,0 @@
1
- export type LocalStorageItem = {
2
- key: string;
3
- value: string;
4
- preview: string;
5
- valueLength: number;
6
- approxBytes: number;
7
- };
8
- export type LocalStorageSnapshot = {
9
- items: LocalStorageItem[];
10
- totalApproxBytes: number;
11
- };
12
- export type LocalStorageAccess = {
13
- ok: true;
14
- storage: Storage;
15
- } | {
16
- ok: false;
17
- message: string;
18
- };
19
- export declare function getLocalStorageAccess(): LocalStorageAccess;
20
- export declare function readLocalStorageSnapshot(storage: Storage, opts: {
21
- maxPreviewLength: number;
22
- }): LocalStorageSnapshot;
23
- export declare function createLocalStorageWatcher(args: {
24
- storage: Storage;
25
- pollIntervalMs: number;
26
- onChange: () => void;
27
- }): {
28
- destroy: () => void;
29
- trigger: () => void;
30
- };
@@ -1,166 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLocalStorageAccess = getLocalStorageAccess;
4
- exports.readLocalStorageSnapshot = readLocalStorageSnapshot;
5
- exports.createLocalStorageWatcher = createLocalStorageWatcher;
6
- function safeTruncate(value, maxLen) {
7
- if (maxLen <= 0)
8
- return "";
9
- if (value.length <= maxLen)
10
- return value;
11
- return `${value.slice(0, maxLen)}…`;
12
- }
13
- function getLocalStorageAccess() {
14
- try {
15
- const w = globalThis;
16
- const storage = w.localStorage;
17
- if (!storage)
18
- return { ok: false, message: "localStorage is not available in this environment." };
19
- // Some environments expose the object but throw on access (privacy modes / blocked cookies).
20
- void storage.length;
21
- return { ok: true, storage };
22
- }
23
- catch (_a) {
24
- return { ok: false, message: "localStorage access is blocked in this environment (privacy settings / permissions)." };
25
- }
26
- }
27
- function readLocalStorageSnapshot(storage, opts) {
28
- var _a;
29
- const items = [];
30
- let totalApproxBytes = 0;
31
- const len = storage.length;
32
- for (let i = 0; i < len; i += 1) {
33
- const key = storage.key(i);
34
- if (!key)
35
- continue;
36
- const value = (_a = storage.getItem(key)) !== null && _a !== void 0 ? _a : "";
37
- const approxBytes = (key.length + value.length) * 2; // UTF-16-ish approximation
38
- totalApproxBytes += approxBytes;
39
- items.push({
40
- key,
41
- value,
42
- preview: safeTruncate(value, opts.maxPreviewLength),
43
- valueLength: value.length,
44
- approxBytes,
45
- });
46
- }
47
- items.sort((a, b) => a.key.localeCompare(b.key));
48
- return { items, totalApproxBytes };
49
- }
50
- function buildSignature(storage) {
51
- var _a;
52
- try {
53
- const parts = [String(storage.length)];
54
- const len = storage.length;
55
- for (let i = 0; i < len; i += 1) {
56
- const k = storage.key(i);
57
- if (!k)
58
- continue;
59
- const v = (_a = storage.getItem(k)) !== null && _a !== void 0 ? _a : "";
60
- parts.push(`${k}:${v.length}`);
61
- }
62
- return parts.join("|");
63
- }
64
- catch (_b) {
65
- return "err";
66
- }
67
- }
68
- function createLocalStorageWatcher(args) {
69
- var _a, _b, _c, _d;
70
- const { storage, onChange } = args;
71
- const pollIntervalMs = Math.max(250, args.pollIntervalMs);
72
- let destroyed = false;
73
- let lastSig = buildSignature(storage);
74
- const trigger = () => {
75
- if (destroyed)
76
- return;
77
- onChange();
78
- };
79
- const win = globalThis;
80
- const onStorageEvent = () => {
81
- const sig = buildSignature(storage);
82
- if (sig !== lastSig) {
83
- lastSig = sig;
84
- trigger();
85
- }
86
- };
87
- try {
88
- (_a = win.addEventListener) === null || _a === void 0 ? void 0 : _a.call(win, "storage", onStorageEvent);
89
- }
90
- catch (_e) {
91
- void 0;
92
- }
93
- // Same-tab changes don't fire "storage" events. We try to patch methods; if that fails, polling still keeps UI fresh.
94
- const orig = {
95
- setItem: (_b = storage.setItem) === null || _b === void 0 ? void 0 : _b.bind(storage),
96
- removeItem: (_c = storage.removeItem) === null || _c === void 0 ? void 0 : _c.bind(storage),
97
- clear: (_d = storage.clear) === null || _d === void 0 ? void 0 : _d.bind(storage),
98
- };
99
- const patch = () => {
100
- try {
101
- storage.setItem = ((key, value) => {
102
- var _a;
103
- (_a = orig.setItem) === null || _a === void 0 ? void 0 : _a.call(orig, key, value);
104
- const sig = buildSignature(storage);
105
- if (sig !== lastSig) {
106
- lastSig = sig;
107
- trigger();
108
- }
109
- });
110
- storage.removeItem = ((key) => {
111
- var _a;
112
- (_a = orig.removeItem) === null || _a === void 0 ? void 0 : _a.call(orig, key);
113
- const sig = buildSignature(storage);
114
- if (sig !== lastSig) {
115
- lastSig = sig;
116
- trigger();
117
- }
118
- });
119
- storage.clear = (() => {
120
- var _a;
121
- (_a = orig.clear) === null || _a === void 0 ? void 0 : _a.call(orig);
122
- const sig = buildSignature(storage);
123
- if (sig !== lastSig) {
124
- lastSig = sig;
125
- trigger();
126
- }
127
- });
128
- return true;
129
- }
130
- catch (_a) {
131
- return false;
132
- }
133
- };
134
- const patched = patch();
135
- const timer = globalThis.setInterval(() => {
136
- const sig = buildSignature(storage);
137
- if (sig !== lastSig) {
138
- lastSig = sig;
139
- trigger();
140
- }
141
- }, patched ? Math.max(800, pollIntervalMs) : pollIntervalMs);
142
- const destroy = () => {
143
- var _a;
144
- destroyed = true;
145
- globalThis.clearInterval(timer);
146
- try {
147
- (_a = win.removeEventListener) === null || _a === void 0 ? void 0 : _a.call(win, "storage", onStorageEvent);
148
- }
149
- catch (_b) {
150
- void 0;
151
- }
152
- // best-effort restore
153
- try {
154
- if (orig.setItem)
155
- storage.setItem = orig.setItem;
156
- if (orig.removeItem)
157
- storage.removeItem = orig.removeItem;
158
- if (orig.clear)
159
- storage.clear = orig.clear;
160
- }
161
- catch (_c) {
162
- void 0;
163
- }
164
- };
165
- return { destroy, trigger };
166
- }
@@ -1,7 +0,0 @@
1
- import type { LogEntry } from "../utils/types";
2
- export type LogList = {
3
- el: HTMLUListElement;
4
- append: (entry: LogEntry) => void;
5
- clear: () => void;
6
- };
7
- export declare function createLogList(doc: Document): LogList;
package/lib/ui/logList.js DELETED
@@ -1,117 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createLogList = createLogList;
4
- const jsonViewer_1 = require("./jsonViewer");
5
- const networkDetails_1 = require("./logList/networkDetails");
6
- function fmtTime(ts) {
7
- const d = new Date(ts);
8
- const hh = String(d.getHours()).padStart(2, "0");
9
- const mm = String(d.getMinutes()).padStart(2, "0");
10
- const ss = String(d.getSeconds()).padStart(2, "0");
11
- return `${hh}:${mm}:${ss}`;
12
- }
13
- function toneForEntry(entry) {
14
- if (entry.source === "console") {
15
- if (entry.level === "error")
16
- return "error";
17
- if (entry.level === "warn")
18
- return "warning";
19
- return "neutral";
20
- }
21
- const s = entry.status;
22
- if (typeof s !== "number")
23
- return "error";
24
- if (s >= 400)
25
- return "error";
26
- if (s >= 300)
27
- return "warning";
28
- return "success";
29
- }
30
- function classForTone(tone) {
31
- if (tone === "error")
32
- return "di-itemToneError";
33
- if (tone === "warning")
34
- return "di-itemToneWarning";
35
- if (tone === "success")
36
- return "di-itemToneSuccess";
37
- return "di-itemToneNeutral";
38
- }
39
- function isNetworkFailure(entry) {
40
- if (entry.source !== "network")
41
- return false;
42
- return typeof entry.status !== "number" || entry.status >= 400;
43
- }
44
- function isInspectableValue(value) {
45
- if (typeof value !== "object" || value === null)
46
- return false;
47
- if (value instanceof Error)
48
- return false;
49
- if (value instanceof Date)
50
- return false;
51
- if (value instanceof RegExp)
52
- return false;
53
- return true;
54
- }
55
- function getInspectableArgs(args) {
56
- return args.filter(isInspectableValue);
57
- }
58
- function createLogList(doc) {
59
- const el = doc.createElement("ul");
60
- el.className = "di-list";
61
- const append = (entry) => {
62
- const li = doc.createElement("li");
63
- const tone = toneForEntry(entry);
64
- li.className = `di-item ${classForTone(tone)}`;
65
- const meta = doc.createElement("div");
66
- meta.className = "di-meta";
67
- const time = doc.createElement("span");
68
- time.textContent = fmtTime(entry.timestamp);
69
- const source = doc.createElement("span");
70
- source.textContent = entry.source;
71
- const detail = doc.createElement("span");
72
- if (entry.source === "console") {
73
- detail.textContent = entry.level;
74
- }
75
- else {
76
- detail.className = `di-statusChip ${isNetworkFailure(entry) ? "di-statusChipError" : "di-statusChipSuccess"}`;
77
- detail.textContent = typeof entry.status === "number" ? String(entry.status) : "ERR";
78
- }
79
- meta.append(time, source, detail);
80
- li.append(meta);
81
- if (entry.message && entry.message.trim().length > 0) {
82
- const msg = doc.createElement("div");
83
- msg.className = "di-msg";
84
- msg.textContent = entry.message;
85
- li.append(msg);
86
- }
87
- if (entry.source === "console") {
88
- const inspectable = getInspectableArgs(entry.args);
89
- if (inspectable.length > 0) {
90
- const details = doc.createElement("details");
91
- details.className = "di-details";
92
- const summary = doc.createElement("summary");
93
- summary.className = "di-detailsSummary";
94
- summary.textContent = "Inspect";
95
- const viewerWrap = doc.createElement("div");
96
- viewerWrap.className = "di-detailsBody";
97
- viewerWrap.append((0, jsonViewer_1.createJsonViewer)(doc, inspectable.length === 1 ? inspectable[0] : inspectable, {
98
- maxDepth: 6,
99
- maxKeys: 200,
100
- maxNodes: 2000,
101
- }));
102
- details.append(summary, viewerWrap);
103
- li.append(details);
104
- }
105
- }
106
- if (entry.source === "network") {
107
- const details = (0, networkDetails_1.createNetworkDetails)(doc, entry);
108
- if (details)
109
- li.append(details);
110
- }
111
- el.append(li);
112
- };
113
- const clear = () => {
114
- el.replaceChildren();
115
- };
116
- return { el, append, clear };
117
- }
@@ -1 +0,0 @@
1
- export declare const INTEGRATIONS_ICON_HTML: string;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INTEGRATIONS_ICON_HTML = void 0;
4
- exports.INTEGRATIONS_ICON_HTML = `<svg class="di-iconSvg" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">` +
5
- `<path d="M8 7.5C8 6.12 9.12 5 10.5 5H19.5C20.88 5 22 6.12 22 7.5V16.5C22 17.88 20.88 19 19.5 19H15L13 21L11 19H10.5C9.12 19 8 17.88 8 16.5V7.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/>` +
6
- `<path d="M6 9H4.5C3.12 9 2 10.12 2 11.5V16.5C2 17.88 3.12 19 4.5 19H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>` +
7
- `</svg>`;
@@ -1 +0,0 @@
1
- export { openJiraDialog } from "./jiraDialog";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.openJiraDialog = void 0;
4
- var jiraDialog_1 = require("./jiraDialog");
5
- Object.defineProperty(exports, "openJiraDialog", { enumerable: true, get: function () { return jiraDialog_1.openJiraDialog; } });
@@ -1,6 +0,0 @@
1
- import type { IntegrationsConfig } from "../../../integrations";
2
- type DialogResult = {
3
- ok: boolean;
4
- };
5
- export declare function openJiraDialog(doc: Document, integrations?: IntegrationsConfig): Promise<DialogResult>;
6
- export {};