( params: WorkspaceProjectRepoParams, targetProjectPath: string )
| 139 | } |
| 140 | |
| 141 | export function getWorkspacePathHintForProject( |
| 142 | params: WorkspaceProjectRepoParams, |
| 143 | targetProjectPath: string |
| 144 | ): string | undefined { |
| 145 | if (!isSSHRuntime(params.runtimeConfig)) { |
| 146 | return undefined; |
| 147 | } |
| 148 | |
| 149 | const currentProjectRoot = path.posix.dirname(path.posix.normalize(params.workspacePath)); |
| 150 | const primaryLegacyLayout = buildLegacyRemoteProjectLayout( |
| 151 | params.runtimeConfig.srcBaseDir, |
| 152 | params.projectPath |
| 153 | ); |
| 154 | if (currentProjectRoot === primaryLegacyLayout.projectRoot) { |
| 155 | return getRemoteWorkspacePath( |
| 156 | buildLegacyRemoteProjectLayout(params.runtimeConfig.srcBaseDir, targetProjectPath), |
| 157 | params.workspaceName |
| 158 | ); |
| 159 | } |
| 160 | |
| 161 | const primaryPreferredLayout = buildRemoteProjectLayout( |
| 162 | params.runtimeConfig.srcBaseDir, |
| 163 | params.projectPath |
| 164 | ); |
| 165 | if (currentProjectRoot === primaryPreferredLayout.projectRoot) { |
| 166 | return getRemoteWorkspacePath( |
| 167 | buildRemoteProjectLayout(params.runtimeConfig.srcBaseDir, targetProjectPath), |
| 168 | params.workspaceName |
| 169 | ); |
| 170 | } |
| 171 | |
| 172 | return undefined; |
| 173 | } |
| 174 | |
| 175 | export function getWorkspaceProjectRepos( |
| 176 | params: WorkspaceProjectRepoParams |
no test coverage detected