glop.dev 0.3.0 → 0.5.0

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.
Files changed (2) hide show
  1. package/dist/index.js +37 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -378,16 +378,19 @@ var doctorCommand = new Command3("doctor").description("Check that glop is set u
378
378
 
379
379
  // src/commands/hook.ts
380
380
  import { Command as Command4 } from "commander";
381
- import { openSync, readSync, closeSync } from "fs";
381
+ import { openSync, readSync, closeSync, readFileSync } from "fs";
382
382
  function extractSlugFromTranscript(transcriptPath) {
383
383
  try {
384
384
  const fd = openSync(transcriptPath, "r");
385
- const buf = Buffer.alloc(65536);
386
- const bytesRead = readSync(fd, buf, 0, 65536, 0);
385
+ const buf = Buffer.alloc(262144);
386
+ const bytesRead = readSync(fd, buf, 0, 262144, 0);
387
387
  closeSync(fd);
388
388
  const head = buf.toString("utf-8", 0, bytesRead);
389
389
  const match = head.match(/"slug":"([^"]+)"/);
390
- return match ? match[1] : null;
390
+ if (match) return match[1];
391
+ if (bytesRead < 262144) return null;
392
+ const full = readFileSync(transcriptPath, "utf-8");
393
+ return full.match(/"slug":"([^"]+)"/)?.[1] ?? null;
391
394
  } catch {
392
395
  return null;
393
396
  }
@@ -605,8 +608,37 @@ var statusCommand = new Command6("status").description("Show current Run status
605
608
  }
606
609
  });
607
610
 
611
+ // package.json
612
+ var package_default = {
613
+ name: "glop.dev",
614
+ version: "0.5.0",
615
+ type: "module",
616
+ bin: {
617
+ glop: "./dist/index.js"
618
+ },
619
+ files: [
620
+ "dist"
621
+ ],
622
+ scripts: {
623
+ build: "tsup",
624
+ dev: "tsx src/index.ts",
625
+ test: "vitest run",
626
+ "test:watch": "vitest",
627
+ prepublishOnly: `node -e "if (!process.env.GLOP_DEFAULT_SERVER_URL) { console.error('Error: GLOP_DEFAULT_SERVER_URL must be set before publishing'); process.exit(1); }" && tsup`
628
+ },
629
+ dependencies: {
630
+ commander: "^13.0.0"
631
+ },
632
+ devDependencies: {
633
+ tsup: "^8.3.0",
634
+ tsx: "^4.19.0",
635
+ typescript: "^5.7.0",
636
+ vitest: "^4.0.18"
637
+ }
638
+ };
639
+
608
640
  // src/index.ts
609
- var program = new Command7().name("glop").description("Passive control plane for local Claude-driven development").version("0.1.0");
641
+ var program = new Command7().name("glop").description("Passive control plane for local Claude-driven development").version(package_default.version);
610
642
  program.addCommand(authCommand);
611
643
  program.addCommand(deactivateCommand);
612
644
  program.addCommand(doctorCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glop.dev",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "glop": "./dist/index.js"