veryfront 0.1.48 → 0.1.49
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/app/components/inline-input.d.ts +1 -4
- package/esm/cli/app/components/inline-input.d.ts.map +1 -1
- package/esm/cli/app/components/inline-input.js +1 -1
- package/esm/cli/app/components/list-select.d.ts +0 -8
- package/esm/cli/app/components/list-select.d.ts.map +1 -1
- package/esm/cli/app/components/list-select.js +0 -13
- package/esm/cli/app/operations/project-creation.d.ts +2 -14
- package/esm/cli/app/operations/project-creation.d.ts.map +1 -1
- package/esm/cli/app/operations/project-creation.js +3 -68
- package/esm/cli/app/shell.js +1 -1
- package/esm/cli/app/utils.d.ts +1 -2
- package/esm/cli/app/utils.d.ts.map +1 -1
- package/esm/cli/app/utils.js +1 -17
- package/esm/cli/app/views/dashboard.d.ts +0 -4
- package/esm/cli/app/views/dashboard.d.ts.map +1 -1
- package/esm/cli/app/views/dashboard.js +0 -15
- package/esm/cli/app/views/startup.d.ts +0 -4
- package/esm/cli/app/views/startup.d.ts.map +1 -1
- package/esm/cli/app/views/startup.js +0 -7
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +1 -2
- package/esm/cli/auth/token-store.js +1 -1
- package/esm/cli/auth/utils.d.ts +2 -1
- package/esm/cli/auth/utils.d.ts.map +1 -1
- package/esm/cli/commands/generate/integration-generator.js +1 -1
- package/esm/cli/commands/install/types.d.ts +2 -2
- package/esm/cli/help/formatters.d.ts +1 -1
- package/esm/cli/help/formatters.d.ts.map +1 -1
- package/esm/cli/help/formatters.js +8 -4
- package/esm/cli/help/main-help.d.ts.map +1 -1
- package/esm/cli/help/main-help.js +2 -2
- package/esm/cli/mcp/server.d.ts +0 -1
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +2 -5
- package/esm/cli/mcp/tools/dev-tools.d.ts +1 -1
- package/esm/cli/mcp/tools/dev-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/dev-tools.js +1 -2
- package/esm/cli/mcp/tools/scaffold-tools.d.ts +2 -2
- package/esm/cli/mcp/tools.d.ts +1 -2
- package/esm/cli/mcp/tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools.js +1 -2
- package/esm/cli/shared/reserve-slug.d.ts.map +1 -1
- package/esm/cli/shared/reserve-slug.js +1 -3
- package/esm/cli/sync/ignore.d.ts +1 -1
- package/esm/cli/sync/ignore.d.ts.map +1 -1
- package/esm/cli/sync/ignore.js +22 -18
- package/esm/cli/ui/colors.d.ts +0 -1
- package/esm/cli/ui/colors.d.ts.map +1 -1
- package/esm/cli/ui/colors.js +0 -10
- package/esm/cli/ui/dot-matrix.d.ts.map +1 -1
- package/esm/cli/ui/dot-matrix.js +2 -5
- package/esm/cli/ui/tui.js +2 -3
- package/esm/cli/utils/index.js +1 -2
- package/esm/cli/utils/package-manager.d.ts.map +1 -1
- package/esm/cli/utils/package-manager.js +3 -4
- package/esm/deno.d.ts +3 -0
- package/esm/deno.js +22 -19
- package/esm/src/agent/chat-handler.d.ts.map +1 -1
- package/esm/src/agent/chat-handler.js +8 -23
- package/esm/src/agent/factory.d.ts +0 -8
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +50 -1
- package/esm/src/agent/index.d.ts +16 -1
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +16 -1
- package/esm/src/agent/memory/memory.d.ts +2 -2
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +0 -1
- package/esm/src/agent/react/use-chat/types.d.ts +2 -0
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +15 -9
- package/esm/src/agent/runtime/index.d.ts +18 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +167 -36
- package/esm/src/agent/runtime/tool-helpers.d.ts +6 -1
- package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.js +10 -1
- package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
- package/esm/src/agent/types.d.ts +10 -0
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.js +2 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts +0 -2
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts.map +1 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.js +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.js +2 -3
- package/esm/src/build/compiler/mdx-to-js.d.ts +0 -2
- package/esm/src/build/compiler/mdx-to-js.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-to-js.js +0 -81
- package/esm/src/build/index.d.ts +0 -6
- package/esm/src/build/index.d.ts.map +1 -1
- package/esm/src/build/index.js +0 -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 +2 -3
- package/esm/src/build/production-build/templates.d.ts +5 -9
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +6 -18
- package/esm/src/build/vendor-cache.d.ts.map +1 -1
- package/esm/src/build/vendor-cache.js +0 -5
- package/esm/src/cache/tokenizing-gateway.d.ts +0 -2
- package/esm/src/cache/tokenizing-gateway.d.ts.map +1 -1
- package/esm/src/cache/tokenizing-gateway.js +1 -3
- package/esm/src/chat/index.d.ts +2 -2
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +1 -1
- package/esm/src/config/define-config.d.ts.map +1 -1
- package/esm/src/config/define-config.js +28 -25
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +10 -7
- package/esm/src/config/schemas/config.schema.d.ts +58 -12
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +12 -0
- package/esm/src/data/data-fetcher.d.ts +1 -2
- package/esm/src/data/data-fetcher.d.ts.map +1 -1
- package/esm/src/data/data-fetcher.js +14 -15
- package/esm/src/data/server-data-fetcher.d.ts +0 -3
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +1 -8
- package/esm/src/data/static-data-fetcher.d.ts +1 -3
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +1 -3
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +19 -1
- package/esm/src/discovery/discovery-utils.d.ts +0 -4
- package/esm/src/discovery/discovery-utils.d.ts.map +1 -1
- package/esm/src/discovery/discovery-utils.js +0 -6
- package/esm/src/discovery/file-discovery.d.ts +3 -1
- package/esm/src/discovery/file-discovery.d.ts.map +1 -1
- package/esm/src/discovery/file-discovery.js +3 -8
- package/esm/src/discovery/handlers/index.d.ts +1 -0
- package/esm/src/discovery/handlers/index.d.ts.map +1 -1
- package/esm/src/discovery/handlers/index.js +1 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts +26 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts.map +1 -0
- package/esm/src/discovery/handlers/skill-handler.js +87 -0
- package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
- package/esm/src/discovery/handlers/task-handler.js +1 -5
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +7 -4
- package/esm/src/discovery/types.d.ts +3 -0
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/embedding/resolve.d.ts.map +1 -1
- package/esm/src/embedding/resolve.js +1 -3
- package/esm/src/embedding/upload-handler.d.ts.map +1 -1
- package/esm/src/embedding/upload-handler.js +4 -3
- package/esm/src/embedding/upload-store.js +4 -4
- package/esm/src/errors/error-registry.d.ts +2 -1
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/http-error.d.ts +1 -2
- package/esm/src/errors/http-error.d.ts.map +1 -1
- package/esm/src/errors/http-error.js +2 -2
- package/esm/src/errors/middleware/cli-error-boundary.d.ts.map +1 -1
- package/esm/src/errors/middleware/cli-error-boundary.js +13 -2
- package/esm/src/errors/middleware/wrap-unknown.d.ts +0 -7
- package/esm/src/errors/middleware/wrap-unknown.d.ts.map +1 -1
- package/esm/src/errors/middleware/wrap-unknown.js +0 -9
- package/esm/src/errors/veryfront-error.d.ts +0 -3
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/errors/veryfront-error.js +0 -5
- package/esm/src/html/schemas/html.schema.d.ts +2 -2
- package/esm/src/html/styles-builder/css-hash-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.js +1 -2
- package/esm/src/html/styles-builder/plugin-loader.d.ts.map +1 -1
- package/esm/src/html/styles-builder/plugin-loader.js +50 -21
- package/esm/src/html/styles-builder/tailwind-compiler-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/tailwind-compiler-cache.js +12 -4
- package/esm/src/html/utils.d.ts +0 -7
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +0 -25
- package/esm/src/modules/component-registry/registry.d.ts +0 -3
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/component-registry/registry.js +0 -3
- package/esm/src/oauth/handlers/callback-handler.d.ts +2 -0
- package/esm/src/oauth/handlers/callback-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.js +10 -4
- package/esm/src/oauth/providers/common.d.ts.map +1 -1
- package/esm/src/oauth/providers/common.js +0 -23
- package/esm/src/observability/auto-instrument/react-instrumentation.js +2 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts +1 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts.map +1 -1
- package/esm/src/observability/instruments/instruments-factory.js +5 -4
- package/esm/src/observability/metrics/config.js +5 -4
- package/esm/src/observability/metrics/manager.js +1 -1
- package/esm/src/observability/tracing/span-operations.d.ts.map +1 -1
- package/esm/src/observability/tracing/span-operations.js +14 -8
- package/esm/src/platform/compat/console/node.d.ts +0 -1
- package/esm/src/platform/compat/console/node.d.ts.map +1 -1
- package/esm/src/platform/compat/console/node.js +4 -11
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +4 -2
- package/esm/src/platform/compat/opaque-deps.d.ts +4 -2
- package/esm/src/platform/compat/opaque-deps.d.ts.map +1 -1
- package/esm/src/platform/compat/opaque-deps.js +1 -1
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +8 -7
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +15 -10
- package/esm/src/platform/compat/path/url-conversion.d.ts.map +1 -1
- package/esm/src/platform/compat/path/url-conversion.js +3 -2
- package/esm/src/platform/compat/process.d.ts +2 -14
- package/esm/src/platform/compat/process.d.ts.map +1 -1
- package/esm/src/platform/compat/process.js +92 -70
- package/esm/src/provider/index.d.ts +1 -1
- package/esm/src/provider/index.d.ts.map +1 -1
- package/esm/src/provider/index.js +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.js +18 -18
- package/esm/src/provider/local/env.d.ts.map +1 -1
- package/esm/src/provider/local/env.js +2 -1
- package/esm/src/provider/model-registry.d.ts +10 -0
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +43 -0
- package/esm/src/proxy/retry.d.ts +3 -3
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +0 -7
- package/esm/src/proxy/tracing.d.ts +1 -5
- package/esm/src/proxy/tracing.d.ts.map +1 -1
- package/esm/src/proxy/tracing.js +1 -7
- package/esm/src/react/components/ai/chat/components/code-block.js +1 -1
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts +12 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.js +34 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.js +4 -4
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/chat-message-list.js +8 -2
- package/esm/src/react/components/ai/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/message.js +8 -2
- package/esm/src/react/components/ai/chat/index.d.ts +4 -1
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.js +4 -3
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts +2 -0
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/utils/message-parts.js +9 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts +1 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat-with-sidebar.js +1 -0
- package/esm/src/react/components/ai/chat.d.ts +1 -1
- package/esm/src/react/components/ai/chat.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat.js +1 -1
- package/esm/src/rendering/cache/index.d.ts +1 -5
- package/esm/src/rendering/cache/index.d.ts.map +1 -1
- package/esm/src/rendering/cache/index.js +1 -5
- package/esm/src/rendering/orchestrator/pipeline.d.ts +11 -2
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.js +0 -4
- package/esm/src/repositories/schemas/index.d.ts +1 -1
- package/esm/src/repositories/schemas/index.d.ts.map +1 -1
- package/esm/src/repositories/schemas/index.js +1 -1
- package/esm/src/repositories/schemas/repository.schema.d.ts +0 -11
- package/esm/src/repositories/schemas/repository.schema.d.ts.map +1 -1
- package/esm/src/repositories/schemas/repository.schema.js +0 -13
- package/esm/src/repositories/types.d.ts +1 -1
- package/esm/src/repositories/types.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.js +63 -7
- package/esm/src/routing/api/openapi/path-utils.d.ts +0 -19
- package/esm/src/routing/api/openapi/path-utils.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/path-utils.js +0 -34
- package/esm/src/routing/api/openapi/spec-generator.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/spec-generator.js +1 -19
- package/esm/src/routing/api/openapi/types.d.ts +1 -0
- package/esm/src/routing/api/openapi/types.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/types.js +18 -0
- package/esm/src/sandbox/sandbox.d.ts +1 -0
- package/esm/src/sandbox/sandbox.d.ts.map +1 -1
- package/esm/src/sandbox/sandbox.js +7 -8
- package/esm/src/security/http/cors/constants.d.ts +0 -2
- package/esm/src/security/http/cors/constants.d.ts.map +1 -1
- package/esm/src/security/http/cors/constants.js +0 -2
- package/esm/src/security/http/response/index.d.ts +3 -4
- package/esm/src/security/http/response/index.d.ts.map +1 -1
- package/esm/src/security/http/response/index.js +2 -3
- package/esm/src/server/context/enriched-context.d.ts +0 -8
- package/esm/src/server/context/enriched-context.d.ts.map +1 -1
- package/esm/src/server/context/enriched-context.js +1 -12
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +11 -4
- package/esm/src/server/dev-ui/manifest.d.ts +20 -20
- package/esm/src/server/dev-ui/manifest.js +20 -20
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +426 -179
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +14 -24
- package/esm/src/server/shared/renderer/memory/pressure.d.ts +0 -7
- package/esm/src/server/shared/renderer/memory/pressure.d.ts.map +1 -1
- package/esm/src/server/shared/renderer/memory/pressure.js +1 -13
- package/esm/src/server/utils/domain-lookup.d.ts +0 -4
- package/esm/src/server/utils/domain-lookup.d.ts.map +1 -1
- package/esm/src/server/utils/domain-lookup.js +0 -3
- package/esm/src/skill/allowed-tools.d.ts +54 -0
- package/esm/src/skill/allowed-tools.d.ts.map +1 -0
- package/esm/src/skill/allowed-tools.js +87 -0
- package/esm/src/skill/executor.d.ts +28 -0
- package/esm/src/skill/executor.d.ts.map +1 -0
- package/esm/src/skill/executor.js +187 -0
- package/esm/src/skill/index.d.ts +19 -0
- package/esm/src/skill/index.d.ts.map +1 -0
- package/esm/src/skill/index.js +24 -0
- package/esm/src/skill/parser.d.ts +30 -0
- package/esm/src/skill/parser.d.ts.map +1 -0
- package/esm/src/skill/parser.js +162 -0
- package/esm/src/skill/path-safety.d.ts +22 -0
- package/esm/src/skill/path-safety.d.ts.map +1 -0
- package/esm/src/skill/path-safety.js +156 -0
- package/esm/src/skill/prompt-augmentation.d.ts +19 -0
- package/esm/src/skill/prompt-augmentation.d.ts.map +1 -0
- package/esm/src/skill/prompt-augmentation.js +36 -0
- package/esm/src/skill/registry.d.ts +25 -0
- package/esm/src/skill/registry.d.ts.map +1 -0
- package/esm/src/skill/registry.js +42 -0
- package/esm/src/skill/tools.d.ts +27 -0
- package/esm/src/skill/tools.d.ts.map +1 -0
- package/esm/src/skill/tools.js +149 -0
- package/esm/src/skill/types.d.ts +85 -0
- package/esm/src/skill/types.d.ts.map +1 -0
- package/esm/src/skill/types.js +27 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +1 -1
- package/esm/src/studio/element-selector-injector.d.ts +0 -2
- package/esm/src/studio/element-selector-injector.d.ts.map +1 -1
- package/esm/src/task/runner.d.ts +6 -0
- package/esm/src/task/runner.d.ts.map +1 -1
- package/esm/src/task/runner.js +8 -8
- package/esm/src/tool/factory.js +31 -39
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +0 -8
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +0 -20
- package/esm/src/transforms/esm/path-resolver.d.ts +0 -14
- package/esm/src/transforms/esm/path-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/path-resolver.js +1 -92
- package/esm/src/transforms/esm/source-url-embed.d.ts +0 -14
- package/esm/src/transforms/esm/source-url-embed.d.ts.map +1 -1
- package/esm/src/transforms/esm/source-url-embed.js +0 -47
- package/esm/src/transforms/esm/transform-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/transform-cache.js +2 -6
- package/esm/src/transforms/mdx/index.d.ts +0 -1
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +0 -4
- package/esm/src/transforms/pipeline/context.d.ts +0 -1
- package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/context.js +0 -1
- package/esm/src/transforms/pipeline/index.d.ts +1 -2
- package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/index.js +0 -3
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +0 -1
- package/esm/src/types/entities/getEntityInfo.js +1 -1
- package/esm/src/types/index.d.ts +2 -13
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/server.d.ts +2 -1
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.d.ts +1 -1
- package/esm/src/utils/cache-file-ops.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.js +5 -6
- package/esm/src/utils/lru-wrapper.d.ts.map +1 -1
- package/esm/src/utils/lru-wrapper.js +2 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts +0 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/event-publisher.js +2 -6
- package/esm/src/workflow/executor/workflow-executor.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-executor.js +6 -1
- package/esm/src/workflow/react/use-workflow-list.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +2 -1
- package/esm/src/workflow/schemas/workflow.schema.d.ts +8 -8
- package/package.json +1 -2
- package/src/cli/app/components/inline-input.ts +0 -5
- package/src/cli/app/components/list-select.ts +0 -21
- package/src/cli/app/operations/project-creation.ts +4 -109
- package/src/cli/app/shell.ts +1 -1
- package/src/cli/app/utils.ts +0 -22
- package/src/cli/app/views/dashboard.ts +0 -17
- package/src/cli/app/views/startup.ts +0 -13
- package/src/cli/auth/login.ts +1 -2
- package/src/cli/auth/token-store.ts +1 -1
- package/src/cli/auth/utils.ts +2 -1
- package/src/cli/commands/generate/integration-generator.ts +1 -1
- package/src/cli/help/formatters.ts +11 -4
- package/src/cli/help/main-help.ts +2 -3
- package/src/cli/mcp/server.ts +2 -5
- package/src/cli/mcp/tools/dev-tools.ts +1 -2
- package/src/cli/mcp/tools.ts +8 -2
- package/src/cli/shared/reserve-slug.ts +1 -4
- package/src/cli/sync/ignore.ts +26 -21
- package/src/cli/ui/colors.ts +0 -12
- package/src/cli/ui/dot-matrix.ts +3 -6
- package/src/cli/ui/tui.ts +3 -3
- package/src/cli/utils/index.ts +1 -1
- package/src/cli/utils/package-manager.ts +3 -4
- package/src/deno.js +22 -19
- package/src/src/agent/chat-handler.ts +8 -23
- package/src/src/agent/factory.ts +58 -9
- package/src/src/agent/index.ts +16 -1
- package/src/src/agent/memory/memory.ts +0 -9
- package/src/src/agent/react/use-chat/types.ts +2 -0
- package/src/src/agent/react/use-chat/use-chat.ts +15 -9
- package/src/src/agent/runtime/index.ts +213 -35
- package/src/src/agent/runtime/tool-helpers.ts +9 -0
- package/src/src/agent/types.ts +10 -0
- package/src/src/ai/registry-manager.ts +2 -1
- package/src/src/build/bundler/code-splitter/manifest-builder.ts +1 -1
- package/src/src/build/compiler/mdx-compiler/validator.ts +3 -7
- package/src/src/build/compiler/mdx-to-js.ts +0 -101
- package/src/src/build/index.ts +0 -8
- package/src/src/build/production-build/build/route-collector.ts +2 -4
- package/src/src/build/production-build/templates.ts +9 -18
- package/src/src/build/vendor-cache.ts +0 -6
- package/src/src/cache/tokenizing-gateway.ts +1 -9
- package/src/src/chat/index.ts +3 -0
- package/src/src/config/define-config.ts +30 -29
- package/src/src/config/loader.ts +10 -9
- package/src/src/config/schemas/config.schema.ts +12 -0
- package/src/src/data/data-fetcher.ts +15 -21
- package/src/src/data/server-data-fetcher.ts +1 -8
- package/src/src/data/static-data-fetcher.ts +1 -6
- package/src/src/discovery/discovery-engine.ts +27 -0
- package/src/src/discovery/discovery-utils.ts +0 -7
- package/src/src/discovery/file-discovery.ts +3 -9
- package/src/src/discovery/handlers/index.ts +1 -0
- package/src/src/discovery/handlers/skill-handler.ts +123 -0
- package/src/src/discovery/handlers/task-handler.ts +1 -5
- package/src/src/discovery/transpiler.ts +7 -4
- package/src/src/discovery/types.ts +3 -0
- package/src/src/embedding/resolve.ts +1 -3
- package/src/src/embedding/upload-handler.ts +7 -3
- package/src/src/embedding/upload-store.ts +4 -4
- package/src/src/errors/error-registry.ts +2 -2
- package/src/src/errors/http-error.ts +7 -3
- package/src/src/errors/middleware/cli-error-boundary.ts +28 -2
- package/src/src/errors/middleware/wrap-unknown.ts +0 -10
- package/src/src/errors/veryfront-error.ts +0 -9
- package/src/src/html/styles-builder/css-hash-cache.ts +5 -2
- package/src/src/html/styles-builder/plugin-loader.ts +58 -21
- package/src/src/html/styles-builder/tailwind-compiler-cache.ts +11 -4
- package/src/src/html/utils.ts +0 -33
- package/src/src/modules/component-registry/registry.ts +0 -3
- package/src/src/modules/server/websocket-handler.ts +1 -1
- package/src/src/oauth/handlers/callback-handler.ts +17 -5
- package/src/src/oauth/providers/base.ts +3 -3
- package/src/src/oauth/providers/common.ts +0 -23
- package/src/src/observability/auto-instrument/react-instrumentation.ts +2 -2
- package/src/src/observability/instruments/instruments-factory.ts +6 -6
- package/src/src/observability/metrics/config.ts +5 -5
- package/src/src/observability/metrics/manager.ts +1 -1
- package/src/src/observability/tracing/span-operations.ts +14 -9
- package/src/src/platform/compat/console/node.ts +4 -14
- package/src/src/platform/compat/fs.ts +14 -3
- package/src/src/platform/compat/opaque-deps.ts +10 -5
- package/src/src/platform/compat/path/basic-operations.ts +9 -7
- package/src/src/platform/compat/path/resolution.ts +15 -8
- package/src/src/platform/compat/path/url-conversion.ts +10 -6
- package/src/src/platform/compat/process.ts +133 -76
- package/src/src/provider/index.ts +1 -0
- package/src/src/provider/local/ai-sdk-adapter.ts +40 -37
- package/src/src/provider/local/env.ts +4 -1
- package/src/src/provider/model-registry.ts +47 -0
- package/src/src/proxy/retry.ts +0 -9
- package/src/src/proxy/tracing.ts +1 -9
- package/src/src/react/components/ai/chat/components/code-block.tsx +1 -1
- package/src/src/react/components/ai/chat/components/skill-badge.tsx +51 -0
- package/src/src/react/components/ai/chat/components/step-indicator.tsx +4 -4
- package/src/src/react/components/ai/chat/composition/chat-message-list.tsx +9 -2
- package/src/src/react/components/ai/chat/composition/message.tsx +9 -2
- package/src/src/react/components/ai/chat/index.tsx +6 -1
- package/src/src/react/components/ai/chat/utils/message-parts.ts +11 -0
- package/src/src/react/components/ai/chat-with-sidebar.tsx +2 -0
- package/src/src/react/components/ai/chat.tsx +3 -0
- package/src/src/rendering/cache/index.ts +12 -5
- package/src/src/rendering/orchestrator/pipeline.ts +12 -2
- package/src/src/rendering/renderer.ts +1 -1
- package/src/src/rendering/shared/context-aware-cache.ts +0 -5
- package/src/src/repositories/schemas/index.ts +0 -2
- package/src/src/repositories/schemas/repository.schema.ts +0 -15
- package/src/src/repositories/types.ts +1 -6
- package/src/src/routing/api/module-loader/loader.ts +88 -3
- package/src/src/routing/api/openapi/path-utils.ts +0 -39
- package/src/src/routing/api/openapi/spec-generator.ts +1 -20
- package/src/src/routing/api/openapi/types.ts +20 -0
- package/src/src/sandbox/sandbox.ts +8 -8
- package/src/src/security/http/cors/constants.ts +0 -4
- package/src/src/security/http/response/index.ts +3 -9
- package/src/src/server/context/enriched-context.ts +1 -19
- package/src/src/server/dev-server/server.ts +11 -4
- package/src/src/server/dev-ui/manifest.js +20 -20
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +426 -179
- package/src/src/server/runtime-handler/index.ts +17 -28
- package/src/src/server/shared/renderer/memory/pressure.ts +2 -15
- package/src/src/server/utils/domain-lookup.ts +0 -4
- package/src/src/skill/allowed-tools.ts +107 -0
- package/src/src/skill/executor.ts +215 -0
- package/src/src/skill/index.ts +60 -0
- package/src/src/skill/parser.ts +214 -0
- package/src/src/skill/path-safety.ts +203 -0
- package/src/src/skill/prompt-augmentation.ts +48 -0
- package/src/src/skill/registry.ts +51 -0
- package/src/src/skill/tools.ts +197 -0
- package/src/src/skill/types.ts +107 -0
- package/src/src/studio/bridge/bridge-bundle.generated.ts +1 -1
- package/src/src/studio/element-selector-injector.ts +0 -2
- package/src/src/task/runner.ts +10 -8
- package/src/src/tool/factory.ts +54 -54
- package/src/src/transforms/esm/http-cache-helpers.ts +0 -20
- package/src/src/transforms/esm/path-resolver.ts +1 -140
- package/src/src/transforms/esm/source-url-embed.ts +0 -53
- package/src/src/transforms/esm/transform-cache.ts +3 -7
- package/src/src/transforms/mdx/index.ts +0 -5
- package/src/src/transforms/pipeline/context.ts +0 -2
- package/src/src/transforms/pipeline/index.ts +0 -4
- package/src/src/transforms/pipeline/stages/ssr-http-cache.ts +0 -1
- package/src/src/types/entities/getEntityInfo.ts +1 -1
- package/src/src/types/index.ts +1 -20
- package/src/src/types/server.ts +1 -1
- package/src/src/utils/cache-file-ops.ts +5 -5
- package/src/src/utils/lru-wrapper.ts +2 -8
- package/src/src/workflow/claude-code/event-publisher.ts +13 -4
- package/src/src/workflow/executor/workflow-executor.ts +7 -2
- package/src/src/workflow/react/use-workflow-list.ts +3 -2
- package/esm/src/transforms/mdx/parser.d.ts +0 -4
- package/esm/src/transforms/mdx/parser.d.ts.map +0 -1
- package/esm/src/transforms/mdx/parser.js +0 -49
- package/src/src/transforms/mdx/parser.ts +0 -65
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/agent/types.ts"],"names":[],"mappings":"AAAA;;4BAE4B;AAC5B,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAG/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAG3D,YAAY,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,EACP,WAAW,EACX,aAAa,EACb,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAGjC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAA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ACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAMxB;;OAEG;IACH,SAAS,IAAI,MAAM,EAAE;IAOrB;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAUxB;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAU3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKrC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,QAAQ,IAAI;QACV,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,mBAAmB,EAAE,MAAM,CAAC;KAC7B;CAeF"}
|
|
@@ -90,7 +90,8 @@ export class ProjectScopedRegistryManager {
|
|
|
90
90
|
*/
|
|
91
91
|
has(id) {
|
|
92
92
|
const projectId = this.getCurrentProjectId();
|
|
93
|
-
return this.registriesByProject.get(projectId)?.has(id) ??
|
|
93
|
+
return (this.registriesByProject.get(projectId)?.has(id) ?? false) ||
|
|
94
|
+
this.sharedRegistry.has(id);
|
|
94
95
|
}
|
|
95
96
|
/**
|
|
96
97
|
* Get all IDs for the current project (includes shared items).
|
|
@@ -12,8 +12,6 @@ export declare function isCriticalImport(path: string): boolean;
|
|
|
12
12
|
export declare function getPreloadHints(output: MetafileOutput, outDir: string): string[];
|
|
13
13
|
/** Extracts chunk information from metafile output */
|
|
14
14
|
export declare function getChunkInfo(file: string, output: MetafileOutput, outDir: string): Promise<ChunkInfo>;
|
|
15
|
-
/** Adds a route entry to the manifest */
|
|
16
|
-
export declare function addRouteToManifest(manifest: ChunkManifest, output: MetafileOutput, relativePath: string, routeMap: Map<string, string>, outDir: string): void;
|
|
17
15
|
/** Builds complete chunk manifest from esbuild metafile */
|
|
18
16
|
export declare function buildManifest(metafile: Metafile, routeMap: Map<string, string>, outDir: string): Promise<ChunkManifest>;
|
|
19
17
|
/** Writes manifest to disk as JSON */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/bundler/code-splitter/manifest-builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK3E,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY3D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,0EAA0E;AAC1E,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAK5E;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKhF;AAED,sDAAsD;AACtD,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,CAYpB;
|
|
1
|
+
{"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/bundler/code-splitter/manifest-builder.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK3E,gDAAgD;AAChD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAY3D;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYrD;AAED,0EAA0E;AAC1E,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAK5E;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,8CAA8C;AAC9C,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKhF;AAED,sDAAsD;AACtD,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,CAYpB;AAuBD,2DAA2D;AAC3D,wBAAsB,aAAa,CACjC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAuBxB;AAED,sCAAsC;AACtC,wBAAsB,aAAa,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1F"}
|
|
@@ -59,7 +59,7 @@ export async function getChunkInfo(file, output, outDir) {
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
/** Adds a route entry to the manifest */
|
|
62
|
-
|
|
62
|
+
function addRouteToManifest(manifest, output, relativePath, routeMap, outDir) {
|
|
63
63
|
if (!output.entryPoint)
|
|
64
64
|
return;
|
|
65
65
|
const entryName = extractEntryName(output.entryPoint);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/compiler/mdx-compiler/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,IAAI,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/compiler/mdx-compiler/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAMjD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,GACtB,IAAI,CAeN;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAezF;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM/D"}
|
|
@@ -2,10 +2,9 @@ import { createFileSystem } from "../../../platform/compat/fs.js";
|
|
|
2
2
|
import { createError, toError } from "../../../errors/veryfront-error.js";
|
|
3
3
|
const fs = createFileSystem();
|
|
4
4
|
export function validateCompileParams(filePath, content, options) {
|
|
5
|
-
if (!filePath)
|
|
6
|
-
throw new TypeError("filePath must be a non-empty string");
|
|
7
|
-
if (typeof filePath !== "string")
|
|
5
|
+
if (!filePath || typeof filePath !== "string") {
|
|
8
6
|
throw new TypeError("filePath must be a non-empty string");
|
|
7
|
+
}
|
|
9
8
|
if (typeof content !== "string")
|
|
10
9
|
throw new TypeError("content must be a string");
|
|
11
10
|
if (!options || typeof options !== "object")
|
|
@@ -18,6 +18,4 @@ export declare function compileMDXToJS(mdxPath: string, mdxContent: string, opti
|
|
|
18
18
|
code: string;
|
|
19
19
|
frontmatter: MDXFrontmatter;
|
|
20
20
|
}>;
|
|
21
|
-
export declare function compileMDXFile(mdxPath: string, outputDir: string, options: CompileToJSOptions): Promise<void>;
|
|
22
|
-
export declare function compileProjectMDX(projectDir: string, outputDir: string, options: Omit<CompileToJSOptions, "projectDir">): Promise<void>;
|
|
23
21
|
//# sourceMappingURL=mdx-to-js.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx-to-js.d.ts","sourceRoot":"","sources":["../../../../src/src/build/compiler/mdx-to-js.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mdx-to-js.d.ts","sourceRoot":"","sources":["../../../../src/src/build/compiler/mdx-to-js.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGtE,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;CACzB;AA6CD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,cAAc,CAAA;CAAE,CAAC,CAoExD"}
|
|
@@ -2,11 +2,7 @@ import { compile as compileMdx } from "@mdx-js/mdx";
|
|
|
2
2
|
import { bundlerLogger as logger } from "../../utils/index.js";
|
|
3
3
|
import * as esbuild from "esbuild";
|
|
4
4
|
import { extract } from "../../platform/compat/std/front-matter-yaml.js";
|
|
5
|
-
import { dirname, join } from "../../platform/compat/path/index.js";
|
|
6
|
-
import { createFileSystem } from "../../platform/compat/fs.js";
|
|
7
|
-
import { createSecureFs } from "../../security/index.js";
|
|
8
5
|
import { createError, toError } from "../../errors/veryfront-error.js";
|
|
9
|
-
const fs = createFileSystem();
|
|
10
6
|
function getComponentName(imp) {
|
|
11
7
|
return imp.path.split("/").pop()?.replace(/\.(jsx?|tsx?)$/, "") ?? imp.name;
|
|
12
8
|
}
|
|
@@ -105,80 +101,3 @@ export default function MDXPage({ components = {} }) {
|
|
|
105
101
|
});
|
|
106
102
|
return { code: result.code, frontmatter };
|
|
107
103
|
}
|
|
108
|
-
export async function compileMDXFile(mdxPath, outputDir, options) {
|
|
109
|
-
const secureFs = createSecureFs({
|
|
110
|
-
baseDir: options.projectDir,
|
|
111
|
-
adapter: options.adapter,
|
|
112
|
-
context: "build",
|
|
113
|
-
throwOnError: true,
|
|
114
|
-
});
|
|
115
|
-
try {
|
|
116
|
-
const content = await secureFs.readFile(mdxPath);
|
|
117
|
-
const { code } = await compileMDXToJS(mdxPath, content, options);
|
|
118
|
-
const relativePath = mdxPath.replace(options.projectDir, "").replace(/^\//, "");
|
|
119
|
-
const outputPath = join(outputDir, relativePath.replace(".mdx", ".mdx.js"));
|
|
120
|
-
await secureFs.mkdir(dirname(outputPath), { recursive: true });
|
|
121
|
-
await secureFs.writeFile(outputPath, code);
|
|
122
|
-
logger.info(`Compiled MDX: ${mdxPath} -> ${outputPath}`);
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
logger.error(`Failed to compile MDX file ${mdxPath}:`, error);
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
export async function compileProjectMDX(projectDir, outputDir, options) {
|
|
130
|
-
const compileOptions = { ...options, projectDir };
|
|
131
|
-
const componentsDir = join(projectDir, "components");
|
|
132
|
-
const components = [];
|
|
133
|
-
try {
|
|
134
|
-
for await (const entry of fs.readDir(componentsDir)) {
|
|
135
|
-
if (!entry.isFile || !/\.(jsx?|tsx?)$/.test(entry.name))
|
|
136
|
-
continue;
|
|
137
|
-
components.push(entry.name.replace(/\.(jsx?|tsx?)$/, ""));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
catch {
|
|
141
|
-
// Components directory might not exist
|
|
142
|
-
}
|
|
143
|
-
compileOptions.components = components;
|
|
144
|
-
const mdxFiles = [];
|
|
145
|
-
const VERYFRONT_EXCLUDED_DIRS = new Set([
|
|
146
|
-
"cache",
|
|
147
|
-
"compiled",
|
|
148
|
-
"tmp",
|
|
149
|
-
"temp",
|
|
150
|
-
"output",
|
|
151
|
-
"optimized-images",
|
|
152
|
-
"css",
|
|
153
|
-
]);
|
|
154
|
-
async function findMDXFiles(dir) {
|
|
155
|
-
try {
|
|
156
|
-
for await (const entry of fs.readDir(dir)) {
|
|
157
|
-
const path = join(dir, entry.name);
|
|
158
|
-
if (entry.isFile && (entry.name.endsWith(".mdx") || entry.name.endsWith(".md"))) {
|
|
159
|
-
mdxFiles.push(path);
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
if (!entry.isDirectory || entry.name === "node_modules")
|
|
163
|
-
continue;
|
|
164
|
-
if (entry.name.startsWith(".") && entry.name !== ".veryfront")
|
|
165
|
-
continue;
|
|
166
|
-
if (dir.includes(".veryfront") && VERYFRONT_EXCLUDED_DIRS.has(entry.name))
|
|
167
|
-
continue;
|
|
168
|
-
await findMDXFiles(path);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
catch {
|
|
172
|
-
// Directory might not exist
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
await findMDXFiles(join(projectDir, "pages"));
|
|
176
|
-
await findMDXFiles(join(projectDir, "layouts"));
|
|
177
|
-
await findMDXFiles(join(projectDir, "providers"));
|
|
178
|
-
await findMDXFiles(join(projectDir, ".veryfront"));
|
|
179
|
-
logger.info(`Found ${mdxFiles.length} MDX files to compile`);
|
|
180
|
-
for (const mdxFile of mdxFiles) {
|
|
181
|
-
await compileMDXFile(mdxFile, outputDir, compileOptions);
|
|
182
|
-
}
|
|
183
|
-
logger.info(`Compiled ${mdxFiles.length} MDX files to ${outputDir}`);
|
|
184
|
-
}
|
package/esm/src/build/index.d.ts
CHANGED
|
@@ -8,10 +8,4 @@ export { compileMDXToJS } from "./compiler/mdx-to-js.js";
|
|
|
8
8
|
export { compileAllMDX, watchMDX } from "./compiler/mdx-compiler/index.js";
|
|
9
9
|
export { buildProduction } from "./production-build/build/build-orchestrator.js";
|
|
10
10
|
export { buildEmbeddedPreset } from "./embedded/preset.js";
|
|
11
|
-
export interface EmbeddedPresetOptions {
|
|
12
|
-
projectDir: string;
|
|
13
|
-
outDir: string;
|
|
14
|
-
runtime: "deno" | "node" | "bun";
|
|
15
|
-
}
|
|
16
|
-
export declare const EMBEDDED_PRESET_ID = "veryfront-embedded";
|
|
17
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/build/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/build/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/esm/src/build/index.js
CHANGED
|
@@ -8,4 +8,3 @@ export { compileMDXToJS } from "./compiler/mdx-to-js.js";
|
|
|
8
8
|
export { compileAllMDX, watchMDX } from "./compiler/mdx-compiler/index.js";
|
|
9
9
|
export { buildProduction } from "./production-build/build/build-orchestrator.js";
|
|
10
10
|
export { buildEmbeddedPreset } from "./embedded/preset.js";
|
|
11
|
-
export const EMBEDDED_PRESET_ID = "veryfront-embedded";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-collector.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/production-build/build/route-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAI9E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,GAAG,EAAE,YAAY,EAAE,CAAC;CACrB;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"route-collector.d.ts","sourceRoot":"","sources":["../../../../../src/src/build/production-build/build/route-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAI9E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,GAAG,EAAE,YAAY,EAAE,CAAC;CACrB;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,OAAO,EACZ,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,eAAe,CAAC,CAkB1B"}
|
|
@@ -19,9 +19,8 @@ export async function collectAllRoutes(adapter, projectDir, ssg, include, exclud
|
|
|
19
19
|
collectAppRoutes(adapter, projectDir, include, exclude),
|
|
20
20
|
]);
|
|
21
21
|
logger.info(`Collected routes: ${pages.length} pages, ${app.length} app`);
|
|
22
|
-
if (app.length
|
|
23
|
-
|
|
22
|
+
if (app.length > 0) {
|
|
23
|
+
logger.info(`App routes: ${app.map((r) => r.path).join(", ")}`);
|
|
24
24
|
}
|
|
25
|
-
logger.info(`App routes: ${app.map((r) => r.path).join(", ")}`);
|
|
26
25
|
return { pages, app };
|
|
27
26
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Embedded templates for production builds
|
|
3
3
|
* These are embedded as strings to avoid file system dependencies in npm bundle
|
|
4
|
+
*
|
|
5
|
+
* AUTO-GENERATED by scripts/build/prebundle-client-scripts.ts
|
|
6
|
+
* Do not edit manually — run `deno task build` to regenerate.
|
|
4
7
|
* @module
|
|
5
8
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Client-side CSS styles for error display in production builds
|
|
8
|
-
*/
|
|
9
9
|
export declare const CLIENT_STYLES = ".error-container {\n max-width: 600px;\n margin: 2rem auto;\n padding: 2rem;\n background: #fee;\n border: 1px solid #fcc;\n border-radius: 8px;\n color: #c00;\n}";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* Placeholder - this is auto-generated during build:npm
|
|
13
|
-
*/
|
|
14
|
-
export declare let CLIENT_ROUTER_BUNDLE: string | undefined;
|
|
15
|
-
export declare let CLIENT_PREFETCH_BUNDLE: string | undefined;
|
|
10
|
+
export declare const CLIENT_ROUTER_BUNDLE: string | undefined;
|
|
11
|
+
export declare const CLIENT_PREFETCH_BUNDLE: string | undefined;
|
|
16
12
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../src/src/build/production-build/templates.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../src/src/build/production-build/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,aAAa,8KACmJ,CAAC;AAE9K,eAAO,MAAM,oBAAoB,EAAE,MAAM,GAAG,SACgyO,CAAC;AAE70O,eAAO,MAAM,sBAAsB,EAAE,MAAM,GAAG,SACuulB,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Embedded templates for production builds
|
|
3
3
|
* These are embedded as strings to avoid file system dependencies in npm bundle
|
|
4
|
+
*
|
|
5
|
+
* AUTO-GENERATED by scripts/build/prebundle-client-scripts.ts
|
|
6
|
+
* Do not edit manually — run `deno task build` to regenerate.
|
|
4
7
|
* @module
|
|
5
8
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export const CLIENT_STYLES = `.error-container {
|
|
10
|
-
max-width: 600px;
|
|
11
|
-
margin: 2rem auto;
|
|
12
|
-
padding: 2rem;
|
|
13
|
-
background: #fee;
|
|
14
|
-
border: 1px solid #fcc;
|
|
15
|
-
border-radius: 8px;
|
|
16
|
-
color: #c00;
|
|
17
|
-
}`;
|
|
18
|
-
/**
|
|
19
|
-
* Pre-bundled client router script for npm builds
|
|
20
|
-
* Placeholder - this is auto-generated during build:npm
|
|
21
|
-
*/
|
|
22
|
-
export let CLIENT_ROUTER_BUNDLE;
|
|
23
|
-
export let CLIENT_PREFETCH_BUNDLE;
|
|
9
|
+
export const CLIENT_STYLES = ".error-container {\n max-width: 600px;\n margin: 2rem auto;\n padding: 2rem;\n background: #fee;\n border: 1px solid #fcc;\n border-radius: 8px;\n color: #c00;\n}";
|
|
10
|
+
export const CLIENT_ROUTER_BUNDLE = 'var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);\n return value;\n};\n\n// src/rendering/client/router.ts\nimport { rendererLogger } from "#veryfront/utils";\nimport ReactDOM from "react-dom/client";\nimport {\n extractPageDataFromScript,\n NavigationHandlers,\n PageLoader,\n PageTransition,\n ViewportPrefetch\n} from "#veryfront/routing";\nvar logger = rendererLogger.component("veryfront");\nvar VeryfrontRouter = class {\n constructor(options = {}) {\n __publicField(this, "baseUrl");\n __publicField(this, "currentPath");\n __publicField(this, "root", null);\n __publicField(this, "options");\n __publicField(this, "spaMode");\n __publicField(this, "spaNavigationHandler", null);\n __publicField(this, "pageLoader");\n __publicField(this, "navigationHandlers");\n __publicField(this, "pageTransition");\n __publicField(this, "viewportPrefetch");\n __publicField(this, "handleClick");\n __publicField(this, "handlePopState");\n __publicField(this, "handleMouseOver");\n const globalOptions = this.loadGlobalOptions();\n this.options = { ...globalOptions, ...options };\n this.baseUrl = this.options.baseUrl || globalThis.location.origin;\n this.currentPath = globalThis.location.pathname;\n this.spaMode = this.options.spaMode ?? globalThis.__VERYFRONT_SPA_MODE__ ?? false;\n this.pageLoader = new PageLoader();\n this.navigationHandlers = new NavigationHandlers(\n this.options.prefetchDelay,\n this.options.prefetch\n );\n this.pageTransition = new PageTransition((root) => this.viewportPrefetch.setup(root));\n this.viewportPrefetch = new ViewportPrefetch(\n (path) => this.prefetch(path),\n this.options.prefetch\n );\n this.handleClick = this.navigationHandlers.createClickHandler({\n onNavigate: (url) => this.navigate(url),\n onPrefetch: (url) => this.prefetch(url)\n });\n this.handlePopState = this.navigationHandlers.createPopStateHandler({\n onNavigate: (url) => this.navigate(url, false),\n onPrefetch: (url) => this.prefetch(url)\n });\n this.handleMouseOver = this.navigationHandlers.createMouseOverHandler({\n onNavigate: (url) => this.navigate(url),\n onPrefetch: (url) => this.prefetch(url)\n });\n }\n registerNavigationHandler(handler) {\n logger.debug("Registering SPA navigation handler");\n this.spaNavigationHandler = handler;\n this.spaMode = true;\n }\n loadGlobalOptions() {\n try {\n const options = globalThis.__VERYFRONT_ROUTER_OPTS__;\n if (!options) {\n logger.debug("No global options configured");\n return {};\n }\n return options;\n } catch (error) {\n logger.error("Failed to read global options:", error);\n return {};\n }\n }\n init() {\n logger.debug("Initializing client-side router");\n const rootElement = document.getElementById("root");\n if (!rootElement) {\n logger.error("Root element not found");\n return;\n }\n const ReactDOMToUse = globalThis.ReactDOM ?? ReactDOM;\n this.root = ReactDOMToUse.createRoot(rootElement);\n document.addEventListener("click", this.handleClick);\n globalThis.addEventListener("popstate", this.handlePopState);\n document.addEventListener("mouseover", this.handleMouseOver);\n this.viewportPrefetch.setup(document);\n this.cacheCurrentPage();\n }\n cacheCurrentPage() {\n const pageData = extractPageDataFromScript();\n if (pageData)\n this.pageLoader.setCache(this.currentPath, pageData);\n }\n async navigate(url, pushState = true) {\n logger.debug(`Navigating to ${url} (SPA mode: ${this.spaMode})`);\n this.navigationHandlers.saveScrollPosition(this.currentPath);\n this.options.onStart?.(url);\n if (pushState)\n globalThis.history.pushState({}, "", url);\n if (this.spaMode && this.spaNavigationHandler) {\n await this.loadSpaPage(url);\n } else {\n await this.loadPage(url);\n }\n this.options.onNavigate?.(url);\n }\n async loadSpaPage(path) {\n logger.debug(`Loading SPA page: ${path}`);\n try {\n const spaData = await this.pageLoader.loadSpaPageData(path);\n await this.spaNavigationHandler?.(spaData);\n this.currentPath = path;\n this.handleScrollAfterNavigation();\n this.options.onComplete?.(path);\n } catch (error) {\n const normalizedError = error instanceof Error ? error : new Error(String(error));\n logger.error(`Failed to load SPA page ${path}`, normalizedError);\n this.options.onError?.(normalizedError);\n this.pageTransition.showError(normalizedError);\n }\n }\n handleScrollAfterNavigation() {\n const isPopState = this.navigationHandlers.isPopState();\n const scrollY = this.navigationHandlers.getScrollPosition(this.currentPath);\n try {\n globalThis.scrollTo(0, isPopState ? scrollY : 0);\n } catch (error) {\n logger.warn("scroll handling failed", error);\n }\n this.navigationHandlers.clearPopStateFlag();\n }\n async loadPage(path, updateUI = true) {\n if (this.pageLoader.isCached(path)) {\n logger.debug(`Loading ${path} from cache`);\n const data = this.pageLoader.getCached(path);\n if (data) {\n if (updateUI)\n this.updatePage(data);\n return;\n }\n logger.warn(`Cache entry for ${path} was unexpectedly null, fetching fresh data`);\n }\n this.pageTransition.setLoadingState(true);\n try {\n const data = await this.pageLoader.loadPage(path);\n if (updateUI)\n this.updatePage(data);\n this.currentPath = path;\n this.options.onComplete?.(path);\n } catch (error) {\n const normalizedError = error instanceof Error ? error : new Error(String(error));\n logger.error(`Failed to load ${path}`, normalizedError);\n this.options.onError?.(normalizedError);\n this.pageTransition.showError(normalizedError);\n } finally {\n this.pageTransition.setLoadingState(false);\n }\n }\n async prefetch(path) {\n if (this.spaMode) {\n await this.pageLoader.prefetchSpaPageData(path);\n return;\n }\n await this.pageLoader.prefetch(path);\n }\n updatePage(data) {\n if (!this.root)\n return;\n const isPopState = this.navigationHandlers.isPopState();\n const scrollY = this.navigationHandlers.getScrollPosition(this.currentPath);\n this.pageTransition.updatePage(data, isPopState, scrollY);\n this.navigationHandlers.clearPopStateFlag();\n }\n destroy() {\n document.removeEventListener("click", this.handleClick);\n globalThis.removeEventListener("popstate", this.handlePopState);\n document.removeEventListener("mouseover", this.handleMouseOver);\n this.viewportPrefetch.disconnect();\n this.pageLoader.clearCache();\n this.navigationHandlers.clear();\n this.pageTransition.destroy();\n }\n};\nif (typeof window !== "undefined" && globalThis.document) {\n const router = new VeryfrontRouter();\n if (document.readyState === "loading") {\n document.addEventListener("DOMContentLoaded", () => router.init());\n } else {\n router.init();\n }\n globalThis.veryFrontRouter = router;\n}\nexport {\n VeryfrontRouter\n};\n';
|
|
11
|
+
export const CLIENT_PREFETCH_BUNDLE = 'var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);\n return value;\n};\n\n// src/rendering/client/browser-logger.ts\nvar ConditionalBrowserLogger = class {\n constructor(prefix, level) {\n this.prefix = prefix;\n this.level = level;\n }\n log(minLevel, fn, message, ...args) {\n if (this.level > minLevel)\n return;\n fn?.(message, ...args);\n }\n debug(message, ...args) {\n this.log(\n 0 /* DEBUG */,\n console.debug,\n `[${this.prefix}] DEBUG: ${message}`,\n ...args\n );\n }\n info(message, ...args) {\n this.log(1 /* INFO */, console.log, `[${this.prefix}] ${message}`, ...args);\n }\n warn(message, ...args) {\n this.log(\n 2 /* WARN */,\n console.warn,\n `[${this.prefix}] WARN: ${message}`,\n ...args\n );\n }\n error(message, ...args) {\n this.log(\n 3 /* ERROR */,\n console.error,\n `[${this.prefix}] ERROR: ${message}`,\n ...args\n );\n }\n};\nfunction getBrowserLogLevel() {\n if (typeof window === "undefined")\n return 2 /* WARN */;\n const g = globalThis;\n const isDevelopment = g.__VERYFRONT_DEV__ || g.__RSC_DEV__;\n if (!isDevelopment)\n return 2 /* WARN */;\n const isDebugEnabled = g.__VERYFRONT_DEBUG__ || g.__RSC_DEBUG__;\n return isDebugEnabled ? 0 /* DEBUG */ : 1 /* INFO */;\n}\nvar defaultLevel = getBrowserLogLevel();\nvar rscLogger = new ConditionalBrowserLogger("RSC", defaultLevel);\nvar prefetchLogger = new ConditionalBrowserLogger("PREFETCH", defaultLevel);\nvar hydrateLogger = new ConditionalBrowserLogger("HYDRATE", defaultLevel);\nvar browserLogger = new ConditionalBrowserLogger("VERYFRONT", defaultLevel);\n\n// src/rendering/client/prefetch/link-observer.ts\nfunction isAnchorElement(element) {\n return typeof HTMLAnchorElement !== "undefined" ? element instanceof HTMLAnchorElement : element.tagName === "A";\n}\nvar LinkObserver = class {\n constructor(options, prefetchedUrls) {\n __publicField(this, "options");\n __publicField(this, "intersectionObserver", null);\n __publicField(this, "mutationObserver", null);\n __publicField(this, "prefetchedUrls");\n __publicField(this, "pendingTimeouts", /* @__PURE__ */ new Map());\n __publicField(this, "elementTimeoutMap", /* @__PURE__ */ new WeakMap());\n __publicField(this, "timeoutCounter", 0);\n this.options = options;\n this.prefetchedUrls = prefetchedUrls;\n }\n init() {\n this.createIntersectionObserver();\n this.observeLinks();\n this.setupMutationObserver();\n }\n createIntersectionObserver() {\n this.intersectionObserver = new IntersectionObserver(\n (entries) => this.handleIntersection(entries),\n { rootMargin: this.options.rootMargin }\n );\n }\n handleIntersection(entries) {\n for (const entry of entries) {\n if (!entry.isIntersecting)\n continue;\n if (!isAnchorElement(entry.target))\n continue;\n const link = entry.target;\n if (this.timeoutCounter > 1e6)\n this.timeoutCounter = 0;\n const timeoutKey = this.timeoutCounter++;\n const timeoutId = setTimeout(() => {\n this.pendingTimeouts.delete(timeoutKey);\n this.elementTimeoutMap.delete(link);\n this.options.onLinkVisible(link);\n }, this.options.delay);\n this.pendingTimeouts.set(timeoutKey, timeoutId);\n this.elementTimeoutMap.set(link, timeoutKey);\n }\n }\n observeLinks() {\n this.observeAnchors(document.querySelectorAll(\'a[href^="/"], a[href^="./"]\'));\n }\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type !== "childList")\n continue;\n for (const node of mutation.addedNodes) {\n if (node.nodeType !== Node.ELEMENT_NODE)\n continue;\n this.observeElement(node);\n }\n for (const node of mutation.removedNodes) {\n if (node.nodeType !== Node.ELEMENT_NODE)\n continue;\n this.clearElementTimeouts(node);\n }\n }\n });\n this.mutationObserver.observe(document.body, { childList: true, subtree: true });\n }\n clearTimeoutForElement(element) {\n const timeoutKey = this.elementTimeoutMap.get(element);\n if (timeoutKey === void 0)\n return;\n const timeoutId = this.pendingTimeouts.get(timeoutKey);\n if (timeoutId !== void 0) {\n clearTimeout(timeoutId);\n this.pendingTimeouts.delete(timeoutKey);\n }\n this.elementTimeoutMap.delete(element);\n }\n clearElementTimeouts(element) {\n if (isAnchorElement(element))\n this.clearTimeoutForElement(element);\n for (const link of element.querySelectorAll("a")) {\n this.clearTimeoutForElement(link);\n }\n }\n observeElement(element) {\n if (isAnchorElement(element) && this.isValidLink(element)) {\n this.intersectionObserver?.observe(element);\n }\n this.observeAnchors(element.querySelectorAll(\'a[href^="/"], a[href^="./"]\'));\n }\n observeAnchors(links) {\n for (const link of links) {\n if (!isAnchorElement(link))\n continue;\n if (!this.isValidLink(link))\n continue;\n this.intersectionObserver?.observe(link);\n }\n }\n isValidLink(link) {\n if (link.hostname !== globalThis.location.hostname)\n return false;\n if (link.hasAttribute("download"))\n return false;\n if (link.target === "_blank")\n return false;\n const url = link.href;\n if (this.prefetchedUrls.has(url))\n return false;\n if (url === globalThis.location.href)\n return false;\n if (link.hash && link.pathname === globalThis.location.pathname)\n return false;\n if (link.dataset.noPrefetch)\n return false;\n return true;\n }\n destroy() {\n for (const timeoutId of this.pendingTimeouts.values()) {\n clearTimeout(timeoutId);\n }\n this.pendingTimeouts.clear();\n this.timeoutCounter = 0;\n this.intersectionObserver?.disconnect();\n this.intersectionObserver = null;\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n};\n\n// src/rendering/client/prefetch/network-utils.ts\nvar NetworkUtils = class {\n constructor(allowedNetworks = ["4g", "wifi", "ethernet"]) {\n __publicField(this, "networkInfo");\n __publicField(this, "allowedNetworks");\n this.allowedNetworks = allowedNetworks;\n this.networkInfo = this.getNetworkConnection();\n }\n getNavigatorWithConnection() {\n if (typeof globalThis.navigator === "undefined")\n return null;\n return globalThis.navigator;\n }\n getNetworkConnection() {\n const nav = this.getNavigatorWithConnection();\n return nav?.connection ?? nav?.mozConnection ?? nav?.webkitConnection ?? null;\n }\n shouldPrefetch() {\n if (this.networkInfo?.saveData)\n return false;\n const effectiveType = this.networkInfo?.effectiveType;\n if (effectiveType != null && !this.allowedNetworks.includes(effectiveType))\n return false;\n return true;\n }\n onNetworkChange(callback) {\n this.networkInfo?.addEventListener?.("change", callback);\n }\n getNetworkInfo() {\n return this.networkInfo;\n }\n};\n\n// src/rendering/client/prefetch/prefetch-queue.ts\nimport { PREFETCH_QUEUE_MAX_SIZE_BYTES } from "#veryfront/utils/constants/index.ts";\nvar DEFAULT_OPTIONS = {\n maxConcurrent: 4,\n maxSize: PREFETCH_QUEUE_MAX_SIZE_BYTES,\n timeout: 5e3\n};\nfunction isAbortError(error) {\n if (typeof error !== "object" || error === null)\n return false;\n if (!("name" in error))\n return false;\n return error.name === "AbortError";\n}\nvar PrefetchQueue = class {\n constructor(options = {}, prefetchedUrls) {\n __publicField(this, "options");\n __publicField(this, "controllers", /* @__PURE__ */ new Map());\n __publicField(this, "prefetchedUrls");\n __publicField(this, "concurrent", 0);\n __publicField(this, "stopped", false);\n __publicField(this, "onResourcesFetched");\n this.options = { ...DEFAULT_OPTIONS, ...options };\n this.prefetchedUrls = prefetchedUrls ?? /* @__PURE__ */ new Set();\n }\n setResourceCallback(callback) {\n this.onResourcesFetched = callback;\n }\n enqueue(url) {\n void this.prefetch(url);\n }\n has(url) {\n return this.prefetchedUrls.has(url) || this.controllers.has(url);\n }\n get size() {\n return this.controllers.size;\n }\n clear() {\n this.stopAll();\n this.prefetchedUrls.clear();\n }\n start() {\n this.stopped = false;\n }\n stop() {\n this.stopped = true;\n this.stopAll();\n }\n getQueueSize() {\n return this.controllers.size;\n }\n getConcurrentCount() {\n return this.concurrent;\n }\n async prefetchLink(link) {\n if (this.stopped)\n return;\n const url = link.href;\n if (!url || this.controllers.has(url) || this.prefetchedUrls.has(url))\n return;\n if (this.concurrent >= this.options.maxConcurrent) {\n prefetchLogger.debug?.(`Prefetch queue full, skipping ${url}`);\n return;\n }\n let parsedUrl;\n try {\n parsedUrl = new URL(url);\n } catch {\n prefetchLogger.debug?.(`Invalid prefetch URL ${url}`);\n return;\n }\n const controller = new AbortController();\n this.controllers.set(url, controller);\n this.concurrent += 1;\n const timeoutId = this.options.timeout > 0 ? setTimeout(() => controller.abort(), this.options.timeout) : void 0;\n try {\n const response = await fetch(parsedUrl.toString(), {\n method: "GET",\n signal: controller.signal,\n headers: { "X-Veryfront-Prefetch": "1" }\n });\n if (!response.ok)\n return;\n if (this.isResponseTooLarge(response)) {\n prefetchLogger.debug?.(`Prefetch too large, skipping ${url}`);\n return;\n }\n this.prefetchedUrls.add(url);\n if (!this.onResourcesFetched)\n return;\n try {\n await this.onResourcesFetched(response, url);\n } catch (callbackError) {\n prefetchLogger.error?.(`Prefetch callback failed for ${url}`, callbackError);\n }\n } catch (error) {\n if (!isAbortError(error)) {\n prefetchLogger.error?.(`Failed to prefetch ${url}`, error);\n }\n } finally {\n if (timeoutId !== void 0)\n clearTimeout(timeoutId);\n this.controllers.delete(url);\n this.concurrent = Math.max(0, this.concurrent - 1);\n }\n }\n async prefetch(url) {\n const link = typeof document !== "undefined" ? document.createElement("a") : { href: url };\n link.href = url;\n await this.prefetchLink(link);\n }\n stopAll() {\n for (const controller of this.controllers.values()) {\n controller.abort();\n }\n this.controllers.clear();\n this.concurrent = 0;\n }\n isResponseTooLarge(response) {\n const rawLength = response.headers.get("content-length");\n if (rawLength === null)\n return false;\n const size = Number.parseInt(rawLength, 10);\n if (!Number.isFinite(size))\n return false;\n return size > this.options.maxSize;\n }\n};\nvar prefetchQueue = new PrefetchQueue();\n\n// src/rendering/client/prefetch/resource-hints.ts\nvar ResourceHintsManager = class {\n constructor() {\n __publicField(this, "appliedHints", /* @__PURE__ */ new Set());\n }\n applyResourceHints(hints) {\n for (const hint of hints) {\n const key = `${hint.type}:${hint.href}`;\n if (this.appliedHints.has(key))\n continue;\n const existing = document.querySelector(\n `link[rel="${hint.type}"][href="${hint.href}"]`\n );\n if (existing) {\n this.appliedHints.add(key);\n continue;\n }\n this.createAndAppendHint(hint);\n this.appliedHints.add(key);\n prefetchLogger.debug(`Added resource hint: ${hint.type} ${hint.href}`);\n }\n }\n createAndAppendHint(hint) {\n if (!document.head) {\n prefetchLogger.warn("document.head is not available, skipping resource hint");\n return;\n }\n const link = document.createElement("link");\n link.rel = hint.type;\n link.href = hint.href;\n if (hint.as)\n link.setAttribute("as", hint.as);\n if (hint.crossOrigin)\n link.setAttribute("crossorigin", hint.crossOrigin);\n if (hint.media)\n link.setAttribute("media", hint.media);\n document.head.appendChild(link);\n }\n extractResourceHints(html, prefetchedUrls) {\n try {\n const doc = new DOMParser().parseFromString(html, "text/html");\n const hints = [];\n this.extractPreloadLinks(doc, prefetchedUrls, hints);\n this.extractScripts(doc, prefetchedUrls, hints);\n this.extractStylesheets(doc, prefetchedUrls, hints);\n return hints;\n } catch (error) {\n prefetchLogger.error("Failed to parse prefetched page", error);\n return [];\n }\n }\n isValidResourceHintType(rel) {\n switch (rel) {\n case "prefetch":\n case "preload":\n case "preconnect":\n case "dns-prefetch":\n return true;\n default:\n return false;\n }\n }\n extractPreloadLinks(doc, prefetchedUrls, hints) {\n const links = doc.querySelectorAll(\n \'link[rel="preload"], link[rel="prefetch"]\'\n );\n for (const link of links) {\n const href = link.href;\n if (!href)\n continue;\n if (prefetchedUrls.has(href))\n continue;\n if (!this.isValidResourceHintType(link.rel))\n continue;\n hints.push({\n type: link.rel,\n href,\n as: link.getAttribute("as") ?? void 0\n });\n }\n }\n extractScripts(doc, prefetchedUrls, hints) {\n for (const script of doc.querySelectorAll("script[src]")) {\n const src = script.src;\n if (!src || prefetchedUrls.has(src))\n continue;\n hints.push({ type: "prefetch", href: src, as: "script" });\n }\n }\n extractStylesheets(doc, prefetchedUrls, hints) {\n for (const link of doc.querySelectorAll(\'link[rel="stylesheet"]\')) {\n const href = link.href;\n if (!href || prefetchedUrls.has(href))\n continue;\n hints.push({ type: "prefetch", href, as: "style" });\n }\n }\n static generateResourceHints(_route, assets) {\n const hints = [\n \'<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">\',\n \'<link rel="dns-prefetch" href="https://esm.sh">\',\n \'<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>\'\n ];\n for (const asset of assets) {\n if (asset.endsWith(".js")) {\n hints.push(`<link rel="modulepreload" href="${asset}">`);\n continue;\n }\n if (asset.endsWith(".css")) {\n hints.push(`<link rel="preload" as="style" href="${asset}">`);\n continue;\n }\n if (/\\.(woff2?|ttf|otf)$/.test(asset)) {\n hints.push(`<link rel="preload" as="font" href="${asset}" crossorigin>`);\n }\n }\n return hints.join("\\n");\n }\n};\n\n// src/rendering/client/prefetch.ts\nimport {\n PREFETCH_DEFAULT_DELAY_MS,\n PREFETCH_DEFAULT_TIMEOUT_MS,\n PREFETCH_MAX_SIZE_BYTES\n} from "#veryfront/utils";\nvar PrefetchManager = class {\n constructor(options = {}) {\n __publicField(this, "options");\n __publicField(this, "prefetchedUrls", /* @__PURE__ */ new Set());\n __publicField(this, "networkUtils");\n __publicField(this, "linkObserver", null);\n __publicField(this, "resourceHintsManager");\n __publicField(this, "prefetchQueue");\n this.options = {\n rootMargin: options.rootMargin ?? "50px",\n delay: options.delay ?? PREFETCH_DEFAULT_DELAY_MS,\n maxConcurrent: options.maxConcurrent ?? 2,\n allowedNetworks: options.allowedNetworks ?? ["4g", "wifi", "ethernet"],\n maxSize: options.maxSize ?? PREFETCH_MAX_SIZE_BYTES,\n timeout: options.timeout ?? PREFETCH_DEFAULT_TIMEOUT_MS\n };\n this.networkUtils = new NetworkUtils(this.options.allowedNetworks);\n this.resourceHintsManager = new ResourceHintsManager();\n this.prefetchQueue = new PrefetchQueue(\n {\n maxConcurrent: this.options.maxConcurrent,\n maxSize: this.options.maxSize,\n timeout: this.options.timeout\n },\n this.prefetchedUrls\n );\n this.prefetchQueue.setResourceCallback(\n (response, url) => this.prefetchPageResources(response, url)\n );\n }\n init() {\n prefetchLogger.info("Initializing prefetch manager");\n if (!this.networkUtils.shouldPrefetch()) {\n prefetchLogger.info("Prefetching disabled due to network conditions");\n return;\n }\n this.linkObserver = new LinkObserver(\n {\n rootMargin: this.options.rootMargin,\n delay: this.options.delay,\n onLinkVisible: (link) => this.prefetchQueue.prefetchLink(link)\n },\n this.prefetchedUrls\n );\n this.linkObserver.init();\n this.networkUtils.onNetworkChange(() => {\n if (!this.networkUtils.shouldPrefetch())\n this.prefetchQueue.stopAll();\n });\n }\n async prefetchPageResources(response, _pageUrl) {\n const html = await response.text();\n const hints = this.resourceHintsManager.extractResourceHints(html, this.prefetchedUrls);\n this.resourceHintsManager.applyResourceHints(hints);\n }\n applyResourceHints(hints) {\n this.resourceHintsManager.applyResourceHints(hints);\n }\n async prefetch(url) {\n await this.prefetchQueue.prefetch(url);\n }\n static generateResourceHints(route, assets) {\n return ResourceHintsManager.generateResourceHints(route, assets);\n }\n destroy() {\n this.linkObserver?.destroy();\n this.prefetchQueue.stopAll();\n this.prefetchedUrls.clear();\n }\n};\nfunction initPrefetch(options) {\n const prefetchManager = new PrefetchManager(options);\n if (document.readyState === "loading") {\n document.addEventListener("DOMContentLoaded", () => prefetchManager.init());\n } else {\n prefetchManager.init();\n }\n globalThis.veryFrontPrefetch = prefetchManager;\n return prefetchManager;\n}\nfunction resolveAutoInitOptions() {\n const setting = globalThis.__VERYFRONT_PREFETCH__;\n if (!setting)\n return null;\n if (setting === true)\n return {};\n if (typeof setting === "object")\n return setting;\n return null;\n}\nfunction shouldAutoInitPrefetch(options) {\n if (!options)\n return false;\n if (typeof window === "undefined" || typeof document === "undefined")\n return false;\n const win = window;\n const doc = document;\n if (win.__veryfrontSSRStub || doc.__veryfrontSSRStub)\n return false;\n if (typeof IntersectionObserver === "undefined")\n return false;\n if (typeof MutationObserver === "undefined")\n return false;\n return true;\n}\nvar autoInitOptions = resolveAutoInitOptions();\nif (shouldAutoInitPrefetch(autoInitOptions))\n initPrefetch(autoInitOptions);\nexport {\n PrefetchManager,\n initPrefetch\n};\n';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-cache.d.ts","sourceRoot":"","sources":["../../../src/src/build/vendor-cache.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAo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YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,MAAM,CAAC,CAejB;AAED,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
|
|
@@ -54,12 +54,7 @@ function isLruIntervalDisabled() {
|
|
|
54
54
|
.__vfDisableLruInterval;
|
|
55
55
|
return globalFlag === true || getDisableLruIntervalEnv();
|
|
56
56
|
}
|
|
57
|
-
// Default singleton instance for backward compatibility
|
|
58
57
|
let defaultInstance;
|
|
59
|
-
function _getDefaultInstance() {
|
|
60
|
-
defaultInstance ??= new VendorCacheManager();
|
|
61
|
-
return defaultInstance;
|
|
62
|
-
}
|
|
63
58
|
const TRANSFORM_VERSION = "3";
|
|
64
59
|
export async function generateVendorCacheKey(projectId, reactVersion, dependencies) {
|
|
65
60
|
const configStr = JSON.stringify({
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* @module cache/tokenizing-gateway
|
|
14
14
|
*/
|
|
15
15
|
import type { CacheBackend } from "./types.js";
|
|
16
|
-
import { CACHE_INVARIANT_VIOLATION } from "./paths.js";
|
|
17
16
|
/**
|
|
18
17
|
* Gateway interface for code storage in distributed cache.
|
|
19
18
|
* Extends CacheBackend with code-specific methods that enforce tokenization.
|
|
@@ -142,5 +141,4 @@ export declare class TokenizingCacheGateway implements CodeCacheGateway {
|
|
|
142
141
|
* @returns A gateway that enforces tokenization for code storage
|
|
143
142
|
*/
|
|
144
143
|
export declare function createTokenizingGateway(backend: CacheBackend, name: string): TokenizingCacheGateway;
|
|
145
|
-
export { CACHE_INVARIANT_VIOLATION };
|
|
146
144
|
//# sourceMappingURL=tokenizing-gateway.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizing-gateway.d.ts","sourceRoot":"","sources":["../../../src/src/cache/tokenizing-gateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAA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G,OAAO,CAAC,MAAM,CAAC;IAOxD;;OAEG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAI9C;;OAEG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE;;OAEG;IACG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,GACX,sBAAsB,CAExB"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @module cache/tokenizing-gateway
|
|
14
14
|
*/
|
|
15
15
|
import { logger } from "../utils/index.js";
|
|
16
|
-
import { assertPortableCode,
|
|
16
|
+
import { assertPortableCode, detokenizeAllCachePaths, tokenizeAllVeryFrontPaths } from "./paths.js";
|
|
17
17
|
/**
|
|
18
18
|
* TokenizingCacheGateway wraps a CacheBackend and enforces tokenization
|
|
19
19
|
* for all code storage operations.
|
|
@@ -176,5 +176,3 @@ export class TokenizingCacheGateway {
|
|
|
176
176
|
export function createTokenizingGateway(backend, name) {
|
|
177
177
|
return new TokenizingCacheGateway(backend, name);
|
|
178
178
|
}
|
|
179
|
-
// Re-export error definition for consumers
|
|
180
|
-
export { CACHE_INVARIANT_VIOLATION };
|
package/esm/src/chat/index.d.ts
CHANGED
|
@@ -54,8 +54,8 @@ export { ChatComposer, ChatEmpty, ChatIf, ChatMessageList, ChatRoot, ErrorBanner
|
|
|
54
54
|
export type { ChatComposerProps, ChatEmptyProps, ChatIfProps, ChatMessageListProps, ChatRootProps, ErrorBannerProps, MessageRootProps, ModelAvatarProps, } from "../react/components/ai/chat.js";
|
|
55
55
|
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, ThreadListContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useThreadListContext, useThreadListContextOptional, } from "../react/components/ai/chat.js";
|
|
56
56
|
export type { ChatContextValue, ComposerContextValue, MessageContextValue, ThreadListContextValue, } from "../react/components/ai/chat.js";
|
|
57
|
-
export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UpgradeCTA, UploadsPanel, useThreads, } from "../react/components/ai/chat.js";
|
|
58
|
-
export type { AttachmentInfo, AttachmentPillProps, BranchPickerProps, ChatSidebarProps, ChatTab, ChatWithSidebarAttachmentConfig, ChatWithSidebarChatController, ChatWithSidebarFeatureConfig, ChatWithSidebarGroupedProps, ChatWithSidebarMessageConfig, ChatWithSidebarModelConfig, ChatWithSidebarProps, ChatWithSidebarQuickActionsConfig, ChatWithSidebarSidebarConfig, ChatWithSidebarTabsConfig, ChatWithSidebarVoiceConfig, CodeBlockProps, ConversationEmptyStateProps, ConversationScrollButtonProps, DropZoneOverlayProps, FeedbackValue, InferenceBadgeProps, InlineCitationProps, MessageActionsProps, MessageEditFormProps, MessageFeedbackProps, ModelOption, ModelSelectorProps, PartGroup, QuickAction, QuickActionsProps, Source, SourcesProps, StepIndicatorProps, SuggestionProps, SuggestionsProps, TabSwitcherProps, Thread, UpgradeCTAProps, UploadedFile, UploadsPanelProps, UseThreadsOptions, UseThreadsResult, } from "../react/components/ai/chat.js";
|
|
57
|
+
export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UpgradeCTA, UploadsPanel, useThreads, } from "../react/components/ai/chat.js";
|
|
58
|
+
export type { AttachmentInfo, AttachmentPillProps, BranchPickerProps, ChatSidebarProps, ChatTab, ChatWithSidebarAttachmentConfig, ChatWithSidebarChatController, ChatWithSidebarFeatureConfig, ChatWithSidebarGroupedProps, ChatWithSidebarMessageConfig, ChatWithSidebarModelConfig, ChatWithSidebarProps, ChatWithSidebarQuickActionsConfig, ChatWithSidebarSidebarConfig, ChatWithSidebarTabsConfig, ChatWithSidebarVoiceConfig, CodeBlockProps, ConversationEmptyStateProps, ConversationScrollButtonProps, DropZoneOverlayProps, FeedbackValue, InferenceBadgeProps, InlineCitationProps, MessageActionsProps, MessageEditFormProps, MessageFeedbackProps, ModelOption, ModelSelectorProps, PartGroup, QuickAction, QuickActionsProps, SkillBadgeProps, Source, SourcesProps, StepIndicatorProps, SuggestionProps, SuggestionsProps, TabSwitcherProps, Thread, UpgradeCTAProps, UploadedFile, UploadsPanelProps, UseThreadsOptions, UseThreadsResult, } from "../react/components/ai/chat.js";
|
|
59
59
|
export { Message as StandaloneMessage, StreamingMessage, } from "../react/components/ai/message.js";
|
|
60
60
|
export type { MessageProps, StreamingMessageProps, } from "../react/components/ai/message.js";
|
|
61
61
|
export { AgentCard } from "../react/components/ai/agent-card.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAUH,OAAO,yB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@ export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, T
|
|
|
67
67
|
// ---------------------------------------------------------------------------
|
|
68
68
|
// Sub-components
|
|
69
69
|
// ---------------------------------------------------------------------------
|
|
70
|
-
export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UpgradeCTA, UploadsPanel, useThreads, } from "../react/components/ai/chat.js";
|
|
70
|
+
export { AttachmentPill, BranchPicker, ChatSidebar, ChatWithSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActions, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, UpgradeCTA, UploadsPanel, useThreads, } from "../react/components/ai/chat.js";
|
|
71
71
|
// Message (standalone bubble, not the chat compound)
|
|
72
72
|
export { Message as StandaloneMessage, StreamingMessage, } from "../react/components/ai/message.js";
|
|
73
73
|
export { AgentCard } from "../react/components/ai/agent-card.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/src/config/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,yBAAyB,CAAC;AAEvF,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAErE;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,EACzC,SAAS,GAAE,iBAA0C,GACpD,eAAe,CAEjB;AAED,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,EAAE,GAAG,eAAe,CAEpF;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"define-config.d.ts","sourceRoot":"","sources":["../../../src/src/config/define-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,yBAAyB,CAAC;AAEvF,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAErE;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,eAAe,EACzC,SAAS,GAAE,iBAA0C,GACpD,eAAe,CAEjB;AAED,wBAAgB,YAAY,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,EAAE,GAAG,eAAe,CAEpF;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAWnE"}
|
|
@@ -11,37 +11,40 @@ export function mergeConfigs(...configs) {
|
|
|
11
11
|
}
|
|
12
12
|
export async function validateConfig(config) {
|
|
13
13
|
if (!config || typeof config !== "object") {
|
|
14
|
-
throw toError(createError({
|
|
15
|
-
type: "config",
|
|
16
|
-
message: "Configuration must be an object",
|
|
17
|
-
}));
|
|
14
|
+
throw toError(createError({ type: "config", message: "Configuration must be an object" }));
|
|
18
15
|
}
|
|
19
16
|
const cfg = config;
|
|
17
|
+
await validatePort(cfg);
|
|
18
|
+
validateOutDir(cfg);
|
|
19
|
+
}
|
|
20
|
+
async function validatePort(cfg) {
|
|
20
21
|
const dev = cfg.dev;
|
|
21
22
|
const port = dev && typeof dev === "object" ? dev.port : undefined;
|
|
22
|
-
if (port
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
23
|
+
if (port === undefined)
|
|
24
|
+
return;
|
|
25
|
+
const { MIN_PORT, MAX_PORT } = await import("../utils/constants/index.js");
|
|
26
|
+
if (typeof port === "number" && port >= MIN_PORT && port <= MAX_PORT)
|
|
27
|
+
return;
|
|
28
|
+
throw toError(createError({
|
|
29
|
+
type: "config",
|
|
30
|
+
message: `dev.port must be a number between ${MIN_PORT} and ${MAX_PORT}`,
|
|
31
|
+
context: {
|
|
32
|
+
field: "dev.port",
|
|
33
|
+
value: port,
|
|
34
|
+
expected: `number between ${MIN_PORT} and ${MAX_PORT}`,
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
function validateOutDir(cfg) {
|
|
36
39
|
const build = cfg.build;
|
|
37
40
|
const outDir = build && typeof build === "object"
|
|
38
41
|
? build.outDir
|
|
39
42
|
: undefined;
|
|
40
|
-
if (outDir
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}
|
|
43
|
+
if (outDir === undefined || typeof outDir === "string")
|
|
44
|
+
return;
|
|
45
|
+
throw toError(createError({
|
|
46
|
+
type: "config",
|
|
47
|
+
message: "build.outDir must be a string",
|
|
48
|
+
context: { field: "build.outDir", value: outDir, expected: "string" },
|
|
49
|
+
}));
|
|
47
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/src/config/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAoBnE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/src/config/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAoBnE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAiX1D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,eAAe,CAAC,CAkF1B;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAI9E"}
|
package/esm/src/config/loader.js
CHANGED
|
@@ -126,16 +126,19 @@ let cacheRevision = 0;
|
|
|
126
126
|
function validateCorsConfig(userConfig) {
|
|
127
127
|
if (!userConfig || typeof userConfig !== "object")
|
|
128
128
|
return;
|
|
129
|
-
const
|
|
130
|
-
const
|
|
129
|
+
const cfg = userConfig;
|
|
130
|
+
const security = cfg.security;
|
|
131
|
+
if (!security)
|
|
132
|
+
return;
|
|
133
|
+
const cors = security.cors;
|
|
131
134
|
if (!cors || typeof cors !== "object" || Array.isArray(cors))
|
|
132
135
|
return;
|
|
133
136
|
const origin = cors.origin;
|
|
134
|
-
if (origin
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
}
|
|
137
|
+
if (origin === undefined || typeof origin === "string")
|
|
138
|
+
return;
|
|
139
|
+
throw CONFIG_VALIDATION_FAILED.create({
|
|
140
|
+
detail: "security.cors.origin must be a string. Expected boolean or { origin?: string }",
|
|
141
|
+
});
|
|
139
142
|
}
|
|
140
143
|
function validateConfigShape(userConfig) {
|
|
141
144
|
validateVeryfrontConfig(userConfig);
|