(config: ServerConfig)
| 399 | } |
| 400 | |
| 401 | function workspaceAppHtml(config: ServerConfig): string { |
| 402 | const baseUrl = assetBaseUrl(config); |
| 403 | const entry = getWorkspaceAppManifestEntry(); |
| 404 | const stylesheets = (entry.css ?? []) |
| 405 | .map( |
| 406 | (stylesheet) => |
| 407 | ` <link rel="stylesheet" crossorigin href="${assetUrl(baseUrl, stylesheet)}" />`, |
| 408 | ) |
| 409 | .join("\n"); |
| 410 | |
| 411 | return `<!doctype html> |
| 412 | <html lang="en"> |
| 413 | <head> |
| 414 | <meta charset="UTF-8" /> |
| 415 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 416 | <title>DevSpace Workspace</title> |
| 417 | <script type="module" crossorigin src="${assetUrl(baseUrl, entry.file)}"></script> |
| 418 | ${stylesheets} |
| 419 | </head> |
| 420 | <body> |
| 421 | <main id="app" class="shell"> |
| 422 | <section class="empty">Waiting for a tool result.</section> |
| 423 | </main> |
| 424 | </body> |
| 425 | </html>`; |
| 426 | } |
| 427 | |
| 428 | function appCsp(config: ServerConfig): { |
| 429 | resourceDomains: string[]; |
no test coverage detected