scordi-extension 1.15.8 → 1.15.9
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/blocks/CaptureNetworkBlock.d.ts +75 -0
- package/dist/blocks/CaptureNetworkBlock.d.ts.map +1 -0
- package/dist/blocks/index.d.ts +35 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/sdk/EightGClient.d.ts +3 -0
- package/dist/sdk/EightGClient.d.ts.map +1 -1
- package/dist/sdk/index.cjs +3 -3
- package/dist/sdk/index.js +1585 -1528
- package/dist/src/blocks/CaptureNetworkBlock.ts.js +55 -0
- package/dist/src/blocks/index.ts.js +9 -1
- package/dist/src/content/components/ExecutionStatusUI.tsx.js +223 -0
- package/dist/src/content/handler/InternalMessageHandler.ts.js +23 -1
- package/dist/src/content/main.tsx.js +20 -9
- package/dist/src/types/internal-messages.ts.js +9 -0
- package/dist/types/internal-messages.d.ts +27 -2
- package/dist/types/internal-messages.d.ts.map +1 -1
- package/dist/vendor/vite-client.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import z from "/vendor/.vite-deps-zod.js__v--7cce5f32.js";
|
|
2
|
+
export const CaptureNetworkBlockSchema = z.object({
|
|
3
|
+
name: z.literal("capture-network"),
|
|
4
|
+
targetUrl: z.string().url(),
|
|
5
|
+
waitForLoadComplete: z.boolean().optional(),
|
|
6
|
+
timeout: z.number().min(0).optional(),
|
|
7
|
+
includeRequestHeaders: z.boolean().optional(),
|
|
8
|
+
includeResponseHeaders: z.boolean().optional(),
|
|
9
|
+
includeResponseBody: z.boolean().optional(),
|
|
10
|
+
urlFilter: z.string().optional(),
|
|
11
|
+
resourceTypes: z.array(z.string()).optional()
|
|
12
|
+
});
|
|
13
|
+
export function validateCaptureNetworkBlock(data) {
|
|
14
|
+
return CaptureNetworkBlockSchema.parse(data);
|
|
15
|
+
}
|
|
16
|
+
export async function handlerCaptureNetwork(data) {
|
|
17
|
+
try {
|
|
18
|
+
console.log("[CaptureNetworkBlock] Capturing network requests for URL:", data.targetUrl);
|
|
19
|
+
const response = await chrome.runtime.sendMessage({
|
|
20
|
+
type: "CDP_CAPTURE_NETWORK",
|
|
21
|
+
data: {
|
|
22
|
+
targetUrl: data.targetUrl,
|
|
23
|
+
waitForLoadComplete: data.waitForLoadComplete ?? true,
|
|
24
|
+
timeout: data.timeout || 3e4,
|
|
25
|
+
includeRequestHeaders: data.includeRequestHeaders ?? false,
|
|
26
|
+
includeResponseHeaders: data.includeResponseHeaders ?? false,
|
|
27
|
+
includeResponseBody: data.includeResponseBody ?? false,
|
|
28
|
+
urlFilter: data.urlFilter,
|
|
29
|
+
resourceTypes: data.resourceTypes
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (response.$isError) {
|
|
33
|
+
return {
|
|
34
|
+
hasError: true,
|
|
35
|
+
message: response.message || "Network capture failed",
|
|
36
|
+
data: void 0
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
console.log(
|
|
40
|
+
"[CaptureNetworkBlock] Network capture successful, captured:",
|
|
41
|
+
response.data.summary.totalRequests,
|
|
42
|
+
"requests"
|
|
43
|
+
);
|
|
44
|
+
return {
|
|
45
|
+
data: response.data
|
|
46
|
+
};
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error("[CaptureNetworkBlock] Network capture error:", error);
|
|
49
|
+
return {
|
|
50
|
+
hasError: true,
|
|
51
|
+
message: error instanceof Error ? error.message : "Unknown error in network capture",
|
|
52
|
+
data: void 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -17,6 +17,7 @@ export { ScrollBlockSchema } from "/src/blocks/ScrollBlock.ts.js";
|
|
|
17
17
|
export { AiParseDataBlockSchema } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
18
18
|
export { FetchApiBlockSchema } from "/src/blocks/FetchApiBlock.ts.js";
|
|
19
19
|
export { DataExtractBlockSchema } from "/src/blocks/DataExtractBlock.ts.js";
|
|
20
|
+
export { CaptureNetworkBlockSchema } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
20
21
|
import { handlerGetText, validateGetTextBlock } from "/src/blocks/GetTextBlock.ts.js";
|
|
21
22
|
import {
|
|
22
23
|
handlerGetAttributeValue,
|
|
@@ -55,6 +56,7 @@ import { handlerScroll, validateScrollBlock } from "/src/blocks/ScrollBlock.ts.j
|
|
|
55
56
|
import { handlerAiParseData, validateAiParseDataBlock } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
56
57
|
import { handlerFetchApi, validateFetchApiBlock } from "/src/blocks/FetchApiBlock.ts.js";
|
|
57
58
|
import { handlerDataExtract, validateDataExtractBlock } from "/src/blocks/DataExtractBlock.ts.js";
|
|
59
|
+
import { handlerCaptureNetwork, validateCaptureNetworkBlock } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
58
60
|
import { GetTextBlockSchema as GetTextBlockSchema2 } from "/src/blocks/GetTextBlock.ts.js";
|
|
59
61
|
import { GetAttributeValueBlockSchema as GetAttributeValueBlockSchema2 } from "/src/blocks/GetAttributeValueBlock.ts.js";
|
|
60
62
|
import { GetValueFormsBlockSchema as GetValueFormsBlockSchema2 } from "/src/blocks/GetValueFormBlock.ts.js";
|
|
@@ -72,6 +74,7 @@ import { ScrollBlockSchema as ScrollBlockSchema2 } from "/src/blocks/ScrollBlock
|
|
|
72
74
|
import { AiParseDataBlockSchema as AiParseDataBlockSchema2 } from "/src/blocks/AiParseDataBlock.ts.js";
|
|
73
75
|
import { FetchApiBlockSchema as FetchApiBlockSchema2 } from "/src/blocks/FetchApiBlock.ts.js";
|
|
74
76
|
import { DataExtractBlockSchema as DataExtractBlockSchema2 } from "/src/blocks/DataExtractBlock.ts.js";
|
|
77
|
+
import { CaptureNetworkBlockSchema as CaptureNetworkBlockSchema2 } from "/src/blocks/CaptureNetworkBlock.ts.js";
|
|
75
78
|
export const AllBlockSchemas = {
|
|
76
79
|
"get-text": GetTextBlockSchema2,
|
|
77
80
|
"attribute-value": GetAttributeValueBlockSchema2,
|
|
@@ -89,7 +92,8 @@ export const AllBlockSchemas = {
|
|
|
89
92
|
"scroll": ScrollBlockSchema2,
|
|
90
93
|
"ai-parse-data": AiParseDataBlockSchema2,
|
|
91
94
|
"fetch-api": FetchApiBlockSchema2,
|
|
92
|
-
"data-extract": DataExtractBlockSchema2
|
|
95
|
+
"data-extract": DataExtractBlockSchema2,
|
|
96
|
+
"capture-network": CaptureNetworkBlockSchema2
|
|
93
97
|
};
|
|
94
98
|
export class BlockHandler {
|
|
95
99
|
// Implementation
|
|
@@ -164,6 +168,10 @@ export class BlockHandler {
|
|
|
164
168
|
const validatedBlock = validateDataExtractBlock(block);
|
|
165
169
|
return await handlerDataExtract(validatedBlock);
|
|
166
170
|
}
|
|
171
|
+
case "capture-network": {
|
|
172
|
+
const validatedBlock = validateCaptureNetworkBlock(block);
|
|
173
|
+
return await handlerCaptureNetwork(validatedBlock);
|
|
174
|
+
}
|
|
167
175
|
default:
|
|
168
176
|
return {
|
|
169
177
|
hasError: true,
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { createHotContext as __vite__createHotContext } from "/vendor/vite-client.js";import.meta.hot = __vite__createHotContext("/src/content/components/ExecutionStatusUI.tsx.js");import __vite__cjsImport0_react_jsxDevRuntime from "/vendor/.vite-deps-react_jsx-dev-runtime.js__v--7cce5f32.js"; const Fragment = __vite__cjsImport0_react_jsxDevRuntime["Fragment"]; const jsxDEV = __vite__cjsImport0_react_jsxDevRuntime["jsxDEV"];
|
|
2
|
+
import * as RefreshRuntime from "/vendor/react-refresh.js";
|
|
3
|
+
const inWebWorker = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
|
|
4
|
+
let prevRefreshReg;
|
|
5
|
+
let prevRefreshSig;
|
|
6
|
+
if (import.meta.hot && !inWebWorker) {
|
|
7
|
+
if (!window.$RefreshReg$) {
|
|
8
|
+
throw new Error(
|
|
9
|
+
"@vitejs/plugin-react can't detect preamble. Something is wrong."
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
prevRefreshReg = window.$RefreshReg$;
|
|
13
|
+
prevRefreshSig = window.$RefreshSig$;
|
|
14
|
+
window.$RefreshReg$ = RefreshRuntime.getRefreshReg("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx");
|
|
15
|
+
window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
|
|
16
|
+
}
|
|
17
|
+
var _s = $RefreshSig$(), _s2 = $RefreshSig$();
|
|
18
|
+
import __vite__cjsImport3_react from "/vendor/.vite-deps-react.js__v--7cce5f32.js"; const useEffect = __vite__cjsImport3_react["useEffect"]; const useState = __vite__cjsImport3_react["useState"];
|
|
19
|
+
import __vite__cjsImport4_reactDom from "/vendor/.vite-deps-react-dom.js__v--7cce5f32.js"; const createPortal = __vite__cjsImport4_reactDom["createPortal"];
|
|
20
|
+
export function ExecutionStatusUI({ visible, message = "실행 중" }) {
|
|
21
|
+
_s();
|
|
22
|
+
const [isAnimating, setIsAnimating] = useState(false);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (visible) {
|
|
25
|
+
setTimeout(() => setIsAnimating(true), 10);
|
|
26
|
+
} else {
|
|
27
|
+
setIsAnimating(false);
|
|
28
|
+
}
|
|
29
|
+
}, [visible]);
|
|
30
|
+
if (!visible) return null;
|
|
31
|
+
const containerStyle = {
|
|
32
|
+
position: "fixed",
|
|
33
|
+
top: "20px",
|
|
34
|
+
left: "20px",
|
|
35
|
+
zIndex: 2147483647,
|
|
36
|
+
backgroundColor: "#ffffff",
|
|
37
|
+
border: "2px solid #818cf8",
|
|
38
|
+
borderRadius: "12px",
|
|
39
|
+
padding: "16px 20px",
|
|
40
|
+
boxShadow: "0 10px 25px rgba(0, 0, 0, 0.2)",
|
|
41
|
+
display: "flex",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
gap: "12px",
|
|
44
|
+
minWidth: "200px",
|
|
45
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
46
|
+
transform: isAnimating ? "scale(1)" : "scale(0.9)",
|
|
47
|
+
opacity: isAnimating ? 1 : 0,
|
|
48
|
+
transition: "transform 0.2s ease-out, opacity 0.2s ease-out"
|
|
49
|
+
};
|
|
50
|
+
const catContainerStyle = {
|
|
51
|
+
position: "relative",
|
|
52
|
+
width: "40px",
|
|
53
|
+
height: "30px",
|
|
54
|
+
overflow: "hidden"
|
|
55
|
+
};
|
|
56
|
+
const catStyle = {
|
|
57
|
+
fontSize: "24px",
|
|
58
|
+
animation: "walkCat 2s ease-in-out infinite"
|
|
59
|
+
};
|
|
60
|
+
const messageStyle = {
|
|
61
|
+
margin: 0,
|
|
62
|
+
fontSize: "14px",
|
|
63
|
+
fontWeight: 600,
|
|
64
|
+
color: "#1f2937",
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
gap: "4px"
|
|
68
|
+
};
|
|
69
|
+
const dotsStyle = {
|
|
70
|
+
display: "inline-block",
|
|
71
|
+
width: "20px"
|
|
72
|
+
};
|
|
73
|
+
return createPortal(
|
|
74
|
+
/* @__PURE__ */ jsxDEV(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsxDEV("style", { children: `
|
|
76
|
+
@keyframes walkCat {
|
|
77
|
+
0%, 100% {
|
|
78
|
+
transform: translateX(0px);
|
|
79
|
+
}
|
|
80
|
+
50% {
|
|
81
|
+
transform: translateX(10px);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@keyframes dotBlink {
|
|
86
|
+
0%, 20% {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
}
|
|
89
|
+
40% {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
opacity: 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dot-1 {
|
|
98
|
+
animation: dotBlink 1.5s infinite;
|
|
99
|
+
animation-delay: 0s;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.dot-2 {
|
|
103
|
+
animation: dotBlink 1.5s infinite;
|
|
104
|
+
animation-delay: 0.3s;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dot-3 {
|
|
108
|
+
animation: dotBlink 1.5s infinite;
|
|
109
|
+
animation-delay: 0.6s;
|
|
110
|
+
}
|
|
111
|
+
` }, void 0, false, {
|
|
112
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
113
|
+
lineNumber: 94,
|
|
114
|
+
columnNumber: 7
|
|
115
|
+
}, this),
|
|
116
|
+
/* @__PURE__ */ jsxDEV("div", { style: containerStyle, onClick: (e) => e.stopPropagation(), children: [
|
|
117
|
+
/* @__PURE__ */ jsxDEV("div", { style: catContainerStyle, children: /* @__PURE__ */ jsxDEV("span", { style: catStyle, children: "🐱" }, void 0, false, {
|
|
118
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
119
|
+
lineNumber: 135,
|
|
120
|
+
columnNumber: 11
|
|
121
|
+
}, this) }, void 0, false, {
|
|
122
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
123
|
+
lineNumber: 134,
|
|
124
|
+
columnNumber: 9
|
|
125
|
+
}, this),
|
|
126
|
+
/* @__PURE__ */ jsxDEV("p", { style: messageStyle, children: [
|
|
127
|
+
message,
|
|
128
|
+
/* @__PURE__ */ jsxDEV("span", { style: dotsStyle, children: [
|
|
129
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-1", children: "." }, void 0, false, {
|
|
130
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
131
|
+
lineNumber: 140,
|
|
132
|
+
columnNumber: 13
|
|
133
|
+
}, this),
|
|
134
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-2", children: "." }, void 0, false, {
|
|
135
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
136
|
+
lineNumber: 141,
|
|
137
|
+
columnNumber: 13
|
|
138
|
+
}, this),
|
|
139
|
+
/* @__PURE__ */ jsxDEV("span", { className: "dot-3", children: "." }, void 0, false, {
|
|
140
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
141
|
+
lineNumber: 142,
|
|
142
|
+
columnNumber: 13
|
|
143
|
+
}, this)
|
|
144
|
+
] }, void 0, true, {
|
|
145
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
146
|
+
lineNumber: 139,
|
|
147
|
+
columnNumber: 11
|
|
148
|
+
}, this)
|
|
149
|
+
] }, void 0, true, {
|
|
150
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
151
|
+
lineNumber: 137,
|
|
152
|
+
columnNumber: 9
|
|
153
|
+
}, this)
|
|
154
|
+
] }, void 0, true, {
|
|
155
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
156
|
+
lineNumber: 133,
|
|
157
|
+
columnNumber: 7
|
|
158
|
+
}, this)
|
|
159
|
+
] }, void 0, true, {
|
|
160
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
161
|
+
lineNumber: 93,
|
|
162
|
+
columnNumber: 5
|
|
163
|
+
}, this),
|
|
164
|
+
document.body
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
_s(ExecutionStatusUI, "U13FD0PO4FR4rREA5Sq0cx8yDCA=");
|
|
168
|
+
_c = ExecutionStatusUI;
|
|
169
|
+
export function ExecutionStatusUIContainer() {
|
|
170
|
+
_s2();
|
|
171
|
+
const [uiState, setUiState] = useState({
|
|
172
|
+
visible: false,
|
|
173
|
+
message: "실행 중"
|
|
174
|
+
});
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
const handleShow = (event) => {
|
|
177
|
+
const customEvent = event;
|
|
178
|
+
const { message } = customEvent.detail || {};
|
|
179
|
+
console.log("[ExecutionStatusUI] Show event received:", { message });
|
|
180
|
+
setUiState({
|
|
181
|
+
visible: true,
|
|
182
|
+
message: message || "실행 중"
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
const handleHide = () => {
|
|
186
|
+
console.log("[ExecutionStatusUI] Hide event received");
|
|
187
|
+
setUiState((prev) => ({
|
|
188
|
+
...prev,
|
|
189
|
+
visible: false
|
|
190
|
+
}));
|
|
191
|
+
};
|
|
192
|
+
window.addEventListener("8g-show-execution-status", handleShow);
|
|
193
|
+
window.addEventListener("8g-hide-execution-status", handleHide);
|
|
194
|
+
return () => {
|
|
195
|
+
window.removeEventListener("8g-show-execution-status", handleShow);
|
|
196
|
+
window.removeEventListener("8g-hide-execution-status", handleHide);
|
|
197
|
+
};
|
|
198
|
+
}, []);
|
|
199
|
+
return /* @__PURE__ */ jsxDEV(ExecutionStatusUI, { visible: uiState.visible, message: uiState.message }, void 0, false, {
|
|
200
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx",
|
|
201
|
+
lineNumber: 193,
|
|
202
|
+
columnNumber: 10
|
|
203
|
+
}, this);
|
|
204
|
+
}
|
|
205
|
+
_s2(ExecutionStatusUIContainer, "HftpdxRipQgSZG00FebLnFqwyKI=");
|
|
206
|
+
_c2 = ExecutionStatusUIContainer;
|
|
207
|
+
var _c, _c2;
|
|
208
|
+
$RefreshReg$(_c, "ExecutionStatusUI");
|
|
209
|
+
$RefreshReg$(_c2, "ExecutionStatusUIContainer");
|
|
210
|
+
if (import.meta.hot && !inWebWorker) {
|
|
211
|
+
window.$RefreshReg$ = prevRefreshReg;
|
|
212
|
+
window.$RefreshSig$ = prevRefreshSig;
|
|
213
|
+
}
|
|
214
|
+
if (import.meta.hot && !inWebWorker) {
|
|
215
|
+
RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
|
|
216
|
+
RefreshRuntime.registerExportsForReactRefresh("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx", currentExports);
|
|
217
|
+
import.meta.hot.accept((nextExports) => {
|
|
218
|
+
if (!nextExports) return;
|
|
219
|
+
const invalidateMessage = RefreshRuntime.validateRefreshBoundaryAndEnqueueUpdate("/Users/kerry/Documents/GitHub/8g-extension/src/content/components/ExecutionStatusUI.tsx", currentExports, nextExports);
|
|
220
|
+
if (invalidateMessage) import.meta.hot.invalidate(invalidateMessage);
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isExecuteBlockMessage,
|
|
3
|
+
isShowExecutionStatusMessage,
|
|
4
|
+
isHideExecutionStatusMessage
|
|
5
|
+
} from "/src/types/internal-messages.ts.js";
|
|
2
6
|
export class InternalMessageHandler {
|
|
3
7
|
constructor(kernel) {
|
|
4
8
|
this.kernel = kernel;
|
|
@@ -12,6 +16,24 @@ export class InternalMessageHandler {
|
|
|
12
16
|
this.kernel.handleRuntimeMessage(message).then((result) => sendResponse(result)).catch((error) => sendResponse(this.kernel.createErrorResponse("", error)));
|
|
13
17
|
return true;
|
|
14
18
|
}
|
|
19
|
+
if (isShowExecutionStatusMessage(message)) {
|
|
20
|
+
console.log("[InternalMessageHandler] Show execution status:", message.data);
|
|
21
|
+
window.dispatchEvent(
|
|
22
|
+
new CustomEvent("8g-show-execution-status", {
|
|
23
|
+
detail: {
|
|
24
|
+
message: message.data.message || "워크플로우 실행 중"
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
sendResponse({ success: true });
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (isHideExecutionStatusMessage(message)) {
|
|
32
|
+
console.log("[InternalMessageHandler] Hide execution status");
|
|
33
|
+
window.dispatchEvent(new CustomEvent("8g-hide-execution-status"));
|
|
34
|
+
sendResponse({ success: true });
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
15
37
|
return false;
|
|
16
38
|
});
|
|
17
39
|
}
|
|
@@ -4,6 +4,7 @@ import { MessageKernel } from "/src/content/kernel/MessageKernel.ts.js";
|
|
|
4
4
|
import { InternalMessageHandler } from "/src/content/handler/InternalMessageHandler.ts.js";
|
|
5
5
|
import { ExternalMessageHandler } from "/src/content/handler/ExternalMessageHandler.ts.js";
|
|
6
6
|
import { ConfirmationUIContainer } from "/src/content/components/ConfirmationUI.tsx.js";
|
|
7
|
+
import { ExecutionStatusUIContainer } from "/src/content/components/ExecutionStatusUI.tsx.js";
|
|
7
8
|
(() => {
|
|
8
9
|
if (window.is8gExtensionInjected) return;
|
|
9
10
|
window.is8gExtensionInjected = true;
|
|
@@ -16,17 +17,27 @@ import { ConfirmationUIContainer } from "/src/content/components/ConfirmationUI.
|
|
|
16
17
|
const isTopFrame = window.self === window.top;
|
|
17
18
|
if (isTopFrame) {
|
|
18
19
|
const initUI = () => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
document.body.appendChild(
|
|
23
|
-
const
|
|
24
|
-
|
|
20
|
+
const confirmationRoot = document.createElement("div");
|
|
21
|
+
confirmationRoot.id = "8g-confirmation-ui-root";
|
|
22
|
+
confirmationRoot.style.cssText = "all: initial; position: fixed; z-index: 2147483647;";
|
|
23
|
+
document.body.appendChild(confirmationRoot);
|
|
24
|
+
const confirmationReactRoot = createRoot(confirmationRoot);
|
|
25
|
+
confirmationReactRoot.render(/* @__PURE__ */ jsxDEV(ConfirmationUIContainer, {}, void 0, false, {
|
|
25
26
|
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/main.tsx",
|
|
26
|
-
lineNumber:
|
|
27
|
-
columnNumber:
|
|
27
|
+
lineNumber: 40,
|
|
28
|
+
columnNumber: 36
|
|
28
29
|
}, this));
|
|
29
|
-
|
|
30
|
+
const executionStatusRoot = document.createElement("div");
|
|
31
|
+
executionStatusRoot.id = "8g-execution-status-ui-root";
|
|
32
|
+
executionStatusRoot.style.cssText = "all: initial; position: fixed; z-index: 2147483647;";
|
|
33
|
+
document.body.appendChild(executionStatusRoot);
|
|
34
|
+
const executionStatusReactRoot = createRoot(executionStatusRoot);
|
|
35
|
+
executionStatusReactRoot.render(/* @__PURE__ */ jsxDEV(ExecutionStatusUIContainer, {}, void 0, false, {
|
|
36
|
+
fileName: "/Users/kerry/Documents/GitHub/8g-extension/src/content/main.tsx",
|
|
37
|
+
lineNumber: 49,
|
|
38
|
+
columnNumber: 39
|
|
39
|
+
}, this));
|
|
40
|
+
console.log("[8G Extension] UI Components mounted (top frame only)");
|
|
30
41
|
};
|
|
31
42
|
if (document.body) {
|
|
32
43
|
initUI();
|
|
@@ -10,6 +10,15 @@ export function isCdpKeypressMessage(message) {
|
|
|
10
10
|
export function isFetchApiMessage(message) {
|
|
11
11
|
return message && message.type === "FETCH_API";
|
|
12
12
|
}
|
|
13
|
+
export function isCdpCaptureNetworkMessage(message) {
|
|
14
|
+
return message && message.type === "CDP_CAPTURE_NETWORK";
|
|
15
|
+
}
|
|
16
|
+
export function isShowExecutionStatusMessage(message) {
|
|
17
|
+
return message && message.type === "SHOW_EXECUTION_STATUS";
|
|
18
|
+
}
|
|
19
|
+
export function isHideExecutionStatusMessage(message) {
|
|
20
|
+
return message && message.type === "HIDE_EXECUTION_STATUS";
|
|
21
|
+
}
|
|
13
22
|
export function isErrorResponse(response) {
|
|
14
23
|
return response && response.$isError === true;
|
|
15
24
|
}
|
|
@@ -42,8 +42,30 @@ export interface FetchApiMessage {
|
|
|
42
42
|
returnHeaders: boolean;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
|
|
45
|
+
export interface CdpCaptureNetworkMessage {
|
|
46
|
+
type: 'CDP_CAPTURE_NETWORK';
|
|
47
|
+
data: {
|
|
48
|
+
targetUrl: string;
|
|
49
|
+
waitForLoadComplete: boolean;
|
|
50
|
+
timeout: number;
|
|
51
|
+
includeRequestHeaders: boolean;
|
|
52
|
+
includeResponseHeaders: boolean;
|
|
53
|
+
includeResponseBody: boolean;
|
|
54
|
+
urlFilter?: string;
|
|
55
|
+
resourceTypes?: string[];
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface ShowExecutionStatusMessage {
|
|
59
|
+
type: 'SHOW_EXECUTION_STATUS';
|
|
60
|
+
data: {
|
|
61
|
+
message?: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface HideExecutionStatusMessage {
|
|
65
|
+
type: 'HIDE_EXECUTION_STATUS';
|
|
66
|
+
}
|
|
67
|
+
export type BackgroundMessage = CollectWorkflowNewTabMessage | CdpClickMessage | CdpKeypressMessage | FetchApiMessage | CdpCaptureNetworkMessage;
|
|
68
|
+
export type ContentMessage = ExecuteBlockMessage | ShowExecutionStatusMessage | HideExecutionStatusMessage;
|
|
47
69
|
export interface ErrorResponse {
|
|
48
70
|
$isError: true;
|
|
49
71
|
message: string;
|
|
@@ -54,5 +76,8 @@ export declare function isExecuteBlockMessage(message: any): message is ExecuteB
|
|
|
54
76
|
export declare function isCdpClickMessage(message: any): message is CdpClickMessage;
|
|
55
77
|
export declare function isCdpKeypressMessage(message: any): message is CdpKeypressMessage;
|
|
56
78
|
export declare function isFetchApiMessage(message: any): message is FetchApiMessage;
|
|
79
|
+
export declare function isCdpCaptureNetworkMessage(message: any): message is CdpCaptureNetworkMessage;
|
|
80
|
+
export declare function isShowExecutionStatusMessage(message: any): message is ShowExecutionStatusMessage;
|
|
81
|
+
export declare function isHideExecutionStatusMessage(message: any): message is HideExecutionStatusMessage;
|
|
57
82
|
export declare function isErrorResponse(response: any): response is ErrorResponse;
|
|
58
83
|
//# sourceMappingURL=internal-messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-messages.d.ts","sourceRoot":"","sources":["../../src/types/internal-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,KAAK,CAAC;CACb;AAGD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,0BAA0B,CAAC;IACjC,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,QAAQ,CAAC;QACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAClC,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE;QACJ,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;QACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,M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AAsB,GAAG,WAAW,GAAG,aAAa,CAAC;AAGjE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,mBAAmB,CAElF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,eAAe,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,kBAAkB,CAEhF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,eAAe,CAE1E;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,wBAAwB,CAE5F;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,0BAA0B,CAEhG;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,0BAA0B,CAEhG;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,GAAG,GAAG,QAAQ,IAAI,aAAa,CAExE"}
|
|
@@ -795,7 +795,7 @@ const socketHost = `${"localhost" || importMetaUrl.hostname}:${hmrPort || import
|
|
|
795
795
|
const directSocketHost = "localhost:5173/";
|
|
796
796
|
const base = "/" || "/";
|
|
797
797
|
const hmrTimeout = 30000;
|
|
798
|
-
const wsToken = "
|
|
798
|
+
const wsToken = "7mwSCLXZB2tB";
|
|
799
799
|
const transport = normalizeModuleRunnerTransport(
|
|
800
800
|
(() => {
|
|
801
801
|
let wsTransport = createWebSocketModuleRunnerTransport({
|