contactsheet 0.1.7 → 0.1.9

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/dist/cli.js CHANGED
@@ -1048,13 +1048,16 @@ var MIME = {
1048
1048
  function mimeOf(file) {
1049
1049
  return MIME[path4.extname(file)] ?? "application/octet-stream";
1050
1050
  }
1051
- function pkgVersion() {
1051
+ var VERSION = (() => {
1052
1052
  try {
1053
1053
  const pkg = JSON.parse(fs3.readFileSync(path4.join(pkgRoot, "package.json"), "utf8"));
1054
1054
  return pkg.version ?? "0.0.0";
1055
1055
  } catch {
1056
1056
  return "0.0.0";
1057
1057
  }
1058
+ })();
1059
+ function pkgVersion() {
1060
+ return VERSION;
1058
1061
  }
1059
1062
 
1060
1063
  // src/server/push.ts
@@ -1369,7 +1372,7 @@ async function buildContextText(cfg) {
1369
1372
  for (const a of open) {
1370
1373
  const where = [a.artboardId, a.anchor?.selector].filter(Boolean).join(" @ ");
1371
1374
  lines.push(`- #${a.seq} [${a.id}] ${where ? where + " \u2014\u2014 " : ""}${a.text}`);
1372
- for (const ref of a.refs ?? []) lines.push(` \u53C2\u8003\u56FE:${ref}`);
1375
+ (a.refs ?? []).forEach((ref, i) => lines.push(` \u56FE\u7247 ${i + 1}:${ref}`));
1373
1376
  }
1374
1377
  }
1375
1378
  return lines.join("\n") + "\n";
@@ -1929,6 +1932,8 @@ async function up(flags) {
1929
1932
  closing = true;
1930
1933
  console.log(dim(`
1931
1934
  [contactsheet] \u6536\u5230 ${sig},\u6B63\u5728\u9000\u51FA\u2026`));
1935
+ const deadline = setTimeout(() => process.exit(0), 5e3);
1936
+ deadline.unref();
1932
1937
  if (watcher) await quiet(() => watcher.close());
1933
1938
  await quiet(() => server.close());
1934
1939
  await quiet(() => closeBrowser());