@alxia/react-router 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +301 -13
- package/dist/chunks/index-59vhfj6n.js +10 -0
- package/dist/chunks/index-59vhfj6n.js.map +10 -0
- package/dist/chunks/index-5gqcpyyg.js +34 -0
- package/dist/chunks/index-5gqcpyyg.js.map +10 -0
- package/dist/chunks/{index-zqa30gr7.js → index-9xv2a8et.js} +7 -38
- package/dist/chunks/index-9xv2a8et.js.map +11 -0
- package/dist/chunks/index-mppz0806.js +119 -0
- package/dist/chunks/index-mppz0806.js.map +11 -0
- package/dist/chunks/index-rfr02vg4.js +40 -0
- package/dist/chunks/index-rfr02vg4.js.map +10 -0
- package/dist/chunks/index-zdbqzcjp.js +97 -0
- package/dist/chunks/index-zdbqzcjp.js.map +12 -0
- package/dist/errors/api-error.d.ts +86 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-errors.d.ts +96 -0
- package/dist/errors/api-errors.d.ts.map +1 -0
- package/dist/errors/call-failure.d.ts +45 -0
- package/dist/errors/call-failure.d.ts.map +1 -0
- package/dist/errors/catalogue-check.d.ts +24 -0
- package/dist/errors/catalogue-check.d.ts.map +1 -0
- package/dist/errors/catalogue-read.d.ts +33 -0
- package/dist/errors/catalogue-read.d.ts.map +1 -0
- package/dist/errors/catalogue.d.ts +59 -0
- package/dist/errors/catalogue.d.ts.map +1 -0
- package/dist/errors/code-resolver.d.ts +44 -0
- package/dist/errors/code-resolver.d.ts.map +1 -0
- package/dist/errors/describe-refusal.d.ts +6 -0
- package/dist/errors/describe-refusal.d.ts.map +1 -0
- package/dist/errors/describe.d.ts +3 -0
- package/dist/errors/describe.d.ts.map +1 -0
- package/dist/errors/fetcher-result.d.ts +21 -0
- package/dist/errors/fetcher-result.d.ts.map +1 -0
- package/dist/errors/form-errors.d.ts +8 -0
- package/dist/errors/form-errors.d.ts.map +1 -0
- package/dist/errors/index.d.ts +15 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +602 -0
- package/dist/errors/index.js.map +29 -0
- package/dist/errors/json-actions.d.ts +38 -0
- package/dist/errors/json-actions.d.ts.map +1 -0
- package/dist/errors/log.d.ts +8 -0
- package/dist/errors/log.d.ts.map +1 -0
- package/dist/errors/message-values.d.ts +11 -0
- package/dist/errors/message-values.d.ts.map +1 -0
- package/dist/errors/messages.d.ts +63 -0
- package/dist/errors/messages.d.ts.map +1 -0
- package/dist/errors/page-path.d.ts +9 -0
- package/dist/errors/page-path.d.ts.map +1 -0
- package/dist/errors/provider.d.ts +20 -0
- package/dist/errors/provider.d.ts.map +1 -0
- package/dist/errors/request-id.d.ts +5 -0
- package/dist/errors/request-id.d.ts.map +1 -0
- package/dist/errors/route-error.d.ts +31 -0
- package/dist/errors/route-error.d.ts.map +1 -0
- package/dist/errors/standard-schema.d.ts +34 -0
- package/dist/errors/standard-schema.d.ts.map +1 -0
- package/dist/errors/submit-form.d.ts +16 -0
- package/dist/errors/submit-form.d.ts.map +1 -0
- package/dist/errors/use-json-fetcher.d.ts +18 -0
- package/dist/errors/use-json-fetcher.d.ts.map +1 -0
- package/dist/pwa/build/build-worker.d.ts +41 -0
- package/dist/pwa/build/build-worker.d.ts.map +1 -0
- package/dist/pwa/build/index.d.ts +9 -0
- package/dist/pwa/build/index.d.ts.map +1 -0
- package/dist/pwa/build/index.js +9 -0
- package/dist/pwa/build/index.js.map +9 -0
- package/dist/pwa/build/precache.d.ts +17 -0
- package/dist/pwa/build/precache.d.ts.map +1 -0
- package/dist/pwa/index.js +34 -134
- package/dist/pwa/index.js.map +4 -8
- package/dist/pwa/react/index.js +1 -1
- package/dist/pwa/worker/index.d.ts +9 -0
- package/dist/pwa/worker/index.d.ts.map +1 -0
- package/dist/pwa/worker/index.js +144 -0
- package/dist/pwa/worker/index.js.map +12 -0
- package/dist/pwa/worker/injected.d.ts +15 -0
- package/dist/pwa/worker/injected.d.ts.map +1 -0
- package/dist/pwa/worker/plan.d.ts +65 -0
- package/dist/pwa/worker/plan.d.ts.map +1 -0
- package/dist/pwa/worker/scope.d.ts +18 -0
- package/dist/pwa/worker/scope.d.ts.map +1 -0
- package/dist/pwa/worker/start-worker.d.ts +17 -0
- package/dist/pwa/worker/start-worker.d.ts.map +1 -0
- package/dist/vite/index.d.ts +10 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +49 -3
- package/dist/vite/index.js.map +6 -5
- package/dist/vite/runtime.d.ts +1 -1
- package/dist/vite/runtime.d.ts.map +1 -1
- package/dist/vite/worker.d.ts +16 -0
- package/dist/vite/worker.d.ts.map +1 -0
- package/docs/README.md +3 -2
- package/docs/guide/errors.md +838 -0
- package/docs/guide/how-it-works.md +7 -1
- package/docs/guide/pwa.md +372 -211
- package/docs/roadmap.md +38 -5
- package/docs/troubleshooting.md +689 -3
- package/package.json +56 -4
- package/dist/chunks/index-zqa30gr7.js.map +0 -12
package/docs/roadmap.md
CHANGED
|
@@ -11,14 +11,12 @@ Nothing in progress.
|
|
|
11
11
|
|
|
12
12
|
## Next
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
`cachingFor` and `isStorable`, and the build that writes it, reading
|
|
16
|
-
`precacheList` and possibly run by `/vite`'s `alxia()`, with the `workbox-*`
|
|
17
|
-
packages as optional peers. Until it ships, the worker and its build stay
|
|
18
|
-
the app's.
|
|
14
|
+
Nothing planned.
|
|
19
15
|
|
|
20
16
|
## Later
|
|
21
17
|
|
|
18
|
+
- **`service-worker.js` served revalidated with no setup.** Today the app
|
|
19
|
+
adds `noCache` for `SERVICE_WORKER_URL` itself.
|
|
22
20
|
- **A check of an offline page's policy.** The offline page declares its
|
|
23
21
|
Content-Security-Policy in a `<meta>`; a check would read the page and
|
|
24
22
|
confirm that each inline script and style is allowed by its hash.
|
|
@@ -55,6 +53,41 @@ Nothing in progress.
|
|
|
55
53
|
|
|
56
54
|
## Shipped
|
|
57
55
|
|
|
56
|
+
### 0.11.0
|
|
57
|
+
|
|
58
|
+
- **`@alxia/react-router/errors`: an API's refusals, worded for the page.**
|
|
59
|
+
A server's GraphQL refusals (`<module>.errors.<slug>`, `params`, `fields`)
|
|
60
|
+
are worded from its error catalogue in the page's language, for forms,
|
|
61
|
+
fetchers, loaders and the error page, with no UI. You get the shape of a
|
|
62
|
+
refusal, the request id and `nextOf`, the catalogue store
|
|
63
|
+
(`createApiMessages`), the form checks' resolver (`apiCodeResolver`), the
|
|
64
|
+
provider (`ApiMessagesProvider`) and the wording of a refusal
|
|
65
|
+
(`createApiErrors`: message, fields and status), the route helpers
|
|
66
|
+
(`routeError`, `errorRequestId`) and the actions' helpers (`fetcherResult`,
|
|
67
|
+
`fetcherRefusal`, `submitForm`), the JSON actions (`jsonActions`:
|
|
68
|
+
`readJson` with its same-origin CSRF check, `requireJsonPost`, and
|
|
69
|
+
`readInput` over a Standard Schema) with their fetcher hook
|
|
70
|
+
(`useJsonFetcher`), the catalogue's refresh (`createErrorCatalogue`: read
|
|
71
|
+
on first use with a bounded wait, checked against the API's versions once
|
|
72
|
+
per TTL, `warm()` at startup, `clientMessages()` for the root), and the
|
|
73
|
+
failures of a call (`apiCallFailure`, `operationName`) ([guide](guide/errors.md)).
|
|
74
|
+
|
|
75
|
+
### 0.10.0
|
|
76
|
+
|
|
77
|
+
- **`@alxia/react-router/pwa/worker`.** `startWorker({ contract })` is the
|
|
78
|
+
whole service worker on Workbox: the precache, a page load always from the
|
|
79
|
+
network with the offline page when it fails, hashed bundles cache-first,
|
|
80
|
+
other static files stale-while-revalidate, and the update applied on
|
|
81
|
+
request. An app's `app/service-worker.ts` is a few lines; the `workbox-*`
|
|
82
|
+
packages are optional peers ([guide](guide/pwa.md)).
|
|
83
|
+
- **`@alxia/react-router/pwa/build`.** `buildWorker({ file })` bundles the
|
|
84
|
+
worker after `react-router build`, with the precache list written in: the
|
|
85
|
+
offline page, every route's code and the fonts you name.
|
|
86
|
+
- **`alxia({ worker })`.** With `app/service-worker.ts` in the app,
|
|
87
|
+
`react-router build` writes `build/client/service-worker.js` itself, with
|
|
88
|
+
no script to add; `worker` names another file, tunes the build or turns
|
|
89
|
+
it off.
|
|
90
|
+
|
|
58
91
|
### 0.9.0
|
|
59
92
|
|
|
60
93
|
- **`@alxia/react-router/pwa`.** The code with no UI an installable app
|