veryfront 0.1.1047 → 0.1.1049
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/esm/cli/auth/login.d.ts +5 -5
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +28 -28
- package/esm/cli/auth/provider-store.d.ts +5 -4
- package/esm/cli/auth/provider-store.d.ts.map +1 -1
- package/esm/cli/auth/provider-store.js +17 -13
- package/esm/cli/commands/build/command.d.ts +2 -0
- package/esm/cli/commands/build/command.d.ts.map +1 -1
- package/esm/cli/commands/build/command.js +46 -20
- package/esm/cli/commands/build/handler.d.ts +6 -0
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +9 -5
- package/esm/cli/commands/deploy/command-help.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command-help.js +2 -1
- package/esm/cli/commands/deploy/command.d.ts +83 -14
- package/esm/cli/commands/deploy/command.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command.js +317 -23
- package/esm/cli/commands/deploy/index.d.ts +2 -2
- package/esm/cli/commands/deploy/index.d.ts.map +1 -1
- package/esm/cli/commands/deploy/index.js +1 -1
- package/esm/cli/commands/dev/command.d.ts +1 -0
- package/esm/cli/commands/dev/command.d.ts.map +1 -1
- package/esm/cli/commands/dev/command.js +10 -1
- package/esm/cli/commands/dev/handler.d.ts +2 -0
- package/esm/cli/commands/dev/handler.d.ts.map +1 -1
- package/esm/cli/commands/dev/handler.js +6 -1
- package/esm/cli/commands/doctor/command-help.d.ts.map +1 -1
- package/esm/cli/commands/doctor/command-help.js +5 -1
- package/esm/cli/commands/doctor/handler.d.ts +1 -0
- package/esm/cli/commands/doctor/handler.d.ts.map +1 -1
- package/esm/cli/commands/doctor/handler.js +2 -0
- package/esm/cli/commands/doctor/index.d.ts +7 -0
- package/esm/cli/commands/doctor/index.d.ts.map +1 -1
- package/esm/cli/commands/doctor/index.js +67 -15
- package/esm/cli/commands/doctor/server-checks.d.ts +2 -2
- package/esm/cli/commands/doctor/server-checks.d.ts.map +1 -1
- package/esm/cli/commands/doctor/server-checks.js +5 -4
- package/esm/cli/commands/init/init-command.js +4 -4
- package/esm/cli/commands/init/types.d.ts +2 -0
- package/esm/cli/commands/init/types.d.ts.map +1 -1
- package/esm/cli/commands/push/command.d.ts +10 -1
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +135 -14
- package/esm/cli/commands/skills/create.d.ts +1 -1
- package/esm/cli/commands/skills/create.d.ts.map +1 -1
- package/esm/cli/commands/skills/create.js +1 -2
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +33 -7
- package/esm/cli/mcp/tools/catalog-tools.d.ts +6 -1
- package/esm/cli/mcp/tools/catalog-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/catalog-tools.js +9 -5
- package/esm/cli/mcp/tools/deploy-tool.d.ts +11 -1
- package/esm/cli/mcp/tools/deploy-tool.d.ts.map +1 -1
- package/esm/cli/mcp/tools/deploy-tool.js +55 -10
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +29 -2
- package/esm/cli/shared/config.d.ts +24 -0
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +62 -16
- package/esm/cli/shared/deployment-provenance.d.ts +47 -0
- package/esm/cli/shared/deployment-provenance.d.ts.map +1 -0
- package/esm/cli/shared/deployment-provenance.js +214 -0
- package/esm/cli/shared/json-output.d.ts.map +1 -1
- package/esm/cli/shared/json-output.js +16 -0
- package/esm/cli/shared/reserve-slug.d.ts +8 -1
- package/esm/cli/shared/reserve-slug.d.ts.map +1 -1
- package/esm/cli/shared/reserve-slug.js +15 -4
- package/esm/cli/skills/core-skills.d.ts.map +1 -1
- package/esm/cli/skills/core-skills.js +6 -3
- package/esm/cli/templates/manifest.js +3 -3
- package/esm/cli/utils/index.d.ts.map +1 -1
- package/esm/cli/utils/index.js +3 -0
- package/esm/deno.d.ts +3 -0
- package/esm/deno.js +11 -7
- package/esm/src/agent/react/use-agent-metadata.js +1 -1
- package/esm/src/agent/react/use-agent.js +1 -1
- package/esm/src/agent/react/use-agents.js +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +0 -6
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +5 -0
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +87 -34
- package/esm/src/agent/react/use-completion.js +1 -1
- package/esm/src/agent/react/use-streaming.js +1 -1
- package/esm/src/agent/react/use-voice-input.js +1 -1
- package/esm/src/build/bundler/code-splitter/splitter.d.ts +3 -0
- package/esm/src/build/bundler/code-splitter/splitter.d.ts.map +1 -1
- package/esm/src/build/bundler/code-splitter/splitter.js +21 -2
- package/esm/src/build/embedded/preset.d.ts +3 -2
- package/esm/src/build/embedded/preset.d.ts.map +1 -1
- package/esm/src/build/embedded/preset.js +120 -97
- package/esm/src/build/production-build/build/build-cleanup.d.ts.map +1 -1
- package/esm/src/build/production-build/build/build-cleanup.js +6 -1
- package/esm/src/build/production-build/build/build-orchestrator.d.ts.map +1 -1
- package/esm/src/build/production-build/build/build-orchestrator.js +55 -49
- package/esm/src/build/production-build/build/output-generator.d.ts +2 -0
- package/esm/src/build/production-build/build/output-generator.d.ts.map +1 -1
- package/esm/src/build/production-build/build/output-generator.js +2 -1
- package/esm/src/build/production-build/build/route-collector.d.ts +2 -1
- package/esm/src/build/production-build/build/route-collector.d.ts.map +1 -1
- package/esm/src/build/production-build/build/route-collector.js +3 -3
- package/esm/src/build/production-build/client-runtime.d.ts +4 -0
- package/esm/src/build/production-build/client-runtime.d.ts.map +1 -1
- package/esm/src/build/production-build/client-runtime.js +5 -8
- package/esm/src/build/production-build/local-release-assets.d.ts +2 -0
- package/esm/src/build/production-build/local-release-assets.d.ts.map +1 -1
- package/esm/src/build/production-build/local-release-assets.js +4 -1
- package/esm/src/build/production-build/manifest.d.ts.map +1 -1
- package/esm/src/build/production-build/manifest.js +9 -2
- package/esm/src/build/production-build/static-generation.d.ts.map +1 -1
- package/esm/src/build/production-build/static-generation.js +15 -3
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +1 -1
- package/esm/src/cache/backends/api.d.ts.map +1 -1
- package/esm/src/cache/backends/api.js +10 -7
- package/esm/src/chat/index.d.ts +8 -15
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +7 -16
- package/esm/src/config/config-files.d.ts +3 -0
- package/esm/src/config/config-files.d.ts.map +1 -0
- package/esm/src/config/config-files.js +6 -0
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +12 -9
- package/esm/src/extensions/parser/code-parser.d.ts +14 -0
- package/esm/src/extensions/parser/code-parser.d.ts.map +1 -1
- package/esm/src/extensions/parser/index.d.ts +1 -1
- package/esm/src/extensions/parser/index.d.ts.map +1 -1
- package/esm/src/html/html-injection.d.ts.map +1 -1
- package/esm/src/html/html-injection.js +2 -2
- package/esm/src/html/html-shell-generator.d.ts.map +1 -1
- package/esm/src/html/html-shell-generator.js +16 -9
- package/esm/src/html/hydration-script-builder/dev-component-manifest.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-component-manifest.js +2 -1
- package/esm/src/html/hydration-script-builder/hydration-data-generator.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/hydration-data-generator.js +15 -4
- package/esm/src/html/hydration-script-builder/prod-hydration.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-hydration.js +4 -2
- package/esm/src/html/hydration-script-builder/templates/renderer.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/templates/renderer.js +37 -7
- package/esm/src/html/hydration-script-builder/templates/router.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/templates/router.js +22 -4
- package/esm/src/html/hydration-script-builder/types.d.ts +4 -0
- package/esm/src/html/hydration-script-builder/types.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.d.ts +10 -0
- package/esm/src/html/schemas/html.schema.d.ts.map +1 -1
- package/esm/src/html/schemas/html.schema.js +5 -0
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +10 -10
- package/esm/src/modules/component-registry/registry.d.ts +1 -1
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.js +2 -3
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/types.d.ts +1 -1
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/modules/server/module-batch-handler.d.ts.map +1 -1
- package/esm/src/modules/server/module-batch-handler.js +3 -10
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts +1 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/adapter.js +4 -0
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts +4 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.js +6 -0
- package/esm/src/platform/adapters/fs/veryfront/read-operations.d.ts +1 -0
- package/esm/src/platform/adapters/fs/veryfront/read-operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/read-operations.js +8 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts +4 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/request-context.js +1 -0
- package/esm/src/platform/adapters/mock.d.ts.map +1 -1
- package/esm/src/platform/adapters/mock.js +3 -2
- package/esm/src/platform/adapters/veryfront-api-client/client.d.ts +4 -1
- package/esm/src/platform/adapters/veryfront-api-client/client.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/client.js +8 -4
- package/esm/src/platform/adapters/veryfront-api-client/operations.d.ts +7 -3
- package/esm/src/platform/adapters/veryfront-api-client/operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/operations.js +6 -6
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.d.ts +2 -0
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.js +4 -1
- package/esm/src/platform/compat/framework-source-resolver.d.ts +7 -1
- package/esm/src/platform/compat/framework-source-resolver.d.ts.map +1 -1
- package/esm/src/platform/compat/framework-source-resolver.js +32 -13
- package/esm/src/platform/compat/fs.d.ts +4 -0
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +34 -2
- package/esm/src/platform/compat/http/request-adapter.js +18 -1
- package/esm/src/platform/compat/path/runtime.d.ts.map +1 -1
- package/esm/src/platform/compat/path/runtime.js +1 -1
- package/esm/src/platform/compat/process/command.d.ts +2 -0
- package/esm/src/platform/compat/process/command.d.ts.map +1 -1
- package/esm/src/platform/compat/process/command.js +4 -3
- package/esm/src/platform/compat/runtime.d.ts +1 -1
- package/esm/src/platform/compat/runtime.d.ts.map +1 -1
- package/esm/src/platform/compat/runtime.js +5 -2
- package/esm/src/platform/index.d.ts +1 -1
- package/esm/src/platform/index.d.ts.map +1 -1
- package/esm/src/platform/index.js +1 -1
- package/esm/src/proxy/local-project-resolver.d.ts.map +1 -1
- package/esm/src/proxy/local-project-resolver.js +4 -2
- package/esm/src/proxy/main.js +17 -15
- package/esm/src/proxy/retry.d.ts +18 -0
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +89 -0
- package/esm/src/proxy/websocket-bridge.d.ts +10 -0
- package/esm/src/proxy/websocket-bridge.d.ts.map +1 -1
- package/esm/src/proxy/websocket-bridge.js +4 -0
- package/esm/src/react/compat/hooks-adapter.d.ts +1 -1
- package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
- package/esm/src/react/compat/hooks-adapter.js +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.js +1 -1
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts +10 -7
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/server-loader.js +49 -32
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.js +5 -5
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.js +2 -2
- package/esm/src/react/compat/ssr-adapter/types.d.ts +2 -0
- package/esm/src/react/compat/ssr-adapter/types.d.ts.map +1 -1
- package/esm/src/react/compat/version-detector/feature-detector.js +1 -1
- package/esm/src/react/components/AppWrapper.d.ts +1 -1
- package/esm/src/react/components/AppWrapper.d.ts.map +1 -1
- package/esm/src/react/components/AppWrapper.js +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts.map +1 -1
- package/esm/src/react/components/LayoutComponent.js +1 -1
- package/esm/src/react/components/MDXProvider.d.ts +1 -1
- package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
- package/esm/src/react/components/MDXProvider.js +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts.map +1 -1
- package/esm/src/react/components/ProviderComponent.js +1 -1
- package/esm/src/react/components/chat/agent-card.d.ts +15 -7
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +9 -10
- package/esm/src/react/components/chat/agent-picker-actions.d.ts +20 -0
- package/esm/src/react/components/chat/agent-picker-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-actions.js +24 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts +19 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-context.js +13 -0
- package/esm/src/react/components/chat/agent-picker.d.ts +35 -42
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-picker.js +59 -50
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts +14 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.js +137 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts +7 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-attachments.js +16 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts +21 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-component.js +1 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts +114 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-props.js +1 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +18 -18
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.js +11 -15
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +14 -3
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +3 -3
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +44 -14
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/branch-picker.js +55 -12
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +7 -2
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.js +3 -3
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.js +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.js +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +33 -10
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.js +145 -51
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +49 -20
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-actions.js +72 -18
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.js +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +34 -14
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.js +54 -15
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.js +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +14 -6
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +3 -5
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +70 -16
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +72 -23
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.js +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.js +1 -1
- package/esm/src/react/components/chat/chat/components/sources.d.ts +25 -15
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +7 -7
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +14 -3
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/step-indicator.js +3 -3
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.js +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +16 -9
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.js +10 -14
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.js +1 -1
- package/esm/src/react/components/chat/chat/composition/api.d.ts +3 -3
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +2 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +72 -29
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +92 -82
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +7 -2
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.js +3 -3
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +25 -11
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.js +67 -29
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +7 -3
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -5
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +7 -2
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.js +3 -3
- package/esm/src/react/components/chat/chat/composition/message.d.ts +85 -34
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +146 -122
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.js +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +2 -3
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +15 -2
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.js +11 -1
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts +15 -0
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/controlled-chat.js +97 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.js +179 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +3 -6
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +8 -5
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +6 -6
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +1 -1
- package/esm/src/react/components/chat/chat/index.d.ts +13 -230
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +27 -383
- package/esm/src/react/components/chat/chat-actions.d.ts +1 -1
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-actions.js +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.js +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.js +1 -1
- package/esm/src/react/components/chat/chat.d.ts +6 -6
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +4 -4
- package/esm/src/react/components/chat/error-boundary.d.ts +1 -1
- package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
- package/esm/src/react/components/chat/error-boundary.js +1 -1
- package/esm/src/react/components/chat/markdown.d.ts +3 -4
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +8 -74
- package/esm/src/react/components/chat/model-selector.d.ts +21 -27
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +26 -31
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.js +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.js +1 -1
- package/esm/src/react/components/ui/alert.d.ts +1 -1
- package/esm/src/react/components/ui/alert.d.ts.map +1 -1
- package/esm/src/react/components/ui/alert.js +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts.map +1 -1
- package/esm/src/react/components/ui/app-shell.js +1 -1
- package/esm/src/react/components/ui/avatar.d.ts +1 -1
- package/esm/src/react/components/ui/avatar.d.ts.map +1 -1
- package/esm/src/react/components/ui/avatar.js +1 -1
- package/esm/src/react/components/ui/badge.d.ts +1 -1
- package/esm/src/react/components/ui/badge.d.ts.map +1 -1
- package/esm/src/react/components/ui/badge.js +1 -1
- package/esm/src/react/components/ui/button.d.ts +1 -1
- package/esm/src/react/components/ui/button.d.ts.map +1 -1
- package/esm/src/react/components/ui/button.js +1 -1
- package/esm/src/react/components/ui/card.d.ts +1 -1
- package/esm/src/react/components/ui/card.d.ts.map +1 -1
- package/esm/src/react/components/ui/card.js +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts.map +1 -1
- package/esm/src/react/components/ui/checkbox.js +1 -1
- package/esm/src/react/components/ui/code-block.d.ts +1 -1
- package/esm/src/react/components/ui/code-block.d.ts.map +1 -1
- package/esm/src/react/components/ui/code-block.js +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts.map +1 -1
- package/esm/src/react/components/ui/collapsible.js +1 -1
- package/esm/src/react/components/ui/color-mode.d.ts +2 -2
- package/esm/src/react/components/ui/color-mode.d.ts.map +1 -1
- package/esm/src/react/components/ui/color-mode.js +1 -1
- package/esm/src/react/components/ui/command.d.ts +1 -1
- package/esm/src/react/components/ui/command.d.ts.map +1 -1
- package/esm/src/react/components/ui/command.js +1 -1
- package/esm/src/react/components/ui/dialog.d.ts +1 -1
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +1 -1
- package/esm/src/react/components/ui/drawer.d.ts +1 -1
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +1 -1
- package/esm/src/react/components/ui/file-type.d.ts +1 -1
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +1 -1
- package/esm/src/react/components/ui/floating.d.ts +1 -1
- package/esm/src/react/components/ui/floating.d.ts.map +1 -1
- package/esm/src/react/components/ui/floating.js +2 -2
- package/esm/src/react/components/ui/icon-button.d.ts +1 -1
- package/esm/src/react/components/ui/icon-button.d.ts.map +1 -1
- package/esm/src/react/components/ui/icon-button.js +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/icons/index.js +1 -1
- package/esm/src/react/components/ui/input.d.ts +1 -1
- package/esm/src/react/components/ui/input.d.ts.map +1 -1
- package/esm/src/react/components/ui/input.js +1 -1
- package/esm/src/react/components/ui/label.d.ts +1 -1
- package/esm/src/react/components/ui/label.d.ts.map +1 -1
- package/esm/src/react/components/ui/label.js +1 -1
- package/esm/src/react/components/ui/list.d.ts +1 -1
- package/esm/src/react/components/ui/list.d.ts.map +1 -1
- package/esm/src/react/components/ui/list.js +1 -1
- package/esm/src/react/components/ui/pill.d.ts +1 -1
- package/esm/src/react/components/ui/pill.d.ts.map +1 -1
- package/esm/src/react/components/ui/pill.js +1 -1
- package/esm/src/react/components/ui/popover.d.ts +1 -1
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts.map +1 -1
- package/esm/src/react/components/ui/progress-bar.js +1 -1
- package/esm/src/react/components/ui/radio.d.ts +1 -1
- package/esm/src/react/components/ui/radio.d.ts.map +1 -1
- package/esm/src/react/components/ui/radio.js +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts.map +1 -1
- package/esm/src/react/components/ui/scroll-fade.js +1 -1
- package/esm/src/react/components/ui/select.d.ts +1 -1
- package/esm/src/react/components/ui/select.d.ts.map +1 -1
- package/esm/src/react/components/ui/select.js +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts.map +1 -1
- package/esm/src/react/components/ui/shimmer.js +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts.map +1 -1
- package/esm/src/react/components/ui/skeleton.js +1 -1
- package/esm/src/react/components/ui/slot.d.ts +1 -1
- package/esm/src/react/components/ui/slot.d.ts.map +1 -1
- package/esm/src/react/components/ui/slot.js +1 -1
- package/esm/src/react/components/ui/status.d.ts +1 -1
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +1 -1
- package/esm/src/react/components/ui/switch.d.ts +1 -1
- package/esm/src/react/components/ui/switch.d.ts.map +1 -1
- package/esm/src/react/components/ui/switch.js +1 -1
- package/esm/src/react/components/ui/tabs.d.ts +3 -3
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +1 -1
- package/esm/src/react/components/ui/tag.d.ts +1 -1
- package/esm/src/react/components/ui/tag.d.ts.map +1 -1
- package/esm/src/react/components/ui/tag.js +1 -1
- package/esm/src/react/components/ui/textarea.d.ts +1 -1
- package/esm/src/react/components/ui/textarea.d.ts.map +1 -1
- package/esm/src/react/components/ui/textarea.js +1 -1
- package/esm/src/react/components/ui/tokens.d.ts +1 -1
- package/esm/src/react/components/ui/tokens.d.ts.map +1 -1
- package/esm/src/react/components/ui/tokens.js +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts.map +1 -1
- package/esm/src/react/components/ui/tooltip.js +2 -2
- package/esm/src/react/fonts/index.d.ts +1 -1
- package/esm/src/react/fonts/index.d.ts.map +1 -1
- package/esm/src/react/fonts/index.js +1 -1
- package/esm/src/react/primitives/agent-primitives.d.ts +4 -4
- package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/agent-primitives.js +1 -1
- package/esm/src/react/primitives/chat-container.d.ts +2 -2
- package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
- package/esm/src/react/primitives/chat-container.js +1 -1
- package/esm/src/react/primitives/input-box.d.ts +4 -4
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +1 -1
- package/esm/src/react/primitives/message-list.d.ts +5 -5
- package/esm/src/react/primitives/message-list.d.ts.map +1 -1
- package/esm/src/react/primitives/message-list.js +1 -1
- package/esm/src/react/primitives/tool-primitives.d.ts +4 -4
- package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/tool-primitives.js +1 -1
- package/esm/src/react/runtime/core.d.ts +1 -1
- package/esm/src/react/runtime/core.d.ts.map +1 -1
- package/esm/src/react/runtime/core.js +1 -1
- package/esm/src/rendering/app-reserved.d.ts +2 -2
- package/esm/src/rendering/app-reserved.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.js +3 -2
- package/esm/src/rendering/component-handling.d.ts +1 -1
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/component-handling.js +1 -1
- package/esm/src/rendering/context/render-context.d.ts +2 -0
- package/esm/src/rendering/context/render-context.d.ts.map +1 -1
- package/esm/src/rendering/context/render-context.js +2 -0
- package/esm/src/rendering/element-validator/element-normalizer.d.ts +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.js +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.js +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts.map +1 -1
- package/esm/src/rendering/factories/service-factories.js +1 -1
- package/esm/src/rendering/layouts/layout-applicator.d.ts +8 -2
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.js +39 -11
- package/esm/src/rendering/layouts/layout-collector.d.ts +1 -0
- package/esm/src/rendering/layouts/layout-collector.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-collector.js +7 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts +3 -3
- package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/applicator.js +7 -7
- package/esm/src/rendering/layouts/utils/component-loader.d.ts +7 -7
- package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.js +21 -14
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html-types.d.ts +2 -0
- package/esm/src/rendering/orchestrator/html-types.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.js +16 -5
- package/esm/src/rendering/orchestrator/layout.d.ts +6 -2
- package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/layout.js +16 -4
- package/esm/src/rendering/orchestrator/lifecycle.js +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +2 -2
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-cache-lookup.js +9 -2
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.js +9 -2
- package/esm/src/rendering/orchestrator/pipeline-helpers.d.ts +1 -1
- package/esm/src/rendering/orchestrator/pipeline-helpers.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline-helpers.js +3 -2
- package/esm/src/rendering/orchestrator/pipeline.d.ts +21 -0
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +88 -22
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr.d.ts +1 -0
- package/esm/src/rendering/orchestrator/ssr.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr.js +8 -0
- package/esm/src/rendering/orchestrator/types.d.ts +13 -0
- package/esm/src/rendering/orchestrator/types.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.d.ts +3 -1
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.js +13 -1
- package/esm/src/rendering/page-rendering.d.ts +3 -1
- package/esm/src/rendering/page-rendering.d.ts.map +1 -1
- package/esm/src/rendering/page-rendering.js +2 -2
- package/esm/src/rendering/page-resolution/page-resolver.d.ts.map +1 -1
- package/esm/src/rendering/page-resolution/page-resolver.js +4 -3
- package/esm/src/rendering/renderer.d.ts.map +1 -1
- package/esm/src/rendering/renderer.js +6 -0
- package/esm/src/rendering/rsc/client-boot.ts +5 -1
- package/esm/src/rendering/rsc/client-boundary-payload.d.ts +10 -0
- package/esm/src/rendering/rsc/client-boundary-payload.d.ts.map +1 -0
- package/esm/src/rendering/rsc/client-boundary-payload.js +71 -0
- package/esm/src/rendering/rsc/client-module-strategy.d.ts +5 -1
- package/esm/src/rendering/rsc/client-module-strategy.d.ts.map +1 -1
- package/esm/src/rendering/rsc/client-module-strategy.js +9 -3
- package/esm/src/rendering/rsc/component-analyzer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/component-analyzer.js +18 -7
- package/esm/src/rendering/rsc/hydrate-client.ts +133 -26
- package/esm/src/rendering/rsc/page-island.d.ts +32 -0
- package/esm/src/rendering/rsc/page-island.d.ts.map +1 -0
- package/esm/src/rendering/rsc/page-island.js +191 -0
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/html-generator.d.ts +2 -2
- package/esm/src/rendering/rsc/server-renderer/html-generator.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/html-generator.js +34 -6
- package/esm/src/rendering/rsc/server-renderer/prop-serializer.d.ts +1 -0
- package/esm/src/rendering/rsc/server-renderer/prop-serializer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/prop-serializer.js +17 -0
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +4 -2
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.js +41 -6
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +4 -4
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.js +65 -14
- package/esm/src/rendering/rsc/types.d.ts +1 -1
- package/esm/src/rendering/rsc/types.d.ts.map +1 -1
- package/esm/src/rendering/snippet-renderer.js +2 -2
- package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
- package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
- package/esm/src/rendering/ssr/component-registry.js +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts.map +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.js +1 -1
- package/esm/src/rendering/ssr/types.d.ts +1 -1
- package/esm/src/rendering/ssr/types.d.ts.map +1 -1
- package/esm/src/rendering/ssr-renderer.d.ts +7 -6
- package/esm/src/rendering/ssr-renderer.d.ts.map +1 -1
- package/esm/src/rendering/ssr-renderer.js +37 -30
- package/esm/src/rendering/utils/react-helpers.d.ts +1 -1
- package/esm/src/rendering/utils/react-helpers.d.ts.map +1 -1
- package/esm/src/rendering/utils/react-helpers.js +1 -1
- package/esm/src/routing/api/api-route-matcher.d.ts.map +1 -1
- package/esm/src/routing/api/api-route-matcher.js +6 -33
- package/esm/src/routing/api/module-loader/esbuild-plugin.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/esbuild-plugin.js +5 -1
- package/esm/src/routing/client/navigation-handlers.d.ts.map +1 -1
- package/esm/src/routing/client/navigation-handlers.js +2 -1
- package/esm/src/routing/client/page-loader.d.ts.map +1 -1
- package/esm/src/routing/client/page-loader.js +8 -3
- package/esm/src/routing/matchers/route-parser.d.ts.map +1 -1
- package/esm/src/routing/matchers/route-parser.js +27 -13
- package/esm/src/security/client/html-sanitizer.d.ts +1 -0
- package/esm/src/security/client/html-sanitizer.d.ts.map +1 -1
- package/esm/src/security/client/html-sanitizer.js +5 -2
- package/esm/src/security/http/base-handler.d.ts +2 -0
- package/esm/src/security/http/base-handler.d.ts.map +1 -1
- package/esm/src/security/http/base-handler.js +1 -0
- package/esm/src/security/http/config.d.ts.map +1 -1
- package/esm/src/security/http/config.js +12 -13
- package/esm/src/server/build-app-route-renderer.d.ts +2 -0
- package/esm/src/server/build-app-route-renderer.d.ts.map +1 -1
- package/esm/src/server/build-app-route-renderer.js +99 -39
- package/esm/src/server/build-routes.d.ts +2 -2
- package/esm/src/server/build-routes.d.ts.map +1 -1
- package/esm/src/server/build-routes.js +45 -54
- package/esm/src/server/dev-server/request-handler.d.ts.map +1 -1
- package/esm/src/server/dev-server/request-handler.js +2 -0
- package/esm/src/server/dev-server/route-discovery.d.ts.map +1 -1
- package/esm/src/server/dev-server/route-discovery.js +16 -11
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts +6 -1
- package/esm/src/server/handlers/dev/files/esbuild-plugins.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/files/esbuild-plugins.js +138 -16
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +845 -599
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +4 -1
- package/esm/src/server/handlers/request/api/app-router-resolver.js +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/project-run-execute.handler.js +17 -2
- package/esm/src/server/handlers/request/rsc/index.d.ts.map +1 -1
- package/esm/src/server/handlers/request/rsc/index.js +9 -0
- package/esm/src/server/handlers/request/ssr/error-page-fallback.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/error-page-fallback.js +23 -15
- package/esm/src/server/handlers/request/ssr/not-found-fallback.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/not-found-fallback.js +10 -5
- package/esm/src/server/runtime-handler/local-project-discovery.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/local-project-discovery.js +13 -2
- package/esm/src/server/services/rsc/endpoints/action-handler.d.ts +11 -1
- package/esm/src/server/services/rsc/endpoints/action-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/action-handler.js +83 -16
- package/esm/src/server/services/rsc/endpoints/endpoint-router.d.ts +9 -1
- package/esm/src/server/services/rsc/endpoints/endpoint-router.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/endpoint-router.js +244 -73
- package/esm/src/server/services/rsc/endpoints/handler-registry.d.ts +4 -1
- package/esm/src/server/services/rsc/endpoints/handler-registry.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/handler-registry.js +33 -3
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +1 -1
- package/esm/src/server/services/rsc/endpoints/script-handlers.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/script-handlers.js +5 -11
- package/esm/src/server/services/rsc/endpoints/types.d.ts +9 -0
- package/esm/src/server/services/rsc/endpoints/types.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/component-resolver.d.ts +1 -1
- package/esm/src/server/services/rsc/orchestrators/component-resolver.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/component-resolver.js +9 -25
- package/esm/src/server/services/rsc/orchestrators/handler.d.ts +25 -3
- package/esm/src/server/services/rsc/orchestrators/handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/handler.js +74 -9
- package/esm/src/server/services/rsc/orchestrators/manifest-handler.d.ts +16 -0
- package/esm/src/server/services/rsc/orchestrators/manifest-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/manifest-handler.js +124 -14
- package/esm/src/server/services/rsc/orchestrators/page-handler.d.ts +5 -0
- package/esm/src/server/services/rsc/orchestrators/page-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/page-handler.js +16 -2
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts +14 -2
- package/esm/src/server/services/rsc/orchestrators/render-handler.d.ts.map +1 -1
- package/esm/src/server/services/rsc/orchestrators/render-handler.js +42 -7
- package/esm/src/server/services/rsc/orchestrators/types.d.ts +19 -0
- package/esm/src/server/services/rsc/orchestrators/types.d.ts.map +1 -1
- package/esm/src/server/shared/browser-module-availability.d.ts +38 -0
- package/esm/src/server/shared/browser-module-availability.d.ts.map +1 -0
- package/esm/src/server/shared/browser-module-availability.js +140 -0
- package/esm/src/server/shared/browser-module-boundary.d.ts +18 -0
- package/esm/src/server/shared/browser-module-boundary.d.ts.map +1 -0
- package/esm/src/server/shared/browser-module-boundary.js +43 -0
- package/esm/src/server/shared/browser-module-bundler.d.ts +19 -0
- package/esm/src/server/shared/browser-module-bundler.d.ts.map +1 -1
- package/esm/src/server/shared/browser-module-bundler.js +123 -8
- package/esm/src/server/utils/domain-lookup.d.ts.map +1 -1
- package/esm/src/testing/bdd.d.ts.map +1 -1
- package/esm/src/testing/bdd.js +43 -10
- package/esm/src/transforms/esm/bundle-deps-validator.js +3 -3
- package/esm/src/transforms/esm/bundle-recovery.d.ts +3 -3
- package/esm/src/transforms/esm/bundle-recovery.d.ts.map +1 -1
- package/esm/src/transforms/esm/bundle-recovery.js +68 -29
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +40 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +143 -0
- package/esm/src/transforms/esm/http-cache-invariants.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-invariants.js +4 -3
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts +4 -1
- package/esm/src/transforms/esm/http-cache-wrapper.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-wrapper.js +111 -3
- package/esm/src/transforms/esm/http-cache.d.ts +4 -4
- package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache.js +24 -19
- package/esm/src/transforms/esm/in-flight-manager.d.ts +3 -3
- package/esm/src/transforms/esm/in-flight-manager.d.ts.map +1 -1
- package/esm/src/transforms/esm/in-flight-manager.js +2 -2
- package/esm/src/transforms/esm/package-registry.d.ts +4 -3
- package/esm/src/transforms/esm/package-registry.d.ts.map +1 -1
- package/esm/src/transforms/esm/package-registry.js +12 -6
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +7 -2
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-writer.js +9 -5
- package/esm/src/transforms/mdx/index.d.ts +2 -2
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +3 -2
- package/esm/src/transforms/mdx/mdx-cache-adapter.js +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/types.d.ts +2 -2
- package/esm/src/transforms/mdx/types.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.d.ts +22 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/constants.js +36 -13
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.d.ts +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/index.js +6 -4
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/path-resolver.d.ts +2 -3
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/path-resolver.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/path-resolver.js +14 -12
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-vf-modules/transform.js +73 -63
- package/esm/src/types/app.d.ts +1 -1
- package/esm/src/types/app.d.ts.map +1 -1
- package/esm/src/types/entities/getEntityInfo.d.ts +1 -1
- package/esm/src/types/entities/getEntityInfo.d.ts.map +1 -1
- package/esm/src/types/entities/getEntityInfo.js +25 -16
- package/esm/src/types/entities.js +1 -1
- package/esm/src/types/global-guards.d.ts +1 -1
- package/esm/src/types/global-guards.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +2 -2
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/rsc.d.ts +16 -0
- package/esm/src/types/rsc.d.ts.map +1 -1
- package/esm/src/utils/id.d.ts +7 -0
- package/esm/src/utils/id.d.ts.map +1 -1
- package/esm/src/utils/id.js +22 -0
- package/esm/src/utils/platform.d.ts.map +1 -1
- package/esm/src/utils/platform.js +2 -11
- package/esm/src/utils/route-path-utils.d.ts +6 -2
- package/esm/src/utils/route-path-utils.d.ts.map +1 -1
- package/esm/src/utils/route-path-utils.js +18 -9
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-stream.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-websocket.js +1 -1
- package/esm/src/workflow/executor/dag/composite-node-execution.d.ts +11 -0
- package/esm/src/workflow/executor/dag/composite-node-execution.d.ts.map +1 -0
- package/esm/src/workflow/executor/dag/composite-node-execution.js +147 -0
- package/esm/src/workflow/executor/dag/graph.js +1 -1
- package/esm/src/workflow/executor/dag/index.d.ts +1 -1
- package/esm/src/workflow/executor/dag/index.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/index.js +78 -34
- package/esm/src/workflow/executor/dag/loop-node-strategy.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/loop-node-strategy.js +10 -2
- package/esm/src/workflow/executor/dag/map-node-strategy.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/map-node-strategy.js +3 -0
- package/esm/src/workflow/executor/dag/node-strategy-types.d.ts +1 -0
- package/esm/src/workflow/executor/dag/node-strategy-types.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/types.d.ts +2 -0
- package/esm/src/workflow/executor/dag/types.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/utils.d.ts +1 -1
- package/esm/src/workflow/executor/dag/utils.d.ts.map +1 -1
- package/esm/src/workflow/executor/dag/utils.js +13 -3
- package/esm/src/workflow/executor/step-executor.d.ts +5 -1
- package/esm/src/workflow/executor/step-executor.d.ts.map +1 -1
- package/esm/src/workflow/executor/step-executor.js +71 -16
- package/esm/src/workflow/executor/workflow-executor.d.ts +7 -4
- package/esm/src/workflow/executor/workflow-executor.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-executor.js +181 -100
- package/esm/src/workflow/react/use-approval.js +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +1 -1
- package/esm/src/workflow/react/use-workflow-start.js +1 -1
- package/esm/src/workflow/react/use-workflow.js +1 -1
- package/package.json +4 -5
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/client.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/server.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4.js +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts.map +0 -1
- package/esm/deps/esm.sh/scheduler@^0.27.0.js +0 -3
- package/esm/react/jsx-dev-runtime.d.ts +0 -2
- package/esm/react/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/react/jsx-dev-runtime.js +0 -1
- package/esm/react/jsx-runtime.d.ts +0 -2
- package/esm/react/jsx-runtime.d.ts.map +0 -1
- package/esm/react/jsx-runtime.js +0 -1
- package/esm/react/react-dom-client.d.ts +0 -3
- package/esm/react/react-dom-client.d.ts.map +0 -1
- package/esm/react/react-dom-client.js +0 -2
- package/esm/react/react-dom-server.d.ts +0 -3
- package/esm/react/react-dom-server.d.ts.map +0 -1
- package/esm/react/react-dom-server.js +0 -2
- package/esm/react/react-dom.d.ts +0 -3
- package/esm/react/react-dom.d.ts.map +0 -1
- package/esm/react/react-dom.js +0 -2
- package/esm/react/react.d.ts +0 -6
- package/esm/react/react.d.ts.map +0 -1
- package/esm/react/react.js +0 -7
|
@@ -5,8 +5,9 @@ import { withSpan } from "../observability/tracing/otlp-setup.js";
|
|
|
5
5
|
import { SpanNames } from "../observability/tracing/span-names.js";
|
|
6
6
|
import { streamToString } from "./utils/index.js";
|
|
7
7
|
import { setupSSRGlobals } from "./ssr-globals.js";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { normalizeReactVersion, resolveProjectReactVersion, stripSemverRange, } from "../transforms/esm/package-registry.js";
|
|
9
|
+
function supportsStreamingReactVersion(version) {
|
|
10
|
+
return Number(version.split(".")[0]) >= 18;
|
|
10
11
|
}
|
|
11
12
|
async function pipeToString(pipeFn) {
|
|
12
13
|
const { PassThrough } = await import("node:stream");
|
|
@@ -71,61 +72,66 @@ function pipeToReadableStream(pipeFn, abortFn) {
|
|
|
71
72
|
}
|
|
72
73
|
export class SSRRenderer {
|
|
73
74
|
mode;
|
|
74
|
-
adapter;
|
|
75
75
|
projectDir;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
config;
|
|
77
|
+
reactVersionPromise = null;
|
|
78
|
+
resolvedReactVersion = null;
|
|
79
|
+
constructor(mode, _adapter, projectDir, _projectId, config) {
|
|
79
80
|
this.mode = mode;
|
|
80
|
-
this.adapter = adapter;
|
|
81
81
|
this.projectDir = projectDir;
|
|
82
|
-
this.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.versionInfo = getReactVersionInfo();
|
|
89
|
-
return this.versionInfo;
|
|
82
|
+
this.config = config;
|
|
83
|
+
const legacyVersions = config?.client?.cdn?.versions;
|
|
84
|
+
const configuredVersion = config?.react?.version ??
|
|
85
|
+
(legacyVersions && legacyVersions !== "auto" ? legacyVersions.react : undefined);
|
|
86
|
+
if (configuredVersion) {
|
|
87
|
+
this.resolvedReactVersion = normalizeReactVersion(stripSemverRange(configuredVersion));
|
|
90
88
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
}
|
|
90
|
+
async getReactVersion() {
|
|
91
|
+
if (this.resolvedReactVersion)
|
|
92
|
+
return this.resolvedReactVersion;
|
|
93
|
+
this.reactVersionPromise ??= resolveProjectReactVersion({
|
|
94
|
+
projectDir: this.projectDir,
|
|
95
|
+
config: this.config,
|
|
96
|
+
});
|
|
97
|
+
this.resolvedReactVersion = await this.reactVersionPromise;
|
|
98
|
+
return this.resolvedReactVersion;
|
|
94
99
|
}
|
|
95
100
|
async renderToHTML(pageElement, options) {
|
|
96
101
|
setupSSRGlobals();
|
|
97
|
-
const
|
|
102
|
+
const reactVersion = await this.getReactVersion();
|
|
98
103
|
const wantsStreamingMode = this.mode === "production" || options.wantsStream;
|
|
99
104
|
const compiledBinary = isCompiledBinary();
|
|
100
105
|
if (compiledBinary && wantsStreamingMode) {
|
|
101
106
|
logger.debug("Streaming SSR disabled in compiled binary (using string rendering)", {
|
|
102
|
-
reactVersion
|
|
107
|
+
reactVersion,
|
|
103
108
|
reason: "Workers with blob URLs not supported in deno compile binaries",
|
|
104
109
|
});
|
|
105
110
|
}
|
|
106
111
|
const useStreaming = !compiledBinary &&
|
|
107
112
|
wantsStreamingMode &&
|
|
108
|
-
|
|
113
|
+
supportsStreamingReactVersion(reactVersion);
|
|
109
114
|
if (!useStreaming) {
|
|
110
115
|
logger.debug("Using string SSR", {
|
|
111
116
|
mode: this.mode,
|
|
112
|
-
reactVersion
|
|
117
|
+
reactVersion,
|
|
113
118
|
});
|
|
114
|
-
const html = await withSpan(SpanNames.SSR_REACT_RENDER, () => renderToStringAdapter(pageElement), {
|
|
119
|
+
const html = await withSpan(SpanNames.SSR_REACT_RENDER, () => renderToStringAdapter(pageElement, { reactVersion }), {
|
|
115
120
|
"ssr.method": "string",
|
|
116
|
-
"ssr.react_version":
|
|
121
|
+
"ssr.react_version": reactVersion,
|
|
117
122
|
});
|
|
118
123
|
return { html, stream: null };
|
|
119
124
|
}
|
|
120
125
|
logger.debug("Rendering via streaming adapter", {
|
|
121
|
-
reactVersion
|
|
126
|
+
reactVersion,
|
|
122
127
|
delivery: options.wantsStream ? "stream" : "string",
|
|
123
128
|
});
|
|
124
129
|
const renderResult = await withSpan(SpanNames.SSR_REACT_RENDER, () => renderToStreamAdapter(pageElement, {
|
|
125
130
|
identifierPrefix: "vf",
|
|
131
|
+
reactVersion,
|
|
126
132
|
}), {
|
|
127
133
|
"ssr.method": "streaming",
|
|
128
|
-
"ssr.react_version":
|
|
134
|
+
"ssr.react_version": reactVersion,
|
|
129
135
|
"ssr.wants_stream": options.wantsStream,
|
|
130
136
|
});
|
|
131
137
|
if (renderResult.stream) {
|
|
@@ -158,12 +164,12 @@ export class SSRRenderer {
|
|
|
158
164
|
});
|
|
159
165
|
}
|
|
160
166
|
getRenderingStrategy() {
|
|
161
|
-
const
|
|
162
|
-
const hasStreamingSupport =
|
|
167
|
+
const reactVersion = this.resolvedReactVersion ?? getReactVersionInfo().version;
|
|
168
|
+
const hasStreamingSupport = supportsStreamingReactVersion(reactVersion);
|
|
163
169
|
const useStreaming = this.mode === "production" && hasStreamingSupport;
|
|
164
170
|
return {
|
|
165
171
|
method: useStreaming ? "streaming" : "string",
|
|
166
|
-
reactVersion
|
|
172
|
+
reactVersion,
|
|
167
173
|
features: {
|
|
168
174
|
streaming: hasStreamingSupport,
|
|
169
175
|
suspense: hasStreamingSupport,
|
|
@@ -172,6 +178,7 @@ export class SSRRenderer {
|
|
|
172
178
|
};
|
|
173
179
|
}
|
|
174
180
|
supportsStreaming() {
|
|
175
|
-
|
|
181
|
+
const reactVersion = this.resolvedReactVersion ?? getReactVersionInfo().version;
|
|
182
|
+
return supportsStreamingReactVersion(reactVersion);
|
|
176
183
|
}
|
|
177
184
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { MDXComponents } from "../../types/index.js";
|
|
3
3
|
export declare const normalizeChild: (child: React.ReactNode) => React.ReactNode;
|
|
4
4
|
export declare function createDefaultMDXComponents(): MDXComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/utils/react-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"react-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/utils/react-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,cAAc,UAGV,KAAK,CAAC,SAAS,KAAG,KAAK,CAAC,SAoBrC,CAAC;AAEL,wBAAgB,0BAA0B,IAAI,aAAa,CAE1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-route-matcher.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/api/api-route-matcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"api-route-matcher.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/api/api-route-matcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAY9D,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAElC,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,UAAU,CAAsC;;IAUxD,wCAAwC;IACxC,IAAI,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAEpC;IAED,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAqB7C,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,oBAAoB;IAgB5B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAoBtC,OAAO,CAAC,aAAa;IAiCrB,UAAU,IAAI,KAAK,EAAE;IAIrB,KAAK,IAAI,IAAI;IAKb,UAAU,IAAI,IAAI;IAIlB,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -2,6 +2,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
2
2
|
import { getDisableLruIntervalEnv } from "../../config/env.js";
|
|
3
3
|
import { LRUCache } from "../../utils/lru-wrapper.js";
|
|
4
4
|
import { safeDecodeParam } from "../matchers/decode-param.js";
|
|
5
|
+
import { parseRoute } from "../matchers/route-parser.js";
|
|
5
6
|
/** Max entries in the route-match LRU cache */
|
|
6
7
|
const ROUTE_CACHE_MAX_ENTRIES = 500;
|
|
7
8
|
/** Time-to-live for cached route matches (5 minutes) */
|
|
@@ -26,45 +27,17 @@ export class ApiRouteMatcher {
|
|
|
26
27
|
return this._routes;
|
|
27
28
|
}
|
|
28
29
|
addRoute(pattern, page) {
|
|
29
|
-
const originalPattern = pattern;
|
|
30
|
-
let regex = pattern;
|
|
31
|
-
let isOptionalCatchAll = false;
|
|
32
|
-
let isCatchAll = false;
|
|
33
|
-
const paramNames = [];
|
|
34
|
-
for (const match of originalPattern.matchAll(/\[\[\.\.\.(\w+)\]\]|\[\.\.\.(\w+)\]|\[(\w+)\]/g)) {
|
|
35
|
-
const optionalCatchAll = match[1];
|
|
36
|
-
const catchAll = match[2];
|
|
37
|
-
const param = match[3];
|
|
38
|
-
if (optionalCatchAll) {
|
|
39
|
-
paramNames.push(optionalCatchAll);
|
|
40
|
-
isOptionalCatchAll = true;
|
|
41
|
-
isCatchAll = true;
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
if (catchAll) {
|
|
45
|
-
paramNames.push(catchAll);
|
|
46
|
-
isCatchAll = true;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
if (param)
|
|
50
|
-
paramNames.push(param);
|
|
51
|
-
}
|
|
52
|
-
regex = regex
|
|
53
|
-
.replace(/\/?\[\[\.\.\.([^\]]+)\]\]/g, "(?:/(.+))?")
|
|
54
|
-
.replace(/\[\.\.\.([^\]]+)\]/g, "(.+)")
|
|
55
|
-
.replace(/\[([^\]]+)\]/g, "([^/]+)");
|
|
56
30
|
if (pattern !== "/" && pattern.endsWith("/")) {
|
|
57
31
|
pattern = pattern.slice(0, -1);
|
|
58
|
-
if (regex.endsWith("/"))
|
|
59
|
-
regex = regex.slice(0, -1);
|
|
60
32
|
}
|
|
33
|
+
const parsed = parseRoute(pattern, page);
|
|
61
34
|
const route = { pattern, page };
|
|
62
35
|
this._routes.set(pattern, {
|
|
63
|
-
regex:
|
|
36
|
+
regex: parsed.regex,
|
|
64
37
|
route,
|
|
65
|
-
paramNames,
|
|
66
|
-
isOptionalCatchAll,
|
|
67
|
-
isCatchAll,
|
|
38
|
+
paramNames: parsed.paramNames,
|
|
39
|
+
isOptionalCatchAll: parsed.isOptionalCatchAll,
|
|
40
|
+
isCatchAll: parsed.isCatchAll,
|
|
68
41
|
});
|
|
69
42
|
// A path may have been negatively cached (null / 404) before this route was
|
|
70
43
|
// registered (dev hot-reload / late route discovery). Invalidate so the newly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/src/routing/api/module-loader/esbuild-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAW,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAQ5E,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA8GD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"esbuild-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/src/routing/api/module-loader/esbuild-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAW,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAQ5E,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA8GD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,EAAE,GAAG,MAAM,CA0R9E"}
|
|
@@ -80,6 +80,7 @@ export function createHTTPPlugin(options) {
|
|
|
80
80
|
const lockfile = opts.lockfile ??
|
|
81
81
|
(opts.projectDir ? createLockfileManager(opts.projectDir) : null);
|
|
82
82
|
const moduleCache = createHTTPModuleCache(opts.projectDir);
|
|
83
|
+
let lockfileFlushDisabled = false;
|
|
83
84
|
return {
|
|
84
85
|
name: "vf-api-http-fetch",
|
|
85
86
|
setup(build) {
|
|
@@ -124,6 +125,8 @@ export function createHTTPPlugin(options) {
|
|
|
124
125
|
if (!lockfile)
|
|
125
126
|
return;
|
|
126
127
|
await lockfile.set(url, entry);
|
|
128
|
+
if (lockfileFlushDisabled)
|
|
129
|
+
return;
|
|
127
130
|
try {
|
|
128
131
|
await lockfile.flush();
|
|
129
132
|
logger.debug(`[http] lockfile updated: ${url} -> ${entry.resolved}`);
|
|
@@ -131,7 +134,8 @@ export function createHTTPPlugin(options) {
|
|
|
131
134
|
catch (error) {
|
|
132
135
|
if (!isReadOnlyFileSystemError(error))
|
|
133
136
|
throw error;
|
|
134
|
-
|
|
137
|
+
lockfileFlushDisabled = true;
|
|
138
|
+
logger.debug(`[http] lockfile flush disabled on read-only filesystem for ${url}: ${describePersistenceError(error)}`);
|
|
135
139
|
}
|
|
136
140
|
}
|
|
137
141
|
async function fetchRemoteModule(url) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-handlers.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/client/navigation-handlers.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAID,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,eAAe,CAA4D;IACnF,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,eAAe,CAA0C;gBAG/D,aAAa,SAA4B,EACzC,eAAe,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAO;IAM/D,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,IACvC,OAAO,UAAU;IAc3B,qBAAqB,CAAC,SAAS,EAAE,mBAAmB,IAC1C,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"file":"navigation-handlers.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/client/navigation-handlers.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAID,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,eAAe,CAA4D;IACnF,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,eAAe,CAA0C;gBAG/D,aAAa,SAA4B,EACzC,eAAe,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAO;IAM/D,kBAAkB,CAAC,SAAS,EAAE,mBAAmB,IACvC,OAAO,UAAU;IAc3B,qBAAqB,CAAC,SAAS,EAAE,mBAAmB,IAC1C,QAAQ,aAAa;IAO/B,sBAAsB,CAAC,SAAS,EAAE,mBAAmB,IAC3C,OAAO,UAAU;IAsB3B,OAAO,CAAC,qBAAqB;IAO7B,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAoBtC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASvC,UAAU,IAAI,OAAO;IAIrB,iBAAiB,IAAI,IAAI;IAIzB,KAAK,IAAI,IAAI;CAOd"}
|
|
@@ -32,7 +32,8 @@ export class NavigationHandlers {
|
|
|
32
32
|
createPopStateHandler(callbacks) {
|
|
33
33
|
return (_event) => {
|
|
34
34
|
this.isPopStateNav = true;
|
|
35
|
-
|
|
35
|
+
const { pathname, search, hash } = globalThis.location;
|
|
36
|
+
callbacks.onNavigate(`${pathname}${search}${hash}`);
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
createMouseOverHandler(callbacks) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/client/page-loader.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,YAAY,EACZ,eAAe,EACf,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMzD,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,eAAe,CAAyC;IAChE,OAAO,CAAC,kBAAkB,CAA2C;IAErE,OAAO,CAAC,WAAW;IAOnB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI9C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI/B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAK7C,UAAU,IAAI,IAAI;IAOlB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAInD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAItC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI;IAK5C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;YAIvC,YAAY;
|
|
1
|
+
{"version":3,"file":"page-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/client/page-loader.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,YAAY,EACZ,eAAe,EACf,UAAU,EACV,QAAQ,EACR,SAAS,EACT,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMzD,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,eAAe,CAAyC;IAChE,OAAO,CAAC,kBAAkB,CAA2C;IAErE,OAAO,CAAC,WAAW;IAOnB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI9C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI/B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAK7C,UAAU,IAAI,IAAI;IAOlB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAInD,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAItC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI;IAK5C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;YAIvC,YAAY;YAgBZ,iBAAiB;IAmB/B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAsBpC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAerC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAwB1D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAsB7C,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAetD,OAAO,CAAC,oBAAoB;CAgB7B"}
|
|
@@ -46,7 +46,9 @@ export class PageLoader {
|
|
|
46
46
|
}
|
|
47
47
|
async tryFetchJSON(path) {
|
|
48
48
|
try {
|
|
49
|
-
const
|
|
49
|
+
const navigationUrl = new URL(path, "http://veryfront.local");
|
|
50
|
+
const dataPath = navigationUrl.pathname === "/" ? "/index" : navigationUrl.pathname;
|
|
51
|
+
const response = await fetch(`/_veryfront/data${dataPath}.json${navigationUrl.search}`, {
|
|
50
52
|
headers: { "X-Veryfront-Navigation": "client" },
|
|
51
53
|
});
|
|
52
54
|
if (!response.ok)
|
|
@@ -103,8 +105,11 @@ export class PageLoader {
|
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
async fetchSpaPageData(path) {
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
+
const navigationUrl = new URL(path, "http://veryfront.local");
|
|
109
|
+
const normalizedPath = navigationUrl.pathname === "/"
|
|
110
|
+
? "index"
|
|
111
|
+
: navigationUrl.pathname.replace(/^\//, "");
|
|
112
|
+
const endpoint = `/_veryfront/page-data/${normalizedPath}.json${navigationUrl.search}`;
|
|
108
113
|
logger.debug(`Fetching SPA page data from ${endpoint}`);
|
|
109
114
|
const response = await fetch(endpoint, {
|
|
110
115
|
headers: { "X-Veryfront-Navigation": "spa" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-parser.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/matchers/route-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"route-parser.d.ts","sourceRoot":"","sources":["../../../../src/src/routing/matchers/route-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAQxC,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,CAuD/D;AAgBD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIxD"}
|
|
@@ -1,36 +1,50 @@
|
|
|
1
|
+
const ROUTE_PARAMETER_PATTERN = /\[\[\.\.\.(\w+)\]\]|\[\.\.\.(\w+)\]|\[(\w+)\]/g;
|
|
2
|
+
function escapeRegex(value) {
|
|
3
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4
|
+
}
|
|
1
5
|
export function parseRoute(pattern, page) {
|
|
2
6
|
const paramNames = [];
|
|
3
7
|
let isCatchAll = false;
|
|
4
8
|
let isOptionalCatchAll = false;
|
|
5
|
-
|
|
9
|
+
let regexPattern = "";
|
|
10
|
+
let cursor = 0;
|
|
11
|
+
for (const match of pattern.matchAll(ROUTE_PARAMETER_PATTERN)) {
|
|
12
|
+
const matchIndex = match.index;
|
|
13
|
+
const matchedText = match[0];
|
|
14
|
+
let literal = pattern.slice(cursor, matchIndex);
|
|
6
15
|
const optionalCatchAll = match[1];
|
|
7
16
|
if (optionalCatchAll) {
|
|
8
17
|
paramNames.push(optionalCatchAll);
|
|
9
18
|
isOptionalCatchAll = true;
|
|
10
19
|
isCatchAll = true;
|
|
20
|
+
const isTrailingSegment = matchIndex + matchedText.length === pattern.length &&
|
|
21
|
+
literal.endsWith("/");
|
|
22
|
+
if (isTrailingSegment) {
|
|
23
|
+
literal = literal.slice(0, -1);
|
|
24
|
+
regexPattern += `${escapeRegex(literal)}(?:/(.*))?`;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
regexPattern += `${escapeRegex(literal)}(.*)`;
|
|
28
|
+
}
|
|
29
|
+
cursor = matchIndex + matchedText.length;
|
|
11
30
|
continue;
|
|
12
31
|
}
|
|
13
32
|
const catchAll = match[2];
|
|
14
33
|
if (catchAll) {
|
|
15
34
|
paramNames.push(catchAll);
|
|
16
35
|
isCatchAll = true;
|
|
36
|
+
regexPattern += `${escapeRegex(literal)}(.+)`;
|
|
37
|
+
cursor = matchIndex + matchedText.length;
|
|
17
38
|
continue;
|
|
18
39
|
}
|
|
19
40
|
const param = match[3];
|
|
20
|
-
if (param)
|
|
41
|
+
if (param) {
|
|
21
42
|
paramNames.push(param);
|
|
43
|
+
regexPattern += `${escapeRegex(literal)}([^/]+)`;
|
|
44
|
+
cursor = matchIndex + matchedText.length;
|
|
45
|
+
}
|
|
22
46
|
}
|
|
23
|
-
|
|
24
|
-
.replace(/\[\[\.\.\.(\w+)\]\]/g, "___OPTIONAL_CATCHALL___")
|
|
25
|
-
.replace(/\[\.\.\.(\w+)\]/g, "___CATCHALL___")
|
|
26
|
-
.replace(/\[(\w+)\]/g, "___PARAM___")
|
|
27
|
-
.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")
|
|
28
|
-
.replace(/___OPTIONAL_CATCHALL___/g, "(.*)")
|
|
29
|
-
.replace(/___CATCHALL___/g, "(.+)")
|
|
30
|
-
.replace(/___PARAM___/g, "([^/]+)");
|
|
31
|
-
if (isOptionalCatchAll) {
|
|
32
|
-
regexPattern = regexPattern.replace(/\\\/\(\.\*\)$/, "(?:\\/(.*))?");
|
|
33
|
-
}
|
|
47
|
+
regexPattern += escapeRegex(pattern.slice(cursor));
|
|
34
48
|
return {
|
|
35
49
|
pattern,
|
|
36
50
|
page,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { escapeHtml } from "../../html/html-escape.js";
|
|
2
2
|
export { escapeHtml };
|
|
3
|
+
export declare function escapeInlineJsonText(value: string): string;
|
|
3
4
|
export declare function jsonForInlineScript(value: unknown, space?: string | number): string;
|
|
4
5
|
export declare function buildTrustedHtmlValidatorScript(): string;
|
|
5
6
|
interface ValidateTrustedHtmlOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-sanitizer.d.ts","sourceRoot":"","sources":["../../../../src/src/security/client/html-sanitizer.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,CAAC;AAoBtB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"html-sanitizer.d.ts","sourceRoot":"","sources":["../../../../src/src/security/client/html-sanitizer.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,OAAO,EAAE,UAAU,EAAE,CAAC;AAoBtB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO1D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,+BAA+B,IAAI,MAAM,CAwBxD;AAiBD,UAAU,0BAA0B;IAClC,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,0BAA+B,GACvC,MAAM,CAgBR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACtC,GAAG,cAAc,CA+BjB"}
|
|
@@ -25,14 +25,17 @@ function createSuspiciousPatterns() {
|
|
|
25
25
|
name,
|
|
26
26
|
}));
|
|
27
27
|
}
|
|
28
|
-
export function
|
|
29
|
-
return
|
|
28
|
+
export function escapeInlineJsonText(value) {
|
|
29
|
+
return value
|
|
30
30
|
.replace(/</g, "\\u003c")
|
|
31
31
|
.replace(/>/g, "\\u003e")
|
|
32
32
|
.replace(/&/g, "\\u0026")
|
|
33
33
|
.replace(/\u2028/g, "\\u2028")
|
|
34
34
|
.replace(/\u2029/g, "\\u2029");
|
|
35
35
|
}
|
|
36
|
+
export function jsonForInlineScript(value, space) {
|
|
37
|
+
return escapeInlineJsonText(JSON.stringify(value, null, space));
|
|
38
|
+
}
|
|
36
39
|
export function buildTrustedHtmlValidatorScript() {
|
|
37
40
|
const specsJson = jsonForInlineScript(SUSPICIOUS_PATTERN_SPECS);
|
|
38
41
|
return `
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Handler, HandlerContext, HandlerMetadata, HandlerResult } from "../../types/index.js";
|
|
2
2
|
import type { WebSocketUpgradeResponse } from "../../platform/adapters/base.js";
|
|
3
|
+
import type { RequestTokenTrust } from "../../platform/adapters/fs/veryfront/request-context.js";
|
|
3
4
|
import { ResponseBuilder } from "./response/index.js";
|
|
4
5
|
export interface HandlerHelpers {
|
|
5
6
|
createResponseBuilder: (ctx: HandlerContext, nonce?: string) => ResponseBuilder;
|
|
@@ -23,6 +24,7 @@ export declare abstract class BaseHandler implements Handler {
|
|
|
23
24
|
protected respond(response: Response | WebSocketUpgradeResponse, metadata?: Record<string, unknown>): HandlerResult;
|
|
24
25
|
protected withProxyContext<T>(ctx: HandlerContext, fn: () => Promise<T>, options?: {
|
|
25
26
|
requireToken?: boolean;
|
|
27
|
+
tokenTrust?: RequestTokenTrust;
|
|
26
28
|
}): Promise<T>;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=base-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/base-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"base-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/base-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,eAAe,EACf,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,qBAAqB,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,eAAe,CAAC;IAChF,OAAO,EAAE,CACP,QAAQ,EAAE,QAAQ,GAAG,wBAAwB,EAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,aAAa,CAAC;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3F,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;IAC5C,QAAQ,EAAE,MAAM,aAAa,CAAC;CAC/B;AAED,8BAAsB,WAAY,YAAW,OAAO;IAClD,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEnC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAMxC;IAEF,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAE1E,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO;IAYlE,OAAO,CAAC,cAAc;IAmBtB,SAAS,CAAC,qBAAqB,CAC7B,GAAG,EAAE,cAAc,EACnB,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,eAAe;IAWlB,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,IAAI;IAKhG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI;IAIhG,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI;IAIhG,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAKjD,SAAS,CAAC,QAAQ,IAAI,aAAa;IAInC,SAAS,CAAC,OAAO,CACf,QAAQ,EAAE,QAAQ,GAAG,wBAAwB,EAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,aAAa;IAIhB,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAC1B,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAAO,GACvE,OAAO,CAAC,CAAC,CAAC;CAqFd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ7D,qBAAa,oBAAoB;IAO7B,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,cAAc,CAAC;IARzB,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAA8B;gBAGvC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,cAAc,CAAC,EAAE,eAAe,YAAA;IAGpC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/src/security/http/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ7D,qBAAa,oBAAoB;IAO7B,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,cAAc,CAAC;IARzB,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAA8B;gBAGvC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,cAAc,CAAC,EAAE,eAAe,YAAA;IAGpC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;YAkBrB,IAAI;IAKlB,OAAO,CAAC,WAAW;IAuBnB,iBAAiB,IAAI,cAAc,GAAG,IAAI;IAI1C,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,aAAa,IAAI,cAAc,CAAC,MAAM,CAAC;IAIvC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAwB,GAAG,MAAM;IAIjE,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IASnE,KAAK,IAAI,IAAI;CAMd"}
|
|
@@ -21,25 +21,24 @@ export class SecurityConfigLoader {
|
|
|
21
21
|
return;
|
|
22
22
|
if (this.loadPromise)
|
|
23
23
|
return this.loadPromise;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
async load() {
|
|
24
|
+
const loadPromise = this.load();
|
|
25
|
+
this.loadPromise = loadPromise;
|
|
28
26
|
try {
|
|
29
|
-
|
|
30
|
-
this.applyConfig(cfg);
|
|
27
|
+
await loadPromise;
|
|
31
28
|
}
|
|
32
29
|
catch (error) {
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// CSRF, and CSP. Instead fail loud and clear loadPromise so the next
|
|
38
|
-
// ensureLoaded() retries rather than permanently degrading security.
|
|
30
|
+
// Fail this request closed, but allow a later request to retry after a
|
|
31
|
+
// transient filesystem, import, or parse failure.
|
|
32
|
+
if (Object.is(this.loadPromise, loadPromise))
|
|
33
|
+
this.loadPromise = null;
|
|
39
34
|
logger.error("Failed to load security config; will retry on next request", { error });
|
|
40
|
-
|
|
35
|
+
throw error;
|
|
41
36
|
}
|
|
42
37
|
}
|
|
38
|
+
async load() {
|
|
39
|
+
const cfg = this.configOverride ?? (await getConfig(this.projectDir, this.adapter));
|
|
40
|
+
this.applyConfig(cfg);
|
|
41
|
+
}
|
|
43
42
|
applyConfig(cfg) {
|
|
44
43
|
const security = cfg?.security ? { ...cfg.security } : {};
|
|
45
44
|
if (security.headers)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { RuntimeAdapter } from "../platform/adapters/base.js";
|
|
5
5
|
import type { ReleaseAssetManifest } from "../release-assets/manifest-schema.js";
|
|
6
|
+
import type { VeryfrontConfig } from "../config/index.js";
|
|
6
7
|
/**
|
|
7
8
|
* Render an App Router route to HTML
|
|
8
9
|
*/
|
|
@@ -13,6 +14,7 @@ export declare function renderAppRouteToHTML(args: {
|
|
|
13
14
|
pageFile: string;
|
|
14
15
|
contentSourceId: string;
|
|
15
16
|
reactVersion?: string;
|
|
17
|
+
config?: VeryfrontConfig;
|
|
16
18
|
releaseAssetManifest?: ReleaseAssetManifest | null;
|
|
17
19
|
stylesheetHref?: string;
|
|
18
20
|
includePreviewStylesheet?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-app-route-renderer.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-app-route-renderer.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"build-app-route-renderer.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-app-route-renderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAMnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAOjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA4E1D;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,cAAc,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,GAAG,OAAO,CAAC,MAAM,CAAC,CA0KlB"}
|