fork of hey-api/openapi-ts because I need some additional things
at feat/skip-token 18 lines 546 B view raw
1#!/usr/bin/env node 2import { spawnSync } from 'node:child_process'; 3import fs from 'node:fs'; 4import path from 'node:path'; 5import { fileURLToPath } from 'node:url'; 6 7const __dirname = path.dirname(fileURLToPath(import.meta.url)); 8const target = path.join(__dirname, '..', 'dist', 'run.mjs'); 9 10if (!fs.existsSync(target)) { 11 console.error('openapi-python not built (expect dist/run.mjs)'); 12 process.exit(1); 13} 14 15const res = spawnSync(process.execPath, [target, ...process.argv.slice(2)], { 16 stdio: 'inherit', 17}); 18process.exit(res.status ?? 0);