Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@guidepup/guidepup

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guidepup/guidepup - npm Package Compare versions

Comparing version 0.19.1 to 0.20.0

lib/macOS/VoiceOver/terminateVoiceOverProcess.d.ts

2

lib/macOS/record.js

@@ -7,2 +7,4 @@ "use strict";

const child_process_1 = require("child_process");
// TODO: add better handling for when permissions for screen recording haven't
// been provided so that the system permissions popup is avoided.
/**

@@ -9,0 +11,0 @@ * Start a screen recording.

@@ -38,2 +38,8 @@ declare const VOICEOVER_SETTINGS: {

};
hintDelay: {
domain: string;
key: string;
defaultValue: string;
type: string;
};
loginGreeting: {

@@ -47,3 +53,3 @@ domain: string;

export type VoiceOverSettings = {
[Property in keyof typeof VOICEOVER_SETTINGS]: typeof VOICEOVER_SETTINGS[Property]["defaultValue"];
[Property in keyof typeof VOICEOVER_SETTINGS]: (typeof VOICEOVER_SETTINGS)[Property]["defaultValue"];
};

@@ -50,0 +56,0 @@ export declare const DEFAULT_GUIDEPUP_VOICEOVER_SETTINGS: VoiceOverSettings;

@@ -45,2 +45,8 @@ "use strict";

},
hintDelay: {
domain: VOICEOVER_DEFAULTS_DOMAIN,
key: "SCRContextualHelpDelayInSeconds",
defaultValue: "0.4",
type: "int",
},
loginGreeting: {

@@ -60,2 +66,6 @@ domain: VOICEOVER_DEFAULTS_DOMAIN,

rateAsPercent: 100,
// See also `src/macOS/VoiceOver/constants.ts` for poll times and retries
// Need the delay to be longer than a poll so we don't miss text, but shorter
// than the max poll * retries so that hints aren't missed
hintDelay: "0.4",
loginGreeting: "",

@@ -71,3 +81,3 @@ };

}
const [doNotShowSplashScreen, voiceOverCursorEnabled, disableSpeech, disableSound, displayTextEnabled, rateAsPercent, loginGreeting,] = await Promise.all(Object.values(VOICEOVER_SETTINGS).map(({ domain, key, defaultValue }) => new Promise((resolve) => {
const [doNotShowSplashScreen, voiceOverCursorEnabled, disableSpeech, disableSound, displayTextEnabled, rateAsPercent, hintDelay, loginGreeting,] = await Promise.all(Object.values(VOICEOVER_SETTINGS).map(({ domain, key, defaultValue }) => new Promise((resolve) => {
(0, child_process_1.exec)(`defaultValues read ${domain} ${key}`, (e, stdout) => {

@@ -89,2 +99,3 @@ if (e) {

rateAsPercent: parseInt(rateAsPercent),
hintDelay,
loginGreeting,

@@ -91,0 +102,0 @@ };

2

lib/macOS/VoiceOver/keyCodeCommands.js

@@ -808,3 +808,3 @@ "use strict";

modifiers: VO,
description: "Open the Window Chooser ",
description: "Open the Window Chooser",
representation: "VO-F2-F2",

@@ -811,0 +811,0 @@ },

@@ -18,3 +18,3 @@ import { CommandOptions } from "../../CommandOptions";

/**
* Get the item text logs.
* Get the item text log.
*

@@ -25,3 +25,7 @@ * @returns {Promise<string[]>} The item text log.

/**
* Get the last spoken phrase logs.
* Clear the item text log.
*/
clearItemTextLog(): Promise<void>;
/**
* Get the spoken phrase log.
*

@@ -32,2 +36,6 @@ * @returns {Promise<string[]>} The spoken phrase log.

/**
* Clear the spoken phrase log.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Waits for the provided promise to resolve and then captures the logs for

@@ -34,0 +42,0 @@ * the performed action until they stabilize.

@@ -39,3 +39,3 @@ "use strict";

/**
* Get the item text logs.
* Get the item text log.
*

@@ -51,3 +51,12 @@ * @returns {Promise<string[]>} The item text log.

/**
* Get the last spoken phrase logs.
* Clear the item text log.
*/
async clearItemTextLog() {
if (this.#activePromise) {
await this.#activePromise;
}
this.#itemTextLogStore = [];
}
/**
* Get the spoken phrase log.
*

@@ -63,2 +72,11 @@ * @returns {Promise<string[]>} The spoken phrase log.

/**
* Clear the spoken phrase log.
*/
async clearSpokenPhraseLog() {
if (this.#activePromise) {
await this.#activePromise;
}
this.#spokenPhraseLogStore = [];
}
/**
* Waits for the provided promise to resolve and then captures the logs for

@@ -117,5 +135,4 @@ * the performed action until they stabilize.

stableCount = 0;
pollTimeout =
(approxWords / constants_1.APPROX_WORDS_PER_SECOND) * 1000 -
constants_1.SPOKEN_PHRASES_POLL_INTERVAL;
pollTimeout = Math.max((approxWords / constants_1.APPROX_WORDS_PER_SECOND) * 1000 -
constants_1.SPOKEN_PHRASES_POLL_INTERVAL, 0);
phrases.push(phrase);

@@ -122,0 +139,0 @@ }

@@ -187,2 +187,6 @@ import { ClickOptions } from "../../ClickOptions";

/**
* Clear the log of all spoken phrases for this VoiceOver instance.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Get the log of all visited item text for this VoiceOver instance.

@@ -195,2 +199,8 @@ *

itemTextLog(): Promise<string[]>;
/**
* Clear the log of all visited item text for this VoiceOver instance.
*
* For VoiceOver this is distinct from `spokenPhraseLog`.
*/
clearItemTextLog(): Promise<void>;
}

@@ -6,3 +6,2 @@ "use strict";

const errors_1 = require("../errors");
const forceQuit_1 = require("./forceQuit");
const isKeyboard_1 = require("../../isKeyboard");

@@ -13,2 +12,3 @@ const isMacOS_1 = require("../isMacOS");

const supportsAppleScriptControl_1 = require("./supportsAppleScriptControl");
const terminateVoiceOverProcess_1 = require("./terminateVoiceOverProcess");
const VoiceOverCaption_1 = require("./VoiceOverCaption");

@@ -51,2 +51,5 @@ const VoiceOverCommander_1 = require("./VoiceOverCommander");

get keyboardCommands() {
if (!this.#started) {
throw new Error(errors_1.ERR_VOICE_OVER_NOT_RUNNING);
}
return this.#keyboard.commands;

@@ -60,2 +63,5 @@ }

get commanderCommands() {
if (!this.#started) {
throw new Error(errors_1.ERR_VOICE_OVER_NOT_RUNNING);
}
return this.#commander.commands;

@@ -112,3 +118,3 @@ }

}
await (0, forceQuit_1.forceQuit)();
await (0, terminateVoiceOverProcess_1.terminateVoiceOverProcess)();
await (0, waitForNotRunning_1.waitForNotRunning)(options);

@@ -345,2 +351,11 @@ this.#caption = null;

/**
* Clear the log of all spoken phrases for this VoiceOver instance.
*/
async clearSpokenPhraseLog() {
if (!this.#started) {
throw new Error(errors_1.ERR_VOICE_OVER_NOT_RUNNING);
}
await this.#caption.clearSpokenPhraseLog();
}
/**
* Get the log of all visited item text for this VoiceOver instance.

@@ -358,3 +373,14 @@ *

}
/**
* Clear the log of all visited item text for this VoiceOver instance.
*
* For VoiceOver this is distinct from `spokenPhraseLog`.
*/
async clearItemTextLog() {
if (!this.#started) {
throw new Error(errors_1.ERR_VOICE_OVER_NOT_RUNNING);
}
await this.#caption.clearItemTextLog();
}
}
exports.VoiceOver = VoiceOver;

@@ -43,2 +43,6 @@ import type { CommandOptions } from "../../CommandOptions";

/**
* Clear the log of all spoken phrases for this VoiceOver instance.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Get the log of all visited item text for this VoiceOver instance.

@@ -49,2 +53,6 @@ *

itemTextLog(): Promise<string[]>;
/**
* Clear the log of all visited item text for this VoiceOver instance.
*/
clearItemTextLog(): Promise<void>;
}

@@ -61,2 +61,8 @@ "use strict";

/**
* Clear the log of all spoken phrases for this VoiceOver instance.
*/
async clearSpokenPhraseLog() {
await this.#logStore.clearSpokenPhraseLog();
}
/**
* Get the log of all visited item text for this VoiceOver instance.

@@ -69,3 +75,9 @@ *

}
/**
* Clear the log of all visited item text for this VoiceOver instance.
*/
async clearItemTextLog() {
await this.#logStore.clearItemTextLog();
}
}
exports.VoiceOverCaption = VoiceOverCaption;

@@ -133,2 +133,6 @@ import { ClickOptions } from "./ClickOptions";

/**
* Clear the log of all spoken phrases for this screen reader instance.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Get the log of all visited item text for this screen reader instance.

@@ -139,2 +143,6 @@ *

itemTextLog(): Promise<string[]>;
/**
* Clear the log of all visited item text for this screen reader instance.
*/
clearItemTextLog(): Promise<void>;
}

@@ -140,2 +140,6 @@ import type { ClickOptions } from "../../ClickOptions";

/**
* Clear the log of all spoken phrases for this NVDA instance.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Get the log of all spoken phrases for this NVDA instance.

@@ -150,2 +154,8 @@ *

itemTextLog(): Promise<string[]>;
/**
* Clear the log of all spoken phrases for this NVDA instance.
*
* For NVDA this is the same as `clearSpokenPhraseLog`.
*/
clearItemTextLog(): Promise<void>;
}

@@ -238,2 +238,11 @@ "use strict";

/**
* Clear the log of all spoken phrases for this NVDA instance.
*/
async clearSpokenPhraseLog() {
if (!this.#started) {
throw new Error(errors_1.ERR_NVDA_NOT_RUNNING);
}
await this.#client.clearSpokenPhraseLog();
}
/**
* Get the log of all spoken phrases for this NVDA instance.

@@ -253,3 +262,14 @@ *

}
/**
* Clear the log of all spoken phrases for this NVDA instance.
*
* For NVDA this is the same as `clearSpokenPhraseLog`.
*/
async clearItemTextLog() {
if (!this.#started) {
throw new Error(errors_1.ERR_NVDA_NOT_RUNNING);
}
await this.#client.clearSpokenPhraseLog();
}
}
exports.NVDA = NVDA;

@@ -14,2 +14,6 @@ /// <reference types="node" />

/**
* Clear the log of all spoken phrases for this NVDA connection.
*/
clearSpokenPhraseLog(): Promise<void>;
/**
* Connect to a NVDA instance.

@@ -16,0 +20,0 @@ */

@@ -56,2 +56,11 @@ "use strict";

/**
* Clear the log of all spoken phrases for this NVDA connection.
*/
async clearSpokenPhraseLog() {
if (this.#activePromise) {
await this.#activePromise;
}
this.#spokenPhrases = [];
}
/**
* Connect to a NVDA instance.

@@ -58,0 +67,0 @@ */

{
"name": "@guidepup/guidepup",
"version": "0.19.1",
"version": "0.20.0",
"description": "Screen reader driver for test automation.",

@@ -38,15 +38,15 @@ "main": "lib/index.js",

"devDependencies": {
"@types/jest": "^29.5.8",
"@types/node": "^20.9.2",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.4",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"jest": "^29.4.0",
"nock": "^13.3.8",
"nock": "^13.4.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typedoc": "^0.25.3",
"typescript": "^5.2.2"
"ts-node": "^10.9.2",
"typedoc": "^0.25.4",
"typescript": "^5.3.3"
},

@@ -53,0 +53,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc