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
|
@@ -3,15 +3,82 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module transforms/mdx/esm-module-loader/module-fetcher/nested-imports
|
|
5
5
|
*/
|
|
6
|
+
import { splitSpecifierSuffix } from "../../../shared/specifier-suffix.js";
|
|
6
7
|
import { LOG_PREFIX_MDX_LOADER } from "../constants.js";
|
|
7
8
|
import { createStubModule } from "../utils/stub-module.js";
|
|
8
|
-
import { findStaticImportFromSpans, replaceSourceSpans, } from "../utils/source-spans.js";
|
|
9
|
+
import { findDynamicImportSpans, findStaticImportFromSpans, findStaticSideEffectImportSpans, replaceSourceSpans, } from "../utils/source-spans.js";
|
|
9
10
|
import { buildMissingModuleError } from "../missing-module.js";
|
|
11
|
+
import { isMdxMissingModuleError } from "../missing-module.js";
|
|
10
12
|
import { parallelMap } from "../../../../utils/parallel.js";
|
|
11
13
|
import { Semaphore } from "../../../../modules/react-loader/ssr-module-loader/concurrency/semaphore.js";
|
|
12
14
|
import { assertMdxModuleImportCount, MAX_MDX_MODULE_IMPORTS_PER_FILE, MAX_MDX_MODULE_TRANSFORM_CONCURRENCY, } from "./limits.js";
|
|
15
|
+
import { VeryfrontError } from "../../../../errors/index.js";
|
|
16
|
+
import { isTenantSourceBuildError } from "../../../../errors/tenant-classification.js";
|
|
13
17
|
function matchUnresolvedVfModuleSpecifier(specifier) {
|
|
14
|
-
return specifier.match(/^((?:file:\/\/)?\/?\/?_vf_modules
|
|
18
|
+
return specifier.match(/^((?:file:\/\/)?\/?\/?_vf_modules\/.+)$/)?.[1] ?? null;
|
|
19
|
+
}
|
|
20
|
+
const MALFORMED_IMPORT_SPECIFIER = "<malformed import specifier>";
|
|
21
|
+
function isMalformedSpecifierSyntaxError(error) {
|
|
22
|
+
return error instanceof SyntaxError && error.message.includes("module specifier");
|
|
23
|
+
}
|
|
24
|
+
/** Return the sanitized runtime failure for a dependency error that can stay lazy. */
|
|
25
|
+
export function dynamicDependencyFailure(modulePath, error) {
|
|
26
|
+
if (!(error instanceof Error))
|
|
27
|
+
return null;
|
|
28
|
+
if (isMdxMissingModuleError(error)) {
|
|
29
|
+
return {
|
|
30
|
+
name: "MissingModuleError",
|
|
31
|
+
message: `[Veryfront] Missing module: ${modulePath}. This module or file does not exist in your project.`,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
if (error.name === "CircularModuleDependencyError") {
|
|
35
|
+
return {
|
|
36
|
+
name: "CircularModuleDependencyError",
|
|
37
|
+
message: `[Veryfront] Dynamic import failed for ${modulePath}: circular module dependency.`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (error.name === "ModuleSourceLimitError" ||
|
|
41
|
+
error.name === "HttpModuleBodyTooLargeError") {
|
|
42
|
+
return {
|
|
43
|
+
name: "ModuleSourceLimitError",
|
|
44
|
+
message: `[Veryfront] Dynamic import failed for ${modulePath}: module source exceeds the allowed size.`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (error instanceof VeryfrontError && error.slug === "mdx-compile-error") {
|
|
48
|
+
return {
|
|
49
|
+
name: "MdxCompileError",
|
|
50
|
+
message: `[Veryfront] Dynamic import failed for ${modulePath}: MDX compilation failed.`,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (error instanceof VeryfrontError && error.slug === "compilation-error" &&
|
|
54
|
+
isTenantSourceBuildError(error)) {
|
|
55
|
+
return {
|
|
56
|
+
name: "CompilationError",
|
|
57
|
+
message: `[Veryfront] Dynamic import failed for ${modulePath}: TypeScript compilation failed.`,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
function scanImportSpans(scan) {
|
|
63
|
+
try {
|
|
64
|
+
return { spans: scan(), malformed: false };
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (!isMalformedSpecifierSyntaxError(error))
|
|
68
|
+
throw error;
|
|
69
|
+
return { spans: [], malformed: true };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Serialize a resolved module URL as a JavaScript string literal.
|
|
74
|
+
*
|
|
75
|
+
* A preserved suffix is author-controlled text (`?label="x"`, a backslash in a
|
|
76
|
+
* cache path). Wrapping it in quotes by hand emits a module that fails to
|
|
77
|
+
* parse, taking every other import in the file down with it, so every emitted
|
|
78
|
+
* specifier must go through this.
|
|
79
|
+
*/
|
|
80
|
+
export function toImportStringLiteral(url) {
|
|
81
|
+
return JSON.stringify(url);
|
|
15
82
|
}
|
|
16
83
|
/**
|
|
17
84
|
* Find nested module imports in code.
|
|
@@ -20,21 +87,77 @@ function matchUnresolvedVfModuleSpecifier(specifier) {
|
|
|
20
87
|
export function findNestedImports(moduleCode) {
|
|
21
88
|
const vfModules = [];
|
|
22
89
|
const relative = [];
|
|
23
|
-
|
|
90
|
+
const staticVfModuleSpans = scanImportSpans(() => findStaticImportFromSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
91
|
+
const dynamicVfModuleSpans = scanImportSpans(() => findDynamicImportSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
92
|
+
const sideEffectVfModuleSpans = scanImportSpans(() => findStaticSideEffectImportSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
93
|
+
const staticRelativeSpans = scanImportSpans(() => findStaticImportFromSpans(moduleCode, (specifier) => specifier.match(/^(\.\.?\/.+)$/)?.[1], MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
94
|
+
const dynamicRelativeSpans = scanImportSpans(() => findDynamicImportSpans(moduleCode, (specifier) => specifier.match(/^(\.\.?\/.+)$/)?.[1], MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
95
|
+
const sideEffectRelativeSpans = scanImportSpans(() => findStaticSideEffectImportSpans(moduleCode, (specifier) => specifier.match(/^(\.\.?\/.+)$/)?.[1], MAX_MDX_MODULE_IMPORTS_PER_FILE + 1)).spans;
|
|
96
|
+
for (const { original, path: rawPath, start, end } of staticVfModuleSpans) {
|
|
97
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath.replace(/^(?:file:\/\/)?\/+/, ""));
|
|
98
|
+
// Strip file:// prefix and leading slashes to get clean _vf_modules/... path
|
|
99
|
+
vfModules.push({
|
|
100
|
+
original,
|
|
101
|
+
path,
|
|
102
|
+
suffix,
|
|
103
|
+
start,
|
|
104
|
+
end,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
for (const { original, path: rawPath, start, end } of dynamicVfModuleSpans) {
|
|
108
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath.replace(/^(?:file:\/\/)?\/+/, ""));
|
|
109
|
+
// Strip file:// prefix and leading slashes to get clean _vf_modules/... path
|
|
110
|
+
vfModules.push({
|
|
111
|
+
original,
|
|
112
|
+
path,
|
|
113
|
+
suffix,
|
|
114
|
+
start,
|
|
115
|
+
end,
|
|
116
|
+
isDynamic: true,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
for (const { original, path: rawPath, start, end } of sideEffectVfModuleSpans) {
|
|
120
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath.replace(/^(?:file:\/\/)?\/+/, ""));
|
|
24
121
|
// Strip file:// prefix and leading slashes to get clean _vf_modules/... path
|
|
25
122
|
vfModules.push({
|
|
26
123
|
original,
|
|
27
|
-
path
|
|
124
|
+
path,
|
|
125
|
+
suffix,
|
|
126
|
+
start,
|
|
127
|
+
end,
|
|
128
|
+
isSideEffect: true,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
for (const { original, path: rawPath, start, end } of staticRelativeSpans) {
|
|
132
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath);
|
|
133
|
+
relative.push({
|
|
134
|
+
original,
|
|
135
|
+
path,
|
|
136
|
+
suffix,
|
|
28
137
|
start,
|
|
29
138
|
end,
|
|
30
139
|
});
|
|
31
140
|
}
|
|
32
|
-
for (const { original, path, start, end } of
|
|
141
|
+
for (const { original, path: rawPath, start, end } of dynamicRelativeSpans) {
|
|
142
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath);
|
|
33
143
|
relative.push({
|
|
34
144
|
original,
|
|
35
145
|
path,
|
|
146
|
+
suffix,
|
|
36
147
|
start,
|
|
37
148
|
end,
|
|
149
|
+
isDynamic: true,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
for (const { original, path: rawPath, start, end } of sideEffectRelativeSpans) {
|
|
153
|
+
const { path, suffix } = splitSpecifierSuffix(rawPath);
|
|
154
|
+
relative.push({
|
|
155
|
+
original,
|
|
156
|
+
path,
|
|
157
|
+
suffix,
|
|
158
|
+
start,
|
|
159
|
+
end,
|
|
160
|
+
isSideEffect: true,
|
|
38
161
|
});
|
|
39
162
|
}
|
|
40
163
|
return { vfModules, relative };
|
|
@@ -43,10 +166,22 @@ export function findNestedImports(moduleCode) {
|
|
|
43
166
|
* Check for unresolved /_vf_modules/ imports.
|
|
44
167
|
*/
|
|
45
168
|
export function hasUnresolvedImports(moduleCode) {
|
|
46
|
-
const
|
|
169
|
+
const staticMatches = scanImportSpans(() => findStaticImportFromSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1));
|
|
170
|
+
const sideEffectMatches = scanImportSpans(() => findStaticSideEffectImportSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1));
|
|
171
|
+
const dynamicMatches = scanImportSpans(() => findDynamicImportSpans(moduleCode, matchUnresolvedVfModuleSpecifier, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1));
|
|
172
|
+
const matches = [
|
|
173
|
+
...staticMatches.spans,
|
|
174
|
+
...sideEffectMatches.spans,
|
|
175
|
+
...dynamicMatches.spans,
|
|
176
|
+
];
|
|
177
|
+
const malformedCount = [staticMatches, sideEffectMatches, dynamicMatches]
|
|
178
|
+
.filter((result) => result.malformed).length;
|
|
47
179
|
return {
|
|
48
|
-
count: matches.length,
|
|
49
|
-
paths:
|
|
180
|
+
count: matches.length + malformedCount,
|
|
181
|
+
paths: [
|
|
182
|
+
...matches.map((match) => match.path),
|
|
183
|
+
...Array.from({ length: malformedCount }, () => MALFORMED_IMPORT_SPECIFIER),
|
|
184
|
+
].slice(0, 5),
|
|
50
185
|
};
|
|
51
186
|
}
|
|
52
187
|
/**
|
|
@@ -54,17 +189,34 @@ export function hasUnresolvedImports(moduleCode) {
|
|
|
54
189
|
*/
|
|
55
190
|
export async function processNestedImports(moduleCode, results, esmCacheDir, strictMissingModules, parentModulePath, projectSlug) {
|
|
56
191
|
const replacements = [];
|
|
57
|
-
for (const { original, start, end, nestedFilePath, nestedPath, relativePath } of results) {
|
|
192
|
+
for (const { original, start, end, suffix, isDynamic, isSideEffect, nestedFilePath, deferredError, nestedPath, relativePath, } of results) {
|
|
58
193
|
if (nestedFilePath) {
|
|
194
|
+
const importTarget = toImportStringLiteral(`file://${nestedFilePath}${suffix ?? ""}`);
|
|
59
195
|
replacements.push({
|
|
60
196
|
start,
|
|
61
197
|
end,
|
|
62
198
|
expected: original,
|
|
63
|
-
replacement:
|
|
199
|
+
replacement: isDynamic
|
|
200
|
+
? importTarget
|
|
201
|
+
: isSideEffect
|
|
202
|
+
? `import ${importTarget}`
|
|
203
|
+
: `from ${importTarget}`,
|
|
64
204
|
});
|
|
65
205
|
continue;
|
|
66
206
|
}
|
|
67
207
|
const modulePath = nestedPath || relativePath || "";
|
|
208
|
+
if (isDynamic) {
|
|
209
|
+
const deferredPath = await createStubModule(modulePath, moduleCode, original, esmCacheDir, { failOnImport: strictMissingModules, deferredError });
|
|
210
|
+
if (deferredPath) {
|
|
211
|
+
replacements.push({
|
|
212
|
+
start,
|
|
213
|
+
end,
|
|
214
|
+
expected: original,
|
|
215
|
+
replacement: toImportStringLiteral(`file://${deferredPath}${suffix ?? ""}`),
|
|
216
|
+
});
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
68
220
|
if (strictMissingModules) {
|
|
69
221
|
throw buildMissingModuleError({
|
|
70
222
|
modulePath,
|
|
@@ -76,11 +228,16 @@ export async function processNestedImports(moduleCode, results, esmCacheDir, str
|
|
|
76
228
|
}
|
|
77
229
|
const stubPath = await createStubModule(modulePath, moduleCode, original, esmCacheDir);
|
|
78
230
|
if (stubPath) {
|
|
231
|
+
const importTarget = toImportStringLiteral(`file://${stubPath}${suffix ?? ""}`);
|
|
79
232
|
replacements.push({
|
|
80
233
|
start,
|
|
81
234
|
end,
|
|
82
235
|
expected: original,
|
|
83
|
-
replacement:
|
|
236
|
+
replacement: isDynamic
|
|
237
|
+
? importTarget
|
|
238
|
+
: isSideEffect
|
|
239
|
+
? `import ${importTarget}`
|
|
240
|
+
: `from ${importTarget}`,
|
|
84
241
|
});
|
|
85
242
|
}
|
|
86
243
|
}
|
|
@@ -149,13 +306,39 @@ export async function resolveNestedModuleImports(input) {
|
|
|
149
306
|
...relative.map((module) => ({ ...module, key: "relativePath" })),
|
|
150
307
|
];
|
|
151
308
|
assertMdxModuleImportCount(input.normalizedPath, allImports.length);
|
|
152
|
-
const nestedResults = await parallelMap(allImports, async ({ original, path, start, end, key }) =>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
309
|
+
const nestedResults = await parallelMap(allImports, async ({ original, path, suffix, start, end, isDynamic, isSideEffect, key }) => {
|
|
310
|
+
let nestedFilePath;
|
|
311
|
+
try {
|
|
312
|
+
nestedFilePath = await input.fetchAndCacheModule(path, input.parentBasePath ?? input.normalizedPath);
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
const deferredError = isDynamic ? dynamicDependencyFailure(path, error) : null;
|
|
316
|
+
if (!deferredError)
|
|
317
|
+
throw error;
|
|
318
|
+
nestedFilePath = null;
|
|
319
|
+
return {
|
|
320
|
+
original,
|
|
321
|
+
start,
|
|
322
|
+
end,
|
|
323
|
+
suffix,
|
|
324
|
+
isDynamic,
|
|
325
|
+
isSideEffect,
|
|
326
|
+
nestedFilePath,
|
|
327
|
+
deferredError,
|
|
328
|
+
[key]: path,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
original,
|
|
333
|
+
start,
|
|
334
|
+
end,
|
|
335
|
+
suffix,
|
|
336
|
+
isDynamic,
|
|
337
|
+
isSideEffect,
|
|
338
|
+
nestedFilePath,
|
|
339
|
+
[key]: path,
|
|
340
|
+
};
|
|
341
|
+
}, {
|
|
159
342
|
semaphore: new Semaphore(MAX_MDX_MODULE_TRANSFORM_CONCURRENCY),
|
|
160
343
|
});
|
|
161
344
|
input.log?.debug(`${LOG_PREFIX_MDX_LOADER} [fetchAndCacheModule] processing vfModules DONE`, {
|
|
@@ -3,6 +3,7 @@ import type { RuntimeAdapter } from "../../../platform/adapters/base.js";
|
|
|
3
3
|
import type { Logger } from "../../../utils/index.js";
|
|
4
4
|
import type { MDXModule } from "../types.js";
|
|
5
5
|
import type { DependencyPinningSourceInput } from "../../esm/package-registry.js";
|
|
6
|
+
import type { DeferredImportErrorDescriptor } from "./utils/stub-module.js";
|
|
6
7
|
export interface ESMLoaderContext {
|
|
7
8
|
esmCacheDir?: string;
|
|
8
9
|
moduleCache: LRUCache<string, MDXModule>;
|
|
@@ -44,7 +45,11 @@ export interface NestedImportResult {
|
|
|
44
45
|
original: string;
|
|
45
46
|
start: number;
|
|
46
47
|
end: number;
|
|
48
|
+
isDynamic?: boolean;
|
|
49
|
+
isSideEffect?: boolean;
|
|
50
|
+
suffix?: string;
|
|
47
51
|
nestedFilePath: string | null;
|
|
52
|
+
deferredError?: DeferredImportErrorDescriptor;
|
|
48
53
|
nestedPath?: string;
|
|
49
54
|
relativePath?: string;
|
|
50
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -17,17 +17,37 @@ export interface StaticImportSpan {
|
|
|
17
17
|
}
|
|
18
18
|
type SpecifierMatcher = (specifier: string) => string | null | undefined;
|
|
19
19
|
export declare function replaceSourceSpans(source: string, replacements: SourceSpanReplacement[]): string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the word ending at `previousTokenIndex` is a member name, not a keyword.
|
|
22
|
+
*
|
|
23
|
+
* Every keyword the classifier accepts as a regex prefix is also a legal
|
|
24
|
+
* property name in ES5+, so `metrics.in / 2` and `metrics.return / 2` are
|
|
25
|
+
* ordinary code in which the slash divides. Reading the word as a keyword
|
|
26
|
+
* opens a regex literal that never closes, and the scan then swallows the rest
|
|
27
|
+
* of the module — every later import disappears from nested materialization
|
|
28
|
+
* and from dependency collection alike.
|
|
29
|
+
*
|
|
30
|
+
* Covers `.name`, optional chaining `?.name` (the character before the word is
|
|
31
|
+
* `.` either way) and private fields `#name`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isMemberNameBefore(source: string, previousTokenIndex: number): boolean;
|
|
20
34
|
export declare function findStaticImportFromSpans(source: string, matcher: SpecifierMatcher, maxMatches: number): StaticImportSpan[];
|
|
21
35
|
/**
|
|
22
36
|
* Find `import("…")` expressions with a literal specifier.
|
|
23
37
|
*
|
|
24
38
|
* The returned span covers the quoted specifier itself (quotes included), not
|
|
25
39
|
* the surrounding `import(...)`, so a replacement is a bare quoted string.
|
|
26
|
-
*
|
|
27
|
-
*
|
|
40
|
+
*
|
|
41
|
+
* A literal here is a single- or double-quoted string, or a backtick template
|
|
42
|
+
* with no `${}` substitution — the three forms whose target is fully known at
|
|
43
|
+
* scan time. An interpolated template and any other expression are skipped,
|
|
44
|
+
* since their target is only known at runtime. So is an argument the literal
|
|
28
45
|
* merely starts: rewriting the `"./foo"` in `import("./foo" + suffix)` would
|
|
29
46
|
* build a path out of a resolved prefix and an unresolved tail.
|
|
30
47
|
*
|
|
48
|
+
* The scan also runs inside template substitutions, so a dynamic import nested
|
|
49
|
+
* in a `${…}` expression is found.
|
|
50
|
+
*
|
|
31
51
|
* `maxMatches` bounds the scan on the same terms as
|
|
32
52
|
* {@link findStaticImportFromSpans}.
|
|
33
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-spans.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/utils/source-spans.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,KAAK,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"source-spans.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/utils/source-spans.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,KAAK,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AA0GzE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,qBAAqB,EAAE,GACpC,MAAM,CAkCR;AAkeD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,GACzB,OAAO,CA+BT;AAioDD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,GACjB,gBAAgB,EAAE,CAyLpB;AAwQD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,GACjB,gBAAgB,EAAE,CAMpB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,GACjB,gBAAgB,EAAE,CA2KpB"}
|