MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / runText

Function runText

scripts/integration/js-api.mjs:744–758  ·  view source on GitHub ↗
(command, args, options = {})

Source from the content-addressed store, hash-verified

742}
743
744function runText(command, args, options = {}) {
745 const result = spawnSync(command, args, {
746 cwd: root,
747 encoding: "utf8",
748 input: options.input,
749 maxBuffer: options.maxBuffer ?? 32 * 1024 * 1024,
750 timeout: options.timeoutMs ?? 120_000,
751 });
752 if (result.status !== 0) {
753 throw new Error(
754 `${command} ${args.join(" ")} failed with ${result.status ?? result.signal}\n${result.stderr ?? ""}\n${result.error?.message ?? ""}`,
755 );
756 }
757 return result.stdout;
758}
759
760function openSimulatorApp(udid) {
761 spawnSync("open", ["-a", "Simulator", "--args", "-CurrentDeviceUDID", udid], {

Callers 5

mainFunction · 0.70
eraseSimulatorReliablyFunction · 0.70
runJsonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected