@kayjs/kay 1.104.3 → 1.105.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/dist/eslint.js +5231 -2529
- package/editors/vscode/syntaxes/kay.tmLanguage.json +1 -1
- package/editors/zed/extension.toml +2 -2
- package/llms/action-protection.md +10 -10
- package/llms/actions-from-islands.md +26 -29
- package/llms/actions-refused-fields.md +18 -4
- package/llms/actions.md +36 -27
- package/llms/analytics.md +1 -1
- package/llms/api-from-islands.md +14 -15
- package/llms/api-routes.md +10 -8
- package/llms/browser-only.md +12 -10
- package/llms/cdn-caching.md +7 -6
- package/llms/check-and-tools.md +6 -6
- package/llms/checks.md +1 -1
- package/llms/code-lints.md +6 -6
- package/llms/commands.md +42 -0
- package/llms/component-libraries.md +1 -1
- package/llms/component-library-conventions.md +11 -5
- package/llms/components.md +14 -14
- package/llms/content-markdown-to-caching.md +2 -2
- package/llms/deprecated-lints-1-105-libraries.md +30 -0
- package/llms/deprecated-lints-1-105.md +58 -0
- package/llms/deprecated-lints.md +7 -5
- package/llms/dev-tool.md +1 -1
- package/llms/eco-design.md +3 -3
- package/llms/editor-and-agent-commands.md +1 -1
- package/llms/effects.md +7 -7
- package/llms/environment.md +6 -5
- package/llms/errors-runtime.md +4 -4
- package/llms/errors.md +12 -8
- package/llms/events.md +15 -12
- package/llms/files.md +6 -4
- package/llms/guards.md +18 -15
- package/llms/head.md +38 -6
- package/llms/hooks.md +27 -25
- package/llms/images-runtime-and-remote.md +12 -12
- package/llms/images.md +29 -29
- package/llms/island-and-form-lints.md +8 -8
- package/llms/island-sources.md +31 -24
- package/llms/islands-state-to-ids.md +8 -10
- package/llms/islands.md +16 -14
- package/llms/lints.md +1 -1
- package/llms/live-values.md +12 -9
- package/llms/local-collections.md +11 -11
- package/llms/locales-texts.md +1 -1
- package/llms/locales.md +12 -11
- package/llms/mcp.md +8 -8
- package/llms/metrics.md +24 -0
- package/llms/navigation-from-code.md +16 -15
- package/llms/navigation.md +5 -3
- package/llms/prerendering.md +4 -4
- package/llms/privacy.md +4 -4
- package/llms/production.md +28 -38
- package/llms/project-new-and-add.md +2 -2
- package/llms/project.md +17 -40
- package/llms/proxy-and-security.md +5 -5
- package/llms/queues.md +19 -24
- package/llms/rate-limits.md +21 -10
- package/llms/recipes.md +7 -6
- package/llms/rendering.md +8 -7
- package/llms/request-values.md +2 -2
- package/llms/rooms.md +9 -9
- package/llms/routing-endpoints-and-base.md +3 -3
- package/llms/routing-special-pages.md +4 -4
- package/llms/routing.md +16 -18
- package/llms/security-and-i18n-lints.md +1 -1
- package/llms/seo-lints.md +1 -1
- package/llms/server-islands.md +12 -7
- package/llms/server.md +33 -18
- package/llms/site.md +12 -10
- package/llms/sitemap-search-fonts.md +50 -44
- package/llms/stores.md +7 -5
- package/llms/styles-and-assets.md +8 -8
- package/llms/templates-elements-slots-snippets.md +5 -9
- package/llms/templates.md +4 -4
- package/llms/testing-browser.md +1 -0
- package/llms/testing-requests-jobs-sockets.md +27 -4
- package/llms/testing.md +7 -7
- package/llms/tracing.md +9 -7
- package/llms/upgrading-1-105-config.md +71 -0
- package/llms/upgrading-archive.md +74 -114
- package/llms/upgrading.md +41 -131
- package/llms/whats-new-archive.md +59 -57
- package/llms/whats-new.md +32 -54
- package/llms/workers.md +2 -2
- package/llms.txt +18 -13
- package/package.json +9 -9
- package/src/add.ts +1 -1
- package/src/build/await-alert.ts +34 -0
- package/src/build/client.ts +15 -13
- package/src/build/compile.ts +9 -6
- package/src/build/pipeline.ts +19 -16
- package/src/build/server-record.ts +2 -1
- package/src/build/sourcemap.ts +1 -1
- package/src/build/static.ts +10 -8
- package/src/build/styles.ts +7 -1
- package/src/build/transform.ts +3 -2
- package/src/build/verify.ts +8 -5
- package/src/check/action-readers.ts +115 -0
- package/src/check/action-type.ts +44 -0
- package/src/check/ai-language.ts +56 -0
- package/src/check/app-hooks.ts +90 -0
- package/src/check/auth-methods.ts +85 -0
- package/src/check/auth-rate-limits.ts +99 -0
- package/src/check/boot.ts +9 -8
- package/src/check/browser-global-reads.ts +4 -4
- package/src/check/client-keys.ts +10 -0
- package/src/check/cms-options.ts +81 -0
- package/src/check/config-groups.ts +22 -0
- package/src/check/config-objects.ts +83 -0
- package/src/check/config-switches.ts +38 -0
- package/src/check/context-import.ts +51 -0
- package/src/check/diagnose.ts +16 -6
- package/src/check/env-files.ts +31 -0
- package/src/check/env-types.ts +10 -8
- package/src/check/format-duration.ts +75 -0
- package/src/check/generated.ts +23 -4
- package/src/check/guard-options.ts +58 -0
- package/src/check/guards.ts +4 -4
- package/src/check/hook-context.ts +94 -0
- package/src/check/hook-names.ts +104 -0
- package/src/check/i18n-keys.ts +50 -0
- package/src/check/images-keys.ts +54 -0
- package/src/check/index.ts +38 -22
- package/src/check/job-shapes.ts +273 -0
- package/src/check/layout-facts.ts +1 -1
- package/src/check/live-api.ts +137 -0
- package/src/check/mail-api.ts +67 -0
- package/src/check/messages.ts +7 -7
- package/src/check/moved-keys.ts +49 -0
- package/src/check/one-state-api.ts +357 -0
- package/src/check/open-settings.ts +1 -1
- package/src/check/output-schema.ts +3 -1
- package/src/check/page-heads.ts +31 -5
- package/src/check/pages-options.ts +35 -0
- package/src/check/project.ts +5 -1
- package/src/check/rate-enforce.ts +53 -0
- package/src/check/refusal-calls.ts +185 -0
- package/src/check/regroup.ts +92 -0
- package/src/check/renamed-packages.ts +32 -0
- package/src/check/retired-lints.ts +49 -0
- package/src/check/route-keys.ts +166 -0
- package/src/check/route-shadow.ts +174 -0
- package/src/check/secret-keys.ts +70 -0
- package/src/check/seo.ts +3 -3
- package/src/check/shadow-types.ts +110 -4
- package/src/check/shadow.ts +4 -1
- package/src/check/socket-frames.ts +102 -0
- package/src/check/source-readers.ts +257 -0
- package/src/check/store-ms.ts +72 -0
- package/src/check/store-names.ts +88 -0
- package/src/check/template-hints.ts +70 -6
- package/src/check/test-helpers.ts +98 -0
- package/src/check/ttl-names.ts +142 -0
- package/src/check/unmounted-jobs.ts +2 -2
- package/src/commands/a11y.ts +1 -1
- package/src/commands/check.ts +4 -2
- package/src/commands/env-compare.ts +2 -2
- package/src/commands/env-declare.ts +1 -1
- package/src/commands/env.ts +19 -16
- package/src/commands/explain-island.ts +27 -1
- package/src/commands/i18n.ts +2 -2
- package/src/commands/routes.ts +23 -17
- package/src/compiler/a11y.ts +56 -41
- package/src/compiler/aria.ts +1 -1
- package/src/compiler/ast.ts +54 -136
- package/src/compiler/bound-props.ts +75 -0
- package/src/compiler/browser.ts +12 -11
- package/src/compiler/button-forms.ts +33 -0
- package/src/compiler/codegen.ts +51 -137
- package/src/compiler/deprecated-ai-labels.ts +97 -0
- package/src/compiler/deprecated-ai-links.ts +63 -0
- package/src/compiler/deprecated-allow.ts +50 -0
- package/src/compiler/deprecated-auth-lints.ts +14 -0
- package/src/compiler/deprecated-auth-signed.ts +29 -0
- package/src/compiler/deprecated-children.ts +66 -0
- package/src/compiler/deprecated-image.ts +116 -0
- package/src/compiler/deprecated-island.ts +155 -0
- package/src/compiler/deprecated-library.ts +20 -0
- package/src/compiler/deprecated-lints.ts +523 -22
- package/src/compiler/deprecated-page.ts +125 -0
- package/src/compiler/deprecated-parts.ts +22 -0
- package/src/compiler/deprecated-ui-callbacks.ts +66 -0
- package/src/compiler/deprecated-ui-input.ts +97 -0
- package/src/compiler/deprecated-ui-items.ts +47 -0
- package/src/compiler/deprecated-ui-props.ts +3 -3
- package/src/compiler/dom-fields.ts +67 -0
- package/src/compiler/dom.ts +29 -27
- package/src/compiler/errors.ts +37 -27
- package/src/compiler/event-modifiers.ts +2 -2
- package/src/compiler/fence-checks.ts +29 -69
- package/src/compiler/form-action.ts +18 -0
- package/src/compiler/form-info.ts +154 -0
- package/src/compiler/head-shorthand.ts +118 -0
- package/src/compiler/head-tags.ts +64 -0
- package/src/compiler/helper-imports.ts +33 -0
- package/src/compiler/html-initial.ts +68 -0
- package/src/compiler/html-parts.ts +40 -0
- package/src/compiler/html.ts +41 -91
- package/src/compiler/if-alias.ts +2 -47
- package/src/compiler/image-attributes.ts +69 -0
- package/src/compiler/index.ts +33 -9
- package/src/compiler/island-arguments.ts +38 -10
- package/src/compiler/island-cause.ts +5 -5
- package/src/compiler/island-declaration.ts +181 -0
- package/src/compiler/island-marker.ts +10 -15
- package/src/compiler/items.ts +5 -0
- package/src/compiler/jsx-class.ts +25 -1
- package/src/compiler/jsx-field.ts +58 -0
- package/src/compiler/jsx.ts +24 -29
- package/src/compiler/kay-exports.ts +2 -0
- package/src/compiler/link-flags.ts +106 -0
- package/src/compiler/lints.ts +27 -60
- package/src/compiler/live-reads.ts +160 -0
- package/src/compiler/loop-lints.ts +6 -5
- package/src/compiler/markup-fields.ts +34 -0
- package/src/compiler/markup.ts +75 -77
- package/src/compiler/module-signals.ts +1 -1
- package/src/compiler/names.ts +7 -1
- package/src/compiler/nesting.ts +7 -0
- package/src/compiler/old-parts.ts +84 -0
- package/src/compiler/page-settings.ts +2 -0
- package/src/compiler/parser.ts +7 -8
- package/src/compiler/plan.ts +13 -1
- package/src/compiler/rewrite-reads.ts +29 -0
- package/src/compiler/rewrite-types.ts +2 -0
- package/src/compiler/rewrite.ts +35 -33
- package/src/compiler/route-lints.ts +4 -2
- package/src/compiler/script-props.ts +34 -5
- package/src/compiler/script-server.ts +26 -3
- package/src/compiler/script-shared.ts +7 -0
- package/src/compiler/script.ts +7 -0
- package/src/compiler/server-imports.ts +52 -0
- package/src/compiler/slot-types.ts +46 -0
- package/src/compiler/style-arguments.ts +20 -0
- package/src/compiler/template-walk.ts +72 -0
- package/src/compiler/type-parameters.ts +45 -0
- package/src/compiler/validate-fields.ts +68 -0
- package/src/compiler/validate.ts +51 -45
- package/src/config-extensions.ts +53 -6
- package/src/config-loader.ts +31 -16
- package/src/config-resolve.ts +194 -0
- package/src/config-shape.ts +81 -38
- package/src/config-switch.ts +14 -0
- package/src/config.ts +287 -102
- package/src/content/problems.ts +1 -1
- package/src/generate-resource.ts +5 -4
- package/src/generate.ts +2 -2
- package/src/lsp/code-actions.ts +1 -1
- package/src/lsp/completions.ts +2 -2
- package/src/lsp/diagnostics.ts +4 -2
- package/src/lsp/document-links.ts +1 -1
- package/src/lsp/navigation.ts +1 -1
- package/src/lsp/route-documents.ts +21 -0
- package/src/lsp/server.ts +60 -8
- package/src/lsp/template-completion.ts +4 -4
- package/src/lsp/ui-completion.ts +1 -1
- package/src/migrate/astro.ts +1 -1
- package/src/migrate/project.ts +1 -1
- package/src/project.ts +20 -11
- package/src/runtime/action-call.ts +179 -41
- package/src/runtime/action-encode.ts +2 -1
- package/src/runtime/action-error.ts +2 -1
- package/src/runtime/action-form.ts +159 -17
- package/src/runtime/action-navigate.ts +19 -0
- package/src/runtime/action-owner.ts +2 -0
- package/src/runtime/action-post.ts +22 -4
- package/src/runtime/action-protection.ts +4 -3
- package/src/runtime/action-shared.ts +86 -28
- package/src/runtime/action-stream.ts +43 -9
- package/src/runtime/action.ts +8 -7
- package/src/runtime/api-error-class.ts +1 -1
- package/src/runtime/api-url.ts +5 -4
- package/src/runtime/await-failed.ts +9 -0
- package/src/runtime/await.server.ts +14 -4
- package/src/runtime/await.ts +3 -3
- package/src/runtime/button-form.ts +5 -0
- package/src/runtime/cache-hooks.ts +54 -0
- package/src/runtime/cache-live-id.ts +3 -0
- package/src/runtime/cache.ts +12 -36
- package/src/runtime/call-result.ts +86 -21
- package/src/runtime/checks.ts +27 -17
- package/src/runtime/consent.ts +3 -2
- package/src/runtime/core.ts +99 -27
- package/src/runtime/dispatch.ts +11 -0
- package/src/runtime/dom-await.ts +39 -9
- package/src/runtime/dom-image.ts +2 -2
- package/src/runtime/duration-words.ts +2 -1
- package/src/runtime/duration.ts +5 -3
- package/src/runtime/edit.ts +3 -2
- package/src/runtime/env.ts +2 -1
- package/src/runtime/forms.ts +15 -5
- package/src/runtime/head.ts +3 -1
- package/src/runtime/html.ts +10 -6
- package/src/runtime/i18n.client.ts +12 -6
- package/src/runtime/i18n.server.ts +12 -6
- package/src/runtime/i18n.ts +28 -8
- package/src/runtime/image.ts +16 -18
- package/src/runtime/index.ts +9 -8
- package/src/runtime/internal.ts +2 -1
- package/src/runtime/invalidated-keys.ts +11 -0
- package/src/runtime/island.server.ts +18 -10
- package/src/runtime/jsx.ts +6 -1
- package/src/runtime/kay-error.ts +29 -0
- package/src/runtime/leave.ts +1 -0
- package/src/runtime/live-cache.ts +8 -1
- package/src/runtime/live-resource.server.ts +1 -0
- package/src/runtime/live-revalidate.ts +53 -0
- package/src/runtime/live-value.client.ts +36 -3
- package/src/runtime/live-value.server.ts +10 -6
- package/src/runtime/live-value.shared.ts +50 -10
- package/src/runtime/live-value.ts +16 -4
- package/src/runtime/live.ts +92 -137
- package/src/runtime/local-types.ts +106 -0
- package/src/runtime/local.ts +31 -109
- package/src/runtime/log.ts +3 -1
- package/src/runtime/mount.compat.ts +8 -0
- package/src/runtime/navigate-api.ts +17 -8
- package/src/runtime/navigation-state.ts +50 -13
- package/src/runtime/navigation.ts +3 -3
- package/src/runtime/optimistic.ts +1 -1
- package/src/runtime/page-swap.ts +11 -6
- package/src/runtime/persist.ts +2 -1
- package/src/runtime/persisted.ts +43 -38
- package/src/runtime/presence.ts +15 -9
- package/src/runtime/queue-jobs.ts +2 -1
- package/src/runtime/reactive.ts +4 -5
- package/src/runtime/refuse.ts +23 -6
- package/src/runtime/resource-tags.ts +35 -0
- package/src/runtime/route.ts +3 -2
- package/src/runtime/sanitize.ts +4 -3
- package/src/runtime/schema.client.ts +2 -1
- package/src/runtime/schema.ts +2 -1
- package/src/runtime/send.ts +2 -1
- package/src/runtime/shortcut.ts +10 -3
- package/src/runtime/socket-message.ts +26 -0
- package/src/runtime/store-base.ts +22 -0
- package/src/runtime/swap-fetch.ts +2 -1
- package/src/runtime/swap.ts +4 -0
- package/src/runtime/template-context.ts +4 -2
- package/src/runtime/values.ts +28 -10
- package/src/runtime/wire.ts +13 -3
- package/src/runtime/with-query.ts +3 -2
- package/src/runtime/work.ts +4 -2
- package/src/server/action-hooks.ts +15 -8
- package/src/server/action-iterable.ts +18 -3
- package/src/server/actions.ts +31 -18
- package/src/server/address.ts +1 -1
- package/src/server/analytics-server.ts +2 -1
- package/src/server/api-modules.ts +38 -26
- package/src/server/api.ts +17 -96
- package/src/server/app-database.ts +11 -0
- package/src/server/app-hooks.ts +25 -6
- package/src/server/app-stages.ts +91 -60
- package/src/server/app.ts +25 -13
- package/src/server/auth-mails.ts +2 -0
- package/src/server/basic-auth.ts +27 -7
- package/src/server/bundle.ts +2 -0
- package/src/server/button-form-rule.ts +20 -0
- package/src/server/card.ts +2 -2
- package/src/server/ceiling.ts +1 -1
- package/src/server/client.ts +2 -2
- package/src/server/config-error.ts +2 -2
- package/src/server/config-limits.ts +37 -17
- package/src/server/context-values.ts +4 -3
- package/src/server/cookies.ts +4 -2
- package/src/server/endpoints.ts +5 -2
- package/src/server/entry-drafts.ts +1 -1
- package/src/server/errors.ts +4 -3
- package/src/server/event-stream.ts +7 -4
- package/src/server/favicon.ts +59 -10
- package/src/server/fetch-public.ts +4 -3
- package/src/server/file-answer.ts +89 -0
- package/src/server/forms.ts +1 -1
- package/src/server/guard-requirement.ts +7 -0
- package/src/server/guards.ts +74 -2
- package/src/server/hooks.ts +10 -10
- package/src/server/i18n.ts +8 -9
- package/src/server/image-limits.ts +4 -3
- package/src/server/image.ts +17 -15
- package/src/server/index.ts +15 -9
- package/src/server/job-context.ts +35 -0
- package/src/server/jobs-page.ts +14 -8
- package/src/server/jobs.ts +48 -13
- package/src/server/kept-exports.ts +3 -1
- package/src/server/kv.ts +34 -18
- package/src/server/lazy-guard.ts +4 -1
- package/src/server/library.ts +5 -2
- package/src/server/lifecycle.ts +5 -5
- package/src/server/link-schemes.ts +5 -5
- package/src/server/live.ts +79 -7
- package/src/server/load-budget.ts +2 -2
- package/src/server/loader.ts +4 -2
- package/src/server/log.ts +18 -3
- package/src/server/maintenance.ts +1 -1
- package/src/server/mcp-key.ts +27 -24
- package/src/server/mcp.ts +21 -8
- package/src/server/message-drafts.ts +2 -2
- package/src/server/metrics.ts +42 -14
- package/src/server/moved-exports.ts +17 -0
- package/src/server/not-found-config.ts +4 -3
- package/src/server/notifications.ts +2 -2
- package/src/server/openapi.ts +9 -13
- package/src/server/over-limit.ts +29 -0
- package/src/server/page-limits.ts +1 -1
- package/src/server/page-routes.ts +2 -2
- package/src/server/page-seo.ts +29 -0
- package/src/server/page-settings.ts +69 -8
- package/src/server/pg-data.ts +3 -2
- package/src/server/pg-jobs.ts +3 -2
- package/src/server/pg-limit.ts +4 -3
- package/src/server/pg-live.ts +3 -1
- package/src/server/pg-not-found.ts +2 -1
- package/src/server/pg-poll.ts +3 -3
- package/src/server/pg-redirects.ts +3 -2
- package/src/server/pg-stores.ts +9 -7
- package/src/server/prerender.ts +21 -10
- package/src/server/preview.ts +3 -1
- package/src/server/protection.ts +20 -44
- package/src/server/proxy-key.ts +17 -39
- package/src/server/pure-page.ts +2 -29
- package/src/server/push-crypto.ts +3 -2
- package/src/server/push-server.ts +2 -1
- package/src/server/push.ts +6 -6
- package/src/server/queue-scheduler.ts +5 -0
- package/src/server/queue.ts +21 -29
- package/src/server/rate-limit.ts +21 -13
- package/src/server/rate-windows.ts +14 -0
- package/src/server/redirects.ts +29 -2
- package/src/server/remote.ts +5 -4
- package/src/server/render-document.ts +32 -11
- package/src/server/render.ts +6 -6
- package/src/server/report.ts +5 -5
- package/src/server/request-record.ts +2 -0
- package/src/server/resources.ts +2 -1
- package/src/server/rooms.ts +177 -23
- package/src/server/route-settings.ts +236 -0
- package/src/server/routes.ts +25 -195
- package/src/server/save-data.ts +1 -1
- package/src/server/scope.ts +1 -1
- package/src/server/secret.ts +76 -0
- package/src/server/security.ts +15 -10
- package/src/server/seo.ts +19 -7
- package/src/server/served-paths.ts +2 -1
- package/src/server/session.ts +39 -18
- package/src/server/setup.ts +17 -10
- package/src/server/signals.ts +23 -3
- package/src/server/signed.ts +7 -4
- package/src/server/sitemap.ts +6 -4
- package/src/server/socket.ts +371 -0
- package/src/server/source.ts +13 -7
- package/src/server/sqlite-live.ts +3 -1
- package/src/server/storage.ts +21 -48
- package/src/server/stream.ts +23 -14
- package/src/server/translations.ts +2 -2
- package/src/server/uncaught.ts +2 -2
- package/src/server/violations.ts +4 -3
- package/src/server/vitals-routes/_guard.ts +1 -1
- package/src/server/vitals-server.ts +2 -1
- package/src/server/vitals.ts +5 -2
- package/src/server/words.ts +4 -0
- package/src/server/work-scope.ts +4 -2
- package/src/server/work.ts +4 -3
- package/src/server/workers.ts +2 -1
- package/src/server/workflow.ts +19 -11
- package/src/server/ws-limits.ts +51 -69
- package/src/template-config.ts +1 -1
- package/src/template-docker.ts +1 -1
- package/src/template-starter.ts +2 -2
- package/src/template-styles.ts +1 -1
- package/src/template-ws.ts +1 -1
- package/src/test/a11y.ts +55 -0
- package/src/test/browser.ts +5 -48
- package/src/test/index.ts +31 -39
- package/src/test/mount.ts +5 -4
- package/src/test/outgoing.ts +138 -0
- package/src/test/page-types.ts +3 -0
- package/src/test/screenshot-match.ts +69 -0
- package/src/test/service.ts +11 -5
- package/src/test/site-actions.ts +22 -19
- package/src/test/site-keys.ts +49 -0
- package/src/test/site-socket.ts +42 -38
- package/src/test/site-types.ts +41 -12
- package/src/test/site-world.ts +86 -0
- package/types/build/await-alert.d.ts +4 -0
- package/types/build/await-alert.d.ts.map +1 -0
- package/types/build/client.d.ts.map +1 -1
- package/types/build/compile.d.ts +1 -0
- package/types/build/compile.d.ts.map +1 -1
- package/types/build/server-record.d.ts.map +1 -1
- package/types/build/static.d.ts.map +1 -1
- package/types/build/styles.d.ts.map +1 -1
- package/types/build/transform.d.ts.map +1 -1
- package/types/build/verify.d.ts +3 -2
- package/types/build/verify.d.ts.map +1 -1
- package/types/check/action-readers.d.ts +3 -0
- package/types/check/action-readers.d.ts.map +1 -0
- package/types/check/action-type.d.ts +3 -0
- package/types/check/action-type.d.ts.map +1 -0
- package/types/check/ai-language.d.ts +3 -0
- package/types/check/ai-language.d.ts.map +1 -0
- package/types/check/app-hooks.d.ts +3 -0
- package/types/check/app-hooks.d.ts.map +1 -0
- package/types/check/auth-methods.d.ts +3 -0
- package/types/check/auth-methods.d.ts.map +1 -0
- package/types/check/auth-rate-limits.d.ts +3 -0
- package/types/check/auth-rate-limits.d.ts.map +1 -0
- package/types/check/boot.d.ts.map +1 -1
- package/types/check/client-keys.d.ts +3 -0
- package/types/check/client-keys.d.ts.map +1 -0
- package/types/check/cms-options.d.ts +3 -0
- package/types/check/cms-options.d.ts.map +1 -0
- package/types/check/config-groups.d.ts +3 -0
- package/types/check/config-groups.d.ts.map +1 -0
- package/types/check/config-objects.d.ts +16 -0
- package/types/check/config-objects.d.ts.map +1 -0
- package/types/check/config-switches.d.ts +3 -0
- package/types/check/config-switches.d.ts.map +1 -0
- package/types/check/context-import.d.ts +3 -0
- package/types/check/context-import.d.ts.map +1 -0
- package/types/check/diagnose.d.ts +1 -1
- package/types/check/diagnose.d.ts.map +1 -1
- package/types/check/env-files.d.ts +3 -0
- package/types/check/env-files.d.ts.map +1 -0
- package/types/check/env-types.d.ts.map +1 -1
- package/types/check/format-duration.d.ts +5 -0
- package/types/check/format-duration.d.ts.map +1 -0
- package/types/check/generated.d.ts +2 -0
- package/types/check/generated.d.ts.map +1 -1
- package/types/check/guard-options.d.ts +3 -0
- package/types/check/guard-options.d.ts.map +1 -0
- package/types/check/hook-context.d.ts +3 -0
- package/types/check/hook-context.d.ts.map +1 -0
- package/types/check/hook-names.d.ts +3 -0
- package/types/check/hook-names.d.ts.map +1 -0
- package/types/check/i18n-keys.d.ts +3 -0
- package/types/check/i18n-keys.d.ts.map +1 -0
- package/types/check/images-keys.d.ts +3 -0
- package/types/check/images-keys.d.ts.map +1 -0
- package/types/check/index.d.ts +7 -4
- package/types/check/index.d.ts.map +1 -1
- package/types/check/job-shapes.d.ts +6 -0
- package/types/check/job-shapes.d.ts.map +1 -0
- package/types/check/live-api.d.ts +3 -0
- package/types/check/live-api.d.ts.map +1 -0
- package/types/check/mail-api.d.ts +3 -0
- package/types/check/mail-api.d.ts.map +1 -0
- package/types/check/moved-keys.d.ts +10 -0
- package/types/check/moved-keys.d.ts.map +1 -0
- package/types/check/one-state-api.d.ts +9 -0
- package/types/check/one-state-api.d.ts.map +1 -0
- package/types/check/output-schema.d.ts +1 -1
- package/types/check/output-schema.d.ts.map +1 -1
- package/types/check/page-heads.d.ts.map +1 -1
- package/types/check/pages-options.d.ts +3 -0
- package/types/check/pages-options.d.ts.map +1 -0
- package/types/check/project.d.ts.map +1 -1
- package/types/check/rate-enforce.d.ts +3 -0
- package/types/check/rate-enforce.d.ts.map +1 -0
- package/types/check/refusal-calls.d.ts +3 -0
- package/types/check/refusal-calls.d.ts.map +1 -0
- package/types/check/regroup.d.ts +8 -0
- package/types/check/regroup.d.ts.map +1 -0
- package/types/check/renamed-packages.d.ts.map +1 -1
- package/types/check/retired-lints.d.ts +3 -0
- package/types/check/retired-lints.d.ts.map +1 -0
- package/types/check/route-keys.d.ts +3 -0
- package/types/check/route-keys.d.ts.map +1 -0
- package/types/check/route-shadow.d.ts +12 -0
- package/types/check/route-shadow.d.ts.map +1 -0
- package/types/check/secret-keys.d.ts +3 -0
- package/types/check/secret-keys.d.ts.map +1 -0
- package/types/check/seo.d.ts +3 -1
- package/types/check/seo.d.ts.map +1 -1
- package/types/check/shadow-types.d.ts +1 -0
- package/types/check/shadow-types.d.ts.map +1 -1
- package/types/check/shadow.d.ts +1 -0
- package/types/check/shadow.d.ts.map +1 -1
- package/types/check/socket-frames.d.ts +3 -0
- package/types/check/socket-frames.d.ts.map +1 -0
- package/types/check/source-readers.d.ts +3 -0
- package/types/check/source-readers.d.ts.map +1 -0
- package/types/check/store-ms.d.ts +3 -0
- package/types/check/store-ms.d.ts.map +1 -0
- package/types/check/store-names.d.ts +3 -0
- package/types/check/store-names.d.ts.map +1 -0
- package/types/check/template-hints.d.ts +2 -0
- package/types/check/template-hints.d.ts.map +1 -1
- package/types/check/test-helpers.d.ts +3 -0
- package/types/check/test-helpers.d.ts.map +1 -0
- package/types/check/ttl-names.d.ts +3 -0
- package/types/check/ttl-names.d.ts.map +1 -0
- package/types/commands/check.d.ts.map +1 -1
- package/types/commands/env.d.ts.map +1 -1
- package/types/commands/explain-island.d.ts.map +1 -1
- package/types/commands/routes.d.ts.map +1 -1
- package/types/compiler/a11y.d.ts.map +1 -1
- package/types/compiler/aria.d.ts +1 -0
- package/types/compiler/aria.d.ts.map +1 -1
- package/types/compiler/ast.d.ts +13 -16
- package/types/compiler/ast.d.ts.map +1 -1
- package/types/compiler/bound-props.d.ts +16 -0
- package/types/compiler/bound-props.d.ts.map +1 -0
- package/types/compiler/browser.d.ts.map +1 -1
- package/types/compiler/button-forms.d.ts +3 -0
- package/types/compiler/button-forms.d.ts.map +1 -0
- package/types/compiler/codegen.d.ts +2 -1
- package/types/compiler/codegen.d.ts.map +1 -1
- package/types/compiler/deprecated-ai-labels.d.ts +5 -0
- package/types/compiler/deprecated-ai-labels.d.ts.map +1 -0
- package/types/compiler/deprecated-ai-links.d.ts +5 -0
- package/types/compiler/deprecated-ai-links.d.ts.map +1 -0
- package/types/compiler/deprecated-allow.d.ts +5 -0
- package/types/compiler/deprecated-allow.d.ts.map +1 -0
- package/types/compiler/deprecated-auth-lints.d.ts +12 -0
- package/types/compiler/deprecated-auth-lints.d.ts.map +1 -0
- package/types/compiler/deprecated-auth-signed.d.ts +5 -0
- package/types/compiler/deprecated-auth-signed.d.ts.map +1 -0
- package/types/compiler/deprecated-children.d.ts +4 -0
- package/types/compiler/deprecated-children.d.ts.map +1 -0
- package/types/compiler/deprecated-image.d.ts +5 -0
- package/types/compiler/deprecated-image.d.ts.map +1 -0
- package/types/compiler/deprecated-island.d.ts +9 -0
- package/types/compiler/deprecated-island.d.ts.map +1 -0
- package/types/compiler/deprecated-library.d.ts +4 -0
- package/types/compiler/deprecated-library.d.ts.map +1 -0
- package/types/compiler/deprecated-lints.d.ts +527 -20
- package/types/compiler/deprecated-lints.d.ts.map +1 -1
- package/types/compiler/deprecated-page.d.ts +4 -0
- package/types/compiler/deprecated-page.d.ts.map +1 -0
- package/types/compiler/deprecated-parts.d.ts +3 -0
- package/types/compiler/deprecated-parts.d.ts.map +1 -0
- package/types/compiler/deprecated-ui-callbacks.d.ts +5 -0
- package/types/compiler/deprecated-ui-callbacks.d.ts.map +1 -0
- package/types/compiler/deprecated-ui-input.d.ts +5 -0
- package/types/compiler/deprecated-ui-input.d.ts.map +1 -0
- package/types/compiler/deprecated-ui-items.d.ts +5 -0
- package/types/compiler/deprecated-ui-items.d.ts.map +1 -0
- package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
- package/types/compiler/dom-fields.d.ts +7 -0
- package/types/compiler/dom-fields.d.ts.map +1 -0
- package/types/compiler/dom.d.ts +4 -2
- package/types/compiler/dom.d.ts.map +1 -1
- package/types/compiler/errors.d.ts +43 -18
- package/types/compiler/errors.d.ts.map +1 -1
- package/types/compiler/fence-checks.d.ts.map +1 -1
- package/types/compiler/form-action.d.ts +8 -0
- package/types/compiler/form-action.d.ts.map +1 -0
- package/types/compiler/form-info.d.ts +29 -0
- package/types/compiler/form-info.d.ts.map +1 -0
- package/types/compiler/head-shorthand.d.ts +16 -0
- package/types/compiler/head-shorthand.d.ts.map +1 -0
- package/types/compiler/head-tags.d.ts +7 -0
- package/types/compiler/head-tags.d.ts.map +1 -0
- package/types/compiler/helper-imports.d.ts +5 -0
- package/types/compiler/helper-imports.d.ts.map +1 -0
- package/types/compiler/html-initial.d.ts +16 -0
- package/types/compiler/html-initial.d.ts.map +1 -0
- package/types/compiler/html-parts.d.ts +13 -0
- package/types/compiler/html-parts.d.ts.map +1 -0
- package/types/compiler/html.d.ts +3 -2
- package/types/compiler/html.d.ts.map +1 -1
- package/types/compiler/if-alias.d.ts.map +1 -1
- package/types/compiler/image-attributes.d.ts +22 -0
- package/types/compiler/image-attributes.d.ts.map +1 -0
- package/types/compiler/index.d.ts +2 -0
- package/types/compiler/index.d.ts.map +1 -1
- package/types/compiler/island-arguments.d.ts +6 -1
- package/types/compiler/island-arguments.d.ts.map +1 -1
- package/types/compiler/island-cause.d.ts +1 -1
- package/types/compiler/island-cause.d.ts.map +1 -1
- package/types/compiler/island-declaration.d.ts +30 -0
- package/types/compiler/island-declaration.d.ts.map +1 -0
- package/types/compiler/island-marker.d.ts.map +1 -1
- package/types/compiler/items.d.ts +3 -0
- package/types/compiler/items.d.ts.map +1 -1
- package/types/compiler/jsx-class.d.ts +2 -1
- package/types/compiler/jsx-class.d.ts.map +1 -1
- package/types/compiler/jsx-field.d.ts +13 -0
- package/types/compiler/jsx-field.d.ts.map +1 -0
- package/types/compiler/jsx.d.ts +1 -0
- package/types/compiler/jsx.d.ts.map +1 -1
- package/types/compiler/kay-exports.d.ts.map +1 -1
- package/types/compiler/link-flags.d.ts +12 -0
- package/types/compiler/link-flags.d.ts.map +1 -0
- package/types/compiler/lints.d.ts +562 -54
- package/types/compiler/lints.d.ts.map +1 -1
- package/types/compiler/live-reads.d.ts +13 -0
- package/types/compiler/live-reads.d.ts.map +1 -0
- package/types/compiler/loop-lints.d.ts +4 -4
- package/types/compiler/loop-lints.d.ts.map +1 -1
- package/types/compiler/markup-fields.d.ts +8 -0
- package/types/compiler/markup-fields.d.ts.map +1 -0
- package/types/compiler/markup.d.ts +9 -5
- package/types/compiler/markup.d.ts.map +1 -1
- package/types/compiler/module-signals.d.ts.map +1 -1
- package/types/compiler/names.d.ts +4 -0
- package/types/compiler/names.d.ts.map +1 -1
- package/types/compiler/old-parts.d.ts +9 -0
- package/types/compiler/old-parts.d.ts.map +1 -0
- package/types/compiler/page-settings.d.ts +1 -0
- package/types/compiler/page-settings.d.ts.map +1 -1
- package/types/compiler/parser.d.ts.map +1 -1
- package/types/compiler/plan.d.ts +1 -0
- package/types/compiler/plan.d.ts.map +1 -1
- package/types/compiler/rewrite-reads.d.ts +8 -0
- package/types/compiler/rewrite-reads.d.ts.map +1 -1
- package/types/compiler/rewrite-types.d.ts +1 -0
- package/types/compiler/rewrite-types.d.ts.map +1 -1
- package/types/compiler/rewrite.d.ts.map +1 -1
- package/types/compiler/route-lints.d.ts +13 -6
- package/types/compiler/route-lints.d.ts.map +1 -1
- package/types/compiler/script-props.d.ts.map +1 -1
- package/types/compiler/script-server.d.ts.map +1 -1
- package/types/compiler/script-shared.d.ts +8 -0
- package/types/compiler/script-shared.d.ts.map +1 -1
- package/types/compiler/script.d.ts.map +1 -1
- package/types/compiler/server-imports.d.ts +4 -0
- package/types/compiler/server-imports.d.ts.map +1 -0
- package/types/compiler/slot-types.d.ts +13 -0
- package/types/compiler/slot-types.d.ts.map +1 -0
- package/types/compiler/style-arguments.d.ts +6 -0
- package/types/compiler/style-arguments.d.ts.map +1 -0
- package/types/compiler/template-walk.d.ts +7 -0
- package/types/compiler/template-walk.d.ts.map +1 -0
- package/types/compiler/type-parameters.d.ts +3 -0
- package/types/compiler/type-parameters.d.ts.map +1 -0
- package/types/compiler/validate-fields.d.ts +10 -0
- package/types/compiler/validate-fields.d.ts.map +1 -0
- package/types/compiler/validate.d.ts.map +1 -1
- package/types/config-extensions.d.ts +3 -1
- package/types/config-extensions.d.ts.map +1 -1
- package/types/config-loader.d.ts +2 -2
- package/types/config-loader.d.ts.map +1 -1
- package/types/config-resolve.d.ts +3 -0
- package/types/config-resolve.d.ts.map +1 -0
- package/types/config-shape.d.ts +2 -1
- package/types/config-shape.d.ts.map +1 -1
- package/types/config-switch.d.ts +10 -0
- package/types/config-switch.d.ts.map +1 -0
- package/types/config.d.ts +228 -67
- package/types/config.d.ts.map +1 -1
- package/types/generate-resource.d.ts.map +1 -1
- package/types/lsp/diagnostics.d.ts.map +1 -1
- package/types/lsp/route-documents.d.ts +4 -0
- package/types/lsp/route-documents.d.ts.map +1 -0
- package/types/lsp/server.d.ts +3 -0
- package/types/lsp/server.d.ts.map +1 -1
- package/types/project.d.ts +7 -4
- package/types/project.d.ts.map +1 -1
- package/types/runtime/action-call.d.ts +11 -3
- package/types/runtime/action-call.d.ts.map +1 -1
- package/types/runtime/action-encode.d.ts.map +1 -1
- package/types/runtime/action-error.d.ts.map +1 -1
- package/types/runtime/action-form.d.ts +10 -3
- package/types/runtime/action-form.d.ts.map +1 -1
- package/types/runtime/action-navigate.d.ts +1 -0
- package/types/runtime/action-navigate.d.ts.map +1 -1
- package/types/runtime/action-owner.d.ts +1 -0
- package/types/runtime/action-owner.d.ts.map +1 -1
- package/types/runtime/action-post.d.ts.map +1 -1
- package/types/runtime/action-protection.d.ts.map +1 -1
- package/types/runtime/action-shared.d.ts +76 -15
- package/types/runtime/action-shared.d.ts.map +1 -1
- package/types/runtime/action-stream.d.ts +1 -1
- package/types/runtime/action-stream.d.ts.map +1 -1
- package/types/runtime/action.d.ts +5 -5
- package/types/runtime/action.d.ts.map +1 -1
- package/types/runtime/api-url.d.ts.map +1 -1
- package/types/runtime/await-failed.d.ts +8 -0
- package/types/runtime/await-failed.d.ts.map +1 -0
- package/types/runtime/await.d.ts +2 -2
- package/types/runtime/await.d.ts.map +1 -1
- package/types/runtime/await.server.d.ts +6 -3
- package/types/runtime/await.server.d.ts.map +1 -1
- package/types/runtime/button-form.d.ts +3 -0
- package/types/runtime/button-form.d.ts.map +1 -0
- package/types/runtime/cache-hooks.d.ts +10 -0
- package/types/runtime/cache-hooks.d.ts.map +1 -0
- package/types/runtime/cache-live-id.d.ts +3 -0
- package/types/runtime/cache-live-id.d.ts.map +1 -1
- package/types/runtime/cache.d.ts +1 -5
- package/types/runtime/cache.d.ts.map +1 -1
- package/types/runtime/call-result.d.ts +18 -9
- package/types/runtime/call-result.d.ts.map +1 -1
- package/types/runtime/checks.d.ts +13 -10
- package/types/runtime/checks.d.ts.map +1 -1
- package/types/runtime/consent.d.ts.map +1 -1
- package/types/runtime/core.d.ts +48 -9
- package/types/runtime/core.d.ts.map +1 -1
- package/types/runtime/dispatch.d.ts +8 -0
- package/types/runtime/dispatch.d.ts.map +1 -0
- package/types/runtime/dom-await.d.ts +1 -1
- package/types/runtime/dom-await.d.ts.map +1 -1
- package/types/runtime/dom-image.d.ts +1 -1
- package/types/runtime/dom-image.d.ts.map +1 -1
- package/types/runtime/duration-words.d.ts.map +1 -1
- package/types/runtime/duration.d.ts.map +1 -1
- package/types/runtime/edit.d.ts.map +1 -1
- package/types/runtime/env.d.ts.map +1 -1
- package/types/runtime/forms.d.ts.map +1 -1
- package/types/runtime/head.d.ts.map +1 -1
- package/types/runtime/html.d.ts +3 -2
- package/types/runtime/html.d.ts.map +1 -1
- package/types/runtime/i18n.client.d.ts +4 -1
- package/types/runtime/i18n.client.d.ts.map +1 -1
- package/types/runtime/i18n.d.ts +22 -7
- package/types/runtime/i18n.d.ts.map +1 -1
- package/types/runtime/i18n.server.d.ts +4 -1
- package/types/runtime/i18n.server.d.ts.map +1 -1
- package/types/runtime/image.d.ts +1 -1
- package/types/runtime/image.d.ts.map +1 -1
- package/types/runtime/index.d.ts +9 -8
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/internal.d.ts +2 -1
- package/types/runtime/internal.d.ts.map +1 -1
- package/types/runtime/invalidated-keys.d.ts +2 -0
- package/types/runtime/invalidated-keys.d.ts.map +1 -0
- package/types/runtime/island.server.d.ts.map +1 -1
- package/types/runtime/jsx.d.ts +7 -0
- package/types/runtime/jsx.d.ts.map +1 -1
- package/types/runtime/kay-error.d.ts +14 -0
- package/types/runtime/kay-error.d.ts.map +1 -0
- package/types/runtime/leave.d.ts.map +1 -1
- package/types/runtime/live-cache.d.ts +1 -0
- package/types/runtime/live-cache.d.ts.map +1 -1
- package/types/runtime/live-resource.server.d.ts.map +1 -1
- package/types/runtime/live-revalidate.d.ts +9 -0
- package/types/runtime/live-revalidate.d.ts.map +1 -0
- package/types/runtime/live-value.client.d.ts.map +1 -1
- package/types/runtime/live-value.d.ts +3 -0
- package/types/runtime/live-value.d.ts.map +1 -1
- package/types/runtime/live-value.server.d.ts.map +1 -1
- package/types/runtime/live-value.shared.d.ts +38 -6
- package/types/runtime/live-value.shared.d.ts.map +1 -1
- package/types/runtime/live.d.ts +41 -42
- package/types/runtime/live.d.ts.map +1 -1
- package/types/runtime/local-types.d.ts +86 -0
- package/types/runtime/local-types.d.ts.map +1 -0
- package/types/runtime/local.d.ts +1 -70
- package/types/runtime/local.d.ts.map +1 -1
- package/types/runtime/log.d.ts.map +1 -1
- package/types/runtime/mount.compat.d.ts +7 -0
- package/types/runtime/mount.compat.d.ts.map +1 -0
- package/types/runtime/navigate-api.d.ts +10 -4
- package/types/runtime/navigate-api.d.ts.map +1 -1
- package/types/runtime/navigation-state.d.ts +19 -0
- package/types/runtime/navigation-state.d.ts.map +1 -1
- package/types/runtime/page-swap.d.ts.map +1 -1
- package/types/runtime/persist.d.ts.map +1 -1
- package/types/runtime/persisted.d.ts +25 -29
- package/types/runtime/persisted.d.ts.map +1 -1
- package/types/runtime/presence.d.ts +6 -3
- package/types/runtime/presence.d.ts.map +1 -1
- package/types/runtime/queue-jobs.d.ts.map +1 -1
- package/types/runtime/reactive.d.ts.map +1 -1
- package/types/runtime/refuse.d.ts +8 -1
- package/types/runtime/refuse.d.ts.map +1 -1
- package/types/runtime/resource-tags.d.ts +4 -0
- package/types/runtime/resource-tags.d.ts.map +1 -0
- package/types/runtime/route.d.ts.map +1 -1
- package/types/runtime/sanitize.d.ts.map +1 -1
- package/types/runtime/schema.client.d.ts.map +1 -1
- package/types/runtime/schema.d.ts.map +1 -1
- package/types/runtime/send.d.ts.map +1 -1
- package/types/runtime/shortcut.d.ts +1 -0
- package/types/runtime/shortcut.d.ts.map +1 -1
- package/types/runtime/socket-message.d.ts +7 -0
- package/types/runtime/socket-message.d.ts.map +1 -0
- package/types/runtime/store-base.d.ts +4 -0
- package/types/runtime/store-base.d.ts.map +1 -1
- package/types/runtime/swap-fetch.d.ts.map +1 -1
- package/types/runtime/swap.d.ts +2 -0
- package/types/runtime/swap.d.ts.map +1 -1
- package/types/runtime/template-context.d.ts.map +1 -1
- package/types/runtime/values.d.ts.map +1 -1
- package/types/runtime/wire.d.ts +1 -0
- package/types/runtime/wire.d.ts.map +1 -1
- package/types/runtime/with-query.d.ts.map +1 -1
- package/types/runtime/work.d.ts.map +1 -1
- package/types/server/action-hooks.d.ts +4 -4
- package/types/server/action-hooks.d.ts.map +1 -1
- package/types/server/action-iterable.d.ts +2 -1
- package/types/server/action-iterable.d.ts.map +1 -1
- package/types/server/actions.d.ts +3 -2
- package/types/server/actions.d.ts.map +1 -1
- package/types/server/analytics-server.d.ts.map +1 -1
- package/types/server/api-modules.d.ts +16 -13
- package/types/server/api-modules.d.ts.map +1 -1
- package/types/server/api.d.ts +6 -3
- package/types/server/api.d.ts.map +1 -1
- package/types/server/app-database.d.ts +2 -0
- package/types/server/app-database.d.ts.map +1 -1
- package/types/server/app-hooks.d.ts +10 -2
- package/types/server/app-hooks.d.ts.map +1 -1
- package/types/server/app-stages.d.ts +21 -26
- package/types/server/app-stages.d.ts.map +1 -1
- package/types/server/app.d.ts +21 -24
- package/types/server/app.d.ts.map +1 -1
- package/types/server/auth-mails.d.ts +5 -0
- package/types/server/auth-mails.d.ts.map +1 -1
- package/types/server/basic-auth.d.ts +2 -5
- package/types/server/basic-auth.d.ts.map +1 -1
- package/types/server/bundle.d.ts +1 -0
- package/types/server/bundle.d.ts.map +1 -1
- package/types/server/button-form-rule.d.ts +4 -0
- package/types/server/button-form-rule.d.ts.map +1 -0
- package/types/server/card.d.ts +1 -1
- package/types/server/card.d.ts.map +1 -1
- package/types/server/config-limits.d.ts +5 -5
- package/types/server/config-limits.d.ts.map +1 -1
- package/types/server/context-values.d.ts.map +1 -1
- package/types/server/cookies.d.ts +2 -2
- package/types/server/cookies.d.ts.map +1 -1
- package/types/server/endpoints.d.ts.map +1 -1
- package/types/server/errors.d.ts +2 -2
- package/types/server/errors.d.ts.map +1 -1
- package/types/server/event-stream.d.ts +1 -1
- package/types/server/event-stream.d.ts.map +1 -1
- package/types/server/favicon.d.ts +7 -3
- package/types/server/favicon.d.ts.map +1 -1
- package/types/server/fetch-public.d.ts.map +1 -1
- package/types/server/file-answer.d.ts +17 -0
- package/types/server/file-answer.d.ts.map +1 -0
- package/types/server/forms.d.ts +1 -1
- package/types/server/forms.d.ts.map +1 -1
- package/types/server/guard-requirement.d.ts +6 -0
- package/types/server/guard-requirement.d.ts.map +1 -1
- package/types/server/guards.d.ts +11 -0
- package/types/server/guards.d.ts.map +1 -1
- package/types/server/hooks.d.ts +8 -8
- package/types/server/hooks.d.ts.map +1 -1
- package/types/server/i18n.d.ts.map +1 -1
- package/types/server/image-limits.d.ts.map +1 -1
- package/types/server/image.d.ts +8 -13
- package/types/server/image.d.ts.map +1 -1
- package/types/server/index.d.ts +12 -8
- package/types/server/index.d.ts.map +1 -1
- package/types/server/job-context.d.ts +16 -0
- package/types/server/job-context.d.ts.map +1 -0
- package/types/server/jobs-page.d.ts +1 -1
- package/types/server/jobs-page.d.ts.map +1 -1
- package/types/server/jobs.d.ts +22 -4
- package/types/server/jobs.d.ts.map +1 -1
- package/types/server/kept-exports.d.ts.map +1 -1
- package/types/server/kv.d.ts +5 -4
- package/types/server/kv.d.ts.map +1 -1
- package/types/server/lazy-guard.d.ts +2 -1
- package/types/server/lazy-guard.d.ts.map +1 -1
- package/types/server/library.d.ts +5 -2
- package/types/server/library.d.ts.map +1 -1
- package/types/server/lifecycle.d.ts +2 -2
- package/types/server/lifecycle.d.ts.map +1 -1
- package/types/server/link-schemes.d.ts +1 -1
- package/types/server/link-schemes.d.ts.map +1 -1
- package/types/server/live.d.ts +5 -0
- package/types/server/live.d.ts.map +1 -1
- package/types/server/loader.d.ts.map +1 -1
- package/types/server/log.d.ts +7 -1
- package/types/server/log.d.ts.map +1 -1
- package/types/server/mcp-key.d.ts +2 -3
- package/types/server/mcp-key.d.ts.map +1 -1
- package/types/server/mcp.d.ts +1 -0
- package/types/server/mcp.d.ts.map +1 -1
- package/types/server/metrics.d.ts +9 -2
- package/types/server/metrics.d.ts.map +1 -1
- package/types/server/moved-exports.d.ts +12 -0
- package/types/server/moved-exports.d.ts.map +1 -0
- package/types/server/not-found-config.d.ts.map +1 -1
- package/types/server/openapi.d.ts +5 -5
- package/types/server/openapi.d.ts.map +1 -1
- package/types/server/over-limit.d.ts +9 -0
- package/types/server/over-limit.d.ts.map +1 -0
- package/types/server/page-seo.d.ts +3 -0
- package/types/server/page-seo.d.ts.map +1 -0
- package/types/server/page-settings.d.ts +5 -1
- package/types/server/page-settings.d.ts.map +1 -1
- package/types/server/pg-data.d.ts.map +1 -1
- package/types/server/pg-jobs.d.ts.map +1 -1
- package/types/server/pg-limit.d.ts.map +1 -1
- package/types/server/pg-live.d.ts.map +1 -1
- package/types/server/pg-not-found.d.ts.map +1 -1
- package/types/server/pg-poll.d.ts +2 -2
- package/types/server/pg-poll.d.ts.map +1 -1
- package/types/server/pg-redirects.d.ts.map +1 -1
- package/types/server/pg-stores.d.ts.map +1 -1
- package/types/server/prerender.d.ts.map +1 -1
- package/types/server/preview.d.ts +1 -1
- package/types/server/preview.d.ts.map +1 -1
- package/types/server/protection.d.ts +1 -2
- package/types/server/protection.d.ts.map +1 -1
- package/types/server/proxy-key.d.ts +3 -3
- package/types/server/proxy-key.d.ts.map +1 -1
- package/types/server/pure-page.d.ts.map +1 -1
- package/types/server/push-crypto.d.ts.map +1 -1
- package/types/server/push-server.d.ts.map +1 -1
- package/types/server/queue-scheduler.d.ts +1 -0
- package/types/server/queue-scheduler.d.ts.map +1 -1
- package/types/server/queue.d.ts +6 -7
- package/types/server/queue.d.ts.map +1 -1
- package/types/server/rate-limit.d.ts +6 -1
- package/types/server/rate-limit.d.ts.map +1 -1
- package/types/server/rate-windows.d.ts +3 -0
- package/types/server/rate-windows.d.ts.map +1 -0
- package/types/server/redirects.d.ts.map +1 -1
- package/types/server/remote.d.ts.map +1 -1
- package/types/server/render-document.d.ts +1 -0
- package/types/server/render-document.d.ts.map +1 -1
- package/types/server/report.d.ts +3 -3
- package/types/server/report.d.ts.map +1 -1
- package/types/server/request-record.d.ts +1 -0
- package/types/server/request-record.d.ts.map +1 -1
- package/types/server/resources.d.ts.map +1 -1
- package/types/server/rooms.d.ts +34 -4
- package/types/server/rooms.d.ts.map +1 -1
- package/types/server/route-settings.d.ts +9 -0
- package/types/server/route-settings.d.ts.map +1 -0
- package/types/server/routes.d.ts +1 -6
- package/types/server/routes.d.ts.map +1 -1
- package/types/server/secret.d.ts +12 -0
- package/types/server/secret.d.ts.map +1 -0
- package/types/server/security.d.ts +4 -5
- package/types/server/security.d.ts.map +1 -1
- package/types/server/seo.d.ts.map +1 -1
- package/types/server/served-paths.d.ts.map +1 -1
- package/types/server/session.d.ts +8 -2
- package/types/server/session.d.ts.map +1 -1
- package/types/server/setup.d.ts.map +1 -1
- package/types/server/signals.d.ts +3 -1
- package/types/server/signals.d.ts.map +1 -1
- package/types/server/signed.d.ts +2 -0
- package/types/server/signed.d.ts.map +1 -1
- package/types/server/sitemap.d.ts +4 -3
- package/types/server/sitemap.d.ts.map +1 -1
- package/types/server/socket.d.ts +51 -0
- package/types/server/socket.d.ts.map +1 -0
- package/types/server/source.d.ts +4 -3
- package/types/server/source.d.ts.map +1 -1
- package/types/server/sqlite-live.d.ts.map +1 -1
- package/types/server/storage.d.ts +10 -2
- package/types/server/storage.d.ts.map +1 -1
- package/types/server/stream.d.ts +3 -3
- package/types/server/stream.d.ts.map +1 -1
- package/types/server/uncaught.d.ts +2 -2
- package/types/server/uncaught.d.ts.map +1 -1
- package/types/server/violations.d.ts +2 -2
- package/types/server/violations.d.ts.map +1 -1
- package/types/server/vitals-server.d.ts.map +1 -1
- package/types/server/vitals.d.ts +1 -0
- package/types/server/vitals.d.ts.map +1 -1
- package/types/server/words.d.ts +3 -0
- package/types/server/words.d.ts.map +1 -1
- package/types/server/work-scope.d.ts +2 -0
- package/types/server/work-scope.d.ts.map +1 -1
- package/types/server/work.d.ts +2 -2
- package/types/server/work.d.ts.map +1 -1
- package/types/server/workers.d.ts.map +1 -1
- package/types/server/workflow.d.ts +4 -5
- package/types/server/workflow.d.ts.map +1 -1
- package/types/server/ws-limits.d.ts +15 -6
- package/types/server/ws-limits.d.ts.map +1 -1
- package/types/test/a11y.d.ts +3 -0
- package/types/test/a11y.d.ts.map +1 -0
- package/types/test/browser.d.ts.map +1 -1
- package/types/test/index.d.ts +8 -2
- package/types/test/index.d.ts.map +1 -1
- package/types/test/mount.d.ts.map +1 -1
- package/types/test/outgoing.d.ts +12 -0
- package/types/test/outgoing.d.ts.map +1 -0
- package/types/test/page-types.d.ts +2 -0
- package/types/test/page-types.d.ts.map +1 -1
- package/types/test/screenshot-match.d.ts +7 -0
- package/types/test/screenshot-match.d.ts.map +1 -0
- package/types/test/service.d.ts +2 -0
- package/types/test/service.d.ts.map +1 -1
- package/types/test/site-actions.d.ts +2 -2
- package/types/test/site-actions.d.ts.map +1 -1
- package/types/test/site-keys.d.ts +10 -0
- package/types/test/site-keys.d.ts.map +1 -0
- package/types/test/site-socket.d.ts.map +1 -1
- package/types/test/site-types.d.ts +32 -9
- package/types/test/site-types.d.ts.map +1 -1
- package/types/test/site-world.d.ts +11 -0
- package/types/test/site-world.d.ts.map +1 -0
- package/src/check/local-state.ts +0 -132
- package/src/check/persisted-storage.ts +0 -87
- package/types/check/local-state.d.ts +0 -3
- package/types/check/local-state.d.ts.map +0 -1
- package/types/check/persisted-storage.d.ts +0 -3
- package/types/check/persisted-storage.d.ts.map +0 -1
package/src/config.ts
CHANGED
|
@@ -19,12 +19,13 @@ import type { CorsOptions } from './server/cors'
|
|
|
19
19
|
import type { EnvSchema } from './server/env'
|
|
20
20
|
import type { GuardOption } from './server/lazy-guard'
|
|
21
21
|
|
|
22
|
-
import type {
|
|
22
|
+
import type { LogEntry } from './server/log'
|
|
23
23
|
import type { OpenApiConfig } from './server/openapi'
|
|
24
24
|
import type { PageHook } from './server/page-hook'
|
|
25
25
|
import type { PluginInput } from './server/plugin'
|
|
26
26
|
import type { Redirects } from './server/redirects'
|
|
27
27
|
import type { Rewrite } from './server/rewrite'
|
|
28
|
+
import type { Secret } from './server/secret'
|
|
28
29
|
import type { Prefetch } from './server/speculation'
|
|
29
30
|
import type { TraceExtractor, Tracer } from './server/trace'
|
|
30
31
|
|
|
@@ -34,61 +35,48 @@ export interface KayConfig extends AppHooks {
|
|
|
34
35
|
dirs?: DirsConfig | undefined
|
|
35
36
|
// What a request may carry.
|
|
36
37
|
limits?: LimitsConfig | undefined
|
|
37
|
-
// How the server answers:
|
|
38
|
+
// How the server answers: compression and the stop.
|
|
38
39
|
serve?: ServeConfig | undefined
|
|
39
|
-
//
|
|
40
|
-
|
|
40
|
+
// Where the app's API and kay's own features are served, in one place: `api` (`/api`), `openapi` (`/api/openapi.json`), `mcp` (`/_kay/mcp`), `health` (`/_kay/health`), `metrics` (`/_kay/metrics`) and `jobs` (`/_kay/jobs`). Every default but the API's sits under `/_kay`; the options of each feature stay in its own key.
|
|
41
|
+
endpoints?: EndpointsConfig | undefined
|
|
41
42
|
// What pages ship to the browser and how it behaves there: navigation, styles, typography, hydration, prefetching and Save-Data.
|
|
42
43
|
client?: ClientConfig | undefined
|
|
44
|
+
// The files the site serves besides its pages: `images`, `fonts`, `favicon`, `manifest` and `publicCache`.
|
|
45
|
+
assets?: AssetsConfig | undefined
|
|
46
|
+
// What an app runs the server by: `observe`, `health`, `metrics` and `jobs`.
|
|
47
|
+
ops?: OpsConfig | undefined
|
|
43
48
|
// What every action starts from: the `protect` checks, `maxSize` and `messages` an action's own options replace key by key, and the `beforeRun`, `onSuccess` and `onError` hooks, which run before the action's own.
|
|
44
49
|
actions?: ActionsConfig | undefined
|
|
45
50
|
|
|
46
|
-
// How long a browser keeps a file of `public/` without asking again, by the path it is served at, as a glob: `{ '/fonts/**': '365d', '**/*.png': '30d' }`; the first pattern a path matches decides, and a file none names keeps revalidating through its ETag on every visit. Ignored by `kay dev`, so an edit shows at once.
|
|
47
|
-
publicCache?: Record<string, Duration> | undefined
|
|
48
51
|
minify?: boolean | undefined
|
|
49
52
|
lang?: string | undefined
|
|
50
53
|
// The origin the site is public at, `https://example.com`: canonical links, social URLs and the sitemap are built from it. `SITE_URL` when left out, so one build serves each host it is deployed to; a `site` written here wins over `SITE_URL`.
|
|
51
54
|
site?: string | undefined
|
|
52
55
|
seo?: SeoConfig | undefined
|
|
53
56
|
// What `/robots.txt` says besides pointing at the sitemap, or `false` to serve none: `{ disallow: ['/admin'] }`. Needs `site`, as the sitemap does.
|
|
54
|
-
robots?: RobotsConfig |
|
|
57
|
+
robots?: RobotsConfig | boolean | undefined
|
|
55
58
|
// How `/sitemap.xml` is kept, or `false` to serve none (and name none in `/robots.txt`).
|
|
56
|
-
sitemap?: SitemapConfig |
|
|
59
|
+
sitemap?: SitemapConfig | boolean | undefined
|
|
57
60
|
// Tags every page's head carries, written as a `head` block compiles them: `[{ tag: 'script', props: { src: '/stats.js', defer: true } }]`, a tag's text as `children`. A layout or the page setting a tag of the same identity wins, and the content security policy lets their inline scripts and styles through.
|
|
58
61
|
head?: HeadTag[] | undefined
|
|
59
|
-
images?: ImagesConfig | undefined
|
|
60
62
|
// The most a page may load, compressed: `{ js: '20kb', css: '10kb' }` for its scripts and stylesheets, `weight: '500kb'` for the whole page and `grade: 'C'` for the worst EcoIndex grade it may have. `kay build` reports each page over it with `over-budget`, naming the modules weighing most for `js` and `css`; a key left out sets no limit, and with none nothing is checked.
|
|
61
63
|
budget?: BudgetConfig | undefined
|
|
62
|
-
// A square image, relative to the root, 512 pixels wide or more for sharp icons, a smaller one enlarged with a warning: kay serves it as `/favicon.ico`, `/apple-touch-icon.png` and the icons of `/manifest.webmanifest`, linked from every page. `{ image, svg }` adds an SVG of it, served as `/favicon.svg` and linked after the ICO; a square SVG alone is both, every icon drawn from it. Defaults to kay's own mark; `false` serves none.
|
|
63
|
-
favicon?: string | FaviconConfig | false | undefined
|
|
64
|
-
// The web manifest served with the favicon, named after `seo.name` and described by `seo.description`.
|
|
65
|
-
manifest?: ManifestConfig | undefined
|
|
66
64
|
// The server entry, relative to the root, `src/server.ts` by default: what `kay dev`, `start`, `render`, `check` and `build` run and type against, unless `--entry` names another. With no file there, kay's own server of the pages.
|
|
67
65
|
entry?: string | undefined
|
|
68
|
-
// A service worker keeping the build's files and some pages for a visitor offline, `true` or what it keeps; off by default, as `false` is.
|
|
69
|
-
offline?: true | OfflineConfig | false | undefined
|
|
70
|
-
// `true` has `kay build` index the text of the pages it renders, which `searchSite()` from `kay` searches in the browser; off by default.
|
|
71
|
-
search?: boolean | undefined
|
|
72
|
-
// Self-hosted fonts, declared on every page and preloaded where they ask for it.
|
|
73
|
-
fonts?: (FontConfig | FontsourceConfig)[] | undefined
|
|
74
66
|
// The security headers every response carries, or `false` for none; a header the app sets itself wins.
|
|
75
|
-
security?: SecurityConfig |
|
|
67
|
+
security?: SecurityConfig | boolean | undefined
|
|
76
68
|
// The proxies in front of the server, `true` for one and a number for that many, which the client's address that rate limits count is read through. Left out in production, one proxy is in front for a request from a private address that carries `X-Forwarded-For`; `false` says none is, and the address the server was reached from is the client. Outside production, left out or `false`, the address the server was reached from is the client.
|
|
77
69
|
proxy?: ProxyConfig | number | boolean | undefined
|
|
78
|
-
// Left out, a site with a guard of its own answers 403 on each page, endpoint and API module no `_guard.ts` covers unless it sets `guards: false`, in its `page` or its `api()` options, and a site with no guard stays open. `
|
|
70
|
+
// What a route no guard covers comes to. Left out, a site with a guard of its own answers 403 on each page, endpoint and API module no `_guard.ts` covers unless it sets `guards: false`, in its `page` or its `api()` options, and a site with no guard stays open. `default: 'closed'` asks it of every site and of the actions of layouts and `_actions.kay` files too, `default: 'open'` turns it off; `kay check` reports each such route. A library's routes keep the guards it gives them, and a feature that lists or changes private data (`jobs`, `vitals()`, `images.resolve`, `cms()`) is closed with no `guards` whatever the default, opened only by its own `guards: false`.
|
|
71
|
+
guards?: GuardsConfig | undefined
|
|
72
|
+
// Replaced by `guards: { default }` in 1.105: `true` is `'closed'` and `false` is `'open'`. Works until 1.108.
|
|
79
73
|
requireGuards?: boolean | undefined
|
|
80
74
|
// Lets other sites' pages call every API module's routes from the browser, as `api({ cors })` does for one, an endpoint file setting its own in `page.cors`: `cors: { origins: ['https://app.example.com'], credentials: true }`. A module setting its own `cors` keeps it, and `api({ cors: false })` keeps a module to its own site.
|
|
81
75
|
cors?: CorsOptions | undefined
|
|
82
|
-
// Serves an OpenAPI 3.1 document of the API modules' routes at `/api/openapi.json`, or at `openapi
|
|
76
|
+
// Serves an OpenAPI 3.1 document of the API modules' routes at `/api/openapi.json`, or at `endpoints.openapi`, read from their schemas, behind the API directory's own `_guard.ts`; `{ reference: true }` adds a page listing them at `/api/reference`, or at `reference: { path }`, `{ dev: true }` keeps both to `kay dev`.
|
|
83
77
|
openapi?: boolean | OpenApiConfig | undefined
|
|
84
|
-
// Serves an MCP endpoint at `/mcp` over Streamable HTTP, or at `mcp
|
|
78
|
+
// Serves an MCP endpoint at `/_kay/mcp` over Streamable HTTP, or at `endpoints.mcp`, for an agent to call the app: a tool per API route that sets `tool` in its `detail`, and per action that sets `tool` on its protection. A call runs through the same guards, rate limits and `ctx.locals` as a fetch would.
|
|
85
79
|
mcp?: boolean | McpConfig | undefined
|
|
86
|
-
// The route a load balancer or a container polls, `/_kay/health` unless `path` names another, or `false` for none.
|
|
87
|
-
health?: HealthConfig | false | undefined
|
|
88
|
-
// Serves `/metrics` in the Prometheus text format for a collector: requests by method, route and status, their durations, scheduled runs, cache reads and live connections. Read only from this machine or a private network by a request no proxy forwarded, or from anywhere with the `Authorization: Bearer` token `KAY_METRICS_TOKEN` holds; `{ path }` moves it. Off by default, and under `kay dev`.
|
|
89
|
-
metrics?: boolean | MetricsConfig | undefined
|
|
90
|
-
// Serves a page of the app's queues at `/_kay/jobs` in production: each queue's waiting, running and failed jobs with payload and error, and a button to retry or delete one. It mounts only with a `guard`, a kay guard or a list of them such as `ctx => ctx.locals.auth.requireAdmin()`, which runs on every request, and without one the boot stops. `{ path }` moves it. Off by default, and under `kay dev`, whose dev tool has a Jobs tab.
|
|
91
|
-
jobs?: JobsConfig | undefined
|
|
92
80
|
// Serves a request from another path, query included, such as a host's pages from a section: `url => url.hostname === 'blog.example.com' ? `/blog${url.pathname}` : undefined`. The browser keeps its URL.
|
|
93
81
|
rewrite?: Rewrite | undefined
|
|
94
82
|
// Old paths sent elsewhere with a 308, or the 301, 302 or 307 `status` names, and `{ status: 410 }` for a path that ended, which answers `Gone`: `{ '/blog/:slug': '/posts/:slug', '/docs/*': '/guide/*', '/old': { to: '/new', status: 301 }, '/retired': { status: 410 } }`. `kay check` reports a target no page serves and a 410 that has a `to`.
|
|
@@ -103,9 +91,6 @@ export interface KayConfig extends AppHooks {
|
|
|
103
91
|
timeZone?: string | undefined
|
|
104
92
|
// Where the site is mounted when not at its host's root, `/docs`; `SITE_BASE` when left out, as `site` reads `SITE_URL`, and a `base` written here wins over it. The links, assets, forms and redirects pages render, the sitemap and the feeds carry it, links stay written without it, and a proxy in front of the server takes it off requests.
|
|
105
93
|
base?: string | undefined
|
|
106
|
-
// Where a link leaving the site opens: kay adds `target="_blank" rel="noopener"` to an `a` whose href is another origin, in templates, islands, Markdown and content bodies, unless the element sets its own `target`. `{ outside: 'same-tab' }` writes none.
|
|
107
|
-
// `schemes` lists the URL schemes the app trusts in a bound `href`, `src`, `action`, `formaction`, `xlink:href`, `poster` or `data`, `['webcal', 'geo']`: any other scheme but the web's, mail, phone, sms and blob goes out as `unsafe:`, as `javascript:` would. `javascript`, `vbscript` and `data` are refused. `kay dev` logs each bound URL it rewrote.
|
|
108
|
-
links?: { outside?: 'new-tab' | 'same-tab' | undefined, schemes?: string[] | undefined } | undefined
|
|
109
94
|
// Whether a page's URL ends with a slash: `never`, the default, redirects `/about/` to `/about`; `always` the other way; `ignore` serves both.
|
|
110
95
|
trailingSlash?: TrailingSlash | undefined
|
|
111
96
|
// The module exporting the project's content collections, `src/content.config.ts` by default; their folders are relative to it.
|
|
@@ -121,18 +106,43 @@ export interface KayConfig extends AppHooks {
|
|
|
121
106
|
// The app's one secret, at least 32 random characters: it seals `session()`'s cookie, signs form stamps, links to private files and the flash cookie, and gives `preview` its key, each under a key derived for its use. `KAY_SECRET` alone does the same, so this is for a secret kept elsewhere than the environment. A list, or commas in `KAY_SECRET`, rotates it: the first seals and signs, every one opens and verifies: sessions, kayjs-auth's sealed data, stamps, private-file links, the flash cookie and preview links, so a rotation breaks none of them. Development and tests derive one for the checkout; production without any refuses to boot a `session()`, and a production server using none refuses to start, as it would sign with a key of the process, which a restart changes and other replicas do not share; `KAY_EPHEMERAL_SECRET=1` starts it anyway, for a single throwaway server.
|
|
122
107
|
secret?: string | string[] | undefined
|
|
123
108
|
// Lets an editor see drafts on the live site, `false` for none: a visitor in preview mode sees every draft, and pages render for them alone, past prerendered and cached copies.
|
|
124
|
-
preview?: PreviewConfig |
|
|
109
|
+
preview?: PreviewConfig | boolean | undefined
|
|
125
110
|
|
|
126
|
-
// Where the app keeps what outlives one process, for every feature naming no store of its own: `session()`'s data, `cached` values, `live()` values, queued jobs and schedule locks, rate limit counts, the tabs a page's `presence()` lists and the Web Vitals `vitals()` counts and the notifications `notify()` stores, the push subscriptions, the small keyed values libraries keep with an end (`kv`), and the files `files` from `kay/server` keeps in `files`, which only the app writes: `diskFiles('data/files')` by default, `s3Files()` for a bucket, or memory under `bun test`. `sqliteData('data/app.sqlite')` keeps all but the files in one file; `{ sessions, cache, live, jobs, rates, rooms, vitals, notifications, push, kv, files }` takes stores of your own, each optional, Redis say, and each may have `ping` for `health` and `close` for a stop. Without it sessions stay in `data/
|
|
111
|
+
// Where the app keeps what outlives one process, for every feature naming no store of its own: `session()`'s data, `cached` values, `live()` values, queued jobs and schedule locks, rate limit counts, the tabs a page's `presence()` lists and the Web Vitals `vitals()` counts and the notifications `notify()` stores, the push subscriptions, the small keyed values libraries keep with an end (`kv`), and the files `files` from `kay/server` keeps in `files`, which only the app writes: `diskFiles('data/files')` by default, `s3Files()` for a bucket, or memory under `bun test`. `sqliteData('data/app.sqlite')` keeps all but the files in one file; `{ sessions, cache, live, jobs, rates, rooms, vitals, notifications, push, kv, files }` takes stores of your own, each optional, Redis say, and each may have `ping` for `health` and `close` for a stop. Without it sessions and jobs stay in `data/app.sqlite`, the one file kay and its libraries share (`session({ store: false })` keeps sessions in their cookie), and the others in memory.
|
|
127
112
|
store?: AppStore | undefined
|
|
128
113
|
// The files `kay env` and `kay check` compare the declared variables with: a compose file or several, and the example env file (`{ compose: 'compose.prod.yaml', example: '.env.example' }`). Each variable production needs must be set by a compose service and listed in the example, and each one the example lists must be declared. `false` turns the comparison off, the default one against the root compose files and `.env.example` included.
|
|
129
|
-
|
|
114
|
+
envFiles?: { compose?: string | string[] | undefined, example?: string | undefined } | boolean | undefined
|
|
115
|
+
/** @deprecated Written `envFiles`; `deprecated-env-files` rewrites it. Removed in 1.108. */
|
|
116
|
+
env?: { compose?: string | string[] | undefined, example?: string | undefined } | boolean | undefined
|
|
130
117
|
// The app's own checks, which `kay check` runs with its own: each gets `{ root, routes, report }` and reports problems with `report({ level, message, file, line })`, which join kay's in every format and count toward the exit code. A check that throws, or does not finish within 30 seconds, is reported as an error and the others still run.
|
|
131
118
|
checks?: ProjectCheck[] | undefined
|
|
132
119
|
// What libraries add to the app, each listed once: `extensions: [auth()]`.
|
|
133
120
|
extensions?: KayExtension[] | undefined
|
|
134
121
|
}
|
|
135
122
|
|
|
123
|
+
export interface AssetsConfig {
|
|
124
|
+
images?: ImagesConfig | undefined
|
|
125
|
+
// Self-hosted fonts, declared on every page and preloaded where they ask for it.
|
|
126
|
+
fonts?: (FontConfig | FontsourceConfig)[] | undefined
|
|
127
|
+
// A square image, relative to the root, 512 pixels wide or more for sharp icons, a smaller one enlarged with a warning: kay serves it as `/favicon.ico`, `/apple-touch-icon.png` and the icons of `/manifest.webmanifest`, linked from every page. `{ image, svg }` adds an SVG of it, served as `/favicon.svg` and linked after the ICO; a square SVG alone is both, every icon drawn from it. Defaults to kay's own mark; `false` serves none.
|
|
128
|
+
favicon?: string | FaviconConfig | boolean | undefined
|
|
129
|
+
// The web manifest served with the favicon, named after `seo.name` and described by `seo.description`.
|
|
130
|
+
manifest?: ManifestConfig | undefined
|
|
131
|
+
// How long a browser keeps a file of `public/` without asking again, by the path it is served at, as a glob: `{ '/fonts/**': '365d', '**/*.png': '30d' }`; the first pattern a path matches decides, and a file none names keeps revalidating through its ETag on every visit. Ignored by `kay dev`, so an edit shows at once.
|
|
132
|
+
publicCache?: Record<string, Duration> | undefined
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface OpsConfig {
|
|
136
|
+
// What an app watches the server by: its log, timing, request ids, traces and errors.
|
|
137
|
+
observe?: ObserveConfig | undefined
|
|
138
|
+
// The route a load balancer or a container polls, at `/_kay/health` unless `endpoints.health` names another, or `false` for none.
|
|
139
|
+
health?: HealthConfig | boolean | undefined
|
|
140
|
+
// Serves `/_kay/metrics` in the Prometheus text format for a collector: requests by method, route and status, their durations, scheduled runs, cache reads and live connections. Read only from this machine or a private network by a request no proxy forwarded, or from anywhere with the `Authorization: Bearer` token `KAY_METRICS_TOKEN` holds; `endpoints.metrics` moves it. Off by default, and under `kay dev`.
|
|
141
|
+
metrics?: boolean | MetricsConfig | undefined
|
|
142
|
+
// Serves a page of the app's queues at `/_kay/jobs` in production: each queue's waiting, running and failed jobs with payload and error, and a button to retry or delete one. It mounts only with a `guard`, a kay guard or a list of them such as `ctx => ctx.locals.auth.admin.require()`, which runs on every request, and without one the boot stops. `endpoints.jobs` moves it. Off by default, and under `kay dev`, whose dev tool has a Jobs tab.
|
|
143
|
+
jobs?: JobsConfig | undefined
|
|
144
|
+
}
|
|
145
|
+
|
|
136
146
|
export interface ActionsConfig extends ActionHooks {
|
|
137
147
|
// The checks every action gets, as `protect` of an action's options takes them: an action naming a check replaces the app's, and `protect: false` takes none of them.
|
|
138
148
|
protect?: ActionProtect<string> | undefined
|
|
@@ -159,21 +169,29 @@ export interface LimitsConfig {
|
|
|
159
169
|
}
|
|
160
170
|
|
|
161
171
|
export interface ServeConfig {
|
|
162
|
-
// The prefix the API modules, the OpenAPI document and its reference page are served under, `/api` by default: `serve: { apiPrefix: '/v1' }` serves `src/api/chat.ts` at `/v1/chat`. Absolute, plain segments, no trailing slash, not under `/_kay`; `mcp.path` and the `openapi` paths keep their own settings. Libraries read it through `apiUrl()`.
|
|
163
|
-
apiPrefix?: string | undefined
|
|
164
172
|
// Compresses the pages rendered per request, action results, and any Response the app's routes registered after `pages()` return, with brotli or gzip. On by default when NODE_ENV is production; `false` behind a proxy or CDN that compresses already.
|
|
165
173
|
compress?: boolean | undefined
|
|
166
174
|
// A server build with a prerendered page uses its 404 page as a compression dictionary, sending a page to a browser that fetched it as the difference from it; `false` builds none, so no page names it and the build writes no `.dcz` copy.
|
|
167
175
|
compressionDictionary?: boolean | undefined
|
|
168
176
|
// How long a stopping server gives open requests and streams to finish before closing them, a string such as '30s'; 10 seconds by default.
|
|
169
177
|
shutdownTimeout?: Duration | undefined
|
|
170
|
-
// The longest a page, an action, an `api()` route or an endpoint may take to answer, a string such as '15s'; past it the request answers 504 (a page through the nearest `_error.kay`), is logged and handed to `
|
|
178
|
+
// The longest a page, an action, an `api()` route or an endpoint may take to answer, a string such as '15s'; past it the request answers 504 (a page through the nearest `_error.kay`), is logged and handed to `onError`, and `ctx.signal` aborts. None by default. A page sets its own in `export const page = { timeout }`, an `api({ timeout })` module and an action's third argument likewise, `false` for none.
|
|
171
179
|
timeout?: Duration | false | undefined
|
|
172
180
|
}
|
|
173
181
|
|
|
182
|
+
// How kay writes what it logs: the line of each request and kay's own messages.
|
|
183
|
+
export interface LogConfig {
|
|
184
|
+
// `'text'`, a line each, or `'json'`, one JSON object each, requests and kay's own messages alike; `'text'` by default.
|
|
185
|
+
format?: 'text' | 'json' | undefined
|
|
186
|
+
// Whether each request gets its line, `true` once the object is given; `false` keeps kay's messages and logs no request.
|
|
187
|
+
requests?: boolean | undefined
|
|
188
|
+
// Receives every entry, request lines and messages, in place of stdout and stderr.
|
|
189
|
+
sink?: ((entry: LogEntry) => void) | undefined
|
|
190
|
+
}
|
|
191
|
+
|
|
174
192
|
export interface ObserveConfig {
|
|
175
|
-
// One line per request on stdout, on by default when NODE_ENV is production, `false` for none; `'json'`
|
|
176
|
-
log?:
|
|
193
|
+
// One line per request on stdout, on by default when NODE_ENV is production, `true` for it outside production too, `false` for none; kay's own messages go out either way. `{ format: 'json', requests, sink }` sets how they are written, as one JSON object each or to a function.
|
|
194
|
+
log?: boolean | LogConfig | undefined
|
|
177
195
|
// A `Server-Timing` header on each action, endpoint and API route, timing its guards and handler, and on each page rendered per request, timing its guards, the import of its modules, its loads and its render for the browser's network panel: on in development, off otherwise unless set.
|
|
178
196
|
serverTiming?: boolean | undefined
|
|
179
197
|
// In development, how long a page's loads may take before kay warns in the console and the dev tool, naming the slowest load: a duration such as `'500ms'`, `'300ms'` by default, `false` for no warning. A page waits for its loads before anything is sent, so one past the budget is a click that waits as long; start what the first paint does not need unawaited and read it in an `await` block.
|
|
@@ -184,11 +202,6 @@ export interface ObserveConfig {
|
|
|
184
202
|
tracer?: Tracer | undefined
|
|
185
203
|
// Reads the trace a request arrives in out of its headers, a one-liner with OpenTelemetry: `extract: headers => propagation.extract(ROOT_CONTEXT, Object.fromEntries(headers))`. By default kay reads the W3C `traceparent` header itself, so a tracer's server spans join the caller's trace; `false` ignores incoming traces and starts a new one per request.
|
|
186
204
|
extract?: TraceExtractor | false | undefined
|
|
187
|
-
// Receives every error a load, a render, a guard or an action throws, as it is logged, and the ones islands report from the browser: the place to send them to an error tracker.
|
|
188
|
-
// An error met outside any request, in a scheduled or background job or an `onStop` hook, comes with `undefined` for the request.
|
|
189
|
-
// An error a hook of kay or a library threw comes with its `source`, such as `'cms.onSave'`; it is undefined for any other.
|
|
190
|
-
// `code` is the registered name of a `KayError` (`kay explain <code>`), undefined for any other error.
|
|
191
|
-
onError?: ((event: { error: unknown, request: Request | undefined, source?: string | undefined, code?: string | undefined }) => void | Promise<void>) | undefined
|
|
192
205
|
}
|
|
193
206
|
|
|
194
207
|
export interface ClientConfig {
|
|
@@ -202,10 +215,17 @@ export interface ClientConfig {
|
|
|
202
215
|
typography?: boolean | undefined
|
|
203
216
|
// How far ahead of the viewport islands start to load, as CSS root margins: `visible` for an island marked `hydrate="visible"` (`'200px'` by default), `serverIslands` for a deferred server island (`'100% 0px'`, a screen ahead, by default).
|
|
204
217
|
hydration?: { visible?: string | undefined, serverIslands?: string | undefined } | undefined
|
|
205
|
-
// When the browser fetches a page a link points at before it is followed: `moderate`, the default, on hover, `conservative` on press, `eager` as soon as it can (every link on a page without kay's script, the links scrolled into view, a few at a time, on one shipping it), `false` never. A link with `data-
|
|
218
|
+
// When the browser fetches a page a link points at before it is followed: `moderate`, the default, on hover, `conservative` on press, `eager` as soon as it can (every link on a page without kay's script, the links scrolled into view, a few at a time, on one shipping it), `false` never. A link with `data-prefetch="false"` never is, and `data-prefetch="eager|moderate|conservative"` on a link or a container sets its own level where kay's script runs.
|
|
206
219
|
prefetch?: Prefetch | undefined
|
|
207
220
|
// Whether a visitor sending `Save-Data: on` gets a lighter site by itself: image variants one width narrower, no font preloads, fonts shown only when cached, no speculation rules; `Save-Data` or `prefers-reduced-data` in the browser also stops the prefetch and has an island with no `hydrate` wait until it scrolls near. On by default, `false` serves everyone alike.
|
|
208
221
|
saveData?: boolean | undefined
|
|
222
|
+
// A service worker keeping the build's files and some pages for a visitor offline, `true` or what it keeps; off by default, as `false` is.
|
|
223
|
+
offline?: OfflineConfig | boolean | undefined
|
|
224
|
+
// `true` has `kay build` index the text of the pages it renders, which `searchSite()` from `kay` searches in the browser; off by default.
|
|
225
|
+
search?: boolean | undefined
|
|
226
|
+
// Where a link leaving the site opens: kay adds `target="_blank" rel="noopener"` to an `a` whose href is another origin, in templates, islands, Markdown and content bodies, unless the element sets its own `target`. `{ outside: 'same-tab' }` writes none.
|
|
227
|
+
// `schemes` lists the URL schemes the app trusts in a bound `href`, `src`, `action`, `formaction`, `xlink:href`, `poster` or `data`, `['webcal', 'geo']`: any other scheme but the web's, mail, phone, sms and blob goes out as `unsafe:`, as `javascript:` would. `javascript`, `vbscript` and `data` are refused. `kay dev` logs each bound URL it rewrote.
|
|
228
|
+
links?: { outside?: 'new-tab' | 'same-tab' | undefined, schemes?: string[] | undefined } | undefined
|
|
209
229
|
// The longest the browser waits for a page it swaps in place, a string such as '10s' (the default): past it the browser loads the page itself, which shows its own progress or error. A page streaming `await` blocks is shown with their pending branches once its first part is in, and this is then the longest the stream may go without a byte before the blocks still pending are left as they are; the server keeps a stream alive every 5 s, so keep it above that.
|
|
210
230
|
pageTimeout?: Duration | undefined
|
|
211
231
|
// How long a link or `navigate()` to another page waits before the page's `_loading.kay` shows in place of the one left, a string such as '200ms' (the default): a page answering sooner never flashes it. Only read on an app with a `_loading.kay`.
|
|
@@ -244,6 +264,8 @@ export interface SeoConfig {
|
|
|
244
264
|
image?: Localized | undefined
|
|
245
265
|
// What the card image shows, for `og:image:alt` and `twitter:image:alt`.
|
|
246
266
|
imageAlt?: Localized | undefined
|
|
267
|
+
// Keeps every page out of search engines, `<meta name="robots" content="noindex">`, for a staging site; a page or layout may set its own `robots`.
|
|
268
|
+
noindex?: boolean | undefined
|
|
247
269
|
// The site's Twitter handle, `@site`.
|
|
248
270
|
twitter?: string | undefined
|
|
249
271
|
// `og:locale`, such as `fr_FR`.
|
|
@@ -271,25 +293,46 @@ export interface PreviewConfig {
|
|
|
271
293
|
sharedNotBefore?: ((entry: PreviewScope) => Date | number | undefined | Promise<Date | number | undefined>) | undefined
|
|
272
294
|
}
|
|
273
295
|
|
|
296
|
+
export interface GuardsConfig {
|
|
297
|
+
default?: 'open' | 'closed' | undefined
|
|
298
|
+
}
|
|
299
|
+
|
|
274
300
|
export interface LiveConfig {
|
|
275
301
|
// How many live connections one client address holds at once, 20 by default: a few tabs, not a flood. One more answers 429.
|
|
276
302
|
connections?: number | undefined
|
|
277
303
|
// How many openings a client address may make in a window, `{ max: 120, window: '1m' }` by default, the shape of every rate limit in kay, or `false` for no limit.
|
|
278
|
-
rateLimit?:
|
|
304
|
+
rateLimit?: Omit<RateLimit, 'key'> | boolean | undefined
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Where the app's API and kay's own features are served, each an absolute path of plain segments without a trailing slash, none under `/_kay`.
|
|
308
|
+
export interface EndpointsConfig {
|
|
309
|
+
// The prefix the API modules are served under, `/api` by default: `endpoints: { api: '/v1' }` serves `src/api/chat.ts` at `/v1/chat`. Libraries read it through `apiUrl()`.
|
|
310
|
+
api?: string | undefined
|
|
311
|
+
// Where the OpenAPI document is served, `/api/openapi.json` under the API prefix by default; its reference page is set in `openapi.reference`.
|
|
312
|
+
openapi?: string | undefined
|
|
313
|
+
// Where the MCP endpoint is served, `/_kay/mcp` by default. `/mcp`, where it was served before 1.105, redirects there with a 308 until 1.108 when this is not set.
|
|
314
|
+
mcp?: string | undefined
|
|
315
|
+
// Where the health check is served, `/_kay/health` by default.
|
|
316
|
+
health?: string | undefined
|
|
317
|
+
// Where the metrics are served, `/_kay/metrics` by default. `/metrics`, where they were served before 1.105, answers as well until 1.108 when this is not set.
|
|
318
|
+
metrics?: string | undefined
|
|
319
|
+
// Where the page of the queues is served, `/_kay/jobs` by default.
|
|
320
|
+
jobs?: string | undefined
|
|
279
321
|
}
|
|
280
322
|
|
|
281
323
|
export interface JobsConfig {
|
|
282
|
-
//
|
|
283
|
-
|
|
284
|
-
|
|
324
|
+
// Who may open the page: a guard, a list of them run in order, or `{ load }` returning one. Left out the page answers 403, as every feature that lists or changes private data does; `false` opens it to everyone.
|
|
325
|
+
guards?: GuardOption | false | undefined
|
|
326
|
+
// Replaced by `guards` in 1.105, and works until 1.108.
|
|
327
|
+
guard?: GuardOption | false | undefined
|
|
285
328
|
}
|
|
286
329
|
|
|
287
330
|
export interface MetricsConfig {
|
|
288
|
-
|
|
331
|
+
// The bearer token a scrape must send, from anywhere: `true` reads `KAY_METRICS_TOKEN`, a string is the token, `{ env }` names the variable and `{ file }` the file that holds it. Left out it is `KAY_METRICS_TOKEN` when that is set; with no token only a request from this machine or a private network that no proxy forwarded is answered.
|
|
332
|
+
token?: true | Secret | undefined
|
|
289
333
|
}
|
|
290
334
|
|
|
291
335
|
export interface HealthConfig {
|
|
292
|
-
path?: string | undefined
|
|
293
336
|
// How long `check` may take before the route fails with 503, and how long `--health` waits for the route: a string such as `'250ms'` or `'10s'`; 5 seconds by default.
|
|
294
337
|
timeout?: Duration | undefined
|
|
295
338
|
// Fails the route with 503 when it returns false or throws, such as a database that does not answer.
|
|
@@ -298,7 +341,7 @@ export interface HealthConfig {
|
|
|
298
341
|
|
|
299
342
|
export interface SecurityConfig {
|
|
300
343
|
// Directives merged over kay's Content-Security-Policy, `{ 'img-src': ["'self'"] }`, one given `false` left out, or `false` for no policy; `script-src` keeps the hashes of kay's inline scripts.
|
|
301
|
-
csp?: Record<string, string[] | false> |
|
|
344
|
+
csp?: Record<string, string[] | false> | boolean | undefined
|
|
302
345
|
// Directives merged over the enforced policy and sent as `Content-Security-Policy-Report-Only`, to see what a stricter policy would block before enforcing it.
|
|
303
346
|
reportOnly?: Record<string, string[] | false> | undefined
|
|
304
347
|
// Where browsers report what either policy blocks: `true` for kay's own route, which logs each violation and hands it to `onError` as a `CspViolationError`, or a collector's URL.
|
|
@@ -310,7 +353,7 @@ export interface SecurityConfig {
|
|
|
310
353
|
// Production answers 421 to a request whose `Host` is not the site's, one of the `i18n` locale hosts or listed here, against DNS rebinding and a link built from `ctx.url.origin` poisoned by the header: `true` allows those alone, which is the default once `site` is set, and `false` trusts every `Host`. Localhost and IP addresses always pass, as a health check reaches the server by them. Under `kay dev` it is `KAY_DEV_HOSTS` instead.
|
|
311
354
|
hosts?: string[] | boolean | undefined
|
|
312
355
|
// What a cookie set with `ctx.cookies.set` gets for an option it does not give, so an app's cookies are as hardened as kay's own, on by default: `HttpOnly`, `SameSite=Lax`, `Secure` over https and `Path` the `base`, and a call's own option wins. `false` (or `security: false`) leaves Bun's plain defaults (`SameSite=Lax`, `Path=/`, neither `HttpOnly` nor `Secure`).
|
|
313
|
-
cookies?: CookieDefaults |
|
|
356
|
+
cookies?: CookieDefaults | boolean | undefined
|
|
314
357
|
}
|
|
315
358
|
|
|
316
359
|
export interface CookieDefaults {
|
|
@@ -325,6 +368,11 @@ export interface CookieDefaults {
|
|
|
325
368
|
}
|
|
326
369
|
|
|
327
370
|
// `hops` or `header`, not both, and with `key` alone one proxy is in front: read only from a request coming from this machine or a private network, so a client reaching the server directly cannot forge it.
|
|
371
|
+
export interface ProxyKey {
|
|
372
|
+
header: string
|
|
373
|
+
secret?: Secret | undefined
|
|
374
|
+
}
|
|
375
|
+
|
|
328
376
|
export interface ProxyConfig {
|
|
329
377
|
// The proxies that each append to `X-Forwarded-For`: 1 for nginx or Caddy alone, 2 for Cloudflare then nginx.
|
|
330
378
|
hops?: number | undefined
|
|
@@ -334,8 +382,8 @@ export interface ProxyConfig {
|
|
|
334
382
|
trusted?: string[] | undefined
|
|
335
383
|
// `false` trusts the `trusted` ranges alone, instead of this machine and private networks too: for a server whose private neighbours are not all its proxies. Goes with `trusted`.
|
|
336
384
|
trustPrivate?: false | undefined
|
|
337
|
-
// The
|
|
338
|
-
key?:
|
|
385
|
+
// The key the proxy shares with the server, sent in the header `header` names, such as `{ header: 'x-upstream-key' }`: a request without it, or with another value, is refused with 403, so a process or a container reaching the port directly skips nothing the proxy does. `secret` is the key, `{ env }` or `{ file }`; left out it is read from `KAY_PROXY_KEY`, else from the file `KAY_PROXY_KEY_FILE` names. Compared in constant time. Off under `kay dev` and outside production without a key; a production server with none does not boot.
|
|
386
|
+
key?: ProxyKey | undefined
|
|
339
387
|
// Paths, and what is under them, that need no key besides the health route: `['/api/push']`, read after the base is taken off.
|
|
340
388
|
open?: string[] | undefined
|
|
341
389
|
}
|
|
@@ -437,38 +485,73 @@ export interface ImagesConfig {
|
|
|
437
485
|
ttl?: Duration | undefined
|
|
438
486
|
// Directories of images added at runtime, such as uploads, by the URL path the app serves them at: `{ '/uploads/': 'data/uploads' }`. The image route resizes those as well as imported images, reading them on each request; a directory is relative to the root, or where an executable runs.
|
|
439
487
|
dirs?: Record<string, string> | undefined
|
|
440
|
-
//
|
|
441
|
-
remote?:
|
|
442
|
-
//
|
|
443
|
-
|
|
444
|
-
// How long the image route waits for a remote host, redirects included, a string such as `'30s'`; 10 seconds by default. A slower host answers 502.
|
|
445
|
-
remoteTimeout?: Duration | undefined
|
|
488
|
+
// Images on other hosts, resized too: `{ hosts: ['https://cms.example.com/uploads/'] }`. The image route downloads them, keeping a copy it revalidates; a host not listed is refused, so the route is no open proxy.
|
|
489
|
+
remote?: RemoteImages | undefined
|
|
490
|
+
// How the variants are encoded.
|
|
491
|
+
formats?: ImageFormats | undefined
|
|
446
492
|
// The most variants one client may have the image route encode in a window, counted by its address (the forwarded one behind a trusted `proxy`); a variant already made is never counted. Past it the route answers 429 with `Retry-After`. `{ max: 120, window: '1m' }` by default, `false` for no limit.
|
|
447
|
-
rateLimit?:
|
|
448
|
-
//
|
|
449
|
-
|
|
450
|
-
// The most encodes waiting for one of the four being drawn; past it the route answers 503 with `Retry-After` rather than queue more. 128 by default, `false` for no limit.
|
|
451
|
-
queue?: number | false | undefined
|
|
452
|
-
// WebP quality, 1 to 100. Defaults to 80. It also sets the quality of the share cards' JPEG, which `webp.quality` leaves alone; `image(src, { quality })` sets one image's variants.
|
|
453
|
-
quality?: number | undefined
|
|
454
|
-
// WebP variants beside the AVIF ones: `{ quality: 75 }` over `quality`, for the variants alone.
|
|
455
|
-
webp?: { quality?: number | undefined } | undefined
|
|
493
|
+
rateLimit?: Omit<RateLimit, 'key'> | boolean | undefined
|
|
494
|
+
// What the route spends on variants nobody has made yet.
|
|
495
|
+
limits?: ImageLimits | undefined
|
|
456
496
|
// The widths in pixels `image()` resizes to and the route makes, whole numbers from 1 to 16384, at most 16, in any order: `[480, 960, 1440, 1920]`. Defaults to `[320, 640, 960, 1280, 1920, 2560]`, and no variant is wider than the last width, which a list of your own does not do: it also gets each image's own size. Each width is a file per image, so a short ladder builds fewer.
|
|
457
497
|
widths?: number[] | undefined
|
|
458
|
-
// AVIF variants beside the WebP ones, a third to a half smaller, sent to a browser whose `Accept` names `image/avif`: on at quality 50 by default, `false` serves WebP alone. Development and a static export serve WebP.
|
|
459
|
-
avif?: false | { quality?: number } | undefined
|
|
460
498
|
// The most pixels per CSS pixel an image loads at on a denser screen, at least 1. Defaults to 2: a 3x phone loads what a 2x one does, which looks the same; `Infinity` leaves the browser's choice.
|
|
461
499
|
maxDensity?: number | undefined
|
|
462
500
|
// `false` leaves out the color an image's box shows until it loads, which kay reads off each imported, Markdown, `dirs` and `remote` image without transparency; `image(src, { placeholder: false })` and `no-placeholder` on an `img` leave out one image's. Shown as a `style` attribute, so a CSP without `'unsafe-inline'` for styles drops it.
|
|
463
|
-
placeholder?:
|
|
501
|
+
placeholder?: boolean | undefined
|
|
464
502
|
// The aspect ratios `image(src, { aspect })` may cut to, each one adding a variant per width the route makes on request: `['1/1', '3/2', '2/3', '4/3', '3/4', '16/9', '9/16']` by default.
|
|
465
503
|
aspects?: string[] | undefined
|
|
466
504
|
// How `shareCard()` draws a page's card.
|
|
467
505
|
card?: CardConfig | undefined
|
|
468
506
|
// The file of an image `src` no import, stored file, `dirs` entry or remote host names, looked up the app's own way: `(src, ctx) => mediaPath(src.slice('/media/'.length))`. A path relative to the root, or undefined for a 404; `ctx` is a guard's, its `deny()` and `redirect()` included. `image(src, { width, height })` then resizes any `src` starting with `/`, and these answers are private to the browser.
|
|
469
507
|
resolve?: ((src: string, ctx: GuardContext) => string | undefined | Promise<string | undefined>) | undefined
|
|
470
|
-
// Run before `resolve`, as a page guard: `
|
|
471
|
-
|
|
508
|
+
// Run before `resolve`, as a page guard: `guards: ctx => { if (!ctx.locals.session.get('user')) ctx.deny(401) }` resizes those images for signed-in users alone. A list or `{ load }` is taken too. Left out, a `resolve` answers 403 for every image, since it reads files the app chooses; `false` opens them to everyone.
|
|
509
|
+
guards?: GuardOption | false | undefined
|
|
510
|
+
// Replaced by `guards` in 1.105, and works until 1.108.
|
|
511
|
+
guard?: GuardOption | false | undefined
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface RemoteImages {
|
|
515
|
+
// Each an origin and maybe a path, its host maybe starting with `*.` for any subdomain: `['https://cms.example.com/uploads/', 'https://*.cdn.example.com']`.
|
|
516
|
+
hosts?: string[] | undefined
|
|
517
|
+
// The most a remote original may weigh, bytes or a size such as `'10mb'`: a bigger one answers 413 and is not kept. 25 MB by default.
|
|
518
|
+
maxSize?: ByteSize | undefined
|
|
519
|
+
// How long the image route waits for a remote host, redirects included, a string such as `'30s'`; 10 seconds by default. A slower host answers 502.
|
|
520
|
+
timeout?: Duration | undefined
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface ImageFormats {
|
|
524
|
+
// WebP quality, 1 to 100. Defaults to 80. It also sets the quality of the share cards' JPEG, which `webp.quality` leaves alone; `image(src, { quality })` sets one image's variants.
|
|
525
|
+
quality?: number | undefined
|
|
526
|
+
// WebP variants beside the AVIF ones: `{ quality: 75 }` over `quality`, for the variants alone.
|
|
527
|
+
webp?: { quality?: number | undefined } | undefined
|
|
528
|
+
// AVIF variants beside the WebP ones, a third to a half smaller, sent to a browser whose `Accept` names `image/avif`: on at quality 50 by default, `false` serves WebP alone. Development and a static export serve WebP.
|
|
529
|
+
avif?: boolean | { quality?: number } | undefined
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface ImageLimits {
|
|
533
|
+
// The most variants the route keeps cached of one source image, so a client varying width, quality, crop and format cannot fill the cache without bound. Past it the oldest cached variant of that image is removed to make room, and one asked for again is encoded again, within `rateLimit`. Counted from the files on disk. 256 by default, `false` for no limit.
|
|
534
|
+
variants?: number | false | undefined
|
|
535
|
+
// The most encodes waiting for one of the four being drawn; past it the route answers 503 with `Retry-After` rather than queue more. 128 by default, `false` for no limit.
|
|
536
|
+
queue?: number | false | undefined
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// `images` as an app written it before 1.105 may still: the flat keys, each of which works until 1.108.
|
|
540
|
+
export interface DeprecatedImages {
|
|
541
|
+
/** @deprecated Written `remote: { maxSize }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
542
|
+
remoteMaxSize?: ByteSize | undefined
|
|
543
|
+
/** @deprecated Written `remote: { timeout }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
544
|
+
remoteTimeout?: Duration | undefined
|
|
545
|
+
/** @deprecated Written `limits: { variants }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
546
|
+
maxVariants?: number | false | undefined
|
|
547
|
+
/** @deprecated Written `limits: { queue }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
548
|
+
queue?: number | false | undefined
|
|
549
|
+
/** @deprecated Written `formats: { quality }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
550
|
+
quality?: number | undefined
|
|
551
|
+
/** @deprecated Written `formats: { webp }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
552
|
+
webp?: { quality?: number | undefined } | undefined
|
|
553
|
+
/** @deprecated Written `formats: { avif }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
554
|
+
avif?: boolean | { quality?: number } | undefined
|
|
472
555
|
}
|
|
473
556
|
|
|
474
557
|
export interface CardConfig {
|
|
@@ -484,14 +567,15 @@ export interface CardConfig {
|
|
|
484
567
|
|
|
485
568
|
export type TrailingSlash = 'never' | 'always' | 'ignore'
|
|
486
569
|
|
|
570
|
+
// How the locales show in a URL: `'prefix'`, the default, serves the default locale's pages unprefixed and the others under `/en`; `'always'` puts the default locale under its prefix too, `/fr/about`, and an unprefixed path then redirects to the visitor's locale, from their cookie or their browser's languages; `{ domains: { fr: 'example.fr', en: 'example.com' } }` serves each locale on its own host in place of prefixes, a host not listed serving the default locale.
|
|
571
|
+
export type I18nMode = 'prefix' | 'always' | { domains: Record<string, string> }
|
|
572
|
+
|
|
487
573
|
export interface I18nConfig {
|
|
488
574
|
// BCP 47 tags, `['fr', 'en']`.
|
|
489
575
|
locales: string[]
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
// Each locale's host, `{ fr: 'example.fr', en: 'example.com' }`, in place of prefixes; a host not listed serves the default locale.
|
|
494
|
-
domains?: Record<string, string> | undefined
|
|
576
|
+
// The locale a path naming none is served in, one of `locales`.
|
|
577
|
+
default: string
|
|
578
|
+
mode?: I18nMode | undefined
|
|
495
579
|
// A page's path in the locales naming it their own way, by the pattern the page is served under: `{ '/about': { fr: '/a-propos' }, '/blog/:slug': { fr: '/articles/:slug' } }`; its untranslated path in that locale redirects there.
|
|
496
580
|
paths?: Record<string, Record<string, string>> | undefined
|
|
497
581
|
// The directory of the `<locale>.ts` message files, relative to the root: `src/messages` by default.
|
|
@@ -551,10 +635,10 @@ export interface KayExtension<Server extends PluginInput = AnyElysia> {
|
|
|
551
635
|
layout?: string | { file: string, reaching: string[] } | undefined
|
|
552
636
|
// Stylesheets the app's own stylesheets may `@apply` utilities from and read `theme()` tokens of with no `@reference` line, as if each began with one: absolute paths, or specifiers Tailwind resolves from the stylesheet. kay adds an `@reference` after the Tailwind import of each stylesheet of the app, which writes no rule, so a stylesheet that already imports or references the file is not loaded twice.
|
|
553
637
|
references?: string[] | undefined
|
|
554
|
-
// A module whose default export is `defineContext(load)` from `kay/
|
|
638
|
+
// A module whose default export is `defineContext(load)` from `kay/server`, absolute or relative to the project root: `load(request)` returns the request values the extension gives every template as `ctx`, `ctx.user` or `ctx.can('admin')`, with no `--- server` fence. It runs at most once per request, ahead of the render of each page whose imports reach a template that reads `ctx`, and of no other, which is then the visitor's own as a page reading `ctx.locals` is. `defineContext({ key: load })` gives one loader per key instead, each run only for a page whose templates read that key. `kay check` and the editor type `ctx` off the module itself; two extensions giving one key stop the page.
|
|
555
639
|
context?: string | undefined
|
|
556
640
|
// A directory of API modules laid over the app's under `prefix`, the root by default, as `routes` is over its pages: `{ dir: 'api', prefix: 'auth' }` serves `api/session.ts` at `/api/auth/session`, unless the app has `src/api/auth/session.ts`.
|
|
557
|
-
// A prefix starting with `/_kay/` is absolute, served there whatever `
|
|
641
|
+
// A prefix starting with `/_kay/` is absolute, served there whatever `endpoints.api` is. `former` is the prefix it had under `endpoints.api` before it moved: that path still answers, as the new one, for the releases the library says.
|
|
558
642
|
// A module may default-export a function of the `ExtensionApp` building its instance, `({ modules }) => api({ cors }).get('/', () => modules.features)`, called as the app is built, so it serves the app's `appFiles`.
|
|
559
643
|
api?: { dir: string, prefix?: string | undefined, former?: string | undefined } | undefined
|
|
560
644
|
// A directory of message catalogs, `<locale>.ts` each, under the app's own: a key the app translates is the app's.
|
|
@@ -586,38 +670,139 @@ export interface InternalConfig {
|
|
|
586
670
|
// The config as kay reads it once loaded: what `kay.config.ts` wrote and what kay added.
|
|
587
671
|
export type LoadedConfig = KayConfig & InternalConfig
|
|
588
672
|
|
|
673
|
+
// A list a CMS or a database may hold: the value, or a function returning it (or a promise of it), which kay calls once as the config loads.
|
|
674
|
+
export type Loadable<Value> = Value | (() => Value | Promise<Value>)
|
|
675
|
+
|
|
676
|
+
// `cors` of the config: `origins` may be loaded.
|
|
677
|
+
export type ConfigCors = Omit<CorsOptions, 'origins' | 'credentials'> & ({ origins: '*', credentials?: false | undefined } | { origins: Loadable<readonly string[]>, credentials?: boolean | undefined })
|
|
678
|
+
|
|
679
|
+
type Over<Bag, Given> = Omit<Bag, keyof Given> & Given
|
|
680
|
+
|
|
681
|
+
// What `kay.config.ts` may write: `KayConfig` with each list that may come from a CMS or a database loadable, and the keys of before 1.105 `kay check --fix` rewrites. Kay turns it into a `KayConfig` as it loads.
|
|
682
|
+
export interface ConfigInput extends Omit<KayConfig, 'cors' | 'security' | 'proxy' | 'mcp' | 'robots' | 'redirects' | 'i18n' | 'assets' | 'ops' | 'serve' | 'openapi'> {
|
|
683
|
+
/** @deprecated Written `onListen`; `deprecated-app-hooks` rewrites it. Removed in 1.108. */
|
|
684
|
+
onStart?: AppHooks['onListen']
|
|
685
|
+
/** @deprecated Written `client.offline`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
686
|
+
offline?: ClientConfig['offline']
|
|
687
|
+
/** @deprecated Written `client.search`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
688
|
+
search?: ClientConfig['search']
|
|
689
|
+
/** @deprecated Written `client.links`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
690
|
+
links?: ClientConfig['links']
|
|
691
|
+
/** @deprecated Written `assets.images`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
692
|
+
images?: ImagesInput | undefined
|
|
693
|
+
/** @deprecated Written `assets.fonts`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
694
|
+
fonts?: AssetsConfig['fonts']
|
|
695
|
+
/** @deprecated Written `assets.favicon`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
696
|
+
favicon?: AssetsConfig['favicon']
|
|
697
|
+
/** @deprecated Written `assets.manifest`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
698
|
+
manifest?: AssetsConfig['manifest']
|
|
699
|
+
/** @deprecated Written `assets.publicCache`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
700
|
+
publicCache?: AssetsConfig['publicCache']
|
|
701
|
+
/** @deprecated Written `ops.observe`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
702
|
+
observe?: ObserveInput | undefined
|
|
703
|
+
/** @deprecated Written `ops.health`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
704
|
+
health?: OpsInput['health']
|
|
705
|
+
/** @deprecated Written `ops.metrics`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
706
|
+
metrics?: OpsInput['metrics']
|
|
707
|
+
/** @deprecated Written `ops.jobs`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
708
|
+
jobs?: OpsInput['jobs']
|
|
709
|
+
assets?: Over<AssetsConfig, { images?: ImagesInput | undefined }> | undefined
|
|
710
|
+
ops?: OpsInput | undefined
|
|
711
|
+
serve?: (ServeConfig & DeprecatedServe) | undefined
|
|
712
|
+
openapi?: boolean | (OpenApiConfig & DeprecatedOpenApi) | undefined
|
|
713
|
+
cors?: ConfigCors | undefined
|
|
714
|
+
security?: boolean | Over<SecurityConfig, { hosts?: Loadable<string[]> | boolean | undefined }> | undefined
|
|
715
|
+
proxy?: boolean | number | Over<ProxyConfig, { trusted?: Loadable<string[]> | undefined, key?: ProxyKey | string | undefined }> | undefined
|
|
716
|
+
mcp?: boolean | (McpConfig & DeprecatedMcp) | undefined
|
|
717
|
+
robots?: boolean | Over<RobotsConfig, { disallow?: Loadable<string[]> | undefined, allow?: Loadable<string[]> | undefined }> | undefined
|
|
718
|
+
redirects?: Loadable<Redirects> | undefined
|
|
719
|
+
i18n?: I18nInput | undefined
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
// `serve` as an app written it before 1.105 may still: `apiPrefix` is `endpoints.api`, which works until 1.108.
|
|
723
|
+
export interface DeprecatedServe {
|
|
724
|
+
/** @deprecated Written `endpoints.api`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
725
|
+
apiPrefix?: string | undefined
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// `openapi` as an app written it before 1.105 may still: `path` is `endpoints.openapi` and `referencePath` is `reference: { path }`, which work until 1.108.
|
|
729
|
+
export interface DeprecatedOpenApi {
|
|
730
|
+
/** @deprecated Written `endpoints.openapi`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
731
|
+
path?: string | undefined
|
|
732
|
+
/** @deprecated Written `reference: { path }`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
733
|
+
referencePath?: string | undefined
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// The `path` the bags of `ops` and `mcp` had before 1.105, which is a key of `endpoints` since and works until 1.108.
|
|
737
|
+
export interface DeprecatedPath {
|
|
738
|
+
/** @deprecated Written `endpoints` and the feature's name; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
739
|
+
path?: string | undefined
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export type OpsInput = Over<OpsConfig, { observe?: ObserveInput | undefined, health?: boolean | (HealthConfig & DeprecatedPath) | undefined, metrics?: boolean | (MetricsConfig & DeprecatedPath) | undefined, jobs?: (JobsConfig & DeprecatedPath) | undefined }>
|
|
743
|
+
|
|
744
|
+
// `mcp` as an app written it before 1.105 may still: `key` is `token`, which works until 1.108.
|
|
745
|
+
export interface DeprecatedMcp {
|
|
746
|
+
/** @deprecated Written `endpoints.mcp`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
747
|
+
path?: string | undefined
|
|
748
|
+
/** @deprecated Written `token`; `deprecated-secret-keys` rewrites it. Removed in 1.108. */
|
|
749
|
+
key?: boolean | string | { file: string } | undefined
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// `i18n` as an app written it before 1.105 may still: `defaultLocale`, `prefixDefault` and `domains`, each of which works until 1.108.
|
|
753
|
+
export interface DeprecatedI18n {
|
|
754
|
+
/** @deprecated Written `default`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
755
|
+
defaultLocale?: string | undefined
|
|
756
|
+
/** @deprecated Written `mode: 'always'`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
757
|
+
prefixDefault?: boolean | undefined
|
|
758
|
+
/** @deprecated Written `mode: { domains }`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
759
|
+
domains?: Record<string, string> | undefined
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
export type I18nInput = Over<I18nConfig, { default?: string | undefined, paths?: Loadable<Record<string, Record<string, string>>> | undefined }> & DeprecatedI18n
|
|
763
|
+
|
|
764
|
+
// `observe` as an app written it before 1.105 may still: `onError` here, `log` as `'json'` or a function.
|
|
765
|
+
export type ObserveInput = Omit<ObserveConfig, 'log'> & {
|
|
766
|
+
// `'json'` and a function still work until 1.108, written `{ format: 'json' }` and `{ sink }` since 1.105; `deprecated-app-hooks` rewrites them.
|
|
767
|
+
log?: ObserveConfig['log'] | 'json' | ((entry: LogEntry) => void) | undefined
|
|
768
|
+
/** @deprecated Written `onError` beside `observe`; `deprecated-app-hooks` rewrites it. Removed in 1.108. */
|
|
769
|
+
onError?: AppHooks['onError']
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
export type ImagesInput = Over<ImagesConfig, { remote?: Loadable<string[]> | Over<RemoteImages, { hosts?: Loadable<string[]> | undefined }> | undefined }> & DeprecatedImages
|
|
773
|
+
|
|
589
774
|
export const CONFIG_FILE = 'kay.config.ts'
|
|
590
775
|
// The app's own request values for templates, listed as an extension's `context` while the file exists.
|
|
591
776
|
export const APP_CONTEXT = 'src/context.ts'
|
|
592
777
|
|
|
593
|
-
// The nested bags whose own keys are checked as the config's are, by the key holding them and the shape they take.
|
|
594
|
-
interface NestedBags {
|
|
595
|
-
dirs: DirsConfig
|
|
596
|
-
limits: LimitsConfig
|
|
597
|
-
serve: ServeConfig
|
|
598
|
-
observe: ObserveConfig
|
|
599
|
-
client: ClientConfig
|
|
600
|
-
security: SecurityConfig
|
|
601
|
-
i18n: I18nConfig
|
|
602
|
-
seo: SeoConfig
|
|
603
|
-
offline: OfflineConfig
|
|
604
|
-
health: HealthConfig
|
|
605
|
-
proxy: ProxyConfig
|
|
606
|
-
}
|
|
607
|
-
|
|
608
778
|
// The known key a mistyped one differs from by its case alone, which a type can tell; `kay check` names the nearest by distance.
|
|
609
779
|
type CaseVariant<Key, Known> = { [Name in keyof Known & string]: Lowercase<Name> extends Lowercase<Key & string> ? Name : never }[keyof Known & string]
|
|
610
780
|
|
|
611
781
|
// What an unknown key's value must be: a string naming the problem, which nothing a config gives matches, so the error lands on the key.
|
|
612
782
|
type Misspelled<Key, Known> = [CaseVariant<Key, Known>] extends [never] ? 'unknown option' : `unknown option, did you mean \`${CaseVariant<Key, Known> & string}\`?`
|
|
613
783
|
|
|
614
|
-
|
|
784
|
+
// A symbol key is no option a config names, and an object a library returns may carry one, as `pgData()`'s `Symbol.asyncDispose` does.
|
|
785
|
+
type UnknownKeys<Given, Known> = Given extends object ? { [Key in Exclude<keyof Given, keyof Known | symbol>]: Misspelled<Key, Known> } : unknown
|
|
786
|
+
|
|
787
|
+
type Method = (...args: never[]) => unknown
|
|
788
|
+
|
|
789
|
+
// The keys of a type that are required methods, which an object an app hands over (a `Tracer`) has and an option bag has not.
|
|
790
|
+
type RequiredMethods<Value> = keyof { [Key in keyof Value as Record<never, never> extends Pick<Value, Key> ? never : Value[Key] extends Method ? Key : never]: unknown }
|
|
791
|
+
|
|
792
|
+
// The types that take any name for a key, which no typo can be told from: the level of each lint.
|
|
793
|
+
type FreeKeys = LintLevels
|
|
794
|
+
|
|
795
|
+
// The option bag a key's type holds, if any: an object type that is no list, no function, no record of free keys and has no required method, so a `Tracer`, a list of entries or a function is never checked as one.
|
|
796
|
+
type BagOf<Value> = Value extends readonly unknown[] | Method | FreeKeys ? never : Value extends object ? (string extends keyof Value ? never : [RequiredMethods<Value>] extends [never] ? Value : never) : never
|
|
797
|
+
|
|
798
|
+
// How deep the option bags nest at most, which no config comes near.
|
|
799
|
+
type Deepest = [unknown, unknown, unknown, unknown]
|
|
615
800
|
|
|
616
|
-
// The config with every key `KayConfig` and
|
|
617
|
-
type Checked<
|
|
801
|
+
// The config with every key `KayConfig` and the option bags it holds, however deep, lack typed so that setting it is an error: an inferred type parameter gets no excess property check of its own. A bag added to `KayConfig` is covered with nothing to list. The bags are walked by the known type rather than by the given config's keys, as a mapped type over those loses the contextual type of a callback elsewhere in the config.
|
|
802
|
+
type Checked<Given, Known, Depth extends unknown[] = []> = UnknownKeys<Given, Known> & (Depth['length'] extends Deepest['length'] ? unknown : { [Key in keyof Known]?: [BagOf<NonNullable<Known[Key]>>] extends [never] ? unknown : Checked<Key extends keyof Given ? Given[Key] : unknown, BagOf<NonNullable<Known[Key]>>, [...Depth, unknown]> })
|
|
618
803
|
|
|
619
804
|
// Gives the config back as written, so `kay check` reads the types of what it declares off it.
|
|
620
|
-
export function defineConfig<Config extends
|
|
805
|
+
export function defineConfig<Config extends ConfigInput>(config: Config & Checked<Config, ConfigInput>): Config {
|
|
621
806
|
return config
|
|
622
807
|
}
|
|
623
808
|
|