feat(app): add workspace startup script to projects
This commit is contained in:
@@ -293,7 +293,7 @@ export class Project extends HeyApiClient {
|
||||
/**
|
||||
* Update project
|
||||
*
|
||||
* Update project properties such as name, icon and color.
|
||||
* Update project properties such as name, icon, and commands.
|
||||
*/
|
||||
public update<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
@@ -305,6 +305,12 @@ export class Project extends HeyApiClient {
|
||||
override?: string
|
||||
color?: string
|
||||
}
|
||||
commands?: {
|
||||
/**
|
||||
* Startup script to run when creating a new workspace (worktree)
|
||||
*/
|
||||
start?: string
|
||||
}
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
@@ -317,6 +323,7 @@ export class Project extends HeyApiClient {
|
||||
{ in: "query", key: "directory" },
|
||||
{ in: "body", key: "name" },
|
||||
{ in: "body", key: "icon" },
|
||||
{ in: "body", key: "commands" },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -718,7 +725,7 @@ export class Worktree extends HeyApiClient {
|
||||
/**
|
||||
* Create worktree
|
||||
*
|
||||
* Create a new git worktree for the current project.
|
||||
* Create a new git worktree for the current project and run any configured startup scripts.
|
||||
*/
|
||||
public create<ThrowOnError extends boolean = false>(
|
||||
parameters?: {
|
||||
|
||||
@@ -28,6 +28,12 @@ export type Project = {
|
||||
override?: string
|
||||
color?: string
|
||||
}
|
||||
commands?: {
|
||||
/**
|
||||
* Startup script to run when creating a new workspace (worktree)
|
||||
*/
|
||||
start?: string
|
||||
}
|
||||
time: {
|
||||
created: number
|
||||
updated: number
|
||||
@@ -1906,6 +1912,9 @@ export type Worktree = {
|
||||
|
||||
export type WorktreeCreateInput = {
|
||||
name?: string
|
||||
/**
|
||||
* Additional startup script to run after the project's start command
|
||||
*/
|
||||
startCommand?: string
|
||||
}
|
||||
|
||||
@@ -2233,6 +2242,12 @@ export type ProjectUpdateData = {
|
||||
override?: string
|
||||
color?: string
|
||||
}
|
||||
commands?: {
|
||||
/**
|
||||
* Startup script to run when creating a new workspace (worktree)
|
||||
*/
|
||||
start?: string
|
||||
}
|
||||
}
|
||||
path: {
|
||||
projectID: string
|
||||
|
||||
Reference in New Issue
Block a user