feat(export-options): Google Sheets 템플릿 모드 옵션(UI+extras) 추가
Auto PR / open-pr (push) Successful in 22s
Auto Label PR / add-automerge-label (pull_request) Successful in 8s
CI / test (pull_request) Failing after 33s

This commit is contained in:
2025-11-15 13:57:42 +09:00
parent 032372bb01
commit 31eaa9343a
2 changed files with 24 additions and 5 deletions
+5 -2
View File
@@ -9,6 +9,7 @@ export type ExtrasOverrides = {
display: string
theme_color: string
}>
sheetsMode?: 'auto' | 'include' | 'exclude'
}
function toBytes(s: string): Uint8Array {
@@ -42,10 +43,12 @@ export function buildExtrasForPage(page: Page, overrides?: ExtrasOverrides): Rec
const manifestJson = JSON.stringify(manifestMerged, null, 2)
out['site.webmanifest'] = toBytes(manifestJson)
// Google Sheets 템플릿: actionUrl 미지정 시 포함
// Google Sheets 템플릿: 기본 auto. overrides.sheetsMode로 강제 포함/제외 가능
const mode = overrides?.sheetsMode ?? 'auto'
const action = page.form?.actionUrl?.trim()
const hasAction = !!(action && action.length > 0)
if (!hasAction) {
const shouldInclude = mode === 'include' || (mode === 'auto' && !hasAction)
if (shouldInclude) {
const code = `/**
* Google Apps Script Web App for form submissions
* - Deploy as Web App and set URL as form action if needed.