mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
893ce4b866
* fix(ci): repair nightly XCTest and conformance lanes * fix(ci): harden nightly failure classification * fix(ci): stabilize macOS replay cleanup * fix(ci): close nightly review gaps * fix(ci): classify device claims as infrastructure
15 lines
559 B
JavaScript
15 lines
559 B
JavaScript
import { execFileSync } from 'node:child_process';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const REPOSITORY_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
|
|
const OXFMT_BIN = path.join(REPOSITORY_ROOT, 'node_modules/oxfmt/bin/oxfmt');
|
|
|
|
export function formatGeneratedJson(value, target = 'generated.json') {
|
|
return execFileSync(process.execPath, [OXFMT_BIN, `--stdin-filepath=${target}`], {
|
|
cwd: REPOSITORY_ROOT,
|
|
encoding: 'utf8',
|
|
input: `${JSON.stringify(value, null, 2)}\n`,
|
|
});
|
|
}
|