Cloud Functions 서버 기반과 앱 서버 연동 계층 — 계정 생성 트리거 · 약관 동의 기록 · 운영자 권한 · Admin 쓰기 관문 · Firestore·Functions 클라이언트 · 오류 코드 전달

This commit is contained in:
Sn-Kinos
2026-09-01 00:20:45 +09:00
parent 2037b6d573
commit 1d462ebe31
21 changed files with 21578 additions and 12 deletions
+28
View File
@@ -0,0 +1,28 @@
import { defineConfig } from 'vitest/config';
import { existsSync } from 'node:fs';
import { dirname, resolve } from 'node:path';
/**
* NodeNext 규약대로 소스가 `./ledger.js` 로 임포트하지만 실제 파일은 `.ts` 다.
* Vite 는 이 치환을 하지 않으므로 여기서 직접 이어 준다.
*/
const tsExtension = {
name: 'resolve-js-to-ts',
resolveId(source: string, importer?: string) {
if (!importer || !source.startsWith('.') || !source.endsWith('.js')) return null;
const candidate = resolve(dirname(importer), source.replace(/\.js$/, '.ts'));
return existsSync(candidate) ? candidate : null;
},
};
export default defineConfig({
plugins: [tsExtension],
test: {
include: ['test/**/*.test.ts'],
// 에뮬레이터 왕복이 있어 기본 5초로는 모자란다.
testTimeout: 30_000,
hookTimeout: 30_000,
// 원장 테스트는 같은 사용자 문서를 건드리므로 순차로 돌린다.
fileParallelism: false,
},
});