(dir string)
| 71 | } |
| 72 | |
| 73 | func detectWorkspacePaths(dir string) *models.WorkspacePaths { |
| 74 | paths := &models.WorkspacePaths{ |
| 75 | Root: ".", |
| 76 | } |
| 77 | if fileExists(filepath.Join(dir, "..", "pad-web"), "package.json") { |
| 78 | paths.DocsRepo = "../pad-web" |
| 79 | } |
| 80 | if fileExists(dir, "package.json") { |
| 81 | paths.Web = "." |
| 82 | } else if dirExists(dir, "web") { |
| 83 | paths.Web = "web" |
| 84 | } |
| 85 | if dirExists(dir, "internal", "server") { |
| 86 | paths.Server = "internal/server" |
| 87 | } |
| 88 | if dirExists(dir, "skills") { |
| 89 | paths.Skills = "skills" |
| 90 | } |
| 91 | if fileExists(dir, ".pad.toml") { |
| 92 | paths.Config = ".pad.toml" |
| 93 | } |
| 94 | return paths |
| 95 | } |
| 96 | |
| 97 | func detectWorkspaceCommands(info ProjectInfo) *models.WorkspaceCommands { |
| 98 | return &models.WorkspaceCommands{ |
no test coverage detected