tt-help-cli-ycl 1.3.10 → 1.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-help-cli-ycl",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "TikTok user & video data scraper - extract ttSeller, verified, locationCreated from HTML source",
5
5
  "type": "module",
6
6
  "bin": {
@@ -307,9 +307,13 @@ export function startWatchServer(outputFile, port = 3000, existingStore) {
307
307
  const scriptFile = join(batDir, scriptMatch[1]);
308
308
  if (existsSync(scriptFile)) {
309
309
  const content = readFileSync(scriptFile);
310
- const ext = scriptMatch[1].split('.').pop();
310
+ const fileName = scriptMatch[1];
311
+ const ext = fileName.split('.').pop();
311
312
  const mime = ext === 'sh' ? 'text/x-sh' : ext === 'bat' ? 'text/bat' : 'text/plain';
312
- res.writeHead(200, { 'Content-Type': `${mime}; charset=utf-8` });
313
+ res.writeHead(200, {
314
+ 'Content-Type': `${mime}; charset=utf-8`,
315
+ 'Content-Disposition': `attachment; filename="${fileName}"`,
316
+ });
313
317
  res.end(content);
314
318
  return;
315
319
  }