@kayjs/kay 1.107.0 → 1.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eslint.js +1875 -3815
- package/editors/zed/extension.toml +2 -2
- package/llms/action-protection.md +1 -1
- package/llms/actions-from-islands.md +5 -5
- package/llms/actions-refused-fields.md +4 -4
- package/llms/api-from-islands.md +6 -6
- package/llms/browser-only.md +2 -2
- package/llms/cdn-caching.md +1 -1
- package/llms/checks.md +1 -1
- package/llms/code-lints.md +1 -2
- package/llms/component-libraries.md +1 -1
- package/llms/component-library-conventions.md +1 -1
- package/llms/components.md +4 -4
- package/llms/deprecated-lints.md +1 -7
- package/llms/effects.md +1 -1
- package/llms/errors.md +2 -2
- package/llms/events.md +1 -1
- package/llms/guards.md +1 -1
- package/llms/head.md +1 -1
- package/llms/hooks.md +2 -2
- package/llms/images.md +1 -1
- package/llms/island-and-form-lints.md +2 -1
- package/llms/island-sources.md +1 -1
- package/llms/islands-state-to-ids.md +2 -2
- package/llms/islands.md +5 -3
- package/llms/lints.md +1 -1
- package/llms/live-values.md +3 -3
- package/llms/local-collections.md +1 -1
- package/llms/locales.md +1 -1
- package/llms/mcp.md +2 -2
- package/llms/metrics.md +1 -1
- package/llms/navigation-from-code.md +6 -6
- package/llms/prerendering.md +1 -0
- package/llms/production.md +2 -2
- package/llms/project-new-and-add.md +1 -1
- package/llms/project.md +4 -4
- package/llms/proxy-and-security.md +1 -1
- package/llms/queues.md +1 -1
- package/llms/rate-limits.md +4 -4
- package/llms/rendering.md +1 -1
- package/llms/server-islands.md +2 -2
- package/llms/server.md +1 -1
- package/llms/stores.md +1 -1
- package/llms/styles-and-assets.md +1 -1
- package/llms/testing-mount.md +49 -0
- package/llms/testing.md +4 -45
- package/llms/upgrading-1-105-config.md +13 -13
- package/llms/upgrading-archive.md +42 -82
- package/llms/upgrading.md +92 -58
- package/llms/whats-new-archive.md +36 -1
- package/llms/whats-new.md +18 -39
- package/llms.txt +6 -7
- package/package.json +6 -10
- package/src/build/client.ts +7 -6
- package/src/build/icon-slots.ts +140 -0
- package/src/build/libraries.ts +24 -2
- package/src/build/plugin.ts +10 -0
- package/src/build/route-sizes.ts +2 -3
- package/src/build/runtime-chunk.ts +2 -2
- package/src/build/source-files.ts +8 -3
- package/src/build/variants.ts +90 -1
- package/src/check/browser-global-reads.ts +2 -2
- package/src/check/config-objects.ts +1 -1
- package/src/check/diagnose.ts +0 -22
- package/src/check/export-homes.ts +1 -1
- package/src/check/guards.ts +3 -3
- package/src/check/index.ts +2 -7
- package/src/check/moved-keys.ts +1 -1
- package/src/check/project.ts +4 -9
- package/src/check/renamed-packages.ts +3 -63
- package/src/check/shadow-types.ts +4 -104
- package/src/commands/check.ts +2 -2
- package/src/commands/env.ts +25 -3
- package/src/compiler/ast.ts +18 -16
- package/src/compiler/browser.ts +2 -14
- package/src/compiler/class-items.ts +16 -0
- package/src/compiler/codegen.ts +8 -8
- package/src/compiler/dead-code.ts +22 -0
- package/src/compiler/deprecated-library.ts +0 -12
- package/src/compiler/deprecated-lints.ts +4 -505
- package/src/compiler/deprecated-ui-props.ts +5 -5
- package/src/compiler/dom-property.ts +23 -0
- package/src/compiler/dom.ts +15 -15
- package/src/compiler/errors.ts +2 -2
- package/src/compiler/fence-checks.ts +2 -121
- package/src/compiler/hand-parts.ts +55 -0
- package/src/compiler/helper-imports.ts +2 -2
- package/src/compiler/image-attributes.ts +1 -3
- package/src/compiler/index.ts +20 -21
- package/src/compiler/island-arguments.ts +8 -95
- package/src/compiler/island-cause.ts +7 -7
- package/src/compiler/island-declaration.ts +2 -8
- package/src/compiler/island-lints.ts +12 -0
- package/src/compiler/island-marker.ts +3 -3
- package/src/compiler/island-problems.ts +25 -0
- package/src/compiler/jsx-class.ts +1 -25
- package/src/compiler/jsx.ts +2 -2
- package/src/compiler/kay-exports.ts +0 -2
- package/src/compiler/link-flags.ts +9 -38
- package/src/compiler/lints.ts +7 -14
- package/src/compiler/markup.ts +23 -26
- package/src/compiler/module-signals.ts +2 -2
- package/src/compiler/names.ts +1 -1
- package/src/compiler/page-settings.ts +11 -0
- package/src/compiler/parser.ts +6 -8
- package/src/compiler/plan.ts +1 -3
- package/src/compiler/rewrite.ts +3 -18
- package/src/compiler/script-server.ts +8 -3
- package/src/compiler/validate.ts +3 -8
- package/src/config-loader.ts +14 -4
- package/src/config-resolve.ts +18 -142
- package/src/config-shape.ts +44 -34
- package/src/config.ts +10 -114
- package/src/dev/preload.ts +4 -1
- package/src/lsp/server.ts +4 -0
- package/src/migrate/markup.ts +4 -1
- package/src/package-names.ts +1 -1
- package/src/runtime/action-call.ts +39 -335
- package/src/runtime/action-encode.ts +26 -0
- package/src/runtime/action-error.ts +3 -11
- package/src/runtime/action-protection.ts +2 -2
- package/src/runtime/action-run.ts +332 -0
- package/src/runtime/action-shared.ts +14 -37
- package/src/runtime/action-stream.ts +0 -1
- package/src/runtime/action.ts +1 -1
- package/src/runtime/call-result.ts +2 -10
- package/src/runtime/checks.ts +11 -11
- package/src/runtime/client.ts +2 -2
- package/src/runtime/core.ts +5 -23
- package/src/runtime/dom.ts +1 -1
- package/src/runtime/html.ts +1 -1
- package/src/runtime/i18n.client.ts +1 -4
- package/src/runtime/i18n.server.ts +1 -4
- package/src/runtime/i18n.ts +3 -3
- package/src/runtime/index.ts +2 -2
- package/src/runtime/island.server.ts +18 -5
- package/src/runtime/live-resource.server.ts +0 -1
- package/src/runtime/live-value.server.ts +2 -2
- package/src/runtime/live-value.shared.ts +7 -20
- package/src/runtime/live.ts +1 -12
- package/src/runtime/local-types.ts +1 -11
- package/src/runtime/local.ts +4 -14
- package/src/runtime/navigate-api.ts +2 -5
- package/src/runtime/navigation-state.ts +0 -12
- package/src/runtime/page-swap.ts +6 -6
- package/src/runtime/persist.ts +11 -3
- package/src/runtime/persisted.ts +4 -30
- package/src/runtime/presence.ts +6 -7
- package/src/runtime/query-param.ts +20 -12
- package/src/runtime/reactive.ts +3 -1
- package/src/runtime/refuse.ts +3 -17
- package/src/runtime/store-base.ts +4 -6
- package/src/runtime/swap-fetch.ts +1 -1
- package/src/runtime/values.ts +40 -23
- package/src/runtime/with-query.ts +9 -0
- package/src/server/action-hooks.ts +8 -8
- package/src/server/actions.ts +13 -14
- package/src/server/api-modules.ts +2 -3
- package/src/server/app-stages.ts +15 -33
- package/src/server/app.ts +10 -5
- package/src/server/auth-mails.ts +0 -2
- package/src/server/env-state.ts +40 -10
- package/src/server/flash.ts +1 -1
- package/src/server/guard-requirement.ts +4 -4
- package/src/server/image.ts +2 -2
- package/src/server/index.ts +0 -2
- package/src/server/job-context.ts +3 -3
- package/src/server/jobs-page.ts +1 -1
- package/src/server/jobs.ts +5 -9
- package/src/server/kept-exports.ts +0 -2
- package/src/server/kv.ts +11 -14
- package/src/server/library.ts +1 -3
- package/src/server/live.ts +2 -2
- package/src/server/mcp.ts +3 -9
- package/src/server/metrics.ts +2 -4
- package/src/server/page-settings.ts +10 -19
- package/src/server/prerender.ts +19 -2
- package/src/server/protection.ts +15 -18
- package/src/server/queue.ts +3 -6
- package/src/server/rate-limit.ts +0 -3
- package/src/server/render-document.ts +1 -1
- package/src/server/routes.ts +7 -3
- package/src/server/scope.ts +3 -2
- package/src/server/session.ts +5 -6
- package/src/server/setup.ts +1 -1
- package/src/server/signals.ts +17 -7
- package/src/server/signed.ts +1 -3
- package/src/server/source.ts +20 -4
- package/src/server/speculation.ts +1 -1
- package/src/server/storage.ts +3 -8
- package/src/server/validate.ts +1 -1
- package/src/server/vitals.ts +1 -3
- package/src/server/work-scope.ts +2 -4
- package/src/server/work.ts +1 -1
- package/src/server/workflow.ts +1 -1
- package/src/test/index.ts +2 -1
- package/src/test/site-actions.ts +16 -6
- package/src/test/site-keys.ts +10 -15
- package/src/test/site-socket.ts +1 -2
- package/src/test/site-types.ts +0 -8
- package/types/build/client.d.ts +1 -1
- package/types/build/client.d.ts.map +1 -1
- package/types/build/icon-slots.d.ts +7 -0
- package/types/build/icon-slots.d.ts.map +1 -0
- package/types/build/libraries.d.ts +2 -0
- package/types/build/libraries.d.ts.map +1 -1
- package/types/build/plugin.d.ts +1 -0
- package/types/build/plugin.d.ts.map +1 -1
- package/types/build/route-sizes.d.ts.map +1 -1
- package/types/build/source-files.d.ts.map +1 -1
- package/types/build/variants.d.ts.map +1 -1
- package/types/check/diagnose.d.ts.map +1 -1
- package/types/check/index.d.ts +1 -2
- package/types/check/index.d.ts.map +1 -1
- package/types/check/project.d.ts.map +1 -1
- package/types/check/renamed-packages.d.ts +0 -3
- package/types/check/renamed-packages.d.ts.map +1 -1
- package/types/check/shadow-types.d.ts.map +1 -1
- package/types/commands/env.d.ts.map +1 -1
- package/types/compiler/ast.d.ts +1 -2
- package/types/compiler/ast.d.ts.map +1 -1
- package/types/compiler/browser.d.ts.map +1 -1
- package/types/compiler/class-items.d.ts +7 -0
- package/types/compiler/class-items.d.ts.map +1 -0
- package/types/compiler/dead-code.d.ts +9 -0
- package/types/compiler/dead-code.d.ts.map +1 -0
- package/types/compiler/deprecated-library.d.ts.map +1 -1
- package/types/compiler/deprecated-lints.d.ts +0 -560
- package/types/compiler/deprecated-lints.d.ts.map +1 -1
- package/types/compiler/deprecated-ui-props.d.ts +1 -8
- package/types/compiler/deprecated-ui-props.d.ts.map +1 -1
- package/types/compiler/dom-property.d.ts +9 -0
- package/types/compiler/dom-property.d.ts.map +1 -0
- package/types/compiler/dom.d.ts +1 -0
- package/types/compiler/dom.d.ts.map +1 -1
- package/types/compiler/errors.d.ts +2 -2
- package/types/compiler/errors.d.ts.map +1 -1
- package/types/compiler/fence-checks.d.ts +0 -1
- package/types/compiler/fence-checks.d.ts.map +1 -1
- package/types/compiler/hand-parts.d.ts +7 -0
- package/types/compiler/hand-parts.d.ts.map +1 -0
- package/types/compiler/image-attributes.d.ts +0 -1
- package/types/compiler/image-attributes.d.ts.map +1 -1
- package/types/compiler/index.d.ts.map +1 -1
- package/types/compiler/island-arguments.d.ts +2 -11
- package/types/compiler/island-arguments.d.ts.map +1 -1
- package/types/compiler/island-cause.d.ts +1 -1
- package/types/compiler/island-cause.d.ts.map +1 -1
- package/types/compiler/island-declaration.d.ts +1 -3
- package/types/compiler/island-declaration.d.ts.map +1 -1
- package/types/compiler/island-lints.d.ts +10 -0
- package/types/compiler/island-lints.d.ts.map +1 -0
- package/types/compiler/island-problems.d.ts +7 -0
- package/types/compiler/island-problems.d.ts.map +1 -0
- package/types/compiler/jsx-class.d.ts +1 -2
- package/types/compiler/jsx-class.d.ts.map +1 -1
- package/types/compiler/kay-exports.d.ts.map +1 -1
- package/types/compiler/link-flags.d.ts +0 -6
- package/types/compiler/link-flags.d.ts.map +1 -1
- package/types/compiler/lints.d.ts +11 -572
- package/types/compiler/lints.d.ts.map +1 -1
- package/types/compiler/markup.d.ts +1 -1
- package/types/compiler/markup.d.ts.map +1 -1
- package/types/compiler/module-signals.d.ts.map +1 -1
- package/types/compiler/names.d.ts.map +1 -1
- package/types/compiler/page-settings.d.ts +4 -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.map +1 -1
- package/types/compiler/script-server.d.ts.map +1 -1
- package/types/compiler/validate.d.ts.map +1 -1
- package/types/config-loader.d.ts.map +1 -1
- package/types/config-resolve.d.ts.map +1 -1
- package/types/config-shape.d.ts +1 -1
- package/types/config-shape.d.ts.map +1 -1
- package/types/config.d.ts +5 -105
- package/types/config.d.ts.map +1 -1
- package/types/dev/preload.d.ts.map +1 -1
- package/types/lsp/server.d.ts.map +1 -1
- package/types/migrate/markup.d.ts.map +1 -1
- package/types/runtime/action-call.d.ts.map +1 -1
- package/types/runtime/action-encode.d.ts +1 -0
- package/types/runtime/action-encode.d.ts.map +1 -1
- package/types/runtime/action-error.d.ts +1 -2
- package/types/runtime/action-error.d.ts.map +1 -1
- package/types/runtime/action-run.d.ts +23 -0
- package/types/runtime/action-run.d.ts.map +1 -0
- package/types/runtime/action-shared.d.ts +1 -27
- package/types/runtime/action-shared.d.ts.map +1 -1
- package/types/runtime/action-stream.d.ts.map +1 -1
- package/types/runtime/action.d.ts +1 -1
- package/types/runtime/action.d.ts.map +1 -1
- package/types/runtime/call-result.d.ts +0 -10
- package/types/runtime/call-result.d.ts.map +1 -1
- package/types/runtime/checks.d.ts +6 -9
- package/types/runtime/checks.d.ts.map +1 -1
- package/types/runtime/core.d.ts +2 -20
- package/types/runtime/core.d.ts.map +1 -1
- package/types/runtime/dom.d.ts +1 -1
- package/types/runtime/dom.d.ts.map +1 -1
- package/types/runtime/html.d.ts +1 -1
- package/types/runtime/html.d.ts.map +1 -1
- package/types/runtime/i18n.client.d.ts +0 -1
- package/types/runtime/i18n.client.d.ts.map +1 -1
- package/types/runtime/i18n.d.ts +1 -1
- package/types/runtime/i18n.d.ts.map +1 -1
- package/types/runtime/i18n.server.d.ts +0 -1
- package/types/runtime/i18n.server.d.ts.map +1 -1
- package/types/runtime/index.d.ts +2 -2
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/island.server.d.ts +1 -0
- package/types/runtime/island.server.d.ts.map +1 -1
- package/types/runtime/live-resource.server.d.ts.map +1 -1
- package/types/runtime/live-value.shared.d.ts +7 -15
- package/types/runtime/live-value.shared.d.ts.map +1 -1
- package/types/runtime/live.d.ts +0 -11
- package/types/runtime/live.d.ts.map +1 -1
- package/types/runtime/local-types.d.ts +0 -14
- package/types/runtime/local-types.d.ts.map +1 -1
- package/types/runtime/navigate-api.d.ts +0 -4
- package/types/runtime/navigate-api.d.ts.map +1 -1
- package/types/runtime/navigation-state.d.ts +0 -4
- 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 +1 -0
- package/types/runtime/persist.d.ts.map +1 -1
- package/types/runtime/persisted.d.ts +0 -15
- package/types/runtime/persisted.d.ts.map +1 -1
- package/types/runtime/presence.d.ts +0 -2
- package/types/runtime/presence.d.ts.map +1 -1
- package/types/runtime/query-param.d.ts.map +1 -1
- package/types/runtime/reactive.d.ts +2 -1
- package/types/runtime/reactive.d.ts.map +1 -1
- package/types/runtime/refuse.d.ts +0 -7
- package/types/runtime/refuse.d.ts.map +1 -1
- package/types/runtime/store-base.d.ts +1 -2
- package/types/runtime/store-base.d.ts.map +1 -1
- package/types/runtime/values.d.ts +2 -1
- package/types/runtime/values.d.ts.map +1 -1
- package/types/runtime/with-query.d.ts +2 -0
- package/types/runtime/with-query.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/actions.d.ts.map +1 -1
- package/types/server/api-modules.d.ts +0 -1
- package/types/server/api-modules.d.ts.map +1 -1
- package/types/server/app-stages.d.ts +5 -13
- package/types/server/app-stages.d.ts.map +1 -1
- package/types/server/app.d.ts +3 -8
- package/types/server/app.d.ts.map +1 -1
- package/types/server/auth-mails.d.ts +0 -5
- package/types/server/auth-mails.d.ts.map +1 -1
- package/types/server/env-state.d.ts +1 -0
- package/types/server/env-state.d.ts.map +1 -1
- package/types/server/guard-requirement.d.ts +0 -1
- package/types/server/guard-requirement.d.ts.map +1 -1
- package/types/server/image.d.ts +0 -1
- package/types/server/image.d.ts.map +1 -1
- package/types/server/index.d.ts +0 -2
- package/types/server/index.d.ts.map +1 -1
- package/types/server/job-context.d.ts +1 -1
- package/types/server/job-context.d.ts.map +1 -1
- package/types/server/jobs.d.ts +0 -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 +4 -4
- package/types/server/kv.d.ts.map +1 -1
- package/types/server/library.d.ts +1 -3
- package/types/server/library.d.ts.map +1 -1
- package/types/server/mcp.d.ts +0 -1
- package/types/server/mcp.d.ts.map +1 -1
- package/types/server/metrics.d.ts +0 -5
- package/types/server/metrics.d.ts.map +1 -1
- package/types/server/page-settings.d.ts +3 -3
- package/types/server/page-settings.d.ts.map +1 -1
- package/types/server/prerender.d.ts.map +1 -1
- package/types/server/protection.d.ts +6 -6
- package/types/server/protection.d.ts.map +1 -1
- package/types/server/queue.d.ts +1 -3
- package/types/server/queue.d.ts.map +1 -1
- package/types/server/rate-limit.d.ts +0 -2
- package/types/server/rate-limit.d.ts.map +1 -1
- package/types/server/routes.d.ts +1 -1
- package/types/server/routes.d.ts.map +1 -1
- package/types/server/scope.d.ts.map +1 -1
- package/types/server/session.d.ts +1 -1
- package/types/server/session.d.ts.map +1 -1
- package/types/server/signals.d.ts.map +1 -1
- package/types/server/signed.d.ts +0 -2
- package/types/server/signed.d.ts.map +1 -1
- package/types/server/source.d.ts +1 -1
- package/types/server/source.d.ts.map +1 -1
- package/types/server/storage.d.ts +0 -4
- package/types/server/storage.d.ts.map +1 -1
- package/types/server/vitals.d.ts +0 -1
- package/types/server/vitals.d.ts.map +1 -1
- package/types/server/work-scope.d.ts +0 -2
- package/types/server/work-scope.d.ts.map +1 -1
- package/types/server/workflow.d.ts +1 -1
- package/types/server/workflow.d.ts.map +1 -1
- package/types/test/index.d.ts.map +1 -1
- package/types/test/site-actions.d.ts +1 -1
- package/types/test/site-actions.d.ts.map +1 -1
- package/types/test/site-keys.d.ts +1 -1
- package/types/test/site-keys.d.ts.map +1 -1
- package/types/test/site-socket.d.ts +1 -1
- package/types/test/site-socket.d.ts.map +1 -1
- package/types/test/site-types.d.ts +0 -8
- package/types/test/site-types.d.ts.map +1 -1
- package/llms/deprecated-lints-1-105-libraries.md +0 -32
- package/llms/deprecated-lints-1-105.md +0 -58
- package/src/check/action-readers.ts +0 -115
- package/src/check/action-type.ts +0 -44
- package/src/check/ai-language.ts +0 -56
- package/src/check/app-hooks.ts +0 -90
- package/src/check/auth-methods.ts +0 -85
- package/src/check/auth-rate-limits.ts +0 -99
- package/src/check/call-result.ts +0 -242
- package/src/check/client-keys.ts +0 -10
- package/src/check/cms-options.ts +0 -81
- package/src/check/config-groups.ts +0 -22
- package/src/check/config-switches.ts +0 -38
- package/src/check/context-import.ts +0 -51
- package/src/check/env-files.ts +0 -31
- package/src/check/format-duration.ts +0 -75
- package/src/check/guard-options.ts +0 -58
- package/src/check/handler-events.ts +0 -149
- package/src/check/hook-context.ts +0 -94
- package/src/check/hook-names.ts +0 -104
- package/src/check/i18n-keys.ts +0 -50
- package/src/check/images-keys.ts +0 -54
- package/src/check/job-shapes.ts +0 -273
- package/src/check/link-flag-tests.ts +0 -130
- package/src/check/live-api.ts +0 -137
- package/src/check/mail-api.ts +0 -67
- package/src/check/one-state-api.ts +0 -357
- package/src/check/pages-options.ts +0 -35
- package/src/check/rate-enforce.ts +0 -53
- package/src/check/refusal-calls.ts +0 -185
- package/src/check/retired-lints.ts +0 -49
- package/src/check/route-keys.ts +0 -166
- package/src/check/secret-keys.ts +0 -83
- package/src/check/socket-frames.ts +0 -102
- package/src/check/source-readers.ts +0 -257
- package/src/check/store-ms.ts +0 -72
- package/src/check/store-names.ts +0 -88
- package/src/check/test-helpers.ts +0 -98
- package/src/check/ttl-names.ts +0 -142
- package/src/compiler/deprecated-ai-labels.ts +0 -97
- package/src/compiler/deprecated-ai-links.ts +0 -63
- package/src/compiler/deprecated-allow.ts +0 -50
- package/src/compiler/deprecated-auth-lints.ts +0 -14
- package/src/compiler/deprecated-auth-signed.ts +0 -29
- package/src/compiler/deprecated-children.ts +0 -66
- package/src/compiler/deprecated-image.ts +0 -116
- package/src/compiler/deprecated-island.ts +0 -155
- package/src/compiler/deprecated-lints-1-105.ts +0 -41
- package/src/compiler/deprecated-page.ts +0 -125
- package/src/compiler/deprecated-parts.ts +0 -22
- package/src/compiler/deprecated-typed-lints.ts +0 -23
- package/src/compiler/deprecated-ui-callbacks.ts +0 -66
- package/src/compiler/deprecated-ui-input.ts +0 -97
- package/src/compiler/deprecated-ui-items.ts +0 -47
- package/src/compiler/old-parts.ts +0 -84
- package/src/runtime/mount.compat.ts +0 -8
- package/src/server/moved-exports.ts +0 -17
- package/types/check/action-readers.d.ts +0 -3
- package/types/check/action-readers.d.ts.map +0 -1
- package/types/check/action-type.d.ts +0 -3
- package/types/check/action-type.d.ts.map +0 -1
- package/types/check/ai-language.d.ts +0 -3
- package/types/check/ai-language.d.ts.map +0 -1
- package/types/check/app-hooks.d.ts +0 -3
- package/types/check/app-hooks.d.ts.map +0 -1
- package/types/check/auth-methods.d.ts +0 -3
- package/types/check/auth-methods.d.ts.map +0 -1
- package/types/check/auth-rate-limits.d.ts +0 -3
- package/types/check/auth-rate-limits.d.ts.map +0 -1
- package/types/check/call-result.d.ts +0 -7
- package/types/check/call-result.d.ts.map +0 -1
- package/types/check/client-keys.d.ts +0 -3
- package/types/check/client-keys.d.ts.map +0 -1
- package/types/check/cms-options.d.ts +0 -3
- package/types/check/cms-options.d.ts.map +0 -1
- package/types/check/config-groups.d.ts +0 -3
- package/types/check/config-groups.d.ts.map +0 -1
- package/types/check/config-switches.d.ts +0 -3
- package/types/check/config-switches.d.ts.map +0 -1
- package/types/check/context-import.d.ts +0 -3
- package/types/check/context-import.d.ts.map +0 -1
- package/types/check/env-files.d.ts +0 -3
- package/types/check/env-files.d.ts.map +0 -1
- package/types/check/format-duration.d.ts +0 -5
- package/types/check/format-duration.d.ts.map +0 -1
- package/types/check/guard-options.d.ts +0 -3
- package/types/check/guard-options.d.ts.map +0 -1
- package/types/check/handler-events.d.ts +0 -9
- package/types/check/handler-events.d.ts.map +0 -1
- package/types/check/hook-context.d.ts +0 -3
- package/types/check/hook-context.d.ts.map +0 -1
- package/types/check/hook-names.d.ts +0 -3
- package/types/check/hook-names.d.ts.map +0 -1
- package/types/check/i18n-keys.d.ts +0 -3
- package/types/check/i18n-keys.d.ts.map +0 -1
- package/types/check/images-keys.d.ts +0 -3
- package/types/check/images-keys.d.ts.map +0 -1
- package/types/check/job-shapes.d.ts +0 -6
- package/types/check/job-shapes.d.ts.map +0 -1
- package/types/check/link-flag-tests.d.ts +0 -4
- package/types/check/link-flag-tests.d.ts.map +0 -1
- package/types/check/live-api.d.ts +0 -3
- package/types/check/live-api.d.ts.map +0 -1
- package/types/check/mail-api.d.ts +0 -3
- package/types/check/mail-api.d.ts.map +0 -1
- package/types/check/one-state-api.d.ts +0 -9
- package/types/check/one-state-api.d.ts.map +0 -1
- package/types/check/pages-options.d.ts +0 -3
- package/types/check/pages-options.d.ts.map +0 -1
- package/types/check/rate-enforce.d.ts +0 -3
- package/types/check/rate-enforce.d.ts.map +0 -1
- package/types/check/refusal-calls.d.ts +0 -3
- package/types/check/refusal-calls.d.ts.map +0 -1
- package/types/check/retired-lints.d.ts +0 -3
- package/types/check/retired-lints.d.ts.map +0 -1
- package/types/check/route-keys.d.ts +0 -3
- package/types/check/route-keys.d.ts.map +0 -1
- package/types/check/secret-keys.d.ts +0 -3
- package/types/check/secret-keys.d.ts.map +0 -1
- package/types/check/socket-frames.d.ts +0 -3
- package/types/check/socket-frames.d.ts.map +0 -1
- package/types/check/source-readers.d.ts +0 -3
- package/types/check/source-readers.d.ts.map +0 -1
- package/types/check/store-ms.d.ts +0 -3
- package/types/check/store-ms.d.ts.map +0 -1
- package/types/check/store-names.d.ts +0 -3
- package/types/check/store-names.d.ts.map +0 -1
- package/types/check/test-helpers.d.ts +0 -3
- package/types/check/test-helpers.d.ts.map +0 -1
- package/types/check/ttl-names.d.ts +0 -3
- package/types/check/ttl-names.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-labels.d.ts +0 -5
- package/types/compiler/deprecated-ai-labels.d.ts.map +0 -1
- package/types/compiler/deprecated-ai-links.d.ts +0 -5
- package/types/compiler/deprecated-ai-links.d.ts.map +0 -1
- package/types/compiler/deprecated-allow.d.ts +0 -5
- package/types/compiler/deprecated-allow.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-lints.d.ts +0 -12
- package/types/compiler/deprecated-auth-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-auth-signed.d.ts +0 -5
- package/types/compiler/deprecated-auth-signed.d.ts.map +0 -1
- package/types/compiler/deprecated-children.d.ts +0 -4
- package/types/compiler/deprecated-children.d.ts.map +0 -1
- package/types/compiler/deprecated-image.d.ts +0 -5
- package/types/compiler/deprecated-image.d.ts.map +0 -1
- package/types/compiler/deprecated-island.d.ts +0 -9
- package/types/compiler/deprecated-island.d.ts.map +0 -1
- package/types/compiler/deprecated-lints-1-105.d.ts +0 -39
- package/types/compiler/deprecated-lints-1-105.d.ts.map +0 -1
- package/types/compiler/deprecated-page.d.ts +0 -4
- package/types/compiler/deprecated-page.d.ts.map +0 -1
- package/types/compiler/deprecated-parts.d.ts +0 -3
- package/types/compiler/deprecated-parts.d.ts.map +0 -1
- package/types/compiler/deprecated-typed-lints.d.ts +0 -21
- package/types/compiler/deprecated-typed-lints.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-callbacks.d.ts +0 -5
- package/types/compiler/deprecated-ui-callbacks.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-input.d.ts +0 -5
- package/types/compiler/deprecated-ui-input.d.ts.map +0 -1
- package/types/compiler/deprecated-ui-items.d.ts +0 -5
- package/types/compiler/deprecated-ui-items.d.ts.map +0 -1
- package/types/compiler/old-parts.d.ts +0 -9
- package/types/compiler/old-parts.d.ts.map +0 -1
- package/types/runtime/mount.compat.d.ts +0 -7
- package/types/runtime/mount.compat.d.ts.map +0 -1
- package/types/server/moved-exports.d.ts +0 -12
- package/types/server/moved-exports.d.ts.map +0 -1
package/src/config.ts
CHANGED
|
@@ -65,12 +65,10 @@ export interface KayConfig extends AppHooks {
|
|
|
65
65
|
entry?: string | undefined
|
|
66
66
|
// The security headers every response carries, or `false` for none; a header the app sets itself wins.
|
|
67
67
|
security?: SecurityConfig | boolean | undefined
|
|
68
|
-
// The proxies in front of the server, `true` for one and
|
|
69
|
-
proxy?: ProxyConfig |
|
|
68
|
+
// The proxies in front of the server, `true` for one and `{ hops: 2 }` for that many, which the client's address that rate limits count is read through. Left out in production, one proxy is in front for a request from a private address that carries `X-Forwarded-For`; `false` says none is, and the address the server was reached from is the client. Outside production, left out or `false`, the address the server was reached from is the client.
|
|
69
|
+
proxy?: ProxyConfig | boolean | undefined
|
|
70
70
|
// What a route no guard covers comes to. Left out, a site with a guard of its own answers 403 on each page, endpoint and API module no `_guard.ts` covers unless it sets `guards: false`, in its `page` or its `api()` options, and a site with no guard stays open. `default: 'closed'` asks it of every site and of the actions of layouts and `_actions.kay` files too, `default: 'open'` turns it off; `kay check` reports each such route. A library's routes keep the guards it gives them, and a feature that lists or changes private data (`jobs`, `vitals()`, `images.resolve`, `cms()`) is closed with no `guards` whatever the default, opened only by its own `guards: false`.
|
|
71
71
|
guards?: GuardsConfig | undefined
|
|
72
|
-
// Replaced by `guards: { default }` in 1.105: `true` is `'closed'` and `false` is `'open'`. Works until 1.108.
|
|
73
|
-
requireGuards?: boolean | undefined
|
|
74
72
|
// Lets other sites' pages call every API module's routes from the browser, as `api({ cors })` does for one, an endpoint file setting its own in `page.cors`: `cors: { origins: ['https://app.example.com'], credentials: true }`. A module setting its own `cors` keeps it, and `api({ cors: false })` keeps a module to its own site.
|
|
75
73
|
cors?: CorsOptions | undefined
|
|
76
74
|
// Serves an OpenAPI 3.1 document of the API modules' routes at `/api/openapi.json`, or at `endpoints.openapi`, read from their schemas, behind the API directory's own `_guard.ts`; `{ reference: true }` adds a page listing them at `/api/reference`, or at `reference: { path }`, `{ dev: true }` keeps both to `kay dev`.
|
|
@@ -112,8 +110,6 @@ export interface KayConfig extends AppHooks {
|
|
|
112
110
|
store?: AppStore | undefined
|
|
113
111
|
// The files `kay env` and `kay check` compare the declared variables with: a compose file or several, and the example env file (`{ compose: 'compose.prod.yaml', example: '.env.example' }`). Each variable production needs must be set by a compose service and listed in the example, and each one the example lists must be declared. `false` turns the comparison off, the default one against the root compose files and `.env.example` included.
|
|
114
112
|
envFiles?: { compose?: string | string[] | undefined, example?: string | undefined } | boolean | undefined
|
|
115
|
-
/** @deprecated Written `envFiles`; `deprecated-env-files` rewrites it. Removed in 1.108. */
|
|
116
|
-
env?: { compose?: string | string[] | undefined, example?: string | undefined } | boolean | undefined
|
|
117
113
|
// The app's own checks, which `kay check` runs with its own: each gets `{ root, routes, report }` and reports problems with `report({ level, message, file, line })`, which join kay's in every format and count toward the exit code. A check that throws, or does not finish within 30 seconds, is reported as an error and the others still run.
|
|
118
114
|
checks?: ProjectCheck[] | undefined
|
|
119
115
|
// What libraries add to the app, each listed once: `extensions: [auth()]`.
|
|
@@ -310,11 +306,11 @@ export interface EndpointsConfig {
|
|
|
310
306
|
api?: string | undefined
|
|
311
307
|
// Where the OpenAPI document is served, `/api/openapi.json` under the API prefix by default; its reference page is set in `openapi.reference`.
|
|
312
308
|
openapi?: string | undefined
|
|
313
|
-
// Where the MCP endpoint is served, `/_kay/mcp` by default.
|
|
309
|
+
// Where the MCP endpoint is served, `/_kay/mcp` by default.
|
|
314
310
|
mcp?: string | undefined
|
|
315
311
|
// Where the health check is served, `/_kay/health` by default.
|
|
316
312
|
health?: string | undefined
|
|
317
|
-
// Where the metrics are served, `/_kay/metrics` by default.
|
|
313
|
+
// Where the metrics are served, `/_kay/metrics` by default.
|
|
318
314
|
metrics?: string | undefined
|
|
319
315
|
// Where the page of the queues is served, `/_kay/jobs` by default.
|
|
320
316
|
jobs?: string | undefined
|
|
@@ -323,8 +319,6 @@ export interface EndpointsConfig {
|
|
|
323
319
|
export interface JobsConfig {
|
|
324
320
|
// Who may open the page: a guard, a list of them run in order, or `{ load }` returning one. Left out the page answers 403, as every feature that lists or changes private data does; `false` opens it to everyone.
|
|
325
321
|
guards?: GuardOption | false | undefined
|
|
326
|
-
// Replaced by `guards` in 1.105, and works until 1.108.
|
|
327
|
-
guard?: GuardOption | false | undefined
|
|
328
322
|
}
|
|
329
323
|
|
|
330
324
|
export interface MetricsConfig {
|
|
@@ -518,8 +512,6 @@ export interface ImagesConfig {
|
|
|
518
512
|
resolve?: ((src: string, ctx: GuardContext) => string | undefined | Promise<string | undefined>) | undefined
|
|
519
513
|
// Run before `resolve`, as a page guard: `guards: ctx => { if (!ctx.locals.session.get('user')) ctx.deny(401) }` resizes those images for signed-in users alone. A list or `{ load }` is taken too. Left out, a `resolve` answers 403 for every image, since it reads files the app chooses; `false` opens them to everyone.
|
|
520
514
|
guards?: GuardOption | false | undefined
|
|
521
|
-
// Replaced by `guards` in 1.105, and works until 1.108.
|
|
522
|
-
guard?: GuardOption | false | undefined
|
|
523
515
|
}
|
|
524
516
|
|
|
525
517
|
export interface RemoteImages {
|
|
@@ -547,24 +539,6 @@ export interface ImageLimits {
|
|
|
547
539
|
queue?: number | false | undefined
|
|
548
540
|
}
|
|
549
541
|
|
|
550
|
-
// `images` as an app written it before 1.105 may still: the flat keys, each of which works until 1.108.
|
|
551
|
-
export interface DeprecatedImages {
|
|
552
|
-
/** @deprecated Written `remote: { maxSize }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
553
|
-
remoteMaxSize?: ByteSize | undefined
|
|
554
|
-
/** @deprecated Written `remote: { timeout }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
555
|
-
remoteTimeout?: Duration | undefined
|
|
556
|
-
/** @deprecated Written `limits: { variants }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
557
|
-
maxVariants?: number | false | undefined
|
|
558
|
-
/** @deprecated Written `limits: { queue }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
559
|
-
queue?: number | false | undefined
|
|
560
|
-
/** @deprecated Written `formats: { quality }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
561
|
-
quality?: number | undefined
|
|
562
|
-
/** @deprecated Written `formats: { webp }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
563
|
-
webp?: { quality?: number | undefined } | undefined
|
|
564
|
-
/** @deprecated Written `formats: { avif }`; `deprecated-images-keys` rewrites it. Removed in 1.108. */
|
|
565
|
-
avif?: boolean | { quality?: number } | undefined
|
|
566
|
-
}
|
|
567
|
-
|
|
568
542
|
export interface CardConfig {
|
|
569
543
|
// The face the title is drawn in, among `fonts`: the first family listed, at the weight nearest 700 it has, by default. A variable face draws at its default weight.
|
|
570
544
|
font?: { family: string, weight?: number } | undefined
|
|
@@ -637,7 +611,7 @@ export interface KayExtension<Server extends PluginInput = AnyElysia> {
|
|
|
637
611
|
appFiles?: Record<string, string> | undefined
|
|
638
612
|
// The server plugin named by the module that exports it, `{ path: './src/auth', export: 'auth' }` for `export const auth` (`default` by default): imported only as `pages()` builds the app, and baked into an executable `kay build --compile` makes, which a path built at run time inside a library could not be. The export is the plugin, a function building it, or an object carrying it as `plugin`, as a library's `authCore` result does. `kay check` types the locals off the module itself, and off the extension's `Server` argument when it has one; used beside `server`, the module wins. A path is relative to the project root. `prepare` runs with the export before the plugin is taken from it, for a library to hand the app's module what the extension was given; a throw stops the server.
|
|
639
613
|
serverModule?: { path: string, export?: string | undefined, prepare?: ((exported: unknown) => void | Promise<void>) | undefined } | undefined
|
|
640
|
-
// Config laid under the app's `kay.config.ts`: objects merged key by key, arrays joined with the extension's items first, any other value the app sets winning. Bun plugins the library's files need go in its `plugins`. It takes what `kay.config.ts` does
|
|
614
|
+
// Config laid under the app's `kay.config.ts`: objects merged key by key, arrays joined with the extension's items first, any other value the app sets winning. Bun plugins the library's files need go in its `plugins`. It takes what `kay.config.ts` does.
|
|
641
615
|
config?: Omit<ConfigInput, 'extensions'> | undefined
|
|
642
616
|
// A module whose default export is `defineUi({ ... })`, written as `src/ui.ts` is (string and object literals only), absolute or relative to the project root: the parts and variants it sets for components, the app's own or a library's, reach every app listing the extension, under the app's own `src/ui.ts`. A part or a variant value the app sets replaces the extension's, and a later extension's replaces an earlier one's. Names and relative specifiers resolve from the app's `src/`.
|
|
643
617
|
ui?: string | undefined
|
|
@@ -691,98 +665,20 @@ export type ConfigCors = Omit<CorsOptions, 'origins' | 'credentials'> & ({ origi
|
|
|
691
665
|
|
|
692
666
|
type Over<Bag, Given> = Omit<Bag, keyof Given> & Given
|
|
693
667
|
|
|
694
|
-
// What `kay.config.ts` may write: `KayConfig` with each list that may come from a CMS or a database loadable
|
|
695
|
-
export interface ConfigInput extends Omit<KayConfig, 'cors' | 'security' | 'proxy' | '
|
|
696
|
-
/** @deprecated Written `onListen`; `deprecated-app-hooks` rewrites it. Removed in 1.108. */
|
|
697
|
-
onStart?: AppHooks['onListen']
|
|
698
|
-
/** @deprecated Written `client.offline`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
699
|
-
offline?: ClientConfig['offline']
|
|
700
|
-
/** @deprecated Written `client.search`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
701
|
-
search?: ClientConfig['search']
|
|
702
|
-
/** @deprecated Written `client.links`; `deprecated-client-keys` rewrites it. Removed in 1.108. */
|
|
703
|
-
links?: ClientConfig['links']
|
|
704
|
-
/** @deprecated Written `assets.images`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
705
|
-
images?: ImagesInput | undefined
|
|
706
|
-
/** @deprecated Written `assets.fonts`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
707
|
-
fonts?: AssetsConfig['fonts']
|
|
708
|
-
/** @deprecated Written `assets.favicon`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
709
|
-
favicon?: AssetsConfig['favicon']
|
|
710
|
-
/** @deprecated Written `assets.manifest`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
711
|
-
manifest?: AssetsConfig['manifest']
|
|
712
|
-
/** @deprecated Written `assets.publicCache`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
713
|
-
publicCache?: AssetsConfig['publicCache']
|
|
714
|
-
/** @deprecated Written `ops.observe`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
715
|
-
observe?: ObserveInput | undefined
|
|
716
|
-
/** @deprecated Written `ops.health`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
717
|
-
health?: OpsInput['health']
|
|
718
|
-
/** @deprecated Written `ops.metrics`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
719
|
-
metrics?: OpsInput['metrics']
|
|
720
|
-
/** @deprecated Written `ops.jobs`; `deprecated-config-groups` rewrites it. Removed in 1.108. */
|
|
721
|
-
jobs?: OpsInput['jobs']
|
|
668
|
+
// What `kay.config.ts` may write: `KayConfig` with each list that may come from a CMS or a database loadable. Kay turns it into a `KayConfig` as it loads.
|
|
669
|
+
export interface ConfigInput extends Omit<KayConfig, 'cors' | 'security' | 'proxy' | 'robots' | 'redirects' | 'i18n' | 'assets'> {
|
|
722
670
|
assets?: Over<AssetsConfig, { images?: ImagesInput | undefined }> | undefined
|
|
723
|
-
ops?: OpsInput | undefined
|
|
724
|
-
serve?: (ServeConfig & DeprecatedServe) | undefined
|
|
725
|
-
openapi?: boolean | (OpenApiConfig & DeprecatedOpenApi) | undefined
|
|
726
671
|
cors?: ConfigCors | undefined
|
|
727
672
|
security?: boolean | Over<SecurityConfig, { hosts?: Loadable<string[]> | boolean | undefined }> | undefined
|
|
728
|
-
proxy?: boolean |
|
|
729
|
-
mcp?: boolean | (McpConfig & DeprecatedMcp) | undefined
|
|
673
|
+
proxy?: boolean | Over<ProxyConfig, { trusted?: Loadable<string[]> | undefined }> | undefined
|
|
730
674
|
robots?: boolean | Over<RobotsConfig, { disallow?: Loadable<string[]> | undefined, allow?: Loadable<string[]> | undefined }> | undefined
|
|
731
675
|
redirects?: Loadable<Redirects> | undefined
|
|
732
676
|
i18n?: I18nInput | undefined
|
|
733
677
|
}
|
|
734
678
|
|
|
735
|
-
|
|
736
|
-
export interface DeprecatedServe {
|
|
737
|
-
/** @deprecated Written `endpoints.api`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
738
|
-
apiPrefix?: string | undefined
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
// `openapi` as an app written it before 1.105 may still: `path` is `endpoints.openapi` and `referencePath` is `reference: { path }`, which work until 1.108.
|
|
742
|
-
export interface DeprecatedOpenApi {
|
|
743
|
-
/** @deprecated Written `endpoints.openapi`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
744
|
-
path?: string | undefined
|
|
745
|
-
/** @deprecated Written `reference: { path }`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
746
|
-
referencePath?: string | undefined
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// The `path` the bags of `ops` and `mcp` had before 1.105, which is a key of `endpoints` since and works until 1.108.
|
|
750
|
-
export interface DeprecatedPath {
|
|
751
|
-
/** @deprecated Written `endpoints` and the feature's name; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
752
|
-
path?: string | undefined
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
export type OpsInput = Over<OpsConfig, { observe?: ObserveInput | undefined, health?: boolean | (HealthConfig & DeprecatedPath) | undefined, metrics?: boolean | (MetricsConfig & DeprecatedPath) | undefined, jobs?: (JobsConfig & DeprecatedPath) | undefined }>
|
|
756
|
-
|
|
757
|
-
// `mcp` as an app written it before 1.105 may still: `key` is `token`, which works until 1.108.
|
|
758
|
-
export interface DeprecatedMcp {
|
|
759
|
-
/** @deprecated Written `endpoints.mcp`; `deprecated-route-keys` rewrites it. Removed in 1.108. */
|
|
760
|
-
path?: string | undefined
|
|
761
|
-
/** @deprecated Written `token`; `deprecated-secret-keys` rewrites it. Removed in 1.108. */
|
|
762
|
-
key?: boolean | string | { file: string } | undefined
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
// `i18n` as an app written it before 1.105 may still: `defaultLocale`, `prefixDefault` and `domains`, each of which works until 1.108.
|
|
766
|
-
export interface DeprecatedI18n {
|
|
767
|
-
/** @deprecated Written `default`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
768
|
-
defaultLocale?: string | undefined
|
|
769
|
-
/** @deprecated Written `mode: 'always'`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
770
|
-
prefixDefault?: boolean | undefined
|
|
771
|
-
/** @deprecated Written `mode: { domains }`; `deprecated-i18n-keys` rewrites it. Removed in 1.108. */
|
|
772
|
-
domains?: Record<string, string> | undefined
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
export type I18nInput = Over<I18nConfig, { default?: string | undefined, paths?: Loadable<Record<string, Record<string, string>>> | undefined }> & DeprecatedI18n
|
|
776
|
-
|
|
777
|
-
// `observe` as an app written it before 1.105 may still: `onError` here, `log` as `'json'` or a function.
|
|
778
|
-
export type ObserveInput = Omit<ObserveConfig, 'log'> & {
|
|
779
|
-
// `'json'` and a function still work until 1.108, written `{ format: 'json' }` and `{ sink }` since 1.105; `deprecated-app-hooks` rewrites them.
|
|
780
|
-
log?: ObserveConfig['log'] | 'json' | ((entry: LogEntry) => void) | undefined
|
|
781
|
-
/** @deprecated Written `onError` beside `observe`; `deprecated-app-hooks` rewrites it. Removed in 1.108. */
|
|
782
|
-
onError?: AppHooks['onError']
|
|
783
|
-
}
|
|
679
|
+
export type I18nInput = Over<I18nConfig, { default?: string | undefined, paths?: Loadable<Record<string, Record<string, string>>> | undefined }>
|
|
784
680
|
|
|
785
|
-
export type ImagesInput = Over<ImagesConfig, { remote?: Loadable<string[]> | Over<RemoteImages, { hosts?: Loadable<string[]> | undefined }> | undefined }>
|
|
681
|
+
export type ImagesInput = Over<ImagesConfig, { remote?: Loadable<string[]> | Over<RemoteImages, { hosts?: Loadable<string[]> | undefined }> | undefined }>
|
|
786
682
|
|
|
787
683
|
export const CONFIG_FILE = 'kay.config.ts'
|
|
788
684
|
// The app's own request values for templates, listed as an extension's `context` while the file exists.
|
package/src/dev/preload.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { projectPaths } from '../project'
|
|
|
9
9
|
import { forgetIdleApps, listenIdleApps } from '../server/auto-listen'
|
|
10
10
|
import { forgetModules } from '../server/bundle'
|
|
11
11
|
import { announceReload, stopRunning } from '../server/dev'
|
|
12
|
+
import { forgetEnvCalls } from '../server/env-state'
|
|
12
13
|
import { registerEarlyLoader } from '../server/loader'
|
|
13
14
|
import { disposeOwned, onReload } from '../server/reload'
|
|
14
15
|
import { loopbackTaken } from './loopback'
|
|
@@ -394,8 +395,10 @@ async function reloaded({ code, startedAt, changed, files }: ReloadRequest): Pro
|
|
|
394
395
|
|
|
395
396
|
forgetModules()
|
|
396
397
|
|
|
397
|
-
for (const file of plan.evict)
|
|
398
|
+
for (const file of plan.evict) {
|
|
398
399
|
delete require.cache[file]
|
|
400
|
+
forgetEnvCalls(file)
|
|
401
|
+
}
|
|
399
402
|
|
|
400
403
|
run++
|
|
401
404
|
calls = 0
|
package/src/lsp/server.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { CONFIG_FILE } from '../config'
|
|
|
22
22
|
import { loadConfigWithin } from '../config-loader'
|
|
23
23
|
import { tailwindSorter } from '../format/tailwind'
|
|
24
24
|
import { projectPaths, projectRootOf } from '../project'
|
|
25
|
+
import { forgetEnvCalls } from '../server/env-state'
|
|
25
26
|
import { routeMounts } from '../server/routes'
|
|
26
27
|
import { codeActions } from './code-actions'
|
|
27
28
|
import { completion, resolveCompletion } from './completions'
|
|
@@ -446,6 +447,9 @@ export class KayLanguageServer implements LspHost {
|
|
|
446
447
|
delete require.cache[path]
|
|
447
448
|
}
|
|
448
449
|
|
|
450
|
+
// Whether or not each module reached the cache: one that threw on load declared before it threw.
|
|
451
|
+
forgetEnvCalls(root)
|
|
452
|
+
|
|
449
453
|
const config = await projectConfig(project.root)
|
|
450
454
|
|
|
451
455
|
project.options = await withoutMissingCaptcha(project.root, { ...configCheckOptions(config), dirs: { ...config.dirs, routes: (project.root === this.root ? this.routesSetting : undefined) ?? config.dirs?.routes } })
|
package/src/migrate/markup.ts
CHANGED
|
@@ -61,6 +61,9 @@ function hydrateOf(name: string, attribute: { type: string, value?: unknown } |
|
|
|
61
61
|
return name in HYDRATE ? { value: HYDRATE[name] } : undefined
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// `client:only` is `render="client"`, the other directives a `hydrate` value.
|
|
65
|
+
const hydrateAttribute = (hydrate: string): string => hydrate === 'client' ? 'render="client"' : `hydrate="${hydrate}"`
|
|
66
|
+
|
|
64
67
|
export interface RawBlock {
|
|
65
68
|
tag: string
|
|
66
69
|
attributes: string
|
|
@@ -611,7 +614,7 @@ class Translator {
|
|
|
611
614
|
}
|
|
612
615
|
|
|
613
616
|
if (hydrate !== undefined)
|
|
614
|
-
attributes.push(
|
|
617
|
+
attributes.push(hydrateAttribute(hydrate))
|
|
615
618
|
|
|
616
619
|
// Several static classes left out of the shorthand join in one attribute.
|
|
617
620
|
const classes = attributes.filter(attribute => attribute.startsWith('class="'))
|
package/src/package-names.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// kay and its libraries were published under the `@kaynooo` scope up to 1.103 and are under `@kayjs` since 1.104: the new name of each, which `kay upgrade`
|
|
1
|
+
// kay and its libraries were published under the `@kaynooo` scope up to 1.103 and are under `@kayjs` since 1.104: the new name of each, which `kay upgrade` moves an app to.
|
|
2
2
|
export const RENAMED_PACKAGES: Readonly<Record<string, string>> = {
|
|
3
3
|
'@kaynooo/kayjs': '@kayjs/kay',
|
|
4
4
|
'@kaynooo/kayjs-ai': '@kayjs/ai',
|