Something went wrong. Try again.
fork of hey-api/openapi-ts because I need some additional things
Something went wrong. Try again.
546 B · 18 lines
JavaScript
12345678910111213141516171819#!/usr/bin/env nodeimport { spawnSync } from 'node:child_process';import fs from 'node:fs';import path from 'node:path';import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));const target = path.join(__dirname, '..', 'dist', 'run.mjs');
if (!fs.existsSync(target)) { console.error('openapi-python not built (expect dist/run.mjs)'); process.exit(1);}
const res = spawnSync(process.execPath, [target, ...process.argv.slice(2)], { stdio: 'inherit',});process.exit(res.status ?? 0);