- reward-products/ 이미지를 리사이즈(메인 1080px, 상세 너비 1440px) + WebP(품질 82)로 변환하는 공용 서비스 추가 (sharp) - Storage 트리거 onRewardImageUploaded(us-central1)로 이후 업로드에도 자동 적용 — 다운로드 토큰을 보존해 기존 URL이 그대로 유효 - 기존 자산 일괄 최적화 스크립트(npm run optimize:reward-images) 추가, 실행 결과 38개 파일 135MB → 5.7MB - 재처리 무한루프는 rewardImageOptimized 메타데이터 플래그로 방지
42 lines
1.4 KiB
JSON
42 lines
1.4 KiB
JSON
{
|
|
"name": "functions",
|
|
"scripts": {
|
|
"lint": "eslint --ext .js,.ts .",
|
|
"build": "tsc",
|
|
"build:watch": "tsc --watch",
|
|
"serve": "npm run build && firebase emulators:start --only auth,functions,firestore,database,storage",
|
|
"shell": "npm run build && firebase functions:shell",
|
|
"start": "npm run shell",
|
|
"deploy": "firebase deploy --only functions",
|
|
"logs": "firebase functions:log",
|
|
"test": "firebase emulators:exec --only firestore,database,auth \"vitest run\"",
|
|
"test:watch": "vitest",
|
|
"tools:sheet": "npx tsx scripts/chat-tools-sheet.ts",
|
|
"seed:rewards": "npx tsx scripts/seed-reward-products.ts",
|
|
"upload:reward-assets": "npx tsx scripts/upload-reward-product-assets.ts",
|
|
"optimize:reward-images": "npx tsx scripts/optimize-reward-product-images.ts"
|
|
},
|
|
"engines": {
|
|
"node": "24"
|
|
},
|
|
"main": "lib/index.js",
|
|
"dependencies": {
|
|
"@anthropic-ai/sdk": "^0.104.1",
|
|
"@google/genai": "^2.8.0",
|
|
"firebase-admin": "^13.6.0",
|
|
"firebase-functions": "^7.0.0",
|
|
"sharp": "^0.35.3"
|
|
},
|
|
"devDependencies": {
|
|
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
"@typescript-eslint/parser": "^5.12.0",
|
|
"eslint": "^8.9.0",
|
|
"eslint-config-google": "^0.14.0",
|
|
"eslint-plugin-import": "^2.25.4",
|
|
"firebase-functions-test": "^3.4.1",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^4.1.4"
|
|
},
|
|
"private": true
|
|
}
|