flightdesk 0.1.11 → 0.1.12

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 (3) hide show
  1. package/main.js +39 -6
  2. package/main.js.map +4 -4
  3. package/package.json +1 -1
package/main.js CHANGED
@@ -4380,9 +4380,9 @@ async function syncCommand() {
4380
4380
  const api = FlightDeskAPI.fromConfig(config, org2);
4381
4381
  const projects = await api.listProjects();
4382
4382
  console.log(` Found ${projects.length} project(s)`);
4383
- for (const project of projects) {
4384
- if (project.githubRepo) {
4385
- newMappings[project.githubRepo] = org2.id;
4383
+ for (const project2 of projects) {
4384
+ if (project2.githubRepo) {
4385
+ newMappings[project2.githubRepo] = org2.id;
4386
4386
  totalProjects++;
4387
4387
  }
4388
4388
  }
@@ -4669,10 +4669,10 @@ Summary:`);
4669
4669
  `);
4670
4670
  let created = 0;
4671
4671
  let failed = 0;
4672
- for (const { session, project } of importableSessions) {
4672
+ for (const { session, project: project2 } of importableSessions) {
4673
4673
  try {
4674
4674
  const task2 = await api.createTask({
4675
- projectId: project.id,
4675
+ projectId: project2.id,
4676
4676
  title: session.title,
4677
4677
  description: `Imported from Claude Code session`
4678
4678
  });
@@ -4794,9 +4794,40 @@ async function scanClaudeSessions(options) {
4794
4794
  }
4795
4795
  }
4796
4796
 
4797
+ // apps/cli/src/commands/project.ts
4798
+ async function projectCommand(action, options) {
4799
+ const { config, org: org2 } = requireActiveOrg();
4800
+ const api = FlightDeskAPI.fromConfig(config, org2);
4801
+ switch (action) {
4802
+ case "list":
4803
+ await listProjects(api);
4804
+ break;
4805
+ default:
4806
+ console.error(`Unknown action: ${action}`);
4807
+ process.exit(1);
4808
+ }
4809
+ }
4810
+ async function listProjects(api) {
4811
+ const projects = await api.listProjects();
4812
+ if (projects.length === 0) {
4813
+ console.log("No projects found.");
4814
+ console.log("\nCreate a project at https://app.flightdesk.dev/app/projects/new");
4815
+ return;
4816
+ }
4817
+ console.log("Projects:\n");
4818
+ const maxNameLen = Math.max(...projects.map((p) => p.name.length), 4);
4819
+ for (const project2 of projects) {
4820
+ const name = project2.name.padEnd(maxNameLen);
4821
+ const repo = project2.githubRepo || "(no repo)";
4822
+ console.log(` ${project2.id} ${name} ${repo}`);
4823
+ }
4824
+ console.log(`
4825
+ ${projects.length} project(s)`);
4826
+ }
4827
+
4797
4828
  // apps/cli/src/main.ts
4798
4829
  var program2 = new Command();
4799
- program2.name("flightdesk").description("FlightDesk CLI - AI task management for Claude Code sessions").version("0.1.11").option("--dev", "Use local development API (localhost:3000)").option("--api <url>", "Use custom API URL");
4830
+ program2.name("flightdesk").description("FlightDesk CLI - AI task management for Claude Code sessions").version("0.1.12").option("--dev", "Use local development API (localhost:3000)").option("--api <url>", "Use custom API URL");
4800
4831
  program2.hook("preAction", () => {
4801
4832
  const opts = program2.opts();
4802
4833
  if (opts.api) {
@@ -4811,6 +4842,8 @@ program2.hook("preAction", () => {
4811
4842
  program2.command("init").description("Configure FlightDesk CLI with your API credentials").action(initCommand);
4812
4843
  program2.command("auth").description("Log in to Claude for session monitoring").action(authCommand);
4813
4844
  program2.command("register <project-id> [task-id]").description("Register a Claude Code session with a FlightDesk task").option("--view-url <url>", "Claude Code session view URL").option("--teleport-id <id>", "Claude Code teleport ID").option("--title <title>", "Task title (creates new task if task-id not provided)").option("--description <description>", "Task description").action(registerCommand);
4845
+ var project = program2.command("project").description("Project management commands");
4846
+ project.command("list").description("List projects in the active organization").action(() => projectCommand("list", {}));
4814
4847
  var task = program2.command("task").description("Task management commands");
4815
4848
  task.command("create").description("Create a new task").requiredOption("-p, --project <id>", "Project ID").requiredOption("-t, --title <title>", "Task title").option("-d, --description <description>", "Task description").action((options) => taskCommand("create", options));
4816
4849
  task.command("list").description("List tasks").option("-p, --project <id>", "Filter by project ID").option("--status <status>", "Filter by status").action((options) => taskCommand("list", options));