mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 10:12:44 +00:00
* feat(cli): manage projects Expose the existing project lifecycle through one CLI command group so projects can be managed without opening the app. * fix(cli): preserve remote project paths Project paths belong to the daemon when a target is explicit. Require that path instead of resolving the CLI machine's cwd, and keep local convenience resolution for the default connection. * docs(cli): document project management * docs(cli): remove repeated project reference
29 lines
830 B
TypeScript
29 lines
830 B
TypeScript
import type { WorkspaceProjectDescriptorPayload } from "@getpaseo/protocol/messages";
|
|
import type { OutputSchema } from "../../output/index.js";
|
|
|
|
export interface ProjectRow {
|
|
projectId: string;
|
|
name: string;
|
|
kind: "git" | "non_git" | "directory";
|
|
path: string;
|
|
}
|
|
|
|
export const projectSchema: OutputSchema<ProjectRow> = {
|
|
idField: "projectId",
|
|
columns: [
|
|
{ header: "PROJECT ID", field: "projectId", width: 20 },
|
|
{ header: "NAME", field: "name", width: 24 },
|
|
{ header: "KIND", field: "kind", width: 10 },
|
|
{ header: "PATH", field: "path", width: 42 },
|
|
],
|
|
};
|
|
|
|
export function toProjectRow(project: WorkspaceProjectDescriptorPayload): ProjectRow {
|
|
return {
|
|
projectId: project.projectId,
|
|
name: project.projectDisplayName,
|
|
kind: project.projectKind,
|
|
path: project.projectRootPath,
|
|
};
|
|
}
|