yapout 0.5.0 → 0.5.1

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 +24 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -426,7 +426,17 @@ function registerProtocolHandler() {
426
426
  }
427
427
 
428
428
  // src/commands/login.ts
429
- var CLI_VERSION = "0.5.0";
429
+ var CLI_VERSION = "0.5.1";
430
+ function safeReturnTo(raw) {
431
+ if (!raw) return null;
432
+ try {
433
+ const parsed = new URL(raw);
434
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return null;
435
+ return parsed.toString();
436
+ } catch {
437
+ return null;
438
+ }
439
+ }
430
440
  function startCallbackServer() {
431
441
  return new Promise((resolve11) => {
432
442
  let resolveData;
@@ -443,6 +453,7 @@ function startCallbackServer() {
443
453
  const expiresAt = url.searchParams.get("expiresAt");
444
454
  const convexUrl = url.searchParams.get("convexUrl");
445
455
  const error = url.searchParams.get("error");
456
+ const returnTo = safeReturnTo(url.searchParams.get("returnTo"));
446
457
  if (error || !token) {
447
458
  res.writeHead(200, { "Content-Type": "text/html" });
448
459
  res.end(
@@ -452,10 +463,15 @@ function startCallbackServer() {
452
463
  rejectData(new Error(error || "No token received"));
453
464
  return;
454
465
  }
455
- res.writeHead(200, { "Content-Type": "text/html" });
456
- res.end(
457
- `<html><body style="font-family:sans-serif;text-align:center;padding:2rem"><h2>Authenticated!</h2><p>You can close this tab and return to the terminal.</p></body></html>`
458
- );
466
+ if (returnTo) {
467
+ res.writeHead(302, { Location: returnTo });
468
+ res.end();
469
+ } else {
470
+ res.writeHead(200, { "Content-Type": "text/html" });
471
+ res.end(
472
+ `<html><body style="font-family:sans-serif;text-align:center;padding:2rem"><h2>Authenticated!</h2><p>You can close this tab and return to the terminal.</p></body></html>`
473
+ );
474
+ }
459
475
  server.close();
460
476
  resolveData({
461
477
  token,
@@ -3557,7 +3573,7 @@ async function startMcpServer() {
3557
3573
  };
3558
3574
  const server = new McpServer({
3559
3575
  name: "yapout",
3560
- version: "0.1.0"
3576
+ version: "0.5.1"
3561
3577
  });
3562
3578
  registerInitTool(server, ctx);
3563
3579
  registerCompactTool(server, ctx);
@@ -4323,7 +4339,7 @@ var watchCommand = new Command10("watch").description("Watch for work and spawn
4323
4339
  chalk11.green("Watcher started in background") + chalk11.dim(` (PID ${process.pid}, log: ${LOG_FILE})`)
4324
4340
  );
4325
4341
  }
4326
- console.log(chalk11.bold(`yapout watch v0.1.0`));
4342
+ console.log(chalk11.bold(`yapout watch v${"0.5.1"}`));
4327
4343
  console.log(
4328
4344
  `Project: ${chalk11.green(mapping.projectName)} (${mapping.projectId})`
4329
4345
  );
@@ -4876,7 +4892,7 @@ var handleUriCommand = new Command15("handle-uri").description("Handle a yapout:
4876
4892
 
4877
4893
  // src/index.ts
4878
4894
  var program = new Command16();
4879
- program.name("yapout").description("yapout \u2014 from meeting transcript to merged PR").version("0.1.0");
4895
+ program.name("yapout").description("yapout \u2014 from meeting transcript to merged PR").version("0.5.1");
4880
4896
  program.addCommand(loginCommand);
4881
4897
  program.addCommand(logoutCommand);
4882
4898
  program.addCommand(initCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yapout",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "yapout CLI — link local repos, authenticate, and manage projects",
5
5
  "type": "module",
6
6
  "bin": {