fix(observability,webhooks,i18n): timestamped logs, dedupe webhook retries, default non-de locales to English
- New custom server.js (replaces react-router-serve): ISO timestamps on all console.* output and on access logs, and skip successful /healthz polls so real traffic stays visible. - New ProcessedWebhook table + dedupe helper keyed on X-Shopify-Webhook-Id; stops Shopify retries from triggering a second invoice email when the original delivery exceeded the 5s ack timeout. - orders/create + orders/fulfilled now respond 200 immediately and run the PDF/email work in the background so we stay under that timeout. - pickLanguage(): non-German locales (it, fr, es, ...) now default to English instead of falling back to German. Empty/unknown still maps to 'de' so the per-shop defaultLanguage chain keeps working. - Tests for pickLanguage and dedupe via node --test + tsx.
This commit is contained in:
+7
-2
@@ -9,7 +9,7 @@
|
||||
"deploy": "shopify app deploy",
|
||||
"config:use": "shopify app config use",
|
||||
"env": "shopify app env",
|
||||
"start": "react-router-serve ./build/server/index.js",
|
||||
"start": "node ./server.js",
|
||||
"docker-start": "npm run setup && npm run start",
|
||||
"setup": "prisma generate && prisma migrate deploy",
|
||||
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
|
||||
@@ -17,7 +17,8 @@
|
||||
"prisma": "prisma",
|
||||
"graphql-codegen": "graphql-codegen",
|
||||
"vite": "vite",
|
||||
"typecheck": "react-router typegen && tsc --noEmit"
|
||||
"typecheck": "react-router typegen && tsc --noEmit",
|
||||
"test": "tsx --test tests"
|
||||
},
|
||||
"type": "module",
|
||||
"engines": {
|
||||
@@ -29,7 +30,11 @@
|
||||
"@react-router/dev": "^7.12.0",
|
||||
"@react-router/fs-routes": "^7.12.0",
|
||||
"@react-router/node": "^7.12.0",
|
||||
"@react-router/express": "^7.14.2",
|
||||
"@react-router/serve": "^7.12.0",
|
||||
"compression": "^1.8.1",
|
||||
"express": "^4.22.1",
|
||||
"morgan": "^1.10.1",
|
||||
"@shopify/app-bridge-react": "^4.2.4",
|
||||
"@shopify/shopify-app-react-router": "^1.1.0",
|
||||
"@shopify/shopify-app-session-storage-prisma": "^8.0.0",
|
||||
|
||||
Reference in New Issue
Block a user