veryfront 0.1.1238 → 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.
Files changed (472) hide show
  1. package/esm/cli/auth/login.d.ts +24 -2
  2. package/esm/cli/auth/login.d.ts.map +1 -1
  3. package/esm/cli/auth/login.js +444 -35
  4. package/esm/cli/commands/build/error-handler.js +1 -1
  5. package/esm/cli/commands/generate/command.d.ts.map +1 -1
  6. package/esm/cli/commands/generate/command.js +2 -3
  7. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  8. package/esm/cli/commands/init/init-command.js +23 -31
  9. package/esm/cli/commands/install/registry.d.ts.map +1 -1
  10. package/esm/cli/commands/install/registry.js +6 -9
  11. package/esm/cli/commands/login/command-help.d.ts.map +1 -1
  12. package/esm/cli/commands/login/command-help.js +3 -1
  13. package/esm/cli/commands/pull/command.d.ts +1 -0
  14. package/esm/cli/commands/pull/command.d.ts.map +1 -1
  15. package/esm/cli/commands/pull/command.js +49 -6
  16. package/esm/cli/commands/push/command-help.d.ts.map +1 -1
  17. package/esm/cli/commands/push/command-help.js +7 -0
  18. package/esm/cli/commands/push/command.d.ts +23 -12
  19. package/esm/cli/commands/push/command.d.ts.map +1 -1
  20. package/esm/cli/commands/push/command.js +461 -44
  21. package/esm/cli/commands/push/plan.d.ts +35 -0
  22. package/esm/cli/commands/push/plan.d.ts.map +1 -0
  23. package/esm/cli/commands/push/plan.js +96 -0
  24. package/esm/cli/commands/schedule/handler.d.ts +21 -2
  25. package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
  26. package/esm/cli/commands/schedule/handler.js +74 -27
  27. package/esm/cli/commands/schema/command-help.js +1 -1
  28. package/esm/cli/commands/up/command.js +1 -1
  29. package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
  30. package/esm/cli/commands/webhook/handler.js +3 -1
  31. package/esm/cli/router.d.ts.map +1 -1
  32. package/esm/cli/router.js +27 -5
  33. package/esm/cli/shared/args.d.ts +10 -0
  34. package/esm/cli/shared/args.d.ts.map +1 -1
  35. package/esm/cli/shared/args.js +15 -2
  36. package/esm/cli/shared/config.d.ts +11 -2
  37. package/esm/cli/shared/config.d.ts.map +1 -1
  38. package/esm/cli/shared/config.js +72 -27
  39. package/esm/cli/shared/project-creation.js +1 -1
  40. package/esm/cli/sync/state.d.ts +20 -0
  41. package/esm/cli/sync/state.d.ts.map +1 -0
  42. package/esm/cli/sync/state.js +193 -0
  43. package/esm/deno.js +2 -2
  44. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
  45. package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
  46. package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
  47. package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
  48. package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
  49. package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
  50. package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
  51. package/esm/src/agent/conversation/delegation-policy.js +13 -3
  52. package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
  53. package/esm/src/agent/conversation/hosted-terminal.js +6 -2
  54. package/esm/src/agent/factory.d.ts.map +1 -1
  55. package/esm/src/agent/factory.js +22 -11
  56. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
  57. package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
  58. package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
  59. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
  60. package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
  61. package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
  62. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
  63. package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
  64. package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
  65. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
  66. package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
  67. package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
  68. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
  69. package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
  70. package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
  71. package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
  72. package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
  73. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
  74. package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
  75. package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
  76. package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
  77. package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
  78. package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
  79. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
  80. package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
  81. package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
  82. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
  83. package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
  84. package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
  85. package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
  86. package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
  87. package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
  88. package/esm/src/agent/index.d.ts +3 -3
  89. package/esm/src/agent/index.d.ts.map +1 -1
  90. package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
  91. package/esm/src/agent/project/agent-runtime.js +6 -3
  92. package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
  93. package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
  94. package/esm/src/agent/runtime/agent-definition.js +15 -2
  95. package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
  96. package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
  97. package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
  98. package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
  99. package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
  100. package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
  101. package/esm/src/agent/runtime/call-context.d.ts +42 -11
  102. package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
  103. package/esm/src/agent/runtime/call-context.js +480 -42
  104. package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
  105. package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
  106. package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
  107. package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
  108. package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
  109. package/esm/src/agent/runtime/effective-agent-system.js +29 -0
  110. package/esm/src/agent/runtime/index.d.ts +1 -0
  111. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  112. package/esm/src/agent/runtime/index.js +638 -53
  113. package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
  114. package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
  115. package/esm/src/agent/runtime/load-skill-tool.js +152 -21
  116. package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
  117. package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
  118. package/esm/src/agent/runtime/model-resolution.js +14 -0
  119. package/esm/src/agent/runtime/model-transport.d.ts +1 -0
  120. package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
  121. package/esm/src/agent/runtime/model-transport.js +5 -2
  122. package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
  123. package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
  124. package/esm/src/agent/runtime/run-runtime-context.js +9 -3
  125. package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
  126. package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
  127. package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
  128. package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
  129. package/esm/src/agent/runtime/skill-prompt.js +113 -25
  130. package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
  131. package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
  132. package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
  133. package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
  134. package/esm/src/agent/runtime/tool-inventory.js +13 -9
  135. package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
  136. package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
  137. package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
  138. package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
  139. package/esm/src/agent/service/runtime.js +1 -1
  140. package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
  141. package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
  142. package/esm/src/agent/types.d.ts +14 -1
  143. package/esm/src/agent/types.d.ts.map +1 -1
  144. package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
  145. package/esm/src/chat/chat-ui-message-helpers.js +75 -16
  146. package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
  147. package/esm/src/errors/catalog/build-errors.js +14 -0
  148. package/esm/src/errors/error-registry/build.d.ts +2 -0
  149. package/esm/src/errors/error-registry/build.d.ts.map +1 -1
  150. package/esm/src/errors/error-registry/build.js +8 -0
  151. package/esm/src/errors/error-registry/deploy.d.ts +4 -0
  152. package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
  153. package/esm/src/errors/error-registry/deploy.js +16 -0
  154. package/esm/src/errors/error-registry.d.ts +3 -0
  155. package/esm/src/errors/error-registry.d.ts.map +1 -1
  156. package/esm/src/errors/index.d.ts +2 -1
  157. package/esm/src/errors/index.d.ts.map +1 -1
  158. package/esm/src/errors/index.js +4 -3
  159. package/esm/src/errors/tenant-classification.d.ts +25 -0
  160. package/esm/src/errors/tenant-classification.d.ts.map +1 -0
  161. package/esm/src/errors/tenant-classification.js +61 -0
  162. package/esm/src/extensions/builtin-extensions.d.ts +10 -15
  163. package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
  164. package/esm/src/extensions/builtin-extensions.js +32 -26
  165. package/esm/src/extensions/deferred-extension.d.ts +4 -4
  166. package/esm/src/extensions/deferred-extension.js +4 -4
  167. package/esm/src/extensions/index.d.ts +1 -0
  168. package/esm/src/extensions/index.d.ts.map +1 -1
  169. package/esm/src/extensions/index.js +1 -0
  170. package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
  171. package/esm/src/integrations/_data.d.ts.map +1 -1
  172. package/esm/src/integrations/_data.js +6 -0
  173. package/esm/src/integrations/schema.d.ts +8 -0
  174. package/esm/src/integrations/schema.d.ts.map +1 -1
  175. package/esm/src/integrations/schema.js +3 -0
  176. package/esm/src/integrations/types.d.ts +2 -0
  177. package/esm/src/integrations/types.d.ts.map +1 -1
  178. package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
  179. package/esm/src/internal-agents/run-stream.js +35 -20
  180. package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
  181. package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
  182. package/esm/src/internal-agents/run-system-prompt.js +19 -13
  183. package/esm/src/internal-agents/schema.d.ts +2 -0
  184. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  185. package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
  186. package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
  187. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
  188. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
  189. package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
  190. package/esm/src/observability/application-error-contract.d.ts +4 -0
  191. package/esm/src/observability/application-error-contract.d.ts.map +1 -1
  192. package/esm/src/observability/application-errors.d.ts.map +1 -1
  193. package/esm/src/observability/application-errors.js +55 -2
  194. package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
  195. package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
  196. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
  197. package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
  198. package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
  199. package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
  200. package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
  201. package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
  202. package/esm/src/provider/runtime-loader/provider-http.js +55 -17
  203. package/esm/src/provider/shared/index.d.ts +1 -0
  204. package/esm/src/provider/shared/index.d.ts.map +1 -1
  205. package/esm/src/provider/shared/index.js +2 -0
  206. package/esm/src/provider/types.d.ts +1 -0
  207. package/esm/src/provider/types.d.ts.map +1 -1
  208. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
  209. package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
  210. package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
  211. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
  212. package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
  213. package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
  214. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
  215. package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
  216. package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
  217. package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
  218. package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
  219. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
  220. package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
  221. package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
  222. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
  223. package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
  224. package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
  225. package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
  226. package/esm/src/react/components/ui/adapter/context.js +10 -0
  227. package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
  228. package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
  229. package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
  230. package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
  231. package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
  232. package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
  233. package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
  234. package/esm/src/react/components/ui/alert-dialog.js +181 -0
  235. package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
  236. package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
  237. package/esm/src/react/components/ui/aspect-ratio.js +13 -0
  238. package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
  239. package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
  240. package/esm/src/react/components/ui/autocomplete.js +59 -0
  241. package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
  242. package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
  243. package/esm/src/react/components/ui/breadcrumb.js +67 -0
  244. package/esm/src/react/components/ui/calendar.d.ts +40 -0
  245. package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
  246. package/esm/src/react/components/ui/calendar.js +170 -0
  247. package/esm/src/react/components/ui/combobox.d.ts +74 -0
  248. package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
  249. package/esm/src/react/components/ui/combobox.js +100 -0
  250. package/esm/src/react/components/ui/context-menu.d.ts +116 -0
  251. package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
  252. package/esm/src/react/components/ui/context-menu.js +168 -0
  253. package/esm/src/react/components/ui/date-picker.d.ts +69 -0
  254. package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
  255. package/esm/src/react/components/ui/date-picker.js +96 -0
  256. package/esm/src/react/components/ui/dialog.d.ts +41 -11
  257. package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
  258. package/esm/src/react/components/ui/dialog.js +47 -28
  259. package/esm/src/react/components/ui/drawer.d.ts +31 -8
  260. package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
  261. package/esm/src/react/components/ui/drawer.js +33 -22
  262. package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
  263. package/esm/src/react/components/ui/dropdown-menu.js +7 -75
  264. package/esm/src/react/components/ui/field.d.ts +70 -0
  265. package/esm/src/react/components/ui/field.d.ts.map +1 -0
  266. package/esm/src/react/components/ui/field.js +161 -0
  267. package/esm/src/react/components/ui/file-type.d.ts +9 -8
  268. package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
  269. package/esm/src/react/components/ui/file-type.js +8 -8
  270. package/esm/src/react/components/ui/hover-card.d.ts +82 -0
  271. package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
  272. package/esm/src/react/components/ui/hover-card.js +140 -0
  273. package/esm/src/react/components/ui/index.d.ts +23 -2
  274. package/esm/src/react/components/ui/index.d.ts.map +1 -1
  275. package/esm/src/react/components/ui/index.js +21 -0
  276. package/esm/src/react/components/ui/input-otp.d.ts +37 -0
  277. package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
  278. package/esm/src/react/components/ui/input-otp.js +42 -0
  279. package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
  280. package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
  281. package/esm/src/react/components/ui/menu-keyboard.js +76 -0
  282. package/esm/src/react/components/ui/menubar.d.ts +98 -0
  283. package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
  284. package/esm/src/react/components/ui/menubar.js +173 -0
  285. package/esm/src/react/components/ui/meter.d.ts +45 -0
  286. package/esm/src/react/components/ui/meter.d.ts.map +1 -0
  287. package/esm/src/react/components/ui/meter.js +59 -0
  288. package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
  289. package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
  290. package/esm/src/react/components/ui/modal-surface.js +23 -6
  291. package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
  292. package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
  293. package/esm/src/react/components/ui/navigation-menu.js +195 -0
  294. package/esm/src/react/components/ui/number-field.d.ts +46 -0
  295. package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
  296. package/esm/src/react/components/ui/number-field.js +121 -0
  297. package/esm/src/react/components/ui/pagination.d.ts +77 -0
  298. package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
  299. package/esm/src/react/components/ui/pagination.js +62 -0
  300. package/esm/src/react/components/ui/popover.d.ts +42 -13
  301. package/esm/src/react/components/ui/popover.d.ts.map +1 -1
  302. package/esm/src/react/components/ui/popover.js +25 -12
  303. package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
  304. package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
  305. package/esm/src/react/components/ui/scroll-area.js +35 -0
  306. package/esm/src/react/components/ui/separator.d.ts +20 -0
  307. package/esm/src/react/components/ui/separator.d.ts.map +1 -0
  308. package/esm/src/react/components/ui/separator.js +13 -0
  309. package/esm/src/react/components/ui/slider.d.ts +44 -0
  310. package/esm/src/react/components/ui/slider.d.ts.map +1 -0
  311. package/esm/src/react/components/ui/slider.js +46 -0
  312. package/esm/src/react/components/ui/status.d.ts +6 -5
  313. package/esm/src/react/components/ui/status.d.ts.map +1 -1
  314. package/esm/src/react/components/ui/status.js +4 -4
  315. package/esm/src/react/components/ui/tabs.d.ts +32 -9
  316. package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
  317. package/esm/src/react/components/ui/tabs.js +46 -22
  318. package/esm/src/react/components/ui/toggle.d.ts +26 -0
  319. package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
  320. package/esm/src/react/components/ui/toggle.js +29 -0
  321. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
  322. package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
  323. package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
  324. package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
  325. package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
  326. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
  327. package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
  328. package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
  329. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
  330. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
  331. package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
  332. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
  333. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  334. package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
  335. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
  336. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
  337. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
  338. package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
  339. package/esm/src/rendering/orchestrator/pipeline.js +12 -1
  340. package/esm/src/runs/runs-client.d.ts +2 -4
  341. package/esm/src/runs/runs-client.d.ts.map +1 -1
  342. package/esm/src/runs/schemas.d.ts +18 -8
  343. package/esm/src/runs/schemas.d.ts.map +1 -1
  344. package/esm/src/runs/schemas.js +26 -0
  345. package/esm/src/runtime/model-call-context.d.ts +6 -1
  346. package/esm/src/runtime/model-call-context.d.ts.map +1 -1
  347. package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
  348. package/esm/src/runtime/runtime-bridge.js +133 -15
  349. package/esm/src/schedule/factory.d.ts +8 -2
  350. package/esm/src/schedule/factory.d.ts.map +1 -1
  351. package/esm/src/schedule/factory.js +0 -8
  352. package/esm/src/schedule/index.d.ts +10 -1
  353. package/esm/src/schedule/index.d.ts.map +1 -1
  354. package/esm/src/schedule/index.js +9 -0
  355. package/esm/src/schedule/types.d.ts +30 -11
  356. package/esm/src/schedule/types.d.ts.map +1 -1
  357. package/esm/src/schedule/validation.d.ts +17 -0
  358. package/esm/src/schedule/validation.d.ts.map +1 -1
  359. package/esm/src/schedule/validation.js +93 -5
  360. package/esm/src/server/dev-server/index.d.ts +1 -1
  361. package/esm/src/server/dev-server/index.d.ts.map +1 -1
  362. package/esm/src/server/dev-server/server.d.ts +7 -3
  363. package/esm/src/server/dev-server/server.d.ts.map +1 -1
  364. package/esm/src/server/dev-server/server.js +12 -3
  365. package/esm/src/server/dev-server/types.d.ts +7 -1
  366. package/esm/src/server/dev-server/types.d.ts.map +1 -1
  367. package/esm/src/server/dev-server.d.ts +1 -1
  368. package/esm/src/server/dev-server.d.ts.map +1 -1
  369. package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
  370. package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
  371. package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
  372. package/esm/src/server/handlers/dev/projects/index.js +3 -0
  373. package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
  374. package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
  375. package/esm/src/server/index.d.ts +3 -3
  376. package/esm/src/server/index.d.ts.map +1 -1
  377. package/esm/src/server/index.js +10 -5
  378. package/esm/src/server/node-handler.d.ts.map +1 -1
  379. package/esm/src/server/node-handler.js +4 -1
  380. package/esm/src/server/production-server.d.ts.map +1 -1
  381. package/esm/src/server/production-server.js +2 -1
  382. package/esm/src/server/project-env/cache.d.ts +17 -0
  383. package/esm/src/server/project-env/cache.d.ts.map +1 -1
  384. package/esm/src/server/project-env/cache.js +78 -2
  385. package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
  386. package/esm/src/server/project-env/fetcher.js +13 -3
  387. package/esm/src/server/project-env/index.d.ts +1 -1
  388. package/esm/src/server/project-env/index.d.ts.map +1 -1
  389. package/esm/src/server/project-env/index.js +1 -1
  390. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  391. package/esm/src/server/runtime-handler/index.js +1 -1
  392. package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
  393. package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
  394. package/esm/src/server/runtime-handler/projects-handler.js +4 -2
  395. package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
  396. package/esm/src/transforms/esm/http-bundler.js +6 -5
  397. package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
  398. package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
  399. package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
  400. package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
  401. package/esm/src/transforms/esm/http-cache.js +16 -10
  402. package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
  403. package/esm/src/transforms/esm/specifier-resolver.js +87 -7
  404. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
  405. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
  406. package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
  407. package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
  408. package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
  409. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
  410. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
  411. package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
  412. package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
  413. package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
  414. package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
  415. package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
  416. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
  417. package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
  418. package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
  419. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
  420. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
  421. package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
  422. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
  423. package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
  424. package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
  425. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
  426. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
  427. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
  428. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
  429. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
  430. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
  431. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
  432. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
  433. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
  434. package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
  435. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
  436. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
  437. package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
  438. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
  439. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
  440. package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
  441. package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
  442. package/esm/src/transforms/pipeline/stages/compile.js +44 -0
  443. package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
  444. package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
  445. package/esm/src/transforms/shared/specifier-suffix.js +43 -0
  446. package/esm/src/trigger/index.d.ts +2 -2
  447. package/esm/src/trigger/index.d.ts.map +1 -1
  448. package/esm/src/trigger/index.js +1 -1
  449. package/esm/src/trigger/local-runner.d.ts +2 -2
  450. package/esm/src/trigger/local-runner.d.ts.map +1 -1
  451. package/esm/src/trigger/local-runner.js +11 -4
  452. package/esm/src/trigger/target.d.ts +97 -5
  453. package/esm/src/trigger/target.d.ts.map +1 -1
  454. package/esm/src/trigger/target.js +175 -5
  455. package/esm/src/utils/version-constant.d.ts +1 -1
  456. package/esm/src/utils/version-constant.js +1 -1
  457. package/esm/src/webhook/types.d.ts +21 -6
  458. package/esm/src/webhook/types.d.ts.map +1 -1
  459. package/esm/src/webhook/validation.d.ts.map +1 -1
  460. package/esm/src/webhook/validation.js +27 -39
  461. package/esm/templates/index.d.ts +1 -1
  462. package/esm/templates/index.d.ts.map +1 -1
  463. package/esm/templates/loader.d.ts +6 -6
  464. package/esm/templates/loader.d.ts.map +1 -1
  465. package/esm/templates/loader.js +34 -18
  466. package/esm/templates/manifest.generated.d.ts +3 -0
  467. package/esm/templates/manifest.generated.d.ts.map +1 -0
  468. package/esm/templates/manifest.generated.js +2 -0
  469. package/package.json +8 -8
  470. package/esm/templates/manifest.d.ts +0 -664
  471. package/esm/templates/manifest.d.ts.map +0 -1
  472. package/esm/templates/manifest.js +0 -662
@@ -1 +1 @@
1
- {"version":3,"file":"cache-format.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/cache-format.ts"],"names":[],"mappings":"AAkJA,eAAO,MAAM,mCAAmC,QAA8B,CAAC;AAC/E,eAAO,MAAM,mCAAmC,QAA8B,CAAC;AAE/E,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAUR;AAED,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,YAAY,SAAwB,EACpC,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAOR;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,GACf,MAAM,CAOR;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErF;AAED,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR"}
1
+ {"version":3,"file":"cache-format.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/cache-format.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iCAAiC,6BAA6B,CAAC;AAuI5E,eAAO,MAAM,mCAAmC,QAA8B,CAAC;AAC/E,eAAO,MAAM,mCAAmC,QAA8B,CAAC;AAE/E,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAUR;AAED,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,YAAY,SAAwB,EACpC,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAOR;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,GACf,MAAM,CAOR;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErF;AAED,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR"}
@@ -8,6 +8,8 @@ import { hashString } from "./utils/hash.js";
8
8
  const ALL_FILE_URL_PATTERN_SOURCE = /file:\/\/([^"'\s]+)/.source;
9
9
  const MJS_FILE_URL_PATTERN_SOURCE = /file:\/\/([^"'\s]+\.mjs)/.source;
10
10
  const CACHE_NAMESPACE_SENTINEL = "__vf_cache_namespace__";
11
+ export const UNRESOLVED_IMPORTS_SIDECAR_SUFFIX = ".unresolved-imports.json";
12
+ const MDX_ESM_PATH_CACHE_ATTRIBUTION_SCHEMA = "unresolved-import-sidecars-v1";
11
13
  const PUBLIC_RUNTIME_SPECIFIERS = [
12
14
  "veryfront/head",
13
15
  "veryfront/router",
@@ -52,6 +54,7 @@ function buildMdxEsmCacheSchemaSample() {
52
54
  unresolvedVfModulesPattern: UNRESOLVED_VF_MODULES_PATTERN.source,
53
55
  allFileUrlPattern: ALL_FILE_URL_PATTERN_SOURCE,
54
56
  mjsFileUrlPattern: MJS_FILE_URL_PATTERN_SOURCE,
57
+ pathCacheAttributionSchema: MDX_ESM_PATH_CACHE_ATTRIBUTION_SCHEMA,
55
58
  sourceHashing: [
56
59
  hashString("_vf_modules/pages/index.jsexport default 1;"),
57
60
  hashString("/tmp/project/Button.tsx\0export default function Button() {}"),
@@ -25,8 +25,10 @@ export declare function initializeCacheDir(context: ESMLoaderContext): Promise<s
25
25
  export declare function findVfModuleImports(code: string): Array<{
26
26
  original: string;
27
27
  path: string;
28
+ suffix: string;
28
29
  start: number;
29
30
  end: number;
31
+ isDynamic?: boolean;
30
32
  }>;
31
33
  /**
32
34
  * Process /_vf_modules/ imports and replace them with file:// paths.
@@ -34,7 +36,9 @@ export declare function findVfModuleImports(code: string): Array<{
34
36
  export declare function processVfModuleImports(code: string, imports: Array<{
35
37
  original: string;
36
38
  path: string;
39
+ suffix?: string;
37
40
  start: number;
38
41
  end: number;
42
+ isDynamic?: boolean;
39
43
  }>, context: ESMLoaderContext, projectDir: string, strictMissingModules: boolean): Promise<string>;
40
44
  //# sourceMappingURL=loader-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loader-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/loader-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAQnD;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAapF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAWnE;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgCnF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GACX,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAMvE;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,EAC9E,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,OAAO,GAC5B,OAAO,CAAC,MAAM,CAAC,CA4HjB"}
1
+ {"version":3,"file":"loader-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/loader-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAwBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnD;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAapF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAWnE;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgCnF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GACX,KAAK,CAAC;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAoBD;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,EACF,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,OAAO,GAC5B,OAAO,CAAC,MAAM,CAAC,CA4JjB"}
@@ -17,11 +17,13 @@ import { exists as fsExists } from "../../../platform/compat/fs.js";
17
17
  import { LOG_PREFIX_MDX_LOADER } from "./constants.js";
18
18
  import { getLocalFs } from "./cache/index.js";
19
19
  import { createStubModule } from "./utils/stub-module.js";
20
- import { findStaticImportFromSpans, replaceSourceSpans, } from "./utils/source-spans.js";
20
+ import { findDynamicImportSpans, findStaticImportFromSpans, replaceSourceSpans, } from "./utils/source-spans.js";
21
21
  import { createModuleFetcherContext, fetchAndCacheModule } from "./module-fetcher/index.js";
22
22
  import { buildMissingModuleError } from "./missing-module.js";
23
+ import { dynamicDependencyFailure, toImportStringLiteral, } from "./module-fetcher/nested-imports.js";
23
24
  import { parallelMap } from "../../../utils/parallel.js";
24
25
  import { assertMdxModuleImportCount, MAX_MDX_MODULE_IMPORTS_PER_FILE, MAX_MDX_MODULE_TRANSFORM_CONCURRENCY, } from "./module-fetcher/limits.js";
26
+ import { splitSpecifierSuffix } from "../../shared/specifier-suffix.js";
25
27
  /**
26
28
  * Check which framework bundles are missing from disk.
27
29
  * Returns the list of missing file paths.
@@ -92,7 +94,15 @@ export async function initializeCacheDir(context) {
92
94
  * Find /_vf_modules/ imports in code.
93
95
  */
94
96
  export function findVfModuleImports(code) {
95
- return findStaticImportFromSpans(code, (specifier) => specifier.match(/^\/?(_vf_modules\/[^?]+)(?:\?.*)?$/)?.[1], MAX_MDX_MODULE_IMPORTS_PER_FILE + 1);
97
+ const matchVfModule = (specifier) => specifier.match(/^\/?(_vf_modules\/.+)$/)?.[1] ?? null;
98
+ const staticImports = findStaticImportFromSpans(code, matchVfModule, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1);
99
+ const dynamicImports = findDynamicImportSpans(code, matchVfModule, MAX_MDX_MODULE_IMPORTS_PER_FILE + 1).map((importSpan) => ({ ...importSpan, isDynamic: true }));
100
+ return [...staticImports, ...dynamicImports]
101
+ .map((importSpan) => {
102
+ const { path, suffix } = splitSpecifierSuffix(importSpan.path);
103
+ return { ...importSpan, path, suffix };
104
+ })
105
+ .sort((left, right) => left.start - right.start);
96
106
  }
97
107
  /**
98
108
  * Process /_vf_modules/ imports and replace them with file:// paths.
@@ -137,7 +147,7 @@ export async function processVfModuleImports(code, imports, context, projectDir,
137
147
  strictMissingModules,
138
148
  });
139
149
  const fetchStart = performance.now();
140
- const results = await parallelMap(imports, async ({ original, path, start, end }, index) => {
150
+ const results = await parallelMap(imports, async ({ original, path, suffix, start, end, isDynamic }, index) => {
141
151
  return await withSpan(SpanNames.MDX_FETCH_MODULE, async () => {
142
152
  const moduleStart = performance.now();
143
153
  logger.debug(`${LOG_PREFIX_MDX_LOADER} Fetching module START`, {
@@ -145,14 +155,26 @@ export async function processVfModuleImports(code, imports, context, projectDir,
145
155
  index,
146
156
  path,
147
157
  });
148
- const filePath = await fetchAndCacheModule(path, fetcherContext);
158
+ let filePath;
159
+ let deferredError;
160
+ try {
161
+ filePath = await fetchAndCacheModule(path, fetcherContext);
162
+ }
163
+ catch (error) {
164
+ if (!isDynamic)
165
+ throw error;
166
+ deferredError = dynamicDependencyFailure(path, error) ?? undefined;
167
+ if (!deferredError)
168
+ throw error;
169
+ filePath = null;
170
+ }
149
171
  logger.debug(`${LOG_PREFIX_MDX_LOADER} Fetching module DONE`, {
150
172
  projectSlug,
151
173
  index,
152
174
  path,
153
175
  durationMs: (performance.now() - moduleStart).toFixed(1),
154
176
  });
155
- return { original, start, end, filePath, path };
177
+ return { original, start, end, filePath, path, suffix, isDynamic, deferredError };
156
178
  }, {
157
179
  "mdx.module_path": path,
158
180
  "mdx.module_index": index,
@@ -165,16 +187,29 @@ export async function processVfModuleImports(code, imports, context, projectDir,
165
187
  durationMs: (performance.now() - fetchStart).toFixed(1),
166
188
  });
167
189
  const replacements = [];
168
- for (const { original, start, end, filePath, path } of results) {
190
+ for (const { original, start, end, filePath, path, suffix, isDynamic, deferredError } of results) {
169
191
  if (filePath) {
192
+ const importTarget = toImportStringLiteral(`file://${filePath}${suffix ?? ""}`);
170
193
  replacements.push({
171
194
  start,
172
195
  end,
173
196
  expected: original,
174
- replacement: `from "file://${filePath}"`,
197
+ replacement: isDynamic ? importTarget : `from ${importTarget}`,
175
198
  });
176
199
  continue;
177
200
  }
201
+ if (isDynamic) {
202
+ const deferredPath = await createStubModule(path, code, original, context.esmCacheDir, { failOnImport: strictMissingModules, deferredError });
203
+ if (deferredPath) {
204
+ replacements.push({
205
+ start,
206
+ end,
207
+ expected: original,
208
+ replacement: toImportStringLiteral(`file://${deferredPath}${suffix ?? ""}`),
209
+ });
210
+ continue;
211
+ }
212
+ }
178
213
  if (strictMissingModules) {
179
214
  throw buildMissingModuleError({
180
215
  modulePath: path,
@@ -186,11 +221,12 @@ export async function processVfModuleImports(code, imports, context, projectDir,
186
221
  }
187
222
  const stubPath = await createStubModule(path, code, original, context.esmCacheDir);
188
223
  if (stubPath) {
224
+ const importTarget = toImportStringLiteral(`file://${stubPath}${suffix ?? ""}`);
189
225
  replacements.push({
190
226
  start,
191
227
  end,
192
228
  expected: original,
193
- replacement: `from "file://${stubPath}"`,
229
+ replacement: isDynamic ? importTarget : `from ${importTarget}`,
194
230
  });
195
231
  }
196
232
  }
@@ -9,5 +9,7 @@ type MissingModuleContext = {
9
9
  projectSlug?: string;
10
10
  };
11
11
  export declare function buildMissingModuleError(ctx: MissingModuleContext): Error;
12
+ /** Return true only for missing-module errors produced by this loader. */
13
+ export declare function isMdxMissingModuleError(error: unknown): boolean;
12
14
  export {};
13
15
  //# sourceMappingURL=missing-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"missing-module.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/missing-module.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAcF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,GAAG,KAAK,CA4BxE"}
1
+ {"version":3,"file":"missing-module.d.ts","sourceRoot":"","sources":["../../../../../src/src/transforms/mdx/esm-module-loader/missing-module.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAcF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,GAAG,KAAK,CA4BxE;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/D"}
@@ -39,3 +39,7 @@ export function buildMissingModuleError(ctx) {
39
39
  }
40
40
  return error;
41
41
  }
42
+ /** Return true only for missing-module errors produced by this loader. */
43
+ export function isMdxMissingModuleError(error) {
44
+ return error instanceof Error && error.name === "MissingModuleError";
45
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"http-fallback.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,KAAK,oBAAoB,GAAG,OAAO,kBAAkB,CAAC;AACtD,KAAK,kBAAkB,GAAG,OAAO,WAAW,CAAC;AAE7C,MAAM,WAAW,2CAA2C;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;CACvC;AAED;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,KAAK,EAAE,2CAA2C,GACjD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqCxB"}
1
+ {"version":3,"file":"http-fallback.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,KAAK,oBAAoB,GAAG,OAAO,kBAAkB,CAAC;AACtD,KAAK,kBAAkB,GAAG,OAAO,WAAW,CAAC;AAE7C,MAAM,WAAW,2CAA2C;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;CACvC;AAED;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,KAAK,EAAE,2CAA2C,GACjD,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyCxB"}
@@ -12,7 +12,11 @@ import { cacheModule } from "./module-cache.js";
12
12
  export async function resolveUnresolvedModuleViaHttpFallback(input) {
13
13
  const fetchViaHttp = input.fetchViaHttp ?? fetchModuleViaHTTP;
14
14
  const cacheLocalModule = input.cacheLocalModule ?? cacheModule;
15
- const moduleCode = await fetchViaHttp(input.normalizedPath, input.adapter, input.fetchAndCacheModule, input.log, input.projectSlug, input.isLocalProject, input.dependencyPinningCacheKey, { moduleServerOrigin: input.moduleServerOrigin });
15
+ const moduleCode = await fetchViaHttp(input.normalizedPath, input.adapter, input.fetchAndCacheModule, input.log, input.projectSlug, input.isLocalProject, input.dependencyPinningCacheKey, {
16
+ esmCacheDir: input.esmCacheDir,
17
+ moduleServerOrigin: input.moduleServerOrigin,
18
+ strictMissingModules: input.strictMissingModules ?? true,
19
+ });
16
20
  if (moduleCode) {
17
21
  return await cacheLocalModule(input.normalizedPath, moduleCode, input.esmCacheDir, input.pathCache, input.log, input.reactVersion, input.dependencyPinningCacheKey, input.moduleServerOrigin);
18
22
  }
@@ -9,8 +9,10 @@
9
9
  import type { Logger } from "../../../../utils/index.js";
10
10
  import type { RuntimeAdapter } from "../../../../platform/adapters/base.js";
11
11
  export interface FetchModuleViaHttpOptions {
12
+ esmCacheDir?: string;
12
13
  fetchFn?: typeof fetch;
13
14
  moduleServerOrigin?: string;
15
+ strictMissingModules?: boolean;
14
16
  timeoutMs?: number;
15
17
  }
16
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"http-fetcher.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAa5E,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6GD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,cAAc,EACvB,qBAAqB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAChF,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,OAAO,EACxB,yBAAyB,CAAC,EAAE,MAAM,EAClC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiIxB"}
1
+ {"version":3,"file":"http-fetcher.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAkB5E,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6GD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,cAAc,EACvB,qBAAqB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAChF,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,OAAO,EACxB,yBAAyB,CAAC,EAAE,MAAM,EAClC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA8KxB"}
@@ -10,7 +10,7 @@ import { SpanNames } from "../../../../observability/index.js";
10
10
  import { withSpan } from "../../../../observability/tracing/otlp-setup.js";
11
11
  import { LOG_PREFIX_MDX_LOADER } from "../constants.js";
12
12
  import { rewriteVeryfrontImports } from "./import-rewriter.js";
13
- import { findNestedImports } from "./nested-imports.js";
13
+ import { dynamicDependencyFailure, findNestedImports, toImportStringLiteral, } from "./nested-imports.js";
14
14
  import { replaceSourceSpans } from "../utils/source-spans.js";
15
15
  import { HTTP_FETCH_TIMEOUT_MS } from "../../../../utils/constants/http.js";
16
16
  import { readHttpModuleText } from "../../../shared/http-module-response.js";
@@ -19,6 +19,7 @@ import { MAX_TIMER_DELAY_MS } from "../../../../utils/constants/limits.js";
19
19
  import { parallelMap } from "../../../../utils/parallel.js";
20
20
  import { Semaphore } from "../../../../modules/react-loader/ssr-module-loader/concurrency/semaphore.js";
21
21
  import { assertMdxModuleImportCount, MAX_MDX_MODULE_TRANSFORM_CONCURRENCY } from "./limits.js";
22
+ import { createStubModule } from "../utils/stub-module.js";
22
23
  function discardResponseBody(response) {
23
24
  try {
24
25
  const cancellation = response.body?.cancel();
@@ -76,7 +77,7 @@ function isNameResolutionError(error) {
76
77
  * RFC 6761 only *recommends* that resolvers map the `.localhost` tree to
77
78
  * loopback. macOS, systemd-resolved and CI honour it for arbitrary subdomains,
78
79
  * but a plain glibc NSS setup can resolve only the bare name and fail
79
- * `<slug>.localhost` with EAI_AGAIN/ENOTFOUND — which would make this fallback
80
+ * `<slug>.localhost` with EAI_AGAIN/ENOTFOUND, which would make this fallback
80
81
  * unable to reach the dev server at all.
81
82
  *
82
83
  * Pinning the connection to 127.0.0.1 while keeping subdomain routing is not an
@@ -85,8 +86,8 @@ function isNameResolutionError(error) {
85
86
  *
86
87
  * The retry therefore carries the project in `x-project-slug`, which the dev
87
88
  * server reads inbound (see server/context/request-context.ts and
88
- * server/runtime-handler/project-resolution.ts) and which fetch — unlike `Host`
89
- * — is allowed to set. Without it a multi-project workspace would lose tenant
89
+ * server/runtime-handler/project-resolution.ts) and which fetch, unlike `Host`,
90
+ * is allowed to set. Without it a multi-project workspace would lose tenant
90
91
  * identity, because resolveDefaultProjectSlug() returns undefined there.
91
92
  */
92
93
  async function fetchModuleWithLoopbackFallback(fetchFn, url, init, log, projectSlug) {
@@ -164,36 +165,74 @@ export async function fetchModuleViaHTTP(normalizedPath, adapter, fetchAndCacheM
164
165
  const moduleCode = rewriteVeryfrontImports(await readHttpModuleText(response, MAX_MDX_MODULE_CODE_BYTES, controller.signal));
165
166
  const { vfModules, relative } = findNestedImports(moduleCode);
166
167
  const allImports = [
167
- ...vfModules.map(({ original, path, start, end }) => ({
168
+ ...vfModules.map(({ original, path, suffix, start, end, isDynamic, isSideEffect }) => ({
168
169
  original,
169
170
  path,
171
+ suffix,
170
172
  start,
171
173
  end,
174
+ isDynamic,
175
+ isSideEffect,
172
176
  key: "nestedPath",
173
177
  })),
174
- ...relative.map(({ original, path, start, end }) => ({
178
+ ...relative.map(({ original, path, suffix, start, end, isDynamic, isSideEffect }) => ({
175
179
  original,
176
180
  path,
181
+ suffix,
177
182
  start,
178
183
  end,
184
+ isDynamic,
185
+ isSideEffect,
179
186
  key: "relativePath",
180
187
  })),
181
188
  ];
182
189
  assertMdxModuleImportCount(normalizedPath, allImports.length);
183
- const results = await parallelMap(allImports, async ({ original, path, start, end, key }) => {
184
- const nestedFilePath = await fetchAndCacheModuleFn(path, normalizedPath);
185
- return { original, start, end, nestedFilePath, [key]: path };
190
+ const results = await parallelMap(allImports, async ({ original, path, suffix, start, end, isDynamic, isSideEffect, key }) => {
191
+ let nestedFilePath;
192
+ let deferredError;
193
+ try {
194
+ nestedFilePath = await fetchAndCacheModuleFn(path, normalizedPath);
195
+ }
196
+ catch (error) {
197
+ deferredError = isDynamic
198
+ ? dynamicDependencyFailure(path, error) ?? undefined
199
+ : undefined;
200
+ if (!deferredError || !options.esmCacheDir)
201
+ throw error;
202
+ nestedFilePath = null;
203
+ }
204
+ if (!nestedFilePath && isDynamic && options.esmCacheDir) {
205
+ nestedFilePath = await createStubModule(path, moduleCode, original, options.esmCacheDir, { failOnImport: options.strictMissingModules ?? true, deferredError });
206
+ }
207
+ return {
208
+ original,
209
+ start,
210
+ end,
211
+ suffix,
212
+ isDynamic,
213
+ isSideEffect,
214
+ nestedFilePath,
215
+ [key]: path,
216
+ };
186
217
  }, {
187
218
  semaphore: new Semaphore(MAX_MDX_MODULE_TRANSFORM_CONCURRENCY),
188
219
  });
189
220
  const replacements = [];
190
- for (const { original, start, end, nestedFilePath } of results) {
221
+ for (const { original, start, end, suffix, isDynamic, isSideEffect, nestedFilePath } of results) {
191
222
  if (nestedFilePath) {
223
+ // The suffix and the cache path are author- and filesystem-controlled.
224
+ // Interpolating either into a hand-written double-quoted literal emits
225
+ // a module that fails to parse whenever one contains `"` or `\`.
226
+ const importTarget = toImportStringLiteral(`file://${nestedFilePath}${suffix ?? ""}`);
192
227
  replacements.push({
193
228
  start,
194
229
  end,
195
230
  expected: original,
196
- replacement: `from "file://${nestedFilePath}"`,
231
+ replacement: isDynamic
232
+ ? importTarget
233
+ : isSideEffect
234
+ ? `import ${importTarget}`
235
+ : `from ${importTarget}`,
197
236
  });
198
237
  }
199
238
  }
@@ -4,24 +4,35 @@
4
4
  * @module transforms/mdx/esm-module-loader/module-fetcher/nested-imports
5
5
  */
6
6
  import type { NestedImportResult } from "../types.js";
7
+ import { type DeferredImportErrorDescriptor } from "../utils/stub-module.js";
7
8
  import type { Logger } from "../../../../utils/index.js";
9
+ type NestedImportSpan = {
10
+ original: string;
11
+ path: string;
12
+ start: number;
13
+ end: number;
14
+ suffix?: string;
15
+ isDynamic?: boolean;
16
+ isSideEffect?: boolean;
17
+ };
18
+ /** Return the sanitized runtime failure for a dependency error that can stay lazy. */
19
+ export declare function dynamicDependencyFailure(modulePath: string, error: unknown): DeferredImportErrorDescriptor | null;
20
+ /**
21
+ * Serialize a resolved module URL as a JavaScript string literal.
22
+ *
23
+ * A preserved suffix is author-controlled text (`?label="x"`, a backslash in a
24
+ * cache path). Wrapping it in quotes by hand emits a module that fails to
25
+ * parse, taking every other import in the file down with it, so every emitted
26
+ * specifier must go through this.
27
+ */
28
+ export declare function toImportStringLiteral(url: string): string;
8
29
  /**
9
30
  * Find nested module imports in code.
10
31
  * Matches both /_vf_modules/... and file:///_vf_modules/... patterns.
11
32
  */
12
33
  export declare function findNestedImports(moduleCode: string): {
13
- vfModules: Array<{
14
- original: string;
15
- path: string;
16
- start: number;
17
- end: number;
18
- }>;
19
- relative: Array<{
20
- original: string;
21
- path: string;
22
- start: number;
23
- end: number;
24
- }>;
34
+ vfModules: NestedImportSpan[];
35
+ relative: NestedImportSpan[];
25
36
  };
26
37
  /**
27
38
  * Check for unresolved /_vf_modules/ imports.
@@ -68,4 +79,5 @@ export declare function resolveNestedImportBase(normalizedPath: string, actualFi
68
79
  * Resolve nested /_vf_modules and relative imports into local file:// cache paths.
69
80
  */
70
81
  export declare function resolveNestedModuleImports(input: ResolveNestedModuleImportsInput): Promise<string>;
82
+ export {};
71
83
  //# sourceMappingURL=nested-imports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nested-imports.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAazD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GACjB;IACD,SAAS,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjF,QAAQ,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjF,CAoCA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAU3F;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,OAAO,EAC7B,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAqCjB;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAKR;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,+BAA+B,GACrC,OAAO,CAAC,MAAM,CAAC,CAgEjB"}
1
+ {"version":3,"file":"nested-imports.d.ts","sourceRoot":"","sources":["../../../../../../src/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAoB,KAAK,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAW/F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAezD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAQF,sFAAsF;AACtF,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,OAAO,GACb,6BAA6B,GAAG,IAAI,CAgDtC;AAaD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GACjB;IACD,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAoIA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAoC3F;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAAE,EAC7B,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,OAAO,EAC7B,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CA+EjB;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC/E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM,CAKR;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,+BAA+B,GACrC,OAAO,CAAC,MAAM,CAAC,CAyFjB"}