tt-help-cli-ycl 1.3.57 → 1.3.58

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.
@@ -497,6 +497,7 @@ export function startWatchServer(dataAnchor, port = 3000, existingStore) {
497
497
  "ttSeller",
498
498
  "verified",
499
499
  "locationCreated",
500
+ "latestVideoTime",
500
501
  "status",
501
502
  "sources",
502
503
  ];
@@ -507,6 +508,7 @@ export function startWatchServer(dataAnchor, port = 3000, existingStore) {
507
508
  ttSeller: u.ttSeller,
508
509
  verified: u.verified,
509
510
  locationCreated: u.locationCreated || "",
511
+ latestVideoTime: u.latestVideoTime || "",
510
512
  status: u.status || "",
511
513
  sources: (u.sources || []).join(";"),
512
514
  }));
@@ -679,6 +681,7 @@ export function startWatchServer(dataAnchor, port = 3000, existingStore) {
679
681
  verified: u.verified,
680
682
  followerCount: u.followerCount,
681
683
  locationCreated: u.locationCreated,
684
+ latestVideoTime: u.latestVideoTime,
682
685
  guessedLocation: u.guessedLocation,
683
686
  pinned: u.pinned,
684
687
  processedAt: u.processedAt,
@@ -699,6 +702,22 @@ export function startWatchServer(dataAnchor, port = 3000, existingStore) {
699
702
  return;
700
703
  }
701
704
 
705
+ // 静态资源:CSS / JS
706
+ if (req.method === "GET") {
707
+ const staticMatch = routePath.match(/^\/(style\.css|app\.js)$/);
708
+ if (staticMatch) {
709
+ const staticFile = join(publicDir, staticMatch[1]);
710
+ if (existsSync(staticFile)) {
711
+ const content = readFileSync(staticFile, "utf-8");
712
+ const ext = staticMatch[1].split(".").pop();
713
+ const mime = ext === "css" ? "text/css" : "text/javascript";
714
+ res.writeHead(200, { "Content-Type": `${mime}; charset=utf-8` });
715
+ res.end(content);
716
+ return;
717
+ }
718
+ }
719
+ }
720
+
702
721
  const scriptMatch = routePath.match(/^\/scripts\/(.+)$/);
703
722
  if (req.method === "GET" && scriptMatch) {
704
723
  const scriptsDir = join(__dirname, "../../scripts");