scripts/public-files.mjs
// Closed allowlist: adding a file to the workspace never publishes it implicitly.
// docs/internal/ is operator-only (including the Devpost replacement sheet).
export const publicFiles = [
'.env.example', '.gitignore', 'LICENSE', 'README.md', 'THIRD_PARTY_NOTICES.md',
'firebase.json', 'index.html', 'package.json', 'package-lock.json', 'tsconfig.json', 'vite.config.ts',
'src/core.ts', 'src/demo.ts', 'src/firebase.ts', 'src/main.ts', 'src/style.css',
'tests/core.test.ts', 'tests/tooling.test.mjs',
'scripts/browser-check.mjs', 'scripts/check-dist.mjs', 'scripts/fake-cloud.mjs', 'scripts/configure.mjs',
'scripts/preflight.mjs', 'scripts/live.mjs', 'scripts/rehearsal.mjs',
'scripts/public-files.mjs', 'scripts/publish-check', 'scripts/record-demo.mjs', 'scripts/video-tools.mjs',
'docs/design.md', 'docs/verification.md',
'docs/demo-script.md', 'docs/demo-narration.json', 'docs/owner-commands.md', 'docs/MANIFEST.json',
].sort();
export function isPublicPath(name) {
const parts = name.replaceAll('\\', '/').split('/');
return !parts.some(p => !p || p === '..' || p === '.' || p.toLowerCase() === 'internal' || (/^\.env/i.test(p) && p !== '.env.example') || /^\.pw-profile/i.test(p) || /^(?:vault|\.cache|cache|output|dist|node_modules|\.git|\.playwright.*|.*profile.*|.*token.*|.*secret.*|.*credential.*)$/i.test(p));
}