@softistx/alxia-react-router 0.0.0-stage → 0.83.1
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/LICENSE +21 -0
- package/README.md +2085 -2
- package/dist/api-keys/api-keys.d.ts +93 -0
- package/dist/api-keys/api-keys.d.ts.map +1 -0
- package/dist/api-keys/index.d.ts +9 -0
- package/dist/api-keys/index.d.ts.map +1 -0
- package/dist/api-keys/index.js +66 -0
- package/dist/api-keys/index.js.map +10 -0
- package/dist/assets.d.ts +14 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/chunks/index-0786n4qe.js +25 -0
- package/dist/chunks/index-0786n4qe.js.map +10 -0
- package/dist/chunks/index-1nw5yeek.js +169 -0
- package/dist/chunks/index-1nw5yeek.js.map +11 -0
- 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-6jf7zpxz.js +119 -0
- package/dist/chunks/index-6jf7zpxz.js.map +11 -0
- package/dist/chunks/index-8as4j8m3.js +340 -0
- package/dist/chunks/index-8as4j8m3.js.map +16 -0
- package/dist/chunks/index-9xv2a8et.js +108 -0
- package/dist/chunks/index-9xv2a8et.js.map +11 -0
- package/dist/chunks/index-ajtvyq35.js +16 -0
- package/dist/chunks/index-ajtvyq35.js.map +10 -0
- package/dist/chunks/index-c55hxgr5.js +124 -0
- package/dist/chunks/index-c55hxgr5.js.map +14 -0
- package/dist/chunks/index-d42p3mdp.js +19 -0
- package/dist/chunks/index-d42p3mdp.js.map +10 -0
- package/dist/chunks/index-gac44rs5.js +42 -0
- package/dist/chunks/index-gac44rs5.js.map +11 -0
- package/dist/chunks/index-j4ktpcke.js +62 -0
- package/dist/chunks/index-j4ktpcke.js.map +10 -0
- package/dist/chunks/index-mscfme4r.js +12 -0
- package/dist/chunks/index-mscfme4r.js.map +10 -0
- package/dist/chunks/index-pghmb2dm.js +30 -0
- package/dist/chunks/index-pghmb2dm.js.map +10 -0
- package/dist/chunks/index-rfr02vg4.js +40 -0
- package/dist/chunks/index-rfr02vg4.js.map +10 -0
- package/dist/chunks/index-sfhshxqz.js +31 -0
- package/dist/chunks/index-sfhshxqz.js.map +10 -0
- package/dist/chunks/index-skwypsjz.js +357 -0
- package/dist/chunks/index-skwypsjz.js.map +12 -0
- package/dist/chunks/index-sxh06ged.js +118 -0
- package/dist/chunks/index-sxh06ged.js.map +11 -0
- package/dist/chunks/index-t2ph23wk.js +96 -0
- package/dist/chunks/index-t2ph23wk.js.map +13 -0
- package/dist/chunks/index-thyabr5n.js +19 -0
- package/dist/chunks/index-thyabr5n.js.map +10 -0
- package/dist/chunks/index-tx36swjx.js +134 -0
- package/dist/chunks/index-tx36swjx.js.map +11 -0
- package/dist/chunks/index-v2z5k640.js +54 -0
- package/dist/chunks/index-v2z5k640.js.map +11 -0
- package/dist/chunks/index-vr82typq.js +23 -0
- package/dist/chunks/index-vr82typq.js.map +11 -0
- package/dist/chunks/index-whj6h5eg.js +9 -0
- package/dist/chunks/index-whj6h5eg.js.map +10 -0
- package/dist/chunks/index-wyypkfdv.js +130 -0
- package/dist/chunks/index-wyypkfdv.js.map +13 -0
- package/dist/chunks/index-xd5aqy3g.js +90 -0
- package/dist/chunks/index-xd5aqy3g.js.map +10 -0
- package/dist/chunks/index-zdbqzcjp.js +97 -0
- package/dist/chunks/index-zdbqzcjp.js.map +12 -0
- package/dist/chunks/index-zyg8amjc.js +23 -0
- package/dist/chunks/index-zyg8amjc.js.map +10 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +215 -0
- package/dist/cli/index.js.map +13 -0
- package/dist/cli/main.d.ts +13 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/reveal.d.ts +18 -0
- package/dist/cli/reveal.d.ts.map +1 -0
- package/dist/cli/template.d.ts +8 -0
- package/dist/cli/template.d.ts.map +1 -0
- package/dist/context.d.ts +104 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/document/index.d.ts +11 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/index.js +19 -0
- package/dist/document/index.js.map +9 -0
- package/dist/document/inline-script.d.ts +27 -0
- package/dist/document/inline-script.d.ts.map +1 -0
- package/dist/document/language-store.d.ts +8 -0
- package/dist/document/language-store.d.ts.map +1 -0
- package/dist/document/nonce.d.ts +34 -0
- package/dist/document/nonce.d.ts.map +1 -0
- package/dist/document/page-language.d.ts +39 -0
- package/dist/document/page-language.d.ts.map +1 -0
- package/dist/document/text-direction.d.ts +10 -0
- package/dist/document/text-direction.d.ts.map +1 -0
- package/dist/entry/abort.d.ts +21 -0
- package/dist/entry/abort.d.ts.map +1 -0
- package/dist/entry/create-entry.d.ts +41 -0
- package/dist/entry/create-entry.d.ts.map +1 -0
- package/dist/entry/index.d.ts +8 -0
- package/dist/entry/index.d.ts.map +1 -0
- package/dist/entry/index.js +154 -0
- package/dist/entry/index.js.map +13 -0
- package/dist/entry/root-data.d.ts +27 -0
- package/dist/entry/root-data.d.ts.map +1 -0
- package/dist/entry/whole-page.d.ts +10 -0
- package/dist/entry/whole-page.d.ts.map +1 -0
- package/dist/errors/api-error.d.ts +117 -0
- package/dist/errors/api-error.d.ts.map +1 -0
- package/dist/errors/api-errors.d.ts +122 -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/cross-site.d.ts +8 -0
- package/dist/errors/cross-site.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 +33 -0
- package/dist/errors/fetcher-result.d.ts.map +1 -0
- package/dist/errors/field-placement.d.ts +12 -0
- package/dist/errors/field-placement.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/form-refusal.d.ts +25 -0
- package/dist/errors/form-refusal.d.ts.map +1 -0
- package/dist/errors/index.d.ts +21 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +588 -0
- package/dist/errors/index.js.map +26 -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/problem-error.d.ts +50 -0
- package/dist/errors/problem-error.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 +33 -0
- package/dist/errors/route-error.d.ts.map +1 -0
- package/dist/errors/route-refusal.d.ts +20 -0
- package/dist/errors/route-refusal.d.ts.map +1 -0
- package/dist/errors/same-site.d.ts +49 -0
- package/dist/errors/same-site.d.ts.map +1 -0
- package/dist/errors/section-action.d.ts +46 -0
- package/dist/errors/section-action.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/upstream-headers.d.ts +18 -0
- package/dist/errors/upstream-headers.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/fetcher/auth-refusal.d.ts +29 -0
- package/dist/fetcher/auth-refusal.d.ts.map +1 -0
- package/dist/fetcher/index.d.ts +20 -0
- package/dist/fetcher/index.d.ts.map +1 -0
- package/dist/fetcher/index.js +392 -0
- package/dist/fetcher/index.js.map +21 -0
- package/dist/fetcher/section-form.d.ts +24 -0
- package/dist/fetcher/section-form.d.ts.map +1 -0
- package/dist/fetcher/section-reload.d.ts +17 -0
- package/dist/fetcher/section-reload.d.ts.map +1 -0
- package/dist/fetcher/section-save.d.ts +29 -0
- package/dist/fetcher/section-save.d.ts.map +1 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts +57 -0
- package/dist/fetcher/use-debounced-fetcher.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-answer.d.ts +16 -0
- package/dist/fetcher/use-fetcher-answer.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-done.d.ts +15 -0
- package/dist/fetcher/use-fetcher-done.d.ts.map +1 -0
- package/dist/fetcher/use-fetcher-promise.d.ts +48 -0
- package/dist/fetcher/use-fetcher-promise.d.ts.map +1 -0
- package/dist/fetcher/use-form-refusal.d.ts +20 -0
- package/dist/fetcher/use-form-refusal.d.ts.map +1 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts +20 -0
- package/dist/fetcher/use-revalidate-on-focus.d.ts.map +1 -0
- package/dist/fetcher/use-row-save.d.ts +32 -0
- package/dist/fetcher/use-row-save.d.ts.map +1 -0
- package/dist/fetcher/use-section-save.d.ts +46 -0
- package/dist/fetcher/use-section-save.d.ts.map +1 -0
- package/dist/fetcher/use-visible-interval.d.ts +24 -0
- package/dist/fetcher/use-visible-interval.d.ts.map +1 -0
- package/dist/fetcher/use-visible-revalidation.d.ts +10 -0
- package/dist/fetcher/use-visible-revalidation.d.ts.map +1 -0
- package/dist/health.d.ts +21 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/help/check/check.d.ts +35 -0
- package/dist/help/check/check.d.ts.map +1 -0
- package/dist/help/check/index.d.ts +8 -0
- package/dist/help/check/index.d.ts.map +1 -0
- package/dist/help/check/index.js +17 -0
- package/dist/help/check/index.js.map +9 -0
- package/dist/help/check/routes.d.ts +22 -0
- package/dist/help/check/routes.d.ts.map +1 -0
- package/dist/help/guide.d.ts +33 -0
- package/dist/help/guide.d.ts.map +1 -0
- package/dist/help/index.d.ts +16 -0
- package/dist/help/index.d.ts.map +1 -0
- package/dist/help/index.js +192 -0
- package/dist/help/index.js.map +14 -0
- package/dist/help/load.d.ts +39 -0
- package/dist/help/load.d.ts.map +1 -0
- package/dist/help/panel.d.ts +69 -0
- package/dist/help/panel.d.ts.map +1 -0
- package/dist/help/parse-flow.d.ts +27 -0
- package/dist/help/parse-flow.d.ts.map +1 -0
- package/dist/help/react.d.ts +12 -0
- package/dist/help/react.d.ts.map +1 -0
- package/dist/help/resolve.d.ts +24 -0
- package/dist/help/resolve.d.ts.map +1 -0
- package/dist/help/types.d.ts +50 -0
- package/dist/help/types.d.ts.map +1 -0
- package/dist/help/yaml.d.ts +18 -0
- package/dist/help/yaml.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +197 -0
- package/dist/index.js.map +14 -0
- package/dist/link/index.d.ts +7 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +16 -0
- package/dist/link/index.js.map +10 -0
- package/dist/link/router-link.d.ts +27 -0
- package/dist/link/router-link.d.ts.map +1 -0
- package/dist/lists/connection-page.d.ts +50 -0
- package/dist/lists/connection-page.d.ts.map +1 -0
- package/dist/lists/index.d.ts +13 -0
- package/dist/lists/index.d.ts.map +1 -0
- package/dist/lists/index.js +205 -0
- package/dist/lists/index.js.map +15 -0
- package/dist/lists/newest-first.d.ts +5 -0
- package/dist/lists/newest-first.d.ts.map +1 -0
- package/dist/lists/nodes-of.d.ts +21 -0
- package/dist/lists/nodes-of.d.ts.map +1 -0
- package/dist/lists/or-failed.d.ts +19 -0
- package/dist/lists/or-failed.d.ts.map +1 -0
- package/dist/lists/use-paged-rows.d.ts +40 -0
- package/dist/lists/use-paged-rows.d.ts.map +1 -0
- package/dist/lists/use-same-route-loading.d.ts +8 -0
- package/dist/lists/use-same-route-loading.d.ts.map +1 -0
- package/dist/lists/use-search-change.d.ts +20 -0
- package/dist/lists/use-search-change.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +105 -0
- package/dist/mcp/index.js.map +11 -0
- package/dist/mcp/mcp-relay.d.ts +58 -0
- package/dist/mcp/mcp-relay.d.ts.map +1 -0
- package/dist/mcp/relay.d.ts +38 -0
- package/dist/mcp/relay.d.ts.map +1 -0
- package/dist/media/client/error.d.ts +29 -0
- package/dist/media/client/error.d.ts.map +1 -0
- package/dist/media/client/index.d.ts +8 -0
- package/dist/media/client/index.d.ts.map +1 -0
- package/dist/media/client/index.js +133 -0
- package/dist/media/client/index.js.map +11 -0
- package/dist/media/client/upload.d.ts +32 -0
- package/dist/media/client/upload.d.ts.map +1 -0
- package/dist/media/forward.d.ts +14 -0
- package/dist/media/forward.d.ts.map +1 -0
- package/dist/media/headers.d.ts +11 -0
- package/dist/media/headers.d.ts.map +1 -0
- package/dist/media/index.d.ts +9 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +396 -0
- package/dist/media/index.js.map +16 -0
- package/dist/media/options.d.ts +114 -0
- package/dist/media/options.d.ts.map +1 -0
- package/dist/media/path.d.ts +12 -0
- package/dist/media/path.d.ts.map +1 -0
- package/dist/media/read.d.ts +11 -0
- package/dist/media/read.d.ts.map +1 -0
- package/dist/media/refusal.d.ts +11 -0
- package/dist/media/refusal.d.ts.map +1 -0
- package/dist/media/respond.d.ts +8 -0
- package/dist/media/respond.d.ts.map +1 -0
- package/dist/media/write.d.ts +13 -0
- package/dist/media/write.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +9 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +48 -0
- package/dist/navigation/index.js.map +11 -0
- package/dist/navigation/use-focus-on-navigate.d.ts +16 -0
- package/dist/navigation/use-focus-on-navigate.d.ts.map +1 -0
- package/dist/navigation/use-route-transition.d.ts +19 -0
- package/dist/navigation/use-route-transition.d.ts.map +1 -0
- package/dist/nonce.d.ts +16 -0
- package/dist/nonce.d.ts.map +1 -0
- package/dist/oauth/answer.d.ts +33 -0
- package/dist/oauth/answer.d.ts.map +1 -0
- package/dist/oauth/binding.d.ts +43 -0
- package/dist/oauth/binding.d.ts.map +1 -0
- package/dist/oauth/consent.d.ts +134 -0
- package/dist/oauth/consent.d.ts.map +1 -0
- package/dist/oauth/grants.d.ts +88 -0
- package/dist/oauth/grants.d.ts.map +1 -0
- package/dist/oauth/index.d.ts +16 -0
- package/dist/oauth/index.d.ts.map +1 -0
- package/dist/oauth/index.js +207 -0
- package/dist/oauth/index.js.map +12 -0
- package/dist/oauth/model.d.ts +13 -0
- package/dist/oauth/model.d.ts.map +1 -0
- package/dist/oauth/react/index.d.ts +7 -0
- package/dist/oauth/react/index.d.ts.map +1 -0
- package/dist/oauth/react/index.js +99 -0
- package/dist/oauth/react/index.js.map +10 -0
- package/dist/oauth/react/use-consent.d.ts +52 -0
- package/dist/oauth/react/use-consent.d.ts.map +1 -0
- package/dist/oidc/dpop.d.ts +80 -0
- package/dist/oidc/dpop.d.ts.map +1 -0
- package/dist/oidc/errors.d.ts +16 -0
- package/dist/oidc/errors.d.ts.map +1 -0
- package/dist/oidc/flow.d.ts +59 -0
- package/dist/oidc/flow.d.ts.map +1 -0
- package/dist/oidc/index.d.ts +11 -0
- package/dist/oidc/index.d.ts.map +1 -0
- package/dist/oidc/index.js +742 -0
- package/dist/oidc/index.js.map +15 -0
- package/dist/oidc/oidc.d.ts +132 -0
- package/dist/oidc/oidc.d.ts.map +1 -0
- package/dist/oidc/revoke.d.ts +28 -0
- package/dist/oidc/revoke.d.ts.map +1 -0
- package/dist/oidc/seal.d.ts +20 -0
- package/dist/oidc/seal.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.d.ts +16 -0
- package/dist/pwa/index.d.ts.map +1 -0
- package/dist/pwa/index.js +110 -0
- package/dist/pwa/index.js.map +12 -0
- package/dist/pwa/model/caching.d.ts +46 -0
- package/dist/pwa/model/caching.d.ts.map +1 -0
- package/dist/pwa/model/clear-app-caches.d.ts +9 -0
- package/dist/pwa/model/clear-app-caches.d.ts.map +1 -0
- package/dist/pwa/model/font-precache.d.ts +15 -0
- package/dist/pwa/model/font-precache.d.ts.map +1 -0
- package/dist/pwa/model/manifest.d.ts +80 -0
- package/dist/pwa/model/manifest.d.ts.map +1 -0
- package/dist/pwa/model/precache-list.d.ts +40 -0
- package/dist/pwa/model/precache-list.d.ts.map +1 -0
- package/dist/pwa/model/registration.d.ts +39 -0
- package/dist/pwa/model/registration.d.ts.map +1 -0
- package/dist/pwa/model/start-service-worker.d.ts +24 -0
- package/dist/pwa/model/start-service-worker.d.ts.map +1 -0
- package/dist/pwa/model/storable.d.ts +8 -0
- package/dist/pwa/model/storable.d.ts.map +1 -0
- package/dist/pwa/model/theme-color.d.ts +20 -0
- package/dist/pwa/model/theme-color.d.ts.map +1 -0
- package/dist/pwa/model/update-notice.d.ts +38 -0
- package/dist/pwa/model/update-notice.d.ts.map +1 -0
- package/dist/pwa/model/worker-contract.d.ts +61 -0
- package/dist/pwa/model/worker-contract.d.ts.map +1 -0
- package/dist/pwa/react/index.d.ts +9 -0
- package/dist/pwa/react/index.d.ts.map +1 -0
- package/dist/pwa/react/index.js +75 -0
- package/dist/pwa/react/index.js.map +13 -0
- package/dist/pwa/react/use-online.d.ts +6 -0
- package/dist/pwa/react/use-online.d.ts.map +1 -0
- package/dist/pwa/react/use-service-worker.d.ts +33 -0
- package/dist/pwa/react/use-service-worker.d.ts.map +1 -0
- package/dist/pwa/react/use-update-notice.d.ts +14 -0
- package/dist/pwa/react/use-update-notice.d.ts.map +1 -0
- package/dist/pwa/server/index.d.ts +7 -0
- package/dist/pwa/server/index.d.ts.map +1 -0
- package/dist/pwa/server/index.js +18 -0
- package/dist/pwa/server/index.js.map +10 -0
- package/dist/pwa/server/no-cache.d.ts +22 -0
- package/dist/pwa/server/no-cache.d.ts.map +1 -0
- 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/react-router.d.ts +68 -0
- package/dist/react-router.d.ts.map +1 -0
- package/dist/server.d.ts +127 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/session/codes.d.ts +9 -0
- package/dist/session/codes.d.ts.map +1 -0
- package/dist/session/cookies.d.ts +128 -0
- package/dist/session/cookies.d.ts.map +1 -0
- package/dist/session/flow-types.d.ts +235 -0
- package/dist/session/flow-types.d.ts.map +1 -0
- package/dist/session/guard.d.ts +10 -0
- package/dist/session/guard.d.ts.map +1 -0
- package/dist/session/index.d.ts +22 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +1090 -0
- package/dist/session/index.js.map +27 -0
- package/dist/session/land.d.ts +28 -0
- package/dist/session/land.d.ts.map +1 -0
- package/dist/session/link-json.d.ts +22 -0
- package/dist/session/link-json.d.ts.map +1 -0
- package/dist/session/link-land.d.ts +20 -0
- package/dist/session/link-land.d.ts.map +1 -0
- package/dist/session/link-token.d.ts +24 -0
- package/dist/session/link-token.d.ts.map +1 -0
- package/dist/session/link-types.d.ts +142 -0
- package/dist/session/link-types.d.ts.map +1 -0
- package/dist/session/links.d.ts +14 -0
- package/dist/session/links.d.ts.map +1 -0
- package/dist/session/model/index.d.ts +8 -0
- package/dist/session/model/index.d.ts.map +1 -0
- package/dist/session/model/index.js +35 -0
- package/dist/session/model/index.js.map +9 -0
- package/dist/session/model/link-post.d.ts +35 -0
- package/dist/session/model/link-post.d.ts.map +1 -0
- package/dist/session/model/paths.d.ts +24 -0
- package/dist/session/model/paths.d.ts.map +1 -0
- package/dist/session/model/safe-next.d.ts +15 -0
- package/dist/session/model/safe-next.d.ts.map +1 -0
- package/dist/session/model/second-factor.d.ts +16 -0
- package/dist/session/model/second-factor.d.ts.map +1 -0
- package/dist/session/model/site-path.d.ts +10 -0
- package/dist/session/model/site-path.d.ts.map +1 -0
- package/dist/session/model/step-up-answers.d.ts +45 -0
- package/dist/session/model/step-up-answers.d.ts.map +1 -0
- package/dist/session/model/step-up-props.d.ts +22 -0
- package/dist/session/model/step-up-props.d.ts.map +1 -0
- package/dist/session/model/step-up.d.ts +48 -0
- package/dist/session/model/step-up.d.ts.map +1 -0
- package/dist/session/react/index.d.ts +13 -0
- package/dist/session/react/index.d.ts.map +1 -0
- package/dist/session/react/index.js +196 -0
- package/dist/session/react/index.js.map +14 -0
- package/dist/session/react/step-up/answers.d.ts +9 -0
- package/dist/session/react/step-up/answers.d.ts.map +1 -0
- package/dist/session/react/step-up/dialog-props.d.ts +27 -0
- package/dist/session/react/step-up/dialog-props.d.ts.map +1 -0
- package/dist/session/react/step-up/index.d.ts +7 -0
- package/dist/session/react/step-up/index.d.ts.map +1 -0
- package/dist/session/react/step-up/pending-runs.d.ts +21 -0
- package/dist/session/react/step-up/pending-runs.d.ts.map +1 -0
- package/dist/session/react/step-up/phase.d.ts +8 -0
- package/dist/session/react/step-up/phase.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts +59 -0
- package/dist/session/react/step-up/use-step-up-replay.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts +70 -0
- package/dist/session/react/step-up/use-step-up-runner.d.ts.map +1 -0
- package/dist/session/react/step-up/use-step-up.d.ts +51 -0
- package/dist/session/react/step-up/use-step-up.d.ts.map +1 -0
- package/dist/session/react/use-code-field.d.ts +37 -0
- package/dist/session/react/use-code-field.d.ts.map +1 -0
- package/dist/session/react/use-link-fragment.d.ts +22 -0
- package/dist/session/react/use-link-fragment.d.ts.map +1 -0
- package/dist/session/react/use-link-param.d.ts +26 -0
- package/dist/session/react/use-link-param.d.ts.map +1 -0
- package/dist/session/react/use-link-post.d.ts +39 -0
- package/dist/session/react/use-link-post.d.ts.map +1 -0
- package/dist/session/react/use-sign-out.d.ts +46 -0
- package/dist/session/react/use-sign-out.d.ts.map +1 -0
- package/dist/session/second-factor.d.ts +22 -0
- package/dist/session/second-factor.d.ts.map +1 -0
- package/dist/session/serialize.d.ts +42 -0
- package/dist/session/serialize.d.ts.map +1 -0
- package/dist/session/sign-in.d.ts +19 -0
- package/dist/session/sign-in.d.ts.map +1 -0
- package/dist/session/signed.d.ts +44 -0
- package/dist/session/signed.d.ts.map +1 -0
- package/dist/session/social-flow.d.ts +22 -0
- package/dist/session/social-flow.d.ts.map +1 -0
- package/dist/session/social-land.d.ts +31 -0
- package/dist/session/social-land.d.ts.map +1 -0
- package/dist/session/social-types.d.ts +136 -0
- package/dist/session/social-types.d.ts.map +1 -0
- package/dist/session/social.d.ts +32 -0
- package/dist/session/social.d.ts.map +1 -0
- package/dist/session/step-up-codes.d.ts +9 -0
- package/dist/session/step-up-codes.d.ts.map +1 -0
- package/dist/session/step-up-signed-out.d.ts +21 -0
- package/dist/session/step-up-signed-out.d.ts.map +1 -0
- package/dist/session/step-up-types.d.ts +127 -0
- package/dist/session/step-up-types.d.ts.map +1 -0
- package/dist/session/step-up.d.ts +17 -0
- package/dist/session/step-up.d.ts.map +1 -0
- package/dist/session/step.d.ts +22 -0
- package/dist/session/step.d.ts.map +1 -0
- package/dist/session/throttle.d.ts +73 -0
- package/dist/session/throttle.d.ts.map +1 -0
- package/dist/session/timed-wait.d.ts +4 -0
- package/dist/session/timed-wait.d.ts.map +1 -0
- package/dist/session/viewer.d.ts +34 -0
- package/dist/session/viewer.d.ts.map +1 -0
- package/dist/subscription/documents.d.ts +3 -0
- package/dist/subscription/documents.d.ts.map +1 -0
- package/dist/subscription/index.d.ts +7 -0
- package/dist/subscription/index.d.ts.map +1 -0
- package/dist/subscription/index.js +359 -0
- package/dist/subscription/index.js.map +14 -0
- package/dist/subscription/proxy.d.ts +54 -0
- package/dist/subscription/proxy.d.ts.map +1 -0
- package/dist/subscription/react/backoff.d.ts +8 -0
- package/dist/subscription/react/backoff.d.ts.map +1 -0
- package/dist/subscription/react/classify.d.ts +15 -0
- package/dist/subscription/react/classify.d.ts.map +1 -0
- package/dist/subscription/react/controller.d.ts +40 -0
- package/dist/subscription/react/controller.d.ts.map +1 -0
- package/dist/subscription/react/fake-timers.d.ts +8 -0
- package/dist/subscription/react/fake-timers.d.ts.map +1 -0
- package/dist/subscription/react/index.d.ts +15 -0
- package/dist/subscription/react/index.d.ts.map +1 -0
- package/dist/subscription/react/index.js +227 -0
- package/dist/subscription/react/index.js.map +17 -0
- package/dist/subscription/react/reconnect.d.ts +9 -0
- package/dist/subscription/react/reconnect.d.ts.map +1 -0
- package/dist/subscription/react/scheduler.d.ts +13 -0
- package/dist/subscription/react/scheduler.d.ts.map +1 -0
- package/dist/subscription/react/timers.d.ts +7 -0
- package/dist/subscription/react/timers.d.ts.map +1 -0
- package/dist/subscription/react/use-live-subscription.d.ts +36 -0
- package/dist/subscription/react/use-live-subscription.d.ts.map +1 -0
- package/dist/subscription/react/versions.d.ts +6 -0
- package/dist/subscription/react/versions.d.ts.map +1 -0
- package/dist/subscription/read.d.ts +17 -0
- package/dist/subscription/read.d.ts.map +1 -0
- package/dist/subscription/refusal.d.ts +11 -0
- package/dist/subscription/refusal.d.ts.map +1 -0
- package/dist/subscription/relay.d.ts +16 -0
- package/dist/subscription/relay.d.ts.map +1 -0
- package/dist/vite/bun.d.ts +21 -0
- package/dist/vite/bun.d.ts.map +1 -0
- package/dist/vite/bundle.d.ts +33 -0
- package/dist/vite/bundle.d.ts.map +1 -0
- package/dist/vite/compress.d.ts +18 -0
- package/dist/vite/compress.d.ts.map +1 -0
- package/dist/vite/config.d.ts +33 -0
- package/dist/vite/config.d.ts.map +1 -0
- package/dist/vite/dev.d.ts +28 -0
- package/dist/vite/dev.d.ts.map +1 -0
- package/dist/vite/entry.d.ts +20 -0
- package/dist/vite/entry.d.ts.map +1 -0
- package/dist/vite/hosts.d.ts +16 -0
- package/dist/vite/hosts.d.ts.map +1 -0
- package/dist/vite/index.d.ts +68 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +635 -0
- package/dist/vite/index.js.map +22 -0
- package/dist/vite/inline.d.ts +18 -0
- package/dist/vite/inline.d.ts.map +1 -0
- package/dist/vite/node.d.ts +16 -0
- package/dist/vite/node.d.ts.map +1 -0
- package/dist/vite/preview.d.ts +8 -0
- package/dist/vite/preview.d.ts.map +1 -0
- package/dist/vite/runtime.d.ts +8 -0
- package/dist/vite/runtime.d.ts.map +1 -0
- package/dist/vite/socket.d.ts +75 -0
- package/dist/vite/socket.d.ts.map +1 -0
- package/dist/vite/worker.d.ts +16 -0
- package/dist/vite/worker.d.ts.map +1 -0
- package/dist/with-alxia.d.ts +36 -0
- package/dist/with-alxia.d.ts.map +1 -0
- package/docs/README.md +42 -0
- package/docs/guide/api-keys.md +216 -0
- package/docs/guide/beside-the-pages.md +201 -0
- package/docs/guide/csp-nonce.md +166 -0
- package/docs/guide/customising-the-server.md +324 -0
- package/docs/guide/deploying.md +102 -0
- package/docs/guide/document.md +334 -0
- package/docs/guide/errors.md +1147 -0
- package/docs/guide/fetcher.md +355 -0
- package/docs/guide/getting-started.md +112 -0
- package/docs/guide/help.md +325 -0
- package/docs/guide/how-it-works.md +274 -0
- package/docs/guide/link.md +32 -0
- package/docs/guide/lists.md +225 -0
- package/docs/guide/mcp.md +173 -0
- package/docs/guide/media.md +273 -0
- package/docs/guide/navigation.md +52 -0
- package/docs/guide/oauth.md +342 -0
- package/docs/guide/oidc.md +262 -0
- package/docs/guide/openapi.md +51 -0
- package/docs/guide/pwa.md +670 -0
- package/docs/guide/session.md +2105 -0
- package/docs/guide/subscriptions.md +211 -0
- package/docs/guide/testing.md +42 -0
- package/docs/guide/typing-the-loaders.md +311 -0
- package/docs/guide.md +82 -0
- package/docs/roadmap.md +474 -0
- package/docs/troubleshooting.md +3837 -0
- package/package.json +301 -5
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# A user's API keys
|
|
2
|
+
|
|
3
|
+
An app whose users hand a credential to a tool (an MCP client, a script) lists
|
|
4
|
+
their API keys, creates one and revokes one. The API serves the calls; the
|
|
5
|
+
steps around them are the same in every app, so `@softistx/alxia-react-router/api-keys`
|
|
6
|
+
holds them: the list newest first, a creation whose secret is shown once and
|
|
7
|
+
never cached, a creation or a revocation refused for a session not confirmed
|
|
8
|
+
lately and posted again after the step-up, and a revocation of a key the API
|
|
9
|
+
no longer knows that counts as done. The page (the table, the form, the
|
|
10
|
+
words) stays yours.
|
|
11
|
+
|
|
12
|
+
It imports `react-router` and nothing else. The page's step-up is
|
|
13
|
+
`useStepUpReplay` of `@softistx/alxia-react-router/session/react`.
|
|
14
|
+
|
|
15
|
+
## The route's server side
|
|
16
|
+
|
|
17
|
+
`apiKeys` takes your GraphQL calls as functions, typed by your own generated
|
|
18
|
+
documents, and returns `list`, `create` and `revoke`:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
// app/routes/account/keys.server.ts
|
|
22
|
+
import { apiKeys } from '@softistx/alxia-react-router/api-keys';
|
|
23
|
+
|
|
24
|
+
export const keys = apiKeys({
|
|
25
|
+
errors, // your createApiErrors(...)
|
|
26
|
+
list: async (caller: Caller) => (await execute(ApiKeysQuery, {}, caller)).apiKeys,
|
|
27
|
+
create: async (caller, input: { name: string }) =>
|
|
28
|
+
(await execute(CreateApiKeyMutation, { input }, caller)).createApiKey, // { secret, apiKey }
|
|
29
|
+
revoke: (caller, id) => execute(RevokeApiKeyMutation, { id }, caller),
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Each function receives the `ctx` you pass to the route's method (here a
|
|
34
|
+
caller, or `{ caller, userId }` for an admin's view of another account).
|
|
35
|
+
`create` returns `{ secret, apiKey }`; `apiKey` is whatever your list returns
|
|
36
|
+
and needs an `id` and a `createdAt` (an ISO date).
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// app/routes/account/keys.tsx
|
|
40
|
+
import { data } from 'react-router';
|
|
41
|
+
import { alxiaOf } from '@softistx/alxia-react-router';
|
|
42
|
+
import { jsonActions } from '@softistx/alxia-react-router/errors';
|
|
43
|
+
import type { Route } from './+types/keys';
|
|
44
|
+
import { keys } from './keys.server';
|
|
45
|
+
|
|
46
|
+
export async function loader({ request }: Route.LoaderArgs) {
|
|
47
|
+
const { viewer, headers } = await requireViewer(request);
|
|
48
|
+
const list = await keys.list(sessionCaller(request));
|
|
49
|
+
return data({ viewer, keys: list }, { headers: { ...headers, 'Cache-Control': 'no-store' } });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const { readJson } = jsonActions();
|
|
53
|
+
|
|
54
|
+
export async function action({ context, request }: Route.ActionArgs) {
|
|
55
|
+
// the same-site check and the JSON content type, before the body is read
|
|
56
|
+
const body = (await readJson(request)) as { intent?: string; id?: unknown; name?: unknown };
|
|
57
|
+
const caller = sessionCaller(request);
|
|
58
|
+
const { language } = alxiaOf(context);
|
|
59
|
+
return body.intent === 'revoke-key'
|
|
60
|
+
? keys.revoke(caller, String(body.id), language)
|
|
61
|
+
: keys.create(caller, { name: String(body.name) }, language);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`apiKeys` reads no body: the action does, through `jsonActions()`'s
|
|
66
|
+
`readJson`, which refuses another site (403) and a body that is not JSON
|
|
67
|
+
before anything is created or revoked. Never read it with a bare
|
|
68
|
+
`request.json()`.
|
|
69
|
+
|
|
70
|
+
## What each step answers
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import type { CreateKeyAnswer, RevokeKeyAnswer } from '@softistx/alxia-react-router/api-keys';
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Step | Answers | When |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| `list(ctx)` | the keys, newest first by `createdAt` | always; the array you return is not changed |
|
|
79
|
+
| `create(ctx, input, language)` | `{ ok: true, intent: 'create-key', secret, apiKey }`, with `Cache-Control: no-store` | the API made the key |
|
|
80
|
+
| | `{ ok: false, intent: 'create-key', stepUp: true, error: '' }`, status of the refusal | the session is not confirmed lately (`STEP_UP_REQUIRED`) |
|
|
81
|
+
| | `{ ok: false, intent: 'create-key', stepUp: false, error }`, status of the refusal | any other refusal of the API, worded by `errors` in `language` |
|
|
82
|
+
| `revoke(ctx, id, language)` | `{ ok: true, intent: 'revoke-key', id, alreadyRevoked: false }` | the API revoked the key |
|
|
83
|
+
| | `{ ok: true, intent: 'revoke-key', id, alreadyRevoked: true }` | the API no longer knows the key (a 404, or what `notFound` accepts): what the user wanted is done |
|
|
84
|
+
| | `{ ok: false, intent: 'revoke-key', id, stepUp, error }`, status of the refusal | a step-up is due, or any other refusal |
|
|
85
|
+
|
|
86
|
+
A 401 and a failure that is not an API error (a network error, a bug) are
|
|
87
|
+
**thrown**, not answered: they go to your error boundary, as in the other
|
|
88
|
+
steps of this package.
|
|
89
|
+
|
|
90
|
+
| Option | Type | Default | Effect |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| `errors` | `createApiErrors()` | required | Words the refusals; only `apiRefusal` is used |
|
|
93
|
+
| `list` | `(ctx) => Promise<readonly K[]>` | required | The caller's keys, in any order |
|
|
94
|
+
| `create` | `(ctx, input) => Promise<{ secret, apiKey }>` | required | The creation; `input` is whatever your form posts |
|
|
95
|
+
| `revoke` | `(ctx, id) => Promise<unknown>` | required | The revocation |
|
|
96
|
+
| `notFound` | `(error) => boolean` | a 404 | Which refusal of `revoke` means the key is unknown |
|
|
97
|
+
| `stepUpRequired` | `string` | `STEP_UP_REQUIRED` | The API's step-up code |
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const keys = apiKeys({
|
|
101
|
+
errors,
|
|
102
|
+
list,
|
|
103
|
+
create,
|
|
104
|
+
revoke,
|
|
105
|
+
// an API that words "unknown key" with a code rather than a 404
|
|
106
|
+
notFound: (error) => error.code === 'api_key_not_found',
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## The page
|
|
111
|
+
|
|
112
|
+
The secret is in the answer of the creation, once. The page shows it from its
|
|
113
|
+
fetcher, and resets the fetcher when the user has copied it: nothing keeps it
|
|
114
|
+
afterwards, and the answer is `no-store`. A step-up is replayed with
|
|
115
|
+
`useStepUpReplay`: the dialog opens on a `stepUp` answer, and the same
|
|
116
|
+
creation or revocation is posted again once the session is confirmed (see
|
|
117
|
+
[the session guide](session.md#usestepupreplay)).
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
// app/routes/account/use-keys.ts
|
|
121
|
+
import { useRef } from 'react';
|
|
122
|
+
import { useFetcher } from 'react-router';
|
|
123
|
+
import type { CreateKeyAnswer, RevokeKeyAnswer } from '@softistx/alxia-react-router/api-keys';
|
|
124
|
+
import {
|
|
125
|
+
confirmAnswerOf,
|
|
126
|
+
requestAnswerOf,
|
|
127
|
+
useStepUpReplay,
|
|
128
|
+
} from '@softistx/alxia-react-router/session/react';
|
|
129
|
+
import type { action as stepUpAction } from '../step-up'; // the route with `stepUp.route`
|
|
130
|
+
|
|
131
|
+
type Post = { intent: 'create-key'; name: string } | { intent: 'revoke-key'; id: string };
|
|
132
|
+
|
|
133
|
+
export function useKeys() {
|
|
134
|
+
const fetcher = useFetcher<CreateKeyAnswer<{ id: string; createdAt: string }> | RevokeKeyAnswer>();
|
|
135
|
+
const request = useFetcher<typeof stepUpAction>({ key: 'step-up-request' });
|
|
136
|
+
const confirm = useFetcher<typeof stepUpAction>({ key: 'step-up-confirm' });
|
|
137
|
+
const last = useRef<Post | null>(null);
|
|
138
|
+
|
|
139
|
+
const post = (body: Post) => {
|
|
140
|
+
last.current = body;
|
|
141
|
+
void fetcher.submit(body, { method: 'post', encType: 'application/json' });
|
|
142
|
+
};
|
|
143
|
+
const toStepUp = (body: Record<string, unknown>) =>
|
|
144
|
+
void request.submit(body, { method: 'post', action: '/step-up', encType: 'application/json' });
|
|
145
|
+
|
|
146
|
+
const stepUp = useStepUpReplay({
|
|
147
|
+
answer: fetcher.state === 'idle' ? fetcher.data : undefined,
|
|
148
|
+
action: last.current ?? undefined,
|
|
149
|
+
replay: () => {
|
|
150
|
+
if (last.current) post(last.current);
|
|
151
|
+
},
|
|
152
|
+
request: {
|
|
153
|
+
post: () => toStepUp({ intent: 'request-step-up' }),
|
|
154
|
+
answer: requestAnswerOf(request.data),
|
|
155
|
+
busy: request.state !== 'idle',
|
|
156
|
+
reset: () => request.reset(),
|
|
157
|
+
},
|
|
158
|
+
confirm: {
|
|
159
|
+
post: (fields) =>
|
|
160
|
+
void confirm.submit(
|
|
161
|
+
{ intent: 'confirm-step-up', ...fields },
|
|
162
|
+
{ method: 'post', action: '/step-up', encType: 'application/json' },
|
|
163
|
+
),
|
|
164
|
+
answer: confirmAnswerOf(confirm.data),
|
|
165
|
+
busy: confirm.state !== 'idle',
|
|
166
|
+
reset: () => confirm.reset(),
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const answer = fetcher.state === 'idle' ? fetcher.data : undefined;
|
|
171
|
+
const created = answer?.ok && answer.intent === 'create-key' ? answer : undefined;
|
|
172
|
+
return {
|
|
173
|
+
create: (name: string) => post({ intent: 'create-key', name }),
|
|
174
|
+
revoke: (id: string) => post({ intent: 'revoke-key', id }),
|
|
175
|
+
/** The new key's secret: show it once, then call `dismiss`. */
|
|
176
|
+
secret: created?.secret,
|
|
177
|
+
/** A refusal worded for the user; empty while a step-up is open. */
|
|
178
|
+
error: answer && !answer.ok && !answer.stepUp ? answer.error : undefined,
|
|
179
|
+
busy: fetcher.state !== 'idle',
|
|
180
|
+
dismiss: () => fetcher.reset(),
|
|
181
|
+
dialogProps: stepUp.dialogProps,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The page passes `dialogProps` to your step-up dialog, shows `secret` in a
|
|
187
|
+
panel that says it will not be shown again, and calls `dismiss()` when the
|
|
188
|
+
user closes it. The table reads the loader's `keys`, which React Router
|
|
189
|
+
reloads after the action.
|
|
190
|
+
|
|
191
|
+
## The signatures
|
|
192
|
+
|
|
193
|
+
```ts
|
|
194
|
+
export function apiKeys<L extends string, Ctx, K extends ApiKeyLike, Input>(
|
|
195
|
+
options: ApiKeysOptions<L, Ctx, K, Input>,
|
|
196
|
+
): ApiKeysRoute<L, Ctx, K, Input>;
|
|
197
|
+
|
|
198
|
+
interface ApiKeysRoute<L extends string, Ctx, K extends ApiKeyLike, Input> {
|
|
199
|
+
list(ctx: Ctx): Promise<K[]>;
|
|
200
|
+
create(ctx: Ctx, input: Input, language: L): Promise<DataWithResponseInit<CreateKeyAnswer<K>>>;
|
|
201
|
+
revoke(ctx: Ctx, id: string, language: L): Promise<DataWithResponseInit<RevokeKeyAnswer>>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface ApiKeyLike {
|
|
205
|
+
readonly id: string;
|
|
206
|
+
readonly createdAt: string;
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`ApiKeysOptions`, `ApiKeysRoute`, `ApiKeyLike`, `CreatedApiKey`,
|
|
211
|
+
`CreateKeyAnswer` and `RevokeKeyAnswer` are exported with `apiKeys`.
|
|
212
|
+
|
|
213
|
+
`apiKeys` does not check the viewer or the request: run your sign-in step
|
|
214
|
+
first, as the loader above does, and your same-site check on the action.
|
|
215
|
+
For an app that is also an OAuth server, the other credentials a user holds
|
|
216
|
+
are listed by `oauthGrants` ([the OAuth guide](oauth.md#connected-apps)).
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Beside the pages
|
|
2
|
+
|
|
3
|
+
This page covers what runs around and beside the pages: the middlewares
|
|
4
|
+
before the catch-all, routes of the app's own, WebSockets in dev, in preview
|
|
5
|
+
and in the build, and the client's files.
|
|
6
|
+
|
|
7
|
+
## Middlewares around the pages
|
|
8
|
+
|
|
9
|
+
Every middleware declared before the catch-all runs around each page, as around
|
|
10
|
+
any route, and `use` observers go first so they wrap everything:
|
|
11
|
+
|
|
12
|
+
- **`@softistx/alxia-logger`** writes one entry per request and sets
|
|
13
|
+
`x-request-id`. It times a streamed page by its first byte, since
|
|
14
|
+
the response is settled when its headers leave. Every request is logged,
|
|
15
|
+
404s and errors included.
|
|
16
|
+
- **`@softistx/alxia-compress`** compresses documents and data, and flushes a
|
|
17
|
+
streamed page as React writes it: the shell and its `<Suspense>`
|
|
18
|
+
fallback still arrive first, in zstd, Brotli or gzip. See [the troubleshooting entry](../troubleshooting.md#a-streamed-page-arrives-in-one-piece).
|
|
19
|
+
- **`@softistx/alxia-secure-headers`**' default policy, `default-src 'none'`, blocks
|
|
20
|
+
every script of the page, React Router's inline ones included, and its
|
|
21
|
+
`form-action 'none'` blocks a `<Form>`'s post. Give the pages a policy of
|
|
22
|
+
their own: `pageHeaders` in `configure` for the pages, and `secureHeaders`
|
|
23
|
+
without a policy in `beforeAll` for the client's files. See [the recipe](csp-nonce.md#1-the-headers-in-appserverts) and [the troubleshooting entry](../troubleshooting.md#refused-to-execute-inline-script-because-it-violates-the-following-content-security-policy-directive-default-src-none).
|
|
24
|
+
With the nonce `pageHeaders` adds, the scripts need no `'unsafe-inline'`:
|
|
25
|
+
[A CSP nonce](csp-nonce.md#a-csp-nonce).
|
|
26
|
+
- **A guard** — `@softistx/alxia-jwt`'s `bearer`, `@softistx/alxia-janus`' session — in
|
|
27
|
+
`configure` guards every page and its data alike; in `beforeAll`, the
|
|
28
|
+
client's files too. On the app, a guard also answers a request no route
|
|
29
|
+
matches with its 401.
|
|
30
|
+
|
|
31
|
+
## Routes beside the pages
|
|
32
|
+
|
|
33
|
+
alxia's own routes answer their paths wherever they are declared:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// app/server.ts
|
|
37
|
+
import { createServer } from '@softistx/alxia-react-router';
|
|
38
|
+
|
|
39
|
+
export default createServer({
|
|
40
|
+
configure: (app) =>
|
|
41
|
+
app
|
|
42
|
+
.get('/api/health', ({ reply }) => reply.ok({ ok: true }))
|
|
43
|
+
.get('/api/orders/:id', ({ params, reply }) => reply.ok({ id: params.id })),
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Each answers with its own middlewares and replies. The core ranks
|
|
48
|
+
paths as `Bun.serve` does, through `listen`, `app.fetch` and
|
|
49
|
+
`app.request` alike: segment by segment, a literal beats a parameter,
|
|
50
|
+
which beats the catch-all's wildcard. Two consequences:
|
|
51
|
+
|
|
52
|
+
- **The path is chosen before the method.** With only `POST /api/orders`,
|
|
53
|
+
a `GET /api/orders` is alxia's 405, not a page.
|
|
54
|
+
- **A route whose path covers pages takes them.** `GET /:slug` answers
|
|
55
|
+
every one-segment path, `/about` included, before React Router sees it.
|
|
56
|
+
Put alxia's routes under a prefix of their own, `/api`.
|
|
57
|
+
|
|
58
|
+
Pages and single-fetch data are not something a generated client calls:
|
|
59
|
+
leave the catch-all out of `matchesSpec`'s check with `isReactRouterRoute`
|
|
60
|
+
([OpenAPI](openapi.md#openapi)); what a client does call, your `/api`, is what the
|
|
61
|
+
OpenAPI document declares.
|
|
62
|
+
|
|
63
|
+
What React Router answers comes back as it sent it: documents,
|
|
64
|
+
single-fetch data (`/_.data`, `/login.data`), lazy route discovery
|
|
65
|
+
(`/__manifest`), redirects with every `Set-Cookie` they carry, and the
|
|
66
|
+
error pages, a 404 or a 500 rendered by the app's `ErrorBoundary`.
|
|
67
|
+
|
|
68
|
+
## WebSockets
|
|
69
|
+
|
|
70
|
+
A `ws` route declared in `configure` (or `beforeAll`) is a socket under
|
|
71
|
+
`react-router dev`, under `vite preview` and from
|
|
72
|
+
`bun build/server/index.js` alike. There is
|
|
73
|
+
nothing to add: no option, no package, no second server to start.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
// app/server.ts
|
|
77
|
+
import { createServer } from '@softistx/alxia-react-router';
|
|
78
|
+
|
|
79
|
+
export default createServer({
|
|
80
|
+
configure: (app) =>
|
|
81
|
+
app
|
|
82
|
+
.derive(({ request }) => {
|
|
83
|
+
const name = request.headers.get('x-user');
|
|
84
|
+
return { user: name === null ? null : { name } };
|
|
85
|
+
})
|
|
86
|
+
.ws('/api/echo', {}, {
|
|
87
|
+
open: (socket) => socket.send({ hello: socket.data.user?.name ?? 'anonymous' }),
|
|
88
|
+
message: (socket, message) => socket.send({ echo: String(message) }),
|
|
89
|
+
})
|
|
90
|
+
.group((guarded) =>
|
|
91
|
+
guarded
|
|
92
|
+
.derive(({ user, reply }) =>
|
|
93
|
+
user === null ? reply(401, { error: 'unauthenticated' as const }) : { user },
|
|
94
|
+
)
|
|
95
|
+
.ws('/api/rooms/:room', {}, {
|
|
96
|
+
open: (socket) => socket.subscribe(socket.data.params.room),
|
|
97
|
+
message: (socket, message) =>
|
|
98
|
+
socket.publish(socket.data.params.room, {
|
|
99
|
+
from: socket.data.user.name,
|
|
100
|
+
text: String(message),
|
|
101
|
+
}),
|
|
102
|
+
}),
|
|
103
|
+
),
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The upgrade runs the middlewares declared before the route, and the route's
|
|
108
|
+
validation, as any request does. A middleware's reply refuses it: the client
|
|
109
|
+
gets the 401 and its body, and no socket opens. `socket.data` holds the
|
|
110
|
+
validated request and what each middleware derived, typed. See
|
|
111
|
+
[`@softistx/alxia`'s WebSockets](https://github.com/softistx/alxia/blob/develop/packages/core/docs/guide/websockets.md)
|
|
112
|
+
for the schemas and the rest of the socket.
|
|
113
|
+
|
|
114
|
+
The guard sits in a `group` so it refuses the sockets alone: declared on
|
|
115
|
+
`app` itself, it would apply to every route after it, the pages'
|
|
116
|
+
catch-all included.
|
|
117
|
+
|
|
118
|
+
### Under `react-router dev`
|
|
119
|
+
|
|
120
|
+
Vite's dev server is a `node:http` server, and an alxia socket is
|
|
121
|
+
`Bun.serve`'s upgrade. The plugin listens for Vite's `upgrade` event and
|
|
122
|
+
leaves Vite's own socket alone: an upgrade asking for the `vite-hmr` or
|
|
123
|
+
`vite-ping` subprotocol is Vite's, and HMR works as before. Any other
|
|
124
|
+
upgrade, except one Vite's `server.proxy` relays itself (an entry with
|
|
125
|
+
`ws: true` or a `ws:` target, matched as Vite matches it), is relayed,
|
|
126
|
+
byte for byte, to a `Bun.serve` of the app on a loopback port of its
|
|
127
|
+
own, started on the first upgrade or the first request and given
|
|
128
|
+
`app.fetch` and `app.websocket`, as `listen` gives them. So in dev:
|
|
129
|
+
|
|
130
|
+
- **The same middlewares, refusals and handlers run** as from the build:
|
|
131
|
+
`open`, `message`, `close`, `drain`, the `message` and `send` schemas,
|
|
132
|
+
`subscribe` and `publish`.
|
|
133
|
+
- **An edit to `app/server.ts`, or to a module it imports, is used from
|
|
134
|
+
the next connection.** The edit makes a new app, and the next upgrade
|
|
135
|
+
starts a new `Bun.serve` for it. A socket opened before the edit keeps
|
|
136
|
+
the handlers it opened with until it closes.
|
|
137
|
+
- **A `publish` reaches the sockets opened since the same edit**: the
|
|
138
|
+
sockets opened before it are on the previous server. Reload the pages
|
|
139
|
+
after an edit to reconnect them.
|
|
140
|
+
- **A loader's or an action's `alxiaOf(context).server` is that loopback
|
|
141
|
+
server**, the one the sockets are on, so its `publish` reaches them as
|
|
142
|
+
from the build: see [The server](typing-the-loaders.md#the-server-server).
|
|
143
|
+
- **A socket's `ctx.ip` is the loopback address**, the relay's. The
|
|
144
|
+
browser is local in dev, so that is usually its address anyway.
|
|
145
|
+
- **An upgrade to a path with no `ws` route** gets what the build answers
|
|
146
|
+
it too, never a socket: alxia's 404 where nothing matches, the page
|
|
147
|
+
where the catch-all does.
|
|
148
|
+
- **Another plugin that listens for upgrades** competes with the relay
|
|
149
|
+
on the paths it shares with it: give its socket a path under a
|
|
150
|
+
`server.proxy` entry with `ws: true` or a `ws:` target, or outside the
|
|
151
|
+
app's.
|
|
152
|
+
- **With Vite in middleware mode**, there is no `node:http` server of
|
|
153
|
+
Vite's to listen on: serve the app yourself, as in
|
|
154
|
+
[A server of your own](customising-the-server.md#a-server-of-your-own-without-the-plugin).
|
|
155
|
+
|
|
156
|
+
Under `vite preview` the same relay runs, to a `Bun.serve` of the built
|
|
157
|
+
app, loaded once. Under `bun build/server/index.js`, nothing of this runs:
|
|
158
|
+
`listen` serves the sockets itself, as any alxia app's.
|
|
159
|
+
|
|
160
|
+
## The client's files
|
|
161
|
+
|
|
162
|
+
In a build, each top-level entry of `build/client` becomes a route, after
|
|
163
|
+
`beforeAll` and before `configure`:
|
|
164
|
+
|
|
165
|
+
| entry | route | `Cache-Control` |
|
|
166
|
+
| --- | --- | --- |
|
|
167
|
+
| `assets/`, the hashed bundles | `static('/assets', …)` | `public, max-age=31536000, immutable` |
|
|
168
|
+
| another folder, such as `images/` from `public/images/` | `static('/images', …)` | `public, max-age=3600` |
|
|
169
|
+
| a file, such as `robots.txt` or `favicon.ico` | `file('/robots.txt', …)` | `public, max-age=3600` |
|
|
170
|
+
|
|
171
|
+
They are the core's `static` and `file` routes, so ETags,
|
|
172
|
+
`Last-Modified`, 304s and ranges are included. A missing file under one
|
|
173
|
+
of those folders gets alxia's JSON 404, `{ "error": "not_found" }`, not a
|
|
174
|
+
page, so a folder of `public/` shadows any page path under the same name.
|
|
175
|
+
Dotfiles are skipped. In dev, Vite serves them.
|
|
176
|
+
|
|
177
|
+
A folder that is not one, or a file whose name no route can carry, is
|
|
178
|
+
refused when the server starts: see
|
|
179
|
+
[the troubleshooting entries](../troubleshooting.md#typeerror-reactrouter-client-is--which-is-not-a-directory-).
|
|
180
|
+
|
|
181
|
+
### Compressed
|
|
182
|
+
|
|
183
|
+
`react-router build` writes a `.br` and a `.gz` copy beside each
|
|
184
|
+
compressible file of `build/client` (JavaScript, CSS, HTML, SVG, JSON,
|
|
185
|
+
text, XML, WebAssembly, source maps, fonts) of at least 1 kB, and the
|
|
186
|
+
server sends the copy a browser's `Accept-Encoding` asks for, with
|
|
187
|
+
`Content-Encoding`, `Vary: Accept-Encoding` and the same `Cache-Control`.
|
|
188
|
+
The files are read from disk as they are, never compressed on a request.
|
|
189
|
+
Files at the top of `build/client`, such as a large `sprite.svg`, get it
|
|
190
|
+
too. A file with no copy, or a client that accepts none, gets the file.
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
// vite.config.ts: the threshold, or no copies at all
|
|
194
|
+
alxia({ precompress: { minSize: 4096 } });
|
|
195
|
+
alxia({ precompress: false });
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
// app/server.ts: serve the files as they are, such as behind a proxy that compresses
|
|
200
|
+
export default createServer({ precompressed: false });
|
|
201
|
+
```
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# A CSP nonce
|
|
2
|
+
|
|
3
|
+
This page covers a Content-Security-Policy without `'unsafe-inline'`: the
|
|
4
|
+
policy in `app/server.ts`, the nonce passed on in `app/entry.server.tsx`, and
|
|
5
|
+
why the nonce can stay loose.
|
|
6
|
+
|
|
7
|
+
React Router renders inline scripts: the hydration data, the module
|
|
8
|
+
loader, the scroll restoration, and with streaming one more per resolved
|
|
9
|
+
`<Await>`. A policy without `'unsafe-inline'` allows them only when each
|
|
10
|
+
carries the nonce the policy names. React Router writes it on every one of
|
|
11
|
+
them, and on its `modulepreload` links, when `entry.server.tsx` passes it
|
|
12
|
+
to `<ServerRouter nonce>` and to React's renderer
|
|
13
|
+
([React Router's security guide](https://reactrouter.com/how-to/security)).
|
|
14
|
+
|
|
15
|
+
`@softistx/alxia-secure-headers` makes the nonce. `pageHeaders` draws a fresh one per
|
|
16
|
+
request, adds it to the policy's `script-src`, and puts it on the context of
|
|
17
|
+
the routes after it, the catch-all included. It is `secureHeaders({ nonce:
|
|
18
|
+
true })` with a page policy.
|
|
19
|
+
`nonceOf(loadContext)` reads it in the entry.
|
|
20
|
+
|
|
21
|
+
## 1. The headers, in `app/server.ts`
|
|
22
|
+
|
|
23
|
+
Two places, because a request goes through `beforeAll`, then the client's
|
|
24
|
+
files (`build/client`), then `configure`, then the pages
|
|
25
|
+
([the layers](customising-the-server.md#by-hand)). A middleware in
|
|
26
|
+
`configure` never sees a file under `build/client`.
|
|
27
|
+
|
|
28
|
+
- **Pages, in `configure`**: `pageHeaders` writes the policy with a nonce per
|
|
29
|
+
request and `Cache-Control: private, no-store`.
|
|
30
|
+
- **Assets, in `beforeAll`**: `secureHeaders` without a policy and without
|
|
31
|
+
cache headers, so `/assets/*` and `public/` files get `nosniff`,
|
|
32
|
+
`Cross-Origin-Resource-Policy: same-origin` and HSTS, and keep the
|
|
33
|
+
`Cache-Control` the client's files are served with (`cacheControl` is off by
|
|
34
|
+
default; never set it here, `no-store` would end the caching of `/assets`).
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { createServer } from '@softistx/alxia-react-router';
|
|
38
|
+
import { pageHeaders, secureHeaders } from '@softistx/alxia-secure-headers';
|
|
39
|
+
|
|
40
|
+
const production = process.env['NODE_ENV'] === 'production';
|
|
41
|
+
|
|
42
|
+
export default createServer({
|
|
43
|
+
// the client's files: no CSP (a script file needs none), cache headers untouched
|
|
44
|
+
beforeAll: (app) =>
|
|
45
|
+
app.use(
|
|
46
|
+
secureHeaders({
|
|
47
|
+
contentSecurityPolicy: false,
|
|
48
|
+
strictTransportSecurity: production
|
|
49
|
+
? 'max-age=31536000; includeSubDomains'
|
|
50
|
+
: false,
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
// the pages: the policy with a nonce, no-store
|
|
54
|
+
configure: (app) => app.use(pageHeaders({ https: production })),
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The `beforeAll` middleware runs around the pages too, but it only fills the
|
|
59
|
+
headers the route left unset: the pages keep the policy and the `no-store` that
|
|
60
|
+
`configure` sets, and gain the rest. Neither overrides the other. The package's own
|
|
61
|
+
spec asserts both (`server.spec.ts`): an asset answers `nosniff`, CORP and
|
|
62
|
+
HSTS with no policy and no `no-store`; a page answers a policy with a nonce
|
|
63
|
+
and `private, no-store`.
|
|
64
|
+
|
|
65
|
+
`pageHeaders` passes any `secureHeaders` option through, and `directives`
|
|
66
|
+
changes the policy (a list replaces the preset's):
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
configure: (app) =>
|
|
70
|
+
app.use(
|
|
71
|
+
pageHeaders({
|
|
72
|
+
https: production,
|
|
73
|
+
directives: { 'img-src': ["'self'", 'data:'] },
|
|
74
|
+
}),
|
|
75
|
+
),
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`script-src` goes out as `script-src 'self' 'nonce-…' 'strict-dynamic'`, a new
|
|
79
|
+
value on every response. `connect-src 'self'` allows the single-fetch data
|
|
80
|
+
requests.
|
|
81
|
+
|
|
82
|
+
## 2. The nonce, in `app/entry.server.tsx`
|
|
83
|
+
|
|
84
|
+
React Router's template has no entry. The package's own passes the nonce to
|
|
85
|
+
`<ServerRouter>` and to React's renderer, and provides it to the page
|
|
86
|
+
(`useNonce()`, [the document](document.md)):
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
// app/entry.server.tsx
|
|
90
|
+
export {
|
|
91
|
+
handleRequest as default,
|
|
92
|
+
streamTimeout,
|
|
93
|
+
} from '@softistx/alxia-react-router/entry';
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
It reads `nonceOf(loadContext)` by default; `createEntry({ nonce })`
|
|
97
|
+
takes another source ([the entry](document.md#the-entry)).
|
|
98
|
+
|
|
99
|
+
`<Scripts>` and `<ScrollRestoration>` fall back to the nonce `<ServerRouter
|
|
100
|
+
nonce>` put in React Router's framework context, so they need no `nonce` prop
|
|
101
|
+
with this entry. `<Links>` needs `<Links nonce={useNonce()} />`: it does not
|
|
102
|
+
suppress the hydration warning for its development critical-CSS `<style>`
|
|
103
|
+
([why](document.md#what-react-router-renders)). `useNonce()` also serves what
|
|
104
|
+
the app inserts itself: an `InlineScript`, a `CspNonceMeta`, any other script
|
|
105
|
+
or style.
|
|
106
|
+
|
|
107
|
+
### An entry of your own
|
|
108
|
+
|
|
109
|
+
An entry that is not the package's reveals React Router's, then adds an
|
|
110
|
+
import, the nonce in two places, and `DocumentNonce` around the router:
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
bunx react-router reveal entry.server
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```diff
|
|
117
|
+
// app/entry.server.tsx, as reveal writes it
|
|
118
|
+
import { PassThrough } from "node:stream";
|
|
119
|
+
|
|
120
|
+
+import { nonceOf } from "@softistx/alxia-react-router";
|
|
121
|
+
+import { DocumentNonce } from "@softistx/alxia-react-router/document";
|
|
122
|
+
import type { EntryContext, RouterContextProvider } from "react-router";
|
|
123
|
+
…
|
|
124
|
+
const { pipe, abort } = renderToPipeableStream(
|
|
125
|
+
- <ServerRouter context={routerContext} url={request.url} />,
|
|
126
|
+
+ <DocumentNonce nonce={nonceOf(loadContext)}>
|
|
127
|
+
+ <ServerRouter context={routerContext} url={request.url} nonce={nonceOf(loadContext)} />
|
|
128
|
+
+ </DocumentNonce>,
|
|
129
|
+
{
|
|
130
|
+
+ nonce: nonceOf(loadContext),
|
|
131
|
+
[readyOption]() {
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`loadContext` is the entry's fifth parameter, the `RouterContextProvider`
|
|
135
|
+
alxia hands React Router; the revealed file already declares it. With
|
|
136
|
+
`renderToReadableStream`, the web entry, the option is the same: `{ nonce:
|
|
137
|
+
nonceOf(loadContext), … }`.
|
|
138
|
+
|
|
139
|
+
That is all: under `react-router dev` and from the build, every `<script>`
|
|
140
|
+
of a page carries the nonce of its own response's policy, Vite's dev
|
|
141
|
+
scripts included.
|
|
142
|
+
|
|
143
|
+
## Never cache a nonced page publicly
|
|
144
|
+
|
|
145
|
+
A page with a nonce is made per response. A route's `headers` export must
|
|
146
|
+
never mark it `public` (or give it a `s-maxage`): a shared cache would hand
|
|
147
|
+
the same nonce to every visitor, and a nonce everyone knows protects nothing.
|
|
148
|
+
|
|
149
|
+
## How it stays loose
|
|
150
|
+
|
|
151
|
+
`nonceOf` reads `nonce` from alxia's context if it is a string, and
|
|
152
|
+
returns `undefined` otherwise: no middleware set one, or the request did not come
|
|
153
|
+
through alxia at all. `ServerRouter` and React then render no `nonce`
|
|
154
|
+
attribute. So:
|
|
155
|
+
|
|
156
|
+
- this package does not depend on `@softistx/alxia-secure-headers`, nor the reverse;
|
|
157
|
+
- the same `entry.server.tsx` serves an app with or without the policy;
|
|
158
|
+
- a nonce of your own works too, from any `derive` in `configure` that
|
|
159
|
+
returns `{ nonce: string }`; the policy is then yours to write with it.
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
configure: (app) => app.derive(() => ({ nonce: myNonce() })),
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Under `exactOptionalPropertyTypes`, spread it in only when there is one:
|
|
166
|
+
see [the troubleshooting entry](../troubleshooting.md#type---nonce-string--undefined--is-not-assignable-to-type-serverrouterprops-with-exactoptionalpropertytypes-true).
|