| 12345678910111213141516171819202122232425 |
- #!/usr/bin/env node
- const fs = require('fs');
- const path = require('path');
- const { spawnSync } = require('child_process');
- const entrypoint = path.resolve(__dirname, '..', '..', 'index.js');
- if (!fs.existsSync(entrypoint)) {
- console.error('douyin-video-transcript compatibility entrypoint was not found.');
- console.error(`Expected: ${entrypoint}`);
- process.exit(1);
- }
- const child = spawnSync(process.execPath, [entrypoint, ...process.argv.slice(2)], {
- cwd: process.cwd(),
- env: process.env,
- stdio: 'inherit'
- });
- if (child.error) {
- console.error(child.error.message);
- process.exit(1);
- }
- process.exit(child.status ?? 0);
|