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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* App Route HTML Rendering for Build
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { join } from "../platform/compat/path/index.js";
|
|
4
|
+
import { dirname, isAbsolute, join, normalize, relative } from "../platform/compat/path/index.js";
|
|
6
5
|
import { getProjectReact, renderToStringAdapter } from "../react/index.js";
|
|
7
6
|
import { loadComponentFromSource } from "../modules/react-loader/index.js";
|
|
8
7
|
import { COMPILATION_ERROR } from "../errors/index.js";
|
|
@@ -10,62 +9,85 @@ import { generateHydrationData, getProdScripts } from "../html/index.js";
|
|
|
10
9
|
import { buildImportMapJson } from "../html/utils.js";
|
|
11
10
|
import { getPreviewStylesheetLink } from "../html/dev-scripts.js";
|
|
12
11
|
import { shouldUnwrapAppRouterDocumentLayout, unwrapAppRouterDocumentLayout, } from "../rendering/layouts/utils/component-loader.js";
|
|
12
|
+
import { resolveProjectReactVersion } from "../transforms/esm/package-registry.js";
|
|
13
|
+
import { isNotFoundError } from "../platform/compat/fs.js";
|
|
14
|
+
import { determineClientModuleStrategy } from "../rendering/rsc/client-module-strategy.js";
|
|
15
|
+
import { CLIENT_PAGE_ISLAND_ID, hasUseClientDirective, planClientPageIsland, } from "../rendering/rsc/page-island.js";
|
|
16
|
+
import { LAYOUT_EXTENSIONS } from "../rendering/layouts/types.js";
|
|
17
|
+
const APP_ROUTE_LAYOUT_EXTENSIONS = LAYOUT_EXTENSIONS.filter((extension) => extension !== "md" && extension !== "mdx");
|
|
13
18
|
async function fileExists(adapter, filePath) {
|
|
14
19
|
try {
|
|
15
20
|
const st = await adapter.fs.stat(filePath);
|
|
16
21
|
return st.isFile;
|
|
17
22
|
}
|
|
18
|
-
catch (
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (isNotFoundError(error))
|
|
25
|
+
return false;
|
|
26
|
+
throw error;
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
|
-
async function loadComponent(adapter, filePath, projectDir, contentSourceId) {
|
|
29
|
+
async function loadComponent(adapter, filePath, projectDir, contentSourceId, reactVersion) {
|
|
24
30
|
const src = await adapter.fs.readFile(filePath);
|
|
25
31
|
return loadComponentFromSource(src, filePath, projectDir, adapter, {
|
|
26
32
|
projectId: projectDir,
|
|
27
33
|
dev: false,
|
|
28
34
|
moduleServerUrl: "",
|
|
29
35
|
contentSourceId,
|
|
36
|
+
reactVersion,
|
|
30
37
|
});
|
|
31
38
|
}
|
|
32
39
|
function routePathToSlug(routePath) {
|
|
33
40
|
return routePath === "/" ? "" : routePath.replace(/^\/+/, "");
|
|
34
41
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
function getLayoutDirectoriesForPage(appRoot, pageFile) {
|
|
43
|
+
const normalizedAppRoot = normalize(appRoot);
|
|
44
|
+
const pageDirectory = normalize(dirname(pageFile));
|
|
45
|
+
const relativePageDirectory = relative(normalizedAppRoot, pageDirectory).replaceAll("\\", "/");
|
|
46
|
+
if (relativePageDirectory === ".." ||
|
|
47
|
+
relativePageDirectory.startsWith("../") ||
|
|
48
|
+
isAbsolute(relativePageDirectory)) {
|
|
49
|
+
return [normalizedAppRoot];
|
|
50
|
+
}
|
|
51
|
+
const directories = [];
|
|
52
|
+
let current = pageDirectory;
|
|
53
|
+
while (true) {
|
|
54
|
+
directories.push(current);
|
|
55
|
+
if (current === normalizedAppRoot)
|
|
56
|
+
break;
|
|
57
|
+
const parent = dirname(current);
|
|
58
|
+
if (parent === current)
|
|
59
|
+
return [normalizedAppRoot];
|
|
60
|
+
current = parent;
|
|
46
61
|
}
|
|
47
|
-
return
|
|
62
|
+
return directories.reverse();
|
|
48
63
|
}
|
|
49
64
|
/**
|
|
50
65
|
* Render an App Router route to HTML
|
|
51
66
|
*/
|
|
52
67
|
export async function renderAppRouteToHTML(args) {
|
|
53
|
-
const { adapter, projectDir, routePath, pageFile, contentSourceId, releaseAssetManifest, stylesheetHref, includePreviewStylesheet, } = args;
|
|
54
|
-
const appRoot = join(projectDir, "app");
|
|
55
|
-
const
|
|
68
|
+
const { adapter, projectDir, routePath, pageFile, contentSourceId, reactVersion: explicitReactVersion, config, releaseAssetManifest, stylesheetHref, includePreviewStylesheet, } = args;
|
|
69
|
+
const appRoot = join(projectDir, config?.directories?.app ?? "app");
|
|
70
|
+
const reactVersion = explicitReactVersion ??
|
|
71
|
+
await resolveProjectReactVersion({ projectDir, config });
|
|
56
72
|
const layouts = [];
|
|
57
|
-
for (const
|
|
58
|
-
|
|
73
|
+
for (const directory of getLayoutDirectoriesForPage(appRoot, pageFile)) {
|
|
74
|
+
for (const extension of APP_ROUTE_LAYOUT_EXTENSIONS) {
|
|
75
|
+
const layoutPath = join(directory, `layout.${extension}`);
|
|
76
|
+
if (!(await fileExists(adapter, layoutPath)))
|
|
77
|
+
continue;
|
|
59
78
|
layouts.push(layoutPath);
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
60
81
|
}
|
|
61
|
-
//
|
|
62
|
-
const React = await getProjectReact();
|
|
82
|
+
// Use the resolved project version so component and renderer modules share one React instance.
|
|
83
|
+
const React = await getProjectReact(reactVersion);
|
|
63
84
|
const pageSource = await adapter.fs.readFile(pageFile);
|
|
64
85
|
const Page = await loadComponentFromSource(pageSource, pageFile, projectDir, adapter, {
|
|
65
86
|
projectId: projectDir,
|
|
66
87
|
dev: false,
|
|
67
88
|
moduleServerUrl: "",
|
|
68
89
|
contentSourceId,
|
|
90
|
+
reactVersion,
|
|
69
91
|
});
|
|
70
92
|
if (typeof Page !== "function") {
|
|
71
93
|
throw COMPILATION_ERROR.create({
|
|
@@ -73,39 +95,77 @@ export async function renderAppRouteToHTML(args) {
|
|
|
73
95
|
context: { pageFile, type: typeof Page },
|
|
74
96
|
});
|
|
75
97
|
}
|
|
98
|
+
const hydrationStrategy = determineClientModuleStrategy({
|
|
99
|
+
isLocalProject: false,
|
|
100
|
+
environment: "production",
|
|
101
|
+
});
|
|
102
|
+
const layoutDescriptors = layouts.map((path) => ({ kind: "tsx", path }));
|
|
103
|
+
const clientPageIsland = await planClientPageIsland({
|
|
104
|
+
pageSource,
|
|
105
|
+
pagePath: pageFile,
|
|
106
|
+
projectDir,
|
|
107
|
+
appDir: config?.directories?.app ?? "app",
|
|
108
|
+
layouts: layoutDescriptors,
|
|
109
|
+
fs: adapter.fs,
|
|
110
|
+
strategy: hydrationStrategy,
|
|
111
|
+
});
|
|
76
112
|
let element = React.createElement(Page);
|
|
113
|
+
const loadedLayouts = new Array(layouts.length);
|
|
77
114
|
for (let i = layouts.length - 1; i >= 0; i--) {
|
|
78
115
|
const layoutPath = layouts[i];
|
|
79
116
|
if (!layoutPath)
|
|
80
117
|
continue;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
: Layout;
|
|
88
|
-
element = React.createElement(LayoutToApply, { children: element });
|
|
118
|
+
const Layout = await loadComponent(adapter, layoutPath, projectDir, contentSourceId, reactVersion);
|
|
119
|
+
if (typeof Layout !== "function") {
|
|
120
|
+
throw COMPILATION_ERROR.create({
|
|
121
|
+
detail: "Invalid layout component",
|
|
122
|
+
context: { layoutPath, type: typeof Layout },
|
|
123
|
+
});
|
|
89
124
|
}
|
|
90
|
-
|
|
91
|
-
|
|
125
|
+
const LayoutToApply = shouldUnwrapAppRouterDocumentLayout(layoutPath, projectDir, config?.directories?.app)
|
|
126
|
+
? unwrapAppRouterDocumentLayout(React, Layout)
|
|
127
|
+
: Layout;
|
|
128
|
+
loadedLayouts[i] = LayoutToApply;
|
|
129
|
+
}
|
|
130
|
+
const clientLayoutStart = clientPageIsland?.serverLayouts.length ?? 0;
|
|
131
|
+
const firstLayoutToApply = clientPageIsland ? clientLayoutStart : 0;
|
|
132
|
+
for (let i = loadedLayouts.length - 1; i >= firstLayoutToApply; i--) {
|
|
133
|
+
const Layout = loadedLayouts[i];
|
|
134
|
+
if (Layout)
|
|
135
|
+
element = React.createElement(Layout, { children: element });
|
|
136
|
+
}
|
|
137
|
+
if (clientPageIsland) {
|
|
138
|
+
element = React.createElement("div", { id: CLIENT_PAGE_ISLAND_ID }, element);
|
|
139
|
+
for (let i = clientLayoutStart - 1; i >= 0; i--) {
|
|
140
|
+
const Layout = loadedLayouts[i];
|
|
141
|
+
if (Layout)
|
|
142
|
+
element = React.createElement(Layout, { children: element });
|
|
92
143
|
}
|
|
93
144
|
}
|
|
94
|
-
const htmlInner = await renderToStringAdapter(element);
|
|
145
|
+
const htmlInner = await renderToStringAdapter(element, { reactVersion });
|
|
95
146
|
const title = "Veryfront App";
|
|
96
147
|
const slug = routePathToSlug(routePath);
|
|
97
|
-
const importMapJson = await buildImportMapJson({
|
|
98
|
-
|
|
148
|
+
const importMapJson = await buildImportMapJson({
|
|
149
|
+
projectDir,
|
|
150
|
+
config: {
|
|
151
|
+
...config,
|
|
152
|
+
react: { ...config?.react, version: reactVersion },
|
|
153
|
+
},
|
|
154
|
+
releaseAssetManifest,
|
|
155
|
+
});
|
|
156
|
+
const hydrationData = clientPageIsland || hasUseClientDirective(pageSource)
|
|
99
157
|
? generateHydrationData(slug, {}, {}, {
|
|
100
158
|
mode: "production",
|
|
101
159
|
environment: "production",
|
|
160
|
+
config,
|
|
102
161
|
projectDir,
|
|
103
162
|
pagePath: pageFile,
|
|
104
163
|
pageType: "tsx",
|
|
105
164
|
releaseAssetManifest,
|
|
106
165
|
isLocalProject: false,
|
|
107
166
|
forceProductionScripts: true,
|
|
108
|
-
nestedLayouts:
|
|
167
|
+
nestedLayouts: clientPageIsland?.clientLayouts ?? layoutDescriptors,
|
|
168
|
+
isolatedClientPage: Boolean(clientPageIsland),
|
|
109
169
|
}, { pretty: false })
|
|
110
170
|
: null;
|
|
111
171
|
const hydrationDataScript = hydrationData
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { RuntimeAdapter } from "../platform/adapters/base.js";
|
|
5
5
|
import type { AppRouteInfo, RouteInfo } from "./build-types.js";
|
|
6
|
-
export declare function collectPagesRoutes(adapter: RuntimeAdapter, projectDir: string, include?: string[], exclude?: string[]): Promise<RouteInfo[]>;
|
|
6
|
+
export declare function collectPagesRoutes(adapter: RuntimeAdapter, projectDir: string, include?: string[], exclude?: string[], pagesDirectory?: string): Promise<RouteInfo[]>;
|
|
7
7
|
/**
|
|
8
8
|
* Collect App Router literal routes (static analyzable)
|
|
9
9
|
*/
|
|
10
|
-
export declare function collectAppRoutes(adapter: RuntimeAdapter, projectDir: string, include?: string[], exclude?: string[]): Promise<AppRouteInfo[]>;
|
|
10
|
+
export declare function collectAppRoutes(adapter: RuntimeAdapter, projectDir: string, include?: string[], exclude?: string[], appDirectory?: string): Promise<AppRouteInfo[]>;
|
|
11
11
|
//# sourceMappingURL=build-routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-routes.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-routes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAsBhE,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"build-routes.d.ts","sourceRoot":"","sources":["../../../src/src/server/build-routes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAsBhE,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,cAAc,SAAU,GACvB,OAAO,CAAC,SAAS,EAAE,CAAC,CAuBtB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,YAAY,SAAQ,GACnB,OAAO,CAAC,YAAY,EAAE,CAAC,CAgBzB"}
|
|
@@ -6,12 +6,12 @@ import { isNotFoundError } from "../platform/compat/fs.js";
|
|
|
6
6
|
import { join, relative } from "../platform/compat/path/index.js";
|
|
7
7
|
import { discoverFiles } from "../utils/file-discovery.js";
|
|
8
8
|
import { isDynamicSegment } from "../utils/route-path-utils.js";
|
|
9
|
-
const PAGE_EXTENSIONS = [".mdx", ".md", ".tsx", ".jsx", ".ts"];
|
|
9
|
+
const PAGE_EXTENSIONS = [".mdx", ".md", ".tsx", ".jsx", ".ts", ".js"];
|
|
10
10
|
const PAGE_CANDIDATES = ["page.mdx", "page.md", "page.tsx", "page.jsx", "page.ts", "page.js"];
|
|
11
11
|
function convertToSlug(relativePath) {
|
|
12
12
|
return (relativePath
|
|
13
13
|
.replace(/\\/g, "/")
|
|
14
|
-
.replace(/\.(mdx|md|tsx|jsx|ts)$/, "")
|
|
14
|
+
.replace(/\.(mdx|md|tsx|jsx|ts|js)$/, "")
|
|
15
15
|
.replace(/\/index$/, "") || "index");
|
|
16
16
|
}
|
|
17
17
|
function shouldIncludeRoute(path, include, exclude) {
|
|
@@ -21,50 +21,44 @@ function shouldIncludeRoute(path, include, exclude) {
|
|
|
21
21
|
return false;
|
|
22
22
|
return true;
|
|
23
23
|
}
|
|
24
|
-
export async function collectPagesRoutes(adapter, projectDir, include, exclude) {
|
|
24
|
+
export async function collectPagesRoutes(adapter, projectDir, include, exclude, pagesDirectory = "pages") {
|
|
25
25
|
const routes = [];
|
|
26
|
+
const pagesDir = join(projectDir, pagesDirectory);
|
|
26
27
|
try {
|
|
27
|
-
const pagesDir = join(projectDir, "pages");
|
|
28
28
|
await adapter.fs.stat(pagesDir);
|
|
29
|
-
for await (const file of discoverFiles({ baseDir: pagesDir, extensions: PAGE_EXTENSIONS, adapter })) {
|
|
30
|
-
const relativePath = relative(pagesDir, file.path);
|
|
31
|
-
const slug = convertToSlug(relativePath);
|
|
32
|
-
const pathForRoute = `/${slug === "index" ? "" : slug}`;
|
|
33
|
-
if (!shouldIncludeRoute(pathForRoute, include, exclude))
|
|
34
|
-
continue;
|
|
35
|
-
routes.push({ path: pathForRoute, file: file.path, slug });
|
|
36
|
-
}
|
|
37
29
|
}
|
|
38
|
-
catch (
|
|
39
|
-
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (isNotFoundError(error))
|
|
32
|
+
return routes;
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
for await (const file of discoverFiles({ baseDir: pagesDir, extensions: PAGE_EXTENSIONS, adapter })) {
|
|
36
|
+
const relativePath = relative(pagesDir, file.path);
|
|
37
|
+
const slug = convertToSlug(relativePath);
|
|
38
|
+
const pathForRoute = `/${slug === "index" ? "" : slug}`;
|
|
39
|
+
if (!shouldIncludeRoute(pathForRoute, include, exclude))
|
|
40
|
+
continue;
|
|
41
|
+
routes.push({ path: pathForRoute, file: file.path, slug });
|
|
40
42
|
}
|
|
41
43
|
return routes;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Collect App Router literal routes (static analyzable)
|
|
45
47
|
*/
|
|
46
|
-
export async function collectAppRoutes(adapter, projectDir, include, exclude) {
|
|
48
|
+
export async function collectAppRoutes(adapter, projectDir, include, exclude, appDirectory = "app") {
|
|
49
|
+
const collected = [];
|
|
50
|
+
const appRoot = join(projectDir, appDirectory);
|
|
47
51
|
try {
|
|
48
|
-
const collected = [];
|
|
49
|
-
const appRoot = join(projectDir, "app");
|
|
50
52
|
await adapter.fs.stat(appRoot);
|
|
51
|
-
await walkAppSSG(adapter, appRoot, [], [appRoot], collected);
|
|
52
|
-
logger.debug(`Found ${collected.length} App Router static routes`);
|
|
53
|
-
return collected.filter((r) => shouldIncludeRoute(r.path, include, exclude));
|
|
54
53
|
}
|
|
55
|
-
catch (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return [];
|
|
60
|
-
}
|
|
61
|
-
// Anything else (permission error, adapter failure, a bug thrown mid-traversal)
|
|
62
|
-
// must fail loudly so a broken SSG build doesn't silently emit zero routes.
|
|
63
|
-
logger.error("Failed to collect App Router routes for SSG", {
|
|
64
|
-
error: e instanceof Error ? e.message : String(e),
|
|
65
|
-
});
|
|
66
|
-
throw e;
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (isNotFoundError(error))
|
|
56
|
+
return collected;
|
|
57
|
+
throw error;
|
|
67
58
|
}
|
|
59
|
+
await walkAppSSG(adapter, appRoot, [], [appRoot], collected);
|
|
60
|
+
logger.debug(`Found ${collected.length} App Router static routes`);
|
|
61
|
+
return collected.filter((r) => shouldIncludeRoute(r.path, include, exclude));
|
|
68
62
|
}
|
|
69
63
|
function isForceDynamic(source) {
|
|
70
64
|
// Regex-based heuristic: matches the common `export const dynamic = "force-dynamic"`
|
|
@@ -78,31 +72,28 @@ async function walkAppSSG(adapter, dir, segs, segDirs, collected) {
|
|
|
78
72
|
if (isDynamicSegment(baseName))
|
|
79
73
|
return;
|
|
80
74
|
for (const filePath of PAGE_CANDIDATES.map((n) => join(dir, n))) {
|
|
75
|
+
let isFile = false;
|
|
81
76
|
try {
|
|
82
|
-
|
|
83
|
-
if (!st.isFile)
|
|
84
|
-
continue;
|
|
85
|
-
const src = (await adapter.fs.readFile(filePath).catch((error) => {
|
|
86
|
-
logger.warn("Failed to read route file for SSG analysis", {
|
|
87
|
-
filePath,
|
|
88
|
-
error: error instanceof Error ? error.message : String(error),
|
|
89
|
-
});
|
|
90
|
-
return "";
|
|
91
|
-
})) ?? "";
|
|
92
|
-
if (isForceDynamic(src))
|
|
93
|
-
break;
|
|
94
|
-
const path = `/${segs.join("/")}`;
|
|
95
|
-
collected.push({
|
|
96
|
-
path: path === "/" ? "/" : path,
|
|
97
|
-
pageFile: filePath,
|
|
98
|
-
segments: [...segs],
|
|
99
|
-
segmentDirs: [...segDirs],
|
|
100
|
-
});
|
|
101
|
-
break;
|
|
77
|
+
isFile = (await adapter.fs.stat(filePath)).isFile;
|
|
102
78
|
}
|
|
103
|
-
catch (
|
|
104
|
-
|
|
79
|
+
catch (error) {
|
|
80
|
+
if (isNotFoundError(error))
|
|
81
|
+
continue;
|
|
82
|
+
throw error;
|
|
105
83
|
}
|
|
84
|
+
if (!isFile)
|
|
85
|
+
continue;
|
|
86
|
+
const src = await adapter.fs.readFile(filePath);
|
|
87
|
+
if (isForceDynamic(src))
|
|
88
|
+
break;
|
|
89
|
+
const path = `/${segs.join("/")}`;
|
|
90
|
+
collected.push({
|
|
91
|
+
path: path === "/" ? "/" : path,
|
|
92
|
+
pageFile: filePath,
|
|
93
|
+
segments: [...segs],
|
|
94
|
+
segmentDirs: [...segDirs],
|
|
95
|
+
});
|
|
96
|
+
break;
|
|
106
97
|
}
|
|
107
98
|
for await (const entry of adapter.fs.readDir(dir)) {
|
|
108
99
|
if (!entry.isDirectory)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/request-handler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"request-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/request-handler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAa7D,qBAAa,cAAc;IAIvB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM,CAAC;IACf,OAAO,CAAC,kBAAkB,CAAC;IAC3B,OAAO,CAAC,gBAAgB,CAAC;IACzB,OAAO,CAAC,aAAa,CAAC;IAVxB,OAAO,CAAC,cAAc,CAAC,CAAsC;gBAGnD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,MAAM,OAAO,EACtB,OAAO,EAAE,MAAM,OAAO,EACtB,MAAM,CAAC,EAAE,eAAe,YAAA,EACxB,kBAAkB,CAAC,EAAE,MAAM,YAAA,EAC3B,gBAAgB,CAAC,EAAE,MAAM,YAAA,EACzB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YAAA;IAG1C,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IA0BpD,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,iBAAiB;YAiBX,uBAAuB;IASrC,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,oBAAoB;YAYd,wBAAwB;IAiBtC,wBAAwB,IAAI,IAAI;IAgBhC,OAAO,CAAC,iBAAiB;CAqB1B"}
|
|
@@ -7,6 +7,7 @@ import { clearLayoutDiscoveryCache } from "../../rendering/layouts/index.js";
|
|
|
7
7
|
import { clearRendererCacheForProject } from "../../rendering/renderer.js";
|
|
8
8
|
import { getErrorCollector } from "../../observability/error-collector.js";
|
|
9
9
|
import { getLogBuffer } from "../../observability/log-buffer.js";
|
|
10
|
+
import { invalidateRSCHandlersForProject } from "../services/rsc/endpoints/handler-registry.js";
|
|
10
11
|
const logger = serverLogger.component("dev");
|
|
11
12
|
export class RequestHandler {
|
|
12
13
|
projectDir;
|
|
@@ -132,6 +133,7 @@ export class RequestHandler {
|
|
|
132
133
|
}
|
|
133
134
|
invalidateRuntimeHandler() {
|
|
134
135
|
this.runtimeHandler = undefined;
|
|
136
|
+
invalidateRSCHandlersForProject(this.projectDir, this.defaultProjectId);
|
|
135
137
|
resetApiHandler(this.projectDir).catch((error) => {
|
|
136
138
|
logger.debug("resetApiHandler failed", error);
|
|
137
139
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-discovery.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/route-discovery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA4B7D,qBAAa,cAAc;IAIvB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM,CAAC;IANjB,OAAO,CAAC,gBAAgB,CAAU;gBAGxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,eAAe,EACvB,MAAM,CAAC,EAAE,eAAe,YAAA;IAM5B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;YAoCvB,uBAAuB;
|
|
1
|
+
{"version":3,"file":"route-discovery.d.ts","sourceRoot":"","sources":["../../../../src/src/server/dev-server/route-discovery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA4B7D,qBAAa,cAAc;IAIvB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM,CAAC;IANjB,OAAO,CAAC,gBAAgB,CAAU;gBAGxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,eAAe,EACvB,MAAM,CAAC,EAAE,eAAe,YAAA;IAM5B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;YAoCvB,uBAAuB;YA4DvB,eAAe;YA6Bf,mBAAmB;YAsCnB,iBAAiB;YAIjB,0BAA0B;IA4BxC,OAAO,CAAC,uBAAuB;IAM/B,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,qBAAqB;CAM9B"}
|
|
@@ -69,14 +69,16 @@ export class RouteDiscovery {
|
|
|
69
69
|
}
|
|
70
70
|
async resolveRouteDirectories() {
|
|
71
71
|
const preferredRouter = this.config?.router;
|
|
72
|
+
const appDir = this.config?.directories?.app ?? "app";
|
|
73
|
+
const pagesDir = this.config?.directories?.pages ?? "pages";
|
|
72
74
|
const results = [];
|
|
73
75
|
const candidates = [];
|
|
74
76
|
if (preferredRouter === "app")
|
|
75
|
-
candidates.push({ type: "app", dir:
|
|
77
|
+
candidates.push({ type: "app", dir: appDir });
|
|
76
78
|
else if (preferredRouter === "pages")
|
|
77
|
-
candidates.push({ type: "pages", dir:
|
|
79
|
+
candidates.push({ type: "pages", dir: pagesDir });
|
|
78
80
|
else
|
|
79
|
-
candidates.push({ type: "app", dir:
|
|
81
|
+
candidates.push({ type: "app", dir: appDir }, { type: "pages", dir: pagesDir });
|
|
80
82
|
const veryfrontDir = this.useRelativePaths ? ".veryfront" : join(this.projectDir, ".veryfront");
|
|
81
83
|
if (await this.directoryExists(veryfrontDir)) {
|
|
82
84
|
results.push({ type: "pages", path: veryfrontDir });
|
|
@@ -91,23 +93,26 @@ export class RouteDiscovery {
|
|
|
91
93
|
}
|
|
92
94
|
if (results.length === 0) {
|
|
93
95
|
if (preferredRouter === "app") {
|
|
94
|
-
const pagesFallback = this.useRelativePaths ?
|
|
96
|
+
const pagesFallback = this.useRelativePaths ? pagesDir : join(this.projectDir, pagesDir);
|
|
95
97
|
if (await this.directoryExists(pagesFallback)) {
|
|
96
|
-
logger.warn(
|
|
98
|
+
logger.warn(`router="app" but ${appDir}/ directory missing; falling back to ${pagesDir}/`);
|
|
97
99
|
results.push({ type: "pages", path: pagesFallback });
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
else if (preferredRouter === "pages") {
|
|
101
|
-
const appFallback = this.useRelativePaths ?
|
|
103
|
+
const appFallback = this.useRelativePaths ? appDir : join(this.projectDir, appDir);
|
|
102
104
|
if (await this.directoryExists(appFallback)) {
|
|
103
|
-
logger.warn(
|
|
105
|
+
logger.warn(`router="pages" but ${pagesDir}/ directory missing; using ${appDir}/`);
|
|
104
106
|
results.push({ type: "app", path: appFallback });
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
else {
|
|
108
110
|
const fallbackDirs = [
|
|
109
|
-
{ type: "app", path: this.useRelativePaths ?
|
|
110
|
-
{
|
|
111
|
+
{ type: "app", path: this.useRelativePaths ? appDir : join(this.projectDir, appDir) },
|
|
112
|
+
{
|
|
113
|
+
type: "pages",
|
|
114
|
+
path: this.useRelativePaths ? pagesDir : join(this.projectDir, pagesDir),
|
|
115
|
+
},
|
|
111
116
|
];
|
|
112
117
|
for (const fallback of fallbackDirs) {
|
|
113
118
|
if (await this.directoryExists(fallback.path))
|
|
@@ -147,7 +152,7 @@ export class RouteDiscovery {
|
|
|
147
152
|
if (shouldSkipEntry(entry.name, dir))
|
|
148
153
|
continue;
|
|
149
154
|
const fullPath = join(dir, entry.name);
|
|
150
|
-
const routePath = `${prefix}/${entry.name.replace(/\.(tsx?|jsx?|mdx)$/, "")}`.replace(/\/+/g, "/");
|
|
155
|
+
const routePath = `${prefix}/${entry.name.replace(/\.(tsx?|jsx?|mdx?)$/, "")}`.replace(/\/+/g, "/");
|
|
151
156
|
if (routePath.length > 500) {
|
|
152
157
|
logger.warn(`Route path too long, skipping: ${routePath.slice(0, 100)}...`);
|
|
153
158
|
continue;
|
|
@@ -156,7 +161,7 @@ export class RouteDiscovery {
|
|
|
156
161
|
await this.discoverPagesRoutes(fullPath, routePath);
|
|
157
162
|
continue;
|
|
158
163
|
}
|
|
159
|
-
if (!entry.isFile || !/\.(tsx?|jsx?|mdx
|
|
164
|
+
if (!entry.isFile || !/\.(tsx?|jsx?|mdx?)$/.test(entry.name))
|
|
160
165
|
continue;
|
|
161
166
|
if (routePath.startsWith("/api"))
|
|
162
167
|
continue;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { Plugin } from "../../../../extensions/bundler/index.js";
|
|
2
2
|
import type { RuntimeAdapter } from "../../../../platform/adapters/base.js";
|
|
3
3
|
import { type LockfileManager } from "../../../../utils/import-lockfile.js";
|
|
4
|
+
export interface RelativeFsPluginOptions {
|
|
5
|
+
enforceBrowserBoundaries?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type BrowserModulePathStatus = "trusted" | "symlink" | "unavailable";
|
|
8
|
+
export declare function inspectBrowserModulePath(projectDir: string, filePath: string, adapter: RuntimeAdapter): Promise<BrowserModulePathStatus>;
|
|
4
9
|
/** Create relative file system plugin for resolving imports via adapter's fs */
|
|
5
|
-
export declare function createRelativeFsPlugin(projectDir: string, adapter: RuntimeAdapter): Plugin;
|
|
10
|
+
export declare function createRelativeFsPlugin(projectDir: string, adapter: RuntimeAdapter, options?: RelativeFsPluginOptions): Plugin;
|
|
6
11
|
interface BareExternalPluginOptions {
|
|
7
12
|
bundle?: boolean;
|
|
8
13
|
lockfile?: LockfileManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild-plugins.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/dev/files/esbuild-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,MAAM,EAAe,MAAM,yCAAyC,CAAC;AAG9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAQ5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"esbuild-plugins.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/dev/files/esbuild-plugins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,MAAM,EAAe,MAAM,yCAAyC,CAAC;AAG9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAQ5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,sCAAsC,CAAC;AAgC9C,MAAM,WAAW,uBAAuB;IACtC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AASD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAE5E,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,uBAAuB,CAAC,CAmClC;AAoBD,gFAAgF;AAChF,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAiKR;AAKD,UAAU,yBAAyB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AA+DD,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,yBAAyB,GAAG,OAAe,GACnD,MAAM,CAqER;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAUjD"}
|