Criada a API do site

This commit is contained in:
Caio1w
2025-10-29 19:56:41 -03:00
parent f201c8edbd
commit 4a14f533d2
3074 changed files with 780728 additions and 41 deletions

37
node_modules/run-applescript/index.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import process from 'node:process';
import {promisify} from 'node:util';
import {execFile, execFileSync} from 'node:child_process';
const execFileAsync = promisify(execFile);
export async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {
if (process.platform !== 'darwin') {
throw new Error('macOS only');
}
const outputArguments = humanReadableOutput ? [] : ['-ss'];
const execOptions = {};
if (signal) {
execOptions.signal = signal;
}
const {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);
return stdout.trim();
}
export function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {
if (process.platform !== 'darwin') {
throw new Error('macOS only');
}
const outputArguments = humanReadableOutput ? [] : ['-ss'];
const stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
timeout: 500,
});
return stdout.trim();
}