@kayjs/kay 1.104.2 → 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/README.md +2 -7
- package/dist/eslint.js +5483 -2607
- 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 +11 -9
- package/llms/checks.md +1 -1
- package/llms/code-lints.md +7 -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 +15 -15
- 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 +7 -7
- package/llms/project.md +18 -42
- 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 +9 -9
- package/llms/templates-elements-slots-snippets.md +5 -9
- package/llms/templates.md +4 -4
- package/llms/testing-browser.md +2 -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 -127
- package/llms/whats-new-archive.md +68 -50
- package/llms/whats-new.md +32 -51
- package/llms/workers.md +2 -2
- package/llms.txt +18 -13
- package/package.json +11 -9
- package/src/add.ts +3 -1
- package/src/build/await-alert.ts +34 -0
- package/src/build/class-rules.ts +8 -0
- package/src/build/client.ts +21 -16
- package/src/build/compile.ts +9 -6
- package/src/build/pipeline.ts +19 -16
- package/src/build/recipe-classes.ts +11 -1
- package/src/build/recipe-utilities.ts +183 -0
- package/src/build/server-record.ts +2 -1
- package/src/build/signals.ts +113 -14
- package/src/build/sourcemap.ts +1 -1
- package/src/build/static.ts +10 -8
- package/src/build/style-uses.ts +7 -6
- package/src/build/styles.ts +7 -1
- package/src/build/supports.ts +4 -4
- 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/removed-ui-tokens.ts +2 -2
- 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 +112 -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/text-size-colour.ts +57 -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/new.ts +17 -7
- package/src/commands/routes.ts +23 -17
- package/src/commands/upgrade-majors.ts +26 -0
- package/src/commands/upgrade-manifest.ts +23 -0
- package/src/commands/upgrade-messages.ts +16 -0
- package/src/commands/upgrade-peers.ts +89 -0
- package/src/commands/upgrade.ts +68 -36
- 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 +52 -138
- 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 +40 -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 +63 -24
- package/src/compiler/island-arguments.ts +38 -10
- package/src/compiler/island-cause.ts +9 -6
- 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 +112 -9
- 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 +30 -1
- package/src/compiler/rewrite-types.ts +2 -0
- package/src/compiler/rewrite.ts +35 -33
- package/src/compiler/route-lints.ts +12 -2
- package/src/compiler/script-props.ts +52 -6
- package/src/compiler/script-server.ts +26 -3
- package/src/compiler/script-shared.ts +9 -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/eslint/index.ts +19 -2
- package/src/features.ts +2 -2
- 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/semantic-tokens.ts +2 -2
- 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 +3 -3
- package/src/new.ts +6 -4
- 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/dom.ts +11 -12
- 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 +11 -4
- package/src/template-docker.ts +2 -2
- package/src/template-shared.ts +4 -1
- package/src/template-starter.ts +26 -5
- package/src/template-styles.ts +55 -43
- package/src/template-ws.ts +1 -1
- package/src/templates.ts +2 -4
- package/src/test/a11y.ts +55 -0
- package/src/test/browser.ts +7 -53
- 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/src/test/text-match.ts +44 -0
- package/types/add.d.ts.map +1 -1
- package/types/build/await-alert.d.ts +4 -0
- package/types/build/await-alert.d.ts.map +1 -0
- package/types/build/class-rules.d.ts +1 -0
- package/types/build/class-rules.d.ts.map +1 -1
- 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/recipe-classes.d.ts +2 -0
- package/types/build/recipe-classes.d.ts.map +1 -1
- package/types/build/recipe-utilities.d.ts +4 -0
- package/types/build/recipe-utilities.d.ts.map +1 -0
- package/types/build/server-record.d.ts.map +1 -1
- package/types/build/signals.d.ts.map +1 -1
- package/types/build/static.d.ts.map +1 -1
- package/types/build/style-uses.d.ts +1 -0
- package/types/build/style-uses.d.ts.map +1 -1
- package/types/build/styles.d.ts.map +1 -1
- package/types/build/supports.d.ts +1 -1
- package/types/build/supports.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/removed-ui-tokens.d.ts +2 -0
- package/types/check/removed-ui-tokens.d.ts.map +1 -1
- 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/text-size-colour.d.ts +3 -0
- package/types/check/text-size-colour.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/new.d.ts.map +1 -1
- package/types/commands/routes.d.ts.map +1 -1
- package/types/commands/upgrade-majors.d.ts +7 -0
- package/types/commands/upgrade-majors.d.ts.map +1 -0
- package/types/commands/upgrade-manifest.d.ts +6 -0
- package/types/commands/upgrade-manifest.d.ts.map +1 -0
- package/types/commands/upgrade-messages.d.ts +4 -0
- package/types/commands/upgrade-messages.d.ts.map +1 -0
- package/types/commands/upgrade-peers.d.ts +23 -0
- package/types/commands/upgrade-peers.d.ts.map +1 -0
- package/types/commands/upgrade.d.ts +7 -0
- package/types/commands/upgrade.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 +5 -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 +2 -2
- 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 +570 -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 +14 -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 +21 -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 +9 -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/new.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/dom.d.ts +1 -0
- package/types/runtime/dom.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/template-config.d.ts.map +1 -1
- package/types/template-shared.d.ts +1 -1
- package/types/template-shared.d.ts.map +1 -1
- package/types/template-starter.d.ts.map +1 -1
- package/types/template-styles.d.ts.map +1 -1
- package/types/templates.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/types/test/text-match.d.ts +13 -0
- package/types/test/text-match.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
|
@@ -1,12 +1,48 @@
|
|
|
1
1
|
export declare const DEPRECATED_LINTS: {
|
|
2
|
-
readonly 'deprecated-
|
|
2
|
+
readonly 'deprecated-auth-methods': {
|
|
3
3
|
readonly level: 'warn';
|
|
4
4
|
readonly group: 'deprecated';
|
|
5
|
-
readonly since: '1.
|
|
5
|
+
readonly since: '1.105';
|
|
6
6
|
readonly site: true;
|
|
7
|
-
readonly summary: '
|
|
8
|
-
readonly wrong: '
|
|
9
|
-
readonly right: '
|
|
7
|
+
readonly summary: 'kayjs-auth\'s methods under the names they had before 1.105, when the verbs of a group differed and some methods sat on `auth` itself: every group lists with `list`, reads with `get`, writes with `create` and `update`, removes with `delete` and takes back with `revoke`. `organizations.members`, `invitations`, `myInvitations` and `invitation` are `listMembers`, `listInvitations`, `listMyInvitations` and `getInvitation`, `setMemberRoles` and `removeMember` are `updateMemberRoles` and `deleteMember`; `admin.roles` and `admin.auditLog` are `listRoles` and `listAuditLog`; `oauthServer.clients` is `listClients`; `passkeys.rename` is `passkeys.update`; `account.changeUsername`, `profile` and `saveProfile` are `updateUsername`, `getProfile` and `updateProfile`; `oauth.identities` and `providerToken` are `listIdentities` and `getProviderToken`; `magicLink.signInWithCode` is `email.signInWithCode`, the code being the email\'s. The methods on `auth` went into the group they belong to: `requireAdmin()` is `admin.require()`, `captchaRequired()` and `captchaChallenge()` are `captcha.required()` and `captcha.challenge()`, `provedLately()` and `reprove()` are `proof.recent()` and `proof.renew()`, `scopes()` and `hasScope()` are `tokens.scopes()` and `tokens.hasScope()`, and `oauthResource()`, `oauthOrigin()` and `oauthFixed()` are `oauthServer.resource()`, `origin()` and `fixed()`. The old names work until 1.108. Found on a call whose receiver is named `auth` (`ctx.locals.auth`, `locals.auth`), in the TypeScript files and `.kay` files of the project, a template expression excluded; the fix writes the new name.';
|
|
8
|
+
readonly wrong: '// src/admin.ts\nexport async function members(auth: Auth, org: string) {\n await auth.requireAdmin()\n\n return auth.organizations.members(org)\n}';
|
|
9
|
+
readonly right: '// src/admin.ts\nexport async function members(auth: Auth, org: string) {\n await auth.admin.require()\n\n return auth.organizations.listMembers(org)\n}';
|
|
10
|
+
};
|
|
11
|
+
readonly 'deprecated-source-readers': {
|
|
12
|
+
readonly level: 'warn';
|
|
13
|
+
readonly group: 'deprecated';
|
|
14
|
+
readonly since: '1.105';
|
|
15
|
+
readonly site: true;
|
|
16
|
+
readonly summary: 'The readers and hooks of an island\'s sources before 1.105, which every source reads alike since: `data()` in place of `value()` (a `resource`), `last()` (a `stream` or `socket`) and `rows()` (a `local` collection), `onData` in place of `onSuccess` (a `track()` handle) and `onSync` (a collection), whose event hands `value` where they handed `data` and `rows`, an action\'s `data()` and `status()` in place of `succeeded()`, and a collection\'s `sync.queued()` and `sync.status()` in place of `unsynced()` and `syncStatus()`. The old names work until 1.108. Found in the TypeScript files and `.kay` files of the project, templates included, on a name bound once to a call of `resource`, `stream`, `socket` or `local` from `kay` or to a `.track()` call, as `kay check` reads no types: a source reached through a property, a prop or another file is not found; `succeeded()` is found on any receiver. The fix renames the member, and the `data` or `rows` of a hook\'s inline handler to `value`; `succeeded()?.data` becomes `data()` and `succeeded() !== undefined` becomes `status() === \'ready\'`. A `succeeded()` read in any other way, a handler that is no inline function and a shorthand hook are reported with no fix.';
|
|
17
|
+
readonly wrong: '---\nimport { local, resource } from \'kay\'\nimport notesApi from \'../api/notes\'\nimport { save } from \'./notes\'\n\nconst list = resource(notesApi, \'/\')\nconst notes = local({ key: \'id\', read: () => [], put: save })\n---\np {list.value()?.length} on the server, {notes.rows().length} here, {notes.unsynced()} waiting';
|
|
18
|
+
readonly right: '---\nimport { local, resource } from \'kay\'\nimport notesApi from \'../api/notes\'\nimport { save } from \'./notes\'\n\nconst list = resource(notesApi, \'/\')\nconst notes = local({ key: \'id\', read: () => [], put: save })\n---\np {list.data()?.length} on the server, {notes.data().length} here, {notes.sync.queued()} waiting';
|
|
19
|
+
};
|
|
20
|
+
readonly 'deprecated-live-api': {
|
|
21
|
+
readonly level: 'warn';
|
|
22
|
+
readonly group: 'deprecated';
|
|
23
|
+
readonly since: '1.105';
|
|
24
|
+
readonly site: true;
|
|
25
|
+
readonly summary: 'The forms of `set` and `presence` before 1.105, which write every live value and every room alike since: `set(next, { key })` of a value per key and `set(next, { user })` of a value per user in place of `set(key, next)` and `set(user, next)`, and `presence({ room, member })` in place of `presence(room, member)`. The old forms work until 1.108. Found in the TypeScript files and `.kay` files of the project, on a name bound once to a `live()` call from `kay`, or imported under the name of a declaration every file of the project agrees on (a value per key is one declared with a function of the key or `key: true`, per user with `user: true`), as `kay check` reads no types: a value reached through a namespace import or a property is not found. `presence` is the one imported from `kay`. The fix reorders the arguments of `set`, and writes the arguments of `presence` as one object, its options object spread into it; a `presence` given options that are no object written there is reported with no fix.';
|
|
26
|
+
readonly wrong: '// src/live.ts\nimport { live } from \'kay\'\n\nexport const room = live((id: string) => ({ id, users: 0 }))\n\nroom.set(\'lobby\', { id: \'lobby\', users: 3 })';
|
|
27
|
+
readonly right: '// src/live.ts\nimport { live } from \'kay\'\n\nexport const room = live((id: string) => ({ id, users: 0 }))\n\nroom.set({ id: \'lobby\', users: 3 }, { key: \'lobby\' })';
|
|
28
|
+
};
|
|
29
|
+
readonly 'deprecated-action-type': {
|
|
30
|
+
readonly level: 'warn';
|
|
31
|
+
readonly group: 'deprecated';
|
|
32
|
+
readonly since: '1.105';
|
|
33
|
+
readonly site: true;
|
|
34
|
+
readonly summary: '`Action<never, unknown>` before 1.105, the type a prop takes to accept any action: `Action` since, whose two parameters default to it. `Action<{ name: string }, string>` keeps its input and output types, and a `.with()` action crosses into an island as any other does. The old form works until 1.108. Found on the `Action` a file imports from `kay`, under any local name, in the TypeScript files and the fences of `.kay` files. The fix drops the type arguments.';
|
|
35
|
+
readonly wrong: '---\nimport type { Action } from \'kay\'\n\nconst { run } = props<{ run: Action<never, unknown> }>()\n---\nform(action={run})\n button Go';
|
|
36
|
+
readonly right: '---\nimport type { Action } from \'kay\'\n\nconst { run } = props<{ run: Action }>()\n---\nform(action={run})\n button Go';
|
|
37
|
+
};
|
|
38
|
+
readonly 'deprecated-action-readers': {
|
|
39
|
+
readonly level: 'warn';
|
|
40
|
+
readonly group: 'deprecated';
|
|
41
|
+
readonly since: '1.105';
|
|
42
|
+
readonly site: true;
|
|
43
|
+
readonly summary: 'An action\'s `failed()`, `error(field)` and `validate(form, field)` before 1.105, which a form shows and now reads from `form`: `form.failed()`, `form.error(field)` and `form.validate(form, field)`, the call state (`pending()`, `status()`, `data()`) staying on the action. The old names work until 1.108. Found in the TypeScript files and `.kay` files of the project, templates included, on a name bound once to a call of `action` from `kay`, to the `.with()` of one, or imported in lowercase from a `.kay` file, as `kay check` reads no types: an action reached through a property or a prop is not found. The fix writes `form.` before the name.';
|
|
44
|
+
readonly wrong: '---\nimport { add } from \'./notes.kay\'\n---\nform(action={add})\n input(name="title" aria-invalid={add.error(\'title\') ? \'true\' : undefined})\n if add.failed()\n p Not saved';
|
|
45
|
+
readonly right: '---\nimport { add } from \'./notes.kay\'\n---\nform(action={add})\n input(name="title" aria-invalid={add.form.error(\'title\') ? \'true\' : undefined})\n if add.form.failed()\n p Not saved';
|
|
10
46
|
};
|
|
11
47
|
readonly 'deprecated-ui-props': {
|
|
12
48
|
readonly level: 'warn';
|
|
@@ -16,14 +52,21 @@ export declare const DEPRECATED_LINTS: {
|
|
|
16
52
|
readonly wrong: '---\nimport Stat from \'@kayjs/ui/stat.kay\'\n---\nStat(value={12} label="moons" variant="tile")';
|
|
17
53
|
readonly right: '---\nimport Stat from \'@kayjs/ui/stat.kay\'\n---\nStat(value={12} label="moons" layout="tile")';
|
|
18
54
|
};
|
|
19
|
-
readonly 'deprecated-
|
|
55
|
+
readonly 'deprecated-uncaught-await': {
|
|
20
56
|
readonly level: 'warn';
|
|
21
57
|
readonly group: 'deprecated';
|
|
22
|
-
readonly since: '1.
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
|
|
58
|
+
readonly since: '1.105';
|
|
59
|
+
readonly summary: 'A `// kay-allow uncaught-await` comment or a `lints: { \'uncaught-await\': ... }` entry of kay.config.ts, since 1.105: the `uncaught-await` lint is gone, as an `await` with no `catch` renders the `catch` of the `try` around it, else an alert (`data-kay-await-failed`, worded by the `kay.await.failed` message) in its place, the rejection reported either way. The fix removes the comment, or the name from a list of lints, or the config entry.';
|
|
60
|
+
readonly wrong: '// kay-allow uncaught-await\nawait comments then list\n p {list.length} comments';
|
|
61
|
+
readonly right: 'await comments then list\n p {list.length} comments';
|
|
62
|
+
};
|
|
63
|
+
readonly 'deprecated-parts-class': {
|
|
64
|
+
readonly level: 'warn';
|
|
65
|
+
readonly group: 'deprecated';
|
|
66
|
+
readonly since: '1.105';
|
|
67
|
+
readonly summary: 'The parts of a component given as its `class`, `parts` since 1.105: `Card(class={{ head: \'p-6\' }})` is `Card(parts={{ head: \'p-6\' }})`, so `class` keeps strings, arrays and objects of conditions and no longer has two meanings, and a shorthand or a spread can sit beside the parts. The old form works until 1.108, the compiler handing a literal of it on as `parts`. Found on a component call whose `class` is an object literal of string classes by name, or of a nested object for a part that is a component, as `kay check` reads no types: a parts object held in a variable, or with an expression for a value, is conditions now and not found. The fix writes `parts` for `class`; it offers none where `parts` is already written.';
|
|
68
|
+
readonly wrong: '---\nimport Card from \'./card.kay\'\n---\nCard(class={{ head: \'p-6\' }})';
|
|
69
|
+
readonly right: '---\nimport Card from \'./card.kay\'\n---\nCard(parts={{ head: \'p-6\' }})';
|
|
27
70
|
};
|
|
28
71
|
readonly 'deprecated-script-fence': {
|
|
29
72
|
readonly level: 'warn';
|
|
@@ -33,14 +76,6 @@ export declare const DEPRECATED_LINTS: {
|
|
|
33
76
|
readonly wrong: '--- script\nconst { title } = props<{ title: string }>()\n---\nh1 {title}';
|
|
34
77
|
readonly right: '---\nconst { title } = props<{ title: string }>()\n---\nh1 {title}';
|
|
35
78
|
};
|
|
36
|
-
readonly 'deprecated-if-alias': {
|
|
37
|
-
readonly level: 'warn';
|
|
38
|
-
readonly group: 'deprecated';
|
|
39
|
-
readonly since: '1.102';
|
|
40
|
-
readonly summary: '`if cond as name` and `else if cond as name`, `if cond then name` since 1.102: the alias takes the word `await x then name` uses, so `as` is only ever a TypeScript cast and no longer an alias or a cast by the casing of what follows (`as u` aliased, `as Row` cast, and a lowercase type alias such as `as thing` was read as an alias). The old spelling still aliases until 1.105. The fix writes `then` for the `as`.';
|
|
41
|
-
readonly wrong: '---\nconst user = { name: \'Ada\' } as { name: string } | null\n---\nif user as u\n p {u.name}';
|
|
42
|
-
readonly right: '---\nconst user = { name: \'Ada\' } as { name: string } | null\n---\nif user then u\n p {u.name}';
|
|
43
|
-
};
|
|
44
79
|
readonly 'deprecated-schema-type': {
|
|
45
80
|
readonly level: 'warn';
|
|
46
81
|
readonly group: 'deprecated';
|
|
@@ -55,10 +90,482 @@ export declare const DEPRECATED_LINTS: {
|
|
|
55
90
|
readonly group: 'deprecated';
|
|
56
91
|
readonly since: '1.104';
|
|
57
92
|
readonly site: true;
|
|
58
|
-
readonly summary: 'A package of kay under the `@kaynooo` scope, `@kayjs` since 1.104: `@kaynooo/kayjs` is `@kayjs/kay`, and `@kaynooo/kayjs-ui`, `-auth`, `-mail`, `-cms` and `-ai` are `@kayjs/ui`, `@kayjs/auth`, `@kayjs/mail`, `@kayjs/cms` and `@kayjs/ai`. The old names stop at 1.103, which stays installable, so an app on them installs and checks as before until it moves; this lint goes in 1.107. Found in the imports, config keys and stylesheet imports of the project\'s TypeScript, `.kay` and CSS files, and in its package.json and tsconfig files. The fix writes the new name; a package.json that lists the new name already is reported with a fix that is not safe, and `kay upgrade` does the whole move, package.json and install included.';
|
|
93
|
+
readonly summary: 'A package of kay under the `@kaynooo` scope, `@kayjs` since 1.104: `@kaynooo/kayjs` is `@kayjs/kay`, and `@kaynooo/kayjs-ui`, `-auth`, `-mail`, `-cms` and `-ai` are `@kayjs/ui`, `@kayjs/auth`, `@kayjs/mail`, `@kayjs/cms` and `@kayjs/ai`. The old names stop at 1.103, which stays installable, so an app on them installs and checks as before until it moves; this lint goes in 1.107. Found in the imports, config keys and stylesheet imports of the project\'s TypeScript, `.kay` and CSS files, and in its package.json and tsconfig files, never in a comment or a sentence of a string that names a package. The fix writes the new name; a package.json that lists the new name already is reported with a fix that is not safe, and `kay upgrade` does the whole move, package.json and install included.';
|
|
59
94
|
readonly wrong: '---\nimport Button from \'@kaynooo/kayjs-ui/button.kay\'\n---\nButton Save';
|
|
60
95
|
readonly right: '---\nimport Button from \'@kayjs/ui/button.kay\'\n---\nButton Save';
|
|
61
96
|
};
|
|
97
|
+
readonly 'deprecated-test-helpers': {
|
|
98
|
+
readonly level: 'warn';
|
|
99
|
+
readonly group: 'deprecated';
|
|
100
|
+
readonly since: '1.105';
|
|
101
|
+
readonly site: true;
|
|
102
|
+
readonly summary: 'The test helpers of the libraries and of a test site under their names before 1.105. `aiTest`, `mailTest`, `cmsTest` and `authTest` of `@kayjs/ai/test`, `@kayjs/mail/test`, `@kayjs/cms/test` and `@kayjs/auth/test` are `test(site)` in each, with a `reset()`, and a site\'s `signInAs` signs in for every library that joined it; `site.refusal(action, ...)` is `site.expectRefused(action, ...)` and `site.socketRefusal(...)` is `site.socket.refused(...)`. The old names work until 1.108. Found in the TypeScript files and `.kay` files of the project: an import from a library\'s test entry, and a use of the two methods on a name bound once to `testSite()` of `kay/test` (or to an `.as()` of one), as `kay check` reads no types. The fix renames the import and keeps the local name (`test as mailTest`), and renames the method.';
|
|
103
|
+
readonly wrong: 'import { testSite } from \'kay/test\'\nimport { mailTest } from \'@kayjs/mail/test\'\n\nconst site = await testSite()\nconst mail = mailTest(site)\n\nawait site.refusal(subscribe, { email: \'\' })';
|
|
104
|
+
readonly right: 'import { testSite } from \'kay/test\'\nimport { test as mailTest } from \'@kayjs/mail/test\'\n\nconst site = await testSite()\nconst mail = mailTest(site)\n\nawait site.expectRefused(subscribe, { email: \'\' })';
|
|
105
|
+
};
|
|
106
|
+
readonly 'deprecated-page-island': {
|
|
107
|
+
readonly level: 'warn';
|
|
108
|
+
readonly group: 'deprecated';
|
|
109
|
+
readonly since: '1.105';
|
|
110
|
+
readonly summary: 'A page without a `--- server` fence that is an island, since 1.105: an `on*`, `bind:` or `ref` in it, a browser value of `kay` such as `signal`, or a live or persisted import. A page renders once on the server and is never an island, so what needs the browser belongs in a component the page renders. It still works as an island until 1.108, which refuses it. Found in the pages of the project, at the thing that makes the page an island; a layout or a page with a `--- server` fence is not reported. It has no fix: moving the code into a component is not an edit that is safe to apply.';
|
|
111
|
+
readonly wrong: '---\nimport { signal } from \'kay\'\n\nconst count = signal(0)\n---\nbutton(onClick={() => count.set(count() + 1)}) {count()}';
|
|
112
|
+
readonly right: '---\nimport Counter from \'../components/counter.kay\'\n---\nCounter';
|
|
113
|
+
};
|
|
114
|
+
readonly 'deprecated-island-fence': {
|
|
115
|
+
readonly level: 'warn';
|
|
116
|
+
readonly group: 'deprecated';
|
|
117
|
+
readonly since: '1.105';
|
|
118
|
+
readonly summary: 'The `--- island`, `--- static` and `--- client` fence lines, and `export const island = { ... }` in a `--- module` fence, since 1.105: a component declares what it says of its role with `island({ render, hydrate, persist, interactive })` first in its script, as it declares its props with `props<T>()`. `render` is `\'island\'` (the default), `\'client\'` (`--- client`) or `\'static\'` (`--- static`). The old forms work until 1.108. The fix writes `---` for the fence line and the call at the top of the script, with the properties of the exported `island` in it and the `--- module` fence dropped when nothing else is in it, its comments going above the call; a component with no script fence line is reported with no fix.';
|
|
119
|
+
readonly wrong: '--- island\nconst { label } = props<{ label: string }>()\n---\nbutton {label}';
|
|
120
|
+
readonly right: '---\nisland()\nconst { label } = props<{ label: string }>()\n---\nbutton {label}';
|
|
121
|
+
};
|
|
122
|
+
readonly 'deprecated-island-attributes': {
|
|
123
|
+
readonly level: 'warn';
|
|
124
|
+
readonly group: 'deprecated';
|
|
125
|
+
readonly since: '1.105';
|
|
126
|
+
readonly summary: '`hydrate="client"` and `server="defer"` on a component call, `render="client"` and `server defer` since 1.105: `hydrate` says only when an island hydrates (`load`, `idle`, `visible`, `interaction`, `media(...)`), `render="client"` that a use renders in the browser only, and a deferred server island is the bare `defer` beside `server`. The old spellings work until 1.108. The fix writes the new one.';
|
|
127
|
+
readonly wrong: '---\nimport Chart from \'./chart.kay\'\nimport Card from \'./card.kay\'\n---\nChart(hydrate="client")\nCard(server="defer")';
|
|
128
|
+
readonly right: '---\nimport Chart from \'./chart.kay\'\nimport Card from \'./card.kay\'\n---\nChart(render="client")\nCard(server defer)';
|
|
129
|
+
};
|
|
130
|
+
readonly 'deprecated-link-flags': {
|
|
131
|
+
readonly level: 'warn';
|
|
132
|
+
readonly group: 'deprecated';
|
|
133
|
+
readonly since: '1.105';
|
|
134
|
+
readonly summary: '`data-keep-scroll`, `data-no-transition` and `data-no-prefetch`, named as the options of `navigate()` since 1.105: `data-scroll="keep"` (`"top"` for a plain scroll), `data-transition="false"` and `data-prefetch="false"`, typed on every element. The old names work until 1.108. Found on any element and on a component call that forwards them to its link. The fix writes the new attribute, a static `data-keep-scroll="false"` becoming `data-scroll="top"` and a dynamic `data-keep-scroll` being renamed with its value; a dynamic `data-no-transition` or `data-no-prefetch` is reported with no fix, as the old name was set by being present.';
|
|
135
|
+
readonly wrong: 'nav(data-keep-scroll)\n a(href="/tabs/a" data-no-prefetch) A';
|
|
136
|
+
readonly right: 'nav(data-scroll="keep")\n a(href="/tabs/a" data-prefetch="false") A';
|
|
137
|
+
};
|
|
138
|
+
readonly 'deprecated-children-prop': {
|
|
139
|
+
readonly level: 'warn';
|
|
140
|
+
readonly group: 'deprecated';
|
|
141
|
+
readonly since: '1.105';
|
|
142
|
+
readonly summary: '`children?: Snippet` in a component\'s props type beside a bare `slot`, since 1.105: a `slot` takes the children of a call with no declaration, typed from the template. `children: Snippet` still says the children are required. The old declaration works until 1.108. Found in a props type written inline when the script reads no `children` prop. The fix removes the member.';
|
|
143
|
+
readonly wrong: '---\nimport type { Snippet } from \'kay\'\n\nconst { title } = props<{ title: string, children?: Snippet }>()\n---\nsection\n h2 {title}\n slot';
|
|
144
|
+
readonly right: '---\nconst { title } = props<{ title: string }>()\n---\nsection\n h2 {title}\n slot';
|
|
145
|
+
};
|
|
146
|
+
readonly 'deprecated-mail-form': {
|
|
147
|
+
readonly level: 'warn';
|
|
148
|
+
readonly group: 'deprecated';
|
|
149
|
+
readonly since: '1.105';
|
|
150
|
+
readonly site: true;
|
|
151
|
+
readonly summary: 'kayjs-mail\'s own `SubscribeForm`, kayjs-ui\'s since 1.105: mail ships the actions (`mail.list().form()`, `contactForm()`) and kayjs-ui the forms, so the unstyled `@kayjs/mail/subscribe-form.kay` is gone and `@kayjs/ui/subscribe-form.kay` takes its props (`label`, `submitLabel`, `sentLabel`, `noticeText`, `privacy`, `privacyLabel`, `wordingId`) and reads the list\'s `privacy` from its action. The old file is gone from 1.105, so the lint is a migration aid until 1.108 and its import fails to build before the fix runs. Found on an import of it in the TypeScript files and `.kay` files of the project. The fix writes the new path, safe when the project lists `@kayjs/ui` and not otherwise, as its `kmail-subscribe` classes are replaced by the themed form\'s own.';
|
|
152
|
+
readonly wrong: '---\nimport SubscribeForm from \'@kayjs/mail/subscribe-form.kay\'\nimport { subscribe } from \'./actions\'\n---\nSubscribeForm(action={subscribe})';
|
|
153
|
+
readonly right: '---\nimport SubscribeForm from \'@kayjs/ui/subscribe-form.kay\'\nimport { subscribe } from \'./actions\'\n---\nSubscribeForm(action={subscribe})';
|
|
154
|
+
};
|
|
155
|
+
readonly 'deprecated-mail-send': {
|
|
156
|
+
readonly level: 'warn';
|
|
157
|
+
readonly group: 'deprecated';
|
|
158
|
+
readonly since: '1.105';
|
|
159
|
+
readonly site: true;
|
|
160
|
+
readonly summary: '`send`, `enqueue` and `registeredMailer` imported from `@kayjs/mail`, which sent through the mailer of the latest site started in the process, so two sites in one process (test sites, say) mixed their mails. Since 1.105 a mail is sent through the site that answers the request: `ctx.locals.mail.send()` and `.enqueue()` in a page, an action or a guard, and the mailer `src/mail.ts` exports in a job or a script. `send` and `enqueue` work until 1.108, `registeredMailer` is gone. Found on an import from `@kayjs/mail` in the TypeScript files and `.kay` files of the project; no fix, as a call has no request to read the mailer from unless its function is given one.';
|
|
161
|
+
readonly wrong: '--- server\nimport { action } from \'kay\'\nimport { send } from \'@kayjs/mail\'\n\nexport const notify = action(async () => {\n await send({ to: \'ada@example.com\', subject: \'Hi\', text: \'Hello\' })\n})\n---\np x';
|
|
162
|
+
readonly right: '--- server\nimport { action } from \'kay\'\n\nexport const notify = action(async (_input, { locals }) => {\n await locals.mail.send({ to: \'ada@example.com\', subject: \'Hi\', text: \'Hello\' })\n})\n---\np x';
|
|
163
|
+
};
|
|
164
|
+
readonly 'deprecated-ai-labels': {
|
|
165
|
+
readonly level: 'warn';
|
|
166
|
+
readonly group: 'deprecated';
|
|
167
|
+
readonly since: '1.105';
|
|
168
|
+
readonly summary: 'The `<key>Label` props of kayjs-ai\'s `Chat`, `ChatLauncher` and `ChatPanel`, `labels` since 1.105: one object keyed as the messages are (`ai.chat.send` is `labels.send`), in place of up to 45 props that each held one text. `waitingLabel` is `labels.thinking` and `failureLabel` `labels.error`. The old props work until 1.108 and win over `labels`. Found on a component bound to the library\'s file in a template. The fix writes the first prop as `labels={{ ... }}` holding every one; a template that has a `labels` already, or a prop with no value, is reported with no fix.';
|
|
169
|
+
readonly wrong: '---\nimport Chat from \'@kayjs/ai/chat.kay\'\nimport { send } from \'./send\'\n---\nChat(action={send} sendLabel="Go" stopLabel="Halt")';
|
|
170
|
+
readonly right: '---\nimport Chat from \'@kayjs/ai/chat.kay\'\nimport { send } from \'./send\'\n---\nChat(action={send} labels={{ send: "Go", stop: "Halt" }})';
|
|
171
|
+
};
|
|
172
|
+
readonly 'deprecated-ai-links': {
|
|
173
|
+
readonly level: 'warn';
|
|
174
|
+
readonly group: 'deprecated';
|
|
175
|
+
readonly since: '1.105';
|
|
176
|
+
readonly summary: 'Chat\'s `links` and Sources\' `here`, `newTab` since 1.105: which links of a reply and which cited sources open in a new tab, as the links of kayjs-ui take it, `true`, `false` or `\'auto\'`, which opens a link to a page of this site in place. `links="apart"` is `newTab={true}`, and `links="here"` and `here` are `newTab="auto"`. The old props work until 1.108 and `newTab` wins when both are written. Found on a `Chat` or a `Sources` bound to the library\'s file in a template. The fix writes `newTab`, reading `here={value}` as `newTab={value ? \'auto\' : true}`; a template that has a `newTab` already, or a `links` that is not one of the two words, is reported with no fix.';
|
|
177
|
+
readonly wrong: '---\nimport Chat from \'@kayjs/ai/chat.kay\'\nimport { send } from \'./send\'\n---\nChat(action={send} links="here")';
|
|
178
|
+
readonly right: '---\nimport Chat from \'@kayjs/ai/chat.kay\'\nimport { send } from \'./send\'\n---\nChat(action={send} newTab="auto")';
|
|
179
|
+
};
|
|
180
|
+
readonly 'deprecated-auth-signed': {
|
|
181
|
+
readonly level: 'warn';
|
|
182
|
+
readonly group: 'deprecated';
|
|
183
|
+
readonly since: '1.105';
|
|
184
|
+
readonly summary: 'kayjs-auth\'s `SignedIn(role=...)` and `SignedOut`, one check written three ways before 1.105: `SignedIn` takes `require` since 1.105, which is what `auth.guard({ require })` takes (a role, a list of which any one passes, a predicate), and its `@else` block holds what a visitor sees, in place of a `SignedOut` beside it. The old forms work until 1.108. Found on a component bound to the library\'s file in a template. The fix renames `role` to `require`; `SignedOut` and a `role` written beside a `require` are reported with no fix, since the children of a `SignedOut` join the `SignedIn` beside it by hand.';
|
|
185
|
+
readonly wrong: '---\nimport SignedIn from \'@kayjs/auth/components/signed-in.kay\'\n---\nSignedIn(role="admin")\n a(href="/admin") Admin';
|
|
186
|
+
readonly right: '---\nimport SignedIn from \'@kayjs/auth/components/signed-in.kay\'\n---\nSignedIn(require="admin")\n a(href="/admin") Admin';
|
|
187
|
+
};
|
|
188
|
+
readonly 'deprecated-ui-callbacks': {
|
|
189
|
+
readonly level: 'warn';
|
|
190
|
+
readonly group: 'deprecated';
|
|
191
|
+
readonly since: '1.105';
|
|
192
|
+
readonly summary: 'A kayjs-ui prop under the name it had before 1.105, when its callback took positional arguments: `onChange` on an Accordion, Tabs or ThemeToggle is `onValueChange`, on a ZoomPane `onPlateChange`, `onSort` on a Table `onSortChange`, and `onActive` on a BarChart, LineChart, ScatterChart, Sparkline or ContributionGraph `onActiveChange`, each name saying what changed and its callback taking one event object (`{ value, tab }`, `{ plate }`, `{ sort }`, `{ index }`). The old names work until 1.108 with their old arguments. Found on a component bound to the library\'s file in a template. The fix writes the new name and, for an inline arrow function with plain parameter names, destructures the event under them; any other value is renamed by an unsafe fix, which `kay upgrade` leaves to you, since the callback has to take the event. The other callbacks that took positional arguments (`onChange` of a TextInput, `onOpenChange` of a Dialog) keep their names and take the event object with no old form to find: `kay check` reports each call.';
|
|
193
|
+
readonly wrong: '---\nimport Tabs from \'@kayjs/ui/tabs.kay\'\n---\nTabs(tabs={[{ value: \'a\', label: \'A\' }]} label="Product" onChange={value => console.log(value)})';
|
|
194
|
+
readonly right: '---\nimport Tabs from \'@kayjs/ui/tabs.kay\'\n---\nTabs(tabs={[{ value: \'a\', label: \'A\' }]} label="Product" onValueChange={({ value }) => console.log(value)})';
|
|
195
|
+
};
|
|
196
|
+
readonly 'deprecated-ui-items': {
|
|
197
|
+
readonly level: 'warn';
|
|
198
|
+
readonly group: 'deprecated';
|
|
199
|
+
readonly since: '1.105';
|
|
200
|
+
readonly summary: 'The prop holding the list a kayjs-ui component draws, `items` since 1.105 on every one: `tabs` on a Tabs, `avatars` on an AvatarGroup, `entries` on a CommandPalette or a Timeline, `links` on a SideNav, SiteNav or AppHeader, `steps` on Steps and `icons` on an IconPicker. `rows` of a Table and `options` of a choice control keep their names. The old names work until 1.108. Found on a component bound to the library\'s file in a template. The fix writes `items`; it offers none where `items` is already written. TabNav\'s `tabs` and `links` are two shapes picked by `param`, and the `links` of a SideNav group are data: both keep their names.';
|
|
201
|
+
readonly wrong: '---\nimport Tabs from \'@kayjs/ui/tabs.kay\'\n---\nTabs(tabs={[{ value: \'a\', label: \'A\' }]} label="Product" value="a")';
|
|
202
|
+
readonly right: '---\nimport Tabs from \'@kayjs/ui/tabs.kay\'\n---\nTabs(items={[{ value: \'a\', label: \'A\' }]} label="Product" value="a")';
|
|
203
|
+
};
|
|
204
|
+
readonly 'deprecated-ui-input': {
|
|
205
|
+
readonly level: 'warn';
|
|
206
|
+
readonly group: 'deprecated';
|
|
207
|
+
readonly since: '1.105';
|
|
208
|
+
readonly summary: 'The `id`, `title` and `data-*` attributes of a kayjs-ui Toggle, Checkbox, Slider, ColorInput, Combobox (its `id` names the list and stays) or DateInput, which reached the input before 1.105 and are on the root element now, as on every component; the input takes `inputProps`. The old form works on the root until 1.108, so a stylesheet or a script that found the input by its `id` is what changes. Found on a component bound to the library\'s file in a template. The fix writes them all into one `inputProps={{ ... }}`; it offers none beside an `inputProps` already written.';
|
|
209
|
+
readonly wrong: '---\nimport Toggle from \'@kayjs/ui/toggle.kay\'\n---\nToggle(label="Alerts" id="alerts" data-track="alerts")';
|
|
210
|
+
readonly right: '---\nimport Toggle from \'@kayjs/ui/toggle.kay\'\n---\nToggle(label="Alerts" inputProps={{ id: \'alerts\', \'data-track\': \'alerts\' }})';
|
|
211
|
+
};
|
|
212
|
+
readonly 'deprecated-ai-language': {
|
|
213
|
+
readonly level: 'warn';
|
|
214
|
+
readonly group: 'deprecated';
|
|
215
|
+
readonly since: '1.105';
|
|
216
|
+
readonly site: true;
|
|
217
|
+
readonly summary: '`language` in the options of kayjs-ai\'s `transcribe()` and `describeImage()`, `locale` since 1.105: a BCP 47 tag such as `fr` or `pt-BR` as everywhere in kay, which `transcribe()` turns into the ISO 639-1 code its provider takes. The old name works until 1.108. Found on a call of either imported from `@kayjs/ai`, in the options object written in the call, in the TypeScript files and `.kay` files of the project. The fix renames the key, a bare `{ language }` becoming `locale: language`; an object that spreads another, or that has a `locale` already, is reported with no fix.';
|
|
218
|
+
readonly wrong: '---\nimport { transcribe } from \'@kayjs/ai\'\n\nexport const text = async (audio: Blob) => transcribe(audio, { language: \'fr\' })\n---\np x';
|
|
219
|
+
readonly right: '---\nimport { transcribe } from \'@kayjs/ai\'\n\nexport const text = async (audio: Blob) => transcribe(audio, { locale: \'fr\' })\n---\np x';
|
|
220
|
+
};
|
|
221
|
+
readonly 'deprecated-persisted-call': {
|
|
222
|
+
readonly level: 'warn';
|
|
223
|
+
readonly group: 'deprecated';
|
|
224
|
+
readonly since: '1.105';
|
|
225
|
+
readonly site: true;
|
|
226
|
+
readonly summary: '`persisted(name, value)` keeping a cookie without saying so, `persisted.cookie(name, value)` since 1.105: every call names its storage, `persisted.cookie()`, `persisted.local()`, `persisted.session()`, and `queryParam()` for the URL, so a bare call is not read as any of them. The old call works until 1.108, and `storage` in its options, which `deprecated-persisted-storage` rewrote until 1.104, is gone. Found on a call of `persisted` imported from `kay`, in the TypeScript files and `.kay` files of the project. The fix writes `.cookie`; a call with a `storage` option is reported with no fix.';
|
|
227
|
+
readonly wrong: '---\nimport { persisted } from \'kay\'\n\nconst theme = persisted(\'theme\', \'light\')\n---\np {theme()}';
|
|
228
|
+
readonly right: '---\nimport { persisted } from \'kay\'\n\nconst theme = persisted.cookie(\'theme\', \'light\')\n---\np {theme()}';
|
|
229
|
+
};
|
|
230
|
+
readonly 'deprecated-persisted-query': {
|
|
231
|
+
readonly level: 'warn';
|
|
232
|
+
readonly group: 'deprecated';
|
|
233
|
+
readonly since: '1.105';
|
|
234
|
+
readonly site: true;
|
|
235
|
+
readonly summary: '`persisted.query(name, value, options)`, `queryParam(name, { default: value, ...options })` since 1.105: a query param has one signal, which takes the value a param left out reads as `default` and the `values` and `history` options `persisted.query()` took. The old call works until 1.108. Found on a call of `persisted.query` imported from `kay`, in the TypeScript files and `.kay` files of the project. The fix writes the call and moves the import, dropping `persisted` when nothing else reads it; a call with a spread argument, a comment inside it or an import it cannot rewrite is reported with no fix.';
|
|
236
|
+
readonly wrong: '---\nimport { persisted } from \'kay\'\n\nconst tab = persisted.query(\'tab\', \'a\', { history: \'push\' })\n---\np {tab()}';
|
|
237
|
+
readonly right: '---\nimport { queryParam } from \'kay\'\n\nconst tab = queryParam(\'tab\', { default: \'a\', history: \'push\' })\n---\np {tab()}';
|
|
238
|
+
};
|
|
239
|
+
readonly 'deprecated-navigate-query': {
|
|
240
|
+
readonly level: 'warn';
|
|
241
|
+
readonly group: 'deprecated';
|
|
242
|
+
readonly since: '1.105';
|
|
243
|
+
readonly site: true;
|
|
244
|
+
readonly summary: '`navigate({ query })`, `navigate.query(changes)` since 1.105: one name did two jobs, going to a page with `navigate(href)` and changing the query of the current one in place. The old form works until 1.108. Found on a call of `navigate` imported from `kay`, in the TypeScript files and `.kay` files of the project, whose first argument is an object literal with `query`. The fix writes `navigate.query` with the changes; an object with another key, or a comment in it, is reported with no fix.';
|
|
245
|
+
readonly wrong: 'import { navigate } from \'kay\'\n\nexport const next = () => navigate({ query: { page: 2 } })';
|
|
246
|
+
readonly right: 'import { navigate } from \'kay\'\n\nexport const next = () => navigate.query({ page: 2 })';
|
|
247
|
+
};
|
|
248
|
+
readonly 'deprecated-navigation-hooks': {
|
|
249
|
+
readonly level: 'warn';
|
|
250
|
+
readonly group: 'deprecated';
|
|
251
|
+
readonly since: '1.105';
|
|
252
|
+
readonly site: true;
|
|
253
|
+
readonly summary: '`onNavigate(fn)` and `onBeforeNavigate(fn)`, `navigation.onNavigate(fn)` and `navigation.onBeforeNavigate(fn)` since 1.105: the hooks of a source are its methods, as `resource` has `onData` and a stream `onOpen`, so `navigation` holds the status and the hooks together. The old functions work until 1.108. Found on a call of either imported from `kay`, in the TypeScript files and `.kay` files of the project. The fix writes the method and moves the import; a name read other than as a call, a `navigation` of the file\'s own or an aliased import is reported with no fix.';
|
|
254
|
+
readonly wrong: '---\nimport { onNavigate } from \'kay\'\n\nonNavigate(({ url }) => console.log(url.pathname))\n---\np x';
|
|
255
|
+
readonly right: '---\nimport { navigation } from \'kay\'\n\nnavigation.onNavigate(({ url }) => console.log(url.pathname))\n---\np x';
|
|
256
|
+
};
|
|
257
|
+
readonly 'deprecated-island-events': {
|
|
258
|
+
readonly level: 'warn';
|
|
259
|
+
readonly group: 'deprecated';
|
|
260
|
+
readonly since: '1.105';
|
|
261
|
+
readonly site: true;
|
|
262
|
+
readonly summary: 'An island listening to an event of kay with `listen`, `kay:navigate`, `kay:navigate-start`, `kay:navigate-error`, `kay:navigate-stall`, `kay:action-start`, `kay:action-success`, `kay:action-error`, `kay:consent` or `kay:install`, since 1.105: an island uses the function hooks, `navigation.onNavigate`, `onStart`, `onError` and `onStall`, `add.onStart`, `onData` and `onError` of an action, the `consent` signal and `installPrompt.available()`, and the events stay for a plain script, which has no island to hook into. The old form works until 1.108. Found on a `listen` imported from `kay`. The fix writes the method for the swap\'s events when the handler takes no parameter, as the hook hands an object of its own where the event handed `detail`; any other listener is reported with the hook to write and no fix.';
|
|
263
|
+
readonly wrong: '---\nimport { listen } from \'kay\'\n\nlisten(() => document, \'kay:navigate-start\', () => console.log(\'going\'))\n---\np x';
|
|
264
|
+
readonly right: '---\nimport { navigation } from \'kay\'\n\nnavigation.onStart(() => console.log(\'going\'))\n---\np x';
|
|
265
|
+
};
|
|
266
|
+
readonly 'deprecated-listen-target': {
|
|
267
|
+
readonly level: 'warn';
|
|
268
|
+
readonly group: 'deprecated';
|
|
269
|
+
readonly since: '1.105';
|
|
270
|
+
readonly site: true;
|
|
271
|
+
readonly summary: '`listen(window, ...)`, `listen(() => window, ...)` since 1.105: the target is one form, a function returning it, which a `.ts` module can run on the server where `window` is not read, and which a signal or a `ref` follows as it changes. A target given as a value is read once. The old form works until 1.108. Found on a call of `listen` imported from `kay` whose first argument is `window`, `document` or a member of one, in the TypeScript files and `.kay` files of the project. The fix wraps the target.';
|
|
272
|
+
readonly wrong: '---\nimport { listen, signal } from \'kay\'\n\nconst key = signal(\'\')\n\nlisten(window, \'keydown\', event => key = event.key)\n---\np {key()}';
|
|
273
|
+
readonly right: '---\nimport { listen, signal } from \'kay\'\n\nconst key = signal(\'\')\n\nlisten(() => window, \'keydown\', event => key = event.key)\n---\np {key()}';
|
|
274
|
+
};
|
|
275
|
+
readonly 'deprecated-import-path': {
|
|
276
|
+
readonly level: 'warn';
|
|
277
|
+
readonly group: 'deprecated';
|
|
278
|
+
readonly since: '1.105';
|
|
279
|
+
readonly site: true;
|
|
280
|
+
readonly summary: 'A name imported from an entry that is no longer its home, which each name has one of since 1.105: `mount` and `Mounted` come from `kay`, not `kay/mount`; `s`, `RateLimit` and `RateLimitRefusal` from `kay`, not `kay/server`; `sqliteCache` from `kay/cache`, not `kay/server`. The old paths work until 1.108. Found in the imports of the TypeScript files and `.kay` files of the project. The fix takes the name out of the import and imports it from its home, in a statement of its own after it; an import with a default or namespace specifier, or a comment in it, is reported with no fix.';
|
|
281
|
+
readonly wrong: '---\nimport { s } from \'kay/server\'\n\nconst Form = s.Object({ name: s.String() })\n---\np x';
|
|
282
|
+
readonly right: '---\nimport { s } from \'kay\'\n\nconst Form = s.Object({ name: s.String() })\n---\np x';
|
|
283
|
+
};
|
|
284
|
+
readonly 'deprecated-store-names': {
|
|
285
|
+
readonly level: 'warn';
|
|
286
|
+
readonly group: 'deprecated';
|
|
287
|
+
readonly since: '1.105';
|
|
288
|
+
readonly site: true;
|
|
289
|
+
readonly summary: 'The store and table names of kayjs-ai, kayjs-mail and kayjs-cms, which one naming took over in 1.105: `ai({ conversations })` is `ai({ store })`, `pgConversations`, `sqliteConversations`, `createConversationTable` and `conversationTable` of `@kayjs/ai` are `pgAi`, `sqliteAi`, `createAiTables` and `aiTables`, `openLists`, `createMailListTables` and `mailListTableNames` of `@kayjs/mail` are `sqliteLists`, `createMailTables` and `mailTables`, `listStore` and `suppressionStore` of `mailer()` are `store: { lists, suppressions }`, and `pgLoader` and `sqliteLoader` of `@kayjs/cms` are `pgCms` and `sqliteCms`. The old names work until 1.108. Found in imports from the `/pg` and `/sqlite` entries and in the options written in a call of `ai` or `mailer`, in the TypeScript files and `.kay` files of the project. The fix renames the imports and their uses and the `conversations` key, and moves a lone `listStore` or `suppressionStore` under `store`; both together, a spread or a `store` already there are reported with no fix.';
|
|
290
|
+
readonly wrong: '// kay.config.ts\nimport { ai } from \'@kayjs/ai\'\nimport { pgConversations } from \'@kayjs/ai/pg\'\n\nexport default { extensions: [ai({ conversations: pgConversations(db) })] }';
|
|
291
|
+
readonly right: '// kay.config.ts\nimport { ai } from \'@kayjs/ai\'\nimport { pgAi } from \'@kayjs/ai/pg\'\n\nexport default { extensions: [ai({ store: pgAi(db) })] }';
|
|
292
|
+
};
|
|
293
|
+
readonly 'deprecated-cms-options': {
|
|
294
|
+
readonly level: 'warn';
|
|
295
|
+
readonly group: 'deprecated';
|
|
296
|
+
readonly since: '1.105';
|
|
297
|
+
readonly site: true;
|
|
298
|
+
readonly summary: '`role` and `guard: passwordGuard()` in the options of `cms()`, `access` since 1.105: one option says who is let in, a kayjs-auth role (`access: \'editor\'`, or a list of them), `{ password }` for a site with no users (the options of `passwordGuard()` beside it) or a function returning the person, which `member` gave a custom guard on its own; an `uploads` list is `uploads: { types }`. The old forms work until 1.108. Found on a call of `cms` imported from `@kayjs/cms`, in the options object written in the call, in the TypeScript files and `.kay` files of the project. The fix renames `role`, writes `access: { password }` for the `passwordGuard()` call (the import it leaves unused can go) and wraps the `uploads` list; a `member`, which needs its guard folded into one function, is reported with no fix, and so is an options object that spreads another or holds `access` already.';
|
|
299
|
+
readonly wrong: '// kay.config.ts\nimport { cms } from \'@kayjs/cms\'\n\nexport default { extensions: [cms({ role: \'editor\', uploads: [\'image/*\'] })] }';
|
|
300
|
+
readonly right: '// kay.config.ts\nimport { cms } from \'@kayjs/cms\'\n\nexport default { extensions: [cms({ access: \'editor\', uploads: { types: [\'image/*\'] } })] }';
|
|
301
|
+
};
|
|
302
|
+
readonly 'deprecated-hook-names': {
|
|
303
|
+
readonly level: 'warn';
|
|
304
|
+
readonly group: 'deprecated';
|
|
305
|
+
readonly since: '1.105';
|
|
306
|
+
readonly site: true;
|
|
307
|
+
readonly summary: 'A server hook of the libraries that observes, written `on<Verb>` before 1.105 and `after<Verb>` since, beside `before<Verb>` that may refuse or change: kayjs-auth\'s `onSignUp` (`afterSignUp`), kayjs-mail\'s `onSend` and `onSuppress` (`afterSend`, `afterSuppress`, also `contactForm()`\'s `onSend`) and a list\'s `onSubscribe`, `onConfirm`, `onUnsubscribe` and `onBroadcast`, kayjs-cms\'s `onSave` and `onUpload` (`afterSave`, `afterUpload`, also per collection) and kayjs-ai\'s `onStep`, `onToolCall` and `onSuccess` (`afterStep`, `afterToolCall`, `afterRequest`). `onError` and `onEvent` keep their names. The old names work until 1.108 and the new one wins when both are written. Found in the options object written in a call of `auth`, `authCore`, `mail`, `mailer`, `contactForm`, `cms`, `ai`, `ask`, `speak`, `embed`, `transcribe` or `describeImage` imported from its library, in a `.list()` call of a file importing kayjs-mail, in each collection of `cms({ collections })` and in the `hooks` object of kayjs-auth\'s `src/auth.ts`. The fix renames the key, a bare `{ onSave }` becoming `afterSave: onSave`; an object that spreads another or writes the new name already is reported with no fix.';
|
|
308
|
+
readonly wrong: '// kay.config.ts\nimport { cms } from \'@kayjs/cms\'\n\nexport default { extensions: [cms({ onSave: purge })] }';
|
|
309
|
+
readonly right: '// kay.config.ts\nimport { cms } from \'@kayjs/cms\'\n\nexport default { extensions: [cms({ afterSave: purge })] }';
|
|
310
|
+
};
|
|
311
|
+
readonly 'deprecated-job-handler': {
|
|
312
|
+
readonly level: 'warn';
|
|
313
|
+
readonly group: 'deprecated';
|
|
314
|
+
readonly since: '1.105';
|
|
315
|
+
readonly site: true;
|
|
316
|
+
readonly summary: 'A job handler that takes its signal and its job as arguments of their own, `(input, ctx)` since 1.105 for a queue, a workflow, a schedule and a background job alike, `ctx` holding `signal`, `job`, `log`, `locale` and a workflow\'s `step`. `queue(name, (payload, signal, job) => ...)` is `(payload, { signal, job })`, `workflow(name, ({ id, input, step }) => ...)` is `(input, { step, job: { id } })`, and `schedule(...)` and `background` jobs written `(signal) => ...` are `(_, { signal })`, their first argument being the run (`{ schedule, boot }`) or nothing. A queue handler written the old way still runs until 1.108, as the second argument it gets is the signal carrying the context; a workflow\'s, a schedule\'s and a background job\'s do not, so `kay check` types them as errors too. Found on a call of `queue`, `workflow`, `schedule` or `background` imported from `kay/server`, the handler written in the call with plain parameter names, in the TypeScript files and `.kay` files of the project. The fix destructures the parameters off the context, so the body reads them under the names it had; a handler passed by name, or one whose parameters are annotated or have defaults, is reported with no fix.';
|
|
317
|
+
readonly wrong: '---\nimport { queue } from \'kay/server\'\n\nexport const mails = queue(\'mails\', (to: string, signal) => fetch(to, { signal }))\n---\np x';
|
|
318
|
+
readonly right: '---\nimport { queue } from \'kay/server\'\n\nexport const mails = queue(\'mails\', (to: string, { signal }) => fetch(to, { signal }))\n---\np x';
|
|
319
|
+
};
|
|
320
|
+
readonly 'deprecated-schedule-call': {
|
|
321
|
+
readonly level: 'warn';
|
|
322
|
+
readonly group: 'deprecated';
|
|
323
|
+
readonly since: '1.105';
|
|
324
|
+
readonly site: true;
|
|
325
|
+
readonly summary: '`schedule(when, job, options)`, `schedule({ cron | every, ...options }, job)` since 1.105: the schedule and its options are one object, as the options of `queue` and `workflow` are, with `every` for a length (`\'30s\'`, `30`) and `cron` for a cron. The table form, `schedule({ \'@hourly\': job }, options)`, stays. The old call still works until 1.108. Found on a call of `schedule` imported from `kay/server` whose first argument is a string or number literal, in the TypeScript files and `.kay` files of the project. The fix writes the object and spreads the options after it; one holding a comment is reported with no fix.';
|
|
326
|
+
readonly wrong: '---\nimport { schedule } from \'kay/server\'\n\nexport const upkeep = schedule(\'@hourly\', sweep, { lock: \'sweep\' })\n---\np x';
|
|
327
|
+
readonly right: '---\nimport { schedule } from \'kay/server\'\n\nexport const upkeep = schedule({ cron: \'@hourly\', lock: \'sweep\' }, sweep)\n---\np x';
|
|
328
|
+
};
|
|
329
|
+
readonly 'deprecated-job-options': {
|
|
330
|
+
readonly level: 'warn';
|
|
331
|
+
readonly group: 'deprecated';
|
|
332
|
+
readonly since: '1.105';
|
|
333
|
+
readonly site: true;
|
|
334
|
+
readonly summary: '`lostAfter` in the options of `queue()` or `workflow()`, `timeout` since 1.105: the one name of how long a run may take, which a schedule\'s option has. The old name works until 1.108. Found on a call of `queue` or `workflow` imported from `kay/server`, in the options written in the call, in the TypeScript files and `.kay` files of the project. The fix renames the key; one beside a `timeout` is reported with no fix.';
|
|
335
|
+
readonly wrong: '---\nimport { queue } from \'kay/server\'\n\nexport const mails = queue(\'mails\', send, { lostAfter: \'5m\' })\n---\np x';
|
|
336
|
+
readonly right: '---\nimport { queue } from \'kay/server\'\n\nexport const mails = queue(\'mails\', send, { timeout: \'5m\' })\n---\np x';
|
|
337
|
+
};
|
|
338
|
+
readonly 'deprecated-disk-files': {
|
|
339
|
+
readonly level: 'warn';
|
|
340
|
+
readonly group: 'deprecated';
|
|
341
|
+
readonly since: '1.105';
|
|
342
|
+
readonly site: true;
|
|
343
|
+
readonly summary: '`diskFiles(dir, hooks)`, `diskFiles({ dir, ...hooks })` since 1.105: the options of every file store are one object, as `s3Files({ ...settings, onWrite })` and `memoryFiles({ onWrite })` take them, `dir` being `data/files` when left out. The old call works until 1.108. Found on a call of `diskFiles` imported from `kay/server` whose first argument is not an object, in the TypeScript files and `.kay` files of the project. The fix writes the object, spreading hooks that are not written in the call; one holding a comment is reported with no fix.';
|
|
344
|
+
readonly wrong: '---\nimport { diskFiles } from \'kay/server\'\n\nexport const files = diskFiles(\'data/uploads\', { onWrite: audit })\n---\np x';
|
|
345
|
+
readonly right: '---\nimport { diskFiles } from \'kay/server\'\n\nexport const files = diskFiles({ dir: \'data/uploads\', onWrite: audit })\n---\np x';
|
|
346
|
+
};
|
|
347
|
+
readonly 'deprecated-format-duration': {
|
|
348
|
+
readonly level: 'warn';
|
|
349
|
+
readonly group: 'deprecated';
|
|
350
|
+
readonly since: '1.105';
|
|
351
|
+
readonly site: true;
|
|
352
|
+
readonly summary: '`formatDuration(ms)` with a bare number, a `Duration` since 1.105: kay\'s durations carry their unit everywhere, `formatDuration(\'125m\')`, and `formatBytes` takes a `ByteSize` the same way (`formatBytes(\'1.5kb\')`), which also still takes a number of bytes. The old form works until 1.108. Found on a call imported from `kay/i18n` whose argument is a number written as a literal or as arithmetic of literals, in the TypeScript files and `.kay` files of the project; a number held in a variable is a type error in the editor and `kay check` reads no types here. The fix writes the value in milliseconds, `\'7500000ms\'`.';
|
|
353
|
+
readonly wrong: '---\nimport { formatDuration } from \'kay/i18n\'\n---\np {formatDuration(7_500_000)}';
|
|
354
|
+
readonly right: '---\nimport { formatDuration } from \'kay/i18n\'\n---\np {formatDuration(\'7500000ms\')}';
|
|
355
|
+
};
|
|
356
|
+
readonly 'deprecated-page-seo': {
|
|
357
|
+
readonly level: 'warn';
|
|
358
|
+
readonly group: 'deprecated';
|
|
359
|
+
readonly since: '1.105';
|
|
360
|
+
readonly summary: '`noindex`, `sitemap`, `lastmod`, `search` or `feed` at the top level of `page`, the `seo` group since 1.105: `seo: { title, description, image, canonical, noindex, sitemap, lastmod, search, feed }` holds what search engines, social cards and the sitemap read of a page, as `head(title=... description=...)` and `seo` in kay.config.ts do. The old form works until 1.108. The fix moves the settings into a new `seo`; a page that has one already keeps them for you to move.';
|
|
361
|
+
readonly wrong: '--- server\nexport const page = { noindex: true }\n---\np Legal';
|
|
362
|
+
readonly right: '--- server\nexport const page = { seo: { noindex: true } }\n---\np Legal';
|
|
363
|
+
};
|
|
364
|
+
readonly 'deprecated-page-cache': {
|
|
365
|
+
readonly level: 'warn';
|
|
366
|
+
readonly group: 'deprecated';
|
|
367
|
+
readonly since: '1.105';
|
|
368
|
+
readonly summary: '`ttl` or `cacheControl` in `page`, `cache` since 1.105: `cache: \'1h\'` keeps a prerendered page that long and has a shared cache keep it as long, `cache: { browser, shared, swr }` sets each part of the header, `\'private\'` and `false` send `private` and the default. The old form works until 1.108. The fix renames a lone `ttl`, or a lone `cacheControl: false`; the two together, or a header written out, are left for you to write as `cache`.';
|
|
369
|
+
readonly wrong: '--- server\nexport const page = { prerender: true, ttl: \'1h\' }\n---\np Hello';
|
|
370
|
+
readonly right: '--- server\nexport const page = { prerender: true, cache: \'1h\' }\n---\np Hello';
|
|
371
|
+
};
|
|
372
|
+
readonly 'deprecated-image-options': {
|
|
373
|
+
readonly level: 'warn';
|
|
374
|
+
readonly group: 'deprecated';
|
|
375
|
+
readonly since: '1.105';
|
|
376
|
+
readonly summary: 'The options of an `img` written the old way, as attributes since 1.105 like every other option of the image: `no-placeholder` is `placeholder={false}`, and `img({...image(hero, { aspect: \'1/1\', sizes: \'100vw\' })})` is `img(src={hero} aspect="1/1" sizes="100vw")`, `image()` staying for an element that is no `img`. The old forms work until 1.108. The fix rewrites the attribute, and the spread when it is the only one, the `src` and the options of the call are written in the call itself and the `img` writes none of them; a call with another shape is reported with no fix.';
|
|
377
|
+
readonly wrong: '---\nimport hero from \'./hero.jpg\'\n---\nimg(src={hero} no-placeholder alt="The workshop")';
|
|
378
|
+
readonly right: '---\nimport hero from \'./hero.jpg\'\n---\nimg(src={hero} placeholder={false} alt="The workshop")';
|
|
379
|
+
};
|
|
380
|
+
readonly 'deprecated-config-switch': {
|
|
381
|
+
readonly level: 'warn';
|
|
382
|
+
readonly group: 'deprecated';
|
|
383
|
+
readonly since: '1.105';
|
|
384
|
+
readonly site: true;
|
|
385
|
+
readonly summary: '`proxy: 2` in kay.config.ts, `proxy: { hops: 2 }` since 1.105, where `proxy: 1` is `proxy: true`: every feature key of the config is `false` for off, `true` for its defaults or an object of options, so the number of proxies was a third form of the same switch. The number works until 1.108. Found in the object kay.config.ts exports. The fix writes `true` for 1 and `{ hops: n }` for a whole number above it; a number that is no whole number from 1 is reported with no fix.';
|
|
386
|
+
readonly wrong: '// kay.config.ts\nexport default { proxy: 2 }';
|
|
387
|
+
readonly right: '// kay.config.ts\nexport default { proxy: { hops: 2 } }';
|
|
388
|
+
};
|
|
389
|
+
readonly 'deprecated-images-keys': {
|
|
390
|
+
readonly level: 'warn';
|
|
391
|
+
readonly group: 'deprecated';
|
|
392
|
+
readonly since: '1.105';
|
|
393
|
+
readonly site: true;
|
|
394
|
+
readonly summary: 'The flat keys of `images` in kay.config.ts, grouped since 1.105: `remoteMaxSize` and `remoteTimeout` are `remote: { maxSize, timeout }`, `quality`, `webp` and `avif` are `formats: { quality, webp, avif }`, `maxVariants` and `queue` are `limits: { variants, queue }`. They work until 1.108. The fix moves the keys into their group, unless the object spreads or already has it.';
|
|
395
|
+
readonly wrong: '// kay.config.ts\nexport default { images: { remoteMaxSize: \'10mb\', remoteTimeout: \'30s\', avif: false } }';
|
|
396
|
+
readonly right: '// kay.config.ts\nexport default { images: { remote: { maxSize: \'10mb\', timeout: \'30s\' }, formats: { avif: false } } }';
|
|
397
|
+
};
|
|
398
|
+
readonly 'deprecated-client-keys': {
|
|
399
|
+
readonly level: 'warn';
|
|
400
|
+
readonly group: 'deprecated';
|
|
401
|
+
readonly since: '1.105';
|
|
402
|
+
readonly site: true;
|
|
403
|
+
readonly summary: 'The keys `links`, `offline` and `search` of kay.config.ts, written in `client` since 1.105 with the rest of what the browser is given: `client: { links, offline, search }`. They work until 1.108. Found in the object kay.config.ts exports and in the `config` of `pages()` and `testSite()`. The fix moves the keys into `client` as written, unless the object spreads, holds a computed key or has a `client` already.';
|
|
404
|
+
readonly wrong: '// kay.config.ts\nexport default { search: true, offline: true }';
|
|
405
|
+
readonly right: '// kay.config.ts\nexport default { client: { search: true, offline: true } }';
|
|
406
|
+
};
|
|
407
|
+
readonly 'deprecated-config-groups': {
|
|
408
|
+
readonly level: 'warn';
|
|
409
|
+
readonly group: 'deprecated';
|
|
410
|
+
readonly since: '1.105';
|
|
411
|
+
readonly site: true;
|
|
412
|
+
readonly summary: 'The keys `images`, `fonts`, `favicon`, `manifest` and `publicCache` of kay.config.ts, written in `assets` since 1.105, and `observe`, `health`, `metrics` and `jobs`, written in `ops`: `assets: { images, fonts, favicon, manifest, publicCache }`, `ops: { observe, health, metrics, jobs }`. They work until 1.108. Found in the object kay.config.ts exports and in the `config` of `pages()` and `testSite()`. The fix moves the keys into their group as written, unless the object spreads, holds a computed key or has the group already.';
|
|
413
|
+
readonly wrong: '// kay.config.ts\nexport default { images: { widths: [640] }, health: false }';
|
|
414
|
+
readonly right: '// kay.config.ts\nexport default { assets: { images: { widths: [640] } }, ops: { health: false } }';
|
|
415
|
+
};
|
|
416
|
+
readonly 'deprecated-i18n-keys': {
|
|
417
|
+
readonly level: 'warn';
|
|
418
|
+
readonly group: 'deprecated';
|
|
419
|
+
readonly since: '1.105';
|
|
420
|
+
readonly site: true;
|
|
421
|
+
readonly summary: 'The keys `defaultLocale`, `prefixDefault` and `domains` of `i18n` in kay.config.ts, since 1.105 `default` and `mode`: `mode: \'always\'` is `prefixDefault: true` and `mode: { domains }` is `domains`, so a config can no longer give both. They work until 1.108. Found in the object kay.config.ts exports and in the `config` of `pages()` and `testSite()`. The fix renames or rewrites the key where `i18n` is written in place and `default` and `mode` are not there yet; `domains` beside `prefixDefault`, a `prefixDefault` that is no literal `true` and an `i18n` that spreads are reported with no fix.';
|
|
422
|
+
readonly wrong: '// kay.config.ts\nexport default { i18n: { locales: [\'fr\', \'en\'], defaultLocale: \'fr\', prefixDefault: true } }';
|
|
423
|
+
readonly right: '// kay.config.ts\nexport default { i18n: { locales: [\'fr\', \'en\'], default: \'fr\', mode: \'always\' } }';
|
|
424
|
+
};
|
|
425
|
+
readonly 'deprecated-route-keys': {
|
|
426
|
+
readonly level: 'warn';
|
|
427
|
+
readonly group: 'deprecated';
|
|
428
|
+
readonly since: '1.105';
|
|
429
|
+
readonly site: true;
|
|
430
|
+
readonly summary: 'The keys that name where a feature is served, written in `endpoints` since 1.105, where every default but the API\'s sits under `/_kay`: `serve.apiPrefix` is `endpoints.api`, the `path` of `openapi`, `mcp`, `health`, `metrics` and `jobs` is `endpoints.openapi`, `.mcp`, `.health`, `.metrics` and `.jobs`, and `openapi.referencePath` is `openapi.reference: { path }`. They work until 1.108. Found in the object kay.config.ts exports and in the `config` of `pages()` and `testSite()`. The fix writes the paths in a new `endpoints` and removes them where they were, unless the object spreads, holds a computed key or has an `endpoints` already, or a comment would be lost; `openapi.referencePath` is rewritten beside `reference: true` alone.';
|
|
431
|
+
readonly wrong: '// kay.config.ts\nexport default { mcp: { path: \'/tools\' }, health: { path: \'/up\' } }';
|
|
432
|
+
readonly right: '// kay.config.ts\nexport default { endpoints: { mcp: \'/tools\', health: \'/up\' }, mcp: {}, health: {} }';
|
|
433
|
+
};
|
|
434
|
+
readonly 'deprecated-secret-keys': {
|
|
435
|
+
readonly level: 'warn';
|
|
436
|
+
readonly group: 'deprecated';
|
|
437
|
+
readonly since: '1.105';
|
|
438
|
+
readonly site: true;
|
|
439
|
+
readonly summary: 'The secrets of kay.config.ts in one shape since 1.105, each `string | { env } | { file }`: `mcp.key` is `mcp.token`, and `proxy.key`, a header name, is `{ header, secret? }`, so `proxy: { key: { header: \'x-upstream-key\' } }`; the `mcpKey` and `proxyKey` options of `testSite()` are the `token` and the `secret` of its `config`. They work until 1.108. Found in the object kay.config.ts exports and in the `config` of `pages()` and `testSite()`. The fix renames `mcp.key` (a `key: false` and an `mcp` that spreads or has a `token` are reported with no fix) and wraps the header of `proxy.key`; the options of `testSite()` are reported with no fix.';
|
|
440
|
+
readonly wrong: '// kay.config.ts\nexport default { mcp: { key: true }, proxy: { key: \'x-upstream-key\' } }';
|
|
441
|
+
readonly right: '// kay.config.ts\nexport default { mcp: { token: true }, proxy: { key: { header: \'x-upstream-key\' } } }';
|
|
442
|
+
};
|
|
443
|
+
readonly 'deprecated-socket-frames': {
|
|
444
|
+
readonly level: 'warn';
|
|
445
|
+
readonly group: 'deprecated';
|
|
446
|
+
readonly since: '1.105';
|
|
447
|
+
readonly site: true;
|
|
448
|
+
readonly summary: '`ws.send(JSON.stringify(value))` in a handler of an `api()` module\'s `.ws()` route, `ws.send(value)` since 1.105: every websocket frame is JSON, so a string, a number, a boolean or `null` reads back as what it was, and a text that already is JSON would reach the client as a string holding it. The old form still sends, but the client reads the JSON text as a string, where it read the object before; it is reported until 1.108. Found on the first parameter of an `open`, `message` or `close` handler written in the options of a `.ws()` chained from the `api` a file imports from `kay/server`. The fix sends the value itself.';
|
|
449
|
+
readonly wrong: '// src/api/chat.ts\nimport { api } from \'kay/server\'\n\nexport default api().ws(\'/\', {\n message(ws, message) {\n ws.send(JSON.stringify({ echo: message }))\n },\n})';
|
|
450
|
+
readonly right: '// src/api/chat.ts\nimport { api } from \'kay/server\'\n\nexport default api().ws(\'/\', {\n message(ws, message) {\n ws.send({ echo: message })\n },\n})';
|
|
451
|
+
};
|
|
452
|
+
readonly 'deprecated-ttl-names': {
|
|
453
|
+
readonly level: 'warn';
|
|
454
|
+
readonly group: 'deprecated';
|
|
455
|
+
readonly since: '1.105';
|
|
456
|
+
readonly site: true;
|
|
457
|
+
readonly summary: '`maxAge` where it says how long something lives, `ttl` since 1.105, `maxAge` staying for an HTTP header or a cookie: the option of `signed.sign()`, `files.url()` and `workChallenge()` from `kay/server`, of kayjs-auth\'s `proofOfWork()`, the `proofOfWork` and `minTime` of an action\'s `protect`, and the `maxAge.link` and `maxAge.code` a kayjs-auth mail template reads (found in a file importing `@kayjs/auth`; a template reading `data.maxAge` without that import is not found). It works until 1.108. The fix renames the key, unless a `ttl` is written too.';
|
|
458
|
+
readonly wrong: '---\nimport { signed } from \'kay/server\'\n\nconst token = signed.sign(\'shot\', \'1\', { maxAge: \'1d\' })\n---\np {token}';
|
|
459
|
+
readonly right: '---\nimport { signed } from \'kay/server\'\n\nconst token = signed.sign(\'shot\', \'1\', { ttl: \'1d\' })\n---\np {token}';
|
|
460
|
+
};
|
|
461
|
+
readonly 'deprecated-env-files': {
|
|
462
|
+
readonly level: 'warn';
|
|
463
|
+
readonly group: 'deprecated';
|
|
464
|
+
readonly since: '1.105';
|
|
465
|
+
readonly site: true;
|
|
466
|
+
readonly summary: '`env: { compose, example }` in kay.config.ts, `envFiles` since 1.105: the key names the compose and example files the declared variables are compared with (or `false` for no comparison), where `env` read as the variables themselves. It works until 1.108. The fix renames the key, unless an `envFiles` is written too.';
|
|
467
|
+
readonly wrong: '// kay.config.ts\nexport default { env: { compose: \'compose.prod.yaml\', example: \'.env.example\' } }';
|
|
468
|
+
readonly right: '// kay.config.ts\nexport default { envFiles: { compose: \'compose.prod.yaml\', example: \'.env.example\' } }';
|
|
469
|
+
};
|
|
470
|
+
readonly 'deprecated-context-import': {
|
|
471
|
+
readonly level: 'warn';
|
|
472
|
+
readonly group: 'deprecated';
|
|
473
|
+
readonly since: '1.105';
|
|
474
|
+
readonly site: true;
|
|
475
|
+
readonly summary: '`defineContext` imported from `kay/library`, `kay/server` since 1.105, where `defineEnv` and the other helpers an app imports live. `kay/library` keeps it until 1.108. The fix changes the import\'s source, or moves the specifier to a new import when others share the line.';
|
|
476
|
+
readonly wrong: '// src/context.ts\nimport { defineContext } from \'kay/library\'\n\nexport default defineContext(async (request: Request) => ({ plan: request.url }))';
|
|
477
|
+
readonly right: '// src/context.ts\nimport { defineContext } from \'kay/server\'\n\nexport default defineContext(async (request: Request) => ({ plan: request.url }))';
|
|
478
|
+
};
|
|
479
|
+
readonly 'deprecated-store-ms': {
|
|
480
|
+
readonly level: 'warn';
|
|
481
|
+
readonly group: 'deprecated';
|
|
482
|
+
readonly since: '1.105';
|
|
483
|
+
readonly site: true;
|
|
484
|
+
readonly summary: 'A ttl of `kv(namespace).set(key, value, ttl)` and `.once(key, ttl)` written as milliseconds, a `Duration` since 1.105 as every length a store takes: a `RateStore`\'s window, a `KvStore`\'s ttl, a `SessionStore`\'s max age and a `LiveStore`\'s `endAll` ttl, which a store declares with `durations: true` (one without it keeps receiving milliseconds until 1.108). Found on a call chained to `kv(...)` from `kay/server` or `kay/library`, or on a name bound to it in the same file, with a number written as a literal or as arithmetic of literals; a number held in a variable is a type error in the editor, and a store of your own is changed by hand. The fix writes the value in milliseconds, `\'60000ms\'`.';
|
|
485
|
+
readonly wrong: '---\nimport { kv } from \'kay/server\'\n\nconst first = await kv(\'sweep\').once(\'nightly\', 60_000)\n---\np {String(first)}';
|
|
486
|
+
readonly right: '---\nimport { kv } from \'kay/server\'\n\nconst first = await kv(\'sweep\').once(\'nightly\', \'60000ms\')\n---\np {String(first)}';
|
|
487
|
+
};
|
|
488
|
+
readonly 'deprecated-guard-option': {
|
|
489
|
+
readonly level: 'warn';
|
|
490
|
+
readonly group: 'deprecated';
|
|
491
|
+
readonly since: '1.105';
|
|
492
|
+
readonly site: true;
|
|
493
|
+
readonly summary: '`guard` in the options of `vitals()` and in the `jobs` and `images` of kay.config.ts, `guards` since 1.105: every guard option is named `guards` and takes a guard, a list of guards, `{ load }` returning one, or `false`, as a page\'s and an API module\'s do; and `requireGuards` of kay.config.ts, `guards: { default: \'closed\' }` for `true` and `\'open\'` for `false`. The old forms work until 1.108. Found in the options written in the call of `vitals` imported from `kay/server` and in the object kay.config.ts exports, in the TypeScript files and `.kay` files of the project. The fix renames the key; one beside a `guards` is reported with no fix.';
|
|
494
|
+
readonly wrong: '// kay.config.ts\nexport default { jobs: { guard: ctx => ctx.deny(401) } }';
|
|
495
|
+
readonly right: '// kay.config.ts\nexport default { jobs: { guards: ctx => ctx.deny(401) } }';
|
|
496
|
+
};
|
|
497
|
+
readonly 'deprecated-rate-enforce': {
|
|
498
|
+
readonly level: 'warn';
|
|
499
|
+
readonly group: 'deprecated';
|
|
500
|
+
readonly since: '1.105';
|
|
501
|
+
readonly site: true;
|
|
502
|
+
readonly summary: '`enforce(ctx)` on what `rateLimit()` returns, `check(ctx)` since 1.105: `limiter().enforce(key)` counts under a key and refuses nothing, so one name held two jobs, and `check` is the guard\'s call that refuses with a 429. `count(from)` now gives the window, `{ count, resetAt, wait }`, beside `hit`. The old name works until 1.108. Found on a name bound once to a call of `rateLimit` imported from `kay/server`, in the TypeScript files and `.kay` files of the project, as `kay check` reads no types: a limit reached through a property, a parameter or another file is not found. The fix renames the method.';
|
|
503
|
+
readonly wrong: 'import { guard } from \'kay\'\nimport { rateLimit } from \'kay/server\'\n\nconst visits = rateLimit(\'account\', { max: 60, window: \'1m\' })\n\nexport default guard(async (ctx) => {\n await visits.enforce(ctx)\n})';
|
|
504
|
+
readonly right: 'import { guard } from \'kay\'\nimport { rateLimit } from \'kay/server\'\n\nconst visits = rateLimit(\'account\', { max: 60, window: \'1m\' })\n\nexport default guard(async (ctx) => {\n await visits.check(ctx)\n})';
|
|
505
|
+
};
|
|
506
|
+
readonly 'deprecated-deny-call': {
|
|
507
|
+
readonly level: 'warn';
|
|
508
|
+
readonly group: 'deprecated';
|
|
509
|
+
readonly since: '1.105';
|
|
510
|
+
readonly site: true;
|
|
511
|
+
readonly summary: '`deny(status, \'message\', data)` of a guard, a page, an action and an endpoint, `deny(status, { message, errors, data })` since 1.105: a refusal takes one object in every place, as `refuse(status, { message, errors, data })` does, so `errors` puts a message on a field and the text is no longer an argument beside the data. An action answers `deny(status, { data, errors })` as `ctx.fail`: the page again, or an `ActionError`. The text form works until 1.108. Found on a call of `deny`, bare or read off a name, with a literal status from 400 to 599 and a text second argument, in the TypeScript files and `.kay` files of the project. The fix writes the object, unless a comment sits between the arguments or a `data` is given, which an action answers as a failure, not plain text.';
|
|
512
|
+
readonly wrong: '// src/routes/_guard.ts\nimport { guard } from \'kay\'\n\nexport default guard(({ deny }) => {\n deny(403, \'Members only\')\n})';
|
|
513
|
+
readonly right: '// src/routes/_guard.ts\nimport { guard } from \'kay\'\n\nexport default guard(({ deny }) => {\n deny(403, { message: \'Members only\' })\n})';
|
|
514
|
+
};
|
|
515
|
+
readonly 'deprecated-ctx-fail': {
|
|
516
|
+
readonly level: 'warn';
|
|
517
|
+
readonly group: 'deprecated';
|
|
518
|
+
readonly since: '1.105';
|
|
519
|
+
readonly site: true;
|
|
520
|
+
readonly summary: '`ctx.fail(status, data, errors)` of an action, `ctx.deny(status, { data, errors })` since 1.105: an action refuses as a guard and a page do, with one call and one shape, and `deny` throws, so a statement ends the handler as well and `unreturned-fail` has nothing left to report. A text `data` is the `message`: `ctx.fail(409, \'Taken\')` is `ctx.deny(409, { message: \'Taken\' })`, and `failed()?.data` no longer holds it. `ctx.fail` works until 1.108. Found on `ctx.fail` of an action handler\'s `ctx`, in the TypeScript files and `.kay` files of the project. The fix is made where the call is returned (`return ctx.fail(...)`, a branch of a conditional or an arrow\'s body), since a call that was not returned did nothing and `deny` would now stop; the others are reported with no fix.';
|
|
521
|
+
readonly wrong: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.Object({ name: s.String() }), (input, ctx) => {\n return ctx.fail(409, { taken: true }, { name: \'Already taken\' })\n})\n---\np x';
|
|
522
|
+
readonly right: '--- server\nimport { action, s } from \'kay\'\n\nexport const add = action(s.Object({ name: s.String() }), (input, ctx) => {\n return ctx.deny(409, { data: { taken: true }, errors: { name: \'Already taken\' } })\n})\n---\np x';
|
|
523
|
+
};
|
|
524
|
+
readonly 'deprecated-refuse-call': {
|
|
525
|
+
readonly level: 'warn';
|
|
526
|
+
readonly group: 'deprecated';
|
|
527
|
+
readonly since: '1.105';
|
|
528
|
+
readonly site: true;
|
|
529
|
+
readonly summary: '`refuse(message, { status, errors, data })`, `refuse(status, { message, errors, data })` since 1.105: the status leads and the rest is the one object `ctx.deny` takes. The old form works until 1.108. Found on a call of `refuse` imported from `kay` or `kay/library` whose first argument is a text, in the TypeScript files and `.kay` files of the project. The fix writes the status (the 403 or 422 the old call chose, when `errors` names fields written in the call) and the object; options that are not an object written in the call, or an `errors` that is not, are reported with no fix.';
|
|
530
|
+
readonly wrong: '// src/hooks.ts\nimport { refuse } from \'kay\'\n\nexport function beforeSave(): never {\n refuse(\'A summary is needed\', { errors: { summary: \'required\' } })\n}';
|
|
531
|
+
readonly right: '// src/hooks.ts\nimport { refuse } from \'kay\'\n\nexport function beforeSave(): never {\n refuse(422, { message: \'A summary is needed\', errors: { summary: \'required\' } })\n}';
|
|
532
|
+
};
|
|
533
|
+
readonly 'deprecated-auth-rate-limits': {
|
|
534
|
+
readonly level: 'warn';
|
|
535
|
+
readonly group: 'deprecated';
|
|
536
|
+
readonly since: '1.105';
|
|
537
|
+
readonly site: true;
|
|
538
|
+
readonly summary: 'kayjs-auth\'s `rateLimit` as 26 flat keys, grouped by feature since 1.105: `signIn: { ip, account, accountAll }` (`signIn`, `signInAccount`, `signInAccountAll`), `{ ip, account }` for `resend`, `forgot`, `magicLink`, `emailChange`, `twoFactor` and `emailCode`, `invite: { sender, address }` and `oauth: { register, registerAll, document, token }`; `register`, `reprove`, `link`, `export` and `organization` stay one limit. A bare limit or a list on a feature that has a group is its `ip` (or first) part. The old keys work until 1.108. Found in the `rateLimit` object written in a call of `auth` or `authCore` imported from `@kayjs/auth`. The fix, attached to the first report, rewrites only the keys it moves, leaving the order, layout and comments of the others as written; an object that spreads, names a key twice, writes a feature both ways or holds a computed or shorthand key is reported with no fix.';
|
|
539
|
+
readonly wrong: 'import { authCore } from \'@kayjs/auth\'\n\nexport const auth = authCore({ rateLimit: { signIn: { max: 20, window: \'15m\' }, signInAccount: { max: 3, window: \'15m\' } } } as never)';
|
|
540
|
+
readonly right: 'import { authCore } from \'@kayjs/auth\'\n\nexport const auth = authCore({ rateLimit: { signIn: { ip: { max: 20, window: \'15m\' }, account: { max: 3, window: \'15m\' } } } } as never)';
|
|
541
|
+
};
|
|
542
|
+
readonly 'deprecated-app-hooks': {
|
|
543
|
+
readonly level: 'warn';
|
|
544
|
+
readonly group: 'deprecated';
|
|
545
|
+
readonly since: '1.105';
|
|
546
|
+
readonly site: true;
|
|
547
|
+
readonly summary: 'The hooks and log of the config under their names before 1.105, when the hooks became flat keys named by the moment they run: `onStart` is `onListen` (a job\'s `onStart` keeps its name), `observe.onError` is `onError` beside `observe`, and `observe.log` as `\'json\'` or a function is `{ format: \'json\' }` or `{ sink }`. The old forms work until 1.108. Found in the object kay.config.ts exports and in the options of `pages()` and `testSite()` with their `config`. The fix renames and moves the keys; an `onListen` or `onError` already written, a comment in the way or an `observe` that is no literal is reported with no fix.';
|
|
548
|
+
readonly wrong: '// kay.config.ts\nexport default { onStart: ({ url }) => console.log(url), observe: { log: \'json\', onError: ({ error }) => report(error) } }';
|
|
549
|
+
readonly right: '// kay.config.ts\nexport default { onListen: ({ url }) => console.log(url), onError: ({ error }) => report(error), observe: { log: { format: \'json\' } } }';
|
|
550
|
+
};
|
|
551
|
+
readonly 'deprecated-hook-context': {
|
|
552
|
+
readonly level: 'warn';
|
|
553
|
+
readonly group: 'deprecated';
|
|
554
|
+
readonly since: '1.105';
|
|
555
|
+
readonly site: true;
|
|
556
|
+
readonly summary: '`ctx` read off the event of an action\'s `beforeRun`, `onSuccess` and `onError`, `context` since 1.105: every hook event carries one `context`, an action\'s being its own context beside `ip`, `userAgent` and `userId`. The old field works until 1.108. Found in the hooks written in `actions` of kay.config.ts and in the options of an `action()` call imported from `kay`, as `{ ctx }` in the parameters or `event.ctx`. The fix writes `context: ctx` or `context`; a name given a default is reported with no fix, a hook passed by name is not found.';
|
|
557
|
+
readonly wrong: '// kay.config.ts\nexport default { actions: { onSuccess: ({ action, ctx }) => audit(action, ctx.locals) } }';
|
|
558
|
+
readonly right: '// kay.config.ts\nexport default { actions: { onSuccess: ({ action, context: ctx }) => audit(action, ctx.locals) } }';
|
|
559
|
+
};
|
|
560
|
+
readonly 'deprecated-pages-options': {
|
|
561
|
+
readonly level: 'warn';
|
|
562
|
+
readonly group: 'deprecated';
|
|
563
|
+
readonly since: '1.105';
|
|
564
|
+
readonly site: true;
|
|
565
|
+
readonly summary: 'The config keys written beside `root` in the options of `pages()` and `testSite()`, `config` since 1.105: `pages({ root, config: { minify: false } })`, the options no longer mirroring the whole config. `root`, `dev`, `prebuilt` and a test site\'s `browser`, `headers`, `use`, `locals`, `outgoing`, `islands`, `styles`, `mcpKey` and `proxyKey` stay (the last two work until 1.108, see `deprecated-secret-keys`). The old form works until 1.108. Found in a call of `pages` from `kay/server` or `testSite` from `kay/test`. The fix moves the keys into `config`; options that spread, hold a computed key or have a `config` already are reported with no fix.';
|
|
566
|
+
readonly wrong: '// src/server.ts\nimport { pages } from \'kay/server\'\n\nexport default pages({ root: import.meta.dir, client: { navigation: false }, minify: false })';
|
|
567
|
+
readonly right: '// src/server.ts\nimport { pages } from \'kay/server\'\n\nexport default pages({ root: import.meta.dir, config: { client: { navigation: false }, minify: false } })';
|
|
568
|
+
};
|
|
62
569
|
};
|
|
63
570
|
export declare const DEPRECATION_MINORS: readonly {
|
|
64
571
|
since: string;
|