Orval-mutator factory for derived projects. Baseline behaviour (credentials, X-Requested-With, 204/JSON handling) baked in; four hooks let consumers wire the app-specific concerns without forking: baseUrl — Apache-proxy prefix (empty for root-hosted apps) syncTables — table names that route mutations through a sync queue onEnqueue — queue callback (returns true ⇒ skip network, 202 back) on401 — session-invalidation redirect on409 — conflict resolver (return value swallows the error) fetchImpl — test injection Typechecks clean with tsc --strict against ES2020/DOM lib. Exported as '@uschuster/webapp-scaffold/core-fetch' so consumers import only what they need. Closes fewo-webapp#415 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28 lines
944 B
JSON
28 lines
944 B
JSON
{
|
|
"name": "@uschuster/webapp-scaffold",
|
|
"version": "0.2.0",
|
|
"description": "Shared build scripts + Vite config factories for webapp-template-derived projects.",
|
|
"type": "module",
|
|
"bin": {
|
|
"webapp-scaffold-fetch-openapi": "bin/fetch-openapi.sh",
|
|
"webapp-scaffold-postprocess-openapi": "bin/postprocess-openapi.py",
|
|
"webapp-scaffold-inject-hashes": "bin/inject-hashed-filenames.py"
|
|
},
|
|
"main": "src/vite-config.ts",
|
|
"exports": {
|
|
".": "./src/vite-config.ts",
|
|
"./core-fetch": "./src/core-fetch.ts",
|
|
"./orval-template": "./templates/orval.config.template.ts"
|
|
},
|
|
"files": ["bin/", "src/", "templates/", "README.md", "LICENSE"],
|
|
"peerDependencies": {
|
|
"vite": "^6.0.0",
|
|
"@vitejs/plugin-react": "^4.0.0"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "http://127.0.0.1:3000/uwe.admin/webapp-scaffold.git"
|
|
},
|
|
"license": "UNLICENSED",
|
|
"private": true
|
|
}
|