@vosjs/cli 0.9.1 → 0.9.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/{chunk-74MSNLT2.js → chunk-NKUOT5JE.js} +10 -3
- package/dist/chunk-NKUOT5JE.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +1 -1
- package/dist/{run-I2XSZAWI.js → run-OBJBU7X6.js} +2 -2
- package/package.json +5 -5
- package/schema/actions.schema.json +5 -0
- package/dist/chunk-74MSNLT2.js.map +0 -1
- /package/dist/{run-I2XSZAWI.js.map → run-OBJBU7X6.js.map} +0 -0
|
@@ -154,6 +154,8 @@ function validateActions(value) {
|
|
|
154
154
|
errors.push(`${at}: wait needs ms`);
|
|
155
155
|
if (s.do === "type" && typeof s.text !== "string")
|
|
156
156
|
errors.push(`${at}: type needs text`);
|
|
157
|
+
if (s.do === "type" && s.focus !== void 0 && typeof s.focus !== "boolean")
|
|
158
|
+
errors.push(`${at}: type focus must be true or false`);
|
|
157
159
|
if (s.do === "scroll" && typeof s.dy !== "number")
|
|
158
160
|
errors.push(`${at}: scroll needs dy`);
|
|
159
161
|
if (s.do === "move" && (typeof s.x !== "number" || typeof s.y !== "number")) {
|
|
@@ -3426,7 +3428,7 @@ async function recordTake(browser, url, actions, paths, log, opts = {}) {
|
|
|
3426
3428
|
case "type": {
|
|
3427
3429
|
const rect = await boxOf(step.selector);
|
|
3428
3430
|
if (rect) {
|
|
3429
|
-
await clickAt(rect);
|
|
3431
|
+
if (step.focus !== false) await clickAt(rect);
|
|
3430
3432
|
const delay = step.delayMs ?? 40;
|
|
3431
3433
|
const ping = () => emit({
|
|
3432
3434
|
x: Math.round(rect.x + rect.w / 2),
|
|
@@ -6150,7 +6152,12 @@ function convertAgentBrowser(records, opts = {}) {
|
|
|
6150
6152
|
case "key": {
|
|
6151
6153
|
const key = args.at(0);
|
|
6152
6154
|
if (key === "Enter" && lastTarget) {
|
|
6153
|
-
emit(n, {
|
|
6155
|
+
emit(n, {
|
|
6156
|
+
do: "type",
|
|
6157
|
+
selector: lastTarget,
|
|
6158
|
+
text: "\n",
|
|
6159
|
+
focus: false
|
|
6160
|
+
});
|
|
6154
6161
|
notes.push(
|
|
6155
6162
|
`line ${n}: press Enter became a newline typed into the last field`
|
|
6156
6163
|
);
|
|
@@ -7434,4 +7441,4 @@ export {
|
|
|
7434
7441
|
convertAgentBrowser,
|
|
7435
7442
|
run
|
|
7436
7443
|
};
|
|
7437
|
-
//# sourceMappingURL=chunk-
|
|
7444
|
+
//# sourceMappingURL=chunk-NKUOT5JE.js.map
|