veryfront 0.1.1237 → 0.1.1239
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 +24 -2
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +444 -35
- package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
- package/esm/cli/commands/build/error-handler.js +41 -3
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +1 -1
- package/esm/cli/commands/dev/command.d.ts.map +1 -1
- package/esm/cli/commands/dev/command.js +14 -1
- package/esm/cli/commands/dev/inference-status.d.ts +6 -0
- package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
- package/esm/cli/commands/dev/inference-status.js +14 -2
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +61 -0
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +23 -31
- package/esm/cli/commands/install/registry.d.ts.map +1 -1
- package/esm/cli/commands/install/registry.js +6 -9
- package/esm/cli/commands/login/command-help.d.ts.map +1 -1
- package/esm/cli/commands/login/command-help.js +3 -1
- package/esm/cli/commands/pull/command.d.ts +1 -0
- package/esm/cli/commands/pull/command.d.ts.map +1 -1
- package/esm/cli/commands/pull/command.js +49 -6
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +7 -0
- package/esm/cli/commands/push/command.d.ts +23 -12
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +461 -44
- package/esm/cli/commands/push/plan.d.ts +35 -0
- package/esm/cli/commands/push/plan.d.ts.map +1 -0
- package/esm/cli/commands/push/plan.js +96 -0
- package/esm/cli/commands/schedule/handler.d.ts +21 -2
- package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
- package/esm/cli/commands/schedule/handler.js +74 -27
- package/esm/cli/commands/schema/command-help.js +1 -1
- package/esm/cli/commands/up/command.js +1 -1
- package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
- package/esm/cli/commands/webhook/handler.js +3 -1
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +27 -5
- package/esm/cli/shared/args.d.ts +15 -1
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +56 -3
- package/esm/cli/shared/config.d.ts +11 -2
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +72 -27
- package/esm/cli/shared/project-creation.js +1 -1
- package/esm/cli/sync/state.d.ts +20 -0
- package/esm/cli/sync/state.d.ts.map +1 -0
- package/esm/cli/sync/state.js +193 -0
- package/esm/deno.js +2 -2
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
- package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
- package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
- package/esm/src/agent/conversation/delegation-policy.js +13 -3
- package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-terminal.js +6 -2
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +22 -11
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
- package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
- package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
- package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
- package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
- package/esm/src/agent/index.d.ts +3 -3
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.js +6 -3
- package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +15 -2
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
- package/esm/src/agent/runtime/call-context.d.ts +42 -11
- package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/call-context.js +480 -42
- package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
- package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
- package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
- package/esm/src/agent/runtime/effective-agent-system.js +29 -0
- package/esm/src/agent/runtime/index.d.ts +1 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +638 -53
- package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
- package/esm/src/agent/runtime/load-skill-tool.js +152 -21
- package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
- package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-resolution.js +14 -0
- package/esm/src/agent/runtime/model-transport.d.ts +1 -0
- package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-transport.js +5 -2
- package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
- package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/run-runtime-context.js +9 -3
- package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
- package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.js +113 -25
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
- package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +13 -9
- package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
- package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
- package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
- package/esm/src/agent/service/runtime.js +1 -1
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
- package/esm/src/agent/types.d.ts +14 -1
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.js +75 -16
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +37 -1
- package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
- package/esm/src/errors/catalog/build-errors.js +14 -0
- package/esm/src/errors/error-registry/build.d.ts +2 -0
- package/esm/src/errors/error-registry/build.d.ts.map +1 -1
- package/esm/src/errors/error-registry/build.js +8 -0
- package/esm/src/errors/error-registry/deploy.d.ts +4 -0
- package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
- package/esm/src/errors/error-registry/deploy.js +16 -0
- package/esm/src/errors/error-registry.d.ts +3 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/index.d.ts +2 -1
- package/esm/src/errors/index.d.ts.map +1 -1
- package/esm/src/errors/index.js +4 -3
- package/esm/src/errors/tenant-classification.d.ts +25 -0
- package/esm/src/errors/tenant-classification.d.ts.map +1 -0
- package/esm/src/errors/tenant-classification.js +61 -0
- package/esm/src/extensions/builtin-extensions.d.ts +10 -15
- package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.js +32 -26
- package/esm/src/extensions/deferred-extension.d.ts +4 -4
- package/esm/src/extensions/deferred-extension.js +4 -4
- package/esm/src/extensions/index.d.ts +1 -0
- package/esm/src/extensions/index.d.ts.map +1 -1
- package/esm/src/extensions/index.js +1 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/integrations/_data.d.ts.map +1 -1
- package/esm/src/integrations/_data.js +6 -0
- package/esm/src/integrations/schema.d.ts +8 -0
- package/esm/src/integrations/schema.d.ts.map +1 -1
- package/esm/src/integrations/schema.js +3 -0
- package/esm/src/integrations/types.d.ts +2 -0
- package/esm/src/integrations/types.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +35 -20
- package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
- package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
- package/esm/src/internal-agents/run-system-prompt.js +19 -13
- package/esm/src/internal-agents/schema.d.ts +2 -0
- package/esm/src/internal-agents/schema.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
- package/esm/src/observability/application-error-contract.d.ts +4 -0
- package/esm/src/observability/application-error-contract.d.ts.map +1 -1
- package/esm/src/observability/application-errors.d.ts.map +1 -1
- package/esm/src/observability/application-errors.js +64 -3
- package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-http.js +55 -17
- package/esm/src/provider/shared/index.d.ts +1 -0
- package/esm/src/provider/shared/index.d.ts.map +1 -1
- package/esm/src/provider/shared/index.js +2 -0
- package/esm/src/provider/types.d.ts +1 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
- package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
- package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/context.js +10 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
- package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/alert-dialog.js +181 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
- package/esm/src/react/components/ui/aspect-ratio.js +13 -0
- package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
- package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
- package/esm/src/react/components/ui/autocomplete.js +59 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
- package/esm/src/react/components/ui/breadcrumb.js +67 -0
- package/esm/src/react/components/ui/calendar.d.ts +40 -0
- package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
- package/esm/src/react/components/ui/calendar.js +170 -0
- package/esm/src/react/components/ui/combobox.d.ts +74 -0
- package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/combobox.js +100 -0
- package/esm/src/react/components/ui/context-menu.d.ts +116 -0
- package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/context-menu.js +168 -0
- package/esm/src/react/components/ui/date-picker.d.ts +69 -0
- package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
- package/esm/src/react/components/ui/date-picker.js +96 -0
- package/esm/src/react/components/ui/dialog.d.ts +41 -11
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +47 -28
- package/esm/src/react/components/ui/drawer.d.ts +31 -8
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +33 -22
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +7 -75
- package/esm/src/react/components/ui/field.d.ts +70 -0
- package/esm/src/react/components/ui/field.d.ts.map +1 -0
- package/esm/src/react/components/ui/field.js +161 -0
- package/esm/src/react/components/ui/file-type.d.ts +9 -8
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +8 -8
- package/esm/src/react/components/ui/hover-card.d.ts +82 -0
- package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
- package/esm/src/react/components/ui/hover-card.js +140 -0
- package/esm/src/react/components/ui/index.d.ts +23 -2
- package/esm/src/react/components/ui/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/index.js +21 -0
- package/esm/src/react/components/ui/input-otp.d.ts +37 -0
- package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
- package/esm/src/react/components/ui/input-otp.js +42 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
- package/esm/src/react/components/ui/menu-keyboard.js +76 -0
- package/esm/src/react/components/ui/menubar.d.ts +98 -0
- package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
- package/esm/src/react/components/ui/menubar.js +173 -0
- package/esm/src/react/components/ui/meter.d.ts +45 -0
- package/esm/src/react/components/ui/meter.d.ts.map +1 -0
- package/esm/src/react/components/ui/meter.js +59 -0
- package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
- package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
- package/esm/src/react/components/ui/modal-surface.js +23 -6
- package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
- package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/navigation-menu.js +195 -0
- package/esm/src/react/components/ui/number-field.d.ts +46 -0
- package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
- package/esm/src/react/components/ui/number-field.js +121 -0
- package/esm/src/react/components/ui/pagination.d.ts +77 -0
- package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
- package/esm/src/react/components/ui/pagination.js +62 -0
- package/esm/src/react/components/ui/popover.d.ts +42 -13
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +25 -12
- package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
- package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
- package/esm/src/react/components/ui/scroll-area.js +35 -0
- package/esm/src/react/components/ui/separator.d.ts +20 -0
- package/esm/src/react/components/ui/separator.d.ts.map +1 -0
- package/esm/src/react/components/ui/separator.js +13 -0
- package/esm/src/react/components/ui/slider.d.ts +44 -0
- package/esm/src/react/components/ui/slider.d.ts.map +1 -0
- package/esm/src/react/components/ui/slider.js +46 -0
- package/esm/src/react/components/ui/status.d.ts +6 -5
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +4 -4
- package/esm/src/react/components/ui/tabs.d.ts +32 -9
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +46 -22
- package/esm/src/react/components/ui/toggle.d.ts +26 -0
- package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
- package/esm/src/react/components/ui/toggle.js +29 -0
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
- package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
- package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
- package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +12 -1
- package/esm/src/runs/runs-client.d.ts +2 -4
- package/esm/src/runs/runs-client.d.ts.map +1 -1
- package/esm/src/runs/schemas.d.ts +18 -8
- package/esm/src/runs/schemas.d.ts.map +1 -1
- package/esm/src/runs/schemas.js +26 -0
- package/esm/src/runtime/model-call-context.d.ts +6 -1
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +133 -15
- package/esm/src/schedule/factory.d.ts +8 -2
- package/esm/src/schedule/factory.d.ts.map +1 -1
- package/esm/src/schedule/factory.js +0 -8
- package/esm/src/schedule/index.d.ts +10 -1
- package/esm/src/schedule/index.d.ts.map +1 -1
- package/esm/src/schedule/index.js +9 -0
- package/esm/src/schedule/types.d.ts +30 -11
- package/esm/src/schedule/types.d.ts.map +1 -1
- package/esm/src/schedule/validation.d.ts +17 -0
- package/esm/src/schedule/validation.d.ts.map +1 -1
- package/esm/src/schedule/validation.js +93 -5
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +6 -1
- package/esm/src/server/bootstrap.d.ts.map +1 -1
- package/esm/src/server/bootstrap.js +6 -0
- package/esm/src/server/dev-server/index.d.ts +1 -1
- package/esm/src/server/dev-server/index.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.d.ts +7 -3
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +12 -3
- package/esm/src/server/dev-server/types.d.ts +7 -1
- package/esm/src/server/dev-server/types.d.ts.map +1 -1
- package/esm/src/server/dev-server.d.ts +1 -1
- package/esm/src/server/dev-server.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
- package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/index.js +3 -0
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
- package/esm/src/server/index.d.ts +3 -3
- package/esm/src/server/index.d.ts.map +1 -1
- package/esm/src/server/index.js +10 -5
- package/esm/src/server/node-handler.d.ts.map +1 -1
- package/esm/src/server/node-handler.js +4 -1
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +2 -1
- package/esm/src/server/project-env/cache.d.ts +17 -0
- package/esm/src/server/project-env/cache.d.ts.map +1 -1
- package/esm/src/server/project-env/cache.js +78 -2
- package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
- package/esm/src/server/project-env/fetcher.js +24 -14
- package/esm/src/server/project-env/index.d.ts +1 -1
- package/esm/src/server/project-env/index.d.ts.map +1 -1
- package/esm/src/server/project-env/index.js +1 -1
- package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
- package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
- package/esm/src/server/project-env/internal-authorization.js +32 -0
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/projects-handler.js +4 -2
- package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-bundler.js +6 -5
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
- package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache.js +16 -10
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +87 -7
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
- package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
- package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
- package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/compile.js +44 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
- package/esm/src/transforms/shared/specifier-suffix.js +43 -0
- package/esm/src/trigger/index.d.ts +2 -2
- package/esm/src/trigger/index.d.ts.map +1 -1
- package/esm/src/trigger/index.js +1 -1
- package/esm/src/trigger/local-runner.d.ts +2 -2
- package/esm/src/trigger/local-runner.d.ts.map +1 -1
- package/esm/src/trigger/local-runner.js +11 -4
- package/esm/src/trigger/target.d.ts +97 -5
- package/esm/src/trigger/target.d.ts.map +1 -1
- package/esm/src/trigger/target.js +175 -5
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/webhook/types.d.ts +21 -6
- package/esm/src/webhook/types.d.ts.map +1 -1
- package/esm/src/webhook/validation.d.ts.map +1 -1
- package/esm/src/webhook/validation.js +27 -39
- package/esm/templates/index.d.ts +1 -1
- package/esm/templates/index.d.ts.map +1 -1
- package/esm/templates/loader.d.ts +6 -6
- package/esm/templates/loader.d.ts.map +1 -1
- package/esm/templates/loader.js +34 -18
- package/esm/templates/manifest.generated.d.ts +3 -0
- package/esm/templates/manifest.generated.d.ts.map +1 -0
- package/esm/templates/manifest.generated.js +2 -0
- package/package.json +8 -8
- package/esm/templates/manifest.d.ts +0 -664
- package/esm/templates/manifest.d.ts.map +0 -1
- package/esm/templates/manifest.js +0 -662
|
@@ -22,7 +22,7 @@ export { fetchEsmModule, rewriteEsmPaths } from "./esm-rewriter.js";
|
|
|
22
22
|
* @param useLocalAdapter - Whether to use local adapter for reading
|
|
23
23
|
* @returns Path to the transformed module file
|
|
24
24
|
*/
|
|
25
|
-
export declare function transformModuleWithDeps(filePath: string, tmpDir: string, localAdapter: RuntimeAdapter, config: ModuleLoaderConfig, useLocalAdapter?: boolean, lineage?: ReadonlySet<string>, cycleTargets?: Set<string>): Promise<string>;
|
|
25
|
+
export declare function transformModuleWithDeps(filePath: string, tmpDir: string, localAdapter: RuntimeAdapter, config: ModuleLoaderConfig, useLocalAdapter?: boolean, lineage?: ReadonlySet<string>, cycleTargets?: Set<string>, unresolvedSpecifiers?: Set<string>): Promise<string>;
|
|
26
26
|
export interface ModuleLoaderConfig {
|
|
27
27
|
projectDir: string;
|
|
28
28
|
projectId?: string;
|
|
@@ -53,6 +53,7 @@ export interface ModuleLoaderConfig {
|
|
|
53
53
|
* message variants the runtimes surface for a missing `import()` target.
|
|
54
54
|
*/
|
|
55
55
|
export declare function isMissingModuleError(error: unknown): boolean;
|
|
56
|
+
export declare function isUnresolvedTenantImport(error: unknown, unresolvedSpecifiers: ReadonlySet<string>, rebuiltArtifactPath?: string): boolean;
|
|
56
57
|
/**
|
|
57
58
|
* Load a module by path, transforming it and its dependencies.
|
|
58
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/orchestrator/module-loader/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/orchestrator/module-loader/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAsBzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAKhG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA6CpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpE;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,cAAc,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,eAAe,UAAQ,EACvB,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,EAKxC,YAAY,GAAE,GAAG,CAAC,MAAM,CAAa,EAarC,oBAAoB,GAAE,GAAG,CAAC,MAAM,CAAa,GAC5C,OAAO,CAAC,MAAM,CAAC,CAyLjB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0EAA0E;IAC1E,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,mEAAmE;IACnE,6BAA6B,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjE,yEAAyE;IACzE,uBAAuB,CAAC,EAAE,4BAA4B,CAAC;IACvD,0DAA0D;IAC1D,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,yEAAyE;IACzE,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAyBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAI5D;AAkED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAC,EACzC,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAwBT;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0JlC"}
|
|
@@ -13,12 +13,36 @@ import { getHttpBundleCacheDir, getMdxEsmCacheDir } from "../../../utils/cache-d
|
|
|
13
13
|
import { join, toFileUrl } from "../../../platform/compat/path/index.js";
|
|
14
14
|
import { invalidateMdxEsmModule } from "../../../transforms/mdx/esm-module-loader/cache/index.js";
|
|
15
15
|
import { resolveModuleDependencies, rewriteResolvedDependencyImports, } from "./dependency-resolver.js";
|
|
16
|
-
import { persistTransformedModule } from "./module-persistence.js";
|
|
16
|
+
import { persistTransformedModule, readPersistedUnresolvedSpecifiers, } from "./module-persistence.js";
|
|
17
17
|
import { transformModuleCodeWithCache } from "./module-transform-cache.js";
|
|
18
18
|
import { buildModuleTransformCacheVariant, getModuleCacheKey, resolveCachedModulePath, } from "./module-cache-lookup.js";
|
|
19
|
-
import { markBuildFailure } from "./build-failure.js";
|
|
19
|
+
import { markBuildFailure, markTenantBuildFailure } from "./build-failure.js";
|
|
20
|
+
import { MODULE_CACHE_MAX_ENTRIES } from "../../../utils/constants/cache.js";
|
|
21
|
+
import { isTenantSourceBuildError } from "../../../errors/tenant-classification.js";
|
|
22
|
+
import { rewriteSsrProjectAliasSpecifier } from "../../../transforms/import-rewriter/strategies/alias-strategy.js";
|
|
20
23
|
export { isBuildFailure } from "./build-failure.js";
|
|
21
24
|
const logger = rendererLogger.component("module-loader");
|
|
25
|
+
/**
|
|
26
|
+
* Specifiers each transformed module subtree left as authored, keyed by the
|
|
27
|
+
* root module's transform cache key.
|
|
28
|
+
*
|
|
29
|
+
* The transform cache lets a module skip dependency resolution entirely, so the
|
|
30
|
+
* evidence has to outlive the resolution that produced it — otherwise a
|
|
31
|
+
* dependency's dangling tenant import is only ever visible on the very first
|
|
32
|
+
* transform. The memo uses the module cache's entry bound and refreshes access
|
|
33
|
+
* order on reads, while holding only specifier strings.
|
|
34
|
+
*/
|
|
35
|
+
const unresolvedSpecifiersByCacheKey = new Map();
|
|
36
|
+
function cacheUnresolvedSpecifiers(cacheKey, specifiers) {
|
|
37
|
+
unresolvedSpecifiersByCacheKey.delete(cacheKey);
|
|
38
|
+
unresolvedSpecifiersByCacheKey.set(cacheKey, specifiers);
|
|
39
|
+
while (unresolvedSpecifiersByCacheKey.size > MODULE_CACHE_MAX_ENTRIES) {
|
|
40
|
+
const oldestKey = unresolvedSpecifiersByCacheKey.keys().next().value;
|
|
41
|
+
if (oldestKey === undefined)
|
|
42
|
+
break;
|
|
43
|
+
unresolvedSpecifiersByCacheKey.delete(oldestKey);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
22
46
|
function throwIfModuleLoadAborted(config) {
|
|
23
47
|
config.signal?.throwIfAborted();
|
|
24
48
|
}
|
|
@@ -54,7 +78,20 @@ export async function transformModuleWithDeps(filePath, tmpDir, localAdapter, co
|
|
|
54
78
|
// is copied per level): a descendant records a cycle target here, and the
|
|
55
79
|
// ancestor that eventually persists that target reads it to write a stable
|
|
56
80
|
// alias the left-as-authored cycle edge can resolve to.
|
|
57
|
-
cycleTargets = new Set()
|
|
81
|
+
cycleTargets = new Set(),
|
|
82
|
+
// Also shared by reference across the whole transform tree: every specifier
|
|
83
|
+
// the dependency resolver could not resolve and therefore left as authored.
|
|
84
|
+
// Those are the only specifiers that can survive into the built module and
|
|
85
|
+
// fail at `import()` time, so this is the evidence that tells a tenant typo
|
|
86
|
+
// apart from a framework artifact going missing. See `loadModule`.
|
|
87
|
+
//
|
|
88
|
+
// A module served from the cache below returns before
|
|
89
|
+
// `resolveModuleDependencies` runs, so it cannot re-derive its own evidence.
|
|
90
|
+
// That matters because the retry path invalidates only the *root* module's
|
|
91
|
+
// cache entry: without a memo, a typo living in a dependency would go
|
|
92
|
+
// unrecorded on every rebuild and never be attributed to the tenant. The
|
|
93
|
+
// cache-hit branch therefore replays what the first resolution found.
|
|
94
|
+
unresolvedSpecifiers = new Set()) {
|
|
58
95
|
throwIfModuleLoadAborted(config);
|
|
59
96
|
const { moduleCache, projectDir, projectId, contentSourceId, adapter, mode } = config;
|
|
60
97
|
const cacheKey = getModuleCacheKey(filePath, projectId, projectDir, contentSourceId, config.reactVersion, mode, config.dependencyPinningCacheKey, config.moduleServerOrigin);
|
|
@@ -70,9 +107,24 @@ cycleTargets = new Set()) {
|
|
|
70
107
|
moduleServerOrigin: config.moduleServerOrigin,
|
|
71
108
|
});
|
|
72
109
|
if (cachedPath) {
|
|
110
|
+
// Replay the evidence this module produced when it was last resolved. A
|
|
111
|
+
// cache hit skips `resolveModuleDependencies`, so without this a dependency
|
|
112
|
+
// that was already transformed contributes nothing and its tenant-authored
|
|
113
|
+
// dangling import silently loses attribution.
|
|
114
|
+
const memoizedUnresolvedSpecifiers = unresolvedSpecifiersByCacheKey.get(cacheKey);
|
|
115
|
+
const cachedUnresolvedSpecifiers = memoizedUnresolvedSpecifiers ??
|
|
116
|
+
await readPersistedUnresolvedSpecifiers(cachedPath, localAdapter);
|
|
117
|
+
cacheUnresolvedSpecifiers(cacheKey, cachedUnresolvedSpecifiers);
|
|
118
|
+
for (const specifier of cachedUnresolvedSpecifiers) {
|
|
119
|
+
unresolvedSpecifiers.add(specifier);
|
|
120
|
+
}
|
|
73
121
|
markModuleLoadProgress(config, "module:cache-hit", filePath);
|
|
74
122
|
return cachedPath;
|
|
75
123
|
}
|
|
124
|
+
// Collect this module and every recursively transformed descendant into an
|
|
125
|
+
// isolated set. Once persistence succeeds, cache that complete subtree and
|
|
126
|
+
// merge it into the caller's aggregate evidence.
|
|
127
|
+
const moduleUnresolvedSpecifiers = new Set();
|
|
76
128
|
const readAdapter = useLocalAdapter ? localAdapter : adapter;
|
|
77
129
|
let fileContent = decodeFileContent(await readAdapter.fs.readFile(filePath));
|
|
78
130
|
markModuleLoadProgress(config, "module:source-read", filePath);
|
|
@@ -115,7 +167,7 @@ cycleTargets = new Set()) {
|
|
|
115
167
|
isLocalLib: dep.isLocalLib,
|
|
116
168
|
});
|
|
117
169
|
try {
|
|
118
|
-
const depTempPath = await transformModuleWithDeps(dep.depFilePath, tmpDir, localAdapter, config, dep.isLocalLib, nextLineage, cycleTargets);
|
|
170
|
+
const depTempPath = await transformModuleWithDeps(dep.depFilePath, tmpDir, localAdapter, config, dep.isLocalLib, nextLineage, cycleTargets, moduleUnresolvedSpecifiers);
|
|
119
171
|
return { ...dep, depTempPath };
|
|
120
172
|
}
|
|
121
173
|
catch (error) {
|
|
@@ -124,6 +176,13 @@ cycleTargets = new Set()) {
|
|
|
124
176
|
// branch must not fail the page that merely mentions it.
|
|
125
177
|
if (!dep.isDynamic)
|
|
126
178
|
throw error;
|
|
179
|
+
// A tenant-source compile failure is deliberately non-fatal until this
|
|
180
|
+
// dynamic edge executes. The importer remains authored, so retain that
|
|
181
|
+
// provenance for the retry classification seam. Infrastructure errors
|
|
182
|
+
// stay framework-owned even if the resulting edge is later missing.
|
|
183
|
+
if (isTenantSourceBuildError(error)) {
|
|
184
|
+
moduleUnresolvedSpecifiers.add(dep.path);
|
|
185
|
+
}
|
|
127
186
|
logger.warn("Leaving an unresolvable dynamic dependency as authored:", {
|
|
128
187
|
path: dep.path,
|
|
129
188
|
depFilePath: dep.depFilePath,
|
|
@@ -143,6 +202,7 @@ cycleTargets = new Set()) {
|
|
|
143
202
|
for (const dep of resolvedDeps) {
|
|
144
203
|
if (dep.depFilePath)
|
|
145
204
|
continue;
|
|
205
|
+
moduleUnresolvedSpecifiers.add(dep.path);
|
|
146
206
|
logger.warn("Could not find dependency:", {
|
|
147
207
|
path: dep.path,
|
|
148
208
|
relativePath: dep.relativePath,
|
|
@@ -179,7 +239,11 @@ cycleTargets = new Set()) {
|
|
|
179
239
|
moduleServerOrigin: config.moduleServerOrigin,
|
|
180
240
|
dependencyPinningCacheKey: config.dependencyPinningCacheKey,
|
|
181
241
|
isCycleTarget: cycleTargets.has(filePath),
|
|
242
|
+
unresolvedSpecifiers: [...moduleUnresolvedSpecifiers],
|
|
182
243
|
});
|
|
244
|
+
cacheUnresolvedSpecifiers(cacheKey, [...moduleUnresolvedSpecifiers]);
|
|
245
|
+
for (const specifier of moduleUnresolvedSpecifiers)
|
|
246
|
+
unresolvedSpecifiers.add(specifier);
|
|
183
247
|
markModuleLoadProgress(config, "module:persisted", filePath);
|
|
184
248
|
return persistedPath;
|
|
185
249
|
}
|
|
@@ -214,6 +278,94 @@ export function isMissingModuleError(error) {
|
|
|
214
278
|
return true;
|
|
215
279
|
return /cannot find module|module not found/i.test(error.message);
|
|
216
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* Whether a module-not-found failure is a specifier the project authored that
|
|
283
|
+
* points at nothing, as opposed to framework infrastructure going missing.
|
|
284
|
+
*
|
|
285
|
+
* `isMissingModuleError` alone cannot answer this: an `ERR_MODULE_NOT_FOUND`
|
|
286
|
+
* is raised the same way for a tenant typo, an HTTP bundle miss, a cycle-break
|
|
287
|
+
* alias that did not resolve, and a rebuilt artifact the runtime failed to
|
|
288
|
+
* persist. Only the first is the tenant's fault, and only the first may be
|
|
289
|
+
* downgraded to a warning in observability.
|
|
290
|
+
*
|
|
291
|
+
* The discriminator is evidence rather than a guess: `resolveModuleDependencies`
|
|
292
|
+
* resolves only `@/` aliases and relative imports, and `transformModuleWithDeps`
|
|
293
|
+
* records every specifier it had to leave as authored. If it left none anywhere
|
|
294
|
+
* in this module's transform tree, then nothing tenant-authored survived
|
|
295
|
+
* unrewritten and whatever is missing here is framework-owned.
|
|
296
|
+
*
|
|
297
|
+
* Note the runtime reports the *resolved* path, which for a dropped relative
|
|
298
|
+
* specifier lands inside the build's own temp directory — so a "is this path
|
|
299
|
+
* ours?" test on the message would reject exactly the case this identifies.
|
|
300
|
+
*/
|
|
301
|
+
/**
|
|
302
|
+
* The specifier a module-not-found error names as missing.
|
|
303
|
+
*
|
|
304
|
+
* Runtimes report it as the first quoted token and then name the importer, so
|
|
305
|
+
* only the first quote pair identifies what is actually absent. The quote style
|
|
306
|
+
* differs by runtime and both reach this seam, since `isMissingModuleError`
|
|
307
|
+
* matches Node's phrasing as well as Deno's:
|
|
308
|
+
*
|
|
309
|
+
* - Deno: `Module not found "file:///…/missing".`
|
|
310
|
+
* - Node: `Cannot find module '/…/missing' imported from /…/page.js`
|
|
311
|
+
*
|
|
312
|
+
* Note Node leaves the importer unquoted, so a double-quote-only match would
|
|
313
|
+
* return `""` there and silently disable every check built on this.
|
|
314
|
+
*/
|
|
315
|
+
function missingModuleTarget(message) {
|
|
316
|
+
const match = message.match(/"([^"]*)"|'([^']*)'/);
|
|
317
|
+
return match?.[1] ?? match?.[2] ?? "";
|
|
318
|
+
}
|
|
319
|
+
function normalizeMissingModuleTarget(message) {
|
|
320
|
+
const target = missingModuleTarget(message).replace(/[?#].*$/, "");
|
|
321
|
+
if (target.startsWith("file://")) {
|
|
322
|
+
try {
|
|
323
|
+
return decodeURIComponent(new URL(target).pathname);
|
|
324
|
+
}
|
|
325
|
+
catch {
|
|
326
|
+
return target.replace(/^file:\/+/, "/");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return target;
|
|
330
|
+
}
|
|
331
|
+
function normalizeUnresolvedSpecifier(specifier) {
|
|
332
|
+
const withoutSuffix = specifier.replace(/[?#].*$/, "");
|
|
333
|
+
return (rewriteSsrProjectAliasSpecifier(withoutSuffix) ?? withoutSuffix)
|
|
334
|
+
.replace(/^(\.\/|\.\.\/)+/, "")
|
|
335
|
+
.replace(/^\/+/, "");
|
|
336
|
+
}
|
|
337
|
+
function missingTargetMatchesSpecifier(target, specifier) {
|
|
338
|
+
const normalizedSpecifier = normalizeUnresolvedSpecifier(specifier);
|
|
339
|
+
if (!normalizedSpecifier)
|
|
340
|
+
return false;
|
|
341
|
+
return target === normalizedSpecifier || target.endsWith(`/${normalizedSpecifier}`);
|
|
342
|
+
}
|
|
343
|
+
export function isUnresolvedTenantImport(error, unresolvedSpecifiers, rebuiltArtifactPath) {
|
|
344
|
+
if (!isMissingModuleError(error))
|
|
345
|
+
return false;
|
|
346
|
+
if (unresolvedSpecifiers.size === 0)
|
|
347
|
+
return false;
|
|
348
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
349
|
+
// An HTTP bundle is framework infrastructure with dedicated recovery on the
|
|
350
|
+
// outer branch. A miss on one is not the tenant's doing even when the tenant
|
|
351
|
+
// separately has an unresolved import.
|
|
352
|
+
if (/veryfront-http-bundle\/http-[a-f0-9]+\.mjs/.test(message))
|
|
353
|
+
return false;
|
|
354
|
+
// The missing module can be the rebuilt artifact *itself* rather than one of
|
|
355
|
+
// its dependencies — a racing cache sweep or a failing cache volume can evict
|
|
356
|
+
// it between persist and import. That is repeated cache eviction, which must
|
|
357
|
+
// stay at error severity however the tenant's own imports look.
|
|
358
|
+
//
|
|
359
|
+
// Only the *missing target* may be compared, never the whole message: the
|
|
360
|
+
// runtime appends the importer's location, and at this seam the importer is
|
|
361
|
+
// always the rebuilt artifact, so scanning the full message would exclude
|
|
362
|
+
// every case including the tenant typo this predicate exists to catch.
|
|
363
|
+
if (rebuiltArtifactPath && missingModuleTarget(message).includes(rebuiltArtifactPath)) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
const missingTarget = normalizeMissingModuleTarget(message);
|
|
367
|
+
return [...unresolvedSpecifiers].some((specifier) => missingTargetMatchesSpecifier(missingTarget, specifier));
|
|
368
|
+
}
|
|
217
369
|
/**
|
|
218
370
|
* Load a module by path, transforming it and its dependencies.
|
|
219
371
|
*
|
|
@@ -228,9 +380,13 @@ export async function loadModule(filePath, config) {
|
|
|
228
380
|
markModuleLoadProgress(config, "module:cache-ready", filePath);
|
|
229
381
|
// Everything up to here compiles and resolves source, so a failure is a build
|
|
230
382
|
// failure. Everything after it is the module running.
|
|
383
|
+
// Every specifier the resolver had to leave as authored, across this module's
|
|
384
|
+
// whole transform tree. Read back at the retry seam below to tell a tenant
|
|
385
|
+
// typo apart from framework infrastructure going missing.
|
|
386
|
+
const unresolvedSpecifiers = new Set();
|
|
231
387
|
let tempFilePath;
|
|
232
388
|
try {
|
|
233
|
-
tempFilePath = await transformModuleWithDeps(filePath, tmpDir, localAdapter, config);
|
|
389
|
+
tempFilePath = await transformModuleWithDeps(filePath, tmpDir, localAdapter, config, false, undefined, undefined, unresolvedSpecifiers);
|
|
234
390
|
}
|
|
235
391
|
catch (error) {
|
|
236
392
|
throw markBuildFailure(error);
|
|
@@ -280,14 +436,41 @@ export async function loadModule(filePath, config) {
|
|
|
280
436
|
// invalidation stays scoped to this tenant (the path-cache key is not
|
|
281
437
|
// project-scoped — see invalidateMdxEsmModule).
|
|
282
438
|
invalidateMdxEsmModule(tmpDir, filePath, config.projectDir, config.reactVersion, buildModuleTransformCacheVariant(config.dependencyPinningCacheKey, config.moduleServerOrigin));
|
|
439
|
+
// Classification at the retry seam must describe the rebuilt graph, not
|
|
440
|
+
// the artifact that just failed. A dependency may appear between the two
|
|
441
|
+
// transforms, so retaining its earlier dropped-specifier evidence can
|
|
442
|
+
// misattribute an unrelated retry failure to the tenant.
|
|
443
|
+
unresolvedSpecifiers.clear();
|
|
283
444
|
let rebuiltPath;
|
|
284
445
|
try {
|
|
285
|
-
rebuiltPath = await transformModuleWithDeps(filePath, tmpDir, localAdapter, config);
|
|
446
|
+
rebuiltPath = await transformModuleWithDeps(filePath, tmpDir, localAdapter, config, false, undefined, undefined, unresolvedSpecifiers);
|
|
286
447
|
}
|
|
287
448
|
catch (rebuildError) {
|
|
288
449
|
throw markBuildFailure(rebuildError);
|
|
289
450
|
}
|
|
290
|
-
|
|
451
|
+
try {
|
|
452
|
+
return await import(`${toFileUrl(rebuiltPath).href}?t=${Date.now()}&rebuilt=1`);
|
|
453
|
+
}
|
|
454
|
+
catch (retryError) {
|
|
455
|
+
// The module was found and ran, so it threw at module scope. That is an
|
|
456
|
+
// ordinary application error the project's own error page should
|
|
457
|
+
// present, not a build failure — leave it untagged.
|
|
458
|
+
if (!isMissingModuleError(retryError))
|
|
459
|
+
throw retryError;
|
|
460
|
+
// Still unresolved after a full rebuild from source, and the resolver
|
|
461
|
+
// recorded leaving a specifier as authored: a path the project wrote
|
|
462
|
+
// that points at nothing. Classify it explicitly, because
|
|
463
|
+
// `ERR_MODULE_NOT_FOUND` is not a VeryfrontError and slug-based
|
|
464
|
+
// classification cannot see it.
|
|
465
|
+
if (isUnresolvedTenantImport(retryError, unresolvedSpecifiers, rebuiltPath)) {
|
|
466
|
+
throw markTenantBuildFailure(retryError);
|
|
467
|
+
}
|
|
468
|
+
// A resolution failure the tenant did not cause: an HTTP bundle miss, a
|
|
469
|
+
// cycle-break alias that did not resolve, or an artifact the rebuild
|
|
470
|
+
// failed to persist. Still a build failure, but a framework-owned one,
|
|
471
|
+
// so it keeps error-level severity.
|
|
472
|
+
throw markBuildFailure(retryError);
|
|
473
|
+
}
|
|
291
474
|
}
|
|
292
475
|
logger.error("Failed to import module:", {
|
|
293
476
|
filePath,
|
|
@@ -16,6 +16,8 @@ export interface PersistTransformedModuleInput {
|
|
|
16
16
|
reactVersion?: string;
|
|
17
17
|
dependencyPinningCacheKey?: string;
|
|
18
18
|
moduleServerOrigin?: string;
|
|
19
|
+
/** Tenant-authored imports left unresolved in this module subtree. */
|
|
20
|
+
unresolvedSpecifiers?: readonly string[];
|
|
19
21
|
/**
|
|
20
22
|
* True when a dynamic import elsewhere closes a cycle back onto this module.
|
|
21
23
|
* Such an edge is left as authored (`import("../app/page.js")`), so it needs a
|
|
@@ -23,6 +25,8 @@ export interface PersistTransformedModuleInput {
|
|
|
23
25
|
*/
|
|
24
26
|
isCycleTarget?: boolean;
|
|
25
27
|
}
|
|
28
|
+
/** Read unresolved-import evidence stored beside a transformed artifact. */
|
|
29
|
+
export declare function readPersistedUnresolvedSpecifiers(modulePath: string, localAdapter: RuntimeAdapter): Promise<readonly string[]>;
|
|
26
30
|
/** Write a transformed module artifact and register cache pointers. */
|
|
27
31
|
export declare function persistTransformedModule(input: PersistTransformedModuleInput): Promise<string>;
|
|
28
32
|
//# sourceMappingURL=module-persistence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-persistence.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/orchestrator/module-loader/module-persistence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"module-persistence.d.ts","sourceRoot":"","sources":["../../../../../src/src/rendering/orchestrator/module-loader/module-persistence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AA6DzE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,cAAc,CAAC;IAC7B,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,4EAA4E;AAC5E,wBAAsB,iCAAiC,CACrD,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,cAAc,GAC3B,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAmB5B;AA4ZD,uEAAuE;AACvE,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC,MAAM,CAAC,CAgHjB"}
|