Runner: index.html-Rueckfall wie bisheriger Deploy (Kandidat/Platzhalter/Unterordner)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-09-30 22:15:27 +00:00
1 parent 54f307d12a
commit 8a028ce75a
7 files changed
+294 -10

No files matched your search

+7 -1
View File
@@ -661,7 +661,7 @@ async function followRun({ repoFullName, project, token, runId, subdomain, job,
}
if (run.result === 'dev') {
await patchProject(repoFullName, project, { ...base, previewState: 'sleeping' })
try { await runnerClient.startDev(subdomain, { ...job, mode: 'dev' }) } catch (err) {
try { await runnerClient.startDev(subdomain, { ...job, mode: 'dev', displayName: undefined }) } catch (err) {
console.error('[previewDeploy] Dev-Registrierung fehlgeschlagen:', err.message)
}
} else {
@@ -714,6 +714,8 @@ async function runDeployViaRunner(repoFullName, branch, previewConfig, { project
}
}
const displayName = String(previewConfig.displayName || doc?.projectName || '').slice(0, 100).replace(/[\x00-\x1f\x7f]/g, ' ').trim()
try {
const job = {
sub: subdomain,
@@ -722,6 +724,7 @@ async function runDeployViaRunner(repoFullName, branch, previewConfig, { project
branch,
mode: ['build', 'dev'].includes(mode) ? mode : 'auto',
...(previewConfig.index ? { index: previewConfig.index } : {}),
...(displayName ? { displayName } : {}),
env,
}
const { runId } = await runnerClient.submitBuild(job)
@@ -816,3 +819,6 @@ export async function removeDeploy(subdomain) {
}
return { removed: true, subdomain, tls }
}
// Nur fuer Tests (Vergleich Altpfad gegen Runner-Veroeffentlichung)
export const previewDeployInternals = { deployStatic, ensureIndexHtml, placeholderHtml, findIndexCandidate }