@vforsh/argus 0.5.0 → 0.5.2
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/.tsbuildinfo +1 -1
- package/dist/argus.js +219 -42
- package/dist/cli/register/keydownCommand.d.ts.map +1 -1
- package/dist/cli/register/keydownCommand.js +2 -1
- package/dist/cli/register/keydownCommand.js.map +1 -1
- package/dist/cli/register/recordCommands.d.ts.map +1 -1
- package/dist/cli/register/recordCommands.js +6 -3
- package/dist/cli/register/recordCommands.js.map +1 -1
- package/dist/cli/register/snapshotCommands.js +1 -1
- package/dist/cli/register/snapshotCommands.js.map +1 -1
- package/dist/cli/register/traceCommands.d.ts.map +1 -1
- package/dist/cli/register/traceCommands.js +6 -3
- package/dist/cli/register/traceCommands.js.map +1 -1
- package/dist/commands/domKeydown.d.ts.map +1 -1
- package/dist/commands/domKeydown.js +7 -2
- package/dist/commands/domKeydown.js.map +1 -1
- package/dist/commands/page.js +2 -2
- package/dist/commands/page.js.map +1 -1
- package/dist/commands/record.d.ts.map +1 -1
- package/dist/commands/record.js +3 -2
- package/dist/commands/record.js.map +1 -1
- package/dist/commands/screenshot.d.ts.map +1 -1
- package/dist/commands/screenshot.js +2 -1
- package/dist/commands/screenshot.js.map +1 -1
- package/dist/commands/trace.d.ts.map +1 -1
- package/dist/commands/trace.js +3 -2
- package/dist/commands/trace.js.map +1 -1
- package/dist/eval/evalClient.d.ts +9 -1
- package/dist/eval/evalClient.d.ts.map +1 -1
- package/dist/eval/evalClient.js +31 -8
- package/dist/eval/evalClient.js.map +1 -1
- package/dist/skill/argus/SKILL.md +7 -0
- package/dist/skill/argus/reference/CAPTURE.md +6 -0
- package/dist/skill/argus/reference/EVAL.md +2 -0
- package/dist/skill/argus/reference/INSPECT.md +10 -0
- package/dist/utils/paths.d.ts +12 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +15 -0
- package/dist/utils/paths.js.map +1 -1
- package/package.json +1 -1
package/dist/argus.js
CHANGED
|
@@ -2130,7 +2130,7 @@ var {
|
|
|
2130
2130
|
// package.json
|
|
2131
2131
|
var package_default = {
|
|
2132
2132
|
name: "@vforsh/argus",
|
|
2133
|
-
version: "0.5.
|
|
2133
|
+
version: "0.5.2",
|
|
2134
2134
|
repository: {
|
|
2135
2135
|
type: "git",
|
|
2136
2136
|
url: "git+https://github.com/vforsh/argus.git",
|
|
@@ -3551,6 +3551,11 @@ var ARGUS_ERROR_CODES = [
|
|
|
3551
3551
|
"argus_executable_not_found",
|
|
3552
3552
|
"body_not_available",
|
|
3553
3553
|
"cdp_not_attached",
|
|
3554
|
+
"cdp_renderer_unresponsive",
|
|
3555
|
+
"cdp_target_replaced",
|
|
3556
|
+
"cdp_timeout",
|
|
3557
|
+
"chrome_unreachable",
|
|
3558
|
+
"dialog_blocking",
|
|
3554
3559
|
"dialog_not_prompt",
|
|
3555
3560
|
"extension_action_failed",
|
|
3556
3561
|
"extension_frame_not_ready",
|
|
@@ -3580,6 +3585,7 @@ var ARGUS_ERROR_CODES = [
|
|
|
3580
3585
|
"session_invalid_request",
|
|
3581
3586
|
"session_request_timeout",
|
|
3582
3587
|
"session_unknown_command",
|
|
3588
|
+
"target_not_focused",
|
|
3583
3589
|
"unexpected_matches",
|
|
3584
3590
|
"unsupported_platform"
|
|
3585
3591
|
];
|
|
@@ -4451,7 +4457,7 @@ var buildWatcherUrl = (watcher, path4, query2) => {
|
|
|
4451
4457
|
const qs = query2?.toString();
|
|
4452
4458
|
return `http://${watcher.host}:${watcher.port}${path4}${qs ? `?${qs}` : ""}`;
|
|
4453
4459
|
};
|
|
4454
|
-
var formatWatcherTransportError = (watcher, error) => `${watcher.id}: failed to reach watcher (${formatError(error)})`;
|
|
4460
|
+
var formatWatcherTransportError = (watcher, error) => classifyWatcherFailure(error) === "api-rejection" ? `${watcher.id}: watcher rejected the request (${formatError(error)})` : `${watcher.id}: failed to reach watcher (${formatError(error)})`;
|
|
4455
4461
|
var classifyWatcherFailure = (error) => {
|
|
4456
4462
|
if (isHttpResponseError(error)) {
|
|
4457
4463
|
return "api-rejection";
|
|
@@ -6104,6 +6110,10 @@ var resolvePath = (input) => {
|
|
|
6104
6110
|
const expanded = input.startsWith("~/") || input === "~" ? path4.join(homedir(), input.slice(1)) : input;
|
|
6105
6111
|
return path4.resolve(expanded);
|
|
6106
6112
|
};
|
|
6113
|
+
var resolveArtifactOutFile = (out) => {
|
|
6114
|
+
const trimmed = out?.trim();
|
|
6115
|
+
return trimmed ? resolvePath(trimmed) : undefined;
|
|
6116
|
+
};
|
|
6107
6117
|
|
|
6108
6118
|
// dist/commands/startShared.js
|
|
6109
6119
|
var resolveInjectScript = async (inject, output) => {
|
|
@@ -7105,6 +7115,63 @@ var getErrorCode = (error) => {
|
|
|
7105
7115
|
var hasErrorCode = (error, code2) => getErrorCode(error) === code2;
|
|
7106
7116
|
var createNotAttachedError = (message = "No tab attached via extension") => codedError("cdp_not_attached", message);
|
|
7107
7117
|
|
|
7118
|
+
// ../argus-watcher/dist/cdp/health.js
|
|
7119
|
+
var CDP_HEALTH_PROBE_TIMEOUT_MS = 2000;
|
|
7120
|
+
var diagnoseCdpHealth = async (probe) => {
|
|
7121
|
+
const id = probe.watcherId ?? "<id>";
|
|
7122
|
+
if (!probe.isAttached()) {
|
|
7123
|
+
return {
|
|
7124
|
+
code: "cdp_not_attached",
|
|
7125
|
+
message: `The watcher is not attached to a target. Check \`argus watcher status ${id}\` and \`argus doctor\`.`
|
|
7126
|
+
};
|
|
7127
|
+
}
|
|
7128
|
+
const transport = await probe.checkTransport?.() ?? { state: "ok" };
|
|
7129
|
+
if (transport.state === "unreachable") {
|
|
7130
|
+
return {
|
|
7131
|
+
code: "chrome_unreachable",
|
|
7132
|
+
message: `Chrome's CDP endpoint did not answer (${transport.detail}). Restart the browser, then \`argus doctor\`.`
|
|
7133
|
+
};
|
|
7134
|
+
}
|
|
7135
|
+
if (transport.state === "target_gone") {
|
|
7136
|
+
probe.onTargetGone?.();
|
|
7137
|
+
return {
|
|
7138
|
+
code: "cdp_target_replaced",
|
|
7139
|
+
message: `The attached page target is gone (${transport.detail}) — a navigation replaced it. ` + `Argus is reattaching; retry the command, or check \`argus watcher status ${id}\`.`
|
|
7140
|
+
};
|
|
7141
|
+
}
|
|
7142
|
+
const dialog2 = probe.getBlockingDialog?.();
|
|
7143
|
+
if (dialog2) {
|
|
7144
|
+
return {
|
|
7145
|
+
code: "dialog_blocking",
|
|
7146
|
+
message: `A ${dialog2.type} dialog is open and blocking the page. ` + `Dismiss it with \`argus dialog accept ${id}\` or \`argus dialog dismiss ${id}\`, then retry.`
|
|
7147
|
+
};
|
|
7148
|
+
}
|
|
7149
|
+
if (!await probe.probeRenderer()) {
|
|
7150
|
+
return {
|
|
7151
|
+
code: "cdp_renderer_unresponsive",
|
|
7152
|
+
message: `The page's renderer did not answer a trivial evaluation within ${CDP_HEALTH_PROBE_TIMEOUT_MS}ms — its main thread is ` + `blocked, or a cross-origin navigation stranded it. A longer timeout will not help: reload with \`argus reload ${id}\`, ` + "or restart Chrome."
|
|
7153
|
+
};
|
|
7154
|
+
}
|
|
7155
|
+
return {
|
|
7156
|
+
code: "cdp_timeout",
|
|
7157
|
+
message: "The watcher, target, and renderer all answered, so the expression itself exceeded its deadline. Pass a longer timeout."
|
|
7158
|
+
};
|
|
7159
|
+
};
|
|
7160
|
+
var toDiagnosedError = (diagnosis, original) => {
|
|
7161
|
+
const detail = original instanceof Error ? original.message : String(original);
|
|
7162
|
+
return codedError(diagnosis.code, `${detail}. ${diagnosis.message}`);
|
|
7163
|
+
};
|
|
7164
|
+
var isCdpTimeoutError = (error) => error instanceof Error && /\b(?:CDP|Bridge|Control) request timed out\b/i.test(error.message);
|
|
7165
|
+
var createSessionRendererProbe = (session2) => async () => {
|
|
7166
|
+
try {
|
|
7167
|
+
const params = { expression: "1", returnByValue: true, silent: true };
|
|
7168
|
+
await session2.sendAndWait("Runtime.evaluate", params, { timeoutMs: CDP_HEALTH_PROBE_TIMEOUT_MS });
|
|
7169
|
+
return true;
|
|
7170
|
+
} catch {
|
|
7171
|
+
return false;
|
|
7172
|
+
}
|
|
7173
|
+
};
|
|
7174
|
+
|
|
7108
7175
|
// ../argus-watcher/dist/http/httpUtils.js
|
|
7109
7176
|
var respondJson = (res, body, status2 = 200) => {
|
|
7110
7177
|
const payload = JSON.stringify(body);
|
|
@@ -7133,6 +7200,17 @@ var respondPayloadTooLarge = (res) => {
|
|
|
7133
7200
|
var respondError = (res, error) => {
|
|
7134
7201
|
respondApiError(res, 500, getErrorCode(error), formatError(error));
|
|
7135
7202
|
};
|
|
7203
|
+
var respondCdpError = async (res, error, diagnose) => {
|
|
7204
|
+
if (!diagnose || !isCdpTimeoutError(error)) {
|
|
7205
|
+
respondError(res, error);
|
|
7206
|
+
return;
|
|
7207
|
+
}
|
|
7208
|
+
try {
|
|
7209
|
+
respondError(res, toDiagnosedError(await diagnose(), error));
|
|
7210
|
+
} catch {
|
|
7211
|
+
respondError(res, error);
|
|
7212
|
+
}
|
|
7213
|
+
};
|
|
7136
7214
|
var readJsonBody = async (req, res) => {
|
|
7137
7215
|
const chunks = [];
|
|
7138
7216
|
let size = 0;
|
|
@@ -7274,7 +7352,7 @@ var normalizeTimeout = (value) => {
|
|
|
7274
7352
|
// ../argus-watcher/package.json
|
|
7275
7353
|
var package_default2 = {
|
|
7276
7354
|
name: "@vforsh/argus-watcher",
|
|
7277
|
-
version: "0.5.
|
|
7355
|
+
version: "0.5.2",
|
|
7278
7356
|
repository: {
|
|
7279
7357
|
type: "git",
|
|
7280
7358
|
url: "git+https://github.com/vforsh/argus.git",
|
|
@@ -7351,7 +7429,7 @@ var defineJsonRoute = (input) => ({
|
|
|
7351
7429
|
if (input.handleError?.(res, error)) {
|
|
7352
7430
|
return;
|
|
7353
7431
|
}
|
|
7354
|
-
|
|
7432
|
+
await respondCdpError(res, error, ctx.diagnoseCdp);
|
|
7355
7433
|
}
|
|
7356
7434
|
}
|
|
7357
7435
|
});
|
|
@@ -9470,6 +9548,7 @@ var shouldMaterializeByValue = (record2) => {
|
|
|
9470
9548
|
};
|
|
9471
9549
|
|
|
9472
9550
|
// ../argus-watcher/dist/http/routes/postEval.js
|
|
9551
|
+
var DEFAULT_EVAL_CDP_TIMEOUT_MS = 30000;
|
|
9473
9552
|
var route18 = defineJsonRoute({
|
|
9474
9553
|
method: "POST",
|
|
9475
9554
|
path: "/eval",
|
|
@@ -9482,7 +9561,7 @@ var route18 = defineJsonRoute({
|
|
|
9482
9561
|
replMode: normalizeBoolean(payload.replMode, true),
|
|
9483
9562
|
returnByValue: normalizeBoolean(payload.returnByValue, true),
|
|
9484
9563
|
jsonValue: normalizeBoolean(payload.jsonValue, false),
|
|
9485
|
-
timeoutMs: normalizeTimeout(payload.timeoutMs),
|
|
9564
|
+
timeoutMs: normalizeTimeout(payload.timeoutMs) ?? DEFAULT_EVAL_CDP_TIMEOUT_MS,
|
|
9486
9565
|
scenario: normalizeBoolean(payload.scenario, false),
|
|
9487
9566
|
scenarioServices: {
|
|
9488
9567
|
buffer: ctx.buffer,
|
|
@@ -10904,6 +10983,11 @@ var buildKeyMaps = () => {
|
|
|
10904
10983
|
byKey.set(lookup.toLowerCase(), def);
|
|
10905
10984
|
byCode.set(def.code.toLowerCase(), def);
|
|
10906
10985
|
};
|
|
10986
|
+
const putShiftAlias = (def) => {
|
|
10987
|
+
if (def.shiftKey) {
|
|
10988
|
+
byKey.set(def.shiftKey.toLowerCase(), def);
|
|
10989
|
+
}
|
|
10990
|
+
};
|
|
10907
10991
|
for (let i = 0;i < 26; i++) {
|
|
10908
10992
|
const lower = String.fromCharCode(97 + i);
|
|
10909
10993
|
const upper = String.fromCharCode(65 + i);
|
|
@@ -10911,11 +10995,32 @@ var buildKeyMaps = () => {
|
|
|
10911
10995
|
const keyCode = 65 + i;
|
|
10912
10996
|
put(lower, { key: lower, code: code2, keyCode, text: lower });
|
|
10913
10997
|
}
|
|
10998
|
+
const DIGIT_SHIFT_KEYS = ")!@#$%^&*(";
|
|
10914
10999
|
for (let i = 0;i < 10; i++) {
|
|
10915
11000
|
const digit = String(i);
|
|
10916
11001
|
const code2 = `Digit${digit}`;
|
|
10917
11002
|
const keyCode = 48 + i;
|
|
10918
|
-
|
|
11003
|
+
const def = { key: digit, code: code2, keyCode, text: digit, shiftKey: DIGIT_SHIFT_KEYS[i] };
|
|
11004
|
+
put(digit, def);
|
|
11005
|
+
putShiftAlias(def);
|
|
11006
|
+
}
|
|
11007
|
+
const PUNCTUATION = [
|
|
11008
|
+
["Backquote", "`", "~", 192],
|
|
11009
|
+
["Minus", "-", "_", 189],
|
|
11010
|
+
["Equal", "=", "+", 187],
|
|
11011
|
+
["BracketLeft", "[", "{", 219],
|
|
11012
|
+
["BracketRight", "]", "}", 221],
|
|
11013
|
+
["Backslash", "\\", "|", 220],
|
|
11014
|
+
["Semicolon", ";", ":", 186],
|
|
11015
|
+
["Quote", "'", '"', 222],
|
|
11016
|
+
["Comma", ",", "<", 188],
|
|
11017
|
+
["Period", ".", ">", 190],
|
|
11018
|
+
["Slash", "/", "?", 191]
|
|
11019
|
+
];
|
|
11020
|
+
for (const [code2, key, shiftKey, keyCode] of PUNCTUATION) {
|
|
11021
|
+
const def = { key, code: code2, keyCode, text: key, shiftKey };
|
|
11022
|
+
put(key, def);
|
|
11023
|
+
putShiftAlias(def);
|
|
10919
11024
|
}
|
|
10920
11025
|
put("Enter", { key: "Enter", code: "Enter", keyCode: 13, text: "\r" });
|
|
10921
11026
|
put("Tab", { key: "Tab", code: "Tab", keyCode: 9 });
|
|
@@ -10994,7 +11099,7 @@ var resolveKeyboardEvent = (options) => {
|
|
|
10994
11099
|
const text = resolveEventText(key, baseDef);
|
|
10995
11100
|
const event = {
|
|
10996
11101
|
key,
|
|
10997
|
-
code: codeInput ?? baseDef.code,
|
|
11102
|
+
code: codeDef?.code ?? codeInput ?? baseDef.code,
|
|
10998
11103
|
keyCode: baseDef.keyCode,
|
|
10999
11104
|
modifiers,
|
|
11000
11105
|
altKey: (modifiers & MODIFIER_BITS.alt) !== 0,
|
|
@@ -11016,6 +11121,9 @@ var resolveEventKey = (keyInput, def, modifiers) => {
|
|
|
11016
11121
|
if (isSingleLetter(semanticKey)) {
|
|
11017
11122
|
return isShift(modifiers) ? semanticKey.toUpperCase() : semanticKey.toLowerCase();
|
|
11018
11123
|
}
|
|
11124
|
+
if (isShift(modifiers) && def.shiftKey && semanticKey === def.key) {
|
|
11125
|
+
return def.shiftKey;
|
|
11126
|
+
}
|
|
11019
11127
|
return semanticKey;
|
|
11020
11128
|
};
|
|
11021
11129
|
var resolveEventText = (key, def) => {
|
|
@@ -11042,25 +11150,44 @@ var dispatchKeydown = async (session2, options) => {
|
|
|
11042
11150
|
await session2.sendAndWait("DOM.focus", { nodeId });
|
|
11043
11151
|
focused = true;
|
|
11044
11152
|
}
|
|
11045
|
-
const
|
|
11153
|
+
const carriesText = event.text != null;
|
|
11046
11154
|
const baseParams = {
|
|
11047
11155
|
code: event.code,
|
|
11048
11156
|
key: event.key,
|
|
11049
11157
|
windowsVirtualKeyCode: event.keyCode,
|
|
11050
|
-
nativeVirtualKeyCode: event.keyCode,
|
|
11051
11158
|
modifiers: event.modifiers
|
|
11052
11159
|
};
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
await session2.sendAndWait("Input.dispatchKeyEvent", { ...baseParams, type: "keyUp" });
|
|
11057
|
-
} else {
|
|
11058
|
-
await session2.sendAndWait("Input.dispatchKeyEvent", { ...baseParams, type: "rawKeyDown", text: event.text });
|
|
11059
|
-
await session2.sendAndWait("Input.dispatchKeyEvent", { ...baseParams, type: "keyUp" });
|
|
11060
|
-
}
|
|
11160
|
+
const keyDownParams = carriesText ? { ...baseParams, type: "keyDown", text: event.text, unmodifiedText: event.text } : { ...baseParams, type: "rawKeyDown" };
|
|
11161
|
+
await session2.sendAndWait("Input.dispatchKeyEvent", keyDownParams);
|
|
11162
|
+
await session2.sendAndWait("Input.dispatchKeyEvent", { ...baseParams, type: "keyUp" });
|
|
11061
11163
|
return { key: event.key, code: event.code, modifiers: event.modifiers, focused, event };
|
|
11062
11164
|
};
|
|
11063
11165
|
|
|
11166
|
+
// ../argus-watcher/dist/cdp/pageFocus.js
|
|
11167
|
+
var FOCUS_PROBE_TIMEOUT_MS = 3000;
|
|
11168
|
+
var ensurePageInputFocus = async (pageSession, visibility2) => {
|
|
11169
|
+
if (!pageSession.isAttached()) {
|
|
11170
|
+
return { activated: false };
|
|
11171
|
+
}
|
|
11172
|
+
if (await hasPageFocus(pageSession)) {
|
|
11173
|
+
return { activated: false };
|
|
11174
|
+
}
|
|
11175
|
+
try {
|
|
11176
|
+
await visibility2.setLock(pageSession, "shown");
|
|
11177
|
+
} catch (error) {
|
|
11178
|
+
throw notFocusedError(`activating it failed: ${formatError(error)}`);
|
|
11179
|
+
}
|
|
11180
|
+
if (!await hasPageFocus(pageSession)) {
|
|
11181
|
+
throw notFocusedError("activating it did not give it focus");
|
|
11182
|
+
}
|
|
11183
|
+
return { activated: true };
|
|
11184
|
+
};
|
|
11185
|
+
var hasPageFocus = async (pageSession) => {
|
|
11186
|
+
const focused = await tryEvaluateInPage(pageSession, "document.hasFocus()", { timeoutMs: FOCUS_PROBE_TIMEOUT_MS });
|
|
11187
|
+
return focused !== false;
|
|
11188
|
+
};
|
|
11189
|
+
var notFocusedError = (reason) => codedError("target_not_focused", `The page is not focused, so Chrome would drop the keyboard event — ${reason}. ` + "Run `argus page show <id>` and retry, or start the watcher against a visible page.");
|
|
11190
|
+
|
|
11064
11191
|
// ../argus-watcher/dist/http/routes/postDomKeydown.js
|
|
11065
11192
|
var route32 = defineJsonRoute({
|
|
11066
11193
|
method: "POST",
|
|
@@ -11068,6 +11195,7 @@ var route32 = defineJsonRoute({
|
|
|
11068
11195
|
bodySchema: domKeydownRequestSchema,
|
|
11069
11196
|
endpoint: "dom/keydown",
|
|
11070
11197
|
handle: async ({ ctx, body: payload }) => {
|
|
11198
|
+
const activation = await ensurePageInputFocus(ctx.pageCdpSession, ctx.visibilityController);
|
|
11071
11199
|
const result = await dispatchKeydown(ctx.cdpSession, {
|
|
11072
11200
|
key: payload.key,
|
|
11073
11201
|
code: payload.code,
|
|
@@ -11080,6 +11208,7 @@ var route32 = defineJsonRoute({
|
|
|
11080
11208
|
code: result.code,
|
|
11081
11209
|
modifiers: result.modifiers,
|
|
11082
11210
|
focused: result.focused,
|
|
11211
|
+
activated: activation.activated,
|
|
11083
11212
|
event: result.event
|
|
11084
11213
|
};
|
|
11085
11214
|
}
|
|
@@ -16182,7 +16311,7 @@ var formatArgs = (args) => {
|
|
|
16182
16311
|
|
|
16183
16312
|
// ../argus-watcher/dist/cdp/watcherTargets.js
|
|
16184
16313
|
var findTarget = async (chrome, match) => {
|
|
16185
|
-
const targets = await
|
|
16314
|
+
const targets = await fetchCdpTargets(chrome);
|
|
16186
16315
|
if (targets.length === 0) {
|
|
16187
16316
|
throw new Error("No CDP targets available");
|
|
16188
16317
|
}
|
|
@@ -16239,8 +16368,9 @@ var matchesTarget = (target, match, targetById, urlRegex2, titleRegex) => {
|
|
|
16239
16368
|
}
|
|
16240
16369
|
return true;
|
|
16241
16370
|
};
|
|
16242
|
-
var
|
|
16243
|
-
|
|
16371
|
+
var TARGET_LIST_TIMEOUT_MS = 5000;
|
|
16372
|
+
var fetchCdpTargets = async (chrome, timeoutMs = TARGET_LIST_TIMEOUT_MS) => {
|
|
16373
|
+
const response = await fetch(`http://${chrome.host}:${chrome.port}/json`, { signal: AbortSignal.timeout(timeoutMs) });
|
|
16244
16374
|
if (!response.ok) {
|
|
16245
16375
|
throw new Error(`Failed to fetch CDP targets (status ${response.status})`);
|
|
16246
16376
|
}
|
|
@@ -16284,6 +16414,12 @@ var startCdpWatcher = (options) => {
|
|
|
16284
16414
|
socket.close();
|
|
16285
16415
|
}
|
|
16286
16416
|
};
|
|
16417
|
+
const reconnect = () => {
|
|
16418
|
+
if (stopped) {
|
|
16419
|
+
return;
|
|
16420
|
+
}
|
|
16421
|
+
socket?.close();
|
|
16422
|
+
};
|
|
16287
16423
|
runLoop();
|
|
16288
16424
|
session2.onEvent("Runtime.consoleAPICalled", (params) => {
|
|
16289
16425
|
if (!currentTarget) {
|
|
@@ -16316,6 +16452,7 @@ var startCdpWatcher = (options) => {
|
|
|
16316
16452
|
});
|
|
16317
16453
|
return {
|
|
16318
16454
|
stop,
|
|
16455
|
+
reconnect,
|
|
16319
16456
|
session: session2,
|
|
16320
16457
|
getTarget: () => currentTarget ? { ...currentTarget } : null
|
|
16321
16458
|
};
|
|
@@ -16505,9 +16642,29 @@ var createCdpSource = (options) => {
|
|
|
16505
16642
|
pageUrl: target?.url ?? null
|
|
16506
16643
|
};
|
|
16507
16644
|
},
|
|
16645
|
+
healthChecks: {
|
|
16646
|
+
checkTransport: () => checkCdpTransport(chrome, watcher2),
|
|
16647
|
+
onTargetGone: watcher2.reconnect
|
|
16648
|
+
},
|
|
16508
16649
|
stop: watcher2.stop
|
|
16509
16650
|
};
|
|
16510
16651
|
};
|
|
16652
|
+
var checkCdpTransport = async (chrome, watcher2) => {
|
|
16653
|
+
let targets;
|
|
16654
|
+
try {
|
|
16655
|
+
targets = await fetchCdpTargets(chrome, CDP_HEALTH_PROBE_TIMEOUT_MS);
|
|
16656
|
+
} catch (error) {
|
|
16657
|
+
return { state: "unreachable", detail: `${chrome.host}:${chrome.port}: ${formatError(error)}` };
|
|
16658
|
+
}
|
|
16659
|
+
const target = watcher2.getTarget();
|
|
16660
|
+
if (!target) {
|
|
16661
|
+
return { state: "target_gone", detail: "the watcher holds no target" };
|
|
16662
|
+
}
|
|
16663
|
+
if (!targets.some((candidate) => candidate.id === target.id)) {
|
|
16664
|
+
return { state: "target_gone", detail: `Chrome no longer lists target ${target.id} (${target.url})` };
|
|
16665
|
+
}
|
|
16666
|
+
return { state: "ok" };
|
|
16667
|
+
};
|
|
16511
16668
|
|
|
16512
16669
|
// ../argus-watcher/dist/native-messaging/messaging.js
|
|
16513
16670
|
var createNativeMessaging = () => {
|
|
@@ -18202,6 +18359,13 @@ var createWatcherHandle = async (options, watcherId) => {
|
|
|
18202
18359
|
};
|
|
18203
18360
|
}
|
|
18204
18361
|
});
|
|
18362
|
+
const diagnoseCdp = () => diagnoseCdpHealth({
|
|
18363
|
+
watcherId,
|
|
18364
|
+
isAttached: () => sourceHandle.session.isAttached(),
|
|
18365
|
+
probeRenderer: createSessionRendererProbe(sourceHandle.session),
|
|
18366
|
+
getBlockingDialog: () => dialogTracker.getActive(),
|
|
18367
|
+
...sourceHandle.healthChecks
|
|
18368
|
+
});
|
|
18205
18369
|
const dialogSession = getPageSession();
|
|
18206
18370
|
dialogSession.onEvent("Page.javascriptDialogOpening", (params) => {
|
|
18207
18371
|
const dialog2 = parseDialogStatus(params);
|
|
@@ -18234,6 +18398,7 @@ var createWatcherHandle = async (options, watcherId) => {
|
|
|
18234
18398
|
throttleController,
|
|
18235
18399
|
visibilityController,
|
|
18236
18400
|
netMockController,
|
|
18401
|
+
diagnoseCdp,
|
|
18237
18402
|
getNetFilterContext: sourceHandle.getNetFilterContext,
|
|
18238
18403
|
readBrowserCookies: sourceHandle.readBrowserCookies,
|
|
18239
18404
|
sourceHandle: sourceMode === "extension" ? sourceHandle : undefined,
|
|
@@ -19944,7 +20109,7 @@ var resolveAttachedTarget = async (options, output) => {
|
|
|
19944
20109
|
try {
|
|
19945
20110
|
status2 = await fetchJson(statusUrl, { timeoutMs: 2000 });
|
|
19946
20111
|
} catch (error) {
|
|
19947
|
-
output.writeWarn(
|
|
20112
|
+
output.writeWarn(formatWatcherTransportError(resolved.watcher, error));
|
|
19948
20113
|
process.exitCode = 1;
|
|
19949
20114
|
return null;
|
|
19950
20115
|
}
|
|
@@ -20869,19 +21034,21 @@ import fs10 from "node:fs/promises";
|
|
|
20869
21034
|
import path14 from "node:path";
|
|
20870
21035
|
|
|
20871
21036
|
// dist/eval/evalClient.js
|
|
20872
|
-
var
|
|
21037
|
+
var DEFAULT_EVAL_TIMEOUT_MS = 1e4;
|
|
21038
|
+
var REQUEST_TIMEOUT_GRACE_MS = 8000;
|
|
20873
21039
|
var MIN_SUGGESTED_TIMEOUT_MS = 60000;
|
|
20874
21040
|
var evalOnce = async (input) => {
|
|
21041
|
+
const evalTimeoutMs = input.timeoutMs ?? DEFAULT_EVAL_TIMEOUT_MS;
|
|
20875
21042
|
const body = {
|
|
20876
21043
|
expression: input.expression,
|
|
20877
21044
|
args: input.args,
|
|
20878
21045
|
awaitPromise: input.awaitPromise,
|
|
20879
21046
|
replMode: input.replMode,
|
|
20880
21047
|
returnByValue: input.returnByValue,
|
|
20881
|
-
timeoutMs:
|
|
21048
|
+
timeoutMs: evalTimeoutMs,
|
|
20882
21049
|
scenario: input.scenario
|
|
20883
21050
|
};
|
|
20884
|
-
const requestTimeoutMs =
|
|
21051
|
+
const requestTimeoutMs = evalTimeoutMs + REQUEST_TIMEOUT_GRACE_MS;
|
|
20885
21052
|
let response;
|
|
20886
21053
|
try {
|
|
20887
21054
|
response = await fetchWatcherJson(input.watcher, {
|
|
@@ -20909,11 +21076,11 @@ var evalOnce = async (input) => {
|
|
|
20909
21076
|
};
|
|
20910
21077
|
var formatEvalTransportError = (watcher2, error, timeoutMs) => {
|
|
20911
21078
|
const baseMessage = formatWatcherTransportError(watcher2, error);
|
|
20912
|
-
if (!isTimeoutError(error)) {
|
|
21079
|
+
if (classifyWatcherFailure(error) === "api-rejection" || !isTimeoutError(error)) {
|
|
20913
21080
|
return baseMessage;
|
|
20914
21081
|
}
|
|
20915
|
-
const suggestedTimeoutMs = Math.max(MIN_SUGGESTED_TIMEOUT_MS, (timeoutMs ??
|
|
20916
|
-
return `${baseMessage}. ` + `
|
|
21082
|
+
const suggestedTimeoutMs = Math.max(MIN_SUGGESTED_TIMEOUT_MS, (timeoutMs ?? DEFAULT_EVAL_TIMEOUT_MS) * 2);
|
|
21083
|
+
return `${baseMessage}. ` + `The watcher did not answer at all, so it may be unresponsive rather than slow: check \`argus watcher status ${watcher2.id}\` ` + `and \`argus doctor\`. If the watcher is healthy, the expression needs more time; pass a longer timeout as milliseconds or a ` + `duration, for example: \`argus eval ${watcher2.id} --timeout ${formatSuggestedDuration(suggestedTimeoutMs)} ...\``;
|
|
20917
21084
|
};
|
|
20918
21085
|
var isTimeoutError = (error) => {
|
|
20919
21086
|
const message = formatError(error);
|
|
@@ -48284,9 +48451,12 @@ var runDomKeydown = defineWatcherCommand({
|
|
|
48284
48451
|
formatHuman: (response, { options, output }) => {
|
|
48285
48452
|
if (options.printEvent) {
|
|
48286
48453
|
output.writeHuman(`Dispatched keydown event: ${JSON.stringify(response.event)}`);
|
|
48287
|
-
|
|
48454
|
+
} else {
|
|
48455
|
+
output.writeHuman(`Dispatched keydown: ${response.key} (code=${response.code})`);
|
|
48456
|
+
}
|
|
48457
|
+
if (response.activated) {
|
|
48458
|
+
output.writeHuman("Page was hidden and has been activated (as `argus page show`); release it with `argus page hide`.");
|
|
48288
48459
|
}
|
|
48289
|
-
output.writeHuman(`Dispatched keydown: ${response.key} (code=${response.code})`);
|
|
48290
48460
|
}
|
|
48291
48461
|
});
|
|
48292
48462
|
|
|
@@ -48297,7 +48467,7 @@ var keydownCommand = {
|
|
|
48297
48467
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
48298
48468
|
options: [
|
|
48299
48469
|
{ flags: "--key <name>", description: "KeyboardEvent.key value (e.g. Enter, a, ArrowUp)" },
|
|
48300
|
-
{ flags: "--code <code>", description: "KeyboardEvent.code value (e.g. KeyG, Digit1)" },
|
|
48470
|
+
{ flags: "--code <code>", description: "KeyboardEvent.code value (e.g. KeyG, Digit1, Backquote)" },
|
|
48301
48471
|
{ flags: "--selector <css>", description: "Focus element before dispatching" },
|
|
48302
48472
|
{ flags: "--testid <id>", description: `Shorthand for --selector "[data-testid='<id>']"` },
|
|
48303
48473
|
{ flags: "--modifiers <list>", description: "Comma-separated modifiers: shift,ctrl,alt,meta" },
|
|
@@ -48313,6 +48483,7 @@ var keydownCommand = {
|
|
|
48313
48483
|
"argus keydown app --key Enter",
|
|
48314
48484
|
"argus keydown app --key G",
|
|
48315
48485
|
"argus keydown app --code KeyG",
|
|
48486
|
+
"argus keydown app --code Backquote --shift",
|
|
48316
48487
|
'argus keydown app --key a --selector "#input"',
|
|
48317
48488
|
"argus keydown app --key a --shift --ctrl"
|
|
48318
48489
|
],
|
|
@@ -48648,7 +48819,7 @@ var buildScreenshotPlan = (options, output) => {
|
|
|
48648
48819
|
path: "/screenshot",
|
|
48649
48820
|
method: "POST",
|
|
48650
48821
|
body: {
|
|
48651
|
-
outFile: options.out,
|
|
48822
|
+
outFile: resolveArtifactOutFile(options.out),
|
|
48652
48823
|
selector,
|
|
48653
48824
|
clip,
|
|
48654
48825
|
format: "png"
|
|
@@ -48770,7 +48941,7 @@ var snapshotCommands = [
|
|
|
48770
48941
|
description: "Capture a screenshot to disk on the watcher",
|
|
48771
48942
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
48772
48943
|
options: [
|
|
48773
|
-
{ flags: "--out <file>", description: "Output file path (absolute or relative to
|
|
48944
|
+
{ flags: "--out <file>", description: "Output file path (absolute, or relative to the current working directory)" },
|
|
48774
48945
|
{ flags: "--selector <selector>", description: "Optional CSS selector for element-only capture" },
|
|
48775
48946
|
{ flags: "--clip <x,y,width,height>", description: "Viewport-relative rectangle crop in CSS pixels" },
|
|
48776
48947
|
{ flags: "--testid <id>", description: `Shorthand for --selector "[data-testid='<id>']"` },
|
|
@@ -48885,7 +49056,7 @@ var buildRecordStopPlan = (options, output) => {
|
|
|
48885
49056
|
method: "POST",
|
|
48886
49057
|
body: {
|
|
48887
49058
|
recordId: normalizeString2(options.recordId),
|
|
48888
|
-
outFile: options.out
|
|
49059
|
+
outFile: resolveArtifactOutFile(options.out)
|
|
48889
49060
|
},
|
|
48890
49061
|
timeoutMs: RECORD_STOP_TIMEOUT_MS
|
|
48891
49062
|
};
|
|
@@ -48909,7 +49080,7 @@ var buildRecordBody = (options, output) => {
|
|
|
48909
49080
|
return null;
|
|
48910
49081
|
}
|
|
48911
49082
|
return {
|
|
48912
|
-
outFile: options.out,
|
|
49083
|
+
outFile: resolveArtifactOutFile(options.out),
|
|
48913
49084
|
selector,
|
|
48914
49085
|
clip,
|
|
48915
49086
|
fps,
|
|
@@ -49034,7 +49205,7 @@ var recordCommands = [
|
|
|
49034
49205
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49035
49206
|
options: [
|
|
49036
49207
|
{ flags: "--duration <duration>", description: "Capture for duration (e.g. 3s, 500ms)" },
|
|
49037
|
-
{ flags: "--out <file>", description: "Output .mp4 or .webm path (absolute or relative to
|
|
49208
|
+
{ flags: "--out <file>", description: "Output .mp4 or .webm path (absolute, or relative to the current working directory)" },
|
|
49038
49209
|
{ flags: "--selector <selector>", description: "Optional CSS selector for element-only recording" },
|
|
49039
49210
|
{ flags: "--clip <x,y,width,height>", description: "Viewport-relative rectangle crop in CSS pixels" },
|
|
49040
49211
|
{ flags: "--testid <id>", description: `Shorthand for --selector "[data-testid='<id>']"` },
|
|
@@ -49059,7 +49230,7 @@ var recordCommands = [
|
|
|
49059
49230
|
description: "Start a silent video recording",
|
|
49060
49231
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49061
49232
|
options: [
|
|
49062
|
-
{ flags: "--out <file>", description: "Output .mp4 or .webm path (absolute or relative to
|
|
49233
|
+
{ flags: "--out <file>", description: "Output .mp4 or .webm path (absolute, or relative to the current working directory)" },
|
|
49063
49234
|
{ flags: "--selector <selector>", description: "Optional CSS selector for element-only recording" },
|
|
49064
49235
|
{ flags: "--clip <x,y,width,height>", description: "Viewport-relative rectangle crop in CSS pixels" },
|
|
49065
49236
|
{ flags: "--testid <id>", description: `Shorthand for --selector "[data-testid='<id>']"` },
|
|
@@ -49080,7 +49251,10 @@ var recordCommands = [
|
|
|
49080
49251
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49081
49252
|
options: [
|
|
49082
49253
|
{ flags: "--record-id <id>", description: "Record id returned from start" },
|
|
49083
|
-
{
|
|
49254
|
+
{
|
|
49255
|
+
flags: "--out <file>",
|
|
49256
|
+
description: "Move the saved recording to this .mp4 or .webm path (absolute, or relative to the current working directory)"
|
|
49257
|
+
},
|
|
49084
49258
|
jsonOption
|
|
49085
49259
|
],
|
|
49086
49260
|
examples: ["argus record stop app", "argus record stop app --out demo.mp4 --json"],
|
|
@@ -49163,7 +49337,7 @@ var runTraceStartInternal = async (watcher2, options, output) => {
|
|
|
49163
49337
|
path: "/trace/start",
|
|
49164
49338
|
method: "POST",
|
|
49165
49339
|
body: {
|
|
49166
|
-
outFile: options.out,
|
|
49340
|
+
outFile: resolveArtifactOutFile(options.out),
|
|
49167
49341
|
categories: options.categories,
|
|
49168
49342
|
options: options.options
|
|
49169
49343
|
},
|
|
@@ -49181,7 +49355,7 @@ var runTraceStopInternal = async (watcher2, options, output) => {
|
|
|
49181
49355
|
const response = await fetchWatcherJson(watcher2, {
|
|
49182
49356
|
path: "/trace/stop",
|
|
49183
49357
|
method: "POST",
|
|
49184
|
-
body: { traceId: options.traceId, outFile: options.outFile },
|
|
49358
|
+
body: { traceId: options.traceId, outFile: resolveArtifactOutFile(options.outFile) },
|
|
49185
49359
|
timeoutMs: 20000
|
|
49186
49360
|
});
|
|
49187
49361
|
return response;
|
|
@@ -49201,7 +49375,7 @@ var traceCommands = [
|
|
|
49201
49375
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49202
49376
|
options: [
|
|
49203
49377
|
{ flags: "--duration <duration>", description: "Capture for duration (e.g. 3s, 500ms)" },
|
|
49204
|
-
{ flags: "--out <file>", description: "Output trace file path (relative to
|
|
49378
|
+
{ flags: "--out <file>", description: "Output trace file path (absolute, or relative to the current working directory)" },
|
|
49205
49379
|
{ flags: "--categories <categories>", description: "Comma-separated tracing categories" },
|
|
49206
49380
|
{ flags: "--options <options>", description: "Tracing options string" },
|
|
49207
49381
|
jsonOption
|
|
@@ -49216,7 +49390,7 @@ var traceCommands = [
|
|
|
49216
49390
|
description: "Start Chrome tracing",
|
|
49217
49391
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49218
49392
|
options: [
|
|
49219
|
-
{ flags: "--out <file>", description: "Output trace file path (relative to
|
|
49393
|
+
{ flags: "--out <file>", description: "Output trace file path (absolute, or relative to the current working directory)" },
|
|
49220
49394
|
{ flags: "--categories <categories>", description: "Comma-separated tracing categories" },
|
|
49221
49395
|
{ flags: "--options <options>", description: "Tracing options string" },
|
|
49222
49396
|
jsonOption
|
|
@@ -49232,7 +49406,10 @@ var traceCommands = [
|
|
|
49232
49406
|
arguments: [{ flags: "[id]", description: "Watcher id to query" }],
|
|
49233
49407
|
options: [
|
|
49234
49408
|
{ flags: "--trace-id <id>", description: "Trace id returned from start" },
|
|
49235
|
-
{
|
|
49409
|
+
{
|
|
49410
|
+
flags: "--out <file>",
|
|
49411
|
+
description: "Move the saved trace file to this path (absolute, or relative to the current working directory)"
|
|
49412
|
+
},
|
|
49236
49413
|
jsonOption
|
|
49237
49414
|
],
|
|
49238
49415
|
examples: ["argus trace stop app", "argus trace stop app --out trace.json --json"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keydownCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/register/keydownCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"keydownCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/register/keydownCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,eAAO,MAAM,cAAc,EAAE,sBA8B5B,CAAA"}
|
|
@@ -7,7 +7,7 @@ export const keydownCommand = {
|
|
|
7
7
|
arguments: [{ flags: '[id]', description: 'Watcher id to query' }],
|
|
8
8
|
options: [
|
|
9
9
|
{ flags: '--key <name>', description: 'KeyboardEvent.key value (e.g. Enter, a, ArrowUp)' },
|
|
10
|
-
{ flags: '--code <code>', description: 'KeyboardEvent.code value (e.g. KeyG, Digit1)' },
|
|
10
|
+
{ flags: '--code <code>', description: 'KeyboardEvent.code value (e.g. KeyG, Digit1, Backquote)' },
|
|
11
11
|
{ flags: '--selector <css>', description: 'Focus element before dispatching' },
|
|
12
12
|
{ flags: '--testid <id>', description: 'Shorthand for --selector "[data-testid=\'<id>\']"' },
|
|
13
13
|
{ flags: '--modifiers <list>', description: 'Comma-separated modifiers: shift,ctrl,alt,meta' },
|
|
@@ -23,6 +23,7 @@ export const keydownCommand = {
|
|
|
23
23
|
'argus keydown app --key Enter',
|
|
24
24
|
'argus keydown app --key G',
|
|
25
25
|
'argus keydown app --code KeyG',
|
|
26
|
+
'argus keydown app --code Backquote --shift',
|
|
26
27
|
'argus keydown app --key a --selector "#input"',
|
|
27
28
|
'argus keydown app --key a --shift --ctrl',
|
|
28
29
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keydownCommand.js","sourceRoot":"","sources":["../../../src/cli/register/keydownCommand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,CAAC,MAAM,cAAc,GAA2B;IACrD,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,iDAAiD;IAC9D,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IAClE,OAAO,EAAE;QACR,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,kDAAkD,EAAE;QAC1F,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"keydownCommand.js","sourceRoot":"","sources":["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AE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;QAC7B,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAAE,OAAM;QACnC,MAAM,aAAa,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IACjC,CAAC;CACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordCommands.d.ts","sourceRoot":"","sources":["../../../src/cli/register/recordCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,eAAO,MAAM,cAAc,EAAE,SAAS,sBAAsB,
|
|
1
|
+
{"version":3,"file":"recordCommands.d.ts","sourceRoot":"","sources":["../../../src/cli/register/recordCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAKjE,eAAO,MAAM,cAAc,EAAE,SAAS,sBAAsB,EAgE3D,CAAA"}
|
|
@@ -8,7 +8,7 @@ export const recordCommands = [
|
|
|
8
8
|
arguments: [{ flags: '[id]', description: 'Watcher id to query' }],
|
|
9
9
|
options: [
|
|
10
10
|
{ flags: '--duration <duration>', description: 'Capture for duration (e.g. 3s, 500ms)' },
|
|
11
|
-
{ flags: '--out <file>', description: 'Output .mp4 or .webm path (absolute or relative to
|
|
11
|
+
{ flags: '--out <file>', description: 'Output .mp4 or .webm path (absolute, or relative to the current working directory)' },
|
|
12
12
|
{ flags: '--selector <selector>', description: 'Optional CSS selector for element-only recording' },
|
|
13
13
|
{ flags: '--clip <x,y,width,height>', description: 'Viewport-relative rectangle crop in CSS pixels' },
|
|
14
14
|
{ flags: '--testid <id>', description: 'Shorthand for --selector "[data-testid=\'<id>\']"' },
|
|
@@ -33,7 +33,7 @@ export const recordCommands = [
|
|
|
33
33
|
description: 'Start a silent video recording',
|
|
34
34
|
arguments: [{ flags: '[id]', description: 'Watcher id to query' }],
|
|
35
35
|
options: [
|
|
36
|
-
{ flags: '--out <file>', description: 'Output .mp4 or .webm path (absolute or relative to
|
|
36
|
+
{ flags: '--out <file>', description: 'Output .mp4 or .webm path (absolute, or relative to the current working directory)' },
|
|
37
37
|
{ flags: '--selector <selector>', description: 'Optional CSS selector for element-only recording' },
|
|
38
38
|
{ flags: '--clip <x,y,width,height>', description: 'Viewport-relative rectangle crop in CSS pixels' },
|
|
39
39
|
{ flags: '--testid <id>', description: 'Shorthand for --selector "[data-testid=\'<id>\']"' },
|
|
@@ -54,7 +54,10 @@ export const recordCommands = [
|
|
|
54
54
|
arguments: [{ flags: '[id]', description: 'Watcher id to query' }],
|
|
55
55
|
options: [
|
|
56
56
|
{ flags: '--record-id <id>', description: 'Record id returned from start' },
|
|
57
|
-
{
|
|
57
|
+
{
|
|
58
|
+
flags: '--out <file>',
|
|
59
|
+
description: 'Move the saved recording to this .mp4 or .webm path (absolute, or relative to the current working directory)',
|
|
60
|
+
},
|
|
58
61
|
jsonOption,
|
|
59
62
|
],
|
|
60
63
|
examples: ['argus record stop app', 'argus record stop app --out demo.mp4 --json'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordCommands.js","sourceRoot":"","sources":["../../../src/cli/register/recordCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,CAAC,MAAM,cAAc,GAAsC;IAChE;QACC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,yDAAyD;QACtE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;QAClE,OAAO,EAAE;YACR,EAAE,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,uCAAuC,EAAE;YACxF,EAAE,KAAK,EAAE,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